From a1222d4a70bad7b6cc5888f2546dee9b8b5be5ba Mon Sep 17 00:00:00 2001 From: Michele Ceriotti Date: Wed, 9 Oct 2024 22:55:13 +0200 Subject: [PATCH] Reverted to 0.7.3 minified js --- chemiscope-app.min.js | 2 +- chemiscope.min.js | 2 +- molecule-viewer.min.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chemiscope-app.min.js b/chemiscope-app.min.js index 7dc54e149..382650bbe 100644 --- a/chemiscope-app.min.js +++ b/chemiscope-app.min.js @@ -1,2 +1,2 @@ /*! For license information please see chemiscope-app.min.js.LICENSE.txt */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Chemiscope=e():t.Chemiscope=e()}(self,(()=>(()=>{var __webpack_modules__={745:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(78706),i=r.n(n),o=r(72859),a=r.n(o)()(i());a.push([t.id,":root {\n --header-height: 48px;\n --footer-height: 30px;\n}\n\nhtml {\n position: relative;\n min-height: 100%;\n}\n\nbody {\n margin-bottom: 30px;\n}\n\n.footer {\n position: absolute;\n bottom: 0;\n width: 100%;\n height: var(--footer-height);\n padding-top: 7px;\n background-color: #2c3e50;\n color: white;\n font-size: 0.8rem;\n}\n\n.footer .container {\n max-width: 1140px;\n}\n\n.footer a {\n color: inherit;\n text-decoration: underline;\n}\n\nheader {\n background-color: #2c3e50;\n width: 100%;\n height: var(--header-height);\n}\n\n.navbar {\n max-width: 1100px;\n margin-bottom: 1em;\n z-index: 999;\n background-color: inherit;\n}\n\n.references a {\n color: grey;\n}\n\n#loading {\n font-size: 6em;\n margin: auto;\n text-align: center;\n color: grey;\n position: absolute;\n z-index: 100000;\n left: 50%;\n}\n\nmain.container-fluid {\n margin: 1.5em 0em calc(1.5em + var(--header-height)) 0em;\n width: 100%;\n}\n\n@media screen and (min-width: 900px) {\n main.container-fluid {\n margin: 2em 2em calc(2em + var(--header-height)) 2em;\n width: calc(100% - 4em);\n }\n}\n\n@media screen and (min-width: 1200px) {\n main.container-fluid {\n margin: 2em auto calc(2em + var(--header-height)) auto;\n width: 1200px;\n }\n}\n\nmain .ratio {\n margin: auto;\n width: 90%; \n}\n\nmain .ratio > * {\n display: flex;\n flex-flow: column;\n}\n\n.ratio-5x7 {\n overflow-y: hidden;\n overflow-x: hidden;\n}\n\n.ratio-5x7::before {\n padding-top: 140%;\n}\n\n@media screen and (min-width: 768px) {\n .ratio-5x7 {\n max-height: calc(100vh - 2em - var(--header-height) - var(--footer-height)); \n }\n\n main .ratio {\n /* set the width to fit the vertical space, and the height will be set automatically */\n max-width: calc(100vh - 2em - var(--header-height) - var(--footer-height));\n width: 100%;\n }\n}\n\n.clickable {\n cursor: pointer;\n}\n\n.pop-on-top {\n z-index: 100;\n position: absolute;\n width: 80%;\n left: 50%;\n margin-left: -40%;\n}\n\n#chemiscope-meta {\n width: max-content;\n height: max-content;\n position: absolute;\n top: 0;\n left: 2em;\n font-size: 16pt;\n}\n\n#chemiscope-map {\n display: block;\n}\n\n#chemiscope-structure {\n flex: 1 1 auto;\n}\n\n#chemiscope-info {\n flex: 0 1 auto;\n width: 100%;\n}\n\n#upload {\n width: 280px;\n}\n\n#open-save-menu {\n background-color: #e2e6ea;\n border-color: #ced4da;\n}\n\n#open-save-menu:hover {\n background-color: #f8f9fa;\n}\n\n.grid-1-1 {\n display: grid;\n align-items: center;\n justify-content: center;\n align-content: start;\n grid-gap: 1em;\n grid-template-columns: 1fr 1fr;\n}\n\n.grid-1-1-1 {\n display: grid;\n align-items: center;\n justify-content: center;\n align-content: start;\n grid-gap: 1em;\n grid-template-columns: 1fr 1fr 1fr;\n}\n\n.width-10em {\n width: 10em;\n}\n\n.btn-outline-secondary-less-hover:hover {\n color: inherit;\n background-color: #f2f2f2;\n}\n\n.hidden-input-file {\n position: absolute;\n left: 0;\n opacity: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n}\n",""]);const s=a},11261:(t,e,r)=>{"use strict";r.d(e,{A:()=>G});var n=r(78706),i=r.n(n),o=r(72859),a=r.n(o),s=r(21906),l=r.n(s),c=new URL(r(35531),r.b),d=new URL(r(45419),r.b),u=new URL(r(83385),r.b),h=new URL(r(14274),r.b),p=new URL(r(57154),r.b),f=new URL(r(35782),r.b),m=new URL(r(54718),r.b),g=new URL(r(48487),r.b),v=new URL(r(35372),r.b),b=new URL(r(17914),r.b),y=new URL(r(36366),r.b),x=new URL(r(67830),r.b),w=new URL(r(88832),r.b),_=new URL(r(57249),r.b),k=new URL(r(75932),r.b),A=new URL(r(11144),r.b),T=a()(i()),M=l()(c),S=l()(d),C=l()(u),E=l()(h),L=l()(p),z=l()(f),O=l()(m),D=l()(g),I=l()(v),F=l()(b),R=l()(y),P=l()(x),j=l()(w),N=l()(_),B=l()(k),U=l()(A);T.push([t.id,`@charset "UTF-8";/*!\n * Bootstrap v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors\n * Copyright 2011-2022 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-body-color-rgb:33,37,41;--bs-body-bg-rgb:255,255,255;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, 0.175);--bs-border-radius:0.375rem;--bs-border-radius-sm:0.25rem;--bs-border-radius-lg:0.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-2xl:2rem;--bs-border-radius-pill:50rem;--bs-link-color:#0d6efd;--bs-link-hover-color:#0a58ca;--bs-code-color:#d63384;--bs-highlight-bg:#fff3cd}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;border:0;border-top:1px solid;opacity:.25}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.small,small{font-size:.875em}.mark,mark{padding:.1875em;background-color:var(--bs-highlight-bg)}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:var(--bs-link-color);text-decoration:underline}a:hover{color:var(--bs-link-hover-color)}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:var(--bs-code-color);word-wrap:break-word}a>code{color:inherit}kbd{padding:.1875rem .375rem;font-size:.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:.25rem}kbd kbd{padding:0;font-size:1em}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none!important}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}::file-selector-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:calc(1.625rem + 4.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-1{font-size:5rem}}.display-2{font-size:calc(1.575rem + 3.9vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-2{font-size:4.5rem}}.display-3{font-size:calc(1.525rem + 3.3vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-3{font-size:4rem}}.display-4{font-size:calc(1.475rem + 2.7vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-4{font-size:3.5rem}}.display-5{font-size:calc(1.425rem + 2.1vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-5{font-size:3rem}}.display-6{font-size:calc(1.375rem + 1.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-6{font-size:2.5rem}}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:.875em;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote>:last-child{margin-bottom:0}.blockquote-footer{margin-top:-1rem;margin-bottom:1rem;font-size:.875em;color:#6c757d}.blockquote-footer::before{content:"— "}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid var(--bs-border-color);border-radius:.375rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:.875em;color:#6c757d}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{--bs-gutter-x:1.5rem;--bs-gutter-y:0;width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(-1 * var(--bs-gutter-y));margin-right:calc(-.5 * var(--bs-gutter-x));margin-left:calc(-.5 * var(--bs-gutter-x))}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.33333333%}.col-2{flex:0 0 auto;width:16.66666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.33333333%}.col-5{flex:0 0 auto;width:41.66666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.33333333%}.col-8{flex:0 0 auto;width:66.66666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.33333333%}.col-11{flex:0 0 auto;width:91.66666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.33333333%}.col-sm-2{flex:0 0 auto;width:16.66666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.33333333%}.col-sm-5{flex:0 0 auto;width:41.66666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.33333333%}.col-sm-8{flex:0 0 auto;width:66.66666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.33333333%}.col-sm-11{flex:0 0 auto;width:91.66666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.33333333%}.col-md-2{flex:0 0 auto;width:16.66666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.33333333%}.col-md-5{flex:0 0 auto;width:41.66666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.33333333%}.col-md-8{flex:0 0 auto;width:66.66666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.33333333%}.col-md-11{flex:0 0 auto;width:91.66666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.33333333%}.col-lg-2{flex:0 0 auto;width:16.66666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.33333333%}.col-lg-5{flex:0 0 auto;width:41.66666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.33333333%}.col-lg-8{flex:0 0 auto;width:66.66666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.33333333%}.col-lg-11{flex:0 0 auto;width:91.66666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.33333333%}.col-xl-2{flex:0 0 auto;width:16.66666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.33333333%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.33333333%}.col-xl-8{flex:0 0 auto;width:66.66666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.33333333%}.col-xl-11{flex:0 0 auto;width:91.66666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0%}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.33333333%}.col-xxl-2{flex:0 0 auto;width:16.66666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.33333333%}.col-xxl-5{flex:0 0 auto;width:41.66666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.33333333%}.col-xxl-8{flex:0 0 auto;width:66.66666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.33333333%}.col-xxl-11{flex:0 0 auto;width:91.66666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.33333333%}.offset-xxl-2{margin-left:16.66666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.33333333%}.offset-xxl-5{margin-left:41.66666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.33333333%}.offset-xxl-8{margin-left:66.66666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.33333333%}.offset-xxl-11{margin-left:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.table{--bs-table-color:var(--bs-body-color);--bs-table-bg:transparent;--bs-table-border-color:var(--bs-border-color);--bs-table-accent-bg:transparent;--bs-table-striped-color:var(--bs-body-color);--bs-table-striped-bg:rgba(0, 0, 0, 0.05);--bs-table-active-color:var(--bs-body-color);--bs-table-active-bg:rgba(0, 0, 0, 0.1);--bs-table-hover-color:var(--bs-body-color);--bs-table-hover-bg:rgba(0, 0, 0, 0.075);width:100%;margin-bottom:1rem;color:var(--bs-table-color);vertical-align:top;border-color:var(--bs-table-border-color)}.table>:not(caption)>*>*{padding:.5rem .5rem;background-color:var(--bs-table-bg);border-bottom-width:1px;box-shadow:inset 0 0 0 9999px var(--bs-table-accent-bg)}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table-group-divider{border-top:2px solid currentcolor}.caption-top{caption-side:top}.table-sm>:not(caption)>*>*{padding:.25rem .25rem}.table-bordered>:not(caption)>*{border-width:1px 0}.table-bordered>:not(caption)>*>*{border-width:0 1px}.table-borderless>:not(caption)>*>*{border-bottom-width:0}.table-borderless>:not(:first-child){border-top-width:0}.table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-striped-columns>:not(caption)>tr>:nth-child(2n){--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-active{--bs-table-accent-bg:var(--bs-table-active-bg);color:var(--bs-table-active-color)}.table-hover>tbody>tr:hover>*{--bs-table-accent-bg:var(--bs-table-hover-bg);color:var(--bs-table-hover-color)}.table-primary{--bs-table-color:#000;--bs-table-bg:#cfe2ff;--bs-table-border-color:#bacbe6;--bs-table-striped-bg:#c5d7f2;--bs-table-striped-color:#000;--bs-table-active-bg:#bacbe6;--bs-table-active-color:#000;--bs-table-hover-bg:#bfd1ec;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-secondary{--bs-table-color:#000;--bs-table-bg:#e2e3e5;--bs-table-border-color:#cbccce;--bs-table-striped-bg:#d7d8da;--bs-table-striped-color:#000;--bs-table-active-bg:#cbccce;--bs-table-active-color:#000;--bs-table-hover-bg:#d1d2d4;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-success{--bs-table-color:#000;--bs-table-bg:#d1e7dd;--bs-table-border-color:#bcd0c7;--bs-table-striped-bg:#c7dbd2;--bs-table-striped-color:#000;--bs-table-active-bg:#bcd0c7;--bs-table-active-color:#000;--bs-table-hover-bg:#c1d6cc;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-info{--bs-table-color:#000;--bs-table-bg:#cff4fc;--bs-table-border-color:#badce3;--bs-table-striped-bg:#c5e8ef;--bs-table-striped-color:#000;--bs-table-active-bg:#badce3;--bs-table-active-color:#000;--bs-table-hover-bg:#bfe2e9;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-warning{--bs-table-color:#000;--bs-table-bg:#fff3cd;--bs-table-border-color:#e6dbb9;--bs-table-striped-bg:#f2e7c3;--bs-table-striped-color:#000;--bs-table-active-bg:#e6dbb9;--bs-table-active-color:#000;--bs-table-hover-bg:#ece1be;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-danger{--bs-table-color:#000;--bs-table-bg:#f8d7da;--bs-table-border-color:#dfc2c4;--bs-table-striped-bg:#eccccf;--bs-table-striped-color:#000;--bs-table-active-bg:#dfc2c4;--bs-table-active-color:#000;--bs-table-hover-bg:#e5c7ca;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-light{--bs-table-color:#000;--bs-table-bg:#f8f9fa;--bs-table-border-color:#dfe0e1;--bs-table-striped-bg:#ecedee;--bs-table-striped-color:#000;--bs-table-active-bg:#dfe0e1;--bs-table-active-color:#000;--bs-table-hover-bg:#e5e6e7;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-dark{--bs-table-color:#fff;--bs-table-bg:#212529;--bs-table-border-color:#373b3e;--bs-table-striped-bg:#2c3034;--bs-table-striped-color:#fff;--bs-table-active-bg:#373b3e;--bs-table-active-color:#fff;--bs-table-hover-bg:#323539;--bs-table-hover-color:#fff;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media (max-width:575.98px){.table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:767.98px){.table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:991.98px){.table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1199.98px){.table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1399.98px){.table-responsive-xxl{overflow-x:auto;-webkit-overflow-scrolling:touch}}.form-label{margin-bottom:.5rem}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem}.form-text{margin-top:.25rem;font-size:.875em;color:#6c757d}.form-control{display:block;width:100%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.375rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not([readonly]){cursor:pointer}.form-control:focus{color:#212529;background-color:#fff;border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-control::-webkit-date-and-time-value{height:1.5em}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled{background-color:#e9ecef;opacity:1}.form-control::-webkit-file-upload-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control::file-selector-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}.form-control::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#dde0e3}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:#dde0e3}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext:focus{outline:0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{min-height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;border-radius:.25rem}.form-control-sm::-webkit-file-upload-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-sm::file-selector-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-lg{min-height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;border-radius:.5rem}.form-control-lg::-webkit-file-upload-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.form-control-lg::file-selector-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}textarea.form-control{min-height:calc(1.5em + .75rem + 2px)}textarea.form-control-sm{min-height:calc(1.5em + .5rem + 2px)}textarea.form-control-lg{min-height:calc(1.5em + 1rem + 2px)}.form-control-color{width:3rem;height:calc(1.5em + .75rem + 2px);padding:.375rem}.form-control-color:not(:disabled):not([readonly]){cursor:pointer}.form-control-color::-moz-color-swatch{border:0!important;border-radius:.375rem}.form-control-color::-webkit-color-swatch{border-radius:.375rem}.form-control-color.form-control-sm{height:calc(1.5em + .5rem + 2px)}.form-control-color.form-control-lg{height:calc(1.5em + 1rem + 2px)}.form-select{display:block;width:100%;padding:.375rem 2.25rem .375rem .75rem;-moz-padding-start:calc(0.75rem - 3px);font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-image:url(${M});background-repeat:no-repeat;background-position:right .75rem center;background-size:16px 12px;border:1px solid #ced4da;border-radius:.375rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-select{transition:none}}.form-select:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-select[multiple],.form-select[size]:not([size="1"]){padding-right:.75rem;background-image:none}.form-select:disabled{background-color:#e9ecef}.form-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #212529}.form-select-sm{padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem;border-radius:.25rem}.form-select-lg{padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem;border-radius:.5rem}.form-check{display:block;min-height:1.5rem;padding-left:1.5em;margin-bottom:.125rem}.form-check .form-check-input{float:left;margin-left:-1.5em}.form-check-reverse{padding-right:1.5em;padding-left:0;text-align:right}.form-check-reverse .form-check-input{float:right;margin-right:-1.5em;margin-left:0}.form-check-input{width:1em;height:1em;margin-top:.25em;vertical-align:top;background-color:#fff;background-repeat:no-repeat;background-position:center;background-size:contain;border:1px solid rgba(0,0,0,.25);-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;print-color-adjust:exact}.form-check-input[type=checkbox]{border-radius:.25em}.form-check-input[type=radio]{border-radius:50%}.form-check-input:active{filter:brightness(90%)}.form-check-input:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-check-input:checked{background-color:#0d6efd;border-color:#0d6efd}.form-check-input:checked[type=checkbox]{background-image:url(${S})}.form-check-input:checked[type=radio]{background-image:url(${C})}.form-check-input[type=checkbox]:indeterminate{background-color:#0d6efd;border-color:#0d6efd;background-image:url(${E})}.form-check-input:disabled{pointer-events:none;filter:none;opacity:.5}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:default;opacity:.5}.form-switch{padding-left:2.5em}.form-switch .form-check-input{width:2em;margin-left:-2.5em;background-image:url(${L});background-position:left center;border-radius:2em;transition:background-position .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-switch .form-check-input{transition:none}}.form-switch .form-check-input:focus{background-image:url(${z})}.form-switch .form-check-input:checked{background-position:right center;background-image:url(${O})}.form-switch.form-check-reverse{padding-right:2.5em;padding-left:0}.form-switch.form-check-reverse .form-check-input{margin-right:-2.5em;margin-left:0}.form-check-inline{display:inline-block;margin-right:1rem}.btn-check{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.btn-check:disabled+.btn,.btn-check[disabled]+.btn{pointer-events:none;filter:none;opacity:.65}.form-range{width:100%;height:1.5rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.form-range:focus{outline:0}.form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range::-moz-focus-outer{border:0}.form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#0d6efd;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}.form-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#0d6efd;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-moz-range-thumb{-moz-transition:none;transition:none}}.form-range::-moz-range-thumb:active{background-color:#b6d4fe}.form-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range:disabled{pointer-events:none}.form-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.form-range:disabled::-moz-range-thumb{background-color:#adb5bd}.form-floating{position:relative}.form-floating>.form-control,.form-floating>.form-control-plaintext,.form-floating>.form-select{height:calc(3.5rem + 2px);line-height:1.25}.form-floating>label{position:absolute;top:0;left:0;width:100%;height:100%;padding:1rem .75rem;overflow:hidden;text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:1px solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media (prefers-reduced-motion:reduce){.form-floating>label{transition:none}}.form-floating>.form-control,.form-floating>.form-control-plaintext{padding:1rem .75rem}.form-floating>.form-control-plaintext::-moz-placeholder,.form-floating>.form-control::-moz-placeholder{color:transparent}.form-floating>.form-control-plaintext::placeholder,.form-floating>.form-control::placeholder{color:transparent}.form-floating>.form-control-plaintext:not(:-moz-placeholder-shown),.form-floating>.form-control:not(:-moz-placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control-plaintext:focus,.form-floating>.form-control-plaintext:not(:placeholder-shown),.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control-plaintext:-webkit-autofill,.form-floating>.form-control:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-select{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:not(:-moz-placeholder-shown)~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control-plaintext~label,.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:-webkit-autofill~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control-plaintext~label{border-width:1px 0}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-floating,.input-group>.form-select{position:relative;flex:1 1 auto;width:1%;min-width:0}.input-group>.form-control:focus,.input-group>.form-floating:focus-within,.input-group>.form-select:focus{z-index:5}.input-group .btn{position:relative;z-index:2}.input-group .btn:focus{z-index:5}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.375rem}.input-group-lg>.btn,.input-group-lg>.form-control,.input-group-lg>.form-select,.input-group-lg>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;border-radius:.5rem}.input-group-sm>.btn,.input-group-sm>.form-control,.input-group-sm>.form-select,.input-group-sm>.input-group-text{padding:.25rem .5rem;font-size:.875rem;border-radius:.25rem}.input-group-lg>.form-select,.input-group-sm>.form-select{padding-right:3rem}.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3),.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-control,.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-select,.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.dropdown-toggle:nth-last-child(n+4),.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-control,.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-select,.input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.form-floating:not(:first-child)>.form-control,.input-group>.form-floating:not(:first-child)>.form-select{border-top-left-radius:0;border-bottom-left-radius:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#198754}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(25,135,84,.9);border-radius:.375rem}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#198754;padding-right:calc(1.5em + .75rem);background-image:url(${D});background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-valid,.was-validated .form-select:valid{border-color:#198754}.form-select.is-valid:not([multiple]):not([size]),.form-select.is-valid:not([multiple])[size="1"],.was-validated .form-select:valid:not([multiple]):not([size]),.was-validated .form-select:valid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url(${M}),url(${D});background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-valid:focus,.was-validated .form-select:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-control-color.is-valid,.was-validated .form-control-color:valid{width:calc(3rem + calc(1.5em + .75rem))}.form-check-input.is-valid,.was-validated .form-check-input:valid{border-color:#198754}.form-check-input.is-valid:checked,.was-validated .form-check-input:valid:checked{background-color:#198754}.form-check-input.is-valid:focus,.was-validated .form-check-input:valid:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#198754}.form-check-inline .form-check-input~.valid-feedback{margin-left:.5em}.input-group>.form-control:not(:focus).is-valid,.input-group>.form-floating:not(:focus-within).is-valid,.input-group>.form-select:not(:focus).is-valid,.was-validated .input-group>.form-control:not(:focus):valid,.was-validated .input-group>.form-floating:not(:focus-within):valid,.was-validated .input-group>.form-select:not(:focus):valid{z-index:3}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.375rem}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url(${I});background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-invalid,.was-validated .form-select:invalid{border-color:#dc3545}.form-select.is-invalid:not([multiple]):not([size]),.form-select.is-invalid:not([multiple])[size="1"],.was-validated .form-select:invalid:not([multiple]):not([size]),.was-validated .form-select:invalid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url(${M}),url(${I});background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-invalid:focus,.was-validated .form-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-control-color.is-invalid,.was-validated .form-control-color:invalid{width:calc(3rem + calc(1.5em + .75rem))}.form-check-input.is-invalid,.was-validated .form-check-input:invalid{border-color:#dc3545}.form-check-input.is-invalid:checked,.was-validated .form-check-input:invalid:checked{background-color:#dc3545}.form-check-input.is-invalid:focus,.was-validated .form-check-input:invalid:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-inline .form-check-input~.invalid-feedback{margin-left:.5em}.input-group>.form-control:not(:focus).is-invalid,.input-group>.form-floating:not(:focus-within).is-invalid,.input-group>.form-select:not(:focus).is-invalid,.was-validated .input-group>.form-control:not(:focus):invalid,.was-validated .input-group>.form-floating:not(:focus-within):invalid,.was-validated .input-group>.form-select:not(:focus):invalid{z-index:4}.btn{--bs-btn-padding-x:0.75rem;--bs-btn-padding-y:0.375rem;--bs-btn-font-family: ;--bs-btn-font-size:1rem;--bs-btn-font-weight:400;--bs-btn-line-height:1.5;--bs-btn-color:#212529;--bs-btn-bg:transparent;--bs-btn-border-width:1px;--bs-btn-border-color:transparent;--bs-btn-border-radius:0.375rem;--bs-btn-hover-border-color:transparent;--bs-btn-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.15),0 1px 1px rgba(0, 0, 0, 0.075);--bs-btn-disabled-opacity:0.65;--bs-btn-focus-box-shadow:0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5);display:inline-block;padding:var(--bs-btn-padding-y) var(--bs-btn-padding-x);font-family:var(--bs-btn-font-family);font-size:var(--bs-btn-font-size);font-weight:var(--bs-btn-font-weight);line-height:var(--bs-btn-line-height);color:var(--bs-btn-color);text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;border:var(--bs-btn-border-width) solid var(--bs-btn-border-color);border-radius:var(--bs-btn-border-radius);background-color:var(--bs-btn-bg);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color)}.btn-check+.btn:hover{color:var(--bs-btn-color);background-color:var(--bs-btn-bg);border-color:var(--bs-btn-border-color)}.btn:focus-visible{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:focus-visible+.btn{border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:checked+.btn,.btn.active,.btn.show,.btn:first-child:active,:not(.btn-check)+.btn:active{color:var(--bs-btn-active-color);background-color:var(--bs-btn-active-bg);border-color:var(--bs-btn-active-border-color)}.btn-check:checked+.btn:focus-visible,.btn.active:focus-visible,.btn.show:focus-visible,.btn:first-child:active:focus-visible,:not(.btn-check)+.btn:active:focus-visible{box-shadow:var(--bs-btn-focus-box-shadow)}.btn.disabled,.btn:disabled,fieldset:disabled .btn{color:var(--bs-btn-disabled-color);pointer-events:none;background-color:var(--bs-btn-disabled-bg);border-color:var(--bs-btn-disabled-border-color);opacity:var(--bs-btn-disabled-opacity)}.btn-primary{--bs-btn-color:#fff;--bs-btn-bg:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0b5ed7;--bs-btn-hover-border-color:#0a58ca;--bs-btn-focus-shadow-rgb:49,132,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0a58ca;--bs-btn-active-border-color:#0a53be;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#0d6efd;--bs-btn-disabled-border-color:#0d6efd}.btn-secondary{--bs-btn-color:#fff;--bs-btn-bg:#6c757d;--bs-btn-border-color:#6c757d;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#5c636a;--bs-btn-hover-border-color:#565e64;--bs-btn-focus-shadow-rgb:130,138,145;--bs-btn-active-color:#fff;--bs-btn-active-bg:#565e64;--bs-btn-active-border-color:#51585e;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#6c757d;--bs-btn-disabled-border-color:#6c757d}.btn-success{--bs-btn-color:#fff;--bs-btn-bg:#198754;--bs-btn-border-color:#198754;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#157347;--bs-btn-hover-border-color:#146c43;--bs-btn-focus-shadow-rgb:60,153,110;--bs-btn-active-color:#fff;--bs-btn-active-bg:#146c43;--bs-btn-active-border-color:#13653f;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#198754;--bs-btn-disabled-border-color:#198754}.btn-info{--bs-btn-color:#000;--bs-btn-bg:#0dcaf0;--bs-btn-border-color:#0dcaf0;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#31d2f2;--bs-btn-hover-border-color:#25cff2;--bs-btn-focus-shadow-rgb:11,172,204;--bs-btn-active-color:#000;--bs-btn-active-bg:#3dd5f3;--bs-btn-active-border-color:#25cff2;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#0dcaf0;--bs-btn-disabled-border-color:#0dcaf0}.btn-warning{--bs-btn-color:#000;--bs-btn-bg:#ffc107;--bs-btn-border-color:#ffc107;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#ffca2c;--bs-btn-hover-border-color:#ffc720;--bs-btn-focus-shadow-rgb:217,164,6;--bs-btn-active-color:#000;--bs-btn-active-bg:#ffcd39;--bs-btn-active-border-color:#ffc720;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#ffc107;--bs-btn-disabled-border-color:#ffc107}.btn-danger{--bs-btn-color:#fff;--bs-btn-bg:#dc3545;--bs-btn-border-color:#dc3545;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#bb2d3b;--bs-btn-hover-border-color:#b02a37;--bs-btn-focus-shadow-rgb:225,83,97;--bs-btn-active-color:#fff;--bs-btn-active-bg:#b02a37;--bs-btn-active-border-color:#a52834;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#dc3545;--bs-btn-disabled-border-color:#dc3545}.btn-light{--bs-btn-color:#000;--bs-btn-bg:#f8f9fa;--bs-btn-border-color:#f8f9fa;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#d3d4d5;--bs-btn-hover-border-color:#c6c7c8;--bs-btn-focus-shadow-rgb:211,212,213;--bs-btn-active-color:#000;--bs-btn-active-bg:#c6c7c8;--bs-btn-active-border-color:#babbbc;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#f8f9fa;--bs-btn-disabled-border-color:#f8f9fa}.btn-dark{--bs-btn-color:#fff;--bs-btn-bg:#212529;--bs-btn-border-color:#212529;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#424649;--bs-btn-hover-border-color:#373b3e;--bs-btn-focus-shadow-rgb:66,70,73;--bs-btn-active-color:#fff;--bs-btn-active-bg:#4d5154;--bs-btn-active-border-color:#373b3e;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#212529;--bs-btn-disabled-border-color:#212529}.btn-outline-primary{--bs-btn-color:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0d6efd;--bs-btn-hover-border-color:#0d6efd;--bs-btn-focus-shadow-rgb:13,110,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0d6efd;--bs-btn-active-border-color:#0d6efd;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#0d6efd;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#0d6efd;--bs-gradient:none}.btn-outline-secondary{--bs-btn-color:#6c757d;--bs-btn-border-color:#6c757d;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#6c757d;--bs-btn-hover-border-color:#6c757d;--bs-btn-focus-shadow-rgb:108,117,125;--bs-btn-active-color:#fff;--bs-btn-active-bg:#6c757d;--bs-btn-active-border-color:#6c757d;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#6c757d;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#6c757d;--bs-gradient:none}.btn-outline-success{--bs-btn-color:#198754;--bs-btn-border-color:#198754;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#198754;--bs-btn-hover-border-color:#198754;--bs-btn-focus-shadow-rgb:25,135,84;--bs-btn-active-color:#fff;--bs-btn-active-bg:#198754;--bs-btn-active-border-color:#198754;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#198754;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#198754;--bs-gradient:none}.btn-outline-info{--bs-btn-color:#0dcaf0;--bs-btn-border-color:#0dcaf0;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#0dcaf0;--bs-btn-hover-border-color:#0dcaf0;--bs-btn-focus-shadow-rgb:13,202,240;--bs-btn-active-color:#000;--bs-btn-active-bg:#0dcaf0;--bs-btn-active-border-color:#0dcaf0;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#0dcaf0;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#0dcaf0;--bs-gradient:none}.btn-outline-warning{--bs-btn-color:#ffc107;--bs-btn-border-color:#ffc107;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#ffc107;--bs-btn-hover-border-color:#ffc107;--bs-btn-focus-shadow-rgb:255,193,7;--bs-btn-active-color:#000;--bs-btn-active-bg:#ffc107;--bs-btn-active-border-color:#ffc107;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#ffc107;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#ffc107;--bs-gradient:none}.btn-outline-danger{--bs-btn-color:#dc3545;--bs-btn-border-color:#dc3545;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#dc3545;--bs-btn-hover-border-color:#dc3545;--bs-btn-focus-shadow-rgb:220,53,69;--bs-btn-active-color:#fff;--bs-btn-active-bg:#dc3545;--bs-btn-active-border-color:#dc3545;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#dc3545;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#dc3545;--bs-gradient:none}.btn-outline-light{--bs-btn-color:#f8f9fa;--bs-btn-border-color:#f8f9fa;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#f8f9fa;--bs-btn-hover-border-color:#f8f9fa;--bs-btn-focus-shadow-rgb:248,249,250;--bs-btn-active-color:#000;--bs-btn-active-bg:#f8f9fa;--bs-btn-active-border-color:#f8f9fa;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#f8f9fa;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#f8f9fa;--bs-gradient:none}.btn-outline-dark{--bs-btn-color:#212529;--bs-btn-border-color:#212529;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#212529;--bs-btn-hover-border-color:#212529;--bs-btn-focus-shadow-rgb:33,37,41;--bs-btn-active-color:#fff;--bs-btn-active-bg:#212529;--bs-btn-active-border-color:#212529;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#212529;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#212529;--bs-gradient:none}.btn-link{--bs-btn-font-weight:400;--bs-btn-color:var(--bs-link-color);--bs-btn-bg:transparent;--bs-btn-border-color:transparent;--bs-btn-hover-color:var(--bs-link-hover-color);--bs-btn-hover-border-color:transparent;--bs-btn-active-color:var(--bs-link-hover-color);--bs-btn-active-border-color:transparent;--bs-btn-disabled-color:#6c757d;--bs-btn-disabled-border-color:transparent;--bs-btn-box-shadow:none;--bs-btn-focus-shadow-rgb:49,132,253;text-decoration:underline}.btn-link:focus-visible{color:var(--bs-btn-color)}.btn-link:hover{color:var(--bs-btn-hover-color)}.btn-group-lg>.btn,.btn-lg{--bs-btn-padding-y:0.5rem;--bs-btn-padding-x:1rem;--bs-btn-font-size:1.25rem;--bs-btn-border-radius:0.5rem}.btn-group-sm>.btn,.btn-sm{--bs-btn-padding-y:0.25rem;--bs-btn-padding-x:0.5rem;--bs-btn-font-size:0.875rem;--bs-btn-border-radius:0.25rem}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.collapsing.collapse-horizontal{width:0;height:auto;transition:width .35s ease}@media (prefers-reduced-motion:reduce){.collapsing.collapse-horizontal{transition:none}}.dropdown,.dropdown-center,.dropend,.dropstart,.dropup,.dropup-center{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{--bs-dropdown-zindex:1000;--bs-dropdown-min-width:10rem;--bs-dropdown-padding-x:0;--bs-dropdown-padding-y:0.5rem;--bs-dropdown-spacer:0.125rem;--bs-dropdown-font-size:1rem;--bs-dropdown-color:#212529;--bs-dropdown-bg:#fff;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-border-radius:0.375rem;--bs-dropdown-border-width:1px;--bs-dropdown-inner-border-radius:calc(0.375rem - 1px);--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-divider-margin-y:0.5rem;--bs-dropdown-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-dropdown-link-color:#212529;--bs-dropdown-link-hover-color:#1e2125;--bs-dropdown-link-hover-bg:#e9ecef;--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:#adb5bd;--bs-dropdown-item-padding-x:1rem;--bs-dropdown-item-padding-y:0.25rem;--bs-dropdown-header-color:#6c757d;--bs-dropdown-header-padding-x:1rem;--bs-dropdown-header-padding-y:0.5rem;position:absolute;z-index:var(--bs-dropdown-zindex);display:none;min-width:var(--bs-dropdown-min-width);padding:var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x);margin:0;font-size:var(--bs-dropdown-font-size);color:var(--bs-dropdown-color);text-align:left;list-style:none;background-color:var(--bs-dropdown-bg);background-clip:padding-box;border:var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color);border-radius:var(--bs-dropdown-border-radius)}.dropdown-menu[data-bs-popper]{top:100%;left:0;margin-top:var(--bs-dropdown-spacer)}.dropdown-menu-start{--bs-position:start}.dropdown-menu-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-end{--bs-position:end}.dropdown-menu-end[data-bs-popper]{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-start{--bs-position:start}.dropdown-menu-sm-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-sm-end{--bs-position:end}.dropdown-menu-sm-end[data-bs-popper]{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-start{--bs-position:start}.dropdown-menu-md-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-md-end{--bs-position:end}.dropdown-menu-md-end[data-bs-popper]{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-start{--bs-position:start}.dropdown-menu-lg-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-lg-end{--bs-position:end}.dropdown-menu-lg-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-start{--bs-position:start}.dropdown-menu-xl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xl-end{--bs-position:end}.dropdown-menu-xl-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1400px){.dropdown-menu-xxl-start{--bs-position:start}.dropdown-menu-xxl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xxl-end{--bs-position:end}.dropdown-menu-xxl-end[data-bs-popper]{right:0;left:auto}}.dropup .dropdown-menu[data-bs-popper]{top:auto;bottom:100%;margin-top:0;margin-bottom:var(--bs-dropdown-spacer)}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-menu[data-bs-popper]{top:0;right:auto;left:100%;margin-top:0;margin-left:var(--bs-dropdown-spacer)}.dropend .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropend .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-toggle::after{vertical-align:0}.dropstart .dropdown-menu[data-bs-popper]{top:0;right:100%;left:auto;margin-top:0;margin-right:var(--bs-dropdown-spacer)}.dropstart .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropstart .dropdown-toggle::after{display:none}.dropstart .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropstart .dropdown-toggle:empty::after{margin-left:0}.dropstart .dropdown-toggle::before{vertical-align:0}.dropdown-divider{height:0;margin:var(--bs-dropdown-divider-margin-y) 0;overflow:hidden;border-top:1px solid var(--bs-dropdown-divider-bg);opacity:1}.dropdown-item{display:block;width:100%;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);clear:both;font-weight:400;color:var(--bs-dropdown-link-color);text-align:inherit;text-decoration:none;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:var(--bs-dropdown-link-hover-color);background-color:var(--bs-dropdown-link-hover-bg)}.dropdown-item.active,.dropdown-item:active{color:var(--bs-dropdown-link-active-color);text-decoration:none;background-color:var(--bs-dropdown-link-active-bg)}.dropdown-item.disabled,.dropdown-item:disabled{color:var(--bs-dropdown-link-disabled-color);pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x);margin-bottom:0;font-size:.875rem;color:var(--bs-dropdown-header-color);white-space:nowrap}.dropdown-item-text{display:block;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);color:var(--bs-dropdown-link-color)}.dropdown-menu-dark{--bs-dropdown-color:#dee2e6;--bs-dropdown-bg:#343a40;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-box-shadow: ;--bs-dropdown-link-color:#dee2e6;--bs-dropdown-link-hover-color:#fff;--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-link-hover-bg:rgba(255, 255, 255, 0.15);--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:#adb5bd;--bs-dropdown-header-color:#adb5bd}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group-vertical>.btn-check:checked+.btn,.btn-group-vertical>.btn-check:focus+.btn,.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn-check:checked+.btn,.btn-group>.btn-check:focus+.btn,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group{border-radius:.375rem}.btn-group>.btn-group:not(:first-child),.btn-group>:not(.btn-check:first-child)+.btn{margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn.dropdown-toggle-split:first-child,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:nth-child(n+3),.btn-group>:not(.btn-check)+.btn{border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropend .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropstart .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn~.btn{border-top-left-radius:0;border-top-right-radius:0}.nav{--bs-nav-link-padding-x:1rem;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color:var(--bs-link-color);--bs-nav-link-hover-color:var(--bs-link-hover-color);--bs-nav-link-disabled-color:#6c757d;display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);font-size:var(--bs-nav-link-font-size);font-weight:var(--bs-nav-link-font-weight);color:var(--bs-nav-link-color);text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}@media (prefers-reduced-motion:reduce){.nav-link{transition:none}}.nav-link:focus,.nav-link:hover{color:var(--bs-nav-link-hover-color)}.nav-link.disabled{color:var(--bs-nav-link-disabled-color);pointer-events:none;cursor:default}.nav-tabs{--bs-nav-tabs-border-width:1px;--bs-nav-tabs-border-color:#dee2e6;--bs-nav-tabs-border-radius:0.375rem;--bs-nav-tabs-link-hover-border-color:#e9ecef #e9ecef #dee2e6;--bs-nav-tabs-link-active-color:#495057;--bs-nav-tabs-link-active-bg:#fff;--bs-nav-tabs-link-active-border-color:#dee2e6 #dee2e6 #fff;border-bottom:var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color)}.nav-tabs .nav-link{margin-bottom:calc(-1 * var(--bs-nav-tabs-border-width));background:0 0;border:var(--bs-nav-tabs-border-width) solid transparent;border-top-left-radius:var(--bs-nav-tabs-border-radius);border-top-right-radius:var(--bs-nav-tabs-border-radius)}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{isolation:isolate;border-color:var(--bs-nav-tabs-link-hover-border-color)}.nav-tabs .nav-link.disabled,.nav-tabs .nav-link:disabled{color:var(--bs-nav-link-disabled-color);background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}.nav-tabs .dropdown-menu{margin-top:calc(-1 * var(--bs-nav-tabs-border-width));border-top-left-radius:0;border-top-right-radius:0}.nav-pills{--bs-nav-pills-border-radius:0.375rem;--bs-nav-pills-link-active-color:#fff;--bs-nav-pills-link-active-bg:#0d6efd}.nav-pills .nav-link{background:0 0;border:0;border-radius:var(--bs-nav-pills-border-radius)}.nav-pills .nav-link:disabled{color:var(--bs-nav-link-disabled-color);background-color:transparent;border-color:transparent}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:var(--bs-nav-pills-link-active-color);background-color:var(--bs-nav-pills-link-active-bg)}.nav-fill .nav-item,.nav-fill>.nav-link{flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{flex-basis:0;flex-grow:1;text-align:center}.nav-fill .nav-item .nav-link,.nav-justified .nav-item .nav-link{width:100%}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{--bs-navbar-padding-x:0;--bs-navbar-padding-y:0.5rem;--bs-navbar-color:rgba(0, 0, 0, 0.55);--bs-navbar-hover-color:rgba(0, 0, 0, 0.7);--bs-navbar-disabled-color:rgba(0, 0, 0, 0.3);--bs-navbar-active-color:rgba(0, 0, 0, 0.9);--bs-navbar-brand-padding-y:0.3125rem;--bs-navbar-brand-margin-end:1rem;--bs-navbar-brand-font-size:1.25rem;--bs-navbar-brand-color:rgba(0, 0, 0, 0.9);--bs-navbar-brand-hover-color:rgba(0, 0, 0, 0.9);--bs-navbar-nav-link-padding-x:0.5rem;--bs-navbar-toggler-padding-y:0.25rem;--bs-navbar-toggler-padding-x:0.75rem;--bs-navbar-toggler-font-size:1.25rem;--bs-navbar-toggler-icon-bg:url(${F});--bs-navbar-toggler-border-color:rgba(0, 0, 0, 0.1);--bs-navbar-toggler-border-radius:0.375rem;--bs-navbar-toggler-focus-width:0.25rem;--bs-navbar-toggler-transition:box-shadow 0.15s ease-in-out;position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:var(--bs-navbar-padding-y) var(--bs-navbar-padding-x)}.navbar>.container,.navbar>.container-fluid,.navbar>.container-lg,.navbar>.container-md,.navbar>.container-sm,.navbar>.container-xl,.navbar>.container-xxl{display:flex;flex-wrap:inherit;align-items:center;justify-content:space-between}.navbar-brand{padding-top:var(--bs-navbar-brand-padding-y);padding-bottom:var(--bs-navbar-brand-padding-y);margin-right:var(--bs-navbar-brand-margin-end);font-size:var(--bs-navbar-brand-font-size);color:var(--bs-navbar-brand-color);text-decoration:none;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{color:var(--bs-navbar-brand-hover-color)}.navbar-nav{--bs-nav-link-padding-x:0;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color:var(--bs-navbar-color);--bs-nav-link-hover-color:var(--bs-navbar-hover-color);--bs-nav-link-disabled-color:var(--bs-navbar-disabled-color);display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link.active,.navbar-nav .show>.nav-link{color:var(--bs-navbar-active-color)}.navbar-nav .dropdown-menu{position:static}.navbar-text{padding-top:.5rem;padding-bottom:.5rem;color:var(--bs-navbar-color)}.navbar-text a,.navbar-text a:focus,.navbar-text a:hover{color:var(--bs-navbar-active-color)}.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}.navbar-toggler{padding:var(--bs-navbar-toggler-padding-y) var(--bs-navbar-toggler-padding-x);font-size:var(--bs-navbar-toggler-font-size);line-height:1;color:var(--bs-navbar-color);background-color:transparent;border:var(--bs-border-width) solid var(--bs-navbar-toggler-border-color);border-radius:var(--bs-navbar-toggler-border-radius);transition:var(--bs-navbar-toggler-transition)}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-toggler:hover{text-decoration:none}.navbar-toggler:focus{text-decoration:none;outline:0;box-shadow:0 0 0 var(--bs-navbar-toggler-focus-width)}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;background-image:var(--bs-navbar-toggler-icon-bg);background-repeat:no-repeat;background-position:center;background-size:100%}.navbar-nav-scroll{max-height:var(--bs-scroll-height,75vh);overflow-y:auto}@media (min-width:576px){.navbar-expand-sm{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}.navbar-expand-sm .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-sm .offcanvas .offcanvas-header{display:none}.navbar-expand-sm .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}.navbar-expand-md .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-md .offcanvas .offcanvas-header{display:none}.navbar-expand-md .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:992px){.navbar-expand-lg{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}.navbar-expand-lg .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-lg .offcanvas .offcanvas-header{display:none}.navbar-expand-lg .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1200px){.navbar-expand-xl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}.navbar-expand-xl .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-xl .offcanvas .offcanvas-header{display:none}.navbar-expand-xl .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1400px){.navbar-expand-xxl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xxl .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}.navbar-expand-xxl .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-xxl .offcanvas .offcanvas-header{display:none}.navbar-expand-xxl .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}.navbar-expand{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-expand .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand .offcanvas .offcanvas-header{display:none}.navbar-expand .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}.navbar-dark{--bs-navbar-color:rgba(255, 255, 255, 0.55);--bs-navbar-hover-color:rgba(255, 255, 255, 0.75);--bs-navbar-disabled-color:rgba(255, 255, 255, 0.25);--bs-navbar-active-color:#fff;--bs-navbar-brand-color:#fff;--bs-navbar-brand-hover-color:#fff;--bs-navbar-toggler-border-color:rgba(255, 255, 255, 0.1);--bs-navbar-toggler-icon-bg:url(${R})}.card{--bs-card-spacer-y:1rem;--bs-card-spacer-x:1rem;--bs-card-title-spacer-y:0.5rem;--bs-card-border-width:1px;--bs-card-border-color:var(--bs-border-color-translucent);--bs-card-border-radius:0.375rem;--bs-card-box-shadow: ;--bs-card-inner-border-radius:calc(0.375rem - 1px);--bs-card-cap-padding-y:0.5rem;--bs-card-cap-padding-x:1rem;--bs-card-cap-bg:rgba(0, 0, 0, 0.03);--bs-card-cap-color: ;--bs-card-height: ;--bs-card-color: ;--bs-card-bg:#fff;--bs-card-img-overlay-padding:1rem;--bs-card-group-margin:0.75rem;position:relative;display:flex;flex-direction:column;min-width:0;height:var(--bs-card-height);word-wrap:break-word;background-color:var(--bs-card-bg);background-clip:border-box;border:var(--bs-card-border-width) solid var(--bs-card-border-color);border-radius:var(--bs-card-border-radius)}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:var(--bs-card-inner-border-radius);border-top-right-radius:var(--bs-card-inner-border-radius)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:var(--bs-card-inner-border-radius);border-bottom-left-radius:var(--bs-card-inner-border-radius)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{flex:1 1 auto;padding:var(--bs-card-spacer-y) var(--bs-card-spacer-x);color:var(--bs-card-color)}.card-title{margin-bottom:var(--bs-card-title-spacer-y)}.card-subtitle{margin-top:calc(-.5 * var(--bs-card-title-spacer-y));margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link+.card-link{margin-left:var(--bs-card-spacer-x)}.card-header{padding:var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);margin-bottom:0;color:var(--bs-card-cap-color);background-color:var(--bs-card-cap-bg);border-bottom:var(--bs-card-border-width) solid var(--bs-card-border-color)}.card-header:first-child{border-radius:var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0}.card-footer{padding:var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);color:var(--bs-card-cap-color);background-color:var(--bs-card-cap-bg);border-top:var(--bs-card-border-width) solid var(--bs-card-border-color)}.card-footer:last-child{border-radius:0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius)}.card-header-tabs{margin-right:calc(-.5 * var(--bs-card-cap-padding-x));margin-bottom:calc(-1 * var(--bs-card-cap-padding-y));margin-left:calc(-.5 * var(--bs-card-cap-padding-x));border-bottom:0}.card-header-tabs .nav-link.active{background-color:var(--bs-card-bg);border-bottom-color:var(--bs-card-bg)}.card-header-pills{margin-right:calc(-.5 * var(--bs-card-cap-padding-x));margin-left:calc(-.5 * var(--bs-card-cap-padding-x))}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:var(--bs-card-img-overlay-padding);border-radius:var(--bs-card-inner-border-radius)}.card-img,.card-img-bottom,.card-img-top{width:100%}.card-img,.card-img-top{border-top-left-radius:var(--bs-card-inner-border-radius);border-top-right-radius:var(--bs-card-inner-border-radius)}.card-img,.card-img-bottom{border-bottom-right-radius:var(--bs-card-inner-border-radius);border-bottom-left-radius:var(--bs-card-inner-border-radius)}.card-group>.card{margin-bottom:var(--bs-card-group-margin)}@media (min-width:576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.accordion{--bs-accordion-color:#212529;--bs-accordion-bg:#fff;--bs-accordion-transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out,border-radius 0.15s ease;--bs-accordion-border-color:var(--bs-border-color);--bs-accordion-border-width:1px;--bs-accordion-border-radius:0.375rem;--bs-accordion-inner-border-radius:calc(0.375rem - 1px);--bs-accordion-btn-padding-x:1.25rem;--bs-accordion-btn-padding-y:1rem;--bs-accordion-btn-color:#212529;--bs-accordion-btn-bg:var(--bs-accordion-bg);--bs-accordion-btn-icon:url(${P});--bs-accordion-btn-icon-width:1.25rem;--bs-accordion-btn-icon-transform:rotate(-180deg);--bs-accordion-btn-icon-transition:transform 0.2s ease-in-out;--bs-accordion-btn-active-icon:url(${j});--bs-accordion-btn-focus-border-color:#86b7fe;--bs-accordion-btn-focus-box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);--bs-accordion-body-padding-x:1.25rem;--bs-accordion-body-padding-y:1rem;--bs-accordion-active-color:#0c63e4;--bs-accordion-active-bg:#e7f1ff}.accordion-button{position:relative;display:flex;align-items:center;width:100%;padding:var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x);font-size:1rem;color:var(--bs-accordion-btn-color);text-align:left;background-color:var(--bs-accordion-btn-bg);border:0;border-radius:0;overflow-anchor:none;transition:var(--bs-accordion-transition)}@media (prefers-reduced-motion:reduce){.accordion-button{transition:none}}.accordion-button:not(.collapsed){color:var(--bs-accordion-active-color);background-color:var(--bs-accordion-active-bg);box-shadow:inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color)}.accordion-button:not(.collapsed)::after{background-image:var(--bs-accordion-btn-active-icon);transform:var(--bs-accordion-btn-icon-transform)}.accordion-button::after{flex-shrink:0;width:var(--bs-accordion-btn-icon-width);height:var(--bs-accordion-btn-icon-width);margin-left:auto;content:"";background-image:var(--bs-accordion-btn-icon);background-repeat:no-repeat;background-size:var(--bs-accordion-btn-icon-width);transition:var(--bs-accordion-btn-icon-transition)}@media (prefers-reduced-motion:reduce){.accordion-button::after{transition:none}}.accordion-button:hover{z-index:2}.accordion-button:focus{z-index:3;border-color:var(--bs-accordion-btn-focus-border-color);outline:0;box-shadow:var(--bs-accordion-btn-focus-box-shadow)}.accordion-header{margin-bottom:0}.accordion-item{color:var(--bs-accordion-color);background-color:var(--bs-accordion-bg);border:var(--bs-accordion-border-width) solid var(--bs-accordion-border-color)}.accordion-item:first-of-type{border-top-left-radius:var(--bs-accordion-border-radius);border-top-right-radius:var(--bs-accordion-border-radius)}.accordion-item:first-of-type .accordion-button{border-top-left-radius:var(--bs-accordion-inner-border-radius);border-top-right-radius:var(--bs-accordion-inner-border-radius)}.accordion-item:not(:first-of-type){border-top:0}.accordion-item:last-of-type{border-bottom-right-radius:var(--bs-accordion-border-radius);border-bottom-left-radius:var(--bs-accordion-border-radius)}.accordion-item:last-of-type .accordion-button.collapsed{border-bottom-right-radius:var(--bs-accordion-inner-border-radius);border-bottom-left-radius:var(--bs-accordion-inner-border-radius)}.accordion-item:last-of-type .accordion-collapse{border-bottom-right-radius:var(--bs-accordion-border-radius);border-bottom-left-radius:var(--bs-accordion-border-radius)}.accordion-body{padding:var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x)}.accordion-flush .accordion-collapse{border-width:0}.accordion-flush .accordion-item{border-right:0;border-left:0;border-radius:0}.accordion-flush .accordion-item:first-child{border-top:0}.accordion-flush .accordion-item:last-child{border-bottom:0}.accordion-flush .accordion-item .accordion-button,.accordion-flush .accordion-item .accordion-button.collapsed{border-radius:0}.breadcrumb{--bs-breadcrumb-padding-x:0;--bs-breadcrumb-padding-y:0;--bs-breadcrumb-margin-bottom:1rem;--bs-breadcrumb-bg: ;--bs-breadcrumb-border-radius: ;--bs-breadcrumb-divider-color:#6c757d;--bs-breadcrumb-item-padding-x:0.5rem;--bs-breadcrumb-item-active-color:#6c757d;display:flex;flex-wrap:wrap;padding:var(--bs-breadcrumb-padding-y) var(--bs-breadcrumb-padding-x);margin-bottom:var(--bs-breadcrumb-margin-bottom);font-size:var(--bs-breadcrumb-font-size);list-style:none;background-color:var(--bs-breadcrumb-bg);border-radius:var(--bs-breadcrumb-border-radius)}.breadcrumb-item+.breadcrumb-item{padding-left:var(--bs-breadcrumb-item-padding-x)}.breadcrumb-item+.breadcrumb-item::before{float:left;padding-right:var(--bs-breadcrumb-item-padding-x);color:var(--bs-breadcrumb-divider-color);content:var(--bs-breadcrumb-divider, "/")}.breadcrumb-item.active{color:var(--bs-breadcrumb-item-active-color)}.pagination{--bs-pagination-padding-x:0.75rem;--bs-pagination-padding-y:0.375rem;--bs-pagination-font-size:1rem;--bs-pagination-color:var(--bs-link-color);--bs-pagination-bg:#fff;--bs-pagination-border-width:1px;--bs-pagination-border-color:#dee2e6;--bs-pagination-border-radius:0.375rem;--bs-pagination-hover-color:var(--bs-link-hover-color);--bs-pagination-hover-bg:#e9ecef;--bs-pagination-hover-border-color:#dee2e6;--bs-pagination-focus-color:var(--bs-link-hover-color);--bs-pagination-focus-bg:#e9ecef;--bs-pagination-focus-box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);--bs-pagination-active-color:#fff;--bs-pagination-active-bg:#0d6efd;--bs-pagination-active-border-color:#0d6efd;--bs-pagination-disabled-color:#6c757d;--bs-pagination-disabled-bg:#fff;--bs-pagination-disabled-border-color:#dee2e6;display:flex;padding-left:0;list-style:none}.page-link{position:relative;display:block;padding:var(--bs-pagination-padding-y) var(--bs-pagination-padding-x);font-size:var(--bs-pagination-font-size);color:var(--bs-pagination-color);text-decoration:none;background-color:var(--bs-pagination-bg);border:var(--bs-pagination-border-width) solid var(--bs-pagination-border-color);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.page-link{transition:none}}.page-link:hover{z-index:2;color:var(--bs-pagination-hover-color);background-color:var(--bs-pagination-hover-bg);border-color:var(--bs-pagination-hover-border-color)}.page-link:focus{z-index:3;color:var(--bs-pagination-focus-color);background-color:var(--bs-pagination-focus-bg);outline:0;box-shadow:var(--bs-pagination-focus-box-shadow)}.active>.page-link,.page-link.active{z-index:3;color:var(--bs-pagination-active-color);background-color:var(--bs-pagination-active-bg);border-color:var(--bs-pagination-active-border-color)}.disabled>.page-link,.page-link.disabled{color:var(--bs-pagination-disabled-color);pointer-events:none;background-color:var(--bs-pagination-disabled-bg);border-color:var(--bs-pagination-disabled-border-color)}.page-item:not(:first-child) .page-link{margin-left:-1px}.page-item:first-child .page-link{border-top-left-radius:var(--bs-pagination-border-radius);border-bottom-left-radius:var(--bs-pagination-border-radius)}.page-item:last-child .page-link{border-top-right-radius:var(--bs-pagination-border-radius);border-bottom-right-radius:var(--bs-pagination-border-radius)}.pagination-lg{--bs-pagination-padding-x:1.5rem;--bs-pagination-padding-y:0.75rem;--bs-pagination-font-size:1.25rem;--bs-pagination-border-radius:0.5rem}.pagination-sm{--bs-pagination-padding-x:0.5rem;--bs-pagination-padding-y:0.25rem;--bs-pagination-font-size:0.875rem;--bs-pagination-border-radius:0.25rem}.badge{--bs-badge-padding-x:0.65em;--bs-badge-padding-y:0.35em;--bs-badge-font-size:0.75em;--bs-badge-font-weight:700;--bs-badge-color:#fff;--bs-badge-border-radius:0.375rem;display:inline-block;padding:var(--bs-badge-padding-y) var(--bs-badge-padding-x);font-size:var(--bs-badge-font-size);font-weight:var(--bs-badge-font-weight);line-height:1;color:var(--bs-badge-color);text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:var(--bs-badge-border-radius)}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.alert{--bs-alert-bg:transparent;--bs-alert-padding-x:1rem;--bs-alert-padding-y:1rem;--bs-alert-margin-bottom:1rem;--bs-alert-color:inherit;--bs-alert-border-color:transparent;--bs-alert-border:1px solid var(--bs-alert-border-color);--bs-alert-border-radius:0.375rem;position:relative;padding:var(--bs-alert-padding-y) var(--bs-alert-padding-x);margin-bottom:var(--bs-alert-margin-bottom);color:var(--bs-alert-color);background-color:var(--bs-alert-bg);border:var(--bs-alert-border);border-radius:var(--bs-alert-border-radius)}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:3rem}.alert-dismissible .btn-close{position:absolute;top:0;right:0;z-index:2;padding:1.25rem 1rem}.alert-primary{--bs-alert-color:#084298;--bs-alert-bg:#cfe2ff;--bs-alert-border-color:#b6d4fe}.alert-primary .alert-link{color:#06357a}.alert-secondary{--bs-alert-color:#41464b;--bs-alert-bg:#e2e3e5;--bs-alert-border-color:#d3d6d8}.alert-secondary .alert-link{color:#34383c}.alert-success{--bs-alert-color:#0f5132;--bs-alert-bg:#d1e7dd;--bs-alert-border-color:#badbcc}.alert-success .alert-link{color:#0c4128}.alert-info{--bs-alert-color:#055160;--bs-alert-bg:#cff4fc;--bs-alert-border-color:#b6effb}.alert-info .alert-link{color:#04414d}.alert-warning{--bs-alert-color:#664d03;--bs-alert-bg:#fff3cd;--bs-alert-border-color:#ffecb5}.alert-warning .alert-link{color:#523e02}.alert-danger{--bs-alert-color:#842029;--bs-alert-bg:#f8d7da;--bs-alert-border-color:#f5c2c7}.alert-danger .alert-link{color:#6a1a21}.alert-light{--bs-alert-color:#636464;--bs-alert-bg:#fefefe;--bs-alert-border-color:#fdfdfe}.alert-light .alert-link{color:#4f5050}.alert-dark{--bs-alert-color:#141619;--bs-alert-bg:#d3d3d4;--bs-alert-border-color:#bcbebf}.alert-dark .alert-link{color:#101214}@keyframes progress-bar-stripes{0%{background-position-x:1rem}}.progress{--bs-progress-height:1rem;--bs-progress-font-size:0.75rem;--bs-progress-bg:#e9ecef;--bs-progress-border-radius:0.375rem;--bs-progress-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.075);--bs-progress-bar-color:#fff;--bs-progress-bar-bg:#0d6efd;--bs-progress-bar-transition:width 0.6s ease;display:flex;height:var(--bs-progress-height);overflow:hidden;font-size:var(--bs-progress-font-size);background-color:var(--bs-progress-bg);border-radius:var(--bs-progress-border-radius)}.progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:var(--bs-progress-bar-color);text-align:center;white-space:nowrap;background-color:var(--bs-progress-bar-bg);transition:var(--bs-progress-bar-transition)}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:var(--bs-progress-height) var(--bs-progress-height)}.progress-bar-animated{animation:1s linear infinite progress-bar-stripes}@media (prefers-reduced-motion:reduce){.progress-bar-animated{animation:none}}.list-group{--bs-list-group-color:#212529;--bs-list-group-bg:#fff;--bs-list-group-border-color:rgba(0, 0, 0, 0.125);--bs-list-group-border-width:1px;--bs-list-group-border-radius:0.375rem;--bs-list-group-item-padding-x:1rem;--bs-list-group-item-padding-y:0.5rem;--bs-list-group-action-color:#495057;--bs-list-group-action-hover-color:#495057;--bs-list-group-action-hover-bg:#f8f9fa;--bs-list-group-action-active-color:#212529;--bs-list-group-action-active-bg:#e9ecef;--bs-list-group-disabled-color:#6c757d;--bs-list-group-disabled-bg:#fff;--bs-list-group-active-color:#fff;--bs-list-group-active-bg:#0d6efd;--bs-list-group-active-border-color:#0d6efd;display:flex;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:var(--bs-list-group-border-radius)}.list-group-numbered{list-style-type:none;counter-reset:section}.list-group-numbered>.list-group-item::before{content:counters(section, ".") ". ";counter-increment:section}.list-group-item-action{width:100%;color:var(--bs-list-group-action-color);text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:var(--bs-list-group-action-hover-color);text-decoration:none;background-color:var(--bs-list-group-action-hover-bg)}.list-group-item-action:active{color:var(--bs-list-group-action-active-color);background-color:var(--bs-list-group-action-active-bg)}.list-group-item{position:relative;display:block;padding:var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x);color:var(--bs-list-group-color);text-decoration:none;background-color:var(--bs-list-group-bg);border:var(--bs-list-group-border-width) solid var(--bs-list-group-border-color)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:var(--bs-list-group-disabled-color);pointer-events:none;background-color:var(--bs-list-group-disabled-bg)}.list-group-item.active{z-index:2;color:var(--bs-list-group-active-color);background-color:var(--bs-list-group-active-bg);border-color:var(--bs-list-group-active-border-color)}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:calc(-1 * var(--bs-list-group-border-width));border-top-width:var(--bs-list-group-border-width)}.list-group-horizontal{flex-direction:row}.list-group-horizontal>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}@media (min-width:576px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:768px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:992px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:1400px){.list-group-horizontal-xxl{flex-direction:row}.list-group-horizontal-xxl>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-xxl>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-xxl>.list-group-item.active{margin-top:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 var(--bs-list-group-border-width)}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#084298;background-color:#cfe2ff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#084298;background-color:#bacbe6}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#084298;border-color:#084298}.list-group-item-secondary{color:#41464b;background-color:#e2e3e5}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#41464b;background-color:#cbccce}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#41464b;border-color:#41464b}.list-group-item-success{color:#0f5132;background-color:#d1e7dd}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#0f5132;background-color:#bcd0c7}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#0f5132;border-color:#0f5132}.list-group-item-info{color:#055160;background-color:#cff4fc}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#055160;background-color:#badce3}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#055160;border-color:#055160}.list-group-item-warning{color:#664d03;background-color:#fff3cd}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#664d03;background-color:#e6dbb9}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#664d03;border-color:#664d03}.list-group-item-danger{color:#842029;background-color:#f8d7da}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#842029;background-color:#dfc2c4}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#842029;border-color:#842029}.list-group-item-light{color:#636464;background-color:#fefefe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#636464;background-color:#e5e5e5}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#636464;border-color:#636464}.list-group-item-dark{color:#141619;background-color:#d3d3d4}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#141619;background-color:#bebebf}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#141619;border-color:#141619}.btn-close{box-sizing:content-box;width:1em;height:1em;padding:.25em .25em;color:#000;background:transparent url(${N}) center/1em auto no-repeat;border:0;border-radius:.375rem;opacity:.5}.btn-close:hover{color:#000;text-decoration:none;opacity:.75}.btn-close:focus{outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25);opacity:1}.btn-close.disabled,.btn-close:disabled{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:.25}.btn-close-white{filter:invert(1) grayscale(100%) brightness(200%)}.toast{--bs-toast-zindex:1090;--bs-toast-padding-x:0.75rem;--bs-toast-padding-y:0.5rem;--bs-toast-spacing:1.5rem;--bs-toast-max-width:350px;--bs-toast-font-size:0.875rem;--bs-toast-color: ;--bs-toast-bg:rgba(255, 255, 255, 0.85);--bs-toast-border-width:1px;--bs-toast-border-color:var(--bs-border-color-translucent);--bs-toast-border-radius:0.375rem;--bs-toast-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-toast-header-color:#6c757d;--bs-toast-header-bg:rgba(255, 255, 255, 0.85);--bs-toast-header-border-color:rgba(0, 0, 0, 0.05);width:var(--bs-toast-max-width);max-width:100%;font-size:var(--bs-toast-font-size);color:var(--bs-toast-color);pointer-events:auto;background-color:var(--bs-toast-bg);background-clip:padding-box;border:var(--bs-toast-border-width) solid var(--bs-toast-border-color);box-shadow:var(--bs-toast-box-shadow);border-radius:var(--bs-toast-border-radius)}.toast.showing{opacity:0}.toast:not(.show){display:none}.toast-container{--bs-toast-zindex:1090;position:absolute;z-index:var(--bs-toast-zindex);width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:100%;pointer-events:none}.toast-container>:not(:last-child){margin-bottom:var(--bs-toast-spacing)}.toast-header{display:flex;align-items:center;padding:var(--bs-toast-padding-y) var(--bs-toast-padding-x);color:var(--bs-toast-header-color);background-color:var(--bs-toast-header-bg);background-clip:padding-box;border-bottom:var(--bs-toast-border-width) solid var(--bs-toast-header-border-color);border-top-left-radius:calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width));border-top-right-radius:calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width))}.toast-header .btn-close{margin-right:calc(-.5 * var(--bs-toast-padding-x));margin-left:var(--bs-toast-padding-x)}.toast-body{padding:var(--bs-toast-padding-x);word-wrap:break-word}.modal{--bs-modal-zindex:1055;--bs-modal-width:500px;--bs-modal-padding:1rem;--bs-modal-margin:0.5rem;--bs-modal-color: ;--bs-modal-bg:#fff;--bs-modal-border-color:var(--bs-border-color-translucent);--bs-modal-border-width:1px;--bs-modal-border-radius:0.5rem;--bs-modal-box-shadow:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--bs-modal-inner-border-radius:calc(0.5rem - 1px);--bs-modal-header-padding-x:1rem;--bs-modal-header-padding-y:1rem;--bs-modal-header-padding:1rem 1rem;--bs-modal-header-border-color:var(--bs-border-color);--bs-modal-header-border-width:1px;--bs-modal-title-line-height:1.5;--bs-modal-footer-gap:0.5rem;--bs-modal-footer-bg: ;--bs-modal-footer-border-color:var(--bs-border-color);--bs-modal-footer-border-width:1px;position:fixed;top:0;left:0;z-index:var(--bs-modal-zindex);display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}.modal-dialog{position:relative;width:auto;margin:var(--bs-modal-margin);pointer-events:none}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{height:calc(100% - var(--bs-modal-margin) * 2)}.modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - var(--bs-modal-margin) * 2)}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;color:var(--bs-modal-color);pointer-events:auto;background-color:var(--bs-modal-bg);background-clip:padding-box;border:var(--bs-modal-border-width) solid var(--bs-modal-border-color);border-radius:var(--bs-modal-border-radius);outline:0}.modal-backdrop{--bs-backdrop-zindex:1050;--bs-backdrop-bg:#000;--bs-backdrop-opacity:0.5;position:fixed;top:0;left:0;z-index:var(--bs-backdrop-zindex);width:100vw;height:100vh;background-color:var(--bs-backdrop-bg)}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:var(--bs-backdrop-opacity)}.modal-header{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:var(--bs-modal-header-padding);border-bottom:var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color);border-top-left-radius:var(--bs-modal-inner-border-radius);border-top-right-radius:var(--bs-modal-inner-border-radius)}.modal-header .btn-close{padding:calc(var(--bs-modal-header-padding-y) * .5) calc(var(--bs-modal-header-padding-x) * .5);margin:calc(-.5 * var(--bs-modal-header-padding-y)) calc(-.5 * var(--bs-modal-header-padding-x)) calc(-.5 * var(--bs-modal-header-padding-y)) auto}.modal-title{margin-bottom:0;line-height:var(--bs-modal-title-line-height)}.modal-body{position:relative;flex:1 1 auto;padding:var(--bs-modal-padding)}.modal-footer{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * .5);background-color:var(--bs-modal-footer-bg);border-top:var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color);border-bottom-right-radius:var(--bs-modal-inner-border-radius);border-bottom-left-radius:var(--bs-modal-inner-border-radius)}.modal-footer>*{margin:calc(var(--bs-modal-footer-gap) * .5)}@media (min-width:576px){.modal{--bs-modal-margin:1.75rem;--bs-modal-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15)}.modal-dialog{max-width:var(--bs-modal-width);margin-right:auto;margin-left:auto}.modal-sm{--bs-modal-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{--bs-modal-width:800px}}@media (min-width:1200px){.modal-xl{--bs-modal-width:1140px}}.modal-fullscreen{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen .modal-footer,.modal-fullscreen .modal-header{border-radius:0}.modal-fullscreen .modal-body{overflow-y:auto}@media (max-width:575.98px){.modal-fullscreen-sm-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-sm-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-sm-down .modal-footer,.modal-fullscreen-sm-down .modal-header{border-radius:0}.modal-fullscreen-sm-down .modal-body{overflow-y:auto}}@media (max-width:767.98px){.modal-fullscreen-md-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-md-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-md-down .modal-footer,.modal-fullscreen-md-down .modal-header{border-radius:0}.modal-fullscreen-md-down .modal-body{overflow-y:auto}}@media (max-width:991.98px){.modal-fullscreen-lg-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-lg-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-lg-down .modal-footer,.modal-fullscreen-lg-down .modal-header{border-radius:0}.modal-fullscreen-lg-down .modal-body{overflow-y:auto}}@media (max-width:1199.98px){.modal-fullscreen-xl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xl-down .modal-footer,.modal-fullscreen-xl-down .modal-header{border-radius:0}.modal-fullscreen-xl-down .modal-body{overflow-y:auto}}@media (max-width:1399.98px){.modal-fullscreen-xxl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xxl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xxl-down .modal-footer,.modal-fullscreen-xxl-down .modal-header{border-radius:0}.modal-fullscreen-xxl-down .modal-body{overflow-y:auto}}.tooltip{--bs-tooltip-zindex:1080;--bs-tooltip-max-width:200px;--bs-tooltip-padding-x:0.5rem;--bs-tooltip-padding-y:0.25rem;--bs-tooltip-margin: ;--bs-tooltip-font-size:0.875rem;--bs-tooltip-color:#fff;--bs-tooltip-bg:#000;--bs-tooltip-border-radius:0.375rem;--bs-tooltip-opacity:0.9;--bs-tooltip-arrow-width:0.8rem;--bs-tooltip-arrow-height:0.4rem;z-index:var(--bs-tooltip-zindex);display:block;padding:var(--bs-tooltip-arrow-height);margin:var(--bs-tooltip-margin);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-tooltip-font-size);word-wrap:break-word;opacity:0}.tooltip.show{opacity:var(--bs-tooltip-opacity)}.tooltip .tooltip-arrow{display:block;width:var(--bs-tooltip-arrow-width);height:var(--bs-tooltip-arrow-height)}.tooltip .tooltip-arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow,.bs-tooltip-top .tooltip-arrow{bottom:0}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,.bs-tooltip-top .tooltip-arrow::before{top:-1px;border-width:var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0;border-top-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow,.bs-tooltip-end .tooltip-arrow{left:0;width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before,.bs-tooltip-end .tooltip-arrow::before{right:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0;border-right-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow,.bs-tooltip-bottom .tooltip-arrow{top:0}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before,.bs-tooltip-bottom .tooltip-arrow::before{bottom:-1px;border-width:0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height);border-bottom-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow,.bs-tooltip-start .tooltip-arrow{right:0;width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before,.bs-tooltip-start .tooltip-arrow::before{left:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * .5) 0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height);border-left-color:var(--bs-tooltip-bg)}.tooltip-inner{max-width:var(--bs-tooltip-max-width);padding:var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x);color:var(--bs-tooltip-color);text-align:center;background-color:var(--bs-tooltip-bg);border-radius:var(--bs-tooltip-border-radius)}.popover{--bs-popover-zindex:1070;--bs-popover-max-width:276px;--bs-popover-font-size:0.875rem;--bs-popover-bg:#fff;--bs-popover-border-width:1px;--bs-popover-border-color:var(--bs-border-color-translucent);--bs-popover-border-radius:0.5rem;--bs-popover-inner-border-radius:calc(0.5rem - 1px);--bs-popover-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-popover-header-padding-x:1rem;--bs-popover-header-padding-y:0.5rem;--bs-popover-header-font-size:1rem;--bs-popover-header-color: ;--bs-popover-header-bg:#f0f0f0;--bs-popover-body-padding-x:1rem;--bs-popover-body-padding-y:1rem;--bs-popover-body-color:#212529;--bs-popover-arrow-width:1rem;--bs-popover-arrow-height:0.5rem;--bs-popover-arrow-border:var(--bs-popover-border-color);z-index:var(--bs-popover-zindex);display:block;max-width:var(--bs-popover-max-width);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-popover-font-size);word-wrap:break-word;background-color:var(--bs-popover-bg);background-clip:padding-box;border:var(--bs-popover-border-width) solid var(--bs-popover-border-color);border-radius:var(--bs-popover-border-radius)}.popover .popover-arrow{display:block;width:var(--bs-popover-arrow-width);height:var(--bs-popover-arrow-height)}.popover .popover-arrow::after,.popover .popover-arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid;border-width:0}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow,.bs-popover-top>.popover-arrow{bottom:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width))}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::after,.bs-popover-top>.popover-arrow::before{border-width:var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * .5) 0}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::before{bottom:0;border-top-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-top>.popover-arrow::after{bottom:var(--bs-popover-border-width);border-top-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow,.bs-popover-end>.popover-arrow{left:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));width:var(--bs-popover-arrow-height);height:var(--bs-popover-arrow-width)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::after,.bs-popover-end>.popover-arrow::before{border-width:calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * .5) 0}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::before{left:0;border-right-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-end>.popover-arrow::after{left:var(--bs-popover-border-width);border-right-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow,.bs-popover-bottom>.popover-arrow{top:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width))}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::before{border-width:0 calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::before{top:0;border-bottom-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::after{top:var(--bs-popover-border-width);border-bottom-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:var(--bs-popover-arrow-width);margin-left:calc(-.5 * var(--bs-popover-arrow-width));content:"";border-bottom:var(--bs-popover-border-width) solid var(--bs-popover-header-bg)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow,.bs-popover-start>.popover-arrow{right:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));width:var(--bs-popover-arrow-height);height:var(--bs-popover-arrow-width)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::after,.bs-popover-start>.popover-arrow::before{border-width:calc(var(--bs-popover-arrow-width) * .5) 0 calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::before{right:0;border-left-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-start>.popover-arrow::after{right:var(--bs-popover-border-width);border-left-color:var(--bs-popover-bg)}.popover-header{padding:var(--bs-popover-header-padding-y) var(--bs-popover-header-padding-x);margin-bottom:0;font-size:var(--bs-popover-header-font-size);color:var(--bs-popover-header-color);background-color:var(--bs-popover-header-bg);border-bottom:var(--bs-popover-border-width) solid var(--bs-popover-border-color);border-top-left-radius:var(--bs-popover-inner-border-radius);border-top-right-radius:var(--bs-popover-inner-border-radius)}.popover-header:empty{display:none}.popover-body{padding:var(--bs-popover-body-padding-y) var(--bs-popover-body-padding-x);color:var(--bs-popover-body-color)}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-end,.carousel-item-next:not(.carousel-item-start){transform:translateX(100%)}.active.carousel-item-start,.carousel-item-prev:not(.carousel-item-end){transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item-next.carousel-item-start,.carousel-fade .carousel-item-prev.carousel-item-end,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:0 0;border:0;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:2rem;height:2rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}.carousel-control-prev-icon{background-image:url(${B})}.carousel-control-next-icon{background-image:url(${U})}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:2;display:flex;justify-content:center;padding:0;margin-right:15%;margin-bottom:1rem;margin-left:15%;list-style:none}.carousel-indicators [data-bs-target]{box-sizing:content-box;flex:0 1 auto;width:30px;height:3px;padding:0;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border:0;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators [data-bs-target]{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:1.25rem;left:15%;padding-top:1.25rem;padding-bottom:1.25rem;color:#fff;text-align:center}.carousel-dark .carousel-control-next-icon,.carousel-dark .carousel-control-prev-icon{filter:invert(1) grayscale(100)}.carousel-dark .carousel-indicators [data-bs-target]{background-color:#000}.carousel-dark .carousel-caption{color:#000}.spinner-border,.spinner-grow{display:inline-block;width:var(--bs-spinner-width);height:var(--bs-spinner-height);vertical-align:var(--bs-spinner-vertical-align);border-radius:50%;animation:var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name)}@keyframes spinner-border{to{transform:rotate(360deg)}}.spinner-border{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-border-width:0.25em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-border;border:var(--bs-spinner-border-width) solid currentcolor;border-right-color:transparent}.spinner-border-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem;--bs-spinner-border-width:0.2em}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-grow;background-color:currentcolor;opacity:0}.spinner-grow-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{--bs-spinner-animation-speed:1.5s}}.offcanvas,.offcanvas-lg,.offcanvas-md,.offcanvas-sm,.offcanvas-xl,.offcanvas-xxl{--bs-offcanvas-zindex:1045;--bs-offcanvas-width:400px;--bs-offcanvas-height:30vh;--bs-offcanvas-padding-x:1rem;--bs-offcanvas-padding-y:1rem;--bs-offcanvas-color: ;--bs-offcanvas-bg:#fff;--bs-offcanvas-border-width:1px;--bs-offcanvas-border-color:var(--bs-border-color-translucent);--bs-offcanvas-box-shadow:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075)}@media (max-width:575.98px){.offcanvas-sm{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:575.98px) and (prefers-reduced-motion:reduce){.offcanvas-sm{transition:none}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:575.98px){.offcanvas-sm.show:not(.hiding),.offcanvas-sm.showing{transform:none}}@media (max-width:575.98px){.offcanvas-sm.hiding,.offcanvas-sm.show,.offcanvas-sm.showing{visibility:visible}}@media (min-width:576px){.offcanvas-sm{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-sm .offcanvas-header{display:none}.offcanvas-sm .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:767.98px){.offcanvas-md{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:767.98px) and (prefers-reduced-motion:reduce){.offcanvas-md{transition:none}}@media (max-width:767.98px){.offcanvas-md.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:767.98px){.offcanvas-md.show:not(.hiding),.offcanvas-md.showing{transform:none}}@media (max-width:767.98px){.offcanvas-md.hiding,.offcanvas-md.show,.offcanvas-md.showing{visibility:visible}}@media (min-width:768px){.offcanvas-md{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-md .offcanvas-header{display:none}.offcanvas-md .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:991.98px){.offcanvas-lg{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:991.98px) and (prefers-reduced-motion:reduce){.offcanvas-lg{transition:none}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:991.98px){.offcanvas-lg.show:not(.hiding),.offcanvas-lg.showing{transform:none}}@media (max-width:991.98px){.offcanvas-lg.hiding,.offcanvas-lg.show,.offcanvas-lg.showing{visibility:visible}}@media (min-width:992px){.offcanvas-lg{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-lg .offcanvas-header{display:none}.offcanvas-lg .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:1199.98px){.offcanvas-xl{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:1199.98px) and (prefers-reduced-motion:reduce){.offcanvas-xl{transition:none}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:1199.98px){.offcanvas-xl.show:not(.hiding),.offcanvas-xl.showing{transform:none}}@media (max-width:1199.98px){.offcanvas-xl.hiding,.offcanvas-xl.show,.offcanvas-xl.showing{visibility:visible}}@media (min-width:1200px){.offcanvas-xl{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-xl .offcanvas-header{display:none}.offcanvas-xl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:1399.98px){.offcanvas-xxl{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:1399.98px) and (prefers-reduced-motion:reduce){.offcanvas-xxl{transition:none}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:1399.98px){.offcanvas-xxl.show:not(.hiding),.offcanvas-xxl.showing{transform:none}}@media (max-width:1399.98px){.offcanvas-xxl.hiding,.offcanvas-xxl.show,.offcanvas-xxl.showing{visibility:visible}}@media (min-width:1400px){.offcanvas-xxl{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-xxl .offcanvas-header{display:none}.offcanvas-xxl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}.offcanvas{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}@media (prefers-reduced-motion:reduce){.offcanvas{transition:none}}.offcanvas.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}.offcanvas.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}.offcanvas.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}.offcanvas.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}.offcanvas.show:not(.hiding),.offcanvas.showing{transform:none}.offcanvas.hiding,.offcanvas.show,.offcanvas.showing{visibility:visible}.offcanvas-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.offcanvas-backdrop.fade{opacity:0}.offcanvas-backdrop.show{opacity:.5}.offcanvas-header{display:flex;align-items:center;justify-content:space-between;padding:var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x)}.offcanvas-header .btn-close{padding:calc(var(--bs-offcanvas-padding-y) * .5) calc(var(--bs-offcanvas-padding-x) * .5);margin-top:calc(-.5 * var(--bs-offcanvas-padding-y));margin-right:calc(-.5 * var(--bs-offcanvas-padding-x));margin-bottom:calc(-.5 * var(--bs-offcanvas-padding-y))}.offcanvas-title{margin-bottom:0;line-height:1.5}.offcanvas-body{flex-grow:1;padding:var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x);overflow-y:auto}.placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentcolor;opacity:.5}.placeholder.btn::before{display:inline-block;content:""}.placeholder-xs{min-height:.6em}.placeholder-sm{min-height:.8em}.placeholder-lg{min-height:1.2em}.placeholder-glow .placeholder{animation:placeholder-glow 2s ease-in-out infinite}@keyframes placeholder-glow{50%{opacity:.2}}.placeholder-wave{-webkit-mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);-webkit-mask-size:200% 100%;mask-size:200% 100%;animation:placeholder-wave 2s linear infinite}@keyframes placeholder-wave{100%{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}.clearfix::after{display:block;clear:both;content:""}.text-bg-primary{color:#fff!important;background-color:RGBA(13,110,253,var(--bs-bg-opacity,1))!important}.text-bg-secondary{color:#fff!important;background-color:RGBA(108,117,125,var(--bs-bg-opacity,1))!important}.text-bg-success{color:#fff!important;background-color:RGBA(25,135,84,var(--bs-bg-opacity,1))!important}.text-bg-info{color:#000!important;background-color:RGBA(13,202,240,var(--bs-bg-opacity,1))!important}.text-bg-warning{color:#000!important;background-color:RGBA(255,193,7,var(--bs-bg-opacity,1))!important}.text-bg-danger{color:#fff!important;background-color:RGBA(220,53,69,var(--bs-bg-opacity,1))!important}.text-bg-light{color:#000!important;background-color:RGBA(248,249,250,var(--bs-bg-opacity,1))!important}.text-bg-dark{color:#fff!important;background-color:RGBA(33,37,41,var(--bs-bg-opacity,1))!important}.link-primary{color:#0d6efd!important}.link-primary:focus,.link-primary:hover{color:#0a58ca!important}.link-secondary{color:#6c757d!important}.link-secondary:focus,.link-secondary:hover{color:#565e64!important}.link-success{color:#198754!important}.link-success:focus,.link-success:hover{color:#146c43!important}.link-info{color:#0dcaf0!important}.link-info:focus,.link-info:hover{color:#3dd5f3!important}.link-warning{color:#ffc107!important}.link-warning:focus,.link-warning:hover{color:#ffcd39!important}.link-danger{color:#dc3545!important}.link-danger:focus,.link-danger:hover{color:#b02a37!important}.link-light{color:#f8f9fa!important}.link-light:focus,.link-light:hover{color:#f9fafb!important}.link-dark{color:#212529!important}.link-dark:focus,.link-dark:hover{color:#1a1e21!important}.ratio{position:relative;width:100%}.ratio::before{display:block;padding-top:var(--bs-aspect-ratio);content:""}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-1x1{--bs-aspect-ratio:100%}.ratio-4x3{--bs-aspect-ratio:75%}.ratio-16x9{--bs-aspect-ratio:56.25%}.ratio-21x9{--bs-aspect-ratio:42.8571428571%}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}@media (min-width:576px){.sticky-sm-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-sm-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:768px){.sticky-md-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-md-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:992px){.sticky-lg-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-lg-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:1200px){.sticky-xl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-xl-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:1400px){.sticky-xxl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-xxl-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}.hstack{display:flex;flex-direction:row;align-items:center;align-self:stretch}.vstack{display:flex;flex:1 1 auto;flex-direction:column;align-self:stretch}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:""}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vr{display:inline-block;align-self:stretch;width:1px;min-height:1em;background-color:currentcolor;opacity:.25}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.float-start{float:left!important}.float-end{float:right!important}.float-none{float:none!important}.opacity-0{opacity:0!important}.opacity-25{opacity:.25!important}.opacity-50{opacity:.5!important}.opacity-75{opacity:.75!important}.opacity-100{opacity:1!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-visible{overflow:visible!important}.overflow-scroll{overflow:scroll!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.top-0{top:0!important}.top-50{top:50%!important}.top-100{top:100%!important}.bottom-0{bottom:0!important}.bottom-50{bottom:50%!important}.bottom-100{bottom:100%!important}.start-0{left:0!important}.start-50{left:50%!important}.start-100{left:100%!important}.end-0{right:0!important}.end-50{right:50%!important}.end-100{right:100%!important}.translate-middle{transform:translate(-50%,-50%)!important}.translate-middle-x{transform:translateX(-50%)!important}.translate-middle-y{transform:translateY(-50%)!important}.border{border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-0{border:0!important}.border-top{border-top:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-top-0{border-top:0!important}.border-end{border-right:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-end-0{border-right:0!important}.border-bottom{border-bottom:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-bottom-0{border-bottom:0!important}.border-start{border-left:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-start-0{border-left:0!important}.border-primary{--bs-border-opacity:1;border-color:rgba(var(--bs-primary-rgb),var(--bs-border-opacity))!important}.border-secondary{--bs-border-opacity:1;border-color:rgba(var(--bs-secondary-rgb),var(--bs-border-opacity))!important}.border-success{--bs-border-opacity:1;border-color:rgba(var(--bs-success-rgb),var(--bs-border-opacity))!important}.border-info{--bs-border-opacity:1;border-color:rgba(var(--bs-info-rgb),var(--bs-border-opacity))!important}.border-warning{--bs-border-opacity:1;border-color:rgba(var(--bs-warning-rgb),var(--bs-border-opacity))!important}.border-danger{--bs-border-opacity:1;border-color:rgba(var(--bs-danger-rgb),var(--bs-border-opacity))!important}.border-light{--bs-border-opacity:1;border-color:rgba(var(--bs-light-rgb),var(--bs-border-opacity))!important}.border-dark{--bs-border-opacity:1;border-color:rgba(var(--bs-dark-rgb),var(--bs-border-opacity))!important}.border-white{--bs-border-opacity:1;border-color:rgba(var(--bs-white-rgb),var(--bs-border-opacity))!important}.border-1{--bs-border-width:1px}.border-2{--bs-border-width:2px}.border-3{--bs-border-width:3px}.border-4{--bs-border-width:4px}.border-5{--bs-border-width:5px}.border-opacity-10{--bs-border-opacity:0.1}.border-opacity-25{--bs-border-opacity:0.25}.border-opacity-50{--bs-border-opacity:0.5}.border-opacity-75{--bs-border-opacity:0.75}.border-opacity-100{--bs-border-opacity:1}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.mw-100{max-width:100%!important}.vw-100{width:100vw!important}.min-vw-100{min-width:100vw!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mh-100{max-height:100%!important}.vh-100{height:100vh!important}.min-vh-100{min-height:100vh!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-right:0!important;margin-left:0!important}.mx-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-auto{margin-left:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-right:0!important;padding-left:0!important}.px-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-right:0!important}.pe-1{padding-right:.25rem!important}.pe-2{padding-right:.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-left:0!important}.ps-1{padding-left:.25rem!important}.ps-2{padding-left:.5rem!important}.ps-3{padding-left:1rem!important}.ps-4{padding-left:1.5rem!important}.ps-5{padding-left:3rem!important}.gap-0{gap:0!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:1rem!important}.gap-4{gap:1.5rem!important}.gap-5{gap:3rem!important}.font-monospace{font-family:var(--bs-font-monospace)!important}.fs-1{font-size:calc(1.375rem + 1.5vw)!important}.fs-2{font-size:calc(1.325rem + .9vw)!important}.fs-3{font-size:calc(1.3rem + .6vw)!important}.fs-4{font-size:calc(1.275rem + .3vw)!important}.fs-5{font-size:1.25rem!important}.fs-6{font-size:1rem!important}.fst-italic{font-style:italic!important}.fst-normal{font-style:normal!important}.fw-light{font-weight:300!important}.fw-lighter{font-weight:lighter!important}.fw-normal{font-weight:400!important}.fw-bold{font-weight:700!important}.fw-semibold{font-weight:600!important}.fw-bolder{font-weight:bolder!important}.lh-1{line-height:1!important}.lh-sm{line-height:1.25!important}.lh-base{line-height:1.5!important}.lh-lg{line-height:2!important}.text-start{text-align:left!important}.text-end{text-align:right!important}.text-center{text-align:center!important}.text-decoration-none{text-decoration:none!important}.text-decoration-underline{text-decoration:underline!important}.text-decoration-line-through{text-decoration:line-through!important}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-break{word-wrap:break-word!important;word-break:break-word!important}.text-primary{--bs-text-opacity:1;color:rgba(var(--bs-primary-rgb),var(--bs-text-opacity))!important}.text-secondary{--bs-text-opacity:1;color:rgba(var(--bs-secondary-rgb),var(--bs-text-opacity))!important}.text-success{--bs-text-opacity:1;color:rgba(var(--bs-success-rgb),var(--bs-text-opacity))!important}.text-info{--bs-text-opacity:1;color:rgba(var(--bs-info-rgb),var(--bs-text-opacity))!important}.text-warning{--bs-text-opacity:1;color:rgba(var(--bs-warning-rgb),var(--bs-text-opacity))!important}.text-danger{--bs-text-opacity:1;color:rgba(var(--bs-danger-rgb),var(--bs-text-opacity))!important}.text-light{--bs-text-opacity:1;color:rgba(var(--bs-light-rgb),var(--bs-text-opacity))!important}.text-dark{--bs-text-opacity:1;color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}.text-black{--bs-text-opacity:1;color:rgba(var(--bs-black-rgb),var(--bs-text-opacity))!important}.text-white{--bs-text-opacity:1;color:rgba(var(--bs-white-rgb),var(--bs-text-opacity))!important}.text-body{--bs-text-opacity:1;color:rgba(var(--bs-body-color-rgb),var(--bs-text-opacity))!important}.text-muted{--bs-text-opacity:1;color:#6c757d!important}.text-black-50{--bs-text-opacity:1;color:rgba(0,0,0,.5)!important}.text-white-50{--bs-text-opacity:1;color:rgba(255,255,255,.5)!important}.text-reset{--bs-text-opacity:1;color:inherit!important}.text-opacity-25{--bs-text-opacity:0.25}.text-opacity-50{--bs-text-opacity:0.5}.text-opacity-75{--bs-text-opacity:0.75}.text-opacity-100{--bs-text-opacity:1}.bg-primary{--bs-bg-opacity:1;background-color:rgba(var(--bs-primary-rgb),var(--bs-bg-opacity))!important}.bg-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-secondary-rgb),var(--bs-bg-opacity))!important}.bg-success{--bs-bg-opacity:1;background-color:rgba(var(--bs-success-rgb),var(--bs-bg-opacity))!important}.bg-info{--bs-bg-opacity:1;background-color:rgba(var(--bs-info-rgb),var(--bs-bg-opacity))!important}.bg-warning{--bs-bg-opacity:1;background-color:rgba(var(--bs-warning-rgb),var(--bs-bg-opacity))!important}.bg-danger{--bs-bg-opacity:1;background-color:rgba(var(--bs-danger-rgb),var(--bs-bg-opacity))!important}.bg-light{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-rgb),var(--bs-bg-opacity))!important}.bg-dark{--bs-bg-opacity:1;background-color:rgba(var(--bs-dark-rgb),var(--bs-bg-opacity))!important}.bg-black{--bs-bg-opacity:1;background-color:rgba(var(--bs-black-rgb),var(--bs-bg-opacity))!important}.bg-white{--bs-bg-opacity:1;background-color:rgba(var(--bs-white-rgb),var(--bs-bg-opacity))!important}.bg-body{--bs-bg-opacity:1;background-color:rgba(var(--bs-body-bg-rgb),var(--bs-bg-opacity))!important}.bg-transparent{--bs-bg-opacity:1;background-color:transparent!important}.bg-opacity-10{--bs-bg-opacity:0.1}.bg-opacity-25{--bs-bg-opacity:0.25}.bg-opacity-50{--bs-bg-opacity:0.5}.bg-opacity-75{--bs-bg-opacity:0.75}.bg-opacity-100{--bs-bg-opacity:1}.bg-gradient{background-image:var(--bs-gradient)!important}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.pe-none{pointer-events:none!important}.pe-auto{pointer-events:auto!important}.rounded{border-radius:var(--bs-border-radius)!important}.rounded-0{border-radius:0!important}.rounded-1{border-radius:var(--bs-border-radius-sm)!important}.rounded-2{border-radius:var(--bs-border-radius)!important}.rounded-3{border-radius:var(--bs-border-radius-lg)!important}.rounded-4{border-radius:var(--bs-border-radius-xl)!important}.rounded-5{border-radius:var(--bs-border-radius-2xl)!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:var(--bs-border-radius-pill)!important}.rounded-top{border-top-left-radius:var(--bs-border-radius)!important;border-top-right-radius:var(--bs-border-radius)!important}.rounded-end{border-top-right-radius:var(--bs-border-radius)!important;border-bottom-right-radius:var(--bs-border-radius)!important}.rounded-bottom{border-bottom-right-radius:var(--bs-border-radius)!important;border-bottom-left-radius:var(--bs-border-radius)!important}.rounded-start{border-bottom-left-radius:var(--bs-border-radius)!important;border-top-left-radius:var(--bs-border-radius)!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media (min-width:576px){.float-sm-start{float:left!important}.float-sm-end{float:right!important}.float-sm-none{float:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-right:0!important;margin-left:0!important}.mx-sm-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-sm-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-sm-3{margin-right:1rem!important;margin-left:1rem!important}.mx-sm-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-sm-5{margin-right:3rem!important;margin-left:3rem!important}.mx-sm-auto{margin-right:auto!important;margin-left:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-right:0!important}.me-sm-1{margin-right:.25rem!important}.me-sm-2{margin-right:.5rem!important}.me-sm-3{margin-right:1rem!important}.me-sm-4{margin-right:1.5rem!important}.me-sm-5{margin-right:3rem!important}.me-sm-auto{margin-right:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-left:0!important}.ms-sm-1{margin-left:.25rem!important}.ms-sm-2{margin-left:.5rem!important}.ms-sm-3{margin-left:1rem!important}.ms-sm-4{margin-left:1.5rem!important}.ms-sm-5{margin-left:3rem!important}.ms-sm-auto{margin-left:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-right:0!important;padding-left:0!important}.px-sm-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-sm-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-sm-3{padding-right:1rem!important;padding-left:1rem!important}.px-sm-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-sm-5{padding-right:3rem!important;padding-left:3rem!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-right:0!important}.pe-sm-1{padding-right:.25rem!important}.pe-sm-2{padding-right:.5rem!important}.pe-sm-3{padding-right:1rem!important}.pe-sm-4{padding-right:1.5rem!important}.pe-sm-5{padding-right:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-left:0!important}.ps-sm-1{padding-left:.25rem!important}.ps-sm-2{padding-left:.5rem!important}.ps-sm-3{padding-left:1rem!important}.ps-sm-4{padding-left:1.5rem!important}.ps-sm-5{padding-left:3rem!important}.gap-sm-0{gap:0!important}.gap-sm-1{gap:.25rem!important}.gap-sm-2{gap:.5rem!important}.gap-sm-3{gap:1rem!important}.gap-sm-4{gap:1.5rem!important}.gap-sm-5{gap:3rem!important}.text-sm-start{text-align:left!important}.text-sm-end{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.float-md-start{float:left!important}.float-md-end{float:right!important}.float-md-none{float:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-right:0!important;margin-left:0!important}.mx-md-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-md-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-md-3{margin-right:1rem!important;margin-left:1rem!important}.mx-md-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-md-5{margin-right:3rem!important;margin-left:3rem!important}.mx-md-auto{margin-right:auto!important;margin-left:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-right:0!important}.me-md-1{margin-right:.25rem!important}.me-md-2{margin-right:.5rem!important}.me-md-3{margin-right:1rem!important}.me-md-4{margin-right:1.5rem!important}.me-md-5{margin-right:3rem!important}.me-md-auto{margin-right:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-left:0!important}.ms-md-1{margin-left:.25rem!important}.ms-md-2{margin-left:.5rem!important}.ms-md-3{margin-left:1rem!important}.ms-md-4{margin-left:1.5rem!important}.ms-md-5{margin-left:3rem!important}.ms-md-auto{margin-left:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-right:0!important;padding-left:0!important}.px-md-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-md-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-md-3{padding-right:1rem!important;padding-left:1rem!important}.px-md-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-md-5{padding-right:3rem!important;padding-left:3rem!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-right:0!important}.pe-md-1{padding-right:.25rem!important}.pe-md-2{padding-right:.5rem!important}.pe-md-3{padding-right:1rem!important}.pe-md-4{padding-right:1.5rem!important}.pe-md-5{padding-right:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-left:0!important}.ps-md-1{padding-left:.25rem!important}.ps-md-2{padding-left:.5rem!important}.ps-md-3{padding-left:1rem!important}.ps-md-4{padding-left:1.5rem!important}.ps-md-5{padding-left:3rem!important}.gap-md-0{gap:0!important}.gap-md-1{gap:.25rem!important}.gap-md-2{gap:.5rem!important}.gap-md-3{gap:1rem!important}.gap-md-4{gap:1.5rem!important}.gap-md-5{gap:3rem!important}.text-md-start{text-align:left!important}.text-md-end{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.float-lg-start{float:left!important}.float-lg-end{float:right!important}.float-lg-none{float:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-right:0!important;margin-left:0!important}.mx-lg-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-lg-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-lg-3{margin-right:1rem!important;margin-left:1rem!important}.mx-lg-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-lg-5{margin-right:3rem!important;margin-left:3rem!important}.mx-lg-auto{margin-right:auto!important;margin-left:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-right:0!important}.me-lg-1{margin-right:.25rem!important}.me-lg-2{margin-right:.5rem!important}.me-lg-3{margin-right:1rem!important}.me-lg-4{margin-right:1.5rem!important}.me-lg-5{margin-right:3rem!important}.me-lg-auto{margin-right:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-left:0!important}.ms-lg-1{margin-left:.25rem!important}.ms-lg-2{margin-left:.5rem!important}.ms-lg-3{margin-left:1rem!important}.ms-lg-4{margin-left:1.5rem!important}.ms-lg-5{margin-left:3rem!important}.ms-lg-auto{margin-left:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-right:0!important;padding-left:0!important}.px-lg-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-lg-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-lg-3{padding-right:1rem!important;padding-left:1rem!important}.px-lg-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-lg-5{padding-right:3rem!important;padding-left:3rem!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-right:0!important}.pe-lg-1{padding-right:.25rem!important}.pe-lg-2{padding-right:.5rem!important}.pe-lg-3{padding-right:1rem!important}.pe-lg-4{padding-right:1.5rem!important}.pe-lg-5{padding-right:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-left:0!important}.ps-lg-1{padding-left:.25rem!important}.ps-lg-2{padding-left:.5rem!important}.ps-lg-3{padding-left:1rem!important}.ps-lg-4{padding-left:1.5rem!important}.ps-lg-5{padding-left:3rem!important}.gap-lg-0{gap:0!important}.gap-lg-1{gap:.25rem!important}.gap-lg-2{gap:.5rem!important}.gap-lg-3{gap:1rem!important}.gap-lg-4{gap:1.5rem!important}.gap-lg-5{gap:3rem!important}.text-lg-start{text-align:left!important}.text-lg-end{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.float-xl-start{float:left!important}.float-xl-end{float:right!important}.float-xl-none{float:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-right:0!important;margin-left:0!important}.mx-xl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xl-auto{margin-right:auto!important;margin-left:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-right:0!important}.me-xl-1{margin-right:.25rem!important}.me-xl-2{margin-right:.5rem!important}.me-xl-3{margin-right:1rem!important}.me-xl-4{margin-right:1.5rem!important}.me-xl-5{margin-right:3rem!important}.me-xl-auto{margin-right:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-left:0!important}.ms-xl-1{margin-left:.25rem!important}.ms-xl-2{margin-left:.5rem!important}.ms-xl-3{margin-left:1rem!important}.ms-xl-4{margin-left:1.5rem!important}.ms-xl-5{margin-left:3rem!important}.ms-xl-auto{margin-left:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-right:0!important;padding-left:0!important}.px-xl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-right:0!important}.pe-xl-1{padding-right:.25rem!important}.pe-xl-2{padding-right:.5rem!important}.pe-xl-3{padding-right:1rem!important}.pe-xl-4{padding-right:1.5rem!important}.pe-xl-5{padding-right:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-left:0!important}.ps-xl-1{padding-left:.25rem!important}.ps-xl-2{padding-left:.5rem!important}.ps-xl-3{padding-left:1rem!important}.ps-xl-4{padding-left:1.5rem!important}.ps-xl-5{padding-left:3rem!important}.gap-xl-0{gap:0!important}.gap-xl-1{gap:.25rem!important}.gap-xl-2{gap:.5rem!important}.gap-xl-3{gap:1rem!important}.gap-xl-4{gap:1.5rem!important}.gap-xl-5{gap:3rem!important}.text-xl-start{text-align:left!important}.text-xl-end{text-align:right!important}.text-xl-center{text-align:center!important}}@media (min-width:1400px){.float-xxl-start{float:left!important}.float-xxl-end{float:right!important}.float-xxl-none{float:none!important}.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-right:0!important;margin-left:0!important}.mx-xxl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xxl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xxl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xxl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xxl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xxl-auto{margin-right:auto!important;margin-left:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xxl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-right:0!important}.me-xxl-1{margin-right:.25rem!important}.me-xxl-2{margin-right:.5rem!important}.me-xxl-3{margin-right:1rem!important}.me-xxl-4{margin-right:1.5rem!important}.me-xxl-5{margin-right:3rem!important}.me-xxl-auto{margin-right:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-left:0!important}.ms-xxl-1{margin-left:.25rem!important}.ms-xxl-2{margin-left:.5rem!important}.ms-xxl-3{margin-left:1rem!important}.ms-xxl-4{margin-left:1.5rem!important}.ms-xxl-5{margin-left:3rem!important}.ms-xxl-auto{margin-left:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-right:0!important;padding-left:0!important}.px-xxl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xxl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xxl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xxl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xxl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xxl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pe-xxl-0{padding-right:0!important}.pe-xxl-1{padding-right:.25rem!important}.pe-xxl-2{padding-right:.5rem!important}.pe-xxl-3{padding-right:1rem!important}.pe-xxl-4{padding-right:1.5rem!important}.pe-xxl-5{padding-right:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-left:0!important}.ps-xxl-1{padding-left:.25rem!important}.ps-xxl-2{padding-left:.5rem!important}.ps-xxl-3{padding-left:1rem!important}.ps-xxl-4{padding-left:1.5rem!important}.ps-xxl-5{padding-left:3rem!important}.gap-xxl-0{gap:0!important}.gap-xxl-1{gap:.25rem!important}.gap-xxl-2{gap:.5rem!important}.gap-xxl-3{gap:1rem!important}.gap-xxl-4{gap:1.5rem!important}.gap-xxl-5{gap:3rem!important}.text-xxl-start{text-align:left!important}.text-xxl-end{text-align:right!important}.text-xxl-center{text-align:center!important}}@media (min-width:1200px){.fs-1{font-size:2.5rem!important}.fs-2{font-size:2rem!important}.fs-3{font-size:1.75rem!important}.fs-4{font-size:1.5rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}}`,""]);const G=T},5955:(t,e,r)=>{"use strict";r.d(e,{A:()=>ft});var n=r(78706),i=r.n(n),o=r(72859),a=r.n(o),s=r(21906),l=r.n(s),c=new URL(r(77035),r.b),d=new URL(r(43470),r.b),u=new URL(r(68164),r.b),h=new URL(r(64665),r.b),p=new URL(r(4890),r.b),f=new URL(r(13363),r.b),m=new URL(r(13490),r.b),g=new URL(r(47603),r.b),v=new URL(r(13913),r.b),b=new URL(r(91413),r.b),y=new URL(r(64643),r.b),x=new URL(r(80216),r.b),w=new URL(r(61907),r.b),_=new URL(r(68605),r.b),k=new URL(r(25446),r.b),A=new URL(r(56694),r.b),T=new URL(r(24420),r.b),M=new URL(r(75796),r.b),S=new URL(r(92228),r.b),C=new URL(r(9819),r.b),E=new URL(r(47695),r.b),L=new URL(r(28869),r.b),z=new URL(r(30557),r.b),O=new URL(r(48460),r.b),D=new URL(r(56539),r.b),I=new URL(r(43737),r.b),F=new URL(r(47914),r.b),R=new URL(r(26117),r.b),P=new URL(r(66311),r.b),j=a()(i()),N=l()(c),B=l()(d),U=l()(u),G=l()(h),V=l()(p),H=l()(f),W=l()(m),q=l()(g),Y=l()(v),Z=l()(b),$=l()(y),X=l()(x),J=l()(w),K=l()(_),Q=l()(k),tt=l()(A),et=l()(T),rt=l()(M),nt=l()(S),it=l()(C),ot=l()(E),at=l()(L),st=l()(z),lt=l()(O),ct=l()(D),dt=l()(I),ut=l()(F),ht=l()(R),pt=l()(P);j.push([t.id,`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(${N})}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(${B})}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(${U})}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(${G})}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(${V})}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(${H})}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(${W})}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(${q})}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(${Y})}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(${Z})}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(${$})}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(${q})}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(${X})}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(${J})}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(${K})}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url(${Q})}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url(${tt})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(${et})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(${rt})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(${nt})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(${it})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(${ot})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(${at})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(${st})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(${lt})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(${nt})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(${it})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(${ot})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(${at})}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(${ct})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(${dt})}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url(${ut});background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url(${ut})}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url(${ut})}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url(${ht});border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(${pt})}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(${ht})}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,""]);const ft=j},5018:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(78706),i=r.n(n),o=r(72859),a=r.n(o)()(i());a.push([t.id,".chsp-meta {\n z-index: 1;\n cursor: pointer;\n}\n\n.chsp-meta .chsp-info-icon {\n float: right;\n margin-top: 5px;\n margin-left: 3px;\n}\n\n.chsp-meta .chsp-info-icon svg {\n display: block;\n width: 14px;\n height: 14px;\n opacity: 0.6;\n}\n\n.chsp-authors-list {\n padding: 0;\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n justify-content: center;\n}\n\n.chsp-authors-list li {\n border: solid #dee2e6 1px;\n padding: 10px;\n list-style-type: none;\n white-space: nowrap;\n}\n\n.chsp-open-map-settings {\n position: absolute;\n top: 3px;\n left: 5px;\n z-index: 10;\n}\n\n.chsp-open-viewer-settings {\n position: absolute;\n top: 5px;\n right: 5px;\n}\n\n.chsp-extra-options-btn {\n margin: auto;\n display: block;\n}\n\n/* Tooltip text */\n.chsp-tooltip {\n visibility: hidden;\n background: #69738a;\n color: white;\n padding: 6px;\n font-size: 12px;\n line-height: 12px;\n white-space: nowrap;\n border-radius: 2px;\n text-align: center;\n display: inline-block;\n width: 9em;\n position: absolute;\n z-index: 100000;\n}\n\n.chsp-tooltip-right {\n top: 0px;\n right: -9.5em;\n}\n\n.chsp-tooltip-below {\n top: 35px;\n left: -3.5em;\n}\n\n.chsp-has-tooltip:hover .chsp-tooltip {\n visibility: visible;\n}\n\n.chsp-pin-marker {\n border-radius: 50%;\n border: solid 1px black;\n --size: 12px;\n width: var(--size);\n height: var(--size);\n z-index: 10;\n}\n\n.chsp-map-pin-marker {\n position: absolute;\n /* ensure the top/right/left/bottom positioning is relative to the center of the div */\n transform: translate(calc(-50% + var(--size)), -50%);\n}\n\n.chsp-pin-marker:hover {\n --size: 20px;\n cursor: pointer;\n}\n\n/* This class is added on top of .chsp-pin-marker for the active pinned structure/environment */\n.chsp-active-pin {\n border-width: 2px;\n --size: 20px;\n}\n\n.chsp-active-pin:hover {\n --size: 22px;\n cursor: default;\n}\n\n.chsp-viewer-button {\n position: absolute;\n padding: 1px;\n margin: 0;\n height: 28px;\n width: 28px;\n z-index: 10;\n}\n\n.chsp-viewer-action-button {\n background-color: white;\n border: none;\n}\n\n.chsp-viewer-action-button:hover {\n background: white;\n}\n\n.chsp-viewer-action-button svg {\n opacity: 0.4;\n transition: opacity 0.15s ease-in-out;\n}\n\n.chsp-viewer-action-button:hover svg {\n opacity: 0.6;\n}\n\n.chsp-structure-viewer-grid {\n display: grid;\n position: relative;\n width: 100%;\n height: 100%;\n grid-column-gap: 2px;\n grid-row-gap: 2px;\n}\n\n.chsp-structure-viewer-cell {\n width: 99%;\n height: 99%;\n left: 0.5%;\n top: 0.5%;\n position: relative;\n border: 1px solid lightgray;\n padding: 1px;\n}\n\n.chsp-structure-viewer-cell-active {\n border-color: gray;\n}\n\n.chsp-map-options {\n display: grid;\n grid-template-columns: 1fr 0.5fr;\n align-items: center;\n justify-content: center;\n align-content: start;\n column-gap: 1em;\n}\n\n.chsp-map-options label {\n min-width: 6em;\n}\n\n.chsp-map-options > :nth-child(n + 3):not(.chsp-map-extra-options) {\n margin-top: 1.3rem;\n}\n\n.chsp-map-extra-options {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: auto 1fr 1fr;\n column-gap: 1em;\n}\n\n.chsp-map-extra-options > * {\n margin: 0.5em 0;\n}\n\n.chsp-map-extra-options label {\n min-width: auto;\n}\n\n.chsp-map-extra-options {\n grid-column: 1 / span 2;\n}\n\n.chsp-map-options .form-check-label {\n width: auto;\n}\n\n.chsp-modal-header {\n cursor: grab;\n}\n\n.chsp-play-button {\n border: 0;\n background: transparent;\n box-sizing: border-box;\n height: 1.2em;\n width: 1.2em;\n margin-left: 0.5ex;\n\n border-color: transparent transparent transparent #202020;\n transition: 100ms all ease;\n cursor: pointer;\n\n border-style: solid;\n border-width: 0.7em 0 0.7em 1em;\n}\n\n.chsp-play-button.chsp-playing {\n border-style: double;\n border-width: 0px 0 0px 1.2em;\n}\n\n.chsp-play-button:hover {\n border-color: transparent transparent transparent #404040;\n}\n\n.chsp-properties-table {\n height: 100%;\n width: 80%;\n margin: auto;\n}\n\n.chsp-properties-table td,\n.chsp-properties-table th {\n width: 50%;\n border-top: none;\n}\n\n.chsp-settings-section-title {\n font-weight: bold;\n}\n\n/* Change Plotly modebar style to match the style of the structure grid buttons */\n\n.chsp-map .modebar-group {\n padding-left: 0 !important;\n}\n\n.chsp-map .modebar-btn {\n cursor: default !important;\n font-family: apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n 'Noto Color Emoji';\n}\n\n.chsp-map .modebar-btn::after {\n opacity: 0.9;\n}\n\n.chsp-map .icon:hover + .modebar-btn::after {\n visibility: visible;\n}\n\n.chsp-map .modebar-btn::before {\n content: none !important;\n}\n\n.chsp-map .modebar-btn .icon {\n transition: opacity 0.15s ease-in-out;\n padding: 3px;\n opacity: 0.3;\n cursor: pointer;\n}\n\n.chsp-map .modebar-group svg.icon {\n width: 2em;\n height: 2em;\n border-radius: 0.2em;\n}\n\n.chsp-map .modebar-group svg.icon:active {\n color: #212529;\n background-color: #dae0e5;\n border-color: #d3d9df;\n box-shadow: 0 0 0 0.2rem rgb(216 217 219 / 50%);\n}\n\n.chsp-map .modebar-btn .icon path {\n transition:\n color 0.15s ease-in-out,\n background-color 0.15s ease-in-out,\n border-color 0.15s ease-in-out,\n box-shadow 0.15s ease-in-out;\n fill: black !important;\n}\n\n.chsp-map .modebar-btn .icon:hover {\n opacity: 0.6;\n}\n\n.chsp-map .modebar-btn.active .icon {\n opacity: 0.6;\n}\n\n.chsp-info-btns {\n display: flex;\n position: relative;\n margin-bottom: 0.5ex;\n margin-top: 0.5ex;\n justify-content: center;\n}\n\n.chsp-info-structure-btn {\n min-width: 8em;\n padding-left: 6px;\n padding-right: 4px;\n font-weight: bold;\n font-size: small;\n background-color: none;\n border-color: #66a5e8;\n border-width: 2px;\n float: left;\n}\n\n.chsp-info-structure-btn:hover {\n background-color: #5b94d0;\n}\n\n.chsp-info-atom-btn {\n margin-left: 1em;\n padding-left: 6px;\n padding-right: 4px;\n min-width: 8em;\n font-weight: bold;\n font-size: small;\n background-color: none;\n border-color: #4cb64c;\n border-width: 2px;\n}\n\n.chsp-info-atom-btn:hover {\n background-color: #44a344;\n}\n\n.chsp-info-btns-svg {\n float: left;\n padding-right: 6px;\n padding-top: 3px;\n}\n\n.chsp-info-btns-svg svg {\n display: block;\n opacity: 0.6;\n}\n\n.chsp-info-number {\n -moz-appearance: textfield;\n appearance: textfield;\n border: none;\n transition: background-color 0.15s;\n background-color: #ebedf0;\n margin-left: 2px;\n margin-right: 3px;\n font-family: inherit;\n width: 4em;\n}\n\n.chsp-info-atom-btn:hover .chsp-info-number {\n background-color: #69b569;\n}\n\n.chsp-info-structure-btn:hover .chsp-info-number {\n background-color: #7ba9d9;\n}\n\n.chsp-info-number::-webkit-outer-spin-button,\n.chsp-info-number::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.chsp-info-tables {\n position: relative;\n width: 100%;\n}\n\n.chsp-info-table {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 10;\n background-color: white;\n /* max-height is set in JavaScript */\n overflow: auto;\n}\n\n.chsp-info-table.collapsing {\n overflow: hidden;\n}\n\n.chsp-info-table table {\n margin: 0;\n}\n\n/* Change the atoms slider thumb color to green, to match structure highlight */\n.chsp-atom-slider::-webkit-slider-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-moz-range-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-ms-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-webkit-slider-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider::-moz-range-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider::-ms-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider:focus::-webkit-slider-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-atom-slider:focus::-moz-range-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-atom-slider:focus::-ms-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-settings-representation {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr;\n grid-row-gap: 1ex;\n}\n\n.chsp-settings-representation label {\n cursor: help;\n}\n\n.chsp-settings-supercell {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr 2fr;\n}\n\n.chsp-supercell-count {\n max-width: 3.5em;\n}\n\n.chsp-settings-camera {\n display: grid;\n gap: 1em;\n grid-template-columns: repeat(7, auto);\n justify-content: center;\n}\n\n.chsp-settings-environments {\n display: grid;\n align-items: center;\n column-gap: 1em;\n grid-template-columns: 1fr 1fr 1fr;\n}\n\n.chsp-settings-extra-options {\n display: grid;\n gap: 1em;\n grid-template-columns: 1fr 1fr 1fr;\n grid-column: 1 / span 3;\n}\n\n.chsp-settings-extra-options > :nth-child(-n + 3) {\n margin-top: 1em;\n}\n\n.chsp-settings-trajectory {\n display: grid;\n grid-template-columns: 12em 12em;\n justify-content: center;\n align-content: center;\n gap: 1em;\n margin-bottom: 1ex;\n}\n\n.chsp-cell-info {\n position: absolute;\n bottom: 5px;\n left: 5px;\n font-size: 0.8em;\n}\n\n.chsp-toggle-plot-btn {\n display: block;\n position: relative;\n margin-top: 3px;\n margin-bottom: 1px;\n}\n\n.chsp-atom-color-property {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: 1fr 1fr;\n column-gap: 1em;\n margin: 0.5em 0;\n}\n\n.chsp-atom-extra-options {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: auto 1fr 1fr;\n column-gap: 1em;\n}\n\n.chsp-atom-extra-options > * {\n margin: 0.5em 0;\n}\n\n.chsp-atom-extra-options label {\n min-width: auto;\n}\n\n.chsp-atom-extra-options {\n grid-column: 1 / span 2;\n}\n\n.chsp-target-toggle {\n padding-left: 5px;\n padding-right: 5px;\n display: flex;\n justify-content: flex-end;\n gap: 5px;\n}\n\n.chsp-target-spinner {\n width: 25px;\n height: 25px;\n margin-left: 5px;\n}\n",""]);const s=a},48654:(t,e,r)=>{"use strict";r.d(e,{A:()=>V});var n=r(78706),i=r.n(n),o=r(72859),a=r.n(o),s=r(21906),l=r.n(s),c=new URL(r(35531),r.b),d=new URL(r(45419),r.b),u=new URL(r(83385),r.b),h=new URL(r(14274),r.b),p=new URL(r(57154),r.b),f=new URL(r(35782),r.b),m=new URL(r(54718),r.b),g=new URL(r(48487),r.b),v=new URL(r(35372),r.b),b=new URL(r(17914),r.b),y=new URL(r(36366),r.b),x=new URL(r(67830),r.b),w=new URL(r(88832),r.b),_=new URL(r(57249),r.b),k=new URL(r(75932),r.b),A=new URL(r(11144),r.b),T=a()(i()),M=l()(c),S=l()(d),C=l()(u),E=l()(h),L=l()(p),z=l()(f),O=l()(m),D=l()(g),I=l()(v),F=l()(b),R=l()(y),P=l()(x),j=l()(w),N=l()(_),B=l()(k),U=l()(A);T.push([t.id,`@charset "UTF-8";/*!\n * Bootstrap v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors\n * Copyright 2011-2022 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-body-color-rgb:33,37,41;--bs-body-bg-rgb:255,255,255;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, 0.175);--bs-border-radius:0.375rem;--bs-border-radius-sm:0.25rem;--bs-border-radius-lg:0.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-2xl:2rem;--bs-border-radius-pill:50rem;--bs-link-color:#0d6efd;--bs-link-hover-color:#0a58ca;--bs-code-color:#d63384;--bs-highlight-bg:#fff3cd}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;border:0;border-top:1px solid;opacity:.25}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.small,small{font-size:.875em}.mark,mark{padding:.1875em;background-color:var(--bs-highlight-bg)}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:var(--bs-link-color);text-decoration:underline}a:hover{color:var(--bs-link-hover-color)}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:var(--bs-code-color);word-wrap:break-word}a>code{color:inherit}kbd{padding:.1875rem .375rem;font-size:.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:.25rem}kbd kbd{padding:0;font-size:1em}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none!important}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}::file-selector-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:calc(1.625rem + 4.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-1{font-size:5rem}}.display-2{font-size:calc(1.575rem + 3.9vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-2{font-size:4.5rem}}.display-3{font-size:calc(1.525rem + 3.3vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-3{font-size:4rem}}.display-4{font-size:calc(1.475rem + 2.7vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-4{font-size:3.5rem}}.display-5{font-size:calc(1.425rem + 2.1vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-5{font-size:3rem}}.display-6{font-size:calc(1.375rem + 1.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-6{font-size:2.5rem}}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:.875em;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote>:last-child{margin-bottom:0}.blockquote-footer{margin-top:-1rem;margin-bottom:1rem;font-size:.875em;color:#6c757d}.blockquote-footer::before{content:"— "}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid var(--bs-border-color);border-radius:.375rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:.875em;color:#6c757d}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{--bs-gutter-x:1.5rem;--bs-gutter-y:0;width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(-1 * var(--bs-gutter-y));margin-right:calc(-.5 * var(--bs-gutter-x));margin-left:calc(-.5 * var(--bs-gutter-x))}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.33333333%}.col-2{flex:0 0 auto;width:16.66666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.33333333%}.col-5{flex:0 0 auto;width:41.66666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.33333333%}.col-8{flex:0 0 auto;width:66.66666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.33333333%}.col-11{flex:0 0 auto;width:91.66666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.33333333%}.col-sm-2{flex:0 0 auto;width:16.66666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.33333333%}.col-sm-5{flex:0 0 auto;width:41.66666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.33333333%}.col-sm-8{flex:0 0 auto;width:66.66666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.33333333%}.col-sm-11{flex:0 0 auto;width:91.66666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.33333333%}.col-md-2{flex:0 0 auto;width:16.66666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.33333333%}.col-md-5{flex:0 0 auto;width:41.66666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.33333333%}.col-md-8{flex:0 0 auto;width:66.66666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.33333333%}.col-md-11{flex:0 0 auto;width:91.66666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.33333333%}.col-lg-2{flex:0 0 auto;width:16.66666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.33333333%}.col-lg-5{flex:0 0 auto;width:41.66666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.33333333%}.col-lg-8{flex:0 0 auto;width:66.66666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.33333333%}.col-lg-11{flex:0 0 auto;width:91.66666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.33333333%}.col-xl-2{flex:0 0 auto;width:16.66666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.33333333%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.33333333%}.col-xl-8{flex:0 0 auto;width:66.66666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.33333333%}.col-xl-11{flex:0 0 auto;width:91.66666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0%}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.33333333%}.col-xxl-2{flex:0 0 auto;width:16.66666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.33333333%}.col-xxl-5{flex:0 0 auto;width:41.66666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.33333333%}.col-xxl-8{flex:0 0 auto;width:66.66666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.33333333%}.col-xxl-11{flex:0 0 auto;width:91.66666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.33333333%}.offset-xxl-2{margin-left:16.66666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.33333333%}.offset-xxl-5{margin-left:41.66666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.33333333%}.offset-xxl-8{margin-left:66.66666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.33333333%}.offset-xxl-11{margin-left:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.table{--bs-table-color:var(--bs-body-color);--bs-table-bg:transparent;--bs-table-border-color:var(--bs-border-color);--bs-table-accent-bg:transparent;--bs-table-striped-color:var(--bs-body-color);--bs-table-striped-bg:rgba(0, 0, 0, 0.05);--bs-table-active-color:var(--bs-body-color);--bs-table-active-bg:rgba(0, 0, 0, 0.1);--bs-table-hover-color:var(--bs-body-color);--bs-table-hover-bg:rgba(0, 0, 0, 0.075);width:100%;margin-bottom:1rem;color:var(--bs-table-color);vertical-align:top;border-color:var(--bs-table-border-color)}.table>:not(caption)>*>*{padding:.5rem .5rem;background-color:var(--bs-table-bg);border-bottom-width:1px;box-shadow:inset 0 0 0 9999px var(--bs-table-accent-bg)}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table-group-divider{border-top:2px solid currentcolor}.caption-top{caption-side:top}.table-sm>:not(caption)>*>*{padding:.25rem .25rem}.table-bordered>:not(caption)>*{border-width:1px 0}.table-bordered>:not(caption)>*>*{border-width:0 1px}.table-borderless>:not(caption)>*>*{border-bottom-width:0}.table-borderless>:not(:first-child){border-top-width:0}.table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-striped-columns>:not(caption)>tr>:nth-child(2n){--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-active{--bs-table-accent-bg:var(--bs-table-active-bg);color:var(--bs-table-active-color)}.table-hover>tbody>tr:hover>*{--bs-table-accent-bg:var(--bs-table-hover-bg);color:var(--bs-table-hover-color)}.table-primary{--bs-table-color:#000;--bs-table-bg:#cfe2ff;--bs-table-border-color:#bacbe6;--bs-table-striped-bg:#c5d7f2;--bs-table-striped-color:#000;--bs-table-active-bg:#bacbe6;--bs-table-active-color:#000;--bs-table-hover-bg:#bfd1ec;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-secondary{--bs-table-color:#000;--bs-table-bg:#e2e3e5;--bs-table-border-color:#cbccce;--bs-table-striped-bg:#d7d8da;--bs-table-striped-color:#000;--bs-table-active-bg:#cbccce;--bs-table-active-color:#000;--bs-table-hover-bg:#d1d2d4;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-success{--bs-table-color:#000;--bs-table-bg:#d1e7dd;--bs-table-border-color:#bcd0c7;--bs-table-striped-bg:#c7dbd2;--bs-table-striped-color:#000;--bs-table-active-bg:#bcd0c7;--bs-table-active-color:#000;--bs-table-hover-bg:#c1d6cc;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-info{--bs-table-color:#000;--bs-table-bg:#cff4fc;--bs-table-border-color:#badce3;--bs-table-striped-bg:#c5e8ef;--bs-table-striped-color:#000;--bs-table-active-bg:#badce3;--bs-table-active-color:#000;--bs-table-hover-bg:#bfe2e9;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-warning{--bs-table-color:#000;--bs-table-bg:#fff3cd;--bs-table-border-color:#e6dbb9;--bs-table-striped-bg:#f2e7c3;--bs-table-striped-color:#000;--bs-table-active-bg:#e6dbb9;--bs-table-active-color:#000;--bs-table-hover-bg:#ece1be;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-danger{--bs-table-color:#000;--bs-table-bg:#f8d7da;--bs-table-border-color:#dfc2c4;--bs-table-striped-bg:#eccccf;--bs-table-striped-color:#000;--bs-table-active-bg:#dfc2c4;--bs-table-active-color:#000;--bs-table-hover-bg:#e5c7ca;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-light{--bs-table-color:#000;--bs-table-bg:#f8f9fa;--bs-table-border-color:#dfe0e1;--bs-table-striped-bg:#ecedee;--bs-table-striped-color:#000;--bs-table-active-bg:#dfe0e1;--bs-table-active-color:#000;--bs-table-hover-bg:#e5e6e7;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-dark{--bs-table-color:#fff;--bs-table-bg:#212529;--bs-table-border-color:#373b3e;--bs-table-striped-bg:#2c3034;--bs-table-striped-color:#fff;--bs-table-active-bg:#373b3e;--bs-table-active-color:#fff;--bs-table-hover-bg:#323539;--bs-table-hover-color:#fff;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media (max-width:575.98px){.table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:767.98px){.table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:991.98px){.table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1199.98px){.table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1399.98px){.table-responsive-xxl{overflow-x:auto;-webkit-overflow-scrolling:touch}}.form-label{margin-bottom:.5rem}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem}.form-text{margin-top:.25rem;font-size:.875em;color:#6c757d}.form-control{display:block;width:100%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.375rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not([readonly]){cursor:pointer}.form-control:focus{color:#212529;background-color:#fff;border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-control::-webkit-date-and-time-value{height:1.5em}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled{background-color:#e9ecef;opacity:1}.form-control::-webkit-file-upload-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control::file-selector-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}.form-control::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#dde0e3}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:#dde0e3}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext:focus{outline:0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{min-height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;border-radius:.25rem}.form-control-sm::-webkit-file-upload-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-sm::file-selector-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-lg{min-height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;border-radius:.5rem}.form-control-lg::-webkit-file-upload-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.form-control-lg::file-selector-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}textarea.form-control{min-height:calc(1.5em + .75rem + 2px)}textarea.form-control-sm{min-height:calc(1.5em + .5rem + 2px)}textarea.form-control-lg{min-height:calc(1.5em + 1rem + 2px)}.form-control-color{width:3rem;height:calc(1.5em + .75rem + 2px);padding:.375rem}.form-control-color:not(:disabled):not([readonly]){cursor:pointer}.form-control-color::-moz-color-swatch{border:0!important;border-radius:.375rem}.form-control-color::-webkit-color-swatch{border-radius:.375rem}.form-control-color.form-control-sm{height:calc(1.5em + .5rem + 2px)}.form-control-color.form-control-lg{height:calc(1.5em + 1rem + 2px)}.form-select{display:block;width:100%;padding:.375rem 2.25rem .375rem .75rem;-moz-padding-start:calc(0.75rem - 3px);font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-image:url(${M});background-repeat:no-repeat;background-position:right .75rem center;background-size:16px 12px;border:1px solid #ced4da;border-radius:.375rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-select{transition:none}}.form-select:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-select[multiple],.form-select[size]:not([size="1"]){padding-right:.75rem;background-image:none}.form-select:disabled{background-color:#e9ecef}.form-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #212529}.form-select-sm{padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem;border-radius:.25rem}.form-select-lg{padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem;border-radius:.5rem}.form-check{display:block;min-height:1.5rem;padding-left:1.5em;margin-bottom:.125rem}.form-check .form-check-input{float:left;margin-left:-1.5em}.form-check-reverse{padding-right:1.5em;padding-left:0;text-align:right}.form-check-reverse .form-check-input{float:right;margin-right:-1.5em;margin-left:0}.form-check-input{width:1em;height:1em;margin-top:.25em;vertical-align:top;background-color:#fff;background-repeat:no-repeat;background-position:center;background-size:contain;border:1px solid rgba(0,0,0,.25);-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;print-color-adjust:exact}.form-check-input[type=checkbox]{border-radius:.25em}.form-check-input[type=radio]{border-radius:50%}.form-check-input:active{filter:brightness(90%)}.form-check-input:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-check-input:checked{background-color:#0d6efd;border-color:#0d6efd}.form-check-input:checked[type=checkbox]{background-image:url(${S})}.form-check-input:checked[type=radio]{background-image:url(${C})}.form-check-input[type=checkbox]:indeterminate{background-color:#0d6efd;border-color:#0d6efd;background-image:url(${E})}.form-check-input:disabled{pointer-events:none;filter:none;opacity:.5}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:default;opacity:.5}.form-switch{padding-left:2.5em}.form-switch .form-check-input{width:2em;margin-left:-2.5em;background-image:url(${L});background-position:left center;border-radius:2em;transition:background-position .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-switch .form-check-input{transition:none}}.form-switch .form-check-input:focus{background-image:url(${z})}.form-switch .form-check-input:checked{background-position:right center;background-image:url(${O})}.form-switch.form-check-reverse{padding-right:2.5em;padding-left:0}.form-switch.form-check-reverse .form-check-input{margin-right:-2.5em;margin-left:0}.form-check-inline{display:inline-block;margin-right:1rem}.btn-check{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.btn-check:disabled+.btn,.btn-check[disabled]+.btn{pointer-events:none;filter:none;opacity:.65}.form-range{width:100%;height:1.5rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.form-range:focus{outline:0}.form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range::-moz-focus-outer{border:0}.form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#0d6efd;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}.form-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#0d6efd;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-moz-range-thumb{-moz-transition:none;transition:none}}.form-range::-moz-range-thumb:active{background-color:#b6d4fe}.form-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range:disabled{pointer-events:none}.form-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.form-range:disabled::-moz-range-thumb{background-color:#adb5bd}.form-floating{position:relative}.form-floating>.form-control,.form-floating>.form-control-plaintext,.form-floating>.form-select{height:calc(3.5rem + 2px);line-height:1.25}.form-floating>label{position:absolute;top:0;left:0;width:100%;height:100%;padding:1rem .75rem;overflow:hidden;text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:1px solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media (prefers-reduced-motion:reduce){.form-floating>label{transition:none}}.form-floating>.form-control,.form-floating>.form-control-plaintext{padding:1rem .75rem}.form-floating>.form-control-plaintext::-moz-placeholder,.form-floating>.form-control::-moz-placeholder{color:transparent}.form-floating>.form-control-plaintext::placeholder,.form-floating>.form-control::placeholder{color:transparent}.form-floating>.form-control-plaintext:not(:-moz-placeholder-shown),.form-floating>.form-control:not(:-moz-placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control-plaintext:focus,.form-floating>.form-control-plaintext:not(:placeholder-shown),.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control-plaintext:-webkit-autofill,.form-floating>.form-control:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-select{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:not(:-moz-placeholder-shown)~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control-plaintext~label,.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:-webkit-autofill~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control-plaintext~label{border-width:1px 0}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-floating,.input-group>.form-select{position:relative;flex:1 1 auto;width:1%;min-width:0}.input-group>.form-control:focus,.input-group>.form-floating:focus-within,.input-group>.form-select:focus{z-index:5}.input-group .btn{position:relative;z-index:2}.input-group .btn:focus{z-index:5}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.375rem}.input-group-lg>.btn,.input-group-lg>.form-control,.input-group-lg>.form-select,.input-group-lg>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;border-radius:.5rem}.input-group-sm>.btn,.input-group-sm>.form-control,.input-group-sm>.form-select,.input-group-sm>.input-group-text{padding:.25rem .5rem;font-size:.875rem;border-radius:.25rem}.input-group-lg>.form-select,.input-group-sm>.form-select{padding-right:3rem}.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3),.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-control,.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-select,.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.dropdown-toggle:nth-last-child(n+4),.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-control,.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-select,.input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.form-floating:not(:first-child)>.form-control,.input-group>.form-floating:not(:first-child)>.form-select{border-top-left-radius:0;border-bottom-left-radius:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#198754}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(25,135,84,.9);border-radius:.375rem}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#198754;padding-right:calc(1.5em + .75rem);background-image:url(${D});background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-valid,.was-validated .form-select:valid{border-color:#198754}.form-select.is-valid:not([multiple]):not([size]),.form-select.is-valid:not([multiple])[size="1"],.was-validated .form-select:valid:not([multiple]):not([size]),.was-validated .form-select:valid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url(${M}),url(${D});background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-valid:focus,.was-validated .form-select:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-control-color.is-valid,.was-validated .form-control-color:valid{width:calc(3rem + calc(1.5em + .75rem))}.form-check-input.is-valid,.was-validated .form-check-input:valid{border-color:#198754}.form-check-input.is-valid:checked,.was-validated .form-check-input:valid:checked{background-color:#198754}.form-check-input.is-valid:focus,.was-validated .form-check-input:valid:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#198754}.form-check-inline .form-check-input~.valid-feedback{margin-left:.5em}.input-group>.form-control:not(:focus).is-valid,.input-group>.form-floating:not(:focus-within).is-valid,.input-group>.form-select:not(:focus).is-valid,.was-validated .input-group>.form-control:not(:focus):valid,.was-validated .input-group>.form-floating:not(:focus-within):valid,.was-validated .input-group>.form-select:not(:focus):valid{z-index:3}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.375rem}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url(${I});background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-invalid,.was-validated .form-select:invalid{border-color:#dc3545}.form-select.is-invalid:not([multiple]):not([size]),.form-select.is-invalid:not([multiple])[size="1"],.was-validated .form-select:invalid:not([multiple]):not([size]),.was-validated .form-select:invalid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url(${M}),url(${I});background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-invalid:focus,.was-validated .form-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-control-color.is-invalid,.was-validated .form-control-color:invalid{width:calc(3rem + calc(1.5em + .75rem))}.form-check-input.is-invalid,.was-validated .form-check-input:invalid{border-color:#dc3545}.form-check-input.is-invalid:checked,.was-validated .form-check-input:invalid:checked{background-color:#dc3545}.form-check-input.is-invalid:focus,.was-validated .form-check-input:invalid:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-inline .form-check-input~.invalid-feedback{margin-left:.5em}.input-group>.form-control:not(:focus).is-invalid,.input-group>.form-floating:not(:focus-within).is-invalid,.input-group>.form-select:not(:focus).is-invalid,.was-validated .input-group>.form-control:not(:focus):invalid,.was-validated .input-group>.form-floating:not(:focus-within):invalid,.was-validated .input-group>.form-select:not(:focus):invalid{z-index:4}.btn{--bs-btn-padding-x:0.75rem;--bs-btn-padding-y:0.375rem;--bs-btn-font-family: ;--bs-btn-font-size:1rem;--bs-btn-font-weight:400;--bs-btn-line-height:1.5;--bs-btn-color:#212529;--bs-btn-bg:transparent;--bs-btn-border-width:1px;--bs-btn-border-color:transparent;--bs-btn-border-radius:0.375rem;--bs-btn-hover-border-color:transparent;--bs-btn-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.15),0 1px 1px rgba(0, 0, 0, 0.075);--bs-btn-disabled-opacity:0.65;--bs-btn-focus-box-shadow:0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5);display:inline-block;padding:var(--bs-btn-padding-y) var(--bs-btn-padding-x);font-family:var(--bs-btn-font-family);font-size:var(--bs-btn-font-size);font-weight:var(--bs-btn-font-weight);line-height:var(--bs-btn-line-height);color:var(--bs-btn-color);text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;border:var(--bs-btn-border-width) solid var(--bs-btn-border-color);border-radius:var(--bs-btn-border-radius);background-color:var(--bs-btn-bg);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color)}.btn-check+.btn:hover{color:var(--bs-btn-color);background-color:var(--bs-btn-bg);border-color:var(--bs-btn-border-color)}.btn:focus-visible{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:focus-visible+.btn{border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:checked+.btn,.btn.active,.btn.show,.btn:first-child:active,:not(.btn-check)+.btn:active{color:var(--bs-btn-active-color);background-color:var(--bs-btn-active-bg);border-color:var(--bs-btn-active-border-color)}.btn-check:checked+.btn:focus-visible,.btn.active:focus-visible,.btn.show:focus-visible,.btn:first-child:active:focus-visible,:not(.btn-check)+.btn:active:focus-visible{box-shadow:var(--bs-btn-focus-box-shadow)}.btn.disabled,.btn:disabled,fieldset:disabled .btn{color:var(--bs-btn-disabled-color);pointer-events:none;background-color:var(--bs-btn-disabled-bg);border-color:var(--bs-btn-disabled-border-color);opacity:var(--bs-btn-disabled-opacity)}.btn-primary{--bs-btn-color:#fff;--bs-btn-bg:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0b5ed7;--bs-btn-hover-border-color:#0a58ca;--bs-btn-focus-shadow-rgb:49,132,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0a58ca;--bs-btn-active-border-color:#0a53be;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#0d6efd;--bs-btn-disabled-border-color:#0d6efd}.btn-secondary{--bs-btn-color:#fff;--bs-btn-bg:#6c757d;--bs-btn-border-color:#6c757d;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#5c636a;--bs-btn-hover-border-color:#565e64;--bs-btn-focus-shadow-rgb:130,138,145;--bs-btn-active-color:#fff;--bs-btn-active-bg:#565e64;--bs-btn-active-border-color:#51585e;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#6c757d;--bs-btn-disabled-border-color:#6c757d}.btn-success{--bs-btn-color:#fff;--bs-btn-bg:#198754;--bs-btn-border-color:#198754;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#157347;--bs-btn-hover-border-color:#146c43;--bs-btn-focus-shadow-rgb:60,153,110;--bs-btn-active-color:#fff;--bs-btn-active-bg:#146c43;--bs-btn-active-border-color:#13653f;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#198754;--bs-btn-disabled-border-color:#198754}.btn-info{--bs-btn-color:#000;--bs-btn-bg:#0dcaf0;--bs-btn-border-color:#0dcaf0;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#31d2f2;--bs-btn-hover-border-color:#25cff2;--bs-btn-focus-shadow-rgb:11,172,204;--bs-btn-active-color:#000;--bs-btn-active-bg:#3dd5f3;--bs-btn-active-border-color:#25cff2;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#0dcaf0;--bs-btn-disabled-border-color:#0dcaf0}.btn-warning{--bs-btn-color:#000;--bs-btn-bg:#ffc107;--bs-btn-border-color:#ffc107;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#ffca2c;--bs-btn-hover-border-color:#ffc720;--bs-btn-focus-shadow-rgb:217,164,6;--bs-btn-active-color:#000;--bs-btn-active-bg:#ffcd39;--bs-btn-active-border-color:#ffc720;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#ffc107;--bs-btn-disabled-border-color:#ffc107}.btn-danger{--bs-btn-color:#fff;--bs-btn-bg:#dc3545;--bs-btn-border-color:#dc3545;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#bb2d3b;--bs-btn-hover-border-color:#b02a37;--bs-btn-focus-shadow-rgb:225,83,97;--bs-btn-active-color:#fff;--bs-btn-active-bg:#b02a37;--bs-btn-active-border-color:#a52834;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#dc3545;--bs-btn-disabled-border-color:#dc3545}.btn-light{--bs-btn-color:#000;--bs-btn-bg:#f8f9fa;--bs-btn-border-color:#f8f9fa;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#d3d4d5;--bs-btn-hover-border-color:#c6c7c8;--bs-btn-focus-shadow-rgb:211,212,213;--bs-btn-active-color:#000;--bs-btn-active-bg:#c6c7c8;--bs-btn-active-border-color:#babbbc;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#f8f9fa;--bs-btn-disabled-border-color:#f8f9fa}.btn-dark{--bs-btn-color:#fff;--bs-btn-bg:#212529;--bs-btn-border-color:#212529;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#424649;--bs-btn-hover-border-color:#373b3e;--bs-btn-focus-shadow-rgb:66,70,73;--bs-btn-active-color:#fff;--bs-btn-active-bg:#4d5154;--bs-btn-active-border-color:#373b3e;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#212529;--bs-btn-disabled-border-color:#212529}.btn-outline-primary{--bs-btn-color:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0d6efd;--bs-btn-hover-border-color:#0d6efd;--bs-btn-focus-shadow-rgb:13,110,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0d6efd;--bs-btn-active-border-color:#0d6efd;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#0d6efd;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#0d6efd;--bs-gradient:none}.btn-outline-secondary{--bs-btn-color:#6c757d;--bs-btn-border-color:#6c757d;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#6c757d;--bs-btn-hover-border-color:#6c757d;--bs-btn-focus-shadow-rgb:108,117,125;--bs-btn-active-color:#fff;--bs-btn-active-bg:#6c757d;--bs-btn-active-border-color:#6c757d;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#6c757d;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#6c757d;--bs-gradient:none}.btn-outline-success{--bs-btn-color:#198754;--bs-btn-border-color:#198754;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#198754;--bs-btn-hover-border-color:#198754;--bs-btn-focus-shadow-rgb:25,135,84;--bs-btn-active-color:#fff;--bs-btn-active-bg:#198754;--bs-btn-active-border-color:#198754;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#198754;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#198754;--bs-gradient:none}.btn-outline-info{--bs-btn-color:#0dcaf0;--bs-btn-border-color:#0dcaf0;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#0dcaf0;--bs-btn-hover-border-color:#0dcaf0;--bs-btn-focus-shadow-rgb:13,202,240;--bs-btn-active-color:#000;--bs-btn-active-bg:#0dcaf0;--bs-btn-active-border-color:#0dcaf0;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#0dcaf0;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#0dcaf0;--bs-gradient:none}.btn-outline-warning{--bs-btn-color:#ffc107;--bs-btn-border-color:#ffc107;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#ffc107;--bs-btn-hover-border-color:#ffc107;--bs-btn-focus-shadow-rgb:255,193,7;--bs-btn-active-color:#000;--bs-btn-active-bg:#ffc107;--bs-btn-active-border-color:#ffc107;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#ffc107;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#ffc107;--bs-gradient:none}.btn-outline-danger{--bs-btn-color:#dc3545;--bs-btn-border-color:#dc3545;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#dc3545;--bs-btn-hover-border-color:#dc3545;--bs-btn-focus-shadow-rgb:220,53,69;--bs-btn-active-color:#fff;--bs-btn-active-bg:#dc3545;--bs-btn-active-border-color:#dc3545;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#dc3545;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#dc3545;--bs-gradient:none}.btn-outline-light{--bs-btn-color:#f8f9fa;--bs-btn-border-color:#f8f9fa;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#f8f9fa;--bs-btn-hover-border-color:#f8f9fa;--bs-btn-focus-shadow-rgb:248,249,250;--bs-btn-active-color:#000;--bs-btn-active-bg:#f8f9fa;--bs-btn-active-border-color:#f8f9fa;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#f8f9fa;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#f8f9fa;--bs-gradient:none}.btn-outline-dark{--bs-btn-color:#212529;--bs-btn-border-color:#212529;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#212529;--bs-btn-hover-border-color:#212529;--bs-btn-focus-shadow-rgb:33,37,41;--bs-btn-active-color:#fff;--bs-btn-active-bg:#212529;--bs-btn-active-border-color:#212529;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#212529;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#212529;--bs-gradient:none}.btn-link{--bs-btn-font-weight:400;--bs-btn-color:var(--bs-link-color);--bs-btn-bg:transparent;--bs-btn-border-color:transparent;--bs-btn-hover-color:var(--bs-link-hover-color);--bs-btn-hover-border-color:transparent;--bs-btn-active-color:var(--bs-link-hover-color);--bs-btn-active-border-color:transparent;--bs-btn-disabled-color:#6c757d;--bs-btn-disabled-border-color:transparent;--bs-btn-box-shadow:none;--bs-btn-focus-shadow-rgb:49,132,253;text-decoration:underline}.btn-link:focus-visible{color:var(--bs-btn-color)}.btn-link:hover{color:var(--bs-btn-hover-color)}.btn-group-lg>.btn,.btn-lg{--bs-btn-padding-y:0.5rem;--bs-btn-padding-x:1rem;--bs-btn-font-size:1.25rem;--bs-btn-border-radius:0.5rem}.btn-group-sm>.btn,.btn-sm{--bs-btn-padding-y:0.25rem;--bs-btn-padding-x:0.5rem;--bs-btn-font-size:0.875rem;--bs-btn-border-radius:0.25rem}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.collapsing.collapse-horizontal{width:0;height:auto;transition:width .35s ease}@media (prefers-reduced-motion:reduce){.collapsing.collapse-horizontal{transition:none}}.dropdown,.dropdown-center,.dropend,.dropstart,.dropup,.dropup-center{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{--bs-dropdown-zindex:1000;--bs-dropdown-min-width:10rem;--bs-dropdown-padding-x:0;--bs-dropdown-padding-y:0.5rem;--bs-dropdown-spacer:0.125rem;--bs-dropdown-font-size:1rem;--bs-dropdown-color:#212529;--bs-dropdown-bg:#fff;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-border-radius:0.375rem;--bs-dropdown-border-width:1px;--bs-dropdown-inner-border-radius:calc(0.375rem - 1px);--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-divider-margin-y:0.5rem;--bs-dropdown-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-dropdown-link-color:#212529;--bs-dropdown-link-hover-color:#1e2125;--bs-dropdown-link-hover-bg:#e9ecef;--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:#adb5bd;--bs-dropdown-item-padding-x:1rem;--bs-dropdown-item-padding-y:0.25rem;--bs-dropdown-header-color:#6c757d;--bs-dropdown-header-padding-x:1rem;--bs-dropdown-header-padding-y:0.5rem;position:absolute;z-index:var(--bs-dropdown-zindex);display:none;min-width:var(--bs-dropdown-min-width);padding:var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x);margin:0;font-size:var(--bs-dropdown-font-size);color:var(--bs-dropdown-color);text-align:left;list-style:none;background-color:var(--bs-dropdown-bg);background-clip:padding-box;border:var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color);border-radius:var(--bs-dropdown-border-radius)}.dropdown-menu[data-bs-popper]{top:100%;left:0;margin-top:var(--bs-dropdown-spacer)}.dropdown-menu-start{--bs-position:start}.dropdown-menu-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-end{--bs-position:end}.dropdown-menu-end[data-bs-popper]{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-start{--bs-position:start}.dropdown-menu-sm-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-sm-end{--bs-position:end}.dropdown-menu-sm-end[data-bs-popper]{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-start{--bs-position:start}.dropdown-menu-md-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-md-end{--bs-position:end}.dropdown-menu-md-end[data-bs-popper]{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-start{--bs-position:start}.dropdown-menu-lg-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-lg-end{--bs-position:end}.dropdown-menu-lg-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-start{--bs-position:start}.dropdown-menu-xl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xl-end{--bs-position:end}.dropdown-menu-xl-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1400px){.dropdown-menu-xxl-start{--bs-position:start}.dropdown-menu-xxl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xxl-end{--bs-position:end}.dropdown-menu-xxl-end[data-bs-popper]{right:0;left:auto}}.dropup .dropdown-menu[data-bs-popper]{top:auto;bottom:100%;margin-top:0;margin-bottom:var(--bs-dropdown-spacer)}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-menu[data-bs-popper]{top:0;right:auto;left:100%;margin-top:0;margin-left:var(--bs-dropdown-spacer)}.dropend .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropend .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-toggle::after{vertical-align:0}.dropstart .dropdown-menu[data-bs-popper]{top:0;right:100%;left:auto;margin-top:0;margin-right:var(--bs-dropdown-spacer)}.dropstart .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropstart .dropdown-toggle::after{display:none}.dropstart .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropstart .dropdown-toggle:empty::after{margin-left:0}.dropstart .dropdown-toggle::before{vertical-align:0}.dropdown-divider{height:0;margin:var(--bs-dropdown-divider-margin-y) 0;overflow:hidden;border-top:1px solid var(--bs-dropdown-divider-bg);opacity:1}.dropdown-item{display:block;width:100%;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);clear:both;font-weight:400;color:var(--bs-dropdown-link-color);text-align:inherit;text-decoration:none;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:var(--bs-dropdown-link-hover-color);background-color:var(--bs-dropdown-link-hover-bg)}.dropdown-item.active,.dropdown-item:active{color:var(--bs-dropdown-link-active-color);text-decoration:none;background-color:var(--bs-dropdown-link-active-bg)}.dropdown-item.disabled,.dropdown-item:disabled{color:var(--bs-dropdown-link-disabled-color);pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x);margin-bottom:0;font-size:.875rem;color:var(--bs-dropdown-header-color);white-space:nowrap}.dropdown-item-text{display:block;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);color:var(--bs-dropdown-link-color)}.dropdown-menu-dark{--bs-dropdown-color:#dee2e6;--bs-dropdown-bg:#343a40;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-box-shadow: ;--bs-dropdown-link-color:#dee2e6;--bs-dropdown-link-hover-color:#fff;--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-link-hover-bg:rgba(255, 255, 255, 0.15);--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:#adb5bd;--bs-dropdown-header-color:#adb5bd}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group-vertical>.btn-check:checked+.btn,.btn-group-vertical>.btn-check:focus+.btn,.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn-check:checked+.btn,.btn-group>.btn-check:focus+.btn,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group{border-radius:.375rem}.btn-group>.btn-group:not(:first-child),.btn-group>:not(.btn-check:first-child)+.btn{margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn.dropdown-toggle-split:first-child,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:nth-child(n+3),.btn-group>:not(.btn-check)+.btn{border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropend .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropstart .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn~.btn{border-top-left-radius:0;border-top-right-radius:0}.nav{--bs-nav-link-padding-x:1rem;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color:var(--bs-link-color);--bs-nav-link-hover-color:var(--bs-link-hover-color);--bs-nav-link-disabled-color:#6c757d;display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);font-size:var(--bs-nav-link-font-size);font-weight:var(--bs-nav-link-font-weight);color:var(--bs-nav-link-color);text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}@media (prefers-reduced-motion:reduce){.nav-link{transition:none}}.nav-link:focus,.nav-link:hover{color:var(--bs-nav-link-hover-color)}.nav-link.disabled{color:var(--bs-nav-link-disabled-color);pointer-events:none;cursor:default}.nav-tabs{--bs-nav-tabs-border-width:1px;--bs-nav-tabs-border-color:#dee2e6;--bs-nav-tabs-border-radius:0.375rem;--bs-nav-tabs-link-hover-border-color:#e9ecef #e9ecef #dee2e6;--bs-nav-tabs-link-active-color:#495057;--bs-nav-tabs-link-active-bg:#fff;--bs-nav-tabs-link-active-border-color:#dee2e6 #dee2e6 #fff;border-bottom:var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color)}.nav-tabs .nav-link{margin-bottom:calc(-1 * var(--bs-nav-tabs-border-width));background:0 0;border:var(--bs-nav-tabs-border-width) solid transparent;border-top-left-radius:var(--bs-nav-tabs-border-radius);border-top-right-radius:var(--bs-nav-tabs-border-radius)}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{isolation:isolate;border-color:var(--bs-nav-tabs-link-hover-border-color)}.nav-tabs .nav-link.disabled,.nav-tabs .nav-link:disabled{color:var(--bs-nav-link-disabled-color);background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}.nav-tabs .dropdown-menu{margin-top:calc(-1 * var(--bs-nav-tabs-border-width));border-top-left-radius:0;border-top-right-radius:0}.nav-pills{--bs-nav-pills-border-radius:0.375rem;--bs-nav-pills-link-active-color:#fff;--bs-nav-pills-link-active-bg:#0d6efd}.nav-pills .nav-link{background:0 0;border:0;border-radius:var(--bs-nav-pills-border-radius)}.nav-pills .nav-link:disabled{color:var(--bs-nav-link-disabled-color);background-color:transparent;border-color:transparent}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:var(--bs-nav-pills-link-active-color);background-color:var(--bs-nav-pills-link-active-bg)}.nav-fill .nav-item,.nav-fill>.nav-link{flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{flex-basis:0;flex-grow:1;text-align:center}.nav-fill .nav-item .nav-link,.nav-justified .nav-item .nav-link{width:100%}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{--bs-navbar-padding-x:0;--bs-navbar-padding-y:0.5rem;--bs-navbar-color:rgba(0, 0, 0, 0.55);--bs-navbar-hover-color:rgba(0, 0, 0, 0.7);--bs-navbar-disabled-color:rgba(0, 0, 0, 0.3);--bs-navbar-active-color:rgba(0, 0, 0, 0.9);--bs-navbar-brand-padding-y:0.3125rem;--bs-navbar-brand-margin-end:1rem;--bs-navbar-brand-font-size:1.25rem;--bs-navbar-brand-color:rgba(0, 0, 0, 0.9);--bs-navbar-brand-hover-color:rgba(0, 0, 0, 0.9);--bs-navbar-nav-link-padding-x:0.5rem;--bs-navbar-toggler-padding-y:0.25rem;--bs-navbar-toggler-padding-x:0.75rem;--bs-navbar-toggler-font-size:1.25rem;--bs-navbar-toggler-icon-bg:url(${F});--bs-navbar-toggler-border-color:rgba(0, 0, 0, 0.1);--bs-navbar-toggler-border-radius:0.375rem;--bs-navbar-toggler-focus-width:0.25rem;--bs-navbar-toggler-transition:box-shadow 0.15s ease-in-out;position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:var(--bs-navbar-padding-y) var(--bs-navbar-padding-x)}.navbar>.container,.navbar>.container-fluid,.navbar>.container-lg,.navbar>.container-md,.navbar>.container-sm,.navbar>.container-xl,.navbar>.container-xxl{display:flex;flex-wrap:inherit;align-items:center;justify-content:space-between}.navbar-brand{padding-top:var(--bs-navbar-brand-padding-y);padding-bottom:var(--bs-navbar-brand-padding-y);margin-right:var(--bs-navbar-brand-margin-end);font-size:var(--bs-navbar-brand-font-size);color:var(--bs-navbar-brand-color);text-decoration:none;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{color:var(--bs-navbar-brand-hover-color)}.navbar-nav{--bs-nav-link-padding-x:0;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color:var(--bs-navbar-color);--bs-nav-link-hover-color:var(--bs-navbar-hover-color);--bs-nav-link-disabled-color:var(--bs-navbar-disabled-color);display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link.active,.navbar-nav .show>.nav-link{color:var(--bs-navbar-active-color)}.navbar-nav .dropdown-menu{position:static}.navbar-text{padding-top:.5rem;padding-bottom:.5rem;color:var(--bs-navbar-color)}.navbar-text a,.navbar-text a:focus,.navbar-text a:hover{color:var(--bs-navbar-active-color)}.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}.navbar-toggler{padding:var(--bs-navbar-toggler-padding-y) var(--bs-navbar-toggler-padding-x);font-size:var(--bs-navbar-toggler-font-size);line-height:1;color:var(--bs-navbar-color);background-color:transparent;border:var(--bs-border-width) solid var(--bs-navbar-toggler-border-color);border-radius:var(--bs-navbar-toggler-border-radius);transition:var(--bs-navbar-toggler-transition)}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-toggler:hover{text-decoration:none}.navbar-toggler:focus{text-decoration:none;outline:0;box-shadow:0 0 0 var(--bs-navbar-toggler-focus-width)}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;background-image:var(--bs-navbar-toggler-icon-bg);background-repeat:no-repeat;background-position:center;background-size:100%}.navbar-nav-scroll{max-height:var(--bs-scroll-height,75vh);overflow-y:auto}@media (min-width:576px){.navbar-expand-sm{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}.navbar-expand-sm .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-sm .offcanvas .offcanvas-header{display:none}.navbar-expand-sm .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}.navbar-expand-md .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-md .offcanvas .offcanvas-header{display:none}.navbar-expand-md .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:992px){.navbar-expand-lg{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}.navbar-expand-lg .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-lg .offcanvas .offcanvas-header{display:none}.navbar-expand-lg .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1200px){.navbar-expand-xl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}.navbar-expand-xl .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-xl .offcanvas .offcanvas-header{display:none}.navbar-expand-xl .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1400px){.navbar-expand-xxl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xxl .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}.navbar-expand-xxl .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-xxl .offcanvas .offcanvas-header{display:none}.navbar-expand-xxl .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}.navbar-expand{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-expand .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand .offcanvas .offcanvas-header{display:none}.navbar-expand .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}.navbar-dark{--bs-navbar-color:rgba(255, 255, 255, 0.55);--bs-navbar-hover-color:rgba(255, 255, 255, 0.75);--bs-navbar-disabled-color:rgba(255, 255, 255, 0.25);--bs-navbar-active-color:#fff;--bs-navbar-brand-color:#fff;--bs-navbar-brand-hover-color:#fff;--bs-navbar-toggler-border-color:rgba(255, 255, 255, 0.1);--bs-navbar-toggler-icon-bg:url(${R})}.card{--bs-card-spacer-y:1rem;--bs-card-spacer-x:1rem;--bs-card-title-spacer-y:0.5rem;--bs-card-border-width:1px;--bs-card-border-color:var(--bs-border-color-translucent);--bs-card-border-radius:0.375rem;--bs-card-box-shadow: ;--bs-card-inner-border-radius:calc(0.375rem - 1px);--bs-card-cap-padding-y:0.5rem;--bs-card-cap-padding-x:1rem;--bs-card-cap-bg:rgba(0, 0, 0, 0.03);--bs-card-cap-color: ;--bs-card-height: ;--bs-card-color: ;--bs-card-bg:#fff;--bs-card-img-overlay-padding:1rem;--bs-card-group-margin:0.75rem;position:relative;display:flex;flex-direction:column;min-width:0;height:var(--bs-card-height);word-wrap:break-word;background-color:var(--bs-card-bg);background-clip:border-box;border:var(--bs-card-border-width) solid var(--bs-card-border-color);border-radius:var(--bs-card-border-radius)}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:var(--bs-card-inner-border-radius);border-top-right-radius:var(--bs-card-inner-border-radius)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:var(--bs-card-inner-border-radius);border-bottom-left-radius:var(--bs-card-inner-border-radius)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{flex:1 1 auto;padding:var(--bs-card-spacer-y) var(--bs-card-spacer-x);color:var(--bs-card-color)}.card-title{margin-bottom:var(--bs-card-title-spacer-y)}.card-subtitle{margin-top:calc(-.5 * var(--bs-card-title-spacer-y));margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link+.card-link{margin-left:var(--bs-card-spacer-x)}.card-header{padding:var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);margin-bottom:0;color:var(--bs-card-cap-color);background-color:var(--bs-card-cap-bg);border-bottom:var(--bs-card-border-width) solid var(--bs-card-border-color)}.card-header:first-child{border-radius:var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0}.card-footer{padding:var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);color:var(--bs-card-cap-color);background-color:var(--bs-card-cap-bg);border-top:var(--bs-card-border-width) solid var(--bs-card-border-color)}.card-footer:last-child{border-radius:0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius)}.card-header-tabs{margin-right:calc(-.5 * var(--bs-card-cap-padding-x));margin-bottom:calc(-1 * var(--bs-card-cap-padding-y));margin-left:calc(-.5 * var(--bs-card-cap-padding-x));border-bottom:0}.card-header-tabs .nav-link.active{background-color:var(--bs-card-bg);border-bottom-color:var(--bs-card-bg)}.card-header-pills{margin-right:calc(-.5 * var(--bs-card-cap-padding-x));margin-left:calc(-.5 * var(--bs-card-cap-padding-x))}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:var(--bs-card-img-overlay-padding);border-radius:var(--bs-card-inner-border-radius)}.card-img,.card-img-bottom,.card-img-top{width:100%}.card-img,.card-img-top{border-top-left-radius:var(--bs-card-inner-border-radius);border-top-right-radius:var(--bs-card-inner-border-radius)}.card-img,.card-img-bottom{border-bottom-right-radius:var(--bs-card-inner-border-radius);border-bottom-left-radius:var(--bs-card-inner-border-radius)}.card-group>.card{margin-bottom:var(--bs-card-group-margin)}@media (min-width:576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.accordion{--bs-accordion-color:#212529;--bs-accordion-bg:#fff;--bs-accordion-transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out,border-radius 0.15s ease;--bs-accordion-border-color:var(--bs-border-color);--bs-accordion-border-width:1px;--bs-accordion-border-radius:0.375rem;--bs-accordion-inner-border-radius:calc(0.375rem - 1px);--bs-accordion-btn-padding-x:1.25rem;--bs-accordion-btn-padding-y:1rem;--bs-accordion-btn-color:#212529;--bs-accordion-btn-bg:var(--bs-accordion-bg);--bs-accordion-btn-icon:url(${P});--bs-accordion-btn-icon-width:1.25rem;--bs-accordion-btn-icon-transform:rotate(-180deg);--bs-accordion-btn-icon-transition:transform 0.2s ease-in-out;--bs-accordion-btn-active-icon:url(${j});--bs-accordion-btn-focus-border-color:#86b7fe;--bs-accordion-btn-focus-box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);--bs-accordion-body-padding-x:1.25rem;--bs-accordion-body-padding-y:1rem;--bs-accordion-active-color:#0c63e4;--bs-accordion-active-bg:#e7f1ff}.accordion-button{position:relative;display:flex;align-items:center;width:100%;padding:var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x);font-size:1rem;color:var(--bs-accordion-btn-color);text-align:left;background-color:var(--bs-accordion-btn-bg);border:0;border-radius:0;overflow-anchor:none;transition:var(--bs-accordion-transition)}@media (prefers-reduced-motion:reduce){.accordion-button{transition:none}}.accordion-button:not(.collapsed){color:var(--bs-accordion-active-color);background-color:var(--bs-accordion-active-bg);box-shadow:inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color)}.accordion-button:not(.collapsed)::after{background-image:var(--bs-accordion-btn-active-icon);transform:var(--bs-accordion-btn-icon-transform)}.accordion-button::after{flex-shrink:0;width:var(--bs-accordion-btn-icon-width);height:var(--bs-accordion-btn-icon-width);margin-left:auto;content:"";background-image:var(--bs-accordion-btn-icon);background-repeat:no-repeat;background-size:var(--bs-accordion-btn-icon-width);transition:var(--bs-accordion-btn-icon-transition)}@media (prefers-reduced-motion:reduce){.accordion-button::after{transition:none}}.accordion-button:hover{z-index:2}.accordion-button:focus{z-index:3;border-color:var(--bs-accordion-btn-focus-border-color);outline:0;box-shadow:var(--bs-accordion-btn-focus-box-shadow)}.accordion-header{margin-bottom:0}.accordion-item{color:var(--bs-accordion-color);background-color:var(--bs-accordion-bg);border:var(--bs-accordion-border-width) solid var(--bs-accordion-border-color)}.accordion-item:first-of-type{border-top-left-radius:var(--bs-accordion-border-radius);border-top-right-radius:var(--bs-accordion-border-radius)}.accordion-item:first-of-type .accordion-button{border-top-left-radius:var(--bs-accordion-inner-border-radius);border-top-right-radius:var(--bs-accordion-inner-border-radius)}.accordion-item:not(:first-of-type){border-top:0}.accordion-item:last-of-type{border-bottom-right-radius:var(--bs-accordion-border-radius);border-bottom-left-radius:var(--bs-accordion-border-radius)}.accordion-item:last-of-type .accordion-button.collapsed{border-bottom-right-radius:var(--bs-accordion-inner-border-radius);border-bottom-left-radius:var(--bs-accordion-inner-border-radius)}.accordion-item:last-of-type .accordion-collapse{border-bottom-right-radius:var(--bs-accordion-border-radius);border-bottom-left-radius:var(--bs-accordion-border-radius)}.accordion-body{padding:var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x)}.accordion-flush .accordion-collapse{border-width:0}.accordion-flush .accordion-item{border-right:0;border-left:0;border-radius:0}.accordion-flush .accordion-item:first-child{border-top:0}.accordion-flush .accordion-item:last-child{border-bottom:0}.accordion-flush .accordion-item .accordion-button,.accordion-flush .accordion-item .accordion-button.collapsed{border-radius:0}.breadcrumb{--bs-breadcrumb-padding-x:0;--bs-breadcrumb-padding-y:0;--bs-breadcrumb-margin-bottom:1rem;--bs-breadcrumb-bg: ;--bs-breadcrumb-border-radius: ;--bs-breadcrumb-divider-color:#6c757d;--bs-breadcrumb-item-padding-x:0.5rem;--bs-breadcrumb-item-active-color:#6c757d;display:flex;flex-wrap:wrap;padding:var(--bs-breadcrumb-padding-y) var(--bs-breadcrumb-padding-x);margin-bottom:var(--bs-breadcrumb-margin-bottom);font-size:var(--bs-breadcrumb-font-size);list-style:none;background-color:var(--bs-breadcrumb-bg);border-radius:var(--bs-breadcrumb-border-radius)}.breadcrumb-item+.breadcrumb-item{padding-left:var(--bs-breadcrumb-item-padding-x)}.breadcrumb-item+.breadcrumb-item::before{float:left;padding-right:var(--bs-breadcrumb-item-padding-x);color:var(--bs-breadcrumb-divider-color);content:var(--bs-breadcrumb-divider, "/")}.breadcrumb-item.active{color:var(--bs-breadcrumb-item-active-color)}.pagination{--bs-pagination-padding-x:0.75rem;--bs-pagination-padding-y:0.375rem;--bs-pagination-font-size:1rem;--bs-pagination-color:var(--bs-link-color);--bs-pagination-bg:#fff;--bs-pagination-border-width:1px;--bs-pagination-border-color:#dee2e6;--bs-pagination-border-radius:0.375rem;--bs-pagination-hover-color:var(--bs-link-hover-color);--bs-pagination-hover-bg:#e9ecef;--bs-pagination-hover-border-color:#dee2e6;--bs-pagination-focus-color:var(--bs-link-hover-color);--bs-pagination-focus-bg:#e9ecef;--bs-pagination-focus-box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);--bs-pagination-active-color:#fff;--bs-pagination-active-bg:#0d6efd;--bs-pagination-active-border-color:#0d6efd;--bs-pagination-disabled-color:#6c757d;--bs-pagination-disabled-bg:#fff;--bs-pagination-disabled-border-color:#dee2e6;display:flex;padding-left:0;list-style:none}.page-link{position:relative;display:block;padding:var(--bs-pagination-padding-y) var(--bs-pagination-padding-x);font-size:var(--bs-pagination-font-size);color:var(--bs-pagination-color);text-decoration:none;background-color:var(--bs-pagination-bg);border:var(--bs-pagination-border-width) solid var(--bs-pagination-border-color);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.page-link{transition:none}}.page-link:hover{z-index:2;color:var(--bs-pagination-hover-color);background-color:var(--bs-pagination-hover-bg);border-color:var(--bs-pagination-hover-border-color)}.page-link:focus{z-index:3;color:var(--bs-pagination-focus-color);background-color:var(--bs-pagination-focus-bg);outline:0;box-shadow:var(--bs-pagination-focus-box-shadow)}.active>.page-link,.page-link.active{z-index:3;color:var(--bs-pagination-active-color);background-color:var(--bs-pagination-active-bg);border-color:var(--bs-pagination-active-border-color)}.disabled>.page-link,.page-link.disabled{color:var(--bs-pagination-disabled-color);pointer-events:none;background-color:var(--bs-pagination-disabled-bg);border-color:var(--bs-pagination-disabled-border-color)}.page-item:not(:first-child) .page-link{margin-left:-1px}.page-item:first-child .page-link{border-top-left-radius:var(--bs-pagination-border-radius);border-bottom-left-radius:var(--bs-pagination-border-radius)}.page-item:last-child .page-link{border-top-right-radius:var(--bs-pagination-border-radius);border-bottom-right-radius:var(--bs-pagination-border-radius)}.pagination-lg{--bs-pagination-padding-x:1.5rem;--bs-pagination-padding-y:0.75rem;--bs-pagination-font-size:1.25rem;--bs-pagination-border-radius:0.5rem}.pagination-sm{--bs-pagination-padding-x:0.5rem;--bs-pagination-padding-y:0.25rem;--bs-pagination-font-size:0.875rem;--bs-pagination-border-radius:0.25rem}.badge{--bs-badge-padding-x:0.65em;--bs-badge-padding-y:0.35em;--bs-badge-font-size:0.75em;--bs-badge-font-weight:700;--bs-badge-color:#fff;--bs-badge-border-radius:0.375rem;display:inline-block;padding:var(--bs-badge-padding-y) var(--bs-badge-padding-x);font-size:var(--bs-badge-font-size);font-weight:var(--bs-badge-font-weight);line-height:1;color:var(--bs-badge-color);text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:var(--bs-badge-border-radius)}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.alert{--bs-alert-bg:transparent;--bs-alert-padding-x:1rem;--bs-alert-padding-y:1rem;--bs-alert-margin-bottom:1rem;--bs-alert-color:inherit;--bs-alert-border-color:transparent;--bs-alert-border:1px solid var(--bs-alert-border-color);--bs-alert-border-radius:0.375rem;position:relative;padding:var(--bs-alert-padding-y) var(--bs-alert-padding-x);margin-bottom:var(--bs-alert-margin-bottom);color:var(--bs-alert-color);background-color:var(--bs-alert-bg);border:var(--bs-alert-border);border-radius:var(--bs-alert-border-radius)}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:3rem}.alert-dismissible .btn-close{position:absolute;top:0;right:0;z-index:2;padding:1.25rem 1rem}.alert-primary{--bs-alert-color:#084298;--bs-alert-bg:#cfe2ff;--bs-alert-border-color:#b6d4fe}.alert-primary .alert-link{color:#06357a}.alert-secondary{--bs-alert-color:#41464b;--bs-alert-bg:#e2e3e5;--bs-alert-border-color:#d3d6d8}.alert-secondary .alert-link{color:#34383c}.alert-success{--bs-alert-color:#0f5132;--bs-alert-bg:#d1e7dd;--bs-alert-border-color:#badbcc}.alert-success .alert-link{color:#0c4128}.alert-info{--bs-alert-color:#055160;--bs-alert-bg:#cff4fc;--bs-alert-border-color:#b6effb}.alert-info .alert-link{color:#04414d}.alert-warning{--bs-alert-color:#664d03;--bs-alert-bg:#fff3cd;--bs-alert-border-color:#ffecb5}.alert-warning .alert-link{color:#523e02}.alert-danger{--bs-alert-color:#842029;--bs-alert-bg:#f8d7da;--bs-alert-border-color:#f5c2c7}.alert-danger .alert-link{color:#6a1a21}.alert-light{--bs-alert-color:#636464;--bs-alert-bg:#fefefe;--bs-alert-border-color:#fdfdfe}.alert-light .alert-link{color:#4f5050}.alert-dark{--bs-alert-color:#141619;--bs-alert-bg:#d3d3d4;--bs-alert-border-color:#bcbebf}.alert-dark .alert-link{color:#101214}@keyframes progress-bar-stripes{0%{background-position-x:1rem}}.progress{--bs-progress-height:1rem;--bs-progress-font-size:0.75rem;--bs-progress-bg:#e9ecef;--bs-progress-border-radius:0.375rem;--bs-progress-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.075);--bs-progress-bar-color:#fff;--bs-progress-bar-bg:#0d6efd;--bs-progress-bar-transition:width 0.6s ease;display:flex;height:var(--bs-progress-height);overflow:hidden;font-size:var(--bs-progress-font-size);background-color:var(--bs-progress-bg);border-radius:var(--bs-progress-border-radius)}.progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:var(--bs-progress-bar-color);text-align:center;white-space:nowrap;background-color:var(--bs-progress-bar-bg);transition:var(--bs-progress-bar-transition)}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:var(--bs-progress-height) var(--bs-progress-height)}.progress-bar-animated{animation:1s linear infinite progress-bar-stripes}@media (prefers-reduced-motion:reduce){.progress-bar-animated{animation:none}}.list-group{--bs-list-group-color:#212529;--bs-list-group-bg:#fff;--bs-list-group-border-color:rgba(0, 0, 0, 0.125);--bs-list-group-border-width:1px;--bs-list-group-border-radius:0.375rem;--bs-list-group-item-padding-x:1rem;--bs-list-group-item-padding-y:0.5rem;--bs-list-group-action-color:#495057;--bs-list-group-action-hover-color:#495057;--bs-list-group-action-hover-bg:#f8f9fa;--bs-list-group-action-active-color:#212529;--bs-list-group-action-active-bg:#e9ecef;--bs-list-group-disabled-color:#6c757d;--bs-list-group-disabled-bg:#fff;--bs-list-group-active-color:#fff;--bs-list-group-active-bg:#0d6efd;--bs-list-group-active-border-color:#0d6efd;display:flex;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:var(--bs-list-group-border-radius)}.list-group-numbered{list-style-type:none;counter-reset:section}.list-group-numbered>.list-group-item::before{content:counters(section, ".") ". ";counter-increment:section}.list-group-item-action{width:100%;color:var(--bs-list-group-action-color);text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:var(--bs-list-group-action-hover-color);text-decoration:none;background-color:var(--bs-list-group-action-hover-bg)}.list-group-item-action:active{color:var(--bs-list-group-action-active-color);background-color:var(--bs-list-group-action-active-bg)}.list-group-item{position:relative;display:block;padding:var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x);color:var(--bs-list-group-color);text-decoration:none;background-color:var(--bs-list-group-bg);border:var(--bs-list-group-border-width) solid var(--bs-list-group-border-color)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:var(--bs-list-group-disabled-color);pointer-events:none;background-color:var(--bs-list-group-disabled-bg)}.list-group-item.active{z-index:2;color:var(--bs-list-group-active-color);background-color:var(--bs-list-group-active-bg);border-color:var(--bs-list-group-active-border-color)}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:calc(-1 * var(--bs-list-group-border-width));border-top-width:var(--bs-list-group-border-width)}.list-group-horizontal{flex-direction:row}.list-group-horizontal>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}@media (min-width:576px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:768px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:992px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:1400px){.list-group-horizontal-xxl{flex-direction:row}.list-group-horizontal-xxl>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-xxl>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-xxl>.list-group-item.active{margin-top:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 var(--bs-list-group-border-width)}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#084298;background-color:#cfe2ff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#084298;background-color:#bacbe6}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#084298;border-color:#084298}.list-group-item-secondary{color:#41464b;background-color:#e2e3e5}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#41464b;background-color:#cbccce}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#41464b;border-color:#41464b}.list-group-item-success{color:#0f5132;background-color:#d1e7dd}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#0f5132;background-color:#bcd0c7}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#0f5132;border-color:#0f5132}.list-group-item-info{color:#055160;background-color:#cff4fc}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#055160;background-color:#badce3}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#055160;border-color:#055160}.list-group-item-warning{color:#664d03;background-color:#fff3cd}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#664d03;background-color:#e6dbb9}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#664d03;border-color:#664d03}.list-group-item-danger{color:#842029;background-color:#f8d7da}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#842029;background-color:#dfc2c4}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#842029;border-color:#842029}.list-group-item-light{color:#636464;background-color:#fefefe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#636464;background-color:#e5e5e5}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#636464;border-color:#636464}.list-group-item-dark{color:#141619;background-color:#d3d3d4}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#141619;background-color:#bebebf}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#141619;border-color:#141619}.btn-close{box-sizing:content-box;width:1em;height:1em;padding:.25em .25em;color:#000;background:transparent url(${N}) center/1em auto no-repeat;border:0;border-radius:.375rem;opacity:.5}.btn-close:hover{color:#000;text-decoration:none;opacity:.75}.btn-close:focus{outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25);opacity:1}.btn-close.disabled,.btn-close:disabled{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:.25}.btn-close-white{filter:invert(1) grayscale(100%) brightness(200%)}.toast{--bs-toast-zindex:1090;--bs-toast-padding-x:0.75rem;--bs-toast-padding-y:0.5rem;--bs-toast-spacing:1.5rem;--bs-toast-max-width:350px;--bs-toast-font-size:0.875rem;--bs-toast-color: ;--bs-toast-bg:rgba(255, 255, 255, 0.85);--bs-toast-border-width:1px;--bs-toast-border-color:var(--bs-border-color-translucent);--bs-toast-border-radius:0.375rem;--bs-toast-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-toast-header-color:#6c757d;--bs-toast-header-bg:rgba(255, 255, 255, 0.85);--bs-toast-header-border-color:rgba(0, 0, 0, 0.05);width:var(--bs-toast-max-width);max-width:100%;font-size:var(--bs-toast-font-size);color:var(--bs-toast-color);pointer-events:auto;background-color:var(--bs-toast-bg);background-clip:padding-box;border:var(--bs-toast-border-width) solid var(--bs-toast-border-color);box-shadow:var(--bs-toast-box-shadow);border-radius:var(--bs-toast-border-radius)}.toast.showing{opacity:0}.toast:not(.show){display:none}.toast-container{--bs-toast-zindex:1090;position:absolute;z-index:var(--bs-toast-zindex);width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:100%;pointer-events:none}.toast-container>:not(:last-child){margin-bottom:var(--bs-toast-spacing)}.toast-header{display:flex;align-items:center;padding:var(--bs-toast-padding-y) var(--bs-toast-padding-x);color:var(--bs-toast-header-color);background-color:var(--bs-toast-header-bg);background-clip:padding-box;border-bottom:var(--bs-toast-border-width) solid var(--bs-toast-header-border-color);border-top-left-radius:calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width));border-top-right-radius:calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width))}.toast-header .btn-close{margin-right:calc(-.5 * var(--bs-toast-padding-x));margin-left:var(--bs-toast-padding-x)}.toast-body{padding:var(--bs-toast-padding-x);word-wrap:break-word}.modal{--bs-modal-zindex:1055;--bs-modal-width:500px;--bs-modal-padding:1rem;--bs-modal-margin:0.5rem;--bs-modal-color: ;--bs-modal-bg:#fff;--bs-modal-border-color:var(--bs-border-color-translucent);--bs-modal-border-width:1px;--bs-modal-border-radius:0.5rem;--bs-modal-box-shadow:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--bs-modal-inner-border-radius:calc(0.5rem - 1px);--bs-modal-header-padding-x:1rem;--bs-modal-header-padding-y:1rem;--bs-modal-header-padding:1rem 1rem;--bs-modal-header-border-color:var(--bs-border-color);--bs-modal-header-border-width:1px;--bs-modal-title-line-height:1.5;--bs-modal-footer-gap:0.5rem;--bs-modal-footer-bg: ;--bs-modal-footer-border-color:var(--bs-border-color);--bs-modal-footer-border-width:1px;position:fixed;top:0;left:0;z-index:var(--bs-modal-zindex);display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}.modal-dialog{position:relative;width:auto;margin:var(--bs-modal-margin);pointer-events:none}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{height:calc(100% - var(--bs-modal-margin) * 2)}.modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - var(--bs-modal-margin) * 2)}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;color:var(--bs-modal-color);pointer-events:auto;background-color:var(--bs-modal-bg);background-clip:padding-box;border:var(--bs-modal-border-width) solid var(--bs-modal-border-color);border-radius:var(--bs-modal-border-radius);outline:0}.modal-backdrop{--bs-backdrop-zindex:1050;--bs-backdrop-bg:#000;--bs-backdrop-opacity:0.5;position:fixed;top:0;left:0;z-index:var(--bs-backdrop-zindex);width:100vw;height:100vh;background-color:var(--bs-backdrop-bg)}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:var(--bs-backdrop-opacity)}.modal-header{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:var(--bs-modal-header-padding);border-bottom:var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color);border-top-left-radius:var(--bs-modal-inner-border-radius);border-top-right-radius:var(--bs-modal-inner-border-radius)}.modal-header .btn-close{padding:calc(var(--bs-modal-header-padding-y) * .5) calc(var(--bs-modal-header-padding-x) * .5);margin:calc(-.5 * var(--bs-modal-header-padding-y)) calc(-.5 * var(--bs-modal-header-padding-x)) calc(-.5 * var(--bs-modal-header-padding-y)) auto}.modal-title{margin-bottom:0;line-height:var(--bs-modal-title-line-height)}.modal-body{position:relative;flex:1 1 auto;padding:var(--bs-modal-padding)}.modal-footer{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * .5);background-color:var(--bs-modal-footer-bg);border-top:var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color);border-bottom-right-radius:var(--bs-modal-inner-border-radius);border-bottom-left-radius:var(--bs-modal-inner-border-radius)}.modal-footer>*{margin:calc(var(--bs-modal-footer-gap) * .5)}@media (min-width:576px){.modal{--bs-modal-margin:1.75rem;--bs-modal-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15)}.modal-dialog{max-width:var(--bs-modal-width);margin-right:auto;margin-left:auto}.modal-sm{--bs-modal-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{--bs-modal-width:800px}}@media (min-width:1200px){.modal-xl{--bs-modal-width:1140px}}.modal-fullscreen{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen .modal-footer,.modal-fullscreen .modal-header{border-radius:0}.modal-fullscreen .modal-body{overflow-y:auto}@media (max-width:575.98px){.modal-fullscreen-sm-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-sm-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-sm-down .modal-footer,.modal-fullscreen-sm-down .modal-header{border-radius:0}.modal-fullscreen-sm-down .modal-body{overflow-y:auto}}@media (max-width:767.98px){.modal-fullscreen-md-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-md-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-md-down .modal-footer,.modal-fullscreen-md-down .modal-header{border-radius:0}.modal-fullscreen-md-down .modal-body{overflow-y:auto}}@media (max-width:991.98px){.modal-fullscreen-lg-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-lg-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-lg-down .modal-footer,.modal-fullscreen-lg-down .modal-header{border-radius:0}.modal-fullscreen-lg-down .modal-body{overflow-y:auto}}@media (max-width:1199.98px){.modal-fullscreen-xl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xl-down .modal-footer,.modal-fullscreen-xl-down .modal-header{border-radius:0}.modal-fullscreen-xl-down .modal-body{overflow-y:auto}}@media (max-width:1399.98px){.modal-fullscreen-xxl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xxl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xxl-down .modal-footer,.modal-fullscreen-xxl-down .modal-header{border-radius:0}.modal-fullscreen-xxl-down .modal-body{overflow-y:auto}}.tooltip{--bs-tooltip-zindex:1080;--bs-tooltip-max-width:200px;--bs-tooltip-padding-x:0.5rem;--bs-tooltip-padding-y:0.25rem;--bs-tooltip-margin: ;--bs-tooltip-font-size:0.875rem;--bs-tooltip-color:#fff;--bs-tooltip-bg:#000;--bs-tooltip-border-radius:0.375rem;--bs-tooltip-opacity:0.9;--bs-tooltip-arrow-width:0.8rem;--bs-tooltip-arrow-height:0.4rem;z-index:var(--bs-tooltip-zindex);display:block;padding:var(--bs-tooltip-arrow-height);margin:var(--bs-tooltip-margin);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-tooltip-font-size);word-wrap:break-word;opacity:0}.tooltip.show{opacity:var(--bs-tooltip-opacity)}.tooltip .tooltip-arrow{display:block;width:var(--bs-tooltip-arrow-width);height:var(--bs-tooltip-arrow-height)}.tooltip .tooltip-arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow,.bs-tooltip-top .tooltip-arrow{bottom:0}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,.bs-tooltip-top .tooltip-arrow::before{top:-1px;border-width:var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0;border-top-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow,.bs-tooltip-end .tooltip-arrow{left:0;width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before,.bs-tooltip-end .tooltip-arrow::before{right:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0;border-right-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow,.bs-tooltip-bottom .tooltip-arrow{top:0}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before,.bs-tooltip-bottom .tooltip-arrow::before{bottom:-1px;border-width:0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height);border-bottom-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow,.bs-tooltip-start .tooltip-arrow{right:0;width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before,.bs-tooltip-start .tooltip-arrow::before{left:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * .5) 0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height);border-left-color:var(--bs-tooltip-bg)}.tooltip-inner{max-width:var(--bs-tooltip-max-width);padding:var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x);color:var(--bs-tooltip-color);text-align:center;background-color:var(--bs-tooltip-bg);border-radius:var(--bs-tooltip-border-radius)}.popover{--bs-popover-zindex:1070;--bs-popover-max-width:276px;--bs-popover-font-size:0.875rem;--bs-popover-bg:#fff;--bs-popover-border-width:1px;--bs-popover-border-color:var(--bs-border-color-translucent);--bs-popover-border-radius:0.5rem;--bs-popover-inner-border-radius:calc(0.5rem - 1px);--bs-popover-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-popover-header-padding-x:1rem;--bs-popover-header-padding-y:0.5rem;--bs-popover-header-font-size:1rem;--bs-popover-header-color: ;--bs-popover-header-bg:#f0f0f0;--bs-popover-body-padding-x:1rem;--bs-popover-body-padding-y:1rem;--bs-popover-body-color:#212529;--bs-popover-arrow-width:1rem;--bs-popover-arrow-height:0.5rem;--bs-popover-arrow-border:var(--bs-popover-border-color);z-index:var(--bs-popover-zindex);display:block;max-width:var(--bs-popover-max-width);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-popover-font-size);word-wrap:break-word;background-color:var(--bs-popover-bg);background-clip:padding-box;border:var(--bs-popover-border-width) solid var(--bs-popover-border-color);border-radius:var(--bs-popover-border-radius)}.popover .popover-arrow{display:block;width:var(--bs-popover-arrow-width);height:var(--bs-popover-arrow-height)}.popover .popover-arrow::after,.popover .popover-arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid;border-width:0}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow,.bs-popover-top>.popover-arrow{bottom:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width))}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::after,.bs-popover-top>.popover-arrow::before{border-width:var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * .5) 0}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::before{bottom:0;border-top-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-top>.popover-arrow::after{bottom:var(--bs-popover-border-width);border-top-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow,.bs-popover-end>.popover-arrow{left:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));width:var(--bs-popover-arrow-height);height:var(--bs-popover-arrow-width)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::after,.bs-popover-end>.popover-arrow::before{border-width:calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * .5) 0}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::before{left:0;border-right-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-end>.popover-arrow::after{left:var(--bs-popover-border-width);border-right-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow,.bs-popover-bottom>.popover-arrow{top:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width))}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::before{border-width:0 calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::before{top:0;border-bottom-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::after{top:var(--bs-popover-border-width);border-bottom-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:var(--bs-popover-arrow-width);margin-left:calc(-.5 * var(--bs-popover-arrow-width));content:"";border-bottom:var(--bs-popover-border-width) solid var(--bs-popover-header-bg)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow,.bs-popover-start>.popover-arrow{right:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));width:var(--bs-popover-arrow-height);height:var(--bs-popover-arrow-width)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::after,.bs-popover-start>.popover-arrow::before{border-width:calc(var(--bs-popover-arrow-width) * .5) 0 calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::before{right:0;border-left-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-start>.popover-arrow::after{right:var(--bs-popover-border-width);border-left-color:var(--bs-popover-bg)}.popover-header{padding:var(--bs-popover-header-padding-y) var(--bs-popover-header-padding-x);margin-bottom:0;font-size:var(--bs-popover-header-font-size);color:var(--bs-popover-header-color);background-color:var(--bs-popover-header-bg);border-bottom:var(--bs-popover-border-width) solid var(--bs-popover-border-color);border-top-left-radius:var(--bs-popover-inner-border-radius);border-top-right-radius:var(--bs-popover-inner-border-radius)}.popover-header:empty{display:none}.popover-body{padding:var(--bs-popover-body-padding-y) var(--bs-popover-body-padding-x);color:var(--bs-popover-body-color)}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-end,.carousel-item-next:not(.carousel-item-start){transform:translateX(100%)}.active.carousel-item-start,.carousel-item-prev:not(.carousel-item-end){transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item-next.carousel-item-start,.carousel-fade .carousel-item-prev.carousel-item-end,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:0 0;border:0;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:2rem;height:2rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}.carousel-control-prev-icon{background-image:url(${B})}.carousel-control-next-icon{background-image:url(${U})}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:2;display:flex;justify-content:center;padding:0;margin-right:15%;margin-bottom:1rem;margin-left:15%;list-style:none}.carousel-indicators [data-bs-target]{box-sizing:content-box;flex:0 1 auto;width:30px;height:3px;padding:0;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border:0;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators [data-bs-target]{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:1.25rem;left:15%;padding-top:1.25rem;padding-bottom:1.25rem;color:#fff;text-align:center}.carousel-dark .carousel-control-next-icon,.carousel-dark .carousel-control-prev-icon{filter:invert(1) grayscale(100)}.carousel-dark .carousel-indicators [data-bs-target]{background-color:#000}.carousel-dark .carousel-caption{color:#000}.spinner-border,.spinner-grow{display:inline-block;width:var(--bs-spinner-width);height:var(--bs-spinner-height);vertical-align:var(--bs-spinner-vertical-align);border-radius:50%;animation:var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name)}@keyframes spinner-border{to{transform:rotate(360deg)}}.spinner-border{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-border-width:0.25em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-border;border:var(--bs-spinner-border-width) solid currentcolor;border-right-color:transparent}.spinner-border-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem;--bs-spinner-border-width:0.2em}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-grow;background-color:currentcolor;opacity:0}.spinner-grow-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{--bs-spinner-animation-speed:1.5s}}.offcanvas,.offcanvas-lg,.offcanvas-md,.offcanvas-sm,.offcanvas-xl,.offcanvas-xxl{--bs-offcanvas-zindex:1045;--bs-offcanvas-width:400px;--bs-offcanvas-height:30vh;--bs-offcanvas-padding-x:1rem;--bs-offcanvas-padding-y:1rem;--bs-offcanvas-color: ;--bs-offcanvas-bg:#fff;--bs-offcanvas-border-width:1px;--bs-offcanvas-border-color:var(--bs-border-color-translucent);--bs-offcanvas-box-shadow:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075)}@media (max-width:575.98px){.offcanvas-sm{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:575.98px) and (prefers-reduced-motion:reduce){.offcanvas-sm{transition:none}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:575.98px){.offcanvas-sm.show:not(.hiding),.offcanvas-sm.showing{transform:none}}@media (max-width:575.98px){.offcanvas-sm.hiding,.offcanvas-sm.show,.offcanvas-sm.showing{visibility:visible}}@media (min-width:576px){.offcanvas-sm{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-sm .offcanvas-header{display:none}.offcanvas-sm .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:767.98px){.offcanvas-md{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:767.98px) and (prefers-reduced-motion:reduce){.offcanvas-md{transition:none}}@media (max-width:767.98px){.offcanvas-md.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:767.98px){.offcanvas-md.show:not(.hiding),.offcanvas-md.showing{transform:none}}@media (max-width:767.98px){.offcanvas-md.hiding,.offcanvas-md.show,.offcanvas-md.showing{visibility:visible}}@media (min-width:768px){.offcanvas-md{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-md .offcanvas-header{display:none}.offcanvas-md .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:991.98px){.offcanvas-lg{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:991.98px) and (prefers-reduced-motion:reduce){.offcanvas-lg{transition:none}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:991.98px){.offcanvas-lg.show:not(.hiding),.offcanvas-lg.showing{transform:none}}@media (max-width:991.98px){.offcanvas-lg.hiding,.offcanvas-lg.show,.offcanvas-lg.showing{visibility:visible}}@media (min-width:992px){.offcanvas-lg{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-lg .offcanvas-header{display:none}.offcanvas-lg .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:1199.98px){.offcanvas-xl{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:1199.98px) and (prefers-reduced-motion:reduce){.offcanvas-xl{transition:none}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:1199.98px){.offcanvas-xl.show:not(.hiding),.offcanvas-xl.showing{transform:none}}@media (max-width:1199.98px){.offcanvas-xl.hiding,.offcanvas-xl.show,.offcanvas-xl.showing{visibility:visible}}@media (min-width:1200px){.offcanvas-xl{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-xl .offcanvas-header{display:none}.offcanvas-xl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:1399.98px){.offcanvas-xxl{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:1399.98px) and (prefers-reduced-motion:reduce){.offcanvas-xxl{transition:none}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:1399.98px){.offcanvas-xxl.show:not(.hiding),.offcanvas-xxl.showing{transform:none}}@media (max-width:1399.98px){.offcanvas-xxl.hiding,.offcanvas-xxl.show,.offcanvas-xxl.showing{visibility:visible}}@media (min-width:1400px){.offcanvas-xxl{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-xxl .offcanvas-header{display:none}.offcanvas-xxl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}.offcanvas{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}@media (prefers-reduced-motion:reduce){.offcanvas{transition:none}}.offcanvas.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}.offcanvas.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}.offcanvas.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}.offcanvas.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}.offcanvas.show:not(.hiding),.offcanvas.showing{transform:none}.offcanvas.hiding,.offcanvas.show,.offcanvas.showing{visibility:visible}.offcanvas-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.offcanvas-backdrop.fade{opacity:0}.offcanvas-backdrop.show{opacity:.5}.offcanvas-header{display:flex;align-items:center;justify-content:space-between;padding:var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x)}.offcanvas-header .btn-close{padding:calc(var(--bs-offcanvas-padding-y) * .5) calc(var(--bs-offcanvas-padding-x) * .5);margin-top:calc(-.5 * var(--bs-offcanvas-padding-y));margin-right:calc(-.5 * var(--bs-offcanvas-padding-x));margin-bottom:calc(-.5 * var(--bs-offcanvas-padding-y))}.offcanvas-title{margin-bottom:0;line-height:1.5}.offcanvas-body{flex-grow:1;padding:var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x);overflow-y:auto}.placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentcolor;opacity:.5}.placeholder.btn::before{display:inline-block;content:""}.placeholder-xs{min-height:.6em}.placeholder-sm{min-height:.8em}.placeholder-lg{min-height:1.2em}.placeholder-glow .placeholder{animation:placeholder-glow 2s ease-in-out infinite}@keyframes placeholder-glow{50%{opacity:.2}}.placeholder-wave{-webkit-mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);-webkit-mask-size:200% 100%;mask-size:200% 100%;animation:placeholder-wave 2s linear infinite}@keyframes placeholder-wave{100%{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}.clearfix::after{display:block;clear:both;content:""}.text-bg-primary{color:#fff!important;background-color:RGBA(13,110,253,var(--bs-bg-opacity,1))!important}.text-bg-secondary{color:#fff!important;background-color:RGBA(108,117,125,var(--bs-bg-opacity,1))!important}.text-bg-success{color:#fff!important;background-color:RGBA(25,135,84,var(--bs-bg-opacity,1))!important}.text-bg-info{color:#000!important;background-color:RGBA(13,202,240,var(--bs-bg-opacity,1))!important}.text-bg-warning{color:#000!important;background-color:RGBA(255,193,7,var(--bs-bg-opacity,1))!important}.text-bg-danger{color:#fff!important;background-color:RGBA(220,53,69,var(--bs-bg-opacity,1))!important}.text-bg-light{color:#000!important;background-color:RGBA(248,249,250,var(--bs-bg-opacity,1))!important}.text-bg-dark{color:#fff!important;background-color:RGBA(33,37,41,var(--bs-bg-opacity,1))!important}.link-primary{color:#0d6efd!important}.link-primary:focus,.link-primary:hover{color:#0a58ca!important}.link-secondary{color:#6c757d!important}.link-secondary:focus,.link-secondary:hover{color:#565e64!important}.link-success{color:#198754!important}.link-success:focus,.link-success:hover{color:#146c43!important}.link-info{color:#0dcaf0!important}.link-info:focus,.link-info:hover{color:#3dd5f3!important}.link-warning{color:#ffc107!important}.link-warning:focus,.link-warning:hover{color:#ffcd39!important}.link-danger{color:#dc3545!important}.link-danger:focus,.link-danger:hover{color:#b02a37!important}.link-light{color:#f8f9fa!important}.link-light:focus,.link-light:hover{color:#f9fafb!important}.link-dark{color:#212529!important}.link-dark:focus,.link-dark:hover{color:#1a1e21!important}.ratio{position:relative;width:100%}.ratio::before{display:block;padding-top:var(--bs-aspect-ratio);content:""}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-1x1{--bs-aspect-ratio:100%}.ratio-4x3{--bs-aspect-ratio:75%}.ratio-16x9{--bs-aspect-ratio:56.25%}.ratio-21x9{--bs-aspect-ratio:42.8571428571%}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}@media (min-width:576px){.sticky-sm-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-sm-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:768px){.sticky-md-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-md-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:992px){.sticky-lg-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-lg-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:1200px){.sticky-xl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-xl-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:1400px){.sticky-xxl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-xxl-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}.hstack{display:flex;flex-direction:row;align-items:center;align-self:stretch}.vstack{display:flex;flex:1 1 auto;flex-direction:column;align-self:stretch}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:""}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vr{display:inline-block;align-self:stretch;width:1px;min-height:1em;background-color:currentcolor;opacity:.25}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.float-start{float:left!important}.float-end{float:right!important}.float-none{float:none!important}.opacity-0{opacity:0!important}.opacity-25{opacity:.25!important}.opacity-50{opacity:.5!important}.opacity-75{opacity:.75!important}.opacity-100{opacity:1!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-visible{overflow:visible!important}.overflow-scroll{overflow:scroll!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.top-0{top:0!important}.top-50{top:50%!important}.top-100{top:100%!important}.bottom-0{bottom:0!important}.bottom-50{bottom:50%!important}.bottom-100{bottom:100%!important}.start-0{left:0!important}.start-50{left:50%!important}.start-100{left:100%!important}.end-0{right:0!important}.end-50{right:50%!important}.end-100{right:100%!important}.translate-middle{transform:translate(-50%,-50%)!important}.translate-middle-x{transform:translateX(-50%)!important}.translate-middle-y{transform:translateY(-50%)!important}.border{border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-0{border:0!important}.border-top{border-top:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-top-0{border-top:0!important}.border-end{border-right:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-end-0{border-right:0!important}.border-bottom{border-bottom:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-bottom-0{border-bottom:0!important}.border-start{border-left:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-start-0{border-left:0!important}.border-primary{--bs-border-opacity:1;border-color:rgba(var(--bs-primary-rgb),var(--bs-border-opacity))!important}.border-secondary{--bs-border-opacity:1;border-color:rgba(var(--bs-secondary-rgb),var(--bs-border-opacity))!important}.border-success{--bs-border-opacity:1;border-color:rgba(var(--bs-success-rgb),var(--bs-border-opacity))!important}.border-info{--bs-border-opacity:1;border-color:rgba(var(--bs-info-rgb),var(--bs-border-opacity))!important}.border-warning{--bs-border-opacity:1;border-color:rgba(var(--bs-warning-rgb),var(--bs-border-opacity))!important}.border-danger{--bs-border-opacity:1;border-color:rgba(var(--bs-danger-rgb),var(--bs-border-opacity))!important}.border-light{--bs-border-opacity:1;border-color:rgba(var(--bs-light-rgb),var(--bs-border-opacity))!important}.border-dark{--bs-border-opacity:1;border-color:rgba(var(--bs-dark-rgb),var(--bs-border-opacity))!important}.border-white{--bs-border-opacity:1;border-color:rgba(var(--bs-white-rgb),var(--bs-border-opacity))!important}.border-1{--bs-border-width:1px}.border-2{--bs-border-width:2px}.border-3{--bs-border-width:3px}.border-4{--bs-border-width:4px}.border-5{--bs-border-width:5px}.border-opacity-10{--bs-border-opacity:0.1}.border-opacity-25{--bs-border-opacity:0.25}.border-opacity-50{--bs-border-opacity:0.5}.border-opacity-75{--bs-border-opacity:0.75}.border-opacity-100{--bs-border-opacity:1}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.mw-100{max-width:100%!important}.vw-100{width:100vw!important}.min-vw-100{min-width:100vw!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mh-100{max-height:100%!important}.vh-100{height:100vh!important}.min-vh-100{min-height:100vh!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-right:0!important;margin-left:0!important}.mx-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-auto{margin-left:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-right:0!important;padding-left:0!important}.px-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-right:0!important}.pe-1{padding-right:.25rem!important}.pe-2{padding-right:.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-left:0!important}.ps-1{padding-left:.25rem!important}.ps-2{padding-left:.5rem!important}.ps-3{padding-left:1rem!important}.ps-4{padding-left:1.5rem!important}.ps-5{padding-left:3rem!important}.gap-0{gap:0!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:1rem!important}.gap-4{gap:1.5rem!important}.gap-5{gap:3rem!important}.font-monospace{font-family:var(--bs-font-monospace)!important}.fs-1{font-size:calc(1.375rem + 1.5vw)!important}.fs-2{font-size:calc(1.325rem + .9vw)!important}.fs-3{font-size:calc(1.3rem + .6vw)!important}.fs-4{font-size:calc(1.275rem + .3vw)!important}.fs-5{font-size:1.25rem!important}.fs-6{font-size:1rem!important}.fst-italic{font-style:italic!important}.fst-normal{font-style:normal!important}.fw-light{font-weight:300!important}.fw-lighter{font-weight:lighter!important}.fw-normal{font-weight:400!important}.fw-bold{font-weight:700!important}.fw-semibold{font-weight:600!important}.fw-bolder{font-weight:bolder!important}.lh-1{line-height:1!important}.lh-sm{line-height:1.25!important}.lh-base{line-height:1.5!important}.lh-lg{line-height:2!important}.text-start{text-align:left!important}.text-end{text-align:right!important}.text-center{text-align:center!important}.text-decoration-none{text-decoration:none!important}.text-decoration-underline{text-decoration:underline!important}.text-decoration-line-through{text-decoration:line-through!important}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-break{word-wrap:break-word!important;word-break:break-word!important}.text-primary{--bs-text-opacity:1;color:rgba(var(--bs-primary-rgb),var(--bs-text-opacity))!important}.text-secondary{--bs-text-opacity:1;color:rgba(var(--bs-secondary-rgb),var(--bs-text-opacity))!important}.text-success{--bs-text-opacity:1;color:rgba(var(--bs-success-rgb),var(--bs-text-opacity))!important}.text-info{--bs-text-opacity:1;color:rgba(var(--bs-info-rgb),var(--bs-text-opacity))!important}.text-warning{--bs-text-opacity:1;color:rgba(var(--bs-warning-rgb),var(--bs-text-opacity))!important}.text-danger{--bs-text-opacity:1;color:rgba(var(--bs-danger-rgb),var(--bs-text-opacity))!important}.text-light{--bs-text-opacity:1;color:rgba(var(--bs-light-rgb),var(--bs-text-opacity))!important}.text-dark{--bs-text-opacity:1;color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}.text-black{--bs-text-opacity:1;color:rgba(var(--bs-black-rgb),var(--bs-text-opacity))!important}.text-white{--bs-text-opacity:1;color:rgba(var(--bs-white-rgb),var(--bs-text-opacity))!important}.text-body{--bs-text-opacity:1;color:rgba(var(--bs-body-color-rgb),var(--bs-text-opacity))!important}.text-muted{--bs-text-opacity:1;color:#6c757d!important}.text-black-50{--bs-text-opacity:1;color:rgba(0,0,0,.5)!important}.text-white-50{--bs-text-opacity:1;color:rgba(255,255,255,.5)!important}.text-reset{--bs-text-opacity:1;color:inherit!important}.text-opacity-25{--bs-text-opacity:0.25}.text-opacity-50{--bs-text-opacity:0.5}.text-opacity-75{--bs-text-opacity:0.75}.text-opacity-100{--bs-text-opacity:1}.bg-primary{--bs-bg-opacity:1;background-color:rgba(var(--bs-primary-rgb),var(--bs-bg-opacity))!important}.bg-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-secondary-rgb),var(--bs-bg-opacity))!important}.bg-success{--bs-bg-opacity:1;background-color:rgba(var(--bs-success-rgb),var(--bs-bg-opacity))!important}.bg-info{--bs-bg-opacity:1;background-color:rgba(var(--bs-info-rgb),var(--bs-bg-opacity))!important}.bg-warning{--bs-bg-opacity:1;background-color:rgba(var(--bs-warning-rgb),var(--bs-bg-opacity))!important}.bg-danger{--bs-bg-opacity:1;background-color:rgba(var(--bs-danger-rgb),var(--bs-bg-opacity))!important}.bg-light{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-rgb),var(--bs-bg-opacity))!important}.bg-dark{--bs-bg-opacity:1;background-color:rgba(var(--bs-dark-rgb),var(--bs-bg-opacity))!important}.bg-black{--bs-bg-opacity:1;background-color:rgba(var(--bs-black-rgb),var(--bs-bg-opacity))!important}.bg-white{--bs-bg-opacity:1;background-color:rgba(var(--bs-white-rgb),var(--bs-bg-opacity))!important}.bg-body{--bs-bg-opacity:1;background-color:rgba(var(--bs-body-bg-rgb),var(--bs-bg-opacity))!important}.bg-transparent{--bs-bg-opacity:1;background-color:transparent!important}.bg-opacity-10{--bs-bg-opacity:0.1}.bg-opacity-25{--bs-bg-opacity:0.25}.bg-opacity-50{--bs-bg-opacity:0.5}.bg-opacity-75{--bs-bg-opacity:0.75}.bg-opacity-100{--bs-bg-opacity:1}.bg-gradient{background-image:var(--bs-gradient)!important}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.pe-none{pointer-events:none!important}.pe-auto{pointer-events:auto!important}.rounded{border-radius:var(--bs-border-radius)!important}.rounded-0{border-radius:0!important}.rounded-1{border-radius:var(--bs-border-radius-sm)!important}.rounded-2{border-radius:var(--bs-border-radius)!important}.rounded-3{border-radius:var(--bs-border-radius-lg)!important}.rounded-4{border-radius:var(--bs-border-radius-xl)!important}.rounded-5{border-radius:var(--bs-border-radius-2xl)!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:var(--bs-border-radius-pill)!important}.rounded-top{border-top-left-radius:var(--bs-border-radius)!important;border-top-right-radius:var(--bs-border-radius)!important}.rounded-end{border-top-right-radius:var(--bs-border-radius)!important;border-bottom-right-radius:var(--bs-border-radius)!important}.rounded-bottom{border-bottom-right-radius:var(--bs-border-radius)!important;border-bottom-left-radius:var(--bs-border-radius)!important}.rounded-start{border-bottom-left-radius:var(--bs-border-radius)!important;border-top-left-radius:var(--bs-border-radius)!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media (min-width:576px){.float-sm-start{float:left!important}.float-sm-end{float:right!important}.float-sm-none{float:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-right:0!important;margin-left:0!important}.mx-sm-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-sm-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-sm-3{margin-right:1rem!important;margin-left:1rem!important}.mx-sm-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-sm-5{margin-right:3rem!important;margin-left:3rem!important}.mx-sm-auto{margin-right:auto!important;margin-left:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-right:0!important}.me-sm-1{margin-right:.25rem!important}.me-sm-2{margin-right:.5rem!important}.me-sm-3{margin-right:1rem!important}.me-sm-4{margin-right:1.5rem!important}.me-sm-5{margin-right:3rem!important}.me-sm-auto{margin-right:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-left:0!important}.ms-sm-1{margin-left:.25rem!important}.ms-sm-2{margin-left:.5rem!important}.ms-sm-3{margin-left:1rem!important}.ms-sm-4{margin-left:1.5rem!important}.ms-sm-5{margin-left:3rem!important}.ms-sm-auto{margin-left:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-right:0!important;padding-left:0!important}.px-sm-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-sm-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-sm-3{padding-right:1rem!important;padding-left:1rem!important}.px-sm-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-sm-5{padding-right:3rem!important;padding-left:3rem!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-right:0!important}.pe-sm-1{padding-right:.25rem!important}.pe-sm-2{padding-right:.5rem!important}.pe-sm-3{padding-right:1rem!important}.pe-sm-4{padding-right:1.5rem!important}.pe-sm-5{padding-right:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-left:0!important}.ps-sm-1{padding-left:.25rem!important}.ps-sm-2{padding-left:.5rem!important}.ps-sm-3{padding-left:1rem!important}.ps-sm-4{padding-left:1.5rem!important}.ps-sm-5{padding-left:3rem!important}.gap-sm-0{gap:0!important}.gap-sm-1{gap:.25rem!important}.gap-sm-2{gap:.5rem!important}.gap-sm-3{gap:1rem!important}.gap-sm-4{gap:1.5rem!important}.gap-sm-5{gap:3rem!important}.text-sm-start{text-align:left!important}.text-sm-end{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.float-md-start{float:left!important}.float-md-end{float:right!important}.float-md-none{float:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-right:0!important;margin-left:0!important}.mx-md-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-md-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-md-3{margin-right:1rem!important;margin-left:1rem!important}.mx-md-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-md-5{margin-right:3rem!important;margin-left:3rem!important}.mx-md-auto{margin-right:auto!important;margin-left:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-right:0!important}.me-md-1{margin-right:.25rem!important}.me-md-2{margin-right:.5rem!important}.me-md-3{margin-right:1rem!important}.me-md-4{margin-right:1.5rem!important}.me-md-5{margin-right:3rem!important}.me-md-auto{margin-right:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-left:0!important}.ms-md-1{margin-left:.25rem!important}.ms-md-2{margin-left:.5rem!important}.ms-md-3{margin-left:1rem!important}.ms-md-4{margin-left:1.5rem!important}.ms-md-5{margin-left:3rem!important}.ms-md-auto{margin-left:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-right:0!important;padding-left:0!important}.px-md-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-md-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-md-3{padding-right:1rem!important;padding-left:1rem!important}.px-md-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-md-5{padding-right:3rem!important;padding-left:3rem!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-right:0!important}.pe-md-1{padding-right:.25rem!important}.pe-md-2{padding-right:.5rem!important}.pe-md-3{padding-right:1rem!important}.pe-md-4{padding-right:1.5rem!important}.pe-md-5{padding-right:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-left:0!important}.ps-md-1{padding-left:.25rem!important}.ps-md-2{padding-left:.5rem!important}.ps-md-3{padding-left:1rem!important}.ps-md-4{padding-left:1.5rem!important}.ps-md-5{padding-left:3rem!important}.gap-md-0{gap:0!important}.gap-md-1{gap:.25rem!important}.gap-md-2{gap:.5rem!important}.gap-md-3{gap:1rem!important}.gap-md-4{gap:1.5rem!important}.gap-md-5{gap:3rem!important}.text-md-start{text-align:left!important}.text-md-end{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.float-lg-start{float:left!important}.float-lg-end{float:right!important}.float-lg-none{float:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-right:0!important;margin-left:0!important}.mx-lg-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-lg-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-lg-3{margin-right:1rem!important;margin-left:1rem!important}.mx-lg-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-lg-5{margin-right:3rem!important;margin-left:3rem!important}.mx-lg-auto{margin-right:auto!important;margin-left:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-right:0!important}.me-lg-1{margin-right:.25rem!important}.me-lg-2{margin-right:.5rem!important}.me-lg-3{margin-right:1rem!important}.me-lg-4{margin-right:1.5rem!important}.me-lg-5{margin-right:3rem!important}.me-lg-auto{margin-right:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-left:0!important}.ms-lg-1{margin-left:.25rem!important}.ms-lg-2{margin-left:.5rem!important}.ms-lg-3{margin-left:1rem!important}.ms-lg-4{margin-left:1.5rem!important}.ms-lg-5{margin-left:3rem!important}.ms-lg-auto{margin-left:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-right:0!important;padding-left:0!important}.px-lg-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-lg-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-lg-3{padding-right:1rem!important;padding-left:1rem!important}.px-lg-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-lg-5{padding-right:3rem!important;padding-left:3rem!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-right:0!important}.pe-lg-1{padding-right:.25rem!important}.pe-lg-2{padding-right:.5rem!important}.pe-lg-3{padding-right:1rem!important}.pe-lg-4{padding-right:1.5rem!important}.pe-lg-5{padding-right:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-left:0!important}.ps-lg-1{padding-left:.25rem!important}.ps-lg-2{padding-left:.5rem!important}.ps-lg-3{padding-left:1rem!important}.ps-lg-4{padding-left:1.5rem!important}.ps-lg-5{padding-left:3rem!important}.gap-lg-0{gap:0!important}.gap-lg-1{gap:.25rem!important}.gap-lg-2{gap:.5rem!important}.gap-lg-3{gap:1rem!important}.gap-lg-4{gap:1.5rem!important}.gap-lg-5{gap:3rem!important}.text-lg-start{text-align:left!important}.text-lg-end{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.float-xl-start{float:left!important}.float-xl-end{float:right!important}.float-xl-none{float:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-right:0!important;margin-left:0!important}.mx-xl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xl-auto{margin-right:auto!important;margin-left:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-right:0!important}.me-xl-1{margin-right:.25rem!important}.me-xl-2{margin-right:.5rem!important}.me-xl-3{margin-right:1rem!important}.me-xl-4{margin-right:1.5rem!important}.me-xl-5{margin-right:3rem!important}.me-xl-auto{margin-right:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-left:0!important}.ms-xl-1{margin-left:.25rem!important}.ms-xl-2{margin-left:.5rem!important}.ms-xl-3{margin-left:1rem!important}.ms-xl-4{margin-left:1.5rem!important}.ms-xl-5{margin-left:3rem!important}.ms-xl-auto{margin-left:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-right:0!important;padding-left:0!important}.px-xl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-right:0!important}.pe-xl-1{padding-right:.25rem!important}.pe-xl-2{padding-right:.5rem!important}.pe-xl-3{padding-right:1rem!important}.pe-xl-4{padding-right:1.5rem!important}.pe-xl-5{padding-right:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-left:0!important}.ps-xl-1{padding-left:.25rem!important}.ps-xl-2{padding-left:.5rem!important}.ps-xl-3{padding-left:1rem!important}.ps-xl-4{padding-left:1.5rem!important}.ps-xl-5{padding-left:3rem!important}.gap-xl-0{gap:0!important}.gap-xl-1{gap:.25rem!important}.gap-xl-2{gap:.5rem!important}.gap-xl-3{gap:1rem!important}.gap-xl-4{gap:1.5rem!important}.gap-xl-5{gap:3rem!important}.text-xl-start{text-align:left!important}.text-xl-end{text-align:right!important}.text-xl-center{text-align:center!important}}@media (min-width:1400px){.float-xxl-start{float:left!important}.float-xxl-end{float:right!important}.float-xxl-none{float:none!important}.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-right:0!important;margin-left:0!important}.mx-xxl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xxl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xxl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xxl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xxl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xxl-auto{margin-right:auto!important;margin-left:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xxl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-right:0!important}.me-xxl-1{margin-right:.25rem!important}.me-xxl-2{margin-right:.5rem!important}.me-xxl-3{margin-right:1rem!important}.me-xxl-4{margin-right:1.5rem!important}.me-xxl-5{margin-right:3rem!important}.me-xxl-auto{margin-right:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-left:0!important}.ms-xxl-1{margin-left:.25rem!important}.ms-xxl-2{margin-left:.5rem!important}.ms-xxl-3{margin-left:1rem!important}.ms-xxl-4{margin-left:1.5rem!important}.ms-xxl-5{margin-left:3rem!important}.ms-xxl-auto{margin-left:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-right:0!important;padding-left:0!important}.px-xxl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xxl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xxl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xxl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xxl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xxl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pe-xxl-0{padding-right:0!important}.pe-xxl-1{padding-right:.25rem!important}.pe-xxl-2{padding-right:.5rem!important}.pe-xxl-3{padding-right:1rem!important}.pe-xxl-4{padding-right:1.5rem!important}.pe-xxl-5{padding-right:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-left:0!important}.ps-xxl-1{padding-left:.25rem!important}.ps-xxl-2{padding-left:.5rem!important}.ps-xxl-3{padding-left:1rem!important}.ps-xxl-4{padding-left:1.5rem!important}.ps-xxl-5{padding-left:3rem!important}.gap-xxl-0{gap:0!important}.gap-xxl-1{gap:.25rem!important}.gap-xxl-2{gap:.5rem!important}.gap-xxl-3{gap:1rem!important}.gap-xxl-4{gap:1.5rem!important}.gap-xxl-5{gap:3rem!important}.text-xxl-start{text-align:left!important}.text-xxl-end{text-align:right!important}.text-xxl-center{text-align:center!important}}@media (min-width:1200px){.fs-1{font-size:2.5rem!important}.fs-2{font-size:2rem!important}.fs-3{font-size:1.75rem!important}.fs-4{font-size:1.5rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}}`,""]);var G=new CSSStyleSheet;G.replaceSync(T.toString());const V=G},62621:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(78706),i=r.n(n),o=r(72859),a=r.n(o)()(i());a.push([t.id,".chsp-meta {\n z-index: 1;\n cursor: pointer;\n}\n\n.chsp-meta .chsp-info-icon {\n float: right;\n margin-top: 5px;\n margin-left: 3px;\n}\n\n.chsp-meta .chsp-info-icon svg {\n display: block;\n width: 14px;\n height: 14px;\n opacity: 0.6;\n}\n\n.chsp-authors-list {\n padding: 0;\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n justify-content: center;\n}\n\n.chsp-authors-list li {\n border: solid #dee2e6 1px;\n padding: 10px;\n list-style-type: none;\n white-space: nowrap;\n}\n\n.chsp-open-map-settings {\n position: absolute;\n top: 3px;\n left: 5px;\n z-index: 10;\n}\n\n.chsp-open-viewer-settings {\n position: absolute;\n top: 5px;\n right: 5px;\n}\n\n.chsp-extra-options-btn {\n margin: auto;\n display: block;\n}\n\n/* Tooltip text */\n.chsp-tooltip {\n visibility: hidden;\n background: #69738a;\n color: white;\n padding: 6px;\n font-size: 12px;\n line-height: 12px;\n white-space: nowrap;\n border-radius: 2px;\n text-align: center;\n display: inline-block;\n width: 9em;\n position: absolute;\n z-index: 100000;\n}\n\n.chsp-tooltip-right {\n top: 0px;\n right: -9.5em;\n}\n\n.chsp-tooltip-below {\n top: 35px;\n left: -3.5em;\n}\n\n.chsp-has-tooltip:hover .chsp-tooltip {\n visibility: visible;\n}\n\n.chsp-pin-marker {\n border-radius: 50%;\n border: solid 1px black;\n --size: 12px;\n width: var(--size);\n height: var(--size);\n z-index: 10;\n}\n\n.chsp-map-pin-marker {\n position: absolute;\n /* ensure the top/right/left/bottom positioning is relative to the center of the div */\n transform: translate(calc(-50% + var(--size)), -50%);\n}\n\n.chsp-pin-marker:hover {\n --size: 20px;\n cursor: pointer;\n}\n\n/* This class is added on top of .chsp-pin-marker for the active pinned structure/environment */\n.chsp-active-pin {\n border-width: 2px;\n --size: 20px;\n}\n\n.chsp-active-pin:hover {\n --size: 22px;\n cursor: default;\n}\n\n.chsp-viewer-button {\n position: absolute;\n padding: 1px;\n margin: 0;\n height: 28px;\n width: 28px;\n z-index: 10;\n}\n\n.chsp-viewer-action-button {\n background-color: white;\n border: none;\n}\n\n.chsp-viewer-action-button:hover {\n background: white;\n}\n\n.chsp-viewer-action-button svg {\n opacity: 0.4;\n transition: opacity 0.15s ease-in-out;\n}\n\n.chsp-viewer-action-button:hover svg {\n opacity: 0.6;\n}\n\n.chsp-structure-viewer-grid {\n display: grid;\n position: relative;\n width: 100%;\n height: 100%;\n grid-column-gap: 2px;\n grid-row-gap: 2px;\n}\n\n.chsp-structure-viewer-cell {\n width: 99%;\n height: 99%;\n left: 0.5%;\n top: 0.5%;\n position: relative;\n border: 1px solid lightgray;\n padding: 1px;\n}\n\n.chsp-structure-viewer-cell-active {\n border-color: gray;\n}\n\n.chsp-map-options {\n display: grid;\n grid-template-columns: 1fr 0.5fr;\n align-items: center;\n justify-content: center;\n align-content: start;\n column-gap: 1em;\n}\n\n.chsp-map-options label {\n min-width: 6em;\n}\n\n.chsp-map-options > :nth-child(n + 3):not(.chsp-map-extra-options) {\n margin-top: 1.3rem;\n}\n\n.chsp-map-extra-options {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: auto 1fr 1fr;\n column-gap: 1em;\n}\n\n.chsp-map-extra-options > * {\n margin: 0.5em 0;\n}\n\n.chsp-map-extra-options label {\n min-width: auto;\n}\n\n.chsp-map-extra-options {\n grid-column: 1 / span 2;\n}\n\n.chsp-map-options .form-check-label {\n width: auto;\n}\n\n.chsp-modal-header {\n cursor: grab;\n}\n\n.chsp-play-button {\n border: 0;\n background: transparent;\n box-sizing: border-box;\n height: 1.2em;\n width: 1.2em;\n margin-left: 0.5ex;\n\n border-color: transparent transparent transparent #202020;\n transition: 100ms all ease;\n cursor: pointer;\n\n border-style: solid;\n border-width: 0.7em 0 0.7em 1em;\n}\n\n.chsp-play-button.chsp-playing {\n border-style: double;\n border-width: 0px 0 0px 1.2em;\n}\n\n.chsp-play-button:hover {\n border-color: transparent transparent transparent #404040;\n}\n\n.chsp-properties-table {\n height: 100%;\n width: 80%;\n margin: auto;\n}\n\n.chsp-properties-table td,\n.chsp-properties-table th {\n width: 50%;\n border-top: none;\n}\n\n.chsp-settings-section-title {\n font-weight: bold;\n}\n\n/* Change Plotly modebar style to match the style of the structure grid buttons */\n\n.chsp-map .modebar-group {\n padding-left: 0 !important;\n}\n\n.chsp-map .modebar-btn {\n cursor: default !important;\n font-family: apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n 'Noto Color Emoji';\n}\n\n.chsp-map .modebar-btn::after {\n opacity: 0.9;\n}\n\n.chsp-map .icon:hover + .modebar-btn::after {\n visibility: visible;\n}\n\n.chsp-map .modebar-btn::before {\n content: none !important;\n}\n\n.chsp-map .modebar-btn .icon {\n transition: opacity 0.15s ease-in-out;\n padding: 3px;\n opacity: 0.3;\n cursor: pointer;\n}\n\n.chsp-map .modebar-group svg.icon {\n width: 2em;\n height: 2em;\n border-radius: 0.2em;\n}\n\n.chsp-map .modebar-group svg.icon:active {\n color: #212529;\n background-color: #dae0e5;\n border-color: #d3d9df;\n box-shadow: 0 0 0 0.2rem rgb(216 217 219 / 50%);\n}\n\n.chsp-map .modebar-btn .icon path {\n transition:\n color 0.15s ease-in-out,\n background-color 0.15s ease-in-out,\n border-color 0.15s ease-in-out,\n box-shadow 0.15s ease-in-out;\n fill: black !important;\n}\n\n.chsp-map .modebar-btn .icon:hover {\n opacity: 0.6;\n}\n\n.chsp-map .modebar-btn.active .icon {\n opacity: 0.6;\n}\n\n.chsp-info-btns {\n display: flex;\n position: relative;\n margin-bottom: 0.5ex;\n margin-top: 0.5ex;\n justify-content: center;\n}\n\n.chsp-info-structure-btn {\n min-width: 8em;\n padding-left: 6px;\n padding-right: 4px;\n font-weight: bold;\n font-size: small;\n background-color: none;\n border-color: #66a5e8;\n border-width: 2px;\n float: left;\n}\n\n.chsp-info-structure-btn:hover {\n background-color: #5b94d0;\n}\n\n.chsp-info-atom-btn {\n margin-left: 1em;\n padding-left: 6px;\n padding-right: 4px;\n min-width: 8em;\n font-weight: bold;\n font-size: small;\n background-color: none;\n border-color: #4cb64c;\n border-width: 2px;\n}\n\n.chsp-info-atom-btn:hover {\n background-color: #44a344;\n}\n\n.chsp-info-btns-svg {\n float: left;\n padding-right: 6px;\n padding-top: 3px;\n}\n\n.chsp-info-btns-svg svg {\n display: block;\n opacity: 0.6;\n}\n\n.chsp-info-number {\n -moz-appearance: textfield;\n appearance: textfield;\n border: none;\n transition: background-color 0.15s;\n background-color: #ebedf0;\n margin-left: 2px;\n margin-right: 3px;\n font-family: inherit;\n width: 4em;\n}\n\n.chsp-info-atom-btn:hover .chsp-info-number {\n background-color: #69b569;\n}\n\n.chsp-info-structure-btn:hover .chsp-info-number {\n background-color: #7ba9d9;\n}\n\n.chsp-info-number::-webkit-outer-spin-button,\n.chsp-info-number::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.chsp-info-tables {\n position: relative;\n width: 100%;\n}\n\n.chsp-info-table {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 10;\n background-color: white;\n /* max-height is set in JavaScript */\n overflow: auto;\n}\n\n.chsp-info-table.collapsing {\n overflow: hidden;\n}\n\n.chsp-info-table table {\n margin: 0;\n}\n\n/* Change the atoms slider thumb color to green, to match structure highlight */\n.chsp-atom-slider::-webkit-slider-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-moz-range-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-ms-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-webkit-slider-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider::-moz-range-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider::-ms-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider:focus::-webkit-slider-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-atom-slider:focus::-moz-range-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-atom-slider:focus::-ms-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-settings-representation {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr;\n grid-row-gap: 1ex;\n}\n\n.chsp-settings-representation label {\n cursor: help;\n}\n\n.chsp-settings-supercell {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr 2fr;\n}\n\n.chsp-supercell-count {\n max-width: 3.5em;\n}\n\n.chsp-settings-camera {\n display: grid;\n gap: 1em;\n grid-template-columns: repeat(7, auto);\n justify-content: center;\n}\n\n.chsp-settings-environments {\n display: grid;\n align-items: center;\n column-gap: 1em;\n grid-template-columns: 1fr 1fr 1fr;\n}\n\n.chsp-settings-extra-options {\n display: grid;\n gap: 1em;\n grid-template-columns: 1fr 1fr 1fr;\n grid-column: 1 / span 3;\n}\n\n.chsp-settings-extra-options > :nth-child(-n + 3) {\n margin-top: 1em;\n}\n\n.chsp-settings-trajectory {\n display: grid;\n grid-template-columns: 12em 12em;\n justify-content: center;\n align-content: center;\n gap: 1em;\n margin-bottom: 1ex;\n}\n\n.chsp-cell-info {\n position: absolute;\n bottom: 5px;\n left: 5px;\n font-size: 0.8em;\n}\n\n.chsp-toggle-plot-btn {\n display: block;\n position: relative;\n margin-top: 3px;\n margin-bottom: 1px;\n}\n\n.chsp-atom-color-property {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: 1fr 1fr;\n column-gap: 1em;\n margin: 0.5em 0;\n}\n\n.chsp-atom-extra-options {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: auto 1fr 1fr;\n column-gap: 1em;\n}\n\n.chsp-atom-extra-options > * {\n margin: 0.5em 0;\n}\n\n.chsp-atom-extra-options label {\n min-width: auto;\n}\n\n.chsp-atom-extra-options {\n grid-column: 1 / span 2;\n}\n\n.chsp-target-toggle {\n padding-left: 5px;\n padding-right: 5px;\n display: flex;\n justify-content: flex-end;\n gap: 5px;\n}\n\n.chsp-target-spinner {\n width: 25px;\n height: 25px;\n margin-left: 5px;\n}\n",""]);var s=new CSSStyleSheet;s.replaceSync(a.toString());const l=s},37821:function(module,__unused_webpack_exports,__webpack_require__){var process=__webpack_require__(39807),factory;factory=()=>(()=>{var __webpack_modules__={"./node_modules/iobuffer/lib-esm/IOBuffer.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{IOBuffer:()=>a});var n=r("./node_modules/iobuffer/lib-esm/text.browser.js");const i=(()=>{const t=new Uint8Array(4);return!((new Uint32Array(t.buffer)[0]=1)&t[0])})(),o={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class a{constructor(t=8192,e={}){let r=!1;"number"==typeof t?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);const n=e.offset?e.offset>>>0:0,i=t.byteLength-n;let o=n;(ArrayBuffer.isView(t)||t instanceof a)&&(t.byteLength!==t.buffer.byteLength&&(o=t.byteOffset+n),t=t.buffer),this.lastWrittenByte=r?i:0,this.buffer=t,this.length=i,this.byteLength=i,this.byteOffset=o,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,o,i),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}back(t=1){return this.offset-=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const t=this._marks.pop();if(void 0===t)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const e=2*(this.offset+t),r=new Uint8Array(e);r.set(new Uint8Array(this.buffer)),this.buffer=r.buffer,this.length=this.byteLength=e,this._data=new DataView(this.buffer)}return this}readBoolean(){return 0!==this.readUint8()}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,e){const r=o[e].BYTES_PER_ELEMENT*t,n=this.byteOffset+this.offset,a=this.buffer.slice(n,n+r);if(this.littleEndian===i&&"uint8"!==e&&"int8"!==e){const t=new Uint8Array(this.buffer.slice(n,n+r));t.reverse();const i=new o[e](t.buffer);return this.offset+=r,i.reverse(),i}const s=new o[e](a);return this.offset+=r,s}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let e="";for(let r=0;rthis.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}},"./node_modules/iobuffer/lib-esm/text-encoding-polyfill.js":function(){"use strict";!function(t){if(t.TextEncoder&&t.TextDecoder)return!1;function e(t="utf-8"){if("utf-8"!==t)throw new RangeError(`Failed to construct 'TextEncoder': The encoding label provided ('${t}') is invalid.`)}function r(t="utf-8",e={fatal:!1}){if("utf-8"!==t)throw new RangeError(`Failed to construct 'TextDecoder': The encoding label provided ('${t}') is invalid.`);if(e.fatal)throw new Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}Object.defineProperty(e.prototype,"encoding",{value:"utf-8"}),e.prototype.encode=function(t,e={stream:!1}){if(e.stream)throw new Error("Failed to encode: the 'stream' option is unsupported.");let r=0;const n=t.length;let i=0,o=Math.max(32,n+(n>>1)+7),a=new Uint8Array(o>>3<<3);for(;r=55296&&e<=56319){if(r=55296&&e<=56319)continue}if(i+4>a.length){o+=8,o*=1+r/t.length*2,o=o>>3<<3;const e=new Uint8Array(o);e.set(a),a=e}if(4294967168&e){if(4294965248&e)if(4294901760&e){if(4292870144&e)continue;a[i++]=e>>18&7|240,a[i++]=e>>12&63|128,a[i++]=e>>6&63|128}else a[i++]=e>>12&15|224,a[i++]=e>>6&63|128;else a[i++]=e>>6&31|192;a[i++]=63&e|128}else a[i++]=e}return a.slice(0,i)},Object.defineProperty(r.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(r.prototype,"fatal",{value:!1}),Object.defineProperty(r.prototype,"ignoreBOM",{value:!1}),r.prototype.decode=function(t,e={stream:!1}){if(e.stream)throw new Error("Failed to decode: the 'stream' option is unsupported.");const r=new Uint8Array(t);let n=0;const i=r.length,o=[];for(;n65535&&(e-=65536,o.push(e>>>10&1023|55296),e=56320|1023&e),o.push(e)}}else o.push(t)}return String.fromCharCode.apply(null,o)},t.TextEncoder=e,t.TextDecoder=r}("undefined"!=typeof window?window:"undefined"!=typeof self?self:this)},"./node_modules/iobuffer/lib-esm/text.browser.js":(t,e,r)=>{"use strict";function n(t,e="utf8"){return new TextDecoder(e).decode(t)}r.r(e),r.d(e,{decode:()=>n,encode:()=>o}),r("./node_modules/iobuffer/lib-esm/text-encoding-polyfill.js");const i=new TextEncoder;function o(t){return i.encode(t)}},"./node_modules/netcdfjs/lib-esm/data.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{nonRecord:()=>i,record:()=>o});var n=r("./node_modules/netcdfjs/lib-esm/types.js");function i(t,e){const r=(0,n.str2num)(e.type),i=e.size/(0,n.num2bytes)(r),o=new Array(i);for(let e=0;e{"use strict";r.r(e),r.d(e,{header:()=>d});var n=r("./node_modules/netcdfjs/lib-esm/types.js"),i=r("./node_modules/netcdfjs/lib-esm/utils.js");const o=0,a=10,s=11,l=12,c=0;function d(t,e){const r={version:e},l={length:t.readUint32()},d=function(t){const e={};let r,n;const s=t.readUint32();let l;if(s===o)return(0,i.notNetcdf)(t.readUint32()!==o,"wrong empty tag for list of dimensions"),[];{(0,i.notNetcdf)(s!==a,"wrong tag for list of dimensions");const e=t.readUint32();l=new Array(e);for(let o=0;o6,`non valid type ${p}`);const f=t.readUint32();let m=t.readUint32();2===r&&((0,i.notNetcdf)(m>0,"offsets larger than 4GB not supported"),m=t.readUint32());let g=!1;void 0!==e&&d[0]===e&&(c+=f,g=!0),l[a]={name:o,dimensions:d,attributes:h,type:(0,n.num2str)(p),size:f,offset:m,record:g}}}return{variables:l,recordStep:c}}(t,l?.id,e);return Array.isArray(h)||(r.variables=h.variables,l.recordStep=h.recordStep),r.recordDimension=l,r}function u(t){const e=t.readUint32();let r;if(e===o)return(0,i.notNetcdf)(t.readUint32()!==o,"wrong empty tag for list of attributes"),[];{(0,i.notNetcdf)(e!==l,"wrong tag for list of attributes");const o=t.readUint32();r=new Array(o);for(let e=0;e6,`non valid type ${a}`);const s=t.readUint32(),l=(0,n.readType)(t,a,s);(0,i.padding)(t),r[e]={name:o,type:(0,n.num2str)(a),value:l}}}return r}},"./node_modules/netcdfjs/lib-esm/index.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{NetCDFReader:()=>n.NetCDFReader});var n=r("./node_modules/netcdfjs/lib-esm/parser.js")},"./node_modules/netcdfjs/lib-esm/parser.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{NetCDFReader:()=>l});var n=r("./node_modules/iobuffer/lib-esm/IOBuffer.js"),i=r("./node_modules/netcdfjs/lib-esm/data.js"),o=r("./node_modules/netcdfjs/lib-esm/header.js"),a=r("./node_modules/netcdfjs/lib-esm/toString.js"),s=r("./node_modules/netcdfjs/lib-esm/utils.js");class l{constructor(t){this.toString=a.toString;const e=new n.IOBuffer(t);e.setBigEndian(),(0,s.notNetcdf)("CDF"!==e.readChars(3),"should start with CDF");const r=e.readByte();(0,s.notNetcdf)(r>2,"unknown version"),this.header=(0,o.header)(e,r),this.buffer=e}get version(){return 1===this.header.version?"classic format":"64-bit offset format"}get recordDimension(){return this.header.recordDimension}get dimensions(){return this.header.dimensions}get globalAttributes(){return this.header.globalAttributes}getAttribute(t){const e=this.globalAttributes.find((e=>e.name===t));return e?e.value:null}getDataVariableAsString(t){const e=this.getDataVariable(t);return e?e.join(""):null}get variables(){return this.header.variables}getDataVariable(t){let e;if(e="string"==typeof t?this.header.variables.find((e=>e.name===t)):t,void 0===e)throw new Error("Not a valid NetCDF v3.x file: variable not found");return this.buffer.seek(e.offset),e.record?(0,i.record)(this.buffer,e,this.header.recordDimension):(0,i.nonRecord)(this.buffer,e)}dataVariableExists(t){return void 0!==this.header.variables.find((e=>e.name===t))}attributeExists(t){return void 0!==this.globalAttributes.find((e=>e.name===t))}}},"./node_modules/netcdfjs/lib-esm/toString.js":(t,e,r)=>{"use strict";function n(){const t=[];t.push("DIMENSIONS");for(const e of this.dimensions)t.push(` ${e.name.padEnd(30)} = size: ${e.size}`);t.push(""),t.push("GLOBAL ATTRIBUTES");for(const e of this.globalAttributes)t.push(` ${e.name.padEnd(30)} = ${e.value}`);const e=JSON.parse(JSON.stringify(this.variables));t.push(""),t.push("VARIABLES:");for(const r of e){r.value=this.getDataVariable(r);let e=JSON.stringify(r.value);e.length>50&&(e=e.substring(0,50)),isNaN(r.value.length)||(e+=` (length: ${r.value.length})`),t.push(` ${r.name.padEnd(30)} = ${e}`)}return t.join("\n")}r.r(e),r.d(e,{toString:()=>n})},"./node_modules/netcdfjs/lib-esm/types.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{num2bytes:()=>o,num2str:()=>i,readType:()=>l,str2num:()=>a});const n={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6};function i(t){switch(Number(t)){case n.BYTE:return"byte";case n.CHAR:return"char";case n.SHORT:return"short";case n.INT:return"int";case n.FLOAT:return"float";case n.DOUBLE:return"double";default:return"undefined"}}function o(t){switch(Number(t)){case n.BYTE:case n.CHAR:return 1;case n.SHORT:return 2;case n.INT:case n.FLOAT:return 4;case n.DOUBLE:return 8;default:return-1}}function a(t){switch(String(t)){case"byte":return n.BYTE;case"char":return n.CHAR;case"short":return n.SHORT;case"int":return n.INT;case"float":return n.FLOAT;case"double":return n.DOUBLE;default:return-1}}function s(t,e){if(1!==t){const r=new Array(t);for(let n=0;n{"use strict";function n(t,e){if(t)throw new TypeError(`Not a valid NetCDF v3.x file: ${e}`)}function i(t){t.offset%4!=0&&t.skip(4-t.offset%4)}function o(t){const e=t.readUint32(),r=t.readChars(e);return i(t),r}r.r(e),r.d(e,{notNetcdf:()=>n,padding:()=>i,readName:()=>o})},"./src/WebGL/shaders/lib/basic/basic.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 viewMatrix;\nuniform float opacity;\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\nvoid main() {\n gl_FragColor = vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}"},"./src/WebGL/shaders/lib/basic/basic.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\n\nattribute vec3 position;\nattribute vec3 color;\n\nvarying vec3 vColor;\n\nvoid main() {\n\n vColor = color;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix * mvPosition;\n\n}"},"./src/WebGL/shaders/lib/instanced/instanced.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 viewMatrix;\nuniform float opacity;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLightFront;\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\n\n #ifndef WIREFRAME\n gl_FragColor.xyz *= vLightFront;\n #endif\n\n gl_FragColor = gl_FragColor * vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n}\n\n\n"},"./src/WebGL/shaders/lib/instanced/instanced.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 offset;\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute float radius;\n\nvarying vec3 vColor;\nvarying vec3 vLightFront;\n\nvoid main() {\n\n vColor = color;\n\n vec3 objectNormal = normal;\n vec3 transformedNormal = normalMatrix * objectNormal;\n vec4 mvPosition = modelViewMatrix * vec4( position * radius + offset, 1.0 );\n\n vLightFront = vec3( 0.0 );\n\n transformedNormal = normalize( transformedNormal );\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n\n vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\n\n gl_Position = projectionMatrix * mvPosition;\n}\n\n"},"./src/WebGL/shaders/lib/lambert/lambert.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 viewMatrix;\nuniform float opacity;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLightFront;\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\n\n #ifndef WIREFRAME\n gl_FragColor.xyz *= vLightFront;\n #endif\n\n gl_FragColor = gl_FragColor * vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n}"},"./src/WebGL/shaders/lib/lambert/lambert.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec3 vColor;\nvarying vec3 vLightFront;\n\nvoid main() {\n\n vColor = color;\n\n vec3 objectNormal = normal;\n vec3 transformedNormal = normalMatrix * objectNormal;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\n vLightFront = vec3( 0.0 );\n\n transformedNormal = normalize( transformedNormal );\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n\n vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\n\n gl_Position = projectionMatrix * mvPosition;\n}"},"./src/WebGL/shaders/lib/lambertdouble/lambertdouble.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 viewMatrix;\nuniform float opacity;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLightFront;\nvarying vec3 vLightBack;\n\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\n\n #ifndef WIREFRAME\n if ( gl_FrontFacing )\n gl_FragColor.xyz *= vLightFront;\n else\n gl_FragColor.xyz *= vLightBack;\n #endif\n\n gl_FragColor = gl_FragColor * vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n}\n\n\n"},"./src/WebGL/shaders/lib/lambertdouble/lambertdouble.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec3 vColor;\nvarying vec3 vLightFront;\nvarying vec3 vLightBack;\n\nvoid main() {\n\n vColor = color;\n\n vec3 objectNormal = normal;\n vec3 transformedNormal = normalMatrix * objectNormal;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\n vLightFront = vec3( 0.0 );\n vLightBack = vec3( 0.0 );\n\n transformedNormal = normalize( transformedNormal );\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n vec3 directionalLightWeightingBack = vec3( max( -dotProduct, 0.0 ) );\n\n vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\n vLightBack += directionalLightColor[ 0 ] * directionalLightWeightingBack;\n\n gl_Position = projectionMatrix * mvPosition;\n}\n\n"},"./src/WebGL/shaders/lib/outline/outline.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform float opacity;\nuniform vec3 outlineColor;\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n gl_FragColor = vec4( outlineColor, 1 );\n}\n\n\n"},"./src/WebGL/shaders/lib/outline/outline.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float outlineWidth;\nuniform float outlinePushback;\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvoid main() {\n\n vec4 norm = modelViewMatrix*vec4(normalize(normal),0.0);\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n mvPosition.xy += norm.xy*outlineWidth;\n gl_Position = projectionMatrix * mvPosition;\n mvPosition.z -= outlinePushback; //go backwards in model space\n vec4 pushpos = projectionMatrix*mvPosition; //project to get z in projection space, I'm probably missing some simple math to do the same thing..\n gl_Position.z = gl_Position.w*pushpos.z/pushpos.w;\n}\n\n"},"./src/WebGL/shaders/lib/screen/screen.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform sampler2D colormap;\nvarying highp vec2 vTexCoords;\nuniform vec2 dimensions;\n//DEFINEFRAGCOLOR\nvoid main (void) {\n gl_FragColor = texture2D(colormap, vTexCoords);\n}\n "},"./src/WebGL/shaders/lib/screen/screen.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="attribute vec2 vertexPosition;\nvarying highp vec2 vTexCoords;\nconst vec2 scale = vec2(0.5, 0.5);\n\nvoid main() {\n vTexCoords = vertexPosition * scale + scale; // scale vertex attribute to [0,1] range\n gl_Position = vec4(vertexPosition, 0.0, 1.0);\n}\n "},"./src/WebGL/shaders/lib/screenaa/screenaa.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform sampler2D colormap;\nvarying highp vec2 vTexCoords;\nuniform vec2 dimensions;\n\n// Basic FXAA implementation based on the code on geeks3d.com \n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#define FXAA_SPAN_MAX 8.0\n\nvec4 applyFXAA(vec2 fragCoord, sampler2D tex)\n{\n vec4 color;\n vec2 inverseVP = vec2(1.0 / dimensions.x, 1.0 / dimensions.y);\n vec3 rgbNW = texture2D(tex, fragCoord + vec2(-1.0, -1.0) * inverseVP).xyz;\n vec3 rgbNE = texture2D(tex, fragCoord + vec2(1.0, -1.0) * inverseVP).xyz;\n vec3 rgbSW = texture2D(tex, fragCoord + vec2(-1.0, 1.0) * inverseVP).xyz;\n vec3 rgbSE = texture2D(tex, fragCoord + vec2(1.0, 1.0) * inverseVP).xyz;\n vec3 rgbM = texture2D(tex, fragCoord * inverseVP).xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n\n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord + dir * -0.5).xyz +\n texture2D(tex, fragCoord + dir * 0.5).xyz);\n\n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, 1.0);\n else\n color = vec4(rgbB, 1.0);\n return color;\n}\n//DEFINEFRAGCOLOR\nvoid main (void) {\n gl_FragColor = applyFXAA(vTexCoords, colormap);\n}\n "},"./src/WebGL/shaders/lib/screenaa/screenaa.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="attribute vec2 vertexPosition;\nvarying highp vec2 vTexCoords;\nconst vec2 scale = vec2(0.5, 0.5);\n\nvoid main() {\n vTexCoords = vertexPosition * scale + scale; // scale vertex attribute to [0,1] range\n gl_Position = vec4(vertexPosition, 0.0, 1.0);\n}\n "},"./src/WebGL/shaders/lib/sphereimposter/sphereimposter.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\nuniform mat4 viewMatrix;\nuniform float opacity;\nuniform mat4 projectionMatrix;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\nuniform float uDepth;\nuniform vec3 directionalLightColor[ 1 ];\n\nvarying vec3 vColor;\nvarying vec2 mapping;\nvarying float rval;\nvarying vec3 vLight;\nvarying vec3 center;\n\n//DEFINEFRAGCOLOR\n\nvoid main() {\n float lensqr = dot(mapping,mapping);\n float rsqr = rval*rval;\n if(lensqr > rsqr)\n discard;\n float z = sqrt(rsqr-lensqr);\n vec3 cameraPos = center+ vec3(mapping.x,mapping.y,z);\n vec4 clipPos = projectionMatrix * vec4(cameraPos, 1.0);\n float ndcDepth = clipPos.z / clipPos.w;\n gl_FragDepthEXT = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n vec3 norm = normalize(vec3(mapping.x,mapping.y,z));\n float dotProduct = dot( norm, vLight );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n vec3 vLight = directionalLightColor[ 0 ] * directionalLightWeighting;\n gl_FragColor = vec4(vLight*vColor, opacity*opacity );\n float fogFactor = smoothstep( fogNear, fogFar, gl_FragDepthEXT/gl_FragCoord.w );\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n\n}\n\n"},"./src/WebGL/shaders/lib/sphereimposter/sphereimposter.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec2 mapping;\nvarying vec3 vColor;\nvarying float rval;\nvarying vec3 vLight;\nvarying vec3 center;\n\nvoid main() {\n\n vColor = color;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n center = mvPosition.xyz;\n vec4 projPosition = projectionMatrix * mvPosition;\n vec4 adjust = projectionMatrix* vec4(normal,0.0); adjust.z = 0.0; adjust.w = 0.0;\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vLight = normalize( lDirection.xyz );\n mapping = normal.xy;\n rval = abs(normal.x);\n gl_Position = projPosition+adjust;\n\n}\n"},"./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform float opacity;\nuniform vec3 outlineColor;\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\nuniform mat4 projectionMatrix;\nvarying vec2 mapping;\nvarying float rval;\nvarying vec3 center;\n\nuniform float outlinePushback;\n\n//DEFINEFRAGCOLOR\n\nvoid main() {\n float lensqr = dot(mapping,mapping);\n float rsqr = rval*rval;\n if(lensqr > rsqr)\n discard;\n float z = sqrt(rsqr-lensqr);\n vec3 cameraPos = center+ vec3(mapping.x,mapping.y,z-outlinePushback);\n vec4 clipPos = projectionMatrix * vec4(cameraPos, 1.0);\n float ndcDepth = clipPos.z / clipPos.w;\n gl_FragDepthEXT = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n gl_FragColor = vec4(outlineColor, 1 );\n}\n\n\n"},"./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float outlineWidth;\nuniform float outlinePushback;\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec2 mapping;\nvarying float rval;\nvarying vec3 center;\n\nvoid main() {\n\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n center = mvPosition.xyz;\n vec4 projPosition = projectionMatrix * mvPosition;\n vec2 norm = normal.xy + vec2(sign(normal.x)*outlineWidth,sign(normal.y)*outlineWidth);\n vec4 adjust = projectionMatrix* vec4(norm,normal.z,0.0); adjust.z = 0.0; adjust.w = 0.0;\n mapping = norm.xy;\n rval = abs(norm.x);\n gl_Position = projPosition+adjust;\n}\n\n"},"./src/WebGL/shaders/lib/sprite/sprite.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform vec3 color;\nuniform sampler2D map;\nuniform float opacity;\n\nuniform int fogType;\nuniform vec3 fogColor;\nuniform float fogDensity;\nuniform float fogNear;\nuniform float fogFar;\nuniform float alphaTest;\n\nvarying vec2 vUV;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n vec4 texture = texture2D(map, vUV);\n\n if (texture.a < alphaTest) discard;\n\n gl_FragColor = vec4(color * texture.xyz, texture.a * opacity);\n\n if (fogType > 0) {\n\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n float fogFactor = 0.0;\n\n if (fogType == 1) {\n fogFactor = smoothstep(fogNear, fogFar, depth);\n }\n\n else {\n const float LOG2 = 1.442695;\n float fogFactor = exp2(- fogDensity * fogDensity * depth * depth * LOG2);\n fogFactor = 1.0 - clamp(fogFactor, 0.0, 1.0);\n }\n\n gl_FragColor = mix(gl_FragColor, vec4(fogColor, gl_FragColor.w), fogFactor);\n\n }\n}\n\n"},"./src/WebGL/shaders/lib/sprite/sprite.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform int useScreenCoordinates;\nuniform vec3 screenPosition;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float rotation;\nuniform vec2 scale;\nuniform vec2 alignment;\nuniform vec2 uvOffset;\nuniform vec2 uvScale;\n\nattribute vec2 position;\nattribute vec2 uv;\n\nvarying vec2 vUV;\n\nvoid main() {\n\n vUV = uvOffset + uv * uvScale;\n\n vec2 alignedPosition = position + alignment;\n\n vec2 rotatedPosition;\n rotatedPosition.x = ( cos(rotation) * alignedPosition.x - sin(rotation) * alignedPosition.y ) * scale.x;\n rotatedPosition.y = ( sin(rotation) * alignedPosition.x + cos(rotation) * alignedPosition.y ) * scale.y;\n\n vec4 finalPosition;\n\n if(useScreenCoordinates != 0) {\n finalPosition = vec4(screenPosition.xy + rotatedPosition, screenPosition.z, 1.0);\n }\n\n else {\n finalPosition = projectionMatrix * modelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0); finalPosition /= finalPosition.w;\n finalPosition.xy += rotatedPosition; \n }\n\n gl_Position = finalPosition;\n\n}\n\n"},"./src/WebGL/shaders/lib/stickimposter/stickimposter.partial.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n=" float dotProduct = dot( norm, vLight );\n vec3 light = vec3( max( dotProduct, 0.0 ) );\n gl_FragColor = vec4(light*color, opacity*opacity );\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}"},"./src/WebGL/shaders/lib/stickimposter/stickimposter.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute float radius;\n\nvarying vec3 vColor;\nvarying vec3 vLight;\nvarying vec3 cposition;\nvarying vec3 p1;\nvarying vec3 p2;\nvarying float r;\n\nvoid main() {\n\n vColor = color; vColor.z = abs(vColor.z); //z indicates which vertex and so would vary\n r = abs(radius);\n vec4 to = modelViewMatrix*vec4(normal, 1.0); //normal is other point of cylinder\n vec4 pt = modelViewMatrix*vec4(position, 1.0);\n vec4 mvPosition = pt;\n p1 = pt.xyz; p2 = to.xyz;\n vec3 norm = to.xyz-pt.xyz;\n float mult = 1.1; //slop to account for perspective of sphere\n if(length(p1) > length(p2)) { //billboard at level of closest point\n mvPosition = to;\n }\n vec3 n = normalize(mvPosition.xyz);\n//intersect with the plane defined by the camera looking at the billboard point\n if(color.z >= 0.0) { //p1\n if(projectionMatrix[3][3] == 0.0) { //perspective\n vec3 pnorm = normalize(p1);\n float t = dot(mvPosition.xyz-p1,n)/dot(pnorm,n);\n mvPosition.xyz = p1+t*pnorm; \n } else { //orthographic\n mvPosition.xyz = p1;\n }\n } else {\n if(projectionMatrix[3][3] == 0.0) { //perspective\n vec3 pnorm = normalize(p2);\n float t = dot(mvPosition.xyz-p2,n)/dot(pnorm,n);\n mvPosition.xyz = p2+t*pnorm;\n } else { //orthographic\n mvPosition.xyz = p2;\n } \n mult *= -1.0;\n }\n vec3 cr = normalize(cross(mvPosition.xyz,norm))*radius;\n vec3 doublecr = normalize(cross(mvPosition.xyz,cr))*radius;\n mvPosition.xyz += mult*(cr + doublecr).xyz;\n cposition = mvPosition.xyz;\n gl_Position = projectionMatrix * mvPosition;\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vLight = normalize( lDirection.xyz )*directionalLightColor[0]; //not really sure this is right, but color is always white so..\n}\n\n"},"./src/WebGL/shaders/lib/stickimposteroutline/stickimposteroutline.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\nuniform vec3 outlineColor;\nuniform float outlineWidth;\nuniform float outlinePushback;\n\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute float radius;\n\nvarying vec3 vColor;\nvarying vec3 vLight;\nvarying vec3 cposition;\nvarying vec3 p1;\nvarying vec3 p2;\nvarying float r;\n\nvoid main() {\n\n vColor = outlineColor;\n float rad = radius+sign(radius)*outlineWidth;\n r = abs(rad);\n vec4 to = modelViewMatrix*vec4(normal, 1.0); //normal is other point of cylinder\n vec4 pt = modelViewMatrix*vec4(position, 1.0);\n//pushback\n to.xyz += normalize(to.xyz)*outlinePushback;\n pt.xyz += normalize(pt.xyz)*outlinePushback;\n\n vec4 mvPosition = pt;\n p1 = pt.xyz; p2 = to.xyz;\n vec3 norm = to.xyz-pt.xyz;\n float mult = 1.1; //slop to account for perspective of sphere\n if(length(p1) > length(p2)) { //billboard at level of closest point\n mvPosition = to;\n }\n vec3 n = normalize(mvPosition.xyz);\n//intersect with the plane defined by the camera looking at the billboard point\n if(color.z >= 0.0) { //p1\n vec3 pnorm = normalize(p1);\n float t = dot(mvPosition.xyz-p1,n)/dot(pnorm,n);\n mvPosition.xyz = p1+t*pnorm;\n } else {\n vec3 pnorm = normalize(p2);\n float t = dot(mvPosition.xyz-p2,n)/dot(pnorm,n);\n mvPosition.xyz = p2+t*pnorm;\n mult *= -1.0;\n }\n vec3 cr = normalize(cross(mvPosition.xyz,norm))*rad;\n vec3 doublecr = normalize(cross(mvPosition.xyz,cr))*rad;\n mvPosition.xy += mult*(cr + doublecr).xy;\n cposition = mvPosition.xyz;\n gl_Position = projectionMatrix * mvPosition;\n vLight = vec3(1.0,1.0,1.0);\n}\n\n"},"./src/WebGL/shaders/lib/volumetric/volumetric.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\nuniform highp sampler3D data;\nuniform highp sampler2D colormap;\nuniform highp sampler2D depthmap;\n\n\nuniform mat4 textmat;\nuniform mat4 projinv;\nuniform mat4 projectionMatrix;\n\nuniform float step;\nuniform float subsamples;\nuniform float maxdepth;\nuniform float transfermin;\nuniform float transfermax;\nin vec4 mvPosition;\nout vec4 color;\nvoid main(void) {\n\n vec4 pos = mvPosition;\n bool seengood = false;\n float i = 0.0;\n color = vec4(1,1,1,0);\n float increment = 1.0/subsamples;\n float maxsteps = (maxdepth*subsamples/step);\n//there's probably a better way to do this..\n//calculate farthest possible point in model coordinates\n vec4 maxpos = vec4(pos.x,pos.y,pos.z-maxdepth,1.0);\n// convert to projection\n maxpos = projectionMatrix*maxpos;\n vec4 startp = projectionMatrix*pos;\n// homogonize\n maxpos /= maxpos.w;\n startp /= startp.w;\n//take x,y from start and z from max\n maxpos = vec4(startp.x,startp.y,maxpos.z,1.0);\n//convert back to model space\n maxpos = projinv*maxpos;\n maxpos /= maxpos.w;\n float incr = step/subsamples;\n//get depth from depthmap\n//startp is apparently [-1,1]\n vec2 tpos = startp.xy/2.0+0.5;\n float depth = texture(depthmap, tpos).r;\n//compute vector between start and end\n vec4 direction = maxpos-pos;\n for( i = 0.0; i <= maxsteps; i++) {\n vec4 pt = (pos+(i/maxsteps)*direction);\n vec4 ppt = projectionMatrix*pt;\n float ptdepth = ppt.z/ppt.w;\n ptdepth = ((gl_DepthRange.diff * ptdepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n if(ptdepth > depth) break;\n pt = textmat*pt;\n// pt /= pt.w;\n if(pt.x >= -0.01 && pt.y >= -0.01 && pt.z >= -0.01 && pt.x <= 1.01 && pt.y <= 1.01 && pt.z <= 1.01) {\n seengood = true;\n } else if(seengood) {\n break;\n }\n if( pt.x < -0.01 || pt.x > 1.01 || pt.y < -0.01 || pt.y > 1.01 || pt.z < -0.01 || pt.z > 1.01 ){\n color.a = 0.0;\n continue;\n }\n else {\n float val = texture(data, pt.zyx).r;\n if(isinf(val)) continue; //masked out\n float cval = (val-transfermin)/(transfermax-transfermin); //scale to texture 0-1 range\n vec4 val_color = texture(colormap, vec2(cval,0.5));\n color.rgb = color.rgb*color.a + (1.0-color.a)*val_color.a*val_color.rgb;\n color.a += (1.0 - color.a) * val_color.a; \n if(color.a > 0.0) color.rgb /= color.a;\n// color = vec4(pt.x, pt.y, pt.z, 1.0);\n }\n// color = vec4(pt.x, pt.y, pt.z, 0.0)\n }\n}\n\n "},"./src/WebGL/shaders/lib/volumetric/volumetric.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\n\nin vec3 position;\nout vec4 mvPosition;\nvoid main() {\n\n mvPosition = modelViewMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix*mvPosition;\n}\n"},"./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform float opacity;\nuniform mat4 projectionMatrix;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLight;\nvarying vec3 vColor;\nvarying vec3 cposition;\nvarying vec3 p1;\nvarying vec3 p2;\nvarying float r;\n\n//DEFINEFRAGCOLOR\n\n//cylinder-ray intersection testing taken from http://mrl.nyu.edu/~dzorin/cg05/lecture12.pdf\n//also useful: http://stackoverflow.com/questions/9595300/cylinder-impostor-in-glsl\n//with a bit more care (caps) this could be a general cylinder imposter (see also outline)\nvoid main() {\n vec3 color = abs(vColor);\n vec3 pos = cposition;\n vec3 p = pos; //ray point\n vec3 v = vec3(0.0,0.0,-1.0); //ray normal - orthographic\n if(projectionMatrix[3][3] == 0.0) v = normalize(pos); //ray normal - perspective\n vec3 pa = p1; //cyl start\n vec3 va = normalize(p2-p1); //cyl norm\n vec3 tmp1 = v-(dot(v,va)*va);\n vec3 deltap = p-pa;\n float A = dot(tmp1,tmp1);\n if(A == 0.0) discard;\n vec3 tmp2 = deltap-(dot(deltap,va)*va);\n float B = 2.0*dot(tmp1, tmp2);\n float C = dot(tmp2,tmp2)-r*r;\n//quadratic equation!\n float det = (B*B) - (4.0*A*C);\n if(det < 0.0) discard;\n float sqrtDet = sqrt(det);\n float posT = (-B+sqrtDet)/(2.0*A);\n float negT = (-B-sqrtDet)/(2.0*A);\n float intersectionT = min(posT,negT);\n vec3 qi = p+v*intersectionT;\n float dotp1 = dot(va,qi-p1);\n float dotp2 = dot(va,qi-p2);\n vec3 norm;\n if( dotp1 < 0.0 || dotp2 > 0.0) { //(p-c)^2 + 2(p-c)vt +v^2+t^2 - r^2 = 0\n vec3 cp;\n if( dotp1 < 0.0) { \n// if(vColor.x < 0.0 ) discard; //color sign bit indicates if we should cap or not\n cp = p1;\n } else {\n// if(vColor.y < 0.0 ) discard;\n cp = p2;\n }\n vec3 diff = p-cp;\n A = dot(v,v);\n B = dot(diff,v)*2.0;\n C = dot(diff,diff)-r*r;\n det = (B*B) - (4.0*C);\n if(det < 0.0) discard;\n sqrtDet = sqrt(det);\n posT = (-B+sqrtDet)/(2.0);\n negT = (-B-sqrtDet)/(2.0);\n float t = min(posT,negT);\n qi = p+v*t; \n norm = normalize(qi-cp); \n } else {\n norm = normalize(qi-(dotp1*va + p1));\n }\n vec4 clipPos = projectionMatrix * vec4(qi, 1.0);\n float ndcDepth = clipPos.z / clipPos.w;\n float depth = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n gl_FragDepthEXT = depth;"},"./src/GLDraw.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{CAP:()=>n,GLDraw:()=>i});var n,i,o=r("./src/WebGL/math/index.ts");!function(t){t[t.NONE=0]="NONE",t[t.FLAT=1]="FLAT",t[t.ROUND=2]="ROUND"}(n||(n={})),function(t){function e(t,e,r){var n,i,o,a,s,l=Math.hypot(t,e);l<1e-4?(i=0,o=1):(i=-t/l,o=e/l),e=-i*t+o*e,(n=Math.hypot(e,r))<1e-4?(a=0,s=1):(a=r/n,s=e/n);var c=new Float32Array(9);return c[0]=o,c[1]=i,c[2]=0,c[3]=-i*s,c[4]=o*s,c[5]=a,c[6]=i*a,c[7]=-o*a,c[8]=s,c}var r=new class{constructor(){this.cache={};let t,e=[],r=Math.pow(2,4),n=2,i=Math.pow(2,n),a=r/i;for(e[0]=new o.Vector3(-1,0,0),e[a]=new o.Vector3(0,0,1),e[2*a]=new o.Vector3(1,0,0),e[3*a]=new o.Vector3(0,0,-1),n=3;n<=4;n++){for(i=Math.pow(2,n-1),a=r/i,t=0;t{"use strict";r.r(e),r.d(e,{GLModel:()=>f});var n=r("./src/WebGL/index.ts"),i=r("./src/WebGL/shapes/index.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/colors.ts"),s=r("./src/GLDraw.ts"),l=r("./src/glcartoon.ts"),c=r("./src/utilities.ts"),d=r("./src/Gradient.ts"),u=r("./src/parsers/index.ts"),h=r("./node_modules/netcdfjs/lib-esm/index.js"),p=r("./src/parsers/utils/assignBonds.ts");class f{static sameObj(t,e){return t&&e?JSON.stringify(t)==JSON.stringify(e):t==e}constructor(t,e){this.atoms=[],this.frames=[],this.box=null,this.atomdfs=null,this.id=0,this.hidden=!1,this.molObj=null,this.renderedMolObj=null,this.lastColors=null,this.modelData={},this.modelDatas=null,this.idMatrix=new o.Matrix4,this.dontDuplicateAtoms=!0,this.defaultColor=a.elementColors.defaultColor,this.defaultStickRadius=.25,this.options=e||{},this.ElementColors=this.options.defaultcolors?this.options.defaultcolors:a.elementColors.defaultColors,this.defaultSphereRadius=this.options.defaultSphereRadius?this.options.defaultSphereRadius:1.5,this.defaultCartoonQuality=this.options.cartoonQuality?this.options.cartoonQuality:10,this.id=t}getRadiusFromStyle(t,e){var r=this.defaultSphereRadius;if(void 0!==e.radius)r=e.radius;else if(f.vdwRadii[t.elem])r=f.vdwRadii[t.elem];else if(t.elem.length>1){let e=t.elem;e=e[0].toUpperCase()+e[1].toLowerCase(),f.vdwRadii[e]&&(r=f.vdwRadii[e])}return void 0!==e.scale&&(r*=e.scale),r}drawAtomCross(t,e){if(t.style.cross){var r=t.style.cross;if(!r.hidden){var i=r.linewidth||f.defaultlineWidth;e[i]||(e[i]=new n.Geometry);var a=e[i].updateGeoGroup(6),s=this.getRadiusFromStyle(t,r),l=[[s,0,0],[-s,0,0],[0,s,0],[0,-s,0],[0,0,s],[0,0,-s]],d=t.clickable||t.hoverable;d&&void 0===t.intersectionShape&&(t.intersectionShape={sphere:[],cylinder:[],line:[]});for(var u=(0,c.getColorFromStyle)(t,r),h=a.vertexArray,p=a.colorArray,m=0;m<6;m++){var g=3*a.vertices;if(a.vertices++,h[g]=t.x+l[m][0],h[g+1]=t.y+l[m][1],h[g+2]=t.z+l[m][2],p[g]=u.r,p[g+1]=u.g,p[g+2]=u.b,d){var v=new o.Vector3(l[m][0],l[m][1],l[m][2]);v.multiplyScalar(.1),v.set(v.x+t.x,v.y+t.y,v.z+t.z),t.intersectionShape.line.push(v)}}}}}getGoodCross(t,e,r,n){for(var i=null,a=-1,s=0,l=t.bonds.length;sa&&(i=u,(a=c)>.1))return i}return i}getSideBondV(t,e,r){var n,i,a,s,l=new o.Vector3(t.x,t.y,t.z),c=new o.Vector3(e.x,e.y,e.z).clone(),d=null;if(c.sub(l),1===t.bonds.length)1===e.bonds.length?(d=c.clone(),Math.abs(d.x)>1e-4?d.y+=1:d.x+=1):(n=(r+1)%e.bonds.length,i=e.bonds[n],(a=this.atoms[i]).index==t.index&&(n=(n+1)%e.bonds.length,i=e.bonds[n],a=this.atoms[i]),(s=new o.Vector3(a.x,a.y,a.z).clone()).sub(l),(d=s.clone()).cross(c));else if((d=this.getGoodCross(t,e,l,c)).lengthSq()<.01){var u=this.getGoodCross(e,t,l,c);null!=u&&(d=u)}return d.lengthSq()<.01&&(d=c.clone(),Math.abs(d.x)>1e-4?d.y+=1:d.x+=1),d.cross(c),d.normalize(),d}addLine(t,e,r,n,i,o){t[r]=n.x,t[r+1]=n.y,t[r+2]=n.z,e[r]=o.r,e[r+1]=o.g,e[r+2]=o.b,t[r+3]=i.x,t[r+4]=i.y,t[r+5]=i.z,e[r+3]=o.r,e[r+4]=o.g,e[r+5]=o.b}drawBondLines(t,e,r){if(t.style.line){var i=t.style.line;if(!i.hidden){var s,l,d,u,h=i.linewidth||f.defaultlineWidth;r[h]||(r[h]=new n.Geometry);for(var p=r[h].updateGeoGroup(6*t.bonds.length),m=p.vertexArray,g=p.colorArray,v=0;v=b.index)){var y=new o.Vector3(t.x,t.y,t.z),x=new o.Vector3(b.x,b.y,b.z),w=y.clone().add(x).multiplyScalar(.5),_=!1,k=t.clickable||t.hoverable,A=b.clickable||b.hoverable;(k||A)&&(k&&(void 0===t.intersectionShape&&(t.intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]}),t.intersectionShape.line.push(y),t.intersectionShape.line.push(w)),A&&(void 0===b.intersectionShape&&(b.intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]}),b.intersectionShape.line.push(w),b.intersectionShape.line.push(x)));var T=(0,c.getColorFromStyle)(t,t.style.line),M=(0,c.getColorFromStyle)(b,b.style.line);if(t.bondStyles&&t.bondStyles[v]){var S=t.bondStyles[v];if(!S.iswire)continue;S.singleBond&&(_=!0),void 0!==S.color1&&(T=a.CC.color(S.color1)),void 0!==S.color2&&(M=a.CC.color(S.color2))}var C,E,L=3*p.vertices;if(t.bondOrder[v]>1&&t.bondOrder[v]<4&&!_){var z=this.getSideBondV(t,b,v),O=x.clone();O.sub(y),2==t.bondOrder[v]?(z.multiplyScalar(.1),(s=y.clone()).add(z),(l=y.clone()).sub(z),(d=s.clone()).add(O),(u=l.clone()).add(O),T==M?(p.vertices+=4,this.addLine(m,g,L,s,d,T),this.addLine(m,g,L+6,l,u,T)):(p.vertices+=8,O.multiplyScalar(.5),(C=s.clone()).add(O),(E=l.clone()).add(O),this.addLine(m,g,L,s,C,T),this.addLine(m,g,L+6,C,d,M),this.addLine(m,g,L+12,l,E,T),this.addLine(m,g,L+18,E,u,M))):3==t.bondOrder[v]&&(z.multiplyScalar(.1),(s=y.clone()).add(z),(l=y.clone()).sub(z),(d=s.clone()).add(O),(u=l.clone()).add(O),T==M?(p.vertices+=6,this.addLine(m,g,L,y,x,T),this.addLine(m,g,L+6,s,d,T),this.addLine(m,g,L+12,l,u,T)):(p.vertices+=12,O.multiplyScalar(.5),(C=s.clone()).add(O),(E=l.clone()).add(O),this.addLine(m,g,L,y,w,T),this.addLine(m,g,L+6,w,x,M),this.addLine(m,g,L+12,s,C,T),this.addLine(m,g,L+18,C,d,M),this.addLine(m,g,L+24,l,E,T),this.addLine(m,g,L+30,E,u,M)))}else T==M?(p.vertices+=2,this.addLine(m,g,L,y,x,T)):(p.vertices+=4,this.addLine(m,g,L,y,w,T),this.addLine(m,g,L+6,w,x,M))}}}}}drawAtomSphere(t,e){if(t.style.sphere){var r=t.style.sphere;if(!r.hidden){var n=(0,c.getColorFromStyle)(t,r),a=this.getRadiusFromStyle(t,r);if((!0===t.clickable||t.hoverable)&&void 0!==t.intersectionShape){var l=new o.Vector3(t.x,t.y,t.z);t.intersectionShape.sphere.push(new i.Sphere(l,a))}s.GLDraw.drawSphere(e,t,a,n)}}}drawAtomClickSphere(t){if(t.style.clicksphere){var e=t.style.clicksphere;if(!e.hidden){var r=this.getRadiusFromStyle(t,e);if((!0===t.clickable||t.hoverable)&&void 0!==t.intersectionShape){var n=new o.Vector3(t.x,t.y,t.z);t.intersectionShape.sphere.push(new i.Sphere(n,r))}}}}drawAtomInstanced(t,e){if(t.style.sphere){var r=t.style.sphere;if(!r.hidden){var n=this.getRadiusFromStyle(t,r),a=(0,c.getColorFromStyle)(t,r),s=e.updateGeoGroup(1),l=s.vertices,d=3*l,u=s.vertexArray,h=s.colorArray,p=s.radiusArray;if(u[d]=t.x,u[d+1]=t.y,u[d+2]=t.z,h[d]=a.r,h[d+1]=a.g,h[d+2]=a.b,p[l]=n,(!0===t.clickable||t.hoverable)&&void 0!==t.intersectionShape){var f=new o.Vector3(t.x,t.y,t.z);t.intersectionShape.sphere.push(new i.Sphere(f,n))}s.vertices+=1}}}drawSphereImposter(t,e,r,n){var i,o=t.updateGeoGroup(4),a=o.vertices,s=3*a,l=o.vertexArray,c=o.colorArray;for(i=0;i<4;i++)l[s+3*i]=e.x,l[s+3*i+1]=e.y,l[s+3*i+2]=e.z;var d=o.normalArray;for(i=0;i<4;i++)c[s+3*i]=n.r,c[s+3*i+1]=n.g,c[s+3*i+2]=n.b;d[s+0]=-r,d[s+1]=r,d[s+2]=0,d[s+3]=-r,d[s+4]=-r,d[s+5]=0,d[s+6]=r,d[s+7]=-r,d[s+8]=0,d[s+9]=r,d[s+10]=r,d[s+11]=0,o.vertices+=4;var u=o.faceArray,h=o.faceidx;u[h+0]=a,u[h+1]=a+1,u[h+2]=a+2,u[h+3]=a+2,u[h+4]=a+3,u[h+5]=a,o.faceidx+=6}drawAtomImposter(t,e){if(t.style.sphere){var r=t.style.sphere;if(!r.hidden){var n=this.getRadiusFromStyle(t,r),a=(0,c.getColorFromStyle)(t,r);if((!0===t.clickable||t.hoverable)&&void 0!==t.intersectionShape){var s=new o.Vector3(t.x,t.y,t.z);t.intersectionShape.sphere.push(new i.Sphere(s,n))}this.drawSphereImposter(e,t,n,a)}}}calculateDashes(t,e,r,n,i){var a=Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)+Math.pow(t.z-e.z,2));r=Math.max(r,0),i=Math.max(i,0)+2*r,(n=Math.max(n,.001))+i>a&&(n=a,i=0);var s,l=Math.floor((a-n)/(n+i))+1;i=(a-l*n)/l;for(var c=new o.Vector3(t.x,t.y,t.z),d=new o.Vector3((e.x-t.x)/(a/i),(e.y-t.y)/(a/i),(e.z-t.z)/(a/i)),u=new o.Vector3((e.x-t.x)/(a/n),(e.y-t.y)/(a/n),(e.z-t.z)/(a/n)),h=[],p=0;p{var e=r.imposter?f.drawStickImposter:s.GLDraw.drawCylinder;return!D&&t>=1?e:(t,r,n,i,o,a=0,s=0,l=.1,c=.25)=>{this.calculateDashes(r,n,i,l,c).forEach((r=>{e(t,r.from,r.to,i,o,a,s)}))}};for(p=0;p3){if(t.bondOrder[p]<1&&(z*=t.bondOrder[p]),!N.capDrawn&&N.bonds.length<4&&(F=2),R!=U?(k=(new o.Vector3).addVectors(G,V).multiplyScalar(.5),j(r,G,k,z,R,I,0,E,L),j(r,k,V,z,U,0,F,E,L)):j(r,G,V,z,R,I,F,E,L),u=t.clickable||t.hoverable,h=N.clickable||N.hoverable,u||h){if(k||(k=(new o.Vector3).addVectors(G,V).multiplyScalar(.5)),u){var H=new i.Cylinder(G,k,z),W=new i.Sphere(G,z);t.intersectionShape.cylinder.push(H),t.intersectionShape.sphere.push(W)}if(h){var q=new i.Cylinder(V,k,z),Y=new i.Sphere(V,z);N.intersectionShape.cylinder.push(q),N.intersectionShape.sphere.push(Y)}}}else if(t.bondOrder[p]>1){var Z=0,$=0;z!=M&&(Z=2,$=2);var X,J,K,Q,tt,et=V.clone(),rt=null;et.sub(G),rt=this.getSideBondV(t,N,p),2==t.bondOrder[p]?(X=z*S,rt.multiplyScalar(1.5*X),(J=G.clone()).add(rt),(K=G.clone()).sub(rt),(Q=J.clone()).add(et),(tt=K.clone()).add(et),R!=U?(k=(new o.Vector3).addVectors(J,Q).multiplyScalar(.5),A=(new o.Vector3).addVectors(K,tt).multiplyScalar(.5),j(r,J,k,X,R,Z,0),j(r,k,Q,X,U,0,$),j(r,K,A,X,R,Z,0),j(r,A,tt,X,U,0,$)):(j(r,J,Q,X,R,Z,$),j(r,K,tt,X,R,Z,$)),u=t.clickable||t.hoverable,h=N.clickable||N.hoverable,(u||h)&&(k||(k=(new o.Vector3).addVectors(J,Q).multiplyScalar(.5)),A||(A=(new o.Vector3).addVectors(K,tt).multiplyScalar(.5)),u&&(v=new i.Cylinder(J,k,X),b=new i.Cylinder(K,A,X),t.intersectionShape.cylinder.push(v),t.intersectionShape.cylinder.push(b)),h&&(x=new i.Cylinder(Q,k,X),w=new i.Cylinder(tt,A,X),N.intersectionShape.cylinder.push(x),N.intersectionShape.cylinder.push(w)))):3==t.bondOrder[p]&&(X=z*C,rt.cross(et),rt.normalize(),rt.multiplyScalar(3*X),(J=G.clone()).add(rt),(K=G.clone()).sub(rt),(Q=J.clone()).add(et),(tt=K.clone()).add(et),R!=U?(k=(new o.Vector3).addVectors(J,Q).multiplyScalar(.5),A=(new o.Vector3).addVectors(K,tt).multiplyScalar(.5),T=(new o.Vector3).addVectors(G,V).multiplyScalar(.5),j(r,J,k,X,R,Z,0),j(r,k,Q,X,U,0,$),j(r,G,T,X,R,I,0),j(r,T,V,X,U,0,F),j(r,K,A,X,R,Z,0),j(r,A,tt,X,U,0,$)):(j(r,J,Q,X,R,Z,$),j(r,G,V,X,R,I,F),j(r,K,tt,X,R,Z,$)),u=t.clickable||t.hoverable,h=N.clickable||N.hoverable,(u||h)&&(k||(k=(new o.Vector3).addVectors(J,Q).multiplyScalar(.5)),A||(A=(new o.Vector3).addVectors(K,tt).multiplyScalar(.5)),T||(T=(new o.Vector3).addVectors(G,V).multiplyScalar(.5)),u&&(v=new i.Cylinder(J.clone(),k.clone(),X),b=new i.Cylinder(K.clone(),A.clone(),X),y=new i.Cylinder(G.clone(),T.clone(),X),t.intersectionShape.cylinder.push(v),t.intersectionShape.cylinder.push(b),t.intersectionShape.cylinder.push(y)),h&&(x=new i.Cylinder(Q.clone(),k.clone(),X),w=new i.Cylinder(tt.clone(),A.clone(),X),_=new i.Cylinder(V.clone(),T.clone(),X),N.intersectionShape.cylinder.push(x),N.intersectionShape.cylinder.push(w),N.intersectionShape.cylinder.push(_))))}}}var nt=!1,it=0,ot=!1;for(p=0;p0&&(nt=!0):0==it&&(t.bonds.length>0||d.showNonBonded)&&(nt=!0),nt&&(z=M,r.imposter?this.drawSphereImposter(r.sphereGeometry,t,z,R):s.GLDraw.drawSphere(r,t,z,R))}}}createMolObj(t,e){e=e||{};var r,i,o,c,d=new n.Object3D,u=[],h={},p={},f=this.drawAtomSphere,m=null,g=null;e.supportsImposters?(f=this.drawAtomImposter,(m=new n.Geometry(!0)).imposter=!0,(g=new n.Geometry(!0,!0)).imposter=!0,g.sphereGeometry=new n.Geometry(!0),g.sphereGeometry.imposter=!0,g.drawnCaps={}):e.supportsAIA?(f=this.drawAtomInstanced,(m=new n.Geometry(!1,!0,!0)).instanced=!0,g=new n.Geometry(!0)):(m=new n.Geometry(!0),g=new n.Geometry(!0));var v,b={},y=[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(r=0,o=t.length;ry[1]&&(y[1]=x.resi)),u.push(x))}}if(u.length>0&&(0,l.drawCartoon)(d,u,y,this.defaultCartoonQuality),m&&m.vertices>0){m.initTypedArrays();var w=null,_=null;m.imposter?w=new n.SphereImposterMaterial({ambient:0,vertexColors:!0,reflectivity:0}):m.instanced?(_=new n.Geometry(!0),s.GLDraw.drawSphere(_,{x:0,y:0,z:0},1,new a.Color(.5,.5,.5)),_.initTypedArrays(),w=new n.InstancedMaterial({sphereMaterial:new n.MeshLambertMaterial({ambient:0,vertexColors:!0,reflectivity:0}),sphere:_})):w=new n.MeshLambertMaterial({ambient:0,vertexColors:!0,reflectivity:0}),b.sphere<1&&b.sphere>=0&&(w.transparent=!0,w.opacity=b.sphere),_=new n.Mesh(m,w),d.add(_)}if(g.vertices>0){var k=null,A=null,T=g.sphereGeometry;T&&void 0!==T.vertices&&0!=T.vertices||(T=null),g.initTypedArrays(),T&&T.initTypedArrays();var M={ambient:0,vertexColors:!0,reflectivity:0};g.imposter?(k=new n.StickImposterMaterial(M),A=new n.SphereImposterMaterial(M)):(k=new n.MeshLambertMaterial(M),A=new n.MeshLambertMaterial(M),k.wireframe&&(g.setUpWireframe(),T&&T.setUpWireframe())),b.stick<1&&b.stick>=0&&(k.transparent=!0,k.opacity=b.stick,A.transparent=!0,A.opacity=b.stick);var S=new n.Mesh(g,k);if(d.add(S),T){var C=new n.Mesh(T,A);d.add(C)}}for(r in h)if(h.hasOwnProperty(r)){v=r;var E=new n.LineBasicMaterial({linewidth:v,vertexColors:!0});b.line<1&&b.line>=0&&(E.transparent=!0,E.opacity=b.line),h[r].initTypedArrays();var L=new n.Line(h[r],E,n.LineStyle.LinePieces);d.add(L)}for(r in p)if(p.hasOwnProperty(r)){v=r;var z=new n.LineBasicMaterial({linewidth:v,vertexColors:!0});b.cross<1&&b.cross>=0&&(z.transparent=!0,z.opacity=b.cross),p[r].initTypedArrays();var O=new n.Line(p[r],z,n.LineStyle.LinePieces);d.add(O)}if(this.dontDuplicateAtoms&&this.modelData.symmetries&&this.modelData.symmetries.length>0){var D,I=new n.Object3D;for(D=0;Dr?e-n:e}adjustCoordinatesToBox(){if(this.box&&this.atomdfs)for(var t=this.box[0],e=this.box[1],r=this.box[2],n=.9*t,i=.9*e,o=.9*r,a=0;a=r)&&(t=r-1),null!=n.frames.url){var a=n.frames.url;(0,c.getbin)(a+"/traj/frame/"+t+"/"+n.frames.path,void 0,"POST",void 0).then((function(t){for(var e=new Float32Array(t,44),r=0,o=0;o=n&&t<=i)return!0}}return!1}static deepCopyAndCache(t,e){if("object"!=typeof t||null==t)return t;if(t.__cache_created)return t;const r={};for(const n in t){const i=t[n];if(Array.isArray(i)){r[n]=[];for(let t=0;t=n[0][0]&&a<=n[1][0]&&s>=n[0][1]&&s<=n[1][1]&&l>=n[0][2]&&l<=n[1][2]&&(a>=r[0][0]&&a<=r[1][0]&&s>=r[0][1]&&s<=r[1][1]&&l>=r[0][2]&&l<=r[1][2]||o.push(this.atoms[t]))}return o}static getFloat(t){return"number"==typeof t?t:parseFloat(t)}selectedAtoms(t,e){var r=[];t=f.deepCopyAndCache(t||{},this),e||(e=this.atoms);for(var n=e.length,i=0;i0&&r.push(n[t])}}if(t.hasOwnProperty("within")&&t.within.hasOwnProperty("sel")&&t.within.hasOwnProperty("distance")){var s=this.selectedAtoms(t.within.sel,this.atoms),l={};const e=f.getFloat(t.within.distance),n=e*e;for(let t=0;t0&&(l[e]=1)}var c=[];if(t.within.invert)for(let t=0;t0;)if(e=h.pop(),p=e.chain,m=e.resi,void 0===u[e.index]){u[e.index]=!0;for(var g=0;g0&&(this.molObj=null)}else console.log("Callback is not a function")}setHoverable(t,e,r,n){if(e=!!e,r=(0,c.makeFunction)(r),n=(0,c.makeFunction)(n),null!==r)if(null!==n){var i=this.selectedAtoms(t,this.atoms),o=i.length;for(let t=0;t0&&(this.molObj=null)}else console.log("Unhover_callback is not a function");else console.log("Hover_callback is not a function")}enableContextMenu(t,e){var r;e=!!e;var n=this.selectedAtoms(t,this.atoms),i=n.length;for(r=0;r0&&(this.molObj=null)}setColorByElement(t,e){if(null===this.molObj||!f.sameObj(e,this.lastColors)){this.lastColors=e;var r=this.selectedAtoms(t,r);r.length>0&&(this.molObj=null);for(var n=0;n0&&(this.molObj=null),"string"==typeof r&&void 0!==d.Gradient.builtinGradients[r]&&(r=new d.Gradient.builtinGradients[r]),n||(n=r.range()),n||(n=(0,c.getPropertyRange)(a,e)),i=0;i0&&(this.molObj=null);for(let t=0;t=i)continue;let a={b:r,e:i},s=o.bondOrder[t];1!=s&&(a.o=s),e.b.push(a)}}return e}globj(t,e){(null===this.molObj||e.regen)&&(this.molObj=this.createMolObj(this.atoms,e),this.renderedMolObj&&(t.remove(this.renderedMolObj),this.renderedMolObj=null),this.renderedMolObj=this.molObj.clone(),this.hidden&&(this.renderedMolObj.setVisible(!1),this.molObj.setVisible(!1)),t.add(this.renderedMolObj))}exportVRML(){return this.createMolObj(this.atoms,{supportsImposters:!1,supportsAIA:!1}).vrml()}removegl(t){this.renderedMolObj&&(void 0!==this.renderedMolObj.geometry&&this.renderedMolObj.geometry.dispose(),void 0!==this.renderedMolObj.material&&this.renderedMolObj.material.dispose(),t.remove(this.renderedMolObj),this.renderedMolObj=null),this.molObj=null}hide(){this.hidden=!0,this.renderedMolObj&&this.renderedMolObj.setVisible(!1),this.molObj&&this.molObj.setVisible(!1)}show(){this.hidden=!1,this.renderedMolObj&&this.renderedMolObj.setVisible(!0),this.molObj&&this.molObj.setVisible(!0)}addPropertyLabels(t,e,r,n){for(var i=this.selectedAtoms(e,i),o=(0,c.deepCopy)(n),a=0;aMOLECULE/gm)?"mol2":t.match(/^data_/gm)&&t.match(/^loop_/gm)?"cif":t.match(/^HETATM/gm)||t.match(/^ATOM/gm)?"pdb":t.match(/ITEM: TIMESTEP/gm)?"lammpstrj":t.match(/^.*\n.*\n.\s*(\d+)\s+(\d+)/gm)?"sdf":t.match(/^%VERSION\s+VERSION_STAMP/gm)?"prmtop":"xyz",console.log("Best guess: "+e))),(0,u.Parsers[e])(t,r)}}f.defaultAtomStyle={line:{}},f.defaultlineWidth=1,f.vdwRadii={H:1.2,He:1.4,Li:1.82,Be:1.53,B:1.92,C:1.7,N:1.55,O:1.52,F:1.47,Ne:1.54,Na:2.27,Mg:1.73,Al:1.84,Si:2.1,P:1.8,S:1.8,Cl:1.75,Ar:1.88,K:2.75,Ca:2.31,Ni:1.63,Cu:1.4,Zn:1.39,Ga:1.87,Ge:2.11,As:1.85,Se:1.9,Br:1.85,Kr:2.02,Rb:3.03,Sr:2.49,Pd:1.63,Ag:1.72,Cd:1.58,In:1.93,Sn:2.17,Sb:2.06,Te:2.06,I:1.98,Xe:2.16,Cs:3.43,Ba:2.68,Pt:1.75,Au:1.66,Hg:1.55,Tl:1.96,Pb:2.02,Bi:2.07,Po:1.97,At:2.02,Rn:2.2,Fr:3.48,Ra:2.83,U:1.86},f.ignoredKeys=new Set(["props","invert","model","frame","byres","expand","within","and","or","not"])},"./src/GLShape.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{GLShape:()=>h,splitMesh:()=>p});var n=r("./src/WebGL/index.ts"),i=r("./src/WebGL/shapes/index.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/colors.ts"),s=r("./src/ProteinSurface4.ts"),l=r("./src/VolumeData.ts"),c=r("./src/GLDraw.ts"),d=r("./src/glcartoon.ts"),u=r("./src/utilities.ts");class h{static finalizeGeo(t){var e=t.updateGeoGroup(0);e.vertices>0&&e.truncateArrayBuffers(!0,!0)}static updateColor(t,e){var r,n,i;e=e||a.CC.color(e),t.colorsNeedUpdate=!0,e.constructor!==Array&&(r=e.r,n=e.g,i=e.b);for(let o in t.geometryGroups){let a=t.geometryGroups[o],s=a.colorArray;for(let t=0,o=a.vertices;t0?d/t:(t+d)/t}h.multiplyScalar(c);var p=new o.Vector3(n.x,n.y,n.z).add(h),f=h.clone().negate();let m=new o.Vector3(n.x,n.y,n.z);t.intersectionShape.cylinder.push(new i.Cylinder(m,p.clone(),s)),t.intersectionShape.sphere.push(new i.Sphere(m,s));var g=[];g[0]=h.clone(),Math.abs(g[0].x)>1e-4?g[0].y+=1:g[0].x+=1,g[0].cross(h),g[0].normalize(),g[4]=g[0].clone(),g[4].crossVectors(g[0],h),g[4].normalize(),g[8]=g[0].clone().negate(),g[12]=g[4].clone().negate(),g[2]=g[0].clone().add(g[4]).normalize(),g[6]=g[4].clone().add(g[8]).normalize(),g[10]=g[8].clone().add(g[12]).normalize(),g[14]=g[12].clone().add(g[0]).normalize(),g[1]=g[0].clone().add(g[2]).normalize(),g[3]=g[2].clone().add(g[4]).normalize(),g[5]=g[4].clone().add(g[6]).normalize(),g[7]=g[6].clone().add(g[8]).normalize(),g[9]=g[8].clone().add(g[10]).normalize(),g[11]=g[10].clone().add(g[12]).normalize(),g[13]=g[12].clone().add(g[14]).normalize(),g[15]=g[14].clone().add(g[0]).normalize();var v,b,y,x,w,_,k,A,T,M,S,C,E,L,z,O,D,I,F,R,P,j,N=u.vertices,B=u.vertexArray,U=u.faceArray,G=u.normalArray,V=u.lineArray;for(b=0,y=g.length;b0){var Y=B[v-3],Z=B[v-2],$=B[v-1],X=new o.Vector3(Y,Z,$),J=new o.Vector3(a.x,a.y,a.z),K=p.clone(),Q=new o.Vector3(q.x,q.y,q.z);t.intersectionShape.triangle.push(new i.Triangle(Q,J,X)),t.intersectionShape.triangle.push(new i.Triangle(X.clone(),K,Q.clone()))}}u.vertices+=48,B[v=3*u.vertices]=n.x,B[v+1]=n.y,B[v+2]=n.z,B[v+3]=p.x,B[v+4]=p.y,B[v+5]=p.z,B[v+6]=a.x,B[v+7]=a.y,B[v+8]=a.z,u.vertices+=3;var tt=u.vertices-3,et=u.vertices-2,rt=u.vertices-1,nt=3*tt,it=3*et,ot=3*rt;for(b=0,y=g.length-1;bs&&(s=d),u>l&&(l=u),h>c&&(c=h)}t.center.set((s+i)/2,(l+o)/2,(c+a)/2),t.radius=t.center.distanceTo({x:s,y:l,z:c}),t.box={min:{x:i,y:o,z:a},max:{x:s,y:l,z:c}}}static addCustomGeo(t,e,r,n,a){var s,l,c,d,u,p,f,m,g,v=e.addGeoGroup(),b=r.vertexArr,y=r.normalArr,x=r.faceArr;v.vertices=b.length,v.faceidx=x.length;var w=v.vertexArray,_=v.colorArray;for(n.constructor!==Array&&(m=n.r,g=n.g,d=n.b),p=0,f=v.vertices;pc?(u.fromCap=0,u.toCap=2):(u.fromCap=2,u.toCap=2),this.addCylinder(u)}}addLine(t){var e,r;e=t.start?new o.Vector3(t.start.x||0,t.start.y||0,t.start.z||0):new o.Vector3(0,0,0),t.end?void 0===(r=new o.Vector3(t.end.x,t.end.y||0,t.end.z||0)).x&&(r.x=3):r=new o.Vector3(3,0,0);var n=this.geo.updateGeoGroup(2),i=n.vertices,a=3*i,s=n.vertexArray;s[a]=e.x,s[a+1]=e.y,s[a+2]=e.z,s[a+3]=r.x,s[a+4]=r.y,s[a+5]=r.z,n.vertices+=2;var l=n.lineArray,c=n.lineidx;l[c]=i,l[c+1]=i+1,n.lineidx+=2;var d=new o.Vector3;this.components.push({centroid:d.addVectors(e,r).multiplyScalar(.5)}),n=this.geo.updateGeoGroup(0),h.updateBoundingFromPoints(this.boundingSphere,this.components,n.vertexArray,n.vertices)}addArrow(t){if(t.start?t.start=new o.Vector3(t.start.x||0,t.start.y||0,t.start.z||0):t.start=new o.Vector3(0,0,0),t.dir instanceof o.Vector3&&"number"==typeof t.length){var e=t.dir.clone().multiplyScalar(t.length).add(t.start);t.end=e}else t.end?(t.end=new o.Vector3(t.end.x,t.end.y||0,t.end.z||0),void 0===t.end.x&&(t.end.x=3)):t.end=new o.Vector3(3,0,0);t.radius=t.radius||.1,t.radiusRatio=t.radiusRatio||1.618034,t.mid=0=0?g[i]-l:l-g[i])>0&&(v[i]|=h.ISDONE);var b=[],y=[];s.MarchingCube.march(v,b,y,{fulltable:!0,voxel:c,unitCube:t.unit,origin:t.origin,matrix:t.matrix,nX:u,nY:p,nZ:f}),!c&&d>0&&s.MarchingCube.laplacianSmooth(d,b,y);var x=[],w=[],_=[];if(e.selectedRegion&&void 0===e.coords&&(e.coords=e.selectedRegion),void 0===e.coords&&void 0!==e.selection&&(n?e.coords=n.selectedAtoms(e.selection):console.log("addIsosurface needs viewer is selection provided.")),void 0!==e.coords){var k=e.coords[0].x,A=e.coords[0].y,T=e.coords[0].z,M=e.coords[0].x,S=e.coords[0].y,C=e.coords[0].z;for(let t=0;tk?k=e.coords[t].x:e.coords[t].xA?A=e.coords[t].y:e.coords[t].yT?T=e.coords[t].z:e.coords[t].zM&&b[t].xS&&b[t].yC&&b[t].z=64e3&&(e.push({vertexArr:[],normalArr:[],faceArr:[]}),t.colorArr&&(e.colorArr=[]),i++)}return e}h.ISDONE=2,h.drawCustom=function(t,e,r){var n=r,i=n.vertexArr,o=n.faceArr;0!==i.length&&0!==o.length||console.warn("Error adding custom shape component: No vertices and/or face indices supplied!");var s=r.color;void 0===s&&(s=t.color),s=a.CC.color(s);for(var l=p(n),c=0,d=l.length;c{"use strict";r.r(e),r.d(e,{GLViewer:()=>m,createStereoViewer:()=>b,createViewer:()=>g,createViewerGrid:()=>v});var n=r("./src/WebGL/index.ts"),i=r("./src/WebGL/math/index.ts"),o=r("./src/colors.ts"),a=r("./src/utilities.ts"),s=r("./src/Gradient.ts"),l=r("./src/GLModel.ts"),c=r("./src/Label.ts"),d=r("./src/GLShape.ts"),u=r("./src/VolumeData.ts"),h=r("./src/ProteinSurface4.ts"),p=r("./src/VolumetricRender.ts"),f=r("./node_modules/upng-js/UPNG.js");class m{getWidth(){let t=this.container,e=t.offsetWidth;if(0==e&&"none"===t.style.display){let r=t.style.position,n=t.style.visibility;t.style.display="block",t.style.visibility="hidden",t.style.position="absolute",e=t.offsetWidth,t.style.display="none",t.style.visibility=n,t.style.position=r}return e}getHeight(){let t=this.container,e=t.offsetHeight;if(0==e&&"none"===t.style.display){let r=t.style.position,n=t.style.visibility;t.style.display="block",t.style.visibility="hidden",t.style.position="absolute",e=t.offsetHeight,t.style.display="none",t.style.visibility=n,t.style.position=r}return e}setupRenderer(){this.renderer=new n.Renderer({antialias:this.config.antialias,preserveDrawingBuffer:!0,premultipliedAlpha:!1,id:this.config.id,row:this.config.row,col:this.config.col,rows:this.config.rows,cols:this.config.cols,canvas:this.config.canvas,containerWidth:this.WIDTH,containerHeight:this.HEIGHT}),this.renderer.domElement.style.width="100%",this.renderer.domElement.style.height="100%",this.renderer.domElement.style.padding="0",this.renderer.domElement.style.position="absolute",this.renderer.domElement.style.top="0px",this.renderer.domElement.style.left="0px",this.renderer.domElement.style.zIndex="0"}initializeScene(){this.scene=new n.Scene,this.scene.fog=new n.Fog(this.bgColor,100,200),this.modelGroup=new n.Object3D,this.rotationGroup=new n.Object3D,this.rotationGroup.useQuaternion=!0,this.rotationGroup.quaternion=new i.Quaternion(0,0,0,1),this.rotationGroup.add(this.modelGroup),this.scene.add(this.rotationGroup);var t=new n.Light(16777215);t.position=new i.Vector3(.2,.2,1).normalize(),t.intensity=1,this.scene.add(t)}initContainer(t){this.container=t,this.WIDTH=this.getWidth(),this.HEIGHT=this.getHeight(),this.ASPECT=this.renderer.getAspect(this.WIDTH,this.HEIGHT),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.container.append(this.renderer.domElement),this.glDOM=this.renderer.domElement,this.nomouse||(this.glDOM.addEventListener("mousedown",this._handleMouseDown.bind(this),{passive:!1}),this.glDOM.addEventListener("touchstart",this._handleMouseDown.bind(this),{passive:!1}),this.glDOM.addEventListener("wheel",this._handleMouseScroll.bind(this),{passive:!1}),this.glDOM.addEventListener("mousemove",this._handleMouseMove.bind(this),{passive:!1}),this.glDOM.addEventListener("touchmove",this._handleMouseMove.bind(this),{passive:!1}),this.glDOM.addEventListener("contextmenu",this._handleContextMenu.bind(this),{passive:!1}))}decAnim(){this.animated--,this.animated<0&&(this.animated=0)}incAnim(){this.animated++}nextSurfID(){var t=0;for(let r in this.surfaces)if(this.surfaces.hasOwnProperty(r)){var e=parseInt(r);isNaN(e)||e>t&&(t=e)}return t+1}setSlabAndFog(){let t=this.camera.position.z-this.rotationGroup.position.z;t<1&&(t=1),this.camera.near=t+this.slabNear,this.camera.near<1&&(this.camera.near=1),this.camera.far=t+this.slabFar,this.camera.near+1>this.camera.far&&(this.camera.far=this.camera.near+1),this.camera.fov=this.fov,this.camera.right=t*Math.tan(Math.PI/180*this.fov),this.camera.left=-this.camera.right,this.camera.top=this.camera.right/this.ASPECT,this.camera.bottom=-this.camera.top,this.camera.updateProjectionMatrix(),this.scene.fog.near=this.camera.near+this.fogStart*(this.camera.far-this.camera.near),this.scene.fog.far=this.camera.far,this.config.disableFog&&(this.scene.fog.near=this.scene.fog.far)}show(t){if(this.renderer.setViewport(),this.scene&&(this.setSlabAndFog(),this.renderer.render(this.scene,this.camera),this.viewChangeCallback&&this.viewChangeCallback(this._viewer.getView()),!t&&this.linkedViewers.length>0))for(var e=this._viewer.getView(),r=0;r0){let e=this.CAMERA_Z-this.config.lowerZoomLimit;t>e&&(t=e)}if(this.config.upperZoomLimit&&this.config.upperZoomLimit>0){let e=this.CAMERA_Z-this.config.upperZoomLimit;tthis.CAMERA_Z-1&&(t=this.CAMERA_Z-1),t}static slerp(t,e,r){if(1==r)return e.clone();if(0==r)return t.clone();let n=t.x*e.x+t.y*e.y+t.z*e.z+t.w*e.w;if(n>.9995){let n=new i.Quaternion(t.x+r*(e.x-t.x),t.y+r*(e.y-t.y),t.z+r*(e.z-t.z),t.w+r*(e.w-t.w));return n.normalize(),n}n<0&&(e=e.clone().multiplyScalar(-1),n=-n),n>1?n=1:n<-1&&(n=-1);var o=Math.acos(n)*r,a=e.clone();a.sub(t.clone().multiplyScalar(n)),a.normalize();var s=Math.cos(o),l=Math.sin(o),c=new i.Quaternion(t.x*s+a.x*l,t.y*s+a.y*l,t.z*s+a.z*l,t.w*s+a.w*l);return c.normalize(),c}constructor(t,e={}){if(this.nomouse=!1,this.glDOM=null,this.models=[],this.surfaces={},this.shapes=[],this.labels=[],this.clickables=[],this.hoverables=[],this.contextMenuEnabledObjects=[],this.current_hover=null,this.hoverDuration=500,this.longTouchDuration=1e3,this.viewer_frame=0,this.viewChangeCallback=null,this.stateChangeCallback=null,this.NEAR=1,this.FAR=800,this.CAMERA_Z=150,this.fov=20,this.linkedViewers=[],this.renderer=null,this.control_all=!1,this.scene=null,this.rotationGroup=null,this.modelGroup=null,this.fogStart=.4,this.slabNear=-50,this.slabFar=50,this.cq=new i.Quaternion(0,0,0,1),this.dq=new i.Quaternion(0,0,0,1),this.animated=0,this.animationTimers=new Set,this.isDragging=!1,this.mouseStartX=0,this.mouseStartY=0,this.touchDistanceStart=0,this.touchHold=!1,this.currentModelPos=0,this.cz=0,this.cslabNear=0,this.cslabFar=0,this.userContextMenuHandler=null,this.config=e,this.callback=this.config.callback,this.defaultcolors=this.config.defaultcolors,this.defaultcolors||(this.defaultcolors=o.elementColors.defaultColors),this.nomouse=this.config.nomouse,this.bgColor=0,this.config.backgroundColor=this.config.backgroundColor||"#ffffff",void 0!==this.config.backgroundColor&&(this.bgColor=o.CC.color(this.config.backgroundColor).getHex()),this.config.backgroundAlpha=null==this.config.backgroundAlpha?1:this.config.backgroundAlpha,this.camerax=0,void 0!==this.config.camerax&&(this.camerax=parseFloat(this.config.camerax)),this._viewer=this,this.container=t,null!=this.config.hoverDuration&&(this.hoverDuration=this.config.hoverDuration),void 0===this.config.antialias&&(this.config.antialias=!0),void 0===this.config.cartoonQuality&&(this.config.cartoonQuality=10),this.WIDTH=this.getWidth(),this.HEIGHT=this.getHeight(),this.setupRenderer(),this.row=null==this.config.row?0:this.config.row,this.col=null==this.config.col?0:this.config.col,this.cols=this.config.cols,this.rows=this.config.rows,this.viewers=this.config.viewers,this.control_all=this.config.control_all,this.ASPECT=this.renderer.getAspect(this.WIDTH,this.HEIGHT),this.camera=new n.Camera(this.fov,this.ASPECT,this.NEAR,this.FAR,this.config.orthographic),this.camera.position=new i.Vector3(this.camerax,0,this.CAMERA_Z),this.lookingAt=new i.Vector3,this.camera.lookAt(this.lookingAt),this.raycaster=new n.Raycaster(new i.Vector3(0,0,0),new i.Vector3(0,0,0)),this.projector=new n.Projector,this.initializeScene(),this.renderer.setClearColorHex(this.bgColor,this.config.backgroundAlpha),this.scene.fog.color=o.CC.color(this.bgColor),document.body.addEventListener("mouseup",this._handleMouseUp.bind(this)),document.body.addEventListener("touchend",this._handleMouseUp.bind(this)),this.initContainer(this.container),this.config.style&&this.setViewStyle(this.config),window.addEventListener("resize",this.resize.bind(this)),void 0!==window.ResizeObserver&&(this.divwatcher=new window.ResizeObserver(this.resize.bind(this)),this.divwatcher.observe(this.container)),void 0!==window.IntersectionObserver){let t=(t,e)=>{t.forEach((t=>{t.isIntersecting&&this.resize()}))};this.intwatcher=new window.IntersectionObserver(t),this.intwatcher.observe(this.container)}try{"function"==typeof this.callback&&this.callback(this)}catch(t){console.log("error with glviewer callback: "+t)}}targetedObjects(t,e,r){var n={x:t,y:e,z:-1};return Array.isArray(r)||(r=this.selectedAtoms(r)),0==r.length?[]:(this.raycaster.setFromCamera(n,this.camera),this.raycaster.intersectObjects(this.modelGroup,r))}modelToScreen(t){let e=!1;Array.isArray(t)||(t=[t],e=!0);let r=this.renderer.getXRatio(),n=this.renderer.getYRatio(),o=this.col,a=this.row,s=o*(this.WIDTH/r),l=(n-a-1)*(this.HEIGHT/n),c=[],d=this.canvasOffset();return t.forEach((t=>{let e=new i.Vector3(t.x,t.y,t.z);e.applyMatrix4(this.modelGroup.matrixWorld),this.projector.projectVector(e,this.camera);let o=this.WIDTH/r*(e.x+1)/2+d.left+s,a=-this.HEIGHT/n*(e.y-1)/2+d.top+l;c.push({x:o,y:a})})),e&&(c=c[0]),c}screenOffsetToModel(t,e,r){var n=t/this.WIDTH,o=e/this.HEIGHT,a=void 0===r?this.rotationGroup.position.z:r,s=this.rotationGroup.quaternion,l=new i.Vector3(0,0,a);return this.projector.projectVector(l,this.camera),l.x+=2*n,l.y-=2*o,this.projector.unprojectVector(l,this.camera),l.z=0,l.applyQuaternion(s),l}screenToModelDistance(t,e){let r=this.canvasOffset(),n=new i.Vector3(e.x,e.y,e.z);n.applyMatrix4(this.modelGroup.matrixWorld);let o=n.clone();this.projector.projectVector(n,this.camera);let a=new i.Vector3(2*(t.x-r.left)/this.WIDTH-1,2*(t.y-r.top)/-this.HEIGHT+1,n.z);return this.projector.unprojectVector(a,this.camera),a.distanceTo(o)}setViewChangeCallback(t){"function"!=typeof t&&null!=t||(this.viewChangeCallback=t)}setStateChangeCallback(t){"function"!=typeof t&&null!=t||(this.stateChangeCallback=t)}getConfig(){return this.config}setConfig(t){this.config=t}getInternalState(){var t={models:[],surfaces:[],shapes:[],labels:[]};for(let e=0;e{e.getCanvas().toBlob((function(e){e.arrayBuffer().then(t)}),"image/png")}))),n+=1,n==t&&(e.viewChangeCallback=i,Promise.all(o).then((t=>{let n=[];for(let e=0;e0&&(this.hoverTimeout=setTimeout((function(){a.handleHoverSelection(o.x,o.y,t)}),this.hoverDuration)),this.isDragging)){t.targetTouches&&(t.targetTouches.length>1||1===t.targetTouches.length&&!this.closeEnoughForClick(t))&&clearTimeout(this.longTouchTimeout);var l=(e-this.mouseStartX)/this.WIDTH,c=(r-this.mouseStartY)/this.HEIGHT;0!=this.touchDistanceStart&&t.targetTouches&&2==t.targetTouches.length?(s=2,c=2*(this.calcTouchDistance(t)-this.touchDistanceStart)/(this.WIDTH+this.HEIGHT)):t.targetTouches&&3==t.targetTouches.length&&(s=1),l*=n,c*=i;var d,u=Math.hypot(l,c);if(3==s||3==this.mouseButton&&t.ctrlKey)this.slabNear=this.cslabNear+100*l,this.slabFar=this.cslabFar-100*c;else if(2==s||3==this.mouseButton||t.shiftKey)(d=.85*(this.CAMERA_Z-this.rotationGroup.position.z))<80&&(d=80),this.rotationGroup.position.z=this.cz+c*d,this.rotationGroup.position.z=this.adjustZoomToLimits(this.rotationGroup.position.z);else if(1==s||2==this.mouseButton||t.ctrlKey){var h=this.screenOffsetToModel(n*(e-this.mouseStartX),i*(r-this.mouseStartY));this.modelGroup.position.addVectors(this.currentModelPos,h)}else if((0===s||1==this.mouseButton)&&0!==u){var p=Math.sin(u*Math.PI)/u;this.dq.x=Math.cos(u*Math.PI),this.dq.y=0,this.dq.z=p*l,this.dq.w=-p*c,this.rotationGroup.quaternion.set(1,0,0,0),this.rotationGroup.quaternion.multiply(this.dq),this.rotationGroup.quaternion.multiply(this.cq)}this.show()}}_handleContextMenu(t){if(t.preventDefault(),this.closeEnoughForClick(t)){var e=this.mouseStartX,r=this.mouseStartY,n=this.canvasOffset();let o=this.mouseXY(e,r),a=o.x,s=o.y,l=this.targetedObjects(a,s,this.contextMenuEnabledObjects);var i=null;l.length&&(i=l[0].clickable),n=this.canvasOffset(),e=this.mouseStartX-n.left,r=this.mouseStartY-n.top,this.userContextMenuHandler&&(this.userContextMenuHandler(i,e,r,l,t),this.isDragging=!1)}}setContainer(t){let e=(0,a.getElement)(t)||this.container;return this.initContainer(e),this}setBackgroundColor(t,e){(void 0===e||e<0||e>1)&&(e=1);var r=o.CC.color(t);return this.scene.fog.color=r,this.bgColor=r.getHex(),this.renderer.setClearColorHex(r.getHex(),e),this.show(),this}setProjection(t){this.camera.ortho="orthographic"===t,this.setSlabAndFog()}setViewStyle(t){if("outline"===t.style){var e={};t.color&&(e.color=o.CC.color(t.color)),t.width&&(e.width=t.width),this.renderer.enableOutline(e)}else this.renderer.disableOutline();return this}updateSize(){this.renderer.setSize(this.WIDTH,this.HEIGHT),this.ASPECT=this.renderer.getAspect(this.WIDTH,this.HEIGHT),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.camera.aspect=this.ASPECT,this.camera.updateProjectionMatrix()}setWidth(t){return this.WIDTH=t||this.WIDTH,this.updateSize(),this}setHeight(t){return this.HEIGHT=t||this.HEIGHT,this.updateSize(),this}resize(){this.WIDTH=this.getWidth(),this.HEIGHT=this.getHeight();let t=!1;if(console.log("resize "+this.container.id),console.log("lost "+this.renderer.isLost()+" w"+this.WIDTH+" h"+this.HEIGHT),this.renderer.isLost()&&this.WIDTH>0&&this.HEIGHT>0){let e=!1,r=this.container.querySelector("canvas");r&&r!=this.renderer.getCanvas()?this.config.canvas=r:(r.remove(),this.config&&null!=this.config.canvas&&(delete this.config.canvas,e=!0)),this.setupRenderer(),this.initContainer(this.container),this.renderer.setClearColorHex(this.bgColor,this.config.backgroundAlpha),t=!0,e&&(this.config.canvas=this.renderer.getCanvas()),console.log("regen "+t+" resetcanvas "+e)}if(0==this.WIDTH||0==this.HEIGHT?this.animated&&this._viewer.pauseAnimate():this.animated&&this._viewer.resumeAnimate(),this.updateSize(),t){let t=this.renderer.supportedExtensions();if(t.regen=!0,this.viewers)for(let e=0,r=this.viewers.length;e=0&&(this.modelGroup.remove(this.labels[r].sprite),(this.viewer_frame<0||this.labels[r].frame==this.viewer_frame)&&this.modelGroup.add(this.labels[r].sprite));for(r in this.surfaces)if(this.surfaces.hasOwnProperty(r)){var a=this.surfaces[r];for(i=0;i1||1==a[i].symmetries.length&&!a[i].symmetries[i].isIdentity()){var c,d=new n.Object3D;for(c=0;c0?this.animateMotion(e,r,this.modelGroup.position,this.adjustZoomToLimits(i),this.rotationGroup.quaternion,this.lookingAt):(this.rotationGroup.position.z=this.adjustZoomToLimits(i),this.show()),this}translate(t,e,r=0,n=!1){var o=t/this.WIDTH,a=e/this.HEIGHT,s=new i.Vector3(0,0,-this.CAMERA_Z);this.projector.projectVector(s,this.camera),s.x-=o,s.y-=a,this.projector.unprojectVector(s,this.camera),s.z=0;var l=this.lookingAt.clone().add(s);return r>0?this.animateMotion(r,n,this.modelGroup.position,this.rotationGroup.position.z,this.rotationGroup.quaternion,l):(this.lookingAt=l,this.camera.lookAt(this.lookingAt),this.show()),this}translateScene(t,e,r=0,n=!1){var i=this.screenOffsetToModel(t,e),o=this.modelGroup.position.clone().add(i);return r>0?this.animateMotion(r,n,this.modelGroup.position,this.rotationGroup.position.z,this.rotationGroup.quaternion,this.lookingAt):(this.modelGroup.position=o,this.show()),this}fitSlab(t){t=t||{};var e=this.getAtomsFromSel(t),r=(0,a.getExtent)(e),n=r[1][0]-r[0][0],i=r[1][1]-r[0][1],o=r[1][2]-r[0][2],s=Math.hypot(n,i,o);return s<5&&(s=5),this.slabNear=-s/1.9,this.slabFar=s/2,this}center(t={},e=0,r=!1){var n,o,s=this.getAtomsFromSel(t),l=(0,a.getExtent)(s);(0,a.isEmptyObject)(t)?(this.shapes.forEach((t=>{if(t&&t.boundingSphere&&t.boundingSphere.center){var e=t.boundingSphere.center,r=t.boundingSphere.radius;r>0?(s.push(new i.Vector3(e.x+r,e.y,e.z)),s.push(new i.Vector3(e.x-r,e.y,e.z)),s.push(new i.Vector3(e.x,e.y+r,e.z)),s.push(new i.Vector3(e.x,e.y-r,e.z)),s.push(new i.Vector3(e.x,e.y,e.z+r)),s.push(new i.Vector3(e.x,e.y,e.z-r))):s.push(e)}})),l=(0,a.getExtent)(s),n=s,o=l):(n=this.getAtomsFromSel({}),o=(0,a.getExtent)(n));var c=new i.Vector3(l[2][0],l[2][1],l[2][2]),d=o[1][0]-o[0][0],u=o[1][1]-o[0][1],h=o[1][2]-o[0][2],p=Math.hypot(d,u,h);p<5&&(p=5),this.slabNear=-p/1.9,this.slabFar=p/2,d=l[1][0]-l[0][0],u=l[1][1]-l[0][1],h=l[1][2]-l[0][2],(p=Math.hypot(d,u,h))<5&&(p=5);for(var f=25,m=0;mf&&(f=g)}p=2*Math.sqrt(f);var v=c.clone().multiplyScalar(-1);return e>0?this.animateMotion(e,r,v,this.rotationGroup.position.z,this.rotationGroup.quaternion,this.lookingAt):(this.modelGroup.position=v,this.show()),this}zoomTo(t={},e=0,r=!1){let n=this.getAtomsFromSel(t),o=(0,a.getExtent)(n),s=o;if((0,a.isEmptyObject)(t)){let t=n&&n.length;if(this.shapes.forEach((t=>{if(t&&t.boundingSphere)if(t.boundingSphere.box){let e=t.boundingSphere.box;n.push(new i.Vector3(e.min.x,e.min.y,e.min.z)),n.push(new i.Vector3(e.max.x,e.max.y,e.max.z))}else if(t.boundingSphere.center){var e=t.boundingSphere.center,r=t.boundingSphere.radius;r>0?(n.push(new i.Vector3(e.x+r,e.y,e.z)),n.push(new i.Vector3(e.x-r,e.y,e.z)),n.push(new i.Vector3(e.x,e.y+r,e.z)),n.push(new i.Vector3(e.x,e.y-r,e.z)),n.push(new i.Vector3(e.x,e.y,e.z+r)),n.push(new i.Vector3(e.x,e.y,e.z-r))):n.push(e)}})),s=(0,a.getExtent)(n),!t)for(let t=0;t<3;t++)o[2][t]=(s[0][t]+s[1][t])/2}else{let t=this.getAtomsFromSel({});s=(0,a.getExtent)(t)}var l=new i.Vector3(o[2][0],o[2][1],o[2][2]),c=s[1][0]-s[0][0],d=s[1][1]-s[0][1],u=s[1][2]-s[0][2],h=Math.hypot(c,d,u);h<5&&(h=5),this.slabNear=-h/1.9,this.slabFar=h/2,0===Object.keys(t).length&&(this.slabNear=Math.min(2*-h,-50),this.slabFar=Math.max(2*h,50));var p=this.config.minimumZoomToDistance||5;c=o[1][0]-o[0][0],d=o[1][1]-o[0][1],u=o[1][2]-o[0][2],(h=Math.hypot(c,d,u))f&&(f=g)}h=2*Math.sqrt(f);var v=l.clone().multiplyScalar(-1),b=-(.5*h/Math.tan(Math.PI/180*this.camera.fov/2)-this.CAMERA_Z);return b=this.adjustZoomToLimits(b),e>0?this.animateMotion(e,r,v,b,this.rotationGroup.quaternion,this.lookingAt):(this.modelGroup.position=v,this.rotationGroup.position.z=b,this.show()),this}setSlab(t,e){this.slabNear=t,this.slabFar=e}getSlab(){return{near:this.slabNear,far:this.slabFar}}addLabel(t,e={},r,n=!1){if(r){var i=(0,a.getExtent)(this.getAtomsFromSel(r));e.position={x:i[2][0],y:i[2][1],z:i[2][2]}}var o=new c.Label(t,e);return o.setContext(),this.modelGroup.add(o.sprite),this.labels.push(o),n||this.show(),o}addResLabels(t,e,r=!1){let n=this.labels.length;return this.applyToModels("addResLabels",t,this,e,r),this.show(),this.labels.slice(n)}addPropertyLabels(t,e,r){return this.applyToModels("addPropertyLabels",t,e,this,r),this.show(),this}removeLabel(t){for(var e=0;e0&&void 0===this.shapes[this.shapes.length-1];)this.shapes.pop();return this}removeAllShapes(){for(var t=0;t-1e-4&&o.x<1.0001&&o.y>-1e-4&&o.y<1.0001&&o.z>-1e-4&&o.z<1.0001)}}for(let o=0;oo){t.start=r,t.end=n,e.addLine(t);break}u.addVectors(r,c),t.start=r,t.end=u,e.addLine(t),r=u.clone(),h+=a,u.addVectors(r,d),r=u.clone(),h+=s}return e.finalize(),e}addCustom(t){t=t||{};var e=new d.GLShape(t);return e.shapePosition=this.shapes.length,e.addCustom(t),this.shapes.push(e),e.finalize(),e}addVolumetricData(t,e,r={}){var n=new u.VolumeData(t,e);return r.hasOwnProperty("transferfn")?this.addVolumetricRender(n,r):this.addIsosurface(n,r)}addIsosurface(t,e={},r){var n=new d.GLShape(e);return n.shapePosition=this.shapes.length,n.addIsosurface(t,e,r,this),this.shapes.push(n),n}addVolumetricRender(t,e){e=e||{};var r=new p.GLVolumetricRender(t,e,this);return r.shapePosition=this.shapes.length,this.shapes.push(r),r}hasVolumetricRender(){return this.renderer.supportsVolumetric()}enableFog(t){t?this.scene.fog=new n.Fog(this.bgColor,100,200):(this.config.disableFog=!0,this.show())}setFrame(t){this.viewer_frame=t;let e=this;return new Promise((function(r){var n=e.models.map((function(r){return r.setFrame(t,e)}));Promise.all(n).then((function(){r()}))}))}getFrame(){return this.viewer_frame}getNumFrames(){var t=0;for(let e=0;et&&(t=this.models[e].getNumFrames());for(let e=0;e=t&&(t=this.shapes[e].frame+1);for(let e=0;e=t&&(t=this.labels[e].frame+1);return t}animate(t){this.incAnim();var e=100,r="forward",n=1/0;(t=t||{}).interval&&(e=t.interval),t.loop&&(r=t.loop),t.reps&&(n=t.reps);var i=this.getNumFrames(),o=this,s=0;t.startFrame&&(s=t.startFrame%i);var l=1;t.step&&(n/=l=t.step);var c,d,u=0,h=i*n,p=new Date,f=function(t){p=new Date,"forward"==t?o.setFrame(s).then((function(){s=(s+l)%i,c()})):"backward"==t?o.setFrame(i-1-s).then((function(){s=(s+l)%i,c()})):o.setFrame(s).then((function(){l*=(s+=l)%(i-1)==0?-1:1,c()}))};return c=function(){if(o.render(),o.getCanvas().isConnected)if(++u>=h||!o.isAnimated())d.cancel(),o.animationTimers.delete(d),o.decAnim();else{var t=e-((new Date).getTime()-p.getTime());t=t>0?t:0,o.animationTimers.delete(d),d=new a.PausableTimer(f,t,r),o.animationTimers.add(d)}else o.stopAnimate()},d=new a.PausableTimer(f,0,r),this.animationTimers.add(d),this}stopAnimate(){return this.animated=0,this.animationTimers.forEach((function(t){t.cancel()})),this.animationTimers=new Set,this}pauseAnimate(){return this.animationTimers.forEach((function(t){t.pause()})),this}resumeAnimate(){return this.animationTimers.forEach((function(t){t.resume()})),this}isAnimated(){return this.animated>0}getModelOpt(t){return t&&!t.defaultcolors?(t.defaultcolors=this.defaultcolors,t.cartoonQuality=t.cartoonQuality||this.config.cartoonQuality):void 0===t&&(t={defaultcolors:this.defaultcolors,cartoonQuality:this.config.cartoonQuality}),t}addModel(t,e="",r){r=this.getModelOpt(r);var n=new l.GLModel(this.models.length,r);return n.addMolData(t,e,r),this.models.push(n),n}addModels(t,e,r){(r=this.getModelOpt(r)).multimodel=!0,r.frames=!0;for(var n=l.GLModel.parseMolData(t,e,r),i=0;i0&&void 0===this.models[this.models.length-1];)this.models.pop();return this}}removeAllModels(){for(var t=0;te[1][0]||n.ye[1][1]||n.ze[1][2]||r.push(n))}return r}static volume(t){return(t[1][0]-t[0][0])*(t[1][1]-t[0][1])*(t[1][2]-t[0][2])}carveUpExtent(t,e,r){let n=[],i={};for(let t=0,r=e.length;tn&&r>i?0:n>r&&n>i?1:2;var o=a(t),l=a(t),c=(t[1][e]-t[0][e])/2+t[0][e];o[1][e]=c,l[0][e]=c;var d=s(o),u=s(l);return d.concat(u)},l=s(t);for(let t=0,i=l.length;t0)for(let t=0,e=u.length;t1||1==_.length&&!_[0].isIdentity()){w=!0;break}}var k=function(t,r,n){var i;b=l?m.shallowCopy(f.getAtomsFromSel(l)):n;var o=(0,a.getExtent)(n,!0);if(e.map&&e.map.prop){var c=e.map.prop;let t=(0,s.getGradient)(e.map.scheme||e.map.gradient||new s.Gradient.RWB),r=t.range();r||(r=(0,a.getPropertyRange)(n,c)),e.colorscheme={prop:c,gradient:t}}for(let t=0,n=r.length;t0){var x=(0,a.getExtent)(b,!0);y.sort((function(t,e){var r=function(t,e){var r=t.extent,n=r[1][0]-r[0][0],i=r[1][1]-r[0][1],o=r[1][2]-r[0][2],a=n-e[2][0];a*=a;var s=i-e[2][1];s*=s;var l=o-e[2][2];return a+s+l*l};return r(t,x)-r(e,x)}))}var w=[];for(let t=0,e=r.length;t0&&(A.push({geo:new n.Geometry(!0),mat:p,done:!1,finished:!1,symmetries:this.models[x].getSymmetries()}),C.push(k(A[A.length-1],M[x],S[x])));T=Promise.all(C)}else A.push({geo:new n.Geometry(!0),mat:p,done:!1,finished:!1,symmetries:[new i.Matrix4]}),T=k(A[A.length-1],v,y);return this.surfaces[u]=A,T.surfid=u,c&&"function"==typeof c?(T.then((function(t){c(t)})),u):T}setSurfaceMaterialStyle(t,e){if((0,a.adjustVolumeStyle)(e),this.surfaces[t]){var r=this.surfaces[t];r.style=e;for(var i=0;i0?this.camera.position.x=r*Math.tan(Math.PI/180*e):this.camera.position.x=-r*Math.tan(Math.PI/180*e),this.camera.lookAt(new i.Vector3(0,0,this.rotationGroup.position.z)),this.camera.position.x}setDefaultCartoonQuality(t){this.config.cartoonQuality=t}}function g(t,e){if(t=(0,a.getElement)(t)){e=e||{};try{return new m(t,e)}catch(t){throw"error creating viewer: "+t}}}function v(t,e={},r={}){if(t=(0,a.getElement)(t)){var n=[],i=document.createElement("canvas");r.rows=e.rows,r.cols=e.cols,r.control_all=null!=e.control_all&&e.control_all,t.appendChild(i);try{for(var o=0;o{"use strict";r.r(e),r.d(e,{CustomLinear:()=>d,Gradient:()=>h,GradientType:()=>i,ROYGB:()=>l,RWB:()=>s,Sinebow:()=>c,builtinGradients:()=>u,getGradient:()=>a,normalizeValue:()=>o});var n=r("./src/colors.ts");class i{}function o(t,e,r){return e>=t?(re&&(r=e),{lo:t,hi:e,val:r}):(r>t&&(r=t),r=2?(this.max=t[1],this.min=t[0]):t&&e&&!Array.isArray(t)&&(this.min=t,this.max=e)}range(){return void 0!==this.min&&void 0!==this.max?[this.min,this.max]:null}valueToHex(t,e){var r,n;if(t=this.mult*t,e?(r=e[0],n=e[1]):(r=this.min,n=this.max),void 0===t)return 16777215;var i=o(r,n,t);r=i.lo;var a,s=n=i.hi;return(t=i.val)<(s=e&&void 0!==e[2]?e[2]:void 0!==this.mid?this.mid:(r+n)/2)?16711680+256*(a=Math.floor(255*Math.sqrt((t-r)/(s-r))))+a:t>s?65536*(a=Math.floor(255*Math.sqrt(1-(t-s)/(n-s))))+256*a+255:16777215}}class l extends i{constructor(t,e){super(),this.gradient="ROYGB",this.mult=1,this.min=t,this.max=e,void 0===e&&Array.isArray(t)&&t.length>=2?(this.max=t[1],this.min=t[0]):t&&e&&!Array.isArray(t)&&(this.min=t,this.max=e)}valueToHex(t,e){var r,n;if(t=this.mult*t,e?(r=e[0],n=e[1]):(r=this.min,n=this.max),void 0===t)return 16777215;var i=o(r,n,t),a=((r=i.lo)+(n=i.hi))/2,s=(r+a)/2,l=(a+n)/2;return(t=i.val)=2&&(this.max=t[1],this.min=t[0]),e=2?(this.max=t[1],this.min=t[0],i=e):(this.min=t,this.max=e,i=r),i)for(let t of i)this.colors.push(n.CC.color(t));else this.colors.push(n.CC.color(0))}range(){return void 0!==this.min&&void 0!==this.max?[this.min,this.max]:null}valueToHex(t,e){var r,i;if(e?(r=e[0],i=e[1]):(r=this.min,i=this.max),void 0===t)return 16777215;var a=o(r,i,t);r=a.lo,i=a.hi,t=a.val;let s=this.colors.length,l=(i-r)/s,c=Math.min(Math.floor((t-r)/l),s-1),d=Math.min(c+1,s-1),u=(t-r-c*l)/l,h=this.colors[c],p=this.colors[d];return new n.Color(h.r+u*(p.r-h.r),h.g+u*(p.g-h.g),h.b+u*(p.b-h.b)).getHex()}}const u={rwb:s,RWB:s,roygb:l,ROYGB:l,sinebow:c,linear:d};class h extends i{valueToHex(t,e){return 0}range(){return null}}h.RWB=s,h.ROYGB=l,h.Sinebow=c,h.CustomLinear=d,h.builtinGradients=u,h.normalizeValue=o,h.getGradient=a},"./src/Label.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Label:()=>l,LabelCount:()=>a});var n=r("./src/WebGL/index.ts"),i=r("./src/Gradient.ts"),o=r("./src/colors.ts");let a=0;function s(t,e,r){var n=r;return void 0!==t&&(t instanceof o.Color?n=t.scaled():void 0!==(n=o.CC.color(t)).scaled&&(n=n.scaled())),void 0!==e&&(n.a=parseFloat(e)),n}class l{constructor(t,e){this.id=a++,this.stylespec=e||{},this.canvas=document.createElement("canvas"),this.canvas.width=134,this.canvas.height=35,this.context=this.canvas.getContext("2d"),this.sprite=new n.Sprite,this.text=t,this.frame=this.stylespec.frame}getStyle(){return this.stylespec}setContext(){var t=this.stylespec,e=void 0!==t.useScreen&&t.useScreen,r=t.showBackground;"0"!==r&&"false"!==r||(r=!1),void 0===r&&(r=!0);var o=t.font?t.font:"sans-serif",a=parseInt(t.fontSize)?parseInt(t.fontSize):18,l=s(t.fontColor,t.fontOpacity,{r:255,g:255,b:255,a:1}),c=t.padding?t.padding:4,d=t.borderThickness?t.borderThickness:0,u=s(t.backgroundColor,t.backgroundOpacity,{r:0,g:0,b:0,a:1}),h=s(t.borderColor,t.borderOpacity,u),p=t.position?t.position:{x:-10,y:1,z:1},f=void 0===t.inFront||t.inFront;"false"!==f&&"0"!==f||(f=!1);var m=t.alignment||n.SpriteAlignment.topLeft;"string"==typeof m&&m in n.SpriteAlignment&&(m=n.SpriteAlignment[m]);var g="";t.bold&&(g="bold "),this.context.font=g+a+"px "+o;var v=this.context.measureText(this.text).width;r||(d=0);var b=v+2.5*d+2*c,y=1.25*a+2*d+2*c;if(t.backgroundImage){var x=t.backgroundImage,w=t.backgroundWidth?t.backgroundWidth:x.width,_=t.backgroundHeight?t.backgroundHeight:x.height;w>b&&(b=w),_>y&&(y=_)}if(this.canvas.width=b,this.canvas.height=y,this.context.clearRect(0,0,this.canvas.width,this.canvas.height),g="",t.bold&&(g="bold "),this.context.font=g+a+"px "+o,this.context.fillStyle="rgba("+u.r+","+u.g+","+u.b+","+u.a+")",this.context.strokeStyle="rgba("+h.r+","+h.g+","+h.b+","+h.a+")",t.backgroundGradient){let e=this.context.createLinearGradient(0,y/2,b,y/2),r=i.Gradient.getGradient(t.backgroundGradient),n=r.range(),o=-1,a=1;n&&(o=n[0],a=n[1]);let l=a-o;for(let t=0;t<1.01;t+=.1){let n=s(r.valueToHex(o+l*t)),i="rgba("+n.r+","+n.g+","+n.b+","+n.a+")";e.addColorStop(t,i)}this.context.fillStyle=e}this.context.lineWidth=d,r&&function(t,e,r,n,i,o,a){t.beginPath(),t.moveTo(e+6,r),t.lineTo(e+n-6,r),t.quadraticCurveTo(e+n,r,e+n,r+6),t.lineTo(e+n,r+i-6),t.quadraticCurveTo(e+n,r+i,e+n-6,r+i),t.lineTo(e+6,r+i),t.quadraticCurveTo(e,r+i,e,r+i-6),t.lineTo(e,r+6),t.quadraticCurveTo(e,r,e+6,r),t.closePath(),t.fill(),a&&t.stroke()}(this.context,d,d,b-2*d,y-2*d,0,d>0),t.backgroundImage&&this.context.drawImage(x,0,0,b,y),this.context.fillStyle="rgba("+l.r+","+l.g+","+l.b+","+l.a+")",this.context.fillText(this.text,d+c,a+d+c,v);var k=new n.Texture(this.canvas);k.needsUpdate=!0,this.sprite.material=new n.SpriteMaterial({map:k,useScreenCoordinates:e,alignment:m,depthTest:!f,screenOffset:t.screenOffset||null}),this.sprite.scale.set(1,1,1),this.sprite.position.set(p.x,p.y,p.z)}dispose(){void 0!==this.sprite.material.map&&this.sprite.material.map.dispose(),void 0!==this.sprite.material&&this.sprite.material.dispose()}}},"./src/ProteinSurface4.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{MarchingCube:()=>l,MarchingCubeInitializer:()=>s,PointGrid:()=>c,ProteinSurface:()=>d,SurfaceType:()=>n,setSyncSurface:()=>a,syncSurface:()=>o});var n,i=r("./src/WebGL/math/index.ts");!function(t){t[t.VDW=1]="VDW",t[t.MS=2]="MS",t[t.SAS=3]="SAS",t[t.SES=4]="SES"}(n||(n={}));var o=!1;function a(t){o=t}(window.navigator.userAgent.indexOf("MSIE ")>=0||window.navigator.userAgent.indexOf("Trident/")>=0)&&(o=!0);class s{constructor(){this.ISDONE=2,this.edgeTable=new Uint32Array([0,0,0,0,0,0,0,2816,0,0,0,1792,0,3328,3584,3840,0,0,0,138,0,21,0,134,0,0,0,652,0,2067,3865,3600,0,0,0,42,0,0,0,294,0,0,21,28,0,3875,1049,3360,0,168,162,170,0,645,2475,2210,0,687,293,172,4010,3747,3497,3232,0,0,0,0,0,69,0,900,0,0,0,1792,138,131,1608,1920,0,81,0,2074,84,85,84,86,0,81,0,3676,330,1105,1881,1616,0,0,0,42,0,69,0,502,0,0,21,3580,138,2035,1273,1520,2816,104,2337,106,840,581,367,102,2816,3695,3429,3180,1898,1635,1385,1120,0,0,0,0,0,0,0,3910,0,0,69,588,42,2083,41,2880,0,0,0,1722,0,2293,4095,3830,0,255,757,764,2538,2291,3065,2800,0,0,81,338,0,3925,1119,3414,84,855,85,340,2130,2899,89,2384,1792,712,194,1162,4036,3781,3535,3270,708,719,197,204,3018,2755,2505,2240,0,0,0,0,168,420,168,1958,162,162,676,2988,170,163,680,928,3328,3096,3328,3642,52,53,1855,1590,2340,2111,2869,2620,298,51,825,560,3584,3584,3090,3482,1668,1941,1183,1430,146,2975,2069,2460,154,915,153,400,3840,3592,3329,3082,1796,1541,1295,1030,2818,2575,2309,2060,778,515,265,0]),this.triTable=[[],[],[],[],[],[],[],[11,9,8],[],[],[],[8,10,9],[],[10,8,11],[9,11,10],[8,10,9,8,11,10],[],[],[],[1,7,3],[],[4,2,0],[],[2,1,7],[],[],[],[2,7,3,2,9,7],[],[1,4,11,1,0,4],[3,8,0,11,9,4,11,10,9],[4,11,9,11,10,9],[],[],[],[5,3,1],[],[],[],[2,5,8,2,1,5],[],[],[2,4,0],[3,2,4],[],[0,9,1,8,10,5,8,11,10],[3,4,0,3,10,4],[5,8,10,8,11,10],[],[3,5,7],[7,1,5],[1,7,3,1,5,7],[],[9,2,0,9,7,2],[0,3,8,1,7,11,1,5,7],[11,1,7,1,5,7],[],[9,1,0,5,3,2,5,7,3],[8,2,5,8,0,2],[2,5,3,5,7,3],[3,9,1,3,8,9,7,11,10,7,10,5],[9,1,0,10,7,11,10,5,7],[3,8,0,7,10,5,7,11,10],[11,5,7,11,10,5],[],[],[],[],[],[0,6,2],[],[7,2,9,7,9,8],[],[],[],[8,10,9],[7,1,3],[7,1,0],[6,9,3,6,10,9],[7,10,8,10,9,8],[],[6,0,4],[],[11,1,4,11,3,1],[2,4,6],[2,0,4,2,4,6],[2,4,6],[1,4,2,4,6,2],[],[6,0,4],[],[2,11,3,6,9,4,6,10,9],[8,6,1,8,1,3],[10,0,6,0,4,6],[8,0,3,9,6,10,9,4,6],[10,4,6,10,9,4],[],[],[],[5,3,1],[],[0,6,2],[],[7,4,8,5,2,1,5,6,2],[],[],[2,4,0],[7,4,8,2,11,3,10,5,6],[7,1,3],[5,6,10,0,9,1,8,7,4],[5,6,10,7,0,3,7,4,0],[10,5,6,4,8,7],[9,11,8],[3,5,6],[0,5,11,0,11,8],[6,3,5,3,1,5],[3,9,6,3,8,9],[9,6,0,6,2,0],[0,3,8,2,5,6,2,1,5],[1,6,2,1,5,6],[9,11,8],[1,0,9,6,10,5,11,3,2],[6,10,5,2,8,0,2,11,8],[3,2,11,10,5,6],[10,5,6,9,3,8,9,1,3],[0,9,1,5,6,10],[8,0,3,10,5,6],[10,5,6],[],[],[],[],[],[],[],[1,10,2,9,11,6,9,8,11],[],[],[6,0,2],[3,6,9,3,2,6],[3,5,1],[0,5,1,0,11,5],[0,3,5],[6,9,11,9,8,11],[],[],[],[4,5,9,7,1,10,7,3,1],[],[11,6,7,2,4,5,2,0,4],[11,6,7,8,0,3,1,10,2,9,4,5],[6,7,11,1,10,2,9,4,5],[],[4,1,0,4,5,1,6,7,3,6,3,2],[9,4,5,0,6,7,0,2,6],[4,5,9,6,3,2,6,7,3],[6,7,11,5,3,8,5,1,3],[6,7,11,4,1,0,4,5,1],[4,5,9,3,8,0,11,6,7],[9,4,5,7,11,6],[],[],[0,6,4],[8,6,4,8,1,6],[],[0,10,2,0,9,10,4,8,11,4,11,6],[10,2,1,6,0,3,6,4,0],[10,2,1,11,4,8,11,6,4],[4,2,6],[1,0,9,2,4,8,2,6,4],[2,4,0,2,6,4],[8,2,4,2,6,4],[11,4,1,11,6,4],[0,9,1,4,11,6,4,8,11],[3,6,0,6,4,0],[8,6,4,8,11,6],[10,8,9],[6,3,9,6,7,3],[6,7,1],[10,7,1,7,3,1],[7,11,6,8,10,2,8,9,10],[11,6,7,10,0,9,10,2,0],[2,1,10,7,11,6,8,0,3],[1,10,2,6,7,11],[7,2,6,7,9,2],[1,0,9,3,6,7,3,2,6],[7,0,6,0,2,6],[2,7,3,2,6,7],[7,11,6,3,9,1,3,8,9],[9,1,0,11,6,7],[0,3,8,11,6,7],[11,6,7],[],[],[],[],[5,3,7],[8,5,2,8,7,5],[5,3,7],[1,10,2,5,8,7,5,9,8],[1,7,5],[1,7,5],[9,2,7,9,7,5],[11,3,2,8,5,9,8,7,5],[1,3,7,1,7,5],[0,7,1,7,5,1],[9,3,5,3,7,5],[9,7,5,9,8,7],[8,10,11],[3,4,10,3,10,11],[8,10,11],[5,9,4,1,11,3,1,10,11],[2,4,5],[5,2,4,2,0,4],[0,3,8,5,9,4,10,2,1],[2,1,10,9,4,5],[2,8,5,2,11,8],[3,2,11,1,4,5,1,0,4],[9,4,5,8,2,11,8,0,2],[11,3,2,9,4,5],[8,5,3,5,1,3],[5,0,4,5,1,0],[3,8,0,4,5,9],[9,4,5],[11,9,10],[11,9,10],[1,11,4,1,10,11],[8,7,4,11,1,10,11,3,1],[2,7,9,2,9,10],[4,8,7,0,10,2,0,9,10],[2,1,10,0,7,4,0,3,7],[10,2,1,8,7,4],[1,7,4],[3,2,11,4,8,7,9,1,0],[11,4,2,4,0,2],[2,11,3,7,4,8],[4,1,7,1,3,7],[1,0,9,8,7,4],[3,4,0,3,7,4],[8,7,4],[8,9,10,8,10,11],[3,9,11,9,10,11],[0,10,8,10,11,8],[10,3,1,10,11,3],[2,8,10,8,9,10],[9,2,0,9,10,2],[8,0,3,1,10,2],[10,2,1],[1,11,9,11,8,9],[11,3,2,0,9,1],[11,0,2,11,8,0],[11,3,2],[8,1,3,8,9,1],[9,1,0],[8,0,3],[]],this.edgeTable2=[0,265,515,778,2060,2309,2575,2822,1030,1295,1541,1804,3082,3331,3593,3840,400,153,915,666,2460,2197,2975,2710,1430,1183,1941,1692,3482,3219,3993,3728,560,825,51,314,2620,2869,2111,2358,1590,1855,1077,1340,3642,3891,3129,3376,928,681,419,170,2988,2725,2479,2214,1958,1711,1445,1196,4010,3747,3497,3232,2240,2505,2755,3018,204,453,719,966,3270,3535,3781,4044,1226,1475,1737,1984,2384,2137,2899,2650,348,85,863,598,3414,3167,3925,3676,1370,1107,1881,1616,2800,3065,2291,2554,764,1013,255,502,3830,4095,3317,3580,1786,2035,1273,1520,2912,2665,2403,2154,876,613,367,102,3942,3695,3429,3180,1898,1635,1385,1120,1120,1385,1635,1898,3180,3429,3695,3942,102,367,613,876,2154,2403,2665,2912,1520,1273,2035,1786,3580,3317,4095,3830,502,255,1013,764,2554,2291,3065,2800,1616,1881,1107,1370,3676,3925,3167,3414,598,863,85,348,2650,2899,2137,2384,1984,1737,1475,1226,4044,3781,3535,3270,966,719,453,204,3018,2755,2505,2240,3232,3497,3747,4010,1196,1445,1711,1958,2214,2479,2725,2988,170,419,681,928,3376,3129,3891,3642,1340,1077,1855,1590,2358,2111,2869,2620,314,51,825,560,3728,3993,3219,3482,1692,1941,1183,1430,2710,2975,2197,2460,666,915,153,400,3840,3593,3331,3082,1804,1541,1295,1030,2822,2575,2309,2060,778,515,265,0],this.triTable2=[[],[8,3,0],[9,0,1],[8,3,1,8,1,9],[11,2,3],[11,2,0,11,0,8],[11,2,3,0,1,9],[2,1,11,1,9,11,11,9,8],[10,1,2],[8,3,0,1,2,10],[9,0,2,9,2,10],[3,2,8,2,10,8,8,10,9],[10,1,3,10,3,11],[1,0,10,0,8,10,10,8,11],[0,3,9,3,11,9,9,11,10],[8,10,9,8,11,10],[8,4,7],[3,0,4,3,4,7],[1,9,0,8,4,7],[9,4,1,4,7,1,1,7,3],[2,3,11,7,8,4],[7,11,4,11,2,4,4,2,0],[3,11,2,4,7,8,9,0,1],[2,7,11,2,1,7,1,4,7,1,9,4],[10,1,2,8,4,7],[2,10,1,0,4,7,0,7,3],[4,7,8,0,2,10,0,10,9],[2,7,3,2,9,7,7,9,4,2,10,9],[8,4,7,11,10,1,11,1,3],[11,4,7,1,4,11,1,11,10,1,0,4],[3,8,0,7,11,4,11,9,4,11,10,9],[7,11,4,4,11,9,11,10,9],[9,5,4],[3,0,8,4,9,5],[5,4,0,5,0,1],[4,8,5,8,3,5,5,3,1],[11,2,3,9,5,4],[9,5,4,8,11,2,8,2,0],[3,11,2,1,5,4,1,4,0],[8,5,4,2,5,8,2,8,11,2,1,5],[2,10,1,9,5,4],[0,8,3,5,4,9,10,1,2],[10,5,2,5,4,2,2,4,0],[3,4,8,3,2,4,2,5,4,2,10,5],[5,4,9,1,3,11,1,11,10],[0,9,1,4,8,5,8,10,5,8,11,10],[3,4,0,3,10,4,4,10,5,3,11,10],[4,8,5,5,8,10,8,11,10],[9,5,7,9,7,8],[0,9,3,9,5,3,3,5,7],[8,0,7,0,1,7,7,1,5],[1,7,3,1,5,7],[11,2,3,8,9,5,8,5,7],[9,2,0,9,7,2,2,7,11,9,5,7],[0,3,8,2,1,11,1,7,11,1,5,7],[2,1,11,11,1,7,1,5,7],[1,2,10,5,7,8,5,8,9],[9,1,0,10,5,2,5,3,2,5,7,3],[5,2,10,8,2,5,8,5,7,8,0,2],[10,5,2,2,5,3,5,7,3],[3,9,1,3,8,9,7,11,10,7,10,5],[9,1,0,10,7,11,10,5,7],[3,8,0,7,10,5,7,11,10],[11,5,7,11,10,5],[11,7,6],[0,8,3,11,7,6],[9,0,1,11,7,6],[7,6,11,3,1,9,3,9,8],[2,3,7,2,7,6],[8,7,0,7,6,0,0,6,2],[1,9,0,3,7,6,3,6,2],[7,6,2,7,2,9,2,1,9,7,9,8],[1,2,10,6,11,7],[2,10,1,7,6,11,8,3,0],[11,7,6,10,9,0,10,0,2],[7,6,11,3,2,8,8,2,10,8,10,9],[6,10,7,10,1,7,7,1,3],[6,10,1,6,1,7,7,1,0,7,0,8],[9,0,3,6,9,3,6,10,9,6,3,7],[6,10,7,7,10,8,10,9,8],[8,4,6,8,6,11],[11,3,6,3,0,6,6,0,4],[0,1,9,4,6,11,4,11,8],[1,9,4,11,1,4,11,3,1,11,4,6],[3,8,2,8,4,2,2,4,6],[2,0,4,2,4,6],[1,9,0,3,8,2,2,8,4,2,4,6],[9,4,1,1,4,2,4,6,2],[10,1,2,11,8,4,11,4,6],[10,1,2,11,3,6,6,3,0,6,0,4],[0,2,10,0,10,9,4,11,8,4,6,11],[2,11,3,6,9,4,6,10,9],[8,4,6,8,6,1,6,10,1,8,1,3],[1,0,10,10,0,6,0,4,6],[8,0,3,9,6,10,9,4,6],[10,4,6,10,9,4],[9,5,4,7,6,11],[4,9,5,3,0,8,11,7,6],[6,11,7,4,0,1,4,1,5],[6,11,7,4,8,5,5,8,3,5,3,1],[4,9,5,6,2,3,6,3,7],[9,5,4,8,7,0,0,7,6,0,6,2],[4,0,1,4,1,5,6,3,7,6,2,3],[7,4,8,5,2,1,5,6,2],[6,11,7,1,2,10,9,5,4],[11,7,6,8,3,0,1,2,10,9,5,4],[11,7,6,10,5,2,2,5,4,2,4,0],[7,4,8,2,11,3,10,5,6],[4,9,5,6,10,7,7,10,1,7,1,3],[5,6,10,0,9,1,8,7,4],[5,6,10,7,0,3,7,4,0],[10,5,6,4,8,7],[5,6,9,6,11,9,9,11,8],[0,9,5,0,5,3,3,5,6,3,6,11],[0,1,5,0,5,11,5,6,11,0,11,8],[11,3,6,6,3,5,3,1,5],[9,5,6,3,9,6,3,8,9,3,6,2],[5,6,9,9,6,0,6,2,0],[0,3,8,2,5,6,2,1,5],[1,6,2,1,5,6],[1,2,10,5,6,9,9,6,11,9,11,8],[1,0,9,6,10,5,11,3,2],[6,10,5,2,8,0,2,11,8],[3,2,11,10,5,6],[10,5,6,9,3,8,9,1,3],[0,9,1,5,6,10],[8,0,3,10,5,6],[10,5,6],[10,6,5],[8,3,0,10,6,5],[0,1,9,5,10,6],[10,6,5,9,8,3,9,3,1],[3,11,2,10,6,5],[6,5,10,2,0,8,2,8,11],[1,9,0,6,5,10,11,2,3],[1,10,2,5,9,6,9,11,6,9,8,11],[1,2,6,1,6,5],[0,8,3,2,6,5,2,5,1],[5,9,6,9,0,6,6,0,2],[9,6,5,3,6,9,3,9,8,3,2,6],[11,6,3,6,5,3,3,5,1],[0,5,1,0,11,5,5,11,6,0,8,11],[0,5,9,0,3,5,3,6,5,3,11,6],[5,9,6,6,9,11,9,8,11],[10,6,5,4,7,8],[5,10,6,7,3,0,7,0,4],[5,10,6,0,1,9,8,4,7],[4,5,9,6,7,10,7,1,10,7,3,1],[7,8,4,2,3,11,10,6,5],[11,6,7,10,2,5,2,4,5,2,0,4],[11,6,7,8,0,3,1,10,2,9,4,5],[6,7,11,1,10,2,9,4,5],[7,8,4,5,1,2,5,2,6],[4,1,0,4,5,1,6,7,3,6,3,2],[9,4,5,8,0,7,0,6,7,0,2,6],[4,5,9,6,3,2,6,7,3],[6,7,11,4,5,8,5,3,8,5,1,3],[6,7,11,4,1,0,4,5,1],[4,5,9,3,8,0,11,6,7],[9,4,5,7,11,6],[10,6,4,10,4,9],[8,3,0,9,10,6,9,6,4],[1,10,0,10,6,0,0,6,4],[8,6,4,8,1,6,6,1,10,8,3,1],[2,3,11,6,4,9,6,9,10],[0,10,2,0,9,10,4,8,11,4,11,6],[10,2,1,11,6,3,6,0,3,6,4,0],[10,2,1,11,4,8,11,6,4],[9,1,4,1,2,4,4,2,6],[1,0,9,3,2,8,2,4,8,2,6,4],[2,4,0,2,6,4],[3,2,8,8,2,4,2,6,4],[1,4,9,11,4,1,11,1,3,11,6,4],[0,9,1,4,11,6,4,8,11],[11,6,3,3,6,0,6,4,0],[8,6,4,8,11,6],[6,7,10,7,8,10,10,8,9],[9,3,0,6,3,9,6,9,10,6,7,3],[6,1,10,6,7,1,7,0,1,7,8,0],[6,7,10,10,7,1,7,3,1],[7,11,6,3,8,2,8,10,2,8,9,10],[11,6,7,10,0,9,10,2,0],[2,1,10,7,11,6,8,0,3],[1,10,2,6,7,11],[7,2,6,7,9,2,2,9,1,7,8,9],[1,0,9,3,6,7,3,2,6],[8,0,7,7,0,6,0,2,6],[2,7,3,2,6,7],[7,11,6,3,9,1,3,8,9],[9,1,0,11,6,7],[0,3,8,11,6,7],[11,6,7],[11,7,5,11,5,10],[3,0,8,7,5,10,7,10,11],[9,0,1,10,11,7,10,7,5],[3,1,9,3,9,8,7,10,11,7,5,10],[10,2,5,2,3,5,5,3,7],[5,10,2,8,5,2,8,7,5,8,2,0],[9,0,1,10,2,5,5,2,3,5,3,7],[1,10,2,5,8,7,5,9,8],[2,11,1,11,7,1,1,7,5],[0,8,3,2,11,1,1,11,7,1,7,5],[9,0,2,9,2,7,2,11,7,9,7,5],[11,3,2,8,5,9,8,7,5],[1,3,7,1,7,5],[8,7,0,0,7,1,7,5,1],[0,3,9,9,3,5,3,7,5],[9,7,5,9,8,7],[4,5,8,5,10,8,8,10,11],[3,0,4,3,4,10,4,5,10,3,10,11],[0,1,9,4,5,8,8,5,10,8,10,11],[5,9,4,1,11,3,1,10,11],[3,8,4,3,4,2,2,4,5,2,5,10],[10,2,5,5,2,4,2,0,4],[0,3,8,5,9,4,10,2,1],[2,1,10,9,4,5],[8,4,5,2,8,5,2,11,8,2,5,1],[3,2,11,1,4,5,1,0,4],[9,4,5,8,2,11,8,0,2],[11,3,2,9,4,5],[4,5,8,8,5,3,5,1,3],[5,0,4,5,1,0],[3,8,0,4,5,9],[9,4,5],[7,4,11,4,9,11,11,9,10],[3,0,8,7,4,11,11,4,9,11,9,10],[11,7,4,1,11,4,1,10,11,1,4,0],[8,7,4,11,1,10,11,3,1],[2,3,7,2,7,9,7,4,9,2,9,10],[4,8,7,0,10,2,0,9,10],[2,1,10,0,7,4,0,3,7],[10,2,1,8,7,4],[2,11,7,2,7,1,1,7,4,1,4,9],[3,2,11,4,8,7,9,1,0],[7,4,11,11,4,2,4,0,2],[2,11,3,7,4,8],[9,1,4,4,1,7,1,3,7],[1,0,9,8,7,4],[3,4,0,3,7,4],[8,7,4],[8,9,10,8,10,11],[0,9,3,3,9,11,9,10,11],[1,10,0,0,10,8,10,11,8],[10,3,1,10,11,3],[3,8,2,2,8,10,8,9,10],[9,2,0,9,10,2],[8,0,3,1,10,2],[10,2,1],[2,11,1,1,11,9,11,8,9],[11,3,2,0,9,1],[11,0,2,11,8,0],[11,3,2],[8,1,3,8,9,1],[9,1,0],[8,0,3],[]]}march(t,e,r,n){let o=!!n.fulltable,a=n.hasOwnProperty("origin")&&n.origin.hasOwnProperty("x")?n.origin:{x:0,y:0,z:0},s=!!n.voxel,l=n.matrix,c=n.nX||0,d=n.nY||0,u=n.nZ||0,h=n.scale||1,p=null;p=n.unitCube?n.unitCube:{x:h,y:h,z:h};let f,m,g=new Int32Array(c*d*u);for(f=0,m=g.length;f>2))+n+((2&e)>>1))*u+i+(1&e)]&this.ISDONE)<=3&&(e.push(e[n]),n=e.length-1,e.push(e[i]),i=e.length-1,e.push(e[o]),o=e.length-1),r.push(n),r.push(i),r.push(o)}}}laplacianSmooth(t,e,r){let n,i,o,a,s,l=new Array(e.length);for(n=0,i=e.length;n1e6&&(this.scaleFactor=this.defaultScaleFactor/2);let n=1/this.scaleFactor*5.5;this.pminx=t[0][0],this.pmaxx=t[1][0],this.pminy=t[0][1],this.pmaxy=t[1][1],this.pminz=t[0][2],this.pmaxz=t[1][2],e?(this.pminx-=this.probeRadius+n,this.pminy-=this.probeRadius+n,this.pminz-=this.probeRadius+n,this.pmaxx+=this.probeRadius+n,this.pmaxy+=this.probeRadius+n,this.pmaxz+=this.probeRadius+n):(this.pminx-=n,this.pminy-=n,this.pminz-=n,this.pmaxx+=n,this.pmaxy+=n,this.pmaxz+=n),this.pminx=Math.floor(this.pminx*this.scaleFactor)/this.scaleFactor,this.pminy=Math.floor(this.pminy*this.scaleFactor)/this.scaleFactor,this.pminz=Math.floor(this.pminz*this.scaleFactor)/this.scaleFactor,this.pmaxx=Math.ceil(this.pmaxx*this.scaleFactor)/this.scaleFactor,this.pmaxy=Math.ceil(this.pmaxy*this.scaleFactor)/this.scaleFactor,this.pmaxz=Math.ceil(this.pmaxz*this.scaleFactor)/this.scaleFactor,this.ptranx=-this.pminx,this.ptrany=-this.pminy,this.ptranz=-this.pminz,this.pLength=Math.ceil(this.scaleFactor*(this.pmaxx-this.pminx))+1,this.pWidth=Math.ceil(this.scaleFactor*(this.pmaxy-this.pminy))+1,this.pHeight=Math.ceil(this.scaleFactor*(this.pmaxz-this.pminz))+1,this.boundingatom(e),this.cutRadius=this.probeRadius*this.scaleFactor,this.vpBits=new Uint8Array(this.pLength*this.pWidth*this.pHeight),this.vpDistance=new Float64Array(this.pLength*this.pWidth*this.pHeight),this.vpAtomID=new Int32Array(this.pLength*this.pWidth*this.pHeight)}boundingatom(t){let e={};for(const r in this.vdwRadii){let n=this.vdwRadii[r];e[r]=t?(n+this.probeRadius)*this.scaleFactor+.5:n*this.scaleFactor+.5;let i=e[r]*e[r];this.widxz[r]=Math.floor(e[r])+1,this.depty[r]=new Int32Array(this.widxz[r]*this.widxz[r]);let o=0;for(let t=0;ti)this.depty[r][o]=-1;else{let t=Math.sqrt(i-n);this.depty[r][o]=Math.floor(t)}o++}}}fillvoxels(t,e){for(let t=0,e=this.vpBits.length;t=this.pLength||c>=this.pWidth||d>=this.pHeight)continue;let h=a*s+c*this.pHeight+d;if(this.vpBits[h]&this.INOUT){let a=e[this.vpAtomID[h]];if(a.serial!=t.serial){let e=r+p-Math.floor(.5+this.scaleFactor*(a.x+this.ptranx)),s=n+o-Math.floor(.5+this.scaleFactor*(a.y+this.ptrany)),l=i+f-Math.floor(.5+this.scaleFactor*(a.z+this.ptranz));p*p+o*o+f*f=this.pLength||c>=this.pWidth||d>=this.pHeight)continue;let h=a*s+c*this.pHeight+d;if(this.vpBits[h]&this.ISDONE){let a=e[this.vpAtomID[h]];if(a.serial!=t.serial){let e=n+p-Math.floor(.5+this.scaleFactor*(a.x+this.ptranx)),s=i+r-Math.floor(.5+this.scaleFactor*(a.y+this.ptrany)),l=o+f-Math.floor(.5+this.scaleFactor*(a.z+this.ptranz));p*p+r*r+f*f-1&&a-1&&l-1&&s=s)||(this.vpBits[t]|=this.ISBOUND))}fastoneshell(t,e){let r,n,i,o,a,s,l,c,d,u=[];if(0===t.length)return u;let h={ix:-1,iy:-1,iz:-1},p=this.pWidth*this.pHeight;for(let f=0,m=t.length;f-1&&h.iy-1&&h.iz-1&&(d=h.ix*p+this.pHeight*h.iy+h.iz,this.vpBits[d]&this.INOUT&&!(this.vpBits[d]&this.ISDONE)?(e.set(h.ix,h.iy,i+this.nb[t][2],c),o=h.ix-c.ix,a=h.iy-c.iy,s=h.iz-c.iz,l=o*o+a*a+s*s,this.vpDistance[d]=l,this.vpBits[d]|=this.ISDONE,this.vpBits[d]|=this.ISBOUND,u.push({ix:h.ix,iy:h.iy,iz:h.iz})):this.vpBits[d]&this.INOUT&&this.vpBits[d]&this.ISDONE&&(o=h.ix-c.ix,a=h.iy-c.iy,s=h.iz-c.iz,l=o*o+a*a+s*s,l-1&&h.iy-1&&h.iz-1&&(d=h.ix*p+this.pHeight*h.iy+h.iz,this.vpBits[d]&this.INOUT&&!(this.vpBits[d]&this.ISDONE)?(e.set(h.ix,h.iy,i+this.nb[t][2],c),o=h.ix-c.ix,a=h.iy-c.iy,s=h.iz-c.iz,l=o*o+a*a+s*s,this.vpDistance[d]=l,this.vpBits[d]|=this.ISDONE,this.vpBits[d]|=this.ISBOUND,u.push({ix:h.ix,iy:h.iy,iz:h.iz})):this.vpBits[d]&this.INOUT&&this.vpBits[d]&this.ISDONE&&(o=h.ix-c.ix,a=h.iy-c.iy,s=h.iz-c.iz,l=o*o+a*a+s*s,l-1&&h.iy-1&&h.iz-1&&(d=h.ix*p+this.pHeight*h.iy+h.iz,this.vpBits[d]&this.INOUT&&!(this.vpBits[d]&this.ISDONE)?(e.set(h.ix,h.iy,i+this.nb[t][2],c),o=h.ix-c.ix,a=h.iy-c.iy,s=h.iz-c.iz,l=o*o+a*a+s*s,this.vpDistance[d]=l,this.vpBits[d]|=this.ISDONE,this.vpBits[d]|=this.ISBOUND,u.push({ix:h.ix,iy:h.iy,iz:h.iz})):this.vpBits[d]&this.INOUT&&this.vpBits[d]&this.ISDONE&&(o=h.ix-c.ix,a=h.iy-c.iy,s=h.iz-c.iz,l=o*o+a*a+s*s,l{"use strict";r.r(e),r.d(e,{VolumeData:()=>l});var n=r("./src/utilities.ts"),i=r("./src/WebGL/math/index.ts"),o=r("./src/parsers/VASP.ts"),a=r("./src/parsers/CUBE.ts"),s=r("./node_modules/pako/dist/pako.esm.mjs");class l{constructor(t,e,r){if(this.unit={x:1,y:1,z:1},this.origin={x:0,y:0,z:0},this.size={x:0,y:0,z:0},this.data=new Float32Array([]),this.matrix=null,this.inversematrix=null,this.isbinary=new Set(["ccp4","CCP4"]),this.getCoordinates=function(t){var e=t/(this.size.y*this.size.z),r=t%(this.size.y*this.size.z),n=t%this.size.z;return e*=this.unit.x,r*=this.unit.y,n*=this.unit.z,{x:e+=this.origin.x,y:r+=this.origin.y,z:n+=this.origin.z}},this.vasp=function(t){var e=t.replace(/^\s+/,"").split(/[\n\r]/),r=(0,o.VASP)(t)[0].length;if(0==r)return console.log("No good formating of CHG or CHGCAR file, not atomic information provided in the file."),void(this.data=[]);var n,a=1.889725992,s=parseFloat(e[1]);n=e[2].replace(/^\s+/,"").split(/\s+/);var l=new i.Vector3(parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2])).multiplyScalar(s*a);n=e[3].replace(/^\s+/,"").split(/\s+/);var c=new i.Vector3(parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2])).multiplyScalar(s*a);n=e[4].replace(/^\s+/,"").split(/\s+/);var d=new i.Vector3(parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2])).multiplyScalar(s*a),u=l.x*(c.y*d.z-d.y*c.z)-c.x*(l.y*d.z-d.y*l.z)+d.x*(l.y*c.z-c.y*l.z),h=1/(u=Math.abs(u)/Math.pow(a,3));e.splice(0,8+r+1);var p=e[0].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),f=Math.abs(parseFloat(p[0])),m=Math.abs(parseFloat(p[1])),g=Math.abs(parseFloat(p[2])),v=this.origin=new i.Vector3(0,0,0);this.size={x:f,y:m,z:g},this.unit=new i.Vector3(l.x,c.y,d.z),l=l.multiplyScalar(1/(a*f)),c=c.multiplyScalar(1/(a*m)),d=d.multiplyScalar(1/(a*g)),0==l.y&&0==l.z&&0==c.x&&0==c.z&&0==d.x&&0==d.y||(this.matrix=new i.Matrix4(l.x,c.x,d.x,0,l.y,c.y,d.y,0,l.z,c.z,d.z,0,0,0,0,1),this.matrix=this.matrix.multiplyMatrices(this.matrix,(new i.Matrix4).makeTranslation(v.x,v.y,v.z)),this.origin=new i.Vector3(0,0,0),this.unit=new i.Vector3(1,1,1)),e.splice(0,1);var b=e.join(" "),y=(b=b.replace(/^\s+/,"")).split(/[\s\r]+/);y.splice(f*m*g+1);for(var x=Float32Array.from(y,parseFloat),w=0;w=this.size.x||e<0||e>=this.size.y||r<0||r>=this.size.z?-1:t*this.size.y*this.size.z+e*this.size.z+r}getVal(t,e,r){let n=this.getIndex(t,e,r);return n<0?0:this.data[n]}cube(t){var e=t.split(/\r?\n/);if(!(e.length<6)){var r=(0,a.CUBE)(t,{}).modelData[0].cryst,n=e[2].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),i=parseFloat(n[0]),o=Math.abs(i);this.origin=r.origin,this.size=r.size,this.unit=r.unit,this.matrix=r.matrix4;var s=6;i<0&&s++;var l=e.splice(o+s).join(" "),c=(l=l.replace(/^\s+/,"")).split(/[\s\r]+/);this.data=Float32Array.from(c,parseFloat)}}ccp4(t){var e={};t=new Int8Array(t);var r=new Int32Array(t.buffer,0,56),n=new Float32Array(t.buffer,0,56),o=new DataView(t.buffer);if(e.MAP=String.fromCharCode(o.getUint8(208),o.getUint8(209),o.getUint8(210),o.getUint8(211)),e.MACHST=[o.getUint8(212),o.getUint8(213)],17===e.MACHST[0]&&17===e.MACHST[1])for(var a=t.byteLength,s=0;s{"use strict";r.r(e),r.d(e,{GLVolumetricRender:()=>l});var n=r("./src/WebGL/shapes/index.ts"),i=r("./src/WebGL/math/index.ts"),o=r("./src/WebGL/index.ts"),a=r("./src/colors.ts"),s=r("./src/GLShape.ts");class l{static interpolateArray(t,e){function r(t,e,r){return t+(e-t)*r}var n=[],i=(t.length-1)/(e-1);n[0]=t[0];for(var o=1;o=0||t.getIndex(d,u,h)>=0)for(let e=s;e=0&&!r[s]&&(e-a.x)*(e-a.x)+(n-a.y)*(n-a.y)+(o-a.z)*(o-a.z){"use strict";r.r(e),r.d(e,{Camera:()=>o});var n=r("./src/WebGL/core/index.ts"),i=r("./src/WebGL/math/index.ts");class o extends n.Object3D{constructor(t=50,e=1,r=.1,n=2e3,o=!1){super(),this.projectionMatrix=new i.Matrix4,this.projectionMatrixInverse=new i.Matrix4,this.matrixWorldInverse=new i.Matrix4,this.fov=t,this.aspect=e,this.near=r,this.far=n;var a=this.position.z;this.right=a*Math.tan(Math.PI/180*t),this.left=-this.right,this.top=this.right/this.aspect,this.bottom=-this.top,this.ortho=!!o,this.updateProjectionMatrix()}lookAt(t){this.matrix.lookAt(this.position,t,this.up),this.rotationAutoUpdate&&(!1===this.useQuaternion&&this.rotation instanceof i.Vector3?this.rotation.setEulerFromRotationMatrix(this.matrix,this.eulerOrder):console.error("Unimplemented math operation."))}updateProjectionMatrix(){this.ortho?this.projectionMatrix.makeOrthographic(this.left,this.right,this.top,this.bottom,this.near,this.far):this.projectionMatrix.makePerspective(this.fov,this.aspect,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)}}},"./src/WebGL/Fog.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Fog:()=>i});var n=r("./src/colors.ts");class i{constructor(t,e=1,r=1e3){this.name="",this.color=new n.Color(t),this.near=e,this.far=r}clone(){return new i(this.color.getHex(),this.near,this.far)}}},"./src/WebGL/Renderer.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Renderer:()=>p});var n=r("./src/WebGL/Camera.ts"),i=r("./src/WebGL/constants/Sides.ts"),o=r("./src/WebGL/constants/TextureConstants.ts"),a=r("./src/WebGL/core/index.ts"),s=r("./src/colors.ts"),l=r("./src/WebGL/materials/index.ts"),c=r("./src/WebGL/math/index.ts"),d=r("./src/WebGL/objects/index.ts"),u=r("./src/WebGL/shaders/index.ts"),h=r("./src/WebGL/SpritePlugin.ts");class p{constructor(t){this.context=null,this.devicePixelRatio=1,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.autoUpdateObjects=!0,this.autoUpdateScene=!0,this.info={memory:{programs:0,geometries:0,textures:0},render:{calls:0,vertices:0,faces:0,points:0}},this._programs=[],this._programs_counter=0,this._webglversion=1,this._currentProgram=null,this._currentMaterialId=-1,this._currentGeometryGroupHash=null,this._currentCamera=null,this._geometryGroupCounter=0,this._oldDoubleSided=-1,this._oldFlipSided=-1,this._oldDepthTest=-1,this._oldDepthWrite=-1,this._oldPolygonOffset=null,this._oldLineWidth=null,this._viewportWidth=0,this._viewportHeight=0,this._currentWidth=0,this._currentHeight=0,this._enabledAttributes={},this._projScreenMatrix=new c.Matrix4,this._vector3=new c.Vector3,this._worldInverse=new c.Matrix4,this._projInverse=new c.Matrix4,this._textureMatrix=new c.Matrix4,this._direction=new c.Vector3,this._lightsNeedUpdate=!0,this._lights={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[],distances:[]},spot:{length:0,colors:[],positions:[],distances:[],directions:[],anglesCos:[],exponents:[]},hemi:{length:0,skyColors:[],groundColors:[],positions:[]}},this.sprites=new h.SpritePlugin,this._screenshader=null,this._vertexattribpos=null,this._screenQuadVBO=null,this._fb=null,this._targetTexture=null,this._depthTexture=null,t=t||{},this.row=t.row,this.col=t.col,this.rows=t.rows,this.cols=t.cols,this._canvas=void 0!==t.canvas?t.canvas:document.createElement("canvas"),this._precision=void 0!==t.precision?t.precision:"highp",this._alpha=void 0===t.alpha||t.alpha,this._premultipliedAlpha=void 0===t.premultipliedAlpha||t.premultipliedAlpha,this._antialias=void 0!==t.antialias&&t.antialias,this._stencil=void 0===t.stencil||t.stencil,this._preserveDrawingBuffer=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,this._clearColor=void 0!==t.clearColor?new s.Color(t.clearColor):new s.Color(0),this._clearAlpha=void 0!==t.clearAlpha?t.clearAlpha:0,this._outlineMaterial=new l.MeshOutlineMaterial(t.outline),this._outlineSphereImposterMaterial=new l.SphereImposterOutlineMaterial(t.outline),this._outlineStickImposterMaterial=new l.StickImposterOutlineMaterial(t.outline),this._outlineEnabled=!!t.outline,this.domElement=this._canvas,this._canvas.id=t.id,0!=t.containerWidth&&0!=t.containerHeight&&(this.initGL(),this.setDefaultGLState(),this.context=this._gl,this.isWebGL1()?this._extInstanced=this._gl.getExtension("ANGLE_instanced_arrays"):this._extInstanced={vertexAttribDivisorANGLE:this._gl.vertexAttribDivisor.bind(this._gl),drawElementsInstancedANGLE:this._gl.drawElementsInstanced.bind(this._gl)},this._extFragDepth=this._gl.getExtension("EXT_frag_depth"),this._extFloatLinear=this._gl.getExtension("OES_texture_float_linear"),this._extColorBufferFloat=this._gl.getExtension("EXT_color_buffer_float"),this.sprites.init(this))}supportedExtensions(){return{supportsAIA:Boolean(this._extInstanced),supportsImposters:Boolean(this._extFragDepth)||!this.isWebGL1(),regen:!1}}getContext(){return this._gl}getCanvas(){return this._canvas}isLost(){return null==this._gl||this._gl.isContextLost()}getPrecision(){return this._precision}setClearColorHex(t,e){this._clearColor.setHex(t),this._clearAlpha=e,this.isLost()||this._gl.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearAlpha)}enableOutline(t){this._outlineMaterial=new l.MeshOutlineMaterial(t),this._outlineSphereImposterMaterial=new l.SphereImposterOutlineMaterial(t),this._outlineStickImposterMaterial=new l.StickImposterOutlineMaterial(t),this._outlineEnabled=!0}disableOutline(){this._outlineEnabled=!1}setViewport(){if(null!=this.rows&&null!=this.cols&&null!=this.row&&null!=this.col){var t=this._canvas.width/this.cols,e=this._canvas.height/this.rows;this._viewportWidth=t,this._viewportHeight=e,this.isLost()||(this._gl.enable(this._gl.SCISSOR_TEST),this._gl.scissor(t*this.col,e*this.row,t,e),this._gl.viewport(t*this.col,e*this.row,t,e))}}setSize(t,e){if(this.devicePixelRatio=void 0!==window.devicePixelRatio?window.devicePixelRatio:1,this._antialias&&this.devicePixelRatio<2&&(this.devicePixelRatio*=2),null!=this.rows&&null!=this.cols&&null!=this.row&&null!=this.col){var r=t/this.cols,n=e/this.rows;this._canvas.width=t*this.devicePixelRatio,this._canvas.height=e*this.devicePixelRatio,this._viewportWidth=r*this.devicePixelRatio,this._viewportHeight=n*this.devicePixelRatio,this._canvas.style.width=t+"px",this._canvas.style.height=e+"px",this.setViewport()}else this._viewportWidth=this._canvas.width=t*this.devicePixelRatio,this._viewportHeight=this._canvas.height=e*this.devicePixelRatio,this._canvas.style.width=t+"px",this._canvas.style.height=e+"px",this.isLost()||this._gl.viewport(0,0,this._gl.drawingBufferWidth,this._gl.drawingBufferHeight);this.initFrameBuffer()}clear(t,e,r){var n=0;(void 0===t||t)&&(n|=this._gl.COLOR_BUFFER_BIT),(void 0===e||e)&&(n|=this._gl.DEPTH_BUFFER_BIT),(void 0===r||r)&&(n|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(n)}clearTarget(t,e,r){this.clear(t,e,r)}setMaterialFaces(t,e){var r=t.side===i.DoubleSide,n=t.side===i.BackSide;t.imposter||(n=e?!n:n),this._oldDoubleSided!==r&&(r?this._gl.disable(this._gl.CULL_FACE):this._gl.enable(this._gl.CULL_FACE),this._oldDoubleSided=r),this._oldFlipSided!==n&&(n?this._gl.frontFace(this._gl.CW):this._gl.frontFace(this._gl.CCW),this._oldFlipSided=n),this._gl.cullFace(this._gl.BACK)}setDepthTest(t){this._oldDepthTest!==t&&(t?this._gl.enable(this._gl.DEPTH_TEST):this._gl.disable(this._gl.DEPTH_TEST),this._oldDepthTest=t)}setDepthWrite(t){this._oldDepthWrite!==t&&(this._gl.depthMask(t),this._oldDepthWrite=t)}setBlending(t){t?(this._gl.enable(this._gl.BLEND),this._gl.blendEquationSeparate(this._gl.FUNC_ADD,this._gl.FUNC_ADD),this._gl.blendFuncSeparate(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA)):this._gl.disable(this._gl.BLEND)}initMaterial(t,e,r,n){var i,o;if(t.addEventListener("dispose",this.onMaterialDispose.bind(this)),o=t.shaderID){var a=u.ShaderLib[o];t.vertexShader=a.vertexShader,t.fragmentShader=a.fragmentShader,t.uniforms=u.ShaderUtils.clone(a.uniforms)}i={wireframe:t.wireframe,fragdepth:t.imposter,volumetric:t.volumetric},t.program=this.buildProgram(t.fragmentShader,t.vertexShader,t.uniforms,i)}renderBuffer(t,e,r,n,i,o){var a,s;if(n.visible&&(a=this.setProgram(t,e,r,n,o,this))){s=a.attributes;var l,c,u=!1,h=n.wireframe?1:0,p=16777215*i.id+2*a.id+h;if(p!==this._currentGeometryGroupHash&&(this._currentGeometryGroupHash=p,u=!0),u&&(this.disableAttributes(),s.position>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglVertexBuffer),this.enableAttribute(s.position),this._gl.vertexAttribPointer(s.position,3,this._gl.FLOAT,!1,0,0)),s.color>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglColorBuffer),this.enableAttribute(s.color),this._gl.vertexAttribPointer(s.color,3,this._gl.FLOAT,!1,0,0)),s.normal>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglNormalBuffer),this.enableAttribute(s.normal),this._gl.vertexAttribPointer(s.normal,3,this._gl.FLOAT,!1,0,0)),s.offset>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglOffsetBuffer),this.enableAttribute(s.offset),this._gl.vertexAttribPointer(s.offset,3,this._gl.FLOAT,!1,0,0)),s.radius>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglRadiusBuffer),this.enableAttribute(s.radius),this._gl.vertexAttribPointer(s.radius,1,this._gl.FLOAT,!1,0,0))),o instanceof d.Mesh){if("instanced"===n.shaderID){var f=n.sphere.geometryGroups[0];u&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglVertexBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,f.vertexArray,this._gl.STATIC_DRAW),this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglNormalBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,f.normalArray,this._gl.STATIC_DRAW),this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,i.__webglFaceBuffer),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,f.faceArray,this._gl.STATIC_DRAW)),l=f.faceidx,this._extInstanced.vertexAttribDivisorANGLE(s.offset,1),this._extInstanced.vertexAttribDivisorANGLE(s.radius,1),this._extInstanced.vertexAttribDivisorANGLE(s.color,1),this._extInstanced.drawElementsInstancedANGLE(this._gl.TRIANGLES,l,this._gl.UNSIGNED_SHORT,0,i.radiusArray.length),this._extInstanced.vertexAttribDivisorANGLE(s.offset,0),this._extInstanced.vertexAttribDivisorANGLE(s.radius,0),this._extInstanced.vertexAttribDivisorANGLE(s.color,0)}else n.wireframe?(c=i.lineidx,this.setLineWidth(n.wireframeLinewidth),u&&this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,i.__webglLineBuffer),this._gl.drawElements(this._gl.LINES,c,this._gl.UNSIGNED_SHORT,0)):(l=i.faceidx,u&&this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,i.__webglFaceBuffer),this._gl.drawElements(this._gl.TRIANGLES,l,this._gl.UNSIGNED_SHORT,0));this.info.render.calls++,this.info.render.vertices+=l,this.info.render.faces+=l/3}else o instanceof d.Line&&(c=i.vertices,this.setLineWidth(n.linewidth),this._gl.drawArrays(this._gl.LINES,0,c),this.info.render.calls++)}}render(t,e,r){if(e instanceof n.Camera!=0){var i,o,a,s,l,c=t.__lights,d=t.fog;if(this._currentMaterialId=-1,this._lightsNeedUpdate=!0,this.autoUpdateScene&&t.updateMatrixWorld(),void 0===e.parent&&e.updateMatrixWorld(),e.matrixWorldInverse.getInverse(e.matrixWorld),this._projScreenMatrix.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),!this.isLost()){this.autoUpdateObjects&&this.initWebGLObjects(t),this.info.render.calls=0,this.info.render.vertices=0,this.info.render.faces=0,this.info.render.points=0,this._currentWidth=this._viewportWidth,this._currentHeight=this._viewportHeight,this.setViewport(),this.setFrameBuffer(),(this.autoClear||r)&&(this._gl.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearAlpha),this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil));var u=!1;for(i=0,o=(l=t.__webglObjects).length;i=0;--r)t[r].object===e&&t.splice(r,1)}removeInstancesDirect(t,e){for(var r=t.length-1;r>=0;--r)t[r]===e&&t.splice(r,1)}unrollBufferMaterial(t){var e=t.object.material;if(e.volumetric)t.opaque=null,t.transparent=null,t.volumetric=e;else if(e.transparent){if(t.opaque=null,t.volumetric=null,t.transparent=e,!e.wireframe){var r=e.clone();r.opacity=0,t.blank=r}}else t.opaque=e,t.transparent=null,t.volumetric=null}setBuffers(t,e){var r=t.vertexArray,n=t.colorArray;if(void 0!==t.__webglOffsetBuffer?(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglOffsetBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,r,e)):(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglVertexBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,r,e)),this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglColorBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,n,e),t.normalArray&&void 0!==t.__webglNormalBuffer){var i=t.normalArray;this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglNormalBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,i,e)}if(t.radiusArray&&void 0!==t.__webglRadiusBuffer&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglRadiusBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,t.radiusArray,e)),t.faceArray&&void 0!==t.__webglFaceBuffer){var o=t.faceArray;this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,t.__webglFaceBuffer),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,o,e)}if(t.lineArray&&void 0!==t.__webglLineBuffer){var a=t.lineArray;this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,t.__webglLineBuffer),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,a,e)}}createMeshBuffers(t){t.radiusArray&&(t.__webglRadiusBuffer=this._gl.createBuffer()),t.useOffset&&(t.__webglOffsetBuffer=this._gl.createBuffer()),t.__webglVertexBuffer=this._gl.createBuffer(),t.__webglNormalBuffer=this._gl.createBuffer(),t.__webglColorBuffer=this._gl.createBuffer(),t.__webglFaceBuffer=this._gl.createBuffer(),t.__webglLineBuffer=this._gl.createBuffer(),this.info.memory.geometries++}createLineBuffers(t){t.__webglVertexBuffer=this._gl.createBuffer(),t.__webglColorBuffer=this._gl.createBuffer(),this.info.memory.geometries++}addBuffer(t,e,r){t.push({buffer:e,object:r,opaque:null,transparent:null})}setupMatrices(t,e){t._modelViewMatrix.multiplyMatrices(e.matrixWorldInverse,t.matrixWorld),t._normalMatrix.getInverse(t._modelViewMatrix),t._normalMatrix.transpose()}filterFallback(t){return this._gl.LINEAR}setTextureParameters(t,e){t==this._gl.TEXTURE_2D?(this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(t,this._gl.TEXTURE_MAG_FILTER,this.filterFallback(e.magFilter)),this._gl.texParameteri(t,this._gl.TEXTURE_MIN_FILTER,this.filterFallback(e.minFilter))):(this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_R,this._gl.CLAMP_TO_EDGE),this._extColorBufferFloat&&this._extFloatLinear?(this._gl.texParameteri(t,this._gl.TEXTURE_MAG_FILTER,this._gl.LINEAR),this._gl.texParameteri(t,this._gl.TEXTURE_MIN_FILTER,this._gl.LINEAR)):(this._gl.texParameteri(t,this._gl.TEXTURE_MAG_FILTER,this._gl.NEAREST),this._gl.texParameteri(t,this._gl.TEXTURE_MIN_FILTER,this._gl.NEAREST)))}paramToGL(t){return t===o.UnsignedByteType?this._gl.UNSIGNED_BYTE:t===o.RGBAFormat?this._gl.RGBA:t===o.NearestFilter?this._gl.NEAREST:0}setupLights(t,e){var r,n,i,o,s,l=this._lights,c=l.directional.colors,d=l.directional.positions,u=0,h=0;for(r=0,n=e.length;r{"use strict";r.r(e),r.d(e,{SpritePlugin:()=>i});var n=r("./src/WebGL/shaders/index.ts");class i{constructor(){this.sprite={vertices:null,faces:null,vertexBuffer:null,elementBuffer:null,program:null,attributes:{},uniforms:null}}init(t){this.gl=t.context,this.renderer=t,this.precision=t.getPrecision(),this.sprite.vertices=new Float32Array(16),this.sprite.faces=new Uint16Array(6);var e=0;this.sprite.vertices[e++]=-1,this.sprite.vertices[e++]=-1,this.sprite.vertices[e++]=0,this.sprite.vertices[e++]=0,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=-1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=0,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=-1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=0,this.sprite.vertices[e++]=1,e=0,this.sprite.faces[e++]=0,this.sprite.faces[e++]=1,this.sprite.faces[e++]=2,this.sprite.faces[e++]=0,this.sprite.faces[e++]=2,this.sprite.faces[e++]=3,this.sprite.vertexBuffer=this.gl.createBuffer(),this.sprite.elementBuffer=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.sprite.vertexBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,this.sprite.vertices,this.gl.STATIC_DRAW),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.sprite.elementBuffer),this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,this.sprite.faces,this.gl.STATIC_DRAW),this.sprite.program=this.createProgram(n.ShaderLib.sprite,this.precision||1),this.sprite.attributes={};const r={};this.sprite.attributes.position=this.gl.getAttribLocation(this.sprite.program,"position"),this.sprite.attributes.uv=this.gl.getAttribLocation(this.sprite.program,"uv"),r.uvOffset=this.gl.getUniformLocation(this.sprite.program,"uvOffset"),r.uvScale=this.gl.getUniformLocation(this.sprite.program,"uvScale"),r.rotation=this.gl.getUniformLocation(this.sprite.program,"rotation"),r.scale=this.gl.getUniformLocation(this.sprite.program,"scale"),r.alignment=this.gl.getUniformLocation(this.sprite.program,"alignment"),r.color=this.gl.getUniformLocation(this.sprite.program,"color"),r.map=this.gl.getUniformLocation(this.sprite.program,"map"),r.opacity=this.gl.getUniformLocation(this.sprite.program,"opacity"),r.useScreenCoordinates=this.gl.getUniformLocation(this.sprite.program,"useScreenCoordinates"),r.screenPosition=this.gl.getUniformLocation(this.sprite.program,"screenPosition"),r.modelViewMatrix=this.gl.getUniformLocation(this.sprite.program,"modelViewMatrix"),r.projectionMatrix=this.gl.getUniformLocation(this.sprite.program,"projectionMatrix"),r.fogType=this.gl.getUniformLocation(this.sprite.program,"fogType"),r.fogDensity=this.gl.getUniformLocation(this.sprite.program,"fogDensity"),r.fogNear=this.gl.getUniformLocation(this.sprite.program,"fogNear"),r.fogFar=this.gl.getUniformLocation(this.sprite.program,"fogFar"),r.fogColor=this.gl.getUniformLocation(this.sprite.program,"fogColor"),r.alphaTest=this.gl.getUniformLocation(this.sprite.program,"alphaTest"),this.sprite.uniforms=r}render(t,e,r,n,i){var a,s,l,c,d,u,h,p,f,m;if(!this.gl)throw new Error("WebGLRenderer not initialized");let g=[];null===(a=null==t?void 0:t.__webglSprites)||void 0===a||a.forEach((t=>{(i&&0==t.material.depthTest||!i&&t.material.depthTest)&&g.push(t)}));let v=g.length;if(!v)return;const b=this.sprite.attributes,y=this.sprite.uniforms;if(!y)throw new Error("Uniforms not defined");var x=.5*r,w=.5*n;this.gl.useProgram(this.sprite.program),this.gl.enableVertexAttribArray(b.position),this.gl.enableVertexAttribArray(b.uv),this.gl.disable(this.gl.CULL_FACE),this.gl.enable(this.gl.BLEND),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.sprite.vertexBuffer),this.gl.vertexAttribPointer(b.position,2,this.gl.FLOAT,!1,16,0),this.gl.vertexAttribPointer(b.uv,2,this.gl.FLOAT,!1,16,8),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.sprite.elementBuffer),this.gl.uniformMatrix4fv(y.projectionMatrix,!1,e.projectionMatrix.elements),this.gl.activeTexture(this.gl.TEXTURE0),this.gl.uniform1i(y.map,0);var _,k=0,A=0,T=t.fog;let M,S,C,E;T?(this.gl.uniform3f(y.fogColor,T.color.r,T.color.g,T.color.b),this.gl.uniform1f(y.fogNear,T.near),this.gl.uniform1f(y.fogFar,T.far),this.gl.uniform1i(y.fogType,1),k=1,A=1):(this.gl.uniform1i(y.fogType,0),k=0,A=0);let L=[];for(_=0;_{"use strict";var n;r.r(e),r.d(e,{Coloring:()=>n}),function(t){t[t.NoColors=0]="NoColors",t[t.FaceColors=1]="FaceColors",t[t.VertexColors=2]="VertexColors"}(n||(n={}))},"./src/WebGL/constants/Shading.ts":(t,e,r)=>{"use strict";var n;r.r(e),r.d(e,{Shading:()=>n}),function(t){t[t.NoShading=0]="NoShading",t[t.FlatShading=1]="FlatShading",t[t.SmoothShading=2]="SmoothShading"}(n||(n={}))},"./src/WebGL/constants/Sides.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BackSide:()=>i,DoubleSide:()=>o,FrontSide:()=>n});const n=0,i=1,o=2},"./src/WebGL/constants/SpriteAlignment.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SpriteAlignment:()=>i});var n=r("./src/WebGL/math/index.ts");const i={topLeft:new n.Vector2(1,-1),topCenter:new n.Vector2(0,-1),topRight:new n.Vector2(-1,-1),centerLeft:new n.Vector2(1,0),center:new n.Vector2(0,0),centerRight:new n.Vector2(-1,0),bottomLeft:new n.Vector2(1,1),bottomCenter:new n.Vector2(0,1),bottomRight:new n.Vector2(-1,1)}},"./src/WebGL/constants/TextureConstants.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ClampToEdgeWrapping:()=>n,FloatType:()=>l,LinearFilter:()=>i,LinearMipMapLinearFilter:()=>a,NearestFilter:()=>o,R32Format:()=>u,RFormat:()=>d,RGBAFormat:()=>c,UnsignedByteType:()=>s});const n=1001,i=1006,o=1007,a=1008,s=1009,l=1010,c=1021,d=1022,u=1023},"./src/WebGL/constants/TextureOperations.ts":(t,e,r)=>{"use strict";var n;r.r(e),r.d(e,{TextureOperations:()=>n}),function(t){t[t.MultiplyOperation=0]="MultiplyOperation",t[t.MixOperation=1]="MixOperation",t[t.AddOperation=2]="AddOperation"}(n||(n={}))},"./src/WebGL/constants/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BackSide:()=>i.BackSide,ClampToEdgeWrapping:()=>s.ClampToEdgeWrapping,Coloring:()=>n.Coloring,DoubleSide:()=>i.DoubleSide,FloatType:()=>s.FloatType,FrontSide:()=>i.FrontSide,LinearFilter:()=>s.LinearFilter,LinearMipMapLinearFilter:()=>s.LinearMipMapLinearFilter,NearestFilter:()=>s.NearestFilter,R32Format:()=>s.R32Format,RFormat:()=>s.RFormat,RGBAFormat:()=>s.RGBAFormat,Shading:()=>o.Shading,SpriteAlignment:()=>a.SpriteAlignment,TextureOperations:()=>l.TextureOperations,UnsignedByteType:()=>s.UnsignedByteType});var n=r("./src/WebGL/constants/Coloring.ts"),i=r("./src/WebGL/constants/Sides.ts"),o=r("./src/WebGL/constants/Shading.ts"),a=r("./src/WebGL/constants/SpriteAlignment.ts"),s=r("./src/WebGL/constants/TextureConstants.ts"),l=r("./src/WebGL/constants/TextureOperations.ts")},"./src/WebGL/core/EventDispatcher.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{EventDispatcher:()=>n});class n{constructor(){this.listeners={}}dispatchEvent(t){var e=this.listeners[t.type];if(void 0!==e){t.target=this;for(var r=0,n=e.length;r{"use strict";r.r(e),r.d(e,{Geometry:()=>l,GeometryGroup:()=>s,GeometryIDCount:()=>c});var n=r("./src/WebGL/materials/LineBasicMaterial.ts"),i=r("./src/WebGL/core/EventDispatcher.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/colors.ts");class s{constructor(t=0){this.vertexArray=null,this.colorArray=null,this.normalArray=null,this.radiusArray=null,this.faceArray=null,this.lineArray=null,this.vertices=0,this.faceidx=0,this.lineidx=0,this.__inittedArrays=!1,this.id=t}setColors(t){var e=this.vertexArray,r=this.colorArray;if(!e)throw new Error("vertex array not initialized");if(!r)throw new Error("color array not initialized");if(e.length==r.length)for(var n=0;n0?this.lineArray=(null==a?void 0:a.subarray(0,this.lineidx))||null:this.lineArray=new Uint16Array(0)):(this.normalArray=new Float32Array(0),this.faceArray=new Uint16Array(0),this.lineArray=new Uint16Array(0)),s&&(this.radiusArray=s.subarray(0,this.vertices)),e&&(this.normalArray&&(this.normalArray=new Float32Array(this.normalArray)),this.faceArray&&(this.faceArray=new Uint16Array(this.faceArray)),this.lineArray&&(this.lineArray=new Uint16Array(this.lineArray)),this.vertexArray&&(this.vertexArray=new Float32Array(this.vertexArray)),this.colorArray&&(this.colorArray=new Float32Array(this.colorArray)),this.radiusArray&&(this.radiusArray=new Float32Array(this.radiusArray))),this.__inittedArrays=!0}}class l extends i.EventDispatcher{constructor(t=!1,e=!1,r=!1){super(),this.name="",this.hasTangents=!1,this.dynamic=!0,this.verticesNeedUpdate=!1,this.elementsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.buffersNeedUpdate=!1,this.imposter=!1,this.instanced=!1,this.geometryGroups=[],this.groups=0,this.id=c++,this.mesh=t,this.radii=e,this.offset=r}updateGeoGroup(t=0){var e,r=this.groups>0?this.geometryGroups[this.groups-1]:null;return(!r||r.vertices+t>((null===(e=null==r?void 0:r.vertexArray)||void 0===e?void 0:e.length)||0)/3)&&(r=this.addGeoGroup()),r}vrml(t,e){for(var r="",n=this.geometryGroups.length,i=0;i{"use strict";r.r(e),r.d(e,{Light:()=>l,Object3D:()=>a,Object3DIDCount:()=>o,Scene:()=>s});var n=r("./src/WebGL/math/index.ts"),i=r("./src/colors.ts");let o=0;class a{constructor(){this.id=o++,this.name="",this.children=[],this.position=new n.Vector3,this.rotation=new n.Vector3,this.matrix=new n.Matrix4,this.matrixWorld=new n.Matrix4,this.quaternion=new n.Quaternion,this.eulerOrder="XYZ",this.up=new n.Vector3(0,1,0),this.scale=new n.Vector3(1,1,1),this.matrixAutoUpdate=!0,this.matrixWorldNeedsUpdate=!0,this.rotationAutoUpdate=!0,this.useQuaternion=!1,this.visible=!0}lookAt(t){this.matrix.lookAt(t,this.position,this.up),this.rotationAutoUpdate&&(!0===this.useQuaternion?console.error("Unimplemented math operation."):this.rotation instanceof n.Vector3&&this.rotation.setEulerFromRotationMatrix(this.matrix,this.eulerOrder))}add(t){if(t!==this){t.parent=this,this.children.push(t);for(var e=this;void 0!==e.parent;)e=e.parent;void 0!==e&&e instanceof s&&e.__addObject(t)}else console.error("Can't add $3Dmol.Object3D to itself")}remove(t){var e=this.children.indexOf(t);if(-1!==e){t.parent=void 0,this.children.splice(e,1);for(var r=this;void 0!==r.parent;)r=r.parent;void 0!==r&&r instanceof s&&r.__removeObject(t)}}vrml(t){t||(t=" ");var e=2*Math.atan2(this.quaternion.lengthxyz(),this.quaternion.w),r=0,n=0,i=0;if(0!=e){let t=Math.sin(e/2);r=this.quaternion.x/t,n=this.quaternion.y/t,i=this.quaternion.z/t}var o=t+"Transform {\n"+t+" center "+this.position.x+" "+this.position.y+" "+this.position.z+"\n"+t+" rotation "+r+" "+n+" "+i+" "+e+"\n"+t+" children [\n";this.geometry&&(o+=this.geometry.vrml(t,this.material));for(var a=0;a{"use strict";r.r(e),r.d(e,{Projector:()=>i});const n=new(r("./src/WebGL/math/index.ts").Matrix4);class i{static unprojectVector(t,e){return e.projectionMatrixInverse.getInverse(e.projectionMatrix),n.multiplyMatrices(e.matrixWorld,e.projectionMatrixInverse),t.applyProjection(n)}static projectVector(t,e){return e.matrixWorldInverse.getInverse(e.matrixWorld),n.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),t.applyProjection(n)}projectVector(t,e){return i.projectVector(t,e)}unprojectVector(t,e){return i.unprojectVector(t,e)}}},"./src/WebGL/core/Raycaster.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Raycaster:()=>s,intersectObject:()=>v});var n=r("./src/WebGL/math/index.ts"),i=r("./src/WebGL/shapes/index.ts");const o=(t,e)=>t.distance-e.distance,a=new n.Matrix4;class s{constructor(t,e,r,i){this.precision=1e-4,this.linePrecision=.2,this.ray=new n.Ray(t,e),this.ray.direction.lengthSq()>0&&this.ray.direction.normalize(),this.near=i||0,this.far=r||1/0}set(t,e){this.ray.set(t,e)}setFromCamera(t,e){e.ortho?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,t.z),e.projectionMatrixInverse.getInverse(e.projectionMatrix),a.multiplyMatrices(e.matrixWorld,e.projectionMatrixInverse),this.ray.direction.applyProjection(a),this.ray.direction.sub(this.ray.origin).normalize())}intersectObjects(t,e){for(var r=[],n=0,i=e.length;nMath.min(Math.max(t,-1),1);var c=new i.Sphere,d=new i.Cylinder,u=new i.Triangle,h=new n.Vector3,p=new n.Vector3,f=new n.Vector3,m=new n.Vector3,g=new n.Vector3;function v(t,e,r,n){if(g.getPositionFromMatrix(t.matrixWorld),void 0===e.intersectionShape)return n;var o,a,s,v,b,y,x,w,_,k,A,T,M,S,C=e.intersectionShape,E=r.linePrecision,L=(E*=t.matrixWorld.getMaxScaleOnAxis())*E;if(void 0!==e.boundingSphere&&e.boundingSphere instanceof i.Sphere&&(c.copy(e.boundingSphere),c.applyMatrix4(t.matrixWorld),!r.ray.isIntersectionSphere(c)))return n;for(o=0,a=C.triangle.length;o=0)continue;if(h.subVectors(u.a,r.ray.origin),(x=s.dot(h)/v)<0)continue;p.copy(r.ray.direction).multiplyScalar(x).add(r.ray.origin),p.sub(u.a),f.copy(u.b).sub(u.a),m.copy(u.c).sub(u.a);var z=f.dot(m),O=f.lengthSq(),D=m.lengthSq();if((T=(O*p.dot(m)-z*p.dot(f))/(O*D-z*z))<0||T>1)continue;if((A=(p.dot(f)-T*z)/O)<0||A>1||A+T>1)continue;n.push({clickable:e,distance:x})}for(o=0,a=C.cylinder.length;od.lengthSq()||T<0)continue;n.push({clickable:e,distance:x})}}for(o=0,a=C.line.length;o{"use strict";r.r(e),r.d(e,{Texture:()=>s,TextureIdCount:()=>l});var n=r("./src/WebGL/constants/TextureConstants.ts"),i=r("./src/WebGL/math/index.ts"),o=r("./src/WebGL/core/EventDispatcher.ts"),a=r("./src/WebGL/core/UVMapping.ts");class s extends o.EventDispatcher{constructor(t,e){super(),this.id=l++,this.name="",this.image=t,this.mapping=new a.UVMapping,this.wrapS=n.ClampToEdgeWrapping,this.wrapT=n.ClampToEdgeWrapping,this.anisotropy=1,e?(this.format=n.RFormat,this.type=n.FloatType,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.magFilter=n.NearestFilter,this.minFilter=n.NearestFilter):(this.format=n.RGBAFormat,this.type=n.UnsignedByteType,this.offset=new i.Vector2(0,0),this.repeat=new i.Vector2(1,1),this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.magFilter=n.LinearFilter,this.minFilter=n.LinearMipMapLinearFilter),this.needsUpdate=!1,this.onUpdate=null}clone(t=new s){return t.image=this.image,t.mapping=this.mapping,t.wrapS=this.wrapS,t.wrapT=this.wrapT,t.magFilter=this.magFilter,t.minFilter=this.minFilter,t.anisotropy=this.anisotropy,t.format=this.format,t.type=this.type,t.offset.copy(this.offset),t.repeat.copy(this.repeat),t.premultiplyAlpha=this.premultiplyAlpha,t.flipY=this.flipY,t.unpackAlignment=this.unpackAlignment,t}dispose(){this.dispatchEvent({type:"dispose"})}}let l=0},"./src/WebGL/core/UVMapping.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{UVMapping:()=>n});class n{}},"./src/WebGL/core/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{EventDispatcher:()=>n.EventDispatcher,Geometry:()=>i.Geometry,GeometryGroup:()=>i.GeometryGroup,GeometryIDCount:()=>i.GeometryIDCount,Light:()=>o.Light,Object3D:()=>o.Object3D,Object3DIDCount:()=>o.Object3DIDCount,Projector:()=>a.Projector,Raycaster:()=>s.Raycaster,Scene:()=>o.Scene,Texture:()=>l.Texture,TextureIdCount:()=>l.TextureIdCount,UVMapping:()=>c.UVMapping,intersectObject:()=>s.intersectObject});var n=r("./src/WebGL/core/EventDispatcher.ts"),i=r("./src/WebGL/core/Geometry.ts"),o=r("./src/WebGL/core/Object3D.ts"),a=r("./src/WebGL/core/Projector.ts"),s=r("./src/WebGL/core/Raycaster.ts"),l=r("./src/WebGL/core/Texture.ts"),c=r("./src/WebGL/core/UVMapping.ts")},"./src/WebGL/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BackSide:()=>n.BackSide,Camera:()=>d.Camera,ClampToEdgeWrapping:()=>n.ClampToEdgeWrapping,Coloring:()=>n.Coloring,Cylinder:()=>c.Cylinder,DoubleSide:()=>n.DoubleSide,EventDispatcher:()=>i.EventDispatcher,FloatType:()=>n.FloatType,Fog:()=>u.Fog,FrontSide:()=>n.FrontSide,Geometry:()=>i.Geometry,GeometryGroup:()=>i.GeometryGroup,GeometryIDCount:()=>i.GeometryIDCount,ImposterMaterial:()=>o.ImposterMaterial,InstancedMaterial:()=>o.InstancedMaterial,Light:()=>i.Light,Line:()=>s.Line,LineBasicMaterial:()=>o.LineBasicMaterial,LineStyle:()=>s.LineStyle,LinearFilter:()=>n.LinearFilter,LinearMipMapLinearFilter:()=>n.LinearMipMapLinearFilter,Material:()=>o.Material,MaterialIdCount:()=>o.MaterialIdCount,Matrix3:()=>a.Matrix3,Matrix4:()=>a.Matrix4,Mesh:()=>s.Mesh,MeshDoubleLambertMaterial:()=>o.MeshDoubleLambertMaterial,MeshLambertMaterial:()=>o.MeshLambertMaterial,MeshOutlineMaterial:()=>o.MeshOutlineMaterial,NearestFilter:()=>n.NearestFilter,Object3D:()=>i.Object3D,Object3DIDCount:()=>i.Object3DIDCount,Projector:()=>i.Projector,Quaternion:()=>a.Quaternion,R32Format:()=>n.R32Format,RFormat:()=>n.RFormat,RGBAFormat:()=>n.RGBAFormat,Ray:()=>a.Ray,Raycaster:()=>i.Raycaster,Renderer:()=>h.Renderer,Scene:()=>i.Scene,ShaderLib:()=>l.ShaderLib,ShaderUtils:()=>l.ShaderUtils,Shading:()=>n.Shading,Sphere:()=>c.Sphere,SphereImposterMaterial:()=>o.SphereImposterMaterial,SphereImposterOutlineMaterial:()=>o.SphereImposterOutlineMaterial,Sprite:()=>s.Sprite,SpriteAlignment:()=>n.SpriteAlignment,SpriteMaterial:()=>o.SpriteMaterial,SpritePlugin:()=>p.SpritePlugin,StickImposterMaterial:()=>o.StickImposterMaterial,StickImposterOutlineMaterial:()=>o.StickImposterOutlineMaterial,Texture:()=>i.Texture,TextureIdCount:()=>i.TextureIdCount,TextureOperations:()=>n.TextureOperations,Triangle:()=>c.Triangle,UVMapping:()=>i.UVMapping,UnsignedByteType:()=>n.UnsignedByteType,Vector2:()=>a.Vector2,Vector3:()=>a.Vector3,VolumetricMaterial:()=>o.VolumetricMaterial,basic:()=>l.basic,clamp:()=>a.clamp,clone:()=>l.clone,conversionMatrix3:()=>a.conversionMatrix3,degToRad:()=>a.degToRad,instanced:()=>l.instanced,intersectObject:()=>i.intersectObject,lambert:()=>l.lambert,lambertdouble:()=>l.lambertdouble,outline:()=>l.outline,screen:()=>l.screen,screenaa:()=>l.screenaa,sphereimposter:()=>l.sphereimposter,sphereimposteroutline:()=>l.sphereimposteroutline,sprite:()=>l.sprite,stickimposter:()=>l.stickimposter,stickimposteroutline:()=>l.stickimposteroutline,volumetric:()=>l.volumetric});var n=r("./src/WebGL/constants/index.ts"),i=r("./src/WebGL/core/index.ts"),o=r("./src/WebGL/materials/index.ts"),a=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/objects/index.ts"),l=r("./src/WebGL/shaders/index.ts"),c=r("./src/WebGL/shapes/index.ts"),d=r("./src/WebGL/Camera.ts"),u=r("./src/WebGL/Fog.ts"),h=r("./src/WebGL/Renderer.ts"),p=r("./src/WebGL/SpritePlugin.ts")},"./src/WebGL/materials/ImposterMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ImposterMaterial:()=>l});var n=r("./src/WebGL/constants/Coloring.ts"),i=r("./src/WebGL/constants/Shading.ts"),o=r("./src/colors.ts"),a=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/materials/Material.ts");class l extends s.Material{constructor(t){super(),this.color=new o.Color(16777215),this.ambient=new o.Color(1048575),this.emissive=new o.Color(0),this.imposter=!0,this.wrapAround=!1,this.wrapRGB=new a.Vector3(1,1,1),this.map=void 0,this.lightMap=null,this.specularMap=null,this.envMap=null,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.shading=i.Shading.SmoothShading,this.shaderID=null,this.vertexColors=n.Coloring.NoColors,this.skinning=!1,this.setValues(t)}clone(t=new l){return super.clone.call(this,t),t.color.copy(this.color),t.ambient.copy(this.ambient),t.emissive.copy(this.emissive),t.wrapAround=this.wrapAround,t.wrapRGB.copy(this.wrapRGB),t.map=this.map,t.lightMap=this.lightMap,t.specularMap=this.specularMap,t.envMap=this.envMap,t.combine=this.combine,t.reflectivity=this.reflectivity,t.refractionRatio=this.refractionRatio,t.fog=this.fog,t.shading=this.shading,t.shaderID=this.shaderID,t.vertexColors=this.vertexColors,t.skinning=this.skinning,t.morphTargets=this.morphTargets,t.morphNormals=this.morphNormals,t}}},"./src/WebGL/materials/InstancedMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{InstancedMaterial:()=>l});var n=r("./src/WebGL/constants/Coloring.ts"),i=r("./src/WebGL/constants/Shading.ts"),o=r("./src/colors.ts"),a=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/materials/Material.ts");class l extends s.Material{constructor(t){super(),this.color=new o.Color(16777215),this.ambient=new o.Color(1048575),this.emissive=new o.Color(0),this.wrapAround=!1,this.wrapRGB=new a.Vector3(1,1,1),this.map=void 0,this.lightMap=null,this.specularMap=null,this.envMap=null,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.shading=i.Shading.SmoothShading,this.shaderID="instanced",this.vertexColors=n.Coloring.NoColors,this.skinning=!1,this.sphere=null,this.setValues(t)}clone(t=new l){return super.clone.call(this,t),t.color.copy(this.color),t.ambient.copy(this.ambient),t.emissive.copy(this.emissive),t.wrapAround=this.wrapAround,t.wrapRGB.copy(this.wrapRGB),t.map=this.map,t.lightMap=this.lightMap,t.specularMap=this.specularMap,t.envMap=this.envMap,t.combine=this.combine,t.reflectivity=this.reflectivity,t.refractionRatio=this.refractionRatio,t.fog=this.fog,t.shading=this.shading,t.shaderID=this.shaderID,t.vertexColors=this.vertexColors,t.skinning=this.skinning,t.morphTargets=this.morphTargets,t.morphNormals=this.morphNormals,t.sphere=this.sphere,t}}},"./src/WebGL/materials/LineBasicMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{LineBasicMaterial:()=>o});var n=r("./src/colors.ts"),i=r("./src/WebGL/materials/Material.ts");class o extends i.Material{constructor(t){super(),this.color=new n.Color(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.vertexColors=!1,this.fog=!0,this.shaderID="basic",this.setValues(t)}clone(t=new o){return super.clone.call(this,t),t.color.copy(this.color),t}}},"./src/WebGL/materials/Material.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Material:()=>s,MaterialIdCount:()=>l});var n=r("./src/WebGL/constants/Sides.ts"),i=r("./src/WebGL/core/index.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/colors.ts");class s extends i.EventDispatcher{constructor(){super(...arguments),this.id=l++,this.name="",this.side=n.FrontSide,this.opacity=1,this.transparent=!1,this.depthTest=!0,this.depthWrite=!0,this.stencilTest=!0,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.alphaTest=0,this.visible=!0,this.needsUpdate=!0,this.outline=!1,this.wireframe=!1}setValues(t={}){if(void 0!==t)for(var e in t){var r=t[e];if(void 0!==r){if(e in this){var n=this[e];n instanceof a.Color&&r instanceof a.Color?n.copy(r):n instanceof a.Color?n.set(r):n instanceof o.Vector3&&r instanceof o.Vector3?n.copy(r):this[e]=r}}else console.warn("$3Dmol.Material: '"+e+"' parameter is undefined.")}}clone(t=new s){return t.name=this.name,t.side=this.side,t.opacity=this.opacity,t.transparent=this.transparent,t.depthTest=this.depthTest,t.depthWrite=this.depthWrite,t.stencilTest=this.stencilTest,t.polygonOffset=this.polygonOffset,t.polygonOffsetFactor=this.polygonOffsetFactor,t.polygonOffsetUnits=this.polygonOffsetUnits,t.alphaTest=this.alphaTest,t.overdraw=this.overdraw,t.visible=this.visible,t}dispose(){this.dispatchEvent({type:"dispose"})}}let l=0},"./src/WebGL/materials/MeshDoubleLambertMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{MeshDoubleLambertMaterial:()=>o});var n=r("./src/WebGL/constants/Sides.ts"),i=r("./src/WebGL/materials/MeshLambertMaterial.ts");class o extends i.MeshLambertMaterial{constructor(t){super(t),this.shaderID="lambertdouble",this.side=n.DoubleSide,this.outline=!1}clone(t=new o){return super.clone.call(this,t),t}}},"./src/WebGL/materials/MeshLambertMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{MeshLambertMaterial:()=>l});var n=r("./src/WebGL/constants/Coloring.ts"),i=r("./src/WebGL/constants/Shading.ts"),o=r("./src/WebGL/materials/Material.ts"),a=r("./src/colors.ts"),s=r("./src/WebGL/math/index.ts");class l extends o.Material{constructor(t){super(),this.color=new a.Color(16777215),this.ambient=new a.Color(1048575),this.emissive=new a.Color(0),this.wrapAround=!1,this.wrapRGB=new s.Vector3(1,1,1),this.map=void 0,this.lightMap=null,this.specularMap=null,this.envMap=null,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.shading=i.Shading.SmoothShading,this.shaderID="lambert",this.vertexColors=n.Coloring.NoColors,this.skinning=!1,this.setValues(t)}clone(t=new l){return super.clone.call(this,t),t.color.copy(this.color),t.ambient.copy(this.ambient),t.emissive.copy(this.emissive),t.wrapAround=this.wrapAround,t.wrapRGB.copy(this.wrapRGB),t.map=this.map,t.lightMap=this.lightMap,t.specularMap=this.specularMap,t.envMap=this.envMap,t.combine=this.combine,t.reflectivity=this.reflectivity,t.refractionRatio=this.refractionRatio,t.fog=this.fog,t.shading=this.shading,t.shaderID=this.shaderID,t.vertexColors=this.vertexColors,t.skinning=this.skinning,t.morphTargets=this.morphTargets,t.morphNormals=this.morphNormals,t}}},"./src/WebGL/materials/MeshOutlineMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{MeshOutlineMaterial:()=>o});var n=r("./src/colors.ts"),i=r("./src/WebGL/materials/Material.ts");class o extends i.Material{constructor(t){super(),t=t||{},this.fog=!0,this.shaderID="outline",this.wireframe=!1,this.outlineColor=t.color||new n.Color(0,0,0),this.outlineWidth=t.width||.1,this.outlinePushback=t.pushback||1}clone(t=new o){return super.clone.call(this,t),t.fog=this.fog,t.shaderID=this.shaderID,t.wireframe=this.wireframe,t}}},"./src/WebGL/materials/SphereImposterMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SphereImposterMaterial:()=>i});var n=r("./src/WebGL/materials/ImposterMaterial.ts");class i extends n.ImposterMaterial{constructor(t){super(t),this.shaderID="sphereimposter",this.setValues(t)}clone(t=new i){return super.clone.call(this,t),t}}},"./src/WebGL/materials/SphereImposterOutlineMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SphereImposterOutlineMaterial:()=>o});var n=r("./src/colors.ts"),i=r("./src/WebGL/materials/ImposterMaterial.ts");class o extends i.ImposterMaterial{constructor(t){super(t),t=t||{},this.shaderID="sphereimposteroutline",this.outlineColor=t.color||new n.Color(0,0,0),this.outlineWidth=t.width||.1,this.outlinePushback=t.pushback||1,this.setValues(t)}clone(t=new o){return super.clone.call(this,t),t.outlineColor=this.outlineColor,t.outlineWidth=this.outlineWidth,t.outlinePushback=this.outlinePushback,t}}},"./src/WebGL/materials/SpriteMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SpriteMaterial:()=>l});var n=r("./src/WebGL/constants/SpriteAlignment.ts"),i=r("./src/WebGL/core/Texture.ts"),o=r("./src/colors.ts"),a=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/materials/Material.ts");class l extends s.Material{constructor(t){super(),this.color=new o.Color(16777215),this.map=new i.Texture,this.useScreenCoordinates=!0,this.fog=!1,this.uvOffset=new a.Vector2(0,0),this.uvScale=new a.Vector2(1,1),this.depthTest=!this.useScreenCoordinates,this.sizeAttenuation=!this.useScreenCoordinates,this.screenOffset=this.screenOffset,this.scaleByViewPort=!this.sizeAttenuation,this.alignment=n.SpriteAlignment.center.clone(),this.setValues(t),void 0===(t=t||{}).depthTest&&(this.depthTest=!this.useScreenCoordinates),void 0===t.sizeAttenuation&&(this.sizeAttenuation=!this.useScreenCoordinates),void 0===t.scaleByViewPort&&(this.scaleByViewPort=!this.sizeAttenuation)}clone(t=new l){return super.clone.call(this,t),t.color.copy(this.color),t.map=this.map,t.useScreenCoordinates=this.useScreenCoordinates,t.screenOffset=this.screenOffset,t.sizeAttenuation=this.sizeAttenuation,t.scaleByViewport=this.scaleByViewPort,t.alignment.copy(this.alignment),t.uvOffset.copy(this.uvOffset),t}}},"./src/WebGL/materials/StickImposterMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{StickImposterMaterial:()=>i});var n=r("./src/WebGL/materials/ImposterMaterial.ts");class i extends n.ImposterMaterial{constructor(t){super(t),this.shaderID="stickimposter",this.setValues(t)}clone(t=new i){return super.clone.call(this,t),t}}},"./src/WebGL/materials/StickImposterOutlineMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{StickImposterOutlineMaterial:()=>o});var n=r("./src/colors.ts"),i=r("./src/WebGL/materials/ImposterMaterial.ts");class o extends i.ImposterMaterial{constructor(t={}){super(t),this.shaderID="stickimposteroutline",this.outlineColor=new n.Color(0,0,0),this.outlineWidth=.1,this.outlinePushback=1,t.color&&(this.outlineColor=t.color),t.width&&(this.outlineWidth=t.width),t.pushback&&(this.outlinePushback=t.pushback),this.setValues(t)}clone(t=new o){return super.clone.call(this,t),t.outlineColor=this.outlineColor,t.outlineWidth=this.outlineWidth,t.outlinePushback=this.outlinePushback,t}}},"./src/WebGL/materials/VolumetricMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{VolumetricMaterial:()=>a});var n=r("./src/WebGL/constants/Sides.ts"),i=r("./src/colors.ts"),o=r("./src/WebGL/materials/Material.ts");class a extends o.Material{constructor(t){super(),this.transparent=!1,this.volumetric=!0,this.color=new i.Color(16777215),this.transferfn=null,this.map=void 0,this.extent=[],this.maxdepth=100,this.unit=0,this.texmatrix=null,this.transfermin=-1,this.transfermax=1,this.subsamples=5,this.shaderID="volumetric",this.side=n.FrontSide,this.setValues(t)}clone(t=new a){return super.clone.call(this,t),t.transparent=this.transparent,t.volumetric=this.volumetric,t.color=this.color,t.transferfn=this.transferfn,t.map=this.map,t.extent=this.extent,t.maxdepth=this.maxdepth,t.unit=this.unit,t.texmatrix=this.texmatrix,t.transfermin=this.transfermin,t.transfermax=this.transfermax,t.subsamples=this.subsamples,t.shaderID=this.shaderID,t.side=this.side,t}}},"./src/WebGL/materials/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ImposterMaterial:()=>n.ImposterMaterial,InstancedMaterial:()=>i.InstancedMaterial,LineBasicMaterial:()=>o.LineBasicMaterial,Material:()=>a.Material,MaterialIdCount:()=>a.MaterialIdCount,MeshDoubleLambertMaterial:()=>s.MeshDoubleLambertMaterial,MeshLambertMaterial:()=>l.MeshLambertMaterial,MeshOutlineMaterial:()=>c.MeshOutlineMaterial,SphereImposterMaterial:()=>d.SphereImposterMaterial,SphereImposterOutlineMaterial:()=>u.SphereImposterOutlineMaterial,SpriteMaterial:()=>h.SpriteMaterial,StickImposterMaterial:()=>p.StickImposterMaterial,StickImposterOutlineMaterial:()=>f.StickImposterOutlineMaterial,VolumetricMaterial:()=>m.VolumetricMaterial});var n=r("./src/WebGL/materials/ImposterMaterial.ts"),i=r("./src/WebGL/materials/InstancedMaterial.ts"),o=r("./src/WebGL/materials/LineBasicMaterial.ts"),a=r("./src/WebGL/materials/Material.ts"),s=r("./src/WebGL/materials/MeshDoubleLambertMaterial.ts"),l=r("./src/WebGL/materials/MeshLambertMaterial.ts"),c=r("./src/WebGL/materials/MeshOutlineMaterial.ts"),d=r("./src/WebGL/materials/SphereImposterMaterial.ts"),u=r("./src/WebGL/materials/SphereImposterOutlineMaterial.ts"),h=r("./src/WebGL/materials/SpriteMaterial.ts"),p=r("./src/WebGL/materials/StickImposterMaterial.ts"),f=r("./src/WebGL/materials/StickImposterOutlineMaterial.ts"),m=r("./src/WebGL/materials/VolumetricMaterial.ts")},"./src/WebGL/math/Quaternion.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Quaternion:()=>n});class n{constructor(t,e,r,n){this.x=t||0,this.y=e||0,this.z=r||0,this.w=void 0!==n?n:1}set(t,e,r,n){return this.x=t,this.y=e,this.z=r,this.w=n,this}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this}conjugate(){return this.x*=-1,this.y*=-1,this.z*=-1,this}inverse(){return this.conjugate().normalize()}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}lengthxyz(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}normalize(){let t=this.length();return 0===t?(this.x=0,this.y=0,this.z=0,this.w=1):(t=1/t,this.x*=t,this.y*=t,this.z*=t,this.w*=t),this}multiply(t){return this.multiplyQuaternions(this,t)}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}multiplyQuaternions(t,e){const r=t.x,n=t.y,i=t.z,o=t.w,a=e.x,s=e.y,l=e.z,c=e.w;return this.x=r*c+o*a+n*l-i*s,this.y=n*c+o*s+i*a-r*l,this.z=i*c+o*l+r*s-n*a,this.w=o*c-r*a-n*s-i*l,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}clone(){return new n(this.x,this.y,this.z,this.w)}setFromEuler(t){const e=Math.cos(t.x/2),r=Math.cos(t.y/2),n=Math.cos(t.z/2),i=Math.sin(t.x/2),o=Math.sin(t.y/2),a=Math.sin(t.z/2);return this.x=i*r*n+e*o*a,this.y=e*o*n-i*r*a,this.z=e*r*a+i*o*n,this.w=e*r*n-i*o*a,this}}},"./src/WebGL/math/Vector2.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Vector2:()=>n});class n{constructor(t,e){this.x=t||0,this.y=e||0}set(t,e){return this.x=t,this.y=e,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}copy(t){return this.x=t.x,this.y=t.y,this}clone(){return new n(this.x,this.y)}}},"./src/WebGL/math/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Matrix3:()=>l.Matrix3,Matrix4:()=>l.Matrix4,Quaternion:()=>n.Quaternion,Ray:()=>l.Ray,Vector2:()=>i.Vector2,Vector3:()=>l.Vector3,clamp:()=>o.clamp,conversionMatrix3:()=>a.conversionMatrix3,degToRad:()=>s.degToRad});var n=r("./src/WebGL/math/Quaternion.ts"),i=r("./src/WebGL/math/Vector2.ts"),o=r("./src/WebGL/math/utils/clamp.ts"),a=r("./src/WebGL/math/utils/conversionMatrix3.ts"),s=r("./src/WebGL/math/utils/degToRad.ts"),l=r("./src/WebGL/math/math.ts")},"./src/WebGL/math/math.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Matrix3:()=>h,Matrix4:()=>d,Ray:()=>p,Vector3:()=>u});var n,i,o,a,s,l=r("./src/WebGL/math/utils/degToRad.ts"),c=r("./src/WebGL/math/utils/clamp.ts");class d{constructor(t=1,e=0,r=0,n=0,i=0,o=1,a=0,s=0,l=0,c=0,d=1,u=0,h=0,p=0,f=0,m=1){void 0!==t&&"number"!=typeof t?this.elements=new Float32Array(t):(this.elements=new Float32Array(16),this.elements[0]=t,this.elements[4]=e,this.elements[8]=r,this.elements[12]=n,this.elements[1]=i,this.elements[5]=o,this.elements[9]=a,this.elements[13]=s,this.elements[2]=l,this.elements[6]=c,this.elements[10]=d,this.elements[14]=u,this.elements[3]=h,this.elements[7]=p,this.elements[11]=f,this.elements[15]=m)}makeScale(t,e,r){throw new Error("Method not implemented.")}set(t,e,r,n,i,o,a,s,l,c,d,u,h,p,f,m){const g=this.elements;return g[0]=t,g[4]=e,g[8]=r,g[12]=n,g[1]=i,g[5]=o,g[9]=a,g[13]=s,g[2]=l,g[6]=c,g[10]=d,g[14]=u,g[3]=h,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}copy(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15]),this}matrix3FromTopLeft(){const t=this.elements;return new h(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10])}setRotationFromEuler(t,e){const r=this.elements,{x:n,y:i,z:o}=t,a=Math.cos(n),s=Math.sin(n),l=Math.cos(i),c=Math.sin(i),d=Math.cos(o),u=Math.sin(o);if(void 0===e||"XYZ"===e){const t=a*d,e=a*u,n=s*d,i=s*u;r[0]=l*d,r[4]=-l*u,r[8]=c,r[1]=e+n*c,r[5]=t-i*c,r[9]=-s*l,r[2]=i-t*c,r[6]=n+e*c,r[10]=a*l}else console.error(`Error with matrix4 setRotationFromEuler. Order: ${e}`);return this}setRotationFromQuaternion(t){const e=this.elements,{x:r,y:n,z:i,w:o}=t,a=r+r,s=n+n,l=i+i,c=r*a,d=r*s,u=r*l,h=n*s,p=n*l,f=i*l,m=o*a,g=o*s,v=o*l;return e[0]=1-(h+f),e[4]=d-v,e[8]=u+g,e[1]=d+v,e[5]=1-(c+f),e[9]=p-m,e[2]=u-g,e[6]=p+m,e[10]=1-(c+h),this}multiplyMatrices(t,e){const r=t.elements,n=e.elements,i=this.elements,o=r[0],a=r[4],s=r[8],l=r[12],c=r[1],d=r[5],u=r[9],h=r[13],p=r[2],f=r[6],m=r[10],g=r[14],v=r[3],b=r[7],y=r[11],x=r[15],w=n[0],_=n[4],k=n[8],A=n[12],T=n[1],M=n[5],S=n[9],C=n[13],E=n[2],L=n[6],z=n[10],O=n[14],D=n[3],I=n[7],F=n[11],R=n[15];return i[0]=o*w+a*T+s*E+l*D,i[4]=o*_+a*M+s*L+l*I,i[8]=o*k+a*S+s*z+l*F,i[12]=o*A+a*C+s*O+l*R,i[1]=c*w+d*T+u*E+h*D,i[5]=c*_+d*M+u*L+h*I,i[9]=c*k+d*S+u*z+h*F,i[13]=c*A+d*C+u*O+h*R,i[2]=p*w+f*T+m*E+g*D,i[6]=p*_+f*M+m*L+g*I,i[10]=p*k+f*S+m*z+g*F,i[14]=p*A+f*C+m*O+g*R,i[3]=v*w+b*T+y*E+x*D,i[7]=v*_+b*M+y*L+x*I,i[11]=v*k+b*S+y*z+x*F,i[15]=v*A+b*C+y*O+x*R,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}makeTranslation(t,e,r){return this.set(1,0,0,t,0,1,0,e,0,0,1,r,0,0,0,1),this}snap(t){t||(t=4);const e=Math.pow(10,4),r=this.elements;for(let t=0;t<16;t++){const n=Math.round(r[t]);n===Math.round(r[t]*e)/e&&(r[t]=n)}return this}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t){const e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this}translate(t){const e=this.elements;return e[12]+=t.x,e[13]+=t.y,e[14]+=t.z,this}getInverse(t,e){const r=this.elements,n=t.elements,i=n[0],o=n[4],a=n[8],s=n[12],l=n[1],c=n[5],d=n[9],u=n[13],h=n[2],p=n[6],f=n[10],m=n[14],g=n[3],v=n[7],b=n[11],y=n[15];r[0]=d*m*v-u*f*v+u*p*b-c*m*b-d*p*y+c*f*y,r[4]=s*f*v-a*m*v-s*p*b+o*m*b+a*p*y-o*f*y,r[8]=a*u*v-s*d*v+s*c*b-o*u*b-a*c*y+o*d*y,r[12]=s*d*p-a*u*p-s*c*f+o*u*f+a*c*m-o*d*m,r[1]=u*f*g-d*m*g-u*h*b+l*m*b+d*h*y-l*f*y,r[5]=a*m*g-s*f*g+s*h*b-i*m*b-a*h*y+i*f*y,r[9]=s*d*g-a*u*g-s*l*b+i*u*b+a*l*y-i*d*y,r[13]=a*u*h-s*d*h+s*l*f-i*u*f-a*l*m+i*d*m,r[2]=c*m*g-u*p*g+u*h*v-l*m*v-c*h*y+l*p*y,r[6]=s*p*g-o*m*g-s*h*v+i*m*v+o*h*y-i*p*y,r[10]=o*u*g-s*c*g+s*l*v-i*u*v-o*l*y+i*c*y,r[14]=s*c*h-o*u*h-s*l*p+i*u*p+o*l*m-i*c*m,r[3]=d*p*g-c*f*g-d*h*v+l*f*v+c*h*b-l*p*b,r[7]=o*f*g-a*p*g+a*h*v-i*f*v-o*h*b+i*p*b,r[11]=a*c*g-o*d*g-a*l*v+i*d*v+o*l*b-i*c*b,r[15]=o*d*h-a*c*h+a*l*p-i*d*p-o*l*f+i*c*f;const x=i*r[0]+l*r[4]+h*r[8]+g*r[12];if(0===x){const t="Matrix4.getInverse(): can't invert matrix, determinant is 0";if(e)throw new Error(t);return console.warn(t),this.identity(),this}return this.multiplyScalar(1/x),this}isReflected(){const t=this.elements,e=t[0],r=t[4],n=t[8],i=t[1],o=t[5],a=t[9],s=t[2],l=t[6],c=t[10];return e*o*c+i*l*n+s*r*a-s*o*n-i*r*c-e*l*a<0}scale(t){const e=this.elements,{x:r}=t,{y:n}=t,{z:i}=t;return e[0]*=r,e[4]*=n,e[8]*=i,e[1]*=r,e[5]*=n,e[9]*=i,e[2]*=r,e[6]*=n,e[10]*=i,e[3]*=r,e[7]*=n,e[11]*=i,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,Math.max(r,n)))}makeFrustum(t,e,r,n,i,o){const a=this.elements,s=2*i/(e-t),l=2*i/(n-r),c=(e+t)/(e-t),d=(n+r)/(n-r),u=-(o+i)/(o-i),h=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=l,a[9]=d,a[13]=0,a[2]=0,a[6]=0,a[10]=u,a[14]=h,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makePerspective(t,e,r,n){const i=r*Math.tan((0,l.degToRad)(.5*t)),o=-i,a=o*e,s=i*e;return this.makeFrustum(a,s,o,i,r,n)}makeOrthographic(t,e,r,n,i,o){const a=this.elements,s=1/(e-t),l=1/(r-n),c=1/(o-i),d=(e+t)*s,u=(r+n)*l,h=(o+i)*c;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-d,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-u,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-h,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}isEqual(t){const e=t.elements,r=this.elements;return r[0]===e[0]&&r[4]===e[4]&&r[8]===e[8]&&r[12]===e[12]&&r[1]===e[1]&&r[5]===e[5]&&r[9]===e[9]&&r[13]===e[13]&&r[2]===e[2]&&r[6]===e[6]&&r[10]===e[10]&&r[14]===e[14]&&r[3]===e[3]&&r[7]===e[7]&&r[11]===e[11]&&r[15]===e[15]}clone(){const t=this.elements;return new d(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])}isIdentity(){const t=this.elements;return 1===t[0]&&0===t[4]&&0===t[8]&&0===t[12]&&0===t[1]&&1===t[5]&&0===t[9]&&0===t[13]&&0===t[2]&&0===t[6]&&1===t[10]&&0===t[14]&&0===t[3]&&0===t[7]&&0===t[11]&&1===t[15]}isNearlyIdentity(t){return this.clone().snap(t).isIdentity()}getScale(t){const e=this.elements;return t=t||new u,o.set(e[0],e[1],e[2]),a.set(e[4],e[5],e[6]),s.set(e[8],e[9],e[10]),t.x=o.length(),t.y=a.length(),t.z=s.length(),t}lookAt(t,e,r){const n=this.elements;return s.subVectors(t,e).normalize(),0===s.length()&&(s.z=1),o.crossVectors(r,s).normalize(),0===o.length()&&(s.x+=1e-4,o.crossVectors(r,s).normalize()),a.crossVectors(s,o),n[0]=o.x,n[4]=a.x,n[8]=s.x,n[1]=o.y,n[5]=a.y,n[9]=s.y,n[2]=o.z,n[6]=a.z,n[10]=s.z,this}compose(t,e,r){const o=this.elements;return n.identity(),n.setRotationFromQuaternion(e),i.makeScale(r.x,r.y,r.z),this.multiplyMatrices(n,i),o[12]=t.x,o[13]=t.y,o[14]=t.z,this}}n=new d,i=new d;class u{constructor(t,e,r){this.x=t||0,this.y=e||0,this.z=r||0,this.atomid=void 0}set(t,e,r){return this.x=t,this.y=e,this.z=r,this}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}divideScalar(t){return 0!==t?(this.x/=t,this.y/=t,this.z/=t):(this.x=0,this.y=0,this.z=0),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,r=this.y-t.y,n=this.z-t.z;return e*e+r*r+n*n}applyMatrix3(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.elements;return this.x=i[0]*e+i[3]*r+i[6]*n,this.y=i[1]*e+i[4]*r+i[7]*n,this.z=i[2]*e+i[5]*r+i[8]*n,this}applyMatrix4(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.elements;return this.x=i[0]*e+i[4]*r+i[8]*n+i[12],this.y=i[1]*e+i[5]*r+i[9]*n+i[13],this.z=i[2]*e+i[6]*r+i[10]*n+i[14],this}applyProjection(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.elements,o=i[3]*e+i[7]*r+i[11]*n+i[15];return this.x=(i[0]*e+i[4]*r+i[8]*n+i[12])/o,this.y=(i[1]*e+i[5]*r+i[9]*n+i[13])/o,this.z=(i[2]*e+i[6]*r+i[10]*n+i[14])/o,this}applyQuaternion(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.x,o=t.y,a=t.z,s=t.w,l={};l.x=2*(r*a-n*o),l.y=2*(n*i-e*a),l.z=2*(e*o-r*i);const c={};return c.x=l.y*a-l.z*o,c.y=l.z*i-l.x*a,c.z=l.x*o-l.y*i,this.x=e+s*l.x+c.x,this.y=r+s*l.y+c.y,this.z=n+s*l.z+c.z,this}negate(){return this.multiplyScalar(-1)}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}normalize(){return this.divideScalar(this.length())}cross(t){const{x:e}=this,{y:r}=this,{z:n}=this;return this.x=r*t.z-n*t.y,this.y=n*t.x-e*t.z,this.z=e*t.y-r*t.x,this}crossVectors(t,e){return this.x=t.y*e.z-t.z*e.y,this.y=t.z*e.x-t.x*e.z,this.z=t.x*e.y-t.y*e.x,this}equals(t){return this.x==t.x&&this.y==t.y&&this.z==t.z}getPositionFromMatrix(t){return this.x=t.elements[12],this.y=t.elements[13],this.z=t.elements[14],this}setEulerFromRotationMatrix(t,e){const r=t.elements,n=r[0],i=r[4],o=r[8],a=r[5],s=r[9],l=r[6],d=r[10];return void 0===e||"XYZ"===e?(this.y=Math.asin((0,c.clamp)(o,-1,1)),Math.abs(o)<.99999?(this.x=Math.atan2(-s,d),this.z=Math.atan2(-i,n)):(this.x=Math.atan2(l,a),this.z=0)):console.error(`Error with vector's setEulerFromRotationMatrix: Unknown order: ${e}`),this}rotateAboutVector(t,e){t.normalize();const r=Math.cos(e),n=Math.sin(e),i=this.clone().multiplyScalar(r),o=t.clone().cross(this).multiplyScalar(n),a=t.clone().multiplyScalar(t.clone().dot(this)).multiplyScalar(1-r),s=i.add(o).add(a);return this.x=s.x,this.y=s.y,this.z=s.z,this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}transformDirection(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.elements;return this.x=i[0]*e+i[4]*r+i[8]*n,this.y=i[1]*e+i[5]*r+i[9]*n,this.z=i[2]*e+i[6]*r+i[10]*n,this.normalize()}clone(){return new u(this.x,this.y,this.z)}unproject(t){const e=n;return e.multiplyMatrices(t.matrixWorld,e.getInverse(t.projectionMatrix)),this.applyMatrix4(e)}}o=new u,a=new u,s=new u;class h{constructor(t=1,e=0,r=0,n=0,i=1,o=0,a=0,s=0,l=1){this.elements=new Float32Array(9),this.set(t,e,r,n,i,o,a,s,l)}set(t,e,r,n,i,o,a,s,l){const c=this.elements;return c[0]=t,c[3]=e,c[6]=r,c[1]=n,c[4]=i,c[7]=o,c[2]=a,c[5]=s,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=t.elements;this.set(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}getInverse3(t){const e=t.elements,r=this.elements;r[0]=e[4]*e[8]-e[5]*e[7],r[3]=e[6]*e[5]-e[3]*e[8],r[6]=e[3]*e[7]-e[6]*e[4],r[1]=e[7]*e[2]-e[1]*e[8],r[4]=e[0]*e[8]-e[6]*e[2],r[7]=e[1]*e[6]-e[0]*e[7],r[2]=e[1]*e[5]-e[2]*e[4],r[5]=e[2]*e[3]-e[0]*e[5],r[8]=e[0]*e[4]-e[1]*e[3];const n=e[0]*r[0]+e[3]*r[1]+e[6]*r[2];return this.multiplyScalar(1/n),this}getInverse(t,e){const r=t.elements,n=this.elements;n[0]=r[10]*r[5]-r[6]*r[9],n[1]=-r[10]*r[1]+r[2]*r[9],n[2]=r[6]*r[1]-r[2]*r[5],n[3]=-r[10]*r[4]+r[6]*r[8],n[4]=r[10]*r[0]-r[2]*r[8],n[5]=-r[6]*r[0]+r[2]*r[4],n[6]=r[9]*r[4]-r[5]*r[8],n[7]=-r[9]*r[0]+r[1]*r[8],n[8]=r[5]*r[0]-r[1]*r[4];const i=r[0]*n[0]+r[1]*n[3]+r[2]*n[6];if(0===i){const t="Matrix3.getInverse(): can't invert matrix, determinant is 0";if(e)throw new Error(t);return console.warn(t),this.identity(),this}return this.multiplyScalar(1/i),this}getDeterminant(){const t=this.elements;return t[0]*t[4]*t[8]+t[1]*t[5]*t[6]+t[2]*t[3]*t[7]-t[2]*t[4]*t[6]-t[1]*t[3]*t[8]-t[0]*t[5]*t[7]}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}clone(){const t=this.elements;return new h(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8])}getMatrix4(){const t=this.elements;return new d(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0)}}class p{constructor(t,e){this.origin=void 0!==t?t:new u,this.direction=void 0!==e?e:new u}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return(e||new u).copy(this.direction).multiplyScalar(t).add(this.origin)}recast(t){const e=o;return this.origin.copy(this.at(t,e)),this}closestPointToPoint(t,e){const r=e||new u;r.subVectors(t,this.origin);const n=r.dot(this.direction);return r.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(t){const e=o,r=e.subVectors(t,this.origin).dot(this.direction);return e.copy(this.direction).multiplyScalar(r).add(this.origin),e.distanceTo(t)}isIntersectionCylinder(){}isIntersectionSphere(t){return this.distanceToPoint(t.center)<=t.radius}isIntersectionPlane(t){return 0!==t.normal.dot(this.direction)||0===t.distanceToPoint(this.origin)}distanceToPlane(t){const e=t.normal.dot(this.direction);return 0===e?0===t.distanceToPoint(this.origin)?0:void 0:-(this.origin.dot(t.normal)+t.constant)/e}intersectPlane(t,e){const r=this.distanceToPlane(t);if(void 0!==r)return this.at(r,e)}applyMatrix4(t){return this.direction.add(this.origin).applyMatrix4(t),this.origin.applyMatrix4(t),this.direction.sub(this.origin),this}clone(){return(new p).copy(this)}}},"./src/WebGL/math/utils/clamp.ts":(t,e,r)=>{"use strict";function n(t,e,r){return Math.min(Math.max(t,e),r)}r.r(e),r.d(e,{clamp:()=>n})},"./src/WebGL/math/utils/conversionMatrix3.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{conversionMatrix3:()=>i});var n=r("./src/WebGL/math/math.ts");function i(t,e,r,i,o,a){i=i*Math.PI/180,o=o*Math.PI/180,a=a*Math.PI/180;const s=t=>t*t,l=Math.cos(i),c=Math.cos(o),d=Math.cos(a),u=Math.sin(a);return new n.Matrix3(t,e*d,r*c,0,e*u,r*(l-c*d)/u,0,0,r*Math.sqrt(1-s(l)-s(c)-s(d)+2*l*c*d)/u)}},"./src/WebGL/math/utils/degToRad.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{degToRad:()=>i});const n=Math.PI/180;function i(t){return t*n}},"./src/WebGL/objects/Line.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Line:()=>a,LineStyle:()=>n});var n,i=r("./src/WebGL/materials/index.ts"),o=r("./src/WebGL/core/index.ts");!function(t){t[t.LineStrip=0]="LineStrip",t[t.LinePieces=1]="LinePieces"}(n||(n={}));class a extends o.Object3D{constructor(t,e=new i.LineBasicMaterial({color:16777215*Math.random()}),r=n.LineStrip){super(),this.geometry=t,this.material=e,this.type=r}clone(t=new a(this.geometry,this.material,this.type)){return super.clone.call(this,t),t}}},"./src/WebGL/objects/Mesh.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Mesh:()=>i});var n=r("./src/WebGL/core/index.ts");class i extends n.Object3D{constructor(t,e){super(),this.geometry=t,this.material=e}clone(t){return void 0===t&&(t=new i(this.geometry,this.material)),super.clone.call(this,t),t}}},"./src/WebGL/objects/Sprite.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Sprite:()=>o});var n=r("./src/WebGL/materials/index.ts"),i=r("./src/WebGL/core/index.ts");class o extends i.Object3D{constructor(t=new n.SpriteMaterial){super(),this.material=t,this.rotation3d=this.rotation,this.rotation=0}updateMatrix(){this.matrix.setPosition(this.position),this.rotation3d.set(0,0,this.rotation),this.matrix.setRotationFromEuler(this.rotation3d),1===this.scale.x&&1===this.scale.y||this.matrix.scale(this.scale),this.matrixWorldNeedsUpdate=!0}clone(t=new o(this.material)){return i.Object3D.prototype.clone.call(this,t),t}}},"./src/WebGL/objects/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Line:()=>n.Line,LineStyle:()=>n.LineStyle,Mesh:()=>i.Mesh,Sprite:()=>o.Sprite});var n=r("./src/WebGL/objects/Line.ts"),i=r("./src/WebGL/objects/Mesh.ts"),o=r("./src/WebGL/objects/Sprite.ts")},"./src/WebGL/shaders/ShaderType.ts":(t,e,r)=>{"use strict";r.r(e)},"./src/WebGL/shaders/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ShaderLib:()=>n.ShaderLib,ShaderUtils:()=>i.ShaderUtils,basic:()=>n.basic,clone:()=>i.clone,instanced:()=>n.instanced,lambert:()=>n.lambert,lambertdouble:()=>n.lambertdouble,outline:()=>n.outline,screen:()=>n.screen,screenaa:()=>n.screenaa,sphereimposter:()=>n.sphereimposter,sphereimposteroutline:()=>n.sphereimposteroutline,sprite:()=>n.sprite,stickimposter:()=>n.stickimposter,stickimposteroutline:()=>n.stickimposteroutline,volumetric:()=>n.volumetric});var n=r("./src/WebGL/shaders/lib/index.ts"),i=r("./src/WebGL/shaders/utils/index.ts");r("./src/WebGL/shaders/ShaderType.ts")},"./src/WebGL/shaders/lib/basic/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{basic:()=>o});var n=r("./src/WebGL/shaders/lib/basic/uniforms.ts"),i=r("./src/WebGL/shaders/lib/basic/basic.frag");const o={vertexShader:r("./src/WebGL/shaders/lib/basic/basic.vert").default.replace("#define GLSLIFY 1",""),fragmentShader:i.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/basic/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3}}},"./src/WebGL/shaders/lib/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ShaderLib:()=>g,basic:()=>n.basic,instanced:()=>i.instanced,lambert:()=>o.lambert,lambertdouble:()=>a.lambertdouble,outline:()=>s.outline,screen:()=>l.screen,screenaa:()=>c.screenaa,sphereimposter:()=>d.sphereimposter,sphereimposteroutline:()=>u.sphereimposteroutline,sprite:()=>h.sprite,stickimposter:()=>p.stickimposter,stickimposteroutline:()=>f.stickimposteroutline,volumetric:()=>m.volumetric});var n=r("./src/WebGL/shaders/lib/basic/index.ts"),i=r("./src/WebGL/shaders/lib/instanced/index.ts"),o=r("./src/WebGL/shaders/lib/lambert/index.ts"),a=r("./src/WebGL/shaders/lib/lambertdouble/index.ts"),s=r("./src/WebGL/shaders/lib/outline/index.ts"),l=r("./src/WebGL/shaders/lib/screen/index.ts"),c=r("./src/WebGL/shaders/lib/screenaa/index.ts"),d=r("./src/WebGL/shaders/lib/sphereimposter/index.ts"),u=r("./src/WebGL/shaders/lib/sphereimposteroutline/index.ts"),h=r("./src/WebGL/shaders/lib/sprite/index.ts"),p=r("./src/WebGL/shaders/lib/stickimposter/index.ts"),f=r("./src/WebGL/shaders/lib/stickimposteroutline/index.ts"),m=r("./src/WebGL/shaders/lib/volumetric/index.ts");const g={basic:n.basic,instanced:i.instanced,lambert:o.lambert,lambertdouble:a.lambertdouble,outline:s.outline,screen:l.screen,screenaa:c.screenaa,sphereimposter:d.sphereimposter,sphereimposteroutline:u.sphereimposteroutline,sprite:h.sprite,stickimposter:p.stickimposter,stickimposteroutline:f.stickimposteroutline,volumetric:m.volumetric}},"./src/WebGL/shaders/lib/instanced/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{instanced:()=>a});var n=r("./src/WebGL/shaders/lib/instanced/uniforms.ts"),i=r("./src/WebGL/shaders/lib/instanced/instanced.frag"),o=r("./src/WebGL/shaders/lib/instanced/instanced.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/instanced/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/lambert/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{lambert:()=>a});var n=r("./src/WebGL/shaders/lib/lambert/uniforms.ts"),i=r("./src/WebGL/shaders/lib/lambert/lambert.frag"),o=r("./src/WebGL/shaders/lib/lambert/lambert.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/lambert/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/lambertdouble/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{lambertdouble:()=>a});var n=r("./src/WebGL/shaders/lib/lambertdouble/uniforms.ts"),i=r("./src/WebGL/shaders/lib/lambertdouble/lambertdouble.frag"),o=r("./src/WebGL/shaders/lib/lambertdouble/lambertdouble.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/lambertdouble/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/outline/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{outline:()=>a});var n=r("./src/WebGL/shaders/lib/outline/uniforms.ts"),i=r("./src/WebGL/shaders/lib/outline/outline.frag"),o=r("./src/WebGL/shaders/lib/outline/outline.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/outline/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>i});var n=r("./src/colors.ts");const i={opacity:{type:"f",value:1},outlineColor:{type:"c",value:new n.Color(0,0,0)},fogColor:{type:"c",value:new n.Color(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},outlineWidth:{type:"f",value:.1},outlinePushback:{type:"f",value:1}}},"./src/WebGL/shaders/lib/screen/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{screen:()=>a});var n=r("./src/WebGL/shaders/lib/screen/uniforms.ts"),i=r("./src/WebGL/shaders/lib/screen/screen.frag"),o=r("./src/WebGL/shaders/lib/screen/screen.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/screen/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={}},"./src/WebGL/shaders/lib/screenaa/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{screenaa:()=>a});var n=r("./src/WebGL/shaders/lib/screenaa/uniforms.ts"),i=r("./src/WebGL/shaders/lib/screenaa/screenaa.frag"),o=r("./src/WebGL/shaders/lib/screenaa/screenaa.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/screenaa/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={}},"./src/WebGL/shaders/lib/sphereimposter/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{sphereimposter:()=>o});var n=r("./src/WebGL/shaders/lib/sphereimposter/uniforms.ts"),i=r("./src/WebGL/shaders/lib/sphereimposter/sphereimposter.frag");const o={vertexShader:r("./src/WebGL/shaders/lib/sphereimposter/sphereimposter.vert").default.replace("#define GLSLIFY 1",""),fragmentShader:i.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/sphereimposter/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/sphereimposteroutline/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{sphereimposteroutline:()=>a});var n=r("./src/WebGL/shaders/lib/sphereimposteroutline/uniforms.ts"),i=r("./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.frag"),o=r("./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/sphereimposteroutline/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>i});var n=r("./src/colors.ts");const i={opacity:{type:"f",value:1},outlineColor:{type:"c",value:new n.Color(0,0,0)},fogColor:{type:"c",value:new n.Color(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},outlineWidth:{type:"f",value:.1},outlinePushback:{type:"f",value:1}}},"./src/WebGL/shaders/lib/sprite/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{sprite:()=>a});var n=r("./src/WebGL/shaders/lib/sprite/uniforms.ts"),i=r("./src/WebGL/shaders/lib/sprite/sprite.frag"),o=r("./src/WebGL/shaders/lib/sprite/sprite.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/sprite/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={}},"./src/WebGL/shaders/lib/stickimposter/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{stickimposter:()=>s});var n=r("./src/WebGL/shaders/lib/stickimposter/uniforms.ts"),i=r("./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag"),o=r("./src/WebGL/shaders/lib/stickimposter/stickimposter.partial.frag"),a=r("./src/WebGL/shaders/lib/stickimposter/stickimposter.vert");const s={fragmentShader:[i.default,o.default].join("\n").replace("#define GLSLIFY 1",""),vertexShader:a.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/stickimposter/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/stickimposteroutline/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{stickimposteroutline:()=>a});var n=r("./src/WebGL/shaders/lib/stickimposteroutline/uniforms.ts"),i=r("./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag"),o=r("./src/WebGL/shaders/lib/stickimposteroutline/stickimposteroutline.vert");const a={fragmentShader:(i.default+"gl_FragColor = vec4(color,1.0);}").replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/stickimposteroutline/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>i});var n=r("./src/colors.ts");const i={opacity:{type:"f",value:1},fogColor:{type:"c",value:new n.Color(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},outlineColor:{type:"c",value:new n.Color(0,0,0)},outlineWidth:{type:"f",value:.1},outlinePushback:{type:"f",value:1}}},"./src/WebGL/shaders/lib/volumetric/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{volumetric:()=>a});var n=r("./src/WebGL/shaders/lib/volumetric/uniforms.ts"),i=r("./src/WebGL/shaders/lib/volumetric/volumetric.frag"),o=r("./src/WebGL/shaders/lib/volumetric/volumetric.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/volumetric/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},data:{type:"i",value:3},colormap:{type:"i",value:4},depthmap:{type:"i",value:5},step:{type:"f",value:1},maxdepth:{type:"f",value:100},subsamples:{type:"f",value:5},textmat:{type:"mat4",value:[]},projinv:{type:"mat4",value:[]},transfermin:{type:"f",value:-.2},transfermax:{type:"f",value:.2}}},"./src/WebGL/shaders/utils/clone.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{clone:()=>i});var n=r("./src/colors.ts");function i(t){let e={};for(const i in t){e[i]={},e[i].type=t[i].type;var r=t[i].value;r instanceof n.Color?e[i].value=r.clone():"number"==typeof r?e[i].value=r:r instanceof Array?e[i].value=[]:console.error("Error copying shader uniforms from ShaderLib: unknown type for uniform")}return e}},"./src/WebGL/shaders/utils/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ShaderUtils:()=>o,clone:()=>n.clone});var n=r("./src/WebGL/shaders/utils/clone.ts"),i=r("./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag");const o={clone:n.clone,stickimposterFragmentShader:i.default}},"./src/WebGL/shapes/Cylinder.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Cylinder:()=>o});var n=r("./src/WebGL/math/index.ts");let i=new n.Vector3;class o{constructor(t=new n.Vector3,e=new n.Vector3,r=0){this.c1=t,this.c2=e,this.radius=r,this.direction=(new n.Vector3).subVectors(this.c2,this.c1).normalize()}copy(t){return this.c1.copy(t.c1),this.c2.copy(t.c2),this.direction.copy(t.direction),this.radius=t.radius,this}lengthSq(){return i.subVectors(this.c2,this.c1).lengthSq()}applyMatrix4(t){return this.direction.add(this.c1).applyMatrix4(t),this.c1.applyMatrix4(t),this.c2.applyMatrix4(t),this.direction.sub(this.c1).normalize(),this.radius=this.radius*t.getMaxScaleOnAxis(),this}}},"./src/WebGL/shapes/Sphere.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Sphere:()=>i});var n=r("./src/WebGL/math/index.ts");class i{constructor(t={x:0,y:0,z:0},e=0){this.center=new n.Vector3(t.x,t.y,t.z),this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new i).copy(this)}}},"./src/WebGL/shapes/Triangle.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Triangle:()=>o});var n=r("./src/WebGL/math/index.ts");const i=new n.Vector3;class o{constructor(t=new n.Vector3,e=new n.Vector3,r=new n.Vector3){this.a=t,this.b=e,this.c=r}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}applyMatrix4(t){return this.a.applyMatrix4(t),this.b.applyMatrix4(t),this.c.applyMatrix4(t),this}getNormal(){var t=this.a.clone();return t.sub(this.b),i.subVectors(this.c,this.b),t.cross(i),t.normalize(),t}}},"./src/WebGL/shapes/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Cylinder:()=>i.Cylinder,Sphere:()=>n.Sphere,Triangle:()=>o.Triangle});var n=r("./src/WebGL/shapes/Sphere.ts"),i=r("./src/WebGL/shapes/Cylinder.ts"),o=r("./src/WebGL/shapes/Triangle.ts")},"./src/autoload.ts":(__unused_webpack_module,__nested_webpack_exports__,__nested_webpack_require_891473__)=>{"use strict";__nested_webpack_require_891473__.r(__nested_webpack_exports__),__nested_webpack_require_891473__.d(__nested_webpack_exports__,{autoinit:()=>autoinit,autoload:()=>autoload,processing_autoinit:()=>processing_autoinit,viewers:()=>viewers});var _GLViewer__WEBPACK_IMPORTED_MODULE_0__=__nested_webpack_require_891473__("./src/GLViewer.ts"),_ProteinSurface4__WEBPACK_IMPORTED_MODULE_1__=__nested_webpack_require_891473__("./src/ProteinSurface4.ts"),_utilities__WEBPACK_IMPORTED_MODULE_2__=__nested_webpack_require_891473__("./src/utilities.ts"),_colors__WEBPACK_IMPORTED_MODULE_3__=__nested_webpack_require_891473__("./src/colors.ts"),autoinit=!1,processing_autoinit=!1,viewers={};function autoload(viewer,callback){var i,dataname,type;if(null!=document.querySelector(".viewer_3Dmoljs")&&(autoinit=!0),autoinit){processing_autoinit=!0,viewer=null!=viewer?viewer:null;var nviewers=0;document.querySelectorAll(".viewer_3Dmoljs").forEach((viewerdiv=>{var datauri=[],datatypes=[],uri="";"static"==viewerdiv.style.position&&(viewerdiv.style.position="relative");var UI=null;if(type=null,viewerdiv.dataset.pdb)datauri.push("https://files.rcsb.org/view/"+viewerdiv.dataset.pdb+".pdb"),datatypes.push("pdb");else if(viewerdiv.dataset.cid)datatypes.push("sdf"),datauri.push("https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"+viewerdiv.dataset.cid+"/SDF?record_type=3d");else if(viewerdiv.dataset.href||viewerdiv.dataset.url){uri=viewerdiv.dataset.href?viewerdiv.dataset.href:viewerdiv.dataset.url,datauri.push(uri),type=uri.substring(uri.lastIndexOf(".")+1),datatypes.push(type);var molName=uri.substring(uri.lastIndexOf("/")+1,uri.lastIndexOf("."));"/"==molName&&(molName=uri.substring(uri.lastIndexOf("/")+1)),viewerdiv.dataset[datatypes[datatypes.length-1]]=molName}let divdata=viewerdiv.dataset;for(i in divdata)"pdb"===i.substring(0,3)&&"pdb"!==i?(datauri.push("https://files.rcsb.org/view/"+divdata[i]+".pdb"),datatypes.push("pdb")):"href"===i.substring(0,4)&&"href"!==i?(uri=divdata[i],datauri.push(uri),datatypes.push(uri.substring(uri.lastIndexOf(".")+1))):"cid"===i.substring(0,3)&&"cid"!==i&&(datauri.push("https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"+divdata[i]+"/SDF?record_type=3d"),datatypes.push("sdf"));var options={};viewerdiv.dataset.options&&(options=(0,_utilities__WEBPACK_IMPORTED_MODULE_2__.specStringToObject)(viewerdiv.dataset.options));var bgcolor=_colors__WEBPACK_IMPORTED_MODULE_3__.CC.color(viewerdiv.dataset.backgroundcolor),bgalpha=viewerdiv.dataset.backgroundalpha;bgalpha=null==bgalpha?1:parseFloat(bgalpha);var style={line:{}};viewerdiv.dataset.style&&(style=(0,_utilities__WEBPACK_IMPORTED_MODULE_2__.specStringToObject)(viewerdiv.dataset.style));var select={};viewerdiv.dataset.select&&(select=(0,_utilities__WEBPACK_IMPORTED_MODULE_2__.specStringToObject)(viewerdiv.dataset.select));var selectstylelist=[],surfaces=[],labels=[],zoomto={},spin=null,d=viewerdiv.dataset,stylere=/style(.+)/,surfre=/surface(.*)/,reslabre=/labelres(.*)/,keys=[];for(dataname in d)Object.prototype.hasOwnProperty.call(d,dataname)&&keys.push(dataname);for(keys.sort(),i=0;i{UI.loadSurface("VDW",e,r,t)})):t.addSurface(_ProteinSurface4__WEBPACK_IMPORTED_MODULE_1__.SurfaceType.VDW,r,e,e)}for(i=0;ifunction(moldata){uri=datauri[i];var type=viewerdiv.dataset.type||viewerdiv.dataset.datatype||datatypes[i];if(glviewer.addModel(moldata,type,options),UI){var modelName=viewerdiv.dataset[datatypes[i]];UI.setModelTitle(modelName)}if(i+=1,i{"complete"===document.readyState&&autoload()}},"./src/colors.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{CC:()=>i,Color:()=>n,builtinColorSchemes:()=>u,chains:()=>d,elementColors:()=>l,htmlColors:()=>o,residues:()=>c,ssColors:()=>a});class n{constructor(t,e,r){return this.r=0,this.g=0,this.b=0,arguments.length>1&&"number"==typeof t?(this.r=t||0,this.g=e||0,this.b=r||0,this):this.set(t||0)}set(t){return t instanceof n?t.clone():("number"==typeof t?this.setHex(t):"object"==typeof t&&(this.r=(null==t?void 0:t.r)||0,this.g=(null==t?void 0:t.g)||0,this.b=(null==t?void 0:t.b)||0),this)}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this}getHex(){return Math.round(255*this.r)<<16|Math.round(255*this.g)<<8|Math.round(255*this.b)}clone(){return new n(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}scaled(){var t={};return t.r=Math.round(255*this.r),t.g=Math.round(255*this.g),t.b=Math.round(255*this.b),t.a=1,t}}class i{static color(t){if(!t)return i.cache[0];if(t instanceof n)return t;if("number"==typeof t&&void 0!==i.cache[t])return i.cache[t];if(t&&Array.isArray(t))return t.map(i.color);let e=i.getHex(t),r=new n(e);return i.cache[e]=r,r}static getHex(t){var e;if(Array.isArray(t))return t.map(i.getHex);if("string"==typeof t){let r=t;if(!isNaN(parseInt(r)))return parseInt(r);if(r=r.trim(),4==r.length&&"#"==r[0]&&(r="#"+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]),7==r.length&&"#"==r[0])return parseInt(r.substring(1),16);let n=i.rgbRegEx.exec(r);if(n){""!=n[1]&&console.log("WARNING: Opacity value in rgba ignored. Specify separately as opacity attribute.");let t=0;for(let e=2;e<5;e++){t*=256;let r=n[e].endsWith("%")?255*parseFloat(n[e])/100:parseFloat(n[e]);t+=Math.round(r)}return t}return(null===(e=null===window||void 0===window?void 0:window.$3Dmol)||void 0===e?void 0:e.htmlColors[t.toLowerCase()])||0}return t}}i.rgbRegEx=/rgb(a?)\(\s*([^ ,\)\t]+)\s*,\s*([^ ,\)\t]+)\s*,\s*([^ ,\)\t]+)/i,i.cache={0:new n(0)};const o={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,darkgrey:11119017,darkgreen:25600,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,grey:8421504,green:32768,greenyellow:11403055,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,lightgrey:13882323,lightgreen:9498256,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},a={pyMol:{h:16711680,s:16776960,c:65280},Jmol:{h:16711808,s:16762880,c:16777215}},s={H:16777215,He:16761035,HE:16761035,Li:11674146,LI:11674146,B:65280,C:13158600,N:9408511,O:15728640,F:14329120,Na:255,NA:255,Mg:2263842,MG:2263842,Al:8421520,AL:8421520,Si:14329120,SI:14329120,P:16753920,S:16762930,Cl:65280,CL:65280,Ca:8421520,CA:8421520,Ti:8421520,TI:8421520,Cr:8421520,CR:8421520,Mn:8421520,MN:8421520,Fe:16753920,FE:16753920,Ni:10824234,NI:10824234,Cu:10824234,CU:10824234,Zn:10824234,ZN:10824234,Br:10824234,BR:10824234,Ag:8421520,AG:8421520,I:10494192,Ba:16753920,BA:16753920,Au:14329120,AU:14329120},l={defaultColor:16716947,Jmol:{H:16777215,He:14286847,HE:14286847,Li:13402367,LI:13402367,Be:12779264,BE:12779264,B:16758197,C:9474192,N:3166456,O:16715021,F:9494608,Ne:11789301,NE:11789301,Na:11230450,NA:11230450,Mg:9109248,MG:9109248,Al:12560038,AL:12560038,Si:1578e4,SI:1578e4,P:16744448,S:16777008,Cl:2093087,CL:2093087,Ar:8442339,AR:8442339,K:9388244,Ca:4062976,CA:4062976,Sc:15132390,SC:15132390,Ti:12567239,TI:12567239,V:10921643,Cr:9083335,CR:9083335,Mn:10255047,MN:10255047,Fe:14706227,FE:14706227,Co:15765664,CO:15765664,Ni:5296208,NI:5296208,Cu:13140019,CU:13140019,Zn:8224944,ZN:8224944,Ga:12750735,GA:12750735,Ge:6721423,GE:6721423,As:12419299,AS:12419299,Se:16752896,SE:16752896,Br:10889513,BR:10889513,Kr:6076625,KR:6076625,Rb:7351984,RB:7351984,Sr:65280,SR:65280,Y:9764863,Zr:9756896,ZR:9756896,Nb:7586505,NB:7586505,Mo:5551541,MO:5551541,Tc:3907230,TC:3907230,Ru:2396047,RU:2396047,Rh:687500,RH:687500,Pd:27013,PD:27013,Ag:12632256,AG:12632256,Cd:16767375,CD:16767375,In:10909043,IN:10909043,Sn:6717568,SN:6717568,Sb:10380213,SB:10380213,Te:13924864,TE:13924864,I:9699476,Xe:4366e3,XE:4366e3,Cs:5707663,CS:5707663,Ba:51456,BA:51456,La:7394559,LA:7394559,Ce:16777159,CE:16777159,Pr:14286791,PR:14286791,Nd:13107143,ND:13107143,Pm:10747847,PM:10747847,Sm:9437127,SM:9437127,Eu:6422471,EU:6422471,Gd:4587463,GD:4587463,Tb:3211207,TB:3211207,Dy:2097095,DY:2097095,Ho:65436,HO:65436,Er:58997,ER:58997,Tm:54354,TM:54354,Yb:48952,YB:48952,Lu:43812,LU:43812,Hf:5096191,HF:5096191,Ta:5089023,TA:5089023,W:2200790,Re:2522539,RE:2522539,Os:2516630,OS:2516630,Ir:1528967,IR:1528967,Pt:13684960,PT:13684960,Au:16765219,AU:16765219,Hg:12105936,HG:12105936,Tl:10900557,TL:10900557,Pb:5724513,PB:5724513,Bi:10375093,BI:10375093,Po:11230208,PO:11230208,At:7688005,AT:7688005,Rn:4358806,RN:4358806,Fr:4325478,FR:4325478,Ra:32e3,RA:32e3,Ac:7384058,AC:7384058,Th:47871,TH:47871,Pa:41471,PA:41471,U:36863,Np:33023,NP:33023,Pu:27647,PU:27647,Am:5528818,AM:5528818,Cm:7888099,CM:7888099,Bk:9064419,BK:9064419,Cf:10565332,CF:10565332,Es:11739092,ES:11739092,Fm:11739066,FM:11739066,Md:11734438,MD:11734438,No:12389767,NO:12389767,Lr:13041766,LR:13041766,Rf:13369433,RF:13369433,Db:13697103,DB:13697103,Sg:14221381,SG:14221381,Bh:14680120,BH:14680120,Hs:15073326,HS:15073326,Mt:15400998,MT:15400998},rasmol:s,defaultColors:Object.assign({},s),greenCarbon:Object.assign(Object.assign({},s),{C:65280}),cyanCarbon:Object.assign(Object.assign({},s),{C:65535}),magentaCarbon:Object.assign(Object.assign({},s),{C:16711935}),yellowCarbon:Object.assign(Object.assign({},s),{C:16776960}),whiteCarbon:Object.assign(Object.assign({},s),{C:16777215}),orangeCarbon:Object.assign(Object.assign({},s),{C:16753920}),purpleCarbon:Object.assign(Object.assign({},s),{C:8388736}),blueCarbon:Object.assign(Object.assign({},s),{C:255})},c={amino:{ALA:13158600,ARG:1334015,ASN:56540,ASP:15075850,CYS:15132160,GLN:56540,GLU:15075850,GLY:15461355,HIS:8553170,ILE:1016335,LEU:1016335,LYS:1334015,MET:15132160,PHE:3289770,PRO:14456450,SER:16422400,THR:16422400,TRP:11819700,TYR:3289770,VAL:1016335,ASX:16738740,GLX:16738740},shapely:{ALA:9240460,ARG:124,ASN:16743536,ASP:10485826,CYS:16777072,GLN:16731212,GLU:6684672,GLY:16777215,HIS:7368959,ILE:19456,LEU:4546117,LYS:4671416,MET:12099650,PHE:5459026,PRO:5395026,SER:16740418,THR:12078080,TRP:5195264,TYR:9203788,VAL:16747775,ASX:16711935,GLX:16711935},nucleic:{A:10526975,G:16740464,I:8454143,C:16747595,T:10551200,U:16744576}},d={atom:{A:12636415,B:11599792,C:16761032,D:16777088,E:16761087,F:11596016,G:16765040,H:15761536,I:16113331,J:49151,K:13458524,L:6737322,M:10145074,N:15631086,O:52945,P:65407,Q:3978097,R:139,S:12433259,T:25600,U:8388608,V:8421376,W:8388736,X:32896,Y:12092939,Z:11674146},hetatm:{A:9478351,B:8441752,C:13602992,D:13619056,E:13603023,F:8437952,G:13607008,H:12603504,I:12955267,J:42959,K:11881548,L:5682578,M:9090346,N:12481214,O:46753,P:53103,Q:3447649,R:187,S:10854235,T:37888,U:11534336,V:11579392,W:11534512,X:45232,Y:15250963,Z:12726834}},u={ssPyMol:{prop:"ss",map:a.pyMol},ssJmol:{prop:"ss",map:a.Jmol},Jmol:{prop:"elem",map:l.Jmol},amino:{prop:"resn",map:c.amino},shapely:{prop:"resn",map:c.shapely},nucleic:{prop:"resn",map:c.nucleic},chain:{prop:"chain",map:d.atom},rasmol:{prop:"elem",map:l.rasmol},default:{prop:"elem",map:l.defaultColors},greenCarbon:{prop:"elem",map:l.greenCarbon},chainHetatm:{prop:"chain",map:d.hetatm},cyanCarbon:{prop:"elem",map:l.cyanCarbon},magentaCarbon:{prop:"elem",map:l.magentaCarbon},purpleCarbon:{prop:"elem",map:l.purpleCarbon},whiteCarbon:{prop:"elem",map:l.whiteCarbon},orangeCarbon:{prop:"elem",map:l.orangeCarbon},yellowCarbon:{prop:"elem",map:l.yellowCarbon},blueCarbon:{prop:"elem",map:l.blueCarbon}}},"./src/glcartoon.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{drawCartoon:()=>M,subdivide_spline:()=>d});var n=r("./src/WebGL/math/index.ts"),i=r("./src/WebGL/shapes/index.ts"),o=r("./src/WebGL/index.ts"),a=r("./src/Gradient.ts"),s=r("./src/colors.ts"),l=r("./src/GLDraw.ts"),c=r("./src/utilities.ts");function d(t,e){var r,i,o,a,s,l,c,d,u,h=[],p=t;for((p=[]).push(t[0]),r=1,i=t.length-1;r0){var g=[i,i+1,i-1,i-2],v=u.faceidx;f[v]=g[0],f[v+1]=g[1],f[v+2]=g[3],f[v+3]=g[1],f[v+4]=g[2],f[v+5]=g[3],u.faceidx+=6}u.vertices+=2}}function v(t,e,r,n,o,a,l){l&&"default"!==l||(l="rectangle"),"edged"===l?function(t,e,r,n,o){if(!(e.length<2)){var a,l;if(a=e[0],l=e[e.length-1],a=d(a,n),l=d(l,n),!o)return g(t,a,l,r);var c,u,h,p,f,m,v,b,y,x,w,_,k,A,T,M,S,C,E,L,z,O,D=[],I=[[0,2,-6,-8],[-4,-2,6,4],[7,-1,-5,3],[-3,5,1,-7]];for(k=0,A=a.length;k0){var R=void 0!==_&&void 0!==w&&_.serial!==w.serial;for(T=0;T<4;T++){var P=[m+I[T][0],m+I[T][1],m+I[T][2],m+I[T][3]];if(O[b=E.faceidx]=P[0],O[b+1]=P[1],O[b+2]=P[3],O[b+3]=P[1],O[b+4]=P[2],O[b+5]=P[3],E.faceidx+=6,w.clickable||_.clickable||w.hoverable||_.hoverable){var j=D[P[3]].clone(),N=D[P[0]].clone(),B=D[P[2]].clone(),U=D[P[1]].clone();if(j.atom=D[P[3]].atom||null,B.atom=D[P[2]].atom||null,N.atom=D[P[0]].atom||null,U.atom=D[P[1]].atom||null,R){var G=j.clone().add(N).multiplyScalar(.5),V=B.clone().add(U).multiplyScalar(.5),H=j.clone().add(U).multiplyScalar(.5);T%2==0?((_.clickable||_.hoverable)&&(M=new i.Triangle(G,H,j),S=new i.Triangle(V,B,H),C=new i.Triangle(H,B,j),_.intersectionShape.triangle.push(M),_.intersectionShape.triangle.push(S),_.intersectionShape.triangle.push(C)),(w.clickable||w.hoverable)&&(M=new i.Triangle(N,U,H),S=new i.Triangle(U,V,H),C=new i.Triangle(N,H,G),w.intersectionShape.triangle.push(M),w.intersectionShape.triangle.push(S),w.intersectionShape.triangle.push(C))):((w.clickable||w.hoverable)&&(M=new i.Triangle(G,H,j),S=new i.Triangle(V,B,H),C=new i.Triangle(H,B,j),w.intersectionShape.triangle.push(M),w.intersectionShape.triangle.push(S),w.intersectionShape.triangle.push(C)),(_.clickable||_.hoverable)&&(M=new i.Triangle(N,U,H),S=new i.Triangle(U,V,H),C=new i.Triangle(N,H,G),_.intersectionShape.triangle.push(M),_.intersectionShape.triangle.push(S),_.intersectionShape.triangle.push(C)))}else(w.clickable||w.hoverable)&&(M=new i.Triangle(N,U,j),S=new i.Triangle(U,B,j),w.intersectionShape.triangle.push(M),w.intersectionShape.triangle.push(S))}}}E.vertices+=8,_=w}var W=D.length-8;for(L=(E=t.updateGeoGroup(8)).vertexArray,z=E.colorArray,O=E.faceArray,v=3*(m=E.vertices),b=E.faceidx,k=0;k<4;k++){D.push(D[2*k]),D.push(D[W+2*k]);var q=D[2*k],Y=D[W+2*k];L[v+6*k]=q.x,L[v+1+6*k]=q.y,L[v+2+6*k]=q.z,L[v+3+6*k]=Y.x,L[v+4+6*k]=Y.y,L[v+5+6*k]=Y.z,z[v+6*k]=y.r,z[v+1+6*k]=y.g,z[v+2+6*k]=y.b,z[v+3+6*k]=y.r,z[v+4+6*k]=y.g,z[v+5+6*k]=y.b}W+=8,M=[m,m+2,m+6,m+4],S=[m+1,m+5,m+7,m+3],O[b]=M[0],O[b+1]=M[1],O[b+2]=M[3],O[b+3]=M[1],O[b+4]=M[2],O[b+5]=M[3],O[b+6]=S[0],O[b+7]=S[1],O[b+8]=S[3],O[b+9]=S[1],O[b+10]=S[2],O[b+11]=S[3],E.faceidx+=12,E.vertices+=8}}(t,e,r,n,o):"rectangle"!==l&&"oval"!==l&&"parabola"!==l||function(t,e,r,n,o,a,l){var c,u,h,p,f,m,v,b,y,x;if((h=e.length)<2||e[0].length<2)return;for(c=0;c0&&(c-=1,a=!0),E=Math.round(c*(r.length-1)/p),C=s.CC.color(r[E]),y=v,x=b,v=[],b=[],f=[],void 0!==e[0][c].atom&&(S=e[0][c].atom,"oval"===l?m=w:"rectangle"===l?m=_:"parabola"===l&&(m=k)),m||(m=_),u=0;u0&&!a){for(u=0;u<2*h;u++)D=[A+I[u][0],A+I[u][1],A+I[u][2],A+I[u][3]],O[M=F.faceidx]=D[0],O[M+1]=D[1],O[M+2]=D[3],O[M+3]=D[1],O[M+4]=D[2],O[M+5]=D[3],F.faceidx+=6;if(S.clickable||S.hoverable){var j=[];for(u in j.push(new i.Triangle(y[0],v[0],v[h-1])),j.push(new i.Triangle(y[0],v[h-1],y[h-1])),j.push(new i.Triangle(y[h-1],v[h-1],b[h-1])),j.push(new i.Triangle(y[h-1],b[h-1],x[h-1])),j.push(new i.Triangle(b[0],x[0],x[h-1])),j.push(new i.Triangle(b[h-1],b[0],x[h-1])),j.push(new i.Triangle(v[0],y[0],x[0])),j.push(new i.Triangle(b[0],v[0],x[0])),j)S.intersectionShape.triangle.push(j[u])}}F.vertices+=2*h}for(L=F.vertexArray,z=F.colorArray,O=F.faceArray,T=3*(A=F.vertices),M=F.faceidx,c=0;c=0&&r<1&&(a.transparent=!0,a.opacity=r),a.outline=n;var s=new o.Mesh(e,a);t.add(s)}}function w(t,e,r,i,o,a,s,l,c){var d,m,g,v,b,y;if(i&&o&&s){var x=o.sub(i);x.normalize();var w=l[c];for(m=c+1;m0&&v(V,W,H,h,L,0,W.style);var r=[],n=null;if(e){for(z=0;z0&&v(V,W,H,h,L,0,W.style),W=[],z=0;z{"use strict";r.r(e),r.d(e,{CAP:()=>m.CAP,CC:()=>i.CC,Color:()=>i.Color,CustomLinear:()=>n.CustomLinear,Cylinder:()=>c.Cylinder,GLDraw:()=>m.GLDraw,GLModel:()=>v.GLModel,GLShape:()=>f.GLShape,GLViewer:()=>b.GLViewer,GLVolumetricRender:()=>p.GLVolumetricRender,Gradient:()=>n.Gradient,GradientType:()=>n.GradientType,Label:()=>o.Label,LabelCount:()=>o.LabelCount,MarchingCube:()=>u.MarchingCube,MarchingCubeInitializer:()=>u.MarchingCubeInitializer,Matrix3:()=>l.Matrix3,Matrix4:()=>l.Matrix4,Parsers:()=>s.Parsers,PausableTimer:()=>d.PausableTimer,PointGrid:()=>u.PointGrid,ProteinSurface:()=>u.ProteinSurface,Quaternion:()=>l.Quaternion,ROYGB:()=>n.ROYGB,RWB:()=>n.RWB,Ray:()=>l.Ray,Sinebow:()=>n.Sinebow,Sphere:()=>c.Sphere,SurfaceType:()=>u.SurfaceType,Triangle:()=>c.Triangle,Vector2:()=>l.Vector2,Vector3:()=>l.Vector3,VolumeData:()=>h.VolumeData,adjustVolumeStyle:()=>d.adjustVolumeStyle,applyPartialCharges:()=>a.applyPartialCharges,autoinit:()=>y.autoinit,autoload:()=>y.autoload,base64ToArray:()=>d.base64ToArray,bondLength:()=>s.bondLength,builtinColorSchemes:()=>i.builtinColorSchemes,builtinGradients:()=>n.builtinGradients,chains:()=>i.chains,clamp:()=>l.clamp,conversionMatrix3:()=>l.conversionMatrix3,createStereoViewer:()=>b.createStereoViewer,createViewer:()=>b.createViewer,createViewerGrid:()=>b.createViewerGrid,deepCopy:()=>d.deepCopy,degToRad:()=>l.degToRad,download:()=>d.download,drawCartoon:()=>g.drawCartoon,elementColors:()=>i.elementColors,extend:()=>d.extend,get:()=>d.get,getAtomProperty:()=>d.getAtomProperty,getColorFromStyle:()=>d.getColorFromStyle,getElement:()=>d.getElement,getExtent:()=>d.getExtent,getGradient:()=>n.getGradient,getPropertyRange:()=>d.getPropertyRange,getbin:()=>d.getbin,htmlColors:()=>i.htmlColors,inflateString:()=>d.inflateString,isEmptyObject:()=>d.isEmptyObject,isNumeric:()=>d.isNumeric,makeFunction:()=>d.makeFunction,mergeGeos:()=>d.mergeGeos,normalizeValue:()=>n.normalizeValue,partialCharges:()=>a.partialCharges,processing_autoinit:()=>y.processing_autoinit,residues:()=>i.residues,setBondLength:()=>s.setBondLength,setSyncSurface:()=>u.setSyncSurface,specStringToObject:()=>d.specStringToObject,splitMesh:()=>f.splitMesh,ssColors:()=>i.ssColors,subdivide_spline:()=>g.subdivide_spline,syncSurface:()=>u.syncSurface,viewers:()=>y.viewers});var n=r("./src/Gradient.ts"),i=r("./src/colors.ts"),o=r("./src/Label.ts"),a=r("./src/partialCharges.ts"),s=r("./src/parsers/index.ts"),l=r("./src/WebGL/math/index.ts"),c=r("./src/WebGL/shapes/index.ts"),d=r("./src/utilities.ts"),u=r("./src/ProteinSurface4.ts"),h=r("./src/VolumeData.ts"),p=r("./src/VolumetricRender.ts"),f=r("./src/GLShape.ts"),m=r("./src/GLDraw.ts"),g=r("./src/glcartoon.ts"),v=r("./src/GLModel.ts"),b=r("./src/GLViewer.ts"),y=r("./src/autoload.ts");r("./src/specs.ts"),window&&(window.$3Dmol=e)},"./src/parsers/BCIF.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BCIF:()=>f});var n=r("./src/utilities.ts"),i=r("./src/parsers/utils/computeSecondaryStructure.ts"),o=r("./src/parsers/utils/processSymmetries.ts"),a=r("./src/parsers/cifutils/category.ts"),s=r("./src/parsers/utils/assignPDBBonds.ts"),l=r("./src/WebGL/index.ts"),c=r("./src/parsers/utils/isEmpty.ts"),d=r("./src/vendor/mmtf.js");class u{constructor(t){if(this.C={},t){let e=t.getField("comp_id"),r=t.getField("atom_id_1"),n=t.getField("atom_id_2"),i=t.getField("value_order");for(let t=0;t0&&(o.bonds.push(a.index),a.bonds.push(o.index),o.bondOrder.push(s),a.bondOrder.push(s))}}for(let t of e.C){let e=t[0],r=t[1],n=t[2],i=this.geta(e),o=this.geta(r);null!=i&&null!=o&&(i.bonds.push(o.index),o.bonds.push(i.index),i.bondOrder.push(n),o.bondOrder.push(n))}}}function f(t,e){var r=!e.keepH,f=e.altLoc?e.altLoc:"A",m=!e.noComputeSecondaryStructure;const g=!e.doAssembly,v=void 0===e.assignBonds||e.assignBonds;if("string"==typeof t)try{t=(0,n.base64ToArray)(t)}catch(e){t=(new TextEncoder).encode(t)}else t=new Uint8Array(t);var b=d.decodeMsgpack(t);31==b&&(t=(0,n.inflateString)(t,!1),b=d.decodeMsgpack(t));var y=[],x=y.modelData=[],w=b.dataBlocks.length;if(0==w)return y;e.multimodel||(w=1);for(let t=0;t1&&("1"==t[1]?r.ssbegin=!0:"2"==t[1]&&(r.ssend=!0))}}}e.multimodel&&t{"use strict";function n(t,e){var r=[[]];"string"==typeof t&&(t=JSON.parse(t));for(var n=t.m,i=n[0].a,o=n[0].b,a=n[0].s,s=void 0!==e&&void 0!==e.parseStyle?e.parseStyle:void 0!==a,l=r[r.length-1].length,c=0;cn})},"./src/parsers/CIF.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{CIF:()=>l});var n=r("./src/parsers/utils/computeSecondaryStructure.ts"),i=r("./src/parsers/utils/processSymmetries.ts"),o=r("./src/WebGL/index.ts"),a=r("./src/parsers/utils/assignPDBBonds.ts");const s=function(t,e,r,n){return new o.Vector3(e,r,n).applyMatrix3(t)};function l(t,e={}){const r=[],l=!e.doAssembly,c=r.modelData=[],d=void 0===e.assignBonds||e.assignBonds;function u(t,e){const r=[];let n=0,i=0;for(;i-1){let e=m.split("");e[t]="_",m=(m=e.join("")).substring(0,t)+"_"+m.substring(t+1)}}p.push(m)}}let g=0;for(;g{"use strict";r.r(e),r.d(e,{CUBE:()=>a});var n=r("./src/WebGL/index.ts"),i=r("./src/parsers/utils/assignBonds.ts"),o=r("./src/parsers/utils/anumToSymbol.ts");function a(t,e){e=e||{};const r=[[]];let a=t.split(/\r?\n/);const s=void 0===e.assignBonds||e.assignBonds;if(a.length<6)return r;let l=a[2].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");const c=Math.abs(parseFloat(l[0]));let d={origin:void 0,size:void 0,unit:void 0,matrix4:void 0,matrix:void 0};const u=d.origin=new n.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3]));l=a[3].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),l=a[3].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");const h=l[0]>0?.529177:1;u.multiplyScalar(h);const p=Math.abs(l[0]),f=new n.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])).multiplyScalar(h);l=a[4].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");const m=Math.abs(l[0]),g=new n.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])).multiplyScalar(h);l=a[5].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");const v=Math.abs(l[0]),b=new n.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])).multiplyScalar(h);if(d.size={x:p,y:m,z:v},d.unit=new n.Vector3(f.x,g.y,b.z),0!=f.y||0!=f.z||0!=g.x||0!=g.z||0!=b.x||0!=b.y){d.matrix4=new n.Matrix4(f.x,g.x,b.x,0,f.y,g.y,b.y,0,f.z,g.z,b.z,0,0,0,0,1);let t=(new n.Matrix4).makeTranslation(u.x,u.y,u.z);d.matrix4=d.matrix4.multiplyMatrices(t,d.matrix4),d.matrix=d.matrix4.matrix3FromTopLeft(),d.origin=new n.Vector3(0,0,0),d.unit=new n.Vector3(1,1,1)}r.modelData=[{cryst:d}],a=a.splice(6,c);for(var y=r[r.length-1].length,x=y+a.length,w=y;w{"use strict";r.r(e),r.d(e,{GRO:()=>o});var n=r("./src/parsers/utils/assignPDBBonds.ts"),i=r("./src/parsers/utils/atomNameToElem.ts");function o(t,e){const r=[],o=t.split(/\r?\n|\r/);for(;o.length>0;){const t=parseInt(o[1]);if(o.length<3||isNaN(t)||t<=0||o.length44&&(a.dx=10*parseFloat(r.slice(44,52)),a.dy=10*parseFloat(r.slice(52,60)),a.dz=10*parseFloat(r.slice(60,68))),e[t]=a}if(o.length<=n+3){const t=o[n++].trim().split(/\s+/);if(3===t.length){for(let e=0;e<3;e++)t[e]=(10*parseFloat(t[e])).toString();r.box=t}}o.splice(0,++n)}for(let t=0;t{"use strict";r.r(e),r.d(e,{LAMMPSTRJ:()=>o});var n=r("./src/parsers/utils/assignBonds.ts");const i={id:"serial",type:"atom",element:"elem",q:"charge",radius:"radius",x:"x",xu:"x",xs:"x",xsu:"x",y:"y",yu:"y",ys:"y",ysu:"y",z:"z",zu:"z",zs:"z",zsu:"z"};function o(t,e){const r=[],o=t.split(/\r?\n|\r/);let a=0,s=0,l=0;for(;l{"use strict";r.r(e),r.d(e,{MMTFparser:()=>u});var n=r("./src/utilities.ts"),i=r("./src/WebGL/index.ts"),o=r("./src/parsers/utils/computeSecondaryStructure.ts"),a=r("./src/parsers/utils/processSymmetries.ts"),s=r("./src/vendor/mmtf.js"),l=function(t){return String.fromCharCode.apply(null,t).replace(/\0/g,"")},c=function(t){return 0==t||2==t||4==t?"h":3==t?"s":"c"};let d=new Set(["D-SACCHARIDE","D-SACCHARIDE 1,4 AND 1,4 LINKING","D-SACCHARIDE 1,4 AND 1,6 LINKING","L-SACCHARIDE","L-SACCHARIDE 1,4 AND 1,4 LINKING","L-SACCHARIDE 1,4 AND 1,6 LINKING","NON-POLYMER","OTHER","PEPTIDE-LIKE","SACCHARIDE"]);function u(t,e){var r=!e.keepH,u=e.altLoc?e.altLoc:"A",h=!!e.noSecondaryStructure,p=!e.noComputeSecondaryStructure,f=!e.doAssembly,m=e.assemblyIndex?e.assemblyIndex:0;t="string"==typeof t?(0,n.base64ToArray)(t):new Uint8Array(t);var g,v,b,y,x,w,_=s.decode(t),k=[[]],A=k.modelData=[],T=0,M=0,S=0,C=_.secStructList,E=_.bFactorList,L=_.altLocList,z=_.occupancyList,O=_.bondAtomList,D=_.bondOrderList,I=_.numModels;if(0==I)return k;e.multimodel||(I=1);var F=[];if(!f&&_.bioAssemblyList&&_.bioAssemblyList.length>0){var R=_.bioAssemblyList[m].transformList;for(g=0,w=R.length;g{t.chainIndexList.forEach((e=>{B[e]="polymer"==t.type}))}));var U=0;for(x=0;x=C.length||c(C[et]!=tt))&&(Q=!0)}var rt=_.groupIdList[M],nt=$.groupName;let t=$.chemCompType;var it=S;let e=d.has(t)||!B[T];for(b=0;b=S){U=t;break}let i=H[e],o=H[r],a=V[i],s=V[o];a&&s&&(a.bonds.push(o),a.bondOrder.push(n),s.bonds.push(i),s.bondOrder.push(n))}e.multimodel&&(e.onemol||k.push([]))}if(!f)for(let t=0;t{"use strict";r.r(e),r.d(e,{MOL2:()=>i});let n={"C.1":"C",C1:"C","C.2":"C",C2:"C","C.3":"C",C3:"C","C.ar":"C",Car:"C","C.cat":"C",Ccat:"C","H.spc":"H",Hspc:"H","H.t3p":"H",Ht3p:"H","N.1":"N",N1:"N","N.2":"N",N2:"N","N.3":"N",N3:"N","N.4":"N",N4:"N","N.am":"N",Nam:"N","N.ar":"N",Nar:"N","N.p13":"N",Np13:"N","O.2":"O",O2:"O","O.3":"O",O3:"O","O.co2":"O",Oco2:"O","O.spc":"O",Ospc:"O","O.t3p":"O",Ot3p:"O","P.3":"P",P3:"P","S.2":"S",S2:"S","S.3":"S",S3:"S","S.o":"S",So:"S","S.o2":"S",So2:"S"};function i(t,e){var r=[[]],i=!1;void 0!==e.keepH&&(i=!e.keepH);var o=t.search(/@MOLECULE/),a=t.search(/@ATOM/);if(-1==o||-1==a)return r;for(var s=t.substring(o).split(/\r?\n|\r/);s.length>0;){var l=[],c=s[2].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),d=parseInt(c[0]),u=0;c.length>1&&(u=parseInt(c[1]));var h,p=4;for(h=3;hATOM"==s[h]){p=h+1;break}var f=r[r.length-1].length,m=f+d;for(h=f;hBOND"==s[p++]){w=!0;break}if(w&&u)for(h=0;h{"use strict";r.r(e),r.d(e,{PDB:()=>i});var n=r("./src/parsers/utils/getSinglePDB.ts");function i(t,e){e=e||{};var r=[],i={};r.modelData=[];for(var o=t.split(/\r?\n|\r/);o.length>0;){var a=(0,n.getSinglePDB)(o,e,i),s=a[0],l=a[1];if(o=a[2],0!=s.length){if(e.multimodel&&e.onemol&&r.length>0)for(var c=r[0].length,d=0;d{"use strict";r.r(e),r.d(e,{PQR:()=>o});var n=r("./src/parsers/utils/assignPDBBonds.ts"),i=r("./src/parsers/utils/computeSecondaryStructure.ts");function o(t,e){var r=[[]],o=!e.noSecondaryStructure;r.modelData=[{symmetries:[]}];var a,s=[],l=t.split(/\r?\n|\r/);for(let t=0;t1&&e[1].toUpperCase()!=e[1]&&(v=e.substring(0,2)),d="H"==a[0],s[t]=r[r.length-1].length,r[r.length-1].push({resn:n,x:h,y:p,z:f,elem:v,hetflag:d,chain:i,resi:o,serial:t,atom:e,bonds:[],ss:"c",bondOrder:[],properties:{charge:m,partialCharge:m,radius:g},pdbline:a})}else if("CONECT"==c){var b=parseInt(a.substring(6,11)),y=r[r.length-1][s[b]];for(let t=0;t<4;t++){var x=parseInt(a.substring([11,16,21,26][t],[11,16,21,26][t]+5)),w=r[r.length-1][s[x]];void 0!==y&&void 0!==w&&(y.bonds.push(s[x]),y.bondOrder.push(1))}}}for(let t=0;t{"use strict";function n(t){var e,r=[],n=0,i=t.split(/\r?\n|\r/);if(!(i.length>0&&i[0].includes("VERSION")))return[];var o=i.filter((function(t){return t.includes("POINTERS")||t.includes("ATOM_NAME")||t.includes("CHARGE")||t.includes("RADII")||t.includes("BONDS_INC_HYDROGEN")||t.includes("BONDS_WITHOUT_HYDROGEN")})),a=d("POINTERS");if(-1==a)return[];var s=u(a),l=parseInt(i[a+1].slice(0,s[1]));if(isNaN(l)||l<=0)return[];if(-1==(a=d("ATOM_NAME")))return[];var c=(s=u(a))[0];for(let t=0;t0){for(;!i[e].includes("FORMAT");)e++;return e}return-1}function u(t){var e=i[t].match(/\((\d*)\S*/),r=i[t].match(/[a-zA-Z](\d*)\)\s*/);return null==r&&(r=i[t].match(/[a-zA-Z](\d*)\.\d*\)\s*/)),[e[1],r[1]]}return[r]}r.r(e),r.d(e,{PRMTOP:()=>n})},"./src/parsers/SDF.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SDF:()=>o});var n=function(t,e){var r=[[]],n=!1;for(void 0!==e.keepH&&(n=!e.keepH);t.length>0&&!(t.length<4);){var i=parseInt(t[3].substring(0,3));if(isNaN(i)||i<=0)break;var o=parseInt(t[3].substring(3,6)),a=4;if(t.length<4+i+o)break;var s,l,c=[],d=r[r.length-1].length,u=d+i;for(s=d;s0&&!(t.length<8)&&t[4].startsWith("M V30 BEGIN CTAB")&&t[5].startsWith("M V30 COUNTS")&&!(t[5].length<14);){var i=t[5].substring(13).match(/\S+/g);if(i.length<2)break;var o=parseInt(i[0]);if(isNaN(o)||o<=0)break;var a=parseInt(i[1]),s=7;if(t.length<8+o+a)break;var l,c=[],d=r[r.length-1].length,u=d+o;for(l=d;l4){var p={},f=h[1].replace(/ /g,"");p.atom=p.elem=f[0].toUpperCase()+f.substring(1).toLowerCase(),"H"===p.elem&&n||(p.serial=l,c[l]=r[r.length-1].length,p.x=parseFloat(h[2]),p.y=parseFloat(h[3]),p.z=parseFloat(h[4]),p.hetflag=!0,p.bonds=[],p.bondOrder=[],p.properties={},p.index=r[r.length-1].length,r[r.length-1].push(p))}}if("M V30 END ATOM"!==t[s])break;if(s++,0===a||"M V30 BEGIN BOND"!==t[s])break;for(s++,l=0;l3){var g=c[parseInt(m[2])-1+d],v=c[parseInt(m[3])-1+d],b=parseFloat(m[1]);void 0!==g&&void 0!==v&&(r[r.length-1][g].bonds.push(v),r[r.length-1][g].bondOrder.push(b),r[r.length-1][v].bonds.push(g),r[r.length-1][v].bondOrder.push(b))}}if(!e.multimodel)break;for(e.onemol||r.push([]);"$$$$"!==t[s]&&s3&&o[3].length>38&&(r=o[3].substring(34,39)),"V2000"===r?n(o,e):"V3000"===r?i(o,e):[[""]]}},"./src/parsers/VASP.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{VASP:()=>o});var n=r("./src/WebGL/index.ts"),i=r("./src/parsers/utils/assignBonds.ts");function o(t,e={}){var r=[[]],o={};const a=void 0===e.assignBonds||e.assignBonds;var s=t.replace(/^\s+/,"").split(/\r?\n/);if(s.length<3)return r;if(!s[1].match(/\d+/))return console.log("Warning: second line of the vasp structure file must be a number"),r;if(o.length=parseFloat(s[1]),o.length<0)return console.log("Warning: Vasp implementation for negative lattice lengths is not yet available"),r;o.xVec=new Float32Array(s[2].replace(/^\s+/,"").split(/\s+/)),o.yVec=new Float32Array(s[3].replace(/^\s+/,"").split(/\s+/)),o.zVec=new Float32Array(s[4].replace(/^\s+/,"").split(/\s+/));var l=new n.Matrix3(o.xVec[0],o.xVec[1],o.xVec[2],o.yVec[0],o.yVec[1],o.yVec[2],o.zVec[0],o.zVec[1],o.zVec[2]);l.multiplyScalar(o.length),r.modelData=[{symmetries:[],cryst:{matrix:l}}];var c=s[5].replace(/\s+/,"").replace(/\s+$/,"").split(/\s+/),d=new Int16Array(s[6].replace(/^\s+/,"").split(/\s+/)),u=s[7].replace(/\s+/,""),h=!1;if(u.match(/S/)&&(h=!0,u=s[8].replace(/\s+/,"")),u.match(/C/))u="cartesian";else{if(!u.match(/D/))return console.log("Warning: Unknown vasp mode in POSCAR file: mode must be either C(artesian) or D(irect)"),r;u="direct"}if(c.length!=d.length)return console.log("Warning: declaration of atomary species wrong:"),console.log(c),console.log(d),r;h?s.splice(0,9):s.splice(0,8);for(var p=0,f=0,m=c.length;f{"use strict";r.r(e),r.d(e,{XYZ:()=>o});var n=r("./src/WebGL/index.ts"),i=r("./src/parsers/utils/assignBonds.ts");function o(t,e){for(var r=[[]],o=void 0===(e=e||{}).assignBonds||e.assignBonds,a=t.split(/\r?\n|\r/);a.length>0&&!(a.length<3);){var s=parseInt(a[0]);if(isNaN(s)||s<=0)break;if(a.length1){var c=new Float32Array(l[1].split(/\s+/)),d=new n.Matrix3(c[0],c[3],c[6],c[1],c[4],c[7],c[2],c[5],c[8]);r.modelData=[{cryst:{matrix:d}}]}for(var u=2,h=r[r.length-1].length,p=h+s,f=h;f=7&&(g.dx=parseFloat(m[4]),g.dy=parseFloat(m[5]),g.dz=parseFloat(m[6]))}if(!e.multimodel)break;r.push([]),a.splice(0,u)}if(o)for(let t=0;t{"use strict";r.r(e),r.d(e,{Category:()=>i});var n=r("./src/parsers/cifutils/decoder.ts");function i(t){const e=Object.create(null),r=Object.create(null);for(const r of t.columns)e[r.name]=r;return{rowCount:t.rowCount,name:t.name.substring(1),fieldNames:t.columns.map((t=>t.name)),getField(t){const i=e[t];if(i)return r[t]||(r[t]=(0,n.decode)(i.data)),r[t]}}}},"./src/parsers/cifutils/decoder.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{decode:()=>o});var n=r("./src/parsers/cifutils/encoding.ts");const i=13330===new Uint16Array(new Uint8Array([18,52]).buffer)[0];function o(t){let e=t.data;for(let r=t.encoding.length-1;r>=0;r--)e=a(e,t.encoding[r]);return e}function a(t,e){switch(e.kind){case"ByteArray":switch(e.type){case n.Encoding.IntDataType.Uint8:return t;case n.Encoding.IntDataType.Int8:return function(t){return new Int8Array(t.buffer,t.byteOffset)}(t);case n.Encoding.IntDataType.Int16:return function(t){return c(t,2,Int16Array)}(t);case n.Encoding.IntDataType.Uint16:return function(t){return c(t,2,Uint16Array)}(t);case n.Encoding.IntDataType.Int32:return function(t){return c(t,4,Int32Array)}(t);case n.Encoding.IntDataType.Uint32:return function(t){return c(t,4,Uint32Array)}(t);case n.Encoding.FloatDataType.Float32:return function(t){return c(t,4,Float32Array)}(t);case n.Encoding.FloatDataType.Float64:return function(t){return c(t,8,Float64Array)}(t);default:throw new Error("unreachable")}case"FixedPoint":return function(t,e){const r=t.length,n=l(e.srcType,r),i=1/e.factor;for(let e=0;e{"use strict";r.r(e),r.d(e,{Encoding:()=>i,VERSION:()=>n});const n="0.3.0";var i;!function(t){let e,r;!function(t){t[t.Int8=1]="Int8",t[t.Int16=2]="Int16",t[t.Int32=3]="Int32",t[t.Uint8=4]="Uint8",t[t.Uint16=5]="Uint16",t[t.Uint32=6]="Uint32"}(e=t.IntDataType||(t.IntDataType={})),function(t){t[t.Float32=32]="Float32",t[t.Float64=33]="Float64"}(r=t.FloatDataType||(t.FloatDataType={})),t.getDataType=function(e){let r;return r=e instanceof Int8Array?t.IntDataType.Int8:e instanceof Int16Array?t.IntDataType.Int16:e instanceof Int32Array?t.IntDataType.Int32:e instanceof Uint8Array?t.IntDataType.Uint8:e instanceof Uint16Array?t.IntDataType.Uint16:e instanceof Uint32Array?t.IntDataType.Uint32:e instanceof Float32Array?t.FloatDataType.Float32:e instanceof Float64Array?t.FloatDataType.Float64:t.IntDataType.Int32,r},t.isSignedIntegerDataType=function(t){if(t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array)return!0;for(let e=0,r=t.length;e{"use strict";r.r(e),r.d(e,{Parsers:()=>b,bondLength:()=>v.bondLength,setBondLength:()=>v.setBondLength});var n=r("./src/parsers/VASP.ts"),i=r("./src/parsers/CUBE.ts"),o=r("./src/parsers/XYZ.ts"),a=r("./src/parsers/SDF.ts"),s=r("./src/parsers/CDJSON.ts"),l=r("./src/parsers/CIF.ts"),c=r("./src/parsers/MOL2.ts"),d=r("./src/parsers/PDB.ts"),u=r("./src/parsers/PQR.ts"),h=r("./src/parsers/MMTF.ts"),p=r("./src/parsers/PRMTOP.ts"),f=r("./src/parsers/GRO.ts"),m=r("./src/parsers/LAMMPSTRJ.ts"),g=r("./src/parsers/BCIF.ts"),v=r("./src/parsers/utils/bondLength.ts");const b={vasp:n.VASP,VASP:n.VASP,cube:i.CUBE,CUBE:i.CUBE,xyz:o.XYZ,XYZ:o.XYZ,sdf:a.SDF,SDF:a.SDF,json:s.CDJSON,cdjson:s.CDJSON,CDJSON:s.CDJSON,mcif:l.CIF,cif:l.CIF,CIF:l.CIF,mol2:c.MOL2,MOL2:c.MOL2,pdb:d.PDB,PDB:d.PDB,pdbqt:d.PDB,PDBQT:d.PDB,pqr:u.PQR,PQR:u.PQR,mmtf:h.MMTFparser,MMTF:h.MMTFparser,prmtop:p.PRMTOP,PRMTOP:p.PRMTOP,gro:f.GRO,GRO:f.GRO,lammpstrj:m.LAMMPSTRJ,LAMMPSTRJ:m.LAMMPSTRJ,bcif:g.BCIF,BCIF:g.BCIF}},"./src/parsers/utils/anumToSymbol.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{anumToSymbol:()=>n});const n={1:"H",2:"He",3:"Li",4:"Be",5:"B",6:"C",7:"N",8:"O",9:"F",10:"Ne",11:"Na",12:"Mg",13:"Al",14:"Si",15:"P",16:"S",17:"Cl",18:"Ar",19:"K",20:"Ca",21:"Sc",22:"Ti",23:"V",24:"Cr",25:"Mn",26:"Fe",27:"Co",28:"Ni",29:"Cu",30:"Zn",31:"Ga",32:"Ge",33:"As",34:"Se",35:"Br",36:"Kr",37:"Rb",38:"Sr",39:"Y",40:"Zr",41:"Nb",42:"Mo",43:"Tc",44:"Ru",45:"Rh",46:"Pd",47:"Ag",48:"Cd",49:"In",50:"Sn",51:"Sb",52:"Te",53:"I",54:"Xe",55:"Cs",56:"Ba",71:"Lu",72:"Hf",73:"Ta",74:"W",75:"Re",76:"Os",77:"Ir",78:"Pt",79:"Au",80:"Hg",81:"Tl",82:"Pb",83:"Bi",84:"Po",85:"At",86:"Rn",87:"Fr",88:"Ra",104:"Rf",105:"Db",106:"Sg",107:"Bh",108:"Hs",109:"Mt",110:"Ds",111:"Rg",112:"Cn",113:"Nh",114:"Fl",115:"Mc",116:"Lv",117:"Ts",118:"Og",57:"La",58:"Ce",59:"Pr",60:"Nd",61:"Pm",62:"Sm",63:"Eu",64:"Gd",65:"Tb",66:"Dy",67:"Ho",68:"Er",69:"Tm",70:"Yb",89:"Ac",90:"Th",91:"Pa",92:"U",93:"Np",94:"Pu",95:"Am",96:"Cm",97:"Bk",98:"Cf",99:"Es",100:"Fm",101:"Md",102:"No"}},"./src/parsers/utils/areConnected.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{areConnected:()=>o});var n=r("./src/parsers/utils/bondLength.ts");const i=new Set(["Na","K","Ca","Mg","Mn","Sr"]);function o(t,e,r){if(r&&r.unboundCations&&(i.has(t.elem)||i.has(e.elem)))return!1;let o=(0,n.bondLength)(t.elem)+(0,n.bondLength)(e.elem);o+=.25,o*=o;let a=t.x-e.x;if(a*=a,a>o)return!1;let s=t.y-e.y;if(s*=s,s>o)return!1;let l=t.z-e.z;if(l*=l,l>o)return!1;const c=a+s+l;return!(isNaN(c)||c<.5||c>o||t.altLoc!==e.altLoc&&""!==t.altLoc.trim()&&""!==e.altLoc.trim())}},"./src/parsers/utils/assignBackboneHBonds.ts":(t,e,r)=>{"use strict";function n(t,e){const r=e||3.2,n=r*r,i=[];for(let e=0,r=t.length;er)break;if(t.atom==o.atom)continue;const s=Math.abs(t.y-o.y);if(s>r)continue;const l=Math.abs(t.x-o.x);if(l>r)continue;const c=l*l+s*s+e*e;c>n||t.chain==o.chain&&Math.abs(t.resi-o.resi)<4||(cn})},"./src/parsers/utils/assignBonds.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{assignBonds:()=>a});var n=r("./src/parsers/utils/areConnected.ts");const i=[{x:0,y:0,z:1},{x:0,y:1,z:-1},{x:0,y:1,z:0},{x:0,y:1,z:1},{x:1,y:-1,z:-1},{x:1,y:-1,z:0},{x:1,y:-1,z:1},{x:1,y:0,z:-1},{x:1,y:0,z:0},{x:1,y:0,z:1},{x:1,y:1,z:-1},{x:1,y:1,z:0},{x:1,y:1,z:1}],o=4.95;function a(t,e){for(let e=0,r=t.length;e{"use strict";r.r(e),r.d(e,{assignPDBBonds:()=>a});var n=r("./src/parsers/utils/areConnected.ts"),i=r("./src/parsers/utils/assignBonds.ts"),o=r("./src/parsers/utils/standardResidues.ts");function a(t,e){const r=[],a=[];for(let e=0,n=t.length;e1)break;(0,n.areConnected)(i,t,e)&&(-1===i.bonds.indexOf(t.index)&&(i.bonds.push(t.index),i.bondOrder.push(1),t.bonds.push(i.index),t.bondOrder.push(1)),i.resi!==t.resi&&(s=!0))}}}},"./src/parsers/utils/atomNameToElem.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{atomNameToElem:()=>i});var n=r("./src/parsers/utils/bondLength.ts");function i(t,e){let r=t.replace(/ /g,"");return r.length>0&&"H"===r[0]&&"Hg"!==r&&"He"!==r&&"Hf"!==r&&"Hs"!==r&&"Ho"!==r&&(r="H"),r.length>1&&(r=r[0].toUpperCase()+r.substring(1).toLowerCase(),void 0===n.bondTable[r]?r=r[0]:e&&("Ca"===r||"Cd"===r)&&(r="C")),r}},"./src/parsers/utils/bondLength.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{bondLength:()=>i,bondTable:()=>n,setBondLength:()=>o});let n={H:.37,He:.32,Li:1.34,Be:.9,B:.82,C:.77,N:.75,O:.73,F:.71,Ne:.69,Na:1.54,Mg:1.3,Al:1.18,Si:1.11,P:1.06,S:1.02,Cl:.99,Ar:.97,K:1.96,Ca:1.74,Sc:1.44,Ti:1.56,V:1.25,Mn:1.39,Fe:1.25,Co:1.26,Ni:1.21,Cu:1.38,Zn:1.31,Ga:1.26,Ge:1.22,Se:1.16,Br:1.14,Kr:1.1,Rb:2.11,Sr:1.92,Y:1.62,Zr:1.48,Nb:1.37,Mo:1.45,Tc:1.56,Ru:1.26,Rh:1.35,Pd:1.31,Ag:1.53,Cd:1.48,In:1.44,Sn:1.41,Sb:1.38,Te:1.35,I:1.33,Xe:1.3,Cs:2.25,Ba:1.98,Lu:1.6,Hf:1.5,Ta:1.38,W:1.46,Re:1.59,Os:1.44,Ir:1.37,Pt:1.28,Au:1.44,Hg:1.49,Tl:1.48,Pb:1.47,Bi:1.46,Rn:1.45};function i(t){return n[t]||1.6}function o(t,e){e<0&&(e=0),n[t]=e}},"./src/parsers/utils/computeSecondaryStructure.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{computeSecondaryStructure:()=>i});var n=r("./src/parsers/utils/assignBackboneHBonds.ts");function i(t,e){(0,n.assignBackboneHBonds)(t,e);const r={};let i,o,a,s,l,c;for(i=0,o=t.length;i{"use strict";r.r(e),r.d(e,{getSinglePDB:()=>u});var n=r("./src/WebGL/index.ts"),i=r("./src/parsers/utils/atomNameToElem.ts"),o=r("./src/parsers/utils/bondLength.ts"),a=r("./src/parsers/utils/computeSecondaryStructure.ts"),s=r("./src/parsers/utils/isEmpty.ts"),l=r("./src/parsers/utils/processSymmetries.ts"),c=r("./src/parsers/utils/assignPDBBonds.ts"),d=r("./src/parsers/utils/validateBonds.ts");function u(t,e,r){const u=[],h=void 0===e.assignBonds||e.assignBonds,p=!e.keepH,f=!!e.noSecondaryStructure,m=!e.noComputeSecondaryStructure,g=!e.doAssembly,v=e.altLoc?e.altLoc:"A",b={symmetries:[],cryst:void 0};let y,x=[];const w=[];let _;const k={};for(let e=0;e=4?1:r}}else k[o]=1,0!=e.bonds.length&&e.bonds[e.bonds.length-1]===i||(e.bonds.push(i),e.bondOrder.push(1))}}else if("HELIX "===a){s=_.substring(19,20),l=parseInt(_.substring(21,25)),c=parseInt(_.substring(33,37)),s in r||(r[s]={}),r[s][l]="h1";for(let t=l+1;t1&&("1"==t[1]?e.ssbegin=!0:"2"==t[1]&&(e.ssend=!0))}}return[u,b,x]}},"./src/parsers/utils/isEmpty.ts":(t,e,r)=>{"use strict";function n(t){for(const e in t)return!1;return!0}r.r(e),r.d(e,{isEmpty:()=>n})},"./src/parsers/utils/processSymmetries.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{processSymmetries:()=>i});var n=r("./src/WebGL/index.ts");function i(t,e,r,i){const o=!r.duplicateAssemblyAtoms,a=e.length;let s=a,l=-1,c=null,d=null;(r.normalizeAssembly||r.wrapAtoms)&&i&&(c=(0,n.conversionMatrix3)(i.a,i.b,i.c,i.alpha,i.beta,i.gamma),d=new n.Matrix3,d.getInverse3(c));let u=function(t){let e=t.clone().applyMatrix3(d);const r=[e.x,e.y,e.z],i=[0,0,0];for(let t=0;t<3;t++){for(;r[t]<-.001;)r[t]+=1,i[t]+=1;for(;r[t]>1.001;)r[t]-=1,i[t]-=1}const o=new n.Vector3(i[0],i[1],i[2]);return o.applyMatrix3(c),o};if(r.normalizeAssembly&&i)for(let r=0;r.001&&(l=r),t[r].translate(o)}if(o){if(t.length>1)for(let r=0;r=0){const r=new n.Vector3;for(let n=0;n{"use strict";r.r(e),r.d(e,{standardResidues:()=>n});const n=new Set(["ABU","ACD","ALA","ALB","ALI","ARG","AR0","ASN","ASP","ASX","BAS","CYS","CYH","CYX","CSS","CSH","GLN","GLU","GLX","GLY","HIS","HIE","HID","HIP","HYP","ILE","ILU","LEU","LYS","MET","PCA","PGA","PHE","PR0","PRO","PRZ","SER","THR","TRP","TYR","VAL","A","1MA","C","5MC","OMC","G","1MG","2MG","M2G","7MG","OMG","YG","I","T","U","+U","H2U","5MU","PSU","ACE","F0R","H2O","HOH","WAT"])},"./src/parsers/utils/validateBonds.ts":(t,e,r)=>{"use strict";function n(t,e){for(let r=0,n=t.length;rn})},"./src/partialCharges.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{applyPartialCharges:()=>i,partialCharges:()=>n});const n={"ALA:N":-.15,"ALA:CA":.1,"ALA:CB":0,"ALA:C":.6,"ALA:O":-.55,"ARG:N":-.15,"ARG:CA":.1,"ARG:CB":0,"ARG:CG":0,"ARG:CD":.1,"ARG:NE":-.1,"ARG:CZ":.5,"ARG:NH1":.25,"ARG:NH2":.25,"ARG:C":.6,"ARG:O":-.55,"ASN:N":-.15,"ASN:CA":.1,"ASN:CB":0,"ASN:CG":.55,"ASN:OD1":-.55,"ASN:ND2":0,"ASN:C":.6,"ASN:O":-.55,"ASP:N":-.15,"ASP:CA":.1,"ASP:CB":0,"ASP:CG":.14,"ASP:OD1":-.57,"ASP:OD2":-.57,"ASP:C":.6,"ASP:O":-.55,"CYS:N":-.15,"CYS:CA":.1,"CYS:CB":.19,"CYS:SG":-.19,"CYS:C":.6,"CYS:O":-.55,"GLN:N":-.15,"GLN:CA":.1,"GLN:CB":0,"GLN:CG":0,"GLN:CD":.55,"GLN:OE1":-.55,"GLN:NE2":0,"GLN:C":.6,"GLN:O":-.55,"GLU:N":-.15,"GLU:CA":.1,"GLU:CB":0,"GLU:CG":0,"GLU:CD":.14,"GLU:OE1":-.57,"GLU:OE2":-.57,"GLU:C":.6,"GLU:O":-.55,"GLY:N":-.15,"GLY:CA":.1,"GLY:C":.6,"GLY:O":-.55,"HIS:N":-.15,"HIS:CA":.1,"HIS:CB":0,"HIS:CG":.1,"HIS:ND1":-.1,"HIS:CD2":.1,"HIS:NE2":-.4,"HIS:CE1":.3,"HIS:C":.6,"HIS:O":-.55,"ILE:N":-.15,"ILE:CA":.1,"ILE:CB":0,"ILE:CG2":0,"ILE:CG1":0,"ILE:CD":0,"ILE:C":.6,"ILE:O":-.55,"LEU:N":-.15,"LEU:CA":.1,"LEU:CB":0,"LEU:CG":0,"LEU:CD1":0,"LEU:CD2":0,"LEU:C":.6,"LEU:O":-.55,"LYS:N":-.15,"LYS:CA":.1,"LYS:CB":0,"LYS:CG":0,"LYS:CD":0,"LYS:CE":.25,"LYS:NZ":.75,"LYS:C":.6,"LYS:O":-.55,"MET:N":-.15,"MET:CA":.1,"MET:CB":0,"MET:CG":.06,"MET:SD":-.12,"MET:CE":.06,"MET:C":.6,"MET:O":-.55,"PHE:N":-.15,"PHE:CA":.1,"PHE:CB":0,"PHE:CG":0,"PHE:CD1":0,"PHE:CD2":0,"PHE:CE1":0,"PHE:CE2":0,"PHE:CZ":0,"PHE:C":.6,"PHE:O":-.55,"PRO:N":-.25,"PRO:CD":.1,"PRO:CA":.1,"PRO:CB":0,"PRO:CG":0,"PRO:C":.6,"PRO:O":-.55,"SER:N":-.15,"SER:CA":.1,"SER:CB":.25,"SER:OG":-.25,"SER:C":.6,"SER:O":-.55,"THR:N":-.15,"THR:CA":.1,"THR:CB":.25,"THR:OG1":-.25,"THR:CG2":0,"THR:C":.6,"THR:O":-.55,"TRP:N":-.15,"TRP:CA":.1,"TRP:CB":0,"TRP:CG":-.03,"TRP:CD2":.1,"TRP:CE2":-.04,"TRP:CE3":-.03,"TRP:CD1":.06,"TRP:NE1":-.06,"TRP:CZ2":0,"TRP:CZ3":0,"TRP:CH2":0,"TRP:C":.6,"TRP:O":-.55,"TYR:N":-.15,"TYR:CA":.1,"TYR:CB":0,"TYR:CG":0,"TYR:CD1":0,"TYR:CE1":0,"TYR:CD2":0,"TYR:CE2":0,"TYR:CZ":.25,"TYR:OH":-.25,"TYR:C":.6,"TYR:O":-.55,"VAL:N":-.15,"VAL:CA":.1,"VAL:CB":0,"VAL:CG1":0,"VAL:CG2":0,"VAL:C":.6,"VAL:O":-.55};function i(t,e){if((!e||void 0===t.partialCharge)&&t.resn&&t.atom){var r=t.resn+":"+t.atom;t.properties.partialCharge=n[r]}}},"./src/specs.ts":(t,e,r)=>{"use strict";r.r(e)},"./src/utilities.ts":(__unused_webpack_module,__nested_webpack_exports__,__nested_webpack_require_1150143__)=>{"use strict";__nested_webpack_require_1150143__.r(__nested_webpack_exports__),__nested_webpack_require_1150143__.d(__nested_webpack_exports__,{PausableTimer:()=>PausableTimer,adjustVolumeStyle:()=>adjustVolumeStyle,base64ToArray:()=>base64ToArray,deepCopy:()=>deepCopy,download:()=>download,extend:()=>extend,get:()=>get,getAtomProperty:()=>getAtomProperty,getColorFromStyle:()=>getColorFromStyle,getElement:()=>getElement,getExtent:()=>getExtent,getPropertyRange:()=>getPropertyRange,getbin:()=>getbin,inflateString:()=>inflateString,isEmptyObject:()=>isEmptyObject,isNumeric:()=>isNumeric,makeFunction:()=>makeFunction,mergeGeos:()=>mergeGeos,specStringToObject:()=>specStringToObject});var _Gradient__WEBPACK_IMPORTED_MODULE_0__=__nested_webpack_require_1150143__("./src/Gradient.ts"),_VolumeData__WEBPACK_IMPORTED_MODULE_1__=__nested_webpack_require_1150143__("./src/VolumeData.ts"),_colors__WEBPACK_IMPORTED_MODULE_2__=__nested_webpack_require_1150143__("./src/colors.ts"),pako__WEBPACK_IMPORTED_MODULE_3__=__nested_webpack_require_1150143__("./node_modules/pako/dist/pako.esm.mjs");function extend(t,e){for(var r in e)e.hasOwnProperty(r)&&void 0!==e[r]&&(t[r]=e[r]);return t}function deepCopy(t){let e,r,n;if(null==t)return{};if("object"!=typeof t||null===t)return t;for(n in e=Array.isArray(t)?[]:{},t)r=t[n],e[n]=deepCopy(r);return e}function isNumeric(t){var e=typeof t;return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))}function isEmptyObject(t){var e;for(e in t)return!1;return!0}function makeFunction(callback){return callback&&"string"==typeof callback&&(callback=eval("("+callback+")")),callback&&"function"!=typeof callback?null:callback}function adjustVolumeStyle(t){t&&(!t.volformat||t.voldata instanceof _VolumeData__WEBPACK_IMPORTED_MODULE_1__.VolumeData||(t.voldata=new _VolumeData__WEBPACK_IMPORTED_MODULE_1__.VolumeData(t.voldata,t.volformat)),t.volscheme&&(t.volscheme=_Gradient__WEBPACK_IMPORTED_MODULE_0__.Gradient.getGradient(t.volscheme)))}function getExtent(t,e){var r,n,i,o,a,s,l,c,d,u,h=!e;if(r=n=i=9999,o=a=s=-9999,l=c=d=u=0,0===t.length)return[[0,0,0],[0,0,0],[0,0,0]];for(var p=0;pf.x?o:f.x,a=a>f.y?a:f.y,s=s>f.z?s:f.z,f.symmetries&&h))for(var m=0;mf.symmetries[m].x?o:f.symmetries[m].x,a=a>f.symmetries[m].y?a:f.symmetries[m].y,s=s>f.symmetries[m].z?s:f.symmetries[m].z}return[[r,n,i],[o,a,s],[l/u,c/u,d/u]]}function getPropertyRange(t,e){for(var r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,i=0,o=t.length;in&&(n=a))}return isFinite(r)||isFinite(n)?isFinite(r)?isFinite(n)||(n=r):r=n:r=n=0,[r,n]}class PausableTimer{constructor(t,e,r){this.total_time_run=0,this.fn=t,this.arg=r,this.countdown=e,this.start_time=(new Date).getTime(),this.ident=setTimeout(t,e,r)}cancel(){clearTimeout(this.ident)}pause(){clearTimeout(this.ident),this.total_time_run=(new Date).getTime()-this.start_time}resume(){this.ident=setTimeout(this.fn,Math.max(0,this.countdown-this.total_time_run),this.arg)}}function base64ToArray(t){for(var e=window.atob(t),r=e.length,n=new Uint8Array(r),i=0;i=0?parseFloat(t):parseInt(t):"true"===t||"false"!==t&&t},r={};if("all"===(t=t.replace(/%7E/g,"~")))return r;for(var n=t.split(";"),i=0;it.text()));return e?r.then(e):r}function getbin(t,e,r,n){var i;return i="POST"==r?fetch(t,{method:"POST",body:n}).then((t=>checkStatus(t))).then((t=>t.arrayBuffer())):fetch(t).then((t=>checkStatus(t))).then((t=>t.arrayBuffer())),e?i.then(e):i}function download(t,e,r,n){var i="",o="",a="",s=null,l=e.addModel();if(t.indexOf(":")<0&&(t=4==t.length?"pdb:"+t:isNaN(t)?"url:"+t:"cid:"+t),"mmtf:"==t.substring(0,5)&&(console.log("WARNING: MMTF now deprecated. Reverting to bcif."),t="bcif:"+t.slice(5)),"bcif:"===t.substring(0,5))t=t.substring(5).toUpperCase(),a="https://models.rcsb.org/"+t+".bcif.gz",r&&void 0===r.noComputeSecondaryStructure&&(r.noComputeSecondaryStructure=!0),s=new Promise((function(t){getbin(a).then((function(n){l.addMolData(n,"bcif.gz",r),e.zoomTo(),e.render(),t(l)}),(function(){console.log("fetch of "+a+" failed.")}))}));else{if("pdb:"===t.substring(0,4)){if(i="bcif",r&&r.format&&(i=r.format),r&&void 0===r.noComputeSecondaryStructure&&(r.noComputeSecondaryStructure=!0),!(t=t.substring(4).toUpperCase()).match(/^[1-9][A-Za-z0-9]{3}$/))return void alert("Wrong PDB ID");"bcif"==i?a="https://models.rcsb.org/"+t.toUpperCase()+".bcif.gz":(o=r&&r.pdbUri?r.pdbUri:"https://files.rcsb.org/view/",a=o+t+"."+i)}else if("cid:"==t.substring(0,4)){if(i="sdf",!(t=t.substring(4)).match(/^[0-9]+$/))return void alert("Wrong Compound ID");a="https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"+t+"/SDF?record_type=3d"}else"url:"==t.substring(0,4)&&(a=t.substring(4),i=a);var c=function(t){l.addMolData(t,i,r),e.zoomTo(),e.render()};s=new Promise((function(e){"bcif"==i?getbin(a).then((function(t){c(t),e(l)})).catch((function(){o=r&&r.pdbUri?r.pdbUri:"https://files.rcsb.org/view/",a=o+t+".pdb",i="pdb",console.log("falling back to pdb format"),get(a).then((function(t){c(t),e(l)})).catch((function(t){c(""),e(l),console.log("fetch of "+a+" failed: "+t.statusText)}))})):get(a).then((function(t){c(t),e(l)})).catch((function(t){c(""),e(l),console.log("fetch of "+a+" failed: "+t.statusText)}))}))}return n?(s.then((function(t){n(t)})),l):s}function getColorFromStyle(t,e){let r=e.colorscheme;if(void 0!==_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r])r=_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r];else if("string"==typeof r&&r.endsWith("Carbon")){let t=r.substring(0,r.lastIndexOf("Carbon")).toLowerCase();if(void 0!==_colors__WEBPACK_IMPORTED_MODULE_2__.htmlColors[t]){let e=Object.assign({},_colors__WEBPACK_IMPORTED_MODULE_2__.elementColors.defaultColors);e.C=_colors__WEBPACK_IMPORTED_MODULE_2__.htmlColors[t],_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r]={prop:"elem",map:e},r=_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r]}}let n=t.color;if(void 0!==e.color&&"spectrum"!=e.color&&(n=e.color),void 0!==r){let o,a;if(void 0!==_colors__WEBPACK_IMPORTED_MODULE_2__.elementColors[r])r=_colors__WEBPACK_IMPORTED_MODULE_2__.elementColors[r],void 0!==r[t[r.prop]]&&(n=r.map[t[r.prop]]);else if(void 0!==r[t[r.prop]])n=r.map[t[r.prop]];else if(void 0!==r.prop&&void 0!==r.gradient){o=r.prop;var i=r.gradient;i instanceof _Gradient__WEBPACK_IMPORTED_MODULE_0__.GradientType||(i=(0,_Gradient__WEBPACK_IMPORTED_MODULE_0__.getGradient)(r));let e=i.range()||[-1,1];a=getAtomProperty(t,o),null!=a&&(n=i.valueToHex(a,e))}else void 0!==r.prop&&void 0!==r.map?(o=r.prop,a=getAtomProperty(t,o),void 0!==r.map[a]&&(n=r.map[a])):void 0!==e.colorscheme[t.elem]?n=e.colorscheme[t.elem]:console.log("Could not interpret colorscheme "+r)}else void 0!==e.colorfunc&&(n=e.colorfunc(t));return _colors__WEBPACK_IMPORTED_MODULE_2__.CC.color(n)}function getElement(t){let e=t;return"string"==typeof t?e=document.querySelector("#"+t):"object"==typeof t&&t.get&&(e=t.get(0)),e}function inflateString(t,e=!0){let r;return r="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t),(0,pako__WEBPACK_IMPORTED_MODULE_3__.inflate)(r,{to:e?"string":null})}},"./node_modules/upng-js/UPNG.js":(t,e,r)=>{var n;n={},t.exports=n,function(t,e){t.toRGBA8=function(e){var r=e.width,n=e.height;if(null==e.tabs.acTL)return[t.toRGBA8.decodeImage(e.data,r,n,e).buffer];var i=[];null==e.frames[0].data&&(e.frames[0].data=e.data);for(var o,a=new Uint8Array(r*n*4),s=0;s>3)]>>7-(7&f)&1);l[M]=x[S],l[M+1]=x[S+1],l[M+2]=x[S+2],l[M+3]=C<_?w[C]:255}}if(2==u)for(k=0;k>2)]>>6-((3&f)<<1)&3),l[M]=x[S],l[M+1]=x[S+1],l[M+2]=x[S+2],l[M+3]=C<_?w[C]:255;if(4==u)for(k=0;k>1)]>>4-((1&f)<<2)&15),l[M]=x[S],l[M+1]=x[S+1],l[M+2]=x[S+2],l[M+3]=C<_?w[C]:255;if(8==u)for(f=0;f>3]>>7-(7&f)&1))==255*g?0:255;c[f]=z<<24|E<<16|E<<8|E}if(2==u)for(f=0;f>2]>>6-((3&f)<<1)&3))==85*g?0:255,c[f]=z<<24|E<<16|E<<8|E;if(4==u)for(f=0;f>1]>>4-((1&f)<<2)&15))==17*g?0:255,c[f]=z<<24|E<<16|E<<8|E;if(8==u)for(f=0;f>3,s=Math.ceil(n*o/8),l=new Uint8Array(i*s),c=0,d=[0,0,4,0,2,0,1],u=[0,4,0,2,0,1,0],h=[8,8,8,4,4,2,2],p=[8,8,4,4,2,2,1],f=0;f<7;){for(var m=h[f],g=p[f],v=0,b=0,y=d[f];y>3])>>7-(7&T)&1,l[k*s+(A>>3)]|=M<<7-(3&A)),2==o&&(M=(M=e[T>>3])>>6-(7&T)&3,l[k*s+(A>>2)]|=M<<6-((3&A)<<1)),4==o&&(M=(M=e[T>>3])>>4-(7&T)&15,l[k*s+(A>>1)]|=M<<4-((1&A)<<2)),o>=8)for(var S=k*s+A*a,C=0;C>3)+C];T+=o,A+=g}_++,k+=m}v*b!=0&&(c+=b*(1+w)),f+=1}return l},t.decode._getBPP=function(t){return[1,null,3,1,2,null,4][t.ctype]*t.depth},t.decode._filterZero=function(e,r,n,i,o){var a=t.decode._getBPP(r),s=Math.ceil(i*a/8),l=t.decode._paeth;a=Math.ceil(a/8);for(var c=0;c>1)&255;if(4==h)for(p=a;p>1)&255;for(p=a;p>1)&255}if(4==h){for(p=0;p>8&255,t[e+1]=255&r},readUint:function(t,e){return 16777216*t[e]+(t[e+1]<<16|t[e+2]<<8|t[e+3])},writeUint:function(t,e,r){t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r},readASCII:function(t,e,r){for(var n="",i=0;i=0&&s>=0?(u=p*e+f<<2,h=(s+p)*i+a+f<<2):(u=(-s+p)*e-a+f<<2,h=p*i+f<<2),0==l)n[h]=t[u],n[h+1]=t[u+1],n[h+2]=t[u+2],n[h+3]=t[u+3];else if(1==l){var m=t[u+3]*(1/255),g=t[u]*m,v=t[u+1]*m,b=t[u+2]*m,y=n[h+3]*(1/255),x=n[h]*y,w=n[h+1]*y,_=n[h+2]*y,k=1-m,A=m+y*k,T=0==A?0:1/A;n[h+3]=255*A,n[h+0]=(g+x*k)*T,n[h+1]=(v+w*k)*T,n[h+2]=(b+_*k)*T}else if(2==l)m=t[u+3],g=t[u],v=t[u+1],b=t[u+2],y=n[h+3],x=n[h],w=n[h+1],_=n[h+2],m==y&&g==x&&v==w&&b==_?(n[h]=0,n[h+1]=0,n[h+2]=0,n[h+3]=0):(n[h]=g,n[h+1]=v,n[h+2]=b,n[h+3]=m);else if(3==l){if(m=t[u+3],g=t[u],v=t[u+1],b=t[u+2],y=n[h+3],x=n[h],w=n[h+1],_=n[h+2],m==y&&g==x&&v==w&&b==_)continue;if(m<220&&y>20)return!1}return!0},t.encode=function(e,r,n,i,o,a){null==i&&(i=0),null==a&&(a=!1);for(var s=new Uint8Array(e[0].byteLength*e.length+100),l=[137,80,78,71,13,10,26,10],c=0;c<8;c++)s[c]=l[c];var d=8,u=t._bin,h=t.crc.crc,p=u.writeUint,f=u.writeUshort,m=u.writeASCII,g=t.encode.compressPNG(e,r,n,i,a);p(s,d,13),m(s,d+=4,"IHDR"),p(s,d+=4,r),p(s,d+=4,n),s[d+=4]=g.depth,s[++d]=g.ctype,s[++d]=0,s[++d]=0,s[++d]=0,p(s,++d,h(s,d-17,17)),p(s,d+=4,1),m(s,d+=4,"sRGB"),s[d+=4]=1,p(s,++d,h(s,d-5,5)),d+=4;var v=e.length>1;if(v&&(p(s,d,8),m(s,d+=4,"acTL"),p(s,d+=4,e.length),p(s,d+=4,0),p(s,d+=4,h(s,d-12,12)),d+=4),3==g.ctype){for(p(s,d,3*(M=g.plte.length)),m(s,d+=4,"PLTE"),d+=4,c=0;c>8&255,_=y>>16&255;s[d+b+0]=x,s[d+b+1]=w,s[d+b+2]=_}if(p(s,d+=3*M,h(s,d-3*M-4,3*M+4)),d+=4,g.gotAlpha){for(p(s,d,M),m(s,d+=4,"tRNS"),d+=4,c=0;c>24&255;p(s,d+=M,h(s,d-M-4,M+4)),d+=4}}for(var k=0,A=0;A=300))break}}var w=!!m&&o,_=v.length;_<=256&&0==a&&(l=_<=2?1:_<=4?2:_<=16?4:8,o&&(l=8),m=!0);var k=[];for(u=0;uN&&(N=G),UB&&(B=U));var V=-1==N?1:(N-P+1)*(B-j+1);V>1)]|=g[T[q+G]]<<4-4*(1&G);else if(2==l)for(G=0;G>2)]|=g[T[q+G]]<<6-2*(3&G);else if(1==l)for(G=0;G>3)]|=g[T[q+G]]<<7-1*(7&G)}A=H,s=3,c=1}else if(0==m&&1==e.length){H=new Uint8Array(C*E*3);var Y=C*E;for(f=0;f5e5)||2!=l&&3!=l&&4!=l){for(var c=0;c>1)+256&255;if(4==a)for(d=o;d>1)&255;for(d=o;d>1)&255}if(4==a){for(d=0;d>>1:r>>>=1;t[e]=r}return t}(),update:function(e,r,n,i){for(var o=0;o>>8;return e},crc:function(e,r,n){return 4294967295^t.crc.update(4294967295,e,r,n)}},t.quantize=function(e,r,n){for(var i=[],o=0,a=0;am&&(m=f[a].est.L,g=a);if(m<.001)break;var v=f[g],b=t.quantize.splitPixels(s,l,v.i0,v.i1,v.est.e,v.est.eMq255),y={i0:v.i0,i1:b,bst:null,est:null,tdst:0,left:null,right:null};y.bst=t.quantize.stats(s,y.i0,y.i1),y.est=t.quantize.estats(y.bst);var x={i0:b,i1:v.i1,bst:null,est:null,tdst:0,left:null,right:null};for(x.bst={R:[],m:[],N:v.bst.N-y.bst.N},a=0;a<16;a++)x.bst.R[a]=v.bst.R[a]-y.bst.R[a];for(a=0;a<4;a++)x.bst.m[a]=v.bst.m[a]-y.bst.m[a];x.est=t.quantize.estats(x.bst),v.left=y,v.right=x,f[g]=y,f.push(x)}f.sort((function(t,e){return e.bst.N-t.bst.N}));for(var w=0;w>2]=L.est.rgba}i[w]=A.buffer}return{bufs:i,plte:f}},t.quantize.getNearest=function(e,r,n,i,o){if(null==e.left)return e.tdst=t.quantize.dist(e.est.q,r,n,i,o),e;var a=t.quantize.planeDst(e.est,r,n,i,o),s=e.left,l=e.right;a>0&&(s=e.right,l=e.left);var c=t.quantize.getNearest(s,r,n,i,o);if(c.tdst<=a*a)return c;var d=t.quantize.getNearest(l,r,n,i,o);return d.tdsta;)i-=4;if(n>=i)break;var l=r[n>>2];r[n>>2]=r[i>>2],r[i>>2]=l,n+=4,i-=4}for(;s(e,n,o)>a;)n-=4;return n+4},t.quantize.vecDot=function(t,e,r){return t[e]*r[0]+t[e+1]*r[1]+t[e+2]*r[2]+t[e+3]*r[3]},t.quantize.stats=function(t,e,r){for(var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],o=r-e>>2,a=e;a>>0}},t.M4={multVec:function(t,e){return[t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3],t[4]*e[0]+t[5]*e[1]+t[6]*e[2]+t[7]*e[3],t[8]*e[0]+t[9]*e[1]+t[10]*e[2]+t[11]*e[3],t[12]*e[0]+t[13]*e[1]+t[14]*e[2]+t[15]*e[3]]},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},sml:function(t,e){return[t*e[0],t*e[1],t*e[2],t*e[3]]}},t.encode.alphaMul=function(t,e){for(var r=new Uint8Array(t.length),n=t.length>>2,i=0;i{"use strict";var n={};(0,r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js").assign)(n,r("./node_modules/upng-js/node_modules/pako/lib/deflate.js"),r("./node_modules/upng-js/node_modules/pako/lib/inflate.js"),r("./node_modules/upng-js/node_modules/pako/lib/zlib/constants.js")),t.exports=n},"./node_modules/upng-js/node_modules/pako/lib/deflate.js":(t,e,r)=>{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/zlib/deflate.js"),i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/utils/strings.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/zlib/zstream.js"),l=Object.prototype.toString;function c(t){if(!(this instanceof c))return new c(t);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==r)throw new Error(a[r]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var d;if(d="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===l.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(r=n.deflateSetDictionary(this.strm,d)))throw new Error(a[r]);this._dict_set=!0}}function d(t,e){var r=new c(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}c.prototype.push=function(t,e){var r,a,s=this.strm,c=this.options.chunkSize;if(this.ended)return!1;a=e===~~e?e:!0===e?4:0,"string"==typeof t?s.input=o.string2buf(t):"[object ArrayBuffer]"===l.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(c),s.next_out=0,s.avail_out=c),1!==(r=n.deflate(s,a))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==r);return 4===a?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==a||(this.onEnd(0),s.avail_out=0,!0)},c.prototype.onData=function(t){this.chunks.push(t)},c.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Deflate=c,e.deflate=d,e.deflateRaw=function(t,e){return(e=e||{}).raw=!0,d(t,e)},e.gzip=function(t,e){return(e=e||{}).gzip=!0,d(t,e)}},"./node_modules/upng-js/node_modules/pako/lib/inflate.js":(t,e,r)=>{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/zlib/inflate.js"),i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/utils/strings.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/constants.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js"),l=r("./node_modules/upng-js/node_modules/pako/lib/zlib/zstream.js"),c=r("./node_modules/upng-js/node_modules/pako/lib/zlib/gzheader.js"),d=Object.prototype.toString;function u(t){if(!(this instanceof u))return new u(t);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,e.windowBits);if(r!==a.Z_OK)throw new Error(s[r]);if(this.header=new c,n.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=o.string2buf(e.dictionary):"[object ArrayBuffer]"===d.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=n.inflateSetDictionary(this.strm,e.dictionary))!==a.Z_OK))throw new Error(s[r])}function h(t,e){var r=new u(e);if(r.push(t,!0),r.err)throw r.msg||s[r.err];return r.result}u.prototype.push=function(t,e){var r,s,l,c,u,h=this.strm,p=this.options.chunkSize,f=this.options.dictionary,m=!1;if(this.ended)return!1;s=e===~~e?e:!0===e?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof t?h.input=o.binstring2buf(t):"[object ArrayBuffer]"===d.call(t)?h.input=new Uint8Array(t):h.input=t,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(p),h.next_out=0,h.avail_out=p),(r=n.inflate(h,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&f&&(r=n.inflateSetDictionary(this.strm,f)),r===a.Z_BUF_ERROR&&!0===m&&(r=a.Z_OK,m=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&r!==a.Z_STREAM_END&&(0!==h.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(h.output,h.next_out),c=h.next_out-l,u=o.buf2string(h.output,l),h.next_out=c,h.avail_out=p-c,c&&i.arraySet(h.output,h.output,l,c,0),this.onData(u)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(m=!0)}while((h.avail_in>0||0===h.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),h.avail_out=0,!0)},u.prototype.onData=function(t){this.chunks.push(t)},u.prototype.onEnd=function(t){t===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=u,e.inflate=h,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,h(t,e)},e.ungzip=h},"./node_modules/upng-js/node_modules/pako/lib/utils/common.js":(t,e)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(t[i]=r[i])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var o=0;o{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){o=!1}for(var a=new n.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function l(t,e){if(e<65534&&(t.subarray&&o||!t.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var r="",a=0;a>>6,e[a++]=128|63&r):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|63&r):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|63&r);return e},e.buf2binstring=function(t){return l(t,t.length)},e.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r4)c[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r1?c[n++]=65533:i<65536?c[n++]=i:(i-=65536,c[n++]=55296|i>>10&1023,c[n++]=56320|1023&i)}return l(c,n)},e.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+a[t[r]]>e?r:e}},"./node_modules/upng-js/node_modules/pako/lib/zlib/adler32.js":t=>{"use strict";t.exports=function(t,e,r,n){for(var i=65535&t,o=t>>>16&65535,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(i=i+e[n++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16}},"./node_modules/upng-js/node_modules/pako/lib/zlib/constants.js":t=>{"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},"./node_modules/upng-js/node_modules/pako/lib/zlib/crc32.js":t=>{"use strict";var e=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,r,n,i){var o=e,a=i+n;t^=-1;for(var s=i;s>>8^o[255&(t^r[s])];return~t}},"./node_modules/upng-js/node_modules/pako/lib/zlib/deflate.js":(t,e,r)=>{"use strict";var n,i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/zlib/trees.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/adler32.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/zlib/crc32.js"),l=r("./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js"),c=-2,d=258,u=262,h=103,p=113,f=666;function m(t,e){return t.msg=l[e],e}function g(t){return(t<<1)-(t>4?9:0)}function v(t){for(var e=t.length;--e>=0;)t[e]=0}function b(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function y(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,b(t.strm)}function x(t,e){t.pending_buf[t.pending++]=e}function w(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function _(t,e){var r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,l=t.strstart>t.w_size-u?t.strstart-(t.w_size-u):0,c=t.window,h=t.w_mask,p=t.prev,f=t.strstart+d,m=c[o+a-1],g=c[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(c[(r=e)+a]===g&&c[r+a-1]===m&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&oa){if(t.match_start=e,a=n,n>=s)break;m=c[o+a-1],g=c[o+a]}}}while((e=p[e&h])>l&&0!=--i);return a<=t.lookahead?a:t.lookahead}function k(t){var e,r,n,o,l,c,d,h,p,f,m=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=m+(m-u)){i.arraySet(t.window,t.window,m,m,0),t.match_start-=m,t.strstart-=m,t.block_start-=m,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=m?n-m:0}while(--r);e=r=m;do{n=t.prev[--e],t.prev[e]=n>=m?n-m:0}while(--r);o+=m}if(0===t.strm.avail_in)break;if(c=t.strm,d=t.window,h=t.strstart+t.lookahead,p=o,f=void 0,(f=c.avail_in)>p&&(f=p),r=0===f?0:(c.avail_in-=f,i.arraySet(d,c.input,c.next_in,f,h),1===c.state.wrap?c.adler=a(c.adler,d,f,h):2===c.state.wrap&&(c.adler=s(c.adler,d,f,h)),c.next_in+=f,c.total_in+=f,f),t.lookahead+=r,t.lookahead+t.insert>=3)for(l=t.strstart-t.insert,t.ins_h=t.window[l],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<15&&(s=2,n-=16),o<1||o>9||8!==r||n<8||n>15||e<0||e>9||a<0||a>4)return m(t,c);8===n&&(n=9);var l=new S;return t.state=l,l.strm=t,l.wrap=s,l.gzhead=null,l.w_bits=n,l.w_size=1<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(k(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-u&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(y(t,!1),t.strm.avail_out),1)})),new M(4,4,8,4,A),new M(4,5,16,8,A),new M(4,6,32,32,A),new M(4,4,16,16,T),new M(8,16,32,32,T),new M(8,16,128,128,T),new M(8,32,128,256,T),new M(32,128,258,1024,T),new M(32,258,258,4096,T)],e.deflateInit=function(t,e){return L(t,e,8,15,8,0)},e.deflateInit2=L,e.deflateReset=E,e.deflateResetKeep=C,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?c:(t.state.gzhead=e,0):c},e.deflate=function(t,e){var r,i,a,l;if(!t||!t.state||e>5||e<0)return t?m(t,c):c;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||i.status===f&&4!==e)return m(t,0===t.avail_out?-5:c);if(i.strm=t,r=i.last_flush,i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,x(i,31),x(i,139),x(i,8),i.gzhead?(x(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),x(i,255&i.gzhead.time),x(i,i.gzhead.time>>8&255),x(i,i.gzhead.time>>16&255),x(i,i.gzhead.time>>24&255),x(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),x(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(x(i,255&i.gzhead.extra.length),x(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=s(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(x(i,0),x(i,0),x(i,0),x(i,0),x(i,0),x(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),x(i,3),i.status=p);else{var u=8+(i.w_bits-8<<4)<<8;u|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(u|=32),u+=31-u%31,i.status=p,w(i,u),0!==i.strstart&&(w(i,t.adler>>>16),w(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),b(t),a=i.pending,i.pending!==i.pending_buf_size));)x(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),b(t),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),b(t),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.status=h)}else i.status=h;if(i.status===h&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&b(t),i.pending+2<=i.pending_buf_size&&(x(i,255&t.adler),x(i,t.adler>>8&255),t.adler=0,i.status=p)):i.status=p),0!==i.pending){if(b(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&g(e)<=g(r)&&4!==e)return m(t,-5);if(i.status===f&&0!==t.avail_in)return m(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&i.status!==f){var _=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(k(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(y(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,a,s=t.window;;){if(t.lookahead<=d){if(k(t),t.lookahead<=d&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[i=t.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){a=t.strstart+d;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(y(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==_&&4!==_||(i.status=f),1===_||3===_)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===_&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(v(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),b(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(x(i,255&t.adler),x(i,t.adler>>8&255),x(i,t.adler>>16&255),x(i,t.adler>>24&255),x(i,255&t.total_in),x(i,t.total_in>>8&255),x(i,t.total_in>>16&255),x(i,t.total_in>>24&255)):(w(i,t.adler>>>16),w(i,65535&t.adler)),b(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},e.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&e!==h&&e!==p&&e!==f?m(t,c):(t.state=null,e===p?m(t,-3):0):c},e.deflateSetDictionary=function(t,e){var r,n,o,s,l,d,u,h,p=e.length;if(!t||!t.state)return c;if(2===(s=(r=t.state).wrap)||1===s&&42!==r.status||r.lookahead)return c;for(1===s&&(t.adler=a(t.adler,e,p,0)),r.wrap=0,p>=r.w_size&&(0===s&&(v(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new i.Buf8(r.w_size),i.arraySet(h,e,p-r.w_size,r.w_size,0),e=h,p=r.w_size),l=t.avail_in,d=t.next_in,u=t.input,t.avail_in=p,t.next_in=0,t.input=e,k(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h<{"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},"./node_modules/upng-js/node_modules/pako/lib/zlib/inffast.js":t=>{"use strict";t.exports=function(t,e){var r,n,i,o,a,s,l,c,d,u,h,p,f,m,g,v,b,y,x,w,_,k,A,T,M;r=t.state,n=t.next_in,T=t.input,i=n+(t.avail_in-5),o=t.next_out,M=t.output,a=o-(e-t.avail_out),s=o+(t.avail_out-257),l=r.dmax,c=r.wsize,d=r.whave,u=r.wnext,h=r.window,p=r.hold,f=r.bits,m=r.lencode,g=r.distcode,v=(1<>>=x=y>>>24,f-=x,0==(x=y>>>16&255))M[o++]=65535&y;else{if(!(16&x)){if(64&x){if(32&x){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}y=m[(65535&y)+(p&(1<>>=x,f-=x),f<15&&(p+=T[n++]<>>=x=y>>>24,f-=x,16&(x=y>>>16&255)){if(_=65535&y,f<(x&=15)&&(p+=T[n++]<l){t.msg="invalid distance too far back",r.mode=30;break t}if(p>>>=x,f-=x,_>(x=o-a)){if((x=_-x)>d&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(k=0,A=h,0===u){if(k+=c-x,x2;)M[o++]=A[k++],M[o++]=A[k++],M[o++]=A[k++],w-=3;w&&(M[o++]=A[k++],w>1&&(M[o++]=A[k++]))}else{k=o-_;do{M[o++]=M[k++],M[o++]=M[k++],M[o++]=M[k++],w-=3}while(w>2);w&&(M[o++]=M[k++],w>1&&(M[o++]=M[k++]))}break}if(64&x){t.msg="invalid distance code",r.mode=30;break t}y=g[(65535&y)+(p&(1<>3,p&=(1<<(f-=w<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),i=r("./node_modules/upng-js/node_modules/pako/lib/zlib/adler32.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/zlib/crc32.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/inffast.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/zlib/inftrees.js"),l=-2,c=12,d=30;function u(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function p(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):l}function f(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,p(t)):l}function m(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?l:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,f(t))):l}function g(t,e){var r,n;return t?(n=new h,t.state=n,n.window=null,0!==(r=m(t,e))&&(t.state=null),r):l}var v,b,y=!0;function x(t){if(y){var e;for(v=new n.Buf32(512),b=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(s(1,t.lens,0,288,v,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;s(2,t.lens,0,32,b,0,t.work,{bits:5}),y=!1}t.lencode=v,t.lenbits=9,t.distcode=b,t.distbits=5}function w(t,e,r,i){var o,a=t.state;return null===a.window&&(a.wsize=1<=a.wsize?(n.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),n.arraySet(a.window,e,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,e,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=o(r.check,j,2,0),b=0,y=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&b)<<8)+(b>>8))%31){t.msg="incorrect header check",r.mode=d;break}if(8!=(15&b)){t.msg="unknown compression method",r.mode=d;break}if(y-=4,D=8+(15&(b>>>=4)),0===r.wbits)r.wbits=D;else if(D>r.wbits){t.msg="invalid window size",r.mode=d;break}r.dmax=1<>8&1),512&r.flags&&(j[0]=255&b,j[1]=b>>>8&255,r.check=o(r.check,j,2,0)),b=0,y=0,r.mode=3;case 3:for(;y<32;){if(0===g)break t;g--,b+=h[f++]<>>8&255,j[2]=b>>>16&255,j[3]=b>>>24&255,r.check=o(r.check,j,4,0)),b=0,y=0,r.mode=4;case 4:for(;y<16;){if(0===g)break t;g--,b+=h[f++]<>8),512&r.flags&&(j[0]=255&b,j[1]=b>>>8&255,r.check=o(r.check,j,2,0)),b=0,y=0,r.mode=5;case 5:if(1024&r.flags){for(;y<16;){if(0===g)break t;g--,b+=h[f++]<>>8&255,r.check=o(r.check,j,2,0)),b=0,y=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((A=r.length)>g&&(A=g),A&&(r.head&&(D=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,h,f,A,D)),512&r.flags&&(r.check=o(r.check,h,A,f)),g-=A,f+=A,r.length-=A),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===g)break t;A=0;do{D=h[f+A++],r.head&&D&&r.length<65536&&(r.head.name+=String.fromCharCode(D))}while(D&&A>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=c;break;case 10:for(;y<32;){if(0===g)break t;g--,b+=h[f++]<>>=7&y,y-=7&y,r.mode=27;break}for(;y<3;){if(0===g)break t;g--,b+=h[f++]<>>=1)){case 0:r.mode=14;break;case 1:if(x(r),r.mode=20,6===e){b>>>=2,y-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=d}b>>>=2,y-=2;break;case 14:for(b>>>=7&y,y-=7&y;y<32;){if(0===g)break t;g--,b+=h[f++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=d;break}if(r.length=65535&b,b=0,y=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(A=r.length){if(A>g&&(A=g),A>v&&(A=v),0===A)break t;n.arraySet(p,h,f,A,m),g-=A,f+=A,v-=A,m+=A,r.length-=A;break}r.mode=c;break;case 17:for(;y<14;){if(0===g)break t;g--,b+=h[f++]<>>=5,y-=5,r.ndist=1+(31&b),b>>>=5,y-=5,r.ncode=4+(15&b),b>>>=4,y-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=d;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,y-=3}for(;r.have<19;)r.lens[N[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,F={bits:r.lenbits},I=s(0,r.lens,0,19,r.lencode,0,r.work,F),r.lenbits=F.bits,I){t.msg="invalid code lengths set",r.mode=d;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,E=65535&P,!((S=P>>>24)<=y);){if(0===g)break t;g--,b+=h[f++]<>>=S,y-=S,r.lens[r.have++]=E;else{if(16===E){for(R=S+2;y>>=S,y-=S,0===r.have){t.msg="invalid bit length repeat",r.mode=d;break}D=r.lens[r.have-1],A=3+(3&b),b>>>=2,y-=2}else if(17===E){for(R=S+3;y>>=S)),b>>>=3,y-=3}else{for(R=S+7;y>>=S)),b>>>=7,y-=7}if(r.have+A>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=d;break}for(;A--;)r.lens[r.have++]=D}}if(r.mode===d)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=d;break}if(r.lenbits=9,F={bits:r.lenbits},I=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,F),r.lenbits=F.bits,I){t.msg="invalid literal/lengths set",r.mode=d;break}if(r.distbits=6,r.distcode=r.distdyn,F={bits:r.distbits},I=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,F),r.distbits=F.bits,I){t.msg="invalid distances set",r.mode=d;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(g>=6&&v>=258){t.next_out=m,t.avail_out=v,t.next_in=f,t.avail_in=g,r.hold=b,r.bits=y,a(t,k),m=t.next_out,p=t.output,v=t.avail_out,f=t.next_in,h=t.input,g=t.avail_in,b=r.hold,y=r.bits,r.mode===c&&(r.back=-1);break}for(r.back=0;C=(P=r.lencode[b&(1<>>16&255,E=65535&P,!((S=P>>>24)<=y);){if(0===g)break t;g--,b+=h[f++]<>L)])>>>16&255,E=65535&P,!(L+(S=P>>>24)<=y);){if(0===g)break t;g--,b+=h[f++]<>>=L,y-=L,r.back+=L}if(b>>>=S,y-=S,r.back+=S,r.length=E,0===C){r.mode=26;break}if(32&C){r.back=-1,r.mode=c;break}if(64&C){t.msg="invalid literal/length code",r.mode=d;break}r.extra=15&C,r.mode=22;case 22:if(r.extra){for(R=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;C=(P=r.distcode[b&(1<>>16&255,E=65535&P,!((S=P>>>24)<=y);){if(0===g)break t;g--,b+=h[f++]<>L)])>>>16&255,E=65535&P,!(L+(S=P>>>24)<=y);){if(0===g)break t;g--,b+=h[f++]<>>=L,y-=L,r.back+=L}if(b>>>=S,y-=S,r.back+=S,64&C){t.msg="invalid distance code",r.mode=d;break}r.offset=E,r.extra=15&C,r.mode=24;case 24:if(r.extra){for(R=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=d;break}r.mode=25;case 25:if(0===v)break t;if(A=k-v,r.offset>A){if((A=r.offset-A)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=d;break}A>r.wnext?(A-=r.wnext,T=r.wsize-A):T=r.wnext-A,A>r.length&&(A=r.length),M=r.window}else M=p,T=m-r.offset,A=r.length;A>v&&(A=v),v-=A,r.length-=A;do{p[m++]=M[T++]}while(--A);0===r.length&&(r.mode=21);break;case 26:if(0===v)break t;p[m++]=r.length,v--,r.mode=21;break;case 27:if(r.wrap){for(;y<32;){if(0===g)break t;g--,b|=h[f++]<{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(t,e,r,l,c,d,u,h){var p,f,m,g,v,b,y,x,w,_=h.bits,k=0,A=0,T=0,M=0,S=0,C=0,E=0,L=0,z=0,O=0,D=null,I=0,F=new n.Buf16(16),R=new n.Buf16(16),P=null,j=0;for(k=0;k<=15;k++)F[k]=0;for(A=0;A=1&&0===F[M];M--);if(S>M&&(S=M),0===M)return c[d++]=20971520,c[d++]=20971520,h.bits=1,0;for(T=1;T0&&(0===t||1!==M))return-1;for(R[1]=0,k=1;k<15;k++)R[k+1]=R[k]+F[k];for(A=0;A852||2===t&&z>592)return 1;for(;;){y=k-E,u[A]b?(x=P[j+u[A]],w=D[I+u[A]]):(x=96,w=0),p=1<>E)+(f-=p)]=y<<24|x<<16|w}while(0!==f);for(p=1<>=1;if(0!==p?(O&=p-1,O+=p):O=0,A++,0==--F[k]){if(k===M)break;k=e[r+u[A]]}if(k>S&&(O&g)!==m){for(0===E&&(E=S),v+=T,L=1<<(C=k-E);C+E852||2===t&&z>592)return 1;c[m=O&g]=S<<24|C<<16|v-d}}return 0!==O&&(c[v+O]=k-E<<24|64<<16),h.bits=S,0}},"./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js":t=>{"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},"./node_modules/upng-js/node_modules/pako/lib/zlib/trees.js":(t,e,r)=>{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js");function i(t){for(var e=t.length;--e>=0;)t[e]=0}var o=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);i(c);var d=new Array(60);i(d);var u=new Array(512);i(u);var h=new Array(256);i(h);var p=new Array(29);i(p);var f,m,g,v=new Array(30);function b(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function y(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function x(t){return t<256?u[t]:u[256+(t>>>7)]}function w(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function _(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<>>=1,r<<=1}while(--e>0);return r>>>1}function T(t,e,r){var n,i,o=new Array(16),a=0;for(n=1;n<=15;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=A(o[s]++,s))}}function M(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function S(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function C(t,e,r,n){var i=2*e,o=2*r;return t[i]>1;r>=1;r--)E(t,o,r);i=l;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],E(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,o[2*i]=o[2*r]+o[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,o[2*r+1]=o[2*n+1]=i,t.heap[1]=i++,E(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,o,a,s,l=e.dyn_tree,c=e.max_code,d=e.stat_desc.static_tree,u=e.stat_desc.has_stree,h=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,f=e.stat_desc.max_length,m=0;for(o=0;o<=15;o++)t.bl_count[o]=0;for(l[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(o=l[2*l[2*(n=t.heap[r])+1]+1]+1)>f&&(o=f,m++),l[2*n+1]=o,n>c||(t.bl_count[o]++,a=0,n>=p&&(a=h[n-p]),s=l[2*n],t.opt_len+=s*(o+a),u&&(t.static_len+=s*(d[2*n+1]+a)));if(0!==m){do{for(o=f-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[f]--,m-=2}while(m>0);for(o=f;0!==o;o--)for(n=t.bl_count[o];0!==n;)(i=t.heap[--r])>c||(l[2*i+1]!==o&&(t.opt_len+=(o-l[2*i+1])*l[2*i],l[2*i+1]=o),n--)}}(t,e),T(o,c,t.bl_count)}function O(t,e,r){var n,i,o=-1,a=e[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++s>=7;n<30;n++)for(v[n]=i<<7,t=0;t<1<0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),z(t,t.l_desc),z(t,t.d_desc),a=function(t){var e;for(O(t,t.dyn_ltree,t.l_desc.max_code),O(t,t.dyn_dtree,t.d_desc.max_code),z(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*l[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?F(t,e,r,n):4===t.strategy||o===i?(_(t,2+(n?1:0),3),L(t,c,d)):(_(t,4+(n?1:0),3),function(t,e,r,n){var i;for(_(t,e-257,5),_(t,r-1,5),_(t,n-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(h[r]+256+1)]++,t.dyn_dtree[2*x(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){_(t,2,3),k(t,256,c),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},"./node_modules/upng-js/node_modules/pako/lib/zlib/zstream.js":t=>{"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},"./src/SurfaceWorker.js":()=>{$3Dmol.workerString=function(){self.onmessage=function(t){var e=t.data,r=e.type;if(r<0)self.atomData=e.atoms,self.volume=e.volume,self.ps=new ProteinSurface;else{var n=self.ps;n.initparm(e.expandedExtent,1!=r,self.volume),n.fillvoxels(self.atomData,e.extendedAtoms),n.buildboundary(),4!==r&&2!==r||(n.fastdistancemap(),n.boundingatom(!1),n.fillvoxelswaals(self.atomData,e.extendedAtoms)),n.marchingcube(r);var i=n.getFacesAndVertices(e.atomsToShow);self.postMessage(i)}}}.toString().replace(/(^.*?\{|\}$)/g,""),$3Dmol.workerString+=";\nfunction _classCallCheck() {};",$3Dmol.workerString+=";\n"+$3Dmol.Vector3.toString(),$3Dmol.workerString+=";\n"+$3Dmol.MarchingCubeInitializer.toString()+";\n\n",$3Dmol.workerString+=";\n"+$3Dmol.PointGrid.toString()+";\n",$3Dmol.workerString+=";\nvar ProteinSurface = "+$3Dmol.ProteinSurface.toString()+";\n",$3Dmol.SurfaceWorker=window.URL?window.URL.createObjectURL(new Blob([$3Dmol.workerString],{type:"text/javascript"})):void 0},"./src/exporter.js":t=>{"object"==typeof t.exports&&(t.exports=window.$3Dmol)},"./src/vendor/mmtf.js":function(t,e){!function(t){"use strict";function e(t,e,r){for(var n=(t.byteLength,0),i=r.length;i>n;n++){var o=r.charCodeAt(n);if(128>o)t.setUint8(e++,o>>>0&127);else if(2048>o)t.setUint8(e++,o>>>6&31|192),t.setUint8(e++,o>>>0&63|128);else if(65536>o)t.setUint8(e++,o>>>12&15|224),t.setUint8(e++,o>>>6&63|128),t.setUint8(e++,o>>>0&63|128);else{if(!(1114112>o))throw new Error("bad codepoint "+o);t.setUint8(e++,o>>>18&7|240),t.setUint8(e++,o>>>12&63|128),t.setUint8(e++,o>>>6&63|128),t.setUint8(e++,o>>>0&63|128)}}}function r(t){for(var e=0,r=0,n=t.length;n>r;r++){var i=t.charCodeAt(r);if(128>i)e+=1;else if(2048>i)e+=2;else if(65536>i)e+=3;else{if(!(1114112>i))throw new Error("bad codepoint "+i);e+=4}}return e}function n(t,i,o){var a=typeof t;if("string"===a){if(32>(s=r(t)))return i.setUint8(o,160|s),e(i,o+1,t),1+s;if(256>s)return i.setUint8(o,217),i.setUint8(o+1,s),e(i,o+2,t),2+s;if(65536>s)return i.setUint8(o,218),i.setUint16(o+1,s),e(i,o+3,t),3+s;if(4294967296>s)return i.setUint8(o,219),i.setUint32(o+1,s),e(i,o+5,t),5+s}if(t instanceof Uint8Array){var s=t.byteLength,l=new Uint8Array(i.buffer);if(256>s)return i.setUint8(o,196),i.setUint8(o+1,s),l.set(t,o+2),2+s;if(65536>s)return i.setUint8(o,197),i.setUint16(o+1,s),l.set(t,o+3),3+s;if(4294967296>s)return i.setUint8(o,198),i.setUint32(o+1,s),l.set(t,o+5),5+s}if("number"===a){if(!isFinite(t))throw new Error("Number not finite: "+t);if(Math.floor(t)!==t)return i.setUint8(o,203),i.setFloat64(o+1,t),9;if(t>=0){if(128>t)return i.setUint8(o,t),1;if(256>t)return i.setUint8(o,204),i.setUint8(o+1,t),2;if(65536>t)return i.setUint8(o,205),i.setUint16(o+1,t),3;if(4294967296>t)return i.setUint8(o,206),i.setUint32(o+1,t),5;throw new Error("Number too big 0x"+t.toString(16))}if(t>=-32)return i.setInt8(o,t),1;if(t>=-128)return i.setUint8(o,208),i.setInt8(o+1,t),2;if(t>=-32768)return i.setUint8(o,209),i.setInt16(o+1,t),3;if(t>=-2147483648)return i.setUint8(o,210),i.setInt32(o+1,t),5;throw new Error("Number too small -0x"+(-t).toString(16).substr(1))}if(null===t)return i.setUint8(o,192),1;if("boolean"===a)return i.setUint8(o,t?195:194),1;if("object"===a){var c=0,d=Array.isArray(t);if(d)s=t.length;else{var u=Object.keys(t);s=u.length}if(16>s?(i.setUint8(o,s|(d?144:128)),c=1):65536>s?(i.setUint8(o,d?220:222),i.setUint16(o+1,s),c=3):4294967296>s&&(i.setUint8(o,d?221:223),i.setUint32(o+1,s),c=5),d)for(var h=0;s>h;h++)c+=n(t[h],i,o+c);else for(h=0;s>h;h++){var p=u[h];c+=n(p,i,o+c),c+=n(t[p],i,o+c)}return c}throw new Error("Unknown type "+a)}function i(t){var e=typeof t;if("string"===e){if(32>(n=r(t)))return 1+n;if(256>n)return 2+n;if(65536>n)return 3+n;if(4294967296>n)return 5+n}if(t instanceof Uint8Array){if(256>(n=t.byteLength))return 2+n;if(65536>n)return 3+n;if(4294967296>n)return 5+n}if("number"===e){if(Math.floor(t)!==t)return 9;if(t>=0){if(128>t)return 1;if(256>t)return 2;if(65536>t)return 3;if(4294967296>t)return 5;throw new Error("Number too big 0x"+t.toString(16))}if(t>=-32)return 1;if(t>=-128)return 2;if(t>=-32768)return 3;if(t>=-2147483648)return 5;throw new Error("Number too small -0x"+t.toString(16).substr(1))}if("boolean"===e||null===t)return 1;if("object"===e){var n,o=0;if(Array.isArray(t)){n=t.length;for(var a=0;n>a;a++)o+=i(t[a])}else{var s=Object.keys(t);for(n=s.length,a=0;n>a;a++){var l=s[a];o+=i(l)+i(t[l])}}if(16>n)return 1+o;if(65536>n)return 3+o;if(4294967296>n)return 5+o;throw new Error("Array or object too long 0x"+n.toString(16))}throw new Error("Unknown type "+e)}function o(t){var e=new ArrayBuffer(i(t));return n(t,new DataView(e),0),new Uint8Array(e)}function a(t,e,r){return e?new t(e.buffer,e.byteOffset,e.byteLength/(r||1)):void 0}function s(t){return a(DataView,t)}function l(t){return a(Uint8Array,t)}function c(t){return a(Int8Array,t)}function d(t){return a(Int32Array,t,4)}function u(t,e){var r=t.length/2;e||(e=new Int16Array(r));for(var n=0,i=0;r>n;++n,i+=2)e[n]=t[i]<<8^t[i+1];return e}function h(t,e){var r=t.length/4;e||(e=new Int32Array(r));for(var n=0,i=0;r>n;++n,i+=4)e[n]=t[i]<<24^t[i+1]<<16^t[i+2]<<8^t[i+3];return e}function p(t,e){var r=t.length;e||(e=new Uint8Array(4*r));for(var n=s(e),i=0;r>i;++i)n.setInt32(4*i,t[i]);return l(e)}function f(t,e,r){var n=t.length,i=1/e;r||(r=new Float32Array(n));for(var o=0;n>o;++o)r[o]=t[o]*i;return r}function m(t,e,r){var n=t.length;r||(r=new Int32Array(n));for(var i=0;n>i;++i)r[i]=Math.round(t[i]*e);return r}function g(t,e){var r,n;if(!e){var i=0;for(r=0,n=t.length;n>r;r+=2)i+=t[r+1];e=new t.constructor(i)}var o=0;for(r=0,n=t.length;n>r;r+=2)for(var a=t[r],s=t[r+1],l=0;s>l;++l)e[o]=a,++o;return e}function v(t){if(0===t.length)return new Int32Array;var e,r,n=2;for(e=1,r=t.length;r>e;++e)t[e-1]!==t[e]&&(n+=2);var i=new Int32Array(n),o=0,a=1;for(e=1,r=t.length;r>e;++e)t[e-1]!==t[e]?(i[o]=t[e-1],i[o+1]=a,a=1,o+=2):++a;return i[o]=t[t.length-1],i[o+1]=a,i}function b(t,e){var r=t.length;e||(e=new t.constructor(r)),r&&(e[0]=t[0]);for(var n=1;r>n;++n)e[n]=t[n]+e[n-1];return e}function y(t,e){var r=t.length;e||(e=new t.constructor(r)),e[0]=t[0];for(var n=1;r>n;++n)e[n]=t[n]-t[n-1];return e}function x(t,e){var r,n,i=t instanceof Int8Array?127:32767,o=-i-1,a=t.length;if(!e){var s=0;for(r=0;a>r;++r)t[r]o&&++s;e=new Int32Array(s)}for(r=0,n=0;a>r;){for(var l=0;t[r]===i||t[r]===o;)l+=t[r],++r;l+=t[r],++r,e[n]=l,++n}return e}function w(t,e,r){return f(x(t,d(r)),e,r)}function _(t,e,r){var n=x(t,d(r));return function(t,e,r){return f(b(t,d(r)),e,r)}(n,e,function(t){return a(Float32Array,t,4)}(n))}function k(t,e,r){return function(t,e){var r,n=e?127:32767,i=-n-1,o=t.length,a=0;for(r=0;o>r;++r)0===(c=t[r])?++a:c>0?(a+=Math.ceil(c/n),c%n==0&&(a+=1)):(a+=Math.ceil(c/i),c%i==0&&(a+=1));var s=e?new Int8Array(a):new Int16Array(a),l=0;for(r=0;o>r;++r){var c;if((c=t[r])>=0)for(;c>=n;)s[l]=n,++l,c-=n;else for(;i>=c;)s[l]=i,++l,c-=i;s[l]=c,++l}return s}(function(t,e,r){return y(m(t,e),r)}(t,e),r)}function A(t,e,r,n){var i=new ArrayBuffer(12+n.byteLength),o=new Uint8Array(i),a=new DataView(i);return a.setInt32(0,t),a.setInt32(4,e),r&&o.set(r,8),o.set(n,12),o}function T(t){return A(2,t.length,void 0,l(t))}function M(t){return A(4,t.length,void 0,p(t))}function S(t,e){return A(5,t.length/e,p([e]),l(t))}function C(t){return A(6,t.length,void 0,p(v(t)))}function E(t){return A(8,t.length,void 0,p(function(t){return v(y(t))}(t)))}function L(t,e){return A(9,t.length,p([e]),p(function(t,e){return v(m(t,e))}(t,e)))}function z(t,e){return A(10,t.length,p([e]),function(t,e){var r=t.length;e||(e=new Uint8Array(2*r));for(var n=s(e),i=0;r>i;++i)n.setInt16(2*i,t[i]);return l(e)}(k(t,e)))}function O(t){var e={};return N.forEach((function(r){void 0!==t[r]&&(e[r]=t[r])})),t.bondAtomList&&(e.bondAtomList=M(t.bondAtomList)),t.bondOrderList&&(e.bondOrderList=T(t.bondOrderList)),e.xCoordList=z(t.xCoordList,1e3),e.yCoordList=z(t.yCoordList,1e3),e.zCoordList=z(t.zCoordList,1e3),t.bFactorList&&(e.bFactorList=z(t.bFactorList,100)),t.atomIdList&&(e.atomIdList=E(t.atomIdList)),t.altLocList&&(e.altLocList=C(t.altLocList)),t.occupancyList&&(e.occupancyList=L(t.occupancyList,100)),e.groupIdList=E(t.groupIdList),e.groupTypeList=M(t.groupTypeList),t.secStructList&&(e.secStructList=T(t.secStructList)),t.insCodeList&&(e.insCodeList=C(t.insCodeList)),t.sequenceIndexList&&(e.sequenceIndexList=E(t.sequenceIndexList)),e.chainIdList=S(t.chainIdList,4),t.chainNameList&&(e.chainNameList=S(t.chainNameList,4)),e}function D(t){function e(t){for(var e={},r=0;t>r;r++)e[o()]=o();return e}function r(e){var r=t.subarray(a,a+e);return a+=e,r}function n(e){var r=t.subarray(a,a+e);a+=e;var n=65535;if(e>n){for(var i=[],o=0;or;r++)e[r]=o();return e}function o(){var o,l,c=t[a];if(!(128&c))return a++,c;if(128==(240&c))return a++,e(l=15&c);if(144==(240&c))return a++,i(l=15&c);if(160==(224&c))return a++,n(l=31&c);if(!(224&~c))return o=s.getInt8(a),a++,o;switch(c){case 192:return a++,null;case 194:return a++,!1;case 195:return a++,!0;case 196:return l=s.getUint8(a+1),a+=2,r(l);case 197:return l=s.getUint16(a+1),a+=3,r(l);case 198:return l=s.getUint32(a+1),a+=5,r(l);case 202:return o=s.getFloat32(a+1),a+=5,o;case 203:return o=s.getFloat64(a+1),a+=9,o;case 204:return o=t[a+1],a+=2,o;case 205:return o=s.getUint16(a+1),a+=3,o;case 206:return o=s.getUint32(a+1),a+=5,o;case 208:return o=s.getInt8(a+1),a+=2,o;case 209:return o=s.getInt16(a+1),a+=3,o;case 210:return o=s.getInt32(a+1),a+=5,o;case 217:return l=s.getUint8(a+1),a+=2,n(l);case 218:return l=s.getUint16(a+1),a+=3,n(l);case 219:return l=s.getUint32(a+1),a+=5,n(l);case 220:return l=s.getUint16(a+1),a+=3,i(l);case 221:return l=s.getUint32(a+1),a+=5,i(l);case 222:return l=s.getUint16(a+1),a+=3,e(l);case 223:return l=s.getUint32(a+1),a+=5,e(l)}throw new Error("Unknown type 0x"+c.toString(16))}var a=0,s=new DataView(t.buffer);return o()}function I(t,e,r,n){switch(t){case 1:return function(t,e){var r=t.length;e||(e=new Float32Array(r/4));for(var n=s(e),i=s(t),o=0,a=0,l=r/4;l>o;++o,a+=4)n.setFloat32(a,i.getFloat32(a),!0);return e}(e);case 2:return c(e);case 3:return u(e);case 4:return h(e);case 5:return l(e);case 6:return g(h(e),new Uint8Array(r));case 7:return g(h(e));case 8:return function(t,e){return b(g(t),e)}(h(e));case 9:return function(t,e,r){return f(g(t,d(r)),e,r)}(h(e),h(n)[0]);case 10:return _(u(e),h(n)[0]);case 11:return f(u(e),h(n)[0]);case 12:return w(u(e),h(n)[0]);case 13:return w(c(e),h(n)[0]);case 14:return x(u(e));case 15:return x(c(e))}}function F(t,e){var r=(e=e||{}).ignoreFields,n={};return B.forEach((function(e){var i=!!r&&-1!==r.indexOf(e),o=t[e];i||void 0===o||(o instanceof Uint8Array?n[e]=I.apply(null,function(t){var e=s(t),r=e.getInt32(0),n=e.getInt32(4),i=t.subarray(8,12);return[r,t=t.subarray(12),n,i]}(o)):n[e]=o)})),n}function R(t){return String.fromCharCode.apply(null,t).replace(/\0/g,"")}function P(t,e){return t instanceof ArrayBuffer&&(t=new Uint8Array(t)),F(t instanceof Uint8Array?D(t):t,e)}function j(t,e,r,n){var i=new XMLHttpRequest;i.addEventListener("load",(function(){try{var t=P(i.response);r(t)}catch(t){n(t)}}),!0),i.addEventListener("error",n,!0),i.responseType="arraybuffer",i.open("GET",e+t.toUpperCase()),i.send()}var N=["mmtfVersion","mmtfProducer","unitCell","spaceGroup","structureId","title","depositionDate","releaseDate","experimentalMethods","resolution","rFree","rWork","bioAssemblyList","ncsOperatorList","entityList","groupList","numBonds","numAtoms","numGroups","numChains","numModels","groupsPerChain","chainsPerModel"],B=N.concat(["xCoordList","yCoordList","zCoordList","groupIdList","groupTypeList","chainIdList","bFactorList","atomIdList","altLocList","occupancyList","secStructList","insCodeList","sequenceIndexList","chainNameList","bondAtomList","bondOrderList"]),U="//mmtf.rcsb.org/v1.0/",G=U+"full/",V=U+"reduced/";t.encode=function(t){return o(O(t))},t.decode=P,t.traverse=function(t,e,r){var n,i,o,a,s,l,c=(r=r||{}).firstModelOnly,d=e.onModel,u=e.onChain,h=e.onGroup,p=e.onAtom,f=e.onBond,m=0,g=0,v=0,b=0,y=0,x=-1,w=t.chainNameList,_=t.secStructList,k=t.insCodeList,A=t.sequenceIndexList,T=t.atomIdList,M=t.bFactorList,S=t.altLocList,C=t.occupancyList,E=t.bondAtomList,L=t.bondOrderList;for(n=0,i=t.chainsPerModel.length;i>n&&!(c&&m>0);++n){var z=t.chainsPerModel[m];for(d&&d({chainCount:z,modelIndex:m}),o=0;z>o;++o){var O=t.groupsPerChain[g];if(u){var D=R(t.chainIdList.subarray(4*g,4*g+4)),I=null;w&&(I=R(w.subarray(4*g,4*g+4))),u({groupCount:O,chainIndex:g,modelIndex:m,chainId:D,chainName:I})}for(a=0;O>a;++a){var F=t.groupList[t.groupTypeList[v]],P=F.atomNameList.length;if(h){var j=null;_&&(j=_[v]);var N=null;t.insCodeList&&(N=String.fromCharCode(k[v]));var B=null;A&&(B=A[v]),h({atomCount:P,groupIndex:v,chainIndex:g,modelIndex:m,groupId:t.groupIdList[v],groupType:t.groupTypeList[v],groupName:F.groupName,singleLetterCode:F.singleLetterCode,chemCompType:F.chemCompType,secStruct:j,insCode:N,sequenceIndex:B})}for(s=0;P>s;++s){if(p){var U=null;T&&(U=T[b]);var G=null;M&&(G=M[b]);var V=null;S&&(V=String.fromCharCode(S[b]));var H=null;C&&(H=C[b]),p({atomIndex:b,groupIndex:v,chainIndex:g,modelIndex:m,atomId:U,element:F.elementList[s],atomName:F.atomNameList[s],formalCharge:F.formalChargeList[s],xCoord:t.xCoordList[b],yCoord:t.yCoordList[b],zCoord:t.zCoordList[b],bFactor:G,altLoc:V,occupancy:H})}b+=1}if(f){var W=F.bondAtomList;for(s=0,l=F.bondOrderList.length;l>s;++s)f({atomIndex1:b-P+W[2*s],atomIndex2:b-P+W[2*s+1],bondOrder:F.bondOrderList[s]})}v+=1}g+=1}if(y=x+1,x=b-1,f&&E)for(s=0,l=E.length;l>s;s+=2){var q=E[s],Y=E[s+1];(q>=y&&x>=q||Y>=y&&x>=Y)&&f({atomIndex1:q,atomIndex2:Y,bondOrder:L?L[s/2]:null})}m+=1}},t.fetch=function(t,e,r){j(t,G,e,r)},t.fetchReduced=function(t,e,r){j(t,V,e,r)},t.version="v1.0.1",t.fetchUrl=G,t.fetchReducedUrl=V,t.encodeMsgpack=o,t.encodeMmtf=O,t.decodeMsgpack=D,t.decodeMmtf=F}(e)},"./node_modules/pako/dist/pako.esm.mjs":(t,e,r)=>{"use strict";function n(t){let e=t.length;for(;--e>=0;)t[e]=0}r.r(e),r.d(e,{Deflate:()=>_r,Inflate:()=>Mr,constants:()=>Lr,default:()=>zr,deflate:()=>kr,deflateRaw:()=>Ar,gzip:()=>Tr,inflate:()=>Sr,inflateRaw:()=>Cr,ungzip:()=>Er});const i=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),o=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),s=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=new Array(576);n(l);const c=new Array(60);n(c);const d=new Array(512);n(d);const u=new Array(256);n(u);const h=new Array(29);n(h);const p=new Array(30);function f(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}let m,g,v;function b(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}n(p);const y=t=>t<256?d[t]:d[256+(t>>>7)],x=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},w=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<{w(t,r[2*e],r[2*e+1])},k=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},A=(t,e,r)=>{const n=new Array(16);let i,o,a=0;for(i=1;i<=15;i++)a=a+r[i-1]<<1,n[i]=a;for(o=0;o<=e;o++){let e=t[2*o+1];0!==e&&(t[2*o]=k(n[e]++,e))}},T=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},M=t=>{t.bi_valid>8?x(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=(t,e,r,n)=>{const i=2*e,o=2*r;return t[i]{const n=t.heap[r];let i=r<<1;for(;i<=t.heap_len&&(i{let n,a,s,l,c=0;if(0!==t.sym_next)do{n=255&t.pending_buf[t.sym_buf+c++],n+=(255&t.pending_buf[t.sym_buf+c++])<<8,a=t.pending_buf[t.sym_buf+c++],0===n?_(t,a,e):(s=u[a],_(t,s+256+1,e),l=i[s],0!==l&&(a-=h[s],w(t,a,l)),n--,s=y(n),_(t,s,r),l=o[s],0!==l&&(n-=p[s],w(t,n,l)))}while(c{const r=e.dyn_tree,n=e.stat_desc.static_tree,i=e.stat_desc.has_stree,o=e.stat_desc.elems;let a,s,l,c=-1;for(t.heap_len=0,t.heap_max=573,a=0;a>1;a>=1;a--)C(t,r,a);l=o;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],C(t,r,1),s=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=s,r[2*l]=r[2*a]+r[2*s],t.depth[l]=(t.depth[a]>=t.depth[s]?t.depth[a]:t.depth[s])+1,r[2*a+1]=r[2*s+1]=l,t.heap[1]=l++,C(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,i=e.stat_desc.static_tree,o=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,l=e.stat_desc.max_length;let c,d,u,h,p,f,m=0;for(h=0;h<=15;h++)t.bl_count[h]=0;for(r[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<573;c++)d=t.heap[c],h=r[2*r[2*d+1]+1]+1,h>l&&(h=l,m++),r[2*d+1]=h,d>n||(t.bl_count[h]++,p=0,d>=s&&(p=a[d-s]),f=r[2*d],t.opt_len+=f*(h+p),o&&(t.static_len+=f*(i[2*d+1]+p)));if(0!==m){do{for(h=l-1;0===t.bl_count[h];)h--;t.bl_count[h]--,t.bl_count[h+1]+=2,t.bl_count[l]--,m-=2}while(m>0);for(h=l;0!==h;h--)for(d=t.bl_count[h];0!==d;)u=t.heap[--c],u>n||(r[2*u+1]!==h&&(t.opt_len+=(h-r[2*u+1])*r[2*u],r[2*u+1]=h),d--)}})(t,e),A(r,c,t.bl_count)},z=(t,e,r)=>{let n,i,o=-1,a=e[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++s{let n,i,o=-1,a=e[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),n=0;n<=r;n++)if(i=a,a=e[2*(n+1)+1],!(++s{w(t,0+(n?1:0),3),M(t),x(t,r),x(t,~r),r&&t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r};var F={_tr_init:t=>{D||((()=>{let t,e,r,n,s;const b=new Array(16);for(r=0,n=0;n<28;n++)for(h[n]=r,t=0;t<1<>=7;n<30;n++)for(p[n]=s<<7,t=0;t<1<{let i,o,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),L(t,t.l_desc),L(t,t.d_desc),a=(t=>{let e;for(z(t,t.dyn_ltree,t.l_desc.max_code),z(t,t.dyn_dtree,t.d_desc.max_code),L(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*s[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),i=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?I(t,e,r,n):4===t.strategy||o===i?(w(t,2+(n?1:0),3),E(t,l,c)):(w(t,4+(n?1:0),3),((t,e,r,n)=>{let i;for(w(t,e-257,5),w(t,r-1,5),w(t,n-4,4),i=0;i(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=r,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(u[r]+256+1)]++,t.dyn_dtree[2*y(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{w(t,2,3),_(t,256,l),(t=>{16===t.bi_valid?(x(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}},R=(t,e,r,n)=>{let i=65535&t,o=t>>>16&65535,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{i=i+e[n++]|0,o=o+i|0}while(--a);i%=65521,o%=65521}return i|o<<16};const P=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());var j=(t,e,r,n)=>{const i=P,o=n+r;t^=-1;for(let r=n;r>>8^i[255&(t^e[r])];return~t},N={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},B={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:U,_tr_stored_block:G,_tr_flush_block:V,_tr_tally:H,_tr_align:W}=F,{Z_NO_FLUSH:q,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:Z,Z_FINISH:$,Z_BLOCK:X,Z_OK:J,Z_STREAM_END:K,Z_STREAM_ERROR:Q,Z_DATA_ERROR:tt,Z_BUF_ERROR:et,Z_DEFAULT_COMPRESSION:rt,Z_FILTERED:nt,Z_HUFFMAN_ONLY:it,Z_RLE:ot,Z_FIXED:at,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:lt,Z_DEFLATED:ct}=B,dt=258,ut=262,ht=42,pt=113,ft=666,mt=(t,e)=>(t.msg=N[e],e),gt=t=>2*t-(t>4?9:0),vt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},bt=t=>{let e,r,n,i=t.w_size;e=t.hash_size,n=e;do{r=t.head[--n],t.head[n]=r>=i?r-i:0}while(--e);e=i,n=e;do{r=t.prev[--n],t.prev[n]=r>=i?r-i:0}while(--e)};let yt=(t,e,r)=>(e<{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},wt=(t,e)=>{V(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,xt(t.strm)},_t=(t,e)=>{t.pending_buf[t.pending++]=e},kt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},At=(t,e,r,n)=>{let i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),r),1===t.state.wrap?t.adler=R(t.adler,e,i,r):2===t.state.wrap&&(t.adler=j(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)},Tt=(t,e)=>{let r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match;const l=t.strstart>t.w_size-ut?t.strstart-(t.w_size-ut):0,c=t.window,d=t.w_mask,u=t.prev,h=t.strstart+dt;let p=c[o+a-1],f=c[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(r=e,c[r+a]===f&&c[r+a-1]===p&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&oa){if(t.match_start=e,a=n,n>=s)break;p=c[o+a-1],f=c[o+a]}}}while((e=u[e&d])>l&&0!=--i);return a<=t.lookahead?a:t.lookahead},Mt=t=>{const e=t.w_size;let r,n,i;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-ut)&&(t.window.set(t.window.subarray(e,e+e-n),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),bt(t),n+=e),0===t.strm.avail_in)break;if(r=At(t.strm,t.window,t.strstart+t.lookahead,n),t.lookahead+=r,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=yt(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=yt(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead{let r,n,i,o=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,a=0,s=t.strm.avail_in;do{if(r=65535,i=t.bi_valid+42>>3,t.strm.avail_outn+t.strm.avail_in&&(r=n+t.strm.avail_in),r>i&&(r=i),r>8,t.pending_buf[t.pending-2]=~r,t.pending_buf[t.pending-1]=~r>>8,xt(t.strm),n&&(n>r&&(n=r),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,r-=n),r&&(At(t.strm,t.strm.output,t.strm.next_out,r),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r)}while(0===a);return s-=t.strm.avail_in,s&&(s>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=s&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-s,t.strm.next_in),t.strstart),t.strstart+=s,t.insert+=s>t.w_size-t.insert?t.w_size-t.insert:s),t.block_start=t.strstart),t.high_wateri&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,i+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),i>t.strm.avail_in&&(i=t.strm.avail_in),i&&(At(t.strm,t.window,t.strstart,i),t.strstart+=i,t.insert+=i>t.w_size-t.insert?t.w_size-t.insert:i),t.high_water>3,i=t.pending_buf_size-i>65535?65535:t.pending_buf_size-i,o=i>t.w_size?t.w_size:i,n=t.strstart-t.block_start,(n>=o||(n||e===$)&&e!==q&&0===t.strm.avail_in&&n<=i)&&(r=n>i?i:n,a=e===$&&0===t.strm.avail_in&&r===n?1:0,G(t,t.block_start,r,a),t.block_start+=r,xt(t.strm)),a?3:1)},Ct=(t,e)=>{let r,n;for(;;){if(t.lookahead=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-ut&&(t.match_length=Tt(t,r)),t.match_length>=3)if(n=H(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=yt(t,t.ins_h,t.window[t.strstart+1]);else n=H(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(wt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===$?(wt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(wt(t,!1),0===t.strm.avail_out)?1:2},Et=(t,e)=>{let r,n,i;for(;;){if(t.lookahead=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=H(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(wt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=H(t,0,t.window[t.strstart-1]),n&&wt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=H(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===$?(wt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(wt(t,!1),0===t.strm.avail_out)?1:2};function Lt(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}const zt=[new Lt(0,0,0,0,St),new Lt(4,4,8,4,Ct),new Lt(4,5,16,8,Ct),new Lt(4,6,32,32,Ct),new Lt(4,4,16,16,Et),new Lt(8,16,32,32,Et),new Lt(8,16,128,128,Et),new Lt(8,32,128,256,Et),new Lt(32,128,258,1024,Et),new Lt(32,258,258,4096,Et)];function Ot(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ct,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),vt(this.dyn_ltree),vt(this.dyn_dtree),vt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),vt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),vt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Dt=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==ht&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==pt&&e.status!==ft?1:0},It=t=>{if(Dt(t))return mt(t,Q);t.total_in=t.total_out=0,t.data_type=lt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?ht:pt,t.adler=2===e.wrap?0:1,e.last_flush=-2,U(e),J},Ft=t=>{const e=It(t);var r;return e===J&&((r=t.state).window_size=2*r.w_size,vt(r.head),r.max_lazy_match=zt[r.level].max_lazy,r.good_match=zt[r.level].good_length,r.nice_match=zt[r.level].nice_length,r.max_chain_length=zt[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),e},Rt=(t,e,r,n,i,o)=>{if(!t)return Q;let a=1;if(e===rt&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>9||r!==ct||n<8||n>15||e<0||e>9||o<0||o>at||8===n&&1!==a)return mt(t,Q);8===n&&(n=9);const s=new Ot;return t.state=s,s.strm=t,s.status=ht,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<Dt(t)||2!==t.state.wrap?Q:(t.state.gzhead=e,J),Nt=(t,e)=>{if(Dt(t)||e>X||e<0)return t?mt(t,Q):Q;const r=t.state;if(!t.output||0!==t.avail_in&&!t.input||r.status===ft&&e!==$)return mt(t,0===t.avail_out?et:Q);const n=r.last_flush;if(r.last_flush=e,0!==r.pending){if(xt(t),0===t.avail_out)return r.last_flush=-1,J}else if(0===t.avail_in&>(e)<=gt(n)&&e!==$)return mt(t,et);if(r.status===ft&&0!==t.avail_in)return mt(t,et);if(r.status===ht&&0===r.wrap&&(r.status=pt),r.status===ht){let e=ct+(r.w_bits-8<<4)<<8,n=-1;if(n=r.strategy>=it||r.level<2?0:r.level<6?1:6===r.level?2:3,e|=n<<6,0!==r.strstart&&(e|=32),e+=31-e%31,kt(r,e),0!==r.strstart&&(kt(r,t.adler>>>16),kt(r,65535&t.adler)),t.adler=1,r.status=pt,xt(t),0!==r.pending)return r.last_flush=-1,J}if(57===r.status)if(t.adler=0,_t(r,31),_t(r,139),_t(r,8),r.gzhead)_t(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),_t(r,255&r.gzhead.time),_t(r,r.gzhead.time>>8&255),_t(r,r.gzhead.time>>16&255),_t(r,r.gzhead.time>>24&255),_t(r,9===r.level?2:r.strategy>=it||r.level<2?4:0),_t(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(_t(r,255&r.gzhead.extra.length),_t(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=j(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(_t(r,0),_t(r,0),_t(r,0),_t(r,0),_t(r,0),_t(r,9===r.level?2:r.strategy>=it||r.level<2?4:0),_t(r,3),r.status=pt,xt(t),0!==r.pending)return r.last_flush=-1,J;if(69===r.status){if(r.gzhead.extra){let e=r.pending,n=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+n>r.pending_buf_size;){let i=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+i),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>e&&(t.adler=j(t.adler,r.pending_buf,r.pending-e,e)),r.gzindex+=i,xt(t),0!==r.pending)return r.last_flush=-1,J;e=0,n-=i}let i=new Uint8Array(r.gzhead.extra);r.pending_buf.set(i.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending+=n,r.gzhead.hcrc&&r.pending>e&&(t.adler=j(t.adler,r.pending_buf,r.pending-e,e)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let e,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(t.adler=j(t.adler,r.pending_buf,r.pending-n,n)),xt(t),0!==r.pending)return r.last_flush=-1,J;n=0}e=r.gzindexn&&(t.adler=j(t.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let e,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(t.adler=j(t.adler,r.pending_buf,r.pending-n,n)),xt(t),0!==r.pending)return r.last_flush=-1,J;n=0}e=r.gzindexn&&(t.adler=j(t.adler,r.pending_buf,r.pending-n,n))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(xt(t),0!==r.pending))return r.last_flush=-1,J;_t(r,255&t.adler),_t(r,t.adler>>8&255),t.adler=0}if(r.status=pt,xt(t),0!==r.pending)return r.last_flush=-1,J}if(0!==t.avail_in||0!==r.lookahead||e!==q&&r.status!==ft){let n=0===r.level?St(r,e):r.strategy===it?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(Mt(t),0===t.lookahead)){if(e===q)return 1;break}if(t.match_length=0,r=H(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(wt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===$?(wt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(wt(t,!1),0===t.strm.avail_out)?1:2})(r,e):r.strategy===ot?((t,e)=>{let r,n,i,o;const a=t.window;for(;;){if(t.lookahead<=dt){if(Mt(t),t.lookahead<=dt&&e===q)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=t.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=t.strstart+dt;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=H(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=H(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(wt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===$?(wt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(wt(t,!1),0===t.strm.avail_out)?1:2})(r,e):zt[r.level].func(r,e);if(3!==n&&4!==n||(r.status=ft),1===n||3===n)return 0===t.avail_out&&(r.last_flush=-1),J;if(2===n&&(e===Y?W(r):e!==X&&(G(r,0,0,!1),e===Z&&(vt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),xt(t),0===t.avail_out))return r.last_flush=-1,J}return e!==$?J:r.wrap<=0?K:(2===r.wrap?(_t(r,255&t.adler),_t(r,t.adler>>8&255),_t(r,t.adler>>16&255),_t(r,t.adler>>24&255),_t(r,255&t.total_in),_t(r,t.total_in>>8&255),_t(r,t.total_in>>16&255),_t(r,t.total_in>>24&255)):(kt(r,t.adler>>>16),kt(r,65535&t.adler)),xt(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?J:K)},Bt=t=>{if(Dt(t))return Q;const e=t.state.status;return t.state=null,e===pt?mt(t,tt):J},Ut=(t,e)=>{let r=e.length;if(Dt(t))return Q;const n=t.state,i=n.wrap;if(2===i||1===i&&n.status!==ht||n.lookahead)return Q;if(1===i&&(t.adler=R(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===i&&(vt(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const o=t.avail_in,a=t.next_in,s=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,Mt(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,Mt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=a,t.input=s,t.avail_in=o,n.wrap=i,J};const Gt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Vt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const e in r)Gt(r,e)&&(t[e]=r[e])}}return t},Ht=t=>{let e=0;for(let r=0,n=t.length;r=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;qt[254]=qt[254]=1;var Yt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,i,o,a=t.length,s=0;for(i=0;i>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e},Zt=(t,e)=>{const r=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let n,i;const o=new Array(2*r);for(i=0,n=0;n4)o[i++]=65533,n+=a-1;else{for(e&=2===a?31:3===a?15:7;a>1&&n1?o[i++]=65533:e<65536?o[i++]=e:(e-=65536,o[i++]=55296|e>>10&1023,o[i++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Wt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let n=0;n{(e=e||t.length)>t.length&&(e=t.length);let r=e-1;for(;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+qt[t[r]]>e?r:e},Xt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Jt=Object.prototype.toString,{Z_NO_FLUSH:Kt,Z_SYNC_FLUSH:Qt,Z_FULL_FLUSH:te,Z_FINISH:ee,Z_OK:re,Z_STREAM_END:ne,Z_DEFAULT_COMPRESSION:ie,Z_DEFAULT_STRATEGY:oe,Z_DEFLATED:ae}=B;function se(t){this.options=Vt({level:ie,method:ae,chunkSize:16384,windowBits:15,memLevel:8,strategy:oe},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Xt,this.strm.avail_out=0;let r=Pt(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==re)throw new Error(N[r]);if(e.header&&jt(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Yt(e.dictionary):"[object ArrayBuffer]"===Jt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=Ut(this.strm,t),r!==re)throw new Error(N[r]);this._dict_set=!0}}function le(t,e){const r=new se(e);if(r.push(t,!0),r.err)throw r.msg||N[r.err];return r.result}se.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize;let i,o;if(this.ended)return!1;for(o=e===~~e?e:!0===e?ee:Kt,"string"==typeof t?r.input=Yt(t):"[object ArrayBuffer]"===Jt.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(o===Qt||o===te)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(i=Nt(r,o),i===ne)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),i=Bt(this.strm),this.onEnd(i),this.ended=!0,i===re;if(0!==r.avail_out){if(o>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},se.prototype.onData=function(t){this.chunks.push(t)},se.prototype.onEnd=function(t){t===re&&(this.result=Ht(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var ce={Deflate:se,deflate:le,deflateRaw:function(t,e){return(e=e||{}).raw=!0,le(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,le(t,e)},constants:B};const de=16209;var ue=function(t,e){let r,n,i,o,a,s,l,c,d,u,h,p,f,m,g,v,b,y,x,w,_,k,A,T;const M=t.state;r=t.next_in,A=t.input,n=r+(t.avail_in-5),i=t.next_out,T=t.output,o=i-(e-t.avail_out),a=i+(t.avail_out-257),s=M.dmax,l=M.wsize,c=M.whave,d=M.wnext,u=M.window,h=M.hold,p=M.bits,f=M.lencode,m=M.distcode,g=(1<>>24,h>>>=y,p-=y,y=b>>>16&255,0===y)T[i++]=65535&b;else{if(!(16&y)){if(64&y){if(32&y){M.mode=16191;break t}t.msg="invalid literal/length code",M.mode=de;break t}b=f[(65535&b)+(h&(1<>>=y,p-=y),p<15&&(h+=A[r++]<>>24,h>>>=y,p-=y,y=b>>>16&255,16&y){if(w=65535&b,y&=15,ps){t.msg="invalid distance too far back",M.mode=de;break t}if(h>>>=y,p-=y,y=i-o,w>y){if(y=w-y,y>c&&M.sane){t.msg="invalid distance too far back",M.mode=de;break t}if(_=0,k=u,0===d){if(_+=l-y,y2;)T[i++]=k[_++],T[i++]=k[_++],T[i++]=k[_++],x-=3;x&&(T[i++]=k[_++],x>1&&(T[i++]=k[_++]))}else{_=i-w;do{T[i++]=T[_++],T[i++]=T[_++],T[i++]=T[_++],x-=3}while(x>2);x&&(T[i++]=T[_++],x>1&&(T[i++]=T[_++]))}break}if(64&y){t.msg="invalid distance code",M.mode=de;break t}b=m[(65535&b)+(h&(1<>3,r-=x,p-=x<<3,h&=(1<{const l=s.bits;let c,d,u,h,p,f,m=0,g=0,v=0,b=0,y=0,x=0,w=0,_=0,k=0,A=0,T=null;const M=new Uint16Array(16),S=new Uint16Array(16);let C,E,L,z=null;for(m=0;m<=15;m++)M[m]=0;for(g=0;g=1&&0===M[b];b--);if(y>b&&(y=b),0===b)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(v=1;v0&&(0===t||1!==b))return-1;for(S[1]=0,m=1;m<15;m++)S[m+1]=S[m]+M[m];for(g=0;g852||2===t&&k>592)return 1;for(;;){C=m-w,a[g]+1=f?(E=z[a[g]-f],L=T[a[g]-f]):(E=96,L=0),c=1<>w)+d]=C<<24|E<<16|L}while(0!==d);for(c=1<>=1;if(0!==c?(A&=c-1,A+=c):A=0,g++,0==--M[m]){if(m===b)break;m=e[r+a[g]]}if(m>y&&(A&h)!==u){for(0===w&&(w=y),p+=v,x=m-w,_=1<852||2===t&&k>592)return 1;u=A&h,i[u]=y<<24|x<<16|p-o}}return 0!==A&&(i[p+A]=m-w<<24|64<<16),s.bits=y,0};const{Z_FINISH:ve,Z_BLOCK:be,Z_TREES:ye,Z_OK:xe,Z_STREAM_END:we,Z_NEED_DICT:_e,Z_STREAM_ERROR:ke,Z_DATA_ERROR:Ae,Z_MEM_ERROR:Te,Z_BUF_ERROR:Me,Z_DEFLATED:Se}=B,Ce=16180,Ee=16190,Le=16191,ze=16192,Oe=16194,De=16199,Ie=16200,Fe=16206,Re=16209,Pe=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function je(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Ne=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode16211?1:0},Be=t=>{if(Ne(t))return ke;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=Ce,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,xe},Ue=t=>{if(Ne(t))return ke;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Be(t)},Ge=(t,e)=>{let r;if(Ne(t))return ke;const n=t.state;return e<0?(r=0,e=-e):(r=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?ke:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,Ue(t))},Ve=(t,e)=>{if(!t)return ke;const r=new je;t.state=r,r.strm=t,r.window=null,r.mode=Ce;const n=Ge(t,e);return n!==xe&&(t.state=null),n};let He,We,qe=!0;const Ye=t=>{if(qe){He=new Int32Array(512),We=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ge(1,t.lens,0,288,He,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ge(2,t.lens,0,32,We,0,t.work,{bits:5}),qe=!1}t.lencode=He,t.lenbits=9,t.distcode=We,t.distbits=5},Ze=(t,e,r,n)=>{let i;const o=t.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(e.subarray(r-o.wsize,r),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),o.window.set(e.subarray(r-n,r-n+i),o.wnext),(n-=i)?(o.window.set(e.subarray(r-n,r),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave{let r,n,i,o,a,s,l,c,d,u,h,p,f,m,g,v,b,y,x,w,_,k,A=0;const T=new Uint8Array(4);let M,S;const C=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ne(t)||!t.output||!t.input&&0!==t.avail_in)return ke;r=t.state,r.mode===Le&&(r.mode=ze),a=t.next_out,i=t.output,l=t.avail_out,o=t.next_in,n=t.input,s=t.avail_in,c=r.hold,d=r.bits,u=s,h=l,k=xe;t:for(;;)switch(r.mode){case Ce:if(0===r.wrap){r.mode=ze;break}for(;d<16;){if(0===s)break t;s--,c+=n[o++]<>>8&255,r.check=j(r.check,T,2,0),c=0,d=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=Re;break}if((15&c)!==Se){t.msg="unknown compression method",r.mode=Re;break}if(c>>>=4,d-=4,_=8+(15&c),0===r.wbits&&(r.wbits=_),_>15||_>r.wbits){t.msg="invalid window size",r.mode=Re;break}r.dmax=1<>8&1),512&r.flags&&4&r.wrap&&(T[0]=255&c,T[1]=c>>>8&255,r.check=j(r.check,T,2,0)),c=0,d=0,r.mode=16182;case 16182:for(;d<32;){if(0===s)break t;s--,c+=n[o++]<>>8&255,T[2]=c>>>16&255,T[3]=c>>>24&255,r.check=j(r.check,T,4,0)),c=0,d=0,r.mode=16183;case 16183:for(;d<16;){if(0===s)break t;s--,c+=n[o++]<>8),512&r.flags&&4&r.wrap&&(T[0]=255&c,T[1]=c>>>8&255,r.check=j(r.check,T,2,0)),c=0,d=0,r.mode=16184;case 16184:if(1024&r.flags){for(;d<16;){if(0===s)break t;s--,c+=n[o++]<>>8&255,r.check=j(r.check,T,2,0)),c=0,d=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(p=r.length,p>s&&(p=s),p&&(r.head&&(_=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(o,o+p),_)),512&r.flags&&4&r.wrap&&(r.check=j(r.check,n,p,o)),s-=p,o+=p,r.length-=p),r.length))break t;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===s)break t;p=0;do{_=n[o+p++],r.head&&_&&r.length<65536&&(r.head.name+=String.fromCharCode(_))}while(_&&p>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=Le;break;case 16189:for(;d<32;){if(0===s)break t;s--,c+=n[o++]<>>=7&d,d-=7&d,r.mode=Fe;break}for(;d<3;){if(0===s)break t;s--,c+=n[o++]<>>=1,d-=1,3&c){case 0:r.mode=16193;break;case 1:if(Ye(r),r.mode=De,e===ye){c>>>=2,d-=2;break t}break;case 2:r.mode=16196;break;case 3:t.msg="invalid block type",r.mode=Re}c>>>=2,d-=2;break;case 16193:for(c>>>=7&d,d-=7&d;d<32;){if(0===s)break t;s--,c+=n[o++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=Re;break}if(r.length=65535&c,c=0,d=0,r.mode=Oe,e===ye)break t;case Oe:r.mode=16195;case 16195:if(p=r.length,p){if(p>s&&(p=s),p>l&&(p=l),0===p)break t;i.set(n.subarray(o,o+p),a),s-=p,o+=p,l-=p,a+=p,r.length-=p;break}r.mode=Le;break;case 16196:for(;d<14;){if(0===s)break t;s--,c+=n[o++]<>>=5,d-=5,r.ndist=1+(31&c),c>>>=5,d-=5,r.ncode=4+(15&c),c>>>=4,d-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=Re;break}r.have=0,r.mode=16197;case 16197:for(;r.have>>=3,d-=3}for(;r.have<19;)r.lens[C[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},k=ge(0,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,k){t.msg="invalid code lengths set",r.mode=Re;break}r.have=0,r.mode=16198;case 16198:for(;r.have>>24,v=A>>>16&255,b=65535&A,!(g<=d);){if(0===s)break t;s--,c+=n[o++]<>>=g,d-=g,r.lens[r.have++]=b;else{if(16===b){for(S=g+2;d>>=g,d-=g,0===r.have){t.msg="invalid bit length repeat",r.mode=Re;break}_=r.lens[r.have-1],p=3+(3&c),c>>>=2,d-=2}else if(17===b){for(S=g+3;d>>=g,d-=g,_=0,p=3+(7&c),c>>>=3,d-=3}else{for(S=g+7;d>>=g,d-=g,_=0,p=11+(127&c),c>>>=7,d-=7}if(r.have+p>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=Re;break}for(;p--;)r.lens[r.have++]=_}}if(r.mode===Re)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=Re;break}if(r.lenbits=9,M={bits:r.lenbits},k=ge(1,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,k){t.msg="invalid literal/lengths set",r.mode=Re;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},k=ge(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,k){t.msg="invalid distances set",r.mode=Re;break}if(r.mode=De,e===ye)break t;case De:r.mode=Ie;case Ie:if(s>=6&&l>=258){t.next_out=a,t.avail_out=l,t.next_in=o,t.avail_in=s,r.hold=c,r.bits=d,ue(t,h),a=t.next_out,i=t.output,l=t.avail_out,o=t.next_in,n=t.input,s=t.avail_in,c=r.hold,d=r.bits,r.mode===Le&&(r.back=-1);break}for(r.back=0;A=r.lencode[c&(1<>>24,v=A>>>16&255,b=65535&A,!(g<=d);){if(0===s)break t;s--,c+=n[o++]<>y)],g=A>>>24,v=A>>>16&255,b=65535&A,!(y+g<=d);){if(0===s)break t;s--,c+=n[o++]<>>=y,d-=y,r.back+=y}if(c>>>=g,d-=g,r.back+=g,r.length=b,0===v){r.mode=16205;break}if(32&v){r.back=-1,r.mode=Le;break}if(64&v){t.msg="invalid literal/length code",r.mode=Re;break}r.extra=15&v,r.mode=16201;case 16201:if(r.extra){for(S=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;A=r.distcode[c&(1<>>24,v=A>>>16&255,b=65535&A,!(g<=d);){if(0===s)break t;s--,c+=n[o++]<>y)],g=A>>>24,v=A>>>16&255,b=65535&A,!(y+g<=d);){if(0===s)break t;s--,c+=n[o++]<>>=y,d-=y,r.back+=y}if(c>>>=g,d-=g,r.back+=g,64&v){t.msg="invalid distance code",r.mode=Re;break}r.offset=b,r.extra=15&v,r.mode=16203;case 16203:if(r.extra){for(S=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=Re;break}r.mode=16204;case 16204:if(0===l)break t;if(p=h-l,r.offset>p){if(p=r.offset-p,p>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=Re;break}p>r.wnext?(p-=r.wnext,f=r.wsize-p):f=r.wnext-p,p>r.length&&(p=r.length),m=r.window}else m=i,f=a-r.offset,p=r.length;p>l&&(p=l),l-=p,r.length-=p;do{i[a++]=m[f++]}while(--p);0===r.length&&(r.mode=Ie);break;case 16205:if(0===l)break t;i[a++]=r.length,l--,r.mode=Ie;break;case Fe:if(r.wrap){for(;d<32;){if(0===s)break t;s--,c|=n[o++]<{if(Ne(t))return ke;let e=t.state;return e.window&&(e.window=null),t.state=null,xe},Qe=(t,e)=>{if(Ne(t))return ke;const r=t.state;return 2&r.wrap?(r.head=e,e.done=!1,xe):ke},tr=(t,e)=>{const r=e.length;let n,i,o;return Ne(t)?ke:(n=t.state,0!==n.wrap&&n.mode!==Ee?ke:n.mode===Ee&&(i=1,i=R(i,e,r,0),i!==n.check)?Ae:(o=Ze(t,e,r,r),o?(n.mode=16210,Te):(n.havedict=1,xe)))},er=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const rr=Object.prototype.toString,{Z_NO_FLUSH:nr,Z_FINISH:ir,Z_OK:or,Z_STREAM_END:ar,Z_NEED_DICT:sr,Z_STREAM_ERROR:lr,Z_DATA_ERROR:cr,Z_MEM_ERROR:dr}=B;function ur(t){this.options=Vt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Xt,this.strm.avail_out=0;let r=Xe(this.strm,e.windowBits);if(r!==or)throw new Error(N[r]);if(this.header=new er,Qe(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Yt(e.dictionary):"[object ArrayBuffer]"===rr.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=tr(this.strm,e.dictionary),r!==or)))throw new Error(N[r])}function hr(t,e){const r=new ur(e);if(r.push(t),r.err)throw r.msg||N[r.err];return r.result}ur.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize,i=this.options.dictionary;let o,a,s;if(this.ended)return!1;for(a=e===~~e?e:!0===e?ir:nr,"[object ArrayBuffer]"===rr.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),o=Je(r,a),o===sr&&i&&(o=tr(r,i),o===or?o=Je(r,a):o===cr&&(o=sr));r.avail_in>0&&o===ar&&r.state.wrap>0&&0!==t[r.next_in];)$e(r),o=Je(r,a);switch(o){case lr:case cr:case sr:case dr:return this.onEnd(o),this.ended=!0,!1}if(s=r.avail_out,r.next_out&&(0===r.avail_out||o===ar))if("string"===this.options.to){let t=$t(r.output,r.next_out),e=r.next_out-t,i=Zt(r.output,t);r.next_out=e,r.avail_out=n-e,e&&r.output.set(r.output.subarray(t,t+e),0),this.onData(i)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(o!==or||0!==s){if(o===ar)return o=Ke(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},ur.prototype.onData=function(t){this.chunks.push(t)},ur.prototype.onEnd=function(t){t===or&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ht(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var pr={Inflate:ur,inflate:hr,inflateRaw:function(t,e){return(e=e||{}).raw=!0,hr(t,e)},ungzip:hr,constants:B};const{Deflate:fr,deflate:mr,deflateRaw:gr,gzip:vr}=ce,{Inflate:br,inflate:yr,inflateRaw:xr,ungzip:wr}=pr;var _r=fr,kr=mr,Ar=gr,Tr=vr,Mr=br,Sr=yr,Cr=xr,Er=wr,Lr=B,zr={Deflate:fr,deflate:mr,deflateRaw:gr,gzip:vr,Inflate:br,inflate:yr,inflateRaw:xr,ungzip:wr,constants:B}}},__webpack_module_cache__={};function __nested_webpack_require_1675243__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__nested_webpack_require_1675243__),r.exports}__nested_webpack_require_1675243__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __nested_webpack_require_1675243__.d(e,{a:e}),e},__nested_webpack_require_1675243__.d=(t,e)=>{for(var r in e)__nested_webpack_require_1675243__.o(e,r)&&!__nested_webpack_require_1675243__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},__nested_webpack_require_1675243__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__nested_webpack_require_1675243__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__nested_webpack_require_1675243__("./src/index.ts"),__nested_webpack_require_1675243__("./src/SurfaceWorker.js");var __nested_webpack_exports__=__nested_webpack_require_1675243__("./src/exporter.js");return __nested_webpack_exports__})(),module.exports=factory()},27941:(t,e,r)=>{var n,i;(function(){var o={version:"3.8.2"},a=[].slice,s=function(t){return a.call(t)},l=self.document;function c(t){return t&&(t.ownerDocument||t.document||t).documentElement}function d(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(l)try{s(l.documentElement.childNodes)[0].nodeType}catch(t){s=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var u=this.Element.prototype,h=u.setAttribute,p=u.setAttributeNS,f=this.CSSStyleDeclaration.prototype,m=f.setProperty;u.setAttribute=function(t,e){h.call(this,t,e+"")},u.setAttributeNS=function(t,e,r){p.call(this,t,e,r+"")},f.setProperty=function(t,e,r){m.call(this,t,e+"",r)}}function g(t,e){return te?1:t>=e?0:NaN}function v(t){return null===t?NaN:+t}function b(t){return!isNaN(t)}function y(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[o],r)<0?n=o+1:i=o}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[o],r)>0?i=o:n=o+1}return n}}}o.ascending=g,o.descending=function(t,e){return et?1:e>=t?0:NaN},o.min=function(t,e){var r,n,i=-1,o=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},o.max=function(t,e){var r,n,i=-1,o=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},o.extent=function(t,e){var r,n,i,o=-1,a=t.length;if(1===arguments.length){for(;++o=n){r=i=n;break}for(;++on&&(r=n),i=n){r=i=n;break}for(;++on&&(r=n),i1)return a/(l-1)},o.deviation=function(){var t=o.variance.apply(this,arguments);return t?Math.sqrt(t):t};var x=y(g);function w(t){return t.length}o.bisectLeft=x.left,o.bisect=o.bisectRight=x.right,o.bisector=function(t){return y(1===t.length?function(e,r){return g(t(e),r)}:t)},o.shuffle=function(t,e,r){(o=arguments.length)<3&&(r=t.length,o<2&&(e=0));for(var n,i,o=r-e;o;)i=Math.random()*o--|0,n=t[o+e],t[o+e]=t[i+e],t[i+e]=n;return t},o.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},o.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e=0;)for(e=(n=t[i]).length;--e>=0;)r[--a]=n[e];return r};var _=Math.abs;function k(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function A(){this._=Object.create(null)}function T(t){return"__proto__"==(t+="")||"\0"===t[0]?"\0"+t:t}function M(t){return"\0"===(t+="")[0]?t.slice(1):t}function S(t){return T(t)in this._}function C(t){return(t=T(t))in this._&&delete this._[t]}function E(){var t=[];for(var e in this._)t.push(M(e));return t}function L(){var t=0;for(var e in this._)++t;return t}function z(){for(var t in this._)return!1;return!0}function O(){this._=Object.create(null)}function D(t){return t}function I(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function F(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=R.length;re;)i.push(n/o);else for(;(n=t+r*++a)=n.length)return e?e.call(r,o):t?o.sort(t):o;for(var l,c,d,u,h=-1,p=o.length,f=n[s++],m=new A;++h=n.length)return t;var r=[],o=i[e++];return t.forEach((function(t,n){r.push({key:t,values:s(n,e)})})),o?r.sort((function(t,e){return o(t.key,e.key)})):r}return r.map=function(t,e){return a(e,t,0)},r.entries=function(t){return s(a(o.map,t,0),0)},r.key=function(t){return n.push(t),r},r.sortKeys=function(t){return i[n.length-1]=t,r},r.sortValues=function(e){return t=e,r},r.rollup=function(t){return e=t,r},r},o.set=function(t){var e=new O;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},o.event=null,o.requote=function(t){return t.replace(V,"\\$&")};var V=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,H={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function W(t){return H(t,$),t}var q=function(t,e){return e.querySelector(t)},Y=function(t,e){return e.querySelectorAll(t)},Z=function(t,e){var r=t.matches||t[F(t,"matchesSelector")];return Z=function(t,e){return r.call(t,e)},Z(t,e)};"function"==typeof Sizzle&&(q=function(t,e){return Sizzle(t,e)[0]||null},Y=Sizzle,Z=Sizzle.matchesSelector),o.selection=function(){return o.select(l.documentElement)};var $=o.selection.prototype=[];function X(t){return"function"==typeof t?t:function(){return q(t,this)}}function J(t){return"function"==typeof t?t:function(){return Y(t,this)}}$.select=function(t){var e,r,n,i,o=[];t=X(t);for(var a=-1,s=this.length;++a=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),Q.hasOwnProperty(r)?{space:Q[r],local:t}:t}},$.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node();return(t=o.ns.qualify(t)).local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(tt(e,t[e]));return this}return this.each(tt(t,e))},$.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=nt(t)).length,i=-1;if(e=r.classList){for(;++i=0;)(r=n[i])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this},$.sort=function(t){t=ht.apply(this,arguments);for(var e=-1,r=this.length;++e0&&(t=t.slice(0,i));var l=vt.get(t);function c(){var e=this[n];e&&(this.removeEventListener(t,e,e.$),delete this[n])}return l&&(t=l,a=yt),i?e?function(){var i=a(e,s(arguments));c.call(this),this.addEventListener(t,this[n]=i,i.$=r),i._=e}:c:e?P:function(){var e,r=new RegExp("^__on([^.]+)"+o.requote(t)+"$");for(var n in this)if(e=n.match(r)){var i=this[n];this.removeEventListener(e[1],i,i.$),delete this[n]}}}o.selection.enter=ft,o.selection.enter.prototype=mt,mt.append=$.append,mt.empty=$.empty,mt.node=$.node,mt.call=$.call,mt.size=$.size,mt.select=function(t){for(var e,r,n,i,o,a=[],s=-1,l=this.length;++s=n&&(n=e+1);!(a=s[n])&&++n1?zt:t<-1?-zt:Math.asin(t)}function Ft(t){return((t=Math.exp(t))+1/t)/2}var Rt=Math.SQRT2;o.interpolateZoom=function(t,e){var r,n,i=t[0],o=t[1],a=t[2],s=e[0],l=e[1],c=e[2],d=s-i,u=l-o,h=d*d+u*u;if(h0&&(t=t.transition().duration(m)),t.call(_.event)}function S(){s&&s.domain(a.range().map((function(t){return(t-h.x)/h.k})).map(a.invert)),u&&u.domain(c.range().map((function(t){return(t-h.y)/h.k})).map(c.invert))}function C(t){g++||t({type:"zoomstart"})}function E(t){S(),t({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function L(t){--g||(t({type:"zoomend"}),e=null)}function z(){var t=this,e=w.of(t,arguments),r=0,n=o.select(d(t)).on(b,(function(){r=1,T(o.mouse(t),i),E(e)})).on(y,(function(){n.on(b,null).on(y,null),a(r),L(e)})),i=k(o.mouse(t)),a=_t(t);Zi.call(t),C(e)}function O(){var t,e=this,r=w.of(e,arguments),n={},a=0,s=".zoom-"+o.event.changedTouches[0].identifier,l="touchmove"+s,c="touchend"+s,d=[],u=o.select(e),p=_t(e);function f(){var r=o.touches(e);return t=h.k,r.forEach((function(t){t.identifier in n&&(n[t.identifier]=k(t))})),r}function m(){var t=o.event.target;o.select(t).on(l,g).on(c,b),d.push(t);for(var r=o.event.changedTouches,s=0,u=r.length;s1){v=p[0];var y=p[1],x=v[0]-y[0],w=v[1]-y[1];a=x*x+w*w}}function g(){var s,l,c,d,u=o.touches(e);Zi.call(e);for(var h=0,p=u.length;h360?t-=360:t<0&&(t+=360),t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)||e<0?0:e>1?1:e,n=2*(r=r<0?0:r>1?1:r)-(i=r<=.5?r*(1+e):r+e-r*e),new ne(o(t+120),o(t),o(t-120))}function Ht(t,e,r){return this instanceof Ht?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof Ht?new Ht(t.h,t.c,t.l):function(t,e,r){return t>0?new Ht(Math.atan2(r,e)*Dt,Math.sqrt(e*e+r*r),t):new Ht(NaN,NaN,t)}(t instanceof Yt?t.l:(t=de((t=o.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Ht(t,e,r)}Gt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ut(this.h,this.s,this.l/t)},Gt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ut(this.h,this.s,t*this.l)},Gt.rgb=function(){return Vt(this.h,this.s,this.l)},o.hcl=Ht;var Wt=Ht.prototype=new Bt;function qt(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new Yt(r,Math.cos(t*=Ot)*e,Math.sin(t)*e)}function Yt(t,e,r){return this instanceof Yt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof Yt?new Yt(t.l,t.a,t.b):t instanceof Ht?qt(t.h,t.c,t.l):de((t=ne(t)).r,t.g,t.b):new Yt(t,e,r)}Wt.brighter=function(t){return new Ht(this.h,this.c,Math.min(100,this.l+Zt*(arguments.length?t:1)))},Wt.darker=function(t){return new Ht(this.h,this.c,Math.max(0,this.l-Zt*(arguments.length?t:1)))},Wt.rgb=function(){return qt(this.h,this.c,this.l).rgb()},o.lab=Yt;var Zt=18,$t=.95047,Xt=1,Jt=1.08883,Kt=Yt.prototype=new Bt;function Qt(t,e,r){var n=(t+16)/116,i=n+e/500,o=n-r/200;return new ne(re(3.2404542*(i=te(i)*$t)-1.5371385*(n=te(n)*Xt)-.4985314*(o=te(o)*Jt)),re(-.969266*i+1.8760108*n+.041556*o),re(.0556434*i-.2040259*n+1.0572252*o))}function te(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ee(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function re(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ne(t,e,r){return this instanceof ne?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof ne?new ne(t.r,t.g,t.b):le(""+t,ne,Vt):new ne(t,e,r)}function ie(t){return new ne(t>>16,t>>8&255,255&t)}function oe(t){return ie(t)+""}Kt.brighter=function(t){return new Yt(Math.min(100,this.l+Zt*(arguments.length?t:1)),this.a,this.b)},Kt.darker=function(t){return new Yt(Math.max(0,this.l-Zt*(arguments.length?t:1)),this.a,this.b)},Kt.rgb=function(){return Qt(this.l,this.a,this.b)},o.rgb=ne;var ae=ne.prototype=new Bt;function se(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function le(t,e,r){var n,i,o,a=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(he(i[0]),he(i[1]),he(i[2]))}return(o=pe.get(t))?e(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,l=15&o,l|=l<<4):7===t.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),e(a,s,l))}function ce(t,e,r){var n,i,o=Math.min(t/=255,e/=255,r/=255),a=Math.max(t,e,r),s=a-o,l=(a+o)/2;return s?(i=l<.5?s/(a+o):s/(2-a-o),n=t==a?(e-r)/s+(e0&&l<1?0:n),new Ut(n,i,l)}function de(t,e,r){var n=ee((.4124564*(t=ue(t))+.3575761*(e=ue(e))+.1804375*(r=ue(r)))/$t),i=ee((.2126729*t+.7151522*e+.072175*r)/Xt);return Yt(116*i-16,500*(n-i),200*(i-ee((.0193339*t+.119192*e+.9503041*r)/Jt)))}function ue(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function he(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}ae.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b,i=30;return e||r||n?(e&&e=200&&e<300||304===e){try{t=r.call(i,c)}catch(t){return void a.error.call(i,t)}a.load.call(i,t)}else a.error.call(i,c)}return self.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(t)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(t){var e=o.event;o.event=t;try{a.progress.call(i,c)}finally{o.event=e}},i.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",i)},i.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",i):e},i.responseType=function(t){return arguments.length?(d=t,i):d},i.response=function(t){return r=t,i},["get","post"].forEach((function(t){i[t]=function(){return i.send.apply(i,[t].concat(s(arguments)))}})),i.send=function(r,n,o){if(2===arguments.length&&"function"==typeof n&&(o=n,n=null),c.open(r,t,!0),null==e||"accept"in l||(l.accept=e+",*/*"),c.setRequestHeader)for(var s in l)c.setRequestHeader(s,l[s]);return null!=e&&c.overrideMimeType&&c.overrideMimeType(e),null!=d&&(c.responseType=d),null!=o&&i.on("error",o).on("load",(function(t){o(null,t)})),a.beforesend.call(i,c),c.send(null==n?null:n),i},i.abort=function(){return c.abort(),i},o.rebind(i,a,"on"),null==n?i:i.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(n))}pe.forEach((function(t,e){pe.set(t,ie(e))})),o.functor=fe,o.xhr=me(D),o.dsv=function(t,e){var r=new RegExp('["'+t+"\n]"),n=t.charCodeAt(0);function i(t,r,n){arguments.length<3&&(n=r,r=null);var i=ge(t,e,null==r?o:a(r),n);return i.row=function(t){return arguments.length?i.response(null==(r=t)?o:a(t)):r},i}function o(t){return i.parse(t.responseText)}function a(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return r.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return i.parse=function(t,e){var r;return i.parseRows(t,(function(t,n){if(r)return r(t,n-1);var i=function(e){for(var r={},n=t.length,i=0;i=l)return a;if(i)return i=!1,o;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++24?(isFinite(e)&&(clearTimeout(xe),xe=setTimeout(ke,e)),ye=0):(ye=1,we(ke))}function Ae(){for(var t=Date.now(),e=ve;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Te(){for(var t,e=ve,r=1/0;e;)e.c?(e.t1&&(e=t[o[a-2]],r=t[o[a-1]],n=t[s],(r[0]-e[0])*(n[1]-e[1])-(r[1]-e[1])*(n[0]-e[0])<=0);)--a;o[a++]=s}return o.slice(0,a)}function Ee(t,e){return t[0]-e[0]||t[1]-e[1]}o.timer=function(){_e.apply(this,arguments)},o.timer.flush=function(){Ae(),Te()},o.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)},o.geom={},o.geom.hull=function(t){var e=Me,r=Se;if(arguments.length)return n(t);function n(t){if(t.length<3)return[];var n,i=fe(e),o=fe(r),a=t.length,s=[],l=[];for(n=0;n=0;--n)p.push(t[s[c[n]][2]]);for(n=+u;nMt)s=s.L;else{if(!((i=o-Ye(s,a))>Mt)){n>-Mt?(e=s.P,r=s):i>-Mt?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=Ge(t);if(Re.insert(e,l),e||r){if(e===r)return Ke(e),r=Ge(e.site),Re.insert(l,r),l.edge=r.edge=er(e.site,l.site),Je(e),void Je(r);if(r){Ke(e),Ke(r);var c=e.site,d=c.x,u=c.y,h=t.x-d,p=t.y-u,f=r.site,m=f.x-d,g=f.y-u,v=2*(h*g-p*m),b=h*h+p*p,y=m*m+g*g,x={x:(g*b-p*y)/v+d,y:(h*y-m*b)/v+u};rr(r.edge,c,f,x),l.edge=er(c,t,null,x),r.edge=er(t,f,null,x),Je(e),Je(r)}else l.edge=er(e.site,l.site)}}function qe(t,e){var r=t.site,n=r.x,i=r.y,o=i-e;if(!o)return n;var a=t.P;if(!a)return-1/0;var s=(r=a.site).x,l=r.y,c=l-e;if(!c)return s;var d=s-n,u=1/o-1/c,h=d/c;return u?(-h+Math.sqrt(h*h-2*u*(d*d/(-2*c)-l+c/2+i-o/2)))/u+n:(n+s)/2}function Ye(t,e){var r=t.N;if(r)return qe(r,e);var n=t.site;return n.y===e?n.x:1/0}function Ze(t){this.site=t,this.edges=[]}function $e(t,e){return e.angle-t.angle}function Xe(){or(this),this.x=this.y=this.arc=this.site=this.cy=null}function Je(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,i=t.site,o=r.site;if(n!==o){var a=i.x,s=i.y,l=n.x-a,c=n.y-s,d=o.x-a,u=2*(l*(g=o.y-s)-c*d);if(!(u>=-St)){var h=l*l+c*c,p=d*d+g*g,f=(g*h-c*p)/u,m=(l*p-d*h)/u,g=m+s,v=Be.pop()||new Xe;v.arc=t,v.site=i,v.x=f+a,v.y=g+Math.sqrt(f*f+m*m),v.cy=g,t.circle=v;for(var b=null,y=je._;y;)if(v.y=s)return;if(h>f){if(o){if(o.y>=c)return}else o={x:g,y:l};r={x:g,y:c}}else{if(o){if(o.y1)if(h>f){if(o){if(o.y>=c)return}else o={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(o){if(o.y=s)return}else o={x:a,y:n*a+i};r={x:s,y:n*s+i}}else{if(o){if(o.x0)){if(e/=h,h<0){if(e0){if(e>u)return;e>d&&(d=e)}if(e=i-l,h||!(e<0)){if(e/=h,h<0){if(e>u)return;e>d&&(d=e)}else if(h>0){if(e0)){if(e/=p,p<0){if(e0){if(e>u)return;e>d&&(d=e)}if(e=o-c,p||!(e<0)){if(e/=p,p<0){if(e>u)return;e>d&&(d=e)}else if(p>0){if(e0&&(t.a={x:l+d*h,y:c+d*p}),u<1&&(t.b={x:l+u*h,y:c+u*p}),t}}}}}),l=a.length;l--;)(!Qe(e=a[l],t)||!s(e)||_(e.a.x-e.b.x)Mt||_(i-r)>Mt)&&(s.splice(a,0,new nr((v=o.site,b=d,y=_(n-u)Mt?{x:u,y:_(e-u)Mt?{x:_(r-f)Mt?{x:h,y:_(e-h)Mt?{x:_(r-p)=r&&c.x<=i&&c.y>=n&&c.y<=a?[[r,a],[i,a],[i,n],[r,n]]:[]).point=t[s]})),e}function s(t){return t.map((function(t,e){return{x:Math.round(n(t,e)/Mt)*Mt,y:Math.round(i(t,e)/Mt)*Mt,i:e}}))}return a.links=function(t){return cr(s(t)).edges.filter((function(t){return t.l&&t.r})).map((function(e){return{source:t[e.l.i],target:t[e.r.i]}}))},a.triangles=function(t){var e=[];return cr(s(t)).cells.forEach((function(r,n){for(var i,o,a,s,l=r.site,c=r.edges.sort($e),d=-1,u=c.length,h=c[u-1].edge,p=h.l===l?h.r:h.l;++do&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:vr(r,n)})),o=xr.lastIndex;return om&&(m=l.x),l.y>g&&(g=l.y),c.push(l.x),d.push(l.y);else for(u=0;um&&(m=y),x>g&&(g=x),c.push(y),d.push(x)}var w=m-p,k=g-f;function A(t,e,r,n,i,o,a,s){if(!isNaN(r)&&!isNaN(n))if(t.leaf){var l=t.x,c=t.y;if(null!=l)if(_(l-r)+_(c-n)<.01)T(t,e,r,n,i,o,a,s);else{var d=t.point;t.x=t.y=t.point=null,T(t,d,l,c,i,o,a,s),T(t,e,r,n,i,o,a,s)}else t.x=r,t.y=n,t.point=e}else T(t,e,r,n,i,o,a,s)}function T(t,e,r,n,i,o,a,s){var l=.5*(i+a),c=.5*(o+s),d=r>=l,u=n>=c,h=u<<1|d;t.leaf=!1,d?i=l:a=l,u?o=c:s=c,A(t=t.nodes[h]||(t.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null}),e,r,n,i,o,a,s)}w>k?g=f+w:m=p+k;var M={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){A(M,t,+v(t,++u),+b(t,u),p,f,m,g)}};if(M.visit=function(t){fr(t,M,p,f,m,g)},M.find=function(t){return function(t,e,r,n,i,o,a){var s,l=1/0;return function t(c,d,u,h,p){if(!(d>o||u>a||h=w)<<1|e>=x,k=_+4;_=0&&!(r=o.interpolators[n](t,e)););return r}function _r(t,e){var r,n=[],i=[],o=t.length,a=e.length,s=Math.min(t.length,e.length);for(r=0;r=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function zr(t){return 1-Math.cos(t*zt)}function Or(t){return Math.pow(2,10*(t-1))}function Dr(t){return 1-Math.sqrt(1-t*t)}function Ir(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Fr(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function Rr(t){var e,r,n,i=[t.a,t.b],o=[t.c,t.d],a=jr(i),s=Pr(i,o),l=jr(((e=o)[0]+=(n=-s)*(r=i)[0],e[1]+=n*r[1],e))||0;i[0]*o[1]=0?t.slice(0,r):t,i=r>=0?t.slice(r+1):"in";return n=Ar.get(n)||kr,i=Tr.get(i)||D,e=i(n.apply(null,a.call(arguments,1))),function(t){return t<=0?0:t>=1?1:e(t)}},o.interpolateHcl=function(t,e){t=o.hcl(t),e=o.hcl(e);var r=t.h,n=t.c,i=t.l,a=e.h-r,s=e.c-n,l=e.l-i;return isNaN(s)&&(s=0,n=isNaN(n)?e.c:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return qt(r+a*t,n+s*t,i+l*t)+""}},o.interpolateHsl=function(t,e){t=o.hsl(t),e=o.hsl(e);var r=t.h,n=t.s,i=t.l,a=e.h-r,s=e.s-n,l=e.l-i;return isNaN(s)&&(s=0,n=isNaN(n)?e.s:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return Vt(r+a*t,n+s*t,i+l*t)+""}},o.interpolateLab=function(t,e){t=o.lab(t),e=o.lab(e);var r=t.l,n=t.a,i=t.b,a=e.l-r,s=e.a-n,l=e.b-i;return function(t){return Qt(r+a*t,n+s*t,i+l*t)+""}},o.interpolateRound=Fr,o.transform=function(t){var e=l.createElementNS(o.ns.prefix.svg,"g");return(o.transform=function(t){if(null!=t){e.setAttribute("transform",t);var r=e.transform.baseVal.consolidate()}return new Rr(r?r.matrix:Nr)})(t)},Rr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Nr={a:1,b:0,c:0,d:1,e:0,f:0};function Br(t){return t.length?t.pop()+",":""}function Ur(t,e){var r=[],n=[];return t=o.transform(t),e=o.transform(e),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push("translate(",null,",",null,")");n.push({i:i-4,x:vr(t[0],e[0])},{i:i-2,x:vr(t[1],e[1])})}else(e[0]||e[1])&&r.push("translate("+e+")")}(t.translate,e.translate,r,n),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(Br(r)+"rotate(",null,")")-2,x:vr(t,e)})):e&&r.push(Br(r)+"rotate("+e+")")}(t.rotate,e.rotate,r,n),function(t,e,r,n){t!==e?n.push({i:r.push(Br(r)+"skewX(",null,")")-2,x:vr(t,e)}):e&&r.push(Br(r)+"skewX("+e+")")}(t.skew,e.skew,r,n),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(Br(r)+"scale(",null,",",null,")");n.push({i:i-4,x:vr(t[0],e[0])},{i:i-2,x:vr(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(Br(r)+"scale("+e+")")}(t.scale,e.scale,r,n),t=e=null,function(t){for(var e,i=-1,o=n.length;++i0?r=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:r=0})):e>0&&(l.start({type:"start",alpha:r=e}),t=_e(s.tick)),s):r},s.start=function(){var t,e,r,o=v.length,l=b.length,d=c[0],f=c[1];for(t=0;t=0;)r.push(i[n])}function rn(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(o=t.children)&&(i=o.length))for(var i,o,a=-1;++a=0;)a.push(d=c[l]),d.parent=o,d.depth=o.depth+1;r&&(o.value=0),o.children=c}else r&&(o.value=+r.call(n,o,o.depth)||0),delete o.children;return rn(i,(function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)})),s}return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(en(t,(function(t){t.children&&(t.value=0)})),rn(t,(function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)}))),t},n},o.layout.partition=function(){var t=o.layout.hierarchy(),e=[1,1];function r(t,e,n,i){var o=t.children;if(t.x=e,t.y=t.depth*i,t.dx=n,t.dy=i,o&&(a=o.length)){var a,s,l,c=-1;for(n=t.value?n/t.value:0;++cs&&(s=n),a.push(n)}for(r=0;ri&&(n=r,i=e);return n}function vn(t){return t.reduce(bn,0)}function bn(t,e){return t+e[1]}function yn(t,e){return xn(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function xn(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,o=[];++r<=e;)o[r]=i*r+n;return o}function wn(t){return[o.min(t),o.max(t)]}function _n(t,e){return t.value-e.value}function kn(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function An(t,e){t._pack_next=e,e._pack_prev=t}function Tn(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function Mn(t){if((e=t.children)&&(l=e.length)){var e,r,n,i,o,a,s,l,c=1/0,d=-1/0,u=1/0,h=-1/0;if(e.forEach(Sn),(r=e[0]).x=-r.r,r.y=0,y(r),l>1&&((n=e[1]).x=n.r,n.y=0,y(n),l>2))for(Ln(r,n,i=e[2]),y(i),kn(r,i),r._pack_prev=i,kn(i,n),n=r._pack_next,o=3;o0)for(a=-1;++a=u[0]&&l<=u[1]&&((s=c[o.bisect(h,l,1,f)-1]).y+=m,s.push(i[a]));return c}return i.value=function(t){return arguments.length?(e=t,i):e},i.range=function(t){return arguments.length?(r=fe(t),i):r},i.bins=function(t){return arguments.length?(n="number"==typeof t?function(e){return xn(e,t)}:fe(t),i):n},i.frequency=function(e){return arguments.length?(t=!!e,i):t},i},o.layout.pack=function(){var t,e=o.layout.hierarchy().sort(_n),r=0,n=[1,1];function i(i,o){var a=e.call(this,i,o),s=a[0],l=n[0],c=n[1],d=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,rn(s,(function(t){t.r=+d(t.value)})),rn(s,Mn),r){var u=r*(t?1:Math.max(2*s.r/l,2*s.r/c))/2;rn(s,(function(t){t.r+=u})),rn(s,Mn),rn(s,(function(t){t.r-=u}))}return En(s,l/2,c/2,t?1:1/Math.max(2*s.r/l,2*s.r/c)),a}return i.size=function(t){return arguments.length?(n=t,i):n},i.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,i):t},i.padding=function(t){return arguments.length?(r=+t,i):r},tn(i,e)},o.layout.tree=function(){var t=o.layout.hierarchy().sort(null).value(null),e=zn,r=[1,1],n=null;function i(i,o){var c=t.call(this,i,o),d=c[0],u=function(t){for(var e,r={A:null,children:[t]},n=[r];null!=(e=n.pop());)for(var i,o=e.children,a=0,s=o.length;ap.x&&(p=t),t.depth>f.depth&&(f=t)}));var m=e(h,p)/2-h.x,g=r[0]/(p.x+e(p,h)/2+m),v=r[1]/(f.depth||1);en(d,(function(t){t.x=(t.x+m)*g,t.y=t.depth*v}))}return c}function a(t){var r=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(r.length){!function(t){for(var e,r=0,n=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var o=(r[0].z+r[r.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,r,n){if(r){for(var i,o=t,a=t,s=r,l=o.parent.children[0],c=o.m,d=a.m,u=s.m,h=l.m;s=Dn(s),o=On(o),s&&o;)l=On(l),(a=Dn(a)).a=t,(i=s.z+u-o.z-c+e(s._,o._))>0&&(In(Fn(s,t,n),t,i),c+=i,d+=i),u+=s.m,c+=o.m,h+=l.m,d+=a.m;s&&!Dn(a)&&(a.t=s,a.m+=u-d),o&&!On(l)&&(l.t=o,l.m+=c-h,n=t)}return n}(t,i,t.parent.A||n[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=r[0],t.y=t.depth*r[1]}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(n=null==(r=t)?l:null,i):n?null:r},i.nodeSize=function(t){return arguments.length?(n=null==(r=t)?null:l,i):n?r:null},tn(i,t)},o.layout.cluster=function(){var t=o.layout.hierarchy().sort(null).value(null),e=zn,r=[1,1],n=!1;function i(i,a){var s,l=t.call(this,i,a),c=l[0],d=0;rn(c,(function(t){var r=t.children;r&&r.length?(t.x=function(t){return t.reduce((function(t,e){return t+e.x}),0)/t.length}(r),t.y=function(t){return 1+o.max(t,(function(t){return t.y}))}(r)):(t.x=s?d+=e(t,s):0,t.y=0,s=t)}));var u=Rn(c),h=Pn(c),p=u.x-e(u,h)/2,f=h.x+e(h,u)/2;return rn(c,n?function(t){t.x=(t.x-c.x)*r[0],t.y=(c.y-t.y)*r[1]}:function(t){t.x=(t.x-p)/(f-p)*r[0],t.y=(1-(c.y?t.y/c.y:1))*r[1]}),l}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(n=null==(r=t),i):n?null:r},i.nodeSize=function(t){return arguments.length?(n=null!=(r=t),i):n?r:null},tn(i,t)},o.layout.treemap=function(){var t,e=o.layout.hierarchy(),r=Math.round,n=[1,1],i=null,a=jn,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function d(t,e){for(var r,n,i=-1,o=t.length;++i0;)s.push(r=c[i-1]),s.area+=r.area,"squarify"!==l||(n=p(s,m))<=h?(c.pop(),h=n):(s.area-=s.pop().area,f(s,m,o,!1),m=Math.min(o.dx,o.dy),s.length=s.area=0,h=1/0);s.length&&(f(s,m,o,!0),s.length=s.area=0),e.forEach(u)}}function h(t){var e=t.children;if(e&&e.length){var r,n=a(t),i=e.slice(),o=[];for(d(i,n.dx*n.dy/t.value),o.area=0;r=i.pop();)o.push(r),o.area+=r.area,null!=r.z&&(f(o,r.z?n.dx:n.dy,n,!i.length),o.length=o.area=0);e.forEach(h)}}function p(t,e){for(var r,n=t.area,i=0,o=1/0,a=-1,s=t.length;++ai&&(i=r));return e*=e,(n*=n)?Math.max(e*i*c/n,n/(e*o*c)):1/0}function f(t,e,n,i){var o,a=-1,s=t.length,l=n.x,c=n.y,d=e?r(t.area/e):0;if(e==n.dx){for((i||d>n.dy)&&(d=n.dy);++an.dx)&&(d=n.dx);++a1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=o.random.normal.apply(o,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=o.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,r=0;r2?qn:Gn,l=n?Vr:Gr;return i=a(t,e,l,r),o=a(e,t,l,wr),s}function s(t){return i(t)}return s.invert=function(t){return o(t)},s.domain=function(e){return arguments.length?(t=e.map(Number),a()):t},s.range=function(t){return arguments.length?(e=t,a()):e},s.rangeRound=function(t){return s.range(t).interpolate(Fr)},s.clamp=function(t){return arguments.length?(n=t,a()):n},s.interpolate=function(t){return arguments.length?(r=t,a()):r},s.ticks=function(e){return Jn(t,e)},s.tickFormat=function(e,r){return d3_scale_linearTickFormat(t,e,r)},s.nice=function(e){return $n(t,e),a()},s.copy=function(){return Yn(t,e,r,n)},a()}function Zn(t,e){return o.rebind(t,e,"range","rangeRound","interpolate","clamp")}function $n(t,e){return Vn(t,Hn(Xn(t,e)[2])),Vn(t,Hn(Xn(t,e)[2])),t}function Xn(t,e){null==e&&(e=10);var r=Bn(t),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),o=e/n*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function Jn(t,e){return o.range.apply(o,Xn(t,e))}function Kn(t,e,r,n){function i(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function o(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function a(e){return t(i(e))}return a.invert=function(e){return o(t.invert(e))},a.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((n=e.map(Number)).map(i)),a):n},a.base=function(r){return arguments.length?(e=+r,t.domain(n.map(i)),a):e},a.nice=function(){var e=Vn(n.map(i),r?Math:Qn);return t.domain(e),n=e.map(o),a},a.ticks=function(){var t=Bn(n),a=[],s=t[0],l=t[1],c=Math.floor(i(s)),d=Math.ceil(i(l)),u=e%1?2:e;if(isFinite(d-c)){if(r){for(;c0;h--)a.push(o(c)*h);for(c=0;a[c]l;d--);a=a.slice(c,d)}return a},a.copy=function(){return Kn(t.copy(),e,r,n)},Zn(a,t)}o.scale.linear=function(){return Yn([0,1],[0,1],wr,!1)},o.scale.log=function(){return Kn(o.scale.linear().domain([0,1]),10,!0,[1,10])};var Qn={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function ti(t,e,r){var n=ei(e),i=ei(1/e);function o(e){return t(n(e))}return o.invert=function(e){return i(t.invert(e))},o.domain=function(e){return arguments.length?(t.domain((r=e.map(Number)).map(n)),o):r},o.ticks=function(t){return Jn(r,t)},o.tickFormat=function(t,e){return d3_scale_linearTickFormat(r,t,e)},o.nice=function(t){return o.domain($n(r,t))},o.exponent=function(a){return arguments.length?(n=ei(e=a),i=ei(1/e),t.domain(r.map(n)),o):e},o.copy=function(){return ti(t.copy(),e,r)},Zn(o,t)}function ei(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function ri(t,e){var r,n,i;function a(i){return n[((r.get(i)||("range"===e.t?r.set(i,t.push(i)):NaN))-1)%n.length]}function s(e,r){return o.range(t.length).map((function(t){return e+r*t}))}return a.domain=function(n){if(!arguments.length)return t;t=[],r=new A;for(var i,o=-1,s=n.length;++o0?r[n-1]:t[0],nu?0:1;if(c=Lt)return l(c,p)+(s?l(s,1-p):"")+"Z";var f,m,g,v,b,y,x,w,_,k,A,T,M=0,S=0,C=[];if((v=(+a.apply(this,arguments)||0)/2)&&(g=n===hi?Math.sqrt(s*s+c*c):+n.apply(this,arguments),p||(S*=-1),c&&(S=It(g/c*Math.sin(v))),s&&(M=It(g/s*Math.sin(v)))),c){b=c*Math.cos(d+S),y=c*Math.sin(d+S),x=c*Math.cos(u-S),w=c*Math.sin(u-S);var E=Math.abs(u-d-2*S)<=Ct?0:1;if(S&&bi(b,y,x,w)===p^E){var L=(d+u)/2;b=c*Math.cos(L),y=c*Math.sin(L),x=w=null}}else b=y=0;if(s){_=s*Math.cos(u-M),k=s*Math.sin(u-M),A=s*Math.cos(d+M),T=s*Math.sin(d+M);var z=Math.abs(d-u+2*M)<=Ct?0:1;if(M&&bi(_,k,A,T)===1-p^z){var O=(d+u)/2;_=s*Math.cos(O),k=s*Math.sin(O),A=T=null}}else _=k=0;if(h>Mt&&(f=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){m=s0?0:1}function yi(t,e,r,n,i){var o=t[0]-e[0],a=t[1]-e[1],s=(i?n:-n)/Math.sqrt(o*o+a*a),l=s*a,c=-s*o,d=t[0]+l,u=t[1]+c,h=e[0]+l,p=e[1]+c,f=(d+h)/2,m=(u+p)/2,g=h-d,v=p-u,b=g*g+v*v,y=r-n,x=d*p-h*u,w=(v<0?-1:1)*Math.sqrt(Math.max(0,y*y*b-x*x)),_=(x*v-g*w)/b,k=(-x*g-v*w)/b,A=(x*v+g*w)/b,T=(-x*g+v*w)/b,M=_-f,S=k-m,C=A-f,E=T-m;return M*M+S*S>C*C+E*E&&(_=A,k=T),[[_-l,k-c],[_*r/y,k*r/y]]}function xi(){return!0}function wi(t){var e=Me,r=Se,n=xi,i=ki,o=i.key,a=.7;function s(o){var s,l=[],c=[],d=-1,u=o.length,h=fe(e),p=fe(r);function f(){l.push("M",i(t(c),a))}for(;++d1&&i.push("H",n[0]),i.join("")},"step-before":Ti,"step-after":Mi,basis:Ei,"basis-open":function(t){if(t.length<4)return ki(t);for(var e,r=[],n=-1,i=t.length,o=[0],a=[0];++n<3;)e=t[n],o.push(e[0]),a.push(e[1]);for(r.push(Li(Di,o)+","+Li(Di,a)),--n;++n9&&(i=3*e/Math.sqrt(i),a[s]=i*r,a[s+1]=i*n);for(s=-1;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}(t))}});function ki(t){return t.length>1?t.join("L"):t+"Z"}function Ai(t){return t.join("L")+"Z"}function Ti(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1){s=e[1],o=t[l],l++,n+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var c=2;cCt)+",1 "+e}function l(t,e,r,n){return"Q 0,0 "+n}return o.radius=function(t){return arguments.length?(r=fe(t),o):r},o.source=function(e){return arguments.length?(t=fe(e),o):t},o.target=function(t){return arguments.length?(e=fe(t),o):e},o.startAngle=function(t){return arguments.length?(n=fe(t),o):n},o.endAngle=function(t){return arguments.length?(i=fe(t),o):i},o},o.svg.diagonal=function(){var t=ji,e=Ni,r=Ui;function n(n,i){var o=t.call(this,n,i),a=e.call(this,n,i),s=(o.y+a.y)/2,l=[o,{x:o.x,y:s},{x:a.x,y:s},a];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(e){return arguments.length?(t=fe(e),n):t},n.target=function(t){return arguments.length?(e=fe(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},o.svg.diagonal.radial=function(){var t=o.svg.diagonal(),e=Ui,r=t.projection;return t.projection=function(t){return arguments.length?r(function(t){return function(){var e=t.apply(this,arguments),r=e[0],n=e[1]-zt;return[r*Math.cos(n),r*Math.sin(n)]}}(e=t)):e},t},o.svg.symbol=function(){var t=Vi,e=Gi;function r(r,n){return(Wi.get(t.call(this,r,n))||Hi)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=fe(e),r):t},r.size=function(t){return arguments.length?(e=fe(t),r):e},r};var Wi=o.map({circle:Hi,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Yi)),r=e*Yi;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/qi),r=e*qi/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/qi),r=e*qi/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});o.svg.symbolTypes=Wi.keys();var qi=Math.sqrt(3),Yi=Math.tan(30*Ot);$.transition=function(t){for(var e,r,n=Ji||++to,i=no(t),o=[],a=Ki||{time:Date.now(),ease:Lr,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--h].call(t,a);if(o>=1)return u.event&&u.event.end.call(t,t.__data__,e),--d.count?delete d[n]:delete t[r],1}u||(o=i.time,a=_e((function(t){var e=u.delay;if(a.t=e+o,e<=t)return h(t-e);a.c=h}),0,o),u=d[n]={tween:new A,time:o,timer:a,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++d.count)}Qi.call=$.call,Qi.empty=$.empty,Qi.node=$.node,Qi.size=$.size,o.transition=function(t,e){return t&&t.transition?Ji?t.transition(e):t:o.selection().transition(t)},o.transition.prototype=Qi,Qi.select=function(t){var e,r,n,i=this.id,o=this.namespace,a=[];t=X(t);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",a[1]-a[0])}function m(t){t.select(".extent").attr("y",s[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function g(){var u,g,v=this,b=o.select(o.event.target),y=r.of(v,arguments),x=o.select(v),w=b.datum(),_=!/^(n|s)$/.test(w)&&n,k=!/^(e|w)$/.test(w)&&i,A=b.classed("extent"),T=_t(v),M=o.mouse(v),S=o.select(d(v)).on("keydown.brush",(function(){32==o.event.keyCode&&(A||(u=null,M[0]-=a[1],M[1]-=s[1],A=2),B())})).on("keyup.brush",(function(){32==o.event.keyCode&&2==A&&(M[0]+=a[1],M[1]+=s[1],A=0,B())}));if(o.event.changedTouches?S.on("touchmove.brush",L).on("touchend.brush",O):S.on("mousemove.brush",L).on("mouseup.brush",O),x.interrupt().selectAll("*").interrupt(),A)M[0]=a[0]-M[0],M[1]=s[0]-M[1];else if(w){var C=+/w$/.test(w),E=+/^n/.test(w);g=[a[1-C]-M[0],s[1-E]-M[1]],M[0]=a[C],M[1]=s[E]}else o.event.altKey&&(u=M.slice());function L(){var t=o.mouse(v),e=!1;g&&(t[0]+=g[0],t[1]+=g[1]),A||(o.event.altKey?(u||(u=[(a[0]+a[1])/2,(s[0]+s[1])/2]),M[0]=a[+(t[0]{"use strict";t.exports=r(48777)},48777:(t,e,r)=>{"use strict";var n=r(72478),i=r(90897),o=r(94698),a=r(25359),s=r(9994),l=r(7999),c=r(97e3),d=r(23754),u=r(22366),h=r(54387);function p(t,e){for(var r=e[0],n=e[1],o=1/(e[2]-r),a=1/(e[3]-n),s=new Array(t.length),l=0,c=t.length/2;l>>1;e.dtype||(e.dtype="array"),"string"==typeof e.dtype?f=new(u(e.dtype))(g):e.dtype&&(f=e.dtype,Array.isArray(f)&&(f.length=g));for(var v=0;vr||s>1073741824){for(var h=0;hr+i||M>n+i||S=L||a===s)){var l=b[o];void 0===s&&(s=l.length);for(var c=a;c=g&&u<=_&&h>=v&&h<=k&&z.push(d)}var p=y[o],f=p[4*a+0],m=p[4*a+1],x=p[4*a+2],w=p[4*a+3],A=function(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}(p,a+1),C=.5*i,O=o+1;e(r,n,C,O,f,m||x||w||A),e(r,n+C,C,O,m,x||w||A),e(r+C,n,C,O,x,w||A),e(r+C,n+C,C,O,w,A)}}(0,0,1,0,0,1),z},f;function C(t,e,r){for(var n=1,i=.5,o=.5,a=.5,s=0;s{t.exports=function(t){var e=0,r=0,n=0,i=0;return t.map((function(t){var o=(t=t.slice())[0],a=o.toUpperCase();if(o!=a)switch(t[0]=a,o){case"a":t[6]+=n,t[7]+=i;break;case"v":t[1]+=i;break;case"h":t[1]+=n;break;default:for(var s=1;s{"use strict";t.exports=function(t,e){if(!t||null==t.length)throw Error("Argument should be an array");e=null==e?1:Math.floor(e);for(var r=Array(2*e),n=0;ni&&(i=t[a]),t[a]{"use strict";t.exports=function(t,e,r){if("function"==typeof Array.prototype.findIndex)return t.findIndex(e,r);if("function"!=typeof e)throw new TypeError("predicate must be a function");var n=Object(t),i=n.length;if(0===i)return-1;for(var o=0;o{"use strict";var n=r(25359);t.exports=function(t,e,r){if(!t||null==t.length)throw Error("Argument should be an array");null==e&&(e=1),null==r&&(r=n(t,e));for(var i=0;i{"use strict";var n=r(39807);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){for(var r=0;r1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i{"use strict";var n=r(39807);function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;et.length)&&(r=t.length),t.substring(r-e.length,r)===e}var y="",x="",w="",_="",k={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function A(t){var e=Object.keys(t),r=Object.create(Object.getPrototypeOf(t));return e.forEach((function(e){r[e]=t[e]})),Object.defineProperty(r,"message",{value:t.message}),r}function T(t){return g(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var M=function(t,e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(M,t);var r,i,s,d,u=(r=M,i=h(),function(){var t,e=f(r);if(i){var n=f(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return l(this,t)});function M(t){var e;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,M),"object"!==m(t)||null===t)throw new v("options","Object",t);var r=t.message,i=t.operator,o=t.stackStartFn,a=t.actual,s=t.expected,d=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)e=u.call(this,String(r));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(y="",x="",_="",w=""):(y="",x="",_="",w="")),"object"===m(a)&&null!==a&&"object"===m(s)&&null!==s&&"stack"in a&&a instanceof Error&&"stack"in s&&s instanceof Error&&(a=A(a),s=A(s)),"deepStrictEqual"===i||"strictEqual"===i)e=u.call(this,function(t,e,r){var i="",o="",a=0,s="",l=!1,c=T(t),d=c.split("\n"),u=T(e).split("\n"),h=0,p="";if("strictEqual"===r&&"object"===m(t)&&"object"===m(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===d.length&&1===u.length&&d[0]!==u[0]){var f=d[0].length+u[0].length;if(f<=10){if(!("object"===m(t)&&null!==t||"object"===m(e)&&null!==e||0===t&&0===e))return"".concat(k[r],"\n\n")+"".concat(d[0]," !== ").concat(u[0],"\n")}else if("strictEqualObject"!==r&&f<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;d[0][h]===u[0][h];)h++;h>2&&(p="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var r=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+t.substring(0,r-t.length)}(" ",h),"^"),h=0)}}for(var g=d[d.length-1],v=u[u.length-1];g===v&&(h++<2?s="\n ".concat(g).concat(s):i=g,d.pop(),u.pop(),0!==d.length&&0!==u.length);)g=d[d.length-1],v=u[u.length-1];var A=Math.max(d.length,u.length);if(0===A){var M=c.split("\n");if(M.length>30)for(M[26]="".concat(y,"...").concat(_);M.length>27;)M.pop();return"".concat(k.notIdentical,"\n\n").concat(M.join("\n"),"\n")}h>3&&(s="\n".concat(y,"...").concat(_).concat(s),l=!0),""!==i&&(s="\n ".concat(i).concat(s),i="");var S=0,C=k[r]+"\n".concat(x,"+ actual").concat(_," ").concat(w,"- expected").concat(_),E=" ".concat(y,"...").concat(_," Lines skipped");for(h=0;h1&&h>2&&(L>4?(o+="\n".concat(y,"...").concat(_),l=!0):L>3&&(o+="\n ".concat(u[h-2]),S++),o+="\n ".concat(u[h-1]),S++),a=h,i+="\n".concat(w,"-").concat(_," ").concat(u[h]),S++;else if(u.length1&&h>2&&(L>4?(o+="\n".concat(y,"...").concat(_),l=!0):L>3&&(o+="\n ".concat(d[h-2]),S++),o+="\n ".concat(d[h-1]),S++),a=h,o+="\n".concat(x,"+").concat(_," ").concat(d[h]),S++;else{var z=u[h],O=d[h],D=O!==z&&(!b(O,",")||O.slice(0,-1)!==z);D&&b(z,",")&&z.slice(0,-1)===O&&(D=!1,O+=","),D?(L>1&&h>2&&(L>4?(o+="\n".concat(y,"...").concat(_),l=!0):L>3&&(o+="\n ".concat(d[h-2]),S++),o+="\n ".concat(d[h-1]),S++),a=h,o+="\n".concat(x,"+").concat(_," ").concat(O),i+="\n".concat(w,"-").concat(_," ").concat(z),S+=2):(o+=i,i="",1!==L&&0!==h||(o+="\n ".concat(O),S++))}if(S>20&&h30)for(p[26]="".concat(y,"...").concat(_);p.length>27;)p.pop();e=1===p.length?u.call(this,"".concat(h," ").concat(p[0])):u.call(this,"".concat(h,"\n\n").concat(p.join("\n"),"\n"))}else{var f=T(a),g="",S=k[i];"notDeepEqual"===i||"notEqual"===i?(f="".concat(k[i],"\n\n").concat(f)).length>1024&&(f="".concat(f.slice(0,1021),"...")):(g="".concat(T(s)),f.length>512&&(f="".concat(f.slice(0,509),"...")),g.length>512&&(g="".concat(g.slice(0,509),"...")),"deepEqual"===i||"equal"===i?f="".concat(S,"\n\n").concat(f,"\n\nshould equal\n\n"):g=" ".concat(i," ").concat(g)),e=u.call(this,"".concat(f).concat(g))}return Error.stackTraceLimit=d,e.generatedMessage=!r,Object.defineProperty(c(e),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),e.code="ERR_ASSERTION",e.actual=a,e.expected=s,e.operator=i,Error.captureStackTrace&&Error.captureStackTrace(c(e),o),e.stack,e.name="AssertionError",l(e)}return s=M,(d=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:e,value:function(t,e){return g(this,o(o({},e),{},{customInspect:!1,depth:0}))}}])&&a(s.prototype,d),Object.defineProperty(s,"prototype",{writable:!1}),M}(d(Error),g.custom);t.exports=M},81146:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},o(t)}var a,s,l={};function c(t,e,r){r||(r=Error);var a=function(r){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&i(t,e)}(d,r);var a,s,l,c=(s=d,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=o(s);if(l){var r=o(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function d(r,n,i){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),o=c.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i)),o.code=t,o}return a=d,Object.defineProperty(a,"prototype",{writable:!1}),a}(r);l[t]=a}function d(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",(function(t,e,i){var o,s,l,c,u;if(void 0===a&&(a=r(34961)),a("string"==typeof t,"'name' must be a string"),"string"==typeof e&&(s="not ",e.substr(0,4)===s)?(o="must not be",e=e.replace(/^not /,"")):o="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-9,r)===e}(t," argument"))l="The ".concat(t," ").concat(o," ").concat(d(e,"type"));else{var h=("number"!=typeof u&&(u=0),u+1>(c=t).length||-1===c.indexOf(".",u)?"argument":"property");l='The "'.concat(t,'" ').concat(h," ").concat(o," ").concat(d(e,"type"))}return l+". Received type ".concat(n(i))}),TypeError),c("ERR_INVALID_ARG_VALUE",(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=r(11276));var i=s.inspect(e);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),c("ERR_INVALID_RETURN_VALUE",(function(t,e,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(t,' to be returned from the "').concat(e,'"')+" function but got ".concat(i,".")}),TypeError),c("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),n=0;n0,"At least one arg needs to be specified");var i="The ",o=e.length;switch(e=e.map((function(t){return'"'.concat(t,'"')})),o){case 1:i+="".concat(e[0]," argument");break;case 2:i+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:i+=e.slice(0,o-1).join(", "),i+=", and ".concat(e[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),t.exports.codes=l},88884:(t,e,r)=>{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r10)return!0;for(var e=0;e57)return!0}return 10===t.length&&t>=Math.pow(2,32)}function D(t){return Object.keys(t).filter(O).concat(d(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}function I(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i{"use strict";r.r(e),r.d(e,{decode:()=>s,encode:()=>a});for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="undefined"==typeof Uint8Array?[]:new Uint8Array(256),o=0;o<64;o++)i[n.charCodeAt(o)]=o;var a=function(t){var e,r=new Uint8Array(t),i=r.length,o="";for(e=0;e>2],o+=n[(3&r[e])<<4|r[e+1]>>4],o+=n[(15&r[e+1])<<2|r[e+2]>>6],o+=n[63&r[e+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},s=function(t){var e,r,n,o,a,s=.75*t.length,l=t.length,c=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var d=new ArrayBuffer(s),u=new Uint8Array(d);for(e=0;e>4,u[c++]=(15&n)<<4|o>>2,u[c++]=(3&o)<<6|63&a;return d}},17507:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=s(t),a=o[0],l=o[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,a,l)),d=0,u=l>0?a-4:a;for(r=0;r>16&255,c[d++]=e>>8&255,c[d++]=255&e;return 2===l&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[d++]=255&e),1===l&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[d++]=e>>8&255,c[d++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,n){for(var i,o,a=[],s=e;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},72478:t=>{"use strict";function e(t,e,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)>=0?(o=a,i=a-1):n=a+1}return o}function r(t,e,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)>0?(o=a,i=a-1):n=a+1}return o}function n(t,e,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)<0?(o=a,n=a+1):i=a-1}return o}function i(t,e,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)<=0?(o=a,n=a+1):i=a-1}return o}function o(t,e,r,n,i){for(;n<=i;){var o=n+i>>>1,a=t[o],s=void 0!==r?r(a,e):a-e;if(0===s)return o;s<=0?n=o+1:i=o-1}return-1}function a(t,e,r,n,i,o){return"function"==typeof r?o(t,e,r,void 0===n?0:0|n,void 0===i?t.length-1:0|i):o(t,e,void 0,void 0===r?0:0|r,void 0===n?t.length-1:0|n)}t.exports={ge:function(t,r,n,i,o){return a(t,r,n,i,o,e)},gt:function(t,e,n,i,o){return a(t,e,n,i,o,r)},lt:function(t,e,r,i,o){return a(t,e,r,i,o,n)},le:function(t,e,r,n,o){return a(t,e,r,n,o,i)},eq:function(t,e,r,n,i){return a(t,e,r,n,i,o)}}},88828:(t,e)=>{"use strict";function r(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},25875:t=>{"use strict";t.exports=function(t,n){n||(n={});var i,o,a,s,l,c,d,u,h,p,f,m=null==n.cutoff?.25:n.cutoff,g=null==n.radius?8:n.radius,v=n.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!n.width||!n.height)throw Error("For raw data width and height should be provided by options");i=n.width,o=n.height,s=t,c=n.stride?n.stride:Math.floor(t.length/i/o)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(d=(u=t).getContext("2d"),i=u.width,o=u.height,s=(h=d.getImageData(0,0,i,o)).data,c=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(d=t,i=(u=t.canvas).width,o=u.height,s=(h=d.getImageData(0,0,i,o)).data,c=4):window.ImageData&&t instanceof window.ImageData&&(h=t,i=t.width,o=t.height,s=h.data,c=4);if(a=Math.max(i,o),window.Uint8ClampedArray&&s instanceof window.Uint8ClampedArray||window.Uint8Array&&s instanceof window.Uint8Array)for(l=s,s=Array(i*o),p=0,f=Math.floor(l.length/c);p{"use strict";const n=r(17507),i=r(23778),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=l,e.IS=50;const a=2147483647;function s(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return c(t,e,r)}function c(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|m(t,e);let n=s(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if($(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return h(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if($(t,ArrayBuffer)||t&&$(t.buffer,ArrayBuffer))return p(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&($(t,SharedArrayBuffer)||t&&$(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return l.from(n,e,r);const i=function(t){if(l.isBuffer(t)){const e=0|f(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||X(t.length)?s(0):h(t):"Buffer"===t.type&&Array.isArray(t.data)?h(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function d(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return d(t),s(t<0?0:0|f(t))}function h(t){const e=t.length<0?0:0|f(t.length),r=s(e);for(let n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function m(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||$(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(i)return n?-1:q(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,r);case"utf8":case"utf-8":return M(this,e,r);case"ascii":return C(this,e,r);case"latin1":case"binary":return E(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),X(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=l.from(e,n)),l.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){let o,a=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let n=-1;for(o=r;os&&(r=s-l),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=e.length;let a;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function M(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+a<=r){let r,n,s,l;switch(a){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(l=(31&e)<<6|63&r,l>127&&(o=l));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(l=(15&e)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:r=t[i+1],n=t[i+2],s=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(l=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&s,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(t){const e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nn.length?(l.isBuffer(e)||(e=l.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!l.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;er&&(t+=" ... "),""},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(t,e,r,n,i){if($(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0);const s=Math.min(o,a),c=this.slice(n,i),d=t.slice(e,r);for(let t=0;t>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return x(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":case"latin1":case"binary":return _(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function C(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;in)&&(r=n);let i="";for(let n=e;nr)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,r,n,i,o){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function I(t,e,r,n,i){G(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function F(t,e,r,n,i){G(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function R(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(t,e,r,n,o){return e=+e,r>>>=0,o||R(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function j(t,e,r,n,o){return e=+e,r>>>=0,o||R(t,0,r,8),i.write(t,e,r,n,52,8),r+8}l.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],i=1,o=0;for(;++o>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readBigUInt64LE=K((function(t){V(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*e)),n},l.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},l.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readBigInt64LE=K((function(t){V(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<>>=0,e||O(t,4,this.length),i.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||D(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,n||D(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigUInt64LE=K((function(t,e=0){return I(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=K((function(t,e=0){return F(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);D(this,t,e,r,n-1,-n)}let i=0,o=1,a=0;for(this[e]=255&t;++i>>=0,!n){const n=Math.pow(2,8*r-1);D(this,t,e,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+r},l.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigInt64LE=K((function(t,e=0){return I(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=K((function(t,e=0){return F(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},l.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},l.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},l.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},l.prototype.copy=function(t,e,r,n){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function G(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new N.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){V(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||H(e,t.length-(r+1))}(n,i,o)}function V(t,e){if("number"!=typeof t)throw new N.ERR_INVALID_ARG_TYPE(e,"number",t)}function H(t,e,r){if(Math.floor(t)!==t)throw V(t,r),new N.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new N.ERR_BUFFER_OUT_OF_BOUNDS;throw new N.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}B("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),B("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),B("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=U(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=U(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function q(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let a=0;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Y(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Z(t,e,r,n){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function $(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function X(t){return t!=t}const J=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function K(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},24310:(t,e,r)=>{"use strict";var n=r(59412),i=r(61398),o=i(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&o(t,".prototype.")>-1?i(r):r}},61398:(t,e,r)=>{"use strict";var n=r(35366),i=r(59412),o=r(86928),a=r(48744),s=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),c=i("%Reflect.apply%",!0)||n.call(l,s),d=r(38232),u=i("%Math.max%");t.exports=function(t){if("function"!=typeof t)throw new a("a function is required");var e=c(n,l,arguments);return o(e,1+u(0,t.length-(arguments.length-1)),!0)};var h=function(){return c(n,s,arguments)};d?d(t.exports,"apply",{value:h}):t.exports.apply=h},90897:t=>{t.exports=function(t,e,r){return er?r:t:te?e:t}},92173:(t,e,r)=>{"use strict";var n=r(90897);function i(t,e){null==e&&(e=!0);var r=t[0],i=t[1],o=t[2],a=t[3];return null==a&&(a=e?1:255),e&&(r*=255,i*=255,o*=255,a*=255),16777216*(r=255&n(r,0,255))+((i=255&n(i,0,255))<<16)+((o=255&n(o,0,255))<<8)+(255&n(a,0,255))}t.exports=i,t.exports.to=i,t.exports.from=function(t,e){var r=(t=+t)>>>24,n=(16711680&t)>>>16,i=(65280&t)>>>8,o=255&t;return!1===e?[r,n,i,o]:[r/255,n/255,i/255,o/255]}},22319:t=>{"use strict";t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},34463:(t,e,r)=>{"use strict";var n=r(31562),i=r(90897),o=r(22366);t.exports=function(t,e){"float"!==e&&e||(e="array"),"uint"===e&&(e="uint8"),"uint_clamped"===e&&(e="uint8_clamped");var r=new(o(e))(4),a="uint8"!==e&&"uint8_clamped"!==e;return t.length&&"string"!=typeof t||((t=n(t))[0]/=255,t[1]/=255,t[2]/=255),function(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||!!(Array.isArray(t)&&(t[0]>1||0===t[0])&&(t[1]>1||0===t[1])&&(t[2]>1||0===t[2])&&(!t[3]||t[3]>1))}(t)?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:255,a&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(a?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:1):(r[0]=i(Math.floor(255*t[0]),0,255),r[1]=i(Math.floor(255*t[1]),0,255),r[2]=i(Math.floor(255*t[2]),0,255),r[3]=null==t[3]?255:i(Math.floor(255*t[3]),0,255)),r)}},31562:(t,e,r)=>{"use strict";var n=r(4026),i=r(31497),o=r(90897);t.exports=function(t){var e,r=n(t);return r.space?((e=Array(3))[0]=o(r.values[0],0,255),e[1]=o(r.values[1],0,255),e[2]=o(r.values[2],0,255),"h"===r.space[0]&&(e=i.rgb(e)),e.push(o(r.alpha,0,1)),e):[]}},31497:(t,e,r)=>{"use strict";var n=r(65837);t.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e,r,n,i,o,a=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[o=255*l,o,o];e=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(n=a+1/3*-(c-1))<0?n++:n>1&&n--,o=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[c]=255*o;return i}},n.hsl=function(t){var e,r,n=t[0]/255,i=t[1]/255,o=t[2]/255,a=Math.min(n,i,o),s=Math.max(n,i,o),l=s-a;return s===a?e=0:n===s?e=(i-o)/l:i===s?e=2+(o-n)/l:o===s&&(e=4+(n-i)/l),(e=Math.min(60*e,360))<0&&(e+=360),r=(a+s)/2,[e,100*(s===a?0:r<=.5?l/(s+a):l/(2-s-a)),100*r]}},65837:t=>{"use strict";t.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},86643:()=>{!function(){"use strict";if("undefined"!=typeof document&&!("adoptedStyleSheets"in document)){var t="ShadyCSS"in window&&!ShadyCSS.nativeShadow,e=document.implementation.createHTMLDocument(""),r=new WeakMap,n="object"==typeof DOMException?Error:DOMException,i=Object.defineProperty,o=Array.prototype.forEach,a=/@import.+?;?$/gm,s=CSSStyleSheet.prototype;s.replace=function(){return Promise.reject(new n("Can't call replace on non-constructed CSSStyleSheets."))},s.replaceSync=function(){throw new n("Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.")};var l=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakMap,h=S.prototype;h.replace=function(t){try{return this.replaceSync(t),Promise.resolve(this)}catch(t){return Promise.reject(t)}},h.replaceSync=function(t){if(M(this),"string"==typeof t){var e=this;l.get(e).textContent=function(t){var e=t.replace(a,"");return e!==t&&console.warn("@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418"),e.trim()}(t),u.set(e,[]),c.get(e).forEach((function(t){t.isConnected()&&T(e,A(e,t))}))}},i(h,"cssRules",{configurable:!0,enumerable:!0,get:function(){return M(this),l.get(this).sheet.cssRules}}),i(h,"media",{configurable:!0,enumerable:!0,get:function(){return M(this),l.get(this).sheet.media}}),["addRule","deleteRule","insertRule","removeRule"].forEach((function(t){h[t]=function(){var e=this;M(e);var r=arguments;u.get(e).push({method:t,args:r}),c.get(e).forEach((function(n){if(n.isConnected()){var i=A(e,n).sheet;i[t].apply(i,r)}}));var n=l.get(e).sheet;return n[t].apply(n,r)}})),i(S,Symbol.hasInstance,{configurable:!0,value:_});var p={childList:!0,subtree:!0},f=new WeakMap,m=new WeakMap,g=new WeakMap,v=new WeakMap;if(D.prototype={isConnected:function(){var t=m.get(this);return t instanceof Document?"loading"!==t.readyState:function(t){return"isConnected"in t?t.isConnected:document.contains(t)}(t.host)},connect:function(){var t=z(this);v.get(this).observe(t,p),g.get(this).length>0&&O(this),L(t,(function(t){C(t).connect()}))},disconnect:function(){v.get(this).disconnect()},update:function(t){var e=this,r=m.get(e)===document?"Document":"ShadowRoot";if(!Array.isArray(t))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+r+": Iterator getter is not callable.");if(!t.every(_))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+r+": Failed to convert value to 'CSSStyleSheet'");if(t.some(k))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+r+": Can't adopt non-constructed stylesheets");e.sheets=t;var n,i,o=g.get(e),a=(n=t).filter((function(t,e){return n.indexOf(t)===e}));(i=a,o.filter((function(t){return-1===i.indexOf(t)}))).forEach((function(t){var r;(r=A(t,e)).parentNode.removeChild(r),function(t,e){d.get(t).delete(e),c.set(t,c.get(t).filter((function(t){return t!==e})))}(t,e)})),g.set(e,a),e.isConnected()&&a.length>0&&O(e)}},window.CSSStyleSheet=S,E(Document),"ShadowRoot"in window){E(ShadowRoot);var b=Element.prototype,y=b.attachShadow;b.attachShadow=function(t){var e=y.call(this,t);return"closed"===t.mode&&r.set(this,e),e}}var x=C(document);x.isConnected()?x.connect():document.addEventListener("DOMContentLoaded",x.connect.bind(x))}function w(t){return t.shadowRoot||r.get(t)}function _(t){return"object"==typeof t&&(h.isPrototypeOf(t)||s.isPrototypeOf(t))}function k(t){return"object"==typeof t&&s.isPrototypeOf(t)}function A(t,e){return d.get(t).get(e)}function T(t,e){requestAnimationFrame((function(){e.textContent=l.get(t).textContent,u.get(t).forEach((function(t){return e.sheet[t.method].apply(e.sheet,t.args)}))}))}function M(t){if(!l.has(t))throw new TypeError("Illegal invocation")}function S(){var t=this,r=document.createElement("style");e.body.appendChild(r),l.set(t,r),c.set(t,[]),d.set(t,new WeakMap),u.set(t,[])}function C(t){var e=f.get(t);return e||(e=new D(t),f.set(t,e)),e}function E(t){i(t.prototype,"adoptedStyleSheets",{configurable:!0,enumerable:!0,get:function(){return C(this).sheets},set:function(t){C(this).update(t)}})}function L(t,e){for(var r=document.createNodeIterator(t,NodeFilter.SHOW_ELEMENT,(function(t){return w(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),null,!1),n=void 0;n=r.nextNode();)e(w(n))}function z(t){var e=m.get(t);return e instanceof Document?e.body:e}function O(t){var e=document.createDocumentFragment(),r=g.get(t),n=v.get(t),i=z(t);n.disconnect(),r.forEach((function(r){e.appendChild(A(r,t)||function(t,e){var r=document.createElement("style");return d.get(t).set(e,r),c.get(t).push(e),r}(r,t))})),i.insertBefore(e,null),n.observe(i,p),r.forEach((function(e){T(e,A(e,t))}))}function D(e){var r=this;r.sheets=[],m.set(r,e),g.set(r,[]),v.set(r,new MutationObserver((function(e,n){document?e.forEach((function(e){t||o.call(e.addedNodes,(function(t){t instanceof Element&&L(t,(function(t){C(t).connect()}))})),o.call(e.removedNodes,(function(e){e instanceof Element&&(function(t,e){return e instanceof HTMLStyleElement&&g.get(t).some((function(e){return A(e,t)}))}(r,e)&&O(r),t||L(e,(function(t){C(t).disconnect()})))}))})):n.disconnect()})))}}()},82393:(t,e,r)=>{"use strict";t.exports={parse:r(60062),stringify:r(40288)}},15305:(t,e,r)=>{"use strict";var n=r(23648);t.exports={isSize:function(t){return/^[\d\.]/.test(t)||-1!==t.indexOf("/")||-1!==n.indexOf(t)}}},60062:(t,e,r)=>{"use strict";var n=r(51183),i=r(54324),o=r(94316),a=r(99803),s=r(87486),l=r(2362),c=r(46492),d=r(15305).isSize;t.exports=h;var u=h.cache={};function h(t){if("string"!=typeof t)throw new Error("Font argument must be a string.");if(u[t])return u[t];if(""===t)throw new Error("Cannot parse an empty string.");if(-1!==o.indexOf(t))return u[t]={system:t};for(var e,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},h=c(t,/\s+/);e=h.shift();){if(-1!==i.indexOf(e))return["style","variant","weight","stretch"].forEach((function(t){r[t]=e})),u[t]=r;if(-1===s.indexOf(e))if("normal"!==e&&"small-caps"!==e)if(-1===l.indexOf(e)){if(-1===a.indexOf(e)){if(d(e)){var f=c(e,"/");if(r.size=f[0],null!=f[1]?r.lineHeight=p(f[1]):"/"===h[0]&&(h.shift(),r.lineHeight=p(h.shift())),!h.length)throw new Error("Missing required font-family.");return r.family=c(h.join(" "),/\s*,\s*/).map(n),u[t]=r}throw new Error("Unknown or unsupported font token: "+e)}r.weight=e}else r.stretch=e;else r.variant=e;else r.style=e}throw new Error("Missing required font-size.")}function p(t){var e=parseFloat(t);return e.toString()===t?e:t}},40288:(t,e,r)=>{"use strict";var n=r(9994),i=r(15305).isSize,o=f(r(54324)),a=f(r(94316)),s=f(r(99803)),l=f(r(87486)),c=f(r(2362)),d={normal:1,"small-caps":1},u={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},h="serif";function p(t,e){if(t&&!e[t]&&!o[t])throw Error("Unknown keyword `"+t+"`");return t}function f(t){for(var e={},r=0;r{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",n=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,n,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var s=0;s0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),r&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=r):d[2]=r),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),e.push(d))}},e}},21906:t=>{"use strict";t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},78706:t=>{"use strict";t.exports=function(t){return t[1]}},39683:(t,e,r)=>{"use strict";var n,i=r(59738),o=r(10040),a=r(4216),s=r(15498),l=r(54863),c=r(30829),d=Function.prototype.bind,u=Object.defineProperty,h=Object.prototype.hasOwnProperty;n=function(t,e,r){var n,i=o(e)&&a(e.value);return delete(n=s(e)).writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&h.call(this,t)?i:(e.value=d.call(i,r.resolveContext?r.resolveContext(this):this),u(this,t,e),this[t])},n},t.exports=function(t){var e=l(arguments[1]);return i(e.resolveContext)&&a(e.resolveContext),c(t,(function(t,r){return n(r,t,e)}))}},86142:(t,e,r)=>{"use strict";var n=r(59738),i=r(15034),o=r(18021),a=r(54863),s=r(79813);(t.exports=function(t,e){var r,i,l,c,d;return arguments.length<2||"string"!=typeof t?(c=e,e=t,t=null):c=arguments[2],n(t)?(r=s.call(t,"c"),i=s.call(t,"e"),l=s.call(t,"w")):(r=l=!0,i=!1),d={value:e,configurable:r,enumerable:i,writable:l},c?o(a(c),d):d}).gs=function(t,e,r){var l,c,d,u;return"string"!=typeof t?(d=r,r=e,e=t,t=null):d=arguments[3],n(e)?i(e)?n(r)?i(r)||(d=r,r=void 0):r=void 0:(d=e,e=r=void 0):e=void 0,n(t)?(l=s.call(t,"c"),c=s.call(t,"e")):(l=!0,c=!1),u={get:e,set:r,configurable:l,enumerable:c},d?o(a(d),u):u}},31830:(t,e,r)=>{"use strict";function n(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}r.d(e,{GP:()=>h,OE:()=>m});var i,o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a(t){if(!(e=o.exec(t)))throw new Error("invalid format: "+t);var e;return new s({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function s(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function l(t,e){var r=n(t,e);if(!r)return t+"";var i=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}a.prototype=s.prototype,s.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const c={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return l(100*t,e)},r:l,s:function(t,e){var r=n(t,e);if(!r)return t+"";var o=r[0],a=r[1],s=a-(i=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,l=o.length;return s===l?o:s>l?o+new Array(s-l+1).join("0"):s>0?o.slice(0,s)+"."+o.slice(s):"0."+new Array(1-s).join("0")+n(t,Math.max(0,e+s-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function d(t){return t}var u,h,p=Array.prototype.map,f=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function m(t){var e,r,o=void 0===t.grouping||void 0===t.thousands?d:(e=p.call(t.grouping,Number),r=t.thousands+"",function(t,n){for(var i=t.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(t.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[a=(a+1)%e.length];return o.reverse().join(r)}),s=void 0===t.currency?"":t.currency[0]+"",l=void 0===t.currency?"":t.currency[1]+"",u=void 0===t.decimal?".":t.decimal+"",h=void 0===t.numerals?d:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(p.call(t.numerals,String)),m=void 0===t.percent?"%":t.percent+"",g=void 0===t.minus?"-":t.minus+"",v=void 0===t.nan?"NaN":t.nan+"";function b(t){var e=(t=a(t)).fill,r=t.align,n=t.sign,d=t.symbol,p=t.zero,b=t.width,y=t.comma,x=t.precision,w=t.trim,_=t.type;"n"===_?(y=!0,_="g"):c[_]||(void 0===x&&(x=12),w=!0,_="g"),(p||"0"===e&&"="===r)&&(p=!0,e="0",r="=");var k="$"===d?s:"#"===d&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",A="$"===d?l:/[%p]/.test(_)?m:"",T=c[_],M=/[defgprs%]/.test(_);function S(t){var a,s,l,c=k,d=A;if("c"===_)d=T(t)+d,t="";else{var m=(t=+t)<0||1/t<0;if(t=isNaN(t)?v:T(Math.abs(t),x),w&&(t=function(t){t:for(var e,r=t.length,n=1,i=-1;n0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),m&&0==+t&&"+"!==n&&(m=!1),c=(m?"("===n?n:g:"-"===n||"("===n?"":n)+c,d=("s"===_?f[8+i/3]:"")+d+(m&&"("===n?")":""),M)for(a=-1,s=t.length;++a(l=t.charCodeAt(a))||l>57){d=(46===l?u+t.slice(a+1):t.slice(a))+d,t=t.slice(0,a);break}}y&&!p&&(t=o(t,1/0));var S=c.length+t.length+d.length,C=S>1)+c+t+d+C.slice(S);break;default:t=C+c+t+d}return h(t)}return x=void 0===x?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x)),S.toString=function(){return t+""},S}return{format:b,formatPrefix:function(t,e){var r,i=b(((t=a(t)).type="f",t)),o=3*Math.max(-8,Math.min(8,Math.floor((r=e,((r=n(Math.abs(r)))?r[1]:NaN)/3)))),s=Math.pow(10,-o),l=f[8+o/3];return function(t){return i(s*t)+l}}}}u=m({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),h=u.format,u.formatPrefix},79969:(t,e,r)=>{"use strict";r.d(e,{DC:()=>f,de:()=>h,aL:()=>m});var n=r(64772),i=r(79896),o=r(61396),a=r(67848),s=r(28397),l=r(34045);function c(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function d(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function u(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function h(t){var e=t.dateTime,r=t.date,s=t.time,l=t.periods,h=t.days,p=t.shortDays,f=t.months,m=t.shortMonths,v=_(l),b=k(l),y=_(h),x=k(h),w=_(p),et=k(p),wt=_(f),Dt=k(f),It=_(m),Ft=k(m),Rt={a:function(t){return p[t.getDay()]},A:function(t){return h[t.getDay()]},b:function(t){return m[t.getMonth()]},B:function(t){return f[t.getMonth()]},c:null,d:H,e:H,f:$,g:at,G:lt,H:W,I:q,j:Y,L:Z,m:X,M:J,p:function(t){return l[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:zt,s:Ot,S:K,u:Q,U:tt,V:rt,w:nt,W:it,x:null,X:null,y:ot,Y:st,Z:ct,"%":Lt},Pt={a:function(t){return p[t.getUTCDay()]},A:function(t){return h[t.getUTCDay()]},b:function(t){return m[t.getUTCMonth()]},B:function(t){return f[t.getUTCMonth()]},c:null,d:dt,e:dt,f:mt,g:Mt,G:Ct,H:ut,I:ht,j:pt,L:ft,m:gt,M:vt,p:function(t){return l[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:zt,s:Ot,S:bt,u:yt,U:xt,V:_t,w:kt,W:At,x:null,X:null,y:Tt,Y:St,Z:Et,"%":Lt},jt={a:function(t,e,r){var n=w.exec(e.slice(r));return n?(t.w=et[n[0].toLowerCase()],r+n[0].length):-1},A:function(t,e,r){var n=y.exec(e.slice(r));return n?(t.w=x[n[0].toLowerCase()],r+n[0].length):-1},b:function(t,e,r){var n=It.exec(e.slice(r));return n?(t.m=Ft[n[0].toLowerCase()],r+n[0].length):-1},B:function(t,e,r){var n=wt.exec(e.slice(r));return n?(t.m=Dt[n[0].toLowerCase()],r+n[0].length):-1},c:function(t,r,n){return Ut(t,e,r,n)},d:I,e:I,f:B,g:L,G:E,H:R,I:R,j:F,L:N,m:D,M:P,p:function(t,e,r){var n=v.exec(e.slice(r));return n?(t.p=b[n[0].toLowerCase()],r+n[0].length):-1},q:O,Q:G,s:V,S:j,u:T,U:M,V:S,w:A,W:C,x:function(t,e,n){return Ut(t,r,e,n)},X:function(t,e,r){return Ut(t,s,e,r)},y:L,Y:E,Z:z,"%":U};function Nt(t,e){return function(r){var n,i,o,a=[],s=-1,l=0,c=t.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in h||(h.w=1),"Z"in h?(l=(s=d(u(h.y,0,1))).getUTCDay(),s=l>4||0===l?n.rt.ceil(s):(0,n.rt)(s),s=i.A.offset(s,7*(h.V-1)),h.y=s.getUTCFullYear(),h.m=s.getUTCMonth(),h.d=s.getUTCDate()+(h.w+6)%7):(l=(s=c(u(h.y,0,1))).getDay(),s=l>4||0===l?o.By.ceil(s):(0,o.By)(s),s=a.A.offset(s,7*(h.V-1)),h.y=s.getFullYear(),h.m=s.getMonth(),h.d=s.getDate()+(h.w+6)%7)}else("W"in h||"U"in h)&&("w"in h||(h.w="u"in h?h.u%7:"W"in h?1:0),l="Z"in h?d(u(h.y,0,1)).getUTCDay():c(u(h.y,0,1)).getDay(),h.m=0,h.d="W"in h?(h.w+6)%7+7*h.W-(l+5)%7:h.w+7*h.U-(l+6)%7);return"Z"in h?(h.H+=h.Z/100|0,h.M+=h.Z%100,d(h)):c(h)}}function Ut(t,e,r,n){for(var i,o,a=0,s=e.length,l=r.length;a=l)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=jt[i in g?e.charAt(a++):i])||(n=o(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Rt.x=Nt(r,Rt),Rt.X=Nt(s,Rt),Rt.c=Nt(e,Rt),Pt.x=Nt(r,Pt),Pt.X=Nt(s,Pt),Pt.c=Nt(e,Pt),{format:function(t){var e=Nt(t+="",Rt);return e.toString=function(){return t},e},parse:function(t){var e=Bt(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=Nt(t+="",Pt);return e.toString=function(){return t},e},utcParse:function(t){var e=Bt(t+="",!0);return e.toString=function(){return t},e}}}var p,f,m,g={"-":"",_:" ",0:"0"},v=/^\s*\d+/,b=/^%/,y=/[\\^$*+?|[\]().{}]/g;function x(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",o=i.length;return n+(o68?1900:2e3),r+n[0].length):-1}function z(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function O(t,e,r){var n=v.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function D(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function I(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function F(t,e,r){var n=v.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function R(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function P(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function j(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function N(t,e,r){var n=v.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function B(t,e,r){var n=v.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function U(t,e,r){var n=b.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function G(t,e,r){var n=v.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function V(t,e,r){var n=v.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function H(t,e){return x(t.getDate(),e,2)}function W(t,e){return x(t.getHours(),e,2)}function q(t,e){return x(t.getHours()%12||12,e,2)}function Y(t,e){return x(1+a.A.count((0,s.A)(t),t),e,3)}function Z(t,e){return x(t.getMilliseconds(),e,3)}function $(t,e){return Z(t,e)+"000"}function X(t,e){return x(t.getMonth()+1,e,2)}function J(t,e){return x(t.getMinutes(),e,2)}function K(t,e){return x(t.getSeconds(),e,2)}function Q(t){var e=t.getDay();return 0===e?7:e}function tt(t,e){return x(o.fz.count((0,s.A)(t)-1,t),e,2)}function et(t){var e=t.getDay();return e>=4||0===e?(0,o.dt)(t):o.dt.ceil(t)}function rt(t,e){return t=et(t),x(o.dt.count((0,s.A)(t),t)+(4===(0,s.A)(t).getDay()),e,2)}function nt(t){return t.getDay()}function it(t,e){return x(o.By.count((0,s.A)(t)-1,t),e,2)}function ot(t,e){return x(t.getFullYear()%100,e,2)}function at(t,e){return x((t=et(t)).getFullYear()%100,e,2)}function st(t,e){return x(t.getFullYear()%1e4,e,4)}function lt(t,e){var r=t.getDay();return x((t=r>=4||0===r?(0,o.dt)(t):o.dt.ceil(t)).getFullYear()%1e4,e,4)}function ct(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+x(e/60|0,"0",2)+x(e%60,"0",2)}function dt(t,e){return x(t.getUTCDate(),e,2)}function ut(t,e){return x(t.getUTCHours(),e,2)}function ht(t,e){return x(t.getUTCHours()%12||12,e,2)}function pt(t,e){return x(1+i.A.count((0,l.A)(t),t),e,3)}function ft(t,e){return x(t.getUTCMilliseconds(),e,3)}function mt(t,e){return ft(t,e)+"000"}function gt(t,e){return x(t.getUTCMonth()+1,e,2)}function vt(t,e){return x(t.getUTCMinutes(),e,2)}function bt(t,e){return x(t.getUTCSeconds(),e,2)}function yt(t){var e=t.getUTCDay();return 0===e?7:e}function xt(t,e){return x(n.Hl.count((0,l.A)(t)-1,t),e,2)}function wt(t){var e=t.getUTCDay();return e>=4||0===e?(0,n.pT)(t):n.pT.ceil(t)}function _t(t,e){return t=wt(t),x(n.pT.count((0,l.A)(t),t)+(4===(0,l.A)(t).getUTCDay()),e,2)}function kt(t){return t.getUTCDay()}function At(t,e){return x(n.rt.count((0,l.A)(t)-1,t),e,2)}function Tt(t,e){return x(t.getUTCFullYear()%100,e,2)}function Mt(t,e){return x((t=wt(t)).getUTCFullYear()%100,e,2)}function St(t,e){return x(t.getUTCFullYear()%1e4,e,4)}function Ct(t,e){var r=t.getUTCDay();return x((t=r>=4||0===r?(0,n.pT)(t):n.pT.ceil(t)).getUTCFullYear()%1e4,e,4)}function Et(){return"+0000"}function Lt(){return"%"}function zt(t){return+t}function Ot(t){return Math.floor(+t/1e3)}p=h({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"]}),f=p.format,p.parse,m=p.utcFormat,p.utcParse},67848:(t,e,r)=>{"use strict";r.d(e,{A:()=>a,_:()=>s});var n=r(94825),i=r(37968),o=(0,n.A)((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.rR)/i.Nm}),(function(t){return t.getDate()-1}));const a=o;var s=o.range},37968:(t,e,r)=>{"use strict";r.d(e,{Fq:()=>s,JJ:()=>o,Nm:()=>a,Tt:()=>n,rR:()=>i});var n=1e3,i=6e4,o=36e5,a=864e5,s=6048e5},55622:(t,e,r)=>{"use strict";r.r(e),r.d(e,{timeDay:()=>v.A,timeDays:()=>v._,timeFriday:()=>b.Sh,timeFridays:()=>b.tz,timeHour:()=>m,timeHours:()=>g,timeInterval:()=>n.A,timeMillisecond:()=>o,timeMilliseconds:()=>a,timeMinute:()=>h,timeMinutes:()=>p,timeMonday:()=>b.By,timeMondays:()=>b.KP,timeMonth:()=>x,timeMonths:()=>w,timeSaturday:()=>b.kS,timeSaturdays:()=>b.t$,timeSecond:()=>c,timeSeconds:()=>d,timeSunday:()=>b.fz,timeSundays:()=>b.se,timeThursday:()=>b.dt,timeThursdays:()=>b.Q$,timeTuesday:()=>b.eQ,timeTuesdays:()=>b.yW,timeWednesday:()=>b.l3,timeWednesdays:()=>b.gf,timeWeek:()=>b.fz,timeWeeks:()=>b.se,timeYear:()=>_.A,timeYears:()=>_.V,utcDay:()=>E.A,utcDays:()=>E.o,utcFriday:()=>L.a1,utcFridays:()=>L.Zn,utcHour:()=>S,utcHours:()=>C,utcMillisecond:()=>o,utcMilliseconds:()=>a,utcMinute:()=>A,utcMinutes:()=>T,utcMonday:()=>L.rt,utcMondays:()=>L.ON,utcMonth:()=>O,utcMonths:()=>D,utcSaturday:()=>L.c8,utcSaturdays:()=>L.Xo,utcSecond:()=>c,utcSeconds:()=>d,utcSunday:()=>L.Hl,utcSundays:()=>L.aZ,utcThursday:()=>L.pT,utcThursdays:()=>L.wr,utcTuesday:()=>L.sr,utcTuesdays:()=>L.jN,utcWednesday:()=>L.z2,utcWednesdays:()=>L.G6,utcWeek:()=>L.Hl,utcWeeks:()=>L.aZ,utcYear:()=>I.A,utcYears:()=>I.j});var n=r(94825),i=(0,n.A)((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?(0,n.A)((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,r){e.setTime(+e+r*t)}),(function(e,r){return(r-e)/t})):i:null};const o=i;var a=i.range,s=r(37968),l=(0,n.A)((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*s.Tt)}),(function(t,e){return(e-t)/s.Tt}),(function(t){return t.getUTCSeconds()}));const c=l;var d=l.range,u=(0,n.A)((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*s.Tt)}),(function(t,e){t.setTime(+t+e*s.rR)}),(function(t,e){return(e-t)/s.rR}),(function(t){return t.getMinutes()}));const h=u;var p=u.range,f=(0,n.A)((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*s.Tt-t.getMinutes()*s.rR)}),(function(t,e){t.setTime(+t+e*s.JJ)}),(function(t,e){return(e-t)/s.JJ}),(function(t){return t.getHours()}));const m=f;var g=f.range,v=r(67848),b=r(61396),y=(0,n.A)((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));const x=y;var w=y.range,_=r(28397),k=(0,n.A)((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*s.rR)}),(function(t,e){return(e-t)/s.rR}),(function(t){return t.getUTCMinutes()}));const A=k;var T=k.range,M=(0,n.A)((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*s.JJ)}),(function(t,e){return(e-t)/s.JJ}),(function(t){return t.getUTCHours()}));const S=M;var C=M.range,E=r(79896),L=r(64772),z=(0,n.A)((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}));const O=z;var D=z.range,I=r(34045)},94825:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=new Date,i=new Date;function o(t,e,r,a){function s(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return s.floor=function(e){return t(e=new Date(+e)),e},s.ceil=function(r){return t(r=new Date(r-1)),e(r,1),t(r),r},s.round=function(t){var e=s(t),r=s.ceil(t);return t-e0))return a;do{a.push(o=new Date(+r)),e(r,i),t(r)}while(o=e)for(;t(e),!r(e);)e.setTime(e-1)}),(function(t,n){if(t>=t)if(n<0)for(;++n<=0;)for(;e(t,-1),!r(t););else for(;--n>=0;)for(;e(t,1),!r(t););}))},r&&(s.count=function(e,o){return n.setTime(+e),i.setTime(+o),t(n),t(i),Math.floor(r(n,i))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(a?function(e){return a(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}},79896:(t,e,r)=>{"use strict";r.d(e,{A:()=>a,o:()=>s});var n=r(94825),i=r(37968),o=(0,n.A)((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/i.Nm}),(function(t){return t.getUTCDate()-1}));const a=o;var s=o.range},64772:(t,e,r)=>{"use strict";r.d(e,{G6:()=>g,Hl:()=>a,ON:()=>f,Xo:()=>y,Zn:()=>b,a1:()=>u,aZ:()=>p,c8:()=>h,jN:()=>m,pT:()=>d,rt:()=>s,sr:()=>l,wr:()=>v,z2:()=>c});var n=r(94825),i=r(37968);function o(t){return(0,n.A)((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/i.Fq}))}var a=o(0),s=o(1),l=o(2),c=o(3),d=o(4),u=o(5),h=o(6),p=a.range,f=s.range,m=l.range,g=c.range,v=d.range,b=u.range,y=h.range},34045:(t,e,r)=>{"use strict";r.d(e,{A:()=>o,j:()=>a});var n=r(94825),i=(0,n.A)((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?(0,n.A)((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null};const o=i;var a=i.range},61396:(t,e,r)=>{"use strict";r.d(e,{By:()=>s,KP:()=>f,Q$:()=>v,Sh:()=>u,dt:()=>d,eQ:()=>l,fz:()=>a,gf:()=>g,kS:()=>h,l3:()=>c,se:()=>p,t$:()=>y,tz:()=>b,yW:()=>m});var n=r(94825),i=r(37968);function o(t){return(0,n.A)((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.rR)/i.Fq}))}var a=o(0),s=o(1),l=o(2),c=o(3),d=o(4),u=o(5),h=o(6),p=a.range,f=s.range,m=l.range,g=c.range,v=d.range,b=u.range,y=h.range},28397:(t,e,r)=>{"use strict";r.d(e,{A:()=>o,V:()=>a});var n=r(94825),i=(0,n.A)((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?(0,n.A)((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,r){e.setFullYear(e.getFullYear()+r*t)})):null};const o=i;var a=i.range},43362:(t,e,r)=>{"use strict";var n=r(38232),i=r(66367),o=r(48744),a=r(55572);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new o("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,d=arguments.length>6&&arguments[6],u=!!a&&a(t,e);if(n)n(t,e,{configurable:null===c&&u?u.configurable:!c,enumerable:null===s&&u?u.enumerable:!s,value:r,writable:null===l&&u?u.writable:!l});else{if(!d&&(s||l||c))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},10781:(t,e,r)=>{"use strict";var n=r(99952),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=r(43362),l=r(20419)(),c=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(i=n)||"[object Function]"!==o.call(i)||!n())return;var i;l?s(t,e,r,!0):s(t,e,r)},d=function(t,e){var r=arguments.length>2?arguments[2]:{},o=n(e);i&&(o=a.call(o,Object.getOwnPropertySymbols(e)));for(var s=0;s{"use strict";t.exports=function(){for(var t=0;t{"use strict";t.exports=n;var e=(n.canvas=document.createElement("canvas")).getContext("2d"),r=i([32,126]);function n(t,n){Array.isArray(t)&&(t=t.join(", "));var o,a={},s=16,l=.05;n&&(2===n.length&&"number"==typeof n[0]?o=i(n):Array.isArray(n)?o=n:(n.o?o=i(n.o):n.pairs&&(o=n.pairs),n.fontSize&&(s=n.fontSize),null!=n.threshold&&(l=n.threshold))),o||(o=r),e.font=s+"px "+t;for(var c=0;cs*l){var p=(h-u)/s;a[d]=1e3*p}}return a}function i(t){for(var e=[],r=t[0];r<=t[1];r++)for(var n=String.fromCharCode(r),i=t[0];i{var n=r(97883),i=r(25058),o={M:"moveTo",C:"bezierCurveTo"};t.exports=function(t,e){t.beginPath(),i(n(e)).forEach((function(e){var r=e[0],n=e.slice(1);t[o[r]].apply(t,n)})),t.closePath()}},22366:t=>{t.exports=function(t){switch(t){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},31338:t=>{"use strict";function e(t,r,n){var i=0|t[n];if(i<=0)return[];var o,a=new Array(i);if(n===t.length-1)for(o=0;o0)return function(t,e){var r,n;for(r=new Array(t),n=0;n{"use strict";function e(t,e,n){n=n||2;var o,a,s,l,u,h,f,m=e&&e.length,g=m?e[0]*n:t.length,v=r(t,0,g,n,!0),b=[];if(!v||v.next===v.prev)return b;if(m&&(v=function(t,e,n,i){var o,a,s,l=[];for(o=0,a=e.length;o80*n){o=s=t[0],a=l=t[1];for(var y=n;ys&&(s=u),h>l&&(l=h);f=0!==(f=Math.max(s-o,l-a))?32767/f:0}return i(v,b,n,o,a,f,0),b}function r(t,e,r,n,i){var o,a;if(i===M(t,e,r,n)>0)for(o=e;o=e;o-=n)a=k(o,t[o],t[o+1],a);return a&&v(a,a.next)&&(A(a),a=a.next),a}function n(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!v(n,n.next)&&0!==g(n.prev,n,n.next))n=n.next;else{if(A(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function i(t,e,r,c,d,u,p){if(t){!p&&u&&function(t,e,r,n){var i=t;do{0===i.z&&(i.z=h(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,o,a,s,l,c=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,n=r,s=0,e=0;e0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;r=n}o.nextZ=null,c*=2}while(a>1)}(i)}(t,c,d,u);for(var f,m,g=t;t.prev!==t.next;)if(f=t.prev,m=t.next,u?a(t,c,d,u):o(t))e.push(f.i/r|0),e.push(t.i/r|0),e.push(m.i/r|0),A(t),t=m.next,g=m.next;else if((t=m)===g){p?1===p?i(t=s(n(t),e,r),e,r,c,d,u,2):2===p&&l(t,e,r,c,d,u):i(n(t),e,r,c,d,u,1);break}}}function o(t){var e=t.prev,r=t,n=t.next;if(g(e,r,n)>=0)return!1;for(var i=e.x,o=r.x,a=n.x,s=e.y,l=r.y,c=n.y,d=io?i>a?i:a:o>a?o:a,p=s>l?s>c?s:c:l>c?l:c,m=n.next;m!==e;){if(m.x>=d&&m.x<=h&&m.y>=u&&m.y<=p&&f(i,s,o,l,a,c,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function a(t,e,r,n){var i=t.prev,o=t,a=t.next;if(g(i,o,a)>=0)return!1;for(var s=i.x,l=o.x,c=a.x,d=i.y,u=o.y,p=a.y,m=sl?s>c?s:c:l>c?l:c,y=d>u?d>p?d:p:u>p?u:p,x=h(m,v,e,r,n),w=h(b,y,e,r,n),_=t.prevZ,k=t.nextZ;_&&_.z>=x&&k&&k.z<=w;){if(_.x>=m&&_.x<=b&&_.y>=v&&_.y<=y&&_!==i&&_!==a&&f(s,d,l,u,c,p,_.x,_.y)&&g(_.prev,_,_.next)>=0)return!1;if(_=_.prevZ,k.x>=m&&k.x<=b&&k.y>=v&&k.y<=y&&k!==i&&k!==a&&f(s,d,l,u,c,p,k.x,k.y)&&g(k.prev,k,k.next)>=0)return!1;k=k.nextZ}for(;_&&_.z>=x;){if(_.x>=m&&_.x<=b&&_.y>=v&&_.y<=y&&_!==i&&_!==a&&f(s,d,l,u,c,p,_.x,_.y)&&g(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;k&&k.z<=w;){if(k.x>=m&&k.x<=b&&k.y>=v&&k.y<=y&&k!==i&&k!==a&&f(s,d,l,u,c,p,k.x,k.y)&&g(k.prev,k,k.next)>=0)return!1;k=k.nextZ}return!0}function s(t,e,r){var i=t;do{var o=i.prev,a=i.next.next;!v(o,a)&&b(o,i,i.next,a)&&w(o,a)&&w(a,o)&&(e.push(o.i/r|0),e.push(i.i/r|0),e.push(a.i/r|0),A(i),A(i.next),i=t=a),i=i.next}while(i!==t);return n(i)}function l(t,e,r,o,a,s){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&m(l,c)){var d=_(l,c);return l=n(l,l.next),d=n(d,d.next),i(l,e,r,o,a,s,0),void i(d,e,r,o,a,s,0)}c=c.next}l=l.next}while(l!==t)}function c(t,e){return t.x-e.x}function d(t,e){var r=function(t,e){var r,n=e,i=t.x,o=t.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>a&&(a=s,r=n.x=n.x&&n.x>=d&&i!==n.x&&f(or.x||n.x===r.x&&u(r,n)))&&(r=n,p=l)),n=n.next}while(n!==c);return r}(t,e);if(!r)return e;var i=_(r,t);return n(i,i.next),n(r,r.next)}function u(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function h(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,r=t;do{(e.x=(t-a)*(o-s)&&(t-a)*(n-s)>=(r-a)*(e-s)&&(r-a)*(o-s)>=(i-a)*(n-s)}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&b(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(w(t,e)&&w(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||v(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,r,n){var i=x(g(t,e,r)),o=x(g(t,e,n)),a=x(g(r,n,t)),s=x(g(r,n,e));return i!==o&&a!==s||!(0!==i||!y(t,r,e))||!(0!==o||!y(t,n,e))||!(0!==a||!y(r,t,n))||!(0!==s||!y(r,e,n))}function y(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function x(t){return t>0?1:t<0?-1:0}function w(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function _(t,e){var r=new T(t.i,t.x,t.y),n=new T(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function k(t,e,r,n){var i=new T(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function A(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function T(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function M(t,e,r,n){for(var i=0,o=e,a=r-n;o0&&(n+=t[i-1].length,r.holes.push(n))}return r}},38232:(t,e,r)=>{"use strict";var n=r(59412)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(t){n=!1}t.exports=n},33674:t=>{"use strict";t.exports=EvalError},94234:t=>{"use strict";t.exports=Error},8975:t=>{"use strict";t.exports=RangeError},59299:t=>{"use strict";t.exports=ReferenceError},66367:t=>{"use strict";t.exports=SyntaxError},48744:t=>{"use strict";t.exports=TypeError},63432:t=>{"use strict";t.exports=URIError},18918:(t,e,r)=>{"use strict";var n=r(2033);t.exports=function(){return n(this).length=0,this}},54034:(t,e,r)=>{"use strict";t.exports=r(90329)()?Array.from:r(28741)},90329:t=>{"use strict";t.exports=function(){var t,e,r=Array.from;return"function"==typeof r&&(e=r(t=["raz","dwa"]),Boolean(e&&e!==t&&"dwa"===e[1]))}},28741:(t,e,r)=>{"use strict";var n=r(89791).iterator,i=r(40471),o=r(85875),a=r(60812),s=r(55366),l=r(2033),c=r(93767),d=r(54295),u=Array.isArray,h=Function.prototype.call,p={configurable:!0,enumerable:!0,writable:!0,value:null},f=Object.defineProperty;t.exports=function(t){var e,r,m,g,v,b,y,x,w,_,k=arguments[1],A=arguments[2];if(t=Object(l(t)),c(k)&&s(k),this&&this!==Array&&o(this))e=this;else{if(!k){if(i(t))return 1!==(v=t.length)?Array.apply(null,t):((g=new Array(1))[0]=t[0],g);if(u(t)){for(g=new Array(v=t.length),r=0;r=55296&&b<=56319&&(_+=t[++r]),_=k?h.call(k,A,_,m):_,e?(p.value=_,f(g,m,p)):g[m]=_,++m;v=m}if(void 0===v)for(v=a(t.length),e&&(g=new e(v)),r=0;r{"use strict";var e=Object.prototype.toString,r=e.call(function(){return arguments}());t.exports=function(t){return e.call(t)===r}},85875:t=>{"use strict";var e=Object.prototype.toString,r=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);t.exports=function(t){return"function"==typeof t&&r(e.call(t))}},20450:t=>{"use strict";t.exports=function(){}},55334:(t,e,r)=>{"use strict";t.exports=r(42669)()?Math.sign:r(78209)},42669:t=>{"use strict";t.exports=function(){var t=Math.sign;return"function"==typeof t&&1===t(10)&&-1===t(-20)}},78209:t=>{"use strict";t.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},28371:(t,e,r)=>{"use strict";var n=r(55334),i=Math.abs,o=Math.floor;t.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&&isFinite(t)?n(t)*o(i(t)):t}},60812:(t,e,r)=>{"use strict";var n=r(28371),i=Math.max;t.exports=function(t){return i(0,n(t))}},78826:(t,e,r)=>{"use strict";var n=r(55366),i=r(2033),o=Function.prototype.bind,a=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(r,c){var d,u=arguments[2],h=arguments[3];return r=Object(i(r)),n(c),d=s(r),h&&d.sort("function"==typeof h?o.call(h,r):void 0),"function"!=typeof t&&(t=d[t]),a.call(t,d,(function(t,n){return l.call(r,t)?a.call(c,u,r[t],t,r,n):e}))}}},18021:(t,e,r)=>{"use strict";t.exports=r(99484)()?Object.assign:r(28752)},99484:t=>{"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},28752:(t,e,r)=>{"use strict";var n=r(87984),i=r(2033),o=Math.max;t.exports=function(t,e){var r,a,s,l=o(arguments.length,2);for(t=Object(i(t)),s=function(n){try{t[n]=e[n]}catch(t){r||(r=t)}},a=1;a{"use strict";var n=r(54034),i=r(18021),o=r(2033);t.exports=function(t){var e=Object(o(t)),r=arguments[1],a=Object(arguments[2]);if(e!==t&&!r)return e;var s={};return r?n(r,(function(e){(a.ensure||e in t)&&(s[e]=t[e])})):i(s,t),s}},39095:(t,e,r)=>{"use strict";var n,i,o,a,s=Object.create;r(11314)()||(n=r(786)),t.exports=n?1!==n.level?s:(i={},o={},a={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach((function(t){o[t]="__proto__"!==t?a:{configurable:!0,enumerable:!1,writable:!0,value:void 0}})),Object.defineProperties(i,o),Object.defineProperty(n,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:i}),function(t,e){return s(null===t?i:t,e)}):s},17916:(t,e,r)=>{"use strict";t.exports=r(78826)("forEach")},27375:(t,e,r)=>{"use strict";var n=r(93767),i={function:!0,object:!0};t.exports=function(t){return n(t)&&i[typeof t]||!1}},93767:(t,e,r)=>{"use strict";var n=r(20450)();t.exports=function(t){return t!==n&&null!==t}},87984:(t,e,r)=>{"use strict";t.exports=r(60263)()?Object.keys:r(42351)},60263:t=>{"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},42351:(t,e,r)=>{"use strict";var n=r(93767),i=Object.keys;t.exports=function(t){return i(n(t)?Object(t):t)}},30829:(t,e,r)=>{"use strict";var n=r(55366),i=r(17916),o=Function.prototype.call;t.exports=function(t,e){var r={},a=arguments[2];return n(e),i(t,(function(t,n,i,s){r[n]=o.call(e,a,t,n,i,s)})),r}},54863:(t,e,r)=>{"use strict";var n=r(93767),i=Array.prototype.forEach,o=Object.create;t.exports=function(t){var e=o(null);return i.call(arguments,(function(t){n(t)&&function(t,e){var r;for(r in t)e[r]=t[r]}(Object(t),e)})),e}},83579:(t,e,r)=>{"use strict";t.exports=r(11314)()?Object.setPrototypeOf:r(786)},11314:t=>{"use strict";var e=Object.create,r=Object.getPrototypeOf,n={};t.exports=function(){var t=Object.setPrototypeOf;return"function"==typeof t&&r(t((arguments[0]||e)(null),n))===n}},786:(t,e,r)=>{"use strict";var n,i,o,a,s=r(27375),l=r(2033),c=Object.prototype.isPrototypeOf,d=Object.defineProperty,u={configurable:!0,enumerable:!1,writable:!0,value:void 0};n=function(t,e){if(l(t),null===e||s(e))return t;throw new TypeError("Prototype must be null or an object")},t.exports=(i=function(){var t,e=Object.create(null),r={},n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{(t=n.set).call(e,r)}catch(t){}if(Object.getPrototypeOf(e)===r)return{set:t,level:2}}return e.__proto__=r,Object.getPrototypeOf(e)===r?{level:2}:((e={}).__proto__=r,Object.getPrototypeOf(e)===r&&{level:1})}(),i?(2===i.level?i.set?(a=i.set,o=function(t,e){return a.call(n(t,e),e),t}):o=function(t,e){return n(t,e).__proto__=e,t}:o=function t(e,r){var i;return n(e,r),(i=c.call(t.nullPolyfill,e))&&delete t.nullPolyfill.__proto__,null===r&&(r=t.nullPolyfill),e.__proto__=r,i&&d(t.nullPolyfill,"__proto__",u),e},Object.defineProperty(o,"level",{configurable:!1,enumerable:!1,writable:!1,value:i.level})):null),r(39095)},55366:t=>{"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},66529:(t,e,r)=>{"use strict";var n=r(27375);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not an Object");return t}},2033:(t,e,r)=>{"use strict";var n=r(93767);t.exports=function(t){if(!n(t))throw new TypeError("Cannot use null or undefined");return t}},79813:(t,e,r)=>{"use strict";t.exports=r(82844)()?String.prototype.contains:r(65040)},82844:t=>{"use strict";var e="razdwatrzy";t.exports=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}},65040:t=>{"use strict";var e=String.prototype.indexOf;t.exports=function(t){return e.call(this,t,arguments[1])>-1}},54295:t=>{"use strict";var e=Object.prototype.toString,r=e.call("");t.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||e.call(t)===r)||!1}},36434:t=>{"use strict";var e=Object.create(null),r=Math.random;t.exports=function(){var t;do{t=r().toString(36).slice(2)}while(e[t]);return t}},46136:(t,e,r)=>{"use strict";var n,i=r(83579),o=r(79813),a=r(86142),s=r(89791),l=r(15929),c=Object.defineProperty;n=t.exports=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");l.call(this,t),e=e?o.call(e,"key+value")?"key+value":o.call(e,"key")?"key":"value":"value",c(this,"__kind__",a("",e))},i&&i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:a((function(t){return"value"===this.__kind__?this.__list__[t]:"key+value"===this.__kind__?[t,this.__list__[t]]:t}))}),c(n.prototype,s.toStringTag,a("c","Array Iterator"))},88822:(t,e,r)=>{"use strict";var n=r(40471),i=r(55366),o=r(54295),a=r(28753),s=Array.isArray,l=Function.prototype.call,c=Array.prototype.some;t.exports=function(t,e){var r,d,u,h,p,f,m,g,v=arguments[2];if(s(t)||n(t)?r="array":o(t)?r="string":t=a(t),i(e),u=function(){h=!0},"array"!==r)if("string"!==r)for(d=t.next();!d.done;){if(l.call(e,v,d.value,u),h)return;d=t.next()}else for(f=t.length,p=0;p=55296&&g<=56319&&(m+=t[++p]),l.call(e,v,m,u),!h);++p);else c.call(t,(function(t){return l.call(e,v,t,u),h}))}},28753:(t,e,r)=>{"use strict";var n=r(40471),i=r(54295),o=r(46136),a=r(45408),s=r(86898),l=r(89791).iterator;t.exports=function(t){return"function"==typeof s(t)[l]?t[l]():n(t)?new o(t):i(t)?new a(t):new o(t)}},15929:(t,e,r)=>{"use strict";var n,i=r(18918),o=r(18021),a=r(55366),s=r(2033),l=r(86142),c=r(39683),d=r(89791),u=Object.defineProperty,h=Object.defineProperties;t.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");h(this,{__list__:l("w",s(t)),__context__:l("w",e),__nextIndex__:l("w",0)}),e&&(a(e.on),e.on("_add",this._onAdd),e.on("_delete",this._onDelete),e.on("_clear",this._onClear))},delete n.prototype.constructor,h(n.prototype,o({_next:l((function(){var t;if(this.__list__)return this.__redo__&&void 0!==(t=this.__redo__.shift())?t:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(e,r){e>=t&&(this.__redo__[r]=++e)}),this),this.__redo__.push(t)):u(this,"__redo__",l("c",[t])))})),_onDelete:l((function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(e=this.__redo__.indexOf(t))&&this.__redo__.splice(e,1),this.__redo__.forEach((function(e,r){e>t&&(this.__redo__[r]=--e)}),this)))})),_onClear:l((function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0}))}))),u(n.prototype,d.iterator,l((function(){return this})))},46692:(t,e,r)=>{"use strict";var n=r(40471),i=r(93767),o=r(54295),a=r(89791).iterator,s=Array.isArray;t.exports=function(t){return!(!i(t)||!s(t)&&!o(t)&&!n(t)&&"function"!=typeof t[a])}},45408:(t,e,r)=>{"use strict";var n,i=r(83579),o=r(86142),a=r(89791),s=r(15929),l=Object.defineProperty;n=t.exports=function(t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");t=String(t),s.call(this,t),l(this,"__length__",o("",t.length))},i&&i(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:o((function(){if(this.__list__)return this.__nextIndex__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,a.toStringTag,o("c","String Iterator"))},86898:(t,e,r)=>{"use strict";var n=r(46692);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not iterable");return t}},89791:(t,e,r)=>{"use strict";t.exports=r(87494)()?r(63844).Symbol:r(44164)},87494:(t,e,r)=>{"use strict";var n=r(63844),i={object:!0,symbol:!0};t.exports=function(){var t,e=n.Symbol;if("function"!=typeof e)return!1;t=e("test symbol");try{String(t)}catch(t){return!1}return!!i[typeof e.iterator]&&!!i[typeof e.toPrimitive]&&!!i[typeof e.toStringTag]}},84848:t=>{"use strict";t.exports=function(t){return!!t&&("symbol"==typeof t||!!t.constructor&&"Symbol"===t.constructor.name&&"Symbol"===t[t.constructor.toStringTag])}},78718:(t,e,r)=>{"use strict";var n=r(86142),i=Object.create,o=Object.defineProperty,a=Object.prototype,s=i(null);t.exports=function(t){for(var e,r,i=0;s[t+(i||"")];)++i;return s[t+=i||""]=!0,o(a,e="@@"+t,n.gs(null,(function(t){r||(r=!0,o(this,e,n(t)),r=!1)}))),e}},25052:(t,e,r)=>{"use strict";var n=r(86142),i=r(63844).Symbol;t.exports=function(t){return Object.defineProperties(t,{hasInstance:n("",i&&i.hasInstance||t("hasInstance")),isConcatSpreadable:n("",i&&i.isConcatSpreadable||t("isConcatSpreadable")),iterator:n("",i&&i.iterator||t("iterator")),match:n("",i&&i.match||t("match")),replace:n("",i&&i.replace||t("replace")),search:n("",i&&i.search||t("search")),species:n("",i&&i.species||t("species")),split:n("",i&&i.split||t("split")),toPrimitive:n("",i&&i.toPrimitive||t("toPrimitive")),toStringTag:n("",i&&i.toStringTag||t("toStringTag")),unscopables:n("",i&&i.unscopables||t("unscopables"))})}},68813:(t,e,r)=>{"use strict";var n=r(86142),i=r(85618),o=Object.create(null);t.exports=function(t){return Object.defineProperties(t,{for:n((function(e){return o[e]?o[e]:o[e]=t(String(e))})),keyFor:n((function(t){var e;for(e in i(t),o)if(o[e]===t)return e}))})}},44164:(t,e,r)=>{"use strict";var n,i,o,a=r(86142),s=r(85618),l=r(63844).Symbol,c=r(78718),d=r(25052),u=r(68813),h=Object.create,p=Object.defineProperties,f=Object.defineProperty;if("function"==typeof l)try{String(l()),o=!0}catch(t){}else l=null;i=function(t){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return n(t)},t.exports=n=function t(e){var r;if(this instanceof t)throw new TypeError("Symbol is not a constructor");return o?l(e):(r=h(i.prototype),e=void 0===e?"":String(e),p(r,{__description__:a("",e),__name__:a("",c(e))}))},d(n),u(n),p(i.prototype,{constructor:a(n),toString:a("",(function(){return this.__name__}))}),p(n.prototype,{toString:a((function(){return"Symbol ("+s(this).__description__+")"})),valueOf:a((function(){return s(this)}))}),f(n.prototype,n.toPrimitive,a("",(function(){var t=s(this);return"symbol"==typeof t?t:t.toString()}))),f(n.prototype,n.toStringTag,a("c","Symbol")),f(i.prototype,n.toStringTag,a("c",n.prototype[n.toStringTag])),f(i.prototype,n.toPrimitive,a("c",n.prototype[n.toPrimitive]))},85618:(t,e,r)=>{"use strict";var n=r(84848);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not a symbol");return t}},41456:(t,e,r)=>{"use strict";t.exports=r(39687)()?WeakMap:r(87841)},39687:t=>{"use strict";t.exports=function(){var t,e;if("function"!=typeof WeakMap)return!1;try{t=new WeakMap([[e={},"one"],[{},"two"],[{},"three"]])}catch(t){return!1}return"[object WeakMap]"===String(t)&&"function"==typeof t.set&&t.set({},1)===t&&"function"==typeof t.delete&&"function"==typeof t.has&&"one"===t.get(e)}},99037:t=>{"use strict";t.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)},87841:(t,e,r)=>{"use strict";var n,i=r(93767),o=r(83579),a=r(66529),s=r(2033),l=r(36434),c=r(86142),d=r(28753),u=r(88822),h=r(89791).toStringTag,p=r(99037),f=Array.isArray,m=Object.defineProperty,g=Object.prototype.hasOwnProperty,v=Object.getPrototypeOf;t.exports=n=function(){var t,e=arguments[0];if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");return t=p&&o&&WeakMap!==n?o(new WeakMap,v(this)):this,i(e)&&(f(e)||(e=d(e))),m(t,"__weakMapData__",c("c","$weakMap$"+l())),e?(u(e,(function(e){s(e),t.set(e[0],e[1])})),t):t},p&&(o&&o(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:c(n)})),Object.defineProperties(n.prototype,{delete:c((function(t){return!!g.call(a(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)})),get:c((function(t){if(g.call(a(t),this.__weakMapData__))return t[this.__weakMapData__]})),has:c((function(t){return g.call(a(t),this.__weakMapData__)})),set:c((function(t,e){return m(a(t),this.__weakMapData__,c("c",e)),this})),toString:c((function(){return"[object WeakMap]"}))}),m(n.prototype,h,c("c","WeakMap"))},86626:t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}m(t,e,o,{once:!0}),"error"!==e&&function(t,e){"function"==typeof t.on&&m(t,"error",e,{once:!0})}(t,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function c(t,e,r,n){var i,o,a,c;if(s(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"==typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=l(t))>0&&a.length>i&&!a.warned){a.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=t,d.type=e,d.count=a.length,c=d,console&&console.warn&&console.warn(c)}return t}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=d.bind(n);return i.listener=r,n.wrapFn=i,i}function h(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[t];if(void 0===l)return!1;if("function"==typeof l)n(l,this,e);else{var c=l.length,d=f(l,c);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return h(this,t,!0)},o.prototype.rawListeners=function(t){return h(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},44232:t=>{var e=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};t.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return e()}try{return __global__||e()}finally{delete Object.prototype.__global__}}()},63844:(t,e,r)=>{"use strict";t.exports=r(25515)()?globalThis:r(44232)},25515:t=>{"use strict";t.exports=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}},7370:(t,e,r)=>{"use strict";var n=r(45219);t.exports=function(t){var e=typeof t;if("string"===e){var r=t;if(0==(t=+t)&&n(r))return!1}else if("number"!==e)return!1;return t-t<1}},97e3:(t,e,r)=>{var n=r(22366);t.exports=function(t,e,r){if(!t)throw new TypeError("must specify data as first parameter");if(r=0|+(r||0),Array.isArray(t)&&t[0]&&"number"==typeof t[0][0]){var i,o,a,s,l=t[0].length,c=t.length*l;e&&"string"!=typeof e||(e=new(n(e||"float32"))(c+r));var d=e.length-r;if(c!==d)throw new Error("source length "+c+" ("+l+"x"+t.length+") does not match destination length "+d);for(i=0,a=r;i{"use strict";var n=r(40288),i=[32,126];t.exports=function(t){var e=(t=t||{}).shape?t.shape:t.canvas?[t.canvas.width,t.canvas.height]:[512,512],r=t.canvas||document.createElement("canvas"),o=t.font,a="number"==typeof t.step?[t.step,t.step]:t.step||[32,32],s=t.chars||i;if(o&&"string"!=typeof o&&(o=n(o)),Array.isArray(s)){if(2===s.length&&"number"==typeof s[0]&&"number"==typeof s[1]){for(var l=[],c=s[0],d=0;c<=s[1];c++)l[d++]=String.fromCharCode(c);s=l}}else s=String(s).split("");e=e.slice(),r.width=e[0],r.height=e[1];var u=r.getContext("2d");u.fillStyle="#000",u.fillRect(0,0,r.width,r.height),u.font=o,u.textAlign="center",u.textBaseline="middle",u.fillStyle="#fff";var h=a[0]/2,p=a[1]/2;for(c=0;ce[0]-a[0]/2&&(h=a[0]/2,p+=a[1]);return r}},45250:t=>{"use strict";function e(t,o){o||(o={}),("string"==typeof t||Array.isArray(t))&&(o.family=t);var a=Array.isArray(o.family)?o.family.join(", "):o.family;if(!a)throw Error("`family` must be defined");var s=o.size||o.fontSize||o.em||48,l=o.weight||o.fontWeight||"",c=(t=[o.style||o.fontStyle||"",l,s].join(" ")+"px "+a,o.origin||"top");if(e.cache[a]&&s<=e.cache[a].em)return r(e.cache[a],c);var d=o.canvas||e.canvas,u=d.getContext("2d"),h={upper:void 0!==o.upper?o.upper:"H",lower:void 0!==o.lower?o.lower:"x",descent:void 0!==o.descent?o.descent:"p",ascent:void 0!==o.ascent?o.ascent:"h",tittle:void 0!==o.tittle?o.tittle:"i",overshoot:void 0!==o.overshoot?o.overshoot:"O"},p=Math.ceil(1.5*s);d.height=p,d.width=.5*p,u.font=t;var f="H",m={top:0};u.clearRect(0,0,p,p),u.textBaseline="top",u.fillStyle="black",u.fillText(f,0,0);var g=n(u.getImageData(0,0,p,p));u.clearRect(0,0,p,p),u.textBaseline="bottom",u.fillText(f,0,p);var v=n(u.getImageData(0,0,p,p));m.lineHeight=m.bottom=p-v+g,u.clearRect(0,0,p,p),u.textBaseline="alphabetic",u.fillText(f,0,p);var b=p-n(u.getImageData(0,0,p,p))-1+g;m.baseline=m.alphabetic=b,u.clearRect(0,0,p,p),u.textBaseline="middle",u.fillText(f,0,.5*p);var y=n(u.getImageData(0,0,p,p));m.median=m.middle=p-y-1+g-.5*p,u.clearRect(0,0,p,p),u.textBaseline="hanging",u.fillText(f,0,.5*p);var x=n(u.getImageData(0,0,p,p));m.hanging=p-x-1+g-.5*p,u.clearRect(0,0,p,p),u.textBaseline="ideographic",u.fillText(f,0,p);var w=n(u.getImageData(0,0,p,p));if(m.ideographic=p-w-1+g,h.upper&&(u.clearRect(0,0,p,p),u.textBaseline="top",u.fillText(h.upper,0,0),m.upper=n(u.getImageData(0,0,p,p)),m.capHeight=m.baseline-m.upper),h.lower&&(u.clearRect(0,0,p,p),u.textBaseline="top",u.fillText(h.lower,0,0),m.lower=n(u.getImageData(0,0,p,p)),m.xHeight=m.baseline-m.lower),h.tittle&&(u.clearRect(0,0,p,p),u.textBaseline="top",u.fillText(h.tittle,0,0),m.tittle=n(u.getImageData(0,0,p,p))),h.ascent&&(u.clearRect(0,0,p,p),u.textBaseline="top",u.fillText(h.ascent,0,0),m.ascent=n(u.getImageData(0,0,p,p))),h.descent&&(u.clearRect(0,0,p,p),u.textBaseline="top",u.fillText(h.descent,0,0),m.descent=i(u.getImageData(0,0,p,p))),h.overshoot){u.clearRect(0,0,p,p),u.textBaseline="top",u.fillText(h.overshoot,0,0);var _=i(u.getImageData(0,0,p,p));m.overshoot=_-b}for(var k in m)m[k]/=s;return m.em=s,e.cache[a]=m,r(m,c)}function r(t,e){var r={};for(var n in"string"==typeof e&&(e=t[e]),t)"em"!==n&&(r[n]=t[n]-e);return r}function n(t){for(var e=t.height,r=t.data,n=3;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}t.exports=e,e.canvas=document.createElement("canvas"),e.cache={}},85573:(t,e,r)=>{"use strict";var n=r(60245),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===i.call(t)?function(t,e,r){for(var n=0,i=t.length;n{"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n{"use strict";var n=r(5438);t.exports=Function.prototype.bind||n},64487:t=>{t.exports=function(t,e){if("string"!=typeof t)throw new TypeError("must specify type string");if(e=e||{},"undefined"==typeof document&&!e.canvas)return null;var r=e.canvas||document.createElement("canvas");"number"==typeof e.width&&(r.width=e.width),"number"==typeof e.height&&(r.height=e.height);var n,i=e;try{var o=[t];0===t.indexOf("webgl")&&o.push("experimental-"+t);for(var a=0;a{"use strict";var n,i=r(94234),o=r(33674),a=r(8975),s=r(59299),l=r(66367),c=r(48744),d=r(63432),u=Function,h=function(t){try{return u('"use strict"; return ('+t+").constructor;")()}catch(t){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(t){p=null}var f=function(){throw new c},m=p?function(){try{return f}catch(t){try{return p(arguments,"callee").get}catch(t){return f}}}():f,g=r(23266)(),v=r(39681)(),b=Object.getPrototypeOf||(v?function(t){return t.__proto__}:null),y={},x="undefined"!=typeof Uint8Array&&b?b(Uint8Array):n,w={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":u,"%GeneratorFunction%":y,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":l,"%ThrowTypeError%":m,"%TypedArray%":x,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":d,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(b)try{null.error}catch(t){var _=b(b(t));w["%Error.prototype%"]=_}var k=function t(e){var r;if("%AsyncFunction%"===e)r=h("async function () {}");else if("%GeneratorFunction%"===e)r=h("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=h("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&b&&(r=b(i.prototype))}return w[e]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},T=r(35366),M=r(19942),S=T.call(Function.call,Array.prototype.concat),C=T.call(Function.apply,Array.prototype.splice),E=T.call(Function.call,String.prototype.replace),L=T.call(Function.call,String.prototype.slice),z=T.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,I=function(t,e){var r,n=t;if(M(A,n)&&(n="%"+(r=A[n])[0]+"%"),M(w,n)){var i=w[n];if(i===y&&(i=k(n)),void 0===i&&!e)throw new c("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new l("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new c('"allowMissing" argument must be a boolean');if(null===z(/^%?[^%]*%?$/,t))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=L(t,0,1),r=L(t,-1);if("%"===e&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new l("invalid intrinsic syntax, expected opening `%`");var n=[];return E(t,O,(function(t,e,r,i){n[n.length]=r?E(i,D,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=I("%"+n+"%",e),o=i.name,a=i.value,s=!1,d=i.alias;d&&(n=d[0],C(r,S([0,1],d)));for(var u=1,h=!0;u=r.length){var v=p(a,f);a=(h=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:a[f]}else h=M(a,f),a=a[f];h&&!s&&(w[o]=a)}}return a}},4813:t=>{t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],d=e[8],u=e[9],h=e[10],p=e[11],f=e[12],m=e[13],g=e[14],v=e[15];return t[0]=s*(h*v-p*g)-u*(l*v-c*g)+m*(l*p-c*h),t[1]=-(n*(h*v-p*g)-u*(i*v-o*g)+m*(i*p-o*h)),t[2]=n*(l*v-c*g)-s*(i*v-o*g)+m*(i*c-o*l),t[3]=-(n*(l*p-c*h)-s*(i*p-o*h)+u*(i*c-o*l)),t[4]=-(a*(h*v-p*g)-d*(l*v-c*g)+f*(l*p-c*h)),t[5]=r*(h*v-p*g)-d*(i*v-o*g)+f*(i*p-o*h),t[6]=-(r*(l*v-c*g)-a*(i*v-o*g)+f*(i*c-o*l)),t[7]=r*(l*p-c*h)-a*(i*p-o*h)+d*(i*c-o*l),t[8]=a*(u*v-p*m)-d*(s*v-c*m)+f*(s*p-c*u),t[9]=-(r*(u*v-p*m)-d*(n*v-o*m)+f*(n*p-o*u)),t[10]=r*(s*v-c*m)-a*(n*v-o*m)+f*(n*c-o*s),t[11]=-(r*(s*p-c*u)-a*(n*p-o*u)+d*(n*c-o*s)),t[12]=-(a*(u*g-h*m)-d*(s*g-l*m)+f*(s*h-l*u)),t[13]=r*(u*g-h*m)-d*(n*g-i*m)+f*(n*h-i*u),t[14]=-(r*(s*g-l*m)-a*(n*g-i*m)+f*(n*l-i*s)),t[15]=r*(s*h-l*u)-a*(n*h-i*u)+d*(n*l-i*s),t}},1903:t=>{t.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},42981:t=>{t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},46864:t=>{t.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},49921:t=>{t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],c=t[8],d=t[9],u=t[10],h=t[11],p=t[12],f=t[13],m=t[14],g=t[15];return(e*a-r*o)*(u*g-h*m)-(e*s-n*o)*(d*g-h*f)+(e*l-i*o)*(d*m-u*f)+(r*s-n*a)*(c*g-h*p)-(r*l-i*a)*(c*m-u*p)+(n*l-i*s)*(c*f-d*p)}},17399:t=>{t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=r+r,s=n+n,l=i+i,c=r*a,d=n*a,u=n*s,h=i*a,p=i*s,f=i*l,m=o*a,g=o*s,v=o*l;return t[0]=1-u-f,t[1]=d+v,t[2]=h-g,t[3]=0,t[4]=d-v,t[5]=1-c-f,t[6]=p+m,t[7]=0,t[8]=h+g,t[9]=p-m,t[10]=1-c-u,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},7354:t=>{t.exports=function(t,e,r){var n,i,o,a=r[0],s=r[1],l=r[2],c=Math.sqrt(a*a+s*s+l*l);return Math.abs(c)<1e-6?null:(a*=c=1/c,s*=c,l*=c,n=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=s*a*o+l*n,t[2]=l*a*o-s*n,t[3]=0,t[4]=a*s*o-l*n,t[5]=s*s*o+i,t[6]=l*s*o+a*n,t[7]=0,t[8]=a*l*o+s*n,t[9]=s*l*o-a*n,t[10]=l*l*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}},76743:t=>{t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3],s=n+n,l=i+i,c=o+o,d=n*s,u=n*l,h=n*c,p=i*l,f=i*c,m=o*c,g=a*s,v=a*l,b=a*c;return t[0]=1-(p+m),t[1]=u+b,t[2]=h-v,t[3]=0,t[4]=u-b,t[5]=1-(d+m),t[6]=f+g,t[7]=0,t[8]=h+v,t[9]=f-g,t[10]=1-(d+p),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}},90367:t=>{t.exports=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},68673:t=>{t.exports=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}},80180:t=>{t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},68727:t=>{t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},96402:t=>{t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},29192:t=>{t.exports=function(t,e,r,n,i,o,a){var s=1/(r-e),l=1/(i-n),c=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(r+e)*s,t[9]=(i+n)*l,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t}},87894:t=>{t.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},79538:(t,e,r)=>{t.exports={create:r(46864),clone:r(1903),copy:r(42981),identity:r(87894),transpose:r(45665),invert:r(27608),adjoint:r(4813),determinant:r(49921),multiply:r(66760),translate:r(77656),scale:r(62504),rotate:r(26079),rotateX:r(15567),rotateY:r(52408),rotateZ:r(27089),fromRotation:r(7354),fromRotationTranslation:r(76743),fromScaling:r(90367),fromTranslation:r(68673),fromXRotation:r(80180),fromYRotation:r(68727),fromZRotation:r(96402),fromQuat:r(17399),frustum:r(29192),perspective:r(4772),perspectiveFromFieldOfView:r(11882),ortho:r(74040),lookAt:r(66582),str:r(65213)}},27608:t=>{t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],d=e[8],u=e[9],h=e[10],p=e[11],f=e[12],m=e[13],g=e[14],v=e[15],b=r*s-n*a,y=r*l-i*a,x=r*c-o*a,w=n*l-i*s,_=n*c-o*s,k=i*c-o*l,A=d*m-u*f,T=d*g-h*f,M=d*v-p*f,S=u*g-h*m,C=u*v-p*m,E=h*v-p*g,L=b*E-y*C+x*S+w*M-_*T+k*A;return L?(L=1/L,t[0]=(s*E-l*C+c*S)*L,t[1]=(i*C-n*E-o*S)*L,t[2]=(m*k-g*_+v*w)*L,t[3]=(h*_-u*k-p*w)*L,t[4]=(l*M-a*E-c*T)*L,t[5]=(r*E-i*M+o*T)*L,t[6]=(g*x-f*k-v*y)*L,t[7]=(d*k-h*x+p*y)*L,t[8]=(a*C-s*M+c*A)*L,t[9]=(n*M-r*C-o*A)*L,t[10]=(f*_-m*x+v*b)*L,t[11]=(u*x-d*_-p*b)*L,t[12]=(s*T-a*S-l*A)*L,t[13]=(r*S-n*T+i*A)*L,t[14]=(m*y-f*w-g*b)*L,t[15]=(d*w-u*y+h*b)*L,t):null}},66582:(t,e,r)=>{var n=r(87894);t.exports=function(t,e,r,i){var o,a,s,l,c,d,u,h,p,f,m=e[0],g=e[1],v=e[2],b=i[0],y=i[1],x=i[2],w=r[0],_=r[1],k=r[2];return Math.abs(m-w)<1e-6&&Math.abs(g-_)<1e-6&&Math.abs(v-k)<1e-6?n(t):(u=m-w,h=g-_,p=v-k,o=y*(p*=f=1/Math.sqrt(u*u+h*h+p*p))-x*(h*=f),a=x*(u*=f)-b*p,s=b*h-y*u,(f=Math.sqrt(o*o+a*a+s*s))?(o*=f=1/f,a*=f,s*=f):(o=0,a=0,s=0),l=h*s-p*a,c=p*o-u*s,d=u*a-h*o,(f=Math.sqrt(l*l+c*c+d*d))?(l*=f=1/f,c*=f,d*=f):(l=0,c=0,d=0),t[0]=o,t[1]=l,t[2]=u,t[3]=0,t[4]=a,t[5]=c,t[6]=h,t[7]=0,t[8]=s,t[9]=d,t[10]=p,t[11]=0,t[12]=-(o*m+a*g+s*v),t[13]=-(l*m+c*g+d*v),t[14]=-(u*m+h*g+p*v),t[15]=1,t)}},66760:t=>{t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=e[9],p=e[10],f=e[11],m=e[12],g=e[13],v=e[14],b=e[15],y=r[0],x=r[1],w=r[2],_=r[3];return t[0]=y*n+x*s+w*u+_*m,t[1]=y*i+x*l+w*h+_*g,t[2]=y*o+x*c+w*p+_*v,t[3]=y*a+x*d+w*f+_*b,y=r[4],x=r[5],w=r[6],_=r[7],t[4]=y*n+x*s+w*u+_*m,t[5]=y*i+x*l+w*h+_*g,t[6]=y*o+x*c+w*p+_*v,t[7]=y*a+x*d+w*f+_*b,y=r[8],x=r[9],w=r[10],_=r[11],t[8]=y*n+x*s+w*u+_*m,t[9]=y*i+x*l+w*h+_*g,t[10]=y*o+x*c+w*p+_*v,t[11]=y*a+x*d+w*f+_*b,y=r[12],x=r[13],w=r[14],_=r[15],t[12]=y*n+x*s+w*u+_*m,t[13]=y*i+x*l+w*h+_*g,t[14]=y*o+x*c+w*p+_*v,t[15]=y*a+x*d+w*f+_*b,t}},74040:t=>{t.exports=function(t,e,r,n,i,o,a){var s=1/(e-r),l=1/(n-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(a+o)*c,t[15]=1,t}},4772:t=>{t.exports=function(t,e,r,n,i){var o=1/Math.tan(e/2),a=1/(n-i);return t[0]=o/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*a,t[15]=0,t}},11882:t=>{t.exports=function(t,e,r,n){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(a+s),c=2/(i+o);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(a-s)*l*.5,t[9]=(i-o)*c*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t}},26079:t=>{t.exports=function(t,e,r,n){var i,o,a,s,l,c,d,u,h,p,f,m,g,v,b,y,x,w,_,k,A,T,M,S,C=n[0],E=n[1],L=n[2],z=Math.sqrt(C*C+E*E+L*L);return Math.abs(z)<1e-6?null:(C*=z=1/z,E*=z,L*=z,i=Math.sin(r),a=1-(o=Math.cos(r)),s=e[0],l=e[1],c=e[2],d=e[3],u=e[4],h=e[5],p=e[6],f=e[7],m=e[8],g=e[9],v=e[10],b=e[11],y=C*C*a+o,x=E*C*a+L*i,w=L*C*a-E*i,_=C*E*a-L*i,k=E*E*a+o,A=L*E*a+C*i,T=C*L*a+E*i,M=E*L*a-C*i,S=L*L*a+o,t[0]=s*y+u*x+m*w,t[1]=l*y+h*x+g*w,t[2]=c*y+p*x+v*w,t[3]=d*y+f*x+b*w,t[4]=s*_+u*k+m*A,t[5]=l*_+h*k+g*A,t[6]=c*_+p*k+v*A,t[7]=d*_+f*k+b*A,t[8]=s*T+u*M+m*S,t[9]=l*T+h*M+g*S,t[10]=c*T+p*M+v*S,t[11]=d*T+f*M+b*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}},15567:t=>{t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],d=e[9],u=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*n,t[5]=a*i+d*n,t[6]=s*i+u*n,t[7]=l*i+h*n,t[8]=c*i-o*n,t[9]=d*i-a*n,t[10]=u*i-s*n,t[11]=h*i-l*n,t}},52408:t=>{t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],a=e[1],s=e[2],l=e[3],c=e[8],d=e[9],u=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*n,t[1]=a*i-d*n,t[2]=s*i-u*n,t[3]=l*i-h*n,t[8]=o*n+c*i,t[9]=a*n+d*i,t[10]=s*n+u*i,t[11]=l*n+h*i,t}},27089:t=>{t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],a=e[1],s=e[2],l=e[3],c=e[4],d=e[5],u=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*n,t[1]=a*i+d*n,t[2]=s*i+u*n,t[3]=l*i+h*n,t[4]=c*i-o*n,t[5]=d*i-a*n,t[6]=u*i-s*n,t[7]=h*i-l*n,t}},62504:t=>{t.exports=function(t,e,r){var n=r[0],i=r[1],o=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},65213:t=>{t.exports=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}},77656:t=>{t.exports=function(t,e,r){var n,i,o,a,s,l,c,d,u,h,p,f,m=r[0],g=r[1],v=r[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*v+e[12],t[13]=e[1]*m+e[5]*g+e[9]*v+e[13],t[14]=e[2]*m+e[6]*g+e[10]*v+e[14],t[15]=e[3]*m+e[7]*g+e[11]*v+e[15]):(n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=e[9],p=e[10],f=e[11],t[0]=n,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=c,t[7]=d,t[8]=u,t[9]=h,t[10]=p,t[11]=f,t[12]=n*m+s*g+u*v+e[12],t[13]=i*m+l*g+h*v+e[13],t[14]=o*m+c*g+p*v+e[14],t[15]=a*m+d*g+f*v+e[15]),t}},45665:t=>{t.exports=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},69499:(t,e,r)=>{"use strict";var n=r(82393),i=r(9994),o=r(83029),a=r(6627),s=r(41456),l=r(34463),c=r(81937),d=r(31888),u=r(94698),h=r(35867),p=r(3202),f=r(70665),m=r(3812),g=r(34597),v=r(45250),b=r(97e3),y=r(88828).nextPow2,x=new s,w=!1;if(document.body){var _=document.body.appendChild(document.createElement("div"));_.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(_).fontStretch&&(w=!0),document.body.removeChild(_)}var k=function(t){!function(t){return"function"==typeof t&&t._gl&&t.prop&&t.texture&&t.buffer}(t)?this.gl=a(t):(t={regl:t},this.gl=t.regl._gl),this.shader=x.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||o({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),x.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(h(t)?t:{})};k.prototype.createShader=function(){var t=this.regl,e=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop("count"),offset:t.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this("sizeBuffer")},width:{offset:0,stride:8,buffer:t.this("sizeBuffer")},char:t.this("charBuffer"),position:t.this("position")},uniforms:{atlasSize:function(t,e){return[e.atlas.width,e.atlas.height]},atlasDim:function(t,e){return[e.atlas.cols,e.atlas.rows]},atlas:function(t,e){return e.atlas.texture},charStep:function(t,e){return e.atlas.step},em:function(t,e){return e.atlas.em},color:t.prop("color"),opacity:t.prop("opacity"),viewport:t.this("viewportArray"),scale:t.this("scale"),align:t.prop("align"),baseline:t.prop("baseline"),translate:t.this("translate"),positionOffset:t.prop("positionOffset")},primitive:"points",viewport:t.this("viewport"),vert:"\n\t\t\tprecision highp float;\n\t\t\tattribute float width, charOffset, char;\n\t\t\tattribute vec2 position;\n\t\t\tuniform float fontSize, charStep, em, align, baseline;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform vec4 color;\n\t\t\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvoid main () {\n\t\t\t\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\n\t\t\t\t\t+ vec2(positionOffset.x, -positionOffset.y)))\n\t\t\t\t\t/ (viewport.zw * scale.xy);\n\n\t\t\t\tvec2 position = (position + translate) * scale;\n\t\t\t\tposition += offset * scale;\n\n\t\t\t\tcharCoord = position * viewport.zw + viewport.xy;\n\n\t\t\t\tgl_Position = vec4(position * 2. - 1., 0, 1);\n\n\t\t\t\tgl_PointSize = charStep;\n\n\t\t\t\tcharId.x = mod(char, atlasDim.x);\n\t\t\t\tcharId.y = floor(char / atlasDim.x);\n\n\t\t\t\tcharWidth = width * em;\n\n\t\t\t\tfontColor = color / 255.;\n\t\t\t}",frag:"\n\t\t\tprecision highp float;\n\t\t\tuniform float fontSize, charStep, opacity;\n\t\t\tuniform vec2 atlasSize;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform sampler2D atlas;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\n\t\t\tfloat lightness(vec4 color) {\n\t\t\t\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\n\t\t\t}\n\n\t\t\tvoid main () {\n\t\t\t\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\n\t\t\t\tfloat halfCharStep = floor(charStep * .5 + .5);\n\n\t\t\t\t// invert y and shift by 1px (FF expecially needs that)\n\t\t\t\tuv.y = charStep - uv.y;\n\n\t\t\t\t// ignore points outside of character bounding box\n\t\t\t\tfloat halfCharWidth = ceil(charWidth * .5);\n\t\t\t\tif (floor(uv.x) > halfCharStep + halfCharWidth ||\n\t\t\t\t\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\n\n\t\t\t\tuv += charId * charStep;\n\t\t\t\tuv = uv / atlasSize;\n\n\t\t\t\tvec4 color = fontColor;\n\t\t\t\tvec4 mask = texture2D(atlas, uv);\n\n\t\t\t\tfloat maskY = lightness(mask);\n\t\t\t\t// float colorY = lightness(color);\n\t\t\t\tcolor.a *= maskY;\n\t\t\t\tcolor.a *= opacity;\n\n\t\t\t\t// color.a += .1;\n\n\t\t\t\t// antialiasing, see yiq color space y-channel formula\n\t\t\t\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n\n\t\t\t\tgl_FragColor = color;\n\t\t\t}"});return{regl:t,draw:e,atlas:{}}},k.prototype.update=function(t){var e=this;if("string"==typeof t)t={text:t};else if(!t)return;null!=(t=i(t,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0)).opacity&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map((function(t){return parseFloat(t)})):this.opacity=parseFloat(t.opacity)),null!=t.viewport&&(this.viewport=u(t.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=t.kerning&&(this.kerning=t.kerning),null!=t.offset&&("number"==typeof t.offset&&(t.offset=[t.offset,0]),this.positionOffset=b(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||t.font||(t.font=k.baseFontSize+"px sans-serif");var r,o=!1,a=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach((function(t,r){if("string"==typeof t)try{t=n.parse(t)}catch(e){t=n.parse(k.baseFontSize+"px "+t)}else{var i=t.style,s=t.weight,l=t.stretch,c=t.variant;t=n.parse(n.stringify(t)),i&&(t.style=i),s&&(t.weight=s),l&&(t.stretch=l),c&&(t.variant=c)}var d=n.stringify({size:k.baseFontSize,family:t.family,stretch:w?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style}),u=p(t.size),h=Math.round(u[0]*f(u[1]));if(h!==e.fontSize[r]&&(a=!0,e.fontSize[r]=h),!(e.font[r]&&d==e.font[r].baseString||(o=!0,e.font[r]=k.fonts[d],e.font[r]))){var m=t.family.join(", "),g=[t.style];t.style!=t.variant&&g.push(t.variant),t.variant!=t.weight&&g.push(t.weight),w&&t.weight!=t.stretch&&g.push(t.stretch),e.font[r]={baseString:d,family:m,weight:t.weight,stretch:t.stretch,style:t.style,variant:t.variant,width:{},kerning:{},metrics:v(m,{origin:"top",fontSize:k.baseFontSize,fontStyle:g.join(" ")})},k.fonts[d]=e.font[r]}})),(o||a)&&this.font.forEach((function(r,i){var o=n.stringify({size:e.fontSize[i],family:r.family,stretch:w?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(e.fontAtlas[i]=e.shader.atlas[o],!e.fontAtlas[i]){var a=r.metrics;e.shader.atlas[o]=e.fontAtlas[i]={fontString:o,step:2*Math.ceil(e.fontSize[i]*a.bottom*.5),em:e.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:e.regl.texture()}}null==t.text&&(t.text=e.text)})),"string"==typeof t.text&&t.position&&t.position.length>2){for(var s=Array(.5*t.position.length),h=0;h2){for(var _=!t.position[0].length,A=d.mallocFloat(2*this.count),T=0,M=0;T1?e.align[r]:e.align[0]:e.align;if("number"==typeof n)return n;switch(n){case"right":case"end":return-t;case"center":case"centre":case"middle":return.5*-t}return 0}))),null==this.baseline&&null==t.baseline&&(t.baseline=0),null!=t.baseline&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(t,r){var n=(e.font[r]||e.font[0]).metrics,i=0;return i+=.5*n.bottom,-1*(i+="number"==typeof t?t-n.baseline:-n[t])}))),null!=t.color)if(t.color||(t.color="transparent"),"string"!=typeof t.color&&isNaN(t.color)){var H;if("number"==typeof t.color[0]&&t.color.length>this.counts.length){var W=t.color.length;H=d.mallocUint8(W);for(var q=(t.color.subarray||t.color.slice).bind(t.color),Y=0;Y4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var X=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(X);for(var J=0;J1?this.counts[J]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[J]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*J,4*J+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[J]:this.opacity,baseline:null!=this.baselineOffset[J]?this.baselineOffset[J]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[J]?this.alignOffset[J]:this.alignOffset[0]:0,atlas:this.fontAtlas[J]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*J,2*J+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},k.prototype.destroy=function(){},k.prototype.kerning=!0,k.prototype.position={constant:new Float32Array(2)},k.prototype.translate=null,k.prototype.scale=null,k.prototype.font=null,k.prototype.text="",k.prototype.positionOffset=[0,0],k.prototype.opacity=1,k.prototype.color=new Uint8Array([0,0,0,255]),k.prototype.alignOffset=[0,0],k.maxAtlasSize=1024,k.atlasCanvas=document.createElement("canvas"),k.atlasContext=k.atlasCanvas.getContext("2d",{alpha:!1}),k.baseFontSize=64,k.fonts={},t.exports=k},6627:(t,e,r)=>{"use strict";var n=r(9994);function i(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*r.g.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*r.g.innerHeight);else{var e=t.container.getBoundingClientRect();t.canvas.width=t.width||e.right-e.left,t.canvas.height=t.height||e.bottom-e.top}}function o(t){return"function"==typeof t.getContext&&"width"in t&&"height"in t}function a(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}t.exports=function(t){var e;if(t?"string"==typeof t&&(t={container:t}):t={},(t=o(t)||"string"==typeof(e=t).nodeName&&"function"==typeof e.appendChild&&"function"==typeof e.getBoundingClientRect?{container:t}:function(t){return"function"==typeof t.drawArrays||"function"==typeof t.drawElements}(t)?{gl:t}:n(t,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0)).pixelRatio||(t.pixelRatio=r.g.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if("string"==typeof t.container){var s=document.querySelector(t.container);if(!s)throw Error("Element "+t.container+" is not found");t.container=s}o(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=a(),t.container.appendChild(t.canvas),i(t))}else if(!t.canvas){if("undefined"==typeof document)throw Error("Not DOM environment. Use headless-gl.");t.container=document.body||document.documentElement,t.canvas=a(),t.container.appendChild(t.canvas),i(t)}return t.gl||["webgl","experimental-webgl","webgl-experimental"].some((function(e){try{t.gl=t.canvas.getContext(e,t.attrs)}catch(t){}return t.gl})),t.gl}},43236:t=>{t.exports=function(t){"string"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n{"use strict";var n=r(59412)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},56885:(t,e,r)=>{"use strict";var n,i=r(41888);n="function"==typeof r.g.matchMedia?!r.g.matchMedia("(hover: none)").matches:i,t.exports=n},17520:(t,e,r)=>{"use strict";var n=r(41888);t.exports=n&&function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){t=!1}return t}()},20419:(t,e,r)=>{"use strict";var n=r(38232),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=i},39681:t=>{"use strict";var e={__proto__:null,foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof r)}},23266:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(93272);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},93272:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},15541:(t,e,r)=>{"use strict";var n=r(93272);t.exports=function(){return n()&&!!Symbol.toStringTag}},19942:(t,e,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(35366);t.exports=o.call(n,i)},23778:(t,e)=>{e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,l=(1<>1,d=-7,u=r?i-1:0,h=r?-1:1,p=t[e+u];for(u+=h,o=p&(1<<-d)-1,p>>=-d,d+=s;d>0;o=256*o+t[e+u],u+=h,d-=8);for(a=o&(1<<-d)-1,o>>=-d,d+=n;d>0;a=256*a+t[e+u],u+=h,d-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=c}return(p?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,l,c=8*o-i-1,d=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,f=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=d):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+u>=1?h/l:h*Math.pow(2,1-u))*l>=2&&(a++,l/=2),a+u>=d?(s=0,a=d):a+u>=1?(s=(e*l-1)*Math.pow(2,i),a+=u):(s=e*Math.pow(2,u-1)*Math.pow(2,i),a=0));i>=8;t[r+p]=255&s,p+=f,s/=256,i-=8);for(a=a<0;t[r+p]=255&a,p+=f,a/=256,c-=8);t[r+p-f]|=128*m}},9715:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},68007:(t,e,r)=>{"use strict";var n=r(15541)(),i=r(24310)("Object.prototype.toString"),o=function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===i(t)},a=function(t){return!!o(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,t.exports=s?o:a},41888:t=>{t.exports=!0},60245:t=>{"use strict";var e,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,e)}catch(t){t!==r&&(i=null)}else i=null;var o=/^\s*class\b/,a=function(t){try{var e=n.call(t);return o.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},l=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,d=!(0 in[,]),u=function(){return!1};if("object"==typeof document){var h=document.all;l.call(h)===l.call(document.all)&&(u=function(t){if((d||!t)&&(void 0===t||"object"==typeof t))try{var e=l.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=i?function(t){if(u(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{i(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(u(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return s(t);if(a(t))return!1;var e=l.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},74205:(t,e,r)=>{"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=r(15541)(),l=Object.getPrototypeOf;t.exports=function(t){if("function"!=typeof t)return!1;if(a.test(o.call(t)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(t);if(!l)return!1;if(void 0===n){var e=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(t){}}();n=!!e&&l(e)}return l(t)===n}},47691:t=>{"use strict";t.exports="undefined"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},12431:t=>{"use strict";t.exports=i,t.exports.isMobile=i,t.exports.default=i;const e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(t){t||(t={});let i=t.ua;if(i||"undefined"==typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"==typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!=typeof i)return!1;let o=e.test(i)&&!r.test(i)||!!t.tablet&&n.test(i);return!o&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(o=!0),o}},87266:t=>{"use strict";t.exports=function(t){return t!=t}},74858:(t,e,r)=>{"use strict";var n=r(61398),i=r(10781),o=r(87266),a=r(29419),s=r(50317),l=n(a(),Number);i(l,{getPolyfill:a,implementation:o,shim:s}),t.exports=l},29419:(t,e,r)=>{"use strict";var n=r(87266);t.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},50317:(t,e,r)=>{"use strict";var n=r(10781),i=r(29419);t.exports=function(){var t=i();return n(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},23754:t=>{"use strict";t.exports=function(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}},35867:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r;return"[object Object]"===e.call(t)&&(null===(r=Object.getPrototypeOf(t))||r===Object.getPrototypeOf({}))}},45219:t=>{"use strict";t.exports=function(t){for(var e,r=t.length,n=0;n13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},12611:t=>{"use strict";t.exports=function(t){return"string"==typeof t&&(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}},94179:(t,e,r)=>{"use strict";var n=r(17478);t.exports=function(t){return!!n(t)}},54387:t=>{"use strict";t.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},10024:t=>{var e={left:0,top:0};t.exports=function(t,r,n){r=r||t.currentTarget||t.srcElement,Array.isArray(n)||(n=[0,0]);var i,o=t.clientX||0,a=t.clientY||0,s=(i=r)===window||i===document||i===document.body?e:i.getBoundingClientRect();return n[0]=o-s.left,n[1]=a-s.top,n}},60613:function(t,e,r){var n;!function(i,o){o[i]=o[i]||function(){"use strict";var t,e,r,n=Object.prototype.toString,i="undefined"!=typeof setImmediate?function(t){return setImmediate(t)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(t,e,r,n){return Object.defineProperty(t,e,{value:r,writable:!0,configurable:!1!==n})}}catch(e){t=function(t,e,r){return t[e]=r,t}}function o(t,n){r.add(t,n),e||(e=i(r.drain))}function a(t){var e,r=typeof t;return null==t||"object"!=r&&"function"!=r||(e=t.then),"function"==typeof e&&e}function s(){for(var t=0;t0&&o(s,r))}catch(t){d.call(new h(r),t)}}}function d(t){var e=this;e.triggered||(e.triggered=!0,e.def&&(e=e.def),e.msg=t,e.state=2,e.chain.length>0&&o(s,e))}function u(t,e,r,n){for(var i=0;i{var e=Math.PI,r=s(120);function n(t,e,r,n){return["C",t,e,r,n,r,n]}function i(t,e,r,n,i,o){return["C",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,o/3+2/3*n,i,o]}function o(t,n,i,s,l,c,d,u,h,p){if(p)k=p[0],A=p[1],w=p[2],_=p[3];else{var f=a(t,n,-l);t=f.x,n=f.y;var m=(t-(u=(f=a(u,h,-l)).x))/2,g=(n-(h=f.y))/2,v=m*m/(i*i)+g*g/(s*s);v>1&&(i*=v=Math.sqrt(v),s*=v);var b=i*i,y=s*s,x=(c==d?-1:1)*Math.sqrt(Math.abs((b*y-b*g*g-y*m*m)/(b*g*g+y*m*m)));x==1/0&&(x=1);var w=x*i*g/s+(t+u)/2,_=x*-s*m/i+(n+h)/2,k=Math.asin(((n-_)/s).toFixed(9)),A=Math.asin(((h-_)/s).toFixed(9));(k=tA&&(k-=2*e),!d&&A>k&&(A-=2*e)}if(Math.abs(A-k)>r){var T=A,M=u,S=h;A=k+r*(d&&A>k?1:-1);var C=o(u=w+i*Math.cos(A),h=_+s*Math.sin(A),i,s,l,0,d,M,S,[A,T,w,_])}var E=Math.tan((A-k)/4),L=4/3*i*E,z=4/3*s*E,O=[2*t-(t+L*Math.sin(k)),2*n-(n-z*Math.cos(k)),u+L*Math.sin(A),h-z*Math.cos(A),u,h];if(p)return O;C&&(O=O.concat(C));for(var D=0;D7&&(r.push(v.splice(0,7)),v.unshift("C"));break;case"S":var y=p,x=f;"C"!=e&&"S"!=e||(y+=y-a,x+=x-l),v=["C",y,x,v[1],v[2],v[3],v[4]];break;case"T":"Q"==e||"T"==e?(u=2*p-u,h=2*f-h):(u=p,h=f),v=i(p,f,u,h,v[1],v[2]);break;case"Q":u=v[1],h=v[2],v=i(p,f,v[1],v[2],v[3],v[4]);break;case"L":v=n(p,f,v[1],v[2]);break;case"H":v=n(p,f,v[1],f);break;case"V":v=n(p,f,p,v[1]);break;case"Z":v=n(p,f,c,d)}e=b,p=v[v.length-2],f=v[v.length-1],v.length>4?(a=v[v.length-4],l=v[v.length-3]):(a=p,l=f),r.push(v)}return r}},34597:t=>{"use strict";var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,i){for(var o,a,s=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l{"use strict";var e=function(t){return t!=t};t.exports=function(t,r){return 0===t&&0===r?1/t==1/r:t===r||!(!e(t)||!e(r))}},62956:(t,e,r)=>{"use strict";var n=r(10781),i=r(61398),o=r(36560),a=r(43765),s=r(6723),l=i(a(),Object);n(l,{getPolyfill:a,implementation:o,shim:s}),t.exports=l},43765:(t,e,r)=>{"use strict";var n=r(36560);t.exports=function(){return"function"==typeof Object.is?Object.is:n}},6723:(t,e,r)=>{"use strict";var n=r(43765),i=r(10781);t.exports=function(){var t=n();return i(Object,{is:t},{is:function(){return Object.is!==t}}),t}},77908:(t,e,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=r(12724),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),d=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(t){var e=t.constructor;return e&&e.prototype===t},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!h["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{u(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===o.call(t),n=a(t),s=e&&"[object String]"===o.call(t),h=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var f=c&&r;if(s&&t.length>0&&!i.call(t,0))for(var m=0;m0)for(var g=0;g{"use strict";var n=Array.prototype.slice,i=r(12724),o=Object.keys,a=o?function(t){return o(t)}:r(77908),s=Object.keys;a.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return i(t)?s(n.call(t)):s(t)})}else Object.keys=a;return Object.keys||a},t.exports=a},12724:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},99864:(t,e,r)=>{"use strict";var n=r(99952),i=r(93272)(),o=r(24310),a=Object,s=o("Array.prototype.push"),l=o("Object.prototype.propertyIsEnumerable"),c=i?Object.getOwnPropertySymbols:null;t.exports=function(t,e){if(null==t)throw new TypeError("target must be an object");var r=a(t);if(1===arguments.length)return r;for(var o=1;o{"use strict";var n=r(99864);t.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),r={},n=0;n{"use strict";function e(t,e){if("string"!=typeof t)return[t];var r=[t];"string"==typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var n=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],i=e.escape||"___",o=!!e.flat;n.forEach((function(t){var e=new RegExp(["\\",t[0],"[^\\",t[0],"\\",t[1],"]*\\",t[1]].join("")),n=[];function o(e,o,a){var s=r.push(e.slice(t[0].length,-t[1].length))-1;return n.push(s),i+s+i}r.forEach((function(t,n){for(var i,a=0;t!=i;)if(i=t,t=t.replace(e,o),a++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=t})),n=n.reverse(),r=r.map((function(e){return n.forEach((function(r){e=e.replace(new RegExp("(\\"+i+r+"\\"+i+")","g"),t[0]+"$1"+t[1])})),e}))}));var a=new RegExp("\\"+i+"([0-9]+)\\"+i);return o?r:function t(e,r,n){for(var i,o=[],s=0;i=a.exec(e);){if(s++>1e4)throw Error("Circular references in parenthesis");o.push(e.slice(0,i.index)),o.push(t(r[i[1]],r)),e=e.slice(i.index+i[0].length)}return o.push(e),o}(r[0],r)}function r(t,e){if(e&&e.flat){var r,n=e&&e.escape||"___",i=t[0];if(!i)return"";for(var o=new RegExp("\\"+n+"([0-9]+)\\"+n),a=0;i!=r;){if(a++>1e4)throw Error("Circular references in "+t);r=i,i=i.replace(o,s)}return i}return t.reduce((function t(e,r){return Array.isArray(r)&&(r=r.reduce(t,"")),e+r}),"");function s(e,r){if(null==t[r])throw Error("Reference "+r+"is undefined");return t[r]}}function n(t,n){return Array.isArray(t)?r(t,n):e(t,n)}n.parse=e,n.stringify=r,t.exports=n},94698:(t,e,r)=>{"use strict";var n=r(9994);t.exports=function(t){var e;return arguments.length>1&&(t=arguments),"string"==typeof t?t=t.split(/\s/).map(parseFloat):"number"==typeof t&&(t=[t]),t.length&&"number"==typeof t[0]?e=1===t.length?{width:t[0],height:t[0],x:0,y:0}:2===t.length?{width:t[0],height:t[1],x:0,y:0}:{x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&&(e={x:(t=n(t,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"})).left||0,y:t.top||0},null==t.width?t.right?e.width=t.right-e.x:e.width=0:e.width=t.width,null==t.height?t.bottom?e.height=t.bottom-e.y:e.height=0:e.height=t.height),e}},37974:t=>{t.exports=function(t){var i=[];return t.replace(r,(function(t,r,o){var a=r.toLowerCase();for(o=function(t){var e=t.match(n);return e?e.map(Number):[]}(o),"m"==a&&o.length>2&&(i.push([r].concat(o.splice(0,2))),a="l",r="m"==r?"l":"L");;){if(o.length==e[a])return o.unshift(r),i.push(o);if(o.length{t.exports=function(t,e){e||(e=[0,""]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},9994:t=>{"use strict";t.exports=function(t,e,n){var i,o,a={};if("string"==typeof e&&(e=r(e)),Array.isArray(e)){var s={};for(o=0;o{"use strict";var n=r(12822),i={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var o in i){var a=o.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(a,i[o])}},12028:(t,e,r)=>{"use strict";t.exports=r(7623)},72010:(t,e,r)=>{"use strict";t.exports=r(46443)},94646:(t,e,r)=>{"use strict";t.exports=r(88479)},91208:t=>{"use strict";t.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},77061:(t,e,r)=>{"use strict";var n=r(91208),i=r(75058),o=r(21197),a=r(46121).templatedArray,s=r(53644);function l(t){return["In order for absolute positioning of the arrow to work, *a"+t+"ref* must be exactly the same as *"+t+"ref*, otherwise *a"+t+"ref* will revert to *pixel* (explained next).","For relative positioning, *a"+t+"ref* can be set to *pixel*,","in which case the *a"+t+"* value is specified in pixels","relative to *"+t+"*.","Absolute positioning is useful","for trendline annotations which should continue to indicate","the correct trend when zoomed. Relative positioning is useful","for specifying the text offset for an annotated point."].join(" ")}function c(t,e,r){return["Sets the",t,"component of the arrow tail about the arrow head.","If `a"+t+"ref` is `pixel`, a positive (negative)","component corresponds to an arrow pointing","from",r,"to",e,"("+e,"to",r+").","If `a"+t+"ref` is not `pixel` and is exactly the same as `"+t+"ref`,","this is an absolute value on that axis,","like `"+t+"`, specified in the same coordinates as `"+t+"ref`."].join(" ")}t.exports=a("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not this annotation is visible."].join(" ")},text:{valType:"string",editType:"calc+arraydraw",description:["Sets the text associated with this annotation.","Plotly uses a subset of HTML tags to do things like","newline (
), bold (), italics (),","hyperlinks (). Tags , , , , "," are also supported."].join(" ")},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw",description:["Sets the angle at which the `text` is drawn","with respect to the horizontal."].join(" ")},font:i({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the annotation text font."}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit width for the text box. null (default) lets the","text set the box width. Wider text will be clipped.","There is no automatic wrapping; use
to start a new line."].join(" ")},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit height for the text box. null (default) lets the","text set the box height. Taller text will be clipped."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the annotation (text + arrow)."},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw",description:["Sets the horizontal alignment of the `text` within the box.","Has an effect only if `text` spans two or more lines","(i.e. `text` contains one or more
HTML tags) or if an","explicit width is set to override the text width."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw",description:["Sets the vertical alignment of the `text` within the box.","Has an effect only if an explicit height is set to override","the text height."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:"Sets the background color of the annotation."},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color of the border enclosing the annotation `text`."].join(" ")},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the padding (in px) between the `text`","and the enclosing border."].join(" ")},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the width (in px) of the border enclosing","the annotation `text`."].join(" ")},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not the annotation is drawn with an arrow.","If *true*, `text` is placed near the arrow's tail.","If *false*, `text` lines up with the `x` and `y` provided."].join(" ")},arrowcolor:{valType:"color",editType:"arraydraw",description:"Sets the color of the annotation arrow."},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw",description:"Sets the start annotation arrow head style."},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw",description:"Sets the annotation arrow head position."},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the end annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the start annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw",description:"Sets the width (in px) of annotation arrow line."},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the end arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the start arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},ax:{valType:"any",editType:"calc+arraydraw",description:[c("x","left","right")].join(" ")},ay:{valType:"any",editType:"calc+arraydraw",description:[c("y","top","bottom")].join(" ")},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.x.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",s.axisRefDescription("x","left","right"),l("x")].join(" ")},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.y.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",s.axisRefDescription("y","bottom","top"),l("y")].join(" ")},xref:{valType:"enumerated",values:["paper",o.idRegex.x.toString()],editType:"calc",description:["Sets the annotation's x coordinate axis.",s.axisRefDescription("x","left","right")].join(" ")},x:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's x position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's horizontal position anchor","This anchor binds the `x` position to the *left*, *center*","or *right* of the annotation.","For example, if `x` is set to 1, `xref` to *paper* and","`xanchor` to *right* then the right-most portion of the","annotation lines up with the right-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *center* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow to the","right (positive) or left (negative) by this many pixels."].join(" ")},yref:{valType:"enumerated",values:["paper",o.idRegex.y.toString()],editType:"calc",description:["Sets the annotation's y coordinate axis.",s.axisRefDescription("y","bottom","top")].join(" ")},y:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's y position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the annotation.","For example, if `y` is set to 1, `yref` to *paper* and","`yanchor` to *top* then the top-most portion of the","annotation lines up with the top-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *middle* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow up","(positive) or down (negative) by this many pixels."].join(" ")},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw",description:["Makes this annotation respond to clicks on the plot.","If you click a data point that exactly matches the `x` and `y`","values of this annotation, and it is hidden (visible: false),","it will appear. In *onoff* mode, you must click the same point","again to make it disappear, so if you click multiple points,","you can show multiple annotations. In *onout* mode, a click","anywhere else in the plot (on another data point or not) will","hide this annotation.","If you need to show/hide this annotation in response to different","`x` or `y` values, you can set `xclick` and/or `yclick`. This is","useful for example to label the side of a bar. To label markers","though, `standoff` is preferred over `xclick` and `yclick`."].join(" ")},xclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `x` value","is `xclick` rather than the annotation's `x` value."].join(" ")},yclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `y` value","is `yclick` rather than the annotation's `y` value."].join(" ")},hovertext:{valType:"string",editType:"arraydraw",description:["Sets text to appear when hovering over this annotation.","If omitted or blank, no hover label will appear."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw",description:["Sets the background color of the hover label.","By default uses the annotation's `bgcolor` made opaque,","or white if it was transparent."].join(" ")},bordercolor:{valType:"color",editType:"arraydraw",description:["Sets the border color of the hover label.","By default uses either dark grey or white, for maximum","contrast with `hoverlabel.bgcolor`."].join(" ")},font:i({editType:"arraydraw",description:["Sets the hover label text font.","By default uses the global hover font and size,","with color from `hoverlabel.bordercolor`."].join(" ")}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw",description:["Determines whether the annotation text box captures mouse move","and click events, or allows those events to pass through to data","points in the plot that may be behind the annotation. By default","`captureevents` is *false* unless `hovertext` is provided.","If you use the event `plotly_clickannotation` without `hovertext`","you must explicitly enable `captureevents`."].join(" ")},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc",description:["Obsolete. Set `xref` and `yref` separately instead."].join(" ")}}})},37830:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(8214).draw;function a(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach((function(e){var r=i.getFromId(t,e.xref),n=i.getFromId(t,e.yref),o=i.getRefType(e.xref),a=i.getRefType(e.yref);e._extremes={},"range"===o&&s(e,r),"range"===a&&s(e,n)}))}function s(t,e){var r,n=e._id,o=n.charAt(0),a=t[o],s=t["a"+o],l=t[o+"ref"],c=t["a"+o+"ref"],d=t["_"+o+"padplus"],u=t["_"+o+"padminus"],h={x:1,y:-1}[o]*t[o+"shift"],p=3*t.arrowsize*t.arrowwidth||0,f=p+h,m=p-h,g=3*t.startarrowsize*t.arrowwidth||0,v=g+h,b=g-h;if(c===l){var y=i.findExtremes(e,[e.r2c(a)],{ppadplus:f,ppadminus:m}),x=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(d,v),ppadminus:Math.max(u,b)});r={min:[y.min[0],x.min[0]],max:[y.max[0],x.max[0]]}}else v=s?v+s:v,b=s?b-s:b,r=i.findExtremes(e,[e.r2c(a)],{ppadplus:Math.max(d,f,v),ppadminus:Math.max(u,m,b)});t._extremes[n]=r}t.exports=function(t){var e=t._fullLayout;if(n.filterVisible(e.annotations).length&&t._fullData.length)return n.syncOrAsync([o,a],t)}},74434:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059),o=r(46121).arrayEditor;function a(t,e){var r,n,i,o,a,l,c,d=t._fullLayout.annotations,u=[],h=[],p=[],f=(e||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(t,e){var r,s,l=a(t,e),c=l.on,d=l.off.concat(l.explicitOff),u={},h=t._fullLayout.annotations;if(c.length||d.length){for(r=0;r{"use strict";var n=r(12822),i=r(17499);t.exports=function(t,e,r,o){o("opacity");var a=o("bgcolor"),s=o("bordercolor"),l=i.opacity(s);o("borderpad");var c=o("borderwidth"),d=o("showarrow");if(o("text",d?" ":r._dfltTitle.annotation),o("textangle"),n.coerceFont(o,"font",r.font),o("width"),o("align"),o("height")&&o("valign"),d){var u,h,p=o("arrowside");-1!==p.indexOf("end")&&(u=o("arrowhead"),h=o("arrowsize")),-1!==p.indexOf("start")&&(o("startarrowhead",u),o("startarrowsize",h)),o("arrowcolor",l?e.bordercolor:i.defaultLine),o("arrowwidth",2*(l&&c||1)),o("standoff"),o("startstandoff")}var f=o("hovertext"),m=r.hoverlabel||{};if(f){var g=o("hoverlabel.bgcolor",m.bgcolor||(i.opacity(a)?i.rgb(a):i.defaultLine)),v=o("hoverlabel.bordercolor",m.bordercolor||i.contrast(g)),b=n.extendFlat({},m.font);b.color||(b.color=v),n.coerceFont(o,"hoverlabel.font",b)}o("captureevents",!!f)}},44102:(t,e,r)=>{"use strict";var n=r(7370),i=r(61814);t.exports=function(t,e,r,o){e=e||{};var a="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(a||s)for(var l,c,d=t._fullLayout.annotations,u=e._id.charAt(0),h=0;h{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(35486),s=r(77061);function l(t,e,r){function o(r,i){return n.coerce(t,e,s,r,i)}var l=o("visible"),c=o("clicktoshow");if(l||c){a(t,e,r,o);for(var d=e.showarrow,u=["x","y"],h=[-10,-30],p={_fullLayout:r},f=0;f<2;f++){var m=u[f],g=i.coerceRef(t,e,p,m,"","paper");if("paper"!==g&&i.getFromId(p,g)._annIndices.push(e._index),i.coercePosition(e,p,o,g,m,.5),d){var v="a"+m,b=i.coerceRef(t,e,p,v,"pixel",["pixel","paper"]);"pixel"!==b&&b!==g&&(b=e[v]="pixel");var y="pixel"===b?h[f]:.4;i.coercePosition(e,p,o,b,v,y)}o(m+"anchor"),o(m+"shift")}if(n.noneOrAll(t,e,["x","y"]),d&&n.noneOrAll(t,e,["ax","ay"]),c){var x=o("xclick"),w=o("yclick");e._xclick=void 0===x?e.x:i.cleanPosition(x,p,e.xref),e._yclick=void 0===w?e.y:i.cleanPosition(w,p,e.yref)}}}t.exports=function(t,e){o(t,e,{name:"annotations",handleItemDefaults:l})}},8214:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(51137),a=r(12822),s=a.strTranslate,l=r(75815),c=r(17499),d=r(40666),u=r(70410),h=r(80394),p=r(76292),f=r(19846),m=r(46121).arrayEditor,g=r(65753);function v(t,e){var r=t._fullLayout.annotations[e]||{},n=l.getFromId(t,r.xref),i=l.getFromId(t,r.yref);n&&n.setScale(),i&&i.setScale(),y(t,r,e,!1,n,i)}function b(t,e,r,n,i){var o=i[r],a=i[r+"ref"],s=-1!==r.indexOf("y"),c="domain"===l.getRefType(a),d=s?n.h:n.w;return t?c?o+(s?-e:e)/t._length:t.p2r(t.r2p(o)+e):o+(s?-e:e)/d}function y(t,e,r,o,v,y){var x,w,_=t._fullLayout,k=t._fullLayout._size,A=t._context.edits;o?(x="annotation-"+o,w=o+".annotations"):(x="annotation",w="annotations");var T=m(t.layout,w,e),M=T.modifyBase,S=T.modifyItem,C=T.getUpdateObj;_._infolayer.selectAll("."+x+'[data-index="'+r+'"]').remove();var E="clip"+_._uid+"_ann"+r;if(e._input&&!1!==e.visible){var L={x:{},y:{}},z=+e.textangle||0,O=_._infolayer.append("g").classed(x,!0).attr("data-index",String(r)).style("opacity",e.opacity),D=O.append("g").classed("annotation-text-g",!0),I=A[e.showarrow?"annotationTail":"annotationPosition"],F=e.captureevents||A.annotationText||I,R=D.append("g").style("pointer-events",F?"all":null).call(p,"pointer").on("click",(function(){t._dragging=!1,t.emit("plotly_clickannotation",q(n.event))}));e.hovertext&&R.on("mouseover",(function(){var r=e.hoverlabel,n=r.font,i=this.getBoundingClientRect(),o=t.getBoundingClientRect();u.loneHover({x0:i.left-o.left,x1:i.right-o.left,y:(i.top+i.bottom)/2-o.top,text:e.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontShadow:n.fontShadow,fontLineposition:n.fontLineposition,fontTextcase:n.fontTextcase},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:t})})).on("mouseout",(function(){u.loneUnhover(_._hoverlayer.node())}));var P=e.borderwidth,j=e.borderpad,N=P+j,B=R.append("rect").attr("class","bg").style("stroke-width",P+"px").call(c.stroke,e.bordercolor).call(c.fill,e.bgcolor),U=e.width||e.height,G=_._topclips.selectAll("#"+E).data(U?[0]:[]);G.enter().append("clipPath").classed("annclip",!0).attr("id",E).append("rect"),G.exit().remove();var V=e.font,H=_._meta?a.templateString(e.text,_._meta):e.text,W=R.append("text").classed("annotation-text",!0).text(H);A.annotationText?W.call(h.makeEditable,{delegate:R,gd:t}).call(Y).on("edit",(function(r){e.text=r,this.call(Y),S("text",r),v&&v.autorange&&M(v._name+".autorange",!0),y&&y.autorange&&M(y._name+".autorange",!0),i.call("_guiRelayout",t,C())})):W.call(Y)}else n.selectAll("#"+E).remove();function q(t){var n={index:r,annotation:e._input,fullAnnotation:e,event:t};return o&&(n.subplotId=o),n}function Y(r){return r.call(d.font,V).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),h.convertToTspans(r,t,Z),r}function Z(){var r=W.selectAll("a");1===r.size()&&r.text()===W.text()&&R.insert("a",":first-child").attr({"xlink:xlink:href":r.attr("xlink:href"),"xlink:xlink:show":r.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(B.node());var n=R.select(".annotation-text-math-group"),u=!n.empty(),m=d.bBox((u?n:W).node()),x=m.width,w=m.height,T=e.width||x,F=e.height||w,j=Math.round(T+2*N),V=Math.round(F+2*N);function H(t,e){return"auto"===e&&(e=t<1/3?"left":t>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var Y=!1,Z=["x","y"],$=0;$1)&&(nt===rt?((pt=it.r2fraction(e["a"+et]))<0||pt>1)&&(Y=!0):Y=!0),X=it._offset+it.r2p(e[et]),Q=.5}else{var ft="domain"===ht;"x"===et?(K=e[et],X=ft?it._offset+it._length*K:X=k.l+k.w*K):(K=1-e[et],X=ft?it._offset+it._length*K:X=k.t+k.h*K),Q=e.showarrow?.5:K}if(e.showarrow){ut.head=X;var mt=e["a"+et];if(tt=at*H(.5,e.xanchor)-st*H(.5,e.yanchor),nt===rt){var gt=l.getRefType(nt);"domain"===gt?("y"===et&&(mt=1-mt),ut.tail=it._offset+it._length*mt):"paper"===gt?"y"===et?(mt=1-mt,ut.tail=k.t+k.h*mt):ut.tail=k.l+k.w*mt:ut.tail=it._offset+it.r2p(mt),J=tt}else ut.tail=X+mt,J=tt+mt;ut.text=ut.tail+tt;var vt=_["x"===et?"width":"height"];if("paper"===rt&&(ut.head=a.constrain(ut.head,1,vt-1)),"pixel"===nt){var bt=-Math.max(ut.tail-3,ut.text),yt=Math.min(ut.tail+3,ut.text)-vt;bt>0?(ut.tail+=bt,ut.text+=bt):yt>0&&(ut.tail-=yt,ut.text-=yt)}ut.tail+=dt,ut.head+=dt}else J=tt=lt*H(Q,ct),ut.text=X+tt;ut.text+=dt,tt+=dt,J+=dt,e["_"+et+"padplus"]=lt/2+J,e["_"+et+"padminus"]=lt/2-J,e["_"+et+"size"]=lt,e["_"+et+"shift"]=tt}if(Y)R.remove();else{var xt=0,wt=0;if("left"!==e.align&&(xt=(T-x)*("center"===e.align?.5:1)),"top"!==e.valign&&(wt=(F-w)*("middle"===e.valign?.5:1)),u)n.select("svg").attr({x:N+xt-1,y:N+wt}).call(d.setClipUrl,U?E:null,t);else{var _t=N+wt-m.top,kt=N+xt-m.left;W.call(h.positionText,kt,_t).call(d.setClipUrl,U?E:null,t)}G.select("rect").call(d.setRect,N,N,T,F),B.call(d.setRect,P/2,P/2,j-P,V-P),R.call(d.setTranslate,Math.round(L.x.text-j/2),Math.round(L.y.text-V/2)),D.attr({transform:"rotate("+z+","+L.x.text+","+L.y.text+")"});var At,Tt=function(r,n){O.selectAll(".annotation-arrow-g").remove();var l=L.x.head,u=L.y.head,h=L.x.tail+r,p=L.y.tail+n,m=L.x.text+r,x=L.y.text+n,w=a.rotationXYMatrix(z,m,x),_=a.apply2DTransform(w),T=a.apply2DTransform2(w),E=+B.attr("width"),I=+B.attr("height"),F=m-.5*E,P=F+E,j=x-.5*I,N=j+I,U=[[F,j,F,N],[F,N,P,N],[P,N,P,j],[P,j,F,j]].map(T);if(!U.reduce((function(t,e){return t^!!a.segmentsIntersect(l,u,l+1e6,u+1e6,e[0],e[1],e[2],e[3])}),!1)){U.forEach((function(t){var e=a.segmentsIntersect(h,p,l,u,t[0],t[1],t[2],t[3]);e&&(h=e.x,p=e.y)}));var G=e.arrowwidth,V=e.arrowcolor,H=e.arrowside,W=O.append("g").style({opacity:c.opacity(V)}).classed("annotation-arrow-g",!0),q=W.append("path").attr("d","M"+h+","+p+"L"+l+","+u).style("stroke-width",G+"px").call(c.stroke,c.rgb(V));if(g(q,H,e),A.annotationPosition&&q.node().parentNode&&!o){var Y=l,Z=u;if(e.standoff){var $=Math.sqrt(Math.pow(l-h,2)+Math.pow(u-p,2));Y+=e.standoff*(h-l)/$,Z+=e.standoff*(p-u)/$}var X,J,K=W.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(h-Y)+","+(p-Z),transform:s(Y,Z)}).style("stroke-width",G+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)");f.init({element:K.node(),gd:t,prepFn:function(){var t=d.getTranslate(R);X=t.x,J=t.y,v&&v.autorange&&M(v._name+".autorange",!0),y&&y.autorange&&M(y._name+".autorange",!0)},moveFn:function(t,r){var n=_(X,J),i=n[0]+t,o=n[1]+r;R.call(d.setTranslate,i,o),S("x",b(v,t,"x",k,e)),S("y",b(y,r,"y",k,e)),e.axref===e.xref&&S("ax",b(v,t,"ax",k,e)),e.ayref===e.yref&&S("ay",b(y,r,"ay",k,e)),W.attr("transform",s(t,r)),D.attr({transform:"rotate("+z+","+i+","+o+")"})},doneFn:function(){i.call("_guiRelayout",t,C());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};e.showarrow&&Tt(0,0),I&&f.init({element:R.node(),gd:t,prepFn:function(){At=D.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?S("ax",b(v,t,"ax",k,e)):S("ax",e.ax+t),e.ayref===e.yref?S("ay",b(y,r,"ay",k.w,e)):S("ay",e.ay+r),Tt(t,r);else{if(o)return;var i,a;if(v)i=b(v,t,"x",k,e);else{var l=e._xsize/k.w,c=e.x+(e._xshift-e.xshift)/k.w-l/2;i=f.align(c+t/k.w,l,0,1,e.xanchor)}if(y)a=b(y,r,"y",k,e);else{var d=e._ysize/k.h,u=e.y-(e._yshift+e.yshift)/k.h-d/2;a=f.align(u-r/k.h,d,0,1,e.yanchor)}S("x",i),S("y",a),v&&y||(n=f.getCursor(v?.5:i,y?.5:a,e.xanchor,e.yanchor))}D.attr({transform:s(t,r)+At}),p(R,n)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",q(n))},doneFn:function(){p(R),i.call("_guiRelayout",t,C());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}}t.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r{"use strict";var n=r(27941),i=r(17499),o=r(91208),a=r(12822),s=a.strScale,l=a.strRotate,c=a.strTranslate;t.exports=function(t,e,r){var a,d,u,h,p=t.node(),f=o[r.arrowhead||0],m=o[r.startarrowhead||0],g=(r.arrowwidth||1)*(r.arrowsize||1),v=(r.arrowwidth||1)*(r.startarrowsize||1),b=e.indexOf("start")>=0,y=e.indexOf("end")>=0,x=f.backoff*g+r.standoff,w=m.backoff*v+r.startstandoff;if("line"===p.nodeName){a={x:+t.attr("x1"),y:+t.attr("y1")},d={x:+t.attr("x2"),y:+t.attr("y2")};var _=a.x-d.x,k=a.y-d.y;if(h=(u=Math.atan2(k,_))+Math.PI,x&&w&&x+w>Math.sqrt(_*_+k*k))return void I();if(x){if(x*x>_*_+k*k)return void I();var A=x*Math.cos(u),T=x*Math.sin(u);d.x+=A,d.y+=T,t.attr({x2:d.x,y2:d.y})}if(w){if(w*w>_*_+k*k)return void I();var M=w*Math.cos(u),S=w*Math.sin(u);a.x-=M,a.y-=S,t.attr({x1:a.x,y1:a.y})}}else if("path"===p.nodeName){var C=p.getTotalLength(),E="";if(C{"use strict";var n=r(8214),i=r(74434);t.exports={moduleType:"component",name:"annotations",layoutAttributes:r(77061),supplyLayoutDefaults:r(26194),includeBasePlot:r(39859)("annotations"),calcAutorange:r(37830),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:r(44102)}},98368:(t,e,r)=>{"use strict";var n=r(77061),i=r(62309).overrideAll,o=r(46121).templatedArray;t.exports=i(o("annotation",{visible:n.visible,x:{valType:"any",description:["Sets the annotation's x position."].join(" ")},y:{valType:"any",description:["Sets the annotation's y position."].join(" ")},z:{valType:"any",description:["Sets the annotation's z position."].join(" ")},ax:{valType:"number",description:["Sets the x component of the arrow tail about the arrow head (in pixels)."].join(" ")},ay:{valType:"number",description:["Sets the y component of the arrow tail about the arrow head (in pixels)."].join(" ")},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents}),"calc","from-root")},81030:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815);function o(t,e){var r=e.fullSceneLayout.domain,o=e.fullLayout._size,a={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};t._xa={},n.extendFlat(t._xa,a),i.setConvert(t._xa),t._xa._offset=o.l+r.x[0]*o.w,t._xa.l2p=function(){return.5*(1+t._pdata[0]/t._pdata[3])*o.w*(r.x[1]-r.x[0])},t._ya={},n.extendFlat(t._ya,a),i.setConvert(t._ya),t._ya._offset=o.t+(1-r.y[1])*o.h,t._ya.l2p=function(){return.5*(1-t._pdata[1]/t._pdata[3])*o.h*(r.y[1]-r.y[0])}}t.exports=function(t){for(var e=t.fullSceneLayout.annotations,r=0;r{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(35486),s=r(98368);function l(t,e,r,o){function l(r,i){return n.coerce(t,e,s,r,i)}function c(t){var n=t+"axis",o={_fullLayout:{}};return o._fullLayout[n]=r[n],i.coercePosition(e,o,l,t,t,.5)}l("visible")&&(a(t,e,o.fullLayout,l),c("x"),c("y"),c("z"),n.noneOrAll(t,e,["x","y","z"]),e.xref="x",e.yref="y",e.zref="z",l("xanchor"),l("yanchor"),l("xshift"),l("yshift"),e.showarrow&&(e.axref="pixel",e.ayref="pixel",l("ax",-10),l("ay",-30),n.noneOrAll(t,e,["ax","ay"])))}t.exports=function(t,e,r){o(t,e,{name:"annotations",handleItemDefaults:l,fullLayout:r.fullLayout})}},86191:(t,e,r)=>{"use strict";var n=r(8214).drawRaw,i=r(40747),o=["x","y","z"];t.exports=function(t){for(var e=t.fullSceneLayout,r=t.dataScale,a=e.annotations,s=0;s1){c=!0;break}}c?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+s+'"]').remove():(l._pdata=i(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},95997:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822);t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(98368)}}},layoutAttributes:r(98368),handleDefaults:r(76023),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(r)for(var o=r.attrRegex,a=Object.keys(t),s=0;s{"use strict";e.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],e.defaultLine="#444",e.lightLine="#eee",e.background="#fff",e.borderLine="#BEC8D9",e.lightFraction=1e3/11},17499:(t,e,r)=>{"use strict";var n=r(18106),i=r(7370),o=r(98507).isTypedArray,a=t.exports={},s=r(84226);a.defaults=s.defaults;var l=a.defaultLine=s.defaultLine;a.lightLine=s.lightLine;var c=a.background=s.background;function d(t){if(i(t)||"string"!=typeof t)return t;var e=t.trim();if("rgb"!==e.substr(0,3))return t;var r=e.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return t;var n=r[1].trim().split(/\s*[\s,]\s*/),o="a"===e.charAt(3)&&4===n.length;if(!o&&3!==n.length)return t;for(var a=0;a=0))return t;if(3===a)n[a]>1&&(n[a]=1);else if(n[a]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return o?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}a.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},a.rgb=function(t){return a.tinyRGB(n(t))},a.opacity=function(t){return t?n(t).getAlpha():0},a.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},a.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||c).toRgb(),o=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},a={r:o.r*(1-r.a)+r.r*r.a,g:o.g*(1-r.a)+r.g*r.a,b:o.b*(1-r.a)+r.b*r.a};return n(a).toRgbString()},a.interpolate=function(t,e,r){var i=n(t).toRgb(),o=n(e).toRgb(),a={r:r*i.r+(1-r)*o.r,g:r*i.g+(1-r)*o.g,b:r*i.b+(1-r)*o.b};return n(a).toRgbString()},a.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(a.combine(t,c))),(i.isDark()?e?i.lighten(e):c:r?i.darken(r):l).toString()},a.stroke=function(t,e){var r=n(e);t.style({stroke:a.tinyRGB(r),"stroke-opacity":r.getAlpha()})},a.fill=function(t,e){var r=n(e);t.style({fill:a.tinyRGB(r),"fill-opacity":r.getAlpha()})},a.clean=function(t){if(t&&"object"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e{"use strict";var n=r(86130),i=r(75058),o=r(98260).extendFlat,a=r(62309).overrideAll;t.exports=a({orientation:{valType:"enumerated",values:["h","v"],dflt:"v",description:"Sets the orientation of the colorbar."},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",description:["Determines whether this color bar's thickness","(i.e. the measure in the constant color direction)","is set in units of plot *fraction* or in *pixels*.","Use `thickness` to set the value."].join(" ")},thickness:{valType:"number",min:0,dflt:30,description:["Sets the thickness of the color bar","This measure excludes the size of the padding, ticks and labels."].join(" ")},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this color bar's length","(i.e. the measure in the color variation direction)","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the color bar","This measure excludes the padding of both ends.","That is, the color bar length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",description:["Sets the x position with respect to `xref` of the color bar (in plot fraction).","When `xref` is *paper*, defaults to 1.02 when `orientation` is *v* and","0.5 when `orientation` is *h*.","When `xref` is *container*, defaults to *1* when `orientation` is *v* and","0.5 when `orientation` is *h*.","Must be between *0* and *1* if `xref` is *container*","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],description:["Sets this color bar's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the color bar.","Defaults to *left* when `orientation` is *v* and","*center* when `orientation` is *h*."].join(" ")},xpad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the x direction."},y:{valType:"number",description:["Sets the y position with respect to `yref` of the color bar (in plot fraction).","When `yref` is *paper*, defaults to 0.5 when `orientation` is *v* and","1.02 when `orientation` is *h*.","When `yref` is *container*, defaults to 0.5 when `orientation` is *v* and","1 when `orientation` is *h*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets this color bar's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the color bar.","Defaults to *middle* when `orientation` is *v* and","*bottom* when `orientation` is *h*."].join(" ")},ypad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the y direction."},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:"number",min:0,dflt:0,description:["Sets the width (in px) or the border enclosing this color bar."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:"Sets the color of padded area."},tickmode:n.minor.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:o({},n.ticks,{dflt:""}),ticklabeloverflow:o({},n.ticklabeloverflow,{description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","In other cases the default is *hide past div*."].join(" ")}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",description:["Determines where tick labels are drawn relative to the ticks.","Left and right options are used when `orientation` is *h*,","top and bottom when `orientation` is *v*."].join(" ")},ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,showticklabels:n.showticklabels,labelalias:n.labelalias,tickfont:i({description:"Sets the color bar's tick label font"}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,minexponent:n.minexponent,showexponent:n.showexponent,title:{text:{valType:"string",description:["Sets the title of the color bar.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:i({description:["Sets this color bar's title font.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),side:{valType:"enumerated",values:["right","top","bottom"],description:["Determines the location of color bar's title","with respect to the color bar.","Defaults to *top* when `orientation` if *v* and ","defaults to *right* when `orientation` if *h*.","Note that the title's location used to be set","by the now deprecated `titleside` attribute."].join(" ")}},_deprecated:{title:{valType:"string",description:["Deprecated in favor of color bar's `title.text`.","Note that value of color bar's `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:i({description:"Deprecated in favor of color bar's `title.font`."}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top",description:"Deprecated in favor of color bar's `title.side`."}}},"colorbars","from-root")},30733:t=>{"use strict";t.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},81692:(t,e,r)=>{"use strict";var n=r(12822),i=r(46121),o=r(49342),a=r(8736),s=r(84411),l=r(12213),c=r(76699);t.exports=function(t,e,r){var d=i.newContainer(e,"colorbar"),u=t.colorbar||{};function h(t,e){return n.coerce(u,d,c,t,e)}var p=r.margin||{t:0,b:0,l:0,r:0},f=r.width-p.l-p.r,m=r.height-p.t-p.b,g="v"===h("orientation"),v=h("thicknessmode");h("thickness","fraction"===v?30/(g?f:m):30);var b=h("lenmode");h("len","fraction"===b?1:g?m:f);var y,x,w,_="paper"===h("yref"),k="paper"===h("xref"),A="left";g?(w="middle",A=k?"left":"right",y=k?1.02:1,x=.5):(w=_?"bottom":"top",A="center",y=.5,x=_?1.02:1),n.coerce(u,d,{x:{valType:"number",min:k?-2:0,max:k?3:1,dflt:y}},"x"),n.coerce(u,d,{y:{valType:"number",min:_?-2:0,max:_?3:1,dflt:x}},"y"),h("xanchor",A),h("xpad"),h("yanchor",w),h("ypad"),n.noneOrAll(u,d,["x","y"]),h("outlinecolor"),h("outlinewidth"),h("bordercolor"),h("borderwidth"),h("bgcolor");var T=n.coerce(u,d,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:g?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");h("ticklabeloverflow",-1!==T.indexOf("inside")?"hide past domain":"hide past div"),o(u,d,h,"linear");var M=r.font,S={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:M};-1!==T.indexOf("inside")&&(S.bgColor="black"),l(u,d,h,"linear",S),s(u,d,h,"linear",S),a(u,d,h,"linear",S),h("title.text",r._dfltTitle.colorbar);var C=d.showticklabels?d.tickfont:M,E=n.extendFlat({},M,{family:C.family,size:n.bigFont(C.size)});n.coerceFont(h,"title.font",E),h("title.side",g?"top":"right")}},29648:(t,e,r)=>{"use strict";var n=r(27941),i=r(18106),o=r(51137),a=r(25059),s=r(75815),l=r(19846),c=r(12822),d=c.strTranslate,u=r(98260).extendFlat,h=r(76292),p=r(40666),f=r(17499),m=r(6883),g=r(80394),v=r(42226).flipScale,b=r(91200),y=r(52869),x=r(86130),w=r(89701),_=w.LINE_SPACING,k=w.FROM_TL,A=w.FROM_BR,T=r(30733).cn;t.exports={draw:function(t){var e=t._fullLayout._infolayer.selectAll("g."+T.colorbar).data(function(t){var e,r,n,i,o=t._fullLayout,a=t.calcdata,s=[];function l(t){return u(t,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function c(){"function"==typeof i.calc?i.calc(t,n,e):(e._fillgradient=r.reversescale?v(r.colorscale):r.colorscale,e._zrange=[r[i.min],r[i.max]])}for(var d=0;d0?n>=l:n<=l));i++)n>d&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var pt=Math.pow(10,Math.floor(Math.log(ht)/Math.LN10));dt*=pt*c.roundUp(ht/pt,[2,5,10]),(Math.abs(q.start)/q.size+1e-6)%1<2e-6&&(lt.tick0=0)}lt.dtick=dt}lt.domain=a?[at+O/j.h,at+Q-O/j.h]:[at+z/j.w,at+Q-z/j.w],lt.setScale(),t.attr("transform",d(Math.round(j.l),Math.round(j.t)));var ft,mt=t.select("."+T.cbtitleunshift).attr("transform",d(-Math.round(j.l),-Math.round(j.t))),gt=lt.ticklabelposition,vt=lt.title.font.size,bt=t.select("."+T.cbaxis),yt=0,xt=0;function wt(n,i){var o={propContainer:lt,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:P._dfltTitle.colorbar,containerGroup:t.select("."+T.cbtitle)},a="h"===n.charAt(0)?n.substr(1):"h"+n;t.selectAll("."+a+",."+a+"-math-group").remove(),m.draw(r,n,u(o,i||{}))}return c.syncOrAsync([o.previousPromises,function(){var t,e;(a&&ct||!a&&!ct)&&("top"===G&&(t=z+j.l+tt*D,e=O+j.t+et*(1-at-Q)+3+.75*vt),"bottom"===G&&(t=z+j.l+tt*D,e=O+j.t+et*(1-at)-3-.25*vt),"right"===G&&(e=O+j.t+et*I+3+.75*vt,t=z+j.l+tt*at),wt(lt._id+"title",{attributes:{x:t,y:e,"text-anchor":a?"start":"middle"}}))},function(){if(!a&&!ct||a&&ct){var o,l=t.select("."+T.cbtitle),u=l.select("text"),h=[-M/2,M/2],f=l.select(".h"+lt._id+"title-math-group").node(),m=15.6;if(u.node()&&(m=parseInt(u.node().style.fontSize,10)*_),f?(o=p.bBox(f),xt=o.width,(yt=o.height)>m&&(h[1]-=(yt-m)/2)):u.node()&&!u.classed(T.jsPlaceholder)&&(o=p.bBox(u.node()),xt=o.width,yt=o.height),a){if(yt){if(yt+=5,"top"===G)lt.domain[1]-=yt/j.h,h[1]*=-1;else{lt.domain[0]+=yt/j.h;var v=g.lineCount(u);h[1]+=(1-v)*m}l.attr("transform",d(h[0],h[1])),lt.setScale()}}else xt&&("right"===G&&(lt.domain[0]+=(xt+vt/2)/j.w),l.attr("transform",d(h[0],h[1])),lt.setScale())}t.selectAll("."+T.cbfills+",."+T.cblines).attr("transform",a?d(0,Math.round(j.h*(1-lt.domain[1]))):d(Math.round(j.w*lt.domain[0]),0)),bt.attr("transform",a?d(0,Math.round(-j.t)):d(Math.round(-j.l),0));var b=t.select("."+T.cbfills).selectAll("rect."+T.cbfill).attr("style","").data(Z);b.enter().append("rect").classed(T.cbfill,!0).attr("style",""),b.exit().remove();var y=V.map(lt.c2p).map(Math.round).sort((function(t,e){return t-e}));b.each((function(t,o){var s=[0===o?V[0]:(Z[o]+Z[o-1])/2,o===Z.length-1?V[1]:(Z[o]+Z[o+1])/2].map(lt.c2p).map(Math.round);a&&(s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,y[0],y[1]));var l=n.select(this).attr(a?"x":"y",rt).attr(a?"y":"x",n.min(s)).attr(a?"width":"height",Math.max(X,2)).attr(a?"height":"width",Math.max(n.max(s)-n.min(s),2));if(e._fillgradient)p.gradient(l,r,e._id,a?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var d=W(t).replace("e-","");l.attr("fill",i(d).toHexString())}}));var x=t.select("."+T.cblines).selectAll("path."+T.cbline).data(B.color&&B.width?$:[]);x.enter().append("path").classed(T.cbline,!0),x.exit().remove(),x.each((function(t){var e=rt,r=Math.round(lt.c2p(t))+B.width/2%1;n.select(this).attr("d","M"+(a?e+","+r:r+","+e)+(a?"h":"v")+X).call(p.lineGroupStyle,B.width,H(t),B.dash)})),bt.selectAll("g."+lt._id+"tick,path").remove();var w=rt+X+(M||0)/2-("outside"===e.ticks?1:0),k=s.calcTicks(lt),A=s.getTickSigns(lt)[2];return s.drawTicks(r,lt,{vals:"inside"===lt.ticks?s.clipEnds(lt,k):k,layer:bt,path:s.makeTickPath(lt,w,A),transFn:s.makeTransTickFn(lt)}),s.drawLabels(r,lt,{vals:k,layer:bt,transFn:s.makeTransTickLabelFn(lt),labelFns:s.makeLabelFns(lt,w)})},function(){if(a&&!ct||!a&&ct){var t,i,o=lt.position||0,s=lt._offset+lt._length/2;if("right"===G)i=s,t=j.l+tt*o+10+vt*(lt.showticklabels?1:.5);else if(t=s,"bottom"===G&&(i=j.t+et*o+10+(-1===gt.indexOf("inside")?lt.tickfont.size:0)+("intside"!==lt.ticks&&e.ticklen||0)),"top"===G){var l=U.text.split("
").length;i=j.t+et*o+10-X-_*vt*l}wt((a?"h":"v")+lt._id+"title",{avoid:{selection:n.select(r).selectAll("g."+lt._id+"tick"),side:G,offsetTop:a?0:j.t,offsetLeft:a?j.l:0,maxShift:a?P.width:P.height},attributes:{x:t,y:i,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}},o.previousPromises,function(){var n,s=X+M/2;-1===gt.indexOf("inside")&&(n=p.bBox(bt.node()),s+=a?n.width:n.height),ft=mt.select("text");var c=0,u=a&&"top"===G,m=!a&&"right"===G,g=0;if(ft.node()&&!ft.classed(T.jsPlaceholder)){var b,y=mt.select(".h"+lt._id+"title-math-group").node();y&&(a&&ct||!a&&!ct)?(c=(n=p.bBox(y)).width,b=n.height):(c=(n=p.bBox(mt.node())).right-j.l-(a?rt:st),b=n.bottom-j.t-(a?st:rt),a||"top"!==G||(s+=n.height,g=n.height)),m&&(ft.attr("transform",d(c/2+vt/2,0)),c*=2),s=Math.max(s,a?c:b)}var x=2*(a?z:O)+s+S+M/2,_=0;!a&&U.text&&"bottom"===L&&I<=0&&(x+=_=x/2,g+=_),P._hColorbarMoveTitle=_,P._hColorbarMoveCBTitle=g;var N=S+M,B=(a?rt:st)-N/2-(a?z:0),V=(a?st:rt)-(a?K:O+g-_);t.select("."+T.cbbg).attr("x",B).attr("y",V).attr(a?"width":"height",Math.max(x-_,2)).attr(a?"height":"width",Math.max(K+N,2)).call(f.fill,C).call(f.stroke,e.bordercolor).style("stroke-width",S);var H=m?Math.max(c-10,0):0;t.selectAll("."+T.cboutline).attr("x",(a?rt:st+z)+H).attr("y",(a?st+O-K:rt)+(u?yt:0)).attr(a?"width":"height",Math.max(X,2)).attr(a?"height":"width",Math.max(K-(a?2*O+yt:2*z+H),2)).call(f.stroke,e.outlinecolor).style({fill:"none","stroke-width":M});var W=a?nt*x:0,q=a?0:(1-it)*x-g;if(W=R?j.l-W:-W,q=F?j.t-q:-q,t.attr("transform",d(W,q)),!a&&(S||i(C).getAlpha()&&!i.equals(P.paper_bgcolor,C))){var Y=bt.selectAll("text"),Z=Y[0].length,$=t.select("."+T.cbbg).node(),J=p.bBox($),Q=p.getTranslate(t);Y.each((function(t,e){var r=Z-1;if(0===e||e===r){var n,i=p.bBox(this),o=p.getTranslate(this);if(e===r){var a=i.right+o.x;(n=J.right+Q.x+st-S-2+D-a)>0&&(n=0)}else if(0===e){var s=i.left+o.x;(n=J.left+Q.x+st+S+2-s)<0&&(n=0)}n&&(Z<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var tt={},et=k[E],ot=A[E],at=k[L],dt=A[L],ut=x-X;a?("pixels"===h?(tt.y=I,tt.t=K*at,tt.b=K*dt):(tt.t=tt.b=0,tt.yt=I+l*at,tt.yb=I-l*dt),"pixels"===w?(tt.x=D,tt.l=x*et,tt.r=x*ot):(tt.l=ut*et,tt.r=ut*ot,tt.xl=D-v*et,tt.xr=D+v*ot)):("pixels"===h?(tt.x=D,tt.l=K*et,tt.r=K*ot):(tt.l=tt.r=0,tt.xl=D+l*et,tt.xr=D-l*ot),"pixels"===w?(tt.y=1-I,tt.t=x*at,tt.b=x*dt):(tt.t=ut*at,tt.b=ut*dt,tt.yt=I-v*at,tt.yb=I+v*dt));var ht=e.y<.5?"b":"t",pt=e.x<.5?"l":"r";r._fullLayout._reservedMargin[e._id]={};var xt={r:P.width-B-W,l:B+tt.r,b:P.height-V-q,t:V+tt.b};R&&F?o.autoMargin(r,e._id,tt):R?r._fullLayout._reservedMargin[e._id][ht]=xt[ht]:F||a?r._fullLayout._reservedMargin[e._id][pt]=xt[pt]:r._fullLayout._reservedMargin[e._id][ht]=xt[ht]}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,o,s="v"===e.orientation,c=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr("transform"),h(t)},moveFn:function(r,a){t.attr("transform",n+d(r,a)),i=l.align((s?e._uFrac:e._vFrac)+r/c.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),o=l.align((s?e._vFrac:1-e._uFrac)-a/c.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var u=l.getCursor(i,o,e.xanchor,e.yanchor);h(t,u)},doneFn:function(){if(h(t),void 0!==i&&void 0!==o){var n={};n[e._propPrefix+"x"]=i,n[e._propPrefix+"y"]=o,void 0!==e._traceIndex?a.call("_guiRestyle",r,n,e._traceIndex):a.call("_guiRelayout",r,n)}}})}(r,e,t)})),e.exit().each((function(e){o.autoMargin(t,e._id)})).remove(),e.order()}}},52467:(t,e,r)=>{"use strict";var n=r(12822);t.exports=function(t){return n.isPlainObject(t.colorbar)}},10552:(t,e,r)=>{"use strict";t.exports={moduleType:"component",name:"colorbar",attributes:r(76699),supplyDefaults:r(81692),draw:r(29648).draw,hasColorbar:r(52467)}},89322:(t,e,r)=>{"use strict";var n=r(76699),i=r(46233).counter,o=r(54747),a=r(78920).scales,s=o(a);function l(t){return"`"+t+"`"}t.exports=function(t,e){t=t||"";var r,o,c=(e=e||{}).cLetter||"c",d="onlyIfNumerical"in e?e.onlyIfNumerical:Boolean(t),u="noScale"in e?e.noScale:"marker.line"===t,h="showScaleDflt"in e?e.showScaleDflt:"z"===c,p="string"==typeof e.colorscaleDflt?a[e.colorscaleDflt]:null,f=e.editTypeOverride||"",m=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,o=e.colorAttr):o="in "+l(m+(r={z:"z",c:"color"}[c]));var g=d?" Has an effect only if "+o+" is set to a numerical array.":"",v=c+"auto",b=c+"min",y=c+"max",x=c+"mid",w=l(m+v),_=l(m+b),k=l(m+y),A=_+" and "+k,T={};T[b]=T[y]=void 0;var M={};M[v]=!1;var S={};return"color"===r&&(S.color={valType:"color",arrayOk:!0,editType:f||"style",description:["Sets the",t,"color.","It accepts either a specific color","or an array of numbers that are mapped to the colorscale","relative to the max and min values of the array or relative to",A,"if set."].join(" ")},e.anim&&(S.color.anim=!0)),S[v]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:T,description:["Determines whether or not the color domain is computed","with respect to the input data (here "+o+") or the bounds set in",A+g,"Defaults to `false` when",A,"are set by the user."].join(" ")},S[b]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:M,description:["Sets the lower bound of the color domain."+g,"Value should have the same units as",o,"and if set,",k,"must be set as well."].join(" ")},S[y]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:M,description:["Sets the upper bound of the color domain."+g,"Value should have the same units as",o,"and if set,",_,"must be set as well."].join(" ")},S[x]={valType:"number",dflt:null,editType:"calc",impliedEdits:T,description:["Sets the mid-point of the color domain by scaling",_,"and/or",k,"to be equidistant to this point."+g,"Value should have the same units as",o+".","Has no effect when",w,"is `false`."].join(" ")},S.colorscale={valType:"colorscale",editType:"calc",dflt:p,impliedEdits:{autocolorscale:!1},description:["Sets the colorscale."+g,"The colorscale must be an array containing","arrays mapping a normalized value to an","rgb, rgba, hex, hsl, hsv, or named color string.","At minimum, a mapping for the lowest (0) and highest (1)","values are required. For example,","`[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`.","To control the bounds of the colorscale in color space,","use",A+".","Alternatively, `colorscale` may be a palette name string","of the following list: "+s+"."].join(" ")},S.autocolorscale={valType:"boolean",dflt:!1!==e.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0},description:["Determines whether the colorscale is a default palette (`autocolorscale: true`)","or the palette determined by",l(m+"colorscale")+"."+g,"In case `colorscale` is unspecified or `autocolorscale` is true, the default","palette will be chosen according to whether numbers in the `color` array are","all positive, all negative or mixed."].join(" ")},S.reversescale={valType:"boolean",dflt:!1,editType:"plot",description:["Reverses the color mapping if true."+g,"If true,",_,"will correspond to the last color","in the array and",k,"will correspond to the first color."].join(" ")},u||(S.showscale={valType:"boolean",dflt:h,editType:"calc",description:["Determines whether or not a colorbar is displayed for this trace."+g].join(" ")},S.colorbar=n),e.noColorAxis||(S.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc",description:["Sets a reference to a shared color axis.","References to these shared color axes are *coloraxis*, *coloraxis2*, *coloraxis3*, etc.","Settings for these shared color axes are set in the layout, under","`layout.coloraxis`, `layout.coloraxis2`, etc.","Note that multiple color scales can be linked to the same color axis."].join(" ")}),S}},62182:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822),o=r(42226).extractOpts;t.exports=function(t,e,r){var a,s=t._fullLayout,l=r.vals,c=r.containerStr,d=c?i.nestedProperty(e,c).get():e,u=o(d),h=!1!==u.auto,p=u.min,f=u.max,m=u.mid,g=function(){return i.aggNums(Math.min,null,l)},v=function(){return i.aggNums(Math.max,null,l)};void 0===p?p=g():h&&(p=d._colorAx&&n(p)?Math.min(p,g()):g()),void 0===f?f=v():h&&(f=d._colorAx&&n(f)?Math.max(f,v()):v()),h&&void 0!==m&&(f-m>m-p?p=m-(f-m):f-m=0?s.colorscale.sequential:s.colorscale.sequentialminus,u._sync("colorscale",a))}},51774:(t,e,r)=>{"use strict";var n=r(12822),i=r(42226).hasColorscale,o=r(42226).extractOpts;t.exports=function(t,e){function r(t,e){var r=t["_"+e];void 0!==r&&(t[e]=r)}function a(t,i){var a=i.container?n.nestedProperty(t,i.container).get():t;if(a)if(a.coloraxis)a._colorAx=e[a.coloraxis];else{var s=o(a),l=s.auto;(l||void 0===s.min)&&r(a,i.min),(l||void 0===s.max)&&r(a,i.max),s.autocolorscale&&r(a,"colorscale")}}for(var s=0;s{"use strict";var n=r(7370),i=r(12822),o=r(52467),a=r(81692),s=r(78920).isValid,l=r(25059).traceIs;function c(t,e){var r=e.slice(0,e.length-1);return e?i.nestedProperty(t,r).get()||{}:t}t.exports=function t(e,r,d,u,h){var p=h.prefix,f=h.cLetter,m="_module"in r,g=c(e,p),v=c(r,p),b=c(r._template||{},p)||{},y=function(){return delete e.coloraxis,delete r.coloraxis,t(e,r,d,u,h)};if(m){var x=d._colorAxes||{},w=u(p+"coloraxis");if(w){var _=l(r,"contour")&&i.nestedProperty(r,"contours.coloring").get()||"heatmap",k=x[w];return void(k?(k[2].push(y),k[0]!==_&&(k[0]=!1,i.warn(["Ignoring coloraxis:",w,"setting","as it is linked to incompatible colorscales."].join(" ")))):x[w]=[_,r,[y]])}}var A=g[f+"min"],T=g[f+"max"],M=n(A)&&n(T)&&A{"use strict";var n=r(27941),i=r(18106),o=r(7370),a=r(12822),s=r(17499),l=r(78920).isValid,c=["showscale","autocolorscale","colorscale","reversescale","colorbar"],d=["min","max","mid","auto"];function u(t){var e,r,n,i=t._colorAx,o=i||t,a={};for(r=0;r=0;n--,i++){var o=t[n];r[i]=[1-o[0],o[1]]}return r}function f(t,e){e=e||{};for(var r=t.domain,a=t.range,l=a.length,c=new Array(l),d=0;d{"use strict";var n=r(78920),i=r(42226);t.exports={moduleType:"component",name:"colorscale",attributes:r(89322),layoutAttributes:r(92425),supplyLayoutDefaults:r(28558),handleDefaults:r(94461),crossTraceDefaults:r(51774),calc:r(62182),scales:n.scales,defaultScale:n.defaultScale,getScale:n.get,isValidScale:n.isValid,hasColorscale:i.hasColorscale,extractOpts:i.extractOpts,extractScale:i.extractScale,flipScale:i.flipScale,makeColorScaleFunc:i.makeColorScaleFunc,makeColorScaleFuncFromTrace:i.makeColorScaleFuncFromTrace}},92425:(t,e,r)=>{"use strict";var n=r(98260).extendFlat,i=r(89322),o=r(78920).scales,a="Note that `autocolorscale` must be true for this attribute to work.";t.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:o.Reds,editType:"calc",description:["Sets the default sequential colorscale for positive values.",a].join(" ")},sequentialminus:{valType:"colorscale",dflt:o.Blues,editType:"calc",description:["Sets the default sequential colorscale for negative values.",a].join(" ")},diverging:{valType:"colorscale",dflt:o.RdBu,editType:"calc",description:["Sets the default diverging colorscale.",a].join(" ")}},coloraxis:n({_isSubplotObj:!0,editType:"calc",description:[""].join(" ")},i("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},28558:(t,e,r)=>{"use strict";var n=r(12822),i=r(46121),o=r(92425),a=r(94461);t.exports=function(t,e){function r(r,i){return n.coerce(t,e,o,r,i)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var s,l,c=e._colorAxes;function d(t,e){return n.coerce(s,l,o.coloraxis,t,e)}for(var u in c){var h=c[u];if(h[0])s=t[u]||{},(l=i.newContainer(e,u,"coloraxis"))._name=u,a(s,l,e,d,{prefix:"",cLetter:"c"});else{for(var p=0;p{"use strict";var n=r(18106),i={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},o=i.RdBu;function a(t){var e=0;if(!Array.isArray(t)||t.length<2)return!1;if(!t[0]||!t[t.length-1])return!1;if(0!=+t[0][0]||1!=+t[t.length-1][0])return!1;for(var r=0;r{"use strict";t.exports=function(t,e,r,n,i){var o=(t-r)/(n-r),a=o+e/(n-r),s=(o+a)/2;return"left"===i||"bottom"===i?o:"center"===i||"middle"===i?s:"right"===i||"top"===i?a:o<2/3-s?o:a>4/3-s?a:s}},29182:(t,e,r)=>{"use strict";var n=r(12822),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(t,e,r,o){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===o?0:"middle"===o?1:"top"===o?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},14295:(t,e)=>{"use strict";e.selectMode=function(t){return"lasso"===t||"select"===t},e.drawMode=function(t){return"drawclosedpath"===t||"drawopenpath"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},e.openMode=function(t){return"drawline"===t||"drawopenpath"===t},e.rectMode=function(t){return"select"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},e.freeMode=function(t){return"lasso"===t||"drawclosedpath"===t||"drawopenpath"===t},e.selectingOrDrawing=function(t){return e.freeMode(t)||e.rectMode(t)}},19846:(t,e,r)=>{"use strict";var n=r(10024),i=r(56885),o=r(17520),a=r(12822).removeElement,s=r(21197),l=t.exports={};l.align=r(45035),l.getCursor=r(29182);var c=r(99573);function d(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function u(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(t){var e,r,n,c,h,p,f,m,g=t.gd,v=1,b=g._context.doubleClickDelay,y=t.element;g._mouseDownTime||(g._mouseDownTime=0),y.style.pointerEvents="all",y.onmousedown=w,o?(y._ontouchstart&&y.removeEventListener("touchstart",y._ontouchstart),y._ontouchstart=w,y.addEventListener("touchstart",w,{passive:!1})):y.ontouchstart=w;var x=t.clampFn||function(t,e,r){return Math.abs(t)b&&(v=Math.max(v-1,1)),g._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(v,p),!m){var r;try{r=new MouseEvent("click",e)}catch(t){var n=u(e);(r=document.createEvent("MouseEvents")).initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,n[0],n[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}f.dispatchEvent(r)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},l.coverSlip=d},99573:(t,e,r)=>{"use strict";var n=r(16677),i=r(76324),o=r(16822).getGraphDiv,a=r(99259),s=t.exports={};s.wrapped=function(t,e,r){(t=o(t))._fullLayout&&i.clear(t._fullLayout._uid+a.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&!t._dragged&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&i&&t.emit("plotly_unhover",{event:e,points:i}))}},68057:(t,e)=>{"use strict";e.T={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style",description:["Sets the dash style of lines. Set to a dash type string","(*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*)","or a dash length list in px (eg *5px,10px,2px,2px*)."].join(" ")},e.k={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style",description:["Sets the shape of the pattern fill.","By default, no pattern is used for filling the area."].join(" ")},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style",description:["Determines whether `marker.color` should be used","as a default to `bgcolor` or a `fgcolor`."].join(" ")},bgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of background pattern fill.","Defaults to a `marker.color` background when `fillmode` is *overlay*.","Otherwise, defaults to a transparent background."].join(" ")},fgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of foreground pattern fill.","Defaults to a `marker.color` background when `fillmode` is *replace*.","Otherwise, defaults to dark grey or white","to increase contrast with the `bgcolor`."].join(" ")},fgopacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the foreground pattern fill.","Defaults to a 0.5 when `fillmode` is *overlay*.","Otherwise, defaults to 1."].join(" ")},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style",description:["Sets the size of unit squares of the pattern fill in pixels,","which corresponds to the interval of repetition of the pattern."].join(" ")},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style",description:["Sets the solidity of the pattern fill.","Solidity is roughly the fraction of the area filled by the pattern.","Solidity of 0 shows only the background color without pattern","and solidty of 1 shows only the foreground color without pattern."].join(" ")},editType:"style",description:["Sets the pattern within the marker."].join(" ")}},40666:(t,e,r)=>{"use strict";var n=r(27941),i=r(12822),o=i.numberFormat,a=r(7370),s=r(18106),l=r(25059),c=r(17499),d=r(80755),u=i.strTranslate,h=r(80394),p=r(25853),f=r(89701).LINE_SPACING,m=r(11891).DESELECTDIM,g=r(677),v=r(43710),b=r(66811).appendArrayPointValue,y=t.exports={};function x(t){return"none"===t?void 0:t}y.font=function(t,e){var r=e.variant,n=e.style,i=e.weight,o=e.color,a=e.size,s=e.family,l=e.shadow,d=e.lineposition,u=e.textcase;s&&t.style("font-family",s),a+1&&t.style("font-size",a+"px"),o&&t.call(c.fill,o),i&&t.style("font-weight",i),n&&t.style("font-style",n),r&&t.style("font-variant",r),u&&t.style("text-transform",x(function(t){return w[t]}(u))),l&&t.style("text-shadow","auto"===l?h.makeTextShadow(c.contrast(o)):x(l)),d&&t.style("text-decoration-line",x(function(t){return t.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}(d)))};var w={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function _(t,e,r,n){var i=e.fillpattern,o=e.fillgradient,a=i&&y.getPatternAttr(i.shape,0,"");if(a){var s=y.getPatternAttr(i.bgcolor,0,null),l=y.getPatternAttr(i.fgcolor,0,null),d=i.fgopacity,u=y.getPatternAttr(i.size,0,8),h=y.getPatternAttr(i.solidity,0,.3),p=e.uid;y.pattern(t,"point",r,p,a,u,h,void 0,i.fillmode,s,l,d)}else if(o&&"none"!==o.type){var f,m,g=o.type,v="scatterfill-"+e.uid;n&&(v="legendfill-"+e.uid),n||void 0===o.start&&void 0===o.stop?("horizontal"===g&&(g+="reversed"),t.call(y.gradient,r,v,g,o.colorscale,"fill")):("horizontal"===g?(f={x:o.start,y:0},m={x:o.stop,y:0}):"vertical"===g&&(f={x:0,y:o.start},m={x:0,y:o.stop}),f.x=e._xA.c2p(void 0===f.x?e._extremes.x.min[0].val:f.x,!0),f.y=e._yA.c2p(void 0===f.y?e._extremes.y.min[0].val:f.y,!0),m.x=e._xA.c2p(void 0===m.x?e._extremes.x.max[0].val:m.x,!0),m.y=e._yA.c2p(void 0===m.y?e._extremes.y.max[0].val:m.y,!0),t.call(C,r,v,"linear",o.colorscale,"fill",f,m,!0,!1))}else e.fillcolor&&t.call(c.fill,e.fillcolor)}y.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},y.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},y.setRect=function(t,e,r,n,i){t.call(y.setPosition,e,r).call(y.setSize,n,i)},y.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),o=n.c2p(t.y);return!!(a(i)&&a(o)&&e.node())&&("text"===e.node().nodeName?e.attr("x",i).attr("y",o):e.attr("transform",u(i,o)),!0)},y.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);y.translatePoint(t,i,e,r)}))},y.hideOutsideRangePoint=function(t,e,r,n,i,o){e.attr("display",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,o)?null:"none")},y.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,i=e.yaxis;t.each((function(e){var o=e[0].trace,a=o.xcalendar,s=o.ycalendar,c=l.traceIs(o,"bar-like")?".bartext":".point,.textpoint";t.selectAll(c).each((function(t){y.hideOutsideRangePoint(t,n.select(this),r,i,a,s)}))}))}},y.crispRound=function(t,e,r){return e&&a(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},y.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var o=(((t||[])[0]||{}).trace||{}).line||{},a=r||o.width||0,s=i||o.dash||"";c.stroke(e,n||o.color),y.dashLine(e,s,a)},y.lineGroupStyle=function(t,e,r,i){t.style("fill","none").each((function(t){var o=(((t||[])[0]||{}).trace||{}).line||{},a=e||o.width||0,s=i||o.dash||"";n.select(this).call(c.stroke,r||o.color).call(y.dashLine,s,a)}))},y.dashLine=function(t,e,r){r=+r||0,e=y.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},y.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},y.singleFillStyle=function(t,e){var r=n.select(t.node());_(t,((r.data()[0]||[])[0]||{}).trace||{},e,!1)},y.fillGroupStyle=function(t,e,r){t.style("stroke-width",0).each((function(t){var i=n.select(this);t[0].trace&&_(i,t[0].trace,e,r)}))};var k=r(68735);y.symbolNames=[],y.symbolFuncs=[],y.symbolBackOffs=[],y.symbolNeedLines={},y.symbolNoDot={},y.symbolNoFill={},y.symbolList=[],Object.keys(k).forEach((function(t){var e=k[t],r=e.n;y.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),y.symbolNames[r]=t,y.symbolFuncs[r]=e.f,y.symbolBackOffs[r]=e.backoff||0,e.needLine&&(y.symbolNeedLines[r]=!0),e.noDot?y.symbolNoDot[r]=!0:y.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(y.symbolNoFill[r]=!0)}));var A=y.symbolNames.length;function T(t,e,r,n){var i=t%100;return y.symbolFuncs[i](e,r,n)+(t>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}y.symbolNumber=function(t){if(a(t))t=+t;else if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=y.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=A||t>=400?0:Math.floor(Math.max(t,0))};var M=o("~f"),S={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function C(t,e,r,o,a,l,d,u,h,p){var f,m=a.length;"linear"===o?f={node:"linearGradient",attrs:{x1:d.x,y1:d.y,x2:u.x,y2:u.y,gradientUnits:h?"userSpaceOnUse":"objectBoundingBox"},reversed:p}:"radial"===o&&(f={node:"radialGradient",reversed:p});for(var g=new Array(m),v=0;v=0&&void 0===t.i&&(t.i=a.i),e.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(t):void 0===t.mo?s.opacity:t.mo),n.ms2mrc){var d;d="various"===t.ms||"various"===s.size?3:n.ms2mrc(t.ms),t.mrc=d,n.selectedSizeFn&&(d=t.mrc=n.selectedSizeFn(t));var u=y.symbolNumber(t.mx||s.symbol)||0;t.om=u%200>=100;var h=nt(t,r),p=q(t,r);e.attr("d",T(u,d,h,p))}var f,m,g,v=!1;if(t.so)g=l.outlierwidth,m=l.outliercolor,f=s.outliercolor;else{var b=(l||{}).width;g=(t.mlw+1||b+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,m="mlc"in t?t.mlcc=n.lineScale(t.mlc):i.isArrayOrTypedArray(l.color)?c.defaultLine:l.color,i.isArrayOrTypedArray(s.color)&&(f=c.defaultLine,v=!0),f="mc"in t?t.mcc=n.markerScale(t.mc):s.color||s.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(f=n.selectedColorFn(t))}if(t.om)e.call(c.stroke,f).style({"stroke-width":(g||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:g)+"px");var x=s.gradient,w=t.mgt;w?v=!0:w=x&&x.type,i.isArrayOrTypedArray(w)&&(w=w[0],S[w]||(w=0));var _=s.pattern,k=_&&y.getPatternAttr(_.shape,t.i,"");if(w&&"none"!==w){var A=t.mgc;A?v=!0:A=x.color;var M=r.uid;v&&(M+="-"+t.i),y.gradient(e,o,M,w,[[0,A],[1,f]],"fill")}else if(k){var C=!1,E=_.fgcolor;!E&&a&&a.color&&(E=a.color,C=!0);var L=y.getPatternAttr(E,t.i,a&&a.color||null),z=y.getPatternAttr(_.bgcolor,t.i,null),O=_.fgopacity,D=y.getPatternAttr(_.size,t.i,8),I=y.getPatternAttr(_.solidity,t.i,.3);C=C||t.mcc||i.isArrayOrTypedArray(_.shape)||i.isArrayOrTypedArray(_.bgcolor)||i.isArrayOrTypedArray(_.fgcolor)||i.isArrayOrTypedArray(_.size)||i.isArrayOrTypedArray(_.solidity);var F=r.uid;C&&(F+="-"+t.i),y.pattern(e,"point",o,F,k,D,I,t.mcc,_.fillmode,z,L,O)}else i.isArrayOrTypedArray(f)?c.fill(e,f[t.i]):c.fill(e,f);g&&c.stroke(e,m)}},y.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=y.tryColorscale(r,""),e.lineScale=y.tryColorscale(r,"line"),l.traceIs(t,"symbols")&&(e.ms2mrc=g.isBubble(t)?v(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,y.makeSelectedPointStyleFns(t)),e},y.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},o=t.marker||{},a=r.marker||{},s=n.marker||{},c=o.opacity,d=a.opacity,u=s.opacity,h=void 0!==d,p=void 0!==u;(i.isArrayOrTypedArray(c)||h||p)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?o.opacity:t.mo;return t.selected?h?d:e:p?u:m*e});var f=o.color,g=a.color,v=s.color;(g||v)&&(e.selectedColorFn=function(t){var e=t.mcc||f;return t.selected?g||e:v||e});var b=o.size,y=a.size,x=s.size,w=void 0!==y,_=void 0!==x;return l.traceIs(t,"symbols")&&(w||_)&&(e.selectedSizeFn=function(t){var e=t.mrc||b/2;return t.selected?w?y/2:e:_?x/2:e}),e},y.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},o=r.textfont||{},a=n.textfont||{},s=i.color,l=o.color,d=a.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:d||(l?e:c.addOpacity(e,m))},e},y.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=y.makeSelectedPointStyleFns(e),i=e.marker||{},o=[];r.selectedOpacityFn&&o.push((function(t,e){t.style("opacity",r.selectedOpacityFn(e))})),r.selectedColorFn&&o.push((function(t,e){c.fill(t,r.selectedColorFn(e))})),r.selectedSizeFn&&o.push((function(t,n){var o=n.mx||i.symbol||0,a=r.selectedSizeFn(n);t.attr("d",T(y.symbolNumber(o),a,nt(n,e),q(n,e))),n.mrc2=a})),o.length&&t.each((function(t){for(var e=n.select(this),r=0;r0?r:0}function I(t,e,r){return r&&(t=B(t)),e?R(t[1]):F(t[0])}function F(t){var e=n.round(t,2);return E=e,e}function R(t){var e=n.round(t,2);return L=e,e}function P(t,e,r,n){var i=t[0]-e[0],o=t[1]-e[1],a=r[0]-e[0],s=r[1]-e[1],l=Math.pow(i*i+o*o,.25),c=Math.pow(a*a+s*s,.25),d=(c*c*i-l*l*a)*n,u=(c*c*o-l*l*s)*n,h=3*c*(l+c),p=3*l*(l+c);return[[F(e[0]+(h&&d/h)),R(e[1]+(h&&u/h))],[F(e[0]-(p&&d/p)),R(e[1]-(p&&u/p))]]}y.textPointStyle=function(t,e,r){if(t.size()){var o;if(e.selectedpoints){var a=y.makeSelectedTextStyleFns(e);o=a.selectedTextColorFn}var s=e.texttemplate,l=r._fullLayout;t.each((function(t){var a=n.select(this),c=s?i.extractOption(t,e,"txt","texttemplate"):i.extractOption(t,e,"tx","text");if(c||0===c){if(s){var d=e._module.formatLabels,u=d?d(t,e,l):{},p={};b(p,e,t.i);var f=e._meta||{};c=i.texttemplateString(c,u,l._d3locale,p,t,f)}var m=t.tp||e.textposition,g=D(t,e),v=o?o(t):t.tc||e.textfont.color;a.call(y.font,{family:t.tf||e.textfont.family,weight:t.tw||e.textfont.weight,style:t.ty||e.textfont.style,variant:t.tv||e.textfont.variant,textcase:t.tC||e.textfont.textcase,lineposition:t.tE||e.textfont.lineposition,shadow:t.tS||e.textfont.shadow,size:g,color:v}).text(c).call(h.convertToTspans,r).call(O,m,g,t.mrc)}else a.remove()}))}},y.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=y.makeSelectedTextStyleFns(e);t.each((function(t){var i=n.select(this),o=r.selectedTextColorFn(t),a=t.tp||e.textposition,s=D(t,e);c.fill(i,o);var d=l.traceIs(e,"bar-like");O(i,a,s,t.mrc2||t.mrc,d)}))}},y.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],i=[];for(r=1;r=c||_>=u&&_<=c)&&(k<=h&&k>=d||k>=h&&k<=d)&&(t=[_,k])}return t}y.steps=function(t){var e=j[t]||N;return function(t){for(var r="M"+F(t[0][0])+","+R(t[0][1]),n=t.length,i=1;i=1e4&&(y.savedBBoxes={},U=0),r&&(y.savedBBoxes[r]=g),U++,i.extendFlat({},g)},y.setClipUrl=function(t,e,r){t.attr("clip-path",V(e,r))},y.getTranslate=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||0,y:+e[1]||0}},y.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",o=t[n]("transform")||"";return e=e||0,r=r||0,o=o.replace(/(\btranslate\(.*?\);?)/,"").trim(),o=(o+=u(e,r)).trim(),t[i]("transform",o),o},y.getScale=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||1,y:+e[1]||1}},y.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",o=t[n]("transform")||"";return e=e||1,r=r||1,o=o.replace(/(\bscale\(.*?\);?)/,"").trim(),o=(o+="scale("+e+","+r+")").trim(),t[i]("transform",o),o};var H=/\s*sc.*/;y.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":"scale("+e+","+r+")";t.each((function(){var t=(this.getAttribute("transform")||"").replace(H,"");t=(t+=n).trim(),this.setAttribute("transform",t)}))}};var W=/translate\([^)]*\)\s*$/;function q(t,e){var r;return t&&(r=t.mf),void 0===r&&(r=e.marker&&e.marker.standoff||0),e._geo||e._xA?r:-r}y.setTextPointsScale=function(t,e,r){t&&t.each((function(){var t,i=n.select(this),o=i.select("text");if(o.node()){var a=parseFloat(o.attr("x")||0),s=parseFloat(o.attr("y")||0),l=(i.attr("transform")||"").match(W);t=1===e&&1===r?[]:[u(a,s),"scale("+e+","+r+")",u(-a,-s)],l&&t.push(l),i.attr("transform",t.join(""))}}))},y.getMarkerStandoff=q;var Y,Z,$,X,J,K,Q=Math.atan2,tt=Math.cos,et=Math.sin;function rt(t,e){var r=e[0],n=e[1];return[r*tt(t)-n*et(t),r*et(t)+n*tt(t)]}function nt(t,e){var r,n,o=t.ma;void 0===o&&((o=e.marker.angle)&&!i.isArrayOrTypedArray(o)||(o=0));var s=e.marker.angleref;if("previous"===s||"north"===s){if(e._geo){var l=e._geo.project(t.lonlat);r=l[0],n=l[1]}else{var c=e._xA,d=e._yA;if(!c||!d)return 90;r=c.c2p(t.x),n=d.c2p(t.y)}if(e._geo){var u,h=t.lonlat[0],p=t.lonlat[1],f=e._geo.project([h,p+1e-5]),m=e._geo.project([h+1e-5,p]),g=Q(m[1]-n,m[0]-r),v=Q(f[1]-n,f[0]-r);if("north"===s)u=o/180*Math.PI;else if("previous"===s){var b=h/180*Math.PI,y=p/180*Math.PI,x=Y/180*Math.PI,w=Z/180*Math.PI,_=x-b,k=tt(w)*et(_),A=et(w)*tt(y)-tt(w)*et(y)*tt(_);u=-Q(k,A)-Math.PI,Y=h,Z=p}var T=rt(g,[tt(u),0]),M=rt(v,[et(u),0]);o=Q(T[1]+M[1],T[0]+M[0])/Math.PI*180,"previous"!==s||K===e.uid&&t.i===J+1||(o=null)}if("previous"===s&&!e._geo)if(K===e.uid&&t.i===J+1&&a(r)&&a(n)){var S=r-$,C=n-X,E=e.line&&e.line.shape||"",L=E.slice(E.length-1);"h"===L&&(C=0),"v"===L&&(S=0),o+=Q(C,S)/Math.PI*180+90}else o=null}return $=r,X=n,J=t.i,K=e.uid,o}y.getMarkerAngle=nt},68735:(t,e,r)=>{"use strict";var n,i,o,a,s=r(37974),l=r(27941).round,c="M0,0Z",d=Math.sqrt(2),u=Math.sqrt(3),h=Math.PI,p=Math.cos,f=Math.sin;function m(t){return null===t}function g(t,e,r){if(!(t&&t%360!=0||e))return r;if(o===t&&a===e&&n===r)return i;function l(t,r){var n=p(t),i=f(t),o=r[0],a=r[1]+(e||0);return[o*n-a*i,o*i+a*n]}o=t,a=e,n=r;for(var c=t/180*h,d=0,u=0,m=s(r),g="",v=0;v{"use strict";t.exports={visible:{valType:"boolean",editType:"calc",description:["Determines whether or not this set of error bars is visible."].join(" ")},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc",description:["Determines the rule used to generate the error bars.","If *constant`, the bar lengths are of a constant value.","Set this constant in `value`.","If *percent*, the bar lengths correspond to a percentage of","underlying data. Set this percentage in `value`.","If *sqrt*, the bar lengths correspond to the square of the","underlying data.","If *data*, the bar lengths are set with data set `array`."].join(" ")},symmetric:{valType:"boolean",editType:"calc",description:["Determines whether or not the error bars have the same length","in both direction","(top/bottom for vertical bars, left/right for horizontal bars."].join(" ")},array:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar.","Values are plotted relative to the underlying data."].join(" ")},arrayminus:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar in the","bottom (left) direction for vertical (horizontal) bars","Values are plotted relative to the underlying data."].join(" ")},value:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars."].join(" ")},valueminus:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars in the","bottom (left) direction for vertical (horizontal) bars"].join(" ")},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style",description:"Sets the stoke color of the error bars."},thickness:{valType:"number",min:0,dflt:2,editType:"style",description:"Sets the thickness (in px) of the error bars."},width:{valType:"number",min:0,editType:"plot",description:["Sets the width (in px) of the cross-bar at both ends","of the error bars."].join(" ")},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style",description:["Obsolete.","Use the alpha channel in error bar `color` to set the opacity."].join(" ")}}}},8295:(t,e,r)=>{"use strict";var n=r(7370),i=r(25059),o=r(75815),a=r(12822),s=r(27512);function l(t,e,r,i){var l=e["error_"+i]||{},c=[];if(l.visible&&-1!==["linear","log"].indexOf(r.type)){for(var d=s(l),u=0;u{"use strict";function e(t,e){return"percent"===t?function(t){return Math.abs(t*e/100)}:"constant"===t?function(){return Math.abs(e)}:"sqrt"===t?function(t){return Math.sqrt(Math.abs(t))}:void 0}t.exports=function(t){var r=t.type,n=t.symmetric;if("data"===r){var i=t.array||[];if(n)return function(t,e){var r=+i[e];return[r,r]};var o=t.arrayminus||[];return function(t,e){var r=+i[e],n=+o[e];return isNaN(r)&&isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var a=e(r,t.value),s=e(r,t.valueminus);return n||void 0===t.valueminus?function(t){var e=a(t);return[e,e]}:function(t){return[s(t),a(t)]}}},69440:(t,e,r)=>{"use strict";var n=r(7370),i=r(25059),o=r(12822),a=r(46121),s=r(96647);t.exports=function(t,e,r,l){var c="error_"+l.axis,d=a.newContainer(e,c),u=t[c]||{};function h(t,e){return o.coerce(u,d,s,t,e)}if(!1!==h("visible",void 0!==u.array||void 0!==u.value||"sqrt"===u.type)){var p=h("type","array"in u?"data":"percent"),f=!0;"sqrt"!==p&&(f=h("symmetric",!(("data"===p?"arrayminus":"valueminus")in u))),"data"===p?(h("array"),h("traceref"),f||(h("arrayminus"),h("tracerefminus"))):"percent"!==p&&"constant"!==p||(h("value"),f||h("valueminus"));var m="copy_"+l.inherit+"style";l.inherit&&(e["error_"+l.inherit]||{}).visible&&h(m,!(u.color||n(u.thickness)||n(u.width))),l.inherit&&d[m]||(h("color",r),h("thickness"),h("width",i.traceIs(e,"gl3d")?0:4))}}},90156:(t,e,r)=>{"use strict";var n=r(12822),i=r(62309).overrideAll,o=r(96647),a={error_x:n.extendFlat({},o),error_y:n.extendFlat({},o)};delete a.error_x.copy_zstyle,delete a.error_y.copy_zstyle,delete a.error_y.copy_ystyle;var s={error_x:n.extendFlat({},o),error_y:n.extendFlat({},o),error_z:n.extendFlat({},o)};delete s.error_x.copy_ystyle,delete s.error_y.copy_ystyle,delete s.error_z.copy_ystyle,delete s.error_z.copy_zstyle,t.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:a,bar:a,histogram:a,scatter3d:i(s,"calc","nested"),scattergl:i(a,"calc","nested")}},supplyDefaults:r(69440),calc:r(8295),makeComputeError:r(27512),plot:r(42961),style:r(83821),hoverInfo:function(t,e,r){(e.error_y||{}).visible&&(r.yerr=t.yh-t.y,e.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(e.error_x||{}).visible&&(r.xerr=t.xh-t.x,e.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}},42961:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=r(40666),a=r(677);t.exports=function(t,e,r,s){var l=r.xaxis,c=r.yaxis,d=s&&s.duration>0,u=t._context.staticPlot;e.each((function(e){var h,p=e[0].trace,f=p.error_x||{},m=p.error_y||{};p.ids&&(h=function(t){return t.id});var g=a.hasMarkers(p)&&p.marker.maxdisplayed>0;m.visible||f.visible||(e=[]);var v=n.select(this).selectAll("g.errorbar").data(e,h);if(v.exit().remove(),e.length){f.visible||v.selectAll("path.xerror").remove(),m.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var b=v.enter().append("g").classed("errorbar",!0);d&&b.style("opacity",0).transition().duration(s.duration).style("opacity",1),o.setClipUrl(v,r.layerClipId,t),v.each((function(t){var e=n.select(this),r=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};return void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0))),void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0))),n}(t,l,c);if(!g||t.vis){var o,a=e.select("path.yerror");if(m.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var h=m.width;o="M"+(r.x-h)+","+r.yh+"h"+2*h+"m-"+h+",0V"+r.ys,r.noYS||(o+="m-"+h+",0h"+2*h),a.size()?d&&(a=a.transition().duration(s.duration).ease(s.easing)):a=e.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0),a.attr("d",o)}else a.remove();var p=e.select("path.xerror");if(f.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var v=(f.copy_ystyle?m:f).width;o="M"+r.xh+","+(r.y-v)+"v"+2*v+"m0,-"+v+"H"+r.xs,r.noXS||(o+="m0,-"+v+"v"+2*v),p.size()?d&&(p=p.transition().duration(s.duration).ease(s.easing)):p=e.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0),p.attr("d",o)}else p.remove()}}))}}))}},83821:(t,e,r)=>{"use strict";var n=r(27941),i=r(17499);t.exports=function(t){t.each((function(t){var e=t[0].trace,r=e.error_y||{},o=e.error_x||{},a=n.select(this);a.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),o.copy_ystyle&&(o=r),a.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(i.stroke,o.color)}))}},60713:(t,e,r)=>{"use strict";var n=r(75058),i=r(53572).hoverlabel,o=r(98260).extendFlat;t.exports={hoverlabel:{bgcolor:o({},i.bgcolor,{arrayOk:!0,description:"Sets the background color of the hover labels for this trace"}),bordercolor:o({},i.bordercolor,{arrayOk:!0,description:"Sets the border color of the hover labels for this trace."}),font:n({arrayOk:!0,editType:"none",description:"Sets the font used in hover labels."}),align:o({},i.align,{arrayOk:!0}),namelength:o({},i.namelength,{arrayOk:!0}),editType:"none"}}},56173:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059);function o(t,e,r,i){i=i||n.identity,Array.isArray(t)&&(e[0][r]=i(t))}t.exports=function(t){var e=t.calcdata,r=t._fullLayout;function a(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},r)}}for(var s=0;s{"use strict";var n=r(25059),i=r(87408).hover;t.exports=function(t,e,r){var o=n.getComponentMethod("annotations","onClick")(t,t._hoverdata);function a(){t.emit("plotly_click",{points:t._hoverdata,event:e})}void 0!==r&&i(t,e,r,!0),t._hoverdata&&e&&e.target&&(o&&o.then?o.then(a):a(),e.stopImmediatePropagation&&e.stopImmediatePropagation())}},99259:t=>{"use strict";t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},55470:(t,e,r)=>{"use strict";var n=r(12822),i=r(60713),o=r(33369);t.exports=function(t,e,r,a){var s=n.extendFlat({},a.hoverlabel);e.hovertemplate&&(s.namelength=-1),o(t,e,(function(r,o){return n.coerce(t,e,i,r,o)}),s)}},66811:(t,e,r)=>{"use strict";var n=r(12822);e.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},e.isTraceInSubplots=function(t,r){if("splom"===t.type){for(var n=t.xaxes||[],i=t.yaxes||[],o=0;o=0&&r.index{"use strict";var n=r(27941),i=r(7370),o=r(18106),a=r(12822),s=a.pushUnique,l=a.strTranslate,c=a.strRotate,d=r(16677),u=r(80394),h=r(27517),p=r(40666),f=r(17499),m=r(19846),g=r(75815),v=r(21197).zindexSeparator,b=r(25059),y=r(66811),x=r(99259),w=r(64083),_=r(67739),k=x.YANGLE,A=Math.PI*k/180,T=1/Math.sin(A),M=Math.cos(A),S=Math.sin(A),C=x.HOVERARROWSIZE,E=x.HOVERTEXTPAD,L={box:!0,ohlc:!0,violin:!0,candlestick:!0},z={scatter:!0,scattergl:!0,splom:!0};function O(t,e){return t.distance-e.distance}function D(t){return[t.trace.index,t.index,t.x0,t.y0,t.name,t.attr,t.xa?t.xa._id:"",t.ya?t.ya._id:""].join(",")}e.hover=function(t,e,r,o){t=a.getGraphDiv(t);var l=e.target;a.throttle(t._fullLayout._uid+x.HOVERID,x.HOVERMINTIME,(function(){!function(t,e,r,o,l){r||(r="xy"),"string"==typeof r&&(r=r.split(v)[0]);var c,u,p,x=Array.isArray(r)?r:[r],w=t._fullLayout,_=w.hoversubplots,k=w._plots||[],A=k[r],M=w._has("cartesian"),S=e.hovermode||w.hovermode,E="x"===(S||"").charAt(0),I="y"===(S||"").charAt(0);if(M&&(E||I)&&"axis"===_)for(var R=x.length,G=0;GX[0]._length||wt<0||wt>J[0]._length)return m.unhoverRaw(t,e)}else xt="xpx"in e?e.xpx:X[0]._length/2,wt="ypx"in e?e.ypx:J[0]._length/2;if(e.pointerX=xt+X[0]._offset,e.pointerY=wt+J[0]._offset,nt="xval"in e?y.flat(x,e.xval):y.p2c(X,xt),it="yval"in e?y.flat(x,e.yval):y.p2c(J,wt),!i(nt[0])||!i(it[0]))return a.warn("Fx.hover failed",e,t),m.unhoverRaw(t,e)}var Tt=1/0;function Mt(r,n){for(at=0;atmt&&(gt.splice(0,mt),Tt=gt[0].distance),M&&0!==rt&&0===gt.length){ft.distance=rt,ft.index=!1;var d=lt._module.hoverPoints(ft,ht,pt,"closest",{hoverLayer:w._hoverlayer});if(d&&(d=d.filter((function(t){return t.spikeDistance<=rt}))),d&&d.length){var u,h=d.filter((function(t){return t.xa.showspikes&&"hovered data"!==t.xa.spikesnap}));if(h.length){var p=h[0];i(p.x0)&&i(p.y0)&&(u=Ct(p),(!bt.vLinePoint||bt.vLinePoint.spikeDistance>u.spikeDistance)&&(bt.vLinePoint=u))}var m=d.filter((function(t){return t.ya.showspikes&&"hovered data"!==t.ya.spikesnap}));if(m.length){var g=m[0];i(g.x0)&&i(g.y0)&&(u=Ct(g),(!bt.hLinePoint||bt.hLinePoint.spikeDistance>u.spikeDistance)&&(bt.hLinePoint=u))}}}}}function St(t,e,r){for(var n,i=null,o=1/0,a=0;a0&&Math.abs(t.distance)Nt-1;Bt--)Ht(gt[Bt]);gt=Ut,Ot()}var Wt=t._hoverdata,qt=[],Yt=H(t),Zt=W(t);for(ot=0;ot1||gt.length>1)||"closest"===S&&yt&>.length>1,se=f.combine(w.plot_bgcolor||f.background,w.paper_bgcolor),le=F(gt,{gd:t,hovermode:S,rotateLabels:ae,bgColor:se,container:w._hoverlayer,outerContainer:w._paper.node(),commonLabelOpts:w.hoverlabel,hoverdistance:w.hoverdistance}),ce=le.hoverLabels;if(y.isUnifiedHover(S)||(function(t,e,r,n){var i,o,a,s,l,c,d,u=e?"xa":"ya",h=e?"ya":"xa",p=0,f=1,m=t.size(),g=new Array(m),v=0,b=n.minX,y=n.maxX,x=n.minY,w=n.maxY,_=function(t){return t*r._invScaleX},k=function(t){return t*r._invScaleY};function A(t){var e=t[0],r=t[t.length-1];if(o=e.pmin-e.pos-e.dp+e.size,a=r.pos+r.dp+r.size-e.pmax,o>.01){for(l=t.length-1;l>=0;l--)t[l].dp+=o;i=!1}if(!(a<.01)){if(o<-.01){for(l=t.length-1;l>=0;l--)t[l].dp-=a;i=!1}if(i){var n=0;for(s=0;se.pmax&&n++;for(s=t.length-1;s>=0&&!(n<=0);s--)(c=t[s]).pos>e.pmax-1&&(c.del=!0,n--);for(s=0;s=0;l--)t[l].dp-=a;for(s=t.length-1;s>=0&&!(n<=0);s--)(c=t[s]).pos+c.dp+c.size>e.pmax&&(c.del=!0,n--)}}}for(t.each((function(t){var n=t[u],i=t[h],o="x"===n._id.charAt(0),a=n.range;0===v&&a&&a[0]>a[1]!==o&&(f=-1);var s=0,l=o?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var c,d,p=P(t,e),m=t.anchor,A="end"===m?-1:1;if("middle"===m)d=(c=t.crossPos+(o?k(p.y-t.by/2):_(t.bx/2+t.tx2width/2)))+(o?k(t.by):_(t.bx));else if(o)d=(c=t.crossPos+k(C+p.y)-k(t.by/2-C))+k(t.by);else{var M=_(A*C+p.x),S=M+_(A*t.bx);c=t.crossPos+Math.min(M,S),d=t.crossPos+Math.max(M,S)}o?void 0!==x&&void 0!==w&&Math.min(d,w)-Math.max(c,x)>1&&("left"===i.side?(s=i._mainLinePosition,l=r.width):l=i._mainLinePosition):void 0!==b&&void 0!==y&&Math.min(d,y)-Math.max(c,b)>1&&("top"===i.side?(s=i._mainLinePosition,l=r.height):l=i._mainLinePosition)}g[v++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(o?T:1)/2,pmin:s,pmax:l}]})),g.sort((function(t,e){return t[0].posref-e[0].posref||f*(e[0].traceIndex-t[0].traceIndex)}));!i&&p<=m;){for(p++,i=!0,s=0;s.01){for(l=S.length-1;l>=0;l--)S[l].dp+=o;for(M.push.apply(M,S),g.splice(s+1,1),d=0,l=M.length-1;l>=0;l--)d+=M[l].dp;for(a=d/M.length,l=M.length-1;l>=0;l--)M[l].dp-=a;i=!1}else s++}g.forEach(A)}for(s=g.length-1;s>=0;s--){var z=g[s];for(l=z.length-1;l>=0;l--){var O=z[l],D=O.datum;D.offset=O.dp,D.del=O.del}}}(ce,ae,w,le.commonLabelBoundingBox),j(ce,ae,w._invScaleX,w._invScaleY)),l&&l.tagName){var de=b.getComponentMethod("annotations","hasClickToShow")(t,qt);h(n.select(l),de?"pointer":"")}l&&!o&&function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],o=t._hoverdata[n];if(i.curveNumber!==o.curveNumber||String(i.pointNumber)!==String(o.pointNumber)||String(i.pointNumbers)!==String(o.pointNumbers))return!0}return!1}(t,0,Wt)&&(Wt&&t.emit("plotly_unhover",{event:e,points:Wt}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:X,yaxes:J,xvals:nt,yvals:it}))}(t,e,r,o,l)}))},e.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=e.gd,o=H(i),a=W(i),s=!1,l=F(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,c=t.eventData;if(c){var d=Math.min(r,n),u=Math.max(r,n),h=Math.min(s,l),p=Math.max(s,l),m=t.trace;if(b.traceIs(m,"gl3d")){var g=i._fullLayout[m.scene]._scene.container,v=g.offsetLeft,y=g.offsetTop;d+=v,u+=v,h+=y,p+=y}c.bbox={x0:d+a,x1:u+a,y0:h+o,y1:p+o},e.inOut_bbox&&e.inOut_bbox.push(c.bbox)}else c=!1;return{color:t.color||f.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontVariant:t.fontVariant,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:"closest",rotateLabels:s,bgColor:e.bgColor||f.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}).hoverLabels,c=0,d=0;return l.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5([\s\S]*)<\/extra>/;function F(t,e){var r=e.gd,i=r._fullLayout,o=e.hovermode,s=e.rotateLabels,d=e.bgColor,h=e.container,m=e.outerContainer,g=e.commonLabelOpts||{};if(0===t.length)return[[]];var v=e.fontFamily||x.HOVERFONT,A=e.fontSize||x.HOVERFONTSIZE,T=e.fontWeight||i.font.weight,M=e.fontStyle||i.font.style,S=e.fontVariant||i.font.variant,L=e.fontTextcase||i.font.textcase,z=e.fontLineposition||i.font.lineposition,O=e.fontShadow||i.font.shadow,I=t[0],F=I.xa,P=I.ya,j=o.charAt(0),N=j+"Label",B=I[N];if(void 0===B&&"multicategory"===F.type)for(var U=0;Ui.width-k&&(D=i.width-k),e.attr("d","M"+(y-D)+",0L"+(y-D+C)+","+_+C+"H"+k+"v"+_+(2*E+w.height)+"H"+-k+"V"+_+C+"H"+(y-D-C)+"Z"),y=D,Q.minX=y-k,Q.maxX=y+k,"top"===F.side?(Q.minY=x-(2*E+w.height),Q.maxY=x-E):(Q.minY=x+E,Q.maxY=x+(2*E+w.height))}else{var R,j,N;"right"===P.side?(R="start",j=1,N="",y=F._offset+F._length):(R="end",j=-1,N="-",y=F._offset),x=P._offset+(I.y0+I.y1)/2,s.attr("text-anchor",R),e.attr("d","M0,0L"+N+C+","+C+"V"+(E+w.height/2)+"h"+N+(2*E+w.width)+"V-"+(E+w.height/2)+"H"+N+C+"V-"+C+"Z"),Q.minY=x-(E+w.height/2),Q.maxY=x+(E+w.height/2),"right"===P.side?(Q.minX=y+C,Q.maxX=y+C+(2*E+w.width)):(Q.minX=y-C-(2*E+w.width),Q.maxX=y-C);var U,G=w.height/2,H=V-w.top-G,W="clip"+i._uid+"commonlabel"+P._id;if(y=0?ft:mt+bt=0?mt:Mt+bt=0?ht:pt+yt=0?pt:St+yt=0,"top"!==t.idealAlign&&J||!K?J?(N+=G/2,t.anchor="start"):t.anchor="middle":(N-=G/2,t.anchor="end"),t.crossPos=N;else{if(t.pos=N,J=j+U/2+Q<=H,K=j-U/2-Q>=0,"left"!==t.idealAlign&&J||!K)if(J)j+=U/2,t.anchor="start";else{t.anchor="middle";var tt=Q/2,et=j+tt-H,rt=j-tt;et>0&&(j-=et),rt<0&&(j+=-rt)}else j-=U/2,t.anchor="end";t.crossPos=j}_.attr("text-anchor",t.anchor),I&&D.attr("text-anchor",t.anchor),e.attr("transform",l(j,N)+(s?c(k):""))})),{hoverLabels:Ct,commonLabelBoundingBox:Q}}function R(t,e,r,n,i,o){var s="",l="";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=a.templateString(t.name,t.trace._meta)),s=G(t.name,t.nameLength));var c=r.charAt(0),d="x"===c?"y":"x";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(l+="y: "+t.yLabel+"
"),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&"choroplethmap"!==t.trace.type&&(l+=(l?"z: ":"")+t.zLabel)):e&&t[c+"Label"]===i?l=t[d+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&"scattercarpet"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?"
":"")+t.text),void 0!==t.extraText&&(l+=(l?"
":"")+t.extraText),o&&""===l&&!t.hovertemplate&&(""===s&&o.remove(),l=s);var u=t.hovertemplate||!1;if(u){var h=t.hovertemplateLabels||t;t[c+"Label"]!==i&&(h[c+"other"]=h[c+"Val"],h[c+"otherLabel"]=h[c+"Label"]),l=(l=a.hovertemplateString(u,h,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(I,(function(e,r){return s=G(r,t.nameLength),""}))}return[l,s]}function P(t,e){var r=0,n=t.offset;return e&&(n*=-S,r=t.offset*M),{x:r,y:n}}function j(t,e,r,i){var o=function(t){return t*r},a=function(t){return t*i};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i,s,l,c,d=r.select("text.nums"),h=t.anchor,f="end"===h?-1:1,m=(c=(l=(s={start:1,end:-1,middle:0}[(i=t).anchor])*(C+E))+s*(i.txwidth+E),"middle"===i.anchor&&(l-=i.tx2width/2,c+=i.txwidth/2+E),{alignShift:s,textShiftX:l,text2ShiftX:c}),g=P(t,e),v=g.x,b=g.y,y="middle"===h;r.select("path").attr("d",y?"M-"+o(t.bx/2+t.tx2width/2)+","+a(b-t.by/2)+"h"+o(t.bx)+"v"+a(t.by)+"h-"+o(t.bx)+"Z":"M0,0L"+o(f*C+v)+","+a(C+b)+"v"+a(t.by/2-C)+"h"+o(f*t.bx)+"v-"+a(t.by)+"H"+o(f*C+v)+"V"+a(b-C)+"Z");var x=v+m.textShiftX,w=b+t.ty0-t.by/2+E,_=t.textAlign||"auto";"auto"!==_&&("left"===_&&"start"!==h?(d.attr("text-anchor","start"),x=y?-t.bx/2-t.tx2width/2+E:-t.bx-E):"right"===_&&"end"!==h&&(d.attr("text-anchor","end"),x=y?t.bx/2-t.tx2width/2-E:t.bx+E)),d.call(u.positionText,o(x),a(w)),t.tx2width&&(r.select("text.name").call(u.positionText,o(m.text2ShiftX+m.alignShift*E+v),a(b+t.ty0-t.by/2+E)),r.select("rect").call(p.setRect,o(m.text2ShiftX+(m.alignShift-1)*t.tx2width/2+v),a(b-t.by/2-1),o(t.tx2width),a(t.by+2)))}))}function N(t,e){var r=t.index,n=t.trace||{},o=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var c=Array.isArray(r)?function(t,e){var i=a.castOption(o,r,t);return l(i)?i:a.extractOption({},n,"",e)}:function(t,e){return a.extractOption(s,n,t,e)};function d(e,r,n){var i=c(r,n);l(i)&&(t[e]=i)}if(d("hoverinfo","hi","hoverinfo"),d("bgcolor","hbg","hoverlabel.bgcolor"),d("borderColor","hbc","hoverlabel.bordercolor"),d("fontFamily","htf","hoverlabel.font.family"),d("fontSize","hts","hoverlabel.font.size"),d("fontColor","htc","hoverlabel.font.color"),d("fontWeight","htw","hoverlabel.font.weight"),d("fontStyle","hty","hoverlabel.font.style"),d("fontVariant","htv","hoverlabel.font.variant"),d("nameLength","hnl","hoverlabel.namelength"),d("textAlign","hta","hoverlabel.align"),t.posref="y"===e||"closest"===e&&"h"===n.orientation?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=a.constrain(t.x0,0,t.xa._length),t.x1=a.constrain(t.x1,0,t.xa._length),t.y0=a.constrain(t.y0,0,t.ya._length),t.y1=a.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel="xLabel"in t?t.xLabel:g.hoverLabelText(t.xa,t.xLabelVal,n.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel="yLabel"in t?t.yLabel:g.hoverLabelText(t.ya,t.yLabelVal,n.yhoverformat),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var u=g.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+u+" / -"+g.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" ± "+u,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var h=g.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+h+" / -"+g.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" ± "+h,"y"===e&&(t.distance+=1)}var p=t.hoverinfo||t.trace.hoverinfo;return p&&"all"!==p&&(-1===(p=Array.isArray(p)?p:p.split("+")).indexOf("x")&&(t.xLabel=void 0),-1===p.indexOf("y")&&(t.yLabel=void 0),-1===p.indexOf("z")&&(t.zLabel=void 0),-1===p.indexOf("text")&&(t.text=void 0),-1===p.indexOf("name")&&(t.name=void 0)),t}function B(t,e,r){var n,i,a=r.container,s=r.fullLayout,l=s._size,c=r.event,d=!!e.hLinePoint,u=!!e.vLinePoint;if(a.selectAll(".spikeline").remove(),u||d){var h=f.combine(s.plot_bgcolor,s.paper_bgcolor);if(d){var m,v,b=e.hLinePoint;n=b&&b.xa,"cursor"===(i=b&&b.ya).spikesnap?(m=c.pointerX,v=c.pointerY):(m=n._offset+b.x,v=i._offset+b.y);var y,x,w=o.readability(b.color,h)<1.5?f.contrast(h):b.color,_=i.spikemode,k=i.spikethickness,A=i.spikecolor||w,T=g.getPxPosition(t,i);if(-1!==_.indexOf("toaxis")||-1!==_.indexOf("across")){if(-1!==_.indexOf("toaxis")&&(y=T,x=m),-1!==_.indexOf("across")){var M=i._counterDomainMin,S=i._counterDomainMax;"free"===i.anchor&&(M=Math.min(M,i.position),S=Math.max(S,i.position)),y=l.l+M*l.w,x=l.l+S*l.w}a.insert("line",":first-child").attr({x1:y,x2:x,y1:v,y2:v,"stroke-width":k,stroke:A,"stroke-dasharray":p.dashStyle(i.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:y,x2:x,y1:v,y2:v,"stroke-width":k+2,stroke:h}).classed("spikeline",!0).classed("crisp",!0)}-1!==_.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:T+("right"!==i.side?k:-k),cy:v,r:k,fill:A}).classed("spikeline",!0)}if(u){var C,E,L=e.vLinePoint;n=L&&L.xa,i=L&&L.ya,"cursor"===n.spikesnap?(C=c.pointerX,E=c.pointerY):(C=n._offset+L.x,E=i._offset+L.y);var z,O,D=o.readability(L.color,h)<1.5?f.contrast(h):L.color,I=n.spikemode,F=n.spikethickness,R=n.spikecolor||D,P=g.getPxPosition(t,n);if(-1!==I.indexOf("toaxis")||-1!==I.indexOf("across")){if(-1!==I.indexOf("toaxis")&&(z=P,O=E),-1!==I.indexOf("across")){var j=n._counterDomainMin,N=n._counterDomainMax;"free"===n.anchor&&(j=Math.min(j,n.position),N=Math.max(N,n.position)),z=l.t+(1-N)*l.h,O=l.t+(1-j)*l.h}a.insert("line",":first-child").attr({x1:C,x2:C,y1:z,y2:O,"stroke-width":F,stroke:R,"stroke-dasharray":p.dashStyle(n.spikedash,F)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:C,x2:C,y1:z,y2:O,"stroke-width":F+2,stroke:h}).classed("spikeline",!0).classed("crisp",!0)}-1!==I.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:C,cy:P-("top"!==n.side?F:-F),r:F,fill:R}).classed("spikeline",!0)}}}function U(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function G(t,e){return u.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function V(t,e,r){var n=e[t+"a"],i=e[t+"Val"],o=e.cd[0];if("category"===n.type||"multicategory"===n.type)i=n._categoriesMap[i];else if("date"===n.type){var a=e.trace[t+"periodalignment"];if(a){var s=e.cd[e.index],l=s[t+"Start"];void 0===l&&(l=s[t]);var c=s[t+"End"];void 0===c&&(c=s[t]);var d=c-l;"end"===a?i+=d:"middle"===a&&(i+=d/2)}i=n.d2c(i)}return o&&o.t&&o.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(i+=o.t.dPos)),i}function H(t){return t.offsetTop+t.clientTop}function W(t){return t.offsetLeft+t.clientLeft}function q(t,e){var r=t._fullLayout,n=e.getBoundingClientRect(),i=n.left,o=n.top,s=i+n.width,l=o+n.height,c=a.apply3DTransform(r._invTransform)(i,o),d=a.apply3DTransform(r._invTransform)(s,l),u=c[0],h=c[1],p=d[0],f=d[1];return{x:u,y:h,width:p-u,height:f-h,top:Math.min(h,f),left:Math.min(u,p),right:Math.max(u,p),bottom:Math.max(h,f)}}},33369:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(66811).isUnifiedHover;t.exports=function(t,e,r,a){a=a||{};var s=e.legend;function l(t){a.font[t]||(a.font[t]=s?e.legend.font[t]:e.font[t])}e&&o(e.hovermode)&&(a.font||(a.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),s?(a.bgcolor||(a.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),a.bordercolor||(a.bordercolor=e.legend.bordercolor)):a.bgcolor||(a.bgcolor=e.paper_bgcolor)),r("hoverlabel.bgcolor",a.bgcolor),r("hoverlabel.bordercolor",a.bordercolor),r("hoverlabel.namelength",a.namelength),n.coerceFont(r,"hoverlabel.font",a.font),r("hoverlabel.align",a.align)}},85400:(t,e,r)=>{"use strict";var n=r(12822),i=r(53572);t.exports=function(t,e){function r(r,o){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,o)}return r("clickmode"),r("hoversubplots"),r("hovermode")}},70410:(t,e,r)=>{"use strict";var n=r(27941),i=r(12822),o=r(19846),a=r(66811),s=r(53572),l=r(87408);t.exports={moduleType:"component",name:"fx",constants:r(99259),schema:{layout:s},attributes:r(60713),layoutAttributes:s,supplyLayoutGlobalDefaults:r(26271),supplyDefaults:r(55470),supplyLayoutDefaults:r(3315),calc:r(56173),getDistanceFunction:a.getDistanceFunction,getClosest:a.getClosest,inbox:a.inbox,quadrature:a.quadrature,appendArrayPointValue:a.appendArrayPointValue,castHoverOption:function(t,e,r){return i.castOption(t,e,"hoverlabel."+r)},castHoverinfo:function(t,e,r){return i.castOption(t,r,"hoverinfo",(function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)}))},hover:l.hover,unhover:o.unhover,loneHover:l.loneHover,loneUnhover:function(t){var e=i.isD3Selection(t)?t:n.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()},click:r(43006)}},53572:(t,e,r)=>{"use strict";var n=r(99259),i=r(75058),o=i({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});o.family.dflt=n.HOVERFONT,o.size.dflt=n.HOVERFONTSIZE,t.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"],description:["Determines the mode of single click interactions.","*event* is the default value and emits the `plotly_click`","event. In addition this mode emits the `plotly_selected` event","in drag modes *lasso* and *select*, but with no event data attached","(kept for compatibility reasons).","The *select* flag enables selecting single","data points via click. This mode also supports persistent selections,","meaning that pressing Shift while clicking, adds to / subtracts from an","existing selection. *select* with `hovermode`: *x* can be confusing, consider","explicitly setting `hovermode`: *closest* when using this feature.","Selection events are sent accordingly as long as *event* flag is set as well.","When the *event* flag is missing, `plotly_click` and `plotly_selected`","events are not fired."].join(" ")},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar",description:["Determines the mode of drag interactions.","*select* and *lasso* apply only to scatter traces with","markers or text. *orbit* and *turntable* apply only to","3D scenes."].join(" ")},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions.","If *closest*, a single hoverlabel will appear","for the *closest* point within the `hoverdistance`.","If *x* (or *y*), multiple hoverlabels will appear for multiple points","at the *closest* x- (or y-) coordinate within the `hoverdistance`,","with the caveat that no more than one hoverlabel will appear per trace.","If *x unified* (or *y unified*), a single hoverlabel will appear","multiple points at the closest x- (or y-) coordinate within the `hoverdistance`","with the caveat that no more than one hoverlabel will appear per trace.","In this mode, spikelines are enabled by default perpendicular to the specified axis.","If false, hover interactions are disabled."].join(" ")},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none",description:["Determines expansion of hover effects to other subplots","If *single* just the axis pair of the primary point is included without overlaying subplots.","If *overlaying* all subplots using the main axis and occupying the same space are included.","If *axis*, also include stacked subplots using the same axis","when `hovermode` is set to *x*, *x unified*, *y* or *y unified*."].join(" ")},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none",description:["Sets the default distance (in pixels) to look for data","to add hover labels (-1 means no cutoff, 0 means no looking for data).","This is only a real distance for hovering on point-like objects,","like scatter points. For area-like objects (bars, scatter fills, etc)","hovering is on inside the area and off outside, but these objects","will not supersede hover on point-like objects in case of conflict."].join(" ")},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none",description:["Sets the default distance (in pixels) to look for data to draw","spikelines to (-1 means no cutoff, 0 means no looking for data).","As with hoverdistance, distance does not apply to area-like objects.","In addition, some objects can be hovered on but will not generate","spikelines, such as scatter fills."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"none",description:["Sets the background color of all hover labels on graph"].join(" ")},bordercolor:{valType:"color",editType:"none",description:["Sets the border color of all hover labels on graph."].join(" ")},font:o,grouptitlefont:i({editType:"none",description:["Sets the font for group titles in hover (unified modes).","Defaults to `hoverlabel.font`."].join(" ")}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none",description:["Sets the horizontal alignment of the text content within hover label box.","Has an effect only if the hover label text spans more two or more lines"].join(" ")},namelength:{valType:"integer",min:-1,dflt:15,editType:"none",description:["Sets the default length (in number of characters) of the trace name in","the hover labels for all traces. -1 shows the whole name","regardless of length. 0-3 shows the first 0-3 characters, and","an integer >3 will show the whole name if it is less than that","many characters, but if it is longer, will truncate to","`namelength - 3` characters and add an ellipsis."].join(" ")},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",description:["When `dragmode` is set to *select*, this limits the selection of the drag to","horizontal, vertical or diagonal. *h* only allows horizontal selection,","*v* only vertical, *d* only diagonal and *any* sets no limit."].join(" "),editType:"none"}}},3315:(t,e,r)=>{"use strict";var n=r(12822),i=r(53572),o=r(85400),a=r(33369);t.exports=function(t,e){function r(r,o){return n.coerce(t,e,i,r,o)}o(t,e)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var s=e._has("mapbox"),l=e._has("map"),c=e._has("geo"),d=e._basePlotModules.length;"zoom"===e.dragmode&&((s||l||c)&&1===d||(s||l)&&c&&2===d)&&(e.dragmode="pan"),a(t,e,r),n.coerceFont(r,"hoverlabel.grouptitlefont",e.hoverlabel.font)}},26271:(t,e,r)=>{"use strict";var n=r(12822),i=r(33369),o=r(53572);t.exports=function(t,e){i(t,e,(function(r,i){return n.coerce(t,e,o,r,i)}))}},4664:(t,e,r)=>{"use strict";var n=r(12822),i=r(46233).counter,o=r(40365).u,a=r(21197).idRegex,s=r(46121),l={rows:{valType:"integer",min:1,editType:"plot",description:["The number of rows in the grid. If you provide a 2D `subplots`","array or a `yaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot",description:["Is the first row the top or the bottom? Note that columns","are always enumerated from left to right."].join(" ")},columns:{valType:"integer",min:1,editType:"plot",description:["The number of columns in the grid. If you provide a 2D `subplots`","array, the length of its longest row is used as the default.","If you give an `xaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[i("xy").toString(),""],editType:"plot"},editType:"plot",description:["Used for freeform grids, where some axes may be shared across subplots","but others are not. Each entry should be a cartesian subplot id, like","*xy* or *x3y2*, or ** to leave that cell empty. You may reuse x axes","within the same column, and y axes within the same row.","Non-cartesian subplots and traces that support `domain` can place themselves","in this grid separately using the `gridcell` attribute."].join(" ")},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[a.x.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an x axis id like *x*, *x2*, etc., or ** to","not put an x axis in that column. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `yaxes` is present,","will generate consecutive IDs."].join(" ")},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[a.y.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an y axis id like *y*, *y2*, etc., or ** to","not put a y axis in that row. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `xaxes` is present,","will generate consecutive IDs."].join(" ")},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot",description:["If no `subplots`, `xaxes`, or `yaxes` are given but we do have `rows` and `columns`,","we can generate defaults using consecutive axis IDs, in two ways:","*coupled* gives one x axis per column and one y axis per row.","*independent* uses a new xy pair for each cell, left-to-right across each row","then iterating rows according to `roworder`."].join(" ")},xgap:{valType:"number",min:0,max:1,editType:"plot",description:["Horizontal space between grid cells, expressed as a fraction","of the total width available to one cell. Defaults to 0.1","for coupled-axes grids and 0.2 for independent grids."].join(" ")},ygap:{valType:"number",min:0,max:1,editType:"plot",description:["Vertical space between grid cells, expressed as a fraction","of the total height available to one cell. Defaults to 0.1","for coupled-axes grids and 0.3 for independent grids."].join(" ")},domain:o({name:"grid",editType:"plot",noGridCell:!0},{description:["The first and last cells end exactly at the domain","edges, with no grout around the edges."].join(" ")}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot",description:["Sets where the x axis labels and titles go. *bottom* means","the very bottom of the grid. *bottom plot* is the lowest plot","that each x axis is used in. *top* and *top plot* are similar."].join(" ")},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot",description:["Sets where the y axis labels and titles go. *left* means","the very left edge of the grid. *left plot* is the leftmost plot","that each y axis is used in. *right* and *right plot* are similar."].join(" ")},editType:"plot"};function c(t,e,r){var n=e[r+"axes"],i=Object.keys((t._splomAxes||{})[r]||{});return Array.isArray(n)?n:i.length?i:void 0}function d(t,e,r,n,i,o){var a=e(t+"gap",r),s=e("domain."+t);e(t+"side",n);for(var l=new Array(i),c=s[0],d=(s[1]-c)/(i-a),u=d*(1-a),h=0;h1){h||p||f||"independent"===A("pattern")&&(h=!0),g._hasSubplotGrid=h;var y,x,w="top to bottom"===A("roworder"),_=h?.2:.1,k=h?.3:.1;m&&e._splomGridDflt&&(y=e._splomGridDflt.xside,x=e._splomGridDflt.yside),g._domains={x:d("x",A,_,y,b),y:d("y",A,k,x,v,w)}}else delete e.grid}function A(t,e){return n.coerce(r,g,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,i,o,a,s,l,d,h=t.grid||{},p=e._subplots,f=r._hasSubplotGrid,m=r.rows,g=r.columns,v="independent"===r.pattern,b=r._axisMap={};if(f){var y=h.subplots||[];l=r.subplots=new Array(m);var x=1;for(n=0;n{"use strict";var n=r(21197),i=r(46121).templatedArray,o=r(53644);t.exports=i("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw",description:["Determines whether or not this image is visible."].join(" ")},source:{valType:"string",editType:"arraydraw",description:["Specifies the URL of the image to be used.","The URL must be accessible from the domain where the","plot code is run, and can be either relative or absolute."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw",description:["Specifies whether images are drawn below or above traces.","When `xref` and `yref` are both set to `paper`,","image is drawn below the entire plot area."].join(" ")},sizex:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size horizontally.","The image will be sized based on the `position` value.","When `xref` is set to `paper`, units are sized relative","to the plot width.","When `xref` ends with ` domain`, units are sized relative","to the axis width."].join(" ")},sizey:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size vertically.","The image will be sized based on the `position` value.","When `yref` is set to `paper`, units are sized relative","to the plot height.","When `yref` ends with ` domain`, units are sized relative","to the axis height."].join(" ")},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw",description:["Specifies which dimension of the image to constrain."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the image."},x:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's x position.","When `xref` is set to `paper`, units are sized relative","to the plot height.","See `xref` for more info"].join(" ")},y:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's y position.","When `yref` is set to `paper`, units are sized relative","to the plot height.","See `yref` for more info"].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw",description:"Sets the anchor for the x position"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw",description:"Sets the anchor for the y position."},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's x coordinate axis.",o.axisRefDescription("x","left","right")].join(" ")},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's y coordinate axis.",o.axisRefDescription("y","bottom","top")].join(" ")},editType:"arraydraw"})},22470:(t,e,r)=>{"use strict";var n=r(7370),i=r(61814);t.exports=function(t,e,r,o){e=e||{};var a="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(a||s)for(var l,c,d=t._fullLayout.images,u=e._id.charAt(0),h=0;h{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(3653);function s(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}var s=o("source");if(!o("visible",!!s))return e;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var l={_fullLayout:r},c=["x","y"],d=0;d<2;d++){var u=c[d],h=i.coerceRef(t,e,l,u,"paper",void 0);"paper"!==h&&i.getFromId(l,h)._imgIndices.push(e._index),i.coercePosition(e,l,o,h,u,0)}return e}t.exports=function(t,e){o(t,e,{name:"images",handleItemDefaults:s})}},87030:(t,e,r)=>{"use strict";var n=r(27941),i=r(40666),o=r(75815),a=r(99246),s=r(25853);t.exports=function(t){var e,r,l=t._fullLayout,c=[],d={},u=[];for(r=0;r{"use strict";t.exports={moduleType:"component",name:"images",layoutAttributes:r(3653),supplyLayoutDefaults:r(96658),includeBasePlot:r(39859)("images"),draw:r(87030),convertCoords:r(22470)}},15524:(t,e,r)=>{"use strict";var n=r(75058),i=r(84226);t.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend",description:["Determines whether or not this legend is visible."].join(" ")},bgcolor:{valType:"color",editType:"legend",description:["Sets the legend background color.","Defaults to `layout.paper_bgcolor`."].join(" ")},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"legend",description:"Sets the color of the border enclosing the legend."},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend",description:"Sets the width (in px) of the border enclosing the legend."},font:n({editType:"legend",description:"Sets the font used to text the legend items."}),grouptitlefont:n({editType:"legend",description:["Sets the font for group titles in legend.","Defaults to `legend.font` with its size increased about 10%."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend",description:"Sets the orientation of the legend."},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend",description:["Determines the order at which the legend items are displayed.","If *normal*, the items are displayed top-to-bottom in the same","order as the input data.","If *reversed*, the items are displayed in the opposite order","as *normal*.","If *grouped*, the items are displayed in groups","(when a trace `legendgroup` is provided).","if *grouped+reversed*, the items are displayed in the opposite order","as *grouped*."].join(" ")},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend",description:["Sets the amount of vertical space (in px) between legend groups."].join(" ")},entrywidth:{valType:"number",min:0,editType:"legend",description:["Sets the width (in px or fraction) of the legend.","Use 0 to size the entry based on the text width,","when `entrywidthmode` is set to *pixels*."].join(" ")},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend",description:"Determines what entrywidth means."},indentation:{valType:"number",min:-15,dflt:0,editType:"legend",description:"Sets the indentation (in px) of the legend entries."},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend",description:["Determines if the legend items symbols scale with their corresponding *trace* attributes","or remain *constant* independent of the symbol size on the graph."].join(" ")},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend",description:"Sets the width (in px) of the legend item symbols (the part other than the title.text)."},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend",description:["Determines the behavior on legend item click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item click interactions."].join(" ")},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend",description:["Determines the behavior on legend item double-click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item double-click interactions."].join(" ")},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend",description:["Determines the behavior on legend group item click.","*toggleitem* toggles the visibility of the individual item clicked on the graph.","*togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph."].join(" ")},x:{valType:"number",editType:"legend",description:["Sets the x position with respect to `xref` (in normalized coordinates) of the legend.","When `xref` is *paper*, defaults to *1.02* for vertical legends and","defaults to *0* for horizontal legends.","When `xref` is *container*, defaults to *1* for vertical legends and","defaults to *0* for horizontal legends.","Must be between *0* and *1* if `xref` is *container*.","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend",description:["Sets the legend's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the legend.","Value *auto* anchors legends to the right for `x` values greater than or equal to 2/3,","anchors legends to the left for `x` values less than or equal to 1/3 and","anchors legends with respect to their center otherwise."].join(" ")},y:{valType:"number",editType:"legend",description:["Sets the y position with respect to `yref` (in normalized coordinates) of the legend.","When `yref` is *paper*, defaults to *1* for vertical legends,","defaults to *-0.1* for horizontal legends on graphs w/o range sliders and","defaults to *1.1* for horizontal legends on graph with one or multiple range sliders.","When `yref` is *container*, defaults to *1*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend",description:["Sets the legend's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the legend.","Value *auto* anchors legends at their bottom for `y` values less than or equal to 1/3,","anchors legends to at their top for `y` values greater than or equal to 2/3 and","anchors legends with respect to their middle otherwise."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of legend-driven changes in trace and pie label","visibility. Defaults to `layout.uirevision`."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend",description:["Sets the vertical alignment of the symbols with respect to their associated text."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"legend",description:["Sets the title of the legend."].join(" ")},font:n({editType:"legend",description:["Sets this legend's title font.","Defaults to `legend.font` with its size increased about 20%."].join(" ")}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend",description:["Determines the location of legend's title","with respect to the legend items.","Defaulted to *top* with `orientation` is *h*.","Defaulted to *left* with `orientation` is *v*.","The *top left* options could be used to expand","top center and top right are for horizontal alignment","legend area in both x and y sides."].join(" ")},editType:"legend"},editType:"legend"}},4496:t=>{"use strict";t.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},64083:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822),o=r(46121),a=r(3520),s=r(15524),l=r(13195),c=r(18804);function d(t,e,r,d){var u=e[t]||{},h=o.newContainer(r,t);function p(t,e){return i.coerce(u,h,s,t,e)}var f=i.coerceFont(p,"font",r.font);if(p("bgcolor",r.paper_bgcolor),p("bordercolor"),p("visible")){for(var m,g=function(t,e){var r=m._input,n=m;return i.coerce(r,n,a,t,e)},v=r.font||{},b=i.coerceFont(p,"grouptitlefont",v,{overrideDflt:{size:Math.round(1.1*v.size)}}),y=0,x=!1,w="normal",_=(r.shapes||[]).filter((function(t){return t.showlegend})),k=d.concat(_).filter((function(e){return t===(e.legend||"legend")})),A=0;A("legend"===t?1:0));if(!1===M&&(r[t]=void 0),(!1!==M||u.uirevision)&&(p("uirevision",r.uirevision),!1!==M)){p("borderwidth");var S,C,E,L="h"===p("orientation"),z="paper"===p("yref"),O="paper"===p("xref"),D="left";if(L?(S=0,n.getComponentMethod("rangeslider","isVisible")(e.xaxis)?z?(C=1.1,E="bottom"):(C=1,E="top"):z?(C=-.1,E="top"):(C=0,E="bottom")):(C=1,E="auto",O?S=1.02:(S=1,D="right")),i.coerce(u,h,{x:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:S}},"x"),i.coerce(u,h,{y:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:C}},"y"),p("traceorder",w),c.isGrouped(r[t])&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("indentation"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("xanchor",D),p("yanchor",E),p("valign"),i.noneOrAll(u,h,["x","y"]),p("title.text")){p("title.side",L?"left":"top");var I=i.extendFlat({},f,{size:i.bigFont(f.size)});i.coerceFont(p,"title.font",I)}}}}t.exports=function(t,e,r){var n,o=r.slice(),a=e.shapes;if(a)for(n=0;n{"use strict";var n=r(27941),i=r(12822),o=r(51137),a=r(25059),s=r(16677),l=r(19846),c=r(40666),d=r(17499),u=r(80394),h=r(52656),p=r(4496),f=r(89701),m=f.LINE_SPACING,g=f.FROM_TL,v=f.FROM_BR,b=r(71988),y=r(26972),x=r(18804),w=/^legend[0-9]*$/;function _(t,e){var r,s,h=e||{},f=t._fullLayout,w=z(h),_=h._inHover;if(_?(s=h.layer,r="hover"):(s=f._infolayer,r=w),s){var M;if(r+=f._uid,t._legendMouseDownTime||(t._legendMouseDownTime=0),_){if(!h.entries)return;M=b(h.entries,h)}else{for(var O=(t.calcdata||[]).slice(),D=f.shapes,I=0;I1)}var P=f.hiddenlabels||[];if(!(_||f.showlegend&&M.length))return s.selectAll("."+w).remove(),f._topdefs.select("#"+r).remove(),o.autoMargin(t,w);var j=i.ensureSingle(s,"g",w,(function(t){_||t.attr("pointer-events","all")})),N=i.ensureSingleById(f._topdefs,"clipPath",r,(function(t){t.append("rect")})),B=i.ensureSingle(j,"rect","bg",(function(t){t.attr("shape-rendering","crispEdges")}));B.call(d.stroke,h.bordercolor).call(d.fill,h.bgcolor).style("stroke-width",h.borderwidth+"px");var U,G=i.ensureSingle(j,"g","scrollbox"),V=h.title;h._titleWidth=0,h._titleHeight=0,V.text?((U=i.ensureSingle(G,"text",w+"titletext")).attr("text-anchor","start").call(c.font,V.font).text(V.text),C(U,G,t,h,1)):G.selectAll("."+w+"titletext").remove();var H=i.ensureSingle(j,"rect","scrollbar",(function(t){t.attr(p.scrollBarEnterAttrs).call(d.fill,p.scrollBarColor)})),W=G.selectAll("g.groups").data(M);W.enter().append("g").attr("class","groups"),W.exit().remove();var q=W.selectAll("g.traces").data(i.identity);q.enter().append("g").attr("class","traces"),q.exit().remove(),q.style("opacity",(function(t){var e=t[0].trace;return a.traceIs(e,"pie-like")?-1!==P.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1})).each((function(){n.select(this).call(T,t,h)})).call(y,t,h).each((function(){_||n.select(this).call(S,t,w)})),i.syncOrAsync([o.previousPromises,function(){return function(t,e,r,i){var o=t._fullLayout,a=z(i);i||(i=o[a]);var s=o._size,l=x.isVertical(i),d=x.isGrouped(i),u="fraction"===i.entrywidthmode,h=i.borderwidth,f=2*h,m=p.itemGap,g=i.indentation+i.itemwidth+2*m,v=2*(h+m),b=L(i),y=i.y<0||0===i.y&&"top"===b,w=i.y>1||1===i.y&&"bottom"===b,_=i.tracegroupgap,A={};i._maxHeight=Math.max(y||w?o.height/2:s.h,30);var T=0;i._width=0,i._height=0;var M=function(t){var e=0,r=0,n=t.title.side;return n&&(-1!==n.indexOf("left")&&(e=t._titleWidth),-1!==n.indexOf("top")&&(r=t._titleHeight)),[e,r]}(i);if(l)r.each((function(t){var e=t[0].height;c.setTranslate(this,h+M[0],h+M[1]+i._height+e/2+m),i._height+=e,i._width=Math.max(i._width,t[0].width)})),T=g+i._width,i._width+=m+g+f,i._height+=v,d&&(e.each((function(t,e){c.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var S=E(i),C=i.x<0||0===i.x&&"right"===S,O=i.x>1||1===i.x&&"left"===S,D=w||y,I=o.width/2;i._maxWidth=Math.max(C?D&&"left"===S?s.l+s.w:I:O?D&&"right"===S?s.r+s.w:I:s.w,2*g);var F=0,R=0;r.each((function(t){var e=k(t,i,g);F=Math.max(F,e),R+=e})),T=null;var P=0;if(d){var j=0,N=0,B=0;e.each((function(){var t=0,e=0;n.select(this).selectAll("g.traces").each((function(r){var n=k(r,i,g),o=r[0].height;c.setTranslate(this,M[0],M[1]+h+m+o/2+e),e+=o,t=Math.max(t,n),A[r[0].trace.legendgroup]=t}));var r=t+m;N>0&&r+h+N>i._maxWidth?(P=Math.max(P,N),N=0,B+=j+_,j=e):j=Math.max(j,e),c.setTranslate(this,N,B),N+=r})),i._width=Math.max(P,N)+h,i._height=B+j+v}else{var U=r.size(),G=R+f+(U-1)*m=i._maxWidth&&(P=Math.max(P,q),H=0,W+=V,i._height+=V,V=0),c.setTranslate(this,M[0]+h+H,M[1]+h+W+e/2+m),q=H+r+m,H+=n,V=Math.max(V,e)})),G?(i._width=H+f,i._height=V+v):(i._width=Math.max(P,q)+f,i._height+=V+v)}}i._width=Math.ceil(Math.max(i._width+M[0],i._titleWidth+2*(h+p.titlePad))),i._height=Math.ceil(Math.max(i._height+M[1],i._titleHeight+2*(h+p.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var Y=t._context.edits,Z=Y.legendText||Y.legendPosition;r.each((function(t){var e=n.select(this).select("."+a+"toggle"),r=t[0].height,o=t[0].trace.legendgroup,s=k(t,i,g);d&&""!==o&&(s=A[o]);var h=Z?g:T||s;l||u||(h+=m/2),c.setRect(e,0,-r/2,h,r)}))}(t,W,q,h)},function(){var e,d,b,y,x=f._size,k=h.borderwidth,T="paper"===h.xref,M="paper"===h.yref;if(V.text&&function(t,e,r){if("top center"===e.title.side||"top right"===e.title.side){var n=e.title.font.size*m,i=0,o=t.node(),a=c.bBox(o).width;"top center"===e.title.side?i=.5*(e._width-2*r-2*p.titlePad-a):"top right"===e.title.side&&(i=e._width-2*r-2*p.titlePad-a),u.positionText(t,r+p.titlePad+i,r+n)}}(U,h,k),!_){var S,C;S=T?x.l+x.w*h.x-g[E(h)]*h._width:f.width*h.x-g[E(h)]*h._width,C=M?x.t+x.h*(1-h.y)-g[L(h)]*h._effHeight:f.height*(1-h.y)-g[L(h)]*h._effHeight;var z=function(t,e,r,n){var i=t._fullLayout,a=i[e],s=E(a),l=L(a),c="paper"===a.xref,d="paper"===a.yref;t._fullLayout._reservedMargin[e]={};var u=a.y<.5?"b":"t",h=a.x<.5?"l":"r",p={r:i.width-r,l:r+a._width,b:i.height-n,t:n+a._effHeight};if(c&&d)return o.autoMargin(t,e,{x:a.x,y:a.y,l:a._width*g[s],r:a._width*v[s],b:a._effHeight*v[l],t:a._effHeight*g[l]});c?t._fullLayout._reservedMargin[e][u]=p[u]:d||"v"===a.orientation?t._fullLayout._reservedMargin[e][h]=p[h]:t._fullLayout._reservedMargin[e][u]=p[u]}(t,w,S,C);if(z)return;if(f.margin.autoexpand){var O=S,D=C;S=T?i.constrain(S,0,f.width-h._width):O,C=M?i.constrain(C,0,f.height-h._effHeight):D,S!==O&&i.log("Constrain "+w+".x to make legend fit inside graph"),C!==D&&i.log("Constrain "+w+".y to make legend fit inside graph")}c.setTranslate(j,S,C)}if(H.on(".drag",null),j.on("wheel",null),_||h._height<=h._maxHeight||t._context.staticPlot){var I=h._effHeight;_&&(I=h._height),B.attr({width:h._width-k,height:I-k,x:k/2,y:k/2}),c.setTranslate(G,0,0),N.select("rect").attr({width:h._width-2*k,height:I-2*k,x:k,y:k}),c.setClipUrl(G,r,t),c.setRect(H,0,0,0,0),delete h._scrollY}else{var F,R,P,W=Math.max(p.scrollBarMinHeight,h._effHeight*h._effHeight/h._height),q=h._effHeight-W-2*p.scrollBarMargin,Y=h._height-h._effHeight,Z=q/Y,$=Math.min(h._scrollY||0,Y);B.attr({width:h._width-2*k+p.scrollBarWidth+p.scrollBarMargin,height:h._effHeight-k,x:k/2,y:k/2}),N.select("rect").attr({width:h._width-2*k+p.scrollBarWidth+p.scrollBarMargin,height:h._effHeight-2*k,x:k,y:k+$}),c.setClipUrl(G,r,t),K($,W,Z),j.on("wheel",(function(){K($=i.constrain(h._scrollY+n.event.deltaY/q*Y,0,Y),W,Z),0!==$&&$!==Y&&n.event.preventDefault()}));var X=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;F="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,P=$})).on("drag",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(R="touchmove"===t.type?t.changedTouches[0].clientY:t.clientY,$=function(t,e,r){var n=(r-e)/Z+t;return i.constrain(n,0,Y)}(P,F,R),K($,W,Z))}));H.call(X);var J=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(F=t.changedTouches[0].clientY,P=$)})).on("drag",(function(){var t=n.event.sourceEvent;"touchmove"===t.type&&(R=t.changedTouches[0].clientY,$=function(t,e,r){var n=(e-r)/Z+t;return i.constrain(n,0,Y)}(P,F,R),K($,W,Z))}));G.call(J)}function K(e,r,n){h._scrollY=t._fullLayout[w]._scrollY=e,c.setTranslate(G,0,-e),c.setRect(H,h._width,p.scrollBarMargin+e*n,p.scrollBarWidth,r),N.select("rect").attr("y",k+e)}t._context.edits.legendPosition&&(j.classed("cursor-move",!0),l.init({element:j.node(),gd:t,prepFn:function(t){if(t.target!==H.node()){var e=c.getTranslate(j);b=e.x,y=e.y}},moveFn:function(t,r){if(void 0!==b&&void 0!==y){var n=b+t,i=y+r;c.setTranslate(j,n,i),e=l.align(n,h._width,x.l,x.l+x.w,h.xanchor),d=l.align(i+h._height,-h._height,x.t+x.h,x.t,h.yanchor)}},doneFn:function(){if(void 0!==e&&void 0!==d){var r={};r[w+".x"]=e,r[w+".y"]=d,a.call("_guiRelayout",t,r)}},clickFn:function(e,r){var n=s.selectAll("g.traces").filter((function(){var t=this.getBoundingClientRect();return r.clientX>=t.left&&r.clientX<=t.right&&r.clientY>=t.top&&r.clientY<=t.bottom}));n.size()>0&&A(t,j,n,e,r)}}))}],t)}}function k(t,e,r){var n=t[0],i=n.width,o=e.entrywidthmode,a=n.trace.legendwidth||e.entrywidth;return"fraction"===o?e._maxWidth*a:r+(a||i)}function A(t,e,r,n,i){var o=r.data()[0][0].trace,l={event:i,node:r.node(),curveNumber:o.index,expandedIndex:o._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};o._group&&(l.group=o._group),a.traceIs(o,"pie-like")&&(l.label=r.datum()[0].label);var c=s.triggerHandler(t,"plotly_legendclick",l);if(1===n){if(!1===c)return;e._clickTimeout=setTimeout((function(){t._fullLayout&&h(r,t,n)}),t._context.doubleClickDelay)}else 2===n&&(e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,"plotly_legenddoubleclick",l)&&!1!==c&&h(r,t,n))}function T(t,e,r){var n,o,s=z(r),l=t.data()[0][0],d=l.trace,h=a.traceIs(d,"pie-like"),f=!r._inHover&&e._context.edits.legendText&&!h,m=r._maxNameLength;l.groupTitle?(n=l.groupTitle.text,o=l.groupTitle.font):(o=r.font,r.entries?n=l.text:(n=h?l.label:d.name,d._meta&&(n=i.templateString(n,d._meta))));var g=i.ensureSingle(t,"text",s+"text");g.attr("text-anchor","start").call(c.font,o).text(f?M(n,m):n);var v=r.indentation+r.itemwidth+2*p.itemGap;u.positionText(g,v,0),f?g.call(u.makeEditable,{gd:e,text:n}).call(C,t,e,r).on("edit",(function(n){this.text(M(n,m)).call(C,t,e,r);var o=l.trace._fullInput||{},s={};if(a.hasTransform(o,"groupby")){var c=a.getTransformIndices(o,"groupby"),u=c[c.length-1],h=i.keyedContainer(o,"transforms["+u+"].styles","target","value.name");h.set(l.trace._group,n),s=h.constructUpdate()}else s.name=n;return o._isShape?a.call("_guiRelayout",e,"shapes["+d.index+"].name",s.name):a.call("_guiRestyle",e,s,d.index)})):C(g,t,e,r)}function M(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;for(var n=r-(t=t||"").length;n>0;n--)t+=" ";return t}function S(t,e,r){var o,a=e._context.doubleClickDelay,s=1,l=i.ensureSingle(t,"rect",r+"toggle",(function(t){e._context.staticPlot||t.style("cursor","pointer").attr("pointer-events","all"),t.call(d.fill,"rgba(0,0,0,0)")}));e._context.staticPlot||(l.on("mousedown",(function(){(o=(new Date).getTime())-e._legendMouseDownTimea&&(s=Math.max(s-1,1)),A(e,i,t,s,n.event)}})))}function C(t,e,r,n,i){n._inHover&&t.attr("data-notex",!0),u.convertToTspans(t,r,(function(){!function(t,e,r,n){var i=t.data()[0][0];if(r._inHover||!i||i.trace.showlegend){var o=t.select("g[class*=math-group]"),a=o.node(),s=z(r);r||(r=e._fullLayout[s]);var l,d,h=r.borderwidth,f=(1===n?r.title.font:i.groupTitle?i.groupTitle.font:r.font).size*m;if(a){var g=c.bBox(a);l=g.height,d=g.width,1===n?c.setTranslate(o,h,h+.75*l):c.setTranslate(o,0,.25*l)}else{var v="."+s+(1===n?"title":"")+"text",b=t.select(v),y=u.lineCount(b),x=b.node();if(l=f*y,d=x?c.bBox(x).width:0,1===n)"left"===r.title.side&&(d+=2*p.itemGap),u.positionText(b,h+p.titlePad,h+f);else{var w=2*p.itemGap+r.indentation+r.itemwidth;i.groupTitle&&(w=p.itemGap,d-=r.indentation+r.itemwidth),u.positionText(b,w,-f*((y-1)/2-.3))}}1===n?(r._titleWidth=d,r._titleHeight=l):(i.lineHeight=f,i.height=Math.max(l,16)+3,i.width=d)}else t.remove()}(e,r,n,i)}))}function E(t){return i.isRightAnchor(t)?"right":i.isCenterAnchor(t)?"center":"left"}function L(t){return i.isBottomAnchor(t)?"bottom":i.isMiddleAnchor(t)?"middle":"top"}function z(t){return t._id||"legend"}t.exports=function(t,e){if(e)_(t,e);else{var r=t._fullLayout,i=r._legends;r._infolayer.selectAll('[class^="legend"]').each((function(){var t=n.select(this),e=t.attr("class").split(" ")[0];e.match(w)&&-1===i.indexOf(e)&&t.remove()}));for(var o=0;o{"use strict";var n=r(25059),i=r(18804);t.exports=function(t,e,r){var o,a,s=e._inHover,l=i.isGrouped(e),c=i.isReversed(e),d={},u=[],h=!1,p={},f=0,m=0;function g(t,n,o){if(!1!==e.visible&&(!r||t===e._id))if(""!==n&&i.isGrouped(e))-1===u.indexOf(n)?(u.push(n),h=!0,d[n]=[o]):d[n].push(o);else{var a="~~i"+f;u.push(a),d[a]=[o],f++}}for(o=0;oS&&(M=S)}A[o][0]._groupMinRank=M,A[o][0]._preGroupSort=o}var C=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(A.forEach((function(t,e){t[0]._preGroupSort=e})),A.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),o=0;o{"use strict";var n=r(25059),i=r(12822),o=i.pushUnique,a=!0;t.exports=function(t,e,r){var s=e._fullLayout;if(!e._dragged&&!e._editing){var l,c=s.legend.itemclick,d=s.legend.itemdoubleclick,u=s.legend.groupclick;if(1===r&&"toggle"===c&&"toggleothers"===d&&a&&e.data&&e._context.showTips?(i.notifier(i._(e,"Double-click on legend to isolate one trace"),"long"),a=!1):a=!1,1===r?l=c:2===r&&(l=d),l){var h="togglegroup"===u,p=s.hiddenlabels?s.hiddenlabels.slice():[],f=t.data()[0][0];if(!f.groupTitle||!f.noClick){var m=e._fullData,g=(s.shapes||[]).filter((function(t){return t.showlegend})),v=m.concat(g),b=f.trace;b._isShape&&(b=b._fullInput);var y,x,w,_,k,A=b.legendgroup,T={},M=[],S=[],C=[],E=(s.shapes||[]).map((function(t){return t._input})),L=!1,z=b.legend,O=b._fullInput;if(O&&O._isShape||!n.traceIs(b,"pie-like")){var D,I=A&&A.length,F=[];if(I)for(y=0;y{"use strict";e.isGrouped=function(t){return-1!==(t.traceorder||"").indexOf("grouped")},e.isVertical=function(t){return"h"!==t.orientation},e.isReversed=function(t){return-1!==(t.traceorder||"").indexOf("reversed")}},97833:(t,e,r)=>{"use strict";t.exports={moduleType:"component",name:"legend",layoutAttributes:r(15524),supplyLayoutDefaults:r(64083),draw:r(67739),style:r(26972)}},26972:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=o.strTranslate,s=r(40666),l=r(17499),c=r(42226).extractOpts,d=r(677),u=r(62970),h=r(17269).castOption,p=r(4496);function f(t,e){return(e?"radial":"horizontal")+(t?"":"reversed")}function m(t){var e=t[0].trace,r=e.contours,n=d.hasLines(e),i=d.hasMarkers(e),o=e.visible&&e.fill&&"none"!==e.fill,a=!1,s=!1;if(r){var l=r.coloring;"lines"===l?a=!0:n="none"===l||"heatmap"===l||r.showlines,"constraint"===r.type?o="="!==r._operation:"fill"!==l&&"heatmap"!==l||(s=!0)}return{showMarker:i,showLine:n,showFill:o,showGradientLine:a,showGradientFill:s,anyLine:n||a,anyFill:o||s}}function g(t,e,r){return t&&o.isArrayOrTypedArray(t)?e:t>r?r:t}t.exports=function(t,e,r){var v=e._fullLayout;r||(r=v.legend);var b="constant"===r.itemsizing,y=r.itemwidth,x=(y+2*p.itemGap)/2,w=a(x,0),_=function(t,e,r,n){var i;if(t+1)i=t;else{if(!(e&&e.width>0))return 0;i=e.width}return b?n:Math.min(i,r)};function k(t,o,a){var d=t[0].trace,u=d.marker||{},h=u.line||{},p=u.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",f=a?d.visible&&d.type===a:i.traceIs(d,"bar"),m=n.select(o).select("g.legendpoints").selectAll("path.legend"+a).data(f?[t]:[]);m.enter().append("path").classed("legend"+a,!0).attr("d",p).attr("transform",w),m.exit().remove(),m.each((function(t){var i=n.select(this),o=t[0],a=_(o.mlw,u.line,5,2);i.style("stroke-width",a+"px");var p=o.mcc;if(!r._inHover&&"mc"in o){var f=c(u),m=f.mid;void 0===m&&(m=(f.max+f.min)/2),p=s.tryColorscale(u,"")(m)}var v=p||o.mc||u.color,b=u.pattern,y=b&&s.getPatternAttr(b.shape,0,"");if(y){var x=s.getPatternAttr(b.bgcolor,0,null),w=s.getPatternAttr(b.fgcolor,0,null),k=b.fgopacity,A=g(b.size,8,10),T=g(b.solidity,.5,1),M="legend-"+d.uid;i.call(s.pattern,"legend",e,M,y,A,T,p,b.fillmode,x,w,k)}else i.call(l.fill,v);a&&l.stroke(i,o.mlc||h.color)}))}function A(t,r,a){var s=t[0],l=s.trace,c=a?l.visible&&l.type===a:i.traceIs(l,a),d=n.select(r).select("g.legendpoints").selectAll("path.legend"+a).data(c?[t]:[]);if(d.enter().append("path").classed("legend"+a,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",w),d.exit().remove(),d.size()){var p=l.marker||{},f=_(h(p.line.width,s.pts),p.line,5,2),m="pieLike",g=o.minExtend(l,{marker:{line:{width:f}}},m),v=o.minExtend(s,{trace:g},m);u(d,v,g,e)}}t.each((function(t){var e=n.select(this),i=o.ensureSingle(e,"g","layers");i.style("opacity",t[0].trace.opacity);var s=r.indentation,l=r.valign,c=t[0].lineHeight,d=t[0].height;if("middle"===l&&0===s||!c||!d)i.attr("transform",null);else{var u={top:1,bottom:-1}[l]*(.5*(c-d+3))||0,h=r.indentation;i.attr("transform",a(h,u))}i.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var p=i.selectAll("g.legendsymbols").data([t]);p.enter().append("g").classed("legendsymbols",!0),p.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)})).each((function(t){var r,i=t[0].trace,a=[];if(i.visible)switch(i.type){case"histogram2d":case"heatmap":a=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":a=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":case"densitymap":a=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":a=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],r=!1;break;case"streamtube":a=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],r=!1;break;case"surface":a=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],r=!0;break;case"mesh3d":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var d=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(a);d.enter().append("path").classed("legend3dandfriends",!0).attr("transform",w).style("stroke-miterlimit",1),d.exit().remove(),d.each((function(t,a){var d,u=n.select(this),h=c(i),p=h.colorscale,m=h.reversescale;if(p){if(!r){var g=p.length;d=0===a?p[m?g-1:0][1]:1===a?p[m?0:g-1][1]:p[Math.floor((g-1)/2)][1]}}else{var v=i.vertexcolor||i.facecolor||i.color;d=o.isArrayOrTypedArray(v)?v[a]||v[0]:v}u.attr("d",t[0]),d?u.call(l.fill,d):u.call((function(t){if(t.size()){var n="legendfill-"+i.uid;s.gradient(t,e,n,f(m,"radial"===r),p,"fill")}}))}))})).each((function(t){var e=t[0].trace,r="waterfall"===e.type;if(t[0]._distinct&&r){var i=t[0].trace[t[0].dir].marker;return t[0].mc=i.color,t[0].mlw=i.line.width,t[0].mlc=i.line.color,k(t,this,"waterfall")}var o=[];e.visible&&r&&(o=t[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var a=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(o);a.enter().append("path").classed("legendwaterfall",!0).attr("transform",w).style("stroke-miterlimit",1),a.exit().remove(),a.each((function(t){var r=n.select(this),i=e[t[0]].marker,o=_(void 0,i.line,5,2);r.attr("d",t[1]).style("stroke-width",o+"px").call(l.fill,i.color),o&&r.call(l.stroke,i.line.color)}))})).each((function(t){k(t,this,"funnel")})).each((function(t){k(t,this)})).each((function(t){var r=t[0].trace,a=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&i.traceIs(r,"box-violin")?[t]:[]);a.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",w),a.exit().remove(),a.each((function(){var t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=_(void 0,r.line,5,2);t.style("stroke-width",i+"px").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var c=o.minExtend(r,{marker:{size:b?12:o.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});a.call(s.pointStyle,c,e)}}))})).each((function(t){A(t,this,"funnelarea")})).each((function(t){A(t,this,"pie")})).each((function(t){var r,i,a=m(t),l=a.showFill,u=a.showLine,h=a.showGradientLine,p=a.showGradientFill,g=a.anyFill,v=a.anyLine,b=t[0],x=b.trace,w=c(x),k=w.colorscale,A=w.reversescale,T=d.hasMarkers(x)||!g?"M5,0":v?"M5,-2":"M5,-3",M=n.select(this),S=M.select(".legendfill").selectAll("path").data(l||p?[t]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",T+"h"+y+"v6h-"+y+"z").call((function(t){if(t.size())if(l)s.fillGroupStyle(t,e,!0);else{var r="legendfill-"+x.uid;s.gradient(t,e,r,f(A),k,"fill")}})),u||h){var C=_(void 0,x.line,10,5);i=o.minExtend(x,{line:{width:C}}),r=[o.minExtend(b,{trace:i})]}var E=M.select(".legendlines").selectAll("path").data(u||h?[r]:[]);E.enter().append("path").classed("js-line",!0),E.exit().remove(),E.attr("d",T+(h?"l"+y+",0.0001":"h"+y)).call(u?s.lineGroupStyle:function(t){if(t.size()){var r="legendline-"+x.uid;s.lineGroupStyle(t),s.gradient(t,e,r,f(A),k,"stroke")}})})).each((function(t){var r,i,a=m(t),l=a.anyFill,c=a.anyLine,u=a.showLine,h=a.showMarker,p=t[0],f=p.trace,g=!h&&!c&&!l&&d.hasText(f);function v(t,e,r,n){var i=o.nestedProperty(f,t).get(),a=o.isArrayOrTypedArray(i)&&e?e(i):i;if(b&&a&&void 0!==n&&(a=n),r){if(ar[1])return r[1]}return a}function y(t){return p._distinct&&p.index&&t[p.index]?t[p.index]:t[0]}if(h||g||u){var x={},_={};if(h){x.mc=v("marker.color",y),x.mx=v("marker.symbol",y),x.mo=v("marker.opacity",o.mean,[.2,1]),x.mlc=v("marker.line.color",y),x.mlw=v("marker.line.width",o.mean,[0,5],2),_.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var k=v("marker.size",o.mean,[2,16],12);x.ms=k,_.marker.size=k}u&&(_.line={width:v("line.width",y,[0,10],5)}),g&&(x.tx="Aa",x.tp=v("textposition",y),x.ts=10,x.tc=v("textfont.color",y),x.tf=v("textfont.family",y),x.tw=v("textfont.weight",y),x.ty=v("textfont.style",y),x.tv=v("textfont.variant",y),x.tC=v("textfont.textcase",y),x.tE=v("textfont.lineposition",y),x.tS=v("textfont.shadow",y)),r=[o.minExtend(p,x)],(i=o.minExtend(f,_)).selectedpoints=null,i.texttemplate=null}var A=n.select(this).select("g.legendpoints"),T=A.selectAll("path.scatterpts").data(h?r:[]);T.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",w),T.exit().remove(),T.call(s.pointStyle,i,e),h&&(r[0].mrc=3);var M=A.selectAll("g.pointtext").data(g?r:[]);M.enter().append("g").classed("pointtext",!0).append("text").attr("transform",w),M.exit().remove(),M.selectAll("text").call(s.textPointStyle,i,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(e.visible&&"candlestick"===e.type?[t,t]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(t,e){return e?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",w).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),o=e[r?"increasing":"decreasing"],a=_(void 0,o.line,5,2);i.style("stroke-width",a+"px").call(l.fill,o.fillcolor),a&&l.stroke(i,o.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(e.visible&&"ohlc"===e.type?[t,t]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(t,e){return e?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",w).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),o=e[r?"increasing":"decreasing"],a=_(void 0,o.line,5,2);i.style("fill","none").call(s.dashLine,o.line.dash,a),a&&l.stroke(i,o.line.color)}))}))}},62799:(t,e,r)=>{"use strict";var n=r(7113);t.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.","This may include *"+n.backButtons.join("*, *")+"*."].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.","This may include *"+n.foreButtons.join("*, *")+"*."].join(" ")}}},47685:(t,e,r)=>{"use strict";var n=r(25059),i=r(51137),o=r(99246),a=r(50917),s=r(71422).eraseActiveShape,l=r(12822),c=l._,d=t.exports={};function u(t,e){var r,i,a=e.currentTarget,s=a.getAttribute("data-attr"),l=a.getAttribute("data-val")||!0,c=t._fullLayout,d={},u=o.list(t,null,!0),h=c._cartesianSpikesEnabled;if("zoom"===s){var p,f="in"===l?.5:2,m=(1+f)/2,g=(1-f)/2;for(i=0;i{"use strict";var n=r(47685),i=Object.keys(n),o=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],a=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(o),s=[];i.forEach((function(t){!function(t){if(-1===a.indexOf(t._cat||t.name)){var e=t.name,r=(t._cat||t.name).toLowerCase();-1===s.indexOf(e)&&s.push(e),-1===s.indexOf(r)&&s.push(r)}}(n[t])})),s.sort(),t.exports={DRAW_MODES:o,backButtons:a,foreButtons:s}},90120:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(46121),a=r(62799);t.exports=function(t,e){var r=t.modebar||{},s=o.newContainer(e,"modebar");function l(t,e){return n.coerce(r,s,a,t,e)}l("orientation"),l("bgcolor",i.addOpacity(e.paper_bgcolor,.5));var c=i.contrast(i.rgb(e.modebar.bgcolor));l("color",i.addOpacity(c,.3)),l("activecolor",i.addOpacity(c,.7)),l("uirevision",e.uirevision),l("add"),l("remove")}},45828:(t,e,r)=>{"use strict";t.exports={moduleType:"component",name:"modebar",layoutAttributes:r(62799),supplyLayoutDefaults:r(90120),manage:r(83493)}},83493:(t,e,r)=>{"use strict";var n=r(99246),i=r(677),o=r(25059),a=r(66811).isUnifiedHover,s=r(27756),l=r(47685),c=r(7113).DRAW_MODES,d=r(12822).extendDeep;t.exports=function(t){var e=t._fullLayout,r=t._context,u=e._modeBar;if(r.displayModeBar||r.watermark){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var h,p=r.modeBarButtons;h=Array.isArray(p)&&p.length?function(t){for(var e=d([],t),r=0;r1?(D=["toggleHover"],I=["resetViews"]):v?(O=["zoomInGeo","zoomOutGeo"],D=["hoverClosestGeo"],I=["resetGeo"]):g?(D=["hoverClosest3d"],I=["resetCameraDefault3d","resetCameraLastSave3d"]):_?(O=["zoomInMapbox","zoomOutMapbox"],D=["toggleHover"],I=["resetViewMapbox"]):k?(O=["zoomInMap","zoomOutMap"],D=["toggleHover"],I=["resetViewMap"]):x?D=["hoverClosestGl2d"]:b?D=["hoverClosestPie"]:M?(D=["hoverClosestCartesian","hoverCompareCartesian"],I=["resetViewSankey"]):D=["toggleHover"],m&&D.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(function(t){for(var e=0;e{"use strict";var n=r(27941),i=r(7370),o=r(12822),a=r(50917),s=r(88566).version,l=new DOMParser;function c(t){this.container=t.container,this.element=document.createElement("div"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var d=c.prototype;d.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i="modebar-"+n._uid;this.element.setAttribute("id",i),this._uid=i,this.element.className="modebar","hover"===r.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===n.modebar.orientation&&(this.element.className+=" vertical",e=e.reverse());var a=n.modebar,s="hover"===r.displayModeBar?".js-plotly-plot .plotly:hover ":"";o.deleteRelatedStyleRule(i),o.addRelatedStyleRule(i,s+"#"+i+" .modebar-group","background-color: "+a.bgcolor),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+a.color),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+a.activecolor),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn.active .icon path","fill: "+a.activecolor);var l=!this.hasButtons(e),c=this.hasLogo!==r.displaylogo,d=this.locale!==r.locale;if(this.locale=r.locale,(l||c||d)&&(this.removeAllButtons(),this.updateButtons(e),r.watermark||r.displaylogo)){var u=this.getLogo();r.watermark&&(u.className=u.className+" watermark"),"v"===n.modebar.orientation?this.element.insertBefore(u,this.element.childNodes[0]):this.element.appendChild(u),this.hasLogo=!0}this.updateActiveButton()},d.updateButtons=function(t){var e=this;this.buttons=t,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach((function(t){var r=e.createGroup();t.forEach((function(t){var n=t.name;if(!n)throw new Error("must provide button 'name' in button config");if(-1!==e.buttonsNames.indexOf(n))throw new Error("button name '"+n+"' is taken");e.buttonsNames.push(n);var i=e.createButton(t);e.buttonElements.push(i),r.appendChild(i)})),e.element.appendChild(r)}))},d.createGroup=function(){var t=document.createElement("div");return t.className="modebar-group",t},d.createButton=function(t){var e=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var i=t.title;void 0===i?i=t.name:"function"==typeof i&&(i=i(this.graphInfo)),(i||0===i)&&r.setAttribute("data-title",i),void 0!==t.attr&&r.setAttribute("data-attr",t.attr);var o=t.val;if(void 0!==o&&("function"==typeof o&&(o=o(this.graphInfo)),r.setAttribute("data-val",o)),"function"!=typeof t.click)throw new Error("must provide button 'click' function in button config");r.addEventListener("click",(function(r){t.click(e.graphInfo,r),e.updateActiveButton(r.currentTarget)})),r.setAttribute("data-toggle",t.toggle||!1),t.toggle&&n.select(r).classed("active",!0);var s=t.icon;return"function"==typeof s?r.appendChild(s()):r.appendChild(this.createIcon(s||a.question)),r.setAttribute("data-gravity",t.gravity||"n"),r},d.createIcon=function(t){var e,r=i(t.height)?Number(t.height):t.ascent-t.descent,n="http://www.w3.org/2000/svg";if(t.path){(e=document.createElementNS(n,"svg")).setAttribute("viewBox",[0,0,t.width,r].join(" ")),e.setAttribute("class","icon");var o=document.createElementNS(n,"path");o.setAttribute("d",t.path),t.transform?o.setAttribute("transform",t.transform):void 0!==t.ascent&&o.setAttribute("transform","matrix(1 0 0 -1 0 "+t.ascent+")"),e.appendChild(o)}return t.svg&&(e=l.parseFromString(t.svg,"application/xml").childNodes[0]),e.setAttribute("height","1em"),e.setAttribute("width","1em"),e},d.updateActiveButton=function(t){var e=this.graphInfo._fullLayout,r=void 0!==t?t.getAttribute("data-attr"):null;this.buttonElements.forEach((function(t){var i=t.getAttribute("data-val")||!0,a=t.getAttribute("data-attr"),s="true"===t.getAttribute("data-toggle"),l=n.select(t);if(s)a===r&&l.classed("active",!l.classed("active"));else{var c=null===a?a:o.nestedProperty(e,a).get();l.classed("active",c===i)}}))},d.hasButtons=function(t){var e=this.buttons;if(!e)return!1;if(t.length!==e.length)return!1;for(var r=0;r{"use strict";var n=r(75058),i=r(84226),o=(0,r(46121).templatedArray)("button",{visible:{valType:"boolean",dflt:!0,editType:"plot",description:"Determines whether or not this button is visible."},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot",description:["The unit of measurement that the `count` value will set the range by."].join(" ")},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot",description:["Sets the range update mode.","If *backward*, the range update shifts the start of range","back *count* times *step* milliseconds.","If *todate*, the range update shifts the start of range","back to the first timestamp from *count* times","*step* milliseconds back.","For example, with `step` set to *year* and `count` set to *1*","the range update shifts the start of the range back to","January 01 of the current year.","Month and year *todate* are currently available only","for the built-in (Gregorian) calendar."].join(" ")},count:{valType:"number",min:0,dflt:1,editType:"plot",description:["Sets the number of steps to take to update the range.","Use with `step` to specify the update interval."].join(" ")},label:{valType:"string",editType:"plot",description:"Sets the text label to appear on the button."},editType:"plot",description:["Sets the specifications for each buttons.","By default, a range selector comes with no buttons."].join(" ")});t.exports={visible:{valType:"boolean",editType:"plot",description:["Determines whether or not this range selector is visible.","Note that range selectors are only available for x axes of","`type` set to or auto-typed to *date*."].join(" ")},buttons:o,x:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the x position (in normalized coordinates) of the range selector."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot",description:["Sets the range selector's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the y position (in normalized coordinates) of the range selector."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot",description:["Sets the range selector's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},font:n({editType:"plot",description:"Sets the font of the range selector button text."}),bgcolor:{valType:"color",dflt:i.lightLine,editType:"plot",description:"Sets the background color of the range selector buttons."},activecolor:{valType:"color",editType:"plot",description:"Sets the background color of the active range selector button."},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"plot",description:"Sets the color of the border enclosing the range selector."},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot",description:"Sets the width (in px) of the border enclosing the range selector."},editType:"plot"}},12057:t=>{"use strict";t.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},4088:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(46121),a=r(35677),s=r(76927),l=r(12057);function c(t,e,r,i){var o=i.calendar;function a(r,i){return n.coerce(t,e,s.buttons,r,i)}if(a("visible")){var l=a("step");"all"!==l&&(!o||"gregorian"===o||"month"!==l&&"year"!==l?a("stepmode"):e.stepmode="backward",a("count")),a("label")}}t.exports=function(t,e,r,d,u){var h=t.rangeselector||{},p=o.newContainer(e,"rangeselector");function f(t,e){return n.coerce(h,p,s,t,e)}if(f("visible",a(h,p,{name:"buttons",handleItemDefaults:c,calendar:u}).length>0)){var m=function(t,e,r){for(var n=r.filter((function(r){return e[r].anchor===t._id})),i=0,o=0;o{"use strict";var n=r(27941),i=r(25059),o=r(51137),a=r(17499),s=r(40666),l=r(12822),c=l.strTranslate,d=r(80394),u=r(99246),h=r(89701),p=h.LINE_SPACING,f=h.FROM_TL,m=h.FROM_BR,g=r(12057),v=r(98822);function b(t){return t._id}function y(t,e,r){var n=l.ensureSingle(t,"rect","selector-rect",(function(t){t.attr("shape-rendering","crispEdges")}));n.attr({rx:g.rx,ry:g.ry}),n.call(a.stroke,e.bordercolor).call(a.fill,function(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}(e,r)).style("stroke-width",e.borderwidth+"px")}function x(t,e,r,n){var i,o;l.ensureSingle(t,"text","selector-text",(function(t){t.attr("text-anchor","middle")})).call(s.font,e.font).text((i=r,o=n._fullLayout._meta,i.label?o?l.templateString(i.label,o):i.label:"all"===i.step?"all":i.count+i.step.charAt(0))).call((function(t){d.convertToTspans(t,n)}))}t.exports=function(t){var e=t._fullLayout._infolayer.selectAll(".rangeselector").data(function(t){for(var e=u.list(t,"x",!0),r=[],n=0;n{"use strict";var n=r(55622),i=r(12822).titleCase;t.exports=function(t,e){var r=t._name,o={};if("all"===e.step)o[r+".autorange"]=!0;else{var a=function(t,e){var r,o=t.range,a=new Date(t.r2l(o[1])),s=e.step,l=n["utc"+i(s)],c=e.count;switch(e.stepmode){case"backward":r=t.l2r(+l.offset(a,-c));break;case"todate":var d=l.offset(a,-c);r=t.l2r(+l.ceil(d))}return[r,o[1]]}(t,e);o[r+".range[0]"]=a[0],o[r+".range[1]"]=a[1]}return o}},36404:(t,e,r)=>{"use strict";t.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:r(76927)}}},layoutAttributes:r(76927),handleDefaults:r(4088),draw:r(58204)}},40959:(t,e,r)=>{"use strict";var n=r(84226);t.exports={bgcolor:{valType:"color",dflt:n.background,editType:"plot",description:"Sets the background color of the range slider."},bordercolor:{valType:"color",dflt:n.defaultLine,editType:"plot",description:"Sets the border color of the range slider."},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot",description:"Sets the border width of the range slider."},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range slider range is","computed in relation to the input data.","If `range` is provided, then `autorange` is set to *false*."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1},description:["Sets the range of the range slider.","If not set, defaults to the full xaxis range.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot",description:["The height of the range slider as a fraction of the","total plot area height."].join(" ")},visible:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the range slider will be visible.","If visible, perpendicular axes will be set to `fixedrange`"].join(" ")},editType:"calc"}},99224:(t,e,r)=>{"use strict";var n=r(99246).list,i=r(19496).getAutoRange,o=r(92601);t.exports=function(t){for(var e=n(t,"x",!0),r=0;r{"use strict";t.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},4504:(t,e,r)=>{"use strict";var n=r(12822),i=r(46121),o=r(99246),a=r(40959),s=r(73290);t.exports=function(t,e,r){var l=t[r],c=e[r];if(l.rangeslider||e._requestRangeslider[c._id]){n.isPlainObject(l.rangeslider)||(l.rangeslider={});var d,u,h=l.rangeslider,p=i.newContainer(c,"rangeslider");if(w("visible")){w("bgcolor",e.plot_bgcolor),w("bordercolor"),w("borderwidth"),w("thickness"),w("autorange",!c.isValidRange(h.range)),w("range");var f=e._subplots;if(f)for(var m=f.cartesian.filter((function(t){return t.substr(0,t.indexOf("y"))===o.name2id(r)})).map((function(t){return t.substr(t.indexOf("y"),t.length)})),g=n.simpleMap(m,o.id2name),v=0;v{"use strict";var n=r(27941),i=r(25059),o=r(51137),a=r(12822),s=a.strTranslate,l=r(40666),c=r(17499),d=r(6883),u=r(29592),h=r(99246),p=r(19846),f=r(76292),m=r(92601);function g(t){return"number"==typeof t.clientX?t.clientX:t.touches&&t.touches.length>0?t.touches[0].clientX:0}function v(t,e,r,n){var i=a.ensureSingle(t,"rect",m.bgClassName,(function(t){t.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),o=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,d=-n._offsetShift,u=l.crispRound(e,n.borderwidth);i.attr({width:n._width+o,height:n._height+o,transform:s(d,d),"stroke-width":u}).call(c.stroke,n.bordercolor).call(c.fill,n.bgcolor)}function b(t,e,r,n){var i=e._fullLayout;a.ensureSingleById(i._topdefs,"clipPath",n._clipId,(function(t){t.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function y(t,e,r,i){var s,c=e.calcdata,d=t.selectAll("g."+m.rangePlotClassName).data(r._subplotsWith,a.identity);d.enter().append("g").attr("class",(function(t){return m.rangePlotClassName+" "+t})).call(l.setClipUrl,i._clipId,e),d.order(),d.exit().remove(),d.each((function(t,a){var l=n.select(this),d=0===a,p=h.getFromId(e,t,"y"),f=p._name,m=i[f],g={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:i.range.slice(),calendar:r.calendar},width:i._width,height:i._height,margin:{t:0,b:0,l:0,r:0}},_context:e._context};r.rangebreaks&&(g.layout.xaxis.rangebreaks=r.rangebreaks),g.layout[f]={type:p.type,domain:[0,1],range:"match"!==m.rangemode?m.range.slice():p.range.slice(),calendar:p.calendar},p.rangebreaks&&(g.layout[f].rangebreaks=p.rangebreaks),o.supplyDefaults(g);var v=g._fullLayout.xaxis,b=g._fullLayout[f];v.clearCalc(),v.setScale(),b.clearCalc(),b.setScale();var y={id:t,plotgroup:l,xaxis:v,yaxis:b,isRangePlot:!0};d?s=y:(y.mainplot="xy",y.mainplotinfo=s),u.rangePlot(e,y,function(t,e){for(var r=[],n=0;n=n.max)e=j[r+1];else if(t=n.pmax)e=j[r+1];else if(tr._length||b+w<0)return;d=v+w,p=b+w;break;case l:if(x="col-resize",v+w>r._length)return;d=v+w,p=b;break;case c:if(x="col-resize",b+w<0)return;d=v,p=b+w;break;default:x="ew-resize",d=m,p=m+w}if(p{"use strict";var n=r(99246),i=r(80394),o=r(92601),a=r(89701).LINE_SPACING,s=o.name;function l(t){var e=t&&t[s];return e&&e.visible}e.isVisible=l,e.makeData=function(t){var e=n.list({_fullLayout:t},"x",!0),r=t.margin,i=[];if(!t._has("gl2d"))for(var o=0;o{"use strict";var n=r(12822),i=r(40959),o=r(73290),a=r(93729);t.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},i,{yaxis:o})}}},layoutAttributes:r(40959),handleDefaults:r(4504),calcAutorange:r(99224),draw:r(19260),isVisible:a.isVisible,makeData:a.makeData,autoMarginOpts:a.autoMarginOpts}},73290:t=>{"use strict";t.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc",description:["Determines whether or not the range of this axis in","the rangeslider use the same value than in the main plot","when zooming in/out.","If *auto*, the autorange will be used.","If *fixed*, the `range` is used.","If *match*, the current range of the corresponding y-axis on the main subplot is used."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Sets the range of this axis for the rangeslider."].join(" ")},editType:"calc"}},65586:(t,e,r)=>{"use strict";var n=r(77061),i=r(98387).line,o=r(68057).T,a=r(98260).extendFlat,s=r(62309).overrideAll,l=r(46121).templatedArray,c=r(53644);t.exports=s(l("selection",{type:{valType:"enumerated",values:["rect","path"],description:["Specifies the selection type to be drawn.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`) and (`x0`,`y1`).","If *path*, draw a custom SVG path using `path`."].join(" ")},xref:a({},n.xref,{description:["Sets the selection's x coordinate axis.",c.axisRefDescription("x","left","right")].join(" ")}),yref:a({},n.yref,{description:["Sets the selection's x coordinate axis.",c.axisRefDescription("y","bottom","top")].join(" ")}),x0:{valType:"any",description:"Sets the selection's starting x position."},x1:{valType:"any",description:"Sets the selection's end x position."},y0:{valType:"any",description:"Sets the selection's starting y position."},y1:{valType:"any",description:"Sets the selection's end y position."},path:{valType:"string",editType:"arraydraw",description:["For `type` *path* - a valid SVG path similar to `shapes.path` in data coordinates.","Allowed segments are: M, L and Z."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw",description:"Sets the opacity of the selection."},line:{color:i.color,width:a({},i.width,{min:1,dflt:1}),dash:a({},o,{dflt:"dot"})}}),"arraydraw","from-root")},76814:t=>{"use strict";t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},8037:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(65586),s=r(23223);function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}var l=o("path"),c="path"!==o("type",l?"path":"rect");c&&delete e.path,o("opacity"),o("line.color"),o("line.width"),o("line.dash");for(var d=["x","y"],u=0;u<2;u++){var h,p,f,m=d[u],g={_fullLayout:r},v=i.coerceRef(t,e,g,m);if((h=i.getFromId(g,v))._selectionIndices.push(e._index),f=s.rangeToShapePosition(h),p=s.shapePositionToRange(h),c){var b=m+"0",y=m+"1",x=t[b],w=t[y];t[b]=p(t[b],!0),t[y]=p(t[y],!0),i.coercePosition(e,g,o,v,b),i.coercePosition(e,g,o,v,y);var _=e[b],k=e[y];void 0!==_&&void 0!==k&&(e[b]=f(_),e[y]=f(k),t[b]=x,t[y]=w)}}c&&n.noneOrAll(t,e,["x0","x1","y0","y1"])}t.exports=function(t,e){o(t,e,{name:"selections",handleItemDefaults:l});for(var r=e.selections,n=0;n{"use strict";var n=r(59952).readPaths,i=r(49244),o=r(8867).clearOutlineControllers,a=r(17499),s=r(40666),l=r(46121).arrayEditor,c=r(23223),d=c.getPathString;function u(t){var e=t._fullLayout;for(var r in o(t),e._selectionLayer.selectAll("path").remove(),e._plots){var n=e._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var i=0;i=0;A--){var T=r.append("path").attr(g).style("opacity",A?.1:v).call(a.stroke,y).call(a.fill,b).call(s.dashLine,A?"solid":w,A?4+x:x);if(f(T,t,o),_){var M=l(t.layout,"selections",o);T.style({cursor:"move"});var S={element:T.node(),plotinfo:p,gd:t,editHelpers:M,isActiveSelection:!0},C=n(c,t);i(C,T,S)}else T.style("pointer-events",A?"all":"none");k[A]=T}var E=k[0];k[1].node().addEventListener("click",(function(){return function(t,e){if(h(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeSelectionIndex)return void m(t);t._fullLayout._activeSelectionIndex=r,t._fullLayout._deactivateSelection=m,u(t)}}}(t,E)}))}(t._fullLayout._selectionLayer)}function f(t,e,r){var n=r.xref+r.yref;s.setClipUrl(t,"clip"+e._fullLayout._uid+n,e)}function m(t){h(t)&&t._fullLayout._activeSelectionIndex>=0&&(o(t),delete t._fullLayout._activeSelectionIndex,u(t))}t.exports={draw:u,drawOne:p,activateLastSelection:function(t){if(h(t)){var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=m,u(t)}}}},21422:(t,e,r)=>{"use strict";var n=r(68057).T,i=r(98260).extendFlat;t.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none",description:["Describes how a new selection is created.","If `immediate`, a new selection is created after first mouse up.","If `gradual`, a new selection is not created after first mouse.","By adding to and subtracting from the initial selection,","this option allows declaring extra outlines of the selection."].join(" ")},line:{color:{valType:"color",editType:"none",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:1,dflt:1,editType:"none",description:"Sets the line width (in px)."},dash:i({},n,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none",description:"Sets the color filling the active selection' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none",description:"Sets the opacity of the active selection."},editType:"none"}}},80857:t=>{"use strict";t.exports=function(t,e,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},63750:(t,e,r)=>{"use strict";var n=r(14295).selectMode,i=r(8867).clearOutline,o=r(59952),a=o.readPaths,s=o.writePaths,l=o.fixDatesForPaths;t.exports=function(t,e){if(t.length){var r=t[0][0];if(r){var o=r.getAttribute("d"),c=e.gd,d=c._fullLayout.newselection,u=e.plotinfo,h=u.xaxis,p=u.yaxis,f=e.isActiveSelection,m=e.dragmode,g=(c.layout||{}).selections||[];if(!n(m)&&void 0!==f){var v=c._fullLayout._activeSelectionIndex;if(v{"use strict";var n=r(12822).strTranslate;function i(t,e){switch(t.type){case"log":return t.p2d(e);case"date":return t.p2r(e,0,t.calendar);default:return t.p2r(e)}}t.exports={p2r:i,r2p:function(t,e){switch(t.type){case"log":return t.d2p(e);case"date":return t.r2p(e,0,t.calendar);default:return t.r2p(e)}},axValue:function(t){var e="y"===t._id.charAt(0)?1:0;return function(r){return i(t,r[e])}},getTransform:function(t){return n(t.xaxis._offset,t.yaxis._offset)}}},70059:(t,e,r)=>{"use strict";var n=r(70445),i=r(80191);t.exports={moduleType:"component",name:"selections",layoutAttributes:r(65586),supplyLayoutDefaults:r(8037),supplyDrawNewSelectionDefaults:r(80857),includeBasePlot:r(39859)("selections"),draw:n.draw,drawOne:n.drawOne,reselect:i.reselect,prepSelect:i.prepSelect,clearOutline:i.clearOutline,clearSelectionsCache:i.clearSelectionsCache,selectOnClick:i.selectOnClick}},80191:(t,e,r)=>{"use strict";var n=r(48439),i=r(53824),o=r(25059),a=r(40666).dashStyle,s=r(17499),l=r(70410),c=r(66811).makeEventData,d=r(14295),u=d.freeMode,h=d.rectMode,p=d.drawMode,f=d.openMode,m=d.selectMode,g=r(23223),v=r(6583),b=r(49244),y=r(8867).clearOutline,x=r(59952),w=x.handleEllipse,_=x.readPaths,k=r(81941).newShapes,A=r(63750),T=r(70445).activateLastSelection,M=r(12822),S=M.sorterAsc,C=r(92620),E=r(76324),L=r(99246).getFromId,z=r(86748),O=r(39004).redrawReglTraces,D=r(76814),I=D.MINSELECT,F=C.filter,R=C.tester,P=r(38554),j=P.p2r,N=P.axValue,B=P.getTransform;function U(t){return void 0!==t.subplot}function G(t,e,r,n,i,o,a){var s,l,c,d,u,h,p,m,g,v=e._hoverdata,y=e._fullLayout.clickmode.indexOf("event")>-1,x=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(v)){q(t,e,o);var w=function(t,e){var r,n,i=t[0],o=-1,a=[];for(n=0;n0?function(t,e){var r,n,i,o=[];for(i=0;i0&&o.push(r);if(1===o.length&&o[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(i=0;i1)return!1;if((n+=e.selectedpoints.length)>1)return!1}return 1===n}(s)&&(h=J(w))){for(a&&a.remove(),g=0;g=0})(i)&&i._fullLayout._deactivateShape(i),function(t){return t._fullLayout._activeSelectionIndex>=0}(i)&&i._fullLayout._deactivateSelection(i);var a=i._fullLayout._zoomlayer,s=p(r),l=m(r);if(s||l){var c,d,u=a.selectAll(".select-outline-"+n.id);u&&i._fullLayout._outlining&&(s&&(c=k(u,t)),c&&o.call("_guiRelayout",i,{shapes:c}),l&&!U(t)&&(d=A(u,t)),d&&(i._fullLayout._noEmitSelectedAtStart=!0,o.call("_guiRelayout",i,{selections:d}).then((function(){e&&T(i)}))),i._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=t.selectionDefs=[],n.selection.mergedPolygons=t.mergedPolygons=[]}function Z(t){return t._id}function $(t,e,r,n){if(!t.calcdata)return[];var i,o,a,s=[],l=e.map(Z),c=r.map(Z);for(a=0;a0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function K(t,e,r){var n,i;for(n=0;n-1&&e;if(!o&&e){var et=at(t,!0);if(et.length){var nt=et[0].xref,pt=et[0].yref;if(nt&&pt){var ft=ct(et);dt([L(t,nt,"x"),L(t,pt,"y")])(Q,ft)}}t._fullLayout._noEmitSelectedAtStart?t._fullLayout._noEmitSelectedAtStart=!1:tt&&ut(t,Q),h._reselect=!1}if(!o&&h._deselect){var mt=h._deselect;(function(t,e,r){for(var n=0;n=0)A._fullLayout._deactivateShape(A);else if(!y){var r=T.clickmode;E.done(Mt).then((function(){if(E.clear(Mt),2===t){for(xt.remove(),J=0;J-1&&G(e,A,n.xaxes,n.yaxes,n.subplot,n,xt),"event"===r&&ut(A,void 0);l.click(A,e,z.id)})).catch(M.error)}},n.doneFn=function(){At.remove(),E.done(Mt).then((function(){E.clear(Mt),!S&&X&&n.selectionDefs&&(X.subtract=yt,n.selectionDefs.push(X),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,Z)),(S||y)&&Y(n,S),n.doneFnCompleted&&n.doneFnCompleted(St),x&&ut(A,ot)})).catch(M.error)}},clearOutline:y,clearSelectionsCache:Y,selectOnClick:G}},39677:(t,e,r)=>{"use strict";var n=r(77061),i=r(75058),o=r(98387).line,a=r(68057).T,s=r(98260).extendFlat,l=r(46121).templatedArray,c=r(53644),d=r(3520),u=r(24131).LF,h=r(12086);t.exports=l("shape",{visible:s({},d.visible,{editType:"calc+arraydraw",description:["Determines whether or not this shape is visible.","If *legendonly*, the shape is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether or not this","shape is shown in the legend."].join(" ")},legend:s({},d.legend,{editType:"calc+arraydraw",description:["Sets the reference to a legend to show this shape in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")}),legendgroup:s({},d.legendgroup,{editType:"calc+arraydraw",description:["Sets the legend group for this shape.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")}),legendgrouptitle:{text:s({},d.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:i({editType:"calc+arraydraw",description:["Sets this legend group's title font."].join(" ")}),editType:"calc+arraydraw"},legendrank:s({},d.legendrank,{editType:"calc+arraydraw",description:["Sets the legend rank for this shape.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items.","When having unranked or equal rank items shapes would be displayed after traces","i.e. according to their order in data and layout."].join(" ")}),legendwidth:s({},d.legendwidth,{editType:"calc+arraydraw",description:"Sets the width (in px or fraction) of the legend for this shape."}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw",description:["Specifies the shape type to be drawn.","If *line*, a line is drawn from (`x0`,`y0`) to (`x1`,`y1`)","with respect to the axes' sizing mode.","If *circle*, a circle is drawn from","((`x0`+`x1`)/2, (`y0`+`y1`)/2))","with radius","(|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|)","with respect to the axes' sizing mode.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`)","with respect to the axes' sizing mode.","If *path*, draw a custom SVG path using `path`.","with respect to the axes' sizing mode."].join(" ")},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw",description:["Specifies whether shapes are drawn below gridlines (*below*),","between gridlines and traces (*between*) or above traces (*above*)."].join(" ")},xref:s({},n.xref,{description:["Sets the shape's x coordinate axis.",c.axisRefDescription("x","left","right")].join(" ")}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the x axis.","If set to *scaled*, `x0`, `x1` and x coordinates within `path` refer to","data values on the x axis or a fraction of the plot area's width","(`xref` set to *paper*).","If set to *pixel*, `xanchor` specifies the x position in terms","of data or plot fraction but `x0`, `x1` and x coordinates within `path`","are pixels relative to `xanchor`. This way, the shape can have","a fixed width while maintaining a position relative to data or","plot fraction."].join(" ")},xanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `xsizemode` set to *pixel*.","Specifies the anchor point on the x axis to which `x0`, `x1`","and x coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `xsizemode` not set to *pixel*."].join(" ")},x0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting x position.","See `type` and `xsizemode` for more info."].join(" ")},x1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end x position.","See `type` and `xsizemode` for more info."].join(" ")},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc",description:["Shifts `x0` away from the center of the category when `xref` is a *category* or","*multicategory* axis. -0.5 corresponds to the start of the category and 0.5","corresponds to the end of the category."].join(" ")},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc",description:["Shifts `x1` away from the center of the category when `xref` is a *category* or","*multicategory* axis. -0.5 corresponds to the start of the category and 0.5","corresponds to the end of the category."].join(" ")},yref:s({},n.yref,{description:["Sets the shape's y coordinate axis.",c.axisRefDescription("y","bottom","top")].join(" ")}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the y axis.","If set to *scaled*, `y0`, `y1` and y coordinates within `path` refer to","data values on the y axis or a fraction of the plot area's height","(`yref` set to *paper*).","If set to *pixel*, `yanchor` specifies the y position in terms","of data or plot fraction but `y0`, `y1` and y coordinates within `path`","are pixels relative to `yanchor`. This way, the shape can have","a fixed height while maintaining a position relative to data or","plot fraction."].join(" ")},yanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `ysizemode` set to *pixel*.","Specifies the anchor point on the y axis to which `y0`, `y1`","and y coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `ysizemode` not set to *pixel*."].join(" ")},y0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting y position.","See `type` and `ysizemode` for more info."].join(" ")},y1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end y position.","See `type` and `ysizemode` for more info."].join(" ")},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc",description:["Shifts `y0` away from the center of the category when `yref` is a *category* or","*multicategory* axis. -0.5 corresponds to the start of the category and 0.5","corresponds to the end of the category."].join(" ")},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc",description:["Shifts `y1` away from the center of the category when `yref` is a *category* or","*multicategory* axis. -0.5 corresponds to the start of the category and 0.5","corresponds to the end of the category."].join(" ")},path:{valType:"string",editType:"calc+arraydraw",description:["For `type` *path* - a valid SVG path with the pixel values","replaced by data values in `xsizemode`/`ysizemode` being *scaled*","and taken unmodified as pixels relative to `xanchor` and `yanchor`","in case of *pixel* size mode.","There are a few restrictions / quirks","only absolute instructions, not relative. So the allowed segments","are: M, L, H, V, Q, C, T, S, and Z","arcs (A) are not allowed because radius rx and ry are relative.","In the future we could consider supporting relative commands,","but we would have to decide on how to handle date and log axes.","Note that even as is, Q and C Bezier paths that are smooth on","linear axes may not be smooth on log, and vice versa.",'no chained "polybezier" commands - specify the segment type for',"each one.","On category axes, values are numbers scaled to the serial numbers","of categories because using the categories themselves there would","be no way to describe fractional positions","On data axes: because space and T are both normal components of path","strings, we can't use either to separate date from time parts.","Therefore we'll use underscore for this purpose:","2015-02-21_13:45:56.789"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the shape."},line:{color:s({},o.color,{editType:"arraydraw"}),width:s({},o.width,{editType:"calc+arraydraw"}),dash:s({},a,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color filling the shape's interior. Only applies to closed shapes."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw",description:["Determines which regions of complex paths constitute the interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether the shape could be activated for edit or not.","Has no effect when the older editable shapes mode is enabled via","`config.editable` or `config.edits.shapePosition`."].join(" ")},label:{text:{valType:"string",dflt:"",editType:"arraydraw",description:["Sets the text to display with shape.","It is also used for legend item if `name` is not provided."].join(" ")},texttemplate:u({},{keys:Object.keys(h)}),font:i({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the shape label text font."}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw",description:["Sets the position of the label text relative to the shape.","Supported values for rectangles, circles and paths are","*top left*, *top center*, *top right*, *middle left*,","*middle center*, *middle right*, *bottom left*, *bottom center*,","and *bottom right*.","Supported values for lines are *start*, *middle*, and *end*.","Default: *middle center* for rectangles, circles, and paths; *middle* for lines."].join(" ")},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw",description:["Sets the angle at which the label text is drawn","with respect to the horizontal. For lines, angle *auto*","is the same angle as the line. For all other shapes,","angle *auto* is horizontal."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the label's horizontal position anchor","This anchor binds the specified `textposition` to the *left*, *center*","or *right* of the label text.","For example, if `textposition` is set to *top right* and","`xanchor` to *right* then the right-most portion of the","label text lines up with the right-most edge of the","shape."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw",description:["Sets the label's vertical position anchor","This anchor binds the specified `textposition` to the *top*, *middle*","or *bottom* of the label text.","For example, if `textposition` is set to *top right* and","`yanchor` to *top* then the top-most portion of the","label text lines up with the top-most edge of the","shape."].join(" ")},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw",description:"Sets padding (in px) between edge of label and edge of shape."},editType:"arraydraw"},editType:"arraydraw"})},37358:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(6583),a=r(23223);function s(t){return c(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function l(t){return c(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function c(t,e,r,i,s,l){var c=t/2,d=l;if("pixel"===e){var u=s?a.extractPathCoords(s,l?o.paramIsY:o.paramIsX):[r,i],h=n.aggNums(Math.max,null,u),p=n.aggNums(Math.min,null,u),f=p<0?Math.abs(p)+c:c,m=h>0?h+c:c;return{ppad:c,ppadplus:d?f:m,ppadminus:d?m:f}}return{ppad:c}}function d(t,e,r){var n,i,s="x"===t._id.charAt(0)?"x":"y",l="category"===t.type||"multicategory"===t.type,c=0,d=0,u=l?t.r2c:t.d2c;if("scaled"===e[s+"sizemode"]?(n=e[s+"0"],i=e[s+"1"],l&&(c=e[s+"0shift"],d=e[s+"1shift"])):(n=e[s+"anchor"],i=e[s+"anchor"]),void 0!==n)return[u(n)+c,u(i)+d];if(e.path){var h,p,f,m,g=1/0,v=-1/0,b=e.path.match(o.segmentRE);for("date"===t.type&&(u=a.decodeDate(u)),h=0;hv&&(v=m)));return v>=g?[g,v]:void 0}}t.exports=function(t){var e=t._fullLayout,r=n.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var a=0;a{"use strict";t.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},12138:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(39677),s=r(23223);function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}if(e._isShape=!0,o("visible")){o("showlegend")&&(o("legend"),o("legendwidth"),o("legendgroup"),o("legendgrouptitle.text"),n.coerceFont(o,"legendgrouptitle.font"),o("legendrank"));var l=o("path"),c=o("type",l?"path":"rect"),d="path"!==c;d&&delete e.path,o("editable"),o("layer"),o("opacity"),o("fillcolor"),o("fillrule"),o("line.width")&&(o("line.color"),o("line.dash"));for(var u=o("xsizemode"),h=o("ysizemode"),p=["x","y"],f=0;f<2;f++){var m,g,v,b=p[f],y=b+"anchor",x="x"===b?u:h,w={_fullLayout:r},_=i.coerceRef(t,e,w,b,void 0,"paper");if("range"===i.getRefType(_)?((m=i.getFromId(w,_))._shapeIndices.push(e._index),v=s.rangeToShapePosition(m),g=s.shapePositionToRange(m),"category"!==m.type&&"multicategory"!==m.type||(o(b+"0shift"),o(b+"1shift"))):g=v=n.identity,d){var k=b+"0",A=b+"1",T=t[k],M=t[A];t[k]=g(t[k],!0),t[A]=g(t[A],!0),"pixel"===x?(o(k,0),o(A,10)):(i.coercePosition(e,w,o,_,k,.25),i.coercePosition(e,w,o,_,A,.75)),e[k]=v(e[k]),e[A]=v(e[A]),t[k]=T,t[A]=M}if("pixel"===x){var S=t[y];t[y]=g(t[y],!0),i.coercePosition(e,w,o,_,y,.25),e[y]=v(e[y]),t[y]=S}}d&&n.noneOrAll(t,e,["x0","x1","y0","y1"]);var C,E,L="line"===c;if(d&&(C=o("label.texttemplate")),C||(E=o("label.text")),E||C){o("label.textangle");var z=o("label.textposition",L?"middle":"middle center");o("label.xanchor"),o("label.yanchor",function(t,e){return t?"bottom":-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle"}(L,z)),o("label.padding"),n.coerceFont(o,"label.font",r.font)}}}t.exports=function(t,e){o(t,e,{name:"shapes",handleItemDefaults:l})}},64620:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(80394),a=r(40666),s=r(59952).readPaths,l=r(23223),c=l.getPathString,d=r(12086),u=r(89701).FROM_TL;t.exports=function(t,e,r,h){if(h.selectAll(".shape-label").remove(),r.label.text||r.label.texttemplate){var p;if(r.label.texttemplate){var f={};if("path"!==r.type){var m=i.getFromId(t,r.xref),g=i.getFromId(t,r.yref);for(var v in d){var b=d[v](r,m,g);void 0!==b&&(f[v]=b)}}p=n.texttemplateStringForShapes(r.label.texttemplate,{},t._fullLayout._d3locale,f)}else p=r.label.text;var y,x,w,_,k={"data-index":e},A=r.label.font,T=h.append("g").attr(k).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(p);if(r.path){var M=c(t,r),S=s(M,t);y=1/0,w=1/0,x=-1/0,_=-1/0;for(var C=0;C=t?e-n:n-e,-180/Math.PI*Math.atan2(i,o)}(y,w,x,_):0),T.call((function(e){return e.call(a.font,A).attr({}),o.convertToTspans(e,t),e}));var W=function(t,e,r,n,i,o,a){var s,l,c,d,h=i.label.textposition,p=i.label.textangle,f=i.label.padding,m=i.type,g=Math.PI/180*o,v=Math.sin(g),b=Math.cos(g),y=i.label.xanchor,x=i.label.yanchor;if("line"===m){"start"===h?(s=t,l=e):"end"===h?(s=r,l=n):(s=(t+r)/2,l=(e+n)/2),"auto"===y&&(y="start"===h?"auto"===p?r>t?"left":rt?"right":rt?"right":rt?"left":r{"use strict";var n=r(12822).strTranslate,i=r(19846),o=r(14295),a=o.drawMode,s=o.selectMode,l=r(25059),c=r(17499),d=r(81436),u=d.i000,h=d.i090,p=d.i180,f=d.i270,m=r(8867).clearOutlineControllers,g=r(59952),v=g.pointsOnRectangle,b=g.pointsOnEllipse,y=g.writePaths,x=r(81941).newShapes,w=r(81941).createShapeObj,_=r(63750),k=r(64620);function A(t,e){var r,n,i,o=t[e][1],a=t[e][2],s=t.length;return n=t[r=(e+1)%s][1],i=t[r][2],n===o&&i===a&&(n=t[r=(e+2)%s][1],i=t[r][2]),[r,n,i]}t.exports=function t(e,r,o,d){d||(d=0);var g=o.gd;function T(){t(e,r,o,d++),(b(e[0])||o.hasText)&&M({redrawing:!0})}function M(t){var e={};void 0!==o.isActiveShape&&(o.isActiveShape=!1,e=x(r,o)),void 0!==o.isActiveSelection&&(o.isActiveSelection=!1,e=_(r,o),g._fullLayout._reselect=!0),Object.keys(e).length&&l.call((t||{}).redrawing?"relayout":"_guiRelayout",g,e)}var S,C,E,L,z,O=g._fullLayout._zoomlayer,D=o.dragmode,I=a(D),F=s(D);if((I||F)&&(g._fullLayout._outlining=!0),m(g),r.attr("d",y(e)),d||!o.isActiveShape&&!o.isActiveSelection||(z=function(t,e){for(var r=0;r1&&(2!==t.length||"Z"!==t[1][0])&&(0===L&&(t[0][0]="M"),e[E]=t,T(),M())}}()}}function G(t,r){!function(t,r){if(e.length)for(var n=0;n{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=r(75815),s=r(59952).readPaths,l=r(49244),c=r(64620),d=r(8867).clearOutlineControllers,u=r(17499),h=r(40666),p=r(46121).arrayEditor,f=r(19846),m=r(76292),g=r(6583),v=r(23223),b=v.getPathString;function y(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove(),e._shapeUpperLayer.selectAll("text").remove(),e._shapeLowerLayer.selectAll("text").remove(),e._plots){var n=e._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var i=0;iw?(M=p,L="y0",S=w,z="y1"):(M=w,L="y1",S=p,z="y0"),rt(n),ot(l,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l="";"paper"===n||o.autorange||(l+=n),"paper"===i||s.autorange||(l+=i),h.setClipUrl(t,l?"clip"+r._fullLayout._uid+l:null,r)}(e,r,t),et.moveFn="move"===F?nt:it,et.altKey=n.altKey)},doneFn:function(){x(t)||(m(e),at(l),k(e,t,r),i.call("_guiRelayout",t,d.getUpdateObj()))},clickFn:function(){x(t)||at(l)}};function rt(r){if(x(t))F=null;else if(j)F="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=et.element.getBoundingClientRect(),i=n.right-n.left,o=n.bottom-n.top,a=r.clientX-n.left,s=r.clientY-n.top,l=!N&&i>10&&o>10&&!r.shiftKey?f.getCursor(a/i,1-s/o):"move";m(e,l),F=l.split("-")[0]}}function nt(n,i){if("path"===r.type){var o=function(t){return t},a=o,d=o;R?B("xanchor",r.xanchor=K(_+n)):(a=function(t){return K(X(t)+n)},G&&"date"===G.type&&(a=v.encodeDate(a))),P?B("yanchor",r.yanchor=Q(T+i)):(d=function(t){return Q(J(t)+i)},H&&"date"===H.type&&(d=v.encodeDate(d))),B("path",r.path=A(I,a,d))}else R?B("xanchor",r.xanchor=K(_+n)):(B("x0",r.x0=K(u+n)),B("x1",r.x1=K(y+n))),P?B("yanchor",r.yanchor=Q(T+i)):(B("y0",r.y0=Q(p+i)),B("y1",r.y1=Q(w+i)));e.attr("d",b(t,r)),ot(l,r),c(t,s,r,U)}function it(n,i){if(N){var o=function(t){return t},a=o,d=o;R?B("xanchor",r.xanchor=K(_+n)):(a=function(t){return K(X(t)+n)},G&&"date"===G.type&&(a=v.encodeDate(a))),P?B("yanchor",r.yanchor=Q(T+i)):(d=function(t){return Q(J(t)+i)},H&&"date"===H.type&&(d=v.encodeDate(d))),B("path",r.path=A(I,a,d))}else if(j){if("resize-over-start-point"===F){var h=u+n,f=P?p-i:p+i;B("x0",r.x0=R?h:K(h)),B("y0",r.y0=P?f:Q(f))}else if("resize-over-end-point"===F){var m=y+n,g=P?w-i:w+i;B("x1",r.x1=R?m:K(m)),B("y1",r.y1=P?g:Q(g))}}else{var x=function(t){return-1!==F.indexOf(t)},k=x("n"),V=x("s"),W=x("w"),q=x("e"),Y=k?M+i:M,Z=V?S+i:S,$=W?C+n:C,tt=q?E+n:E;P&&(k&&(Y=M-i),V&&(Z=S-i)),(!P&&Z-Y>10||P&&Y-Z>10)&&(B(L,r[L]=P?Y:Q(Y)),B(z,r[z]=P?Z:Q(Z))),tt-$>10&&(B(O,r[O]=R?$:K($)),B(D,r[D]=R?tt:K(tt)))}e.attr("d",b(t,r)),ot(l,r),c(t,s,r,U)}function ot(t,e){(R||P)&&function(){var r="path"!==e.type,n=t.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var i=X(R?e.xanchor:o.midRange(r?[e.x0,e.x1]:v.extractPathCoords(e.path,g.paramIsX))),a=J(P?e.yanchor:o.midRange(r?[e.y0,e.y1]:v.extractPathCoords(e.path,g.paramIsY)));if(i=v.roundPositionForSharpStrokeRendering(i,1),a=v.roundPositionForSharpStrokeRendering(a,1),R&&P){var s="M"+(i-1-1)+","+(a-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(R){var l="M"+(i-1-1)+","+(a-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var c="M"+(i-9-1)+","+(a-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function at(t){t.selectAll(".visual-cue").remove()}f.init(et),tt.node().onmousemove=rt}(t,P,d,e,r,F):!0===d.editable&&P.style("pointer-events",D||u.opacity(E)*C<=.5?"stroke":"all");P.node().addEventListener("click",(function(){return function(t,e){if(w(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void T(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=T,y(t)}}}(t,P)}))}d._input&&!0===d.visible&&("above"===d.layer?M(t._fullLayout._shapeUpperLayer):"paper"===d.xref||"paper"===d.yref?M(t._fullLayout._shapeLowerLayer):"between"===d.layer?M(_.shapelayerBetween):_._hadPlotinfo?M((_.mainplotinfo||_).shapelayer):M(t._fullLayout._shapeLowerLayer))}function k(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");h.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function A(t,e,r){return t.replace(g.segmentRE,(function(t){var n=0,i=t.charAt(0),o=g.paramIsX[i],a=g.paramIsY[i],s=g.numParams[i];return i+t.substr(1).replace(g.paramRE,(function(t){return n>=s||(o[n]?t=e(t):a[n]&&(t=r(t)),n++),t}))}))}function T(t){w(t)&&t._fullLayout._activeShapeIndex>=0&&(d(t),delete t._fullLayout._activeShapeIndex,y(t))}t.exports={draw:y,drawOne:_,eraseActiveShape:function(t){if(w(t)){d(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e{"use strict";var n=r(62309).overrideAll,i=r(3520),o=r(75058),a=r(68057).T,s=r(98260).extendFlat,l=r(24131).LF,c=r(12086);t.exports=n({newshape:{visible:s({},i.visible,{description:["Determines whether or not new shape is visible.","If *legendonly*, the shape is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")}),showlegend:{valType:"boolean",dflt:!1,description:["Determines whether or not new","shape is shown in the legend."].join(" ")},legend:s({},i.legend,{description:["Sets the reference to a legend to show new shape in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")}),legendgroup:s({},i.legendgroup,{description:["Sets the legend group for new shape.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")}),legendgrouptitle:{text:s({},i.legendgrouptitle.text,{}),font:o({description:["Sets this legend group's title font."].join(" ")})},legendrank:s({},i.legendrank,{description:["Sets the legend rank for new shape.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items."].join(" ")}),legendwidth:s({},i.legendwidth,{description:"Sets the width (in px or fraction) of the legend for new shape."}),line:{color:{valType:"color",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:0,dflt:4,description:"Sets the line width (in px)."},dash:s({},a,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:["Sets the color filling new shapes' interior.","Please note that if using a fillcolor with alpha greater than half,","drag inside the active shape starts moving the shape underneath,","otherwise a new shape could be started over."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",description:["Determines the path's interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:"Sets the opacity of new shapes."},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",description:["Specifies whether new shapes are drawn below gridlines (*below*),","between gridlines and traces (*between*) or above traces (*above*)."].join(" ")},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",description:["When `dragmode` is set to *drawrect*, *drawline* or *drawcircle*","this limits the drag to be horizontal, vertical or diagonal.","Using *diagonal* there is no limit e.g. in drawing lines in any direction.","*ortho* limits the draw to be either horizontal or vertical.","*horizontal* allows horizontal extend.","*vertical* allows vertical extend."].join(" ")},name:s({},i.name,{description:["Sets new shape name.","The name appears as the legend item."].join(" ")}),label:{text:{valType:"string",dflt:"",description:["Sets the text to display with the new shape.","It is also used for legend item if `name` is not provided."].join(" ")},texttemplate:l({newshape:!0},{keys:Object.keys(c)}),font:o({description:"Sets the new shape label text font."}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],description:["Sets the position of the label text relative to the new shape.","Supported values for rectangles, circles and paths are","*top left*, *top center*, *top right*, *middle left*,","*middle center*, *middle right*, *bottom left*, *bottom center*,","and *bottom right*.","Supported values for lines are *start*, *middle*, and *end*.","Default: *middle center* for rectangles, circles, and paths; *middle* for lines."].join(" ")},textangle:{valType:"angle",dflt:"auto",description:["Sets the angle at which the label text is drawn","with respect to the horizontal. For lines, angle *auto*","is the same angle as the line. For all other shapes,","angle *auto* is horizontal."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",description:["Sets the label's horizontal position anchor","This anchor binds the specified `textposition` to the *left*, *center*","or *right* of the label text.","For example, if `textposition` is set to *top right* and","`xanchor` to *right* then the right-most portion of the","label text lines up with the right-most edge of the","new shape."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets the label's vertical position anchor","This anchor binds the specified `textposition` to the *top*, *middle*","or *bottom* of the label text.","For example, if `textposition` is set to *top right* and","`yanchor` to *top* then the top-most portion of the","label text lines up with the top-most edge of the","new shape."].join(" ")},padding:{valType:"number",dflt:3,min:0,description:"Sets padding (in px) between edge of label and edge of new shape."}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,description:"Sets the opacity of the active shape."}}},"none","from-root")},81436:t=>{"use strict";t.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},24815:(t,e,r)=>{"use strict";var n=r(17499),i=r(12822);t.exports=function(t,e,r){if(r("newshape.visible"),r("newshape.name"),r("newshape.showlegend"),r("newshape.legend"),r("newshape.legendwidth"),r("newshape.legendgroup"),r("newshape.legendgrouptitle.text"),i.coerceFont(r,"newshape.legendgrouptitle.font"),r("newshape.legendrank"),r("newshape.drawdirection"),r("newshape.layer"),r("newshape.fillcolor"),r("newshape.fillrule"),r("newshape.opacity"),r("newshape.line.width")){var o=(t||{}).plot_bgcolor||"#FFF";r("newshape.line.color",n.contrast(o)),r("newshape.line.dash")}var a="drawline"===t.dragmode,s=r("newshape.label.text"),l=r("newshape.label.texttemplate");if(s||l){r("newshape.label.textangle");var c=r("newshape.label.textposition",a?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",function(t,e){return t?"bottom":-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle"}(a,c)),r("newshape.label.padding"),i.coerceFont(r,"newshape.label.font",e.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}},59952:(t,e,r)=>{"use strict";var n=r(37974),i=r(81436),o=i.CIRCLE_SIDES,a=i.SQRT2,s=r(38554),l=s.p2r,c=s.r2p,d=[0,3,4,5,6,1,2],u=[0,3,4,1,2];function h(t,e){return Math.abs(t-e)<=1e-6}function p(t,e){var r=e[1]-t[1],n=e[2]-t[2];return Math.sqrt(r*r+n*n)}e.writePaths=function(t){var e=t.length;if(!e)return"M0,0Z";for(var r="",n=0;n0&&l{"use strict";var n=r(14295),i=n.drawMode,o=n.openMode,a=r(81436),s=a.i000,l=a.i090,c=a.i180,d=a.i270,u=a.cos45,h=a.sin45,p=r(38554),f=p.p2r,m=p.r2p,g=r(8867).clearOutline,v=r(59952),b=v.readPaths,y=v.writePaths,x=v.ellipseOver,w=v.fixDatesForPaths;function _(t,e,r){var n,i=t[0][0],a=e.gd,p=i.getAttribute("d"),g=a._fullLayout.newshape,v=e.plotinfo,_=e.isActiveShape,k=v.xaxis,A=v.yaxis,T=!!v.domain||!v.xaxis,M=!!v.domain||!v.yaxis,S=o(r),C=b(p,a,v,_),E={editable:!0,visible:g.visible,name:g.name,showlegend:g.showlegend,legend:g.legend,legendwidth:g.legendwidth,legendgroup:g.legendgroup,legendgrouptitle:{text:g.legendgrouptitle.text,font:g.legendgrouptitle.font},legendrank:g.legendrank,label:g.label,xref:T?"paper":k._id,yref:M?"paper":A._id,layer:g.layer,opacity:g.opacity,line:{color:g.line.color,width:g.line.width,dash:g.line.dash}};if(S||(E.fillcolor=g.fillcolor,E.fillrule=g.fillrule),1===C.length&&(n=C[0]),n&&5===n.length&&"drawrect"===r)E.type="rect",E.x0=n[0][1],E.y0=n[0][2],E.x1=n[2][1],E.y1=n[2][2];else if(n&&"drawline"===r)E.type="line",E.x0=n[0][1],E.y0=n[0][2],E.x1=n[1][1],E.y1=n[1][2];else if(n&&"drawcircle"===r){E.type="circle";var L=n[s][1],z=n[l][1],O=n[c][1],D=n[d][1],I=n[s][2],F=n[l][2],R=n[c][2],P=n[d][2],j=v.xaxis&&("date"===v.xaxis.type||"log"===v.xaxis.type),N=v.yaxis&&("date"===v.yaxis.type||"log"===v.yaxis.type);j&&(L=m(v.xaxis,L),z=m(v.xaxis,z),O=m(v.xaxis,O),D=m(v.xaxis,D)),N&&(I=m(v.yaxis,I),F=m(v.yaxis,F),R=m(v.yaxis,R),P=m(v.yaxis,P));var B=(z+D)/2,U=(I+R)/2,G=x({x0:B,y0:U,x1:B+(D-z+O-L)/2*u,y1:U+(P-F+R-I)/2*h});j&&(G.x0=f(v.xaxis,G.x0),G.x1=f(v.xaxis,G.x1)),N&&(G.y0=f(v.yaxis,G.y0),G.y1=f(v.yaxis,G.y1)),E.x0=G.x0,E.y0=G.y0,E.x1=G.x1,E.y1=G.y1}else E.type="path",k&&A&&w(C,k,A),E.path=y(C),n=null;return E}t.exports={newShapes:function(t,e){if(t.length&&t[0][0]){var r=e.gd,n=e.isActiveShape,o=e.dragmode,a=(r.layout||{}).shapes||[];if(!i(o)&&void 0!==n){var s=r._fullLayout._activeShapeIndex;if(s{"use strict";t.exports={clearOutlineControllers:function(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".outline-controllers").remove()},clearOutline:function(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".select-outline").remove(),t._fullLayout._outlining=!1}}},23223:(t,e,r)=>{"use strict";var n=r(6583),i=r(12822),o=r(75815);function a(t,e){var r=0;return(e=e||0)&&t&&("category"===t.type||"multicategory"===t.type)&&(r=(t.r2p(1)-t.r2p(0))*e),r}e.rangeToShapePosition=function(t){return"log"===t.type?t.r2d:function(t){return t}},e.shapePositionToRange=function(t){return"log"===t.type?t.d2r:function(t){return t}},e.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},e.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},e.extractPathCoords=function(t,e,r){var o=[];return t.match(n.segmentRE).forEach((function(t){var a=e[t.charAt(0)].drawn;if(void 0!==a){var s=t.substr(1).match(n.paramRE);if(s&&!(s.lengthp&&(t="X"),t}));return o>p&&(f=f.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+t)),d+f}))}(r,l,d);if("pixel"===r.xsizemode){var T=l(r.xanchor);u=T+r.x0+w,h=T+r.x1+_}else u=l(r.x0)+w,h=l(r.x1)+_;if("pixel"===r.ysizemode){var M=d(r.yanchor);p=M-r.y0+k,f=M-r.y1+A}else p=d(r.y0)+k,f=d(r.y1)+A;if("line"===m)return"M"+u+","+p+"L"+h+","+f;if("rect"===m)return"M"+u+","+p+"H"+h+"V"+f+"H"+u+"Z";var S=(u+h)/2,C=(p+f)/2,E=Math.abs(S-u),L=Math.abs(C-p),z="A"+E+","+L,O=S+E+","+C;return"M"+O+z+" 0 1,1 "+S+","+(C-L)+z+" 0 0,1 "+O+"Z"}},60166:(t,e,r)=>{"use strict";var n=r(71422);t.exports={moduleType:"component",name:"shapes",layoutAttributes:r(39677),supplyLayoutDefaults:r(12138),supplyDrawNewShapeDefaults:r(24815),includeBasePlot:r(39859)("shapes"),calcAutorange:r(37358),draw:n.draw,drawOne:n.drawOne}},12086:t=>{"use strict";function e(t,e){return e?e.d2l(t):t}function r(t,e){return e?e.l2d(t):t}function n(t){return t.x0shift||0}function i(t){return t.x1shift||0}function o(t){return t.y0shift||0}function a(t){return t.y1shift||0}function s(t,r){return e(t.x1,r)+i(t)-e(t.x0,r)-n(t)}function l(t,r,n){return e(t.y1,n)+a(t)-e(t.y0,n)-o(t)}t.exports={x0:function(t){return t.x0},x1:function(t){return t.x1},y0:function(t){return t.y0},y1:function(t){return t.y1},slope:function(t,e,r){return"line"!==t.type?void 0:l(t,0,r)/s(t,e)},dx:s,dy:l,width:function(t,e){return Math.abs(s(t,e))},height:function(t,e,r){return Math.abs(l(t,0,r))},length:function(t,e,r){return"line"!==t.type?void 0:Math.sqrt(Math.pow(s(t,e),2)+Math.pow(l(t,0,r),2))},xcenter:function(t,o){return r((e(t.x1,o)+i(t)+e(t.x0,o)+n(t))/2,o)},ycenter:function(t,n,i){return r((e(t.y1,i)+a(t)+e(t.y0,i)+o(t))/2,i)}}},8421:(t,e,r)=>{"use strict";var n=r(75058),i=r(85538),o=r(98260).extendDeepAll,a=r(62309).overrideAll,s=r(46367),l=r(46121).templatedArray,c=r(92911),d=l("step",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not this step is included in the slider."].join(" ")},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called when the slider value is changed.","If the `skip` method is used, the API slider will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","slider events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on slide."].join(" ")},label:{valType:"string",description:"Sets the text label to appear on the slider"},value:{valType:"string",description:["Sets the value of the slider step, used to refer to the step programatically.","Defaults to the slider label if not provided."].join(" ")},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_sliderchange` method and executing the API command manually without losing","the benefit of the slider automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}});t.exports=a(l("slider",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not the slider is visible."].join(" ")},active:{valType:"number",min:0,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},steps:d,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this slider length","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the slider","This measure excludes the padding of both ends.","That is, the slider's length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the x position (in normalized coordinates) of the slider."},pad:o(i({editType:"arraydraw"}),{description:"Set the padding of the slider component along each side."},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",description:["Sets the slider's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the y position (in normalized coordinates) of the slider."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the slider's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},transition:{duration:{valType:"number",min:0,dflt:150,description:"Sets the duration of the slider transition"},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out",description:"Sets the easing function of the slider transition"}},currentvalue:{visible:{valType:"boolean",dflt:!0,description:["Shows the currently-selected value above the slider."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",description:["The alignment of the value readout relative to the length of the slider."].join(" ")},offset:{valType:"number",dflt:10,description:["The amount of space, in pixels, between the current value label","and the slider."].join(" ")},prefix:{valType:"string",description:"When currentvalue.visible is true, this sets the prefix of the label."},suffix:{valType:"string",description:"When currentvalue.visible is true, this sets the suffix of the label."},font:n({description:"Sets the font of the current value label text."})},font:n({description:"Sets the font of the slider step labels."}),activebgcolor:{valType:"color",dflt:c.gripBgActiveColor,description:["Sets the background color of the slider grip","while dragging."].join(" ")},bgcolor:{valType:"color",dflt:c.railBgColor,description:"Sets the background color of the slider."},bordercolor:{valType:"color",dflt:c.railBorderColor,description:"Sets the color of the border enclosing the slider."},borderwidth:{valType:"number",min:0,dflt:c.railBorderWidth,description:"Sets the width (in px) of the border enclosing the slider."},ticklen:{valType:"number",min:0,dflt:c.tickLength,description:"Sets the length in pixels of step tick marks"},tickcolor:{valType:"color",dflt:c.tickColor,description:"Sets the color of the border enclosing the slider."},tickwidth:{valType:"number",min:0,dflt:1,description:"Sets the tick width (in px)."},minorticklen:{valType:"number",min:0,dflt:c.minorTickLength,description:"Sets the length in pixels of minor step tick marks"}}),"arraydraw","from-root")},92911:t=>{"use strict";t.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},60626:(t,e,r)=>{"use strict";var n=r(12822),i=r(35677),o=r(8421),a=r(92911).name,s=o.steps;function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}for(var s=i(t,e,{name:"steps",handleItemDefaults:c}),l=0,d=0;d{"use strict";var n=r(27941),i=r(51137),o=r(17499),a=r(40666),s=r(12822),l=s.strTranslate,c=r(80394),d=r(46121).arrayEditor,u=r(92911),h=r(89701),p=h.LINE_SPACING,f=h.FROM_TL,m=h.FROM_BR;function g(t){return u.autoMarginIdRoot+t._index}function v(t){return t._index}function b(t,e){var r=a.tester.selectAll("g."+u.labelGroupClass).data(e._visibleSteps);r.enter().append("g").classed(u.labelGroupClass,!0);var o=0,l=0;r.each((function(t){var r=w(n.select(this),{step:t},e).node();if(r){var i=a.bBox(r);l=Math.max(l,i.height),o=Math.max(o,i.width)}})),r.remove();var d=e._dims={};d.inputAreaWidth=Math.max(u.railWidth,u.gripHeight);var h=t._fullLayout._size;d.lx=h.l+h.w*e.x,d.ly=h.t+h.h*(1-e.y),"fraction"===e.lenmode?d.outerLength=Math.round(h.w*e.len):d.outerLength=e.len,d.inputAreaStart=0,d.inputAreaLength=Math.round(d.outerLength-e.pad.l-e.pad.r);var p=(d.inputAreaLength-2*u.stepInset)/(e._stepCount-1),v=o+u.labelPadding;if(d.labelStride=Math.max(1,Math.ceil(v/p)),d.labelHeight=l,d.currentValueMaxWidth=0,d.currentValueHeight=0,d.currentValueTotalHeight=0,d.currentValueMaxLines=1,e.currentvalue.visible){var b=a.tester.append("g");r.each((function(t){var r=y(b,e,t.label),n=r.node()&&a.bBox(r.node())||{width:0,height:0},i=c.lineCount(r);d.currentValueMaxWidth=Math.max(d.currentValueMaxWidth,Math.ceil(n.width)),d.currentValueHeight=Math.max(d.currentValueHeight,Math.ceil(n.height)),d.currentValueMaxLines=Math.max(d.currentValueMaxLines,i)})),d.currentValueTotalHeight=d.currentValueHeight+e.currentvalue.offset,b.remove()}d.height=d.currentValueTotalHeight+u.tickOffset+e.ticklen+u.labelOffset+d.labelHeight+e.pad.t+e.pad.b;var x="left";s.isRightAnchor(e)&&(d.lx-=d.outerLength,x="right"),s.isCenterAnchor(e)&&(d.lx-=d.outerLength/2,x="center");var _="top";s.isBottomAnchor(e)&&(d.ly-=d.height,_="bottom"),s.isMiddleAnchor(e)&&(d.ly-=d.height/2,_="middle"),d.outerLength=Math.ceil(d.outerLength),d.height=Math.ceil(d.height),d.lx=Math.round(d.lx),d.ly=Math.round(d.ly);var k={y:e.y,b:d.height*m[_],t:d.height*f[_]};"fraction"===e.lenmode?(k.l=0,k.xl=e.x-e.len*f[x],k.r=0,k.xr=e.x+e.len*m[x]):(k.x=e.x,k.l=d.outerLength*f[x],k.r=d.outerLength*m[x]),i.autoMargin(t,g(e),k)}function y(t,e,r){if(e.currentvalue.visible){var n,i,o=e._dims;switch(e.currentvalue.xanchor){case"right":n=o.inputAreaLength-u.currentValueInset-o.currentValueMaxWidth,i="left";break;case"center":n=.5*o.inputAreaLength,i="middle";break;default:n=u.currentValueInset,i="left"}var l=s.ensureSingle(t,"text",u.labelClass,(function(t){t.attr({"text-anchor":i,"data-notex":1})})),d=e.currentvalue.prefix?e.currentvalue.prefix:"";if("string"==typeof r)d+=r;else{var h=e.steps[e.active].label,f=e._gd._fullLayout._meta;f&&(h=s.templateString(h,f)),d+=h}e.currentvalue.suffix&&(d+=e.currentvalue.suffix),l.call(a.font,e.currentvalue.font).text(d).call(c.convertToTspans,e._gd);var m=c.lineCount(l),g=(o.currentValueMaxLines+1-m)*e.currentvalue.font.size*p;return c.positionText(l,n,g),l}}function x(t,e,r){s.ensureSingle(t,"rect",u.gripRectClass,(function(n){n.call(T,e,t,r).style("pointer-events","all")})).attr({width:u.gripWidth,height:u.gripHeight,rx:u.gripRadius,ry:u.gripRadius}).call(o.stroke,r.bordercolor).call(o.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function w(t,e,r){var n=s.ensureSingle(t,"text",u.labelClass,(function(t){t.attr({"text-anchor":"middle","data-notex":1})})),i=e.step.label,o=r._gd._fullLayout._meta;return o&&(i=s.templateString(i,o)),n.call(a.font,r.font).text(i).call(c.convertToTspans,r._gd),n}function _(t,e){var r=s.ensureSingle(t,"g",u.labelsClass),i=e._dims,o=r.selectAll("g."+u.labelGroupClass).data(i.labelSteps);o.enter().append("g").classed(u.labelGroupClass,!0),o.exit().remove(),o.each((function(t){var r=n.select(this);r.call(w,t,e),a.setTranslate(r,C(e,t.fraction),u.tickOffset+e.ticklen+e.font.size*p+u.labelOffset+i.currentValueTotalHeight)}))}function k(t,e,r,n,i){var o=Math.round(n*(r._stepCount-1)),a=r._visibleSteps[o]._index;a!==r.active&&A(t,e,r,a,!0,i)}function A(t,e,r,n,o,a){var s=r.active;r.active=n,d(t.layout,u.name,r).applyUpdate("active",n);var l=r.steps[r.active];e.call(S,r,a),e.call(y,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:o,previousActive:s}),l&&l.method&&o&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=o,e._nextMethod.doTransition=a):(e._nextMethod={step:l,doCallback:o,doTransition:a},e._nextMethodRaf=window.requestAnimationFrame((function(){var r=e._nextMethod.step;r.method&&(r.execute&&i.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)}))))}function T(t,e,r){if(!e._context.staticPlot){var i=r.node(),a=n.select(e);t.on("mousedown",l),t.on("touchstart",l)}function s(){return r.data()[0]}function l(){var t=s();e.emit("plotly_sliderstart",{slider:t});var l=r.select("."+u.gripRectClass);n.event.stopPropagation(),n.event.preventDefault(),l.call(o.fill,t.activebgcolor);var c=E(t,n.mouse(i)[0]);function d(){var t=s(),o=E(t,n.mouse(i)[0]);k(e,r,t,o,!1)}function h(){var t=s();t._dragging=!1,l.call(o.fill,t.bgcolor),a.on("mouseup",null),a.on("mousemove",null),a.on("touchend",null),a.on("touchmove",null),e.emit("plotly_sliderend",{slider:t,step:t.steps[t.active]})}k(e,r,t,c,!0),t._dragging=!0,a.on("mousemove",d),a.on("touchmove",d),a.on("mouseup",h),a.on("touchend",h)}}function M(t,e){var r=t.selectAll("rect."+u.tickRectClass).data(e._visibleSteps),i=e._dims;r.enter().append("rect").classed(u.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each((function(t,r){var s=r%i.labelStride==0,l=n.select(this);l.attr({height:s?e.ticklen:e.minorticklen}).call(o.fill,e.tickcolor),a.setTranslate(l,C(e,r/(e._stepCount-1))-.5*e.tickwidth,(s?u.tickOffset:u.minorTickOffset)+i.currentValueTotalHeight)}))}function S(t,e,r){for(var n=t.select("rect."+u.gripRectClass),i=0,o=0;o0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform",l(a-.5*u.gripWidth,e._dims.currentValueTotalHeight))}}function C(t,e){var r=t._dims;return r.inputAreaStart+u.stepInset+(r.inputAreaLength-2*u.stepInset)*Math.min(1,Math.max(0,e))}function E(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-u.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*u.stepInset-2*r.inputAreaStart)))}function L(t,e,r){var n=r._dims,i=s.ensureSingle(t,"rect",u.railTouchRectClass,(function(n){n.call(T,e,t,r).style("pointer-events","all")}));i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,u.tickOffset+r.ticklen+n.labelHeight)}).call(o.fill,r.bgcolor).attr("opacity",0),a.setTranslate(i,0,n.currentValueTotalHeight)}function z(t,e){var r=e._dims,n=r.inputAreaLength-2*u.railInset,i=s.ensureSingle(t,"rect",u.railRectClass);i.attr({width:n,height:u.railWidth,rx:u.railRadius,ry:u.railRadius,"shape-rendering":"crispEdges"}).call(o.stroke,e.bordercolor).call(o.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),a.setTranslate(i,u.railInset,.5*(r.inputAreaWidth-u.railWidth)+r.currentValueTotalHeight)}t.exports=function(t){var e=t._context.staticPlot,r=t._fullLayout,o=function(t,e){for(var r=t[u.name],n=[],i=0;i0?[0]:[]);function l(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,g(e))}if(s.enter().append("g").classed(u.containerClassName,!0).style("cursor",e?null:"ew-resize"),s.exit().each((function(){n.select(this).selectAll("g."+u.groupClassName).each(l)})).remove(),0!==o.length){var c=s.selectAll("g."+u.groupClassName).data(o,v);c.enter().append("g").classed(u.groupClassName,!0),c.exit().each(l).remove();for(var d=0;d{"use strict";var n=r(92911);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(8421),supplyLayoutDefaults:r(60626),draw:r(23350)}},6883:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=r(51137),a=r(25059),s=r(12822),l=s.strTranslate,c=r(40666),d=r(17499),u=r(80394),h=r(11891),p=r(89701).OPPOSITE_SIDE,f=/ [XY][0-9]* /;t.exports={draw:function(t,e,r){var m,g=t._fullLayout,v=r.propContainer,b=r.propName,y=r.placeholder,x=r.traceIndex,w=r.avoid||{},_=r.attributes,k=r.transform,A=r.containerGroup,T=1,M=v.title,S=(M&&M.text?M.text:"").trim(),C=!1,E=M&&M.font?M.font:{},L=E.family,z=E.size,O=E.color,D=E.weight,I=E.style,F=E.variant,R=E.textcase,P=E.lineposition,j=E.shadow,N=!!r.subtitlePropName,B=r.subtitlePlaceholder,U=(v.title||{}).subtitle||{text:"",font:{}},G=U.text.trim(),V=!1,H=1,W=U.font,q=W.family,Y=W.size,Z=W.color,$=W.weight,X=W.style,J=W.variant,K=W.textcase,Q=W.lineposition,tt=W.shadow;"title.text"===b?m="titleText":-1!==b.indexOf("axis")?m="axisTitleText":b.indexOf(!0)&&(m="colorbarTitleText");var et=t._context.edits[m];function rt(t,e){return void 0!==t&&void 0!==e&&t.replace(f," % ")===e.replace(f," % ")}""===S?T=0:rt(S,y)&&(et||(S=""),T=.2,C=!0),N&&(""===G?H=0:rt(G,B)&&(et||(G=""),H=.2,V=!0)),r._meta?S=s.templateString(S,r._meta):g._meta&&(S=s.templateString(S,g._meta));var nt,it=S||G||et;A||(A=s.ensureSingle(g._infolayer,"g","g-"+e),nt=g._hColorbarMoveTitle);var ot=A.selectAll("text."+e).data(it?[0]:[]);ot.enter().append("text"),ot.text(S).attr("class",e),ot.exit().remove();var at=null,st=e+"-subtitle",lt=G||et;if(N&<&&((at=A.selectAll("text."+st).data(lt?[0]:[])).enter().append("text"),at.text(G).attr("class",st),at.exit().remove()),!it)return A;function ct(t,e){s.syncOrAsync([dt,ut],{title:t,subtitle:e})}function dt(r){var i,a=r.title,h=r.subtitle;if(!k&&nt&&(k={}),k?(i="",k.rotate&&(i+="rotate("+[k.rotate,_.x,_.y]+")"),(k.offset||nt)&&(i+=l(0,(k.offset||0)-(nt||0)))):i=null,a.attr("transform",i),a.style("opacity",T*d.opacity(O)).call(c.font,{color:d.rgb(O),size:n.round(z,2),family:L,weight:D,style:I,variant:F,textcase:R,shadow:j,lineposition:P}).attr(_).call(u.convertToTspans,t,(function(t){if(t){var e=n.select(t.node().parentNode).select("."+st);if(!e.empty()){var r=t.node().getBBox();if(r.height){var i=r.y+r.height+1.6*Y;e.attr("y",i)}}}})),h){var p=A.select("."+e+"-math-group"),f=a.node().getBBox(),m=p.node()?p.node().getBBox():void 0,g=m?m.y+m.height+1.6*Y:f.y+f.height+1.6*Y,v=s.extendFlat({},_,{y:g});h.attr("transform",i),h.style("opacity",H*d.opacity(Z)).call(c.font,{color:d.rgb(Z),size:n.round(Y,2),family:q,weight:$,style:X,variant:J,textcase:K,shadow:tt,lineposition:Q}).attr(v).call(u.convertToTspans,t)}return o.previousPromises(t)}function ut(e){var r=e.title,o=n.select(r.node().parentNode);if(w&&w.selection&&w.side&&S){o.attr("transform",null);var a=p[w.side],d="left"===w.side||"top"===w.side?-1:1,u=i(w.pad)?w.pad:2,h=c.bBox(o.node()),f={t:0,b:0,l:0,r:0},m=t._fullLayout._reservedMargin;for(var b in m)for(var y in m[b]){var x=m[b][y];f[y]=Math.max(f[y],x)}var _={left:f.l,top:f.t,right:g.width-f.r,bottom:g.height-f.b},k=w.maxShift||d*(_[w.side]-h[w.side]),A=0;if(k<0)A=k;else{var T=w.offsetLeft||0,M=w.offsetTop||0;h.left-=T,h.right-=T,h.top-=M,h.bottom-=M,w.selection.each((function(){var t=c.bBox(this);s.bBoxIntersect(h,t,u)&&(A=Math.max(A,d*(t[w.side]-h[a])+u))})),A=Math.min(k,A),v._titleScoot=Math.abs(A)}if(A>0||k<0){var C={left:[-A,0],right:[A,0],top:[0,-A],bottom:[0,A]}[w.side];o.attr("transform",l(C[0],C[1]))}}}function ht(t,e){t.text(e).on("mouseover.opacity",(function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)}))}if(ot.call(ct,at),et&&(S?ot.on(".opacity",null):(ht(ot,y),C=!0),ot.call(u.makeEditable,{gd:t}).on("edit",(function(e){void 0!==x?a.call("_guiRestyle",t,b,e,x):a.call("_guiRelayout",t,b,e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(ct)})).on("input",(function(t){this.text(t||" ").call(u.positionText,_.x,_.y)})),N)){if(N&&!S){var pt=ot.node().getBBox(),ft=pt.y+pt.height+1.6*Y;at.attr("y",ft)}G?at.on(".opacity",null):(ht(at,B),V=!0),at.call(u.makeEditable,{gd:t}).on("edit",(function(e){a.call("_guiRelayout",t,"title.subtitle.text",e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(ct)})).on("input",(function(t){this.text(t||" ").call(u.positionText,at.attr("x"),at.attr("y"))}))}return ot.classed("js-placeholder",C),at&&at.classed("js-placeholder",V),A},SUBTITLE_PADDING_EM:1.6,SUBTITLE_PADDING_MATHJAX_EM:1.6}},40658:(t,e,r)=>{"use strict";var n=r(75058),i=r(84226),o=r(98260).extendFlat,a=r(62309).overrideAll,s=r(85538),l=r(46121).templatedArray,c=l("button",{visible:{valType:"boolean",description:"Determines whether or not this button is visible."},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called on click.","If the `skip` method is used, the API updatemenu will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","updatemenu events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on click."].join(" ")},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets a 2nd set of `args`,","these arguments values are passed to the Plotly","method set in `method` when clicking this button while in the active state.","Use this to create toggle buttons."].join(" ")},label:{valType:"string",dflt:"",description:"Sets the text label to appear on the button."},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_buttonclicked` method and executing the API command manually without losing","the benefit of the updatemenu automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}});t.exports=a(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean",description:["Determines whether or not the update menu is visible."].join(" ")},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown",description:["Determines whether the buttons are accessible via a dropdown menu","or whether the buttons are stacked horizontally or vertically"].join(" ")},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down",description:["Determines the direction in which the buttons are laid out, whether","in a dropdown menu or a row/column of buttons. For `left` and `up`,","the buttons will still appear in left-to-right or top-to-bottom order","respectively."].join(" ")},active:{valType:"integer",min:-1,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},showactive:{valType:"boolean",dflt:!0,description:"Highlights active dropdown item or active button if true."},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05,description:"Sets the x position (in normalized coordinates) of the update menu."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right",description:["Sets the update menu's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:1,description:"Sets the y position (in normalized coordinates) of the update menu."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the update menu's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},pad:o(s({editType:"arraydraw"}),{description:"Sets the padding around the buttons or dropdown menu."}),font:n({description:"Sets the font of the update menu button text."}),bgcolor:{valType:"color",description:"Sets the background color of the update menu buttons."},bordercolor:{valType:"color",dflt:i.borderLine,description:"Sets the color of the border enclosing the update menu."},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw",description:"Sets the width (in px) of the border enclosing the update menu."}}),"arraydraw","from-root")},13518:t=>{"use strict";t.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},42757:(t,e,r)=>{"use strict";var n=r(12822),i=r(35677),o=r(40658),a=r(13518).name,s=o.buttons;function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}a("visible",i(t,e,{name:"buttons",handleItemDefaults:c}).length>0)&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),n.noneOrAll(t,e,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),n.coerceFont(a,"font",r.font),a("bgcolor",r.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function c(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}t.exports=function(t,e){i(t,e,{name:a,handleItemDefaults:l})}},86925:(t,e,r)=>{"use strict";var n=r(27941),i=r(51137),o=r(17499),a=r(40666),s=r(12822),l=r(80394),c=r(46121).arrayEditor,d=r(89701).LINE_SPACING,u=r(13518),h=r(90633);function p(t){return t._index}function f(t,e){return+t.attr(u.menuIndexAttrName)===e._index}function m(t,e,r,n,i,o,a,s){e.active=a,c(t.layout,u.name,e).applyUpdate("active",a),"buttons"===e.type?v(t,n,null,null,e):"dropdown"===e.type&&(i.attr(u.menuIndexAttrName,"-1"),g(t,n,i,o,e),s||v(t,n,i,o,e))}function g(t,e,r,n,i){var o=s.ensureSingle(e,"g",u.headerClassName,(function(t){t.style("pointer-events","all")})),l=i._dims,c=i.active,d=i.buttons[c]||u.blankHeaderOpts,h={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};o.call(b,i,d,t).call(M,i,h,p),s.ensureSingle(e,"text",u.headerArrowClassName,(function(t){t.attr("text-anchor","end").call(a.font,i.font).text(u.arrowSymbol[i.direction])})).attr({x:l.headerWidth-u.arrowOffsetX+i.pad.l,y:l.headerHeight/2+u.textOffsetY+i.pad.t}),o.on("click",(function(){r.call(S,String(f(r,i)?-1:i._index)),v(t,e,r,n,i)})),o.on("mouseover",(function(){o.call(_)})),o.on("mouseout",(function(){o.call(k,i)})),a.setTranslate(e,l.lx,l.ly)}function v(t,e,r,o,a){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(u.menuIndexAttrName)}(r)&&"buttons"!==a.type?[]:a.buttons,c="dropdown"===a.type?u.dropdownButtonClassName:u.buttonClassName,d=r.selectAll("g."+c).data(s.filterVisible(l)),h=d.enter().append("g").classed(c,!0),p=d.exit();"dropdown"===a.type?(h.attr("opacity","0").transition().attr("opacity","1"),p.transition().attr("opacity","0").remove()):p.remove();var f=0,g=0,v=a._dims,y=-1!==["up","down"].indexOf(a.direction);"dropdown"===a.type&&(y?g=v.headerHeight+u.gapButtonHeader:f=v.headerWidth+u.gapButtonHeader),"dropdown"===a.type&&"up"===a.direction&&(g=-u.gapButtonHeader+u.gapButton-v.openHeight),"dropdown"===a.type&&"left"===a.direction&&(f=-u.gapButtonHeader+u.gapButton-v.openWidth);var x={x:v.lx+f+a.pad.l,y:v.ly+g+a.pad.t,yPad:u.gapButton,xPad:u.gapButton,index:0},A={l:x.x+a.borderwidth,t:x.y+a.borderwidth};d.each((function(s,l){var c=n.select(this);c.call(b,a,s,t).call(M,a,x),c.on("click",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&a.active===l?(m(t,a,0,e,r,o,-1),i.executeAPICommand(t,s.method,s.args2)):(m(t,a,0,e,r,o,l),i.executeAPICommand(t,s.method,s.args))),t.emit("plotly_buttonclicked",{menu:a,button:s,active:a.active}))})),c.on("mouseover",(function(){c.call(_)})),c.on("mouseout",(function(){c.call(k,a),d.call(w,a)}))})),d.call(w,a),y?(A.w=Math.max(v.openWidth,v.headerWidth),A.h=x.y-A.t):(A.w=x.x-A.l,A.h=Math.max(v.openHeight,v.headerHeight)),A.direction=a.direction,o&&(d.size()?function(t,e,r,n,i,o){var a,s,l,c=i.direction,d="up"===c||"down"===c,h=i._dims,p=i.active;if(d)for(s=0,l=0;l0?[0]:[]);if(a.enter().append("g").classed(u.containerClassName,!0).style("cursor","pointer"),a.exit().each((function(){n.select(this).selectAll("g."+u.headerGroupClassName).each(o)})).remove(),0!==r.length){var l=a.selectAll("g."+u.headerGroupClassName).data(r,p);l.enter().append("g").classed(u.headerGroupClassName,!0);for(var c=s.ensureSingle(a,"g",u.dropdownButtonGroupClassName,(function(t){t.style("pointer-events","all")})),d=0;d{"use strict";var n=r(13518);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(40658),supplyLayoutDefaults:r(42757),draw:r(86925)}},90633:(t,e,r)=>{"use strict";t.exports=s;var n=r(27941),i=r(17499),o=r(40666),a=r(12822);function s(t,e,r){this.gd=t,this.container=e,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}s.barWidth=2,s.barLength=20,s.barRadius=2,s.barPad=1,s.barColor="#808BA4",s.prototype.enable=function(t,e,r){var a=this.gd._fullLayout,l=a.width,c=a.height;this.position=t;var d,u,h,p,f=this.position.l,m=this.position.w,g=this.position.t,v=this.position.h,b=this.position.direction,y="down"===b,x="left"===b,w="up"===b,_=m,k=v;y||x||"right"===b||w||(this.position.direction="down",y=!0),y||w?(u=(d=f)+_,y?(h=g,k=(p=Math.min(h+k,c))-h):k=(p=g+k)-(h=Math.max(p-k,0))):(p=(h=g)+k,x?_=(u=f+_)-(d=Math.max(u-_,0)):(d=f,_=(u=Math.min(d+_,l))-d)),this._box={l:d,t:h,w:_,h:k};var A=m>_,T=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=f,C=g+v;C+M>c&&(C=c-M);var E=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);E.exit().on(".drag",null).remove(),E.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),A?(this.hbar=E.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:C,width:T,height:M}),this._hbarXMin=S+T/2,this._hbarTranslateMax=_-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=v>k,z=s.barWidth+2*s.barPad,O=s.barLength+2*s.barPad,D=f+m,I=g;D+z>l&&(D=l-z);var F=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);F.exit().on(".drag",null).remove(),F.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),L?(this.vbar=F.attr({rx:s.barRadius,ry:s.barRadius,x:D,y:I,width:z,height:O}),this._vbarYMin=I+O/2,this._vbarTranslateMax=k-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,P=d-.5,j=L?u+z+.5:u+.5,N=h-.5,B=A?p+M+.5:p+.5,U=a._topdefs.selectAll("#"+R).data(A||L?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",R).append("rect"),A||L?(this._clipRect=U.select("rect").attr({x:Math.floor(P),y:Math.floor(N),width:Math.ceil(j)-Math.floor(P),height:Math.ceil(B)-Math.floor(N)}),this.container.call(o.setClipUrl,R,this.gd),this.bg.attr({x:f,y:g,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),A||L){var G=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(G);var V=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(V),L&&this.vbar.on(".drag",null).call(V)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,i=r+this._hbarTranslateMax;t=(a.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var o=e+this._vbarYMin,s=o+this._vbarTranslateMax;e=(a.constrain(n.event.y,o,s)-o)/(s-o)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=a.constrain(t||0,0,r),e=a.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(o.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(o.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(o.setTranslate,t,e+s*this._vbarTranslateMax)}}},89701:t=>{"use strict";t.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},53644:t=>{"use strict";t.exports={axisRefDescription:function(t,e,r){return["If set to a",t,"axis id (e.g. *"+t+"* or","*"+t+"2*), the `"+t+"` position refers to a",t,"coordinate. If set to *paper*, the `"+t+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+r+"). If set to a",t,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",e,"of the domain of that axis: e.g.,","*"+t+"2 domain* refers to the domain of the second",t," axis and a",t,"position of 0.5 refers to the","point between the",e,"and the",r,"of the domain of the","second",t,"axis."].join(" ")}}},77201:t=>{"use strict";t.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},55697:t=>{"use strict";t.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},24134:t=>{"use strict";t.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},11891:t=>{"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},32994:t=>{"use strict";t.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},25853:(t,e)=>{"use strict";e.xmlns="http://www.w3.org/2000/xmlns/",e.svg="http://www.w3.org/2000/svg",e.xlink="http://www.w3.org/1999/xlink",e.svgAttrs={xmlns:e.svg,"xmlns:xlink":e.xlink}},7623:(t,e,r)=>{"use strict";e.version=r(88566).version,r(60613),r(1146);for(var n=r(25059),i=e.register=n.register,o=r(41103),a=Object.keys(o),s=0;s{"use strict";t.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:["",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},66379:(t,e)=>{"use strict";e.isLeftAnchor=function(t){return"left"===t.xanchor||"auto"===t.xanchor&&t.x<=1/3},e.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},e.isRightAnchor=function(t){return"right"===t.xanchor||"auto"===t.xanchor&&t.x>=2/3},e.isTopAnchor=function(t){return"top"===t.yanchor||"auto"===t.yanchor&&t.y>=2/3},e.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3},e.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3}},59804:(t,e,r)=>{"use strict";var n=r(31918),i=n.mod,o=n.modHalf,a=Math.PI,s=2*a;function l(t){return Math.abs(t[1]-t[0])>s-1e-14}function c(t,e){return o(e-t,s)}function d(t,e){if(l(e))return!0;var r,n;e[0](n=i(n,s))&&(n+=s);var o=i(t,s),a=o+s;return o>=r&&o<=n||a>=r&&a<=n}function u(t,e,r,n,i,o,c){i=i||0,o=o||0;var d,u,h,p,f,m=l([r,n]);function g(t,e){return[t*Math.cos(e)+i,o-t*Math.sin(e)]}m?(d=0,u=a,h=s):r=i&&t<=o);var i,o},pathArc:function(t,e,r,n,i){return u(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return u(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,o){return u(t,e,r,n,i,o,1)}}},98507:(t,e,r)=>{"use strict";var n=r(44514).decode,i=r(12517),o=Array.isArray,a=ArrayBuffer,s=DataView;function l(t){return a.isView(t)&&!(t instanceof s)}function c(t){return o(t)||l(t)}e.isTypedArray=l,e.isArrayOrTypedArray=c,e.isArray1D=function(t){return!c(t[0])},e.ensureArray=function(t,e){return o(t)||(t=[]),t.length=e,t};var d={u1c:"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,i1:"undefined"==typeof Int8Array?void 0:Int8Array,u1:"undefined"==typeof Uint8Array?void 0:Uint8Array,i2:"undefined"==typeof Int16Array?void 0:Int16Array,u2:"undefined"==typeof Uint16Array?void 0:Uint16Array,i4:"undefined"==typeof Int32Array?void 0:Int32Array,u4:"undefined"==typeof Uint32Array?void 0:Uint32Array,f4:"undefined"==typeof Float32Array?void 0:Float32Array,f8:"undefined"==typeof Float64Array?void 0:Float64Array};function u(t){return t.constructor===ArrayBuffer}function h(t,e,r){if(c(t)){if(c(t[0])){for(var n=r,i=0;i{"use strict";var n=r(7370),i=r(32994).BADNUM,o=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;t.exports=function(t){return"string"==typeof t&&(t=t.replace(o,"")),n(t)?Number(t):i}},86748:t=>{"use strict";t.exports=function(t){var e=t._fullLayout;e._glcanvas&&e._glcanvas.size()&&e._glcanvas.each((function(t){t.regl&&t.regl.clear({color:!0,depth:!0})}))}},11704:t=>{"use strict";t.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}},5365:(t,e,r)=>{"use strict";var n=r(7370),i=r(18106),o=r(98260).extendFlat,a=r(3520),s=r(78920),l=r(17499),c=r(11891).DESELECTDIM,d=r(91355),u=r(46233).counter,h=r(31918).modHalf,p=r(98507).isArrayOrTypedArray,f=r(98507).isTypedArraySpec,m=r(98507).decodeTypedArraySpec;function g(t,r){var n=e.valObjectMeta[r.valType];if(r.arrayOk&&p(t))return!0;if(n.validateFunction)return n.validateFunction(t,r);var i={},o=i,a={set:function(t){o=t}};return n.coerceFunction(t,a,i,r),o!==i}e.valObjectMeta={data_array:{description:["An {array} of data.","The value must represent an {array} or it will be ignored,","but this array can be provided in several forms:","(1) a regular {array} object","(2) a typed array (e.g. Float32Array)","(3) an object with keys dtype, bdata, and optionally shape.","In this 3rd form, dtype is one of","*f8*, *f4*.","*i4*, *u4*,","*i2*, *u2*,","*i1*, *u1* or *u1c* for Uint8ClampedArray.","In addition to shorthand `dtype` above one could also use the following forms:","*float64*, *float32*,","*int32*, *uint32*,","*int16*, *uint16*,","*int8*, *uint8* or *uint8c* for Uint8ClampedArray.","`bdata` is either a base64-encoded string or the ArrayBuffer of","an integer or float typed array.","For either multi-dimensional arrays you must also","provide its dimensions separated by comma via `shape`.","For example using `dtype`: *f4* and `shape`: *5,100* you can","declare a 2-D array that has 5 rows and 100 columns","containing float32 values i.e. 4 bits per value.","`shape` is optional for one dimensional arrays."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(t,e,r){e.set(p(t)?t:f(t)?m(t):r)}},enumerated:{description:["Enumerated value type. The available values are listed","in `values`."].join(" "),requiredOpts:["values"],otherOpts:["dflt","coerceNumber","arrayOk"],coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),-1===n.values.indexOf(t)?e.set(r):e.set(t)},validateFunction:function(t,e){e.coerceNumber&&(t=+t);for(var r=e.values,n=0;ni.max?e.set(r):e.set(+t)}},integer:{description:["An integer or an integer inside a string.","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk","extras"],coerceFunction:function(t,e,r,i){-1===(i.extras||[]).indexOf(t)?(f(t)&&(t=m(t)),t%1||!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)):e.set(t)}},string:{description:["A string value.","Numbers are converted to strings except for attributes with","`strict` set to true."].join(" "),requiredOpts:[],otherOpts:["dflt","noBlank","strict","arrayOk","values"],coerceFunction:function(t,e,r,n){if("string"!=typeof t){var i="number"==typeof t;!0!==n.strict&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{description:["A string describing color.","Supported formats:","- hex (e.g. '#d3d3d3')","- rgb (e.g. 'rgb(255, 0, 0)')","- rgba (e.g. 'rgb(255, 0, 0, 0.5)')","- hsl (e.g. 'hsl(0, 100%, 50%)')","- hsv (e.g. 'hsv(0, 100%, 100%)')","- named colors (full list: http://www.w3.org/TR/css3-color/#svg-color)"].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(t,e,r){f(t)&&(t=m(t)),i(t).isValid()?e.set(t):e.set(r)}},colorlist:{description:["A list of colors.","Must be an {array} containing valid colors."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every((function(t){return i(t).isValid()}))?e.set(t):e.set(r)}},colorscale:{description:["A Plotly colorscale either picked by a name:","(any of",Object.keys(s.scales).join(", "),")","customized as an {array} of 2-element {arrays} where","the first element is the normalized color level value","(starting at *0* and ending at *1*),","and the second item is a valid color string."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(t,e,r){e.set(s.get(t,r))}},angle:{description:["A number (in degree) between -180 and 180."].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(t,e,r){f(t)&&(t=m(t)),"auto"===t?e.set("auto"):n(t)?e.set(h(+t,360)):e.set(r)}},subplotid:{description:["An id string of a subplot type (given by dflt), optionally","followed by an integer >1. e.g. if dflt='geo', we can have","'geo', 'geo2', 'geo3', ..."].join(" "),requiredOpts:["dflt"],otherOpts:["regex"],coerceFunction:function(t,e,r,n){var i=n.regex||u(r);"string"==typeof t&&i.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||"string"==typeof t&&!!u(r).test(t)}},flaglist:{description:["A string representing a combination of flags","(order does not matter here).","Combine any of the available `flags` with *+*.","(e.g. ('lines+markers')).","Values in `extras` cannot be combined."].join(" "),requiredOpts:["flags"],otherOpts:["dflt","extras","arrayOk"],coerceFunction:function(t,e,r,n){if(-1===(n.extras||[]).indexOf(t))if("string"==typeof t){for(var i=t.split("+"),o=0;o{"use strict";var n,i,o=r(79969).DC,a=r(7370),s=r(64347),l=r(31918).mod,c=r(32994),d=c.BADNUM,u=c.ONEDAY,h=c.ONEHOUR,p=c.ONEMIN,f=c.ONESEC,m=c.EPOCHJD,g=r(25059),v=r(79969).aL,b=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,y=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,x=(new Date).getFullYear()-70;function w(t){return t&&g.componentsRegistry.calendars&&"string"==typeof t&&"gregorian"!==t}function _(t,e){return String(t+Math.pow(10,e)).substr(1)}e.dateTick0=function(t,r){var n=function(t,e){return w(t)?e?g.getComponentMethod("calendars","CANONICAL_SUNDAY")[t]:g.getComponentMethod("calendars","CANONICAL_TICK")[t]:e?"2000-01-02":"2000-01-01"}(t,!!r);if(r<2)return n;var i=e.dateTime2ms(n,t);return i+=u*(r-1),e.ms2DateTime(i,0,t)},e.dfltRange=function(t){return w(t)?g.getComponentMethod("calendars","DFLTRANGE")[t]:["2000-01-01","2001-01-01"]},e.isJSDate=function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.getTime},e.dateTime2ms=function(t,r){if(e.isJSDate(t)){var o=t.getTimezoneOffset()*p,a=(t.getUTCMinutes()-t.getMinutes())*p+(t.getUTCSeconds()-t.getSeconds())*f+(t.getUTCMilliseconds()-t.getMilliseconds());if(a){var s=3*p;o=o-s/2+l(a-o+s/2,s)}return(t=Number(t)-o)>=n&&t<=i?t:d}if("string"!=typeof t&&"number"!=typeof t)return d;t=String(t);var c=w(r),v=t.charAt(0);!c||"G"!==v&&"g"!==v||(t=t.substr(1),r="");var _=c&&"chinese"===r.substr(0,7),k=t.match(_?y:b);if(!k)return d;var A=k[1],T=k[3]||"1",M=Number(k[5]||1),S=Number(k[7]||0),C=Number(k[9]||0),E=Number(k[11]||0);if(c){if(2===A.length)return d;var L;A=Number(A);try{var z=g.getComponentMethod("calendars","getCal")(r);if(_){var O="i"===T.charAt(T.length-1);T=parseInt(T,10),L=z.newDate(A,z.toMonthIndex(A,T,O),M)}else L=z.newDate(A,Number(T),M)}catch(t){return d}return L?(L.toJD()-m)*u+S*h+C*p+E*f:d}A=2===A.length?(Number(A)+2e3-x)%100+x:Number(A),T-=1;var D=new Date(Date.UTC(2e3,T,M,S,C));return D.setUTCFullYear(A),D.getUTCMonth()!==T||D.getUTCDate()!==M?d:D.getTime()+E*f},n=e.MIN_MS=e.dateTime2ms("-9999"),i=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(t,r){return e.dateTime2ms(t,r)!==d};var k=90*u,A=3*h,T=5*p;function M(t,e,r,n,i){if((e||r||n||i)&&(t+=" "+_(e,2)+":"+_(r,2),(n||i)&&(t+=":"+_(n,2),i))){for(var o=4;i%10==0;)o-=1,i/=10;t+="."+_(i,o)}return t}e.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=n&&t<=i))return d;e||(e=0);var o,a,s,c,b,y,x=Math.floor(10*l(t+.05,1)),_=Math.round(t-x/10);if(w(r)){var S=Math.floor(_/u)+m,C=Math.floor(l(t,u));try{o=g.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(t){o=v("G%Y-%m-%d")(new Date(_))}if("-"===o.charAt(0))for(;o.length<11;)o="-0"+o.substr(1);else for(;o.length<10;)o="0"+o;a=e=n+u&&t<=i-u))return d;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return M(o("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},e.cleanDate=function(t,r,n){if(t===d)return r;if(e.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(w(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",t),r;if(!(t=e.ms2DateTimeLocal(+t))&&void 0!==r)return r}else if(!e.isDateTime(t,n))return s.error("unrecognized date",t),r;return t};var S=/%\d?f/g,C=/%h/g,E={1:"1",2:"1",3:"2",4:"2"};function L(t,e,r,n){t=t.replace(S,(function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(e+.05));if(t=t.replace(C,(function(){return E[r("%q")(i)]})),w(n))try{t=g.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(i)}var z=[59,59.9,59.99,59.999,59.9999];e.formatDate=function(t,e,r,n,i,o){if(i=w(i)&&i,!e)if("y"===r)e=o.year;else if("m"===r)e=o.month;else{if("d"!==r)return function(t,e){var r=l(t+.05,u),n=_(Math.floor(r/h),2)+":"+_(l(Math.floor(r/p),60),2);if("M"!==e){a(e)||(e=0);var i=(100+Math.min(l(t/f,60),z[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(t,r)+"\n"+L(o.dayMonthYear,t,n,i);e=o.dayMonth+"\n"+o.year}return L(e,t,n,i)};var O=3*u;e.incrementMonth=function(t,e,r){r=w(r)&&r;var n=l(t,u);if(t=Math.round(t-n),r)try{var i=Math.round(t/u)+m,o=g.getComponentMethod("calendars","getCal")(r),a=o.fromJD(i);return e%12?o.add(a,e,"m"):o.add(a,e/12,"y"),(a.toJD()-m)*u+n}catch(e){s.error("invalid ms "+t+" in calendar "+r)}var c=new Date(t+O);return c.setUTCMonth(c.getUTCMonth()+e)+n-O},e.findExactDates=function(t,e){for(var r,n,i=0,o=0,s=0,l=0,c=w(e)&&g.getComponentMethod("calendars","getCal")(e),d=0;d{"use strict";var n=r(27941),i=r(64347),o=r(75717),a=r(79538);function s(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function l(t,e,r){var n="plotly.js-style-"+t,o=document.getElementById(n);o||((o=document.createElement("style")).setAttribute("id",n),o.appendChild(document.createTextNode("")),document.head.appendChild(o));var a=o.sheet;a.insertRule?a.insertRule(e+"{"+r+"}",0):a.addRule?a.addRule(e,r,0):i.warn("addStyleRule failed")}function c(t){var e=window.getComputedStyle(t,null),r=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform");return"none"===r?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map((function(t){return+t}))}function d(t){for(var e=[];u(t);)e.push(t),t=t.parentNode,"function"==typeof ShadowRoot&&t instanceof ShadowRoot&&(t=t.host);return e}function u(t){return t&&(t instanceof Element||t instanceof HTMLElement)}t.exports={getGraphDiv:function(t){var e;if("string"==typeof t){if(null===(e=document.getElementById(t)))throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null==t)throw new Error("DOM element provided is null or undefined");return t},isPlotDiv:function(t){var e=n.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")},removeElement:s,addStyleRule:function(t,e){l("global",t,e)},addRelatedStyleRule:l,deleteRelatedStyleRule:function(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&s(r)},getFullTransformMatrix:function(t){var e=d(t),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.forEach((function(t){var e=c(t);if(e){var n=o.convertCssMatrix(e);r=a.multiply(r,r,n)}})),r},getElementTransformMatrix:c,getElementAndAncestors:d,equalDomRects:function(t,e){return t&&e&&t.top===e.top&&t.left===e.left&&t.right===e.right&&t.bottom===e.bottom}}},16677:(t,e,r)=>{"use strict";var n=r(86626).EventEmitter,i={init:function(t){if(t._ev instanceof n)return t;var e=new n,r=new n;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(n,i){"undefined"!=typeof jQuery&&jQuery(t).trigger(n,i),e.emit(n,i),r.emit(n,i)},t},triggerHandler:function(t,e,r){var n,i;"undefined"!=typeof jQuery&&(n=jQuery(t).triggerHandler(e,r));var o=t._ev;if(!o)return n;var a,s=o._events[e];if(!s)return n;function l(t){return t.listener?(o.removeListener(e,t.listener),t.fired?void 0:(t.fired=!0,t.listener.apply(o,[r]))):t.apply(o,[r])}for(s=Array.isArray(s)?s:[s],a=0;a{"use strict";var n=r(12517),i=Array.isArray;function o(t,e,r,a){var s,l,c,d,u,h,p,f=t[0],m=t.length;if(2===m&&i(f)&&i(t[1])&&0===f.length){if(p=function(t,e){var r,n;for(r=0;r{"use strict";t.exports=function(t){for(var e={},r=[],n=0,i=0;i{"use strict";function e(t){return!0===t.visible}function r(t){var e=t[0].trace;return!0===e.visible&&0!==e._length}t.exports=function(t){for(var n,i=(n=t,Array.isArray(n)&&Array.isArray(n[0])&&n[0][0]&&n[0][0].trace?r:e),o=[],a=0;a{"use strict";var n,i,o,a=r(31918).mod;function s(t,e,r,n,i,o,a,s){var l=r-t,c=i-t,d=a-i,u=n-e,h=o-e,p=s-o,f=l*p-d*u;if(0===f)return null;var m=(c*p-d*h)/f,g=(c*u-l*h)/f;return g<0||g>1||m<0||m>1?null:{x:t+l*m,y:e+u*m}}function l(t,e,r,n,i){var o=n*t+i*e;if(o<0)return n*n+i*i;if(o>r){var a=n-t,s=i-e;return a*a+s*s}var l=n*e-i*t;return l*l/r}e.segmentsIntersect=s,e.segmentDistance=function(t,e,r,n,i,o,a,c){if(s(t,e,r,n,i,o,a,c))return 0;var d=r-t,u=n-e,h=a-i,p=c-o,f=d*d+u*u,m=h*h+p*p,g=Math.min(l(d,u,f,i-t,o-e),l(d,u,f,a-t,c-e),l(h,p,m,t-i,e-o),l(h,p,m,r-i,n-o));return Math.sqrt(g)},e.getTextLocation=function(t,e,r,s){if(t===i&&s===o||(n={},i=t,o=s),n[r])return n[r];var l=t.getPointAtLength(a(r-s/2,e)),c=t.getPointAtLength(a(r+s/2,e)),d=Math.atan((c.y-l.y)/(c.x-l.x)),u=t.getPointAtLength(a(r,e)),h={x:(4*u.x+l.x+c.x)/6,y:(4*u.y+l.y+c.y)/6,theta:d};return n[r]=h,h},e.clearLocationCache=function(){i=null},e.getVisibleSegment=function(t,e,r){var n,i,o=e.left,a=e.right,s=e.top,l=e.bottom,c=0,d=t.getTotalLength(),u=d;function h(e){var r=t.getPointAtLength(e);0===e?n=r:e===d&&(i=r);var c=r.xa?r.x-a:0,u=r.yl?r.y-l:0;return Math.sqrt(c*c+u*u)}for(var p=h(c);p;){if((c+=p+r)>u)return;p=h(c)}for(p=h(u);p;){if(c>(u-=p+r))return;p=h(u)}return{min:c,max:u,len:u-c,total:d,isClosed:0===c&&u===d&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},e.findPointOnPath=function(t,e,r,n){for(var i,o,a,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,d=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,u=0,h=0,p=s;u0?p=i:h=i,u++}return o}},25069:(t,e,r)=>{"use strict";var n=r(7370),i=r(18106),o=r(34463),a=r(80755),s=r(84226).defaultLine,l=r(98507).isArrayOrTypedArray,c=o(s);function d(t,e){var r=t;return r[3]*=e,r}function u(t){if(n(t))return c;var e=o(t);return e.length?e:c}function h(t){return n(t)?t:1}t.exports={formatColor:function(t,e,r){var n=t.color;n&&n._inputArray&&(n=n._inputArray);var i,s,p,f,m,g=l(n),v=l(e),b=a.extractOpts(t),y=[];if(i=void 0!==b.colorscale?a.makeColorScaleFuncFromTrace(t):u,s=g?function(t,e){return void 0===t[e]?c:o(i(t[e]))}:u,p=v?function(t,e){return void 0===t[e]?1:h(t[e])}:h,g||v)for(var x=0;x{"use strict";t.exports=function(t){return t}},98803:t=>{"use strict";t.exports=function(t,e){if(!e)return t;var r=1/Math.abs(e),n=r>1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var o=String(e).length;if(i>=String(t).length+o){var a=parseFloat(n).toPrecision(12);-1===a.indexOf("e+")&&(n=+a)}}return n}},12822:(t,e,r)=>{"use strict";var n=r(27941),i=r(79969).aL,o=r(31830).GP,a=r(7370),s=r(32994),l=s.FP_SAFE,c=-l,d=s.BADNUM,u=t.exports={};u.adjustFormat=function(t){return!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t)?t:"0.f"===t?"~f":/^\d%/.test(t)?"~%":/^\ds/.test(t)?"~s":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?"~"+t:t};var h={};u.warnBadFormat=function(t){var e=String(t);h[e]||(h[e]=1,u.warn('encountered bad format: "'+e+'"'))},u.noFormat=function(t){return String(t)},u.numberFormat=function(t){var e;try{e=o(u.adjustFormat(t))}catch(e){return u.warnBadFormat(t),u.noFormat}return e},u.nestedProperty=r(91355),u.keyedContainer=r(68588),u.relativeAttr=r(21904),u.isPlainObject=r(12517),u.toLogRange=r(61814),u.relinkPrivateKeys=r(45905);var p=r(98507);u.isArrayBuffer=p.isArrayBuffer,u.isTypedArray=p.isTypedArray,u.isArrayOrTypedArray=p.isArrayOrTypedArray,u.isArray1D=p.isArray1D,u.ensureArray=p.ensureArray,u.concat=p.concat,u.maxRowLength=p.maxRowLength,u.minRowLength=p.minRowLength;var f=r(31918);u.mod=f.mod,u.modHalf=f.modHalf;var m=r(5365);u.valObjectMeta=m.valObjectMeta,u.coerce=m.coerce,u.coerce2=m.coerce2,u.coerceFont=m.coerceFont,u.coercePattern=m.coercePattern,u.coerceHoverinfo=m.coerceHoverinfo,u.coerceSelectionMarkerOpacity=m.coerceSelectionMarkerOpacity,u.validate=m.validate;var g=r(41095);u.dateTime2ms=g.dateTime2ms,u.isDateTime=g.isDateTime,u.ms2DateTime=g.ms2DateTime,u.ms2DateTimeLocal=g.ms2DateTimeLocal,u.cleanDate=g.cleanDate,u.isJSDate=g.isJSDate,u.formatDate=g.formatDate,u.incrementMonth=g.incrementMonth,u.dateTick0=g.dateTick0,u.dfltRange=g.dfltRange,u.findExactDates=g.findExactDates,u.MIN_MS=g.MIN_MS,u.MAX_MS=g.MAX_MS;var v=r(45380);u.findBin=v.findBin,u.sorterAsc=v.sorterAsc,u.sorterDes=v.sorterDes,u.distinctVals=v.distinctVals,u.roundUp=v.roundUp,u.sort=v.sort,u.findIndexOfMin=v.findIndexOfMin,u.sortObjectKeys=r(54747);var b=r(6749);u.aggNums=b.aggNums,u.len=b.len,u.mean=b.mean,u.geometricMean=b.geometricMean,u.median=b.median,u.midRange=b.midRange,u.variance=b.variance,u.stdev=b.stdev,u.interp=b.interp;var y=r(75717);u.init2dArray=y.init2dArray,u.transposeRagged=y.transposeRagged,u.dot=y.dot,u.translationMatrix=y.translationMatrix,u.rotationMatrix=y.rotationMatrix,u.rotationXYMatrix=y.rotationXYMatrix,u.apply3DTransform=y.apply3DTransform,u.apply2DTransform=y.apply2DTransform,u.apply2DTransform2=y.apply2DTransform2,u.convertCssMatrix=y.convertCssMatrix,u.inverseTransformMatrix=y.inverseTransformMatrix;var x=r(59804);u.deg2rad=x.deg2rad,u.rad2deg=x.rad2deg,u.angleDelta=x.angleDelta,u.angleDist=x.angleDist,u.isFullCircle=x.isFullCircle,u.isAngleInsideSector=x.isAngleInsideSector,u.isPtInsideSector=x.isPtInsideSector,u.pathArc=x.pathArc,u.pathSector=x.pathSector,u.pathAnnulus=x.pathAnnulus;var w=r(66379);u.isLeftAnchor=w.isLeftAnchor,u.isCenterAnchor=w.isCenterAnchor,u.isRightAnchor=w.isRightAnchor,u.isTopAnchor=w.isTopAnchor,u.isMiddleAnchor=w.isMiddleAnchor,u.isBottomAnchor=w.isBottomAnchor;var _=r(8994);u.segmentsIntersect=_.segmentsIntersect,u.segmentDistance=_.segmentDistance,u.getTextLocation=_.getTextLocation,u.clearLocationCache=_.clearLocationCache,u.getVisibleSegment=_.getVisibleSegment,u.findPointOnPath=_.findPointOnPath;var k=r(98260);u.extendFlat=k.extendFlat,u.extendDeep=k.extendDeep,u.extendDeepAll=k.extendDeepAll,u.extendDeepNoArrays=k.extendDeepNoArrays;var A=r(64347);u.log=A.log,u.warn=A.warn,u.error=A.error;var T=r(46233);u.counterRegex=T.counter;var M=r(76324);u.throttle=M.throttle,u.throttleDone=M.done,u.clearThrottle=M.clear;var S=r(16822);function C(t){var e={};for(var r in t)for(var n=t[r],i=0;il||t=e)&&a(t)&&t>=0&&t%1==0},u.noop=r(51648),u.identity=r(75250),u.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},u.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},u.simpleMap=function(t,e,r,n,i){for(var o=t.length,a=new Array(o),s=0;s=Math.pow(2,r)?i>10?(u.warn("randstr failed uniqueness"),l):t(e,r,n,(i||0)+1):l},u.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},u.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,o,a=t.length,s=2*a,l=2*e-1,c=new Array(l),d=new Array(a);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=a&&(i=s-1-i),o+=t[i]*c[n];d[r]=o}return d},u.syncOrAsync=function(t,e,r){var n;function i(){return u.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},u.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},u.noneOrAll=function(t,e,r){if(t){var n,i=!1,o=!0;for(n=0;n0?e:0}))},u.fillArray=function(t,e,r,n){if(n=n||u.identity,u.isArrayOrTypedArray(t))for(var i=0;i1?i+a[1]:"";if(o&&(a.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+o+"$2");return s+l},u.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var F=/^\w*$/;u.templateString=function(t,e){var r={};return t.replace(u.TEMPLATE_STRING_REGEX,(function(t,n){var i;return F.test(n)?i=e[n]:(r[n]=r[n]||u.nestedProperty(e,n).get,i=r[n]()),u.isValidTextValue(i)?i:""}))};var R={max:10,count:0,name:"hovertemplate"};u.hovertemplateString=function(){return U.apply(R,arguments)};var P={max:10,count:0,name:"texttemplate"};u.texttemplateString=function(){return U.apply(P,arguments)};var j=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,N={max:10,count:0,name:"texttemplate",parseMultDiv:!0};u.texttemplateStringForShapes=function(){return U.apply(N,arguments)};var B=/^[:|\|]/;function U(t,e,r){var n=this,o=arguments;e||(e={});var a={};return t.replace(u.TEMPLATE_STRING_REGEX,(function(t,s,l){var c="_xother"===s||"_yother"===s,d="_xother_"===s||"_yother_"===s,h="xother_"===s||"yother_"===s,p="xother"===s||"yother"===s||c||h||d,f=s;(c||d)&&(f=f.substring(1)),(h||d)&&(f=f.substring(0,f.length-1));var m,g,v,b=null,y=null;if(n.parseMultDiv){var x=function(t){var e=t.match(j);return e?{key:e[1],op:e[2],number:Number(e[3])}:{key:t,op:null,number:null}}(f);f=x.key,b=x.op,y=x.number}if(p){if(void 0===(m=e[f]))return""}else for(v=3;v=48&&a<=57,c=s>=48&&s<=57;if(l&&(n=10*n+a-48),c&&(i=10*i+s-48),!l||!c){if(n!==i)return n-i;if(a!==s)return a-s}}return i-n};var G=2e9;u.seedPseudoRandom=function(){G=2e9},u.pseudoRandom=function(){var t=G;return G=(69069*G+1)%4294967296,Math.abs(G-t)<429496729?u.pseudoRandom():G/4294967296},u.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=u.extractOption(t,e,"htx","hovertext");if(u.isValidTextValue(i))return n(i);var o=u.extractOption(t,e,"tx","text");return u.isValidTextValue(o)?n(o):void 0},u.isValidTextValue=function(t){return t||0===t},u.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+"%",n=0;n1&&(c=1):c=0,u.strTranslate(i-c*(r+a),o-c*(n+s))+u.strScale(c)+(l?"rotate("+l+(e?"":" "+r+" "+n)+")":"")},u.setTransormAndDisplay=function(t,e){t.attr("transform",u.getTextTransform(e)),t.style("display",e.scale?null:"none")},u.ensureUniformFontSize=function(t,e){var r=u.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},u.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)},u.bigFont=function(t){return Math.round(1.2*t)};var V=u.getFirefoxVersion(),H=null!==V&&V<86;u.getPositionFromD3Event=function(){return H?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},12517:t=>{"use strict";t.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}},68588:(t,e,r)=>{"use strict";var n=r(91355),i=/^\w*$/;t.exports=function(t,e,r,o){var a,s,l;r=r||"name",o=o||"value";var c={};e&&e.length?(l=n(t,e),s=l.get()):s=t,e=e||"";var d={};if(s)for(a=0;a2)return c[e]=2|c[e],h.set(t,null);if(u){for(a=e;a{"use strict";var n=r(25059);t.exports=function(t,e){for(var r=t._context.locale,i=0;i<2;i++){for(var o=t._context.locales,a=0;a<2;a++){var s=(o[r]||{}).dictionary;if(s){var l=s[e];if(l)return l}o=n.localeRegistry}var c=r.split("-")[0];if(c===r)break;r=c}return e}},64347:(t,e,r)=>{"use strict";var n=r(58389).dfltConfig,i=r(39382),o=t.exports={};o.log=function(){var t;if(n.logging>1){var e=["LOG:"];for(t=0;t1){var r=[];for(t=0;t"),"long")}},o.warn=function(){var t;if(n.logging>0){var e=["WARN:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}},o.error=function(){var t;if(n.logging>0){var e=["ERROR:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}}},51915:(t,e,r)=>{"use strict";var n=r(27941);t.exports=function(t,e,r){var i=t.selectAll("g."+r.replace(/\s/g,".")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",r),i.order();var o=t.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(t){t[0][o]=n.select(this)})),i}},75717:(t,e,r)=>{"use strict";var n=r(79538);e.init2dArray=function(t,e){for(var r=new Array(t),n=0;n{"use strict";t.exports={mod:function(t,e){var r=t%e;return r<0?r+e:r},modHalf:function(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}}},91355:(t,e,r)=>{"use strict";var n=r(7370),i=r(98507).isArrayOrTypedArray;function o(t,e){return function(){var r,n,a,s,l,c=t;for(s=0;s{"use strict";t.exports=function(){}},39382:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=[];t.exports=function(t,e){if(-1===o.indexOf(t)){o.push(t);var r=1e3;i(e)?r=e:"long"===e&&(r=3e3);var a=n.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0),a.selectAll(".notifier-note").data(o).enter().append("div").classed("notifier-note",!0).style("opacity",0).each((function(t){var i=n.select(this);i.append("button").classed("notifier-close",!0).html("×").on("click",(function(){i.transition().call(s)}));for(var o=i.append("p"),a=t.split(//g),l=0;l{"use strict";var n=r(76292),i="data-savedcursor";t.exports=function(t,e){var r=t.attr(i);if(e){if(!r){for(var o=(t.attr("class")||"").split(" "),a=0;a{"use strict";var n=r(75717).dot,i=r(32994).BADNUM,o=t.exports={};o.tester=function(t){var e,r=t.slice(),n=r[0][0],o=n,a=r[0][1],s=a;for(r[r.length-1][0]===r[0][0]&&r[r.length-1][1]===r[0][1]||r.push(r[0]),e=1;eo||c===i||cs||e&&l(t))}:function(t,e){var l=t[0],c=t[1];if(l===i||lo||c===i||cs)return!1;var d,u,h,p,f,m=r.length,g=r[0][0],v=r[0][1],b=0;for(d=1;dMath.max(u,g)||c>Math.max(h,v)))if(cd||Math.abs(n(a,h))>i)return!0;return!1},o.filter=function(t,e){var r=[t[0]],n=0,i=0;function a(a){t.push(a);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c1&&a(t.pop()),{addPt:a,raw:t,filtered:r}}},41246:(t,e,r)=>{"use strict";var n=r(91203),i=r(83029);t.exports=function(t,e,o){var a=t._fullLayout,s=!0;return a._glcanvas.each((function(n){if(n.regl)n.regl.preloadCachedCode(o);else if(!n.pick||a._has("parcoords")){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.g.devicePixelRatio,extensions:e||[],cachedCode:o||{}})}catch(t){s=!1}n.regl||(s=!1),s&&this.addEventListener("webglcontextlost",(function(e){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:e,layer:n.key})}),!1)}})),s||n({container:a._glcontainer.node()}),s}},31406:(t,e,r)=>{"use strict";var n=r(7370),i=r(12431);t.exports=function(t){var e;if("string"!=typeof(e=t&&t.hasOwnProperty("userAgent")?t.userAgent:function(){var t;return"undefined"!=typeof navigator&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),t}()))return!0;var r=i({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!r)for(var o=e.split(" "),a=1;a-1;s--){var l=o[s];if("Version/"===l.substr(0,8)){var c=l.substr(8).split(".")[0];if(n(c)&&(c=+c),c>=13)return!0}}return r}},65280:t=>{"use strict";t.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;n{"use strict";var n=r(12822),i=r(58389).dfltConfig,o={add:function(t,e,r,n,o){var a,s;t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},s=t.undoQueue.index,t.autoplay?t.undoQueue.inSequence||(t.autoplay=!1):(!t.undoQueue.sequence||t.undoQueue.beginSequence?(a={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(s,t.undoQueue.queue.length-s,a),t.undoQueue.index+=1):a=t.undoQueue.queue[s-1],t.undoQueue.beginSequence=!1,a&&(a.undo.calls.unshift(e),a.undo.args.unshift(r),a.redo.calls.push(n),a.redo.args.push(o)),t.undoQueue.queue.length>i.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r{"use strict";e.counter=function(t,e,r,n){var i=(e||"")+(r?"":"$"),o=!1===n?"":"^";return"xy"===t?new RegExp(o+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(o+t+"([2-9]|[1-9][0-9]+)?"+i)}},21904:t=>{"use strict";var e=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,r=/^[^\.\[\]]+$/;t.exports=function(t,n){for(;n;){var i=t.match(e);if(i)t=i[1];else{if(!t.match(r))throw new Error("bad relativeAttr call:"+[t,n]);t=""}if("^"!==n.charAt(0))break;n=n.slice(1)}return t&&"["!==n.charAt(0)?t+"."+n:t+n}},45905:(t,e,r)=>{"use strict";var n=r(98507).isArrayOrTypedArray,i=r(12517);t.exports=function t(e,r){for(var o in r){var a=r[o],s=e[o];if(s!==a)if("_"===o.charAt(0)||"function"==typeof a){if(o in e)continue;e[o]=a}else if(n(a)&&n(s)&&i(a[0])){if("customdata"===o||"ids"===o)continue;for(var l=Math.min(a.length,s.length),c=0;c{"use strict";var n=r(7370),i=r(64347),o=r(75250),a=r(32994).BADNUM,s=1e-9;function l(t,e){return te}function u(t,e){return t>=e}e.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-s)-1:Math.floor((t-e.start)/e.size+s);var o,a,h=0,p=e.length,f=0,m=p>1?(e[p-1]-e[0])/(p-1):1;for(a=m>=0?r?l:c:r?u:d,t+=m*s*(r?-1:1)*(m>=0?1:-1);h90&&i.log("Long binary search..."),h-1},e.sorterAsc=function(t,e){return t-e},e.sorterDes=function(t,e){return e-t},e.distinctVals=function(t){var r,n=t.slice();for(n.sort(e.sorterAsc),r=n.length-1;r>-1&&n[r]===a;r--);for(var i,o=n[r]-n[0]||1,s=o/(r||1)/1e4,l=[],c=0;c<=r;c++){var d=n[c],u=d-i;void 0===i?(l.push(d),i=d):u>s&&(o=Math.min(o,u),l.push(d),i=d)}return{vals:l,minDiff:o}},e.roundUp=function(t,e,r){for(var n,i=0,o=e.length-1,a=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;i0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},e.findIndexOfMin=function(t,e){e=e||o;for(var r,n=1/0,i=0;i{"use strict";t.exports=function(t,e){(t.attr("class")||"").split(" ").forEach((function(e){0===e.indexOf("cursor-")&&t.classed(e,!1)})),e&&t.classed("cursor-"+e,!0)}},91203:(t,e,r)=>{"use strict";var n=r(17499),i=function(){};t.exports=function(t){for(var e in t)"function"==typeof t[e]&&(t[e]=i);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var r=document.createElement("div");r.className="no-webgl",r.style.cursor="pointer",r.style.fontSize="24px",r.style.color=n.defaults[0],r.style.position="absolute",r.style.left=r.style.top="0px",r.style.width=r.style.height="100%",r.style["background-color"]=n.lightLine,r.style["z-index"]=30;var o=document.createElement("p");return o.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",o.style.position="relative",o.style.top="50%",o.style.left="50%",o.style.height="30%",o.style.width="50%",o.style.margin="-15% 0 0 -25%",r.appendChild(o),t.container.appendChild(r),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}},54747:t=>{"use strict";t.exports=function(t){return Object.keys(t).sort()}},6749:(t,e,r)=>{"use strict";var n=r(7370),i=r(98507).isArrayOrTypedArray;e.aggNums=function(t,r,o,a){var s,l;if((!a||a>o.length)&&(a=o.length),n(r)||(r=!1),i(o[0])){for(l=new Array(a),s=0;st.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},17235:(t,e,r)=>{"use strict";var n=r(34463);t.exports=function(t){return t?n(t):[0,0,0,1]}},80394:(t,e,r)=>{"use strict";var n=r(27941),i=r(12822),o=i.strTranslate,a=r(25853),s=r(89701).LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;e.convertToTspans=function(t,r,g){var S=t.text(),C=!t.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!=typeof MathJax&&S.match(l),z=n.select(t.node().parentNode);if(!z.empty()){var O=t.attr("class")?t.attr("class").split(" ")[0]:"text";return O+="-math",z.selectAll("svg."+O).remove(),z.selectAll("g."+O+"-group").remove(),t.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),C?(r&&r._promises||[]).push(new Promise((function(e){t.style("display","none");var r=parseInt(t.node().style.fontSize,10),a={fontSize:r};!function(t,e,r){var o,a,s,l,h=parseInt((MathJax.version||"").split(".")[0]);if(2===h||3===h){var p=function(){var r="math-output-"+i.randstr({},64),o=(l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":e.fontSize+"px"}).text(t.replace(c,"\\lt ").replace(d,"\\gt "))).node();return 2===h?MathJax.Hub.Typeset(o):MathJax.typeset([o])},f=function(){var e=l.select(2===h?".MathJax_SVG":".MathJax"),o=!e.empty()&&l.select("svg").node();if(o){var a,s=o.getBoundingClientRect();a=2===h?n.select("body").select("#MathJax_SVG_glyphs"):e.select("defs"),r(e,a,s)}else i.log("There was an error in the tex syntax.",t),r();l.remove()};2===h?MathJax.Hub.Queue((function(){return a=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:u},displayAlign:"left"})}),(function(){if("SVG"!==(o=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),p,f,(function(){if("SVG"!==o)return MathJax.Hub.setRenderer(o)}),(function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(a)})):3===h&&(a=i.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=u,"svg"!==(o=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){p(),f(),"svg"!==o&&(MathJax.config.startup.output=o),MathJax.config=a})))}else i.warn("No MathJax version:",MathJax.version)}(C[2],a,(function(n,i,a){z.selectAll("svg."+O).remove(),z.selectAll("g."+O+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node())return D(),void e();var l=z.append("g").classed(O+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var c=a.width,d=a.height;s.attr({class:O,height:d,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var u=t.node().style.fill||"black",h=s.select("g");h.attr({fill:u,stroke:u});var p=h.node().getBoundingClientRect(),f=p.width,m=p.height;(f>c||m>d)&&(s.style("overflow","hidden"),f=(p=s.node().getBoundingClientRect()).width,m=p.height);var v=+t.attr("x"),b=+t.attr("y"),y=-(r||t.node().getBoundingClientRect().height)/4;if("y"===O[0])l.attr({transform:"rotate("+[-90,v,b]+")"+o(-f/2,y-m/2)});else if("l"===O[0])b=y-m/2;else if("a"===O[0]&&0!==O.indexOf("atitle"))v=0,b=y;else{var x=t.attr("text-anchor");v-=f*("middle"===x?.5:"end"===x?1:0),b=b+y-m/2}s.attr({x:v,y:b}),g&&g.call(t,l),e(l)}))}))):D(),t}function D(){z.empty()||(O=t.attr("class")+"-math",z.select("svg."+O).remove()),t.text("").style("white-space","pre");var r=function(t,e){e=e.replace(v," ");var r,o=!1,l=[],c=-1;function d(){c++;var e=document.createElementNS(a.svg,"tspan");n.select(e).attr({class:"line",dy:c*s+"em"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var o=1;o doesnt match end tag <"+t+">. Pretending it did match.",e),r=l[l.length-1].node}else i.log("Ignoring unexpected end tag .",e)}x.test(e)?d():(r=t,l=[{node:t}]);for(var C=e.split(b),z=0;z|>|>)/g,u=[["$","$"],["\\(","\\)"]],h={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},p={sub:"0.3em",sup:"-0.6em"},f={sub:"-0.21em",sup:"0.42em"},m="​",g=["http:","https:","mailto:","",void 0,":"],v=e.NEWLINES=/(\r\n?|\n)/g,b=/(<[^<>]*>)/,y=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=//i;e.BR_TAG_ALL=//gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,_=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,k=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,A=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function T(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&E(n)}var M=/(^|;)\s*color:/;e.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:["br"],i=t.split(b),o=[],a="",s=0,l=0;l3?o.push(c.substr(0,p-3)+"..."):o.push(c.substr(0,p));break}a=""}}return o.join("")};var S={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},C=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(t){return t.replace(C,(function(t,e){return("#"===e.charAt(0)?function(t){if(!(t>1114111)){var e=String.fromCodePoint;if(e)return e(t);var r=String.fromCharCode;return t<=65535?r(t):r(55232+(t>>10),t%1024+56320)}}("x"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):S[e])||t}))}function L(t){var e=encodeURI(decodeURI(t)),r=document.createElement("a"),n=document.createElement("a");r.href=t,n.href=e;var i=r.protocol,o=n.protocol;return-1!==g.indexOf(i)&&-1!==g.indexOf(o)?e:""}function z(t,e,r){var n,o,a,s=r.horizontalAlign,l=r.verticalAlign||"top",c=t.node().getBoundingClientRect(),d=e.node().getBoundingClientRect();return o="bottom"===l?function(){return c.bottom-n.height}:"middle"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},a="right"===s?function(){return c.right-n.width}:"center"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var t=a()-d.left,e=o()-d.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+"px",left:t+"px","z-index":1e3}),this}}e.convertEntities=E,e.sanitizeHTML=function(t){t=t.replace(v," ");for(var e=document.createElement("p"),r=e,i=[],o=t.split(b),a=0;a{"use strict";var r={};function n(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}e.throttle=function(t,e,i){var o=r[t],a=Date.now();if(!o){for(var s in r)r[s].tso.ts+e?l():o.timer=setTimeout((function(){l(),o.timer=null}),e)},e.done=function(t){var e=r[t];return e&&e.timer?new Promise((function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}})):Promise.resolve()},e.clear=function(t){if(t)n(r[t]),delete r[t];else for(var i in r)e.clear(i)}},61814:(t,e,r)=>{"use strict";var n=r(7370);t.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},10701:t=>{"use strict";t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6048:t=>{"use strict";t.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{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"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},81776:(t,e,r)=>{"use strict";var n=r(25059);t.exports=function(t){for(var e,r,i=n.layoutArrayContainers,o=n.layoutArrayRegexes,a=t.split("[")[0],s=0;s{"use strict";var n=r(98260).extendFlat,i=r(12517),o={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"],description:["trace attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*clearAxisTypes* resets the types of the axes this trace is on, because new data could","cause the automatic axis type detection to change. Log type will not be cleared, as that","is never automatically chosen so must have been user-specified.","*plot* (re)plots but without first clearing `gd.calcdata`.","*style* only calls `module.style` (or module.editStyle) for all trace modules and redraws the legend.","*markerSize* is like *style*, but propagate axis-range changes due to scatter `marker.size`","*colorbars* only redraws colorbars."].join(" ")},a={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"],description:["layout attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*plot* (re)plots but without first clearing `gd.calcdata`.","*legend* only redraws the legend.","*ticks* only redraws axis ticks, labels, and gridlines.","*axrange* minimal sequence when updating axis ranges.","*layoutstyle* reapplies global and SVG cartesian axis styles.","*modebar* just updates the modebar.","*camera* just updates the camera settings for gl3d scenes.","*arraydraw* allows component arrays to invoke the redraw routines just for the","component(s) that changed.","*colorbars* only redraws colorbars."].join(" ")},s=o.flags.slice().concat(["fullReplot"]),l=a.flags.slice().concat("layoutReplot");function c(t){for(var e={},r=0;r{"use strict";var n=r(7370),i=r(17399),o=r(25059),a=r(12822),s=r(51137),l=r(99246),c=r(17499),d=l.cleanId,u=l.getFromTrace,h=o.traceIs;function p(t,e){var r=t[e],n=e.charAt(0);r&&"paper"!==r&&(t[e]=d(r,n,!0))}function f(t){function e(e,r){var n=t[e],i=t.title&&t.title[r];n&&!i&&(t.title||(t.title={}),t.title[r]=t[e],delete t[e])}t&&("string"!=typeof t.title&&"number"!=typeof t.title||(t.title={text:t.title}),e("titlefont","font"),e("titleposition","position"),e("titleside","side"),e("titleoffset","offset"))}function m(t){if(!a.isPlainObject(t))return!1;var e=t.name;return delete t.name,delete t.showlegend,("string"==typeof e||"number"==typeof e)&&String(e)}function g(t,e,r,n){if(r&&!n)return t;if(n&&!r)return e;if(!t.trim())return e;if(!e.trim())return t;var i,o=Math.min(t.length,e.length);for(i=0;i0&&a.log("Clearing previous rejected promises from queue."),t._promises=[]},e.cleanLayout=function(t){var r,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var o=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,u=(s.subplotsRegistry.ternary||{}).attrRegex,h=(s.subplotsRegistry.gl3d||{}).attrRegex,m=Object.keys(t);for(r=0;r3?(D.x=1.02,D.xanchor="left"):D.x<-2&&(D.x=-.02,D.xanchor="right"),D.y>3?(D.y=1.02,D.yanchor="bottom"):D.y<-2&&(D.y=-.02,D.yanchor="top")),f(t),"rotate"===t.dragmode&&(t.dragmode="orbit"),c.clean(t),t.template&&t.template.layout&&e.cleanLayout(t.template.layout),t},e.cleanData=function(t){for(var r=0;r0)return t.substr(0,e)}e.hasParent=function(t,e){for(var r=x(e);r;){if(r in t)return!0;r=x(r)}return!1};var w=["x","y","z"];e.clearAxisTypes=function(t,e,r){for(var n=0;n{"use strict";var n=r(57755);e._doPlot=n._doPlot,e.newPlot=n.newPlot,e.restyle=n.restyle,e.relayout=n.relayout,e.redraw=n.redraw,e.update=n.update,e._guiRestyle=n._guiRestyle,e._guiRelayout=n._guiRelayout,e._guiUpdate=n._guiUpdate,e._storeDirectGUIEdit=n._storeDirectGUIEdit,e.react=n.react,e.extendTraces=n.extendTraces,e.prependTraces=n.prependTraces,e.addTraces=n.addTraces,e.deleteTraces=n.deleteTraces,e.moveTraces=n.moveTraces,e.purge=n.purge,e.addFrames=n.addFrames,e.deleteFrames=n.deleteFrames,e.animate=n.animate,e.setPlotConfig=n.setPlotConfig;var i=r(16822).getGraphDiv,o=r(71422).eraseActiveShape;e.deleteActiveShape=function(t){return o(i(t))},e.toImage=r(42704),e.validate=r(56205),e.downloadImage=r(56787);var a=r(89170);e.makeTemplate=a.makeTemplate,e.validateTemplate=a.validateTemplate},50305:(t,e,r)=>{"use strict";var n=r(12517),i=r(51648),o=r(64347),a=r(45380).sorterAsc,s=r(25059);e.containerArrayMatch=r(81776);var l=e.isAddVal=function(t){return"add"===t||n(t)},c=e.isRemoveVal=function(t){return null===t||"remove"===t};e.applyContainerArrayChanges=function(t,e,r,n,d){var u=e.astr,h=s.getComponentMethod(u,"supplyLayoutDefaults"),p=s.getComponentMethod(u,"draw"),f=s.getComponentMethod(u,"drawOne"),m=n.replot||n.recalc||h===i||p===i,g=t.layout,v=t._fullLayout;if(r[""]){Object.keys(r).length>1&&o.warn("Full array edits are incompatible with other edits",u);var b=r[""][""];if(c(b))e.set(null);else{if(!Array.isArray(b))return o.warn("Unrecognized full array edit value",u,b),!0;e.set(b)}return!m&&(h(g,v),p(t),!0)}var y,x,w,_,k,A,T,M,S=Object.keys(r).map(Number).sort(a),C=e.get(),E=C||[],L=d(v,u).get(),z=[],O=-1,D=E.length;for(y=0;yE.length-(T?0:1))o.warn("index out of range",u,w);else if(void 0!==A)k.length>1&&o.warn("Insertion & removal are incompatible with edits to the same index.",u,w),c(A)?z.push(w):T?("add"===A&&(A={}),E.splice(w,0,A),L&&L.splice(w,0,{})):o.warn("Unrecognized full object edit value",u,w,A),-1===O&&(O=w);else for(x=0;x=0;y--)E.splice(z[y],1),L&&L.splice(z[y],1);if(E.length?C||e.set(E):e.set(null),m)return!1;if(h(g,v),f!==i){var I;if(-1===O)I=S;else{for(D=Math.max(E.length,D),I=[],y=0;y=O);y++)I.push(w);for(y=O;y{"use strict";var n=r(27941),i=r(7370),o=r(56885),a=r(12822),s=a.nestedProperty,l=r(16677),c=r(79385),d=r(25059),u=r(35852),h=r(51137),p=r(75815),f=r(46458),m=r(86130),g=r(40666),v=r(17499),b=r(30977).initInteractions,y=r(25853),x=r(70059).clearOutline,w=r(58389).dfltConfig,_=r(50305),k=r(32862),A=r(39004),T=r(62309),M=r(21197).AX_NAME_PATTERN,S=0;function C(t){var e=t._fullLayout;e._redrawFromAutoMarginCount?e._redrawFromAutoMarginCount--:t.emit("plotly_afterplot")}function E(t,e){try{t._fullLayout._paper.style("background",e)}catch(t){a.error(t)}}function L(t,e){E(t,v.combine(e,"white"))}function z(t,e){if(!t._context){t._context=a.extendDeep({},w);var r=n.select("base");t._context._baseUrl=r.size()&&r.attr("href")?window.location.href.split("#")[0]:""}var i,s,l,c=t._context;if(e){for(s=Object.keys(e),i=0;i=t.data.length||i<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function I(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),D(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&D(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function F(t,e,r,n,o){!function(t,e,r,n){var i=a.isPlainObject(n);if(!Array.isArray(t.data))throw new Error("gd.data must be an array");if(!a.isPlainObject(e))throw new Error("update must be a key:value object");if(void 0===r)throw new Error("indices must be an integer or array of integers");for(var o in D(t,r,"indices"),e){if(!Array.isArray(e[o])||e[o].length!==r.length)throw new Error("attribute "+o+" must be an array of length equal to indices array length");if(i&&(!(o in n)||!Array.isArray(n[o])||n[o].length!==e[o].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(t,e,r,n);for(var l=function(t,e,r,n){var o,l,c,d,u,h=a.isPlainObject(n),p=[];for(var f in Array.isArray(r)||(r=[r]),r=O(r,t.data.length-1),e)for(var m=0;m-1&&-1===r.indexOf("grouptitlefont")?l(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?l(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?l(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&l(r,r.replace("titleoffset","title.offset")):l(r,r.replace("title","title.text"));function l(e,r){t[r]=t[e],delete t[e]}}function V(t,e,r){t=a.getGraphDiv(t),k.clearPromiseQueue(t);var n={};if("string"==typeof e)n[e]=r;else{if(!a.isPlainObject(e))return a.warn("Relayout fail.",e,r),Promise.reject();n=a.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=$(t,n),o=i.flags;o.calc&&(t.calcdata=void 0);var s=[h.previousPromises];o.layoutReplot?s.push(A.layoutReplot):Object.keys(n).length&&(H(t,o,i)||h.supplyDefaults(t),o.legend&&s.push(A.doLegend),o.layoutstyle&&s.push(A.layoutStyles),o.axrange&&W(s,i.rangesAltered),o.ticks&&s.push(A.doTicksRelayout),o.modebar&&s.push(A.doModeBar),o.camera&&s.push(A.doCamera),o.colorbars&&s.push(A.doColorBars),s.push(C)),s.push(h.rehover,h.redrag,h.reselect),c.add(t,V,[t,i.undoit],V,[t,i.redoit]);var l=a.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit("plotly_relayout",i.eventData),t}))}function H(t,e,r){var n,i,o=t._fullLayout;if(!e.axrange)return!1;for(var s in e)if("axrange"!==s&&e[s])return!1;var l=function(t,e){return a.coerce(n,i,m,t,e)},c={};for(var d in r.rangesAltered){var u=p.id2name(d);if(n=t.layout[u],i=o[u],f(n,i,l,c),i._matchGroup)for(var h in i._matchGroup)if(h!==d){var g=o[p.id2name(h)];g.autorange=i.autorange,g.range=i.range.slice(),g._input.range=i.range.slice()}}return!0}function W(t,e){var r=e?function(t){var r=[];for(var n in e){var i=p.getFromId(t,n);if(r.push(n),-1!==(i.ticklabelposition||"").indexOf("inside")&&i._anchorAxis&&r.push(i._anchorAxis._id),i._matchGroup)for(var o in i._matchGroup)e[o]||r.push(o)}return p.draw(t,r,{skipTitle:!0})}:function(t){return p.draw(t,"redraw")};t.push(x,A.doAutoRangeAndConstraints,r,A.drawData,A.finalDraw)}var q=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Y=/^[xyz]axis[0-9]*\.autorange$/,Z=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function $(t,e){var r,n,i,o=t.layout,l=t._fullLayout,c=l._guiEditing,h=N(l._preGUI,c),f=Object.keys(e),m=p.list(t),g=a.extendDeepAll({},e),v={};for(G(e),f=Object.keys(e),n=0;n0&&"string"!=typeof D.parts[F];)F--;var R=D.parts[F],P=D.parts[F-1]+"."+R,B=D.parts.slice(0,F).join("."),U=s(t.layout,B).get(),V=s(l,B).get(),H=D.get();if(void 0!==I){A[O]=I,S[O]="reverse"===R?I:j(H);var W=u.getLayoutValObject(l,D.parts);if(W&&W.impliedEdits&&null!==I)for(var $ in W.impliedEdits)C(a.relativeAttr(O,$),W.impliedEdits[$]);if(-1!==["width","height"].indexOf(O))if(I){C("autosize",null);var J="height"===O?"width":"height";C(J,l[J])}else l[O]=t._initialAutoSize[O];else if("autosize"===O)C("width",I?null:l.width),C("height",I?null:l.height);else if(P.match(q))z(P),s(l,B+"._inputRange").set(null);else if(P.match(Y)){z(P),s(l,B+"._inputRange").set(null);var K=s(l,B).get();K._inputDomain&&(K._input.domain=K._inputDomain.slice())}else P.match(Z)&&s(l,B+"._inputDomain").set(null);if("type"===R){E=U;var Q="linear"===V.type&&"log"===I,tt="log"===V.type&&"linear"===I;if(Q||tt){if(E&&E.range)if(V.autorange)Q&&(E.range=E.range[1]>E.range[0]?[1,2]:[2,1]);else{var et=E.range[0],rt=E.range[1];Q?(et<=0&&rt<=0&&C(B+".autorange",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),C(B+".range[0]",Math.log(et)/Math.LN10),C(B+".range[1]",Math.log(rt)/Math.LN10)):(C(B+".range[0]",Math.pow(10,et)),C(B+".range[1]",Math.pow(10,rt)))}else C(B+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[D.parts[0]]&&"radialaxis"===D.parts[1]&&delete l[D.parts[0]]._subplot.viewInitial["radialaxis.range"],d.getComponentMethod("annotations","convertCoords")(t,V,I,C),d.getComponentMethod("images","convertCoords")(t,V,I,C)}else C(B+".autorange",!0),C(B+".range",null);s(l,B+"._inputRange").set(null)}else if(R.match(M)){var nt=s(l,O).get(),it=(I||{}).type;it&&"-"!==it||(it="linear"),d.getComponentMethod("annotations","convertCoords")(t,nt,it,C),d.getComponentMethod("images","convertCoords")(t,nt,it,C)}var ot=_.containerArrayMatch(O);if(ot){r=ot.array,n=ot.index;var at=ot.property,st=W||{editType:"calc"};""!==n&&""===at&&(_.isAddVal(I)?S[O]=null:_.isRemoveVal(I)?S[O]=(s(o,r).get()||[])[n]:a.warn("unrecognized full object value",e)),T.update(w,st),v[r]||(v[r]={});var lt=v[r][n];lt||(lt=v[r][n]={}),lt[at]=I,delete e[O]}else"reverse"===R?(U.range?U.range.reverse():(C(B+".autorange",!0),U.range=[1,0]),V.autorange?w.calc=!0:w.plot=!0):("dragmode"===O&&(!1===I&&!1!==H||!1!==I&&!1===H)||l._has("scatter-like")&&l._has("regl")&&"dragmode"===O&&("lasso"===I||"select"===I)&&"lasso"!==H&&"select"!==H||l._has("gl2d")?w.plot=!0:W?T.update(w,W):w.calc=!0,D.set(I))}}for(r in v)_.applyContainerArrayChanges(t,h(o,r),v[r],w,h)||(w.plot=!0);for(var ct in L){var dt=(E=p.getFromId(t,ct))&&E._constraintGroup;if(dt)for(var ut in w.calc=!0,dt)L[ut]||(p.getFromId(t,ut)._constraintShrinkable=!0)}(X(t)||e.height||e.width)&&(w.plot=!0);var ht=l.shapes;for(n=0;n1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function nt(t,e){for(var r=0;r=i.length?i[0]:i[t]:i}function l(t){return Array.isArray(o)?t>=o.length?o[0]:o[t]:o}function c(t,e){var r=0;return function(){if(t&&++r===e)return t()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(o,d){function u(){t.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&function(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,h.transition(t,e.frame.data,e.frame.layout,k.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then((function(){e.onComplete&&e.onComplete()})),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}()};e()}var p,f,m=0;function g(t){return Array.isArray(i)?m>=i.length?t.transitionOpts=i[m]:t.transitionOpts=i[0]:t.transitionOpts=i,m++,t}var v=[],b=null==e,y=Array.isArray(e);if(b||y||!a.isPlainObject(e)){if(b||-1!==["string","number"].indexOf(typeof e))for(p=0;p0&&__)&&A.push(f);v=A}}v.length>0?function(e){if(0!==e.length){for(var i=0;i=0;n--)if(a.isPlainObject(e[n])){var m=e[n].name,g=(d[m]||f[m]||{}).name,v=e[n].name,b=d[g]||f[g];g&&v&&"number"==typeof v&&b&&S<5&&(S++,a.warn('addFrames: overwriting frame "'+(d[g]||f[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===S&&a.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),f[m]={name:m},p.push({frame:h.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:u+n})}p.sort((function(t,e){return t.index>e.index?-1:t.index=0;n--){if("number"==typeof(i=p[n].frame).name&&a.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;d[i.name="frame "+t._transitionData._counter++];);if(d[i.name]){for(o=0;o=0;r--)n=e[r],o.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:i[n]});var l=h.modifyFrames,d=h.modifyFrames,u=[t,s],p=[t,o];return c&&c.add(t,l,u,d,p),h.modifyFrames(t,o)},e.addTraces=function t(r,n,i){r=a.getGraphDiv(r);var o,s,l=[],d=e.deleteTraces,u=t,h=[r,l],p=[r,n];for(function(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r{"use strict";var e={staticPlot:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are interactive or not.","If *false*, no interactivity, for export or image generation."].join(" ")},typesetMath:{valType:"boolean",dflt:!0,description:["Determines whether math should be typeset or not,","when MathJax (either v2 or v3) is present on the page."].join(" ")},plotlyServerURL:{valType:"string",dflt:"",description:["When set it determines base URL for","the 'Edit in Chart Studio' `showEditInChartStudio`/`showSendToCloud` mode bar button","and the showLink/sendData on-graph link.","To enable sending your data to Chart Studio Cloud, you need to","set both `plotlyServerURL` to 'https://chart-studio.plotly.com' and","also set `showSendToCloud` to true."].join(" ")},editable:{valType:"boolean",dflt:!1,description:["Determines whether the graph is editable or not.","Sets all pieces of `edits`","unless a separate `edits` config item overrides individual parts."].join(" ")},edits:{annotationPosition:{valType:"boolean",dflt:!1,description:["Determines if the main anchor of the annotation is editable.","The main anchor corresponds to the","text (if no arrow) or the arrow (which drags the whole thing leaving","the arrow length & direction unchanged)."].join(" ")},annotationTail:{valType:"boolean",dflt:!1,description:["Has only an effect for annotations with arrows.","Enables changing the length and direction of the arrow."].join(" ")},annotationText:{valType:"boolean",dflt:!1,description:"Enables editing annotation text."},axisTitleText:{valType:"boolean",dflt:!1,description:"Enables editing axis title text."},colorbarPosition:{valType:"boolean",dflt:!1,description:"Enables moving colorbars."},colorbarTitleText:{valType:"boolean",dflt:!1,description:"Enables editing colorbar title text."},legendPosition:{valType:"boolean",dflt:!1,description:"Enables moving the legend."},legendText:{valType:"boolean",dflt:!1,description:"Enables editing the trace name fields from the legend"},shapePosition:{valType:"boolean",dflt:!1,description:"Enables moving shapes."},titleText:{valType:"boolean",dflt:!1,description:"Enables editing the global layout title."}},editSelection:{valType:"boolean",dflt:!0,description:"Enables moving selections."},autosizable:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are plotted with respect to","layout.autosize:true and infer its container size."].join(" ")},responsive:{valType:"boolean",dflt:!1,description:["Determines whether to change the layout size when window is resized.","In v3, this option will be removed and will always be true."].join(" ")},fillFrame:{valType:"boolean",dflt:!1,description:["When `layout.autosize` is turned on, determines whether the graph","fills the container (the default) or the screen (if set to *true*)."].join(" ")},frameMargins:{valType:"number",dflt:0,min:0,max:.5,description:["When `layout.autosize` is turned on, set the frame margins","in fraction of the graph size."].join(" ")},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox","map"],extras:[!0,!1],dflt:"gl3d+geo+map",description:["Determines whether mouse wheel or two-finger scroll zooms is enable.","Turned on by default for gl3d, geo, mapbox and map subplots","(as these subplot types do not have zoombox via pan),","but turned off by default for cartesian subplots.","Set `scrollZoom` to *false* to disable scrolling for all subplots."].join(" ")},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize",description:["Sets the double click interaction mode.","Has an effect only in cartesian plots.","If *false*, double click is disable.","If *reset*, double click resets the axis ranges to their initial values.","If *autosize*, double click set the axis ranges to their autorange values.","If *reset+autosize*, the odd double clicks resets the axis ranges","to their initial values and even double clicks set the axis ranges","to their autorange values."].join(" ")},doubleClickDelay:{valType:"number",dflt:300,min:0,description:["Sets the delay for registering a double-click in ms.","This is the time interval (in ms) between first mousedown and","2nd mouseup to constitute a double-click.","This setting propagates to all on-subplot double clicks","(except for geo, mapbox and map) and on-legend double clicks."].join(" ")},showAxisDragHandles:{valType:"boolean",dflt:!0,description:["Set to *false* to omit cartesian axis pan/zoom drag handles."].join(" ")},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0,description:["Set to *false* to omit direct range entry at the pan/zoom drag points,","note that `showAxisDragHandles` must be enabled to have an effect."].join(" ")},showTips:{valType:"boolean",dflt:!0,description:["Determines whether or not tips are shown while interacting","with the resulting graphs."].join(" ")},showLink:{valType:"boolean",dflt:!1,description:["Determines whether a link to Chart Studio Cloud is displayed","at the bottom right corner of resulting graphs.","Use with `sendData` and `linkText`."].join(" ")},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0,description:["Sets the text appearing in the `showLink` link."].join(" ")},sendData:{valType:"boolean",dflt:!0,description:["If *showLink* is true, does it contain data","just link to a Chart Studio Cloud file?"].join(" ")},showSources:{valType:"any",dflt:!1,description:["Adds a source-displaying function to show sources on","the resulting graphs."].join(" ")},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover",description:["Determines the mode bar display mode.","If *true*, the mode bar is always visible.","If *false*, the mode bar is always hidden.","If *hover*, the mode bar is visible while the mouse cursor","is on the graph container."].join(" ")},showSendToCloud:{valType:"boolean",dflt:!1,description:['Should we include a ModeBar button, labeled "Edit in Chart Studio",',"that sends this chart to chart-studio.plotly.com (formerly plot.ly) or another plotly server","as specified by `plotlyServerURL` for editing, export, etc? Prior to version 1.43.0","this button was included by default, now it is opt-in using this flag.","Note that this button can (depending on `plotlyServerURL` being set) send your data","to an external server. However that server does not persist your data",'until you arrive at the Chart Studio and explicitly click "Save".'].join(" ")},showEditInChartStudio:{valType:"boolean",dflt:!1,description:["Same as `showSendToCloud`, but use a pencil icon instead of a floppy-disk.","Note that if both `showSendToCloud` and `showEditInChartStudio` are turned,","only `showEditInChartStudio` will be honored."].join(" ")},modeBarButtonsToRemove:{valType:"any",dflt:[],description:["Remove mode bar buttons by name.","See ./components/modebar/buttons.js for the list of names."].join(" ")},modeBarButtonsToAdd:{valType:"any",dflt:[],description:["Add mode bar button using config objects","See ./components/modebar/buttons.js for list of arguments.","To enable predefined modebar buttons e.g. shape drawing, hover and spikelines,","simply provide their string name(s). This could include:","*v1hovermode*, *hoverclosest*, *hovercompare*, *togglehover*, *togglespikelines*,","*drawline*, *drawopenpath*, *drawclosedpath*, *drawcircle*, *drawrect* and *eraseshape*.","Please note that these predefined buttons will only be shown if they are compatible","with all trace types used in a graph."].join(" ")},modeBarButtons:{valType:"any",dflt:!1,description:["Define fully custom mode bar buttons as nested array,","where the outer arrays represents button groups, and","the inner arrays have buttons config objects or names of default buttons","See ./components/modebar/buttons.js for more info."].join(" ")},toImageButtonOptions:{valType:"any",dflt:{},description:["Statically override options for toImage modebar button","allowed keys are format, filename, width, height, scale","see ../components/modebar/buttons.js"].join(" ")},displaylogo:{valType:"boolean",dflt:!0,description:["Determines whether or not the plotly logo is displayed","on the end of the mode bar."].join(" ")},watermark:{valType:"boolean",dflt:!1,description:"watermark the images with the company's logo"},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4,description:["Set the pixel ratio during WebGL image export.","This config option was formerly named `plot3dPixelRatio`","which is now deprecated."].join(" ")},setBackground:{valType:"any",dflt:"transparent",description:["Set function to add the background color (i.e. `layout.paper_color`)","to a different container.","This function take the graph div as first argument and the current background","color as second argument.","Alternatively, set to string *opaque* to ensure there is white behind it."].join(" ")},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/",description:["Set the URL to topojson used in geo charts.","By default, the topojson files are fetched from cdn.plot.ly.","For example, set this option to:","/dist/topojson/","to render geographical feature using the topojson files","that ship with the plotly.js module."].join(" ")},mapboxAccessToken:{valType:"string",dflt:null,description:["Mapbox access token (required to plot mapbox trace types)","If using an Mapbox Atlas server, set this option to ''","so that plotly.js won't attempt to authenticate to the public Mapbox server."].join(" ")},logging:{valType:"integer",min:0,max:2,dflt:1,description:["Turn all console logging on or off (errors will be thrown)","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0,description:["Set on-graph logging (notifier) level","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no on-graph logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},queueLength:{valType:"integer",min:0,dflt:0,description:"Sets the length of the undo/redo queue."},globalTransforms:{valType:"any",dflt:[],description:["Set global transform to be applied to all traces with no","specification needed"].join(" ")},locale:{valType:"string",dflt:"en-US",description:["Which localization should we use?","Should be a string like 'en' or 'en-US'."].join(" ")},locales:{valType:"any",dflt:{},description:["Localization definitions","Locales can be provided either here (specific to one chart) or globally","by registering them as modules.","Should be an object of objects {locale: {dictionary: {...}, format: {...}}}","{"," da: {"," dictionary: {'Reset axes': 'Nulstil aksler', ...},"," format: {months: [...], shortMonths: [...]}"," },"," ...","}","All parts are optional. When looking for translation or format fields, we","look first for an exact match in a config locale, then in a registered","module. If those fail, we strip off any regionalization ('en-US' -> 'en')","and try each (config, registry) again. The final fallback for translation","is untranslated (which is US English) and for formats is the base English","(the only consequence being the last fallback date format %x is DD/MM/YYYY","instead of MM/DD/YYYY). Currently `grouping` and `currency` are ignored","for our automatic number formatting, but can be used in custom formats."].join(" ")}},r={};!function t(e,r){for(var n in e){var i=e[n];i.valType?r[n]=i.dflt:(r[n]||(r[n]={}),t(i,r[n]))}}(e,r),t.exports={configAttributes:e,dfltConfig:r}},35852:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822),o=r(3520),a=r(13195),s=r(53874),l=r(46367),c=r(58389).configAttributes,d=r(62309),u=i.extendDeepAll,h=i.isPlainObject,p=i.isArrayOrTypedArray,f=i.nestedProperty,m=i.valObjectMeta,g="_isSubplotObj",v="_isLinkedToArray",b="_deprecated",y=[g,v,"_arrayAttrRegexps",b];function x(t,e,r){if(!t)return!1;if(t._isLinkedToArray)if(w(e[r]))r++;else if(r=o.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var a=e[r];if(!w(a))return!1;t=o[i][a]}else t=o[i]}else t=o}}return t}function w(t){return t===Math.round(t)&&t>=0}function _(){var t,e,r={};for(t in u(r,a),n.subplotsRegistry)if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else{var d=t._module;if(d||(d=(n.modules[t.type||o.type.dflt]||{})._module),!d)return!1;if(!(i=(r=d.attributes)&&r[a])){var u=d.basePlotModule;u&&u.attributes&&(i=u.attributes[a])}i||(i=o[a])}return x(i,e,s)},e.getLayoutValObject=function(t,e){var r=function(t,e){var r,i,o,s,l=t._basePlotModules;if(l){var c;for(r=0;r{"use strict";var n=r(12822),i=r(3520),o="templateitemname",a={name:{valType:"string",editType:"none",description:["When used in a template, named items are created in the output figure","in addition to any items the figure already has in this array.","You can modify these items in the output figure by making your own","item with `templateitemname` matching this `name`","alongside your modifications (including `visible: false` or","`enabled: false` to hide it).","Has no effect outside of a template."].join(" ")}};function s(t){return t&&"string"==typeof t}function l(t){var e=t.length-1;return"s"!==t.charAt(e)&&n.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}a[o]={valType:"string",editType:"calc",description:["Used to refer to a named item in this array in the template. Named","items from the template will be created even without a matching item","in the input figure, but you can modify one by making an item with","`templateitemname` matching its `name`, alongside your modifications","(including `visible: false` or `enabled: false` to hide it).","If there is no template or no matching item, this item will be","hidden unless you explicitly show it with `visible: true`."].join(" ")},e.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=a.name,e[o]=a[o],e},e.traceTemplater=function(t){var e,r,o={};for(e in t)r=t[e],Array.isArray(r)&&r.length&&(o[e]=0);return{newTrace:function(a){var s={type:e=n.coerce(a,{},i,"type"),_template:null};if(e in o){r=t[e];var l=o[e]%r.length;o[e]++,s._template=r[l]}return s}}},e.newContainer=function(t,e,r){var i=t._template,o=i&&(i[e]||r&&i[r]);return n.isPlainObject(o)||(o=null),t[e]={_template:o}},e.arrayTemplater=function(t,e,r){var n=t._template,i=n&&n[l(e)],a=n&&n[e];Array.isArray(a)&&a.length||(a=[]);var c={};return{newItem:function(t){var e={name:t.name,_input:t},n=e[o]=t[o];if(!s(n))return e._template=i,e;for(var l=0;l=i&&(r._input||{})._templateitemname;s&&(a=i);var l,c=e+"["+a+"]";function d(){l={},s&&(l[c]={},l[c][o]=s)}function u(t,e){s?n.nestedProperty(l[c],t).set(e):l[c+"."+t]=e}function h(){var t=l;return d(),t}return d(),{modifyBase:function(t,e){l[t]=e},modifyItem:u,getUpdateObj:h,applyUpdate:function(e,r){e&&u(e,r);var i=h();for(var o in i)n.nestedProperty(t,o).set(i[o])}}}},39004:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(51137),a=r(12822),s=r(80394),l=r(86748),c=r(17499),d=r(40666),u=r(6883),h=r(45828),p=r(75815),f=r(89701),m=r(69352),g=m.enforce,v=m.clean,b=r(19496).doAutoRange,y="start",x=r(21197).zindexSeparator;function w(t,e,r){for(var n=0;n=t[1]||i[1]<=t[0])&&o[0]e[0])return!0}return!1}function _(t){var r,i,s,l,u,m,g=t._fullLayout,v=g._size,b=v.p,y=p.list(t,"",!0);if(g._paperdiv.style({width:t._context.responsive&&g.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":g.width+"px",height:t._context.responsive&&g.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(d.setSize,g.width,g.height),t._context.setBackground(t,g.paper_bgcolor),e.drawMainTitle(t),h.manage(t),!g._has("cartesian"))return o.previousPromises(t);function _(t,e,r){var n=t._lw/2;return"x"===t._id.charAt(0)?e?"top"===r?e._offset-b-n:e._offset+e._length+b+n:v.t+v.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+b+n:e._offset-b-n:v.l+v.w*(t.position||0)+n%1}for(r=0;r.5?"t":"b",a=t._fullLayout.margin[o],s=0;return"paper"===e.yref?s=r+e.pad.t+e.pad.b:"container"===e.yref&&(s=function(t,e,r,n,i){var o=0;return"middle"===r&&(o+=i/2),"t"===t?("top"===r&&(o+=i),o+=n-e*n):("bottom"===r&&(o+=i),o+=e*n),o}(o,n,i,t._fullLayout.height,r)+e.pad.t+e.pad.b),s>a?s:0}(t,e,m);if(g>0){!function(t,e,r,n){var i="title.automargin",s=t._fullLayout.title,l=s.y>.5?"t":"b",c={x:s.x,y:s.y,t:0,b:0},d={};"paper"===s.yref&&function(t,e,r,n,i){var o="paper"===e.yref?t._fullLayout._size.h:t._fullLayout.height,s=a.isTopAnchor(e)?n:n-i,l="b"===r?o-s:s;return!(a.isTopAnchor(e)&&"t"===r||a.isBottomAnchor(e)&&"b"===r)&&l{"use strict";var n=r(12822),i=n.isPlainObject,o=r(35852),a=r(51137),s=r(3520),l=r(46121),c=r(58389).dfltConfig;function d(t,e){t=n.extendDeep({},t);var r,o,a=Object.keys(t).sort();function s(e,r,n){if(i(r)&&i(e))d(e,r);else if(Array.isArray(r)&&Array.isArray(e)){var a=l.arrayTemplater({_template:t},n);for(o=0;ok?d.push({code:"unused",traceType:b,templateCount:_,dataCount:k}):k>_&&d.push({code:"reused",traceType:b,templateCount:_,dataCount:k})}}else d.push({code:"data"});if(function t(e,r){for(var n in e)if("_"!==n.charAt(0)){var o=e[n],a=m(e,n,r);i(o)?(Array.isArray(e)&&!1===o._template&&o.templateitemname&&d.push({code:"missing",path:a,templateitemname:o.templateitemname}),t(o,a)):Array.isArray(o)&&g(o)&&t(o,a)}}({data:p,layout:h},""),d.length)return d.map(v)}},42704:(t,e,r)=>{"use strict";var n=r(7370),i=r(57755),o=r(51137),a=r(12822),s=r(13078),l=r(48402),c=r(40241),d=r(88566).version,u={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png",description:"Sets the format of exported image."},width:{valType:"number",min:1,description:["Sets the exported image width.","Defaults to the value found in `layout.width`","If set to *null*, the exported image width will match the current graph width."].join(" ")},height:{valType:"number",min:1,description:["Sets the exported image height.","Defaults to the value found in `layout.height`","If set to *null*, the exported image height will match the current graph height."].join(" ")},scale:{valType:"number",min:0,dflt:1,description:["Sets a scaling for the generated image.","If set, all features of a graphs (e.g. text, line width)","are scaled, unlike simply setting","a bigger *width* and *height*."].join(" ")},setBackground:{valType:"any",dflt:!1,description:["Sets the image background mode.","By default, the image background is determined by `layout.paper_bgcolor`,","the *transparent* mode.","One might consider setting `setBackground` to *opaque*","when exporting a *jpeg* image as JPEGs do not support opacity."].join(" ")},imageDataOnly:{valType:"boolean",dflt:!1,description:["Determines whether or not the return value is prefixed by","the image format's corresponding 'data:image;' spec."].join(" ")}};t.exports=function(t,e){var r,h,p,f;function m(t){return!(t in e)||a.validate(e[t],u[t])}if(e=e||{},a.isPlainObject(t)?(r=t.data||[],h=t.layout||{},p=t.config||{},f={}):(t=a.getGraphDiv(t),r=a.extendDeep([],t.data),h=a.extendDeep({},t.layout),p=t._context,f=t._fullLayout||{}),!m("width")&&null!==e.width||!m("height")&&null!==e.height)throw new Error("Height and width should be pixel values.");if(!m("format"))throw new Error("Export format is not "+a.join2(u.format.values,", "," or ")+".");var g={};function v(t,r){return a.coerce(e,g,u,t,r)}var b=v("format"),y=v("width"),x=v("height"),w=v("scale"),_=v("setBackground"),k=v("imageDataOnly"),A=document.createElement("div");A.style.position="absolute",A.style.left="-5000px",document.body.appendChild(A);var T=a.extendFlat({},h);y?T.width=y:null===e.width&&n(f.width)&&(T.width=f.width),x?T.height=x:null===e.height&&n(f.height)&&(T.height=f.height);var M=a.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:_}),S=s.getRedrawFunc(A);function C(){return new Promise((function(t){setTimeout(t,s.getDelay(A._fullLayout))}))}function E(){return new Promise((function(t,e){var r=l(A,b,w),n=A._fullLayout.width,u=A._fullLayout.height;function h(){i.purge(A),document.body.removeChild(A)}if("full-json"===b){var p=o.graphJson(A,!1,"keepdata","object",!0,!0);return p.version=d,p=JSON.stringify(p),h(),t(k?p:s.encodeJSON(p))}if(h(),"svg"===b)return t(k?r:s.encodeSVG(r));var f=document.createElement("canvas");f.id=a.randstr(),c({format:b,width:n,height:u,scale:w,canvas:f,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.newPlot(A,r,T,M).then(S).then(C).then(E).then((function(e){t(function(t){return k?t.replace(s.IMAGE_URL_PREFIX,""):t}(e))})).catch((function(t){e(t)}))}))}},56205:(t,e,r)=>{"use strict";var n=r(12822),i=r(51137),o=r(35852),a=r(58389).dfltConfig,s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function d(t,e,r,i,o,a){a=a||[];for(var u=Object.keys(t),h=0;hy.length&&i.push(p("unused",o,v.concat(y.length)));var T,M,S,C,E,L=y.length,z=Array.isArray(A);if(z&&(L=Math.min(L,A.length)),2===x.dimensions)for(M=0;My[M].length&&i.push(p("unused",o,v.concat(M,y[M].length)));var O=y[M].length;for(T=0;T<(z?Math.min(O,A[M].length):O);T++)S=z?A[M][T]:A,C=b[M][T],E=y[M][T],n.validate(C,S)?E!==C&&E!==+C&&i.push(p("dynamic",o,v.concat(M,T),C,E)):i.push(p("value",o,v.concat(M,T),C))}else i.push(p("array",o,v.concat(M),b[M]));else for(M=0;M1&&h.push(p("object","layout"))),i.supplyDefaults(f);for(var m=f._fullData,g=r.length,v=0;v{"use strict";t.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"],description:["Describes how a new animate call interacts with currently-running","animations. If `immediate`, current animations are interrupted and","the new animation is started. If `next`, the current frame is allowed","to complete, after which the new animation is started. If `afterall`","all existing frames are animated to completion before the new animation","is started."].join(" ")},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward",description:["The direction in which to play the frames triggered by the animation call"].join(" ")},fromcurrent:{valType:"boolean",dflt:!1,description:["Play frames starting at the current frame instead of the beginning."].join(" ")},frame:{duration:{valType:"number",min:0,dflt:500,description:["The duration in milliseconds of each frame. If greater than the frame","duration, it will be limited to the frame duration."].join(" ")},redraw:{valType:"boolean",dflt:!0,description:["Redraw the plot at completion of the transition. This is desirable","for transitions that include properties that cannot be transitioned,","but may significantly slow down updates that do not require a full","redraw of the plot"].join(" ")}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none",description:["The duration of the transition, in milliseconds. If equal to zero,","updates are synchronous."].join(" ")},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none",description:"The easing function used for the transition"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none",description:["Determines whether the figure's layout or traces smoothly transitions","during updates that make both traces and layout change."].join(" ")}}}},35677:(t,e,r)=>{"use strict";var n=r(12822),i=r(46121);t.exports=function(t,e,r){var o,a,s=r.name,l=r.inclusionAttr||"visible",c=e[s],d=n.isArrayOrTypedArray(t[s])?t[s]:[],u=e[s]=[],h=i.arrayTemplater(e,s,l);for(o=0;o{"use strict";var n=r(75058),i=r(60713);t.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc",description:["Determines whether or not this trace is visible.","If *legendonly*, the trace is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")},showlegend:{valType:"boolean",dflt:!0,editType:"style",description:["Determines whether or not an item corresponding to this","trace is shown in the legend."].join(" ")},legend:{valType:"subplotid",dflt:"legend",editType:"style",description:["Sets the reference to a legend to show this trace in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")},legendgroup:{valType:"string",dflt:"",editType:"style",description:["Sets the legend group for this trace.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style",description:["Sets the title of the legend group."].join(" ")},font:n({editType:"style",description:["Sets this legend group's title font."].join(" ")}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style",description:["Sets the legend rank for this trace.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items.","When having unranked or equal rank items shapes would be displayed after traces","i.e. according to their order in data and layout."].join(" ")},legendwidth:{valType:"number",min:0,editType:"style",description:"Sets the width (in px or fraction) of the legend for this trace."},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style",description:"Sets the opacity of the trace."},name:{valType:"string",editType:"style",description:["Sets the trace name.","The trace name appears as the legend item and on hover."].join(" ")},uid:{valType:"string",editType:"plot",anim:!0,description:["Assign an id to this trace,","Use this to provide object constancy between traces during animations","and transitions."].join(" ")},ids:{valType:"data_array",editType:"calc",anim:!0,description:["Assigns id labels to each datum.","These ids for object constancy of data points during animation.","Should be an array of strings, not numbers or any other type."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data each datum.","This may be useful when listening to hover, click and selection events.","Note that, *scatter* traces also appends customdata items in the markers","DOM elements"].join(" ")},meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information associated with this trace","that can be used in various text attributes.","Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text`","`rangeselector`, `updatemenues` and `sliders` `label` text","all support `meta`.","To access the trace `meta` values in an attribute in the same trace, simply use","`%{meta[i]}` where `i` is the index or key of the `meta`","item in question.","To access trace `meta` in layout attributes, use","`%{data[n[.meta[i]}` where `i` is the index or key of the `meta`","and `n` is the trace index."].join(" ")},selectedpoints:{valType:"any",editType:"calc",description:["Array containing integer indices of selected points.","Has an effect only for traces that support selections.","Note that an empty array means an empty selection where the `unselected`","are turned on for all points, whereas, any other non-array values means no","selection all where the `selected` and `unselected` styles have no effect."].join(" ")},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none",description:["Determines which trace information appear on hover.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:i.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc",description:["The stream id number links a data trace on a plot with a stream.","See https://chart-studio.plotly.com/settings for more details."].join(" ")},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc",description:["Sets the maximum number of points to keep on the plots from an","incoming stream.","If `maxpoints` is set to *50*, only the newest 50 points will","be displayed on the plot."].join(" ")},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc",description:["WARNING: All transforms are deprecated and may be removed from the API in next major version.","An array of operations that manipulate the trace data,","for example filtering or sorting the data arrays."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of some user-driven changes to the trace:","`constraintrange` in `parcoords` traces, as well as some","`editable: true` modifications such as `name` and `colorbar.title`.","Defaults to `layout.uirevision`.","Note that other user-driven trace attribute changes are controlled","by `layout` attributes:","`trace.visible` is controlled by `layout.legend.uirevision`,","`selectedpoints` is controlled by `layout.selectionrevision`,","and `colorbar.(x|y)` (accessible with `config: {editable: true}`)","is controlled by `layout.editrevision`.","Trace changes are tracked by `uid`, which only falls back on trace","index if no `uid` is provided. So if your app can add/remove traces","before the end of the `data` array, such that the same trace has a","different index, you can still preserve user-driven changes if you","give each trace a `uid` that stays with it as it moves."].join(" ")}}},15389:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822),o=i.dateTime2ms,a=i.incrementMonth,s=r(32994).ONEAVGMONTH;t.exports=function(t,e,r,i){if("date"!==e.type)return{vals:i};var l=t[r+"periodalignment"];if(!l)return{vals:i};var c,d=t[r+"period"];if(n(d)){if((d=+d)<=0)return{vals:i}}else if("string"==typeof d&&"M"===d.charAt(0)){var u=+d.substring(1);if(!(u>0&&Math.round(u)===u))return{vals:i};c=u}for(var h=e.calendar,p="start"===l,f="end"===l,m=t[r+"period0"],g=o(m,h)||0,v=[],b=[],y=[],x=i.length,w=0;wT;)A=a(A,-c,h);for(;A<=T;)A=a(A,c,h);k=a(A,-c,h)}else{for(A=g+(_=Math.round((T-g)/d))*d;A>T;)A-=d;for(;A<=T;)A+=d;k=A-d}v[w]=p?k:f?A:(k+A)/2,b[w]=k,y[w]=A}return{vals:v,starts:b,ends:y}}},36187:t=>{"use strict";t.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's x coordinates and","a 2D cartesian x axis.","If *x* (the default value), the x coordinates refer to","`layout.xaxis`.","If *x2*, the x coordinates refer to `layout.xaxis2`, and so on."].join(" ")},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's y coordinates and","a 2D cartesian y axis.","If *y* (the default value), the y coordinates refer to","`layout.yaxis`.","If *y2*, the y coordinates refer to `layout.yaxis2`, and so on."].join(" ")}}},19496:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=r(12822),a=r(32994).FP_SAFE,s=r(25059),l=r(40666),c=r(99246),d=c.getFromId,u=c.isLinked;function h(t,e){var r,n,i=[],a=t._fullLayout,s=f(a,e,0),l=f(a,e,1),c=g(t,e),d=c.min,u=c.max;if(0===d.length||0===u.length)return o.simpleMap(e.range,e.r2l);var h=d[0].val,m=u[0].val;for(r=1;r0&&((T=L-s(x)-l(w))>z?M/T>O&&(_=x,k=w,O=M/T):M/L>O&&(_={val:x.val,nopad:1},k={val:w.val,nopad:1},O=M/L));if(h===m){var D=h-1,I=h+1;if(C)if(0===h)i=[0,1];else{var F=(h>0?u:d).reduce((function(t,e){return Math.max(t,l(e))}),0),R=h/(1-Math.min(.5,F/L));i=h>0?[0,R]:[R,0]}else i=E?[Math.max(0,D),Math.max(1,I)]:[D,I]}else C?(_.val>=0&&(_={val:0,nopad:1}),k.val<=0&&(k={val:0,nopad:1})):E&&(_.val-O*s(_)<0&&(_={val:0,nopad:1}),k.val<=0&&(k={val:1,nopad:1})),O=(k.val-_.val-p(e,x.val,w.val))/(L-s(_)-l(k)),i=[_.val-O*s(_),k.val+O*l(k)];return i=A(i,e),e.limitRange&&e.limitRange(),b&&i.reverse(),o.simpleMap(i,e.l2r||Number)}function p(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),o=0;o0?r.ppadplus:r.ppadminus)||r.ppad||0),S=T((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),C=T(r.vpadplus||r.vpad),E=T(r.vpadminus||r.vpad);if(!k){if(h=1/0,p=-1/0,_)for(n=0;n0&&(h=o),o>p&&o-a&&(h=o),o>p&&o=O;n--)z(n);return{min:f,max:m,opts:r}},concatExtremes:g};var m=3;function g(t,e,r){var n,i,o,a=e._id,s=t._fullData,l=t._fullLayout,c=[],u=[];function h(t,e){for(n=0;n=r&&(c.extrapad||!a)){s=!1;break}i(e,c.val)&&c.pad<=r&&(a||!c.extrapad)&&(t.splice(l,1),l--)}if(s){var d=o&&0===e;t.push({val:e,pad:d?0:r,extrapad:!d&&a})}}function x(t){return i(t)&&Math.abs(t)=e}function k(t,e,r){return void 0===e||void 0===r||(e=t.d2l(e))=c&&(a=c,r=c),s<=c&&(s=c,n=c)}}return r=function(t,e){var r=e.autorangeoptions;return r&&void 0!==r.minallowed&&k(e,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&k(e,r.clipmin,r.clipmax)?Math.max(t,e.d2l(r.clipmin)):t}(r,e),n=function(t,e){var r=e.autorangeoptions;return r&&void 0!==r.maxallowed&&k(e,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&k(e,r.clipmin,r.clipmax)?Math.min(t,e.d2l(r.clipmax)):t}(n,e),[r,n]}},49826:t=>{"use strict";t.exports=function(t,e,r){var n,i;if(r){var o="reversed"===e||"min reversed"===e||"max reversed"===e;n=r[o?1:0],i=r[o?0:1]}var a=t("autorangeoptions.minallowed",null===i?n:void 0),s=t("autorangeoptions.maxallowed",null===n?i:void 0);void 0===a&&t("autorangeoptions.clipmin"),void 0===s&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}},75815:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=r(51137),a=r(25059),s=r(12822),l=s.strTranslate,c=r(80394),d=r(6883),u=r(17499),h=r(40666),p=r(86130),f=r(84696),m=r(32994),g=m.ONEMAXYEAR,v=m.ONEAVGYEAR,b=m.ONEMINYEAR,y=m.ONEMAXQUARTER,x=m.ONEAVGQUARTER,w=m.ONEMINQUARTER,_=m.ONEMAXMONTH,k=m.ONEAVGMONTH,A=m.ONEMINMONTH,T=m.ONEWEEK,M=m.ONEDAY,S=M/2,C=m.ONEHOUR,E=m.ONEMIN,L=m.ONESEC,z=m.ONEMILLI,O=m.ONEMICROSEC,D=m.MINUS_SIGN,I=m.BADNUM,F={K:"zeroline"},R={K:"gridline",L:"path"},P={K:"minor-gridline",L:"path"},j={K:"tick",L:"path"},N={K:"tick",L:"text"},B={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},U=r(89701),G=U.MID_SHIFT,V=U.CAP_SHIFT,H=U.LINE_SPACING,W=U.OPPOSITE_SIDE,q=t.exports={};q.setConvert=r(30632);var Y=r(17821),Z=r(99246),$=Z.idSort,X=Z.isLinked;q.id2name=Z.id2name,q.name2id=Z.name2id,q.cleanId=Z.cleanId,q.list=Z.list,q.listIds=Z.listIds,q.getFromId=Z.getFromId,q.getFromTrace=Z.getFromTrace;var J=r(19496);function K(t){var e=1e-4*(t[1]-t[0]);return[t[0]-e,t[1]+e]}q.getAutoRange=J.getAutoRange,q.findExtremes=J.findExtremes,q.coerceRef=function(t,e,r,n,i,o){var a=n.charAt(n.length-1),l=r._fullLayout._subplots[a+"axis"],c=n+"ref",d={};return i||(i=l[0]||("string"==typeof o?o:o[0])),o||(o=i),l=l.concat(l.map((function(t){return t+" domain"}))),d[c]={valType:"enumerated",values:l.concat(o?"string"==typeof o?[o]:o:[]),dflt:i},s.coerce(t,e,d,c)},q.getRefType=function(t){return void 0===t?t:"paper"===t?"paper":"pixel"===t?"pixel":/( domain)$/.test(t)?"domain":"range"},q.coercePosition=function(t,e,r,n,i,o){var a,l;if("range"!==q.getRefType(n))a=s.ensureNumber,l=r(i,o);else{var c=q.getFromId(e,n);l=r(i,o=c.fraction2r(o)),a=c.cleanPos}t[i]=a(l)},q.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:q.getFromId(e,r).cleanPos)(t)},q.redrawComponents=function(t,e){e=e||q.listIds(t);var r=t._fullLayout;function n(n,i,o,s){for(var l=a.getComponentMethod(n,i),c={},d=0;dn&&h2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},q.saveRangeInitial=function(t,e){for(var r=q.list(t,"",!0),n=!1,i=0;i.3*h||d(n)||d(o))){var p=r.dtick/2;t+=t+p.8){var a=Number(r.substr(1));o.exactYears>.8&&a%12==0?t=q.tickIncrement(t,"M6","reverse")+1.5*M:o.exactMonths>.8?t=q.tickIncrement(t,"M1","reverse")+15.5*M:t-=S;var l=q.tickIncrement(t,r);if(l<=n)return l}return t}(b,t,v,c,o)),g=b;g<=d;)g=q.tickIncrement(g,v,!1,o);return{start:e.c2r(b,0,o),end:e.c2r(g,0,o),size:v,_dataSpan:d-c}},q.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var n,o=e.dtick&&i(e._tmin);if(o){var a=q.tickIncrement(e._tmin,e.dtick,!0);n=[e._tmin,.99*a+.01*e._tmin]}else{var l=s.simpleMap(e.range,e.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(t.range=s.simpleMap(n,e.l2r),t._isMinor=!0,q.prepTicks(t,r),o){var c=i(e.dtick),d=i(t.dtick),u=c?e.dtick:+e.dtick.substring(1),h=d?t.dtick:+t.dtick.substring(1);c&&d?rt(u,h)?u===2*T&&h===2*M&&(t.dtick=T):u===2*T&&h===3*M?t.dtick=T:u!==T||(e._input.minor||{}).nticks?nt(u/h,2.5)?t.dtick=u/2:t.dtick=u:t.dtick=M:"M"===String(e.dtick).charAt(0)?d?t.dtick="M1":rt(u,h)?u>=12&&2===h&&(t.dtick="M3"):t.dtick=e.dtick:"L"===String(t.dtick).charAt(0)?"L"===String(e.dtick).charAt(0)?rt(u,h)||(t.dtick=nt(u/h,2.5)?e.dtick/2:e.dtick):t.dtick="D1":"D2"===t.dtick&&+e.dtick>1&&(t.dtick=1)}t.range=e.range}void 0===e.minor._tick0Init&&(t.tick0=e.tick0)},q.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if("auto"===t.tickmode||!t.dtick){var n,o=t.nticks;o||("category"===t.type||"multicategory"===t.type?(n=t.tickfont?s.bigFont(t.tickfont.size||12):15,o=t._length/n):(n="y"===t._id.charAt(0)?40:80,o=s.constrain(t._length/n,4,9)+1),"radialaxis"===t._name&&(o*=2)),t.minor&&"array"!==t.minor.tickmode||"array"===t.tickmode&&(o*=100),t._roughDTick=Math.abs(r[1]-r[0])/o,q.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}"period"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||"M"!==t.dtick.charAt(0))}var n=r(),o=q.getTickFormat(t);if(o){var a=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(o)||(/%[HI]/.test(o)?(e=C,a&&!n&&t.dtickt.range[1],p=!t.ticklabelindex||s.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],f=s.simpleMap(t.range,t.r2l,void 0,void 0,e),m=f[1]=(G?0:1);V--){var H=!V;V?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var W=V?t:s.extendFlat({},t,t.minor);if(H?q.prepMinorTicks(W,t,e):q.prepTicks(W,e),"array"!==W.tickmode)if("sync"!==W.tickmode){var Y=K(f),Z=Y[0],$=Y[1],X=i(W.dtick),J="log"===l&&!(X||"L"===W.dtick.charAt(0)),Q=q.tickFirst(W,e);if(V){if(t._tmin=Q,Q=$:nt<=$;nt=q.tickIncrement(nt,it,m,c)){if(V&&tt++,W.rangebreaks&&!m){if(nt=F)break}if(N.length>R||nt===rt)break;rt=nt;var ot={value:nt};V?(J&&nt!==(0|nt)&&(ot.simpleLabel=!0),d>1&&tt%d&&(ot.skipLabel=!0),N.push(ot)):(ot.minor=!0,B.push(ot))}}else N=[],P=at(t);else V?(N=[],P=st(t,!H)):(B=[],j=st(t,!H))}!B||B.length<2?p=!1:(r=(B[1].value-B[0].value)*(h?-1:1),n=t.tickformat,(/%f/.test(n)?r>=O:/%L/.test(n)?r>=z:/%[SX]/.test(n)?r>=L:/%M/.test(n)?r>=E:/%[HI]/.test(n)?r>=C:/%p/.test(n)?r>=S:/%[Aadejuwx]/.test(n)?r>=M:/%[UVW]/.test(n)?r>=T:/%[Bbm]/.test(n)?r>=A:/%[q]/.test(n)?r>=w:!/%[Yy]/.test(n)||r>=b)||(p=!1));if(p){var lt=N.concat(B);u&&N.length&&(lt=lt.slice(1)),(lt=lt.sort((function(t,e){return t.value-e.value})).filter((function(t,e,r){return 0===e||t.value!==r[e-1].value}))).map((function(t,e){return void 0!==t.minor||t.skipLabel?null:e})).filter((function(t){return null!==t})).forEach((function(t){p.map((function(e){var r=t+e;r>=0&&r0?(o=n-1,a=n):(o=n,a=n);var s,l=t[o].value,c=t[a].value,d=Math.abs(c-l),u=r||d,h=0;u>=b?h=d>=b&&d<=g?d:v:r===x&&u>=w?h=d>=w&&d<=y?d:x:u>=A?h=d>=A&&d<=_?d:k:r===T&&u>=T?h=T:u>=M?h=M:r===S&&u>=S?h=S:r===C&&u>=C&&(h=C),h>=d&&(h=d,s=!0);var p=i+h;if(e.rangebreaks&&h>0){for(var f=0,m=0;m<84;m++){var E=(m+.5)/84;e.maskBreaks(i*(1-E)+E*p)!==I&&f++}(h*=f/84)||(t[n].drop=!0),s&&d>T&&(h=d)}(h>0||0===n)&&(t[n].periodX=i+h/2)}}(U,t,t._definedDelta),t.rangebreaks){var gt="y"===t._id.charAt(0),vt=1;"auto"===t.tickmode&&(vt=t.tickfont?t.tickfont.size:12);var bt=NaN;for(o=N.length-1;o>-1;o--)if(N[o].drop)N.splice(o,1);else{N[o].value=Rt(N[o].value,t);var yt=t.c2p(N[o].value);(gt?bt>yt-vt:btF||nF&&(r.periodX=F),n10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=M&&o<=10||e>=15*M)t._tickround="d";else if(e>=E&&o<=16||e>=C)t._tickround="M";else if(e>=L&&o<=19||e>=E)t._tickround="S";else{var a=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(o,a)-20,t._tickround<0&&(t._tickround=4)}}else if(i(e)||"L"===e.charAt(0)){var s=t.range.map(t.r2d||Number);i(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01),d=void 0===t.minexponent?3:t.minexponent;Math.abs(c)>d&&(yt(t.exponentformat)&&!xt(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function vt(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontTextcase:n.textcase,fontLineposition:n.lineposition,fontShadow:n.shadow,fontColor:n.color}}q.autoTicks=function(t,e,r){var n;function o(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar,0);var a=2*e;if(a>v)e/=v,n=o(10),t.dtick="M"+12*mt(e,n,lt);else if(a>k)e/=k,t.dtick="M"+mt(e,1,ct);else if(a>M){if(t.dtick=mt(e,M,t._hasDayOfWeekBreaks?[1,2,7,14]:ut),!r){var l=q.getTickFormat(t),c="period"===t.ticklabelmode;c&&(t._rawTick0=t.tick0),/%[uVW]/.test(l)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),c&&(t._dowTick0=t.tick0)}}else a>C?t.dtick=mt(e,C,ct):a>E?t.dtick=mt(e,E,dt):a>L?t.dtick=mt(e,L,dt):(n=o(10),t.dtick=mt(e,n,lt))}else if("log"===t.type){t.tick0=0;var d=s.simpleMap(t.range,t.r2l);if(t._isMinor&&(e*=1.5),e>.7)t.dtick=Math.ceil(e);else if(Math.abs(d[1]-d[0])<1){var u=1.5*Math.abs((d[1]-d[0])/e);e=Math.abs(Math.pow(10,d[1])-Math.pow(10,d[0]))/u,n=o(10),t.dtick="L"+mt(e,n,lt)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type||"multicategory"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):Ft(t)?(t.tick0=0,n=1,t.dtick=mt(e,n,ft)):(t.tick0=0,n=o(10),t.dtick=mt(e,n,lt));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&"string"!=typeof t.dtick){var h=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(h)}},q.tickIncrement=function(t,e,r,o){var a=r?-1:1;if(i(e))return s.increment(t,a*e);var l=e.charAt(0),c=a*Number(e.substr(1));if("M"===l)return s.incrementMonth(t,c,o);if("L"===l)return Math.log(Math.pow(10,t)+c)/Math.LN10;if("D"===l){var d="D2"===e?pt:ht,u=t+.01*a,h=s.roundUp(s.mod(u,1),d,r);return Math.floor(u)+Math.log(n.round(Math.pow(10,h),1))/Math.LN10}throw"unrecognized dtick "+String(e)},q.tickFirst=function(t,e){var r=t.r2l||Number,o=s.simpleMap(t.range,r,void 0,void 0,e),a=o[1]=0&&r<=t._length?e:null};if(l&&s.isArrayOrTypedArray(t.ticktext)){var p=s.simpleMap(t.range,t.r2l),f=(Math.abs(p[1]-p[0])-(t._lBreaks||0))/1e4;for(o=0;o ")}else t._prevDateHead=l,c+="
"+l;e.text=c}(t,a,r,c):"log"===d?function(t,e,r,n,o){var a=t.dtick,l=e.x,c=t.tickformat,d="string"==typeof a&&a.charAt(0);if("never"===o&&(o=""),n&&"L"!==d&&(a="L3",d="L"),c||"L"===d)e.text=wt(Math.pow(10,l),t,o,n);else if(i(a)||"D"===d&&s.mod(l+.01,1)<.1){var u=Math.round(l),h=Math.abs(u),p=t.exponentformat;"power"===p||yt(p)&&xt(u)?(e.text=0===u?1:1===u?"10":"10"+(u>1?"":D)+h+"",e.fontSize*=1.25):("e"===p||"E"===p)&&h>2?e.text="1"+p+(u>0?"+":D)+h:(e.text=wt(Math.pow(10,l),t,"","fakehover"),"D1"===a&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if("D"!==d)throw"unrecognized dtick "+String(a);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if("D1"===t.dtick){var f=String(e.text).charAt(0);"0"!==f&&"1"!==f||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,a,0,c,g):"category"===d?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}(t,a):"multicategory"===d?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],o=void 0===i[1]?"":String(i[1]),a=void 0===i[0]?"":String(i[0]);r?e.text=a+" - "+o:(e.text=o,e.text2=a)}(t,a,r):Ft(t)?function(t,e,r,n,i){if("radians"!==t.thetaunit||r)e.text=wt(e.x,t,i,n);else{var o=e.x/180;if(0===o)e.text="0";else{var a=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){for(var r=1;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,i=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(o);if(a[1]>=100)e.text=wt(s.deg2rad(e.x),t,i,n);else{var l=e.x<0;1===a[1]?1===a[0]?e.text="π":e.text=a[0]+"π":e.text=["",a[0],"","⁄","",a[1],"","π"].join(""),l&&(e.text=D+e.text)}}}}(t,a,r,c,g):function(t,e,r,n,i){"never"===i?i="":"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=wt(e.x,t,i,n)}(t,a,0,c,g),n||(t.tickprefix&&!m(t.showtickprefix)&&(a.text=t.tickprefix+a.text),t.ticksuffix&&!m(t.showticksuffix)&&(a.text+=t.ticksuffix)),t.labelalias&&t.labelalias.hasOwnProperty(a.text)){var v=t.labelalias[a.text];"string"==typeof v&&(a.text=v)}return("boundaries"===t.tickson||t.showdividers)&&(a.xbnd=[h(a.x-.5),h(a.x+t.dtick-.5)]),a},q.hoverLabelText=function(t,e,r){r&&(t=s.extendFlat({},t,{hoverformat:r}));var n=s.isArrayOrTypedArray(e)?e[0]:e,i=s.isArrayOrTypedArray(e)?e[1]:void 0;if(void 0!==i&&i!==n)return q.hoverLabelText(t,n,r)+" - "+q.hoverLabelText(t,i,r);var o="log"===t.type&&n<=0,a=q.tickText(t,t.c2l(o?-n:n),"hover").text;return o?0===n?"0":D+a:a};var bt=["f","p","n","μ","m","","k","M","G","T"];function yt(t){return"SI"===t||"B"===t}function xt(t){return t>14||t<-15}function wt(t,e,r,n){var o=t<0,a=e._tickround,l=r||e.exponentformat||"B",c=e._tickexponent,d=q.getTickFormat(e),u=e.separatethousands;if(n){var h={exponentformat:l,minexponent:e.minexponent,dtick:"none"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};gt(h),a=(Number(h._tickround)||0)+4,c=h._tickexponent,e.hoverformat&&(d=e.hoverformat)}if(d)return e._numFormat(d)(t).replace(/-/g,D);var p,f=Math.pow(10,-a)/2;if("none"===l&&(c=0),(t=Math.abs(t))"+p+"
":"B"===l&&9===c?t+="B":yt(l)&&(t+=bt[c/3+5])),o?D+t:t}function _t(t,e){if(t){var r=Object.keys(B).reduce((function(t,r){return-1!==e.indexOf(r)&&B[r].forEach((function(e){t[e]=1})),t}),{});Object.keys(t).forEach((function(e){r[e]||(1===e.length?t[e]=0:delete t[e])}))}}function kt(t,e){for(var r=[],n={},i=0;i1&&r=i.min&&t=0,o=d(t,e[1])<=0;return(r||i)&&(n||o)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":for(e=0;e=a(i)))){r=n;break}break;case"log":for(e=0;e=0&&i.unshift(i.splice(n,1).shift())}}));var a={false:{left:0,right:0}};return s.syncOrAsync(i.map((function(e){return function(){if(e){var n=q.getFromId(t,e);r||(r={}),r.axShifts=a,r.overlayingShiftedAx=o;var i=q.drawOne(t,n,r);return n._shiftPusher&&Nt(n,n._fullDepth||0,a,!0),n._r=n.range.slice(),n._rl=s.simpleMap(n._r,n.r2l),i}}})))},q.drawOne=function(t,e,r){var n,i,l,p=(r=r||{}).axShifts||{},f=r.overlayingShiftedAx||[];e.setScale();var m=t._fullLayout,g=e._id,v=g.charAt(0),b=q.counterLetter(g),y=m._plots[e._mainSubplot];if(y){if(e._shiftPusher=e.autoshift||-1!==f.indexOf(e._id)||-1!==f.indexOf(e.overlaying),e._shiftPusher&"free"===e.anchor){var x=e.linewidth/2||0;"inside"===e.ticks&&(x+=e.ticklen),Nt(e,x,p,!0),Nt(e,e.shift||0,p,!1)}!0===r.skipTitle&&void 0!==e._shift||(e._shift=function(t,e){return t.autoshift?e[t.overlaying][t.side]:t.shift||0}(e,p));var w=y[v+"axislayer"],_=e._mainLinePosition,k=_+=e._shift,A=e._mainMirrorPosition,T=e._vals=q.calcTicks(e),M=[e.mirror,k,A].join("_");for(n=0;n0?r.bottom-d:0,u))));var h=0,p=0;if(e._shiftPusher&&(h=Math.max(u,r.height>0?"l"===l?d-r.left:r.right-d:0),e.title.text!==m._dfltTitle[v]&&(p=(e._titleStandoff||0)+(e._titleScoot||0),"l"===l&&(p+=Mt(e))),e._fullDepth=Math.max(h,p)),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var f=[0,1],g="number"==typeof e._shift?e._shift:0;if("x"===v){if("b"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?d-r.top:0,u),f.reverse()),r.width>0){var y=r.right-(e._offset+e._length);y>0&&(n.xr=1,n.r=y);var x=e._offset-r.left;x>0&&(n.xl=0,n.l=x)}}else if("l"===l?(e._depth=Math.max(r.height>0?d-r.left:0,u),n[l]=e._depth-g):(e._depth=Math.max(r.height>0?r.right-d:0,u),n[l]=e._depth+g,f.reverse()),r.height>0){var w=r.bottom-(e._offset+e._length);w>0&&(n.yb=0,n.b=w);var _=e._offset-r.top;_>0&&(n.yt=1,n.t=_)}n[b]="free"===e.anchor?e.position:e._anchorAxis.domain[f[0]],e.title.text!==m._dfltTitle[v]&&(n[l]+=Mt(e)+(e.title.standoff||0)),e.mirror&&"free"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[c]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[c]+=u),!0===e.mirror||"ticks"===e.mirror?i[b]=e._anchorAxis.domain[f[1]]:"all"!==e.mirror&&"allticks"!==e.mirror||(i[b]=[e._counterDomainMin,e._counterDomainMax][f[1]]))}ut&&(s=a.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),"string"==typeof e.automargin&&(_t(n,e.automargin),_t(i,e.automargin)),o.autoMargin(t,Et(e),n),o.autoMargin(t,Lt(e),i),o.autoMargin(t,zt(e),s)})),s.syncOrAsync(ct)}}function ht(t){var r=g+(t||"tick");return S[r]||(S[r]=function(t,e,r){var n,i,o,a;if(t._selections[e].size())n=1/0,i=-1/0,o=1/0,a=-1/0,t._selections[e].each((function(){var t=Ct(this),e=h.bBox(t.node().parentNode);n=Math.min(n,e.top),i=Math.max(i,e.bottom),o=Math.min(o,e.left),a=Math.max(a,e.right)}));else{var s=q.makeLabelFns(t,r);n=i=s.yFn({dx:0,dy:0,fontSize:0}),o=a=s.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:i,left:o,right:a,height:i-n,width:a-o}}(e,r,k)),S[r]}},q.getTickSigns=function(t,e){var r=t._id.charAt(0),n={x:"top",y:"right"}[r],i=t.side===n?1:-1,o=[-1,1,i,-i];return"inside"!==(e?(t.minor||{}).ticks:t.ticks)==("x"===r)&&(o=o.map((function(t){return-t}))),t.side&&o.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),o},q.makeTransTickFn=function(t){return"x"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},q.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||"",r=function(t){return-1!==e.indexOf(t)},n=r("top"),i=r("left"),o=r("right"),a=r("bottom"),s=r("inside"),l=a||i||n||o;if(!l&&!s)return[0,0];var c=t.side,d=l?(t.tickwidth||0)/2:0,u=3,h=t.tickfont?t.tickfont.size:12;return(a||n)&&(d+=h*V,u+=(t.linewidth||0)/2),(i||o)&&(d+=(t.linewidth||0)/2,u+=3),s&&"top"===c&&(u-=h*(1-V)),(i||n)&&(d=-d),"bottom"!==c&&"right"!==c||(u=-u),[l?d:0,s?u:0]}(t),r=t.ticklabelshift||0,n=t.ticklabelstandoff||0,i=e[0],o=e[1],a=t.range[0]>t.range[1],s=t.ticklabelposition&&-1!==t.ticklabelposition.indexOf("inside"),c=!s;if(r&&(r*=a?-1:1),n){var d=t.side;n*=s&&("top"===d||"left"===d)||c&&("bottom"===d||"right"===d)?1:-1}return"x"===t._id.charAt(0)?function(e){return l(i+t._offset+t.l2p(At(e))+r,o+n)}:function(e){return l(o+n,i+t._offset+t.l2p(At(e))+r)}},q.makeTickPath=function(t,e,r,n){n||(n={});var i=n.minor;if(i&&!t.minor)return"";var o=void 0!==n.len?n.len:i?t.minor.ticklen:t.ticklen,a=t._id.charAt(0),s=(t.linewidth||1)/2;return"x"===a?"M0,"+(e+s*r)+"v"+o*r:"M"+(e+s*r)+",0h"+o*r},q.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||"",o=function(t){return-1!==n.indexOf(t)},a=o("top"),l=o("left"),c=o("right"),d=o("bottom")||l||a||c,u=o("inside"),h="inside"===n&&"inside"===t.ticks||!u&&"outside"===t.ticks&&"boundaries"!==t.tickson,p=0,f=0,m=h?t.ticklen:0;if(u?m*=-1:d&&(m=0),h&&(p+=m,r)){var g=s.deg2rad(r);p=m*Math.cos(g)+1,f=m*Math.sin(g)}t.showticklabels&&(h||t.showline)&&(p+=.2*t.tickfont.size);var v,b,y,x,w,_={labelStandoff:p+=(t.linewidth||1)/2*(u?-1:1),labelShift:f},k=0,A=t.side,T=t._id.charAt(0),M=t.tickangle;if("x"===T)x=(w=!u&&"bottom"===A||u&&"top"===A)?1:-1,u&&(x*=-1),v=f*x,b=e+p*x,y=w?1:-.2,90===Math.abs(M)&&(u?y+=G:y=-90===M&&"bottom"===A?V:90===M&&"top"===A?G:.5,k=G/2*(M/90)),_.xFn=function(t){return t.dx+v+k*t.fontSize},_.yFn=function(t){return t.dy+b+t.fontSize*y},_.anchorFn=function(t,e){if(d){if(l)return"end";if(c)return"start"}return i(e)&&0!==e&&180!==e?e*x<0!==u?"end":"start":"middle"},_.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side!==u?-n:0};else if("y"===T){if(x=(w=!u&&"left"===A||u&&"right"===A)?1:-1,u&&(x*=-1),v=p,b=f*x,y=0,u||90!==Math.abs(M)||(y=-90===M&&"left"===A||90===M&&"right"===A?V:.5),u){var S=i(M)?+M:0;if(0!==S){var C=s.deg2rad(S);k=Math.abs(Math.sin(C))*V*x,y=0}}_.xFn=function(t){return t.dx+e-(v+t.fontSize*y)*x+k*t.fontSize},_.yFn=function(t){return t.dy+b+t.fontSize*G},_.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?"middle":w?"end":"start"},_.heightFn=function(e,r,n){return"right"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return _},q.drawTicks=function(t,e,r){r=r||{};var i=e._id+"tick",o=[].concat(e.minor&&e.minor.ticks?r.vals.filter((function(t){return t.minor&&!t.noTick})):[]).concat(e.ticks?r.vals.filter((function(t){return!t.minor&&!t.noTick})):[]),a=r.layer.selectAll("path."+i).data(o,Tt);a.exit().remove(),a.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(t){return u.stroke(n.select(this),t.minor?e.minor.tickcolor:e.tickcolor)})).style("stroke-width",(function(r){return h.crispRound(t,r.minor?e.minor.tickwidth:e.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),jt(e,[j]),a.attr("transform",r.transFn)},q.drawGrid=function(t,e,r){if(r=r||{},"sync"!==e.tickmode){var i=e._id+"grid",o=e.minor&&e.minor.showgrid,a=o?r.vals.filter((function(t){return t.minor})):[],s=e.showgrid?r.vals.filter((function(t){return!t.minor})):[],l=r.counterAxis;if(l&&q.shouldShowZeroLine(t,e,l))for(var c="array"===e.tickmode,d=0;d=0;v--){var b=v?m:g;if(b){var y=b.selectAll("path."+i).data(v?s:a,Tt);y.exit().remove(),y.enter().append("path").classed(i,1).classed("crisp",!1!==r.crisp),y.attr("transform",r.transFn).attr("d",r.path).each((function(t){return u.stroke(n.select(this),t.minor?e.minor.gridcolor:e.gridcolor||"#ddd")})).style("stroke-dasharray",(function(t){return h.dashStyle(t.minor?e.minor.griddash:e.griddash,t.minor?e.minor.gridwidth:e.gridwidth)})).style("stroke-width",(function(t){return(t.minor?f:e._gw)+"px"})).style("display",null),"function"==typeof r.path&&y.attr("d",r.path)}}jt(e,[R,P])}},q.drawZeroLine=function(t,e,r){r=r||r;var n=e._id+"zl",i=q.shouldShowZeroLine(t,e,r.counterAxis),o=r.layer.selectAll("path."+n).data(i?[{x:0,id:e._id}]:[]);o.exit().remove(),o.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(t,e){return $(t.id,e.id)}))})),o.attr("transform",r.transFn).attr("d",r.path).call(u.stroke,e.zerolinecolor||u.defaultLine).style("stroke-width",h.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),jt(e,[F])},q.drawLabels=function(t,e,r){r=r||{};var o=t._fullLayout,a=e._id,d=r.cls||a+"tick",u=r.vals.filter((function(t){return t.text})),p=r.labelFns,f=r.secondary?0:e.tickangle,m=(e._prevTickAngles||{})[d],g=r.layer.selectAll("g."+d).data(e.showticklabels?u:[],Tt),v=[];function b(t,o){t.each((function(t){var a=n.select(this),s=a.select(".text-math-group"),d=p.anchorFn(t,o),u=r.transFn.call(a.node(),t)+(i(o)&&0!=+o?" rotate("+o+","+p.xFn(t)+","+(p.yFn(t)-t.fontSize/2)+")":""),f=c.lineCount(a),m=H*t.fontSize,g=p.heightFn(t,i(o)?+o:0,(f-1)*m);if(g&&(u+=l(0,g)),s.empty()){var v=a.select("text");v.attr({transform:u,"text-anchor":d}),v.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var b=h.bBox(s.node()).width*{end:-.5,start:.5}[d];s.attr("transform",u+l(b,0))}}))}g.enter().append("g").classed(d,1).append("text").attr("text-anchor","middle").each((function(e){var r=n.select(this),i=t._promises.length;r.call(c.positionText,p.xFn(e),p.yFn(e)).call(h.font,{family:e.font,size:e.fontSize,color:e.fontColor,weight:e.fontWeight,style:e.fontStyle,variant:e.fontVariant,textcase:e.fontTextcase,lineposition:e.fontLineposition,shadow:e.fontShadow}).text(e.text).call(c.convertToTspans,t),t._promises[i]?v.push(t._promises.pop().then((function(){b(r,f)}))):b(r,f)})),jt(e,[N]),g.exit().remove(),r.repositionOnUpdate&&g.each((function(t){n.select(this).select("text").call(c.positionText,p.xFn(t),p.yFn(t))})),e._adjustTickLabelsOverflow=function(){var r=e.ticklabeloverflow;if(r&&"allow"!==r){var i=-1!==r.indexOf("hide"),a="x"===e._id.charAt(0),l=0,c=a?t._fullLayout.width:t._fullLayout.height;if(-1!==r.indexOf("domain")){var d=s.simpleMap(e.range,e.r2l);l=e.l2p(d[0])+e._offset,c=e.l2p(d[1])+e._offset}var u=Math.min(l,c),p=Math.max(l,c),f=e.side,m=1/0,v=-1/0;for(var b in g.each((function(t){var r=n.select(this);if(r.select(".text-math-group").empty()){var o=h.bBox(r.node()),s=0;a?(o.right>p||o.leftp||o.top+(e.tickangle?0:t.fontSize/4)e["_visibleLabelMin_"+r._id]?l.style("display","none"):"tick"!==t.K||i||l.style("display",null)}))}))}))}))},b(g,m+1?m:f);var y=null;e._selections&&(e._selections[d]=g);var x=[function(){return v.length&&Promise.all(v)}];e.automargin&&o._redrawFromAutoMarginCount&&90===m?(y=m,x.push((function(){b(g,m)}))):x.push((function(){if(b(g,f),u.length&&e.autotickangles&&("log"!==e.type||"D"!==String(e.dtick).charAt(0))){y=e.autotickangles[0];var t,n=0,i=[],o=1;g.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),a=Ct(this),s=h.bBox(a.node());o=Math.max(o,c.lineCount(a)),i.push({top:0,bottom:10,height:10,left:r-s.width/2,right:r+s.width/2+2,width:s.width+2})}));var a=("boundaries"===e.tickson||e.showdividers)&&!r.secondary,l=u.length,d=Math.abs((u[l-1].x-u[0].x)*e._m)/(l-1),p=a?d/2:d,m=a?e.ticklen:1.25*n*o,v=p/Math.sqrt(Math.pow(p,2)+Math.pow(m,2)),x=e.autotickangles.map((function(t){return t*Math.PI/180})),w=x.find((function(t){return Math.abs(Math.cos(t))<=v}));void 0===w&&(w=x.reduce((function(t,e){return Math.abs(Math.cos(t))B*I&&(z=I,C[S]=E[S]=O[S])}var U=Math.abs(z-L);U-A>0?A*=1+A/(U-=A):A=0,"y"!==e._id.charAt(0)&&(A=-A),C[M]=_.p2r(_.r2p(E[M])+T*A),"min"===_.autorange||"max reversed"===_.autorange?(C[0]=null,_._rangeInitial0=void 0,_._rangeInitial1=void 0):"max"!==_.autorange&&"min reversed"!==_.autorange||(C[1]=null,_._rangeInitial0=void 0,_._rangeInitial1=void 0),o._insideTickLabelsUpdaterange[_._name+".range"]=C}var G=s.syncOrAsync(x);return G&&G.then&&t._promises.push(G),G},q.getPxPosition=function(t,e){var r,n=t._fullLayout._size,i=e._id.charAt(0),o=e.side;return"free"!==e.anchor?r=e._anchorAxis:"x"===i?r={_offset:n.t+(1-(e.position||0))*n.h,_length:0}:"y"===i&&(r={_offset:n.l+(e.position||0)*n.w+e._shift,_length:0}),"top"===o||"left"===o?r._offset:"bottom"===o||"right"===o?r._offset+r._length:void 0},q.shouldShowZeroLine=function(t,e,r){var n=s.simpleMap(e.range,e.r2l);return n[0]*n[1]<=0&&e.zeroline&&("linear"===e.type||"-"===e.type)&&!(e.rangebreaks&&e.maskBreaks(0)===I)&&(St(e,0)||!function(t,e,r,n){var i=r._mainAxis;if(i){var o=t._fullLayout,a=e._id.charAt(0),s=q.counterLetter(e._id),l=e._offset+(Math.abs(n[0])1)for(n=1;n{"use strict";var n=r(7370),i=r(12822),o=r(32994).BADNUM,a=i.isArrayOrTypedArray,s=i.isDateTime,l=i.cleanNumber,c=Math.round;function d(t,e){return e?n(t):"number"==typeof t}function u(t){return Math.max(1,(t-1)/1e3)}t.exports=function(t,e,r){var i=t,h=r.noMultiCategory;if(a(i)&&!i.length)return"-";if(!h&&function(t){return a(t[0])&&a(t[1])}(i))return"multicategory";if(h&&Array.isArray(i[0])){for(var p=[],f=0;f2*a}(i,e))return"date";var g="strict"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=u(r),i=0,a=0,s={},d=0;d2*i}(i,g)?"category":function(t,e){for(var r=t.length,n=0;n{"use strict";var n=r(7370),i=r(25059),o=r(12822),a=r(46121),s=r(35677),l=r(86130),c=r(49342),d=r(8736),u=r(84411),h=r(12213),p=r(33322),f=r(65412),m=r(46458),g=r(30632),v=r(21197).WEEKDAY_PATTERN,b=r(21197).HOUR_PATTERN;function y(t,e,r){function i(r,n){return o.coerce(t,e,l.rangebreaks,r,n)}if(i("enabled")){var a=i("bounds");if(a&&a.length>=2){var s,c,d="";if(2===a.length)for(s=0;s<2;s++)if(c=w(a[s])){d=v;break}var u=i("pattern",d);if(u===v)for(s=0;s<2;s++)(c=w(a[s]))&&(e.bounds[s]=a[s]=c-1);if(u)for(s=0;s<2;s++)switch(c=a[s],u){case v:if(!n(c))return void(e.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(e.enabled=!1);e.bounds[s]=a[s]=c;break;case b:if(!n(c))return void(e.enabled=!1);if((c=+c)<0||c>24)return void(e.enabled=!1);e.bounds[s]=a[s]=c}if(!1===r.autorange){var h=r.range;if(h[0]h[1])return void(e.enabled=!1)}else if(a[0]>h[0]&&a[1]{"use strict";var n=r(77201),i=n.FORMAT_LINK,o=n.DATE_FORMAT_LINK;function a(t,e){return["Sets the "+t+" formatting rule"+(e?"for `"+e+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+i+"."].join(" ")}function s(t,e){return a(t,e)+[" And for dates see: "+o+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}t.exports={axisHoverFormat:function(t,e){return{valType:"string",dflt:"",editType:"none",description:(e?a:s)("hover text",t)+["By default the values are formatted using "+(e?"generic number format":"`"+t+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:a,descriptionWithDates:s}},99246:(t,e,r)=>{"use strict";var n=r(25059),i=r(21197);function o(t,e){if(e&&e.length)for(var r=0;rn?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},e.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(" ")[0]},e.isLinked=function(t,e){return o(e,t._axisMatchGroups)||o(e,t._axisConstraintGroups)}},33322:(t,e,r)=>{"use strict";var n=r(98507).isTypedArraySpec;t.exports=function(t,e,r,i){if("category"===e.type){var o,a=t.categoryarray,s=Array.isArray(a)&&a.length>0||n(a);s&&(o="array");var l,c=r("categoryorder",o);"array"===c&&(l=r("categoryarray")),s||"array"!==c||(c=e.categoryorder="trace"),"trace"===c?e._initialCategories=[]:"array"===c?e._initialCategories=l.slice():(l=function(t,e){var r,n,i,o=e.dataAttr||t._id.charAt(0),a={};if(e.axData)r=e.axData;else for(r=[],n=0;n{"use strict";var n=r(7370),i=r(12822),o=r(32994),a=o.ONEDAY,s=o.ONEWEEK;e.dtick=function(t,e){var r="log"===e,i="date"===e,o="category"===e,s=i?a:1;if(!t)return s;if(n(t))return(t=Number(t))<=0?s:o?Math.max(1,Math.round(t)):i?Math.max(.1,t):t;if("string"!=typeof t||!i&&!r)return s;var l=t.charAt(0),c=t.substr(1);return(c=n(c)?Number(c):0)<=0||!(i&&"M"===l&&c===Math.round(c)||r&&"L"===l||r&&"D"===l&&(1===c||2===c))?s:t},e.tick0=function(t,e,r,o){return"date"===e?i.cleanDate(t,i.dateTick0(r,o%s==0?1:0)):"D1"!==o&&"D2"!==o?n(t)?Number(t):0:void 0}},21197:(t,e,r)=>{"use strict";var n=r(46233).counter;t.exports={idRegex:{x:n("x","( domain)?"),y:n("y","( domain)?")},attrRegex:n("[xy]axis"),xAxisMatch:n("xaxis"),yAxisMatch:n("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}},69352:(t,e,r)=>{"use strict";var n=r(12822),i=r(19496),o=r(99246).id2name,a=r(86130),s=r(92578),l=r(30632),c=r(32994).ALMOST_EQUAL,d=r(89701).FROM_BL;function u(t,e,r){var i=r.axIds,s=r.layoutOut,l=r.hasImage,c=s._axisConstraintGroups,d=s._axisMatchGroups,u=e._id,m=u.charAt(0),g=((s._splomAxes||{})[m]||{})[u]||{},v=e._id,b="x"===v.charAt(0);function y(r,i){return n.coerce(t,e,a,r,i)}e._matchGroup=null,e._constraintGroup=null,y("constrain",l?"domain":"range"),n.coerce(t,e,{constraintoward:{valType:"enumerated",values:b?["left","center","right"]:["bottom","middle","top"],dflt:b?"center":"middle"}},"constraintoward");var x,w,_=e.type,k=[];for(x=0;xn?i.substr(n):o.substr(r))+a:i+o+t*e:a}function g(t,e){for(var r=e._size,n=r.h/r.w,i={},o=Object.keys(t),a=0;ac*y)||k)for(r=0;rD&&Pz&&(z=P);h/=(z-L)/(2*O),L=l.l2r(L),z=l.l2r(z),l.range=l._input.range=S{"use strict";var n=r(27941),i=r(12822),o=i.numberFormat,a=r(18106),s=r(17520),l=r(25059),c=i.strTranslate,d=r(80394),u=r(17499),h=r(40666),p=r(70410),f=r(75815),m=r(76292),g=r(19846),v=r(14295),b=v.selectingOrDrawing,y=v.freeMode,x=r(89701).FROM_TL,w=r(86748),_=r(39004).redrawReglTraces,k=r(51137),A=r(99246).getFromId,T=r(70059).prepSelect,M=r(70059).clearOutline,S=r(70059).selectOnClick,C=r(92578),E=r(21197),L=E.MINDRAG,z=E.MINZOOM,O=!0;function D(t,e,r,n){var o=i.ensureSingle(t.draglayer,e,r,(function(e){e.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",t.id)}));return o.call(m,n),o.node()}function I(t,e,r,i,o,a,s){var l=D(t,"rect",e,r);return n.select(l).call(h.setRect,i,o,a,s),l}function F(t,e){for(var r=0;r=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function N(t,e,r,n,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",c(r,n)).attr("d",i+"Z")}function B(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("transform",c(e,r)).attr("d","M0,0Z")}function U(t,e,r,n,i,o){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),G(t,e,i,o)}function G(t,e,r,n){r||(t.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function V(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function H(t){O&&t.data&&t._context.showTips&&(i.notifier(i._(t,"Double-click to zoom back out"),"long"),O=!1)}function W(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,z)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function q(t,e,r,n,o){for(var a,s,l,c,d=!1,u={},h={},p=(o||{}).xaHash,f=(o||{}).yaHash,m=0;m=0)i._fullLayout._deactivateShape(i);else{var a=i._fullLayout.clickmode;if(V(i),2!==t||vt||Ht(),gt)a.indexOf("select")>-1&&S(r,i,X,J,e.id,zt),a.indexOf("event")>-1&&p.click(i,r,e.id);else if(1===t&&vt){var s=m?D:O,c="s"===m||"w"===v?0:1,u=s._name+".range["+c+"]",h=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return"date"===t.type?n:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,o("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,o("."+String(r)+"g")(n))}(s,c),f="left",g="middle";if(s.fixedrange)return;m?(g="n"===m?"top":"bottom","right"===s.side&&(f="right")):"e"===v&&(f="right"),i._context.showAxisRangeEntryBoxes&&n.select(xt).call(d.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(h),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:f,verticalAlign:g}).on("edit",(function(t){var e=s.d2r(t);void 0!==e&&l.call("_guiRelayout",i,u,e)}))}}}function It(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(tt,pt*e+wt)),i=Math.max(0,Math.min(et,ft*r+_t)),o=Math.abs(n-wt),a=Math.abs(i-_t);function s(){St="",kt.r=kt.l,kt.t=kt.b,Et.attr("d","M0,0Z")}if(kt.l=Math.min(wt,n),kt.r=Math.max(wt,n),kt.t=Math.min(_t,i),kt.b=Math.max(_t,i),rt.isSubplotConstrained)o>z||a>z?(St="xy",o/tt>a/et?(a=o*et/tt,_t>i?kt.t=_t-a:kt.b=_t+a):(o=a*tt/et,wt>n?kt.l=wt-o:kt.r=wt+o),Et.attr("d",W(kt))):s();else if(nt.isSubplotConstrained)if(o>z||a>z){St="xy";var l=Math.min(kt.l/tt,(et-kt.b)/et),c=Math.max(kt.r/tt,(et-kt.t)/et);kt.l=l*tt,kt.r=c*tt,kt.b=(1-l)*et,kt.t=(1-c)*et,Et.attr("d",W(kt))}else s();else!ot||a0){var d;if(nt.isSubplotConstrained||!it&&1===ot.length){for(d=0;d1&&(void 0!==o.maxallowed&&st===(o.range[0]1&&(void 0!==a.maxallowed&<===(a.range[0]{"use strict";var n=r(27941),i=r(70410),o=r(19846),a=r(76292),s=r(45731).makeDragBox,l=r(21197).DRAGGERSIZE;e.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot)n.select(t).selectAll(".drag").remove();else if(r._has("cartesian")||r._has("splom")){Object.keys(r._plots||{}).sort((function(t,e){if((r._plots[t].mainplot&&!0)===(r._plots[e].mainplot&&!0)){var n=t.split("y"),i=e.split("y");return n[0]===i[0]?Number(n[1]||1)-Number(i[1]||1):Number(n[0]||1)-Number(i[0]||1)}return r._plots[t].mainplot?1:-1})).forEach((function(e){var n=r._plots[e],a=n.xaxis,c=n.yaxis;if(!n.mainplot){var d=s(t,n,a._offset,c._offset,a._length,c._length,"ns","ew");d.onmousemove=function(r){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===e&&t._fullLayout._plots[e]&&i.hover(t,r,e)},i.hover(t,r,e),t._fullLayout._lasthover=d,t._fullLayout._hoversubplot=e},d.onmouseout=function(e){t._dragging||(t._fullLayout._hoversubplot=null,o.unhover(t,e))},t._context.showAxisDragHandles&&(s(t,n,a._offset-l,c._offset-l,l,l,"n","w"),s(t,n,a._offset+a._length,c._offset-l,l,l,"n","e"),s(t,n,a._offset-l,c._offset+c._length,l,l,"s","w"),s(t,n,a._offset+a._length,c._offset+c._length,l,l,"s","e"))}if(t._context.showAxisDragHandles){if(e===a._mainSubplot){var u=a._mainLinePosition;"top"===a.side&&(u-=l),s(t,n,a._offset+.1*a._length,u,.8*a._length,l,"","ew"),s(t,n,a._offset,u,.1*a._length,l,"","w"),s(t,n,a._offset+.9*a._length,u,.1*a._length,l,"","e")}if(e===c._mainSubplot){var h=c._mainLinePosition;"right"!==c.side&&(h-=l),s(t,n,h,c._offset+.1*c._length,l,.8*c._length,"ns",""),s(t,n,h,c._offset+.9*c._length,l,.1*c._length,"s",""),s(t,n,h,c._offset,l,.1*c._length,"n","")}}}));var a=r._hoverlayer.node();a.onmousemove=function(e){e.target=t._fullLayout._lasthover,i.hover(t,e,r._hoversubplot)},a.onclick=function(e){e.target=t._fullLayout._lasthover,i.click(t,e)},a.onmousedown=function(e){t._fullLayout._lasthover.onmousedown(e)},e.updateFx(t)}},e.updateFx=function(t){var e=t._fullLayout,r="pan"===e.dragmode?"move":"crosshair";a(e._draggers,r)}},39859:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822),o=r(99246);t.exports=function(t){return function(e,r){var a=e[t];if(Array.isArray(a))for(var s=n.subplotsRegistry.cartesian,l=s.idRegex,c=r._subplots,d=c.xaxis,u=c.yaxis,h=c.cartesian,p=r._has("cartesian")||r._has("gl2d"),f=0;f{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=r(51137),s=r(40666),l=r(47388).eV,c=r(99246),d=r(21197),u=r(25853),h=o.ensureSingle;function p(t,e,r){return o.ensureSingle(t,e,r,(function(t){t.datum(r)}))}var f=d.zindexSeparator;function m(t,e,r,o,a){for(var c,u,h,p=d.traceLayerClasses,f=t._fullLayout,m=f._zindices,g=f._modules,v=[],b=[],y=0;y1)if(l)e.xlines=h(n,"path","xlines-above"),e.ylines=h(n,"path","ylines-above"),e.xaxislayer=h(n,"g","xaxislayer-above"),e.yaxislayer=h(n,"g","yaxislayer-above");else{if(!o){var u=h(n,"g","layer-subplot");e.shapelayer=h(u,"g","shapelayer"),e.imagelayer=h(u,"g","imagelayer"),e.minorGridlayer=h(n,"g","minor-gridlayer"),e.gridlayer=h(n,"g","gridlayer"),e.zerolinelayer=h(n,"g","zerolinelayer");var m=h(n,"g","layer-between");e.shapelayerBetween=h(m,"g","shapelayer"),e.imagelayerBetween=h(m,"g","imagelayer"),h(n,"path","xlines-below"),h(n,"path","ylines-below"),e.overlinesBelow=h(n,"g","overlines-below"),h(n,"g","xaxislayer-below"),h(n,"g","yaxislayer-below"),e.overaxesBelow=h(n,"g","overaxes-below")}e.overplot=h(n,"g","overplot"),e.plot=h(e.overplot,"g",i),o||(e.xlines=h(n,"path","xlines-above"),e.ylines=h(n,"path","ylines-above"),e.overlinesAbove=h(n,"g","overlines-above"),h(n,"g","xaxislayer-above"),h(n,"g","yaxislayer-above"),e.overaxesAbove=h(n,"g","overaxes-above"),e.xlines=n.select(".xlines-"+a),e.ylines=n.select(".ylines-"+s),e.xaxislayer=n.select(".xaxislayer-"+a),e.yaxislayer=n.select(".yaxislayer-"+s))}else{var g=e.mainplotinfo,v=g.plotgroup,b=i+"-x",y=i+"-y";e.minorGridlayer=g.minorGridlayer,e.gridlayer=g.gridlayer,e.zerolinelayer=g.zerolinelayer,h(g.overlinesBelow,"path",b),h(g.overlinesBelow,"path",y),h(g.overaxesBelow,"g",b),h(g.overaxesBelow,"g",y),e.plot=h(g.overplot,"g",i),h(g.overlinesAbove,"path",b),h(g.overlinesAbove,"path",y),h(g.overaxesAbove,"g",b),h(g.overaxesAbove,"g",y),e.xlines=v.select(".overlines-"+a).select("."+b),e.ylines=v.select(".overlines-"+s).select("."+y),e.xaxislayer=v.select(".overaxes-"+a).select("."+b),e.yaxislayer=v.select(".overaxes-"+s).select("."+y)}o||(l||(p(e.minorGridlayer,"g",e.xaxis._id),p(e.minorGridlayer,"g",e.yaxis._id),e.minorGridlayer.selectAll("g").map((function(t){return t[0]})).sort(c.idSort),p(e.gridlayer,"g",e.xaxis._id),p(e.gridlayer,"g",e.yaxis._id),e.gridlayer.selectAll("g").map((function(t){return t[0]})).sort(c.idSort)),e.xlines.style("fill","none").classed("crisp",!0),e.ylines.style("fill","none").classed("crisp",!0))}function v(t,e){if(t){var r={};for(var i in t.each((function(t){var i=t[0];n.select(this).remove(),b(i,e),r[i]=!0})),e._plots)for(var o=e._plots[i].overlays||[],a=0;a0){var g=p.id;if(-1!==g.indexOf(f))continue;g+=f+(d+1),p=o.extendFlat({},p,{id:g,plot:a._cartesianlayer.selectAll(".subplot").select("."+g)})}for(var v,b=[],y=0;y1&&(_+=f+w),x.push(n+_),r=0;r{"use strict";var n=r(75058),i=r(84226),o=r(68057).T,a=r(98260).extendFlat,s=r(46121).templatedArray,l=r(60393).descriptionWithDates,c=r(32994).ONEDAY,d=r(21197),u=d.HOUR_PATTERN,h=d.WEEKDAY_PATTERN,p={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0},description:["Sets the tick mode for this axis.","If *auto*, the number of ticks is set via `nticks`.","If *linear*, the placement of the ticks is determined by","a starting position `tick0` and a tick step `dtick`","(*linear* is the default value if `tick0` and `dtick` are provided).","If *array*, the placement of the ticks is set via `tickvals`","and the tick text is `ticktext`.","(*array* is the default value if `tickvals` is provided)."].join(" ")},f=a({},p,{values:p.values.slice().concat(["sync"]),description:[p.description,"If *sync*, the number of ticks will sync with the overlayed axis","set by `overlaying` property."].join(" ")});function m(t){return{valType:"integer",min:0,dflt:t?5:0,editType:"ticks",description:["Specifies the maximum number of ticks for the particular axis.","The actual number of ticks will be chosen automatically to be","less than or equal to `nticks`.","Has an effect only if `tickmode` is set to *auto*."].join(" ")}}var g={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the placement of the first tick on this axis.","Use with `dtick`.","If the axis `type` is *log*, then you must take the log of your starting tick","(e.g. to set the starting tick to 100, set the `tick0` to 2)","except when `dtick`=*L* (see `dtick` for more info).","If the axis `type` is *date*, it should be a date string, like date data.","If the axis `type` is *category*, it should be a number, using the scale where","each category is assigned a serial number from zero in the order it appears."].join(" ")},v={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the step in-between ticks on this axis. Use with `tick0`.","Must be a positive number, or special strings available to *log* and *date* axes.","If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n","is the tick number. For example,","to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1.","To set tick marks at 1, 100, 10000, ... set dtick to 2.","To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433.","*log* has several special values; *L*, where `f` is a positive number,","gives ticks linearly spaced in value (but not position).","For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc.","To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5).","`tick0` is ignored for *D1* and *D2*.","If the axis `type` is *date*, then you must convert the time to milliseconds.","For example, to set the interval between ticks to one day,","set `dtick` to 86400000.0.","*date* also has special values *M* gives ticks spaced by a number of months.","`n` must be a positive integer.","To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*.","To set ticks every 4 years, set `dtick` to *M48*"].join(" ")},b={valType:"data_array",editType:"ticks",description:["Sets the values at which ticks on this axis appear.","Only has an effect if `tickmode` is set to *array*.","Used with `ticktext`."].join(" ")},y={valType:"enumerated",values:["outside","inside",""],editType:"ticks",description:["Determines whether ticks are drawn or not.","If **, this axis' ticks are not drawn.","If *outside* (*inside*), this axis' are drawn outside (inside)","the axis lines."].join(" ")};function x(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick length (in px)."};return t||(e.dflt=5),e}function w(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick width (in px)."};return t||(e.dflt=1),e}var _={valType:"color",dflt:i.defaultLine,editType:"ticks",description:"Sets the tick color."},k={valType:"color",dflt:i.lightLine,editType:"ticks",description:"Sets the color of the grid lines."};function A(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the width (in px) of the grid lines."};return t||(e.dflt=1),e}var T=a({},o,{editType:"ticks"}),M={valType:"boolean",editType:"ticks",description:["Determines whether or not grid lines are drawn.","If *true*, the grid lines are drawn at every tick mark."].join(" ")};t.exports={visible:{valType:"boolean",editType:"plot",description:["A single toggle to hide the axis while preserving interaction like dragging.","Default is true when a cheater plot is present on the axis, otherwise","false"].join(" ")},color:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:["Sets default for all colors associated with this axis","all at once: line, font, tick, and grid colors.","Grid color is lightened by blending this with the plot background","Individual pieces can override this."].join(" ")},title:{text:{valType:"string",editType:"ticks",description:["Sets the title of this axis.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:n({editType:"ticks",description:["Sets this axis' title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),standoff:{valType:"number",min:0,editType:"ticks",description:["Sets the standoff distance (in px) between the axis labels and the title text","The default value is a function of the axis tick labels, the title `font.size`","and the axis `linewidth`.","Note that the axis title position is always constrained within the margins,","so the actual standoff distance is always less than the set or default value.","By setting `standoff` and turning on `automargin`, plotly.js will push the","margins to fit the axis title at given standoff distance."].join(" ")},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0,description:["Sets the axis type.","By default, plotly attempts to determined the axis type","by looking into the data of the traces that referenced","the axis in question."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","Defaults to layout.autotypenumbers."].join(" ")},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range of this axis is","computed in relation to the input data.","See `rangemode` for more info.","If `range` is provided and it has a value for both the","lower and upper bound, `autorange` is set to *false*.","Using *min* applies autorange only to set the minimum.","Using *max* applies autorange only to set the maximum.","Using *min reversed* applies autorange only to set the minimum on a reversed axis.","Using *max reversed* applies autorange only to set the maximum on a reversed axis.","Using *reversed* applies autorange on both ends and reverses the axis direction."].join(" ")},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange minimum."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange maximum."].join(" ")},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange minimum if it goes beyond this value.","Has no effect when `autorangeoptions.minallowed` is provided."].join(" ")},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange maximum if it goes beyond this value.","Has no effect when `autorangeoptions.maxallowed` is provided."].join(" ")},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Ensure this value is included in autorange."].join(" ")},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot",description:["If *normal*, the range is computed in relation to the extrema","of the input data.","If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data.","Applies only to linear axes."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0,description:["Sets the range of this axis.","If the axis `type` is *log*, then you must take the log of your","desired range (e.g. to set the range from 1 to 100,","set the range from 0 to 2).","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears.","Leaving either or both elements `null` impacts the default `autorange`."].join(" ")},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the minimum range of this axis."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the maximum range of this axis."].join(" ")},fixedrange:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not this axis is zoom-able.","If true, then zoom is disabled."].join(" ")},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Could be used to set the desired inside range of this axis","(excluding the labels) when `ticklabelposition` of","the anchored axis has *inside*.","Not implemented for axes with `type` *log*.","This would be ignored when `range` is provided."].join(" ")},scaleanchor:{valType:"enumerated",values:[d.idRegex.x.toString(),d.idRegex.y.toString(),!1],editType:"plot",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","changes together with the range of the corresponding axis","such that the scale of pixels per unit is in a constant ratio.","Both axes are still zoomable, but when you zoom one, the other will","zoom the same amount, keeping a fixed midpoint.","`constrain` and `constraintoward` determine how we enforce the constraint.","You can chain these, ie `yaxis: {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}`","but you can only link axes of the same `type`.","The linked axis can have the opposite letter (to constrain the aspect ratio)","or the same letter (to match scales across subplots).","Loops (`yaxis: {scaleanchor: *x*}, xaxis: {scaleanchor: *y*}` or longer) are redundant","and the last constraint encountered will be ignored to avoid possible","inconsistent constraints via `scaleratio`.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Setting `false` allows to remove a default constraint (occasionally,","you may need to prevent a default `scaleanchor` constraint from",'being applied, eg. when having an image trace `yaxis: {scaleanchor: "x"}`',"is set automatically in order for pixels to be rendered as squares,","setting `yaxis: {scaleanchor: false}` allows to remove the constraint)."].join(" ")},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot",description:["If this axis is linked to another by `scaleanchor`, this determines the pixel","to unit scale ratio. For example, if this value is 10, then every unit on","this axis spans 10 times the number of pixels as a unit on the linked axis.","Use this for example to create an elevation profile where the vertical scale","is exaggerated a fixed amount with respect to the horizontal."].join(" ")},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines how that happens:","by increasing the *range*, or by decreasing the *domain*.","Default is *domain* for axes containing image traces, *range* otherwise."].join(" ")},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines which direction we push","the originally specified plot area. Options are *left*, *center* (default),","and *right* for x axes, and *top*, *middle* (default), and *bottom* for y axes."].join(" ")},matches:{valType:"enumerated",values:[d.idRegex.x.toString(),d.idRegex.y.toString()],editType:"calc",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","will match the range of the corresponding axis in data-coordinates space.","Moreover, matching axes share auto-range values, category lists and","histogram auto-bins.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Moreover, note that matching axes must have the same `type`."].join(" ")},rangebreaks:s("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this axis rangebreak is enabled or disabled.","Please note that `rangebreaks` only work for *date* axis type."].join(" ")},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc",description:["Sets the lower and upper bounds of this axis rangebreak.","Can be used with `pattern`."].join(" ")},pattern:{valType:"enumerated",values:[h,u,""],editType:"calc",description:["Determines a pattern on the time line that generates breaks.","If *"+h+"* - days of the week in English e.g. 'Sunday' or `sun`","(matching is case-insensitive and considers only the first three characters),","as well as Sunday-based integers between 0 and 6.","If *"+u+"* - hour (24-hour clock) as decimal numbers between 0 and 24.","for more info.","Examples:","- { pattern: '"+h+"', bounds: [6, 1] }"," or simply { bounds: ['sat', 'mon'] }"," breaks from Saturday to Monday (i.e. skips the weekends).","- { pattern: '"+u+"', bounds: [17, 8] }"," breaks from 5pm to 8am (i.e. skips non-work hours)."].join(" ")},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"},description:["Sets the coordinate values corresponding to the rangebreaks.","An alternative to `bounds`.","Use `dvalue` to set the size of the values along the axis."].join(" ")},dvalue:{valType:"number",editType:"calc",min:0,dflt:c,description:["Sets the size of each `values` item.","The default is one day in milliseconds."].join(" ")},editType:"calc"}),tickmode:f,nticks:m(),tick0:g,dtick:v,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks",description:["Sets the spacing between tick labels as compared to the spacing between ticks.","A value of 1 (default) means each tick gets a label.","A value of 2 means shows every 2nd label.","A larger value n means only every nth tick is labeled.","`tick0` determines which labels are shown.","Not implemented for axes with `type` *log* or *multicategory*, or when `tickmode` is *array*."].join(" ")},tickvals:b,ticktext:{valType:"data_array",editType:"ticks",description:["Sets the text displayed at the ticks position via `tickvals`.","Only has an effect if `tickmode` is set to *array*.","Used with `tickvals`."].join(" ")},ticks:y,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks",description:["Determines where ticks and grid lines are drawn with respect to their","corresponding tick labels.","Only has an effect for axes of `type` *category* or *multicategory*.","When set to *boundaries*, ticks and grid lines are drawn half a category","to the left/bottom of labels."].join(" ")},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks",description:["Determines where tick labels are drawn with respect to their","corresponding ticks and grid lines.","Only has an effect for axes of `type` *date*","When set to *period*, tick labels are drawn in the middle of the period","between ticks."].join(" ")},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc",description:["Determines where tick labels are drawn with respect to the axis","Please note that","top or bottom has no effect on x axes or when `ticklabelmode` is set to *period*.","Similarly","left or right has no effect on y axes or when `ticklabelmode` is set to *period*.","Has no effect on *multicategory* axes or when `tickson` is set to *boundaries*.","When used on axes linked by `matches` or `scaleanchor`,","no extra padding for inside labels would be added by autorange,","so that the scales could match."].join(" ")},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc",description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","Otherwise on *category* and *multicategory* axes the default is *allow*.","In other cases the default is *hide past div*."].join(" ")},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks",description:["Shifts the tick labels by the specified number of pixels in parallel to the axis.","Positive values move the labels in the positive direction of the axis."].join(" ")},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks",description:["Sets the standoff distance (in px) between the axis tick labels and their default position.","A positive `ticklabelstandoff` moves the labels farther away from the plot area","if `ticklabelposition` is *outside*, and deeper into the plot area if","`ticklabelposition` is *inside*. A negative `ticklabelstandoff` works in the opposite","direction, moving outside ticks towards the plot area and inside ticks towards","the outside. If the negative value is large enough, inside ticks can even end up","outside and vice versa."].join(" ")},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc",description:["Only for axes with `type` *date* or *linear*.","Instead of drawing the major tick label, draw the label for the minor tick","that is n positions away from the major tick. E.g. to always draw the label for the","minor tick before each major tick, choose `ticklabelindex` -1. This is useful for date","axes with `ticklabelmode` *period* if you want to label the period that ends with each","major tick instead of the period that begins there."].join(" ")},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle",description:["Determines if the axis lines or/and ticks are mirrored to","the opposite side of the plotting area.","If *true*, the axis lines are mirrored.","If *ticks*, the axis lines and ticks are mirrored.","If *false*, mirroring is disable.","If *all*, axis lines are mirrored on all shared-axes subplots.","If *allticks*, axis lines and ticks are mirrored","on all shared-axes subplots."].join(" ")},ticklen:x(),tickwidth:w(),tickcolor:_,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks",description:"Determines whether or not the tick labels are drawn."},labelalias:{valType:"any",dflt:!1,editType:"ticks",description:["Replacement text for specific tick or hover labels.","For example using {US: 'USA', CA: 'Canada'} changes US to USA","and CA to Canada. The labels we would have shown must match","the keys exactly, after adding any tickprefix or ticksuffix.","For negative numbers the minus sign symbol used (U+2212) is wider than the regular ascii dash.","That means you need to use −1 instead of -1.","labelalias can be used with any axis type, and both keys (if needed)","and values (if desired) can include html-like tags or MathJax."].join(" ")},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks",description:["Determines whether long tick labels automatically grow the figure","margins."].join(" ")},showspikes:{valType:"boolean",dflt:!1,editType:"modebar",description:["Determines whether or not spikes (aka droplines) are drawn for this axis.","Note: This only takes affect when hovermode = closest"].join(" ")},spikecolor:{valType:"color",dflt:null,editType:"none",description:"Sets the spike color. If undefined, will use the series color"},spikethickness:{valType:"number",dflt:3,editType:"none",description:"Sets the width (in px) of the zero line."},spikedash:a({},o,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none",description:["Determines the drawing mode for the spike line","If *toaxis*, the line is drawn from the data point to the axis the ","series is plotted on.","If *across*, the line is drawn across the entire plot area, and","supercedes *toaxis*.","If *marker*, then a marker dot is drawn on the axis the series is","plotted on"].join(" ")},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none",description:"Determines whether spikelines are stuck to the cursor or to the closest datapoints."},tickfont:n({editType:"ticks",description:"Sets the tick font."}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks",description:["Sets the angle of the tick labels with respect to the horizontal.","For example, a `tickangle` of -90 draws the tick labels","vertically."].join(" ")},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks",description:["When `tickangle` is set to *auto*, it will be set to the first","angle in this array that is large enough to prevent label","overlap."].join(" ")},tickprefix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label prefix."},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all tick labels are displayed with a prefix.","If *first*, only the first tick is displayed with a prefix.","If *last*, only the last tick is displayed with a suffix.","If *none*, tick prefixes are hidden."].join(" ")},ticksuffix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label suffix."},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:"Same as `showtickprefix` but for tick suffixes."},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all exponents are shown besides their significands.","If *first*, only the exponent of the first tick is shown.","If *last*, only the exponent of the last tick is shown.","If *none*, no exponents appear."].join(" ")},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks",description:["Determines a formatting rule for the tick exponents.","For example, consider the number 1,000,000,000.","If *none*, it appears as 1,000,000,000.","If *e*, 1e+9.","If *E*, 1E+9.","If *power*, 1x10^9 (with 9 in a super script).","If *SI*, 1G.","If *B*, 1B."].join(" ")},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks",description:["Hide SI prefix for 10^n if |n| is below this number.","This only has an effect when `tickformat` is *SI* or *B*."].join(" ")},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks",description:['If "true", even 4-digit integers are separated'].join(" ")},tickformat:{valType:"string",dflt:"",editType:"ticks",description:l("tick label")},tickformatstops:s("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not this stop is used.","If `false`, this stop is ignored even within its `dtickrange`."].join(" ")},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks",description:["range [*min*, *max*], where *min*, *max* - dtick values","which describe some zoom level, it is possible to omit *min*","or *max* value by passing *null*"].join(" ")},value:{valType:"string",dflt:"",editType:"ticks",description:["string - dtickformat for described zoom level, the same as *tickformat*"].join(" ")},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:l("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle",description:["Determines whether or not a line bounding this axis is drawn."].join(" ")},linecolor:{valType:"color",dflt:i.defaultLine,editType:"layoutstyle",description:"Sets the axis line color."},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle",description:"Sets the width (in px) of the axis line."},showgrid:M,gridcolor:k,gridwidth:A(),griddash:T,zeroline:{valType:"boolean",editType:"ticks",description:["Determines whether or not a line is drawn at along the 0 value","of this axis.","If *true*, the zero line is drawn on top of the grid lines."].join(" ")},zerolinecolor:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:"Sets the line color of the zero line."},zerolinewidth:{valType:"number",dflt:1,editType:"ticks",description:"Sets the width (in px) of the zero line."},showdividers:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not a dividers are drawn","between the category levels of this axis.","Only has an effect on *multicategory* axes."].join(" ")},dividercolor:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:["Sets the color of the dividers","Only has an effect on *multicategory* axes."].join(" ")},dividerwidth:{valType:"number",dflt:1,editType:"ticks",description:["Sets the width (in px) of the dividers","Only has an effect on *multicategory* axes."].join(" ")},anchor:{valType:"enumerated",values:["free",d.idRegex.x.toString(),d.idRegex.y.toString()],editType:"plot",description:["If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to","the corresponding opposite-letter axis.","If set to *free*, this axis' position is determined by `position`."].join(" ")},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot",description:["Determines whether a x (y) axis is positioned","at the *bottom* (*left*) or *top* (*right*)","of the plotting area."].join(" ")},overlaying:{valType:"enumerated",values:["free",d.idRegex.x.toString(),d.idRegex.y.toString()],editType:"plot",description:["If set a same-letter axis id, this axis is overlaid on top of","the corresponding same-letter axis, with traces and axes visible for both","axes.","If *false*, this axis does not overlay any same-letter axes.","In this case, for axes with overlapping domains only the highest-numbered","axis will be visible."].join(" ")},minor:{tickmode:p,nticks:m("minor"),tick0:g,dtick:v,tickvals:b,ticks:y,ticklen:x("minor"),tickwidth:w("minor"),tickcolor:_,gridcolor:k,gridwidth:A("minor"),griddash:T,showgrid:M,editType:"ticks"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot",description:["Sets the layer on which this axis is displayed.","If *above traces*, this axis is displayed above all the subplot's traces","If *below traces*, this axis is displayed below all the subplot's traces,","but above the grid lines.","Useful when used together with scatter-like traces with `cliponaxis`","set to *false* to show markers and/or text nodes above this axis."].join(" ")},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot",description:["Sets the domain of this axis (in plot fraction)."].join(" ")},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot",description:["Sets the position of this axis in the plotting space","(in normalized coordinates).","Only has an effect if `anchor` is set to *free*."].join(" ")},autoshift:{valType:"boolean",dflt:!1,editType:"plot",description:["Automatically reposition the axis to avoid","overlap with other axes with the same `overlaying` value.","This repositioning will account for any `shift` amount applied to other","axes on the same side with `autoshift` is set to true.","Only has an effect if `anchor` is set to *free*."].join(" ")},shift:{valType:"number",editType:"plot",description:["Moves the axis a given number of pixels from where it would have been otherwise.","Accepts both positive and negative values, which will shift the axis either right","or left, respectively.","If `autoshift` is set to true, then this defaults to a padding of -3 if `side` is set to *left*.","and defaults to +3 if `side` is set to *right*. Defaults to 0 if `autoshift` is set to false.","Only has an effect if `anchor` is set to *free*."].join(" ")},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc",description:["Specifies the ordering logic for the case of categorical variables.","By default, plotly uses *trace*, which specifies the order that is present in the data supplied.","Set `categoryorder` to *category ascending* or *category descending* if order should be determined by","the alphanumerical order of the category names.","Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category","is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to","the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.","Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the","numerical order of the values.","Similarly, the order can be determined by the min, max, sum, mean, geometric mean or median of all the values."].join(" ")},categoryarray:{valType:"data_array",editType:"calc",description:["Sets the order in which categories on this axis appear.","Only has an effect if `categoryorder` is set to *array*.","Used with `categoryorder`."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `range`,","`autorange`, and `title` if in `editable: true` configuration.","Defaults to `layout.uirevision`."].join(" ")},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks",description:["Obsolete.","Set `tickmode` to *auto* for old `autotick` *true* behavior.","Set `tickmode` to *linear* for `autotick` *false*."].join(" ")},title:{valType:"string",editType:"ticks",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the axis' title, please use `title.text` now."].join(" ")},titlefont:n({editType:"ticks",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}}},36741:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(66811).isUnifiedHover,a=r(85400),s=r(46121),l=r(13195),c=r(86130),d=r(25119),u=r(91200),h=r(69352),p=r(52869),f=r(99246),m=f.id2name,g=f.name2id,v=r(21197).AX_ID_PATTERN,b=r(25059),y=b.traceIs,x=b.getComponentMethod;function w(t,e,r){Array.isArray(t[e])?t[e].push(r):t[e]=[r]}t.exports=function(t,e,r){var b,_,k=e.autotypenumbers,A={},T={},M={},S={},C={},E={},L={},z={},O={},D={};for(b=0;b{"use strict";var n=r(18106).mix,i=r(84226),o=r(12822);t.exports=function(t,e,r,a){var s=(a=a||{}).dfltColor;function l(r,n){return o.coerce2(t,e,a.attributes,r,n)}var c=l("linecolor",s),d=l("linewidth");r("showline",a.showLine||!!c||!!d)||(delete e.linecolor,delete e.linewidth);var u=l("gridcolor",n(s,a.bgColor,a.blend||i.lightFraction).toRgbString()),h=l("gridwidth"),p=l("griddash");if(r("showgrid",a.showGrid||!!u||!!h||!!p)||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),a.hasMinor){var f=l("minor.gridcolor",n(e.gridcolor,a.bgColor,67).toRgbString()),m=l("minor.gridwidth",e.gridwidth||1),g=l("minor.griddash",e.griddash||"solid");r("minor.showgrid",!!f||!!m||!!g)||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!a.noZeroLine){var v=l("zerolinecolor",s),b=l("zerolinewidth");r("zeroline",a.showGrid||!!v||!!b)||(delete e.zerolinecolor,delete e.zerolinewidth)}}},52869:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822);t.exports=function(t,e,r,o){var a,s,l,c,d,u,h=o.counterAxes||[],p=o.overlayableAxes||[],f=o.letter,m=o.grid,g=o.overlayingDomain;m&&(s=m._domains[f][m._axisMap[e._id]],a=m._anchors[e._id],s&&(l=m[f+"side"].split(" ")[0],c=m.domain[f]["right"===l||"top"===l?1:0])),s=s||[0,1],a=a||(n(t.position)?"free":h[0]||"free"),l=l||("x"===f?"bottom":"left"),c=c||0,d=0,u=!1;var v=i.coerce(t,e,{anchor:{valType:"enumerated",values:["free"].concat(h),dflt:a}},"anchor"),b=i.coerce(t,e,{side:{valType:"enumerated",values:"x"===f?["bottom","top"]:["left","right"],dflt:l}},"side");"free"===v&&("y"===f&&(r("autoshift")&&(c="left"===b?g[0]:g[1],u=!e.automargin||e.automargin,d="left"===b?-3:3),r("shift",d)),r("position",c)),r("automargin",u);var y=!1;if(p.length&&(y=i.coerce(t,e,{overlaying:{valType:"enumerated",values:[!1].concat(p),dflt:!1}},"overlaying")),!y){var x=r("domain",s);x[0]>x[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s),"sync"===e.tickmode&&(e.tickmode="auto")}return r("layer"),e}},12213:(t,e,r)=>{"use strict";var n=r(95768);t.exports=function(t,e,r,i,o){o||(o={});var a=o.tickSuffixDflt,s=n(t);r("tickprefix")&&r("showtickprefix",s),r("ticksuffix",a)&&r("showticksuffix",s)}},46458:(t,e,r)=>{"use strict";var n=r(49826);t.exports=function(t,e,r,i){var o=e._template||{},a=e.type||o.type||"-";r("minallowed"),r("maxallowed");var s,l=r("range");l||i.noInsiderange||"log"===a||(!(s=r("insiderange"))||null!==s[0]&&null!==s[1]||(e.insiderange=!1,s=void 0),s&&(l=r("range",s)));var c,d=e.getAutorangeDflt(l,i),u=r("autorange",d);!l||(null!==l[0]||null!==l[1])&&(null!==l[0]&&null!==l[1]||"reversed"!==u&&!0!==u)&&(null===l[0]||"min"!==u&&"max reversed"!==u)&&(null===l[1]||"max"!==u&&"min reversed"!==u)||(l=void 0,delete e.range,e.autorange=!0,c=!0),c||(u=r("autorange",d=e.getAutorangeDflt(l,i))),u&&(n(r,u,l),"linear"!==a&&"-"!==a||r("rangemode")),e.cleanRange()}},92578:(t,e,r)=>{"use strict";var n=r(89701).FROM_BL;t.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||"center"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],o=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(o+(i[0]-o)*e),t.l2r(o+(i[1]-o)*e)],t.setScale()}},30632:(t,e,r)=>{"use strict";var n=r(27941),i=r(79969).aL,o=r(12822),a=o.numberFormat,s=r(7370),l=o.cleanNumber,c=o.ms2DateTime,d=o.dateTime2ms,u=o.ensureNumber,h=o.isArrayOrTypedArray,p=r(32994),f=p.FP_SAFE,m=p.BADNUM,g=p.LOG_CLIP,v=p.ONEWEEK,b=p.ONEDAY,y=p.ONEHOUR,x=p.ONEMIN,w=p.ONESEC,_=r(99246),k=r(21197),A=k.HOUR_PATTERN,T=k.WEEKDAY_PATTERN;function M(t){return Math.pow(10,t)}function S(t){return null!=t}t.exports=function(t,e){e=e||{};var r=t._id||"x",p=r.charAt(0);function C(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-2*g*Math.abs(n-i))}return m}function E(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var a=d(e,n||t.calendar);if(a===m){if(!s(e))return m;e=+e;var l=Math.floor(10*o.mod(e+.05,1)),c=Math.round(e-l/10);a=d(new Date(c))+l/10}return a}function L(e,r,n){return c(e,r,n||t.calendar)}function z(e){return t._categories[Math.round(e)]}function O(e){if(S(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push("number"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return m}function D(e){if(t._categoriesMap)return t._categoriesMap[e]}function I(t){var e=D(t);return void 0!==e?e:s(t)?+t:void 0}function F(t){return s(t)?+t:D(t)}function R(t,e,r){return n.round(r+e*t,2)}function P(t,e,r){return(t-r)/e}var j=function(e){return s(e)?R(e,t._m,t._b):m},N=function(e){return P(e,t._m,t._b)};if(t.rangebreaks){var B="y"===p;j=function(e){if(!s(e))return m;var r=t._rangebreaks.length;if(!r)return R(e,t._m,t._b);var n=B;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,o=i*e,a=0,l=0;ld)){a=o<(c+d)/2?l:l+1;break}a=l+1}var u=t._B[a]||0;return isFinite(u)?R(e,t._m2,u):0},N=function(e){var r=t._rangebreaks.length;if(!r)return P(e,t._m,t._b);for(var n=0,i=0;it._rangebreaks[i].pmax&&(n=i+1);return P(e,t._m2,t._B[n])}}t.c2l="log"===t.type?C:u,t.l2c="log"===t.type?M:u,t.l2p=j,t.p2l=N,t.c2p="log"===t.type?function(t,e){return j(C(t,e))}:j,t.p2c="log"===t.type?function(t){return M(N(t))}:N,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=u,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=N,t.cleanPos=u):"log"===t.type?(t.d2r=t.d2l=function(t,e){return C(l(t),e)},t.r2d=t.r2c=function(t){return M(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=u,t.c2r=C,t.l2d=M,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return M(N(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=N,t.cleanPos=u):"date"===t.type?(t.d2r=t.r2d=o.identity,t.d2c=t.r2c=t.d2l=t.r2l=E,t.c2d=t.c2r=t.l2d=t.l2r=L,t.d2p=t.r2p=function(e,r,n){return t.l2p(E(e,0,n))},t.p2d=t.p2r=function(t,e,r){return L(N(t),e,r)},t.cleanPos=function(e){return o.cleanDate(e,m,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=O,t.r2d=t.c2d=t.l2d=z,t.d2r=t.d2l_noadd=I,t.r2c=function(e){var r=F(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=u,t.r2l=F,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return z(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:u(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=z,t.d2r=t.d2l_noadd=I,t.r2c=function(e){var r=I(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=D,t.l2r=t.c2r=u,t.r2l=I,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return z(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return Array.isArray(t)||"string"==typeof t&&""!==t?t:u(t)},t.setupMultiCategory=function(n){var i,a,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var c in l)if(c!==r){var d=e[_.id2name(c)];s=s.concat(d._traceIndices)}var u=[[0,{}],[0,{}]],f=[];for(i=0;il[1]&&(i[s?0:1]=n),i[0]===i[1]){var c=t.l2r(r),d=t.l2r(n);if(void 0!==r){var u=c+1;void 0!==n&&(u=Math.min(u,d)),i[s?1:0]=u}if(void 0!==n){var h=d+1;void 0!==r&&(h=Math.max(h,c)),i[s?0:1]=h}}}},t.cleanRange=function(e,r){t._cleanRange(e,r),t.limitRange(e)},t._cleanRange=function(e,r){r||(r={}),e||(e="range");var n,i,a=o.nestedProperty(t,e).get();if(i=(i="date"===t.type?o.dfltRange(t.calendar):"y"===p?k.DFLTRANGEY:"realaxis"===t._name?[0,1]:r.dfltRange||k.DFLTRANGEX).slice(),"tozero"!==t.rangemode&&"nonnegative"!==t.rangemode||(i[0]=0),a&&2===a.length){var l=null===a[0],c=null===a[1];for("date"!==t.type||t.autorange||(a[0]=o.cleanDate(a[0],m,t.calendar),a[1]=o.cleanDate(a[1],m,t.calendar)),n=0;n<2;n++)if("date"===t.type){if(!o.isDateTime(a[n],t.calendar)){t[e]=i;break}if(t.r2l(a[0])===t.r2l(a[1])){var d=o.constrain(t.r2l(a[0]),o.MIN_MS+1e3,o.MAX_MS-1e3);a[0]=t.l2r(d-1e3),a[1]=t.l2r(d+1e3);break}}else{if(!s(a[n])){if(l||c||!s(a[1-n])){t[e]=i;break}a[n]=a[1-n]*(n?10:.1)}if(a[n]<-f?a[n]=-f:a[n]>f&&(a[n]=f),a[0]===a[1]){var u=Math.max(1,Math.abs(1e-6*a[0]));a[0]-=u,a[1]+=u}}}else o.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=_.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var o=r&&t._r?"_r":"range",a=t.calendar;t.cleanRange(o);var s,l,c=t.r2l(t[o][0],a),d=t.r2l(t[o][1],a),u="y"===p;if(u?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(c-d),t._b=-t._m*d):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(d-c),t._b=-t._m*c),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks&&(t._rangebreaks=t.locateBreaks(Math.min(c,d),Math.max(c,d)),t._rangebreaks.length)){for(s=0;sd&&(h=!h),h&&t._rangebreaks.reverse();var f=h?-1:1;for(t._m2=f*t._length/(Math.abs(d-c)-t._lBreaks),t._B.push(-t._m2*(u?d:c)),s=0;si&&(i+=7,ai&&(i+=24,a=n&&a=n&&e=s.min&&(ts.max&&(s.max=n),i=!1)}i&&c.push({min:t,max:n})}};for(n=0;n{"use strict";t.exports=function(t){var e=["showexponent","showtickprefix","showticksuffix"].filter((function(e){return void 0!==t[e]}));if(e.every((function(r){return t[r]===t[e[0]]}))||1===e.length)return t[e[0]]}},84411:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499).contrast,o=r(86130),a=r(95768),s=r(35677);function l(t,e){function r(r,i){return n.coerce(t,e,o.tickformatstops,r,i)}r("enabled")&&(r("dtickrange"),r("value"))}t.exports=function(t,e,r,c,d){d||(d={});var u=r("labelalias");n.isPlainObject(u)||delete e.labelalias;var h=a(t);if(r("showticklabels")){d.noTicklabelshift||r("ticklabelshift"),d.noTicklabelstandoff||r("ticklabelstandoff");var p=d.font||{},f=e.color,m=-1!==(e.ticklabelposition||"").indexOf("inside")?i(d.bgColor):f&&f!==o.color.dflt?f:p.color;if(n.coerceFont(r,"tickfont",p,{overrideDflt:{color:m}}),d.noTicklabelstep||"multicategory"===c||"log"===c||r("ticklabelstep"),!d.noAng){var g=r("tickangle");d.noAutotickangles||"auto"!==g||r("autotickangles")}if("category"!==c){var v=r("tickformat");s(t,e,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:l}),e.tickformatstops.length||delete e.tickformatstops,d.noExp||v||"date"===c||(r("showexponent",h),r("exponentformat"),r("minexponent"),r("separatethousands"))}}}},8736:(t,e,r)=>{"use strict";var n=r(12822),i=r(86130);t.exports=function(t,e,r,o){var a=o.isMinor,s=a?t.minor||{}:t,l=a?e.minor:e,c=a?i.minor:i,d=a?"minor.":"",u=n.coerce2(s,l,c,"ticklen",a?.6*(e.ticklen||5):void 0),h=n.coerce2(s,l,c,"tickwidth",a?e.tickwidth||1:void 0),p=n.coerce2(s,l,c,"tickcolor",(a?e.tickcolor:void 0)||l.color);r(d+"ticks",!a&&o.outerTicks||u||h||p?"outside":"")||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}},49342:(t,e,r)=>{"use strict";var n=r(84696),i=r(12822).isArrayOrTypedArray,o=r(98507).isTypedArraySpec,a=r(98507).decodeTypedArraySpec;t.exports=function(t,e,r,s,l){l||(l={});var c=l.isMinor,d=c?t.minor||{}:t,u=c?e.minor:e,h=c?"minor.":"";function p(t){var e=d[t];return o(e)&&(e=a(e)),void 0!==e?e:(u._template||{})[t]}var f=p("tick0"),m=p("dtick"),g=p("tickvals"),v=r(h+"tickmode",i(g)?"array":m?"linear":"auto");if("auto"===v||"sync"===v)r(h+"nticks");else if("linear"===v){var b=u.dtick=n.dtick(m,s);u.tick0=n.tick0(f,s,e.calendar,b)}else"multicategory"!==s&&(void 0===r(h+"tickvals")?u.tickmode="auto":c||r("ticktext"))}},88313:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=r(40666),s=r(75815);t.exports=function(t,e,r,l){var c=t._fullLayout;if(0!==e.length){var d,u,h,p;l&&(d=l());var f=n.ease(r.easing);return t._transitionData._interruptCallbacks.push((function(){return window.cancelAnimationFrame(p),p=null,function(){for(var r={},n=0;nr.duration?(function(){for(var r={},n=0;n rect").call(a.setTranslate,0,0).call(a.setScale,1,1),t.plot.call(a.setTranslate,e._offset,r._offset).call(a.setScale,1,1);var n=t.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(a.setPointGroupScale,1,1),n.selectAll(".textpoint").call(a.setTextPointsScale,1,1),n.call(a.hideOutsideRangePoints,t)}function g(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,c=i._length,d=l._length,u=!!e.xr1,h=!!e.yr1,p=[];if(u){var f=o.simpleMap(e.xr0,i.r2l),m=o.simpleMap(e.xr1,i.r2l),g=f[1]-f[0],v=m[1]-m[0];p[0]=(f[0]*(1-r)+r*m[0]-f[0])/(f[1]-f[0])*c,p[2]=c*(1-r+r*v/g),i.range[0]=i.l2r(f[0]*(1-r)+r*m[0]),i.range[1]=i.l2r(f[1]*(1-r)+r*m[1])}else p[0]=0,p[2]=c;if(h){var b=o.simpleMap(e.yr0,l.r2l),y=o.simpleMap(e.yr1,l.r2l),x=b[1]-b[0],w=y[1]-y[0];p[1]=(b[1]*(1-r)+r*y[1]-b[1])/(b[0]-b[1])*d,p[3]=d*(1-r+r*w/x),l.range[0]=i.l2r(b[0]*(1-r)+r*y[0]),l.range[1]=l.l2r(b[1]*(1-r)+r*y[1])}else p[1]=0,p[3]=d;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var _=u?c/p[2]:1,k=h?d/p[3]:1,A=u?p[0]:0,T=h?p[1]:0,M=u?p[0]/p[2]*c:0,S=h?p[1]/p[3]*d:0,C=i._offset-M,E=l._offset-S;n.clipRect.call(a.setTranslate,A,T).call(a.setScale,1/_,1/k),n.plot.call(a.setTranslate,C,E).call(a.setScale,_,k),a.setPointGroupScale(n.zoomScalePts,1/_,1/k),a.setTextPointsScale(n.zoomScaleTxt,1/_,1/k)}s.redrawComponents(t)}},25119:(t,e,r)=>{"use strict";var n=r(25059).traceIs,i=r(17821);function o(t){return{v:"x",h:"y"}[t.orientation||"v"]}function a(t,e){var r=o(t),i=n(t,"box-violin"),a=n(t._fullInput||{},"candlestick");return i&&!a&&e===r&&void 0===t[r]&&void 0===t[r+"0"]}t.exports=function(t,e,r,s){r("autotypenumbers",s.autotypenumbersDflt),"-"===r("type",(s.splomStash||{}).type)&&(function(t,e){if("-"===t.type){var r,s=t._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var c=function(t,e,r){for(var n=0;n0&&(i["_"+r+"axes"]||{})[e])return i;if((i[r+"axis"]||r)===e){if(a(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}(e,s,l);if(c)if("histogram"!==c.type||l!=={v:"y",h:"x"}[c.orientation||"v"]){var d=l+"calendar",u=c[d],h={noMultiCategory:!n(c,"cartesian")||n(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&l==={h:"x",v:"y"}[c.orientation||"v"]&&(h.noMultiCategory=!0),h.autotypenumbers=t.autotypenumbers,a(c,l)){var p=o(c),f=[];for(r=0;r{"use strict";var n=r(25059),i=r(12822);function o(t,e,r){var n,o,a,s=!1;if("data"===e.type)n=t._fullData[null!==e.traces?e.traces[0]:0];else{if("layout"!==e.type)return!1;n=t._fullLayout}return o=i.nestedProperty(n,e.prop).get(),(a=r[e.type]=r[e.type]||{}).hasOwnProperty(e.prop)&&a[e.prop]!==o&&(s=!0),a[e.prop]=o,{changed:s,value:o}}function a(t,e){var r=[],n=e[0],o={};if("string"==typeof n)o[n]=e[1];else{if(!i.isPlainObject(n))return r;o=n}return l(o,(function(t,e,n){r.push({type:"layout",prop:t,value:n})}),"",0),r}function s(t,e){var r,n,o,a,s=[];if(n=e[0],o=e[1],r=e[2],a={},"string"==typeof n)a[n]=o;else{if(!i.isPlainObject(n))return s;a=n,void 0===r&&(r=o)}return void 0===r&&(r=null),l(a,(function(e,n,i){var o,a;if(Array.isArray(i)){a=i.slice();var l=Math.min(a.length,t.data.length);r&&(l=Math.min(l,r.length)),o=[];for(var c=0;c0?".":"")+o;i.isPlainObject(a)?l(a,e,s,n+1):e(s,o,a)}}))}e.manageCommandObserver=function(t,r,n,a){var s={},l=!0;r&&r._commandObserver&&(s=r._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=e.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(r&&r._commandObserver){if(c)return s;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,s}if(c){o(t,c,s.cache),s.check=function(){if(l){var e=o(t,c,s.cache);return e.changed&&a&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(a({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var d=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],u=0;u{"use strict";var n=r(98260).extendFlat;e.u=function(t,e){e=e||{};var r={valType:"info_array",editType:(t=t||{}).editType,items:[{valType:"number",min:0,max:1,editType:t.editType},{valType:"number",min:0,max:1,editType:t.editType}],dflt:[0,1]},i=t.name?t.name+" ":"",o=t.trace?"trace ":"subplot ",a=e.description?" "+e.description:"",s={x:n({},r,{description:["Sets the horizontal domain of this ",i,o,"(in plot fraction).",a].join("")}),y:n({},r,{description:["Sets the vertical domain of this ",i,o,"(in plot fraction).",a].join("")}),editType:t.editType};return t.noGridCell||(s.row={valType:"integer",min:0,dflt:0,editType:t.editType,description:["If there is a layout grid, use the domain ","for this row in the grid for this ",i,o,".",a].join("")},s.column={valType:"integer",min:0,dflt:0,editType:t.editType,description:["If there is a layout grid, use the domain ","for this column in the grid for this ",i,o,".",a].join("")}),s},e.N=function(t,e,r,n){var i=n&&n.x||[0,1],o=n&&n.y||[0,1],a=e.grid;if(a){var s=r("domain.column");void 0!==s&&(s{"use strict";t.exports=function(t){var e=t.variantValues,r=t.editType,n=t.colorEditType;void 0===n&&(n=r);var i={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal",description:["Sets the weight (or boldness) of the font."].join(" ")};t.noNumericWeightValues&&(i.valType="enumerated",i.values=i.extras,i.extras=void 0,i.min=void 0,i.max=void 0);var o={family:{valType:"string",noBlank:!0,strict:!0,editType:r,description:["HTML font family - the typeface that will be applied by the web browser.","The web browser will only be able to apply a font if it is available on the system","which it operates. Provide multiple font families, separated by commas, to indicate","the preference in which to apply fonts if they aren't available on the system.","The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server,","where only a select number of","fonts are installed and supported.","These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*,","*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,","*PT Sans Narrow*, *Raleway*, *Times New Roman*."].join(" ")},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:i,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal",description:["Sets whether a font should be styled with a normal or italic face from its family."].join(" ")},variant:t.noFontVariant?void 0:{editType:r,valType:"enumerated",values:e||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal",description:["Sets the variant of the font."].join(" ")},textcase:t.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal",description:["Sets capitalization of text.","It can be used to make text appear in all-uppercase or all-lowercase,","or with each word capitalized."].join(" ")},lineposition:t.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none",description:["Sets the kind of decoration line(s) with text,","such as an *under*, *over* or *through*","as well as combinations e.g. *under+over*, etc."].join(" ")},shadow:t.noFontShadow?void 0:{editType:r,valType:"string",dflt:t.autoShadowDflt?"auto":"none",description:["Sets the shape and color of the shadow behind text.","*auto* places minimal shadow and applies contrast text font color.","See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options."].join(" ")},editType:r,description:""+(t.description||"")};return t.autoSize&&(o.size.dflt="auto"),t.autoColor&&(o.color.dflt="auto"),t.arrayOk&&(o.family.arrayOk=!0,o.weight.arrayOk=!0,o.style.arrayOk=!0,t.noFontVariant||(o.variant.arrayOk=!0),t.noFontTextcase||(o.textcase.arrayOk=!0),t.noFontLineposition||(o.lineposition.arrayOk=!0),t.noFontShadow||(o.shadow.arrayOk=!0),o.size.arrayOk=!0,o.color.arrayOk=!0),o}},53874:t=>{"use strict";t.exports={_isLinkedToArray:"frames_entry",group:{valType:"string",description:["An identifier that specifies the group to which the frame belongs,","used by animate to select a subset of frames."].join(" ")},name:{valType:"string",description:"A label by which to identify the frame"},traces:{valType:"any",description:["A list of trace indices that identify the respective traces in the","data attribute"].join(" ")},baseframe:{valType:"string",description:["The name of the frame into which this frame's properties are merged","before applying. This is used to unify properties and avoid needing","to specify the same values for the same properties in multiple frames."].join(" ")},data:{valType:"any",description:["A list of traces this frame modifies. The format is identical to the","normal trace definition."].join(" ")},layout:{valType:"any",description:["Layout properties which this frame modifies. The format is identical","to the normal layout definition."].join(" ")}}},47388:(t,e,r)=>{"use strict";var n=r(25059),i=r(21197).SUBPLOT_PATTERN;e.eV=function(t,e,r){var i,o=[],a=[];if(!(i="string"==typeof e?n.getModule(e).plot:"function"==typeof e?e:e.plot))return[o,t];for(var s=r,l=0;l{"use strict";var n=r(62309).overrideAll,i=r(53572),o=r(85833),a=r(47388).KO,s=r(12822),l=r(25853),c="gl3d",d="scene";e.name=c,e.attr=d,e.idRoot=d,e.idRegex=e.attrRegex=s.counterRegex("scene"),e.attributes=r(816),e.layoutAttributes=r(41019),e.baseLayoutAttrOverrides=n({hoverlabel:i.hoverlabel},"plot","nested"),e.supplyLayoutDefaults=r(13351),e.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots[c],i=0;i{"use strict";t.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's 3D coordinate system and","a 3D scene.","If *scene* (the default value), the (x,y,z) coordinates refer to","`layout.scene`.","If *scene2*, the (x,y,z) coordinates refer to `layout.scene2`,","and so on."].join(" ")}}},82854:(t,e,r)=>{"use strict";var n=r(17499),i=r(86130),o=r(98260).extendFlat,a=r(62309).overrideAll;t.exports=a({visible:i.visible,showspikes:{valType:"boolean",dflt:!0,description:["Sets whether or not spikes starting from","data points to this axis' wall are shown on hover."].join(" ")},spikesides:{valType:"boolean",dflt:!0,description:["Sets whether or not spikes extending from the","projection data points to this axis' wall boundaries","are shown on hover."].join(" ")},spikethickness:{valType:"number",min:0,dflt:2,description:"Sets the thickness (in px) of the spikes."},spikecolor:{valType:"color",dflt:n.defaultLine,description:"Sets the color of the spikes."},showbackground:{valType:"boolean",dflt:!1,description:["Sets whether or not this axis' wall","has a background color."].join(" ")},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)",description:"Sets the background color of this axis' wall."},showaxeslabels:{valType:"boolean",dflt:!0,description:"Sets whether or not this axis is labeled"},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:{text:i.title.text,font:i.title.font},type:o({},i.type,{values:["-","linear","log","date","category"]}),autotypenumbers:i.autotypenumbers,autorange:i.autorange,autorangeoptions:{minallowed:i.autorangeoptions.minallowed,maxallowed:i.autorangeoptions.maxallowed,clipmin:i.autorangeoptions.clipmin,clipmax:i.autorangeoptions.clipmax,include:i.autorangeoptions.include,editType:"plot"},rangemode:i.rangemode,minallowed:i.minallowed,maxallowed:i.maxallowed,range:o({},i.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:i.minor.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,mirror:i.mirror,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,labelalias:i.labelalias,tickfont:i.tickfont,tickangle:i.tickangle,tickprefix:i.tickprefix,showtickprefix:i.showtickprefix,ticksuffix:i.ticksuffix,showticksuffix:i.showticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:i.showline,linecolor:i.linecolor,linewidth:i.linewidth,showgrid:i.showgrid,gridcolor:o({},i.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:i.gridwidth,zeroline:i.zeroline,zerolinecolor:i.zerolinecolor,zerolinewidth:i.zerolinewidth,_deprecated:{title:i._deprecated.title,titlefont:i._deprecated.titlefont}},"plot","from-root")},20049:(t,e,r)=>{"use strict";var n=r(18106).mix,i=r(12822),o=r(46121),a=r(82854),s=r(25119),l=r(91200),c=["xaxis","yaxis","zaxis"],d=13600/187;t.exports=function(t,e,r){var u,h;function p(t,e){return i.coerce(u,h,a,t,e)}for(var f=0;f{"use strict";var n=r(17235),i=r(12822),o=["xaxis","yaxis","zaxis"];function a(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}a.prototype.merge=function(t,e){for(var r=this,a=0;a<3;++a){var s=e[o[a]];s.visible?(r.labels[a]=t._meta?i.templateString(s.title.text,t._meta):s.title.text,"font"in s.title&&(s.title.font.color&&(r.labelColor[a]=n(s.title.font.color)),s.title.font.family&&(r.labelFont[a]=s.title.font.family),s.title.font.size&&(r.labelSize[a]=s.title.font.size),s.title.font.weight&&(r.labelFontWeight[a]=s.title.font.weight),s.title.font.style&&(r.labelFontStyle[a]=s.title.font.style),s.title.font.variant&&(r.labelFontVariant[a]=s.title.font.variant)),"showline"in s&&(r.lineEnable[a]=s.showline),"linecolor"in s&&(r.lineColor[a]=n(s.linecolor)),"linewidth"in s&&(r.lineWidth[a]=s.linewidth),"showgrid"in s&&(r.gridEnable[a]=s.showgrid),"gridcolor"in s&&(r.gridColor[a]=n(s.gridcolor)),"gridwidth"in s&&(r.gridWidth[a]=s.gridwidth),"log"===s.type?r.zeroEnable[a]=!1:"zeroline"in s&&(r.zeroEnable[a]=s.zeroline),"zerolinecolor"in s&&(r.zeroLineColor[a]=n(s.zerolinecolor)),"zerolinewidth"in s&&(r.zeroLineWidth[a]=s.zerolinewidth),"ticks"in s&&s.ticks?r.lineTickEnable[a]=!0:r.lineTickEnable[a]=!1,"ticklen"in s&&(r.lineTickLength[a]=r._defaultLineTickLength[a]=s.ticklen),"tickcolor"in s&&(r.lineTickColor[a]=n(s.tickcolor)),"tickwidth"in s&&(r.lineTickWidth[a]=s.tickwidth),"tickangle"in s&&(r.tickAngle[a]="auto"===s.tickangle?-3600:Math.PI*-s.tickangle/180),"showticklabels"in s&&(r.tickEnable[a]=s.showticklabels),"tickfont"in s&&(s.tickfont.color&&(r.tickColor[a]=n(s.tickfont.color)),s.tickfont.family&&(r.tickFont[a]=s.tickfont.family),s.tickfont.size&&(r.tickSize[a]=s.tickfont.size),s.tickfont.weight&&(r.tickFontWeight[a]=s.tickfont.weight),s.tickfont.style&&(r.tickFontStyle[a]=s.tickfont.style),s.tickfont.variant&&(r.tickFontVariant[a]=s.tickfont.variant)),"mirror"in s?-1!==["ticks","all","allticks"].indexOf(s.mirror)?(r.lineTickMirror[a]=!0,r.lineMirror[a]=!0):!0===s.mirror?(r.lineTickMirror[a]=!1,r.lineMirror[a]=!0):(r.lineTickMirror[a]=!1,r.lineMirror[a]=!1):r.lineMirror[a]=!1,"showbackground"in s&&!1!==s.showbackground?(r.backgroundEnable[a]=!0,r.backgroundColor[a]=n(s.backgroundcolor)):r.backgroundEnable[a]=!1):(r.tickEnable[a]=!1,r.labelEnable[a]=!1,r.lineEnable[a]=!1,r.lineTickEnable[a]=!1,r.gridEnable[a]=!1,r.zeroEnable[a]=!1,r.backgroundEnable[a]=!1)}},t.exports=function(t,e){var r=new a;return r.merge(t,e),r}},13351:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(25059),a=r(84313),s=r(20049),l=r(41019),c=r(47388).KO,d="gl3d";function u(t,e,r,n){for(var a=r("bgcolor"),l=i.combine(a,n.paper_bgcolor),u=["up","center","eye"],h=0;h.999&&(g="turntable"):g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",n.getDfltFromLayout("hovermode"))}t.exports=function(t,e,r){var i=e._basePlotModules.length>1;a(t,e,r,{type:d,attributes:l,handleDefaults:u,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},41019:(t,e,r)=>{"use strict";var n=r(82854),i=r(40365).u,o=r(98260).extendFlat,a=r(12822).counterRegex;function s(t,e,r){return{x:{valType:"number",dflt:t,editType:"camera"},y:{valType:"number",dflt:e,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}t.exports={_arrayAttrRegexps:[a("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:o(s(0,0,1),{description:["Sets the (x,y,z) components of the 'up' camera vector.","This vector determines the up direction of this scene","with respect to the page.","The default is *{x: 0, y: 0, z: 1}* which means that","the z axis points up."].join(" ")}),center:o(s(0,0,0),{description:["Sets the (x,y,z) components of the 'center' camera vector","This vector determines the translation (x,y,z) space","about the center of this scene.","By default, there is no such translation."].join(" ")}),eye:o(s(1.25,1.25,1.25),{description:["Sets the (x,y,z) components of the 'eye' camera vector.","This vector determines the view point about the origin","of this scene."].join(" ")}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc",description:["Sets the projection type. The projection type could be","either *perspective* or *orthographic*. The default is","*perspective*."].join(" ")},editType:"calc"},editType:"camera"},domain:i({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0},description:["If *cube*, this scene's axes are drawn as a cube,","regardless of the axes' ranges.","If *data*, this scene's axes are drawn","in proportion with the axes' ranges.","If *manual*, this scene's axes are drawn","in proportion with the input of *aspectratio*","(the default behavior if *aspectratio* is provided).","If *auto*, this scene's axes are drawn","using the results of *data* except when one axis","is more than four times the size of the two others,","where in that case the results of *cube* are used."].join(" ")},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"},description:["Sets this scene's axis aspectratio."].join(" ")},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot",description:["Determines the mode of drag interactions for this scene."].join(" ")},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions for this scene."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in camera attributes.","Defaults to `layout.uirevision`."].join(" ")},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera",description:"Obsolete. Use `camera` instead."}}}},63306:(t,e,r)=>{"use strict";var n=r(17235),i=["xaxis","yaxis","zaxis"];function o(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}o.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[i[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=n(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},t.exports=function(t){var e=new o;return e.merge(t),e}},1285:(t,e,r)=>{"use strict";t.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var d=s[o[c]];if(d._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/t.dataScale[c],Math.abs(d._length)===1/0||isNaN(d._length))l[c]=[];else{d._input_range=d.range.slice(),d.range[0]=r[c].lo/t.dataScale[c],d.range[1]=r[c].hi/t.dataScale[c],d._m=1/(t.dataScale[c]*r[c].pixelsPerDataUnit),d.range[0]===d.range[1]&&(d.range[0]-=1,d.range[1]+=1);var u=d.tickmode;if("auto"===d.tickmode){d.tickmode="linear";var h=d.nticks||i.constrain(d._length/40,4,9);n.autoTicks(d,Math.abs(d.range[1]-d.range[0])/h)}for(var p=n.calcTicks(d,{msUTC:!0}),f=0;f/g," "));l[c]=p,d.tickmode=u}}for(e.ticks=l,c=0;c<3;++c)for(a[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]),f=0;f<2;++f)e.bounds[f][c]=t.glplot.bounds[f][c];t.contourLevels=function(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),o=0;o{"use strict";function e(t,e){var r,n,i=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)i[n]+=t[4*r+n]*e[r];return i}t.exports=function(t,r){return e(t.projection,e(t.view,e(t.model,[r[0],r[1],r[2],1])))}},85833:(t,e,r)=>{"use strict";var n,i,o=r(31845).gl_plot3d,a=o.createCamera,s=o.createScene,l=r(62945),c=r(17520),d=r(25059),u=r(12822),h=u.preserveDrawingBuffer(),p=r(75815),f=r(70410),m=r(17235),g=r(91203),v=r(40747),b=r(82678),y=r(63306),x=r(1285),w=r(19496).applyAutorangeOptions,_=!1;function k(t,e){var r=document.createElement("div"),n=t.container;this.graphDiv=t.graphDiv;var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.style.position="absolute",i.style.top=i.style.left="0px",i.style.width=i.style.height="100%",i.style["z-index"]=20,i.style["pointer-events"]="none",r.appendChild(i),this.svgContainer=i,r.id=t.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=e,this.id=t.id||"scene",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=b(e,e[this.id]),this.spikeOptions=y(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=this.pixelRatio||t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=d.getComponentMethod("annotations3d","convert"),this.drawAnnotations=d.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var A=k.prototype;A.prepareOptions=function(){var t=this,e={canvas:t.canvas,gl:t.gl,glOptions:{preserveDrawingBuffer:h,premultipliedAlpha:!0,antialias:!0},container:t.container,axes:t.axesOptions,spikes:t.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:t.camera,pixelRatio:t.pixelRatio};if(t.staticMode){if(!(i||(n=document.createElement("canvas"),i=l({canvas:n,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error("error creating static canvas/context for image server");e.gl=i,e.canvas=n}return e};var T=!0;A.tryCreatePlot=function(){var t=this,e=t.prepareOptions(),r=!0;try{t.glplot=s(e)}catch(n){if(t.staticMode||!T||h)r=!1;else{u.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{h=e.glOptions.preserveDrawingBuffer=!0,t.glplot=s(e)}catch(t){h=e.glOptions.preserveDrawingBuffer=!1,r=!1}}}return T=!1,r},A.initializeGLCamera=function(){var t=this,e=t.fullSceneLayout.camera,r="orthographic"===e.projection.type;t.camera=a(t.container,{center:[e.center.x,e.center.y,e.center.z],eye:[e.eye.x,e.eye.y,e.eye.z],up:[e.up.x,e.up.y,e.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})},A.initializeGLPlot=function(){var t=this;if(t.initializeGLCamera(),!t.tryCreatePlot())return g(t);t.traces={},t.make4thDimension();var e=t.graphDiv,r=e.layout,n=function(){var e={};return t.isCameraChanged(r)&&(e[t.id+".camera"]=t.getCamera()),t.isAspectChanged(r)&&(e[t.id+".aspectratio"]=t.glplot.getAspectratio(),"manual"!==r[t.id].aspectmode&&(t.fullSceneLayout.aspectmode=r[t.id].aspectmode=e[t.id+".aspectmode"]="manual")),e},i=function(t){if(!1!==t.fullSceneLayout.dragmode){var e=n();t.saveLayout(r),t.graphDiv.emit("plotly_relayout",e)}};return t.glplot.canvas&&(t.glplot.canvas.addEventListener("mouseup",(function(){i(t)})),t.glplot.canvas.addEventListener("touchstart",(function(){_=!0})),t.glplot.canvas.addEventListener("wheel",(function(r){if(e._context._scrollZoom.gl3d){if(t.camera._ortho){var n=r.deltaX>r.deltaY?1.1:1/1.1,o=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*o.x,y:n*o.y,z:n*o.z})}i(t)}}),!!c&&{passive:!1}),t.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit("plotly_relayouting",e)}})),t.staticMode||t.glplot.canvas.addEventListener("webglcontextlost",(function(r){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},A.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var o=r._fullLayout._invScaleX,a=r._fullLayout._invScaleY,s=i.width*o,l=i.height*a;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),x(e),e.glplot.axes.update(e.axesOptions);for(var c=Object.keys(e.traces),d=null,h=e.glplot.selection,m=0;m")):"isosurface"===t.type||"volume"===t.type?(A.valueLabel=p.hoverLabelText(e._mockAxis,e._mockAxis.d2l(h.traceCoordinate[3]),t.valuehoverformat),C.push("value: "+A.valueLabel),h.textLabel&&C.push(h.textLabel),y=C.join("
")):y=h.textLabel;var E={x:h.traceCoordinate[0],y:h.traceCoordinate[1],z:h.traceCoordinate[2],data:w._input,fullData:w,curveNumber:w.index,pointNumber:k};f.appendArrayPointValue(E,w,k),t._module.eventData&&(E=w._module.eventData(E,h,w,{},k));var L={points:[E]};if(e.fullSceneLayout.hovermode){var z=[];f.loneHover({trace:w,x:(.5+.5*b[0]/b[3])*s,y:(.5-.5*b[1]/b[3])*l,xLabel:A.xLabel,yLabel:A.yLabel,zLabel:A.zLabel,text:y,name:d.name,color:f.castHoverOption(w,k,"bgcolor")||d.color,borderColor:f.castHoverOption(w,k,"bordercolor"),fontFamily:f.castHoverOption(w,k,"font.family"),fontSize:f.castHoverOption(w,k,"font.size"),fontColor:f.castHoverOption(w,k,"font.color"),nameLength:f.castHoverOption(w,k,"namelength"),textAlign:f.castHoverOption(w,k,"align"),hovertemplate:u.castOption(w,k,"hovertemplate"),hovertemplateLabels:u.extendFlat({},E,A),eventData:[E]},{container:n,gd:r,inOut_bbox:z}),E.bbox=z[0]}h.distance<5&&(h.buttons||_)?r.emit("plotly_click",L):r.emit("plotly_hover",L),this.oldEventData=L}else f.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},A.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):u.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(e)};var M=["xaxis","yaxis","zaxis"];function S(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var o=M[i],a=o.charAt(0),s=n[o],l=e[a],c=e[a+"calendar"],d=e["_"+a+"length"];if(u.isArrayOrTypedArray(l))for(var h,p=0;p<(d||l.length);p++)if(u.isArrayOrTypedArray(l[p]))for(var f=0;fv[1][a])v[0][a]=-1,v[1][a]=1;else{var O=v[1][a]-v[0][a];v[0][a]-=O/32,v[1][a]+=O/32}if(x=[v[0][a],v[1][a]],x=w(x,l),v[0][a]=x[0],v[1][a]=x[1],l.isReversed()){var D=v[0][a];v[0][a]=v[1][a],v[1][a]=D}}else x=l.range,v[0][a]=l.r2l(x[0]),v[1][a]=l.r2l(x[1]);v[0][a]===v[1][a]&&(v[0][a]-=1,v[1][a]+=1),b[a]=v[1][a]-v[0][a],l.range=[v[0][a],v[1][a]],l.limitRange(),n.glplot.setBounds(a,{min:l.range[0]*p[a],max:l.range[1]*p[a]})}var I=d.aspectmode;if("cube"===I)g=[1,1,1];else if("manual"===I){var F=d.aspectratio;g=[F.x,F.y,F.z]}else{if("auto"!==I&&"data"!==I)throw new Error("scene.js aspectRatio was not one of the enumerated types");var R=[1,1,1];for(a=0;a<3;++a){var P=y[c=(l=d[M[a]]).type];R[a]=Math.pow(P.acc,1/P.count)/p[a]}g="data"===I||Math.max.apply(null,R)/Math.min.apply(null,R)<=4?R:[1,1,1]}d.aspectratio.x=u.aspectratio.x=g[0],d.aspectratio.y=u.aspectratio.y=g[1],d.aspectratio.z=u.aspectratio.z=g[2],n.glplot.setAspectratio(d.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:d.aspectratio.x,y:d.aspectratio.y,z:d.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=d.aspectmode);var j=d.domain||null,N=e._size||null;if(j&&N){var B=n.container.style;B.position="absolute",B.left=N.l+j.x[0]*N.w+"px",B.top=N.t+(1-j.y[1])*N.h+"px",B.width=N.w*(j.x[1]-j.x[0])+"px",B.height=N.h*(j.y[1]-j.y[0])+"px"}n.glplot.redraw()}},A.destroy=function(){var t=this;t.glplot&&(t.camera.mouseListener.enabled=!1,t.container.removeEventListener("wheel",t.camera.wheelListener),t.camera=null,t.glplot.dispose(),t.container.parentNode.removeChild(t.container),t.glplot=null)},A.getCamera=function(){var t,e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),{up:{x:(t=e.camera).up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]},projection:{type:!0===t._ortho?"orthographic":"perspective"}}},A.setViewport=function(t){var e,r=this,n=t.camera;r.camera.lookAt.apply(this,[[(e=n).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]),r.glplot.setAspectratio(t.aspectratio),"orthographic"===n.projection.type!==r.camera._ortho&&(r.glplot.redraw(),r.glplot.clearRGBA(),r.glplot.dispose(),r.initializeGLPlot())},A.isCameraChanged=function(t){var e=this.getCamera(),r=u.nestedProperty(t,this.id+".camera").get();function n(t,e,r,n){var i=["up","center","eye"],o=["x","y","z"];return e[i[r]]&&t[i[r]][o[n]]===e[i[r]][o[n]]}var i=!1;if(void 0===r)i=!0;else{for(var o=0;o<3;o++)for(var a=0;a<3;a++)if(!n(e,r,o,a)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},A.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=u.nestedProperty(t,this.id+".aspectratio").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},A.saveLayout=function(t){var e,r,n,i,o,a,s=this,l=s.fullLayout,c=s.isCameraChanged(t),h=s.isAspectChanged(t),p=c||h;if(p){var f={};c&&(e=s.getCamera(),n=(r=u.nestedProperty(t,s.id+".camera")).get(),f[s.id+".camera"]=n),h&&(i=s.glplot.getAspectratio(),a=(o=u.nestedProperty(t,s.id+".aspectratio")).get(),f[s.id+".aspectratio"]=a),d.call("_storeDirectGUIEdit",t,l._preGUI,f),c&&(r.set(e),u.nestedProperty(l,s.id+".camera").set(e)),h&&(o.set(i),u.nestedProperty(l,s.id+".aspectratio").set(i),s.glplot.redraw())}return p},A.updateFx=function(t,e){var r=this,n=r.camera;if(n)if("orbit"===t)n.mode="orbit",n.keyBindingMode="rotate";else if("turntable"===t){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,o=i._fullLayout,a=r.fullSceneLayout.camera,s=a.up.x,l=a.up.y,c=a.up.z;if(c/Math.sqrt(s*s+l*l+c*c)<.999){var h=r.id+".camera.up",p={x:0,y:0,z:1},f={};f[h]=p;var m=i.layout;d.call("_storeDirectGUIEdit",m,o._preGUI,f),a.up=p,u.nestedProperty(m,h).set(p)}}else n.keyBindingMode=t;r.fullSceneLayout.hovermode=e},A.toImage=function(t){var e=this;t||(t="png"),e.staticMode&&e.container.appendChild(n),e.glplot.redraw();var r=e.glplot.gl,i=r.drawingBufferWidth,o=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var a=new Uint8Array(i*o*4);r.readPixels(0,0,i,o,r.RGBA,r.UNSIGNED_BYTE,a),function(t,e,r){for(var n=0,i=r-1;n0)for(var s=255/a,l=0;l<3;++l)t[o+l]=Math.min(s*t[o+l],255)}}(a,i,o);var s=document.createElement("canvas");s.width=i,s.height=o;var l,c=s.getContext("2d",{willReadFrequently:!0}),d=c.createImageData(i,o);switch(d.data.set(a),c.putImageData(d,0,0),t){case"jpeg":l=s.toDataURL("image/jpeg");break;case"webp":l=s.toDataURL("image/webp");break;default:l=s.toDataURL("image/png")}return e.staticMode&&e.container.removeChild(n),l},A.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[M[t]];p.setConvert(e,this.fullLayout),e.setScale=u.noop}},A.make4thDimension=function(){var t=this,e=t.graphDiv._fullLayout;t._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},p.setConvert(t._mockAxis,e)},t.exports=k},13195:(t,e,r)=>{"use strict";var n=r(75058),i=r(46367),o=r(84226),a=r(18360),s=r(21422),l=r(85538),c=r(98260).extendFlat,d=n({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});d.family.dflt='"Open Sans", verdana, arial, sans-serif',d.size.dflt=12,d.color.dflt=o.defaultLine,t.exports={font:d,title:{text:{valType:"string",editType:"layoutstyle",description:["Sets the plot's title.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:n({editType:"layoutstyle",description:["Sets the title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),subtitle:{text:{valType:"string",editType:"layoutstyle",description:"Sets the plot's subtitle."},font:n({editType:"layoutstyle",description:"Sets the subtitle font."}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle",description:["Sets the x position with respect to `xref` in normalized","coordinates from *0* (left) to *1* (right)."].join(" ")},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle",description:["Sets the y position with respect to `yref` in normalized","coordinates from *0* (bottom) to *1* (top).","*auto* places the baseline of the title onto the","vertical center of the top margin."].join(" ")},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle",description:["Sets the title's horizontal alignment with respect to its x position.","*left* means that the title starts at x,","*right* means that the title ends at x","and *center* means that the title's center is at x.","*auto* divides `xref` by three and calculates the `xanchor`","value automatically based on the value of `x`."].join(" ")},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle",description:["Sets the title's vertical alignment with respect to its y position.","*top* means that the title's cap line is at y,","*bottom* means that the title's baseline is at y","and *middle* means that the title's midline is at y.","*auto* divides `yref` by three and calculates the `yanchor`","value automatically based on the value of `y`."].join(" ")},pad:c(l({editType:"layoutstyle"}),{description:["Sets the padding of the title.","Each padding value only applies when the corresponding","`xanchor`/`yanchor` value is set accordingly. E.g. for left","padding to take effect, `xanchor` must be set to *left*.","The same rule applies if `xanchor`/`yanchor` is determined automatically.","Padding is muted if the respective anchor value is *middle*/*center*."].join(" ")}),automargin:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether the title can automatically push the figure margins.","If `yref='paper'` then the margin will expand to ensure that the title doesn’t","overlap with the edges of the container. If `yref='container'` then the margins","will ensure that the title doesn’t overlap with the plot area, tick labels,","and axis titles. If `automargin=true` and the margins need to be expanded,","then y will be set to a default 1 and yanchor will be set to an appropriate","default to ensure that minimal margin space is needed. Note that when `yref='paper'`,","only 1 or 0 are allowed y values. Invalid values will be reset to the default 1."].join(" ")},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot",description:["Determines how the font size for various text","elements are uniformed between each trace type.","If the computed text sizes were smaller than","the minimum size defined by `uniformtext.minsize`","using *hide* option hides the text; and","using *show* option shows the text without further downscaling.","Please note that if the size defined by `minsize` is greater than","the font size defined by trace, then the `minsize` is used."].join(" ")},minsize:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the minimum text size between traces of the same type."].join(" ")},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none",description:["Determines whether or not a layout width or height","that has been left undefined by the user","is initialized on each relayout.","Note that, regardless of this attribute,","an undefined layout width or height","is always initialized on the first call to plot."].join(" ")},width:{valType:"number",min:10,dflt:700,editType:"plot",description:["Sets the plot's width (in px)."].join(" ")},height:{valType:"number",min:10,dflt:450,editType:"plot",description:["Sets the plot's height (in px)."].join(" ")},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum width of the plot with margin.automargin applied (in px)"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum height of the plot with margin.automargin applied (in px)"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the left margin (in px)."},r:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the right margin (in px)."},t:{valType:"number",min:0,dflt:100,editType:"plot",description:"Sets the top margin (in px)."},b:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the bottom margin (in px)."},pad:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the amount of padding (in px)","between the plotting area and the axis lines"].join(" ")},autoexpand:{valType:"boolean",dflt:!0,editType:"plot",description:["Turns on/off margin expansion computations.","Legends, colorbars, updatemenus, sliders, axis rangeselector and rangeslider","are allowed to push the margins by defaults."].join(" ")},editType:"plot"},computed:{valType:"any",editType:"none",description:["Placeholder for exporting automargin-impacting values namely","`margin.t`, `margin.b`, `margin.l` and `margin.r` in *full-json* mode."].join(" ")},paper_bgcolor:{valType:"color",dflt:o.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:o.background,editType:"layoutstyle",description:["Sets the background color of the plotting area in-between x and y axes."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","This is the default value; however it could be overridden for individual axes."].join(" ")},separators:{valType:"string",editType:"plot",description:["Sets the decimal and thousand separators.","For example, *. * puts a '.' before decimals and a space","between thousands. In English locales, dflt is *.,* but","other locales may alter this default."].join(" ")},hidesources:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether or not a text link citing the data source is","placed at the bottom-right cored of the figure.","Has only an effect only on graphs that have been generated via","forked graphs from the Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise)."].join(" ")},showlegend:{valType:"boolean",editType:"legend",description:["Determines whether or not a legend is drawn.","Default is `true` if there is a trace to show and any of these:","a) Two or more traces would by default be shown in the legend.","b) One pie trace is shown in the legend.","c) One trace is explicitly given with `showlegend: true`."].join(" ")},colorway:{valType:"colorlist",dflt:o.defaults,editType:"calc",description:"Sets the default trace colors."},datarevision:{valType:"any",editType:"calc",description:["If provided, a changed value tells `Plotly.react` that","one or more data arrays has changed. This way you can modify","arrays in-place rather than making a complete new copy for an","incremental change.","If NOT provided, `Plotly.react` assumes that data arrays are","being treated as immutable, thus any data array with a","different identity from its predecessor contains new data."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Used to allow user interactions with the plot to persist after","`Plotly.react` calls that are unaware of these interactions.","If `uirevision` is omitted, or if it is given and it changed from","the previous `Plotly.react` call, the exact new figure is used.","If `uirevision` is truthy and did NOT change, any attribute","that has been affected by user interactions and did not receive a","different value in the new figure will keep the interaction value.","`layout.uirevision` attribute serves as the default for","`uirevision` attributes in various sub-containers. For finer","control you can set these sub-attributes directly. For example,","if your app separately controls the data on the x and y axes you","might set `xaxis.uirevision=*time*` and `yaxis.uirevision=*cost*`.","Then if only the y data is changed, you can update","`yaxis.uirevision=*quantity*` and the y axis range will reset but","the x axis range will retain any user-driven zoom."].join(" ")},editrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in `editable: true`","configuration, other than trace names and axis titles.","Defaults to `layout.uirevision`."].join(" ")},selectionrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in selected points","from all traces."].join(" ")},template:{valType:"any",editType:"calc",description:["Default attributes to be applied to the plot. Templates can be","created from existing plots using `Plotly.makeTemplate`, or","created manually. They should be objects with format:","`{layout: layoutTemplate, data: {[type]: [traceTemplate, ...]}, ...}`","`layoutTemplate` and `traceTemplate` are objects matching the","attribute structure of `layout` and a data trace. ","Trace templates are applied cyclically to traces of each type.","Container arrays (eg `annotations`) have special handling:","An object ending in `defaults` (eg `annotationdefaults`) is applied","to each array item. But if an item has a `templateitemname` key","we look in the template array for an item with matching `name` and","apply that instead. If no matching `name` is found we mark the item","invisible. Any named template item not referenced is appended to","the end of the array, so you can use this for a watermark annotation","or a logo image, for example. To omit one of these items on the plot,","make an item with matching `templateitemname` and `visible: false`."].join(" ")},newshape:a.newshape,activeshape:a.activeshape,newselection:s.newselection,activeselection:s.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information that can be used in various `text` attributes.","Attributes such as the graph, axis and colorbar `title.text`, annotation `text`","`trace.name` in legend items, `rangeselector`, `updatemenus` and `sliders` `label` text","all support `meta`. One can access `meta` fields using template strings:","`%{meta[i]}` where `i` is the index of the `meta`","item in question.","`meta` can also be an object for example `{key: value}` which can be accessed","%{meta[key]}."].join(" ")},transition:c({},i.transition,{description:["Sets transition options used during Plotly.react updates."].join(" "),editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the contents of the title, please use `title.text` now."].join(" ")},titlefont:n({editType:"layoutstyle",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}}},85538:t=>{"use strict";t.exports=function(t){var e=t.editType;return{t:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) along the top of the component."},r:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) on the right side of the component."},b:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) along the bottom of the component."},l:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) on the left side of the component."},editType:e}}},51137:(t,e,r)=>{"use strict";var n=r(27941),i=r(79969).de,o=r(31830).OE,a=r(7370),s=r(44514),l=r(25059),c=r(35852),d=r(46121),u=r(12822),h=r(17499),p=r(32994).BADNUM,f=r(99246),m=r(8867).clearOutline,g=r(49114),v=r(46367),b=r(53874),y=r(47388).eV,x=u.relinkPrivateKeys,w=u._,_=t.exports={};u.extendFlat(_,l),_.attributes=r(3520),_.attributes.type.values=_.allTypes,_.fontAttrs=r(75058),_.layoutAttributes=r(13195);var k=_.transformsRegistry,A=r(74036);_.executeAPICommand=A.executeAPICommand,_.computeAPICommandBindings=A.computeAPICommandBindings,_.manageCommandObserver=A.manageCommandObserver,_.hasSimpleAPICommandBindings=A.hasSimpleAPICommandBindings,_.redrawText=function(t){return t=u.getGraphDiv(t),new Promise((function(e){setTimeout((function(){t._fullLayout&&(l.getComponentMethod("annotations","draw")(t),l.getComponentMethod("legend","draw")(t),l.getComponentMethod("colorbar","draw")(t),e(_.previousPromises(t)))}),300)}))},_.resize=function(t){var e;t=u.getGraphDiv(t);var r=new Promise((function(r,n){t&&!u.isHidden(t)||n(new Error("Resize must be passed a displayed plot div element.")),t._redrawTimer&&clearTimeout(t._redrawTimer),t._resolveResize&&(e=t._resolveResize),t._resolveResize=r,t._redrawTimer=setTimeout((function(){if(!t.layout||t.layout.width&&t.layout.height||u.isHidden(t))r(t);else{delete t.layout.width,delete t.layout.height;var e=t.changed;t.autoplay=!0,l.call("relayout",t,{autosize:!0}).then((function(){t.changed=e,t._resolveResize===r&&(delete t._resolveResize,r(t))}))}}),100)}));return e&&e(r),r},_.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then((function(){t._promises=[]}))},_.addLinks=function(t){if(t._context.showLink||t._context.showSources){var e=t._fullLayout,r=u.ensureSingle(e._paper,"text","js-plot-link-container",(function(t){t.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:h.defaultLine,"pointer-events":"all"}).each((function(){var t=n.select(this);t.append("tspan").classed("js-link-to-tool",!0),t.append("tspan").classed("js-link-spacer",!0),t.append("tspan").classed("js-sourcelinks",!0)}))})),i=r.node(),o={y:e._paper.attr("height")-9};document.body.contains(i)&&i.getComputedTextLength()>=e.width-20?(o["text-anchor"]="start",o.x=5):(o["text-anchor"]="end",o.x=e._paper.attr("width")-7),r.attr(o);var a=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",(function(){_.sendDataToCloud(t)}));else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}(t,a),s.text(a.text()&&l.text()?" - ":"")}},_.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit("plotly_beforeexport");var r=n.select(t).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=_.graphJson(t,!1,"keepdata"),i.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var T=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],M=["year","month","dayMonth","dayMonthYear"];function S(t,e){var r=t._context.locale;r||(r="en-US");var n=!1,i={};function o(t){for(var r=!0,o=0;o1&&I.length>1){for(l.getComponentMethod("grid","sizeDefaults")(c,s),a=0;a15&&I.length>15&&0===s.shapes.length&&0===s.images.length,_.linkSubplots(h,s,d,n),_.cleanPlot(h,s,d,n);var N=!(!n._has||!n._has("gl2d")),B=!(!s._has||!s._has("gl2d")),U=!(!n._has||!n._has("cartesian"))||N,G=!(!s._has||!s._has("cartesian"))||B;U&&!G?n._bgLayer.remove():G&&!U&&(s._shouldCreateBgLayer=!0),n._zoomlayer&&!t._dragging&&m({_fullLayout:n}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i0){var d=1-2*s;n=Math.round(d*n),i=Math.round(d*i)}}var h=_.layoutAttributes.width.min,p=_.layoutAttributes.height.min;n1,m=!e.height&&Math.abs(r.height-i)>1;(m||f)&&(f&&(r.width=n),m&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),_.sanitizeMargins(r)},_.supplyLayoutModuleDefaults=function(t,e,r,n){var i,o,a,s=l.componentsRegistry,c=e._basePlotModules,d=l.subplotsRegistry.cartesian;for(i in s)(a=s[i]).includeBasePlot&&a.includeBasePlot(t,e);for(var h in c.length||c.push(d),e._has("cartesian")&&(l.getComponentMethod("grid","contentDefaults")(t,e),d.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(u.subplotSort);for(o=0;o1&&(r.l/=v,r.r/=v)}if(p){var b=(r.t+r.b)/p;b>1&&(r.t/=b,r.b/=b)}var y=void 0!==r.xl?r.xl:r.x,x=void 0!==r.xr?r.xr:r.x,w=void 0!==r.yt?r.yt:r.y,k=void 0!==r.yb?r.yb:r.y;f[e]={l:{val:y,size:r.l+g},r:{val:x,size:r.r+g},b:{val:k,size:r.b+g},t:{val:w,size:r.t+g}},m[e]=1}else delete f[e],delete m[e];if(!n._replotting)return _.doAutoMargin(t)}},_.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),O(e);var i=e._size,o=e.margin,s={t:0,b:0,l:0,r:0},c=u.extendFlat({},i),d=o.l,h=o.r,p=o.t,m=o.b,g=e._pushmargin,v=e._pushmarginIds,b=e.minreducedwidth,y=e.minreducedheight;if(!1!==o.autoexpand){for(var x in g)v[x]||delete g[x];var w=t._fullLayout._reservedMargin;for(var k in w)for(var A in w[k]){var T=w[k][A];s[A]=Math.max(s[A],T)}for(var M in g.base={l:{val:0,size:d},r:{val:1,size:h},t:{val:1,size:p},b:{val:0,size:m}},s){var S=0;for(var C in g)"base"!==C&&a(g[C][M].size)&&(S=g[C][M].size>S?g[C][M].size:S);var E=Math.max(0,o[M]-S);s[M]=Math.max(0,s[M]-E)}for(var L in g){var z=g[L].l||{},D=g[L].b||{},I=z.val,F=z.size,R=D.val,P=D.size,j=r-s.r-s.l,N=n-s.t-s.b;for(var B in g){if(a(F)&&g[B].r){var U=g[B].r.val,G=g[B].r.size;if(U>I){var V=(F*U+(G-j)*I)/(U-I),H=(G*(1-I)+(F-j)*(1-U))/(U-I);V+H>d+h&&(d=V,h=H)}}if(a(P)&&g[B].t){var W=g[B].t.val,q=g[B].t.size;if(W>R){var Y=(P*W+(q-N)*R)/(W-R),Z=(q*(1-R)+(P-N)*(1-W))/(W-R);Y+Z>m+p&&(m=Y,p=Z)}}}}}var $=u.constrain(r-o.l-o.r,2,b),X=u.constrain(n-o.t-o.b,2,y),J=Math.max(0,r-$),K=Math.max(0,n-X);if(J){var Q=(d+h)/J;Q>1&&(d/=Q,h/=Q)}if(K){var tt=(m+p)/K;tt>1&&(m/=tt,p/=tt)}if(i.l=Math.round(d)+s.l,i.r=Math.round(h)+s.r,i.t=Math.round(p)+s.t,i.b=Math.round(m)+s.b,i.p=Math.round(o.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&(_.didMarginChange(c,i)||function(t){if("_redrawFromAutoMarginCount"in t._fullLayout)return!1;var e=f.list(t,"",!0);for(var r in e)if(e[r].autoshift||e[r].shift)return!0;return!1}(t))){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var et=3*(1+Object.keys(v).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return l.call("redraw",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit("plotly_transitioninterrupted",[])}));var o=0,a=0;function s(){return o++,function(){var e;a++,n||a!==o||(e=i,t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return l.call("redraw",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])})).then(e)))}}r.runFn(s),setTimeout(s())}))}],o=u.syncOrAsync(i,t);return o&&o.then||(o=Promise.resolve()),o.then((function(){return t}))}_.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},_.graphJson=function(t,e,r,n,i,o){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&_.supplyDefaults(t);var a=i?t._fullData:t.data,l=i?t._fullLayout:t.layout,c=(t._transitionData||{})._frames;function d(t,e){if("function"==typeof t)return e?"_function_":null;if(u.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(o){if(-1===["_","["].indexOf(o.charAt(0)))if("function"!=typeof t[o]){if("keepdata"===r){if("src"===o.substr(o.length-3))return}else if("keepstream"===r){if("string"==typeof(n=t[o+"src"])&&n.indexOf(":")>0&&!u.isPlainObject(t.stream))return}else if("keepall"!==r&&"string"==typeof(n=t[o+"src"])&&n.indexOf(":")>0)return;i[o]=d(t[o],e)}else e&&(i[o]="_function")})),i}var o=Array.isArray(t),a=u.isTypedArray(t);if((o||a)&&t.dtype&&t.shape){var l=t.bdata;return d({dtype:t.dtype,shape:t.shape,bdata:u.isArrayBuffer(l)?s.encode(l):l},e)}return o?t.map((function(t){return d(t,e)})):a?u.simpleMap(t,u.identity):u.isJSDate(t)?u.ms2DateTimeLocal(+t):t}var h={data:(a||[]).map((function(t){var r=d(t);return e&&delete r.fit,r}))};if(!e&&(h.layout=d(l),i)){var p=l._size;h.layout.computed={margin:{b:p.b,l:p.l,r:p.r,t:p.t}}}return c&&(h.frames=d(c)),o&&(h.config=d(t._context,!0)),"object"===n?h:JSON.stringify(h)},_.modifyFrames=function(t,e){var r,n,i,o=t._transitionData._frames,a=t._transitionData._frameHash;for(r=0;r=0;o--)if(l[o].enabled){r._indexToPoints=l[o]._indexToPoints;break}n&&n.calc&&(a=n.calc(t,r))}Array.isArray(a)&&a[0]||(a=[{x:p,y:p}]),a[0].t||(a[0].t={}),a[0].trace=r,h[e]=a}}for(R(a,s,d),i=0;i{"use strict";var n=r(12822),i=r(46121),o=r(40365).N;t.exports=function(t,e,r,a){var s,l,c=a.type,d=a.attributes,u=a.handleDefaults,h=a.partition||"x",p=e._subplots[c],f=p.length,m=f&&p[0].replace(/\d+$/,"");function g(t,e){return n.coerce(s,l,d,t,e)}for(var v=0;v{"use strict";var n=r(77201),i=n.FORMAT_LINK,o=n.DATE_FORMAT_LINK;function a(t){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(t&&t.supportOther?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),'Numbers are formatted using d3-format\'s syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".',i,"for details on the formatting syntax.",'Dates are formatted using d3-time-format\'s syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".',o,"for details on the date formatting syntax."].join(" ")}function s(t){var e=t.description?" "+t.description:"",r=t.keys||[];if(r.length>0){for(var n=[],i=0;i` is displayed in the secondary box, for example "{fullData.name}".',"To hide the secondary box completely, use an empty tag ``."].join(" ")};return!1!==t.arrayOk&&(n.arrayOk=!0),n},e.ay=function(t,e){t=t||{};var r=s(e=e||{}),n={valType:"string",dflt:"",editType:t.editType||"calc",description:["Template string used for rendering the information text that appear on points.","Note that this will override `textinfo`.",a(),"Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",r].join(" ")};return!1!==t.arrayOk&&(n.arrayOk=!0),n},e.LF=function(t,e){e=e||{};var r=(t=t||{}).newshape?"new ":"",n=s(e);return{valType:"string",dflt:"",editType:t.editType||"arraydraw",description:["Template string used for rendering the "+r+"shape's label.","Note that this will override `text`.",["Variables are inserted using %{variable},",'for example "x0: %{x0}".','Numbers are formatted using d3-format\'s syntax %{variable:d3-format}, for example "Price: %{x0:$.2f}". See',i,"for details on the formatting syntax.",'Dates are formatted using d3-time-format\'s syntax %{variable|d3-time-format}, for example "Day: %{x0|%m %b %Y}". See',o,"for details on the date formatting syntax.","A single multiplication or division operation may be applied to numeric variables, and combined with",'d3 number formatting, for example "Length in cm: %{x0*2.54}", "%{slope*60:.1f} meters per second."',"For log axes, variable values are given in log units.","For date axes, x/y coordinate variables and center variables use datetimes, while all other variable values use values in ms."].join(" "),n].join(" ")}}},25059:(t,e,r)=>{"use strict";var n=r(64347),i=r(51648),o=r(65280),a=r(12517),s=r(16822).addStyleRule,l=r(98260),c=r(3520),d=r(13195),u=l.extendFlat,h=l.extendDeepAll;function p(t){var i=t.name,o=t.categories,a=t.meta;if(e.modules[i])n.log("Type "+i+" already registered");else{e.subplotsRegistry[t.basePlotModule.name]||function(t){var r=t.name;if(e.subplotsRegistry[r])n.log("Plot type "+r+" already registered.");else for(var i in v(t),e.subplotsRegistry[r]=t,e.componentsRegistry)x(i,t.name)}(t.basePlotModule);for(var l={},c=0;c{"use strict";var n=r(25059),i=r(12822),o=i.extendFlat,a=i.extendDeep;function s(t){var e;switch(t){case"themes__thumb":e={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":e={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:e={}}return e}t.exports=function(t,e){var r,i,l=t.data,c=t.layout,d=a([],l),u=a({},c,s(e.tileClass)),h=t._context||{};if(e.width&&(u.width=e.width),e.height&&(u.height=e.height),"thumbnail"===e.tileClass||"themes__thumb"===e.tileClass){u.annotations=[];var p=Object.keys(u);for(r=0;r-1&&(u[p[r]].title={text:""});for(r=0;r{"use strict";var n=r(12822),i=r(42704),o=r(11148),a=r(13078);t.exports=function(t,e){var r;return n.isPlainObject(t)||(r=n.getGraphDiv(t)),(e=e||{}).format=e.format||"png",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise((function(s,l){r&&r._snapshotInProgress&&l(new Error("Snapshotting already in progress.")),n.isIE()&&"svg"!==e.format&&l(new Error(a.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var c=i(t,e),d=e.filename||t.fn||"newplot";d+="."+e.format.replace("-","."),c.then((function(t){return r&&(r._snapshotInProgress=!1),o(t,d,e.format)})).then((function(t){s(t)})).catch((function(t){r&&(r._snapshotInProgress=!1),l(t)}))}))}},11148:(t,e,r)=>{"use strict";var n=r(12822),i=r(13078);t.exports=function(t,e,r){var o=document.createElement("a"),a="download"in o;return new Promise((function(s,l){var c,d;if(n.isIE())return c=i.createBlob(t,"svg"),window.navigator.msSaveBlob(c,e),c=null,s(e);if(a)return c=i.createBlob(t,r),d=i.createObjectURL(c),o.href=d,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),i.revokeObjectURL(d),c=null,s(e);if(n.isSafari()){var u="svg"===r?",":";base64,";return i.octetStream(u+encodeURIComponent(t)),s(e)}l(new Error("download error"))}))}},13078:(t,e,r)=>{"use strict";var n=r(25059);e.getDelay=function(t){return t._has&&(t._has("gl3d")||t._has("gl2d")||t._has("mapbox")||t._has("map"))?500:0},e.getRedrawFunc=function(t){return function(){n.getComponentMethod("colorbar","draw")(t)}},e.encodeSVG=function(t){return"data:image/svg+xml,"+encodeURIComponent(t)},e.encodeJSON=function(t){return"data:application/json,"+encodeURIComponent(t)};var i=window.URL||window.webkitURL;e.createObjectURL=function(t){return i.createObjectURL(t)},e.revokeObjectURL=function(t){return i.revokeObjectURL(t)},e.createBlob=function(t,e){if("svg"===e)return new window.Blob([t],{type:"image/svg+xml;charset=utf-8"});if("full-json"===e)return new window.Blob([t],{type:"application/json;charset=utf-8"});var r=function(t){for(var e=t.length,r=new ArrayBuffer(e),n=new Uint8Array(r),i=0;i{"use strict";var n=r(13078),i={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:r(5041),toSVG:r(48402),svgToImg:r(40241),toImage:r(91117),downloadImage:r(56787)};t.exports=i},40241:(t,e,r)=>{"use strict";var n=r(12822),i=r(86626).EventEmitter,o=r(13078);t.exports=function(t){var e=t.emitter||new i,r=new Promise((function(i,a){var s=window.Image,l=t.svg,c=t.format||"png";if(n.isIE()&&"svg"!==c){var d=new Error(o.MSG_IE_BAD_FORMAT);return a(d),t.promise?r:e.emit("error",d)}var u,h,p=t.canvas,f=t.scale||1,m=t.width||300,g=t.height||150,v=f*m,b=f*g,y=p.getContext("2d",{willReadFrequently:!0}),x=new s;"svg"===c||n.isSafari()?h=o.encodeSVG(l):(u=o.createBlob(l,"svg"),h=o.createObjectURL(u)),p.width=v,p.height=b,x.onload=function(){var r;switch(u=null,o.revokeObjectURL(h),"svg"!==c&&y.drawImage(x,0,0,v,b),c){case"jpeg":r=p.toDataURL("image/jpeg");break;case"png":r=p.toDataURL("image/png");break;case"webp":r=p.toDataURL("image/webp");break;case"svg":r=h;break;default:var n="Image format is not jpeg, png, svg or webp.";if(a(new Error(n)),!t.promise)return e.emit("error",n)}i(r),t.promise||e.emit("success",r)},x.onerror=function(r){if(u=null,o.revokeObjectURL(h),a(r),!t.promise)return e.emit("error",r)},x.src=h}));return t.promise?r:e}},91117:(t,e,r)=>{"use strict";var n=r(86626).EventEmitter,i=r(25059),o=r(12822),a=r(13078),s=r(5041),l=r(48402),c=r(40241);t.exports=function(t,e){var r=new n,d=s(t,{format:"png"}),u=d.gd;u.style.position="absolute",u.style.left="-5000px",document.body.appendChild(u);var h=a.getRedrawFunc(u);return i.call("_doPlot",u,d.data,d.layout,d.config).then(h).then((function(){var t=a.getDelay(u._fullLayout);setTimeout((function(){var t=l(u),n=document.createElement("canvas");n.id=o.randstr(),(r=c({format:e.format,width:u._fullLayout.width,height:u._fullLayout.height,canvas:n,emitter:r,svg:t})).clean=function(){u&&document.body.removeChild(u)}}),t)})).catch((function(t){r.emit("error",t)})),r}},48402:(t,e,r)=>{"use strict";var n=r(27941),i=r(12822),o=r(40666),a=r(17499),s=r(25853),l=/"/g,c="TOBESTRIPPED",d=new RegExp('("'+c+")|("+c+'")',"g");t.exports=function(t,e,r){var u,h=t._fullLayout,p=h._paper,f=h._toppaper,m=h.width,g=h.height;p.insert("rect",":first-child").call(o.setRect,0,0,m,g).call(a.fill,h.paper_bgcolor);var v=h._basePlotModules||[];for(u=0;u")?"":e.html(t).text()}));return e.remove(),r}(_)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(d,"'"),i.isIE()&&(_=(_=(_=_.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),_}},77881:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822).isArrayOrTypedArray,o=r(32994).BADNUM,a=r(25059),s=r(75815),l=r(69352).getAxisGroup,c=r(53481);function d(t,e,r,a,d){if(a.length){var x,w,_,k;switch(function(t,e){var r,o;for(r=0;ru+c||!n(d))}for(var p=0;p{"use strict";t.exports=i;var n=r(12822).distinctVals;function i(t,e){this.traces=t,this.sepNegVal=e.sepNegVal,this.overlapNoMerge=e.overlapNoMerge;for(var r=1/0,i=e.posAxis._id.charAt(0),o=[],a=0;a{"use strict";var n=r(40666),i=r(17499);t.exports=function(t,e,r,o){var a=r.marker.pattern;a&&a.shape?n.pointStyle(t,r,o,e):i.fill(t,e.color)}},17269:(t,e,r)=>{"use strict";var n=r(12822);function i(t){return-1!==t.indexOf("e")?t.replace(/[.]?0+e/,"e"):-1!==t.indexOf(".")?t.replace(/[.]?0+$/,""):t}e.formatPiePercent=function(t,e){var r=i((100*t).toPrecision(3));return n.numSeparate(r,e)+"%"},e.formatPieValue=function(t,e){var r=i(t.toPrecision(10));return n.numSeparate(r,e)},e.getFirstFilled=function(t,e){if(n.isArrayOrTypedArray(t))for(var r=0;r{"use strict";var n=r(17499),i=r(17269).castOption,o=r(44380);t.exports=function(t,e,r,a){var s=r.marker.line,l=i(s.color,e.pts)||n.defaultLine,c=i(s.width,e.pts)||0;t.call(o,e,r,a).style("stroke-width",c).call(n.stroke,l)}},55508:(t,e,r)=>{"use strict";var n=r(12822);t.exports=function(t,e){for(var r=0;r{"use strict";var n=r(60393).axisHoverFormat,i=r(24131).ay,o=r(24131).rb,a=r(89322),s=r(75058),l=r(68057).T,c=r(68057).k,d=r(40666),u=r(32565),h=r(98260).extendFlat,p=r(43591);function f(t){return{valType:"any",dflt:0,editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the period positioning in milliseconds or *M* on the "+t+" axis.","Special values in the form of *M* could be used to declare","the number of months. In this case `n` must be a positive integer."].join(" ")}}function m(t){return{valType:"any",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the base for period positioning in milliseconds or date string on the "+t+" axis.","When `"+t+"period` is round number of weeks,","the `"+t+"period0` by default would be on a Sunday i.e. 2000-01-02,","otherwise it would be at 2000-01-01."].join(" ")}}function g(t){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the alignment of data points on the "+t+" axis."].join(" ")}}t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the x coordinates."},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `x`.","Builds a linear space of x coordinates.","Use with `dx`","where `x0` is the starting coordinate and `dx` the step."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the x coordinate step.","See `x0` for more info."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the y coordinates."},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `y`.","Builds a linear space of y coordinates.","Use with `dy`","where `y0` is the starting coordinate and `dy` the step."].join(" ")},dy:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the y coordinate step.","See `y0` for more info."].join(" ")},xperiod:f("x"),yperiod:f("y"),xperiod0:m("x0"),yperiod0:m("y0"),xperiodalignment:g("x"),yperiodalignment:g("y"),xhoverformat:n("x"),yhoverformat:n("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","offsetgroup where bars of the same position coordinate will line up."].join(" ")},alignmentgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","alignmentgroup. This controls whether bars compute their positional","range dependently or independently."].join(" ")},stackgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several scatter traces (on the same subplot) to the same","stackgroup in order to add their y values (or their x values if","`orientation` is *h*). If blank or omitted this trace will not be","stacked. Stacking also turns `fill` on by default, using *tonexty*","(*tonextx*) if `orientation` is *h* (*v*) and sets the default","`mode` to *lines* irrespective of point count.","You can only stack on a numeric (linear or log) axis.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},orientation:{valType:"enumerated",values:["v","h"],editType:"calc",description:["Only relevant in the following cases:","1. when `scattermode` is set to *group*.","2. when `stackgroup` is used, and only the first","`orientation` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`. Sets the","stacking direction. With *v* (*h*), the y (x) values of subsequent","traces are added. Also affects the default value of `fill`."].join(" ")},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`groupnorm` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Sets the normalization for the sum of this `stackgroup`.","With *fraction*, the value of each trace at each location is","divided by the sum of all trace values at that location.","*percent* is the same but multiplied by 100 to show percentages.","If there are multiple subplots, or multiple `stackgroup`s on one","subplot, each will be normalized within its own set."].join(" ")},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`stackgaps` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Determines how we handle locations at which other traces in this","group have data but this one does not.","With *infer zero* we insert a zero at these locations.","With *interpolate* we linearly interpolate between existing","values, and extrapolate a constant beyond the existing values."].join(" ")},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},texttemplate:i({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc",description:["Determines the drawing mode for this scatter trace.","If the provided `mode` includes *text* then the `text` elements","appear at the coordinates. Otherwise, the `text` elements","appear on hover.","If there are less than "+u.PTS_LINESONLY+" points","and the trace is not stacked","then the default is *lines+markers*. Otherwise, *lines*."].join(" ")},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style",description:["Do the hover effects highlight individual points (markers or","line points) or do they highlight filled regions?","If the fill is *toself* or *tonext* and there are no markers","or text, then the default is *fills*, otherwise it is *points*."].join(" ")},hovertemplate:o({},{keys:u.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0,description:"Sets the line color."},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0,description:"Sets the line width (in px)."},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","With *spline* the lines are drawn using spline interpolation.","The other available values correspond to step-wise line shapes."].join(" ")},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot",description:["Has an effect only if `shape` is set to *spline*","Sets the amount of smoothing.","*0* corresponds to no smoothing (equivalent to a *linear* shape)."].join(" ")},dash:h({},l,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot",description:["Sets the line back off from the end point of the nth line segment (in px).","This option is useful e.g. to avoid overlap with arrowhead markers.","With *auto* the lines would trim before markers if `marker.angleref` is set to *previous*."].join(" ")},simplify:{valType:"boolean",dflt:!0,editType:"plot",description:["Simplifies lines by removing nearly-collinear points. When transitioning","lines, it may be desirable to disable this so that the number of points","along the resulting SVG path is unaffected."].join(" ")},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the provided data arrays are connected."].join(" ")},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines whether or not markers and text nodes","are clipped about the subplot axes.","To show markers and text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc",description:["Sets the area to fill with a solid color.","Defaults to *none* unless this trace is stacked, then it gets","*tonexty* (*tonextx*) if `orientation` is *v* (*h*)","Use with `fillcolor` if not *none*.","*tozerox* and *tozeroy* fill to x=0 and y=0 respectively.","*tonextx* and *tonexty* fill between the endpoints of this","trace and the endpoints of the trace before it, connecting those","endpoints with straight lines (to make a stacked area graph);","if there is no trace before it, they behave like *tozerox* and","*tozeroy*.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},fillcolor:p(!0),fillgradient:h({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc",description:["Sets the type/orientation of the color gradient for the fill.","Defaults to *none*."].join(" ")},start:{valType:"number",editType:"calc",description:["Sets the gradient start value.","It is given as the absolute position on the axis determined by","the orientiation. E.g., if orientation is *horizontal*, the","gradient will be horizontal and start from the x-position","given by start. If omitted, the gradient starts at the lowest","value of the trace along the respective axis.","Ignored if orientation is *radial*."].join(" ")},stop:{valType:"number",editType:"calc",description:["Sets the gradient end value.","It is given as the absolute position on the axis determined by","the orientiation. E.g., if orientation is *horizontal*, the","gradient will be horizontal and end at the x-position","given by end. If omitted, the gradient ends at the highest","value of the trace along the respective axis.","Ignored if orientation is *radial*."].join(" ")},colorscale:{valType:"colorscale",editType:"style",description:["Sets the fill gradient colors as a color scale.","The color scale is interpreted as a gradient","applied in the direction specified by *orientation*,","from the lowest to the highest value of the scatter","plot along that axis, or from the center to the most","distant point from it, if orientation is *radial*."].join(" ")},editType:"calc",description:["Sets a fill gradient.","If not specified, the fillcolor is used instead."].join(" ")}),fillpattern:c,marker:h({symbol:{valType:"enumerated",values:d.symbolList,dflt:"circle",arrayOk:!0,editType:"style",description:["Sets the marker symbol type.","Adding 100 is equivalent to appending *-open* to a symbol name.","Adding 200 is equivalent to appending *-dot* to a symbol name.","Adding 300 is equivalent to appending *-open-dot*","or *dot-open* to a symbol name."].join(" ")},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0,description:"Sets the marker opacity."},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1,description:["Sets the marker angle in respect to `angleref`."].join(" ")},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1,description:["Sets the reference for marker angle.","With *previous*, angle 0 points along the line from the previous point to this one.","With *up*, angle 0 points toward the top of the screen."].join(" ")},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0,description:["Moves the marker away from the data point in the direction of `angle` (in px).","This can be useful for example if you have another marker at this","location and you want to point an arrowhead marker at it."].join(" ")},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0,description:"Sets the marker size (in px)."},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets a maximum number of points to be drawn on the graph.","*0* corresponds to no limit."].join(" ")},sizeref:{valType:"number",dflt:1,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the scale factor used to determine the rendered size of","marker points. Use with `sizemin` and `sizemode`."].join(" ")},sizemin:{valType:"number",min:0,dflt:0,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the minimum size (in px) of the rendered marker points."].join(" ")},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the rule for which the data in `size` is converted","to pixels."].join(" ")},line:h({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0,description:"Sets the width (in px) of the lines bounding the marker points."},editType:"calc"},a("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc",description:["Sets the type of gradient used to fill the markers"].join(" ")},color:{valType:"color",arrayOk:!0,editType:"calc",description:["Sets the final color of the gradient fill:","the center color for radial, the right for horizontal,","or the bottom for vertical."].join(" ")},editType:"calc"},editType:"calc"},a("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of selected points."},color:{valType:"color",editType:"style",description:"Sets the marker color of selected points."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of selected points."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of selected points."},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of unselected points, applied only when a selection exists."},color:{valType:"color",editType:"style",description:"Sets the marker color of unselected points, applied only when a selection exists."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of unselected points, applied only when a selection exists."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of unselected points, applied only when a selection exists."},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc",description:["Sets the positions of the `text` elements","with respects to the (x,y) coordinates."].join(" ")},textfont:s({editType:"calc",colorEditType:"style",arrayOk:!0,description:"Sets the text font."}),zorder:{valType:"integer",dflt:0,editType:"plot",description:["Sets the layer on which this trace is displayed, relative to","other SVG traces on the same subplot. SVG traces with higher `zorder`","appear in front of those with lower `zorder`."].join(" ")}}},93459:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822),o=r(75815),a=r(15389),s=r(32994).BADNUM,l=r(677),c=r(45065),d=r(55508),u=r(58146);function h(t,e,r,n,i,a,s){var c=e._length,d=t._fullLayout,u=r._id,h=n._id,p=d._firstScatter[m(e)]===e.uid,f=(g(e,d,r,n)||{}).orientation,v=e.fill;r._minDtick=0,n._minDtick=0;var b={padded:!0},y={padded:!0};s&&(b.ppad=y.ppad=s);var x=c<2||i[0]!==i[c-1]||a[0]!==a[c-1];x&&("tozerox"===v||"tonextx"===v&&(p||"h"===f))?b.tozero=!0:(e.error_y||{}).visible||"tonexty"!==v&&"tozeroy"!==v&&(l.hasMarkers(e)||l.hasText(e))||(b.padded=!1,b.ppad=0),x&&("tozeroy"===v||"tonexty"===v&&(p||"v"===f))?y.tozero=!0:"tonextx"!==v&&"tozerox"!==v||(y.padded=!1),u&&(e._extremes[u]=o.findExtremes(r,i,b)),h&&(e._extremes[h]=o.findExtremes(n,a,y))}function p(t,e){if(l.hasMarkers(t)){var r,n=t.marker,a=1.6*(t.marker.sizeref||1);if(r="area"===t.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/a),3)}:function(t){return Math.max((t||0)/a,3)},i.isArrayOrTypedArray(n.size)){var s={type:"linear"};o.setConvert(s);for(var c=s.makeCalcdata(t.marker,"size"),d=new Array(e),u=0;ul&&L[v].gap;)v--;for(y=L[v].s,m=L.length-1;m>v;m--)L[m].s=y;for(;l{"use strict";var n=r(12822);t.exports=function(t,e){n.isArrayOrTypedArray(e.selectedpoints)&&n.tagSelected(t,e)}},45065:(t,e,r)=>{"use strict";var n=r(42226).hasColorscale,i=r(62182),o=r(677);t.exports=function(t,e){o.hasLines(e)&&n(e,"line")&&i(t,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),o.hasMarkers(e)&&(n(e,"marker")&&i(t,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),n(e,"marker.line")&&i(t,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}},32565:t=>{"use strict";t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},30888:(t,e,r)=>{"use strict";var n=r(93459),i=r(77881).setGroupPositions;function o(t,e,r,n,i,o,a){i[n]=!0;var s={i:null,gap:!0,s:0};if(s[a]=r,t.splice(e,0,s),e&&r===t[e-1][a]){var l=t[e-1];s.s=l.s,s.i=l.i,s.gap=l.gap}else o&&(s.s=function(t,e,r,n){var i=t[e-1],o=t[e+1];return o?i?i.s+(o.s-i.s)*(r-i[n])/(o[n]-i[n]):o.s:i.s}(t,e,r,a));e||(t[0].t=t[1].t,t[0].trace=t[1].trace,delete t[1].t,delete t[1].trace)}t.exports=function(t,e){"group"===t._fullLayout.scattermode&&function(t,e){for(var r=e.xaxis,n=e.yaxis,o=t._fullLayout,a=t._fullData,s=t.calcdata,l=[],c=[],d=0;dS[u]&&u{"use strict";var n=r(12822),i=r(28104),o=r(98387);t.exports=function(t,e){var r,a,s;function l(t){return n.coerce(a._input,a,o,t)}if("group"===e.scattermode)for(s=0;s=0;u--){var h=t[u];if("scatter"===h.type&&h.xaxis===c.xaxis&&h.yaxis===c.yaxis){h.opacity=void 0;break}}}}}},28724:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059),o=r(98387),a=r(32565),s=r(677),l=r(56666),c=r(45952),d=r(82349),u=r(86277),h=r(51725),p=r(32335),f=r(46574),m=r(12261),g=r(12822).coercePattern;t.exports=function(t,e,r,v){function b(r,i){return n.coerce(t,e,o,r,i)}var y=l(t,e,v,b);if(y||(e.visible=!1),e.visible){c(t,e,v,b),b("xhoverformat"),b("yhoverformat"),b("zorder");var x=d(t,e,v,b);"group"===v.scattermode&&void 0===e.orientation&&b("orientation","v");var w=!x&&y{"use strict";t.exports=function(t){return{valType:"color",editType:"style",anim:!0,description:["Sets the fill color.","Defaults to a half-transparent variant of the line color,","marker color, or marker line color, whichever is available."+(t?" If fillgradient is specified, fillcolor is ignored except for setting the background color of the hover label, if any.":"")].join(" ")}}},12261:(t,e,r)=>{"use strict";var n=r(17499),i=r(12822).isArrayOrTypedArray;t.exports=function(t,e,r,o,a){a||(a={});var s,l=!1;if(e.marker){var c=e.marker.color,d=(e.marker.line||{}).color;c&&!i(c)?l=c:d&&!i(d)&&(l=d)}if(a.moduleHasFillgradient&&"none"!==o("fillgradient.type")){o("fillgradient.start"),o("fillgradient.stop");var u=o("fillgradient.colorscale");u&&(s=function(t){for(var e=n.interpolate(t[0][1],t[1][1],.5),r=2;r{"use strict";var n=r(75815);t.exports=function(t,e,r){var i={},o={_fullLayout:r},a=n.getFromTrace(o,e,"x"),s=n.getFromTrace(o,e,"y"),l=t.orig_x;void 0===l&&(l=t.x);var c=t.orig_y;return void 0===c&&(c=t.y),i.xLabel=n.tickText(a,a.c2l(l),!0).text,i.yLabel=n.tickText(s,s.c2l(c),!0).text,i}},90566:(t,e,r)=>{"use strict";var n=r(17499),i=r(677);t.exports=function(t,e){var r,o;if("lines"===t.mode)return(r=t.line.color)&&n.opacity(r)?r:t.fillcolor;if("none"===t.mode)return t.fill?t.fillcolor:"";var a=e.mcc||(t.marker||{}).color,s=e.mlcc||((t.marker||{}).line||{}).color;return(o=a&&n.opacity(a)?a:s&&n.opacity(s)&&(e.mlw||((t.marker||{}).line||{}).width)?s:"")?n.opacity(o)<.3?n.addOpacity(o,.3):o:(r=(t.line||{}).color)&&n.opacity(r)&&i.hasLines(t)&&t.line.width?r:t.fillcolor}},28104:(t,e,r)=>{"use strict";var n=r(69352).getAxisGroup;t.exports=function(t,e,r,i){var o=e.orientation,a=e[{v:"x",h:"y"}[o]+"axis"],s=n(r,a)+o,l=r._alignmentOpts||{},c=i("alignmentgroup"),d=l[s];d||(d=l[s]={});var u=d[c];u?u.traces.push(e):u=d[c]={traces:[e],alignmentIndex:Object.keys(d).length,offsetGroups:{}};var h=i("offsetgroup"),p=u.offsetGroups,f=p[h];h&&(f||(f=p[h]={offsetIndex:Object.keys(p).length}),e._offsetIndex=f.offsetIndex)}},2686:(t,e,r)=>{"use strict";var n=r(12822),i=r(70410),o=r(25059),a=r(90566),s=r(17499),l=n.fillText;t.exports=function(t,e,r,c){var d=t.cd,u=d[0].trace,h=t.xa,p=t.ya,f=h.c2p(e),m=p.c2p(r),g=[f,m],v=u.hoveron||"",b=-1!==u.mode.indexOf("markers")?3:.5,y=!!u.xperiodalignment,x=!!u.yperiodalignment;if(-1!==v.indexOf("points")){var w=function(t){var e=Math.max(b,t.mrc||0),r=h.c2p(t.x)-f,n=p.c2p(t.y)-m;return Math.max(Math.sqrt(r*r+n*n)-e,1-b/e)},_=i.getDistanceFunction(c,(function(t){if(y){var e=h.c2p(t.xStart),r=h.c2p(t.xEnd);return f>=Math.min(e,r)&&f<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,o=Math.abs(h.c2p(t.x)-f);return o=Math.min(e,r)&&m<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,o=Math.abs(p.c2p(t.y)-m);return or!=(c=i[n][1])>=r&&(a=i[n-1][0],s=i[n][0],c-l&&(o=a+(s-a)*(r-l)/(c-l),u=Math.min(u,o),f=Math.max(f,o)));return{x0:u=Math.max(u,0),x1:f=Math.min(f,h._length),y0:r,y1:r}}(u._polygons);null===O&&(O={x0:g[0],x1:g[0],y0:g[1],y1:g[1]});var D=s.defaultLine;return s.opacity(u.fillcolor)?D=u.fillcolor:s.opacity((u.line||{}).color)&&(D=u.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:O.x0,x1:O.x1,y0:O.y0,y1:O.y1,color:D,hovertemplate:!1}),delete t.index,u.text&&!n.isArrayOrTypedArray(u.text)?t.text=String(u.text):t.text=u.name,[t]}}},56384:(t,e,r)=>{"use strict";var n=r(677);t.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:r(98387),layoutAttributes:r(49114),supplyDefaults:r(28724),crossTraceDefaults:r(30415),supplyLayoutDefaults:r(25229),calc:r(93459).calc,crossTraceCalc:r(30888),arraysToCalcdata:r(55508),plot:r(54461),colorbar:r(89927),formatLabels:r(23315),style:r(21905).style,styleOnSelect:r(21905).styleOnSelect,hoverPoints:r(2686),selectPoints:r(96414),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:r(29592),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{description:["The scatter trace type encompasses line charts, scatter charts, text charts, and bubble charts.","The data visualized as scatter point or lines is set in `x` and `y`.","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}}},49114:t=>{"use strict";t.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc",description:["Determines how scatter points at the same location coordinate","are displayed on the graph.","With *group*, the scatter points are plotted next to one another","centered around the shared location.","With *overlay*, the scatter points are plotted over one another,","you might need to reduce *opacity* to see multiple scatter points."].join(" ")},scattergap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between scatter points of","adjacent location coordinates.","Defaults to `bargap`."].join(" ")}}},25229:(t,e,r)=>{"use strict";var n=r(12822),i=r(49114);t.exports=function(t,e){var r,o="group"===e.barmode;"group"===e.scattermode&&(r=o?e.bargap:.2,n.coerce(t,e,i,"scattergap",r))}},51725:(t,e,r)=>{"use strict";var n=r(12822).isArrayOrTypedArray,i=r(42226).hasColorscale,o=r(94461);t.exports=function(t,e,r,a,s,l){l||(l={});var c=(t.marker||{}).color;c&&c._inputArray&&(c=c._inputArray),s("line.color",r),i(t,"line")?o(t,e,a,s,{prefix:"line.",cLetter:"c"}):s("line.color",!n(c)&&c||r),s("line.width"),l.noDash||s("line.dash"),l.backoff&&s("line.backoff")}},22980:(t,e,r)=>{"use strict";var n=r(40666),i=r(32994),o=i.BADNUM,a=i.LOG_CLIP,s=a+.5,l=a-.5,c=r(12822),d=c.segmentsIntersect,u=c.constrain,h=r(32565);t.exports=function(t,e){var r,i,a,p,f,m,g,v,b,y,x,w,_,k,A,T,M,S,C=e.trace||{},E=e.xaxis,L=e.yaxis,z="log"===E.type,O="log"===L.type,D=E._length,I=L._length,F=e.backoff,R=C.marker,P=e.connectGaps,j=e.baseTolerance,N=e.shape,B="linear"===N,U=C.fill&&"none"!==C.fill,G=[],V=h.minTolerance,H=t.length,W=new Array(H),q=0;function Y(r){var n=t[r];if(!n)return!1;var i=e.linearized?E.l2p(n.x):E.c2p(n.x),a=e.linearized?L.l2p(n.y):L.c2p(n.y);if(i===o){if(z&&(i=E.c2p(n.x,!0)),i===o)return!1;O&&a===o&&(i*=Math.abs(E._m*I*(E._m>0?s:l)/(L._m*D*(L._m>0?s:l)))),i*=1e3}if(a===o){if(O&&(a=L.c2p(n.y,!0)),a===o)return!1;a*=1e3}return[i,a]}function Z(t,e,r,n){var i=r-t,o=n-e,a=.5-t,s=.5-e,l=i*i+o*o,c=i*a+o*s;if(c>0&&cat||t[1]lt)return[u(t[0],ot,at),u(t[1],st,lt)]}function ut(t,e){return t[0]===e[0]&&(t[0]===ot||t[0]===at)||t[1]===e[1]&&(t[1]===st||t[1]===lt)||void 0}function ht(t,e,r){return function(n,i){var o=dt(n),a=dt(i),s=[];if(o&&a&&ut(o,a))return s;o&&s.push(o),a&&s.push(a);var l=2*c.constrain((n[t]+i[t])/2,e,r)-((o||n)[t]+(a||i)[t]);return l&&((o&&a?l>0==o[t]>a[t]?o:a:o||a)[t]+=l),s}}function pt(t){var e=t[0],r=t[1],n=e===W[q-1][0],i=r===W[q-1][1];if(!n||!i)if(q>1){var o=e===W[q-2][0],a=r===W[q-2][1];n&&(e===ot||e===at)&&o?a?q--:W[q-1]=t:i&&(r===st||r===lt)&&a?o?q--:W[q-1]=t:W[q++]=t}else W[q++]=t}function ft(t){W[q-1][0]!==t[0]&&W[q-1][1]!==t[1]&&pt([Q,tt]),pt(t),et=null,Q=tt=0}"linear"===N||"spline"===N?nt=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var o=ct[i],a=d(t[0],t[1],e[0],e[1],o[0],o[1],o[2],o[3]);a&&(!n||Math.abs(a.x-r[0][0])>1||Math.abs(a.y-r[0][1])>1)&&(a=[a.x,a.y],n&&X(a,t)at?at:0,K=e[1]lt?lt:0,J||K){if(q)if(et){var n=nt(et,e);n.length>1&&(ft(n[0]),W[q++]=n[1])}else rt=nt(W[q-1],e)[0],W[q++]=rt;else W[q++]=[J||e[0],K||e[1]];var i=W[q-1];J&&K&&(i[0]!==J||i[1]!==K)?(et&&(Q!==J&&tt!==K?pt(Q&&tt?(o=et,s=(a=e)[0]-o[0],l=(a[1]-o[1])/s,(o[1]*a[0]-a[1]*o[0])/s>0?[l>0?ot:at,lt]:[l>0?at:ot,st]):[Q||J,tt||K]):Q&&tt&&pt([Q,tt])),pt([J,K])):Q-J&&tt-K&&pt([J||Q,K||tt]),et=e,Q=J,tt=K}else et&&ft(nt(et,e)[0]),W[q++]=e;var o,a,s,l}for(r=0;r$(m,vt))break;a=m,(_=b[0]*v[0]+b[1]*v[1])>x?(x=_,p=m,g=!1):_=t.length||!m)break;gt(m),i=m}}else gt(p)}et&&pt([Q||et[0],tt||et[1]]),G.push(W.slice(0,q))}var bt=N.slice(N.length-1);if(F&&"h"!==bt&&"v"!==bt){for(var yt=!1,xt=-1,wt=[],_t=0;_t{"use strict";t.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},57931:t=>{"use strict";var e={tonextx:1,tonexty:1,tonext:1};t.exports=function(t,r,n){var i,o,a,s,l,c={},d=!1,u=-1,h=0,p=-1;for(o=0;o=0?l=p:(l=p=h,h++),l{"use strict";var n=r(7370);t.exports=function(t,e){e||(e=2);var r=t.marker,i=r.sizeref||1,o=r.sizemin||0,a="area"===r.sizemode?function(t){return Math.sqrt(t/i)}:function(t){return t/i};return function(t){var r=a(t/e);return n(r)&&r>0?Math.max(r,o):0}}},89927:t=>{"use strict";t.exports={container:"marker",min:"cmin",max:"cmax"}},86277:(t,e,r)=>{"use strict";var n=r(17499),i=r(42226).hasColorscale,o=r(94461),a=r(677);t.exports=function(t,e,r,s,l,c){var d=a.isBubble(t),u=(t.line||{}).color;c=c||{},u&&(r=u),l("marker.symbol"),l("marker.opacity",d?.7:1),l("marker.size"),c.noAngle||(l("marker.angle"),c.noAngleRef||l("marker.angleref"),c.noStandOff||l("marker.standoff")),l("marker.color",r),i(t,"marker")&&o(t,e,s,l,{prefix:"marker.",cLetter:"c"}),c.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),c.noLine||(l("marker.line.color",u&&!Array.isArray(u)&&e.marker.color!==u?u:d?n.background:n.defaultLine),i(t,"marker.line")&&o(t,e,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",d?1:0)),d&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),c.gradient&&"none"!==l("marker.gradient.type")&&l("marker.gradient.color")}},45952:(t,e,r)=>{"use strict";var n=r(12822).dateTick0,i=r(32994).ONEWEEK;function o(t,e){return n(e,t%i==0?1:0)}t.exports=function(t,e,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var a=n("xperiod");a&&(n("xperiod0",o(a,e.xcalendar)),n("xperiodalignment"))}if(i.y){var s=n("yperiod");s&&(n("yperiod0",o(s,e.ycalendar)),n("yperiodalignment"))}}},54461:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=o.ensureSingle,s=o.identity,l=r(40666),c=r(677),d=r(22980),u=r(57931),h=r(92620).tester;function p(t,e,r,u,p,f,m){var g,v=t._context.staticPlot;!function(t,e,r,i,a){var s=r.xaxis,l=r.yaxis,d=n.extent(o.simpleMap(s.range,s.r2c)),u=n.extent(o.simpleMap(l.range,l.r2c)),h=i[0].trace;if(c.hasMarkers(h)){var p=h.marker.maxdisplayed;if(0!==p){var f=i.filter((function(t){return t.x>=d[0]&&t.x<=d[1]&&t.y>=u[0]&&t.y<=u[1]})),m=Math.ceil(f.length/p),g=0;a.forEach((function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return b?t.transition():t}var x=r.xaxis,w=r.yaxis,_=u[0].trace,k=_.line,A=n.select(f),T=a(A,"g","errorbars"),M=a(A,"g","lines"),S=a(A,"g","points"),C=a(A,"g","text");if(i.getComponentMethod("errorbars","plot")(t,T,r,m),!0===_.visible){var E,L;y(A).style("opacity",_.opacity);var z,O,D=_.fill.charAt(_.fill.length-1);"x"!==D&&"y"!==D&&(D=""),"y"===D?(z=1,O=w.c2p(0,!0)):"x"===D&&(z=0,O=x.c2p(0,!0)),u[0][r.isRangePlot?"nodeRangePlot3":"node3"]=A;var I,F,R="",P=[],j=_._prevtrace,N=null,B=null;j&&(R=j._prevRevpath||"",L=j._nextFill,P=j._ownPolygons,N=j._fillsegments,B=j._fillElement);var U,G,V,H,W,q,Y="",Z="",$=[];_._polygons=[];var X=[],J=[],K=o.noop;if(E=_._ownFill,c.hasLines(_)||"none"!==_.fill){L&&L.datum(u),-1!==["hv","vh","hvh","vhv"].indexOf(k.shape)?(U=l.steps(k.shape),G=l.steps(k.shape.split("").reverse().join(""))):U=G="spline"===k.shape?function(t){var e=t[t.length-1];return t.length>1&&t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),k.smoothing):l.smoothopen(t,k.smoothing)}:function(t){return"M"+t.join("L")},V=function(t){return G(t.reverse())},J=d(u,{xaxis:x,yaxis:w,trace:_,connectGaps:_.connectgaps,baseTolerance:Math.max(k.width||1,3)/4,shape:k.shape,backoff:k.backoff,simplify:k.simplify,fill:_.fill}),X=new Array(J.length);var Q=0;for(g=0;g0,g=u(t,e,r);(d=i.selectAll("g.trace").data(g,(function(t){return t[0].trace.uid}))).enter().append("g").attr("class",(function(t){return"trace scatter trace"+t[0].trace.uid})).style("stroke-miterlimit",2),d.order(),function(t,e,r){e.each((function(e){var i=a(n.select(this),"g","fills");l.setClipUrl(i,r.layerClipId,t);var o=e[0].trace,c=[];o._ownfill&&c.push("_ownFill"),o._nexttrace&&c.push("_nextFill");var d=i.selectAll("g").data(c,s);d.enter().append("g"),d.exit().each((function(t){o[t]=null})).remove(),d.order().each((function(t){o[t]=a(n.select(this),"path","js-fill")}))}))}(t,d,e),m?(c&&(h=c()),n.transition().duration(o.duration).ease(o.easing).each("end",(function(){h&&h()})).each("interrupt",(function(){h&&h()})).each((function(){i.selectAll("g.trace").each((function(r,n){p(t,n,e,r,g,this,o)}))}))):d.each((function(r,n){p(t,n,e,r,g,this,o)})),f&&d.exit().remove(),i.selectAll("path:not([d])").remove()}},96414:(t,e,r)=>{"use strict";var n=r(677);t.exports=function(t,e){var r,i,o,a,s=t.cd,l=t.xaxis,c=t.yaxis,d=[],u=s[0].trace;if(!n.hasMarkers(u)&&!n.hasText(u))return[];if(!1===e)for(r=0;r{"use strict";var e=["orientation","groupnorm","stackgaps"];t.exports=function(t,r,n,i){var o=n._scatterStackOpts,a=i("stackgroup");if(a){var s=r.xaxis+r.yaxis,l=o[s];l||(l=o[s]={});var c=l[a],d=!1;c?c.traces.push(r):(c=l[a]={traceIndices:[],traces:[r]},d=!0);for(var u={orientation:r.x&&!r.y?"h":"v"},h=0;h{"use strict";var n=r(27941),i=r(40666),o=r(25059);function a(t,e,r){i.pointStyle(t.selectAll("path.point"),e,r)}function s(t,e,r){i.textPointStyle(t.selectAll("text"),e,r)}t.exports={style:function(t){var e=n.select(t).selectAll("g.trace.scatter");e.style("opacity",(function(t){return t[0].trace.opacity})),e.selectAll("g.points").each((function(e){a(n.select(this),e.trace||e[0].trace,t)})),e.selectAll("g.text").each((function(e){s(n.select(this),e.trace||e[0].trace,t)})),e.selectAll("g.trace path.js-line").call(i.lineGroupStyle),e.selectAll("g.trace path.js-fill").call(i.fillGroupStyle,t,!1),o.getComponentMethod("errorbars","style")(e)},stylePoints:a,styleText:s,styleOnSelect:function(t,e,r){var n=e[0].trace;n.selectedpoints?(i.selectedPointStyle(r.selectAll("path.point"),n),i.selectedTextStyle(r.selectAll("text"),n)):(a(r,n,t),s(r,n,t))}}},677:(t,e,r)=>{"use strict";var n=r(12822),i=r(98507).isTypedArraySpec;t.exports={hasLines:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf("lines")},hasMarkers:function(t){return t.visible&&(t.mode&&-1!==t.mode.indexOf("markers")||"splom"===t.type)},hasText:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf("text")},isBubble:function(t){var e=t.marker;return n.isPlainObject(e)&&(n.isArrayOrTypedArray(e.size)||i(e.size))}}},46574:(t,e,r)=>{"use strict";var n=r(12822);t.exports=function(t,e,r,i,o){o=o||{},i("textposition"),n.coerceFont(i,"textfont",o.font||r.font,o),o.noSelect||(i("selected.textfont.color"),i("unselected.textfont.color"))}},56666:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059);t.exports=function(t,e,r,o){var a,s=o("x"),l=o("y");if(i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],r),s){var c=n.minRowLength(s);l?a=Math.min(c,n.minRowLength(l)):(a=c,o("y0"),o("dy"))}else{if(!l)return 0;a=n.minRowLength(l),o("x0"),o("dx")}return e._length=a,a}},42674:(t,e,r)=>{"use strict";var n=r(98387),i=r(75058),o=r(89322),a=r(60393).axisHoverFormat,s=r(24131).rb,l=r(24131).ay,c=r(3520),d=r(55697),u=r(24134),h=r(98260).extendFlat,p=r(62309).overrideAll,f=r(54747),m=n.line,g=n.marker,v=g.line,b=h({width:m.width,dash:{valType:"enumerated",values:f(d),dflt:"solid",description:"Sets the dash style of the lines."}},o("line"));function y(t){return{show:{valType:"boolean",dflt:!1,description:["Sets whether or not projections are shown along the",t,"axis."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:"Sets the projection color."},scale:{valType:"number",min:0,max:10,dflt:2/3,description:["Sets the scale factor determining the size of the","projection marker points."].join(" ")}}}var x=t.exports=p({x:n.x,y:n.y,z:{valType:"data_array",description:"Sets the z coordinates."},text:h({},n.text,{description:["Sets text elements associated with each (x,y,z) triplet.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y,z) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")}),texttemplate:l({},{}),hovertext:h({},n.hovertext,{description:["Sets text elements associated with each (x,y,z) triplet.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y,z) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),hovertemplate:s(),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),mode:h({},n.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1,description:["If *-1*, the scatter points are not fill with a surface","If *0*, *1*, *2*, the scatter points are filled with","a Delaunay surface about the x, y, z respectively."].join(" ")},surfacecolor:{valType:"color",description:"Sets the surface fill color."},projection:{x:y("x"),y:y("y"),z:y("z")},connectgaps:n.connectgaps,line:b,marker:h({symbol:{valType:"enumerated",values:f(u),dflt:"circle",arrayOk:!0,description:"Sets the marker symbol type."},size:h({},g.size,{dflt:8}),sizeref:g.sizeref,sizemin:g.sizemin,sizemode:g.sizemode,opacity:h({},g.opacity,{arrayOk:!1,description:["Sets the marker opacity.","Note that the marker opacity for scatter3d traces","must be a scalar value for performance reasons.","To set a blending opacity value","(i.e. which is not transparent), set *marker.color*","to an rgba color and use its alpha channel."].join(" ")}),colorbar:g.colorbar,line:h({width:h({},v.width,{arrayOk:!1})},o("marker.line"))},o("marker")),textposition:h({},n.textposition,{dflt:"top center"}),textfont:i({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"],description:"Sets the text font."}),opacity:c.opacity,hoverinfo:h({},c.hoverinfo)},"calc","nested");x.x.editType=x.y.editType=x.z.editType="calc+clearAxisTypes"},34670:(t,e,r)=>{"use strict";var n=r(55508),i=r(45065);t.exports=function(t,e){var r=[{x:!1,y:!1,trace:e,t:{}}];return n(r,e),i(t,e),r}},35650:(t,e,r)=>{"use strict";var n=r(25059);function i(t,e,r,i){if(!e||!e.visible)return null;for(var o=n.getComponentMethod("errorbars","makeComputeError")(e),a=new Array(t.length),s=0;s0){var h=i.c2l(d);i._lowerLogErrorBound||(i._lowerLogErrorBound=h),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,h)}}else a[s]=[-l[0]*r,l[1]*r]}return a}t.exports=function(t,e,r){var n=[i(t.x,t.error_x,e[0],r.xaxis),i(t.y,t.error_y,e[1],r.yaxis),i(t.z,t.error_z,e[2],r.zaxis)],o=function(t){for(var e=0;e{"use strict";var n=r(31845).gl_line3d,i=r(31845).gl_scatter3d,o=r(31845).gl_error3d,a=r(31845).gl_mesh3d,s=r(31845).delaunay_triangulate,l=r(12822),c=r(17235),d=r(25069).formatColor,u=r(43710),h=r(55697),p=r(24134),f=r(75815),m=r(66811).appendArrayPointValue,g=r(35650);function v(t,e){this.scene=t,this.uid=e,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var b=v.prototype;function y(t){return null==t?0:t.indexOf("left")>-1?-1:t.indexOf("right")>-1?1:0}function x(t){return null==t?0:t.indexOf("top")>-1?-1:t.indexOf("bottom")>-1?1:0}function w(t,e){return e(4*t)}function _(t){return p[t]}function k(t,e,r,n,i){var o=null;if(l.isArrayOrTypedArray(t)){o=[];for(var a=0;a=0){var C=function(t,e,r){var n,i=(r+1)%3,o=(r+2)%3,a=[],l=[];for(n=0;n{"use strict";var n=r(25059),i=r(12822),o=r(677),a=r(86277),s=r(51725),l=r(46574),c=r(42674);t.exports=function(t,e,r,d){function u(r,n){return i.coerce(t,e,c,r,n)}var h=function(t,e,r,i){var o=0,a=r("x"),s=r("y"),l=r("z");return n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],i),a&&s&&l&&(o=Math.min(a.length,s.length,l.length),e._length=e._xlength=e._ylength=e._zlength=o),o}(t,e,u,d);if(h){u("text"),u("hovertext"),u("hovertemplate"),u("xhoverformat"),u("yhoverformat"),u("zhoverformat"),u("mode"),o.hasMarkers(e)&&a(t,e,r,d,u,{noSelect:!0,noAngle:!0}),o.hasLines(e)&&(u("connectgaps"),s(t,e,r,d,u)),o.hasText(e)&&(u("texttemplate"),l(t,e,d,u,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var p=(e.line||{}).color,f=(e.marker||{}).color;u("surfaceaxis")>=0&&u("surfacecolor",p||f);for(var m=["x","y","z"],g=0;g<3;++g){var v="projection."+m[g];u(v+".show")&&(u(v+".opacity"),u(v+".scale"))}var b=n.getComponentMethod("errorbars","supplyDefaults");b(t,e,p||f||r,{axis:"z"}),b(t,e,p||f||r,{axis:"y",inherit:"z"}),b(t,e,p||f||r,{axis:"x",inherit:"z"})}else e.visible=!1}},46443:(t,e,r)=>{"use strict";t.exports={plot:r(37031),attributes:r(42674),markerSymbols:r(24134),supplyDefaults:r(49957),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:r(34670),moduleType:"trace",name:"scatter3d",basePlotModule:r(98030),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{hrName:"scatter_3d",description:["The data visualized as scatter point or lines in 3D dimension","is set in `x`, `y`, `z`.","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","Projections are achieved via `projection`.","Surface fills are achieved via `surfaceaxis`."].join(" ")}}},77982:(t,e,r)=>{"use strict";var n=r(3520),i=r(75058),o=r(43591),a=r(98387),s=r(60393).axisHoverFormat,l=r(89322),c=r(54747),d=r(98260).extendFlat,u=r(62309).overrideAll,h=r(49538).DASHES,p=a.line,f=a.marker,m=f.line,g=t.exports=u({x:a.x,x0:a.x0,dx:a.dx,y:a.y,y0:a.y0,dy:a.dy,xperiod:a.xperiod,yperiod:a.yperiod,xperiod0:a.xperiod0,yperiod0:a.yperiod0,xperiodalignment:a.xperiodalignment,yperiodalignment:a.yperiodalignment,xhoverformat:s("x"),yhoverformat:s("y"),text:a.text,hovertext:a.hovertext,textposition:a.textposition,textfont:i({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,noNumericWeightValues:!0,variantValues:["normal","small-caps"],description:"Sets the text font."}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],description:["Determines the drawing mode for this scatter trace."].join(" ")},line:{color:p.color,width:p.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","The values correspond to step-wise line shapes."].join(" ")},dash:{valType:"enumerated",values:c(h),dflt:"solid",description:"Sets the style of the lines."}},marker:d({},l("marker"),{symbol:f.symbol,angle:f.angle,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:f.opacity,colorbar:f.colorbar,line:d({},l("marker.line"),{width:m.width})}),connectgaps:a.connectgaps,fill:d({},a.fill,{dflt:"none"}),fillcolor:o(),selected:{marker:a.selected.marker,textfont:a.selected.textfont},unselected:{marker:a.unselected.marker,textfont:a.unselected.textfont},opacity:n.opacity},"calc","nested");g.x.editType=g.y.editType=g.x0.editType=g.y0.editType="calc+clearAxisTypes",g.hovertemplate=a.hovertemplate,g.texttemplate=a.texttemplate},78737:(t,e,r)=>{"use strict";var n=r(88625);t.exports={moduleType:"trace",name:"scattergl",basePlotModule:r(29592),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:r(77982),supplyDefaults:r(51465),crossTraceDefaults:r(30415),colorbar:r(89927),formatLabels:r(18948),calc:r(54874),hoverPoints:n.hoverPoints,selectPoints:r(76787),meta:{hrName:"scatter_gl",description:["The data visualized as scatter point or lines is set in `x` and `y`","using the WebGL plotting engine.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to a numerical arrays."].join(" ")}}},54874:(t,e,r)=>{"use strict";var n=r(4832),i=r(12822),o=r(99246),a=r(19496).findExtremes,s=r(15389),l=r(93459),c=l.calcMarkerSize,d=l.calcAxisExpansion,u=l.setFirstScatter,h=r(45065),p=r(77064),f=r(7111),m=r(32994).BADNUM,g=r(49538).TOO_MANY_POINTS;function v(t,e,r){var n=t._extremes[e._id],i=a(e,r._bnds,{padded:!0});n.min=n.min.concat(i.min),n.max=n.max.concat(i.max)}t.exports=function(t,e){var r,a=t._fullLayout,l=e._xA=o.getFromId(t,e.xaxis,"x"),b=e._yA=o.getFromId(t,e.yaxis,"y"),y=a._plots[e.xaxis+e.yaxis],x=e._length,w=x>=g,_=2*x,k={},A=l.makeCalcdata(e,"x"),T=b.makeCalcdata(e,"y"),M=s(e,l,"x",A),S=s(e,b,"y",T),C=M.vals,E=S.vals;e._x=C,e._y=E,e.xperiodalignment&&(e._origX=A,e._xStarts=M.starts,e._xEnds=M.ends),e.yperiodalignment&&(e._origY=T,e._yStarts=S.starts,e._yEnds=S.ends);var L=new Array(_),z=new Array(x);for(r=0;r1&&i.extendFlat(s.line,p.linePositions(t,r,n)),s.errorX||s.errorY){var l=p.errorBarPositions(t,r,n,o,a);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}return s.text&&(i.extendFlat(s.text,{positions:n},p.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},p.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},p.textPosition(t,r,s.text,s.markerUnsel))),s}(t,0,e,L,C,E),I=f(t,y);return u(a,e),w?D.marker&&(O=D.marker.sizeAvg||Math.max(D.marker.size,3)):O=c(e,x),d(t,e,l,b,C,E,O),D.errorX&&v(e,l,D.errorX),D.errorY&&v(e,b,D.errorY),D.fill&&!I.fill2d&&(I.fill2d=!0),D.marker&&!I.scatter2d&&(I.scatter2d=!0),D.line&&!I.line2d&&(I.line2d=!0),!D.errorX&&!D.errorY||I.error2d||(I.error2d=!0),D.text&&!I.glText&&(I.glText=!0),D.marker&&(D.marker.snap=x),I.lineOptions.push(D.line),I.errorXOptions.push(D.errorX),I.errorYOptions.push(D.errorY),I.fillOptions.push(D.fill),I.markerOptions.push(D.marker),I.markerSelectedOptions.push(D.markerSel),I.markerUnselectedOptions.push(D.markerUnsel),I.textOptions.push(D.text),I.textSelectedOptions.push(D.textSel),I.textUnselectedOptions.push(D.textUnsel),I.selectBatch.push([]),I.unselectBatch.push([]),k._scene=I,k.index=I.count,k.x=C,k.y=E,k.positions=L,I.count++,[{x:!1,y:!1,t:k,trace:e}]}},49538:t=>{"use strict";t.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},77064:(t,e,r)=>{"use strict";var n=r(7370),i=r(77622),o=r(34463),a=r(25059),s=r(12822),l=s.isArrayOrTypedArray,c=r(40666),d=r(99246),u=r(25069).formatColor,h=r(677),p=r(43710),f=r(91886),m=r(49538),g=r(11891).DESELECTDIM,v={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},b=r(66811).appendArrayPointValue;function y(t,e){var r,i=t._fullLayout,o=e._length,a=e.textfont,c=e.textposition,d=l(c)?c:[c],u=a.color,h=a.size,p=a.family,f=a.weight,m=a.style,g=a.variant,v={},y=t._context.plotGlPixelRatio,w=e.texttemplate;if(w){v.text=[];var _=i._d3locale,k=Array.isArray(w),A=k?Math.min(w.length,o):o,T=k?function(t){return w[t]}:function(){return w};for(r=0;r500?"bold":"normal":t}function w(t,e){var r,n,i=e._length,a=e.marker,s={},c=l(a.symbol),d=l(a.angle),h=l(a.color),m=l(a.line.color),g=l(a.opacity),v=l(a.size),b=l(a.line.width);if(c||(n=f.isOpenSymbol(a.symbol)),c||h||m||g||d){s.symbols=new Array(i),s.angles=new Array(i),s.colors=new Array(i),s.borderColors=new Array(i);var y=a.symbol,x=a.angle,w=u(a,a.opacity,i),_=u(a.line,a.opacity,i);if(!l(_[0])){var k=_;for(_=Array(i),r=0;rm.TOO_MANY_POINTS||h.hasMarkers(e)?"rect":"round";if(c&&e.connectgaps){var u=n[0],p=n[1];for(i=0;i1?c[i]:c[0]:c,m=l(d)?d.length>1?d[i]:d[0]:d,g=v[f],b=v[m],y=u?u/.8+1:0,x=-b*y-.5*b;a.offset[i]=[g*y/p,x/p]}}return a}}},51465:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059),o=r(91886),a=r(77982),s=r(32565),l=r(677),c=r(56666),d=r(45952),u=r(86277),h=r(51725),p=r(12261),f=r(46574);t.exports=function(t,e,r,m){function g(r,i){return n.coerce(t,e,a,r,i)}var v=!!t.marker&&o.isOpenSymbol(t.marker.symbol),b=l.isBubble(t),y=c(t,e,m,g);if(y){d(t,e,m,g),g("xhoverformat"),g("yhoverformat");var x=y{"use strict";var n=r(12822),i=r(17499),o=r(11891).DESELECTDIM;t.exports={styleTextSelection:function(t){var e,r,a=t[0],s=a.trace,l=a.t,c=l._scene,d=l.index,u=c.selectBatch[d],h=c.unselectBatch[d],p=c.textOptions[d],f=c.textSelectedOptions[d]||{},m=c.textUnselectedOptions[d]||{},g=n.extendFlat({},p);if(u.length||h.length){var v=f.color,b=m.color,y=p.color,x=n.isArrayOrTypedArray(y);for(g.color=new Array(s._length),e=0;e{"use strict";var n=r(23315);t.exports=function(t,e,r){var i=t.i;return"x"in t||(t.x=e._x[i]),"y"in t||(t.y=e._y[i]),n(t,e,r)}},91886:(t,e,r)=>{"use strict";var n=r(49538);e.isOpenSymbol=function(t){return"string"==typeof t?n.OPEN_RE.test(t):t%200>100},e.isDotSymbol=function(t){return"string"==typeof t?n.DOT_RE.test(t):t>200}},88625:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822),o=r(90566);function a(t,e,r,a){var s=t.xa,l=t.ya,c=t.distance,d=t.dxy,u=t.index,h={pointNumber:u,x:e[u],y:r[u]};h.tx=i.isArrayOrTypedArray(a.text)?a.text[u]:a.text,h.htx=Array.isArray(a.hovertext)?a.hovertext[u]:a.hovertext,h.data=Array.isArray(a.customdata)?a.customdata[u]:a.customdata,h.tp=Array.isArray(a.textposition)?a.textposition[u]:a.textposition;var p=a.textfont;p&&(h.ts=i.isArrayOrTypedArray(p.size)?p.size[u]:p.size,h.tc=i.isArrayOrTypedArray(p.color)?p.color[u]:p.color,h.tf=Array.isArray(p.family)?p.family[u]:p.family,h.tw=Array.isArray(p.weight)?p.weight[u]:p.weight,h.ty=Array.isArray(p.style)?p.style[u]:p.style,h.tv=Array.isArray(p.variant)?p.variant[u]:p.variant);var f=a.marker;f&&(h.ms=i.isArrayOrTypedArray(f.size)?f.size[u]:f.size,h.mo=i.isArrayOrTypedArray(f.opacity)?f.opacity[u]:f.opacity,h.mx=i.isArrayOrTypedArray(f.symbol)?f.symbol[u]:f.symbol,h.ma=i.isArrayOrTypedArray(f.angle)?f.angle[u]:f.angle,h.mc=i.isArrayOrTypedArray(f.color)?f.color[u]:f.color);var m=f&&f.line;m&&(h.mlc=Array.isArray(m.color)?m.color[u]:m.color,h.mlw=i.isArrayOrTypedArray(m.width)?m.width[u]:m.width);var g=f&&f.gradient;g&&"none"!==g.type&&(h.mgt=Array.isArray(g.type)?g.type[u]:g.type,h.mgc=Array.isArray(g.color)?g.color[u]:g.color);var v=s.c2p(h.x,!0),b=l.c2p(h.y,!0),y=h.mrc||1,x=a.hoverlabel;x&&(h.hbg=Array.isArray(x.bgcolor)?x.bgcolor[u]:x.bgcolor,h.hbc=Array.isArray(x.bordercolor)?x.bordercolor[u]:x.bordercolor,h.hts=i.isArrayOrTypedArray(x.font.size)?x.font.size[u]:x.font.size,h.htc=Array.isArray(x.font.color)?x.font.color[u]:x.font.color,h.htf=Array.isArray(x.font.family)?x.font.family[u]:x.font.family,h.hnl=i.isArrayOrTypedArray(x.namelength)?x.namelength[u]:x.namelength);var w=a.hoverinfo;w&&(h.hi=Array.isArray(w)?w[u]:w);var _=a.hovertemplate;_&&(h.ht=Array.isArray(_)?_[u]:_);var k={};k[t.index]=h;var A=a._origX,T=a._origY,M=i.extendFlat({},t,{color:o(a,h),x0:v-y,x1:v+y,xLabelVal:A?A[u]:h.x,y0:b-y,y1:b+y,yLabelVal:T?T[u]:h.y,cd:k,distance:c,spikeDistance:d,hovertemplate:h.ht});return h.htx?M.text=h.htx:h.tx?M.text=h.tx:a.text&&(M.text=a.text),i.fillText(h,a,M),n.getComponentMethod("errorbars","hoverInfo")(h,a,M),M}t.exports={hoverPoints:function(t,e,r,n){var i,o,s,l,c,d,u,h,p,f,m=t.cd,g=m[0].t,v=m[0].trace,b=t.xa,y=t.ya,x=g.x,w=g.y,_=b.c2p(e),k=y.c2p(r),A=t.distance;if(g.tree){var T=b.p2c(_-A),M=b.p2c(_+A),S=y.p2c(k-A),C=y.p2c(k+A);i="x"===n?g.tree.range(Math.min(T,M),Math.min(y._rl[0],y._rl[1]),Math.max(T,M),Math.max(y._rl[0],y._rl[1])):g.tree.range(Math.min(T,M),Math.min(S,C),Math.max(T,M),Math.max(S,C))}else i=g.ids;var E=A;if("x"===n){var L=!!v.xperiodalignment,z=!!v.yperiodalignment;for(d=0;d=Math.min(O,D)&&_<=Math.max(O,D)?0:1/0}if(u=Math.min(I,F)&&k<=Math.max(I,F)?0:1/0}f=Math.sqrt(u*u+h*h),s=i[d]}}}else for(d=i.length-1;d>-1;d--)l=x[o=i[d]],c=w[o],u=b.c2p(l)-_,h=y.c2p(c)-k,(p=Math.sqrt(u*u+h*h)){"use strict";var n=r(78737);n.plot=r(96360),t.exports=n},96360:(t,e,r)=>{"use strict";var n=r(51645),i=r(98331),o=r(86373),a=r(69499),s=r(12822),l=r(14295).selectMode,c=r(41246),d=r(677),u=r(57931),h=r(4673).styleTextSelection,p={};function f(t,e,r,n){var i=t._size,o=t.width*n,a=t.height*n,s=i.l*n,l=i.b*n,c=i.r*n,d=i.t*n,u=i.w*n,h=i.h*n;return[s+e.domain[0]*u,l+r.domain[0]*h,o-c-(1-e.domain[1])*u,a-d-(1-r.domain[1])*h]}(t.exports=function(t,e,r){if(r.length){var m,g,v=t._fullLayout,b=e._scene,y=e.xaxis,x=e.yaxis;if(b)if(c(t,["ANGLE_instanced_arrays","OES_element_index_uint"],p)){var w=b.count,_=v._glcanvas.data()[0].regl;if(u(t,e,r),b.dirty){if(!b.line2d&&!b.error2d||b.scatter2d||b.fill2d||b.glText||_.clear({}),!0===b.error2d&&(b.error2d=o(_)),!0===b.line2d&&(b.line2d=i(_)),!0===b.scatter2d&&(b.scatter2d=n(_)),!0===b.fill2d&&(b.fill2d=i(_)),!0===b.glText)for(b.glText=new Array(w),m=0;mb.glText.length){var k=w-b.glText.length;for(m=0;mr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t})),b.line2d.update(b.lineOptions)),b.error2d){var T=(b.errorXOptions||[]).concat(b.errorYOptions||[]);b.error2d.update(T)}b.scatter2d&&b.scatter2d.update(b.markerOptions),b.fillOrder=s.repeat(null,w),b.fill2d&&(b.fillOptions=b.fillOptions.map((function(t,e){var n=r[e];if(t&&n&&n[0]&&n[0].trace){var i,o,a=n[0],s=a.trace,l=a.t,c=b.lineOptions[e],d=[];s._ownfill&&d.push(e),s._nexttrace&&d.push(e+1),d.length&&(b.fillOrder[e]=d);var u,h,p=[],f=c&&c.positions||l.positions;if("tozeroy"===s.fill){for(u=0;uu&&isNaN(f[h+1]);)h-=2;0!==f[u+1]&&(p=[f[u],0]),p=p.concat(f.slice(u,h+2)),0!==f[h+1]&&(p=p.concat([f[h],0]))}else if("tozerox"===s.fill){for(u=0;uu&&isNaN(f[h]);)h-=2;0!==f[u]&&(p=[0,f[u+1]]),p=p.concat(f.slice(u,h+2)),0!==f[h]&&(p=p.concat([0,f[h+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(p=[],i=0,t.splitNull=!0,o=0;o-1;for(m=0;m{"use strict";var n=r(12822);t.exports=function(t,e){var r=e._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},o={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return e._scene||((r=e._scene={}).init=function(){n.extendFlat(r,o,i)},r.init(),r.update=function(t){var e=n.repeat(t,r.count);if(r.fill2d&&r.fill2d.update(e),r.scatter2d&&r.scatter2d.update(e),r.line2d&&r.line2d.update(e),r.error2d&&r.error2d.update(e.concat(e)),r.select2d&&r.select2d.update(e),r.glText)for(var i=0;i{"use strict";var n=r(677),i=r(4673).styleTextSelection;t.exports=function(t,e){var r=t.cd,o=t.xaxis,a=t.yaxis,s=[],l=r[0].trace,c=r[0].t,d=l._length,u=c.x,h=c.y,p=c._scene,f=c.index;if(!p)return s;var m=n.hasText(l),g=n.hasMarkers(l),v=!g&&!m;if(!0!==l.visible||v)return s;var b=[],y=[];if(!1!==e&&!e.degenerate)for(var x=0;x{"use strict";e.version="2.35.2"},31845:(t,e,r)=>{var n=r(39807);!function(){var e={1964:function(t,e,r){t.exports={alpha_shape:r(3502),convex_hull:r(7352),delaunay_triangulate:r(7642),gl_cone3d:r(6405),gl_error3d:r(9165),gl_heatmap2d:r(2510),gl_line3d:r(5714),gl_mesh3d:r(7201),gl_plot2d:r(1850),gl_plot3d:r(4100),gl_pointcloud2d:r(4696),gl_scatter3d:r(8418),gl_select_box:r(3161),gl_spikes2d:r(4098),gl_streamtube3d:r(7815),gl_surface3d:r(9499),ndarray:r(9618),ndarray_linear_interpolate:r(4317)}},4793:function(t,e,r){"use strict";function n(t,e){for(var r=0;rh)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,f.prototype),e}function f(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return v(t)}return m(t,e,r)}function m(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|w(t,e),n=p(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(et(t,Uint8Array)){var e=new Uint8Array(t);return y(e.buffer,e.byteOffset,e.byteLength)}return b(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(t));if(et(t,ArrayBuffer)||t&&et(t.buffer,ArrayBuffer))return y(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(et(t,SharedArrayBuffer)||t&&et(t.buffer,SharedArrayBuffer)))return y(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return f.from(n,e,r);var i=function(t){if(f.isBuffer(t)){var e=0|x(t.length),r=p(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||rt(t.length)?p(0):b(t):"Buffer"===t.type&&Array.isArray(t.data)?b(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return f.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(t))}function g(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function v(t){return g(t),p(t<0?0:0|x(t))}function b(t){for(var e=t.length<0?0:0|x(t.length),r=p(e),n=0;n=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return 0|t}function w(t,e){if(f.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||et(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+l(t));var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Q(t).length;default:if(i)return n?-1:K(t).length;e=(""+e).toLowerCase(),i=!0}}function _(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return O(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return F(this,e,r);case"base64":return z(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function k(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function A(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),rt(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=f.from(e,n)),f.isBuffer(e))return 0===e.length?-1:T(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):T(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function T(t,e,r,n,i){var o,a=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var d=-1;for(o=r;os&&(r=s-l),o=r;o>=0;o--){for(var u=!0,h=0;hi&&(n=i):n=i;var o,a=e.length;for(n>a/2&&(n=a/2),o=0;o>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function z(t,e,r){return 0===e&&r===t.length?c.fromByteArray(t):c.fromByteArray(t.slice(e,r))}function O(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:o>223?3:o>191?2:1;if(i+s<=r){var l=void 0,c=void 0,d=void 0,u=void 0;switch(s){case 1:o<128&&(a=o);break;case 2:128==(192&(l=t[i+1]))&&(u=(31&o)<<6|63&l)>127&&(a=u);break;case 3:l=t[i+1],c=t[i+2],128==(192&l)&&128==(192&c)&&(u=(15&o)<<12|(63&l)<<6|63&c)>2047&&(u<55296||u>57343)&&(a=u);break;case 4:l=t[i+1],c=t[i+2],d=t[i+3],128==(192&l)&&128==(192&c)&&128==(192&d)&&(u=(15&o)<<18|(63&l)<<12|(63&c)<<6|63&d)>65535&&u<1114112&&(a=u)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return function(t){var e=t.length;if(e<=D)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn.length?(f.isBuffer(o)||(o=f.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else{if(!f.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},f.byteLength=w,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;er&&(t+=" ... "),""},u&&(f.prototype[u]=f.prototype.inspect),f.prototype.compare=function(t,e,r,n,i){if(et(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+l(t));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),c=this.slice(n,i),d=t.slice(e,r),u=0;u>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return M(this,t,e,r);case"utf8":case"utf-8":return S(this,t,e,r);case"ascii":case"latin1":case"binary":return C(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function N(t,e,r,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function B(t,e,r,n,i){Z(e,n,i,t,r,7);var o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;var a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function U(t,e,r,n,i){Z(e,n,i,t,r,7);var o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;var a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function G(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function V(t,e,r,n,i){return e=+e,r>>>=0,i||G(t,0,r,4),d.write(t,e,r,n,23,4),r+4}function H(t,e,r,n,i){return e=+e,r>>>=0,i||G(t,0,r,8),d.write(t,e,r,n,52,8),r+8}f.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||j(t,e,this.length);for(var n=this[t],i=1,o=0;++o>>=0,e>>>=0,r||j(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},f.prototype.readUint8=f.prototype.readUInt8=function(t,e){return t>>>=0,e||j(t,1,this.length),this[t]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(t,e){return t>>>=0,e||j(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(t,e){return t>>>=0,e||j(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(t,e){return t>>>=0,e||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(t,e){return t>>>=0,e||j(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readBigUInt64LE=it((function(t){$(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||X(t,this.length-8);var n=e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24),i=this[++t]+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+r*Math.pow(2,24);return BigInt(n)+(BigInt(i)<>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||X(t,this.length-8);var n=e*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t],i=this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+r;return(BigInt(n)<>>=0,e>>>=0,r||j(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},f.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||j(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},f.prototype.readInt8=function(t,e){return t>>>=0,e||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,e){t>>>=0,e||j(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(t,e){t>>>=0,e||j(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(t,e){return t>>>=0,e||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t>>>=0,e||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readBigInt64LE=it((function(t){$(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||X(t,this.length-8);var n=this[t+4]+this[t+5]*Math.pow(2,8)+this[t+6]*Math.pow(2,16)+(r<<24);return(BigInt(n)<>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||X(t,this.length-8);var n=(e<<24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t];return(BigInt(n)<>>=0,e||j(t,4,this.length),d.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t>>>=0,e||j(t,4,this.length),d.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t>>>=0,e||j(t,8,this.length),d.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t>>>=0,e||j(t,8,this.length),d.read(this,t,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||N(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,n||N(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},f.prototype.writeUint8=f.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,1,255,0),this[e]=255&t,e+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeBigUInt64LE=it((function(t){return B(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),f.prototype.writeBigUInt64BE=it((function(t){return U(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),f.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);N(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>>=0,!n){var i=Math.pow(2,8*r-1);N(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a|0)-s&255;return e+r},f.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},f.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeBigInt64LE=it((function(t){return B(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),f.prototype.writeBigInt64BE=it((function(t){return U(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),f.prototype.writeFloatLE=function(t,e,r){return V(this,t,e,!0,r)},f.prototype.writeFloatBE=function(t,e,r){return V(this,t,e,!1,r)},f.prototype.writeDoubleLE=function(t,e,r){return H(this,t,e,!0,r)},f.prototype.writeDoubleBE=function(t,e,r){return H(this,t,e,!1,r)},f.prototype.copy=function(t,e,r,n){if(!f.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o=n+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function Z(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(o+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(o+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(o+1)-1).concat(s):">= ".concat(e).concat(s," and <= ").concat(r).concat(s),new W.ERR_OUT_OF_RANGE("value",a,t)}!function(t,e,r){$(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||X(e,t.length-(r+1))}(n,i,o)}function $(t,e){if("number"!=typeof t)throw new W.ERR_INVALID_ARG_TYPE(e,"number",t)}function X(t,e,r){if(Math.floor(t)!==t)throw $(t,r),new W.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new W.ERR_BUFFER_OUT_OF_BOUNDS;throw new W.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(e),t)}q("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),q("ERR_INVALID_ARG_TYPE",(function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(l(e))}),TypeError),q("ERR_OUT_OF_RANGE",(function(t,e,r){var n='The value of "'.concat(t,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>Math.pow(2,32)?i=Y(String(r)):"bigint"==typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=Y(i)),i+="n"),n+" It must be ".concat(e,". Received ").concat(i)}),RangeError);var J=/[^+/0-9A-Za-z-_]/g;function K(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Q(t){return c.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(J,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function tt(t,e,r,n){var i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function et(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function rt(t){return t!=t}var nt=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}();function it(t){return"undefined"==typeof BigInt?ot:t}function ot(){throw new Error("BigInt not supported")}},9216:function(t){"use strict";t.exports=i,t.exports.isMobile=i,t.exports.default=i;var e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(t){t||(t={});var i=t.ua;if(i||"undefined"==typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"==typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!=typeof i)return!1;var o=e.test(i)&&!r.test(i)||!!t.tablet&&n.test(i);return!o&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(o=!0),o}},6296:function(t,e,r){"use strict";t.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],c=t.mode||"turntable",d=n(),u=i(),h=o();return d.setDistanceLimits(l[0],l[1]),d.lookAt(0,e,r,s),u.setDistanceLimits(l[0],l[1]),u.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),new a({turntable:d,orbit:u,matrix:h},c)};var n=r(7261),i=r(9977),o=r(4192);function a(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map((function(e){return t[e]})),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=a.prototype;s.flush=function(t){for(var e=this._controllerList,r=0;r0?a-4:a;for(r=0;r>16&255,c[d++]=e>>8&255,c[d++]=255&e;return 2===l&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[d++]=255&e),1===l&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[d++]=e>>8&255,c[d++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,n){for(var i,o,a=[],s=e;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},3865:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},1318:function(t){"use strict";t.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},8697:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},7842:function(t,e,r){"use strict";var n=r(6330),i=r(1533),o=r(2651),a=r(4387),s=r(869),l=r(8697);t.exports=function t(e,r){if(n(e))return r?l(e,t(r)):[e[0].clone(),e[1].clone()];var c,d,u=0;if(i(e))c=e.clone();else if("string"==typeof e)c=a(e);else{if(0===e)return[o(0),o(1)];if(e===Math.floor(e))c=o(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),u-=256;c=o(e)}}if(n(r))c.mul(r[1]),d=r[0].clone();else if(i(r))d=r.clone();else if("string"==typeof r)d=a(r);else if(r)if(r===Math.floor(r))d=o(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),u+=256;d=o(r)}else d=o(1);return u>0?c=c.ushln(u):u<0&&(d=d.ushln(-u)),s(c,d)}},6330:function(t,e,r){"use strict";var n=r(1533);t.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},5716:function(t,e,r){"use strict";var n=r(6859);t.exports=function(t){return t.cmp(new n(0))}},1369:function(t,e,r){"use strict";var n=r(5716);t.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var o=0;o20?52:r+32}},1533:function(t,e,r){"use strict";r(6859),t.exports=function(t){return t&&"object"==typeof t&&Boolean(t.words)}},2651:function(t,e,r){"use strict";var n=r(6859),i=r(2361);t.exports=function(t){var e=i.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},869:function(t,e,r){"use strict";var n=r(2651),i=r(5716);t.exports=function(t,e){var r=i(t),o=i(e);if(0===r)return[n(0),n(1)];if(0===o)return[n(0),n(0)];o<0&&(t=t.neg(),e=e.neg());var a=t.gcd(e);return a.cmpn(1)?[t.div(a),e.div(a)]:[t,e]}},4387:function(t,e,r){"use strict";var n=r(6859);t.exports=function(t){return new n(t)}},6504:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},7721:function(t,e,r){"use strict";var n=r(5716);t.exports=function(t){return n(t[0])*n(t[1])}},5572:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},946:function(t,e,r){"use strict";var n=r(1369),i=r(4025);t.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var o=e.abs().divmod(r.abs()),a=o.div,s=n(a),l=o.mod,c=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var d=i(s)+4;return c*(s+(h=n(l.ushln(d).divRound(r)))*Math.pow(2,-d))}var u=r.bitLength()-l.bitLength()+53,h=n(l.ushln(u).divRound(r));return u<1023?c*h*Math.pow(2,-u):c*(h*=Math.pow(2,-1023))*Math.pow(2,1023-u)}},2478:function(t){"use strict";function e(t,e,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)>=0?(o=a,i=a-1):n=a+1}return o}function r(t,e,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)>0?(o=a,i=a-1):n=a+1}return o}function n(t,e,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)<0?(o=a,n=a+1):i=a-1}return o}function i(t,e,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)<=0?(o=a,n=a+1):i=a-1}return o}function o(t,e,r,n,i){for(;n<=i;){var o=n+i>>>1,a=t[o],s=void 0!==r?r(a,e):a-e;if(0===s)return o;s<=0?n=o+1:i=o-1}return-1}function a(t,e,r,n,i,o){return"function"==typeof r?o(t,e,r,void 0===n?0:0|n,void 0===i?t.length-1:0|i):o(t,e,void 0,void 0===r?0:0|r,void 0===n?t.length-1:0|n)}t.exports={ge:function(t,r,n,i,o){return a(t,r,n,i,o,e)},gt:function(t,e,n,i,o){return a(t,e,n,i,o,r)},lt:function(t,e,r,i,o){return a(t,e,r,i,o,n)},le:function(t,e,r,n,o){return a(t,e,r,n,o,i)},eq:function(t,e,r,n,i){return a(t,e,r,n,i,o)}}},8828:function(t,e){"use strict";function r(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},6859:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(7790).Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=l(t,e,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,l=0,d=r;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,l=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,u=67108863&l,h=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=h;p++){var f=c-p|0;d+=(a=(i=0|t.words[f])*(o=0|e.words[p])+u)/67108864|0,u=67108863&a}r.words[c]=0|u,l=0|d}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?d[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=u[t],p=h[t];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(p).toString(t);r=(f=f.idivn(p)).isZero()?m+r:d[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,l="le"===e,c=new t(o),d=this.clone();if(l){for(s=0;!d.isZero();s++)a=d.andln(255),d.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,p=0|a[1],f=8191&p,m=p>>>13,g=0|a[2],v=8191&g,b=g>>>13,y=0|a[3],x=8191&y,w=y>>>13,_=0|a[4],k=8191&_,A=_>>>13,T=0|a[5],M=8191&T,S=T>>>13,C=0|a[6],E=8191&C,L=C>>>13,z=0|a[7],O=8191&z,D=z>>>13,I=0|a[8],F=8191&I,R=I>>>13,P=0|a[9],j=8191&P,N=P>>>13,B=0|s[0],U=8191&B,G=B>>>13,V=0|s[1],H=8191&V,W=V>>>13,q=0|s[2],Y=8191&q,Z=q>>>13,$=0|s[3],X=8191&$,J=$>>>13,K=0|s[4],Q=8191&K,tt=K>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,dt=0|s[8],ut=8191&dt,ht=dt>>>13,pt=0|s[9],ft=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(c+(n=Math.imul(u,U))|0)+((8191&(i=(i=Math.imul(u,G))+Math.imul(h,U)|0))<<13)|0;c=((o=Math.imul(h,G))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(f,U),i=(i=Math.imul(f,G))+Math.imul(m,U)|0,o=Math.imul(m,G);var vt=(c+(n=n+Math.imul(u,H)|0)|0)+((8191&(i=(i=i+Math.imul(u,W)|0)+Math.imul(h,H)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=(i=Math.imul(v,G))+Math.imul(b,U)|0,o=Math.imul(b,G),n=n+Math.imul(f,H)|0,i=(i=i+Math.imul(f,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var bt=(c+(n=n+Math.imul(u,Y)|0)|0)+((8191&(i=(i=i+Math.imul(u,Z)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(x,U),i=(i=Math.imul(x,G))+Math.imul(w,U)|0,o=Math.imul(w,G),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(f,Y)|0,i=(i=i+Math.imul(f,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var yt=(c+(n=n+Math.imul(u,X)|0)|0)+((8191&(i=(i=i+Math.imul(u,J)|0)+Math.imul(h,X)|0))<<13)|0;c=((o=o+Math.imul(h,J)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(k,U),i=(i=Math.imul(k,G))+Math.imul(A,U)|0,o=Math.imul(A,G),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(f,X)|0,i=(i=i+Math.imul(f,J)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,J)|0;var xt=(c+(n=n+Math.imul(u,Q)|0)|0)+((8191&(i=(i=i+Math.imul(u,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,G))+Math.imul(S,U)|0,o=Math.imul(S,G),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(f,Q)|0,i=(i=i+Math.imul(f,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(c+(n=n+Math.imul(u,rt)|0)|0)+((8191&(i=(i=i+Math.imul(u,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(E,U),i=(i=Math.imul(E,G))+Math.imul(L,U)|0,o=Math.imul(L,G),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(S,H)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,J)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(f,rt)|0,i=(i=i+Math.imul(f,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var _t=(c+(n=n+Math.imul(u,ot)|0)|0)+((8191&(i=(i=i+Math.imul(u,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,G))+Math.imul(D,U)|0,o=Math.imul(D,G),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(f,ot)|0,i=(i=i+Math.imul(f,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var kt=(c+(n=n+Math.imul(u,lt)|0)|0)+((8191&(i=(i=i+Math.imul(u,ct)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(F,U),i=(i=Math.imul(F,G))+Math.imul(R,U)|0,o=Math.imul(R,G),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(D,H)|0,o=o+Math.imul(D,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,J)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(f,lt)|0,i=(i=i+Math.imul(f,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var At=(c+(n=n+Math.imul(u,ut)|0)|0)+((8191&(i=(i=i+Math.imul(u,ht)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(j,U),i=(i=Math.imul(j,G))+Math.imul(N,U)|0,o=Math.imul(N,G),n=n+Math.imul(F,H)|0,i=(i=i+Math.imul(F,W)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,J)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(f,ut)|0,i=(i=i+Math.imul(f,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var Tt=(c+(n=n+Math.imul(u,ft)|0)|0)+((8191&(i=(i=i+Math.imul(u,mt)|0)+Math.imul(h,ft)|0))<<13)|0;c=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,W))+Math.imul(N,H)|0,o=Math.imul(N,W),n=n+Math.imul(F,Y)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(O,X)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(w,lt)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0;var Mt=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(m,ft)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(j,Y),i=(i=Math.imul(j,Z))+Math.imul(N,Y)|0,o=Math.imul(N,Z),n=n+Math.imul(F,X)|0,i=(i=i+Math.imul(F,J)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,ct)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ht)|0;var St=(c+(n=n+Math.imul(v,ft)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(b,ft)|0))<<13)|0;c=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,X),i=(i=Math.imul(j,J))+Math.imul(N,X)|0,o=Math.imul(N,J),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(D,rt)|0,o=o+Math.imul(D,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,ct)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ht)|0;var Ct=(c+(n=n+Math.imul(x,ft)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(w,ft)|0))<<13)|0;c=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(j,Q),i=(i=Math.imul(j,tt))+Math.imul(N,Q)|0,o=Math.imul(N,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ht)|0;var Et=(c+(n=n+Math.imul(k,ft)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(A,ft)|0))<<13)|0;c=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(j,rt),i=(i=Math.imul(j,nt))+Math.imul(N,rt)|0,o=Math.imul(N,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,ct)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(L,ut)|0,o=o+Math.imul(L,ht)|0;var Lt=(c+(n=n+Math.imul(M,ft)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(S,ft)|0))<<13)|0;c=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(j,ot),i=(i=Math.imul(j,at))+Math.imul(N,ot)|0,o=Math.imul(N,at),n=n+Math.imul(F,lt)|0,i=(i=i+Math.imul(F,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0;var zt=(c+(n=n+Math.imul(E,ft)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(L,ft)|0))<<13)|0;c=((o=o+Math.imul(L,mt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,n=Math.imul(j,lt),i=(i=Math.imul(j,ct))+Math.imul(N,lt)|0,o=Math.imul(N,ct),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0;var Ot=(c+(n=n+Math.imul(O,ft)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(D,ft)|0))<<13)|0;c=((o=o+Math.imul(D,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(j,ut),i=(i=Math.imul(j,ht))+Math.imul(N,ut)|0,o=Math.imul(N,ht);var Dt=(c+(n=n+Math.imul(F,ft)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(R,ft)|0))<<13)|0;c=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var It=(c+(n=Math.imul(j,ft))|0)+((8191&(i=(i=Math.imul(j,mt))+Math.imul(N,ft)|0))<<13)|0;return c=((o=Math.imul(N,mt))+(i>>>13)|0)+(It>>>26)|0,It&=67108863,l[0]=gt,l[1]=vt,l[2]=bt,l[3]=yt,l[4]=xt,l[5]=wt,l[6]=_t,l[7]=kt,l[8]=At,l[9]=Tt,l[10]=Mt,l[11]=St,l[12]=Ct,l[13]=Et,l[14]=Lt,l[15]=zt,l[16]=Ot,l[17]=Dt,l[18]=It,0!==c&&(l[19]=c,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(f=p),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?f(this,t,e):n<63?p(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==d||c>=i);c--){var u=0|this.words[c];this.words[c]=d<<26-o|u>>>o,d=u&s}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==e){(s=new o(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;u--){var h=67108864*(0|n.words[i.length+u])+(0|n.words[i.length+u-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,u);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,u),n.isZero()||(n.negative^=1);s&&(s.words[u]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):this.negative&t.negative?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),l=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var d=r.clone(),u=e.clone();!e.isZero();){for(var h=0,p=1;!(e.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(d),a.isub(u)),i.iushrn(1),a.iushrn(1);for(var f=0,m=1;!(r.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(r.iushrn(f);f-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(d),l.isub(u)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(l)):(r.isub(e),s.isub(i),l.isub(a))}return{a:s,b:l,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),l=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,d=1;!(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var u=0,h=1;!(r.words[0]&h)&&u<26;++u,h<<=1);if(u>0)for(r.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(y,b),y.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new x;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return v[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(!(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new o(2*d*d).toRed(this);0!==this.pow(d,c).cmp(l);)d.redIAdd(l);for(var u=this.pow(d,i),h=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),f=a;0!==p.cmp(s);){for(var m=p,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var c=e.words[n],d=l-1;d>=0;d--){var u=c>>d&1;i!==r[0]&&(i=this.sqr(i)),0!==u||0!==a?(a<<=1,a|=u,(4==++s||0===n&&0===d)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}l=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,k),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},6204:function(t){"use strict";t.exports=function(t){var e,r,n,i=t.length,o=0;for(e=0;e>>1;if(!(d<=0)){var u,h=i.mallocDouble(2*d*s),p=i.mallocInt32(s);if((s=l(t,d,h,p))>0){if(1===d&&n)o.init(s),u=o.sweepComplete(d,r,0,s,h,p,0,s,h,p);else{var f=i.mallocDouble(2*d*c),m=i.mallocInt32(c);(c=l(e,d,f,m))>0&&(o.init(s+c),u=1===d?o.sweepBipartite(d,r,0,s,h,p,0,c,f,m):a(d,r,n,s,h,p,c,f,m),i.free(f),i.free(m))}i.free(h),i.free(p)}return u}}}function d(t,e){n.push([t,e])}},2455:function(t,e){"use strict";function r(t){return t?function(t,e,r,n,i,o,a,s,l,c,d){return i-n>l-s?function(t,e,r,n,i,o,a,s,l,c,d){for(var u=2*t,h=n,p=u*n;hc-l?n?function(t,e,r,n,i,o,a,s,l,c,d){for(var u=2*t,h=n,p=u*n;h0;){var I=(O-=1)*x,F=_[I],R=_[I+1],P=_[I+2],j=_[I+3],N=_[I+4],B=_[I+5],U=O*w,G=k[U],V=k[U+1],H=1&B,W=!!(16&B),q=d,Y=S,Z=E,$=L;if(H&&(q=E,Y=L,Z=d,$=S),!(2&B&&R>=(P=g(t,F,R,P,q,Y,V))||4&B&&(R=v(t,F,R,P,q,Y,G))>=P)){var X=P-R,J=N-j;if(W){if(t*X*(X+J)=p0)&&!(p1>=hi)"),m=d("lo===p0"),g=d("lo>>1,h=2*t,p=u,f=s[h*u+e];c=y?(p=b,f=y):v>=w?(p=g,f=v):(p=x,f=w):y>=w?(p=b,f=y):w>=v?(p=g,f=v):(p=x,f=w);for(var _=h*(d-1),k=h*p,A=0;Ar&&i[u+e]>c;--d,u-=a){for(var h=u,p=u+a,f=0;fh;++h,l+=s)if(i[l+u]===a)if(d===h)d+=1,c+=s;else{for(var p=0;s>p;++p){var f=i[l+p];i[l+p]=i[c],i[c++]=f}var m=o[h];o[h]=o[d],o[d++]=m}return d},"loh;++h,l+=s)if(i[l+u]p;++p){var f=i[l+p];i[l+p]=i[c],i[c++]=f}var m=o[h];o[h]=o[d],o[d++]=m}return d},"lo<=p0":function(t,e,r,n,i,o,a){for(var s=2*t,l=s*r,c=l,d=r,u=t+e,h=r;n>h;++h,l+=s)if(i[l+u]<=a)if(d===h)d+=1,c+=s;else{for(var p=0;s>p;++p){var f=i[l+p];i[l+p]=i[c],i[c++]=f}var m=o[h];o[h]=o[d],o[d++]=m}return d},"hi<=p0":function(t,e,r,n,i,o,a){for(var s=2*t,l=s*r,c=l,d=r,u=t+e,h=r;n>h;++h,l+=s)if(i[l+u]<=a)if(d===h)d+=1,c+=s;else{for(var p=0;s>p;++p){var f=i[l+p];i[l+p]=i[c],i[c++]=f}var m=o[h];o[h]=o[d],o[d++]=m}return d},"lop;++p,l+=s){var f=i[l+u],m=i[l+h];if(fg;++g){var v=i[l+g];i[l+g]=i[c],i[c++]=v}var b=o[p];o[p]=o[d],o[d++]=b}}return d},"lo<=p0&&p0<=hi":function(t,e,r,n,i,o,a){for(var s=2*t,l=s*r,c=l,d=r,u=e,h=t+e,p=r;n>p;++p,l+=s){var f=i[l+u],m=i[l+h];if(f<=a&&a<=m)if(d===p)d+=1,c+=s;else{for(var g=0;s>g;++g){var v=i[l+g];i[l+g]=i[c],i[c++]=v}var b=o[p];o[p]=o[d],o[d++]=b}}return d},"!(lo>=p0)&&!(p1>=hi)":function(t,e,r,n,i,o,a,s){for(var l=2*t,c=l*r,d=c,u=r,h=e,p=t+e,f=r;n>f;++f,c+=l){var m=i[c+h],g=i[c+p];if(!(m>=a||s>=g))if(u===f)u+=1,d+=l;else{for(var v=0;l>v;++v){var b=i[c+v];i[c+v]=i[d],i[d++]=b}var y=o[f];o[f]=o[u],o[u++]=y}}return u}}},1811:function(t){"use strict";t.exports=function(t,n){n<=4*e?r(0,n-1,t):c(0,n-1,t)};var e=32;function r(t,e,r){for(var n=2*(t+1),i=t+1;i<=e;++i){for(var o=r[n++],a=r[n++],s=i,l=n-2;s-- >t;){var c=r[l-2],d=r[l-1];if(cr[e+1])}function l(t,e,r,n){var i=n[t*=2];return i>1,g=m-h,v=m+h,b=p,y=g,x=m,w=v,_=f,k=t+1,A=d-1,T=0;s(b,y,u)&&(T=b,b=y,y=T),s(w,_,u)&&(T=w,w=_,_=T),s(b,x,u)&&(T=b,b=x,x=T),s(y,x,u)&&(T=y,y=x,x=T),s(b,w,u)&&(T=b,b=w,w=T),s(x,w,u)&&(T=x,x=w,w=T),s(y,_,u)&&(T=y,y=_,_=T),s(y,x,u)&&(T=y,y=x,x=T),s(w,_,u)&&(T=w,w=_,_=T);for(var M=u[2*y],S=u[2*y+1],C=u[2*w],E=u[2*w+1],L=2*b,z=2*x,O=2*_,D=2*p,I=2*m,F=2*f,R=0;R<2;++R){var P=u[L+R],j=u[z+R],N=u[O+R];u[D+R]=P,u[I+R]=j,u[F+R]=N}i(g,t,u),i(v,d,u);for(var B=k;B<=A;++B)if(l(B,M,S,u))B!==k&&n(B,k,u),++k;else if(!l(B,C,E,u))for(;;){if(l(A,C,E,u)){l(A,M,S,u)?(o(B,k,A,u),++k,--A):(n(B,A,u),--A);break}if(--A>>1;o(f,S);var C=0,E=0;for(k=0;k=a)m(d,u,E--,L=L-a|0);else if(L>=0)m(l,c,C--,L);else if(L<=-a){L=-L-a|0;for(var z=0;z>>1;o(f,C);var E=0,L=0,z=0;for(A=0;A>1==f[2*A+3]>>1&&(D=2,A+=1),O<0){for(var I=-(O>>1)-1,F=0;F>1)-1,0===D?m(l,c,E--,I):1===D?m(d,u,L--,I):2===D&&m(h,p,z--,I)}},scanBipartite:function(t,e,r,n,i,s,d,u,h,p,v,b){var y=0,x=2*t,w=e,_=e+t,k=1,A=1;n?A=a:k=a;for(var T=i;T>>1;o(f,E);var L=0;for(T=0;T=a?(O=!n,M-=a):(O=!!n,M-=1),O)g(l,c,L++,M);else{var D=b[M],I=x*M,F=v[I+e+1],R=v[I+e+1+t];t:for(var P=0;P>>1;o(f,k);var A=0;for(y=0;y=a)l[A++]=x-a;else{var M=p[x-=1],S=g*x,C=h[S+e+1],E=h[S+e+1+t];t:for(var L=0;L=0;--L)if(l[L]===x){for(I=L+1;I0;){for(var p=r.pop(),f=(d=-1,u=-1,l=a[s=r.pop()],1);f=0||(e.flip(s,p),i(t,e,r,d,s,u),i(t,e,r,s,u,d),i(t,e,r,u,p,d),i(t,e,r,p,d,u))}}},5023:function(t,e,r){"use strict";var n,i=r(2478);function o(t,e,r,n,i,o,a){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=o,this.boundary=a}function a(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}t.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,i=0;i0||l.length>0;){for(;s.length>0;){var p=s.pop();if(c[p]!==-i){c[p]=i,d[p];for(var f=0;f<3;++f){var m=h[3*p+f];m>=0&&0===c[m]&&(u[3*p+f]?l.push(m):(s.push(m),c[m]=i))}}}var g=l;l=s,s=g,l.length=0,i=-i}var v=function(t,e,r){for(var n=0,i=0;i1&&i(r[h[p-2]],r[h[p-1]],o)>0;)t.push([h[p-1],h[p-2],a]),p-=1;h.length=p,h.push(a);var f=u.upperIds;for(p=f.length;p>1&&i(r[f[p-2]],r[f[p-1]],o)<0;)t.push([f[p-2],f[p-1],a]),p-=1;f.length=p,f.push(a)}}function d(t,e){var r;return(r=t.a[0]f[0]&&i.push(new a(f,p,2,l),new a(p,f,1,l))}i.sort(s);for(var m=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),g=[new o([m,1],[m,0],-1,[],[],[],[])],v=[],b=(l=0,i.length);l=0}}(),o.removeTriangle=function(t,e,r){var n=this.stars;a(n[t],e,r),a(n[e],r,t),a(n[r],t,e)},o.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},o.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;ne[2]?1:0)}function v(t,e,r){if(0!==t.length){if(e)for(var n=0;n=0;--o){var y=e[d=(S=n[o])[0]],x=y[0],w=y[1],_=t[x],k=t[w];if((_[0]-k[0]||_[1]-k[1])<0){var A=x;x=w,w=A}y[0]=x;var T,M=y[1]=S[1];for(i&&(T=y[2]);o>0&&n[o-1][0]===d;){var S,C=(S=n[--o])[1];i?e.push([M,C,T]):e.push([M,C]),M=C}i?e.push([M,w,T]):e.push([M,w])}return h}(t,e,h,m,r),b=f(t,g);return v(e,b,r),!!b||h.length>0||m.length>0}},3637:function(t,e,r){"use strict";t.exports=function(t,e,r,n){var o=s(e,t),u=s(n,r),h=d(o,u);if(0===a(h))return null;var p=d(u,s(t,r)),f=i(p,h),m=c(o,f);return l(t,m)};var n=r(6504),i=r(8697),o=r(5572),a=r(7721),s=r(544),l=r(2653),c=r(8987);function d(t,e){return o(n(t[0],e[1]),n(t[1],e[0]))}},3642:function(t){t.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},6729:function(t,e,r){"use strict";var n=r(3642),i=r(395);function o(t){return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function a(t){for(var e,r="#",n=0;n<3;++n)r+=("00"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function s(t){return"rgba("+t.join(",")+")"}t.exports=function(t){var e,r,l,c,d,u,h,p,f,m;if(t||(t={}),p=(t.nshades||72)-1,h=t.format||"hex",(u=t.colormap)||(u="jet"),"string"==typeof u){if(u=u.toLowerCase(),!n[u])throw Error(u+" not a supported colorscale");d=n[u]}else{if(!Array.isArray(u))throw Error("unsupported colormap option",u);d=u.slice()}if(d.length>p+1)throw new Error(u+" map requires nshades to be at least size "+d.length);f=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1],e=d.map((function(t){return Math.round(t.index*p)})),f[0]=Math.min(Math.max(f[0],0),1),f[1]=Math.min(Math.max(f[1],0),1);var g=d.map((function(t,e){var r=d[e].index,n=d[e].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1||(n[3]=f[0]+(f[1]-f[0])*r),n})),v=[];for(m=0;m0||l(t,e,o)?-1:1:0===s?c>0||l(t,e,r)?1:-1:i(c-s)}var u=n(t,e,r);return u>0?a>0&&n(t,e,o)>0?1:-1:u<0?a>0||n(t,e,o)>0?1:-1:n(t,e,o)>0||l(t,e,r)?1:-1};var n=r(3250),i=r(8572),o=r(9362),a=r(5382),s=r(8210);function l(t,e,r){var n=o(t[0],-e[0]),i=o(t[1],-e[1]),l=o(r[0],-e[0]),c=o(r[1],-e[1]),d=s(a(n,l),a(i,c));return d[d.length-1]>=0}},8572:function(t){"use strict";t.exports=function(t){return t<0?-1:t>0?1:0}},8507:function(t){t.exports=function(t,n){var i=t.length,o=t.length-n.length;if(o)return o;switch(i){case 0:return 0;case 1:return t[0]-n[0];case 2:return t[0]+t[1]-n[0]-n[1]||e(t[0],t[1])-e(n[0],n[1]);case 3:var a=t[0]+t[1],s=n[0]+n[1];if(o=a+t[2]-(s+n[2]))return o;var l=e(t[0],t[1]),c=e(n[0],n[1]);return e(l,t[2])-e(c,n[2])||e(l+t[2],a)-e(c+n[2],s);case 4:var d=t[0],u=t[1],h=t[2],p=t[3],f=n[0],m=n[1],g=n[2],v=n[3];return d+u+h+p-(f+m+g+v)||e(d,u,h,p)-e(f,m,g,v,f)||e(d+u,d+h,d+p,u+h,u+p,h+p)-e(f+m,f+g,f+v,m+g,m+v,g+v)||e(d+u+h,d+u+p,d+h+p,u+h+p)-e(f+m+g,f+m+v,f+g+v,m+g+v);default:for(var b=t.slice().sort(r),y=n.slice().sort(r),x=0;xt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}},4750:function(t,e,r){"use strict";t.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var i=new Array(r),o=e[r-1],a=0;a=e[l]&&(s+=1);o[a]=s}}return t}(n(o,!0),r)}};var n=r(8954),i=r(3952)},4769:function(t){"use strict";t.exports=function(t,e,r,n,i,o){var a=i-1,s=i*i,l=a*a,c=(1+2*i)*l,d=i*l,u=s*(3-2*i),h=s*a;if(t.length){o||(o=new Array(t.length));for(var p=t.length-1;p>=0;--p)o[p]=c*t[p]+d*e[p]+u*r[p]+h*n[p];return o}return c*t+d*e+u*r+h*n},t.exports.derivative=function(t,e,r,n,i,o){var a=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(t.length){o||(o=new Array(t.length));for(var d=t.length-1;d>=0;--d)o[d]=a*t[d]+s*e[d]+l*r[d]+c*n[d];return o}return a*t+s*e+l*r[d]+c*n}},7642:function(t,e,r){"use strict";var n=r(8954),i=r(1682);function o(t,e){this.point=t,this.index=e}function a(t,e){for(var r=t.point,n=e.point,i=r.length,o=0;o=2)return!1;t[r]=n}return!0})):w.filter((function(t){for(var e=0;e<=s;++e){var r=v[t[e]];if(r<0)return!1;t[e]=r}return!0})),1&s)for(d=0;d>>31},t.exports.exponent=function(e){return(t.exports.hi(e)<<1>>>21)-1023},t.exports.fraction=function(e){var r=t.exports.lo(e),n=t.exports.hi(e),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},t.exports.denormalized=function(e){return!(2146435072&t.exports.hi(e))}},1338:function(t){"use strict";function e(t,r,n){var i=0|t[n];if(i<=0)return[];var o,a=new Array(i);if(n===t.length-1)for(o=0;o0)return function(t,e){var r,n;for(r=new Array(t),n=0;n=r-1){h=l.length-1;var f=t-e[r-1];for(p=0;p=r-1)for(var d=s.length-1,u=(e[r-1],0);u=0;--r)if(t[--e])return!1;return!0},s.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t0;--u)n.push(o(l[u-1],c[u-1],arguments[u])),i.push(0)}},s.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t1e-6?1/s:0;this._time.push(t);for(var h=r;h>0;--h){var p=o(c[h-1],d[h-1],arguments[h]);n.push(p),i.push((p-n[a++])*u)}}},s.set=function(t){var e=this.dimension;if(!(t0;--l)r.push(o(a[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var n=this._state,i=this._velocity,a=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],d=t-e,u=d>1e-6?1/d:0;this._time.push(t);for(var h=r;h>0;--h){var p=arguments[h];n.push(o(l[h-1],c[h-1],n[a++]+p)),i.push(p*u)}}},s.idle=function(t){var e=this.lastT();if(!(t=0;--u)n.push(o(l[u],c[u],n[a]+d*i[a])),i.push(0),a+=1}}},3840:function(t){"use strict";function e(t,e,r,n,i,o){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=o}function r(t){return new e(t._color,t.key,t.value,t.left,t.right,t._count)}function n(t,r){return new e(t,r.key,r.value,r.left,r.right,r._count)}function i(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function o(t,e){this._compare=t,this.root=e}t.exports=function(t){return new o(t||p,null)};var a=o.prototype;function s(t,e){var r;return e.left&&(r=s(t,e.left))?r:(r=t(e.key,e.value))||(e.right?s(t,e.right):void 0)}function l(t,e,r,n){if(e(t,n.key)<=0){var i;if(n.left&&(i=l(t,e,r,n.left)))return i;if(i=r(n.key,n.value))return i}if(n.right)return l(t,e,r,n.right)}function c(t,e,r,n,i){var o,a=r(t,i.key),s=r(e,i.key);if(a<=0){if(i.left&&(o=c(t,e,r,n,i.left)))return o;if(s>0&&(o=n(i.key,i.value)))return o}if(s>0&&i.right)return c(t,e,r,n,i.right)}function d(t,e){this.tree=t,this._stack=e}Object.defineProperty(a,"keys",{get:function(){var t=[];return this.forEach((function(e,r){t.push(e)})),t}}),Object.defineProperty(a,"values",{get:function(){var t=[];return this.forEach((function(e,r){t.push(r)})),t}}),Object.defineProperty(a,"length",{get:function(){return this.root?this.root._count:0}}),a.insert=function(t,r){for(var a=this._compare,s=this.root,l=[],c=[];s;){var d=a(t,s.key);l.push(s),c.push(d),s=d<=0?s.left:s.right}l.push(new e(0,t,r,null,null,1));for(var u=l.length-2;u>=0;--u)s=l[u],c[u]<=0?l[u]=new e(s._color,s.key,s.value,l[u+1],s.right,s._count+1):l[u]=new e(s._color,s.key,s.value,s.left,l[u+1],s._count+1);for(u=l.length-1;u>1;--u){var h=l[u-1];if(s=l[u],1===h._color||1===s._color)break;var p=l[u-2];if(p.left===h)if(h.left===s){if(!(f=p.right)||0!==f._color){p._color=0,p.left=h.right,h._color=1,h.right=p,l[u-2]=h,l[u-1]=s,i(p),i(h),u>=3&&((m=l[u-3]).left===p?m.left=h:m.right=h);break}h._color=1,p.right=n(1,f),p._color=0,u-=1}else{if(!(f=p.right)||0!==f._color){h.right=s.left,p._color=0,p.left=s.right,s._color=1,s.left=h,s.right=p,l[u-2]=s,l[u-1]=h,i(p),i(h),i(s),u>=3&&((m=l[u-3]).left===p?m.left=s:m.right=s);break}h._color=1,p.right=n(1,f),p._color=0,u-=1}else if(h.right===s){if(!(f=p.left)||0!==f._color){p._color=0,p.right=h.left,h._color=1,h.left=p,l[u-2]=h,l[u-1]=s,i(p),i(h),u>=3&&((m=l[u-3]).right===p?m.right=h:m.left=h);break}h._color=1,p.left=n(1,f),p._color=0,u-=1}else{var f;if(!(f=p.left)||0!==f._color){var m;h.left=s.right,p._color=0,p.right=s.left,s._color=1,s.right=h,s.left=p,l[u-2]=s,l[u-1]=h,i(p),i(h),i(s),u>=3&&((m=l[u-3]).right===p?m.right=s:m.left=s);break}h._color=1,p.left=n(1,f),p._color=0,u-=1}}return l[0]._color=1,new o(a,l[0])},a.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return s(t,this.root);case 2:return l(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return c(e,r,this._compare,t,this.root)}},Object.defineProperty(a,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new d(this,t)}}),Object.defineProperty(a,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new d(this,t)}}),a.at=function(t){if(t<0)return new d(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t=e.right._count)break;e=e.right}return new d(this,[])},a.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var o=e(t,r.key);n.push(r),o<=0&&(i=n.length),r=o<=0?r.left:r.right}return n.length=i,new d(this,n)},a.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var o=e(t,r.key);n.push(r),o<0&&(i=n.length),r=o<0?r.left:r.right}return n.length=i,new d(this,n)},a.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var o=e(t,r.key);n.push(r),o>0&&(i=n.length),r=o<=0?r.left:r.right}return n.length=i,new d(this,n)},a.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var o=e(t,r.key);n.push(r),o>=0&&(i=n.length),r=o<0?r.left:r.right}return n.length=i,new d(this,n)},a.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new d(this,n);r=i<=0?r.left:r.right}return new d(this,[])},a.remove=function(t){var e=this.find(t);return e?e.remove():this},a.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var u=d.prototype;function h(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function p(t,e){return te?1:0}Object.defineProperty(u,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(u,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),u.clone=function(){return new d(this.tree,this._stack.slice())},u.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var a=new Array(t.length),s=t[t.length-1];a[a.length-1]=new e(s._color,s.key,s.value,s.left,s.right,s._count);for(var l=t.length-2;l>=0;--l)(s=t[l]).left===t[l+1]?a[l]=new e(s._color,s.key,s.value,a[l+1],s.right,s._count):a[l]=new e(s._color,s.key,s.value,s.left,a[l+1],s._count);if((s=a[a.length-1]).left&&s.right){var c=a.length;for(s=s.left;s.right;)a.push(s),s=s.right;var d=a[c-1];for(a.push(new e(s._color,d.key,d.value,s.left,s.right,s._count)),a[c-1].key=s.key,a[c-1].value=s.value,l=a.length-2;l>=c;--l)s=a[l],a[l]=new e(s._color,s.key,s.value,s.left,a[l+1],s._count);a[c-1].left=a[c]}if(0===(s=a[a.length-1])._color){var u=a[a.length-2];for(u.left===s?u.left=null:u.right===s&&(u.right=null),a.pop(),l=0;l=0;--l){if(e=t[l],0===l)return void(e._color=1);if((o=t[l-1]).left===e){if((a=o.right).right&&0===a.right._color)return s=(a=o.right=r(a)).right=r(a.right),o.right=a.left,a.left=o,a.right=s,a._color=o._color,e._color=1,o._color=1,s._color=1,i(o),i(a),l>1&&((c=t[l-2]).left===o?c.left=a:c.right=a),void(t[l-1]=a);if(a.left&&0===a.left._color)return s=(a=o.right=r(a)).left=r(a.left),o.right=s.left,a.left=s.right,s.left=o,s.right=a,s._color=o._color,o._color=1,a._color=1,e._color=1,i(o),i(a),i(s),l>1&&((c=t[l-2]).left===o?c.left=s:c.right=s),void(t[l-1]=s);if(1===a._color){if(0===o._color)return o._color=1,void(o.right=n(0,a));o.right=n(0,a);continue}a=r(a),o.right=a.left,a.left=o,a._color=o._color,o._color=0,i(o),i(a),l>1&&((c=t[l-2]).left===o?c.left=a:c.right=a),t[l-1]=a,t[l]=o,l+11&&((c=t[l-2]).right===o?c.right=a:c.left=a),void(t[l-1]=a);if(a.right&&0===a.right._color)return s=(a=o.left=r(a)).right=r(a.right),o.left=s.right,a.right=s.left,s.right=o,s.left=a,s._color=o._color,o._color=1,a._color=1,e._color=1,i(o),i(a),i(s),l>1&&((c=t[l-2]).right===o?c.right=s:c.left=s),void(t[l-1]=s);if(1===a._color){if(0===o._color)return o._color=1,void(o.left=n(0,a));o.left=n(0,a);continue}var c;a=r(a),o.left=a.right,a.right=o,a._color=o._color,o._color=0,i(o),i(a),l>1&&((c=t[l-2]).right===o?c.right=a:c.left=a),t[l-1]=a,t[l]=o,l+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(u,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(u,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),u.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(u,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),u.update=function(t){var r=this._stack;if(0===r.length)throw new Error("Can't update empty node!");var n=new Array(r.length),i=r[r.length-1];n[n.length-1]=new e(i._color,i.key,t,i.left,i.right,i._count);for(var a=r.length-2;a>=0;--a)(i=r[a]).left===r[a+1]?n[a]=new e(i._color,i.key,i.value,n[a+1],i.right,i._count):n[a]=new e(i._color,i.key,i.value,i.left,n[a+1],i._count);return new o(this.tree._compare,n[0])},u.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(u,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},3837:function(t,e,r){"use strict";t.exports=function(t,e){var r=new p(t);return r.update(e),r};var n=r(4935),i=r(501),o=r(5304),a=r(6429),s=r(6444),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),c=ArrayBuffer,d=DataView;function u(t){return Array.isArray(t)||function(t){return c.isView(t)&&!(t instanceof d)}(t)}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function p(t){this.gl=t,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=o(t)}var f=p.prototype;function m(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}f.update=function(t){function e(e,r,n){if(n in t){var i,o=t[n],a=this[n];(e?u(o)&&u(o[0]):u(o))?this[n]=i=[r(o[0]),r(o[1]),r(o[2])]:this[n]=i=[r(o),r(o),r(o)];for(var s=0;s<3;++s)if(i[s]!==a[s])return!0}return!1}t=t||{};var r,o=e.bind(this,!1,Number),a=e.bind(this,!1,Boolean),l=e.bind(this,!1,String),c=e.bind(this,!0,(function(t){if(u(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]})),d=!1,h=!1;if("bounds"in t)for(var p=t.bounds,f=0;f<2;++f)for(var m=0;m<3;++m)p[f][m]!==this.bounds[f][m]&&(h=!0),this.bounds[f][m]=p[f][m];if("ticks"in t)for(r=t.ticks,d=!0,this.autoTicks=!1,f=0;f<3;++f)this.tickSpacing[f]=0;else o("tickSpacing")&&(this.autoTicks=!0,h=!0);if(this._firstInit&&("ticks"in t||"tickSpacing"in t||(this.autoTicks=!0),h=!0,d=!0,this._firstInit=!1),h&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),d=!0),d){for(f=0;f<3;++f)r[f].sort((function(t,e){return t.x-e.x}));s.equal(r,this.ticks)?d=!1:this.ticks=r}a("tickEnable"),l("tickFont")&&(d=!0),l("tickFontStyle")&&(d=!0),l("tickFontWeight")&&(d=!0),l("tickFontVariant")&&(d=!0),o("tickSize"),o("tickAngle"),o("tickPad"),c("tickColor");var g=l("labels");l("labelFont")&&(g=!0),l("labelFontStyle")&&(g=!0),l("labelFontWeight")&&(g=!0),l("labelFontVariant")&&(g=!0),a("labelEnable"),o("labelSize"),o("labelPad"),c("labelColor"),a("lineEnable"),a("lineMirror"),o("lineWidth"),c("lineColor"),a("lineTickEnable"),a("lineTickMirror"),o("lineTickLength"),o("lineTickWidth"),c("lineTickColor"),a("gridEnable"),o("gridWidth"),c("gridColor"),a("zeroEnable"),c("zeroLineColor"),o("zeroLineWidth"),a("backgroundEnable"),c("backgroundColor");var v=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],b=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(g||d)&&this._text.update(this.bounds,this.labels,v,this.ticks,b):this._text=n(this.gl,this.bounds,this.labels,v,this.ticks,b),this._lines&&d&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var g=[new m,new m,new m];function v(t,e,r,n,i){for(var o=t.primalOffset,a=t.primalMinor,s=t.mirrorOffset,l=t.mirrorMinor,c=n[e],d=0;d<3;++d)if(e!==d){var u=o,h=s,p=a,f=l;c&1<0?(p[d]=-1,f[d]=0):(p[d]=0,f[d]=1)}}var b=[0,0,0],y={model:l,view:l,projection:l,_ortho:!1};f.isOpaque=function(){return!0},f.isTransparent=function(){return!1},f.drawTransparent=function(t){};var x=[0,0,0],w=[0,0,0],_=[0,0,0];f.draw=function(t){t=t||y;for(var e=this.gl,r=t.model||l,n=t.view||l,i=t.projection||l,o=this.bounds,s=t._ortho||!1,c=a(r,n,i,o,s),d=c.cubeEdges,u=c.axis,p=n[12],f=n[13],m=n[14],k=n[15],A=(s?2:1)*this.pixelRatio*(i[3]*p+i[7]*f+i[11]*m+i[15]*k)/e.drawingBufferHeight,T=0;T<3;++T)this.lastCubeProps.cubeEdges[T]=d[T],this.lastCubeProps.axis[T]=u[T];var M=g;for(T=0;T<3;++T)v(g[T],T,this.bounds,d,u);e=this.gl;var S,C,E,L=b;for(T=0;T<3;++T)this.backgroundEnable[T]?L[T]=u[T]:L[T]=0;for(this._background.draw(r,n,i,o,L,this.backgroundColor),this._lines.bind(r,n,i,this),T=0;T<3;++T){var z=[0,0,0];u[T]>0?z[T]=o[1][T]:z[T]=o[0][T];for(var O=0;O<2;++O){var D=(T+1+O)%3,I=(T+1+(1^O))%3;this.gridEnable[D]&&this._lines.drawGrid(D,I,this.bounds,z,this.gridColor[D],this.gridWidth[D]*this.pixelRatio)}for(O=0;O<2;++O)D=(T+1+O)%3,I=(T+1+(1^O))%3,this.zeroEnable[I]&&Math.min(o[0][I],o[1][I])<=0&&Math.max(o[0][I],o[1][I])>=0&&this._lines.drawZero(D,I,this.bounds,z,this.zeroLineColor[I],this.zeroLineWidth[I]*this.pixelRatio)}for(T=0;T<3;++T){this.lineEnable[T]&&this._lines.drawAxisLine(T,this.bounds,M[T].primalOffset,this.lineColor[T],this.lineWidth[T]*this.pixelRatio),this.lineMirror[T]&&this._lines.drawAxisLine(T,this.bounds,M[T].mirrorOffset,this.lineColor[T],this.lineWidth[T]*this.pixelRatio);var F=h(x,M[T].primalMinor),R=h(w,M[T].mirrorMinor),P=this.lineTickLength;for(O=0;O<3;++O){var j=A/r[5*O];F[O]*=P[O]*j,R[O]*=P[O]*j}this.lineTickEnable[T]&&this._lines.drawAxisTicks(T,M[T].primalOffset,F,this.lineTickColor[T],this.lineTickWidth[T]*this.pixelRatio),this.lineTickMirror[T]&&this._lines.drawAxisTicks(T,M[T].mirrorOffset,R,this.lineTickColor[T],this.lineTickWidth[T]*this.pixelRatio)}function N(t){(E=[0,0,0])[t]=1}function B(t,e,r){var n=(t+1)%3,i=(t+2)%3,o=e[n],a=e[i],s=r[n],l=r[i];o>0&&l>0||o>0&&l<0||o<0&&l>0||o<0&&l<0?N(n):(a>0&&s>0||a>0&&s<0||a<0&&s>0||a<0&&s<0)&&N(i)}for(this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio),T=0;T<3;++T){var U=M[T].primalMinor,G=M[T].mirrorMinor,V=h(_,M[T].primalOffset);for(O=0;O<3;++O)this.lineTickEnable[T]&&(V[O]+=A*U[O]*Math.max(this.lineTickLength[O],0)/r[5*O]);var H=[0,0,0];if(H[T]=1,this.tickEnable[T]){for(-3600===this.tickAngle[T]?(this.tickAngle[T]=0,this.tickAlign[T]="auto"):this.tickAlign[T]=-1,C=1,"auto"===(S=[this.tickAlign[T],.5,C])[0]?S[0]=0:S[0]=parseInt(""+S[0]),E=[0,0,0],B(T,U,G),O=0;O<3;++O)V[O]+=A*U[O]*this.tickPad[O]/r[5*O];this._text.drawTicks(T,this.tickSize[T],this.tickAngle[T],V,this.tickColor[T],H,E,S)}if(this.labelEnable[T]){for(C=0,E=[0,0,0],this.labels[T].length>4&&(N(T),C=1),"auto"===(S=[this.labelAlign[T],.5,C])[0]?S[0]=0:S[0]=parseInt(""+S[0]),O=0;O<3;++O)V[O]+=A*U[O]*this.labelPad[O]/r[5*O];V[T]+=.5*(o[0][T]+o[1][T]),this._text.drawLabel(T,this.labelSize[T],this.labelAngle[T],V,this.labelColor[T],[0,0,0],E,S)}}this._text.unbind()},f.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},5304:function(t,e,r){"use strict";t.exports=function(t){for(var e=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,d=(l+2)%3,u=[0,0,0],h=[0,0,0],p=-1;p<=1;p+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),u[l]=p,h[l]=p;for(var f=-1;f<=1;f+=2){u[c]=f;for(var m=-1;m<=1;m+=2)u[d]=m,e.push(u[0],u[1],u[2],h[0],h[1],h[2]),s+=1}var g=c;c=d,d=g}var v=n(t,new Float32Array(e)),b=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),y=i(t,[{buffer:v,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:t.FLOAT,size:3,offset:12,stride:24}],b),x=o(t);return x.attributes.position.location=0,x.attributes.normal.location=1,new a(t,v,y,x)};var n=r(2762),i=r(8116),o=r(1879).bg;function a(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}var s=a.prototype;s.draw=function(t,e,r,n,i,o){for(var a=!1,s=0;s<3;++s)a=a||i[s];if(a){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:o},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},6429:function(t,e,r){"use strict";t.exports=function(t,e,r,o,p){i(s,e,t),i(s,r,s);for(var b=0,y=0;y<2;++y){d[2]=o[y][2];for(var x=0;x<2;++x){d[1]=o[x][1];for(var w=0;w<2;++w)d[0]=o[w][0],h(l[b],d,s),b+=1}}var _=-1;for(y=0;y<8;++y){for(var k=l[y][3],A=0;A<3;++A)c[y][A]=l[y][A]/k;p&&(c[y][2]*=-1),k<0&&(_<0||c[y][2]C&&(_|=1<C&&(_|=1<c[y][1])&&(R=y);var P=-1;for(y=0;y<3;++y)(N=R^1<c[j][0]&&(j=N))}var B=m;B[0]=B[1]=B[2]=0,B[n.log2(P^R)]=R&P,B[n.log2(R^j)]=R&j;var U=7^j;U===_||U===F?(U=7^P,B[n.log2(j^U)]=U&j):B[n.log2(P^U)]=U&P;var G=g,V=_;for(T=0;T<3;++T)G[T]=V&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}\n"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);e.Q=function(t){return i(t,s,l,null,[{name:"position",type:"vec3"}])};var c=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * (view * (model * vec4(nPosition, 1.0)));\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}\n"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);e.bg=function(t){return i(t,c,d,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(t,e,r){"use strict";t.exports=function(t,e,r,n,a,l){var c=i(t),u=o(t,[{buffer:c,size:3}]),h=s(t);h.attributes.position.location=0;var p=new d(t,h,c,u);return p.update(e,r,n,a,l),p};var i=r(2762),o=r(8116),a=r(4359),s=r(1879).Q,l=window||n.global||{},c=l.__TEXT_CACHE||{};function d(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}l.__TEXT_CACHE={};var u=d.prototype,h=[0,0];u.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,h[0]=this.gl.drawingBufferWidth,h[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=h},u.unbind=function(){this.vao.unbind()},u.update=function(t,e,r,n,i){var o=[];function s(t,e,r,n,i,s){var l=[r.style,r.weight,r.variant,r.family].join("_"),d=c[l];d||(d=c[l]={});var u=d[e];u||(u=d[e]=function(t,e){try{return a(t,e)}catch(e){return console.warn('error vectorizing text:"'+t+'" error:',e),{cells:[],positions:[]}}}(e,{triangles:!0,font:r.family,fontStyle:r.style,fontWeight:r.weight,fontVariant:r.variant,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var h=(n||12)/12,p=u.positions,f=u.cells,m=0,g=f.length;m=0;--b){var y=p[v[b]];o.push(h*y[0],-h*y[1],t)}}for(var l=[0,0,0],d=[0,0,0],u=[0,0,0],h=[0,0,0],p={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},f=0;f<3;++f){u[f]=o.length/3|0,s(.5*(t[0][f]+t[1][f]),e[f],r[f],12,1.25,p),h[f]=(o.length/3|0)-u[f],l[f]=o.length/3|0;for(var m=0;m=0&&(i=r.length-n-1);var o=Math.pow(10,i),a=Math.round(t*e*o),s=a+"";if(s.indexOf("e")>=0)return s;var l=a/o,c=a%o;a<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var d=""+l;if(a<0&&(d="-"+d),i){for(var u=""+c;u.length=t[0][i];--a)o.push({x:a*e[i],text:r(e[i],a)});n.push(o)}return n},e.equal=function(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,o,i),r}function d(t,e){for(var r=n.malloc(t.length,e),i=t.length,o=0;o=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,t.data,e):this.length=c(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var s=n.malloc(t.size,r),l=o(s,t.shape);i.assign(l,t),this.length=c(this.gl,this.type,this.length,this.usage,e<0?s:s.subarray(0,t.size),e),n.free(s)}}else if(Array.isArray(t)){var u;u=this.type===this.gl.ELEMENT_ARRAY_BUFFER?d(t,"uint16"):d(t,"float32"),this.length=c(this.gl,this.type,this.length,this.usage,e<0?u:u.subarray(0,t.length),e),n.free(u)}else if("object"==typeof t&&"number"==typeof t.length)this.length=c(this.gl,this.type,this.length,this.usage,t,e);else{if("number"!=typeof t&&void 0!==t)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(t|=0)<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},t.exports=function(t,e,r,n){if(r=r||t.ARRAY_BUFFER,n=n||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(n!==t.DYNAMIC_DRAW&&n!==t.STATIC_DRAW&&n!==t.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var i=t.createBuffer(),o=new s(t,r,i,0,n);return o.update(e),o}},6405:function(t,e,r){"use strict";var n=r(2931);t.exports=function(t,e){var r=t.positions,i=t.vectors,o={positions:[],vertexIntensity:[],vertexIntensityBounds:t.vertexIntensityBounds,vectors:[],cells:[],coneOffset:t.coneOffset,colormap:t.colormap};if(0===t.positions.length)return e&&(e[0]=[0,0,0],e[1]=[0,0,0]),o;for(var a=0,s=1/0,l=-1/0,c=1/0,d=-1/0,u=1/0,h=-1/0,p=null,f=null,m=[],g=1/0,v=!1,b="raw"===t.coneSizemode,y=0;ya&&(a=n.length(w)),y&&!b){var _=2*n.distance(p,x)/(n.length(f)+n.length(w));_?(g=Math.min(g,_),v=!1):v=!0}v||(p=x,f=w),m.push(w)}var k=[s,c,u],A=[l,d,h];e&&(e[0]=k,e[1]=A),0===a&&(a=1);var T=1/a;isFinite(g)||(g=1),o.vectorScale=g;var M=t.coneSize||(b?1:.5);t.absoluteConeSize&&(M=t.absoluteConeSize*T),o.coneScale=M,y=0;for(var S=0;y=1},p.isTransparent=function(){return this.opacity<1},p.pickSlots=1,p.setPickBase=function(t){this.pickId=t},p.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,"lightPosition"in t&&(this.lightPosition=t.lightPosition),"opacity"in t&&(this.opacity=t.opacity),"ambient"in t&&(this.ambientLight=t.ambient),"diffuse"in t&&(this.diffuseLight=t.diffuse),"specular"in t&&(this.specularLight=t.specular),"roughness"in t&&(this.roughness=t.roughness),"fresnel"in t&&(this.fresnel=t.fresnel),void 0!==t.tubeScale&&(this.tubeScale=t.tubeScale),void 0!==t.vectorScale&&(this.vectorScale=t.vectorScale),void 0!==t.coneScale&&(this.coneScale=t.coneScale),void 0!==t.coneOffset&&(this.coneOffset=t.coneOffset),t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=d({colormap:t,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],o=0;o<3;++o)r[4*n+o]=i[o];r[4*n+3]=255*i[3]}return c(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions,i=t.vectors;if(n&&r&&i){var o=[],a=[],s=[],l=[],u=[];this.cells=r,this.positions=n,this.vectors=i;var h=t.meshColor||[1,1,1,1],p=t.vertexIntensity,f=1/0,m=-1/0;if(p)if(t.vertexIntensityBounds)f=+t.vertexIntensityBounds[0],m=+t.vertexIntensityBounds[1];else for(var g=0;g0){var m=this.triShader;m.bind(),m.uniforms=c,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},p.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||u,n=t.view||u,i=t.projection||u,o=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],a=0;a<3;++a)o[0][a]=Math.max(o[0][a],this.clipBounds[0][a]),o[1][a]=Math.min(o[1][a],this.clipBounds[1][a]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:o,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},p.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3),i={position:n,dataCoordinate:n,index:Math.floor(r[1]/48)};return"cone"===this.traceType?i.index=Math.floor(r[1]/48):"streamtube"===this.traceType&&(i.intensity=this.intensity[r[1]],i.velocity=this.vectors[r[1]].slice(0,3),i.divergence=this.vectors[r[1]][3],i.index=e),i},p.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()},t.exports=function(t,e,r){var s=r.shaders;1===arguments.length&&(t=(e=t).gl);var l=function(t,e){var r=n(t,e.meshShader.vertex,e.meshShader.fragment,null,e.meshShader.attributes);return r.attributes.position.location=0,r.attributes.color.location=2,r.attributes.uv.location=3,r.attributes.vector.location=4,r}(t,s),d=function(t,e){var r=n(t,e.pickShader.vertex,e.pickShader.fragment,null,e.pickShader.attributes);return r.attributes.position.location=0,r.attributes.id.location=1,r.attributes.vector.location=4,r}(t,s),u=a(t,c(new Uint8Array([255,255,255,255]),[1,1,4]));u.generateMipmap(),u.minFilter=t.LINEAR_MIPMAP_LINEAR,u.magFilter=t.LINEAR;var p=i(t),f=i(t),m=i(t),g=i(t),v=i(t),b=new h(t,u,l,d,p,f,v,m,g,o(t,[{buffer:p,type:t.FLOAT,size:4},{buffer:v,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:m,type:t.FLOAT,size:4},{buffer:g,type:t.FLOAT,size:2},{buffer:f,type:t.FLOAT,size:4}]),r.traceType||"cone");return b.update(e),b}},614:function(t,e,r){var n=r(3236),i=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, coneScale, coneOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),o=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),a=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float vectorScale, coneScale, coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * (view * conePosition);\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);e.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(t){t.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(t,e,r){var n=r(737);t.exports=function(t){return n[t]}},9165:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl,r=n(e),a=i(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),l=o(e);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(e,r,a,l);return c.update(t),c};var n=r(2762),i=r(8116),o=r(3436),a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function c(t,e){for(var r=0;r<3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||a,i=r.projection=t.projection||a;r.model=t.model||a,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var o=n[12],s=n[13],l=n[14],c=n[15],d=(t._ortho?2:1)*this.pixelRatio*(i[3]*o+i[7]*s+i[11]*l+i[15]*c)/e.drawingBufferHeight;this.vao.bind();for(var u=0;u<3;++u)e.lineWidth(this.lineWidth[u]*this.pixelRatio),r.capSize=this.capSize[u]*d,this.lineCount[u]&&e.drawArrays(e.LINES,this.lineOffset[u],this.lineCount[u]);this.vao.unbind()};var d=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var o=[0,0,0];o[(n+e)%3]=i,r.push(o)}t[e]=r}return t}();function u(t,e,r,n){for(var i=d[n],o=0;o0&&((p=d.slice())[s]+=f[1][s],i.push(d[0],d[1],d[2],m[0],m[1],m[2],m[3],0,0,0,p[0],p[1],p[2],m[0],m[1],m[2],m[3],0,0,0),c(this.bounds,p),a+=2+u(i,p,m,s))}this.lineCount[s]=a-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},3436:function(t,e,r){"use strict";var n=r(3236),i=r(9405),o=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * (view * worldPosition);\n fragColor = color;\n fragPosition = position;\n}"]),a=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);t.exports=function(t){return i(t,o,a,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(t,e,r){"use strict";var n=r(7766);t.exports=function(t,e,r,n){i||(i=t.FRAMEBUFFER_UNSUPPORTED,o=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,a=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=t.getExtension("WEBGL_draw_buffers");if(!l&&c&&function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),o=0;od||r<0||r>d)throw new Error("gl-fbo: Parameters are too large for FBO");var u=1;if("color"in(n=n||{})){if((u=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(u>1){if(!c)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(u>t.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+u+" draw buffers")}}var h=t.UNSIGNED_BYTE,p=t.getExtension("OES_texture_float");if(n.float&&u>0){if(!p)throw new Error("gl-fbo: Context does not support floating point textures");h=t.FLOAT}else n.preferFloat&&u>0&&p&&(h=t.FLOAT);var m=!0;"depth"in n&&(m=!!n.depth);var g=!1;return"stencil"in n&&(g=!!n.stencil),new f(t,e,r,h,u,m,g,c)};var i,o,a,s,l=null;function c(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function d(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function u(t){switch(t){case i:throw new Error("gl-fbo: Framebuffer unsupported");case o:throw new Error("gl-fbo: Framebuffer incomplete attachment");case a:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function h(t,e,r,i,o,a){if(!i)return null;var s=n(t,e,r,o,i);return s.magFilter=t.NEAREST,s.minFilter=t.NEAREST,s.mipSamples=1,s.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,a,t.TEXTURE_2D,s.handle,0),s}function p(t,e,r,n,i){var o=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,o),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,i,t.RENDERBUFFER,o),o}function f(t,e,r,n,i,o,a,s){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var f=0;f1&&s.drawBuffersWEBGL(l[a]);var b=r.getExtension("WEBGL_depth_texture");b?f?t.depth=h(r,i,o,b.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m&&(t.depth=h(r,i,o,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):m&&f?t._depth_rb=p(r,i,o,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m?t._depth_rb=p(r,i,o,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):f&&(t._depth_rb=p(r,i,o,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var y=r.checkFramebufferStatus(r.FRAMEBUFFER);if(y!==r.FRAMEBUFFER_COMPLETE){for(t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null),v=0;vi||r<0||r>i)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var o=c(n),a=0;a>8*p&255;this.pickOffset=r,i.bind();var f=i.uniforms;f.viewTransform=t,f.pickOffset=e,f.shape=this.shape;var m=i.attributes;return this.positionBuffer.bind(),m.position.pointer(),this.weightBuffer.bind(),m.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),m.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,a),r+this.shape[0]*this.shape[1]}}}(),u.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var o=r-n,a=this.xData,s=this.yData;return{object:this,pointId:o,dataCoord:[a[o%this.shape[0]],s[o/this.shape[0]|0]]}},u.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||i(e[0]),a=t.y||i(e[1]),s=t.z||new Float32Array(e[0]*e[1]),l=!1!==t.zsmooth;this.xData=r,this.yData=a;var c,d,u,p,f=t.colorLevels||[0],m=t.colorValues||[0,0,0,1],g=f.length,v=this.bounds;l?(c=v[0]=r[0],d=v[1]=a[0],u=v[2]=r[r.length-1],p=v[3]=a[a.length-1]):(c=v[0]=r[0]+(r[1]-r[0])/2,d=v[1]=a[0]+(a[1]-a[0])/2,u=v[2]=r[r.length-1]+(r[r.length-1]-r[r.length-2])/2,p=v[3]=a[a.length-1]+(a[a.length-1]-a[a.length-2])/2);var b=1/(u-c),y=1/(p-d),x=e[0],w=e[1];this.shape=[x,w];var _=(l?(x-1)*(w-1):x*w)*(h.length>>>1);this.numVertices=_;for(var k=o.mallocUint8(4*_),A=o.mallocFloat32(2*_),T=o.mallocUint8(2*_),M=o.mallocUint32(_),S=0,C=l?x-1:x,E=l?w-1:w,L=0;L max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\n// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl\nvec4 packFloat(float v) {\n float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n float e = floor(log2(av));\n float m = av * pow(2.0, -e) - 1.0;\n\n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n\n //Unpack exponent\n float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0;\n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];e.createShader=function(t){return i(t,o,a,null,l)},e.createPickShader=function(t){return i(t,o,s,null,l)}},5714:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl||t.scene&&t.scene.gl,r=u(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var a=h(e);a.attributes.position.location=0,a.attributes.nextPosition.location=1,a.attributes.arcLength.location=2,a.attributes.lineWidth.location=3,a.attributes.color.location=4;for(var s=n(e),l=i(e,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),d=c(new Array(1024),[256,1,4]),p=0;p<1024;++p)d.data[p]=255;var f=o(e,d);f.wrap=e.REPEAT;var m=new v(e,r,a,s,l,f);return m.update(t),m};var n=r(2762),i=r(8116),o=r(7766),a=new Uint8Array(4),s=new Float32Array(a.buffer),l=r(2478),c=r(9618),d=r(7319),u=d.createShader,h=d.createPickShader,p=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function m(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function g(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function v(t,e,r,n,i,o){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=o,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var b=v.prototype;b.isTransparent=function(){return this.hasAlpha},b.isOpaque=function(){return!this.hasAlpha},b.pickSlots=1,b.setPickBase=function(t){this.pickId=t},b.drawTransparent=b.draw=function(t){if(this.vertexCount){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||p,view:t.view||p,projection:t.projection||p,clipBounds:m(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},b.drawPick=function(t){if(this.vertexCount){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||p,view:t.view||p,projection:t.projection||p,pickId:this.pickId,clipBounds:m(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},b.update=function(t){var e,r;this.dirty=!0;var n=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),this.hasAlpha=!1,"opacity"in t&&(this.opacity=+t.opacity,this.opacity<1&&(this.hasAlpha=!0));var i=[],o=[],a=[],s=0,d=0,u=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],h=t.position||t.positions;if(h){var p=t.color||t.colors||[0,0,0,1],m=t.lineWidth||1,g=!1;t:for(e=1;e0){for(var _=0;_<24;++_)i.push(i[i.length-12]);d+=2,g=!0}continue t}u[0][r]=Math.min(u[0][r],x[r],w[r]),u[1][r]=Math.max(u[1][r],x[r],w[r])}Array.isArray(p[0])?(v=p.length>e-1?p[e-1]:p.length>0?p[p.length-1]:[0,0,0,1],b=p.length>e?p[e]:p.length>0?p[p.length-1]:[0,0,0,1]):v=b=p,3===v.length&&(v=[v[0],v[1],v[2],1]),3===b.length&&(b=[b[0],b[1],b[2],1]),!this.hasAlpha&&v[3]<1&&(this.hasAlpha=!0),y=Array.isArray(m)?m.length>e-1?m[e-1]:m.length>0?m[m.length-1]:[0,0,0,1]:m;var k=s;if(s+=f(x,w),g){for(r=0;r<2;++r)i.push(x[0],x[1],x[2],w[0],w[1],w[2],k,y,v[0],v[1],v[2],v[3]);d+=2,g=!1}i.push(x[0],x[1],x[2],w[0],w[1],w[2],k,y,v[0],v[1],v[2],v[3],x[0],x[1],x[2],w[0],w[1],w[2],k,-y,v[0],v[1],v[2],v[3],w[0],w[1],w[2],x[0],x[1],x[2],s,-y,b[0],b[1],b[2],b[3],w[0],w[1],w[2],x[0],x[1],x[2],s,y,b[0],b[1],b[2],b[3]),d+=4}}if(this.buffer.update(i),o.push(s),a.push(h[h.length-1].slice()),this.bounds=u,this.vertexCount=d,this.points=a,this.arcLength=o,"dashes"in t){var A=t.dashes.slice();for(A.unshift(0),e=1;e1.0001)return null;v+=g[u]}return Math.abs(v-1)>.001?null:[h,s(t,g),g]}},840:function(t,e,r){var n=r(3236),i=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvec4 project(vec3 p) {\n return projection * (view * (model * vec4(p, 1.0)));\n}\n\nvoid main() {\n gl_Position = project(position);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * vec4(position , 1.0);\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n f_color = color;\n f_data = position;\n f_uv = uv;\n}\n"]),o=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),a=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n f_id = id;\n f_position = position;\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),h=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n}"]),f=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);e.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:d,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:h,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:p,fragment:f,attributes:[{name:"position",type:"vec3"}]}},7201:function(t,e,r){"use strict";var n=r(9405),i=r(2762),o=r(8116),a=r(7766),s=r(8406),l=r(6760),c=r(7608),d=r(9618),u=r(6729),h=r(7765),p=r(1888),f=r(840),m=r(7626),g=f.meshShader,v=f.wireShader,b=f.pointShader,y=f.pickShader,x=f.pointPickShader,w=f.contourShader,_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(t,e,r,n,i,o,a,s,l,c,d,u,h,p,f,m,g,v,b,y,x,w,k,A,T,M,S){this.gl=t,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=o,this.pointPickShader=a,this.contourShader=s,this.trianglePositions=l,this.triangleColors=d,this.triangleNormals=h,this.triangleUVs=u,this.triangleIds=c,this.triangleVAO=p,this.triangleCount=0,this.lineWidth=1,this.edgePositions=f,this.edgeColors=g,this.edgeUVs=v,this.edgeIds=m,this.edgeVAO=b,this.edgeCount=0,this.pointPositions=y,this.pointColors=w,this.pointUVs=k,this.pointSizes=A,this.pointIds=x,this.pointVAO=T,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=M,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=_,this._view=_,this._projection=_,this._resolution=[1,1]}var A=k.prototype;function T(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}function M(t){var e=n(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function S(t){var e=n(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function C(t){var e=n(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function E(t){var e=n(t,w.vertex,w.fragment);return e.attributes.position.location=0,e}A.isOpaque=function(){return!this.hasAlpha},A.isTransparent=function(){return this.hasAlpha},A.pickSlots=1,A.setPickBase=function(t){this.pickId=t},A.highlight=function(t){if(t&&this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,o=r.length,a=p.mallocFloat32(6*o),s=0,l=0;l0&&((u=this.triShader).bind(),u.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((u=this.lineShader).bind(),u.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((u=this.pointShader).bind(),u.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((u=this.contourShader).bind(),u.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},A.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||_,n=t.view||_,i=t.projection||_,o=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],a=0;a<3;++a)o[0][a]=Math.max(o[0][a],this.clipBounds[0][a]),o[1][a]=Math.min(o[1][a],this.clipBounds[1][a]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:o,pickId:this.pickId/255};(s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},A.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),o=0;oi[A]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=d,r.uniforms.color=g[t],r.uniforms.angle=v[t],o.drawArrays(o.TRIANGLES,i[A],i[T]-i[A]))),b[t]&&k&&(d[1^t]-=M*p*y[t],r.uniforms.dataAxis=u,r.uniforms.screenOffset=d,r.uniforms.color=x[t],r.uniforms.angle=w[t],o.drawArrays(o.TRIANGLES,_,k)),d[1^t]=M*s[2+(1^t)]-1,f[t+2]&&(d[1^t]+=M*p*m[t+2],Ai[A]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=d,r.uniforms.color=g[t+2],r.uniforms.angle=v[t+2],o.drawArrays(o.TRIANGLES,i[A],i[T]-i[A]))),b[t+2]&&k&&(d[1^t]+=M*p*y[t+2],r.uniforms.dataAxis=u,r.uniforms.screenOffset=d,r.uniforms.color=x[t+2],r.uniforms.angle=w[t+2],o.drawArrays(o.TRIANGLES,_,k))}),m.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,o=r.screenBox,a=r.titleCenter,s=r.titleAngle,l=r.titleColor,c=r.pixelRatio;if(this.titleCount){for(var d=0;d<2;++d)e[d]=2*(a[d]*c-o[d])/(o[2+d]-o[d])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),m.bind=(h=[0,0],p=[0,0],f=[0,0],function(){var t=this.plot,e=this.shader,r=t._tickBounds,n=t.dataBox,i=t.screenBox,o=t.viewBox;e.bind();for(var a=0;a<2;++a){var s=r[a],l=r[a+2]-s,c=.5*(n[a+2]+n[a]),d=n[a+2]-n[a],u=o[a],m=o[a+2]-u,g=i[a],v=i[a+2]-g;p[a]=2*l/d*m/v,h[a]=2*(s-c)/d*m/v}f[1]=2*t.pixelRatio/(i[3]-i[1]),f[0]=f[1]*(i[3]-i[1])/(i[2]-i[0]),e.uniforms.dataScale=p,e.uniforms.dataShift=h,e.uniforms.textScale=f,this.vbo.bind(),e.attributes.textCoordinate.pointer()}),m.update=function(t){var e,r,n,i,a,s=[],l=t.ticks,c=t.bounds;for(a=0;a<2;++a){var d=[Math.floor(s.length/3)],u=[-1/0],h=l[a];for(e=0;e=0){var m=e[f]-n[f]*(e[f+2]-e[f])/(n[f+2]-n[f]);0===f?a.drawLine(m,e[1],m,e[3],p[f],h[f]):a.drawLine(e[0],m,e[2],m,p[f],h[f])}}for(f=0;f=0;--t)this.objects[t].dispose();for(this.objects.length=0,t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},c.removeObject=function(t){for(var e=this.objects,r=0;rMath.abs(e))c.rotate(o,0,0,-t*r*Math.PI*f.rotateSpeed/window.innerWidth);else if(!f._ortho){var a=-f.zoomSpeed*i*e/window.innerHeight*(o-c.lastT())/20;c.pan(o,0,0,u*(Math.exp(a)-1))}}}),!0)},f.enableMouseListeners(),f};var n=r(3025),i=r(6296),o=r(351),a=r(8512),s=r(24),l=r(7520)},799:function(t,e,r){var n=r(3236),i=r(9405),o=n(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),a=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);t.exports=function(t){return i(t,o,a,null,[{name:"position",type:"vec2"}])}},4100:function(t,e,r){"use strict";var n=r(4437),i=r(3837),o=r(5445),a=r(4449),s=r(3589),l=r(2260),c=r(7169),d=r(351),u=r(4772),h=r(4040),p=r(799),f=r(9216)({tablet:!0,featureDetect:!0});function m(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function g(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e<0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}return e>0?(r=Math.round(Math.pow(10,e)),Math.ceil(t/r)*r):Math.ceil(t)}function v(t){return"boolean"!=typeof t||t}t.exports={createScene:function(t){(t=t||{}).camera=t.camera||{};var e=t.canvas;e||(e=document.createElement("canvas"),t.container?t.container.appendChild(e):document.body.appendChild(e));var r=t.gl;if(r||(t.glOptions&&(f=!!t.glOptions.preserveDrawingBuffer),r=function(t,e){var r=null;try{(r=t.getContext("webgl",e))||(r=t.getContext("experimental-webgl",e))}catch(t){return null}return r}(e,t.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:f})),!r)throw new Error("webgl not supported");var b=t.bounds||[[-10,-10,-10],[10,10,10]],y=new m,x=l(r,r.drawingBufferWidth,r.drawingBufferHeight,{preferFloat:!f}),w=p(r),_=t.cameraObject&&!0===t.cameraObject._ortho||t.camera.projection&&"orthographic"===t.camera.projection.type||!1,k={eye:t.camera.eye||[2,0,0],center:t.camera.center||[0,0,0],up:t.camera.up||[0,1,0],zoomMin:t.camera.zoomMax||.1,zoomMax:t.camera.zoomMin||100,mode:t.camera.mode||"turntable",_ortho:_},A=t.axes||{},T=i(r,A);T.enable=!A.disable;var M=t.spikes||{},S=a(r,M),C=[],E=[],L=[],z=[],O=!0,D=!0,I={view:null,projection:new Array(16),model:new Array(16),_ortho:!1},F=(D=!0,[r.drawingBufferWidth,r.drawingBufferHeight]),R=t.cameraObject||n(e,k),P={gl:r,contextLost:!1,pixelRatio:t.pixelRatio||1,canvas:e,selection:y,camera:R,axes:T,axesPixels:null,spikes:S,bounds:b,objects:C,shape:F,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:v(t.autoResize),autoBounds:v(t.autoBounds),autoScale:!!t.autoScale,autoCenter:v(t.autoCenter),clipToBounds:v(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:I,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(t){this.aspect[0]=t.x,this.aspect[1]=t.y,this.aspect[2]=t.z,D=!0},setBounds:function(t,e){this.bounds[0][t]=e.min,this.bounds[1][t]=e.max},setClearColor:function(t){this.clearColor=t},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},j=[r.drawingBufferWidth/P.pixelRatio|0,r.drawingBufferHeight/P.pixelRatio|0];function N(){if(!P._stopped&&P.autoResize){var t=e.parentNode,r=1,n=1;t&&t!==document.body?(r=t.clientWidth,n=t.clientHeight):(r=window.innerWidth,n=window.innerHeight);var i=0|Math.ceil(r*P.pixelRatio),o=0|Math.ceil(n*P.pixelRatio);if(i!==e.width||o!==e.height){e.width=i,e.height=o;var a=e.style;a.position=a.position||"absolute",a.left="0px",a.top="0px",a.width=r+"px",a.height=n+"px",O=!0}}}function B(){for(var t=C.length,e=z.length,n=0;n0&&0===L[e-1];)L.pop(),z.pop().dispose()}function U(){if(P.contextLost)return!0;r.isContextLost()&&(P.contextLost=!0,P.mouseListener.enabled=!1,P.selection.object=null,P.oncontextloss&&P.oncontextloss())}P.autoResize&&N(),window.addEventListener("resize",N),P.update=function(t){P._stopped||(t=t||{},O=!0,D=!0)},P.add=function(t){P._stopped||(t.axes=T,C.push(t),E.push(-1),O=!0,D=!0,B())},P.remove=function(t){if(!P._stopped){var e=C.indexOf(t);e<0||(C.splice(e,1),E.pop(),O=!0,D=!0,B())}},P.dispose=function(){if(!P._stopped&&(P._stopped=!0,window.removeEventListener("resize",N),e.removeEventListener("webglcontextlost",U),P.mouseListener.enabled=!1,!P.contextLost)){T.dispose(),S.dispose();for(var t=0;ty.distance)continue;for(var c=0;c 1.0) {\n discard;\n }\n baseColor = mix(borderColor, color, step(radius, centerFraction));\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n }\n}\n"]),e.pickVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n"]),e.pickFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n"])},4696:function(t,e,r){"use strict";var n=r(9405),i=r(2762),o=r(1888),a=r(6640);function s(t,e,r,n,i){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}t.exports=function(t,e){var r=t.gl,o=new s(t,i(r),i(r),n(r,a.pointVertex,a.pointFragment),n(r,a.pickVertex,a.pickFragment));return o.update(e),t.addObject(o),o};var l,c,d=s.prototype;d.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},d.update=function(t){var e;function r(e,r){return e in t?t[e]:r}t=t||{},this.sizeMin=r("sizeMin",.5),this.sizeMax=r("sizeMax",20),this.color=r("color",[1,0,0,1]).slice(),this.areaRatio=r("areaRatio",1),this.borderColor=r("borderColor",[0,0,0,1]).slice(),this.blend=r("blend",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,a=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,s=t.positions,l=i?s:o.mallocFloat32(s.length),c=a?t.idToIndex:o.mallocInt32(n);if(i||l.set(s),!a)for(l.set(s),e=0;e>>1;for(r=0;r=e[0]&&o<=e[2]&&a>=e[1]&&a<=e[3]&&n++}return n}(this.points,i),d=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/o,l[4]=2/a,l[6]=-2*i[0]/o-1,l[7]=-2*i[1]/a-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=d<5,r.uniforms.pointSize=d,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),e&&(c[0]=255&t,c[1]=t>>8&255,c[2]=t>>16&255,c[3]=t>>24&255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=c,this.pickOffset=t);var u=n.getParameter(n.BLEND),h=n.getParameter(n.DITHER);return u&&!this.blend&&n.disable(n.BLEND),h&&n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),u&&!this.blend&&n.enable(n.BLEND),h&&n.enable(n.DITHER),t+this.pointCount}),d.draw=d.unifiedDraw,d.drawPick=d.unifiedDraw,d.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var o=r-n,a=this.points;return{object:this,pointId:o,dataCoord:[a[2*o],a[2*o+1]]}}},783:function(t){t.exports=function(t,e,r,n){var i,o,a,s,l,c=e[0],d=e[1],u=e[2],h=e[3],p=r[0],f=r[1],m=r[2],g=r[3];return(o=c*p+d*f+u*m+h*g)<0&&(o=-o,p=-p,f=-f,m=-m,g=-g),1-o>1e-6?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-n)*i)/a,l=Math.sin(n*i)/a):(s=1-n,l=n),t[0]=s*c+l*p,t[1]=s*d+l*f,t[2]=s*u+l*m,t[3]=s*h+l*g,t}},5964:function(t){"use strict";t.exports=function(t){return t||0===t?t.toString():""}},9366:function(t,e,r){"use strict";var n=r(4359);t.exports=function(t,e,r){var o=[e.style,e.weight,e.variant,e.family].join("_"),a=i[o];if(a||(a=i[o]={}),t in a)return a[t];var s={textAlign:"center",textBaseline:"middle",lineHeight:1,font:e.family,fontStyle:e.style,fontWeight:e.weight,fontVariant:e.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},l=n(t,s);s.triangles=!1;var c,d,u=n(t,s);if(r&&1!==r){for(c=0;c max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),a=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * (view * (model * vec4(position, 1)));\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * (view * (model * vec4(dataPosition, 1)));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),c=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),d=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],u={vertex:o,fragment:l,attributes:d},h={vertex:a,fragment:l,attributes:d},p={vertex:s,fragment:l,attributes:d},f={vertex:o,fragment:c,attributes:d},m={vertex:a,fragment:c,attributes:d},g={vertex:s,fragment:c,attributes:d};function v(t,e){var r=n(t,e),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}e.createPerspective=function(t){return v(t,u)},e.createOrtho=function(t){return v(t,h)},e.createProject=function(t){return v(t,p)},e.createPickPerspective=function(t){return v(t,f)},e.createPickOrtho=function(t){return v(t,m)},e.createPickProject=function(t){return v(t,g)}},8418:function(t,e,r){"use strict";var n=r(5219),i=r(2762),o=r(8116),a=r(1888),s=r(6760),l=r(1283),c=r(9366),d=r(5964),u=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],h=ArrayBuffer,p=DataView;function f(t){return Array.isArray(t)||function(t){return h.isView(t)&&!(t instanceof p)}(t)}function m(t,e){var r=t[0],n=t[1],i=t[2],o=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*i+e[12]*o,t[1]=e[1]*r+e[5]*n+e[9]*i+e[13]*o,t[2]=e[2]*r+e[6]*n+e[10]*i+e[14]*o,t[3]=e[3]*r+e[7]*n+e[11]*i+e[15]*o,t}function g(t,e,r,n){return m(n,n),m(n,n),m(n,n)}function v(t,e){this.index=t,this.dataCoordinate=this.position=e}function b(t){return!0===t||t>1?1:t}function y(t,e,r,n,i,o,a,s,l,c,d,u){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=o,this.glyphBuffer=a,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=d,this.pickProjectShader=u,this.points=[],this._selectResult=new v(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}t.exports=function(t){var e=t.gl,r=l.createPerspective(e),n=l.createOrtho(e),a=l.createProject(e),s=l.createPickPerspective(e),c=l.createPickOrtho(e),d=l.createPickProject(e),u=i(e),h=i(e),p=i(e),f=i(e),m=new y(e,r,n,a,u,h,p,f,o(e,[{buffer:u,size:3,type:e.FLOAT},{buffer:h,size:4,type:e.FLOAT},{buffer:p,size:2,type:e.FLOAT},{buffer:f,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),s,c,d);return m.update(t),m};var x=y.prototype;x.pickSlots=1,x.setPickBase=function(t){this.pickId=t},x.isTransparent=function(){if(this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectHasAlpha)return!0;return!1},x.isOpaque=function(){if(!this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&!this.projectHasAlpha)return!0;return!1};var w=[0,0],_=[0,0,0],k=[0,0,0],A=[0,0,0,1],T=[0,0,0,1],M=u.slice(),S=[0,0,0],C=[[0,0,0],[0,0,0]];function E(t){return t[0]=t[1]=t[2]=0,t}function L(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function z(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}var O=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function D(t,e,r,n,i,o,a){var l=r.gl;if((o===r.projectHasAlpha||a)&&function(t,e,r,n){var i,o=e.axesProject,a=e.gl,l=t.uniforms,c=r.model||u,d=r.view||u,h=r.projection||u,p=e.axesBounds,f=function(t){for(var e=C,r=0;r<2;++r)for(var n=0;n<3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);i=e.axes&&e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],w[0]=2/a.drawingBufferWidth,w[1]=2/a.drawingBufferHeight,t.bind(),l.view=d,l.projection=h,l.screenSize=w,l.highlightId=e.highlightId,l.highlightScale=e.highlightScale,l.clipBounds=f,l.pickGroup=e.pickId/255,l.pixelRatio=n;for(var m=0;m<3;++m)if(o[m]){l.scale=e.projectScale[m],l.opacity=e.projectOpacity[m];for(var v=M,b=0;b<16;++b)v[b]=0;for(b=0;b<4;++b)v[5*b]=1;v[5*m]=0,i[m]<0?v[12+m]=p[0][m]:v[12+m]=p[1][m],s(v,c,v),l.model=v;var y=(m+1)%3,x=(m+2)%3,O=E(_),D=E(k);O[y]=1,D[x]=1;var I=g(0,0,0,L(A,O)),F=g(0,0,0,L(T,D));if(Math.abs(I[1])>Math.abs(F[1])){var R=I;I=F,F=R,R=O,O=D,D=R;var P=y;y=x,x=P}I[0]<0&&(O[y]=-1),F[1]>0&&(D[x]=-1);var j=0,N=0;for(b=0;b<4;++b)j+=Math.pow(c[4*y+b],2),N+=Math.pow(c[4*x+b],2);O[y]/=Math.sqrt(j),D[x]/=Math.sqrt(N),l.axes[0]=O,l.axes[1]=D,l.fragClipBounds[0]=z(S,f[0],m,-1e8),l.fragClipBounds[1]=z(S,f[1],m,1e8),e.vao.bind(),e.vao.draw(a.TRIANGLES,e.vertexCount),e.lineWidth>0&&(a.lineWidth(e.lineWidth*n),e.vao.draw(a.LINES,e.lineVertexCount,e.vertexCount)),e.vao.unbind()}}(e,r,n,i),o===r.hasAlpha||a){t.bind();var c=t.uniforms;c.model=n.model||u,c.view=n.view||u,c.projection=n.projection||u,w[0]=2/l.drawingBufferWidth,w[1]=2/l.drawingBufferHeight,c.screenSize=w,c.highlightId=r.highlightId,c.highlightScale=r.highlightScale,c.fragClipBounds=O,c.clipBounds=r.axes.bounds,c.opacity=r.opacity,c.pickGroup=r.pickId/255,c.pixelRatio=i,r.vao.bind(),r.vao.draw(l.TRIANGLES,r.vertexCount),r.lineWidth>0&&(l.lineWidth(r.lineWidth*i),r.vao.draw(l.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function I(t,e,r,i){var o;o=f(t)?e=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},x.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},x.update=function(t){if("perspective"in(t=t||{})&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t)if(f(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if("projectScale"in t)if(f(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in t){f(t.projectOpacity)?this.projectOpacity=t.projectOpacity.slice():(r=+t.projectOpacity,this.projectOpacity=[r,r,r]);for(var n=0;n<3;++n)this.projectOpacity[n]=b(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in t&&(this.opacity=b(t.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,o,s=t.position,l={family:t.font||"normal",style:t.fontStyle||"normal",weight:t.fontWeight||"normal",variant:t.fontVariant||"normal"},c=t.alignment||[0,0];if(2===c.length)i=c[0],o=c[1];else for(i=[],o=[],n=0;n0){var D=0,F=x,R=[0,0,0,1],P=[0,0,0,1],j=f(p)&&f(p[0]),N=f(v)&&f(v[0]);t:for(n=0;n<_;++n){for(y+=1,k=s[n],A=0;A<3;++A){if(isNaN(k[A])||!isFinite(k[A]))continue t;u[A]=Math.max(u[A],k[A]),d[A]=Math.min(d[A],k[A])}T=(B=I(h,n,l,this.pixelRatio)).mesh,M=B.lines,S=B.bounds;var B,U=B.visible;if(U)if(f(p)){if(3===(G=j?n0?1-S[0][0]:Y<0?1+S[1][0]:1,Z*=Z>0?1-S[0][1]:Z<0?1+S[1][1]:1],X=T.cells||[],J=T.positions||[];for(A=0;A0){var v=r*d;a.drawBox(u-v,h-v,p+v,h+v,o),a.drawBox(u-v,f-v,p+v,f+v,o),a.drawBox(u-v,h-v,u+v,f+v,o),a.drawBox(p-v,h-v,p+v,f+v,o)}}}},s.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},3589:function(t,e,r){"use strict";t.exports=function(t,e){var r=e[0],o=e[1];return new l(t,n(t,r,o,{}),i.mallocUint8(r*o*4))};var n=r(2260),i=r(1888),o=r(9618),a=r(8828).nextPow2;function s(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function l(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}var c=l.prototype;Object.defineProperty(c,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(t){if(this.gl){this.fbo.shape=t;var e=this.fbo.shape[0],r=this.fbo.shape[1];if(r*e*4>this.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(a(r*e*4)),o=0;or)for(t=r;te)for(t=e;t=0){for(var k=0|_.type.charAt(_.type.length-1),A=new Array(k),T=0;T=0;)M+=1;w[b]=M}var S=new Array(r.length);function C(){h.program=a.program(p,h._vref,h._fref,x,w);for(var t=0;t=0){if((f=h.charCodeAt(h.length-1)-48)<2||f>4)throw new n("","Invalid data type for attribute "+u+": "+h);s(t,e,p[0],i,f,o,u)}else{if(!(h.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+u+": "+h);var f;if((f=h.charCodeAt(h.length-1)-48)<2||f>4)throw new n("","Invalid data type for attribute "+u+": "+h);l(t,e,p,i,f,o,u)}}}return o};var n=r(8866);function i(t,e,r,n,i,o){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=o}var o=i.prototype;o.pointer=function(t,e,r,n){var i=this,o=i._gl,a=i._locations[i._index];o.vertexAttribPointer(a,i._dimension,t||o.FLOAT,!!e,r||0,n||0),o.enableVertexAttribArray(a)},o.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(o,"location",{get:function(){return this._locations[this._index]},set:function(t){return t!==this._locations[this._index]&&(this._locations[this._index]=0|t,this._wrapper.program=null),0|t}});var a=[function(t,e,r){return void 0===r.length?t.vertexAttrib1f(e,r):t.vertexAttrib1fv(e,r)},function(t,e,r,n){return void 0===r.length?t.vertexAttrib2f(e,r,n):t.vertexAttrib2fv(e,r)},function(t,e,r,n,i){return void 0===r.length?t.vertexAttrib3f(e,r,n,i):t.vertexAttrib3fv(e,r)},function(t,e,r,n,i,o){return void 0===r.length?t.vertexAttrib4f(e,r,n,i,o):t.vertexAttrib4fv(e,r)}];function s(t,e,r,n,o,s,l){var c=a[o],d=new i(t,e,r,n,o,c);Object.defineProperty(s,l,{set:function(e){return t.disableVertexAttribArray(n[r]),c(t,n[r],e),e},get:function(){return d},enumerable:!0})}function l(t,e,r,n,i,o,a){for(var l=new Array(i),c=new Array(i),d=0;d4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+b);t["uniformMatrix"+v+"fv"](s[u],!1,h);break}throw new i("","Unknown uniform data type for "+name+": "+b)}if((v=b.charCodeAt(b.length-1)-48)<2||v>4)throw new i("","Invalid data type");switch(b.charAt(0)){case"b":case"i":t["uniform"+v+"iv"](s[u],h);break;case"v":t["uniform"+v+"fv"](s[u],h);break;default:throw new i("","Unrecognized data type for vector "+name+": "+b)}}}}}}function c(t,e){if("object"!=typeof e)return[[t,e]];var r=[];for(var n in e){var i=e[n],o=t;parseInt(n)+""===n?o+="["+n+"]":o+="."+n,"object"==typeof i?r.push.apply(r,c(o,i)):r.push([o,i])}return r}function d(t,e,n){if("object"==typeof n){var c=u(n);Object.defineProperty(t,e,{get:o(c),set:l(n),enumerable:!0,configurable:!1})}else s[n]?Object.defineProperty(t,e,{get:(d=n,function(t,e,r){return t.getUniform(e.program,r[d])}),set:l(n),enumerable:!0,configurable:!1}):t[e]=function(t){switch(t){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var e=t.indexOf("vec");if(0<=e&&e<=1&&t.length===4+e){if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new i("","Invalid data type");return"b"===t.charAt(0)?a(r,!1):a(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r;if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+t);return a(r*r,0)}throw new i("","Unknown uniform data type for "+name+": "+t)}}(r[n].type);var d}function u(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r1){s[0]in o||(o[s[0]]=[]),o=o[s[0]];for(var l=1;l1)for(var l=0;l 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, tubeScale;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),o=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),a=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * (view * tubePosition);\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);e.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},e.pickShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(t,e,r){"use strict";var n=r(2931),i=r(9970),o=["xyz","xzy","yxz","yzx","zxy","zyx"],a=function(t,e){var r,n=t.length;for(r=0;re)return r-1}return r},s=function(t,e,r){return tr?r:t},l=function(t){var e=1/0;t.sort((function(t,e){return t-e}));for(var r=t.length,n=1;nu-1||b>h-1||y>p-1)return n.create();var x,w,_,k,A,T,M=o[0][f],S=o[0][v],C=o[1][m],E=o[1][b],L=o[2][g],z=(l-M)/(S-M),O=(c-C)/(E-C),D=(d-L)/(o[2][y]-L);switch(isFinite(z)||(z=.5),isFinite(O)||(O=.5),isFinite(D)||(D=.5),r.reversedX&&(f=u-1-f,v=u-1-v),r.reversedY&&(m=h-1-m,b=h-1-b),r.reversedZ&&(g=p-1-g,y=p-1-y),r.filled){case 5:A=g,T=y,_=m*p,k=b*p,x=f*p*h,w=v*p*h;break;case 4:A=g,T=y,x=f*p,w=v*p,_=m*p*u,k=b*p*u;break;case 3:_=m,k=b,A=g*h,T=y*h,x=f*h*p,w=v*h*p;break;case 2:_=m,k=b,x=f*h,w=v*h,A=g*h*u,T=y*h*u;break;case 1:x=f,w=v,A=g*u,T=y*u,_=m*u*p,k=b*u*p;break;default:x=f,w=v,_=m*u,k=b*u,A=g*u*h,T=y*u*h}var I=i[x+_+A],F=i[x+_+T],R=i[x+k+A],P=i[x+k+T],j=i[w+_+A],N=i[w+_+T],B=i[w+k+A],U=i[w+k+T],G=n.create(),V=n.create(),H=n.create(),W=n.create();n.lerp(G,I,j,z),n.lerp(V,F,N,z),n.lerp(H,R,B,z),n.lerp(W,P,U,z);var q=n.create(),Y=n.create();n.lerp(q,G,H,O),n.lerp(Y,V,W,O);var Z=n.create();return n.lerp(Z,q,Y,D),Z}(e,t,p)},m=t.getDivergence||function(t,e){var r=n.create(),i=1e-4;n.add(r,t,[i,0,0]);var o=f(r);n.subtract(o,o,e),n.scale(o,o,1/i),n.add(r,t,[0,i,0]);var a=f(r);n.subtract(a,a,e),n.scale(a,a,1/i),n.add(r,t,[0,0,i]);var s=f(r);return n.subtract(s,s,e),n.scale(s,s,1/i),n.add(r,o,a),n.add(r,r,s),r},g=[],v=e[0][0],b=e[0][1],y=e[0][2],x=e[1][0],w=e[1][1],_=e[1][2],k=function(t){var e=t[0],r=t[1],n=t[2];return!(ex||rw||n_)},A=10*n.distance(e[0],e[1])/c,T=A*A,M=1,S=0,C=r.length;C>1&&(M=function(t){for(var e=[],r=[],n=[],i={},o={},a={},s=t.length,c=0;cS&&(S=P),F.push(P),g.push({points:z,velocities:O,divergences:F});for(var j=0;j<100*c&&z.lengthT&&n.scale(N,N,A/Math.sqrt(B)),n.add(N,N,L),D=f(N),n.squaredDistance(I,N)-T>-1e-4*T&&(z.push(N),I=N,O.push(D),R=m(N,D),P=n.length(R),isFinite(P)&&P>S&&(S=P),F.push(P)),L=N}}var U=function(t,e,r,o){for(var a=0,s=0;s0)for(k=0;k<8;k++){var A=(k+1)%8;c.push(h[k],p[k],p[A],p[A],h[A],h[k]),u.push(b,v,v,v,b,b),f.push(m,g,g,g,m,m);var T=c.length;d.push([T-6,T-5,T-4],[T-3,T-2,T-1])}var M=h;h=p,p=M;var S=b;b=v,v=S;var C=m;m=g,g=C}return{positions:c,cells:d,vectors:u,vertexIntensity:f}}(t,r,o,a)})),u=[],h=[],p=[],f=[];for(s=0;s max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (\n kill > 0.0 ||\n vColor.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n ) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color — in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));\n vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0);\n\n vec4 clipPosition = projection * (view * worldPosition);\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);e.createShader=function(t){var e=n(t,o,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},e.createPickShader=function(t){var e=n(t,o,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},e.createContourShader=function(t){var e=n(t,s,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},e.createPickContourShader=function(t){var e=n(t,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},9499:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl,r=b(e),n=x(e),s=y(e),l=w(e),c=i(e),d=o(e,[{buffer:c,size:4,stride:_,offset:0},{buffer:c,size:3,stride:_,offset:16},{buffer:c,size:3,stride:_,offset:28}]),u=i(e),h=o(e,[{buffer:u,size:4,stride:20,offset:0},{buffer:u,size:1,stride:20,offset:16}]),p=i(e),f=o(e,[{buffer:p,size:2,type:e.FLOAT}]),m=a(e,1,S,e.RGBA,e.UNSIGNED_BYTE);m.minFilter=e.LINEAR,m.magFilter=e.LINEAR;var g=new C(e,[0,0],[[0,0,0],[0,0,0]],r,n,c,d,m,s,l,u,h,p,f,[0,0,0]),v={levels:[[],[],[]]};for(var k in t)v[k]=t[k];return v.colormap=v.colormap||"jet",g.update(v),g};var n=r(8828),i=r(2762),o=r(8116),a=r(7766),s=r(1888),l=r(6729),c=r(5298),d=r(9994),u=r(9618),h=r(3711),p=r(6760),f=r(7608),m=r(2478),g=r(6199),v=r(990),b=v.createShader,y=v.createContourShader,x=v.createPickShader,w=v.createPickContourShader,_=40,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],A=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],T=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function M(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}!function(){for(var t=0;t<3;++t){var e=T[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();var S=256;function C(t,e,r,n,i,o,a,l,c,d,h,p,f,m,g){this.gl=t,this.shape=e,this.bounds=r,this.objectOffset=g,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=o,this._vao=a,this._colorMap=l,this._contourShader=c,this._contourPickShader=d,this._contourBuffer=h,this._contourVAO=p,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new M([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=f,this._dynamicVAO=m,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[u(s.mallocFloat(1024),[0,0]),u(s.mallocFloat(1024),[0,0]),u(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var E=C.prototype;E.genColormap=function(t,e){var r=!1,n=d([l({colormap:t,nshades:S,format:"rgba"}).map((function(t,n){var i=e?function(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}(n/255,e):t[3];return i<1&&(r=!0),[t[0],t[1],t[2],255*i]}))]);return c.divseq(n,255),this.hasAlphaScale=r,n},E.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},E.isOpaque=function(){return!this.isTransparent()},E.pickSlots=1,E.setPickBase=function(t){this.pickId=t};var L=[0,0,0],z={showSurface:!1,showContour:!1,projections:[k.slice(),k.slice(),k.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function O(t,e){var r,n,i,o=e.axes&&e.axes.lastCubeProps.axis||L,a=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(a=a||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=z.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(o[r]>0)][r],p(l,t.model,l);var c=z.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)c[i][n]=t.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return z.showSurface=a,z.showContour=s,z}var D={model:k,view:k,projection:k,inverseModel:k.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},I=k.slice(),F=[1,0,0,0,1,0,0,0,1];function R(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=D;n.model=t.model||k,n.view=t.view||k,n.projection=t.projection||k,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.objectOffset=this.objectOffset,n.contourColor=this.contourColor[0],n.inverseModel=f(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var o=n.clipBounds[i],a=0;a<3;++a)o[a]=Math.min(Math.max(this.clipBounds[i][a],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=F,n.vertexColor=this.vertexColor;var s=I;for(p(s,n.view,n.model),p(s,n.projection,s),f(s,s),i=0;i<3;++i)n.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i<3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i<3;++i){var c=s[12+i];for(a=0;a<3;++a)c+=s[4*a+i]*this.lightPosition[a];n.lightPosition[i]=c/l}var d=O(n,this);if(d.showSurface){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=d.projections[i],this._shader.uniforms.clipBounds=d.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(d.showContour){var u=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,u.bind(),u.uniforms=n;var h=this._contourVAO;for(h.bind(),i=0;i<3;++i)for(u.uniforms.permutation=T[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),a=0;a>4)/16)/255,i=Math.floor(n),o=n-i,a=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(a),l=a-s;i+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var d=0;d<2;++d)for(var u=d?o:1-o,h=0;h<2;++h)for(var p=i+d,f=s+h,g=u*(h?l:1-l),v=0;v<3;++v)c[v]+=this._field[v].get(p,f)*g;for(var b=this._pickResult.level,y=0;y<3;++y)if(b[y]=m.le(this.contourLevels[y],c[y]),b[y]<0)this.contourLevels[y].length>0&&(b[y]=0);else if(b[y]Math.abs(w-c[y])&&(b[y]+=1)}for(r.index[0]=o<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=a/e[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},E.padField=function(t,e){var r=e.shape.slice(),n=t.shape.slice();c.assign(t.lo(1,1).hi(r[0],r[1]),e),c.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),c.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),c.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),c.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))},E.update=function(t){t=t||{},this.objectOffset=t.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in t&&(this.contourWidth=j(t.contourWidth,Number)),"showContour"in t&&(this.showContour=j(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=j(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=B(t.contourColor)),"contourProject"in t&&(this.contourProject=j(t.contourProject,(function(t){return j(t,Boolean)}))),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=B(t.dynamicColor)),"dynamicTint"in t&&(this.dynamicTint=j(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=j(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"opacityscale"in t&&(this.opacityscale=t.opacityscale),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0),"colormap"in t&&this._colorMap.setPixels(this.genColormap(t.colormap,this.opacityscale));var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var i=(e.shape[0]+2)*(e.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=u(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),this.padField(this._field[2],e),this.shape=e.shape.slice();for(var o=this.shape,a=0;a<2;++a)this._field[2].size>this._field[a].data.length&&(s.freeFloat(this._field[a].data),this._field[a].data=s.mallocFloat(this._field[2].size)),this._field[a]=u(this._field[a].data,[o[0]+2,o[1]+2]);if(t.coords){var l=t.coords;if(!Array.isArray(l)||3!==l.length)throw new Error("gl-surface: invalid coordinates for x/y");for(a=0;a<2;++a){var c=l[a];for(v=0;v<2;++v)if(c.shape[v]!==o[v])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[a],c)}}else if(t.ticks){var d=t.ticks;if(!Array.isArray(d)||2!==d.length)throw new Error("gl-surface: invalid ticks");for(a=0;a<2;++a){var p=d[a];if((Array.isArray(p)||p.length)&&(p=u(p)),p.shape[0]!==o[a])throw new Error("gl-surface: invalid tick length");var f=u(p.data,o);f.stride[a]=p.stride[0],f.stride[1^a]=0,this.padField(this._field[a],f)}}else{for(a=0;a<2;++a){var m=[0,0];m[a]=1,this._field[a]=u(this._field[a].data,[o[0]+2,o[1]+2],m,0)}this._field[0].set(0,0,0);for(var v=0;v0){for(var yt=0;yt<5;++yt)K.pop();U-=1}continue t}K.push(nt[0],nt[1],at[0],at[1],nt[2]),U+=1}}rt.push(U)}this._contourOffsets[Q]=et,this._contourCounts[Q]=rt}var xt=s.mallocFloat(K.length);for(a=0;as||a[1]<0||a[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=f(a,e.stride.slice()),c=0;"float32"===r?c=t.FLOAT:"float64"===r?(c=t.FLOAT,l=!1,r="float32"):"uint8"===r?c=t.UNSIGNED_BYTE:(c=t.UNSIGNED_BYTE,l=!1,r="uint8");var u,p,g=0;if(2===a.length)g=t.LUMINANCE,a=[a[0],a[1],1],e=n(e.data,a,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==a.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===a[2])g=t.ALPHA;else if(2===a[2])g=t.LUMINANCE_ALPHA;else if(3===a[2])g=t.RGB;else{if(4!==a[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=t.RGBA}}c!==t.FLOAT||t.getExtension("OES_texture_float")||(c=t.UNSIGNED_BYTE,l=!1);var v=e.size;if(l)u=0===e.offset&&e.data.length===v?e.data:e.data.subarray(e.offset,e.offset+v);else{var b=[a[2],a[2]*a[0],1];p=o.malloc(v,r);var y=n(p,a,b,0);"float32"!==r&&"float64"!==r||c!==t.UNSIGNED_BYTE?i.assign(y,e):d(y,e),u=p.subarray(0,v)}var x=m(t);return t.texImage2D(t.TEXTURE_2D,0,g,a[0],a[1],0,g,c,u),l||o.free(p),new h(t,x,a[0],a[1],g,c)}(t,e)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var a=null,s=null,l=null;function c(t){return"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&t instanceof ImageData}var d=function(t,e){i.muls(t,e,255)};function u(t,e,r){var n=t.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(e<0||e>i||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function h(t,e,r,n,i,o){this.gl=t,this.handle=e,this.format=i,this.type=o,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var a=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return a._wrapS},set:function(t){return a.wrapS=t}},{get:function(){return a._wrapT},set:function(t){return a.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return a._shape[0]},set:function(t){return a.width=t}},{get:function(){return a._shape[1]},set:function(t){return a.height=t}}]),this._shapeVector=l}var p=h.prototype;function f(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function m(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function g(t,e,r,n,i){var o=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>o||r<0||r>o)throw new Error("gl-texture2d: Invalid texture shape");if(i===t.FLOAT&&!t.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var a=m(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new h(t,a,e,r,n,i)}Object.defineProperties(p,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&a.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&a.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(l.indexOf(t[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return u(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return u(this,t|=0,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,u(this,this._shape[0],t),t}}}),p.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},p.dispose=function(){this.gl.deleteTexture(this.handle)},p.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},p.setPixels=function(t,e,r,a){var s=this.gl;this.bind(),Array.isArray(e)?(a=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),a=a||0;var l=c(t)?t:t.raw;if(l)this._mipLevels.indexOf(a)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(a)):s.texSubImage2D(s.TEXTURE_2D,a,e,r,this.format,this.type,l);else{if(!(t.shape&&t.stride&&t.data))throw new Error("gl-texture2d: Unsupported data type");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>a||r+t.shape[0]>this._shape[0]>>>a||e<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(t,e,r,a,s,l,c,u){var h=u.dtype,p=u.shape.slice();if(p.length<2||p.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var m=0,g=0,v=f(p,u.stride.slice());if("float32"===h?m=t.FLOAT:"float64"===h?(m=t.FLOAT,v=!1,h="float32"):"uint8"===h?m=t.UNSIGNED_BYTE:(m=t.UNSIGNED_BYTE,v=!1,h="uint8"),2===p.length)g=t.LUMINANCE,p=[p[0],p[1],1],u=n(u.data,p,[u.stride[0],u.stride[1],1],u.offset);else{if(3!==p.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===p[2])g=t.ALPHA;else if(2===p[2])g=t.LUMINANCE_ALPHA;else if(3===p[2])g=t.RGB;else{if(4!==p[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=t.RGBA}p[2]}if(g!==t.LUMINANCE&&g!==t.ALPHA||s!==t.LUMINANCE&&s!==t.ALPHA||(g=s),g!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var b=u.size,y=c.indexOf(a)<0;if(y&&c.push(a),m===l&&v)0===u.offset&&u.data.length===b?y?t.texImage2D(t.TEXTURE_2D,a,s,p[0],p[1],0,s,l,u.data):t.texSubImage2D(t.TEXTURE_2D,a,e,r,p[0],p[1],s,l,u.data):y?t.texImage2D(t.TEXTURE_2D,a,s,p[0],p[1],0,s,l,u.data.subarray(u.offset,u.offset+b)):t.texSubImage2D(t.TEXTURE_2D,a,e,r,p[0],p[1],s,l,u.data.subarray(u.offset,u.offset+b));else{var x;x=l===t.FLOAT?o.mallocFloat32(b):o.mallocUint8(b);var w=n(x,p,[p[2],p[2]*p[0],1]);m===t.FLOAT&&l===t.UNSIGNED_BYTE?d(w,u):i.assign(w,u),y?t.texImage2D(t.TEXTURE_2D,a,s,p[0],p[1],0,s,l,x.subarray(0,b)):t.texSubImage2D(t.TEXTURE_2D,a,e,r,p[0],p[1],s,l,x.subarray(0,b)),l===t.FLOAT?o.freeFloat32(x):o.freeUint8(x)}}(s,e,r,a,this.format,this.type,this._mipLevels,t)}}},1433:function(t){"use strict";t.exports=function(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(s)};var n=r(2825),i=r(3536),o=r(244)},9226:function(t){t.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},3126:function(t){t.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},3990:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},1091:function(t){t.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},5911:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[0],s=r[1],l=r[2];return t[0]=i*l-o*s,t[1]=o*a-n*l,t[2]=n*s-i*a,t}},5455:function(t,e,r){t.exports=r(7056)},7056:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}},4008:function(t,e,r){t.exports=r(6690)},6690:function(t){t.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}},244:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},2613:function(t){t.exports=1e-6},9922:function(t,e,r){t.exports=function(t,e){var r=t[0],i=t[1],o=t[2],a=e[0],s=e[1],l=e[2];return Math.abs(r-a)<=n*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=n*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-l)<=n*Math.max(1,Math.abs(o),Math.abs(l))};var n=r(2613)},9265:function(t){t.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},2681:function(t){t.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},5137:function(t,e,r){t.exports=function(t,e,r,i,o,a){var s,l;for(e||(e=3),r||(r=0),l=i?Math.min(i*e+r,t.length):t.length,s=r;s0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}},7636:function(t){t.exports=function(t,e){e=e||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*e,t}},6894:function(t){t.exports=function(t,e,r,n){var i=r[1],o=r[2],a=e[1]-i,s=e[2]-o,l=Math.sin(n),c=Math.cos(n);return t[0]=e[0],t[1]=i+a*c-s*l,t[2]=o+a*l+s*c,t}},109:function(t){t.exports=function(t,e,r,n){var i=r[0],o=r[2],a=e[0]-i,s=e[2]-o,l=Math.sin(n),c=Math.cos(n);return t[0]=i+s*l+a*c,t[1]=e[1],t[2]=o+s*c-a*l,t}},8692:function(t){t.exports=function(t,e,r,n){var i=r[0],o=r[1],a=e[0]-i,s=e[1]-o,l=Math.sin(n),c=Math.cos(n);return t[0]=i+a*c-s*l,t[1]=o+a*l+s*c,t[2]=e[2],t}},2447:function(t){t.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},6621:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}},8489:function(t){t.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}},1463:function(t){t.exports=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}},6141:function(t,e,r){t.exports=r(2953)},5486:function(t,e,r){t.exports=r(3066)},2953:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return r*r+n*n+i*i}},3066:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}},2229:function(t,e,r){t.exports=r(6843)},6843:function(t){t.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}},492:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2];return t[0]=n*r[0]+i*r[3]+o*r[6],t[1]=n*r[1]+i*r[4]+o*r[7],t[2]=n*r[2]+i*r[5]+o*r[8],t}},5673:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[3]*n+r[7]*i+r[11]*o+r[15];return a=a||1,t[0]=(r[0]*n+r[4]*i+r[8]*o+r[12])/a,t[1]=(r[1]*n+r[5]*i+r[9]*o+r[13])/a,t[2]=(r[2]*n+r[6]*i+r[10]*o+r[14])/a,t}},264:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[0],s=r[1],l=r[2],c=r[3],d=c*n+s*o-l*i,u=c*i+l*n-a*o,h=c*o+a*i-s*n,p=-a*n-s*i-l*o;return t[0]=d*c+p*-a+u*-l-h*-s,t[1]=u*c+p*-s+h*-a-d*-l,t[2]=h*c+p*-l+d*-s-u*-a,t}},4361:function(t){t.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}},2335:function(t){t.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},2933:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},7536:function(t){t.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},4691:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+o*o)}},1373:function(t){t.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}},3750:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},3390:function(t){t.exports=function(t,e,r,n){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=n,i}},9970:function(t,e,r){t.exports={create:r(7536),clone:r(2335),fromValues:r(3390),copy:r(2933),set:r(4578),add:r(4361),subtract:r(6860),multiply:r(3576),divide:r(1373),min:r(2334),max:r(160),scale:r(9288),scaleAndAdd:r(4844),distance:r(4691),squaredDistance:r(7960),length:r(6808),squaredLength:r(483),negate:r(1498),inverse:r(4494),normalize:r(5177),dot:r(3750),lerp:r(2573),random:r(9131),transformMat4:r(5352),transformQuat:r(4041)}},4494:function(t){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},6808:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)}},2573:function(t){t.exports=function(t,e,r,n){var i=e[0],o=e[1],a=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=o+n*(r[1]-o),t[2]=a+n*(r[2]-a),t[3]=s+n*(r[3]-s),t}},160:function(t){t.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}},2334:function(t){t.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}},3576:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}},1498:function(t){t.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},5177:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=r*r+n*n+i*i+o*o;return a>0&&(a=1/Math.sqrt(a),t[0]=r*a,t[1]=n*a,t[2]=i*a,t[3]=o*a),t}},9131:function(t,e,r){var n=r(5177),i=r(9288);t.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),n(t,t),i(t,t,e),t}},9288:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}},4844:function(t){t.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}},4578:function(t){t.exports=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}},7960:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return r*r+n*n+i*i+o*o}},483:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}},6860:function(t){t.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}},5352:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*a,t[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*a,t[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*a,t[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*a,t}},4041:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[0],s=r[1],l=r[2],c=r[3],d=c*n+s*o-l*i,u=c*i+l*n-a*o,h=c*o+a*i-s*n,p=-a*n-s*i-l*o;return t[0]=d*c+p*-a+u*-l-h*-s,t[1]=u*c+p*-s+h*-a-d*-l,t[2]=h*c+p*-l+d*-s-u*-a,t[3]=e[3],t}},1848:function(t,e,r){var n=r(4905),i=r(6468);t.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r0)continue;r=t.slice(0,1).join("")}return N(r),z+=r.length,(S=S.slice(r.length)).length}}function q(){return/[^a-fA-F0-9]/.test(e)?(N(S.join("")),M=l,A):(S.push(e),r=e,A+1)}function Y(){return"."===e||/[eE]/.test(e)?(S.push(e),M=m,r=e,A+1):"x"===e&&1===S.length&&"0"===S[0]?(M=w,S.push(e),r=e,A+1):/[^\d]/.test(e)?(N(S.join("")),M=l,A):(S.push(e),r=e,A+1)}function Z(){return"f"===e&&(S.push(e),r=e,A+=1),/[eE]/.test(e)?(S.push(e),r=e,A+1):("-"!==e&&"+"!==e||!/[eE]/.test(r))&&/[^\d]/.test(e)?(N(S.join("")),M=l,A):(S.push(e),r=e,A+1)}function $(){if(/[^\d\w_]/.test(e)){var t=S.join("");return M=j[t]?b:P[t]?v:g,N(S.join("")),M=l,A}return S.push(e),r=e,A+1}};var n=r(620),i=r(7827),o=r(6852),a=r(7932),s=r(3508),l=999,c=9999,d=0,u=1,h=2,p=3,f=4,m=5,g=6,v=7,b=8,y=9,x=10,w=11,_=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3508:function(t,e,r){var n=r(6852);n=n.slice().filter((function(t){return!/^(gl\_|texture)/.test(t)})),t.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(t){t.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(t,e,r){var n=r(620);t.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(t){t.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(t){t.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(t,e,r){var n=r(5874);t.exports=function(t,e){var r=n(e),i=[];return(i=i.concat(r(t))).concat(r(null))}},3236:function(t){t.exports=function(t){"string"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n>1,d=-7,u=r?i-1:0,h=r?-1:1,p=t[e+u];for(u+=h,o=p&(1<<-d)-1,p>>=-d,d+=s;d>0;o=256*o+t[e+u],u+=h,d-=8);for(a=o&(1<<-d)-1,o>>=-d,d+=n;d>0;a=256*a+t[e+u],u+=h,d-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=c}return(p?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,l,c=8*o-i-1,d=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,f=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=d):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+u>=1?h/l:h*Math.pow(2,1-u))*l>=2&&(a++,l/=2),a+u>=d?(s=0,a=d):a+u>=1?(s=(e*l-1)*Math.pow(2,i),a+=u):(s=e*Math.pow(2,u-1)*Math.pow(2,i),a=0));i>=8;t[r+p]=255&s,p+=f,s/=256,i-=8);for(a=a<0;t[r+p]=255&a,p+=f,a/=256,c-=8);t[r+p-f]|=128*m}},8954:function(t,e,r){"use strict";t.exports=function(t,e){var r=t.length;if(0===r)throw new Error("Must have at least d+1 points");var i=t[0].length;if(r<=i)throw new Error("Must input at least d+1 points");var a=t.slice(0,i+1),s=n.apply(void 0,a);if(0===s)throw new Error("Input not in general position");for(var l=new Array(i+1),d=0;d<=i;++d)l[d]=d;s<0&&(l[0]=1,l[1]=0);var u=new o(l,new Array(i+1),!1),h=u.adjacent,p=new Array(i+2);for(d=0;d<=i;++d){for(var f=l.slice(),m=0;m<=i;++m)m===d&&(f[m]=-1);var g=f[0];f[0]=f[1],f[1]=g;var v=new o(f,new Array(i+1),!0);h[d]=v,p[d]=v}for(p[i+1]=u,d=0;d<=i;++d){f=h[d].vertices;var b=h[d].adjacent;for(m=0;m<=i;++m){var y=f[m];if(y<0)b[m]=u;else for(var x=0;x<=i;++x)h[x].vertices.indexOf(y)<0&&(b[m]=h[x])}}var w=new c(i,a,p),_=!!e;for(d=i+1;d0;)for(var s=(t=a.pop()).adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var d=c.vertices,u=0;u<=r;++u){var h=d[u];i[u]=h<0?e:o[h]}var p=this.orient();if(p>0)return c;c.lastVisited=-n,0===p&&a.push(c)}}return null},d.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,o=this.tuple,a=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[a];t:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,d=0;d<=n;++d)o[d]=i[l[d]];for(s.lastVisited=r,d=0;d<=n;++d){var u=c[d];if(!(u.lastVisited>=r)){var h=o[d];o[d]=t;var p=this.orient();if(o[d]=h,p<0){s=u;continue t}u.boundary?u.lastVisited=-r:u.lastVisited=r}}return}return s},d.addPeaks=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,d=this.simplices,u=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,c.push(e);for(var h=[];u.length>0;){var p=(e=u.pop()).vertices,f=e.adjacent,m=p.indexOf(r);if(!(m<0))for(var g=0;g<=n;++g)if(g!==m){var v=f[g];if(v.boundary&&!(v.lastVisited>=r)){var b=v.vertices;if(v.lastVisited!==-r){for(var y=0,x=0;x<=n;++x)b[x]<0?(y=x,l[x]=t):l[x]=i[b[x]];if(this.orient()>0){b[y]=r,v.boundary=!1,c.push(v),u.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var w=v.adjacent,_=p.slice(),k=f.slice(),A=new o(_,k,!0);d.push(A);var T=w.indexOf(e);if(!(T<0))for(w[T]=A,k[m]=v,_[g]=-1,k[g]=e,f[g]=A,A.flip(),x=0;x<=n;++x){var M=_[x];if(!(M<0||M===r)){for(var S=new Array(n-1),C=0,E=0;E<=n;++E){var L=_[E];L<0||E===x||(S[C++]=L)}h.push(new a(S,A,x))}}}}}for(h.sort(s),g=0;g+1=0?a[l++]=s[d]:c=1&d;if(c===(1&t)){var u=a[0];a[0]=a[1],a[1]=u}e.push(a)}}return e}},3352:function(t,e,r){"use strict";var n=r(2478);function i(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}t.exports=function(t){return t&&0!==t.length?new v(g(t)):new v(null)};var o=i.prototype;function a(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function s(t,e){var r=g(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function l(t,e){var r=t.intervals([]);r.push(e),s(t,r)}function c(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?0:(r.splice(n,1),s(t,r),1)}function d(t,e,r){for(var n=0;n=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function h(t,e){for(var r=0;r>1],o=[],a=[],s=[];for(r=0;r3*(e+1)?l(this,t):this.left.insert(t):this.left=g([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?l(this,t):this.right.insert(t):this.right=g([t]);else{var r=n.ge(this.leftPoints,t,f),i=n.ge(this.rightPoints,t,m);this.leftPoints.splice(r,0,t),this.rightPoints.splice(i,0,t)}},o.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1)?c(this,t):2===(s=this.left.remove(t))?(this.left=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?c(this,t):2===(s=this.right.remove(t))?(this.right=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(1===this.count)return this.leftPoints[0]===t?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var r=this,i=this.left;i.right;)r=i,i=i.right;if(r===this)i.right=this.right;else{var o=this.left,s=this.right;r.count-=i.count,r.right=i.left,i.left=o,i.right=s}a(this,i),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?a(this,this.left):a(this,this.right);return 1}for(o=n.ge(this.leftPoints,t,f);othis.mid?this.right&&(r=this.right.queryPoint(t,e))?r:u(this.rightPoints,t,e):h(this.leftPoints,e);var r},o.queryInterval=function(t,e,r){var n;return tthis.mid&&this.right&&(n=this.right.queryInterval(t,e,r))?n:ethis.mid?u(this.rightPoints,t,r):h(this.leftPoints,r)};var b=v.prototype;b.insert=function(t){this.root?this.root.insert(t):this.root=new i(t[0],null,null,[t],[t])},b.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),0!==e}return!1},b.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},b.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(b,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},7762:function(t){"use strict";t.exports=function(t){for(var e=new Array(t),r=0;r13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},395:function(t){t.exports=function(t,e,r){return t*(1-r)+e*r}},2652:function(t,e,r){var n=r(4335),i=r(6864),o=r(1903),a=r(9921),s=r(7608),l=r(5665),c={length:r(1387),normalize:r(3536),dot:r(244),cross:r(5911)},d=i(),u=i(),h=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],f=[0,0,0];function m(t,e,r,n,i){t[0]=e[0]*n+r[0]*i,t[1]=e[1]*n+r[1]*i,t[2]=e[2]*n+r[2]*i}t.exports=function(t,e,r,i,g,v){if(e||(e=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),g||(g=[0,0,0,1]),v||(v=[0,0,0,1]),!n(d,t))return!1;if(o(u,d),u[3]=0,u[7]=0,u[11]=0,u[15]=1,Math.abs(a(u)<1e-8))return!1;var b,y,x,w,_,k,A,T=d[3],M=d[7],S=d[11],C=d[12],E=d[13],L=d[14],z=d[15];if(0!==T||0!==M||0!==S){if(h[0]=T,h[1]=M,h[2]=S,h[3]=z,!s(u,u))return!1;l(u,u),b=g,x=u,w=(y=h)[0],_=y[1],k=y[2],A=y[3],b[0]=x[0]*w+x[4]*_+x[8]*k+x[12]*A,b[1]=x[1]*w+x[5]*_+x[9]*k+x[13]*A,b[2]=x[2]*w+x[6]*_+x[10]*k+x[14]*A,b[3]=x[3]*w+x[7]*_+x[11]*k+x[15]*A}else g[0]=g[1]=g[2]=0,g[3]=1;if(e[0]=C,e[1]=E,e[2]=L,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(p,d),r[0]=c.length(p[0]),c.normalize(p[0],p[0]),i[0]=c.dot(p[0],p[1]),m(p[1],p[1],p[0],1,-i[0]),r[1]=c.length(p[1]),c.normalize(p[1],p[1]),i[0]/=r[1],i[1]=c.dot(p[0],p[2]),m(p[2],p[2],p[0],1,-i[1]),i[2]=c.dot(p[1],p[2]),m(p[2],p[2],p[1],1,-i[2]),r[2]=c.length(p[2]),c.normalize(p[2],p[2]),i[1]/=r[2],i[2]/=r[2],c.cross(f,p[1],p[2]),c.dot(p[0],f)<0)for(var O=0;O<3;O++)r[O]*=-1,p[O][0]*=-1,p[O][1]*=-1,p[O][2]*=-1;return v[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),v[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),v[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),v[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]>p[1][2]&&(v[0]=-v[0]),p[0][2]>p[2][0]&&(v[1]=-v[1]),p[1][0]>p[0][1]&&(v[2]=-v[2]),!0}},4335:function(t){t.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},7442:function(t,e,r){var n=r(6658),i=r(7182),o=r(2652),a=r(9921),s=r(8648),l=u(),c=u(),d=u();function u(){return{translate:h(),scale:h(1),skew:h(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function h(t){return[t||0,t||0,t||0]}t.exports=function(t,e,r,u){if(0===a(e)||0===a(r))return!1;var h=o(e,l.translate,l.scale,l.skew,l.perspective,l.quaternion),p=o(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!h||!p||(n(d.translate,l.translate,c.translate,u),n(d.skew,l.skew,c.skew,u),n(d.scale,l.scale,c.scale,u),n(d.perspective,l.perspective,c.perspective,u),s(d.quaternion,l.quaternion,c.quaternion,u),i(t,d.translate,d.scale,d.skew,d.perspective,d.quaternion),0))}},7182:function(t,e,r){var n={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)},i=(n.create(),n.create());t.exports=function(t,e,r,o,a,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=a[0],t[7]=a[1],t[11]=a[2],t[15]=a[3],n.identity(i),0!==o[2]&&(i[9]=o[2],n.multiply(t,t,i)),0!==o[1]&&(i[9]=0,i[8]=o[1],n.multiply(t,t,i)),0!==o[0]&&(i[8]=0,i[4]=o[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},4192:function(t,e,r){"use strict";var n=r(2478),i=r(7442),o=r(7608),a=r(5567),s=r(2408),l=r(7089),c=r(6582),d=r(7656),u=(r(2504),r(3536)),h=[0,0,0];function p(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}t.exports=function(t){return new p((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var f=p.prototype;f.recalcMatrix=function(t){var e=this._time,r=n.le(e,t),a=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===e.length-1)for(var l=16*r,c=0;c<16;++c)a[c]=s[l++];else{var d=e[r+1]-e[r],h=(l=16*r,this.prevMatrix),p=!0;for(c=0;c<16;++c)h[c]=s[l++];var f=this.nextMatrix;for(c=0;c<16;++c)f[c]=s[l++],p=p&&h[c]===f[c];if(d<1e-6||p)for(c=0;c<16;++c)a[c]=h[c];else i(a,h,f,(t-e[r])/d)}var m=this.computedUp;m[0]=a[1],m[1]=a[5],m[2]=a[9],u(m,m);var g=this.computedInverse;o(g,a);var v=this.computedEye,b=g[15];v[0]=g[12]/b,v[1]=g[13]/b,v[2]=g[14]/b;var y=this.computedCenter,x=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)y[c]=v[c]-a[2+4*c]*x}},f.idle=function(t){if(!(t1&&n(t[a[d-2]],t[a[d-1]],c)<=0;)d-=1,a.pop();for(a.push(l),d=s.length;d>1&&n(t[s[d-2]],t[s[d-1]],c)>=0;)d-=1,s.pop();s.push(l)}r=new Array(s.length+a.length-2);for(var u=0,h=(i=0,a.length);i0;--p)r[u++]=s[p];return r};var n=r(3250)[3]},351:function(t,e,r){"use strict";t.exports=function(t,e){e||(e=t,t=window);var r=0,i=0,o=0,a={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==a.alt,a.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==a.shift,a.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==a.control,a.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==a.meta,a.meta=!!t.metaKey),e}function c(t,s){var c=n.x(s),d=n.y(s);"buttons"in s&&(t=0|s.buttons),(t!==r||c!==i||d!==o||l(s))&&(r=0|t,i=c||0,o=d||0,e&&e(r,i,o,a))}function d(t){c(0,t)}function u(){(r||i||o||a.shift||a.alt||a.meta||a.control)&&(i=o=0,r=0,a.shift=a.alt=a.control=a.meta=!1,e&&e(0,0,0,a))}function h(t){l(t)&&e&&e(r,i,o,a)}function p(t){0===n.buttons(t)?c(0,t):c(r,t)}function f(t){c(r|n.buttons(t),t)}function m(t){c(r&~n.buttons(t),t)}function g(){s||(s=!0,t.addEventListener("mousemove",p),t.addEventListener("mousedown",f),t.addEventListener("mouseup",m),t.addEventListener("mouseleave",d),t.addEventListener("mouseenter",d),t.addEventListener("mouseout",d),t.addEventListener("mouseover",d),t.addEventListener("blur",u),t.addEventListener("keyup",h),t.addEventListener("keydown",h),t.addEventListener("keypress",h),t!==window&&(window.addEventListener("blur",u),window.addEventListener("keyup",h),window.addEventListener("keydown",h),window.addEventListener("keypress",h)))}g();var v={element:t};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(e){e?g():s&&(s=!1,t.removeEventListener("mousemove",p),t.removeEventListener("mousedown",f),t.removeEventListener("mouseup",m),t.removeEventListener("mouseleave",d),t.removeEventListener("mouseenter",d),t.removeEventListener("mouseout",d),t.removeEventListener("mouseover",d),t.removeEventListener("blur",u),t.removeEventListener("keyup",h),t.removeEventListener("keydown",h),t.removeEventListener("keypress",h),t!==window&&(window.removeEventListener("blur",u),window.removeEventListener("keyup",h),window.removeEventListener("keydown",h),window.removeEventListener("keypress",h)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return o},enumerable:!0},mods:{get:function(){return a},enumerable:!0}}),v};var n=r(4687)},24:function(t){var e={left:0,top:0};t.exports=function(t,r,n){r=r||t.currentTarget||t.srcElement,Array.isArray(n)||(n=[0,0]);var i,o=t.clientX||0,a=t.clientY||0,s=(i=r)===window||i===document||i===document.body?e:i.getBoundingClientRect();return n[0]=o-s.left,n[1]=a-s.top,n}},4687:function(t,e){"use strict";function r(t){return t.target||t.srcElement||window}e.buttons=function(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1< 0"),"function"!=typeof t.vertex&&e("Must specify vertex creation function"),"function"!=typeof t.cell&&e("Must specify cell creation function"),"function"!=typeof t.phase&&e("Must specify phase function");for(var a=t.getters||[],s=new Array(o),l=0;l=0?s[l]=!0:s[l]=!1;return function(t,e,r,o,a,s){var l=[s,a].join(",");return(0,i[l])(t,e,r,n.mallocUint32,n.freeUint32)}(t.vertex,t.cell,t.phase,0,r,s)};var i={"false,0,1":function(t,e,r,n,i){return function(o,a,s,l){var c,d=0|o.shape[0],u=0|o.shape[1],h=o.data,p=0|o.offset,f=0|o.stride[0],m=0|o.stride[1],g=p,v=0|-f,b=0,y=0|-m,x=0,w=-f-m|0,_=0,k=0|f,A=m-f*d|0,T=0,M=0,S=0,C=2*d|0,E=n(C),L=n(C),z=0,O=0,D=-1,I=-1,F=0,R=0|-d,P=0|d,j=0,N=-d-1|0,B=d-1|0,U=0,G=0,V=0;for(T=0;T0){if(M=1,E[z++]=r(h[g],a,s,l),g+=k,d>0)for(T=1,c=h[g],O=E[z]=r(c,a,s,l),F=E[z+D],j=E[z+R],U=E[z+N],O===F&&O===j&&O===U||(b=h[g+v],x=h[g+y],_=h[g+w],t(T,M,c,b,x,_,O,F,j,U,a,s,l),G=L[z]=S++),z+=1,g+=k,T=2;T0)for(T=1,c=h[g],O=E[z]=r(c,a,s,l),F=E[z+D],j=E[z+R],U=E[z+N],O===F&&O===j&&O===U||(b=h[g+v],x=h[g+y],_=h[g+w],t(T,M,c,b,x,_,O,F,j,U,a,s,l),G=L[z]=S++,U!==j&&e(L[z+R],G,x,_,j,U,a,s,l)),z+=1,g+=k,T=2;T0){if(T=1,E[z++]=r(h[g],a,s,l),g+=k,u>0)for(M=1,c=h[g],O=E[z]=r(c,a,s,l),j=E[z+R],F=E[z+D],U=E[z+N],O===j&&O===F&&O===U||(b=h[g+v],x=h[g+y],_=h[g+w],t(T,M,c,b,x,_,O,j,F,U,a,s,l),G=L[z]=S++),z+=1,g+=k,M=2;M0)for(M=1,c=h[g],O=E[z]=r(c,a,s,l),j=E[z+R],F=E[z+D],U=E[z+N],O===j&&O===F&&O===U||(b=h[g+v],x=h[g+y],_=h[g+w],t(T,M,c,b,x,_,O,j,F,U,a,s,l),G=L[z]=S++,U!==j&&e(L[z+R],G,_,b,U,j,a,s,l)),z+=1,g+=k,M=2;M2&&o[1]>2&&n(i.pick(-1,-1).lo(1,1).hi(o[0]-2,o[1]-2),t.pick(-1,-1,0).lo(1,1).hi(o[0]-2,o[1]-2),t.pick(-1,-1,1).lo(1,1).hi(o[0]-2,o[1]-2)),o[1]>2&&(r(i.pick(0,-1).lo(1).hi(o[1]-2),t.pick(0,-1,1).lo(1).hi(o[1]-2)),e(t.pick(0,-1,0).lo(1).hi(o[1]-2))),o[1]>2&&(r(i.pick(o[0]-1,-1).lo(1).hi(o[1]-2),t.pick(o[0]-1,-1,1).lo(1).hi(o[1]-2)),e(t.pick(o[0]-1,-1,0).lo(1).hi(o[1]-2))),o[0]>2&&(r(i.pick(-1,0).lo(1).hi(o[0]-2),t.pick(-1,0,0).lo(1).hi(o[0]-2)),e(t.pick(-1,0,1).lo(1).hi(o[0]-2))),o[0]>2&&(r(i.pick(-1,o[1]-1).lo(1).hi(o[0]-2),t.pick(-1,o[1]-1,0).lo(1).hi(o[0]-2)),e(t.pick(-1,o[1]-1,1).lo(1).hi(o[0]-2))),t.set(0,0,0,0),t.set(0,0,1,0),t.set(o[0]-1,0,0,0),t.set(o[0]-1,0,1,0),t.set(0,o[1]-1,0,0),t.set(0,o[1]-1,1,0),t.set(o[0]-1,o[1]-1,0,0),t.set(o[0]-1,o[1]-1,1,0),t}}t.exports=function(t,e,r){return Array.isArray(r)||(r=n(e.dimension,"string"==typeof r?r:"clamp")),0===e.size?t:0===e.dimension?(t.set(0),t):function(t){var e=t.join();if(o=d[e])return o;for(var r=t.length,n=[u,h],i=1;i<=r;++i)n.push(p(i));var o=f.apply(void 0,n);return d[e]=o,o}(r)(t,e)}},4317:function(t){"use strict";function e(t,e){var r=Math.floor(e),n=e-r,i=0<=r&&r0;){y<64?(l=y,y=0):(l=64,y-=64);for(var x=0|t[1];x>0;){x<64?(c=x,x=0):(c=64,x-=64),n=v+y*u+x*h,a=b+y*f+x*m;var w=0,_=0,k=0,A=p,T=u-d*p,M=h-l*u,S=g,C=f-d*g,E=m-l*f;for(k=0;k0;){m<64?(l=m,m=0):(l=64,m-=64);for(var g=0|t[0];g>0;){g<64?(s=g,g=0):(s=64,g-=64),n=p+m*d+g*c,a=f+m*h+g*u;var v=0,b=0,y=d,x=c-l*d,w=h,_=u-l*h;for(b=0;b0;){b<64?(c=b,b=0):(c=64,b-=64);for(var y=0|t[0];y>0;){y<64?(s=y,y=0):(s=64,y-=64);for(var x=0|t[1];x>0;){x<64?(l=x,x=0):(l=64,x-=64),n=g+b*h+y*d+x*u,a=v+b*m+y*p+x*f;var w=0,_=0,k=0,A=h,T=d-c*h,M=u-s*d,S=m,C=p-c*m,E=f-s*p;for(k=0;kr;){v=0,b=m-a;e:for(g=0;gx)break e;b+=u,v+=h}for(v=m,b=m-a,g=0;g>1,H=V-B,W=V+B,q=U,Y=H,Z=V,$=W,X=G,J=i+1,K=o-1,Q=!0,tt=0,et=0,rt=0,nt=u,it=e(nt),ot=e(nt);T=l*q,M=l*Y,N=s;t:for(A=0;A0){g=q,q=Y,Y=g;break t}if(rt<0)break t;N+=p}T=l*$,M=l*X,N=s;t:for(A=0;A0){g=$,$=X,X=g;break t}if(rt<0)break t;N+=p}T=l*q,M=l*Z,N=s;t:for(A=0;A0){g=q,q=Z,Z=g;break t}if(rt<0)break t;N+=p}T=l*Y,M=l*Z,N=s;t:for(A=0;A0){g=Y,Y=Z,Z=g;break t}if(rt<0)break t;N+=p}T=l*q,M=l*$,N=s;t:for(A=0;A0){g=q,q=$,$=g;break t}if(rt<0)break t;N+=p}T=l*Z,M=l*$,N=s;t:for(A=0;A0){g=Z,Z=$,$=g;break t}if(rt<0)break t;N+=p}T=l*Y,M=l*X,N=s;t:for(A=0;A0){g=Y,Y=X,X=g;break t}if(rt<0)break t;N+=p}T=l*Y,M=l*Z,N=s;t:for(A=0;A0){g=Y,Y=Z,Z=g;break t}if(rt<0)break t;N+=p}T=l*$,M=l*X,N=s;t:for(A=0;A0){g=$,$=X,X=g;break t}if(rt<0)break t;N+=p}for(T=l*q,M=l*Y,S=l*Z,C=l*$,E=l*X,L=l*U,z=l*V,O=l*G,j=0,N=s,A=0;A0)){if(rt<0){for(T=l*x,M=l*J,S=l*K,N=s,A=0;A0)for(;;){for(w=s+K*l,j=0,A=0;A0)){for(w=s+K*l,j=0,A=0;AG){t:for(;;){for(w=s+J*l,j=0,N=s,A=0;A1&&n?s(r,n[0],n[1]):s(r)}(t,e,l);return n(l,c)}},446:function(t,e,r){"use strict";var n=r(7640),i={};t.exports=function(t){var e=t.order,r=t.dtype,o=[e,r].join(":"),a=i[o];return a||(i[o]=a=n(e,r)),a(t),t}},9618:function(t,e,r){var n=r(7163),i="undefined"!=typeof Float64Array;function o(t,e){return t[0]-e[0]}function a(){var t,e=this.stride,r=new Array(e.length);for(t=0;t=0&&(e+=o*(r=0|t),i-=r),new n(this.data,i,o,e)},i.step=function(t){var e=this.shape[0],r=this.stride[0],i=this.offset,o=0,a=Math.ceil;return"number"==typeof t&&((o=0|t)<0?(i+=r*(e-1),e=a(-e/o)):e=a(e/o),r*=o),new n(this.data,e,r,i)},i.transpose=function(t){t=void 0===t?0:0|t;var e=this.shape,r=this.stride;return new n(this.data,e[t],r[t],this.offset)},i.pick=function(t){var r=[],n=[],i=this.offset;return"number"==typeof t&&t>=0?i=i+this.stride[0]*t|0:(r.push(this.shape[0]),n.push(this.stride[0])),(0,e[r.length+1])(this.data,r,n,i)},function(t,e,r,i){return new n(t,e[0],r[0],i)}},2:function(t,e,r){function n(t,e,r,n,i,o){this.data=t,this.shape=[e,r],this.stride=[n,i],this.offset=0|o}var i=n.prototype;return i.dtype=t,i.dimension=2,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(i,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),i.set=function(e,r,n){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r,n):this.data[this.offset+this.stride[0]*e+this.stride[1]*r]=n},i.get=function(e,r){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r):this.data[this.offset+this.stride[0]*e+this.stride[1]*r]},i.index=function(t,e){return this.offset+this.stride[0]*t+this.stride[1]*e},i.hi=function(t,e){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,this.stride[0],this.stride[1],this.offset)},i.lo=function(t,e){var r=this.offset,i=0,o=this.shape[0],a=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"==typeof t&&t>=0&&(r+=s*(i=0|t),o-=i),"number"==typeof e&&e>=0&&(r+=l*(i=0|e),a-=i),new n(this.data,o,a,s,l,r)},i.step=function(t,e){var r=this.shape[0],i=this.shape[1],o=this.stride[0],a=this.stride[1],s=this.offset,l=0,c=Math.ceil;return"number"==typeof t&&((l=0|t)<0?(s+=o*(r-1),r=c(-r/l)):r=c(r/l),o*=l),"number"==typeof e&&((l=0|e)<0?(s+=a*(i-1),i=c(-i/l)):i=c(i/l),a*=l),new n(this.data,r,i,o,a,s)},i.transpose=function(t,e){t=void 0===t?0:0|t,e=void 0===e?1:0|e;var r=this.shape,i=this.stride;return new n(this.data,r[t],r[e],i[t],i[e],this.offset)},i.pick=function(t,r){var n=[],i=[],o=this.offset;return"number"==typeof t&&t>=0?o=o+this.stride[0]*t|0:(n.push(this.shape[0]),i.push(this.stride[0])),"number"==typeof r&&r>=0?o=o+this.stride[1]*r|0:(n.push(this.shape[1]),i.push(this.stride[1])),(0,e[n.length+1])(this.data,n,i,o)},function(t,e,r,i){return new n(t,e[0],e[1],r[0],r[1],i)}},3:function(t,e,r){function n(t,e,r,n,i,o,a,s){this.data=t,this.shape=[e,r,n],this.stride=[i,o,a],this.offset=0|s}var i=n.prototype;return i.dtype=t,i.dimension=3,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(i,"order",{get:function(){var t=Math.abs(this.stride[0]),e=Math.abs(this.stride[1]),r=Math.abs(this.stride[2]);return t>e?e>r?[2,1,0]:t>r?[1,2,0]:[1,0,2]:t>r?[2,0,1]:r>e?[0,1,2]:[0,2,1]}}),i.set=function(e,r,n,i){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n,i):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n]=i},i.get=function(e,r,n){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n]},i.index=function(t,e,r){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r},i.hi=function(t,e,r){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,this.stride[0],this.stride[1],this.stride[2],this.offset)},i.lo=function(t,e,r){var i=this.offset,o=0,a=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.stride[0],d=this.stride[1],u=this.stride[2];return"number"==typeof t&&t>=0&&(i+=c*(o=0|t),a-=o),"number"==typeof e&&e>=0&&(i+=d*(o=0|e),s-=o),"number"==typeof r&&r>=0&&(i+=u*(o=0|r),l-=o),new n(this.data,a,s,l,c,d,u,i)},i.step=function(t,e,r){var i=this.shape[0],o=this.shape[1],a=this.shape[2],s=this.stride[0],l=this.stride[1],c=this.stride[2],d=this.offset,u=0,h=Math.ceil;return"number"==typeof t&&((u=0|t)<0?(d+=s*(i-1),i=h(-i/u)):i=h(i/u),s*=u),"number"==typeof e&&((u=0|e)<0?(d+=l*(o-1),o=h(-o/u)):o=h(o/u),l*=u),"number"==typeof r&&((u=0|r)<0?(d+=c*(a-1),a=h(-a/u)):a=h(a/u),c*=u),new n(this.data,i,o,a,s,l,c,d)},i.transpose=function(t,e,r){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r;var i=this.shape,o=this.stride;return new n(this.data,i[t],i[e],i[r],o[t],o[e],o[r],this.offset)},i.pick=function(t,r,n){var i=[],o=[],a=this.offset;return"number"==typeof t&&t>=0?a=a+this.stride[0]*t|0:(i.push(this.shape[0]),o.push(this.stride[0])),"number"==typeof r&&r>=0?a=a+this.stride[1]*r|0:(i.push(this.shape[1]),o.push(this.stride[1])),"number"==typeof n&&n>=0?a=a+this.stride[2]*n|0:(i.push(this.shape[2]),o.push(this.stride[2])),(0,e[i.length+1])(this.data,i,o,a)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],r[0],r[1],r[2],i)}},4:function(t,e,r){function n(t,e,r,n,i,o,a,s,l,c){this.data=t,this.shape=[e,r,n,i],this.stride=[o,a,s,l],this.offset=0|c}var i=n.prototype;return i.dtype=t,i.dimension=4,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(e,r,n,i,o){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i,o):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]=o},i.get=function(e,r,n,i){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]},i.index=function(t,e,r,n){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r+this.stride[3]*n},i.hi=function(t,e,r,i){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},i.lo=function(t,e,r,i){var o=this.offset,a=0,s=this.shape[0],l=this.shape[1],c=this.shape[2],d=this.shape[3],u=this.stride[0],h=this.stride[1],p=this.stride[2],f=this.stride[3];return"number"==typeof t&&t>=0&&(o+=u*(a=0|t),s-=a),"number"==typeof e&&e>=0&&(o+=h*(a=0|e),l-=a),"number"==typeof r&&r>=0&&(o+=p*(a=0|r),c-=a),"number"==typeof i&&i>=0&&(o+=f*(a=0|i),d-=a),new n(this.data,s,l,c,d,u,h,p,f,o)},i.step=function(t,e,r,i){var o=this.shape[0],a=this.shape[1],s=this.shape[2],l=this.shape[3],c=this.stride[0],d=this.stride[1],u=this.stride[2],h=this.stride[3],p=this.offset,f=0,m=Math.ceil;return"number"==typeof t&&((f=0|t)<0?(p+=c*(o-1),o=m(-o/f)):o=m(o/f),c*=f),"number"==typeof e&&((f=0|e)<0?(p+=d*(a-1),a=m(-a/f)):a=m(a/f),d*=f),"number"==typeof r&&((f=0|r)<0?(p+=u*(s-1),s=m(-s/f)):s=m(s/f),u*=f),"number"==typeof i&&((f=0|i)<0?(p+=h*(l-1),l=m(-l/f)):l=m(l/f),h*=f),new n(this.data,o,a,s,l,c,d,u,h,p)},i.transpose=function(t,e,r,i){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r,i=void 0===i?3:0|i;var o=this.shape,a=this.stride;return new n(this.data,o[t],o[e],o[r],o[i],a[t],a[e],a[r],a[i],this.offset)},i.pick=function(t,r,n,i){var o=[],a=[],s=this.offset;return"number"==typeof t&&t>=0?s=s+this.stride[0]*t|0:(o.push(this.shape[0]),a.push(this.stride[0])),"number"==typeof r&&r>=0?s=s+this.stride[1]*r|0:(o.push(this.shape[1]),a.push(this.stride[1])),"number"==typeof n&&n>=0?s=s+this.stride[2]*n|0:(o.push(this.shape[2]),a.push(this.stride[2])),"number"==typeof i&&i>=0?s=s+this.stride[3]*i|0:(o.push(this.shape[3]),a.push(this.stride[3])),(0,e[o.length+1])(this.data,o,a,s)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],e[3],r[0],r[1],r[2],r[3],i)}},5:function(t,e,r){function n(t,e,r,n,i,o,a,s,l,c,d,u){this.data=t,this.shape=[e,r,n,i,o],this.stride=[a,s,l,c,d],this.offset=0|u}var i=n.prototype;return i.dtype=t,i.dimension=5,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(e,r,n,i,o,a){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o,a):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o]=a},i.get=function(e,r,n,i,o){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o]},i.index=function(t,e,r,n,i){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r+this.stride[3]*n+this.stride[4]*i},i.hi=function(t,e,r,i,o){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,"number"!=typeof o||o<0?this.shape[4]:0|o,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},i.lo=function(t,e,r,i,o){var a=this.offset,s=0,l=this.shape[0],c=this.shape[1],d=this.shape[2],u=this.shape[3],h=this.shape[4],p=this.stride[0],f=this.stride[1],m=this.stride[2],g=this.stride[3],v=this.stride[4];return"number"==typeof t&&t>=0&&(a+=p*(s=0|t),l-=s),"number"==typeof e&&e>=0&&(a+=f*(s=0|e),c-=s),"number"==typeof r&&r>=0&&(a+=m*(s=0|r),d-=s),"number"==typeof i&&i>=0&&(a+=g*(s=0|i),u-=s),"number"==typeof o&&o>=0&&(a+=v*(s=0|o),h-=s),new n(this.data,l,c,d,u,h,p,f,m,g,v,a)},i.step=function(t,e,r,i,o){var a=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.shape[3],d=this.shape[4],u=this.stride[0],h=this.stride[1],p=this.stride[2],f=this.stride[3],m=this.stride[4],g=this.offset,v=0,b=Math.ceil;return"number"==typeof t&&((v=0|t)<0?(g+=u*(a-1),a=b(-a/v)):a=b(a/v),u*=v),"number"==typeof e&&((v=0|e)<0?(g+=h*(s-1),s=b(-s/v)):s=b(s/v),h*=v),"number"==typeof r&&((v=0|r)<0?(g+=p*(l-1),l=b(-l/v)):l=b(l/v),p*=v),"number"==typeof i&&((v=0|i)<0?(g+=f*(c-1),c=b(-c/v)):c=b(c/v),f*=v),"number"==typeof o&&((v=0|o)<0?(g+=m*(d-1),d=b(-d/v)):d=b(d/v),m*=v),new n(this.data,a,s,l,c,d,u,h,p,f,m,g)},i.transpose=function(t,e,r,i,o){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r,i=void 0===i?3:0|i,o=void 0===o?4:0|o;var a=this.shape,s=this.stride;return new n(this.data,a[t],a[e],a[r],a[i],a[o],s[t],s[e],s[r],s[i],s[o],this.offset)},i.pick=function(t,r,n,i,o){var a=[],s=[],l=this.offset;return"number"==typeof t&&t>=0?l=l+this.stride[0]*t|0:(a.push(this.shape[0]),s.push(this.stride[0])),"number"==typeof r&&r>=0?l=l+this.stride[1]*r|0:(a.push(this.shape[1]),s.push(this.stride[1])),"number"==typeof n&&n>=0?l=l+this.stride[2]*n|0:(a.push(this.shape[2]),s.push(this.stride[2])),"number"==typeof i&&i>=0?l=l+this.stride[3]*i|0:(a.push(this.shape[3]),s.push(this.stride[3])),"number"==typeof o&&o>=0?l=l+this.stride[4]*o|0:(a.push(this.shape[4]),s.push(this.stride[4])),(0,e[a.length+1])(this.data,a,s,l)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],e[3],e[4],r[0],r[1],r[2],r[3],r[4],i)}}};function l(t,e){var r=-1===e?"T":String(e),n=s[r];return-1===e?n(t):0===e?n(t,c[t][0]):n(t,c[t],a)}var c={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};t.exports=function(t,e,r,o){if(void 0===t)return(0,c.array[0])([]);"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var a=e.length;if(void 0===r){r=new Array(a);for(var s=a-1,d=1;s>=0;--s)r[s]=d,d*=e[s]}if(void 0===o)for(o=0,s=0;s>>0;t.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e<0?-i:i;var r=n.hi(t),a=n.lo(t);return e>t==t>0?a===o?(r+=1,a=0):a+=1:0===a?(a=o,r-=1):a-=1,n.pack(a,r)}},8406:function(t,e){e.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),o=void 0===r?1e-6:r,a=0;ao){var x=i[c],w=1/Math.sqrt(g*b);for(y=0;y<3;++y){var _=(y+1)%3,k=(y+2)%3;x[y]+=w*(v[_]*m[k]-v[k]*m[_])}}}for(a=0;ao)for(w=1/Math.sqrt(A),y=0;y<3;++y)x[y]*=w;else for(y=0;y<3;++y)x[y]=0}return i},e.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),o=void 0===r?1e-6:r,a=0;ao?1/Math.sqrt(p):0,c=0;c<3;++c)h[c]*=p;i[a]=h}return i}},4081:function(t){"use strict";t.exports=function(t,e,r,n,i,o,a,s,l,c){var d=e+o+c;if(u>0){var u=Math.sqrt(d+1);t[0]=.5*(a-l)/u,t[1]=.5*(s-n)/u,t[2]=.5*(r-o)/u,t[3]=.5*u}else{var h=Math.max(e,o,c);u=Math.sqrt(2*h-d+1),e>=h?(t[0]=.5*u,t[1]=.5*(i+r)/u,t[2]=.5*(s+n)/u,t[3]=.5*(a-l)/u):o>=h?(t[0]=.5*(r+i)/u,t[1]=.5*u,t[2]=.5*(l+a)/u,t[3]=.5*(s-n)/u):(t[0]=.5*(n+s)/u,t[1]=.5*(a+l)/u,t[2]=.5*u,t[3]=.5*(r-i)/u)}return t}},9977:function(t,e,r){"use strict";t.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),d(r=[].slice.call(r,0,4),r);var i=new u(r,e,Math.log(n));return i.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&i.lookAt(0,t.eye,t.center,t.up),i};var n=r(9215),i=r(6582),o=r(7399),a=r(7608),s=r(4081);function l(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function c(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function d(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=c(r,n,i,o);a>1e-6?(t[0]=r/a,t[1]=n/a,t[2]=i/a,t[3]=o/a):(t[0]=t[1]=t[2]=0,t[3]=1)}function u(t,e,r){this.radius=n([r]),this.center=n(e),this.rotation=n(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var h=u.prototype;h.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},h.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;d(e,e);var r=this.computedMatrix;o(r,e);var n=this.computedCenter,i=this.computedEye,a=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],a[0]=r[1],a[1]=r[5],a[2]=r[9];for(var l=0;l<3;++l){for(var c=0,u=0;u<3;++u)c+=r[l+4*u]*i[u];r[12+l]=-c}},h.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r},h.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},h.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},h.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,o=i[1],a=i[5],s=i[9],c=l(o,a,s);o/=c,a/=c,s/=c;var d=i[0],u=i[4],h=i[8],p=d*o+u*a+h*s,f=l(d-=o*p,u-=a*p,h-=s*p);d/=f,u/=f,h/=f;var m=i[2],g=i[6],v=i[10],b=m*o+g*a+v*s,y=m*d+g*u+v*h,x=l(m-=b*o+y*d,g-=b*a+y*u,v-=b*s+y*h);m/=x,g/=x,v/=x;var w=d*e+o*r,_=u*e+a*r,k=h*e+s*r;this.center.move(t,w,_,k);var A=Math.exp(this.computedRadius[0]);A=Math.max(1e-4,A+n),this.radius.set(t,Math.log(A))},h.rotate=function(t,e,r,n){this.recalcMatrix(t),e=e||0,r=r||0;var i=this.computedMatrix,o=i[0],a=i[4],s=i[8],d=i[1],u=i[5],h=i[9],p=i[2],f=i[6],m=i[10],g=e*o+r*d,v=e*a+r*u,b=e*s+r*h,y=-(f*b-m*v),x=-(m*g-p*b),w=-(p*v-f*g),_=Math.sqrt(Math.max(0,1-Math.pow(y,2)-Math.pow(x,2)-Math.pow(w,2))),k=c(y,x,w,_);k>1e-6?(y/=k,x/=k,w/=k,_/=k):(y=x=w=0,_=1);var A=this.computedRotation,T=A[0],M=A[1],S=A[2],C=A[3],E=T*_+C*y+M*w-S*x,L=M*_+C*x+S*y-T*w,z=S*_+C*w+T*x-M*y,O=C*_-T*y-M*x-S*w;if(n){y=p,x=f,w=m;var D=Math.sin(n)/l(y,x,w);y*=D,x*=D,w*=D,O=O*(_=Math.cos(e))-(E=E*_+O*y+L*w-z*x)*y-(L=L*_+O*x+z*y-E*w)*x-(z=z*_+O*w+E*x-L*y)*w}var I=c(E,L,z,O);I>1e-6?(E/=I,L/=I,z/=I,O/=I):(E=L=z=0,O=1),this.rotation.set(t,E,L,z,O)},h.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var o=this.computedMatrix;i(o,e,r,n);var a=this.computedRotation;s(a,o[0],o[1],o[2],o[4],o[5],o[6],o[8],o[9],o[10]),d(a,a),this.rotation.set(t,a[0],a[1],a[2],a[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-e[c],2);this.radius.set(t,.5*Math.log(Math.max(l,1e-6))),this.center.set(t,r[0],r[1],r[2])},h.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},h.setMatrix=function(t,e){var r=this.computedRotation;s(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),d(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;a(n,e);var i=n[15];if(Math.abs(i)>1e-6){var o=n[12]/i,l=n[13]/i,c=n[14]/i;this.recalcMatrix(t);var u=Math.exp(this.computedRadius[0]);this.center.set(t,o-n[2]*u,l-n[6]*u,c-n[10]*u),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},h.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},h.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},h.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},h.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},h.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},1371:function(t,e,r){"use strict";var n=r(3233);t.exports=function(t,e,r){return n(r=void 0!==r?r+"":" ",e)+t}},3202:function(t){t.exports=function(t,e){e||(e=[0,""]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},3088:function(t,e,r){"use strict";t.exports=function(t,e){for(var r=0|e.length,i=t.length,o=[new Array(r),new Array(r)],a=0;a0){a=o[d][r][0],l=d;break}s=a[1^l];for(var u=0;u<2;++u)for(var h=o[u][r],p=0;p0&&(a=f,s=m,l=u)}return i||a&&c(a,l),s}function u(t,r){var i=o[r][t][0],a=[t];c(i,r);for(var s=i[1^r];;){for(;s!==t;)a.push(s),s=d(a[a.length-2],s,!1);if(o[0][t].length+o[1][t].length===0)break;var l=a[a.length-1],u=t,h=a[1],p=d(l,u,!0);if(n(e[l],e[u],e[h],e[p])<0)break;a.push(t),s=d(l,u)}return a}function h(t,e){return e[1]===e[e.length-1]}for(a=0;a0;){o[0][a].length;var m=u(a,p);h(0,m)?f.push.apply(f,m):(f.length>0&&l.push(f),f=m)}f.length>0&&l.push(f)}return l};var n=r(3140)},5609:function(t,e,r){"use strict";t.exports=function(t,e){for(var r=n(t,e.length),i=new Array(e.length),o=new Array(e.length),a=[],s=0;s0;){i[p=a.pop()]=!1;var c=r[p];for(s=0;s0}))).length,g=new Array(m),v=new Array(m);for(p=0;p0;){var j=R.pop(),N=C[j];l(N,(function(t,e){return t-e}));var B,U=N.length,G=P[j];for(0===G&&(B=[V=f[j]]),p=0;p=0||(P[H]=1^G,R.push(H),0===G&&(F(V=f[H])||(V.reverse(),B.push(V))))}0===G&&r.push(B)}return r};var n=r(3134),i=r(3088),o=r(5085),a=r(5250),s=r(8210),l=r(1682),c=r(5609);function d(t,e){for(var r=new Array(t),n=0;n0&&e[i]===r[0]))return 1;o=t[i-1]}for(var s=1;o;){var l=o.key,c=n(r,l[0],l[1]);if(l[0][0]0))return 0;s=-1,o=o.right}else if(c>0)o=o.left;else{if(!(c<0))return 0;s=1,o=o.right}}return s}}(v.slabs,v.coordinates);return 0===o.length?b:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(l(o),b)};var n=r(3250)[3],i=r(4209),o=r(3352),a=r(2478);function s(){return!0}function l(t){for(var e={},r=0;r=c?(A=1,b=c+2*h+f):b=h*(A=-h/c)+f):(A=0,p>=0?(T=0,b=f):-p>=u?(T=1,b=u+2*p+f):b=p*(T=-p/u)+f);else if(T<0)T=0,h>=0?(A=0,b=f):-h>=c?(A=1,b=c+2*h+f):b=h*(A=-h/c)+f;else{var M=1/k;b=(A*=M)*(c*A+d*(T*=M)+2*h)+T*(d*A+u*T+2*p)+f}else A<0?(x=u+p)>(y=d+h)?(w=x-y)>=(_=c-2*d+u)?(A=1,T=0,b=c+2*h+f):b=(A=w/_)*(c*A+d*(T=1-A)+2*h)+T*(d*A+u*T+2*p)+f:(A=0,x<=0?(T=1,b=u+2*p+f):p>=0?(T=0,b=f):b=p*(T=-p/u)+f):T<0?(x=c+h)>(y=d+p)?(w=x-y)>=(_=c-2*d+u)?(T=1,A=0,b=u+2*p+f):b=(A=1-(T=w/_))*(c*A+d*T+2*h)+T*(d*A+u*T+2*p)+f:(T=0,x<=0?(A=1,b=c+2*h+f):h>=0?(A=0,b=f):b=h*(A=-h/c)+f):(w=u+p-d-h)<=0?(A=0,T=1,b=u+2*p+f):w>=(_=c-2*d+u)?(A=1,T=0,b=c+2*h+f):b=(A=w/_)*(c*A+d*(T=1-A)+2*h)+T*(d*A+u*T+2*p)+f;var S=1-A-T;for(l=0;l0){var c=t[r-1];if(0===n(s,c)&&o(c)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},3233:function(t){"use strict";var e,r="";t.exports=function(t,n){if("string"!=typeof t)throw new TypeError("expected a string");if(1===n)return t;if(2===n)return t+t;var i=t.length*n;if(e!==t||void 0===e)e=t,r="";else if(r.length>=i)return r.substr(0,i);for(;i>r.length&&n>1;)1&n&&(r+=t),n>>=1,t+=t;return r=(r+=t).substr(0,i)}},3025:function(t,e,r){t.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(t){"use strict";t.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,i=e-2;i>=0;--i){var o=r;(l=(s=t[i])-((r=o+s)-o))&&(t[--n]=r,r=l)}var a=0;for(i=n;i0){if(o<=0)return a;n=i+o}else{if(!(i<0))return a;if(o>=0)return a;n=-(i+o)}var s=33306690738754716e-32*n;return a>=s||a<=-s?a:u(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],o=e[0]-n[0],a=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],c=r[1]-n[1],d=t[2]-n[2],u=e[2]-n[2],p=r[2]-n[2],f=o*c,m=a*l,g=a*s,v=i*c,b=i*l,y=o*s,x=d*(f-m)+u*(g-v)+p*(b-y),w=7771561172376103e-31*((Math.abs(f)+Math.abs(m))*Math.abs(d)+(Math.abs(g)+Math.abs(v))*Math.abs(u)+(Math.abs(b)+Math.abs(y))*Math.abs(p));return x>w||-x>w?x:h(t,e,r,n)}];function f(t){var e=p[t.length];return e||(e=p[t.length]=d(t.length)),e.apply(void 0,t)}function m(t,e,r,n,i,o,a){return function(e,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return n(e,r);case 3:return i(e,r,s);case 4:return o(e,r,s,l);case 5:return a(e,r,s,l,c)}for(var d=new Array(arguments.length),u=0;u0&&a>0||o<0&&a<0)return!1;var s=n(r,t,e),l=n(i,t,e);return!(s>0&&l>0||s<0&&l<0)&&(0!==o||0!==a||0!==s||0!==l||function(t,e,r,n){for(var i=0;i<2;++i){var o=t[i],a=e[i],s=Math.min(o,a),l=Math.max(o,a),c=r[i],d=n[i],u=Math.min(c,d);if(Math.max(c,d)=n?(i=u,(l+=1)=n?(i=u,(l+=1)>1,c=e[2*l+1];if(c===o)return l;o>1,c=e[2*l+1];if(c===o)return l;o>1,c=e[2*l+1];if(c===o)return l;o0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},2014:function(t,e,r){"use strict";var n=r(3105),i=r(4623);function o(t,e){var r=t.length,n=t.length-e.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return(s=t[0]+t[1]-e[0]-e[1])||i(t[0],t[1])-i(e[0],e[1]);case 3:var o=t[0]+t[1],a=e[0]+e[1];if(s=o+t[2]-(a+e[2]))return s;var s,l=i(t[0],t[1]),c=i(e[0],e[1]);return(s=i(l,t[2])-i(c,e[2]))||i(l+t[2],o)-i(c+e[2],a);default:var d=t.slice(0);d.sort();var u=e.slice(0);u.sort();for(var h=0;h>1,s=o(t[a],e);s<=0?(0===s&&(i=a),r=a+1):s>0&&(n=a-1)}return i}function d(t,e){for(var r=new Array(t.length),i=0,a=r.length;i=t.length||0!==o(t[g],s)););}return r}function u(t,e){if(e<0)return[];for(var r=[],i=(1<>>d&1&&c.push(i[d]);e.push(c)}return s(e)},e.skeleton=u,e.boundary=function(t){for(var e=[],r=0,n=t.length;r>1:(t>>1)-1}function y(t){for(var e=v(t);;){var r=e,n=2*t+1,i=2*(t+1),o=t;if(n0;){var r=b(t);if(!(r>=0&&e0){var t=A[0];return g(0,M-1),M-=1,y(0),t}return-1}function _(t,e){var r=A[t];return c[r]===e?t:(c[r]=-1/0,x(t),w(),c[r]=e,x((M+=1)-1))}function k(t){if(!d[t]){d[t]=!0;var e=s[t],r=l[t];s[r]>=0&&(s[r]=e),l[e]>=0&&(l[e]=r),T[e]>=0&&_(T[e],m(e)),T[r]>=0&&_(T[r],m(r))}}var A=[],T=new Array(o);for(u=0;u>1;u>=0;--u)y(u);for(;;){var S=w();if(S<0||c[S]>r)break;k(S)}var C=[];for(u=0;u=0&&r>=0&&e!==r){var n=T[e],i=T[r];n!==i&&L.push([n,i])}})),i.unique(i.normalize(L)),{positions:C,edges:L}};var n=r(3250),i=r(2014)},1303:function(t,e,r){"use strict";t.exports=function(t,e){var r,o,a,s;if(e[0][0]e[1][0]))return i(e,t);r=e[1],o=e[0]}if(t[0][0]t[1][0]))return-i(t,e);a=t[1],s=t[0]}var l=n(r,o,s),c=n(r,o,a);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=n(s,a,o),c=n(s,a,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return o[0]-s[0]};var n=r(3250);function i(t,e){var r,i,o,a;if(e[0][0]e[1][0])){var s=Math.min(t[0][1],t[1][1]),l=Math.max(t[0][1],t[1][1]),c=Math.min(e[0][1],e[1][1]),d=Math.max(e[0][1],e[1][1]);return ld?s-d:l-d}r=e[1],i=e[0]}t[0][1]0)if(e[0]!==a[1][0])r=t,t=t.right;else{if(l=c(t.right,e))return l;t=t.left}else{if(e[0]!==a[1][0])return t;var l;if(l=c(t.right,e))return l;t=t.left}}return r}function d(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function u(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}s.prototype.castUp=function(t){var e=n.le(this.coordinates,t[0]);if(e<0)return-1;this.slabs[e];var r=c(this.slabs[e],t),i=-1;if(r&&(i=r.value),this.coordinates[e]===t[0]){var s=null;if(r&&(s=r.key),e>0){var d=c(this.slabs[e-1],t);d&&(s?a(d.key,s)>0&&(s=d.key,i=d.value):(i=d.value,s=d.key))}var u=this.horizontal[e];if(u.length>0){var h=n.ge(u,t[1],l);if(h=u.length)return i;p=u[h]}}if(p.start)if(s){var f=o(s[0],s[1],[t[0],p.y]);s[0][0]>s[1][0]&&(f=-f),f>0&&(i=p.index)}else i=p.index;else p.y!==t[1]&&(i=p.index)}}}return i}},5202:function(t,e,r){"use strict";var n=r(1944),i=r(8210);function o(t,e){var r=i(n(t,e),[e[e.length-1]]);return r[r.length-1]}function a(t,e,r,n){var i=-e/(n-e);i<0?i=0:i>1&&(i=1);for(var o=1-i,a=t.length,s=new Array(a),l=0;l0||i>0&&d<0){var u=a(s,d,l,i);r.push(u),n.push(u.slice())}d<0?n.push(l.slice()):d>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=d}return{positive:r,negative:n}},t.exports.positive=function(t,e){for(var r=[],n=o(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(a(i,c,s,n)),c>=0&&r.push(s.slice()),n=c}return r},t.exports.negative=function(t,e){for(var r=[],n=o(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(a(i,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},3387:function(t,e,r){var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return function(t,e){var r,n,a,s,l,c,d,u,h,p=1,f=t.length,m="";for(n=0;n=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?m+=r:(!i.number.test(s.type)||u&&!s.sign?h="":(h=u?"+":"-",r=r.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",d=s.width-(h+r).length,l=s.width&&d>0?c.repeat(d):"",m+=s.align?h+r+l:"0"===c?h+l+r:l+h+r)}return m}(function(t){if(s[t])return s[t];for(var e,r=t,n=[],o=0;r;){if(null!==(e=i.text.exec(r)))n.push(e[0]);else if(null!==(e=i.modulo.exec(r)))n.push("%");else{if(null===(e=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var a=[],l=e[2],c=[];if(null===(c=i.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=i.key_access.exec(l)))a.push(c[1]);else{if(null===(c=i.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}e[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}r=r.substring(e[0].length)}return s[t]=n}(t),arguments)}function a(t,e){return o.apply(null,[t].concat(e||[]))}var s=Object.create(null);e.sprintf=o,e.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(n=function(){return{sprintf:o,vsprintf:a}}.call(e,r,e,t))||(t.exports=n))}()},3711:function(t,e,r){"use strict";t.exports=function(t,e){if(t.dimension<=0)return{positions:[],cells:[]};if(1===t.dimension)return function(t,e){for(var r=i(t,e),n=r.length,o=new Array(n),a=new Array(n),s=0;sn|0},vertex:function(t,e,r,n,i,o,a,s,l,c,d,u,h){var p=(0|a)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==p&&15!==p)switch(p){case 0:case 15:d.push([t-.5,e-.5]);break;case 1:d.push([t-.25-.25*(n+r-2*h)/(r-n),e-.25-.25*(i+r-2*h)/(r-i)]);break;case 2:d.push([t-.75-.25*(-n-r+2*h)/(n-r),e-.25-.25*(o+n-2*h)/(n-o)]);break;case 3:d.push([t-.5,e-.5-.5*(i+r+o+n-4*h)/(r-i+n-o)]);break;case 4:d.push([t-.25-.25*(o+i-2*h)/(i-o),e-.75-.25*(-i-r+2*h)/(i-r)]);break;case 5:d.push([t-.5-.5*(n+r+o+i-4*h)/(r-n+i-o),e-.5]);break;case 6:d.push([t-.5-.25*(-n-r+o+i)/(n-r+i-o),e-.5-.25*(-i-r+o+n)/(i-r+n-o)]);break;case 7:d.push([t-.75-.25*(o+i-2*h)/(i-o),e-.75-.25*(o+n-2*h)/(n-o)]);break;case 8:d.push([t-.75-.25*(-o-i+2*h)/(o-i),e-.75-.25*(-o-n+2*h)/(o-n)]);break;case 9:d.push([t-.5-.25*(n+r+-o-i)/(r-n+o-i),e-.5-.25*(i+r+-o-n)/(r-i+o-n)]);break;case 10:d.push([t-.5-.5*(-n-r-o-i+4*h)/(n-r+o-i),e-.5]);break;case 11:d.push([t-.25-.25*(-o-i+2*h)/(o-i),e-.75-.25*(i+r-2*h)/(r-i)]);break;case 12:d.push([t-.5,e-.5-.5*(-i-r-o-n+4*h)/(i-r+o-n)]);break;case 13:d.push([t-.75-.25*(n+r-2*h)/(r-n),e-.25-.25*(-o-n+2*h)/(o-n)]);break;case 14:d.push([t-.25-.25*(-n-r+2*h)/(n-r),e-.25-.25*(-i-r+2*h)/(i-r)])}},cell:function(t,e,r,n,i,o,a,s,l){i?s.push([t,e]):s.push([e,t])}});return function(t,e){var r=[],i=[];return n(t,r,i,e),{positions:r,cells:i}}}},a={}},529:function(t,e,r){"use strict";t.exports=function t(e,r,n){var o=(n=n||{}).fontStyle||"normal",s=n.fontWeight||"normal",l=n.fontVariant||"normal",c=[o,s,l,e].join("_"),d=a[c];d||(d=a[c]={" ":{data:new Float32Array(0),shape:.2}});var u=d[r];if(!u)if(r.length<=1||!/\d/.test(r))u=d[r]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),i=0,o=0,a=0;a0&&(m+=.02);var v=new Float32Array(f),b=0,y=-.5*m;for(g=0;gMath.max(r,n)?i[2]=1:r>Math.max(e,n)?i[0]=1:i[1]=1;for(var o=0,a=0,l=0;l<3;++l)o+=t[l]*t[l],a+=i[l]*t[l];for(l=0;l<3;++l)i[l]-=a/o*t[l];return s(i,i),i}function h(t,e,r,i,o,a,s,l){this.center=n(r),this.up=n(i),this.right=n(o),this.radius=n([a]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var p=h.prototype;p.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},p.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},p.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,n=0,i=0,o=0;o<3;++o)i+=e[o]*r[o],n+=e[o]*e[o];var l=Math.sqrt(n),d=0;for(o=0;o<3;++o)r[o]-=e[o]*i/n,d+=r[o]*r[o],e[o]/=l;var u=Math.sqrt(d);for(o=0;o<3;++o)r[o]/=u;var h=this.computedToward;a(h,e,r),s(h,h);var p=Math.exp(this.computedRadius[0]),f=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(f),v=Math.sin(f),b=Math.cos(m),y=Math.sin(m),x=this.computedCenter,w=g*b,_=v*b,k=y,A=-g*y,T=-v*y,M=b,S=this.computedEye,C=this.computedMatrix;for(o=0;o<3;++o){var E=w*r[o]+_*h[o]+k*e[o];C[4*o+1]=A*r[o]+T*h[o]+M*e[o],C[4*o+2]=E,C[4*o+3]=0}var L=C[1],z=C[5],O=C[9],D=C[2],I=C[6],F=C[10],R=z*F-O*I,P=O*D-L*F,j=L*I-z*D,N=c(R,P,j);for(R/=N,P/=N,j/=N,C[0]=R,C[4]=P,C[8]=j,o=0;o<3;++o)S[o]=x[o]+C[2+4*o]*p;for(o=0;o<3;++o){d=0;for(var B=0;B<3;++B)d+=C[o+4*B]*S[B];C[12+o]=-d}C[15]=1},p.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var f=[0,0,0];p.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;f[0]=i[2],f[1]=i[6],f[2]=i[10];for(var a=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)i[4*c]=a[c],i[4*c+1]=s[c],i[4*c+2]=l[c];for(o(i,i,n,f),c=0;c<3;++c)a[c]=i[4*c],s[c]=i[4*c+1];this.up.set(t,a[0],a[1],a[2]),this.right.set(t,s[0],s[1],s[2])}},p.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,o=(Math.exp(this.computedRadius[0]),i[1]),a=i[5],s=i[9],l=c(o,a,s);o/=l,a/=l,s/=l;var d=i[0],u=i[4],h=i[8],p=d*o+u*a+h*s,f=c(d-=o*p,u-=a*p,h-=s*p),m=(d/=f)*e+o*r,g=(u/=f)*e+a*r,v=(h/=f)*e+s*r;this.center.move(t,m,g,v);var b=Math.exp(this.computedRadius[0]);b=Math.max(1e-4,b+n),this.radius.set(t,Math.log(b))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,n){var o=1;"number"==typeof r&&(o=0|r),(o<0||o>3)&&(o=1);var a=(o+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[o],l=e[o+4],u=e[o+8];if(n){var h=Math.abs(s),p=Math.abs(l),f=Math.abs(u),m=Math.max(h,p,f);h===m?(s=s<0?-1:1,l=u=0):f===m?(u=u<0?-1:1,s=l=0):(l=l<0?-1:1,s=u=0)}else{var g=c(s,l,u);s/=g,l/=g,u/=g}var v,b,y=e[a],x=e[a+4],w=e[a+8],_=y*s+x*l+w*u,k=c(y-=s*_,x-=l*_,w-=u*_),A=l*(w/=k)-u*(x/=k),T=u*(y/=k)-s*w,M=s*x-l*y,S=c(A,T,M);if(A/=S,T/=S,M/=S,this.center.jump(t,H,W,q),this.radius.idle(t),this.up.jump(t,s,l,u),this.right.jump(t,y,x,w),2===o){var C=e[1],E=e[5],L=e[9],z=C*y+E*x+L*w,O=C*A+E*T+L*M;v=R<0?-Math.PI/2:Math.PI/2,b=Math.atan2(O,z)}else{var D=e[2],I=e[6],F=e[10],R=D*s+I*l+F*u,P=D*y+I*x+F*w,j=D*A+I*T+F*M;v=Math.asin(d(R)),b=Math.atan2(j,P)}this.angle.jump(t,b,v),this.recalcMatrix(t);var N=e[2],B=e[6],U=e[10],G=this.computedMatrix;i(G,e);var V=G[15],H=G[12]/V,W=G[13]/V,q=G[14]/V,Y=Math.exp(this.computedRadius[0]);this.center.jump(t,H-N*Y,W-B*Y,q-U*Y)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},p.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},p.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},p.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],o=n[1],a=n[2],s=c(i,o,a);if(!(s<1e-6)){i/=s,o/=s,a/=s;var l=e[0]-r[0],u=e[1]-r[1],h=e[2]-r[2],p=c(l,u,h);if(!(p<1e-6)){l/=p,u/=p,h/=p;var f=this.computedRight,m=f[0],g=f[1],v=f[2],b=i*m+o*g+a*v,y=c(m-=b*i,g-=b*o,v-=b*a);if(!(y<.01&&(y=c(m=o*h-a*u,g=a*l-i*h,v=i*u-o*l))<1e-6)){m/=y,g/=y,v/=y,this.up.set(t,i,o,a),this.right.set(t,m,g,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var x=o*v-a*g,w=a*m-i*v,_=i*g-o*m,k=c(x,w,_),A=i*l+o*u+a*h,T=m*l+g*u+v*h,M=(x/=k)*l+(w/=k)*u+(_/=k)*h,S=Math.asin(d(A)),C=Math.atan2(M,T),E=this.angle._state,L=E[E.length-1],z=E[E.length-2];L%=2*Math.PI;var O=Math.abs(L+2*Math.PI-C),D=Math.abs(L-C),I=Math.abs(L-2*Math.PI-C);O0?r.pop():new ArrayBuffer(t)}function f(t){return new Uint8Array(p(t),0,t)}function m(t){return new Uint16Array(p(2*t),0,t)}function g(t){return new Uint32Array(p(4*t),0,t)}function v(t){return new Int8Array(p(t),0,t)}function b(t){return new Int16Array(p(2*t),0,t)}function y(t){return new Int32Array(p(4*t),0,t)}function x(t){return new Float32Array(p(4*t),0,t)}function w(t){return new Float64Array(p(8*t),0,t)}function _(t){return a?new Uint8ClampedArray(p(t),0,t):f(t)}function k(t){return s?new BigUint64Array(p(8*t),0,t):null}function A(t){return l?new BigInt64Array(p(8*t),0,t):null}function T(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=u[e];return r.length>0?r.pop():new o(t)}e.free=function(t){if(o.isBuffer(t))u[n.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|n.log2(e);d[r].push(t)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(t){h(t.buffer)},e.freeArrayBuffer=h,e.freeBuffer=function(t){u[n.log2(t.length)].push(t)},e.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return p(t);switch(e){case"uint8":return f(t);case"uint16":return m(t);case"uint32":return g(t);case"int8":return v(t);case"int16":return b(t);case"int32":return y(t);case"float":case"float32":return x(t);case"double":case"float64":return w(t);case"uint8_clamped":return _(t);case"bigint64":return A(t);case"biguint64":return k(t);case"buffer":return M(t);case"data":case"dataview":return T(t);default:return null}return null},e.mallocArrayBuffer=p,e.mallocUint8=f,e.mallocUint16=m,e.mallocUint32=g,e.mallocInt8=v,e.mallocInt16=b,e.mallocInt32=y,e.mallocFloat32=e.mallocFloat=x,e.mallocFloat64=e.mallocDouble=w,e.mallocUint8Clamped=_,e.mallocBigUint64=k,e.mallocBigInt64=A,e.mallocDataView=T,e.mallocBuffer=M,e.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,d[t].length=0,u[t].length=0}},1755:function(t){"use strict";function e(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e0&&(o=n.size),n.lineSpacing&&n.lineSpacing>0&&(a=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts)),r.font=[n.fontStyle,n.fontVariant,n.fontWeight,o+"px",n.font].filter((function(t){return t})).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",_(function(t,e,r,n,o,a){r=r.replace(/\n/g,""),r=!0===a.breaklines?r.replace(/\/g,"\n"):r.replace(/\/g," ");var s="",l=[];for(k=0;k-1?parseInt(t[1+i]):0,l=o>-1?parseInt(r[1+o]):0;s!==l&&(n=n.replace(P(),"?px "),M*=Math.pow(.75,l-s),n=n.replace("?px ",P())),T+=.25*E*(l-s)}if(!0===a.superscripts){var c=t.indexOf(f),u=r.indexOf(f),p=c>-1?parseInt(t[1+c]):0,m=u>-1?parseInt(r[1+u]):0;p!==m&&(n=n.replace(P(),"?px "),M*=Math.pow(.75,m-p),n=n.replace("?px ",P())),T-=.25*E*(m-p)}if(!0===a.bolds){var g=t.indexOf(d)>-1,b=r.indexOf(d)>-1;!g&&b&&(n=y?n.replace("italic ","italic bold "):"bold "+n),g&&!b&&(n=n.replace("bold ",""))}if(!0===a.italics){var y=t.indexOf(h)>-1,x=r.indexOf(h)>-1;!y&&x&&(n="italic "+n),y&&!x&&(n=n.replace("italic ",""))}e.font=n}for(_=0;_",o="",a=i.length,s=o.length,l=e[0]===f||e[0]===v,c=0,d=-s;c>-1&&-1!==(c=r.indexOf(i,c))&&-1!==(d=r.indexOf(o,c+a))&&!(d<=c);){for(var u=c;u=d)n[u]=null,r=r.substr(0,u)+" "+r.substr(u+1);else if(null!==n[u]){var h=n[u].indexOf(e[0]);-1===h?n[u]+=e:l&&(n[u]=n[u].substr(0,h+1)+(1+parseInt(n[u][h+1]))+n[u].substr(h+2))}var p=c+a,m=r.substr(p,d-p).indexOf(i);c=-1!==m?m:d+s}return n}function x(t,e){var r=n(t,128);return e?o(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function w(t,e,r,n){var i=x(t,n),o=function(t,e,r){for(var n=e.textAlign||"start",i=e.textBaseline||"alphabetic",o=[1<<30,1<<30],a=[0,0],s=t.length,l=0;l=0?e[o]:i}))},has___:{value:y((function(e){var n=b(e);return n?r in n:t.indexOf(e)>=0}))},set___:{value:y((function(n,i){var o,a=b(n);return a?a[r]=i:(o=t.indexOf(n))>=0?e[o]=i:(o=t.length,e[o]=i,t[o]=n),this}))},delete___:{value:y((function(n){var i,o,a=b(n);return a?r in a&&delete a[r]:!((i=t.indexOf(n))<0||(o=t.length-1,t[i]=void 0,e[i]=e[o],t[i]=t[o],t.length=o,e.length=o,0))}))}})};m.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof r?function(){function n(){this instanceof m||x();var t,n=new r,i=void 0,o=!1;return t=e?function(t,e){return n.set(t,e),n.has(t)||(i||(i=new m),i.set(t,e)),this}:function(t,e){if(o)try{n.set(t,e)}catch(r){i||(i=new m),i.set___(t,e)}else n.set(t,e);return this},Object.create(m.prototype,{get___:{value:y((function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)}))},has___:{value:y((function(t){return n.has(t)||!!i&&i.has___(t)}))},set___:{value:y(t)},delete___:{value:y((function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e}))},permitHostObjects___:{value:y((function(t){if(t!==g)throw new Error("bogus call to permitHostObjects___");o=!0}))}})}e&&"undefined"!=typeof Proxy&&(Proxy=void 0),n.prototype=m.prototype,t.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),t.exports=m)}function g(t){t.permitHostObjects___&&t.permitHostObjects___(g)}function v(t){return!(t.substr(0,8)==l&&"___"===t.substr(t.length-3))}function b(t){if(t!==Object(t))throw new TypeError("Not an object: "+t);var e=t[c];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return a(t,c,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function y(t){return t.prototype=null,Object.freeze(t)}function x(){p||"undefined"==typeof console||(p=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},236:function(t,e,r){var n=r(8284);t.exports=function(){var t={};return function(e){if(("object"!=typeof e||null===e)&&"function"!=typeof e)throw new Error("Weakmap-shim: Key must be object");var r=e.valueOf(t);return r&&r.identity===t?r:n(e,t)}}},8284:function(t){t.exports=function(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}},606:function(t,e,r){var n=r(236);t.exports=function(){var t=n();return{get:function(e,r){var n=t(e);return n.hasOwnProperty("value")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return"value"in t(e)},delete:function(e){return delete t(e).value}}}},3349:function(t){"use strict";t.exports=function(t){var e={};return function(r,n,i){var o=r.dtype,a=r.order,s=[o,a.join()].join(),l=e[s];return l||(e[s]=l=t([o,a])),l(r.shape.slice(0),r.data,r.stride,0|r.offset,n,i)}}(function(){return function(t,e,r,n,i,o){var a=t[0],s=r[0],l=[0],c=s;n|=0;var d=0,u=s;for(d=0;d=0!=p>=0&&i.push(l[0]+.5+.5*(h+p)/(h-p)),n+=u,++l[0]}}}.bind(void 0,{funcName:"zeroCrossings"}))},781:function(t,e,r){"use strict";t.exports=function(t,e){var r=[];return e=+e||0,n(t.hi(t.shape[0]-1),r,e),r};var n=r(3349)},7790:function(){}},r={};function i(t){var n=r[t];if(void 0!==n)return n.exports;var o=r[t]={id:t,loaded:!1,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t};var o=i(1964);t.exports=o}()},53824:t=>{t.exports=function(t,e,r,n){var i=t[0],o=t[1],a=!1;void 0===r&&(r=0),void 0===n&&(n=e.length);for(var s=n-r,l=0,c=s-1;lo!=p>o&&i<(h-d)*(o-u)/(p-u)+d&&(a=!a)}return a}},48439:(t,e,r)=>{var n,i=r(89528),o=r(45505),a=r(25645),s=r(31997),l=r(94638),c=r(52148),d=!1,u=o();function h(t,e,r){var i=n.segments(t),o=n.segments(e),a=r(n.combine(i,o));return n.polygon(a)}n={buildLog:function(t){return!0===t?d=i():!1===t&&(d=!1),!1!==d&&d.list},epsilon:function(t){return u.epsilon(t)},segments:function(t){var e=a(!0,u,d);return t.regions.forEach(e.addRegion),{segments:e.calculate(t.inverted),inverted:t.inverted}},combine:function(t,e){return{combined:a(!1,u,d).calculate(t.segments,t.inverted,e.segments,e.inverted),inverted1:t.inverted,inverted2:e.inverted}},selectUnion:function(t){return{segments:l.union(t.combined,d),inverted:t.inverted1||t.inverted2}},selectIntersect:function(t){return{segments:l.intersect(t.combined,d),inverted:t.inverted1&&t.inverted2}},selectDifference:function(t){return{segments:l.difference(t.combined,d),inverted:t.inverted1&&!t.inverted2}},selectDifferenceRev:function(t){return{segments:l.differenceRev(t.combined,d),inverted:!t.inverted1&&t.inverted2}},selectXor:function(t){return{segments:l.xor(t.combined,d),inverted:t.inverted1!==t.inverted2}},polygon:function(t){return{regions:s(t.segments,u,d),inverted:t.inverted}},polygonFromGeoJSON:function(t){return c.toPolygon(n,t)},polygonToGeoJSON:function(t){return c.fromPolygon(n,u,t)},union:function(t,e){return h(t,e,n.selectUnion)},intersect:function(t,e){return h(t,e,n.selectIntersect)},difference:function(t,e){return h(t,e,n.selectDifference)},differenceRev:function(t,e){return h(t,e,n.selectDifferenceRev)},xor:function(t,e){return h(t,e,n.selectXor)}},"object"==typeof window&&(window.PolyBool=n),t.exports=n},89528:t=>{t.exports=function(){var t,e=0,r=!1;function n(e,r){return t.list.push({type:e,data:r?JSON.parse(JSON.stringify(r)):void 0}),t}return t={list:[],segmentId:function(){return e++},checkIntersection:function(t,e){return n("check",{seg1:t,seg2:e})},segmentChop:function(t,e){return n("div_seg",{seg:t,pt:e}),n("chop",{seg:t,pt:e})},statusRemove:function(t){return n("pop_seg",{seg:t})},segmentUpdate:function(t){return n("seg_update",{seg:t})},segmentNew:function(t,e){return n("new_seg",{seg:t,primary:e})},segmentRemove:function(t){return n("rem_seg",{seg:t})},tempStatus:function(t,e,r){return n("temp_status",{seg:t,above:e,below:r})},rewind:function(t){return n("rewind",{seg:t})},status:function(t,e,r){return n("status",{seg:t,above:e,below:r})},vert:function(e){return e===r?t:(r=e,n("vert",{x:e}))},log:function(t){return"string"!=typeof t&&(t=JSON.stringify(t,!1," ")),n("log",{txt:t})},reset:function(){return n("reset")},selected:function(t){return n("selected",{segs:t})},chainStart:function(t){return n("chain_start",{seg:t})},chainRemoveHead:function(t,e){return n("chain_rem_head",{index:t,pt:e})},chainRemoveTail:function(t,e){return n("chain_rem_tail",{index:t,pt:e})},chainNew:function(t,e){return n("chain_new",{pt1:t,pt2:e})},chainMatch:function(t){return n("chain_match",{index:t})},chainClose:function(t){return n("chain_close",{index:t})},chainAddHead:function(t,e){return n("chain_add_head",{index:t,pt:e})},chainAddTail:function(t,e){return n("chain_add_tail",{index:t,pt:e})},chainConnect:function(t,e){return n("chain_con",{index1:t,index2:e})},chainReverse:function(t){return n("chain_rev",{index:t})},chainJoin:function(t,e){return n("chain_join",{index1:t,index2:e})},done:function(){return n("done")}}}},45505:t=>{t.exports=function(t){"number"!=typeof t&&(t=1e-10);var e={epsilon:function(e){return"number"==typeof e&&(t=e),t},pointAboveOrOnLine:function(e,r,n){var i=r[0],o=r[1],a=n[0],s=n[1],l=e[0];return(a-i)*(e[1]-o)-(s-o)*(l-i)>=-t},pointBetween:function(e,r,n){var i=e[1]-r[1],o=n[0]-r[0],a=e[0]-r[0],s=n[1]-r[1],l=a*o+i*s;return!(l-t)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])t!=a-i>t&&(o-c)*(i-d)/(a-d)+c-n>t&&(s=!s),o=c,a=d}return s}};return e}},52148:t=>{var e={toPolygon:function(t,e){function r(e){if(e.length<=0)return t.segments({inverted:!1,regions:[]});function r(e){var r=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[r]})}for(var n=r(e[0]),i=1;i{var n=r(68871);t.exports=function(t,e,r){function i(t,e,n){return{id:r?r.segmentId():-1,start:t,end:e,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var o=n.create();function a(t,r){o.insertBefore(t,(function(n){return i=t.isStart,o=t.pt,a=r,s=n.isStart,l=n.pt,c=n.other.pt,(0!==(d=e.pointsCompare(o,l))?d:e.pointsSame(a,c)?0:i!==s?i?1:-1:e.pointAboveOrOnLine(a,s?l:c,s?c:l)?1:-1)<0;var i,o,a,s,l,c,d}))}function s(t,e){var r=function(t,e){var r=n.node({isStart:!0,pt:t.start,seg:t,primary:e,other:null,status:null});return a(r,t.end),r}(t,e);return function(t,e,r){var i=n.node({isStart:!1,pt:e.end,seg:e,primary:r,other:t,status:null});t.other=i,a(i,t.pt)}(r,t,e),r}function l(t,e){var n=i(e,t.seg.end,t.seg);return function(t,e){r&&r.segmentChop(t.seg,e),t.other.remove(),t.seg.end=e,t.other.pt=e,a(t.other,t.pt)}(t,e),s(n,t.primary)}function c(i,a){var s=n.create();function c(t){return s.findTransition((function(r){var n,i,o,a,s,l;return n=t,i=r.ev,o=n.seg.start,a=n.seg.end,s=i.seg.start,l=i.seg.end,(e.pointsCollinear(o,s,l)?e.pointsCollinear(a,s,l)||e.pointAboveOrOnLine(a,s,l)?1:-1:e.pointAboveOrOnLine(o,s,l)?1:-1)>0}))}function d(t,n){var i=t.seg,o=n.seg,a=i.start,s=i.end,c=o.start,d=o.end;r&&r.checkIntersection(i,o);var u=e.linesIntersect(a,s,c,d);if(!1===u){if(!e.pointsCollinear(a,s,c))return!1;if(e.pointsSame(a,d)||e.pointsSame(s,c))return!1;var h=e.pointsSame(a,c),p=e.pointsSame(s,d);if(h&&p)return n;var f=!h&&e.pointBetween(a,c,d),m=!p&&e.pointBetween(s,c,d);if(h)return m?l(n,s):l(t,d),n;f&&(p||(m?l(n,s):l(t,d)),l(n,a))}else 0===u.alongA&&(-1===u.alongB?l(t,c):0===u.alongB?l(t,u.pt):1===u.alongB&&l(t,d)),0===u.alongB&&(-1===u.alongA?l(n,a):0===u.alongA?l(n,u.pt):1===u.alongA&&l(n,s));return!1}for(var u=[];!o.isEmpty();){var h=o.getHead();if(r&&r.vert(h.pt[0]),h.isStart){r&&r.segmentNew(h.seg,h.primary);var p=c(h),f=p.before?p.before.ev:null,m=p.after?p.after.ev:null;function g(){if(f){var t=d(h,f);if(t)return t}return!!m&&d(h,m)}r&&r.tempStatus(h.seg,!!f&&f.seg,!!m&&m.seg);var v,b,y=g();if(y)t?(b=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above):y.seg.otherFill=h.seg.myFill,r&&r.segmentUpdate(y.seg),h.other.remove(),h.remove();if(o.getHead()!==h){r&&r.rewind(h.seg);continue}t?(b=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,h.seg.myFill.below=m?m.seg.myFill.above:i,h.seg.myFill.above=b?!h.seg.myFill.below:h.seg.myFill.below):null===h.seg.otherFill&&(v=m?h.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:h.primary?a:i,h.seg.otherFill={above:v,below:v}),r&&r.status(h.seg,!!f&&f.seg,!!m&&m.seg),h.other.status=p.insert(n.node({ev:h}))}else{var x=h.status;if(null===x)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(x.prev)&&s.exists(x.next)&&d(x.prev.ev,x.next.ev),r&&r.statusRemove(x.ev.seg),x.remove(),!h.primary){var w=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=w}u.push(h.seg)}o.getHead().remove()}return r&&r.done(),u}return t?{addRegion:function(t){for(var n,i,o,a=t[t.length-1],l=0;l{t.exports={create:function(){var t={root:{root:!0,next:null},exists:function(e){return null!==e&&e!==t.root},isEmpty:function(){return null===t.root.next},getHead:function(){return t.root.next},insertBefore:function(e,r){for(var n=t.root,i=t.root.next;null!==i;){if(r(i))return e.prev=i.prev,e.next=i,i.prev.next=e,void(i.prev=e);n=i,i=i.next}n.next=e,e.prev=n,e.next=null},findTransition:function(e){for(var r=t.root,n=t.root.next;null!==n&&!e(n);)r=n,n=n.next;return{before:r===t.root?null:r,after:n,insert:function(t){return t.prev=r,t.next=n,r.next=t,null!==n&&(n.prev=t),t}}}};return t},node:function(t){return t.prev=null,t.next=null,t.remove=function(){t.prev.next=t.next,t.next&&(t.next.prev=t.prev),t.prev=null,t.next=null},t}}},31997:t=>{t.exports=function(t,e,r){var n=[],i=[];return t.forEach((function(t){var o=t.start,a=t.end;if(e.pointsSame(o,a))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{r&&r.chainStart(t);for(var s={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},c=s,d=0;d{function e(t,e,r){var n=[];return t.forEach((function(t){var i=(t.myFill.above?8:0)+(t.myFill.below?4:0)+(t.otherFill&&t.otherFill.above?2:0)+(t.otherFill&&t.otherFill.below?1:0);0!==e[i]&&n.push({id:r?r.segmentId():-1,start:t.start,end:t.end,myFill:{above:1===e[i],below:2===e[i]},otherFill:null})})),r&&r.selected(n),n}var r={union:function(t,r){return e(t,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(t,r){return e(t,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(t,r){return e(t,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(t,r){return e(t,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(t,r){return e(t,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};t.exports=r},97905:t=>{"use strict";t.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},39807:t=>{var e,r,n=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var s,l=[],c=!1,d=-1;function u(){c&&s&&(c=!1,s.length?l=s.concat(l):d=-1,l.length&&h())}function h(){if(!c){var t=a(u);c=!0;for(var e=l.length;e;){for(s=l,l=[];++d1)for(var r=1;r{"use strict";var n=r(25359),i=r(34463),o=r(6313),a=r(9994),s=r(34597),l=r(97e3),c=r(91101),d=c.float32,u=c.fract32;t.exports=function(t,e){if("function"==typeof t?(e||(e={}),e.regl=t):e=t,e.length&&(e.positions=e),!(t=e.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var r,c,p,f,m,g,v=t._gl,b={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},y=[];return f=t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),c=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),m=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=t.buffer({usage:"static",type:"float",data:h}),k(e),r=t({vert:"\n\t\tprecision highp float;\n\n\t\tattribute vec2 position, positionFract;\n\t\tattribute vec4 error;\n\t\tattribute vec4 color;\n\n\t\tattribute vec2 direction, lineOffset, capOffset;\n\n\t\tuniform vec4 viewport;\n\t\tuniform float lineWidth, capSize;\n\t\tuniform vec2 scale, scaleFract, translate, translateFract;\n\n\t\tvarying vec4 fragColor;\n\n\t\tvoid main() {\n\t\t\tfragColor = color / 255.;\n\n\t\t\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\n\n\t\t\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\n\n\t\t\tvec2 position = position + dxy;\n\n\t\t\tvec2 pos = (position + translate) * scale\n\t\t\t\t+ (positionFract + translateFract) * scale\n\t\t\t\t+ (position + translate) * scaleFract\n\t\t\t\t+ (positionFract + translateFract) * scaleFract;\n\n\t\t\tpos += pixelOffset / viewport.zw;\n\n\t\t\tgl_Position = vec4(pos * 2. - 1., 0, 1);\n\t\t}\n\t\t",frag:"\n\t\tprecision highp float;\n\n\t\tvarying vec4 fragColor;\n\n\t\tuniform float opacity;\n\n\t\tvoid main() {\n\t\t\tgl_FragColor = fragColor;\n\t\t\tgl_FragColor.a *= opacity;\n\t\t}\n\t\t",uniforms:{range:t.prop("range"),lineWidth:t.prop("lineWidth"),capSize:t.prop("capSize"),opacity:t.prop("opacity"),scale:t.prop("scale"),translate:t.prop("translate"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{color:{buffer:f,offset:function(t,e){return 4*e.offset},divisor:1},position:{buffer:c,offset:function(t,e){return 8*e.offset},divisor:1},positionFract:{buffer:p,offset:function(t,e){return 8*e.offset},divisor:1},error:{buffer:m,offset:function(t,e){return 16*e.offset},divisor:1},direction:{buffer:g,stride:24,offset:0},lineOffset:{buffer:g,stride:24,offset:8},capOffset:{buffer:g,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:t.prop("viewport")},viewport:t.prop("viewport"),stencil:!1,instances:t.prop("count"),count:h.length}),s(x,{update:k,draw:w,destroy:A,regl:t,gl:v,canvas:v.canvas,groups:y}),x;function x(t){t?k(t):null===t&&A(),w()}function w(e){if("number"==typeof e)return _(e);e&&!Array.isArray(e)&&(e=[e]),t._refresh(),y.forEach((function(t,r){t&&(e&&(e[r]?t.draw=!0:t.draw=!1),t.draw?_(r):t.draw=!0)}))}function _(t){"number"==typeof t&&(t=y[t]),null!=t&&t&&t.count&&t.color&&t.opacity&&t.positions&&t.positions.length>1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function k(t){if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(x.groups=y=t.map((function(t,c){var d=y[c];return t?("function"==typeof t?t={after:t}:"number"==typeof t[0]&&(t={positions:t}),t=a(t,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),d||(y[c]=d={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},b,t)),o(d,t,[{lineWidth:function(t){return.5*+t},capSize:function(t){return.5*+t},opacity:parseFloat,errors:function(t){return t=l(t),r+=t.length,t},positions:function(t,r){return t=l(t,"float64"),r.count=Math.floor(t.length/2),r.bounds=n(t,2),r.offset=e,e+=r.count,t}},{color:function(t,e){var r=e.count;if(t||(t="transparent"),!Array.isArray(t)||"number"==typeof t[0]){var n=t;t=Array(r);for(var o=0;o{"use strict";var n=r(34463),i=r(25359),o=r(34597),a=r(9994),s=r(97e3),l=r(31587),c=r(2433),d=r(91101),u=d.float32,h=d.fract32,p=r(41456),f=r(94698),m=r(72268);function g(t,e){if(!(this instanceof g))return new g(t,e);if("function"==typeof t?(e||(e={}),e.regl=t):e=t,e.length&&(e.positions=e),!(t=e.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=t._gl,this.regl=t,this.passes=[],this.shaders=g.shaders.has(t)?g.shaders.get(t):g.shaders.set(t,g.createShaders(t)).get(t),this.update(e)}t.exports=g,g.dashMult=2,g.maxPatternLength=256,g.precisionThreshold=3e6,g.maxPoints=1e4,g.maxLines=2048,g.shaders=new p,g.createShaders=function(t){var e,r=t.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),n={primitive:"triangle strip",instances:t.prop("count"),count:4,offset:0,uniforms:{miterMode:function(t,e){return"round"===e.join?2:1},miterLimit:t.prop("miterLimit"),scale:t.prop("scale"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),translate:t.prop("translate"),thickness:t.prop("thickness"),dashTexture:t.prop("dashTexture"),opacity:t.prop("opacity"),pixelRatio:t.context("pixelRatio"),id:t.prop("id"),dashLength:t.prop("dashLength"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]},depth:t.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:function(t,e){return!e.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:t.prop("viewport")},viewport:t.prop("viewport")},i=t(o({vert:"\nprecision highp float;\n\nattribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;\nattribute vec4 color;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {\n\t// the order is important\n\treturn position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n}\n\nvoid main() {\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineOffset = lineTop * 2. - 1.;\n\n\tvec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);\n\ttangent = normalize(diff * scale * viewport.zw);\n\tvec2 normal = vec2(-tangent.y, tangent.x);\n\n\tvec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart\n\t\t+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd\n\n\t\t+ thickness * normal * .5 * lineOffset / viewport.zw;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n}\n",frag:"\nprecision highp float;\n\nuniform float dashLength, pixelRatio, thickness, opacity, id;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvoid main() {\n\tfloat alpha = 1.;\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n",attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},n));try{e=t(o({cull:{enable:!0,face:"back"},vert:"\nprecision highp float;\n\nattribute vec2 aCoord, bCoord, nextCoord, prevCoord;\nattribute vec4 aColor, bColor;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, translate;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\nuniform float miterLimit, miterMode;\n\nvarying vec4 fragColor;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 tangent;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nconst float REVERSE_THRESHOLD = -.875;\nconst float MIN_DIFF = 1e-6;\n\n// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead\n// TODO: precalculate dot products, normalize things beforehead etc.\n// TODO: refactor to rectangular algorithm\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nbool isNaN( float val ){\n return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n}\n\nvoid main() {\n\tvec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;\n\n vec2 adjustedScale;\n adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;\n adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;\n\n vec2 scaleRatio = adjustedScale * viewport.zw;\n\tvec2 normalWidth = thickness / scaleRatio;\n\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineBot = 1. - lineTop;\n\n\tfragColor = (lineStart * aColor + lineEnd * bColor) / 255.;\n\n\tif (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;\n\n\tif (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);\n\tif (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);\n\n\n\tvec2 prevDiff = aCoord - prevCoord;\n\tvec2 currDiff = bCoord - aCoord;\n\tvec2 nextDiff = nextCoord - bCoord;\n\n\tvec2 prevTangent = normalize(prevDiff * scaleRatio);\n\tvec2 currTangent = normalize(currDiff * scaleRatio);\n\tvec2 nextTangent = normalize(nextDiff * scaleRatio);\n\n\tvec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);\n\tvec2 currNormal = vec2(-currTangent.y, currTangent.x);\n\tvec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);\n\n\tvec2 startJoinDirection = normalize(prevTangent - currTangent);\n\tvec2 endJoinDirection = normalize(currTangent - nextTangent);\n\n\t// collapsed/unidirectional segment cases\n\t// FIXME: there should be more elegant solution\n\tvec2 prevTanDiff = abs(prevTangent - currTangent);\n\tvec2 nextTanDiff = abs(nextTangent - currTangent);\n\tif (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {\n\t\tstartJoinDirection = currNormal;\n\t}\n\tif (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {\n\t\tendJoinDirection = currNormal;\n\t}\n\tif (aCoord == bCoord) {\n\t\tendJoinDirection = startJoinDirection;\n\t\tcurrNormal = prevNormal;\n\t\tcurrTangent = prevTangent;\n\t}\n\n\ttangent = currTangent;\n\n\t//calculate join shifts relative to normals\n\tfloat startJoinShift = dot(currNormal, startJoinDirection);\n\tfloat endJoinShift = dot(currNormal, endJoinDirection);\n\n\tfloat startMiterRatio = abs(1. / startJoinShift);\n\tfloat endMiterRatio = abs(1. / endJoinShift);\n\n\tvec2 startJoin = startJoinDirection * startMiterRatio;\n\tvec2 endJoin = endJoinDirection * endMiterRatio;\n\n\tvec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;\n\tstartTopJoin = sign(startJoinShift) * startJoin * .5;\n\tstartBotJoin = -startTopJoin;\n\n\tendTopJoin = sign(endJoinShift) * endJoin * .5;\n\tendBotJoin = -endTopJoin;\n\n\tvec2 aTopCoord = aCoord + normalWidth * startTopJoin;\n\tvec2 bTopCoord = bCoord + normalWidth * endTopJoin;\n\tvec2 aBotCoord = aCoord + normalWidth * startBotJoin;\n\tvec2 bBotCoord = bCoord + normalWidth * endBotJoin;\n\n\t//miter anti-clipping\n\tfloat baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));\n\tfloat abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));\n\n\t//prevent close to reverse direction switch\n\tbool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) < length(normalWidth * currNormal);\n\tbool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) < length(normalWidth * currNormal);\n\n\tif (prevReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);\n\t\taBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\taTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n",frag:"\nprecision highp float;\n\nuniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n",attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch(t){e=i}return{fill:t({primitive:"triangle",elements:function(t,e){return e.triangles},offset:0,vert:"\nprecision highp float;\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n",frag:"\nprecision highp float;\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n",uniforms:{scale:t.prop("scale"),color:t.prop("fill"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),translate:t.prop("translate"),opacity:t.prop("opacity"),pixelRatio:t.context("pixelRatio"),id:t.prop("id"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{position:{buffer:t.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:i,miter:e}},g.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},g.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];e.length&&(t=this).update.apply(t,e),this.draw()},g.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length?e:this.passes).forEach((function(e,r){var n;if(e&&Array.isArray(e))return(n=t).draw.apply(n,e);"number"==typeof e&&(e=t.passes[e]),e&&e.count>1&&e.opacity&&(t.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&t.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>g.precisionThreshold||e.scale[1]*e.viewport.height>g.precisionThreshold||"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=g.maxPoints)?t.shaders.rect(e):t.shaders.miter(e)))})),this},g.prototype.update=function(t){var e=this;if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var r=this.regl,d=this.gl;if(t.forEach((function(t,p){var v=e.passes[p];if(void 0!==t)if(null!==t){if("number"==typeof t[0]&&(t={positions:t}),t=a(t,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),v||(e.passes[p]=v={id:p,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:r.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},t=o({},g.defaults,t)),null!=t.thickness&&(v.thickness=parseFloat(t.thickness)),null!=t.opacity&&(v.opacity=parseFloat(t.opacity)),null!=t.miterLimit&&(v.miterLimit=parseFloat(t.miterLimit)),null!=t.overlay&&(v.overlay=!!t.overlay,p=F}));(O=O.slice(0,R)).push(F)}for(var P=function(t){var e=A.slice(2*I,2*O[t]).concat(F?A.slice(2*F):[]),r=(v.hole||[]).map((function(e){return e-F+(O[t]-I)})),n=l(e,r);n=n.map((function(e){return e+I+(e+I{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r 1.0 + delta) {\n\t\tdiscard;\n\t}\n\n\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n\tfloat borderRadius = fragBorderRadius;\n\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n\tcolor.a *= alpha * opacity;\n\tgl_FragColor = color;\n}\n"]),l.vert=u(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\n// `invariant` effectively turns off optimizations for the position.\n// We need this because -fast-math on M1 Macs is re-ordering\n// floating point operations in a way that causes floating point\n// precision limits to put points in the wrong locations.\ninvariant gl_Position;\n\nuniform bool constPointSize;\nuniform float pixelRatio;\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\nuniform sampler2D paletteTexture;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(paletteTexture,\n vec2(\n (id.x + .5) / paletteSize.x,\n (id.y + .5) / paletteSize.y\n )\n );\n}\n\nvoid main() {\n // ignore inactive points\n if (isActive == 0.) return;\n\n vec2 position = vec2(x, y);\n vec2 positionFract = vec2(xFract, yFract);\n\n vec4 color = getColor(colorId);\n vec4 borderColor = getColor(borderColorId);\n\n float size = size * maxSize / 255.;\n float borderSize = borderSize * maxSize / 255.;\n\n gl_PointSize = (size + borderSize) * pointSizeScale;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0., 1.);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),m&&(l.frag=l.frag.replace("smoothstep","smoothStep"),s.frag=s.frag.replace("smoothstep","smoothStep")),this.drawCircle=t(l)}y.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},y.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},y.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;nn)?e.tree=c(t,{bounds:u}):n&&n.length&&(e.tree=n),e.tree){var h={primitive:"points",usage:"static",data:e.tree,type:"uint32"};e.elements?e.elements(h):e.elements=a.elements(h)}var p=g.float32(t);return i({data:p,usage:"dynamic"}),o({data:g.fract32(t,p),usage:"dynamic"}),l({data:new Uint8Array(d),type:"uint8",usage:"stream"}),t}},{marker:function(e,r,n){var i=r.activation;if(i.forEach((function(t){return t&&t.destroy&&t.destroy()})),i.length=0,e&&"number"!=typeof e[0]){for(var o=[],s=0,l=Math.min(e.length,r.count);s=0)return o;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)e=t;else{e=new Uint8Array(t.length);for(var a=0,s=t.length;a4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},y.prototype.updatePalette=function(t){if(!this.tooManyColors){var e=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*t.length/e);if(n>1)for(var i=.25*(t=t.slice()).length%e;i>>=e))<<3,(e|=r=(15<(t>>>=r))<<2)|(r=(3<(t>>>=r))<<1)|t>>>r>>1}function l(){function t(t){t:{for(var e=16;268435456>=e;e*=16)if(t<=e){t=e;break t}t=0}return 0<(e=r[s(t)>>2]).length?e.pop():new ArrayBuffer(t)}function e(t){r[s(t.byteLength)>>2].push(t)}var r=a(8,(function(){return[]}));return{alloc:t,free:e,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(t){e(t.buffer)}}}function c(t){return!!t&&"object"==typeof t&&Array.isArray(t.shape)&&Array.isArray(t.stride)&&"number"==typeof t.offset&&t.shape.length===t.stride.length&&(Array.isArray(t.data)||K(t.data))}function d(t,e,r,n,i,o){for(var a=0;a(i=s)&&(i=n.buffer.byteLength,5123===u?i>>=1:5125===u&&(i>>=2)),n.vertCount=i,i=a,0>a&&(i=4,1===(a=n.buffer.dimension)&&(i=0),2===a&&(i=1),3===a&&(i=4)),n.primType=i}function a(t){n.elementsCount--,delete s[t.id],t.buffer.destroy(),t.buffer=null}var s={},l=0,d={uint8:5121,uint16:5123};e.oes_element_index_uint&&(d.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var u=[];return{create:function(t,e){function s(t){if(t)if("number"==typeof t)l(t),u.primType=4,u.vertCount=0|t,u.type=5121;else{var e=null,r=35044,n=-1,i=-1,a=0,h=0;Array.isArray(t)||K(t)||c(t)?e=t:("data"in t&&(e=t.data),"usage"in t&&(r=nt[t.usage]),"primitive"in t&&(n=st[t.primitive]),"count"in t&&(i=0|t.count),"type"in t&&(h=d[t.type]),"length"in t?a=0|t.length:(a=i,5123===h||5122===h?a*=2:5125!==h&&5124!==h||(a*=4))),o(u,e,r,n,i,a,h)}else l(),u.primType=4,u.vertCount=0,u.type=5121;return s}var l=r.create(null,34963,!0),u=new i(l._buffer);return n.elementsCount++,s(t),s._reglType="elements",s._elements=u,s.subdata=function(t,e){return l.subdata(t,e),s},s.destroy=function(){a(u)},s},createStream:function(t){var e=u.pop();return e||(e=new i(r.create(null,34963,!0,!1)._buffer)),o(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){u.push(t)},getElements:function(t){return"function"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){Q(s).forEach(a)}}}function v(t){for(var e=X.allocType(5123,t.length),r=0;r>>31<<15,i=(o<<1>>>24)-127,o=o>>13&1023;e[r]=-24>i?n:-14>i?n+(o+1024>>-14-i):15>=i,r.height>>=i,p(r,n[i]),t.mipmask|=1<e;++e)t.images[e]=null;return t}function L(t){for(var e=t.images,r=0;re){for(var r=0;r=--this.refCount&&P(this)}}),a.profile&&(o.getTotalTextureSize=function(){var t=0;return Object.keys(ct).forEach((function(e){t+=ct[e].stats.size})),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;z.call(r);var o=E();return"number"==typeof t?M(o,0|t,"number"==typeof e?0|e:0|t):t?(O(r,t),S(o,t)):M(o,1,1),r.genMipmaps&&(o.mipmask=(o.width<<1)-1),i.mipmask=o.mipmask,l(i,o),i.internalformat=o.internalformat,n.width=o.width,n.height=o.height,F(i),C(o,3553),D(r,3553),R(),L(o),a.profile&&(i.stats.size=T(i.internalformat,i.type,o.width,o.height,r.genMipmaps,!1)),n.format=$[i.internalformat],n.type=J[i.type],n.mag=rt[r.magFilter],n.min=nt[r.minFilter],n.wrapS=it[r.wrapS],n.wrapT=it[r.wrapT],n}var i=new I(3553);return ct[i.id]=i,o.textureCount++,n(e,r),n.subimage=function(t,e,r,o){e|=0,r|=0,o|=0;var a=m();return l(a,i),a.width=0,a.height=0,p(a,t),a.width=a.width||(i.width>>o)-e,a.height=a.height||(i.height>>o)-r,F(i),f(a,3553,e,r,o),R(),g(a),n},n.resize=function(e,r){var o=0|e,s=0|r||o;if(o===i.width&&s===i.height)return n;n.width=i.width=o,n.height=i.height=s,F(i);for(var l=0;i.mipmask>>l;++l){var c=o>>l,d=s>>l;if(!c||!d)break;t.texImage2D(3553,l,i.format,c,d,0,i.format,i.type,null)}return R(),a.profile&&(i.stats.size=T(i.internalformat,i.type,o,s,!1,!1)),n},n._reglType="texture2d",n._texture=i,a.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,n,i,s,c){function u(t,e,r,n,i,o){var s,c=h.texInfo;for(z.call(c),s=0;6>s;++s)v[s]=E();if("number"!=typeof t&&t){if("object"==typeof t)if(e)S(v[0],t),S(v[1],e),S(v[2],r),S(v[3],n),S(v[4],i),S(v[5],o);else if(O(c,t),d(h,t),"faces"in t)for(t=t.faces,s=0;6>s;++s)l(v[s],h),S(v[s],t[s]);else for(s=0;6>s;++s)S(v[s],t)}else for(t=0|t||1,s=0;6>s;++s)M(v[s],t,t);for(l(h,v[0]),h.mipmask=c.genMipmaps?(v[0].width<<1)-1:v[0].mipmask,h.internalformat=v[0].internalformat,u.width=v[0].width,u.height=v[0].height,F(h),s=0;6>s;++s)C(v[s],34069+s);for(D(c,34067),R(),a.profile&&(h.stats.size=T(h.internalformat,h.type,u.width,u.height,c.genMipmaps,!0)),u.format=$[h.internalformat],u.type=J[h.type],u.mag=rt[c.magFilter],u.min=nt[c.minFilter],u.wrapS=it[c.wrapS],u.wrapT=it[c.wrapT],s=0;6>s;++s)L(v[s]);return u}var h=new I(34067);ct[h.id]=h,o.cubeCount++;var v=Array(6);return u(e,r,n,i,s,c),u.subimage=function(t,e,r,n,i){r|=0,n|=0,i|=0;var o=m();return l(o,h),o.width=0,o.height=0,p(o,e),o.width=o.width||(h.width>>i)-r,o.height=o.height||(h.height>>i)-n,F(h),f(o,34069+t,r,n,i),R(),g(o),u},u.resize=function(e){if((e|=0)!==h.width){u.width=h.width=e,u.height=h.height=e,F(h);for(var r=0;6>r;++r)for(var n=0;h.mipmask>>n;++n)t.texImage2D(34069+r,n,h.format,e>>n,e>>n,0,h.format,h.type,null);return R(),a.profile&&(h.stats.size=T(h.internalformat,h.type,u.width,u.height,!1,!0)),u}},u._reglType="textureCube",u._texture=h,a.profile&&(u.stats=h.stats),u.destroy=function(){h.decRef()},u},clear:function(){for(var e=0;er;++r)if(e.mipmask&1<>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;6>n;++n)t.texImage2D(34069+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);D(e.texInfo,e.target)}))},refresh:function(){for(var e=0;ei;++i){for(c=0;ct;++t)r[t].resize(n);return e.width=e.height=n,e},_reglType:"framebufferCube",destroy:function(){r.forEach((function(t){t.destroy()}))}})},clear:function(){Q(A).forEach(g)},restore:function(){y.cur=null,y.next=null,y.dirty=!0,Q(A).forEach((function(e){e.framebuffer=t.createFramebuffer(),v(e)}))}})}function C(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function E(t,e,r,n,i,o,a){function s(){this.id=++u,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var t=e.oes_vertex_array_object;this.vao=t?t.createVertexArrayOES():null,h[this.id]=this,this.buffers=[]}var l=r.maxAttributes,d=Array(l);for(r=0;r=h.byteLength?l.subdata(h):(l.destroy(),r.buffers[s]=null)),r.buffers[s]||(l=r.buffers[s]=i.create(d,34962,!1,!0)),u.buffer=i.getBuffer(l),u.size=0|u.buffer.dimension,u.normalized=!1,u.type=u.buffer.dtype,u.offset=0,u.stride=0,u.divisor=0,u.state=1,t[s]=1):i.getBuffer(d)?(u.buffer=i.getBuffer(d),u.size=0|u.buffer.dimension,u.normalized=!1,u.type=u.buffer.dtype,u.offset=0,u.stride=0,u.divisor=0,u.state=1):i.getBuffer(d.buffer)?(u.buffer=i.getBuffer(d.buffer),u.size=0|(+d.size||u.buffer.dimension),u.normalized=!!d.normalized||!1,u.type="type"in d?rt[d.type]:u.buffer.dtype,u.offset=0|(d.offset||0),u.stride=0|(d.stride||0),u.divisor=0|(d.divisor||0),u.state=1):"x"in d&&(u.x=+d.x||0,u.y=+d.y||0,u.z=+d.z||0,u.w=+d.w||0,u.state=2)}for(l=0;lt&&(t=e.stats.uniformsCount)})),t},r.getMaxAttributesCount=function(){var t=0;return h.forEach((function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)})),t}),{clear:function(){var e=t.deleteShader.bind(t);Q(c).forEach(e),c={},Q(d).forEach(e),d={},h.forEach((function(e){t.deleteProgram(e.program)})),h.length=0,u={},r.shaderCount=0},program:function(e,n,i,o){var a=u[n];a||(a=u[n]={});var p=a[e];if(p&&(p.refCount++,!o))return p;var f=new s(n,e);return r.shaderCount++,l(f,i,o),p||(a[e]=f),h.push(f),W(f,{destroy:function(){if(f.refCount--,0>=f.refCount){t.deleteProgram(f.program);var e=h.indexOf(f);h.splice(e,1),r.shaderCount--}0>=a[f.vertId].refCount&&(t.deleteShader(d[f.vertId]),delete d[f.vertId],delete u[f.fragId][f.vertId]),Object.keys(u[f.fragId]).length||(t.deleteShader(c[f.fragId]),delete c[f.fragId],delete u[f.fragId])}})},restore:function(){c={},d={};for(var t=0;t>>e|t<<32-e}function D(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function I(t){return Array.prototype.slice.call(t)}function F(t){return I(t).join("")}function R(t){function e(){var t=[],e=[];return W((function(){t.push.apply(t,I(arguments))}),{def:function(){var r="v"+i++;return e.push(r),0>>4&15)+"0123456789abcdef".charAt(15&e);return r}(function(t){for(var e=Array(t.length>>2),r=0;r>5]|=(255&t.charCodeAt(r/8))<<24-r%32;var n,i,o,a,s,l,c,d,u,h,p,f=8*t.length;for(t=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],r=Array(64),e[f>>5]|=128<<24-f%32,e[15+(f+64>>9<<4)]=f,d=0;du;u++){var m;16>u?r[u]=e[u+d]:(h=u,p=D(p=O(p=r[u-2],17)^O(p,19)^p>>>10,r[u-7]),m=O(m=r[u-15],7)^O(m,18)^m>>>3,r[h]=D(D(p,m),r[u-16])),h=D(D(D(D(c,h=O(h=a,6)^O(h,11)^O(h,25)),a&s^~a&l),Mt[u]),r[u]),p=D(c=O(c=f,2)^O(c,13)^O(c,22),f&n^f&i^n&i),c=l,l=s,s=a,a=D(o,h),o=i,i=n,n=f,f=D(h,p)}t[0]=D(f,t[0]),t[1]=D(n,t[1]),t[2]=D(i,t[2]),t[3]=D(o,t[3]),t[4]=D(a,t[4]),t[5]=D(s,t[5]),t[6]=D(l,t[6]),t[7]=D(c,t[7])}for(e="",r=0;r<32*t.length;r+=8)e+=String.fromCharCode(t[r>>5]>>>24-r%32&255);return e}(function(t){for(var e,r,n="",i=-1;++i=e&&56320<=r&&57343>=r&&(e=65536+((1023&e)<<10)+(1023&r),i++),127>=e?n+=String.fromCharCode(e):2047>=e?n+=String.fromCharCode(192|e>>>6&31,128|63&e):65535>=e?n+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):2097151>=e&&(n+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return n}(r))),n[e])?n[e].apply(null,a):(r=Function.apply(null,o.concat(r)),n&&(n[e]=r),r.apply(null,a))}}}function P(t){return Array.isArray(t)||K(t)||c(t)}function j(t){return t.sort((function(t,e){return"viewport"===t?-1:"viewport"===e?1:t"+e+"?"+i+".constant["+e+"]:0;"})).join(""),"}}else{","if(",s,"(",i,".buffer)){",d,"=",o,".createStream(",34962,",",i,".buffer);","}else{",d,"=",o,".getBuffer(",i,".buffer);","}",u,'="type" in ',i,"?",a.glTypes,"[",i,".type]:",d,".dtype;",l.normalized,"=!!",i,".normalized;"),n("size"),n("offset"),n("stride"),n("divisor"),r("}}"),r.exit("if(",l.isStream,"){",o,".destroyStream(",d,");","}"),l}))})),a}function M(t,e,n,i,o){function s(t){var e=c[t];e&&(h[t]=e)}var l=function(t,e){if("string"==typeof(r=t.static).frag&&"string"==typeof r.vert){if(0>1)",s],");")}function e(){r(l,".drawArraysInstancedANGLE(",[f,m,g,s],");")}p&&"null"!==p?b?t():(r("if(",p,"){"),t(),r("}else{"),e(),r("}")):e()}function a(){function t(){r(d+".drawElements("+[f,g,v,m+"<<(("+v+"-5121)>>1)"]+");")}function e(){r(d+".drawArrays("+[f,m,g]+");")}p&&"null"!==p?b?t():(r("if(",p,"){"),t(),r("}else{"),e(),r("}")):e()}var s,l,c=t.shared,d=c.gl,u=c.draw,h=n.draw,p=function(){var i=h.elements,o=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(o=r),i=i.append(t,o),h.elementsActive&&o("if("+i+")"+d+".bindBuffer(34963,"+i+".buffer.buffer);")):(i=o.def(),o(i,"=",u,".","elements",";","if(",i,"){",d,".bindBuffer(",34963,",",i,".buffer.buffer);}","else if(",c.vao,".currentVAO){",i,"=",t.shared.elements+".getElements("+c.vao,".currentVAO.elements);",et?"":"if("+i+")"+d+".bindBuffer(34963,"+i+".buffer.buffer);","}")),i}(),f=i("primitive"),m=i("offset"),g=function(){var i=h.count,o=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(o=r),i=i.append(t,o)):i=o.def(u,".","count"),i}();if("number"==typeof g){if(0===g)return}else r("if(",g,"){"),r.exit("}");Q&&(s=i("instances"),l=t.instancing);var v=p+".type",b=h.elements&&B(h.elements)&&!h.vaoActive;Q&&("number"!=typeof s||0<=s)?"string"==typeof s?(r("if(",s,">0){"),o(),r("}else if(",s,"<0){"),a(),r("}")):o():a()}function V(t,e,r,n,i){return i=(e=w()).proc("body",i),Q&&(e.instancing=i.def(e.shared.extensions,".angle_instanced_arrays")),t(e,i,r,n),e.compile().body}function H(t,e,r,n){z(t,e),r.useVAO?r.drawVAO?e(t.shared.vao,".setVAO(",r.drawVAO.append(t,e),");"):e(t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"):(e(t.shared.vao,".setVAO(null);"),D(t,e,r,n.attributes,(function(){return!0}))),I(t,e,r,n.uniforms,(function(){return!0}),!1),F(t,e,e,r)}function q(t,e,r,n){function i(){return!0}t.batchId="a1",z(t,e),D(t,e,r,n.attributes,i),I(t,e,r,n.uniforms,i,!1),F(t,e,e,r)}function Z(t,e,r,n){function i(t){return t.contextDep&&a||t.propDep}function o(t){return!i(t)}z(t,e);var a=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var c=t.scope(),d=t.scope();e(c.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",d,"}",c.exit),r.needsContext&&S(t,d,r.context),r.needsFramebuffer&&C(t,d,r.framebuffer),L(t,d,r.state,i),r.profile&&i(r.profile)&&O(t,d,r,!1,!0),n?(r.useVAO?r.drawVAO?i(r.drawVAO)?d(t.shared.vao,".setVAO(",r.drawVAO.append(t,d),");"):c(t.shared.vao,".setVAO(",r.drawVAO.append(t,c),");"):c(t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"):(c(t.shared.vao,".setVAO(null);"),D(t,c,r,n.attributes,o),D(t,d,r,n.attributes,i)),I(t,c,r,n.uniforms,o,!1),I(t,d,r,n.uniforms,i,!0),F(t,c,d,r)):(e=t.global.def("{}"),n=r.shader.progVar.append(t,d),l=d.def(n,".id"),c=d.def(e,"[",l,"]"),d(t.shared.gl,".useProgram(",n,".program);","if(!",c,"){",c,"=",e,"[",l,"]=",t.link((function(e){return V(q,t,r,e,2)})),"(",n,");}",c,".call(this,a0[",s,"],",s,");"))}function $(t,r){function n(e){var n=r.shader[e];n&&(n=n.append(t,i),isNaN(n)?i.set(o.shader,"."+e,n):i.set(o.shader,"."+e,t.link(n,{stable:!0})))}var i=t.proc("scope",3);t.batchId="a2";var o=t.shared,a=o.current;if(S(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),j(Object.keys(r.state)).forEach((function(e){var n=r.state[e],a=n.append(t,i);b(a)?a.forEach((function(r,n){isNaN(r)?i.set(t.next[e],"["+n+"]",r):i.set(t.next[e],"["+n+"]",t.link(r,{stable:!0}))})):B(n)?i.set(o.next,"."+e,t.link(a,{stable:!0})):i.set(o.next,"."+e,a)})),O(t,i,r,!0,!0),["elements","offset","count","instances","primitive"].forEach((function(e){var n=r.draw[e];n&&(n=n.append(t,i),isNaN(n)?i.set(o.draw,"."+e,n):i.set(o.draw,"."+e,t.link(n),{stable:!0}))})),Object.keys(r.uniforms).forEach((function(n){var a=r.uniforms[n].append(t,i);Array.isArray(a)&&(a="["+a.map((function(e){return isNaN(e)?e:t.link(e,{stable:!0})}))+"]"),i.set(o.uniforms,"["+t.link(e.id(n),{stable:!0})+"]",a)})),Object.keys(r.attributes).forEach((function(e){var n=r.attributes[e].append(t,i),o=t.scopeAttrib(e);Object.keys(new J).forEach((function(t){i.set(o,"."+t,n[t])}))})),r.scopeVAO){var s=r.scopeVAO.append(t,i);isNaN(s)?i.set(o.vao,".targetVAO",s):i.set(o.vao,".targetVAO",t.link(s,{stable:!0}))}n("vert"),n("frag"),0=--this.refCount&&a(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(d).forEach((function(e){t+=d[e].stats.size})),t}),{create:function(e,r){function a(e,r){var n=0,o=0,d=32854;if("object"==typeof e&&e?("shape"in e?(n=0|(o=e.shape)[0],o=0|o[1]):("radius"in e&&(n=o=0|e.radius),"width"in e&&(n=0|e.width),"height"in e&&(o=0|e.height)),"format"in e&&(d=s[e.format])):"number"==typeof e?(n=0|e,o="number"==typeof r?0|r:n):e||(n=o=1),n!==c.width||o!==c.height||d!==c.format)return a.width=c.width=n,a.height=c.height=o,c.format=d,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,d,n,o),i.profile&&(c.stats.size=_t[c.format]*c.width*c.height),a.format=l[c.format],a}var c=new o(t.createRenderbuffer());return d[c.id]=c,n.renderbufferCount++,a(e,r),a.resize=function(e,r){var n=0|e,o=0|r||n;return n===c.width&&o===c.height||(a.width=c.width=n,a.height=c.height=o,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,c.format,n,o),i.profile&&(c.stats.size=_t[c.format]*c.width*c.height)),a},a._reglType="renderbuffer",a._renderbuffer=c,i.profile&&(a.stats=c.stats),a.destroy=function(){c.decRef()},a},clear:function(){Q(d).forEach(a)},restore:function(){Q(d).forEach((function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)})),t.bindRenderbuffer(36161,null)}}},At=[];At[6408]=4,At[6407]=3;var Tt=[];Tt[5121]=1,Tt[5126]=4,Tt[36193]=2;var Mt=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],St=["x","y","z","w"],Ct="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Et={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Lt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},zt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ot={cw:2304,ccw:2305},Dt=new N(!1,!1,!1,(function(){}));return function(t){function e(){if(0===X.length)k&&k.update(),et=null;else{et=Z.next(e),u();for(var t=X.length-1;0<=t;--t){var r=X[t];r&&r(O,null,0)}f.flush(),k&&k.update()}}function r(){!et&&0=X.length&&n()}}}}function d(){var t=G.viewport,e=G.scissor_box;t[0]=t[1]=e[0]=e[1]=0,O.viewportWidth=O.framebufferWidth=O.drawingBufferWidth=t[2]=e[2]=f.drawingBufferWidth,O.viewportHeight=O.framebufferHeight=O.drawingBufferHeight=t[3]=e[3]=f.drawingBufferHeight}function u(){O.tick+=1,O.time=p(),d(),U.procs.poll()}function h(){j.refresh(),d(),U.procs.refresh(),k&&k.update()}function p(){return($()-A)/1e3}if(!(t=o(t)))return null;var f=t.gl,v=f.getContextAttributes();f.isContextLost();var b=function(t,e){function r(e){var r;e=e.toLowerCase();try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},i=0;ie;++e)rt(W({framebuffer:t.framebuffer.faces[e]},t),l);else rt(t,l);else l(0,t)},prop:Y.define.bind(null,1),context:Y.define.bind(null,2),this:Y.define.bind(null,3),draw:s({}),buffer:function(t){return I.create(t,34962,!1,!1)},elements:function(t){return F.create(t,!1)},texture:j.create2D,cube:j.createCube,renderbuffer:N.create,framebuffer:B.create,framebufferCube:B.createCube,vao:R.createVAO,attributes:v,frame:c,on:function(t,e){var r;switch(t){case"frame":return c(e);case"lost":r=K;break;case"restore":r=Q;break;case"destroy":r=tt}return r.push(e),{cancel:function(){for(var t=0;t{"use strict";var n=r(59412),i=r(43362),o=r(20419)(),a=r(55572),s=r(48744),l=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new s("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||l(e)!==e)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in t&&a){var d=a(t,"length");d&&!d.configurable&&(n=!1),d&&!d.writable&&(c=!1)}return(n||c||!r)&&(o?i(t,"length",e,!0,!0):i(t,"length",e)),t}},46492:(t,e,r)=>{"use strict";var n=r(2214);t.exports=function(t,e,r){if(null==t)throw Error("First argument should be a string");if(null==e)throw Error("Separator should be a string or a RegExp");r?("string"==typeof r||Array.isArray(r))&&(r={ignore:r}):r={},null==r.escape&&(r.escape=!0),null==r.ignore?r.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:("string"==typeof r.ignore&&(r.ignore=[r.ignore]),r.ignore=r.ignore.map((function(t){return 1===t.length&&(t+=t),t})));var i=n.parse(t,{flat:!0,brackets:r.ignore}),o=i[0].split(e);if(r.escape){for(var a=[],s=0;s{"use strict";var n=r(37974),i=r(97883),o=r(25058),a=r(12611);t.exports=function(t){if(Array.isArray(t)&&1===t.length&&"string"==typeof t[0]&&(t=t[0]),"string"==typeof t){if(!a(t))throw Error("String is not an SVG path.");t=n(t)}if(!Array.isArray(t))throw Error("Argument should be a string or an array of path segments.");if(t=i(t),!(t=o(t)).length)return[0,0,0,0];for(var e=[1/0,1/0,-1/0,-1/0],r=0,s=t.length;re[2]&&(e[2]=l[c+0]),l[c+1]>e[3]&&(e[3]=l[c+1]);return e}},77622:(t,e,r)=>{"use strict";var n,i=r(75798),o=r(37974),a=r(61085),s=r(12611),l=r(25875),c=document.createElement("canvas"),d=c.getContext("2d");t.exports=function(t,e){if(!s(t))throw Error("Argument should be valid svg path string");var r,u;e||(e={}),e.shape?(r=e.shape[0],u=e.shape[1]):(r=c.width=e.w||e.width||200,u=c.height=e.h||e.height||200);var h=Math.min(r,u),p=e.stroke||0,f=e.viewbox||e.viewBox||i(t),m=[r/(f[2]-f[0]),u/(f[3]-f[1])],g=Math.min(m[0]||0,m[1]||0)/2;if(d.fillStyle="black",d.fillRect(0,0,r,u),d.fillStyle="white",p&&("number"!=typeof p&&(p=1),d.strokeStyle=p>0?"white":"black",d.lineWidth=Math.abs(p)),d.translate(.5*r,.5*u),d.scale(g,g),function(){if(null!=n)return n;var t=document.createElement("canvas").getContext("2d");if(t.canvas.width=t.canvas.height=1,!window.Path2D)return n=!1;var e=new Path2D("M0,0h1v1h-1v-1Z");t.fillStyle="black",t.fill(e);var r=t.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var v=new Path2D(t);d.fill(v),p&&d.stroke(v)}else{var b=o(t);a(d,b),d.fill(),p&&d.stroke()}return d.setTransform(1,0,0,1,0,0),l(d,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*h})}},91101:t=>{"use strict";t.exports=r,t.exports.float32=t.exports.float=r,t.exports.fract32=t.exports.fract=function(t,e){if(t.length){if(t instanceof Float32Array)return new Float32Array(t.length);e instanceof Float32Array||(e=r(t));for(var n=0,i=e.length;n{"use strict";var n=r(3202);t.exports=a;var i=96;function o(t,e){var r=n(getComputedStyle(t).getPropertyValue(e));return r[0]*a(r[1],t)}function a(t,e){switch(e=e||document.body,t=(t||"px").trim().toLowerCase(),e!==window&&e!==document||(e=document.body),t){case"%":return e.clientHeight/100;case"ch":case"ex":return function(t,e){var r=document.createElement("div");r.style["font-size"]="128"+t,e.appendChild(r);var n=o(r,"font-size")/128;return e.removeChild(r),n}(t,e);case"em":return o(e,"font-size");case"rem":return o(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return i;case"cm":return i/2.54;case"mm":return i/25.4;case"pt":return i/72;case"pc":return i/6}return 1}},98479:(t,e,r)=>{"use strict";var n=r(38251);t.exports=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(t){return!1}return!n(t)}},55351:(t,e,r)=>{"use strict";var n=r(36181),i=r(50406);t.exports=function(t,e,r){r&&r.errorMessage&&(t=n(r.errorMessage));var o=t.indexOf("%v"),a=o>-1?i(e):null;if(r&&r.name){var s,l,c,d,u=t.indexOf("%n");if(u>-1)return o>-1?(u>o?(s=a,c=o,l=r.name,d=u):(s=r.name,c=u,l=a,d=o),t.slice(0,c)+s+t.slice(c+2,d)+l+t.slice(d+2)):t.slice(0,u)+r.name+t.slice(u+2)}return o>-1?t.slice(0,o)+a+t.slice(o+2):t}},81114:(t,e,r)=>{"use strict";var n=r(59738),i=r(55351);t.exports=function(t,e,r){if(r&&!n(t)){if("default"in r)return r.default;if(r.isOptional)return null}var o=new(r&&r.Error||TypeError)(i(e,t,r));throw r&&r.errorCode&&(o.code=r.errorCode),o}},74165:t=>{"use strict";t.exports=function(t){try{return t.toString()}catch(e){try{return String(t)}catch(t){return null}}}},50406:(t,e,r)=>{"use strict";var n=r(74165),i=/[\n\r\u2028\u2029]/g;t.exports=function(t){var e=n(t);return null===e?"":(e.length>100&&(e=e.slice(0,99)+"…"),e=e.replace(i,(function(t){switch(t){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})))}},10818:(t,e,r)=>{"use strict";var n=r(59738),i={object:!0,function:!0,undefined:!0};t.exports=function(t){return!!n(t)&&hasOwnProperty.call(i,typeof t)}},4216:(t,e,r)=>{"use strict";var n=r(81114),i=r(15034);t.exports=function(t){if(i(t))return t;var e=arguments[1],r=e&&e.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return n(t,r,e)}},15034:(t,e,r)=>{"use strict";var n=r(98479),i=/^\s*class[\s{/}]/,o=Function.prototype.toString;t.exports=function(t){return!!n(t)&&!i.test(o.call(t))}},38251:(t,e,r)=>{"use strict";var n=r(10818);t.exports=function(t){if(!n(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}}},36181:(t,e,r)=>{"use strict";var n=r(59738),i=r(10818),o=Object.prototype.toString;t.exports=function(t){if(!n(t))return null;if(i(t)){var e=t.toString;if("function"!=typeof e)return null;if(e===o)return null}try{return""+t}catch(t){return null}}},10040:(t,e,r)=>{"use strict";var n=r(81114),i=r(59738);t.exports=function(t){if(i(t))return t;var e=arguments[1],r=e&&e.name?"Expected a value for %n, received %v":"Cannot use %v";return n(t,r,e)}},59738:t=>{"use strict";t.exports=function(t){return null!=t}},31888:(t,e,r)=>{"use strict";var n=r(88828),i=r(31338),o=r(65500).hp;r.g.__TYPEDARRAY_POOL||(r.g.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var a="undefined"!=typeof Uint8ClampedArray,s="undefined"!=typeof BigUint64Array,l="undefined"!=typeof BigInt64Array,c=r.g.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=i([32,0])),c.BIGUINT64||(c.BIGUINT64=i([32,0])),c.BIGINT64||(c.BIGINT64=i([32,0])),c.BUFFER||(c.BUFFER=i([32,0]));var d=c.DATA,u=c.BUFFER;function h(t){if(t){var e=t.length||t.byteLength,r=n.log2(e);d[r].push(t)}}function p(t){t=n.nextPow2(t);var e=n.log2(t),r=d[e];return r.length>0?r.pop():new ArrayBuffer(t)}function f(t){return new Uint8Array(p(t),0,t)}function m(t){return new Uint16Array(p(2*t),0,t)}function g(t){return new Uint32Array(p(4*t),0,t)}function v(t){return new Int8Array(p(t),0,t)}function b(t){return new Int16Array(p(2*t),0,t)}function y(t){return new Int32Array(p(4*t),0,t)}function x(t){return new Float32Array(p(4*t),0,t)}function w(t){return new Float64Array(p(8*t),0,t)}function _(t){return a?new Uint8ClampedArray(p(t),0,t):f(t)}function k(t){return s?new BigUint64Array(p(8*t),0,t):null}function A(t){return l?new BigInt64Array(p(8*t),0,t):null}function T(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=u[e];return r.length>0?r.pop():new o(t)}e.free=function(t){if(o.isBuffer(t))u[n.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|n.log2(e);d[r].push(t)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(t){h(t.buffer)},e.freeArrayBuffer=h,e.freeBuffer=function(t){u[n.log2(t.length)].push(t)},e.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return p(t);switch(e){case"uint8":return f(t);case"uint16":return m(t);case"uint32":return g(t);case"int8":return v(t);case"int16":return b(t);case"int32":return y(t);case"float":case"float32":return x(t);case"double":case"float64":return w(t);case"uint8_clamped":return _(t);case"bigint64":return A(t);case"biguint64":return k(t);case"buffer":return M(t);case"data":case"dataview":return T(t);default:return null}return null},e.mallocArrayBuffer=p,e.mallocUint8=f,e.mallocUint16=m,e.mallocUint32=g,e.mallocInt8=v,e.mallocInt16=b,e.mallocInt32=y,e.mallocFloat32=e.mallocFloat=x,e.mallocFloat64=e.mallocDouble=w,e.mallocUint8Clamped=_,e.mallocBigUint64=k,e.mallocBigInt64=A,e.mallocDataView=T,e.mallocBuffer=M,e.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,d[t].length=0,u[t].length=0}},51183:t=>{var e=/[\'\"]/;t.exports=function(t){return t?(e.test(t.charAt(0))&&(t=t.substr(1)),e.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}},6313:t=>{"use strict";t.exports=function(t,e,r){Array.isArray(r)||(r=[].slice.call(arguments,2));for(var n=0,i=r.length;n{t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},41071:(t,e,r)=>{"use strict";var n=r(68007),i=r(74205),o=r(17478),a=r(94179);function s(t){return t.call.bind(t)}var l="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,d=s(Object.prototype.toString),u=s(Number.prototype.valueOf),h=s(String.prototype.valueOf),p=s(Boolean.prototype.valueOf);if(l)var f=s(BigInt.prototype.valueOf);if(c)var m=s(Symbol.prototype.valueOf);function g(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function v(t){return"[object Map]"===d(t)}function b(t){return"[object Set]"===d(t)}function y(t){return"[object WeakMap]"===d(t)}function x(t){return"[object WeakSet]"===d(t)}function w(t){return"[object ArrayBuffer]"===d(t)}function _(t){return"undefined"!=typeof ArrayBuffer&&(w.working?w(t):t instanceof ArrayBuffer)}function k(t){return"[object DataView]"===d(t)}function A(t){return"undefined"!=typeof DataView&&(k.working?k(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=i,e.isTypedArray=a,e.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},e.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):a(t)||A(t)},e.isUint8Array=function(t){return"Uint8Array"===o(t)},e.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===o(t)},e.isUint16Array=function(t){return"Uint16Array"===o(t)},e.isUint32Array=function(t){return"Uint32Array"===o(t)},e.isInt8Array=function(t){return"Int8Array"===o(t)},e.isInt16Array=function(t){return"Int16Array"===o(t)},e.isInt32Array=function(t){return"Int32Array"===o(t)},e.isFloat32Array=function(t){return"Float32Array"===o(t)},e.isFloat64Array=function(t){return"Float64Array"===o(t)},e.isBigInt64Array=function(t){return"BigInt64Array"===o(t)},e.isBigUint64Array=function(t){return"BigUint64Array"===o(t)},v.working="undefined"!=typeof Map&&v(new Map),e.isMap=function(t){return"undefined"!=typeof Map&&(v.working?v(t):t instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),e.isSet=function(t){return"undefined"!=typeof Set&&(b.working?b(t):t instanceof Set)},y.working="undefined"!=typeof WeakMap&&y(new WeakMap),e.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(y.working?y(t):t instanceof WeakMap)},x.working="undefined"!=typeof WeakSet&&x(new WeakSet),e.isWeakSet=function(t){return x(t)},w.working="undefined"!=typeof ArrayBuffer&&w(new ArrayBuffer),e.isArrayBuffer=_,k.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&k(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=A;var T="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function M(t){return"[object SharedArrayBuffer]"===d(t)}function S(t){return void 0!==T&&(void 0===M.working&&(M.working=M(new T)),M.working?M(t):t instanceof T)}function C(t){return g(t,u)}function E(t){return g(t,h)}function L(t){return g(t,p)}function z(t){return l&&g(t,f)}function O(t){return c&&g(t,m)}e.isSharedArrayBuffer=S,e.isAsyncFunction=function(t){return"[object AsyncFunction]"===d(t)},e.isMapIterator=function(t){return"[object Map Iterator]"===d(t)},e.isSetIterator=function(t){return"[object Set Iterator]"===d(t)},e.isGeneratorObject=function(t){return"[object Generator]"===d(t)},e.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===d(t)},e.isNumberObject=C,e.isStringObject=E,e.isBooleanObject=L,e.isBigIntObject=z,e.isSymbolObject=O,e.isBoxedPrimitive=function(t){return C(t)||E(t)||L(t)||z(t)||O(t)},e.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(_(t)||S(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))},11276:(t,e,r)=>{var n=r(39807),i=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&e._extend(n,r),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=d),h(n,t,n.depth)}function d(t,e){var r=c.styles[e];return r?"["+c.colors[r][0]+"m"+t+"["+c.colors[r][1]+"m":t}function u(t,e){return t}function h(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=h(t,i,n)),i}var o=function(t,e){if(x(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):v(e)?t.stylize("null","null"):void 0}(t,r);if(o)return o;var a=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),A(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return p(r);if(0===a.length){if(T(r)){var l=r.name?": "+r.name:"";return t.stylize("[Function"+l+"]","special")}if(w(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return t.stylize(Date.prototype.toString.call(r),"date");if(A(r))return p(r)}var c,d="",u=!1,_=["{","}"];return m(r)&&(u=!0,_=["[","]"]),T(r)&&(d=" [Function"+(r.name?": "+r.name:"")+"]"),w(r)&&(d=" "+RegExp.prototype.toString.call(r)),k(r)&&(d=" "+Date.prototype.toUTCString.call(r)),A(r)&&(d=" "+p(r)),0!==a.length||u&&0!=r.length?n<0?w(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=u?function(t,e,r,n,i){for(var o=[],a=0,s=e.length;a60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(c,d,_)):_[0]+d+_[1]}function p(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,i,o){var a,s,l;if((l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),E(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(l.value)<0?(s=v(r)?h(t,l.value,null):h(t,l.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").slice(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function m(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function v(t){return null===t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function x(t){return void 0===t}function w(t){return _(t)&&"[object RegExp]"===M(t)}function _(t){return"object"==typeof t&&null!==t}function k(t){return _(t)&&"[object Date]"===M(t)}function A(t){return _(t)&&("[object Error]"===M(t)||t instanceof Error)}function T(t){return"function"==typeof t}function M(t){return Object.prototype.toString.call(t)}function S(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!a[t])if(s.test(t)){var r=n.pid;a[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else a[t]=function(){};return a[t]},e.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(41071),e.isArray=m,e.isBoolean=g,e.isNull=v,e.isNullOrUndefined=function(t){return null==t},e.isNumber=b,e.isString=y,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=x,e.isRegExp=w,e.types.isRegExp=w,e.isObject=_,e.isDate=k,e.types.isDate=k,e.isError=A,e.types.isNativeError=A,e.isFunction=T,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(26900);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function E(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log("%s - %s",(r=[S((t=new Date).getHours()),S(t.getMinutes()),S(t.getSeconds())].join(":"),[t.getDate(),C[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(9715),e._extend=function(t,e){if(!e||!_(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var L="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function z(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(L&&t[L]){var e;if("function"!=typeof(e=t[L]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,L,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o{var n=r(64487);t.exports=function(t){return n("webgl",t)}},17478:(t,e,r)=>{"use strict";var n=r(85573),i=r(75208),o=r(61398),a=r(24310),s=r(55572),l=a("Object.prototype.toString"),c=r(15541)(),d="undefined"==typeof globalThis?r.g:globalThis,u=i(),h=a("String.prototype.slice"),p=Object.getPrototypeOf,f=a("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r-1?e:"Object"===e&&function(t){var e=!1;return n(m,(function(r,n){if(!e)try{r(t),e=h(n,1)}catch(t){}})),e}(t)}return s?function(t){var e=!1;return n(m,(function(r,n){if(!e)try{"$"+r(t)===n&&(e=h(n,1))}catch(t){}})),e}(t):null}},32688:(t,e,r)=>{"use strict";const n=r(12028);n.register([r(94646),r(72010)]),t.exports=n},90170:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n='\n'},96144:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>v});var n=r(85072),i=r.n(n),o=r(97825),a=r.n(o),s=r(77659),l=r.n(s),c=r(55056),d=r.n(c),u=r(10540),h=r.n(u),p=r(41113),f=r.n(p),m=r(5955),g={};g.styleTagTransform=f(),g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=h(),i()(m.A,g);const v=m.A&&m.A.locals?m.A.locals:void 0},85072:t=>{"use strict";var e=[];function r(t){for(var r=-1,n=0;n{"use strict";var e={};t.exports=function(t,r){var n=function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},10540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},55056:(t,e,r)=>{"use strict";t.exports=function(t){var e=r.nc;e&&t.setAttribute("nonce",e)}},97825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(r){!function(t,e,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var i=void 0!==r.layer;i&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,i&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,r)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},41113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},88862:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(34961),i=r.n(n);class o{constructor(t,e){this._element=t,this._parent=null,this._visible=!1,this._horizontal=this._element.classList.contains("horizontal"),this._property=this._horizontal?"width":"height";const r=this._element.dataset.bsParent;r&&(this._parent=e.querySelector(r),i()(this._parent,"this._parent")),this._element.addEventListener("transitionend",(t=>{t.target===t.currentTarget&&t.propertyName===this._property&&(this._element.classList.replace("collapsing","collapse"),this._visible&&(this._element.classList.add("show"),this._element.style.removeProperty(this._property)))}))}hide(){if(this._visible){const t=this._element.getBoundingClientRect()[this._property];this._element.style.setProperty(this._property,`${t}px`),this._element.classList.replace("collapse","collapsing"),this._element.classList.remove("show"),this._element.offsetHeight,this._element.style.removeProperty(this._property),this._visible=!1,this._parent&&d.get(this._parent)===this&&d.set(this._parent,null)}}show(){var t;if(!this._visible){this._parent&&(null===(t=d.get(this._parent))||void 0===t||t.hide(),d.set(this._parent,this));const e=this._horizontal?"scrollWidth":"scrollHeight";this._element.classList.replace("collapse","collapsing"),this._element.style.setProperty(this._property,"0");const r=this._element[e];this._element.style.setProperty(this._property,`${r}px`),this._visible=!0}}toggle(t=!this._visible){t?this.show():this.hide()}addTrigger(t){t.addEventListener("click",(t=>{t.preventDefault(),this.toggle()}))}static initialize(t=document.body){for(const e of t.querySelectorAll("[data-bs-toggle]"))if(e instanceof HTMLElement&&"bsTarget"in e.dataset){const r=t.querySelector(e.dataset.bsTarget);r&&s(r,t).addTrigger(e)}}}const a=new WeakMap,s=(l=a,c=(t,e)=>new o(t,e),(t,...e)=>{l.has(t)||l.set(t,c(t,...e));const r=l.get(t);return i()(r,"value"),r});var l,c;const d=new WeakMap},31945:(t,e,r)=>{"use strict";r.d(e,{DefaultVisualizer:()=>Mn,version:()=>Sn});var n={};r.r(n),r.d(n,{decode:()=>H,encode:()=>Y,format:()=>Z,parse:()=>st});var i={};r.r(i),r.d(i,{Any:()=>dt,Cc:()=>ut,Cf:()=>ht,P:()=>lt,S:()=>ct,Z:()=>pt});var o={};r.r(o),r.d(o,{arrayReplaceAt:()=>Nt,assign:()=>jt,escapeHtml:()=>Jt,escapeRE:()=>Qt,fromCodePoint:()=>Ut,has:()=>Pt,isMdAsciiPunct:()=>ne,isPunctChar:()=>re,isSpace:()=>te,isString:()=>Ft,isValidEntityCode:()=>Bt,isWhiteSpace:()=>ee,lib:()=>oe,normalizeReference:()=>ie,unescapeAll:()=>qt,unescapeMd:()=>Wt});var a={};r.r(a),r.d(a,{parseLinkDestination:()=>se,parseLinkLabel:()=>ae,parseLinkTitle:()=>le}),r(86643);var s=r(34961),l=r.n(s);class c{constructor(t,e){if(this._structures=t,this._environments=e,this._activeStructures=[],this._activeAtoms=Array.from({length:this._structures.length}).map((()=>[])),void 0!==this._environments){for(const t of this._environments)this._activeAtoms[t.structure].push(t.center);for(let t=0;t0){this._activeStructures.push(t);for(let r=0;rt-e));for(let t=0;tt-e))}fromEnvironment(t,e){if("structure"===e)return{environment:t,structure:t};l()(void 0!==this._environments,"this._environments !== undefined"),l()(t\n
\n \n `;const n=r.content.firstChild;t.appendChild(n),this._valid=[],this._slider=n.querySelector("input"),this._play=n.querySelector(".chsp-play-button"),this._play.onclick=()=>{this._play.classList.toggle("chsp-playing"),this.startPlayback((()=>this._play.classList.contains("chsp-playing")))},this._slider.onchange=()=>this.onchange(),this.onchange=()=>{},this.startPlayback=()=>{}}reset(t){this._valid=t,this._slider.value="0",this._slider.max=""+(this._valid.length-1)}update(t){const e=(0,d.El)(this._valid,t);l()(-1!==e,"position !== -1"),this._slider.value=e.toString()}value(){return this._valid[parseInt(this._slider.value,10)]}}function v(t,e,r,n,i,o){const a={xref:"paper",yref:"paper",xaxis:{title:i,titlefont:{size:12},showgrid:!1,zeroline:!1,showline:!0,nticks:5},yaxis:{title:o,titlefont:{size:12},showgrid:!1,showline:!0,zeroline:!1,nticks:4},showlegend:!1,x:.2,legend:{y:.5},margin:{l:n/6,r:0,b:n/6,t:0,pad:0},width:n,height:n/1.35,tracetoggle:!1},s=[{x:t,y:e,type:"scatter",mode:"lines"}];h().newPlot(r,s,a,{displayModeBar:!1,responsive:!0,staticPlot:!1})}class b{constructor(t,e,r,n,i){const o=document.createElement("template");o.innerHTML=`
\n
\n \n \n \n
\n
`;const a=o.content.firstChild;t.appendChild(a),this._root=t,this._header=a.querySelector("th"),this._target=e,this._properties=[];const s=a.querySelector("tbody");for(const t in n){const e=document.createElement("tr"),r=document.createElement("td"),o=n[t].units;let a=t;void 0!==o&&(a+=`/${o}`);const l=n[t].description;if(void 0!==l){r.innerHTML='';const t=r.firstChild;t.innerText=a,t.setAttribute("title",l)}else r.innerText=a;e.appendChild(r);const c=document.createElement("td");e.appendChild(c),s.appendChild(e);const d=n[t].parameters;if(void 0===d)this._properties.push({cell:c,values:n[t].values});else if(i&&"string"==typeof d[0]){let e=d[0];const o=i[d[0]].units;void 0!==o&&(e+=`/${o}`);const s=document.createElement("div");s.style.display="block",s.style.width="100%",c.appendChild(s),this._properties.push({cell:c,values:n[t].values,parameter:i[d[0]].values,xlabel:e,ylabel:a});const l=document.createElement("button");l.classList.add("btn","btn-secondary","btn-sm","chsp-toggle-plot-btn"),l.textContent="Show/Hide",l.onclick=()=>{"block"===s.style.display?s.style.display="none":s.style.display="block"},r.appendChild(l)}}this.show({environment:0,structure:0,atom:0})}show(t){let e,r;"structure"===this._target?(e=t.structure+1,r=t.structure):(l()("atom"===this._target,"this._target === 'atom'"),l()(void 0!==t.atom,"indexes.atom !== undefined"),e=t.atom+1,r=t.environment),this._header.innerText=`Properties for ${this._target} ${e}`;for(const t of this._properties)if(Array.isArray(t.values[r])){const e=this._root.offsetWidth/1.5;l()(null!==t.cell.firstElementChild,"s.cell.firstElementChild !== null"),v(t.parameter,t.values[r],t.cell.firstElementChild,e,t.xlabel,t.ylabel)}else t.cell.innerText=t.values[r].toString()}}const y='\n\n \n \n \n \n \n\n\x3c!--Icon taken from www.icons8.com and edited in Inkscape--\x3e\n';var x=r(48654),w=r(62621);function _(t,e){const r={};for(const n in t)Object.hasOwnProperty.call(t,n)&&e(t[n])&&(r[n]=t[n]);return r}class k{constructor(t,e,r,n,i){this.onchange=()=>{},this.playbackDelay=700;const o=(0,d.V6)(t),a=document.createElement("div");o.appendChild(a),this._shadow=a.attachShadow({mode:"open"}),this._shadow.adoptedStyleSheets=[x.A,w.A,p],this._root=document.createElement("div"),this._shadow.appendChild(this._root),this._indexer=r,this._target=n,this._properties=e,this._parameters=i,this._structure={number:document.createElement("input"),slider:new g(document.createElement("div"),"structure"),table:new b(document.createElement("div"),"structure","structure",e,i)},this._renderTargetPart()}switchTarget(t){this._target=t,this._renderTargetPart()}show(t){const e=this._indexes().structure;if(this._structure.number.value=`${t.structure+1}`,this._structure.slider.update(t.structure),this._structure.table.show(t),t.structure!==e&&void 0!==this._atom){const e=this._indexer.activeAtoms(t.structure);this._atom.number.value=`${e[0]+1}`,this._atom.slider.reset(e)}if(void 0!==t.atom)if(void 0===this._atom){if(0!==t.atom)throw Error("Invalid state: got an atomic number to update, but I am displaying only structures")}else this._atom.number.value=`${t.atom+1}`,this._atom.slider.update(t.atom),this._atom.table.show(t)}remove(){this._shadow.host.remove()}_renderTargetPart(){this._root.innerHTML=this._getMainHTMLStructure();const t=_(this._properties,(t=>"structure"===t.target));if(this._structure=this._createStructure(t,this._parameters),"atom"===this._target){const t=_(this._properties,(t=>"atom"===t.target));this._atom=this._createAtom(t,this._parameters)}else this._atom=void 0;m.A.initialize(this._root)}_getMainHTMLStructure(){const t="atom"===this._target?`\n `:"
";return`\n
\n
\n \n ${t}\n
`}_createStructure(t,e){const r=new g(this._root,"structure");r.reset(this._indexer.activeStructures()),r.startPlayback=t=>{setTimeout((()=>{if(t()){const e=this._findNextValidIndex(this._indexes().structure,this._indexer.structuresCount(),(t=>this._indexer.fromStructure(t,this._target)));void 0!==e&&(this.show(this._indexer.fromStructure(e,this._target)),this.onchange(this._indexes()),r.startPlayback(t))}}),this.playbackDelay)},r.onchange=()=>{const t=this._structure.slider.value();if(void 0!==this._atom){const e=this._indexer.activeAtoms(t);if(0===e.length)return void(0,d.R4)(`Cannot change to structure ${t+1}, which does not contain any active atoms`);this._atom.number.value=`${e[0]+1}`,this._atom.number.max=`${e.length}`,this._atom.slider.reset(e)}const e=this._indexes();l()(void 0!==e,"indexes !== undefined"),this._structure.table.show(e),this._structure.number.value=`${e.structure+1}`,void 0!==this._atom&&this._atom.table.show(e),this.onchange(e)};const n=this._root.children[0];l()("div"===n.tagName.toLowerCase(),"tableRoot.tagName.toLowerCase() === 'div'");const i=new b(n,"structure","structure",t,e),o=this._createNumberInput(".chsp-info-structure-btn .chsp-info-number",this._indexer.structuresCount().toString(),(t=>{if(isNaN(t)||t<0||t>=parseInt(o.max,10))o.value=`${this._structure.slider.value()+1}`;else if(-1===(0,d.El)(this._indexer.activeStructures(),t))o.value=`${this._structure.slider.value()+1}`;else{if(this._structure.slider.update(t),void 0!==this._atom){const e=this._indexer.activeAtoms(t);this._atom.number.value=`${e[0]+1}`,this._atom.number.max=`${e.length}`,this._atom.slider.reset(e)}const e=this._indexes();this._structure.table.show(e),void 0!==this._atom&&this._atom.table.show(e),this.onchange(e)}}));return{number:o,slider:r,table:i}}_createAtom(t,e){const r=new g(this._root,"atom");r.reset(this._indexer.activeAtoms(this._structure.slider.value())),r.startPlayback=t=>{setTimeout((()=>{if(t()){const e=this._indexes();l()(void 0!==e.atom,"current.atom !== undefined");const n=this._findNextValidIndex(e.atom,this._indexer.atomsCount(e.structure),(t=>this._indexer.fromStructureAtom(this._target,e.structure,t)));void 0!==n&&(this.show(this._indexer.fromStructureAtom(this._target,e.structure,n)),this.onchange(this._indexes()),r.startPlayback(t))}}),this.playbackDelay)},r.onchange=()=>{l()(void 0!==this._atom,"this._atom !== undefined");const t=this._indexes();if(void 0!==t)l()(void 0!==t.atom,"indexes.atom !== undefined"),this._atom.table.show(t),this._atom.number.value=`${t.atom+1}`,this.onchange(t);else{const t=this._structure.slider.value(),e=this._atom.slider.value();(0,d.R4)(`Environment for atom ${e} in structure ${t} is not part of this dataset`)}};const n=this._root.children[0];l()("div"===n.tagName.toLowerCase(),"tableRoot.tagName.toLowerCase() === 'div'");const i=new b(n,"atom","atom",t,e),o=this._createNumberInput(".chsp-info-atom-btn .chsp-info-number",this._indexer.atomsCount(this._structure.slider.value()).toString(),(t=>{l()(void 0!==this._atom,"this._atom !== undefined");const e=this._indexer.activeAtoms(this._structure.slider.value());if(isNaN(t)||t<0||t>=parseInt(o.max,10))o.value=`${this._atom.slider.value()+1}`;else if(-1===(0,d.El)(e,t))o.value=`${this._atom.slider.value()+1}`;else{this._atom.slider.update(t);const e=this._indexes();this._atom.table.show(e),this.onchange(e)}}));return{number:o,slider:r,table:i}}_findNextValidIndex(t,e,r){let n=0;for(;n<=e;){if(void 0!==r(t=(t+1)%e))return t;n++}}_createNumberInput(t,e,r){const n=this._root.querySelector(t);return n.max=e,n.onchange=()=>r(parseInt(n.value,10)-1),n.onclick=t=>t.stopPropagation(),n}_indexes(){const t=this._structure.slider.value();let e;if(void 0!==this._atom){const r=this._atom.slider.value();e=this._indexer.fromStructureAtom(this._target,t,r)}else l()("atom"!==this._target,"this._target !== 'atom'"),e=this._indexer.fromStructureAtom(this._target,t);return l()(void 0!==e,"indexes !== undefined"),e}}class A{constructor(){this._values=[]}get(t){let e=this._values.findIndex((e=>e===t));return-1===e&&(e=this._values.length,this._values.push(t)),e}string(t){if(t>=this._values.length)throw Error("requested unknown string from interner");return this._values[t]}strings(){return this._values}}function T(t,e){const r=typeof e.values[0];if("number"===r)return{values:e.values,units:e.units};if("string"===r){const r=new A,n=[];for(const i of e.values){const e=r.get(i);if(n.push(e),e>20)throw Error(`the '${t}' property contains more than 50 different values, it can not be interpreted as categories`)}return{string:r,values:n,units:e.units}}if(!Array.isArray(e.values[0]))throw Error(`unexpected property type '${r}'`)}function M(t,e){let r,n;for(const i in e)if(void 0!==r){if(e[i].values.length!==r)throw Error(`${t} property '${i}' do not have the same size as the first property '${n}': expected ${r}, got ${e[i].values.length}`)}else r=e[i].values.length,n=i}class S{constructor(t){this.structure={},this.atom={},this.maxSymbols=-1;for(const e in t){let r;try{r=T(e,t[e])}catch(t){(0,d.R4)(`warning: ${t.message}`);continue}void 0!==r&&(this[t[e].target][e]=r,void 0!==r.string&&(this.maxSymbols=Math.max(this.maxSymbols,r.string.strings().length)))}M("structure",this.structure),M("atom",this.atom)}}class C{constructor(t,e,r,n=!0){const i=document.createElement("div");i.classList.add("chsp-pin-marker","chsp-map-pin-marker"),i.id=`chsp-selected-${t}`,i.style.backgroundColor=e,this.marker=i,this.toggleVisible(n),this.color=e,this.current=r}update(t){isFinite(t.x)&&isFinite(t.y)?(this.marker.style.top=`${t.y}px`,this.marker.style.right=`${t.x}px`):this.toggleVisible(!1)}select(t){return this.current!==t.environment&&(this.current=t.environment,!0)}activate(){this.marker.classList.toggle("chsp-active-pin",!0)}deactivate(){this.marker.classList.toggle("chsp-active-pin",!1)}remove(){l()(null!==this.marker.parentNode,"this.marker.parentNode !== null"),this.marker.parentNode.removeChild(this.marker)}toggleVisible(t){this.marker.style.display=t?"block":"none"}}var E=r(50112),L=r(45127),z=r(17136),O=r(90170);const D=["circle","square","diamond","cross","x"];function I(t){return D[t%D.length]}class F extends L.W2{constructor(t){l()(t.length>0,"validProperties.length > 0"),super(),this.max=new L.Je("number",NaN),this.min=new L.Je("number",NaN),this.property=new L.Je("string",t[0]),this.scale=new L.Je("string","linear"),this.property.validate=(0,L.qP)(t,"axis"),this.scale.validate=(0,L.qP)(["linear","log"],"axis scale")}disable(){this.max.disable(),this.min.disable(),this.scale.disable()}enable(){this.max.enable(),this.min.enable(),this.scale.enable()}}class R extends L.W2{constructor(t,e,r,n={}){super();const i=Object.keys(e);if(i.length<2)throw new Error("Cannot show a map because the dataset contains fewer than two properties.");this.x=new F(i),this.y=new F(i),this.z=new F(i.concat([""])),this.symbol=new L.Je("string","");const o=[""];for(const t in e)void 0!==e[t].string&&o.push(t);this.symbol.validate=(0,L.qP)(o,"symbol"),this.palette=new L.Je("string","inferno"),this.palette.validate=(0,L.qP)(Object.keys(z.s),"palette"),this.color={mode:new L.Je("string","linear"),property:new L.Je("string",""),min:new L.Je("number",NaN),max:new L.Je("number",NaN)},this.color.property.validate=(0,L.qP)(i.concat([""]),"color"),this.color.mode.validate=(0,L.qP)(["linear","log","sqrt","inverse"],"mode"),this.size={factor:new L.Je("number",50),mode:new L.Je("string","linear"),property:new L.Je("string","")},this.size.property.validate=(0,L.qP)(i.concat([""]),"size"),this.size.factor.validate=t=>{if(t<1||t>100)throw Error(`size factor must be between 0 and 100, got ${t}`)},this.size.mode.validate=(0,L.qP)(["linear","log","sqrt","inverse","flip-linear","proportional"],"mode"),this.markerOutline=new L.Je("boolean",!0),this.joinPoints=new L.Je("boolean",!1),this.x.property.value=i[0],this.y.property.value=i[1],this.z.property.value="",i.length>2?this.color.property.value=i[2]:this.color.property.value="",this._positionSettingsModal=r;const{openModal:a,modal:s}=this._createSettingsHTML();this._modal=s,this._openModal=a,t.appendChild(this._openModal),this._bind(e),this.applySettings(n)}getModalElement(t){return(0,d.VT)(t,this._modal.shadow)}applySettings(t){if("size"in t){const e=t.size;"mode"in e&&"constant"===e.mode&&(delete e.mode,e.property="")}if("color"in t){const e=t.color;"scale"in e&&(e.mode=e.scale,delete e.scale)}super.applySettings(t)}remove(){this._modal.remove(),this._openModal.remove()}is3D(){return""!==this.z.property.value}hasColors(){return""!==this.color.property.value}hovertemplate(){if(this.hasColors()){let t=this.color.property.value;switch(this.color.mode.value){case"inverse":t=`(${t})-1`;break;case"log":t=`log(${t})`;break;case"sqrt":t=`sqrt(${t})`}return t+": %{marker.color:.2f}"}return"%{x:.2f}, %{y:.2f}"}calculateColors(t){let e=this.color.mode.value;const{min:r,max:n}=(0,d.GI)(t);return n===r&&(e="fixed"),t.map((t=>{let r=.5;switch(e){case"inverse":r=1/t;break;case"log":r=Math.log10(t);break;case"sqrt":r=Math.sqrt(t);break;case"linear":r=1*t;break;default:r=.5}return isNaN(r)?"#aaaaaa":r}))}calculateSizes(t){const e=(t=>{const e=Math.log(1/6),r=(Math.log(6)-e)/99;return Math.exp(e+r*(t-1))})(this.size.factor.value);let r=this.size.mode.value;const{min:n,max:i}=(0,d.GI)(t),o=this.is3D()?800:300,a=n>0?n:1e-6*(i-n),s=t.map((t=>{let s=.3;switch(i===n?r="fixed":s=(t-n)/(i-n),r){case"proportional":s=t/Math.abs(i);break;case"inverse":s=a/t;break;case"log":s=Math.log(t/a)/Math.log(i/a);break;case"sqrt":s=Math.sqrt(t/Math.abs(i));break;case"linear":s*=1;break;case"flip-linear":s=1-s;break;default:s=.3-.1}return s+=.1,o*s*e}));return s.some((t=>isNaN(t)||t<0))?((0,d.R4)(`After applying the selected scaling mode ${r}, some point sizesevaluated to invalid values. These points will be displayed at the minimum size.`),s.map((t=>isNaN(t)?.1*o*e:t))):s}getSymbols(t){l()(void 0!==t.string,"property.string !== undefined");const e=t.string.strings().length;return this.is3D()?(e>D.length&&(0,d.R4)(`${e} symbols are required, but we only have ${D.length}. Some symbols will be repeated`),t.values.map(I)):t.values}_createSettingsHTML(){const t=document.createElement("template");t.innerHTML=`\n
${O.A}
\n `;const e=t.content.firstChild;t.innerHTML='\n';const r=t.content.querySelector(".modal");l()(null!==r&&r instanceof HTMLElement,"modalElement !== null && modalElement instanceof HTMLElement");const n=r.querySelector(".modal-dialog");l()(null!==n&&n instanceof HTMLElement,"modalDialog !== null && modalDialog instanceof HTMLElement"),(0,d.eB)(n,".modal-header");const i=new E.A(r);return i.shadow.adoptedStyleSheets=[x.A,w.A],m.A.initialize(r),e.addEventListener("click",(()=>{if(null===n.getAttribute("data-initial-modal-positions-set")){n.setAttribute("data-initial-modal-positions-set","true"),n.parentNode.style.display="block",n.style.width=n.offsetWidth/1.5+"px",n.style.minWidth="500px",n.style.margin="0",n.style.position="fixed";const{top:t,left:e}=this._positionSettingsModal(n.getBoundingClientRect());n.style.top=`${t}px`,n.style.left=`${e}px`}i.open()})),r.addEventListener("keydown",(t=>{t.stopPropagation()})),{openModal:e,modal:i}}_bind(t){const e=this.getModalElement("map-x-property");e.options.length=0;for(const r in t)e.options.add(new Option(r,r));this.x.property.bind(e,"value"),this.x.min.bind(this.getModalElement("map-x-min"),"value"),this.x.max.bind(this.getModalElement("map-x-max"),"value"),this.x.scale.bind(this.getModalElement("map-x-scale"),"value");const r=this.getModalElement("map-y-property");r.options.length=0;for(const e in t)r.options.add(new Option(e,e));this.y.property.bind(r,"value"),this.y.min.bind(this.getModalElement("map-y-min"),"value"),this.y.max.bind(this.getModalElement("map-y-max"),"value"),this.y.scale.bind(this.getModalElement("map-y-scale"),"value");const n=this.getModalElement("map-z-property");n.options.length=0,n.options.add(new Option("none",""));for(const e in t)n.options.add(new Option(e,e));this.z.property.bind(n,"value"),this.z.min.bind(this.getModalElement("map-z-min"),"value"),this.z.max.bind(this.getModalElement("map-z-max"),"value"),this.z.scale.bind(this.getModalElement("map-z-scale"),"value");const i=this.getModalElement("map-color-property");i.options.length=0,i.options.add(new Option("fixed",""));for(const e in t)i.options.add(new Option(e,e));this.color.property.bind(i,"value"),this.color.mode.bind(this.getModalElement("map-color-transform"),"value"),this.color.min.bind(this.getModalElement("map-color-min"),"value"),this.color.max.bind(this.getModalElement("map-color-max"),"value");const o=this.getModalElement("map-color-palette");o.length=0;for(const t in z.s)o.options.add(new Option(t,t));this.palette.bind(o,"value");const a=this.getModalElement("map-symbol-property");a.options.length=0,a.options.add(new Option("fixed",""));for(const e in t)void 0!==t[e].string&&a.options.add(new Option(e,e));this.symbol.bind(a,"value");const s=this.getModalElement("map-size-property");s.options.length=0,s.options.add(new Option("fixed",""));for(const e in t)s.options.add(new Option(e,e));this.size.property.bind(s,"value"),this.size.factor.bind(this.getModalElement("map-size-factor"),"value"),this.size.mode.bind(this.getModalElement("map-size-transform"),"value"),this.markerOutline.bind(this.getModalElement("map-marker-outline"),"checked"),this.joinPoints.bind(this.getModalElement("map-join-points"),"checked")}colorScale(){return z.s[this.palette.value]}setLogLabel(t,e){const r=this.getModalElement(`map-${e}-min-label`),n=this.getModalElement(`map-${e}-max-label`);"log"===t.scale.value?(r.innerHTML="min: 10^",n.innerHTML="max: 10^"):(r.innerHTML="min:",n.innerHTML="max:")}}const P='\n\n \n \n\n\x3c!--Icon taken from www.uxwing.com and edited in Inkscape--\x3e\n\n';const j={coloraxis:{cmax:0,cmin:0,colorbar:{len:1,thickness:20,title:{text:"",side:"right",font:{size:15}},y:0,yanchor:"bottom"},colorscale:[],showscale:!0},hovermode:"closest",legend:{itemclick:!1,itemdoubleclick:!1,tracegroupgap:5,y:1,yanchor:"top"},margin:{b:50,l:50,r:50,t:50},scene:{camera:{projection:{type:"orthographic"}},xaxis:{showspikes:!1,title:""},yaxis:{showspikes:!1,title:""},zaxis:{showspikes:!1,title:""}},showlegend:!0,xaxis:{range:void 0,title:"",type:"linear",zeroline:!1},yaxis:{range:void 0,title:"",type:"linear",zeroline:!1},zaxis:{range:void 0,title:"",type:"linear",zeroline:!1}},N={displayModeBar:!0,displaylogo:!1,responsive:!0,scrollZoom:!0,modeBarButtonsToRemove:["hoverClosestCartesian","hoverCompareCartesian","toggleSpikelines","autoScale2d","zoomIn2d","zoomOut2d","select2d","lasso2d","hoverClosest3d","tableRotation","resetCameraLastSave3d","toImage"],modeBarButtonsToAdd:[[{name:"Download PNG",icon:{width:400,height:447,path:U(P)},click:function(t){h().downloadImage(t,{filename:"chemiscope-map",format:"png",width:Math.max(t._fullLayout.width,600),height:Math.max(t._fullLayout.width,600)}).catch((t=>setTimeout((()=>{throw t}))))}}],[{name:"Download SVG",icon:{width:400,height:447,path:U('\n\n \n \n \n\x3c!--Icon taken from www.uxwing.com and edited in Inkscape--\x3e\n\n')},click:function(t){h().downloadImage(t,{filename:"chemiscope-map",format:"svg",width:Math.max(t._fullLayout.width,600),height:Math.max(t._fullLayout.height,600)}).catch((t=>setTimeout((()=>{throw t}))))}}]]};class B{constructor(t,e,r,n,i){this._getAxisRange=(t,e,r)=>{const n=!isNaN(t),i=!isNaN(e);if(n&&i){if(t<=e)return[t,e];(0,d.R4)(`The inserted min and max values in ${r} are such that min > max!The default values will be used.`)}return[n?t:void 0,i?e:void 0]},this._indexer=r,this._target=n,this.onselect=()=>{},this.activeChanged=()=>{},this._selected=new Map;const o=(0,d.V6)(t),a=document.createElement("div");a.style.setProperty("height","100%"),o.appendChild(a),this._shadow=a.attachShadow({mode:"open"}),this._root=document.createElement("div"),this._root.style.setProperty("height","100%"),this._shadow.appendChild(this._root),""===this._root.style.position&&(this._root.style.position="relative"),this._plot=document.createElement("div"),this._plot.style.width="100%",this._plot.style.height="100%",this._root.appendChild(this._plot),this._data=new S(i);const s=this._getCurrentProperties();var l;this._options=new R(this._root,s,(t=>this.positionSettingsModal(t)),e),this._colorReset=this._options.getModalElement("map-color-reset"),this._connectSettings(),this.positionSettingsModal=t=>{const e=this._root.getBoundingClientRect();return{left:e.left+e.width/2-t.width/2,top:e.top+20}},this._createPlot(),this._shadow.adoptedStyleSheets=[x.A,w.A,p,(l=this._plot,f(l._fullLayout._modeBar._uid))]}switchTarget(t){return e=this,r=void 0,i=function*(){if(t!==this._target){if(this._target=t,this._handleMarkers(),void 0!==this._active){const t=this._selected.get(this._active);void 0!==t&&this.onselect(this._indexer.fromEnvironment(t.current,this._target))}this._setupMapOptions(),this._connectSettings(),yield this._react(this._getTraces(),this._getLayout())}},new((n=void 0)||(n=Promise))((function(t,o){function a(t){try{l(i.next(t))}catch(t){o(t)}}function s(t){try{l(i.throw(t))}catch(t){o(t)}}function l(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,s)}l((i=i.apply(e,r||[])).next())}));var e,r,n,i}_handleMarkers(){var t;for(const[e,r]of this._selected.entries()){if("structure"===this._target)r.current=this._indexer.fromEnvironment(r.current,"atom").structure;else{const e=null===(t=this._indexer.fromStructure(r.current,"atom"))||void 0===t?void 0:t.environment;l()(void 0!==e,"environment !== undefined"),r.current=e}this._selected.set(e,r)}}remove(){var t;this._shadow.host.remove(),this._options.remove(),null===(t=document.getElementById("js-plotly-tester"))||void 0===t||t.remove(),this._plotFix.disable()}select(t){if(void 0===this._active)throw Error("tries to update selected environment, but there is no active marker");if(void 0===t.environment){const e=this._indexer.fromStructureAtom(this._target,t.structure,t.atom);if(void 0===e){const e=void 0===t.atom?"":` / atom ${t.atom}`;throw Error(`can not find the environnement for structure ${t.structure}`+e)}t=e}const e=this._selected.get(this._active);l()(void 0!==e,"data !== undefined"),e.select(t)&&this._updateMarkers()}setActive(t){if(void 0!==this._active){const t=this._selected.get(this._active);l()(void 0!==t,"oldData !== undefined"),t.deactivate()}this._active=t;const e=this._selected.get(this._active);l()(void 0!==e,"data !== undefined"),e.activate(),this._is3D()&&this._restyle({"marker.size":this._sizes(1)},1)}addMarker(t,e,r){l()(!this._selected.has(t),"!this._selected.has(guid)");const n=new C(t,e,r.environment);this._root.appendChild(n.marker),n.marker.onclick=()=>{this.setActive(t),this.activeChanged(t,this._indexer.fromEnvironment(n.current,this._target))},this._selected.set(t,n),this._updateMarkers([n]),this.setActive(t)}removeMarker(t){this._active===t&&(1===this._selected.size?this._active=void 0:this.setActive((0,d.o)(this._selected,t)));const e=this._selected.get(t);l()(void 0!==e,"data !== undefined"),e.remove(),this._selected.delete(t),this._updateMarkers()}applySettings(t){this._options.applySettings(t)}saveSettings(){return this._options.saveSettings()}onSettingChange(t){this._options.onSettingChange(t)}_getTraces(){const t=this._is3D()?"scatter3d":"scattergl",e=[{name:"",type:t,x:this._coordinates(this._options.x,0)[0],y:this._coordinates(this._options.y,0)[0],z:this._coordinates(this._options.z,0)[0],hovertemplate:this._options.hovertemplate(),marker:{color:this._colors(0)[0],coloraxis:"coloraxis",line:{color:"black",width:this._options.markerOutline.value?.5:0},opacity:1,size:this._sizes(0)[0],sizemode:"area",symbol:this._symbols(0)[0]},line:{color:"black",width:.5,dash:"solid"},mode:this._options.joinPoints.value?"lines+markers":"markers",showlegend:!1},{name:"selected",type:t,x:[],y:[],z:[],hoverinfo:"none",marker:{color:[],line:{color:[],width:2},opacity:1,size:[],sizemode:"area"},mode:"markers",showlegend:!1}],r=this._legendNames().slice(2),n=this._showlegend().slice(2);l()(r.length===n.length,"legendNames.length === showlegend.length");const i=r.length;this._data.maxSymbols>0&&(r.length=this._data.maxSymbols,r.fill("",i),n.length=this._data.maxSymbols,n.fill(!1,i));for(let i=0;i{t&&Object.keys(t).length>1&&(this._options.remove(),this._options=new R(this._root,this._getCurrentProperties(),(t=>this.positionSettingsModal(t)),{}))};"atom"!==this._target?t(this._data.structure):t(this._data.atom)}_getCurrentProperties(){const t=this._data[this._target],e=Object.keys(t);if(e.length<2){if("structure"===this._target&&!this._indexer.hasEnvironments()&&Object.keys(this._data.atom).length>=2)throw Error("could not find enough structure properties to display, but there are atom properties. Please provide the environment list to display them");let t="we need at least two properties to plot in the map";throw 0===e.length?t+=", we have none":t+=`, we have only one: '${e[0]}'`,Error(t)}return t}_restyle(t,e){h().restyle(this._plot,t,e).catch((t=>setTimeout((()=>{throw t}))))}_relayout(t){h().relayout(this._plot,t).catch((t=>setTimeout((()=>{throw t}))))}_react(t,e){return new Promise(((r,n)=>{h().react(this._plot,t,e).then((()=>{r()})).catch((t=>{setTimeout((()=>{n(t)}))}))}))}_connectSettings(){const t=t=>{"log"===t.scale.value&&(0,d.GI)(this._coordinates(t,0)[0]).min<0&&t.min.value<=0&&(0,d.R4)("This property contains negative values. Note that taking the log will discard them.")};this._options.x.property.onchange.push((()=>{t(this._options.x);const e=this._coordinates(this._options.x);this._restyle({x:e},[0,1]),this._relayout({"scene.xaxis.title":this._title(this._options.x.property.value),"xaxis.title":this._title(this._options.x.property.value)}),this._is3D()?this._relayout({"scene.xaxis.autorange":!0}):this._relayout({"xaxis.autorange":!0}),this._setScaleStep(this._getBounds().x,"x")})),this._options.x.scale.onchange.push((()=>{t(this._options.x),this._options.setLogLabel(this._options.x,"x"),this._is3D()?this._relayout({"scene.xaxis.type":this._options.x.scale.value}):this._relayout({"xaxis.type":this._options.x.scale.value})}));const e=(e,r,n)=>(i,o)=>{if("JS"===o)return;const a=r.min.value,s=r.max.value;if(a>s)return(0,d.R4)(`The inserted min and max values in ${e} are such that min > max! The last inserted value was reset.`),void("min"===n?r.min.reset():r.max.reset());t(r),this._is3D()?this._relayout({[`scene.${e}.range`]:[a,s]}):this._relayout({[`${e}.range`]:[a,s]})};if(this._options.x.min.onchange.push(e("xaxis",this._options.x,"min")),this._options.x.max.onchange.push(e("xaxis",this._options.x,"max")),this._options.y.property.onchange.push((()=>{t(this._options.y);const e=this._coordinates(this._options.y);this._restyle({y:e},[0,1]),this._relayout({"scene.yaxis.title":this._title(this._options.y.property.value),"yaxis.title":this._title(this._options.y.property.value)}),this._is3D()?this._relayout({"scene.yaxis.autorange":!0}):this._relayout({"yaxis.autorange":!0}),this._setScaleStep(this._getBounds().y,"y")})),this._options.y.scale.onchange.push((()=>{t(this._options.y),this._options.setLogLabel(this._options.y,"y"),this._is3D()?this._relayout({"scene.yaxis.type":this._options.y.scale.value}):this._relayout({"yaxis.type":this._options.y.scale.value})})),this._options.y.min.onchange.push(e("yaxis",this._options.y,"min")),this._options.y.max.onchange.push(e("yaxis",this._options.y,"max")),""===this._options.z.property.value?this._options.z.disable():this._options.z.enable(),this._options.z.property.onchange.push((()=>{t(this._options.z);const e="scatter3d"===this._plot._fullData[0].type;if(""===this._options.z.property.value)return void(e&&this._switch2D());e||this._switch3D();const r=this._coordinates(this._options.z);this._restyle({z:r},[0,1]),this._relayout({"scene.zaxis.title":this._title(this._options.z.property.value),"scene.zaxis.autorange":!0}),this._is3D()&&this._setScaleStep(this._getBounds().z,"z")})),this._options.z.scale.onchange.push((()=>{t(this._options.z),this._options.setLogLabel(this._options.z,"z"),""!==this._options.z.property.value&&this._relayout({"scene.zaxis.type":this._options.z.scale.value})})),this._options.z.min.onchange.push(e("zaxis",this._options.z,"min")),this._options.z.max.onchange.push(e("zaxis",this._options.z,"max")),this._options.hasColors()){const t=(t,e)=>{const[r,n]=this._getAxisRange(t,e,"map.color"),i=void 0!==r,o=void 0!==n,a=()=>{const t=this._colors(0)[0];return(0,d.GI)(t)};if(i||o){const{min:r,max:n}=a();return{min:i?t:r,max:o?e:n}}return a()},{min:e,max:r}=t(this._options.color.min.value,this._options.color.max.value);this._options.color.min.value=e,this._options.color.max.value=r,this._setScaleStep([e,r],"color")}else this._options.color.min.value=0,this._options.color.max.value=0;this._options.color.property.onchange.push((()=>{if(this._options.hasColors()){this._options.color.mode.enable(),this._options.color.min.enable(),this._options.color.max.enable(),this._colorReset.disabled=!1;const t=this._colors(0)[0];if(n(t,"property")){const{min:e,max:r}=(0,d.GI)(t);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=r,this._options.color.min.value=e,this._setScaleStep([e,r],"color"),this._relayout({"coloraxis.colorbar.title.text":this._colorTitle(),"coloraxis.showscale":!0})}}else this._options.color.mode.disable(),this._options.color.min.disable(),this._options.color.max.disable(),this._colorReset.disabled=!0,this._options.color.min.value=0,this._options.color.max.value=0,this._relayout({"coloraxis.colorbar.title.text":void 0,"coloraxis.showscale":!1});this._restyle({hovertemplate:this._options.hovertemplate(),"marker.color":this._colors(0)},[0])}));const r=t=>{const e=this._options.color.min.value,r=this._options.color.max.value;if(e>r)return(0,d.R4)("The inserted min and max values in color are such that min > max! The last inserted value was reset."),void("min"===t?this._options.color.min.reset():this._options.color.max.reset());this._relayout({"coloraxis.cmax":r,"coloraxis.cmin":e,"coloraxis.colorscale":this._options.colorScale()})},n=(t,e)=>{const r=this._options.color.mode.value;let n="";"log"===r||"sqrt"===r?n="<= 0":"inverse"===r&&(n="== 0");const i=t.every((t=>isNaN(t))),o=t.some((t=>isNaN(t)));return i?((0,d.R4)(`The selected property contains only values ${n}. To display this property, select an appropriate color scale. The ${e} will be set to its last value.`),"property"===e?this._options.color.property.reset():this._options.color.mode.reset(),!1):!o||((0,d.R4)(`The selected property contains some values ${n}. These values will be colored in grey.`),!0)};this._options.color.mode.onchange.push((()=>{const t=this._colors(0)[0];if(n(t,"color scale")){const{min:e,max:r}=(0,d.GI)(t);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=r,this._options.color.min.value=e,this._setScaleStep([e,r],"color"),this._relayout({"coloraxis.colorbar.title.text":this._colorTitle(),"coloraxis.showscale":!0}),this._restyle({hovertemplate:this._options.hovertemplate(),"marker.color":this._colors(0)},[0])}})),this._options.color.min.onchange.push((()=>{r("min")})),this._options.color.max.onchange.push((()=>{r("max")})),this._colorReset.onclick=()=>{const t=this._colors(0)[0],{min:e,max:r}=(0,d.GI)(t);this._options.color.min.value=e,this._options.color.max.value=r,this._relayout({"coloraxis.cmax":r,"coloraxis.cmin":e,"coloraxis.colorscale":this._options.colorScale()})},this._options.color.property.enable(),this._options.hasColors()?(this._options.color.mode.enable(),this._options.color.min.enable(),this._options.color.max.enable(),this._colorReset.disabled=!1):(this._options.color.min.disable(),this._options.color.max.disable(),this._colorReset.disabled=!0),this._options.palette.onchange.push((()=>{this._relayout({"coloraxis.colorscale":this._options.colorScale()})})),this._options.symbol.onchange.push((()=>{this._restyle({"marker.symbol":this._symbols()},[0,1]),this._restyle({name:this._legendNames(),showlegend:this._showlegend()}),this._relayout({"coloraxis.colorbar.len":this._colorbarLen()})})),""===this._options.size.property.value?this._options.size.mode.disable():this._options.size.mode.enable(),this._options.size.property.onchange.push((()=>{""!==this._options.size.property.value?this._options.size.mode.enable():this._options.size.mode.disable(),this._restyle({"marker.size":this._sizes(0)},0)})),this._options.size.factor.onchange.push((()=>{this._restyle({"marker.size":this._sizes(0)},0)})),this._options.size.mode.onchange.push((()=>{this._restyle({"marker.size":this._sizes(0)},0)})),this._options.markerOutline.onchange.push((()=>{const t=this._options.markerOutline.value?.5:0;this._restyle({"marker.line.width":t},[0])})),this._options.joinPoints.onchange.push((()=>{const t=this._options.joinPoints.value?"lines+markers":"markers";this._restyle({mode:t},[0])}))}_createPlot(){this._plot.innerHTML="";const t=this._getTraces(),e=this._getLayout();h().newPlot(this._plot,t,e,N).then((()=>{window.requestAnimationFrame((()=>{window.dispatchEvent(new Event("resize"))}))})).catch((t=>setTimeout((()=>{throw t})))),this._plot.classList.add("chsp-map"),this._plotFix=function(t){let e=null;const r=t=>{t.isTrusted&&t.target&&(t.preventDefault(),t.stopPropagation(),e={data:t instanceof MouseEvent?{buttons:t.buttons,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey}:{buttons:1,clientX:t.touches[0].clientX,clientY:t.touches[0].clientY,ctrlKey:t.ctrlKey},target:t.target})},n=t=>{if(e&&t.target){t.preventDefault(),t.stopImmediatePropagation();const r=new Event("mousedown",{composed:!0});Object.assign(r,Object.assign(Object.assign({},e.data),{clientX:e.data.clientX-50,clientY:e.data.clientY-50}));const n=e.target;e=null,n.dispatchEvent(r);const i=new Event("mouseup",{bubbles:!0,composed:!0});t.target.dispatchEvent(i)}},i=t=>{if(e){t.preventDefault(),t.stopImmediatePropagation();const r=t instanceof MouseEvent?t:t.changedTouches[0];if(Math.abs(r.clientX-e.data.clientX)>5||Math.abs(r.clientY-e.data.clientY)>5){const t=new Event("mousedown",{composed:!0});Object.assign(t,e.data);const r=e.target;e=null,r.dispatchEvent(t)}}};let o=!1;const a=()=>{o=!0,t.addEventListener("mousedown",r,{capture:!0}),document.addEventListener("mouseup",n),document.addEventListener("mousemove",i),t.addEventListener("touchstart",r,{capture:!0}),document.addEventListener("touchmove",i,{passive:!1}),document.addEventListener("touchend",n,{passive:!1})},s=()=>{o=!1,t.removeEventListener("mousedown",r,{capture:!0}),document.removeEventListener("mouseup",n),document.removeEventListener("mousemove",i),t.removeEventListener("touchstart",r,{capture:!0}),document.removeEventListener("touchmove",i),document.removeEventListener("touchend",n)};return t.on("plotly_restyle",(([t])=>{"type"in t&&(o&&"scatter3d"===t.type&&s(),o||"scattergl"!==t.type||a())})),"scattergl"===t._fullData[0].type&&a(),{disable:s,enable:a}}(this._plot),this._plot.on("plotly_click",(t=>{if(t.event&&2===t.event.detail)return;let e=t.points[0].pointNumber;if(this._is3D()&&"selected"===t.points[0].data.name)for(const[r,[n,i]]of(0,d.HL)(this._selected.entries()))if(t.points[0].pointNumber===r){e=i.current,this._active!==n&&(this.setActive(n),this.activeChanged(n,this._indexer.fromEnvironment(i.current,this._target)));break}const r=this._indexer.fromEnvironment(e,this._target);this.select(r),this.onselect(r)})),this._plot.on("plotly_afterplot",(()=>this._afterplot())),this._updateMarkers();const r=this._getBounds();this._setScaleStep(r.x,"x"),this._setScaleStep(r.y,"y"),void 0!==r.z&&this._setScaleStep(r.z,"z"),this._plot.addEventListener("wheel",(()=>{}))}_getLayout(){const t=JSON.parse(JSON.stringify(j));return t.xaxis.title=this._title(this._options.x.property.value),t.yaxis.title=this._title(this._options.y.property.value),t.xaxis.type=this._options.x.scale.value,t.yaxis.type=this._options.y.scale.value,t.scene.xaxis.title=this._title(this._options.x.property.value),t.scene.yaxis.title=this._title(this._options.y.property.value),t.scene.zaxis.title=this._title(this._options.z.property.value),t.coloraxis.colorscale=this._options.colorScale(),t.coloraxis.cmin=this._options.color.min.value,t.coloraxis.cmax=this._options.color.max.value,t.coloraxis.colorbar.title.text=this._colorTitle(),t.coloraxis.colorbar.len=this._colorbarLen(),t.coloraxis.showscale=this._options.hasColors(),t.xaxis.range=this._getAxisRange(this._options.x.min.value,this._options.x.max.value,"map.x"),t.yaxis.range=this._getAxisRange(this._options.y.min.value,this._options.y.max.value,"map.y"),t.zaxis.range=this._getAxisRange(this._options.z.min.value,this._options.z.max.value,"map.z"),t}_property(t){const e=this._data[this._target][t];if(void 0===e)throw Error(`unknown property '${t}' requested in map`);return e}_coordinates(t,e){if(""===t.property.value)return this._selectTrace(void 0,void 0,e);const r=this._property(t.property.value).values,n=[];for(const t of this._selected.values())this._is3D()?n.push(r[t.current]):n.push(NaN);return this._selectTrace(r,n,e)}_title(t){let e=t;if(""!==t){const r=this._property(t).units;void 0!==r&&(e=t+` / ${r}`)}return e}_colorTitle(){let t=this._title(this._options.color.property.value);switch(this._options.color.mode.value){case"inverse":t=`(${t})-1`;break;case"log":t=`log10(${t})`;break;case"sqrt":t=`√(${t})`}return t}_colors(t){let e;e=this._options.hasColors()?this._property(this._options.color.property.value).values:new Array(this._property(this._options.x.property.value).values.length).fill(.5);const r=this._options.calculateColors(e),n=[];for(const t of this._selected.values())n.push(t.color);return this._selectTrace(r,n,t)}_sizes(t){let e;e=""!==this._options.size.property.value?this._property(this._options.size.property.value).values:new Array(this._property(this._options.x.property.value).values.length).fill(1);const r=this._options.calculateSizes(e),n=[];if(this._is3D())for(const t of this._selected.keys())t===this._active?n.push(1e3):n.push(500);return this._selectTrace(r,n,t)}_symbols(t){if(""===this._options.symbol.value)return this._selectTrace("circle","circle",t);const e=this._property(this._options.symbol.value),r=this._options.getSymbols(e),n=[];for(const t of this._selected.values())n.push(r[t.current]);return this._selectTrace(r,n,t)}_showlegend(){const t=[!1,!1];if(""!==this._options.symbol.value){for(let e=0;e{t.min.value=isNaN(t.min.value)?e:t.min.value,t.max.value=isNaN(t.max.value)?r:t.max.value};e(this._options.x,t.x),e(this._options.y,t.y),void 0!==t.z&&e(this._options.z,t.z),this._is3D()||this._updateMarkers()}_updateMarkers(t){if(void 0===t&&(t=Array.from(this._selected.values())),this._is3D())t.forEach((t=>t.toggleVisible(!1))),this._restyle({"marker.color":this._colors(1),"marker.size":this._sizes(1),"marker.symbol":this._symbols(1),x:this._coordinates(this._options.x,1),y:this._coordinates(this._options.y,1),z:this._coordinates(this._options.z,1)},1);else{const e=this._coordinates(this._options.x,0)[0],r=this._coordinates(this._options.y,0)[0],n=this._plot.getBoundingClientRect().width;for(const i of t){let t=e[i.current],o=r[i.current];"log"===this._options.x.scale.value&&(t=Math.log10(t)),"log"===this._options.y.scale.value&&(o=Math.log10(o)),t=n-this._pixelCoordinate(t,"x"),o=this._pixelCoordinate(o,"y");const a=this._getBounds(),s=n-this._pixelCoordinate(a.x[1],"x"),l=n-this._pixelCoordinate(a.x[0],"x"),c=this._pixelCoordinate(a.y[1],"y"),d=this._pixelCoordinate(a.y[0],"y"),u=(t,e,r)=>t+10>e&&t-10=55296&&t<=57343?"���":String.fromCharCode(t),n+=6;continue}}if(240==(248&o)&&n+91114111?e+="����":(t-=65536,e+=String.fromCharCode(55296+(t>>10),56320+(1023&t))),n+=9;continue}}e+="�"}}return e}))}V.defaultChars=";/?:@&=+$,#",V.componentChars="";const H=V,W={};function q(t,e,r){"string"!=typeof e&&(r=e,e=q.defaultChars),void 0===r&&(r=!0);const n=function(t){let e=W[t];if(e)return e;e=W[t]=[];for(let t=0;t<128;t++){const r=String.fromCharCode(t);/^[0-9a-z]$/i.test(r)?e.push(r):e.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2))}for(let r=0;r=55296&&a<=57343){if(a>=55296&&a<=56319&&e+1=56320&&r<=57343){i+=encodeURIComponent(t[e]+t[e+1]),e++;continue}}i+="%EF%BF%BD"}else i+=encodeURIComponent(t[e])}return i}q.defaultChars=";/?:@&=+$,-_.!~*'()#",q.componentChars="-_.!~*'()";const Y=q;function Z(t){let e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&-1!==t.hostname.indexOf(":")?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",e+=t.search||"",e+=t.hash||"",e}function $(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const X=/^([a-z0-9.+-]+:)/i,J=/:[0-9]*$/,K=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Q=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),tt=["'"].concat(Q),et=["%","/","?",";","#"].concat(tt),rt=["/","?","#"],nt=/^[+a-z0-9A-Z_-]{0,63}$/,it=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ot={javascript:!0,"javascript:":!0},at={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};$.prototype.parse=function(t,e){let r,n,i,o=t;if(o=o.trim(),!e&&1===t.split("#").length){const t=K.exec(o);if(t)return this.pathname=t[1],t[2]&&(this.search=t[2]),this}let a=X.exec(o);if(a&&(a=a[0],r=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(e||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i="//"===o.substr(0,2),!i||a&&ot[a]||(o=o.substr(2),this.slashes=!0)),!ot[a]&&(i||a&&!at[a])){let t,e,r=-1;for(let t=0;t127?n+="x":n+=r[t];if(!n.match(nt)){const n=t.slice(0,e),i=t.slice(e+1),a=r.match(it);a&&(n.push(a[1]),i.unshift(a[2])),i.length&&(o=i.join(".")+o),this.hostname=n.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),a&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=o.indexOf("#");-1!==s&&(this.hash=o.substr(s),o=o.slice(0,s));const l=o.indexOf("?");return-1!==l&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),at[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this},$.prototype.parseHost=function(t){let e=J.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};const st=function(t,e){if(t&&t instanceof $)return t;const r=new $;return r.parse(t,e),r},lt=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,ct=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,dt=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ut=/[\0-\x1F\x7F-\x9F]/,ht=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,pt=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,ft=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((t=>t.charCodeAt(0)))),mt=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((t=>t.charCodeAt(0))));var gt;const vt=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),bt=null!==(gt=String.fromCodePoint)&&void 0!==gt?gt:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t),e};var yt,xt,wt,_t,kt;function At(t){return t>=yt.ZERO&&t<=yt.NINE}!function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"}(yt||(yt={})),function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"}(xt||(xt={})),function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"}(wt||(wt={})),(kt=_t||(_t={}))[kt.Legacy=0]="Legacy",kt[kt.Strict=1]="Strict",kt[kt.Attribute=2]="Attribute";class Tt{constructor(t,e,r){this.decodeTree=t,this.emitCodePoint=e,this.errors=r,this.state=wt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=_t.Strict}startEntity(t){this.decodeMode=t,this.state=wt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,e){switch(this.state){case wt.EntityStart:return t.charCodeAt(e)===yt.NUM?(this.state=wt.NumericStart,this.consumed+=1,this.stateNumericStart(t,e+1)):(this.state=wt.NamedEntity,this.stateNamedEntity(t,e));case wt.NumericStart:return this.stateNumericStart(t,e);case wt.NumericDecimal:return this.stateNumericDecimal(t,e);case wt.NumericHex:return this.stateNumericHex(t,e);case wt.NamedEntity:return this.stateNamedEntity(t,e)}}stateNumericStart(t,e){return e>=t.length?-1:(32|t.charCodeAt(e))===yt.LOWER_X?(this.state=wt.NumericHex,this.consumed+=1,this.stateNumericHex(t,e+1)):(this.state=wt.NumericDecimal,this.stateNumericDecimal(t,e))}addToNumericResult(t,e,r,n){if(e!==r){const i=r-e;this.result=this.result*Math.pow(n,i)+parseInt(t.substr(e,i),n),this.consumed+=i}}stateNumericHex(t,e){const r=e;for(;e=yt.UPPER_A&&n<=yt.UPPER_F||n>=yt.LOWER_A&&n<=yt.LOWER_F)))return this.addToNumericResult(t,r,e,16),this.emitNumericEntity(i,3);e+=1}var n;return this.addToNumericResult(t,r,e,16),-1}stateNumericDecimal(t,e){const r=e;for(;e=55296&&t<=57343||t>1114111?65533:null!==(e=vt.get(t))&&void 0!==e?e:t}(this.result),this.consumed),this.errors&&(t!==yt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,e){const{decodeTree:r}=this;let n=r[this.treeIndex],i=(n&xt.VALUE_LENGTH)>>14;for(;e=yt.UPPER_A&&t<=yt.UPPER_Z||t>=yt.LOWER_A&&t<=yt.LOWER_Z||At(t)}(o)))?0:this.emitNotTerminatedNamedEntity();if(n=r[this.treeIndex],i=(n&xt.VALUE_LENGTH)>>14,0!==i){if(a===yt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==_t.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}var o;return-1}emitNotTerminatedNamedEntity(){var t;const{result:e,decodeTree:r}=this,n=(r[e]&xt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,n,this.consumed),null===(t=this.errors)||void 0===t||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,e,r){const{decodeTree:n}=this;return this.emitCodePoint(1===e?n[t]&~xt.VALUE_LENGTH:n[t+1],r),3===e&&this.emitCodePoint(n[t+2],r),r}end(){var t;switch(this.state){case wt.NamedEntity:return 0===this.result||this.decodeMode===_t.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case wt.NumericDecimal:return this.emitNumericEntity(0,2);case wt.NumericHex:return this.emitNumericEntity(0,3);case wt.NumericStart:return null===(t=this.errors)||void 0===t||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case wt.EntityStart:return 0}}}function Mt(t){let e="";const r=new Tt(t,(t=>e+=bt(t)));return function(t,n){let i=0,o=0;for(;(o=t.indexOf("&",o))>=0;){e+=t.slice(i,o),r.startEntity(n);const a=r.write(t,o+1);if(a<0){i=o+r.end();break}i=o+a,o=0===a?i+1:i}const a=e+t.slice(i);return e="",a}}function St(t,e,r,n){const i=(e&xt.BRANCH_LENGTH)>>7,o=e&xt.JUMP_TABLE;if(0===i)return 0!==o&&n===o?r:-1;if(o){const e=n-o;return e<0||e>=i?-1:t[r+e]-1}let a=r,s=a+i-1;for(;a<=s;){const e=a+s>>>1,r=t[e];if(rn))return t[e+i];s=e-1}}return-1}const Ct=Mt(ft);function Et(t,e=_t.Legacy){return Ct(t,e)}function Lt(t){for(let e=1;e'"]/g,zt),Ot(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),Ot(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),function(t){t[t.XML=0]="XML",t[t.HTML=1]="HTML"}(Dt||(Dt={})),function(t){t[t.UTF8=0]="UTF8",t[t.ASCII=1]="ASCII",t[t.Extensive=2]="Extensive",t[t.Attribute=3]="Attribute",t[t.Text=4]="Text"}(It||(It={}));const Rt=Object.prototype.hasOwnProperty;function Pt(t,e){return Rt.call(t,e)}function jt(t){return Array.prototype.slice.call(arguments,1).forEach((function(e){if(e){if("object"!=typeof e)throw new TypeError(e+"must be object");Object.keys(e).forEach((function(r){t[r]=e[r]}))}})),t}function Nt(t,e,r){return[].concat(t.slice(0,e),r,t.slice(e+1))}function Bt(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||!(65535&~t&&65534!=(65535&t))||t>=0&&t<=8||11===t||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function Ut(t){if(t>65535){const e=55296+((t-=65536)>>10),r=56320+(1023&t);return String.fromCharCode(e,r)}return String.fromCharCode(t)}const Gt=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Vt=new RegExp(Gt.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),Ht=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Wt(t){return t.indexOf("\\")<0?t:t.replace(Gt,"$1")}function qt(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(Vt,(function(t,e,r){return e||function(t,e){if(35===e.charCodeAt(0)&&Ht.test(e)){const r="x"===e[1].toLowerCase()?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return Bt(r)?Ut(r):t}const r=Et(t);return r!==t?r:t}(t,r)}))}const Yt=/[&<>"]/,Zt=/[&<>"]/g,$t={"&":"&","<":"<",">":">",'"':"""};function Xt(t){return $t[t]}function Jt(t){return Yt.test(t)?t.replace(Zt,Xt):t}const Kt=/[.?*+^$[\]\\(){}|-]/g;function Qt(t){return t.replace(Kt,"\\$&")}function te(t){switch(t){case 9:case 32:return!0}return!1}function ee(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function re(t){return lt.test(t)||ct.test(t)}function ne(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function ie(t){return t=t.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}const oe={mdurl:n,ucmicro:i};function ae(t,e,r){let n,i,o,a;const s=t.posMax,l=t.pos;for(t.pos=e+1,n=1;t.pos32))return o;if(41===n){if(0===a)break;a--}i++}return e===i||0!==a||(o.str=qt(t.slice(e,i)),o.pos=i,o.ok=!0),o}function le(t,e,r,n){let i,o=e;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)a.str=n.str,a.marker=n.marker;else{if(o>=r)return a;let n=t.charCodeAt(o);if(34!==n&&39!==n&&40!==n)return a;e++,o++,40===n&&(n=41),a.marker=n}for(;o"+Jt(o.content)+""},ce.code_block=function(t,e,r,n,i){const o=t[e];return""+Jt(t[e].content)+"\n"},ce.fence=function(t,e,r,n,i){const o=t[e],a=o.info?qt(o.info).trim():"";let s,l="",c="";if(a){const t=a.split(/(\s+)/g);l=t[0],c=t.slice(2).join("")}if(s=r.highlight&&r.highlight(o.content,l,c)||Jt(o.content),0===s.indexOf("${s}\n`}return`
${s}
\n`},ce.image=function(t,e,r,n,i){const o=t[e];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,r,n),i.renderToken(t,e,r)},ce.hardbreak=function(t,e,r){return r.xhtmlOut?"
\n":"
\n"},ce.softbreak=function(t,e,r){return r.breaks?r.xhtmlOut?"
\n":"
\n":"\n"},ce.text=function(t,e){return Jt(t[e].content)},ce.html_block=function(t,e){return t[e].content},ce.html_inline=function(t,e){return t[e].content},de.prototype.renderAttrs=function(t){let e,r,n;if(!t.attrs)return"";for(n="",e=0,r=t.attrs.length;e\n":">",i},de.prototype.renderInline=function(t,e,r){let n="";const i=this.rules;for(let o=0,a=t.length;o=0&&(r=this.attrs[e][1]),r},fe.prototype.attrJoin=function(t,e){const r=this.attrIndex(t);r<0?this.attrPush([t,e]):this.attrs[r][1]=this.attrs[r][1]+" "+e};const me=fe;function ge(t,e,r){this.src=t,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=e}ge.prototype.Token=me;const ve=ge,be=/\r\n?|\n/g,ye=/\0/g;function xe(t){return/^<\/a\s*>/i.test(t)}const we=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,_e=/\((c|tm|r)\)/i,ke=/\((c|tm|r)\)/gi,Ae={c:"©",r:"®",tm:"™"};function Te(t,e){return Ae[e.toLowerCase()]}function Me(t){let e=0;for(let r=t.length-1;r>=0;r--){const n=t[r];"text"!==n.type||e||(n.content=n.content.replace(ke,Te)),"link_open"===n.type&&"auto"===n.info&&e--,"link_close"===n.type&&"auto"===n.info&&e++}}function Se(t){let e=0;for(let r=t.length-1;r>=0;r--){const n=t[r];"text"!==n.type||e||we.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===n.type&&"auto"===n.info&&e--,"link_close"===n.type&&"auto"===n.info&&e++}}const Ce=/['"]/,Ee=/['"]/g;function Le(t,e,r){return t.slice(0,e)+r+t.slice(e+1)}function ze(t,e){let r;const n=[];for(let i=0;i=0&&!(n[r].level<=a);r--);if(n.length=r+1,"text"!==o.type)continue;let s=o.content,l=0,c=s.length;t:for(;l=0)f=s.charCodeAt(d.index-1);else for(r=i-1;r>=0&&"softbreak"!==t[r].type&&"hardbreak"!==t[r].type;r--)if(t[r].content){f=t[r].content.charCodeAt(t[r].content.length-1);break}let m=32;if(l=48&&f<=57&&(h=u=!1),u&&h&&(u=g,h=v),u||h){if(h)for(r=n.length-1;r>=0;r--){let u=n[r];if(n[r].level=0;a--){const s=i[a];if("link_close"!==s.type){if("html_inline"===s.type&&(r=s.content,/^\s]/i.test(r)&&o>0&&o--,xe(s.content)&&o++),!(o>0)&&"text"===s.type&&t.md.linkify.test(s.content)){const r=s.content;let o=t.md.linkify.match(r);const l=[];let c=s.level,d=0;o.length>0&&0===o[0].index&&a>0&&"text_special"===i[a-1].type&&(o=o.slice(1));for(let e=0;ed){const e=new t.Token("text","",0);e.content=r.slice(d,s),e.level=c,l.push(e)}const u=new t.Token("link_open","a",1);u.attrs=[["href",i]],u.level=c++,u.markup="linkify",u.info="auto",l.push(u);const h=new t.Token("text","",0);h.content=a,h.level=c,l.push(h);const p=new t.Token("link_close","a",-1);p.level=--c,p.markup="linkify",p.info="auto",l.push(p),d=o[e].lastIndex}if(d=0;e--)"inline"===t.tokens[e].type&&(_e.test(t.tokens[e].content)&&Me(t.tokens[e].children),we.test(t.tokens[e].content)&&Se(t.tokens[e].children))}],["smartquotes",function(t){if(t.md.options.typographer)for(let e=t.tokens.length-1;e>=0;e--)"inline"===t.tokens[e].type&&Ce.test(t.tokens[e].content)&&ze(t.tokens[e].children,t)}],["text_join",function(t){let e,r;const n=t.tokens,i=n.length;for(let t=0;t0&&this.level++,this.tokens.push(n),n},Fe.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},Fe.prototype.skipEmptyLines=function(t){for(let e=this.lineMax;te;)if(!te(this.src.charCodeAt(--t)))return t+1;return t},Fe.prototype.skipChars=function(t,e){for(let r=this.src.length;tr;)if(e!==this.src.charCodeAt(--t))return t+1;return t},Fe.prototype.getLines=function(t,e,r,n){if(t>=e)return"";const i=new Array(e-t);for(let o=0,a=t;ar?new Array(t-r+1).join(" ")+this.src.slice(c,l):this.src.slice(c,l)}return i.join("")},Fe.prototype.Token=me;const Re=Fe;function Pe(t,e){const r=t.bMarks[e]+t.tShift[e],n=t.eMarks[e];return t.src.slice(r,n)}function je(t){const e=[],r=t.length;let n=0,i=t.charCodeAt(n),o=!1,a=0,s="";for(;n=n)return-1;let o=t.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=n)return-1;if(o=t.src.charCodeAt(i++),!(o>=48&&o<=57)){if(41===o||46===o)break;return-1}if(i-r>=10)return-1}return i`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",Ge="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Ve=new RegExp("^(?:"+Ue+"|"+Ge+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|]*>|)"),He=new RegExp("^(?:"+Ue+"|"+Ge+")"),We=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(He.source+"\\s*$"),/^$/,!1]],qe=[["table",function(t,e,r,n){if(e+2>r)return!1;let i=e+1;if(t.sCount[i]=4)return!1;let o=t.bMarks[i]+t.tShift[i];if(o>=t.eMarks[i])return!1;const a=t.src.charCodeAt(o++);if(124!==a&&45!==a&&58!==a)return!1;if(o>=t.eMarks[i])return!1;const s=t.src.charCodeAt(o++);if(124!==s&&45!==s&&58!==s&&!te(s))return!1;if(45===a&&te(s))return!1;for(;o=4)return!1;c=je(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop();const u=c.length;if(0===u||u!==d.length)return!1;if(n)return!0;const h=t.parentType;t.parentType="table";const p=t.md.block.ruler.getRules("blockquote"),f=[e,0];t.push("table_open","table",1).map=f,t.push("thead_open","thead",1).map=[e,e+1],t.push("tr_open","tr",1).map=[e,e+1];for(let e=0;e=4)break;if(c=je(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop(),g+=u-c.length,g>65536)break;i===e+2&&(t.push("tbody_open","tbody",1).map=m=[e+2,0]),t.push("tr_open","tr",1).map=[i,i+1];for(let e=0;e=4))break;n++,i=n}t.line=i;const o=t.push("code_block","code",0);return o.content=t.getLines(e,i,4+t.blkIndent,!1)+"\n",o.map=[e,t.line],!0}],["fence",function(t,e,r,n){let i=t.bMarks[e]+t.tShift[e],o=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(i+3>o)return!1;const a=t.src.charCodeAt(i);if(126!==a&&96!==a)return!1;let s=i;i=t.skipChars(i,a);let l=i-s;if(l<3)return!1;const c=t.src.slice(s,i),d=t.src.slice(i,o);if(96===a&&d.indexOf(String.fromCharCode(a))>=0)return!1;if(n)return!0;let u=e,h=!1;for(;!(u++,u>=r||(i=s=t.bMarks[u]+t.tShift[u],o=t.eMarks[u],i=4||(i=t.skipChars(i,a),i-s=4)return!1;if(62!==t.src.charCodeAt(i))return!1;if(n)return!0;const s=[],l=[],c=[],d=[],u=t.md.block.ruler.getRules("blockquote"),h=t.parentType;t.parentType="blockquote";let p,f=!1;for(p=e;p=o)break;if(62===t.src.charCodeAt(i++)&&!e){let e,r,n=t.sCount[p]+1;32===t.src.charCodeAt(i)?(i++,n++,r=!1,e=!0):9===t.src.charCodeAt(i)?(e=!0,(t.bsCount[p]+n)%4==3?(i++,n++,r=!1):r=!0):e=!1;let a=n;for(s.push(t.bMarks[p]),t.bMarks[p]=i;i=o,l.push(t.bsCount[p]),t.bsCount[p]=t.sCount[p]+1+(e?1:0),c.push(t.sCount[p]),t.sCount[p]=a-n,d.push(t.tShift[p]),t.tShift[p]=i-t.bMarks[p];continue}if(f)break;let n=!1;for(let e=0,i=u.length;e";const v=[e,0];g.map=v,t.md.block.tokenize(t,e,p),t.push("blockquote_close","blockquote",-1).markup=">",t.lineMax=a,t.parentType=h,v[1]=t.line;for(let r=0;r=4)return!1;let o=t.bMarks[e]+t.tShift[e];const a=t.src.charCodeAt(o++);if(42!==a&&45!==a&&95!==a)return!1;let s=1;for(;o=4)return!1;if(t.listIndent>=0&&t.sCount[l]-t.listIndent>=4&&t.sCount[l]=t.blkIndent&&(p=!0),(h=Be(t,l))>=0){if(d=!0,a=t.bMarks[l]+t.tShift[l],u=Number(t.src.slice(a,h-1)),p&&1!==u)return!1}else{if(!((h=Ne(t,l))>=0))return!1;d=!1}if(p&&t.skipSpaces(h)>=t.eMarks[l])return!1;if(n)return!0;const f=t.src.charCodeAt(h-1),m=t.tokens.length;d?(s=t.push("ordered_list_open","ol",1),1!==u&&(s.attrs=[["start",u]])):s=t.push("bullet_list_open","ul",1);const g=[l,0];s.map=g,s.markup=String.fromCharCode(f);let v=!1;const b=t.md.block.ruler.getRules("list"),y=t.parentType;for(t.parentType="list";l=i?1:n-e,p>4&&(p=1);const m=e+p;s=t.push("list_item_open","li",1),s.markup=String.fromCharCode(f);const g=[l,0];s.map=g,d&&(s.info=t.src.slice(a,h-1));const y=t.tight,x=t.tShift[l],w=t.sCount[l],_=t.listIndent;if(t.listIndent=t.blkIndent,t.blkIndent=m,t.tight=!0,t.tShift[l]=u-t.bMarks[l],t.sCount[l]=n,u>=i&&t.isEmpty(l+1)?t.line=Math.min(t.line+2,r):t.md.block.tokenize(t,l,r,!0),t.tight&&!v||(c=!1),v=t.line-l>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=_,t.tShift[l]=x,t.sCount[l]=w,t.tight=y,s=t.push("list_item_close","li",-1),s.markup=String.fromCharCode(f),l=t.line,g[1]=l,l>=r)break;if(t.sCount[l]=4)break;let k=!1;for(let e=0,n=b.length;e=4)return!1;if(91!==t.src.charCodeAt(i))return!1;function s(e){const r=t.lineMax;if(e>=r||t.isEmpty(e))return null;let n=!1;if(t.sCount[e]-t.blkIndent>3&&(n=!0),t.sCount[e]<0&&(n=!0),!n){const n=t.md.block.ruler.getRules("reference"),i=t.parentType;t.parentType="reference";let o=!1;for(let i=0,a=n.length;i=4)return!1;if(!t.md.options.html)return!1;if(60!==t.src.charCodeAt(i))return!1;let a=t.src.slice(i,o),s=0;for(;s=4)return!1;let a=t.src.charCodeAt(i);if(35!==a||i>=o)return!1;let s=1;for(a=t.src.charCodeAt(++i);35===a&&i6||ii&&te(t.src.charCodeAt(l-1))&&(o=l),t.line=e+1;const c=t.push("heading_open","h"+String(s),1);c.markup="########".slice(0,s),c.map=[e,t.line];const d=t.push("inline","",0);return d.content=t.src.slice(i,o).trim(),d.map=[e,t.line],d.children=[],t.push("heading_close","h"+String(s),-1).markup="########".slice(0,s),!0},["paragraph","reference","blockquote"]],["lheading",function(t,e,r){const n=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;const i=t.parentType;t.parentType="paragraph";let o,a=0,s=e+1;for(;s3)continue;if(t.sCount[s]>=t.blkIndent){let e=t.bMarks[s]+t.tShift[s];const r=t.eMarks[s];if(e=r))){a=61===o?1:2;break}}if(t.sCount[s]<0)continue;let e=!1;for(let i=0,o=n.length;i3)continue;if(t.sCount[o]<0)continue;let e=!1;for(let i=0,a=n.length;i=r))&&!(t.sCount[a]=o){t.line=r;break}const e=t.line;let l=!1;for(let o=0;o=t.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");t.tight=!s,t.isEmpty(t.line-1)&&(s=!0),a=t.line,a0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(i),n},$e.prototype.scanDelims=function(t,e){const r=this.posMax,n=this.src.charCodeAt(t),i=t>0?this.src.charCodeAt(t-1):32;let o=t;for(;o?@[]^_`{|}~-".split("").forEach((function(t){Qe[t.charCodeAt(0)]=1}));const er={tokenize:function(t,e){const r=t.pos,n=t.src.charCodeAt(r);if(e)return!1;if(126!==n)return!1;const i=t.scanDelims(t.pos,!0);let o=i.length;const a=String.fromCharCode(n);if(o<2)return!1;let s;o%2&&(s=t.push("text","",0),s.content=a,o--);for(let e=0;e=0;r--){const n=e[r];if(95!==n.marker&&42!==n.marker)continue;if(-1===n.end)continue;const i=e[n.end],o=r>0&&e[r-1].end===n.end+1&&e[r-1].marker===n.marker&&e[r-1].token===n.token-1&&e[n.end+1].token===i.token+1,a=String.fromCharCode(n.marker),s=t.tokens[n.token];s.type=o?"strong_open":"em_open",s.tag=o?"strong":"em",s.nesting=1,s.markup=o?a+a:a,s.content="";const l=t.tokens[i.token];l.type=o?"strong_close":"em_close",l.tag=o?"strong":"em",l.nesting=-1,l.markup=o?a+a:a,l.content="",o&&(t.tokens[e[r-1].token].content="",t.tokens[e[n.end+1].token].content="",r--)}}const nr={tokenize:function(t,e){const r=t.pos,n=t.src.charCodeAt(r);if(e)return!1;if(95!==n&&42!==n)return!1;const i=t.scanDelims(t.pos,42===n);for(let e=0;e\x00-\x20]*)$/,ar=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,sr=/^&([a-z][a-z0-9]{1,31});/i;function lr(t){const e={},r=t.length;if(!r)return;let n=0,i=-2;const o=[];for(let a=0;as;l-=o[l]+1){const e=t[l];if(e.marker===r.marker&&e.open&&e.end<0){let n=!1;if((e.close||r.open)&&(e.length+r.length)%3==0&&(e.length%3==0&&r.length%3==0||(n=!0)),!n){const n=l>0&&!t[l-1].open?o[l-1]+1:0;o[a]=a-l+n,o[l]=n,r.open=!1,e.end=a,e.close=!1,c=-1,i=-2;break}}}-1!==c&&(e[r.marker][(r.open?3:0)+(r.length||0)%3]=c)}}const cr=[["text",function(t,e){let r=t.pos;for(;r0)return!1;const r=t.pos;if(r+3>t.posMax)return!1;if(58!==t.src.charCodeAt(r))return!1;if(47!==t.src.charCodeAt(r+1))return!1;if(47!==t.src.charCodeAt(r+2))return!1;const n=t.pending.match(Ke);if(!n)return!1;const i=n[1],o=t.md.linkify.matchAtStart(t.src.slice(r-i.length));if(!o)return!1;let a=o.url;if(a.length<=i.length)return!1;a=a.replace(/\*+$/,"");const s=t.md.normalizeLink(a);if(!t.md.validateLink(s))return!1;if(!e){t.pending=t.pending.slice(0,-i.length);const e=t.push("link_open","a",1);e.attrs=[["href",s]],e.markup="linkify",e.info="auto",t.push("text","",0).content=t.md.normalizeLinkText(a);const r=t.push("link_close","a",-1);r.markup="linkify",r.info="auto"}return t.pos+=a.length-i.length,!0}],["newline",function(t,e){let r=t.pos;if(10!==t.src.charCodeAt(r))return!1;const n=t.pending.length-1,i=t.posMax;if(!e)if(n>=0&&32===t.pending.charCodeAt(n))if(n>=1&&32===t.pending.charCodeAt(n-1)){let e=n-1;for(;e>=1&&32===t.pending.charCodeAt(e-1);)e--;t.pending=t.pending.slice(0,e),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(r++;r=n)return!1;let i=t.src.charCodeAt(r);if(10===i){for(e||t.push("hardbreak","br",0),r++;r=55296&&i<=56319&&r+1=56320&&e<=57343&&(o+=t.src[r+1],r++)}const a="\\"+o;if(!e){const e=t.push("text_special","",0);i<256&&0!==Qe[i]?e.content=o:e.content=a,e.markup=a,e.info="escape"}return t.pos=r+1,!0}],["backticks",function(t,e){let r=t.pos;if(96!==t.src.charCodeAt(r))return!1;const n=r;r++;const i=t.posMax;for(;r=u)return!1;if(l=f,i=t.md.helpers.parseLinkDestination(t.src,f,t.posMax),i.ok){for(a=t.md.normalizeLink(i.str),t.md.validateLink(a)?f=i.pos:a="",l=f;f=u||41!==t.src.charCodeAt(f))&&(c=!0),f++}if(c){if(void 0===t.env.references)return!1;if(f=0?n=t.src.slice(l,f++):f=p+1):f=p+1,n||(n=t.src.slice(h,p)),o=t.env.references[ie(n)],!o)return t.pos=d,!1;a=o.href,s=o.title}if(!e){t.pos=h,t.posMax=p;const e=[["href",a]];t.push("link_open","a",1).attrs=e,s&&e.push(["title",s]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)}return t.pos=f,t.posMax=u,!0}],["image",function(t,e){let r,n,i,o,a,s,l,c,d="";const u=t.pos,h=t.posMax;if(33!==t.src.charCodeAt(t.pos))return!1;if(91!==t.src.charCodeAt(t.pos+1))return!1;const p=t.pos+2,f=t.md.helpers.parseLinkLabel(t,t.pos+1,!1);if(f<0)return!1;if(o=f+1,o=h)return!1;for(c=o,s=t.md.helpers.parseLinkDestination(t.src,o,t.posMax),s.ok&&(d=t.md.normalizeLink(s.str),t.md.validateLink(d)?o=s.pos:d=""),c=o;o=h||41!==t.src.charCodeAt(o))return t.pos=u,!1;o++}else{if(void 0===t.env.references)return!1;if(o=0?i=t.src.slice(c,o++):o=f+1):o=f+1,i||(i=t.src.slice(p,f)),a=t.env.references[ie(i)],!a)return t.pos=u,!1;d=a.href,l=a.title}if(!e){n=t.src.slice(p,f);const e=[];t.md.inline.parse(n,t.md,t.env,e);const r=t.push("image","img",0),i=[["src",d],["alt",""]];r.attrs=i,r.children=e,r.content=n,l&&i.push(["title",l])}return t.pos=o,t.posMax=h,!0}],["autolink",function(t,e){let r=t.pos;if(60!==t.src.charCodeAt(r))return!1;const n=t.pos,i=t.posMax;for(;;){if(++r>=i)return!1;const e=t.src.charCodeAt(r);if(60===e)return!1;if(62===e)break}const o=t.src.slice(n+1,r);if(or.test(o)){const r=t.md.normalizeLink(o);if(!t.md.validateLink(r))return!1;if(!e){const e=t.push("link_open","a",1);e.attrs=[["href",r]],e.markup="autolink",e.info="auto",t.push("text","",0).content=t.md.normalizeLinkText(o);const n=t.push("link_close","a",-1);n.markup="autolink",n.info="auto"}return t.pos+=o.length+2,!0}if(ir.test(o)){const r=t.md.normalizeLink("mailto:"+o);if(!t.md.validateLink(r))return!1;if(!e){const e=t.push("link_open","a",1);e.attrs=[["href",r]],e.markup="autolink",e.info="auto",t.push("text","",0).content=t.md.normalizeLinkText(o);const n=t.push("link_close","a",-1);n.markup="autolink",n.info="auto"}return t.pos+=o.length+2,!0}return!1}],["html_inline",function(t,e){if(!t.md.options.html)return!1;const r=t.posMax,n=t.pos;if(60!==t.src.charCodeAt(n)||n+2>=r)return!1;const i=t.src.charCodeAt(n+1);if(33!==i&&63!==i&&47!==i&&!function(t){const e=32|t;return e>=97&&e<=122}(i))return!1;const o=t.src.slice(n).match(Ve);if(!o)return!1;if(!e){const e=t.push("html_inline","",0);e.content=o[0],a=e.content,/^\s]/i.test(a)&&t.linkLevel++,function(t){return/^<\/a\s*>/i.test(t)}(e.content)&&t.linkLevel--}var a;return t.pos+=o[0].length,!0}],["entity",function(t,e){const r=t.pos,n=t.posMax;if(38!==t.src.charCodeAt(r))return!1;if(r+1>=n)return!1;if(35===t.src.charCodeAt(r+1)){const n=t.src.slice(r).match(ar);if(n){if(!e){const e="x"===n[1][0].toLowerCase()?parseInt(n[1].slice(1),16):parseInt(n[1],10),r=t.push("text_special","",0);r.content=Bt(e)?Ut(e):Ut(65533),r.markup=n[0],r.info="entity"}return t.pos+=n[0].length,!0}}else{const n=t.src.slice(r).match(sr);if(n){const r=Et(n[0]);if(r!==n[0]){if(!e){const e=t.push("text_special","",0);e.content=r,e.markup=n[0],e.info="entity"}return t.pos+=n[0].length,!0}}}return!1}]],dr=[["balance_pairs",function(t){const e=t.tokens_meta,r=t.tokens_meta.length;lr(t.delimiters);for(let t=0;t0&&n++,"text"===i[e].type&&e+1=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;a||t.pos++,o[e]=t.pos},ur.prototype.tokenize=function(t){const e=this.ruler.getRules(""),r=e.length,n=t.posMax,i=t.md.options.maxNesting;for(;t.pos=t.pos)throw new Error("inline rule didn't increment state.pos");break}if(a){if(t.pos>=n)break}else t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()},ur.prototype.parse=function(t,e,r,n){const i=new this.State(t,e,r,n);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let t=0;t=3&&":"===t[e-3]||e>=3&&"/"===t[e-3]?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,r){const n=t.slice(e);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},yr="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function xr(t){const e=t.re=function(t){const e={};t=t||{},e.src_Any=dt.source,e.src_Cc=ut.source,e.src_Z=pt.source,e.src_P=lt.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");return e.src_pseudo_letter="(?:(?![><|]|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|[><|]|"+e.src_ZPCc+")(?!"+(t["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy='(^|[><|]|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}(t.__opts__),r=t.__tlds__.slice();function n(t){return t.replace("%TLDS%",e.src_tlds)}t.onCompile(),t.__tlds_replaced__||r.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),r.push(e.src_xn),e.src_tlds=r.join("|"),e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");const i=[];function o(t,e){throw new Error('(LinkifyIt) Invalid schema "'+t+'": '+e)}t.__compiled__={},Object.keys(t.__schemas__).forEach((function(e){const r=t.__schemas__[e];if(null===r)return;const n={validate:null,link:null};if(t.__compiled__[e]=n,"[object Object]"===fr(r))return"[object RegExp]"!==fr(r.validate)?mr(r.validate)?n.validate=r.validate:o(e,r):n.validate=function(t){return function(e,r){const n=e.slice(r);return t.test(n)?n.match(t)[0].length:0}}(r.validate),void(mr(r.normalize)?n.normalize=r.normalize:r.normalize?o(e,r):n.normalize=function(t,e){e.normalize(t)});!function(t){return"[object String]"===fr(t)}(r)?o(e,r):i.push(e)})),i.forEach((function(e){t.__compiled__[t.__schemas__[e]]&&(t.__compiled__[e].validate=t.__compiled__[t.__schemas__[e]].validate,t.__compiled__[e].normalize=t.__compiled__[t.__schemas__[e]].normalize)})),t.__compiled__[""]={validate:null,normalize:function(t,e){e.normalize(t)}};const a=Object.keys(t.__compiled__).filter((function(e){return e.length>0&&t.__compiled__[e]})).map(gr).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+a+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+a+")","ig"),t.re.schema_at_start=RegExp("^"+t.re.schema_search.source,"i"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),function(t){t.__index__=-1,t.__text_cache__=""}(t)}function wr(t,e){const r=t.__index__,n=t.__last_index__,i=t.__text_cache__.slice(r,n);this.schema=t.__schema__.toLowerCase(),this.index=r+e,this.lastIndex=n+e,this.raw=i,this.text=i,this.url=i}function _r(t,e){const r=new wr(t,e);return t.__compiled__[r.schema].normalize(r,t),r}function kr(t,e){if(!(this instanceof kr))return new kr(t,e);var r;e||(r=t,Object.keys(r||{}).reduce((function(t,e){return t||vr.hasOwnProperty(e)}),!1)&&(e=t,t={})),this.__opts__=pr({},vr,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=pr({},br,t),this.__compiled__={},this.__tlds__=yr,this.__tlds_replaced__=!1,this.re={},xr(this)}kr.prototype.add=function(t,e){return this.__schemas__[t]=e,xr(this),this},kr.prototype.set=function(t){return this.__opts__=pr(this.__opts__,t),this},kr.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let e,r,n,i,o,a,s,l,c;if(this.re.schema_test.test(t))for(s=this.re.schema_search,s.lastIndex=0;null!==(e=s.exec(t));)if(i=this.testSchemaAt(t,e[2],s.lastIndex),i){this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&null!==(n=t.match(this.re.email_fuzzy))&&(o=n.index+n[1].length,a=n.index+n[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a))),this.__index__>=0},kr.prototype.pretest=function(t){return this.re.pretest.test(t)},kr.prototype.testSchemaAt=function(t,e,r){return this.__compiled__[e.toLowerCase()]?this.__compiled__[e.toLowerCase()].validate(t,r,this):0},kr.prototype.match=function(t){const e=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(e.push(_r(this,r)),r=this.__last_index__);let n=r?t.slice(r):t;for(;this.test(n);)e.push(_r(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return e.length?e:null},kr.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const e=this.re.schema_at_start.exec(t);if(!e)return null;const r=this.testSchemaAt(t,e[2],e[0].length);return r?(this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+r,_r(this,0)):null},kr.prototype.tlds=function(t,e){return t=Array.isArray(t)?t:[t],e?(this.__tlds__=this.__tlds__.concat(t).sort().filter((function(t,e,r){return t!==r[e-1]})).reverse(),xr(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,xr(this),this)},kr.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),"mailto:"!==t.schema||/^mailto:/i.test(t.url)||(t.url="mailto:"+t.url)},kr.prototype.onCompile=function(){};const Ar=kr,Tr=2147483647,Mr=36,Sr=/^xn--/,Cr=/[^\0-\x7F]/,Er=/[\x2E\u3002\uFF0E\uFF61]/g,Lr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},zr=Math.floor,Or=String.fromCharCode;function Dr(t){throw new RangeError(Lr[t])}function Ir(t,e){const r=t.split("@");let n="";r.length>1&&(n=r[0]+"@",t=r[1]);const i=function(t,e){const r=[];let n=t.length;for(;n--;)r[n]=e(t[n]);return r}((t=t.replace(Er,".")).split("."),e).join(".");return n+i}function Fr(t){const e=[];let r=0;const n=t.length;for(;r=55296&&i<=56319&&r>1,t+=zr(t/e);t>455;n+=Mr)t=zr(t/35);return zr(n+36*t/(t+38))},jr=function(t){const e=[],r=t.length;let n=0,i=128,o=72,a=t.lastIndexOf("-");a<0&&(a=0);for(let r=0;r=128&&Dr("not-basic"),e.push(t.charCodeAt(r));for(let l=a>0?a+1:0;l=r&&Dr("invalid-input");const a=(s=t.charCodeAt(l++))>=48&&s<58?s-48+26:s>=65&&s<91?s-65:s>=97&&s<123?s-97:Mr;a>=Mr&&Dr("invalid-input"),a>zr((Tr-n)/e)&&Dr("overflow"),n+=a*e;const c=i<=o?1:i>=o+26?26:i-o;if(azr(Tr/d)&&Dr("overflow"),e*=d}const c=e.length+1;o=Pr(n-a,c,0==a),zr(n/c)>Tr-i&&Dr("overflow"),i+=zr(n/c),n%=c,e.splice(n++,0,i)}var s;return String.fromCodePoint(...e)},Nr=function(t){const e=[],r=(t=Fr(t)).length;let n=128,i=0,o=72;for(const r of t)r<128&&e.push(Or(r));const a=e.length;let s=a;for(a&&e.push("-");s=n&&ezr((Tr-i)/l)&&Dr("overflow"),i+=(r-n)*l,n=r;for(const r of t)if(rTr&&Dr("overflow"),r===n){let t=i;for(let r=Mr;;r+=Mr){const n=r<=o?1:r>=o+26?26:r-o;if(t=0))try{e.hostname=Br(e.hostname)}catch(t){}return Y(Z(e))}function Zr(t){const e=st(t,!0);if(e.hostname&&(!e.protocol||qr.indexOf(e.protocol)>=0))try{e.hostname=Ur(e.hostname)}catch(t){}return H(Z(e),H.defaultChars+"%")}function $r(t,e){if(!(this instanceof $r))return new $r(t,e);e||Ft(t)||(e=t||{},t="default"),this.inline=new hr,this.block=new Ze,this.core=new Ie,this.renderer=new ue,this.linkify=new Ar,this.validateLink=Wr,this.normalizeLink=Yr,this.normalizeLinkText=Zr,this.utils=o,this.helpers=jt({},a),this.options={},this.configure(t),e&&this.set(e)}$r.prototype.set=function(t){return jt(this.options,t),this},$r.prototype.configure=function(t){const e=this;if(Ft(t)){const e=t;if(!(t=Gr[e]))throw new Error('Wrong `markdown-it` preset "'+e+'", check name')}if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach((function(r){t.components[r].rules&&e[r].ruler.enableOnly(t.components[r].rules),t.components[r].rules2&&e[r].ruler2.enableOnly(t.components[r].rules2)})),this},$r.prototype.enable=function(t,e){let r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){r=r.concat(this[e].ruler.enable(t,!0))}),this),r=r.concat(this.inline.ruler2.enable(t,!0));const n=t.filter((function(t){return r.indexOf(t)<0}));if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},$r.prototype.disable=function(t,e){let r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){r=r.concat(this[e].ruler.disable(t,!0))}),this),r=r.concat(this.inline.ruler2.disable(t,!0));const n=t.filter((function(t){return r.indexOf(t)<0}));if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},$r.prototype.use=function(t){const e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},$r.prototype.parse=function(t,e){if("string"!=typeof t)throw new Error("Input data should be a String");const r=new this.core.State(t,this,e);return this.core.process(r),r.tokens},$r.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},$r.prototype.parseInline=function(t,e){const r=new this.core.State(t,this,e);return r.inlineMode=!0,this.core.process(r),r.tokens},$r.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};const Xr=$r;class Jr{constructor(t,e){e.name=e.name.replace(//g,">");const r=(0,d.V6)(t),n=document.createElement("div");n.style.setProperty("height","100%"),r.appendChild(n),this._shadow=n.attachShadow({mode:"open"}),this._shadow.adoptedStyleSheets=[x.A,w.A],this._name=document.createElement("div"),this._shadow.appendChild(this._name),this._name.innerHTML=`
\n ${e.name} \n
${y}
\n
`;const i=document.createElement("template");i.innerHTML=function(t){const e=Xr({html:!1,linkify:!0,typographer:!0});let r="No description for this dataset.";void 0!==t.description&&(r=t.description);let n="No authors for this dataset.";if(void 0!==t.authors){n='
    ';for(const r of t.authors)n+=`
  • ${e.render(r).slice(3,-5)}
  • `;n+="
"}let i="No references for this dataset.";if(void 0!==t.references){i="
    ";for(const r of t.references)i+=`
  • ${e.render(r)}
  • `;i+="
"}return``}(e);const o=i.content.firstChild;this._modal=new E.A(o),this._modal.shadow.adoptedStyleSheets=[x.A,w.A],this._name.onclick=()=>this._modal.open(),o.addEventListener("keydown",(t=>{t.stopPropagation()}))}remove(){this._modal.remove(),this._shadow.host.remove()}}var Kr=r(14761);function Qr(t,e){return"sphere"===t?Kr.iy.validateParameters(e):"ellipsoid"===t?Kr.C1.validateParameters(e):"arrow"===t?Kr.i3.validateParameters(e):"cylinder"===t?Kr.T.validateParameters(e):"custom"===t?Kr.Nh.validateParameters(e):""}function tn(t){if("object"!=typeof t||null===t)throw Error("the structure must be a JavaScript object");if(!("size"in t)||"number"!=typeof t.size||!en(t.size))return'missing "size"';for(const e of["names","x","y","z"]){if(!(e in t))return`missing "${e}"`;const r=t[e];if(!Array.isArray(r))return`"${e}" must be an array`;if(t.size>0&&r.length!==t.size)return`wrong size for "${e}", expected ${t.size}, got ${r.length}`}return!("cell"in t)||Array.isArray(t.cell)&&9===t.cell.length?"":'"cell" must be an array of size 9'}function en(t){return Number.isInteger(t)&&t>=0}function rn(t){let e=!0;for(const r of t)e=Array.isArray(r)&&e;return e}function nn(t){const e=t[0];let r=!0;for(const n of t)r=n.length===e.length&&r;return r}function on(t){if(Array.isArray(t)){let e=!0;for(const r of t)e="string"==typeof r&&e;return e}return!1}var an=r(79352),sn=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function s(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}l((n=n.apply(t,e||[])).next())}))};class ln{constructor(t,e,r,n,i,o,a=9){if(this._target=n,this._structures=r,void 0===i)this._properties={};else{const t=_(i,(t=>Object.values(t.values).every((t=>"number"==typeof t)))),e=_(t,(t=>"atom"===t.target));this._properties=Object.fromEntries(Object.entries(e).map((([t,e])=>[t,e.values])))}if(this._resolvedStructures=new Array(r.length),this._indexer=e,this._calculatedEnvironments=function(t,e){if(void 0===e)return;const r=Array.from({length:t.length}).map(((e,r)=>Array.from({length:t[r].size})));for(let t=0;t{if(""!==tn(e))throw Error(`got custom data for this structure, but no custom loadStructure callback\nthe object was ${JSON.stringify(e)}`);return e},this._cellsData=new Map,this.onselect=()=>{},this.onremove=()=>{},this.oncreate=()=>{},this.activeChanged=()=>{},this.delayChanged=()=>{},this._onSettingChangeCallbacks=[],a>9)throw Error("chemiscope only supports up to 9 structure viewers in the grid");this._maxViewers=a;const s=(0,d.V6)(t),l=document.createElement("div");l.style.setProperty("height","100%"),s.appendChild(l),this._shadow=l.attachShadow({mode:"open"}),this._shadow.adoptedStyleSheets=[x.A,w.A],this._root=document.createElement("div"),this._root.id="grid-root",this._root.className="chsp-structure-viewer-grid",this._shadow.appendChild(this._root),this._setupGrid(1),this._active=(0,d.o)(this._cellsData),this.setActive(this._active)}_getById(t){return(0,d.VT)(t,this._shadow)}get active(){return this._active}pinned(){const t=[];for(const e of this._cellsData.values())t.push(e.current);return t}show(t){this._showInViewer(this.active,t).catch((t=>{throw t}))}addViewer(){const t=this._setupGrid(this._cellsData.size+1);if(0===t.length)return{guid:void 0,color:""};l()(1===t.length,"newGUIDs.length === 1");const e=t[0],r=this._cellsData.get(e);l()(void 0!==r,"newData !== undefined");for(const t of this._onSettingChangeCallbacks)r.viewer.onSettingChange(((r,n)=>{let i=0;for(const t of this._cellsData.keys()){if(e===t)break;i+=1}r.unshift(i.toString()),t(r,n)}));return{guid:e,color:r.color}}removeViewer(t){l()(this._cellsData.size>1,"this._cellsData.size > 1"),this._active===t&&this.setActive((0,d.o)(this._cellsData,t));const e=this._cellsData.get(t);l()(void 0!==e,"data !== undefined"),e.viewer.remove(),this._getById(`gi-${t}`).remove(),this._cellsData.delete(t)}remove(){for(const t of this._cellsData.values())t.viewer.remove();this._shadow.host.remove()}setActive(t){const e=(t,e)=>{const r=this._getById(`chsp-activate-${t}`);r.classList.toggle("chsp-active-pin",e),l()(null!==r.parentElement,"button.parentElement !== null");const n=r.parentElement.querySelector(".chsp-tooltip");l()(null!==n,"tooltip !== null"),n.innerHTML=e?"Active viewer":"Choose as active",this._getById(`gi-${t}`).classList.toggle("chsp-structure-viewer-cell-active",e)},r=this._cellsData.get(this._active);l()(void 0!==r,"current !== undefined"),e(this._active,!1),this._active=t;const n=this._cellsData.get(this._active);l()(void 0!==n,"newData !== undefined"),n.viewer._options.playbackDelay.onchange.push((t=>{this.delayChanged(t)})),this.delayChanged(n.viewer._options.playbackDelay.value),e(this._active,!0)}set positionSettingsModal(t){this._positionSettingsModal=t;for(const e of this._cellsData.values())e.viewer.positionSettingsModal=t}applySettings(t){if(0!==t.length){l()(t.length===this._cellsData.size,"settings.length === this._cellsData.size");for(const[e,r]of(0,d.HL)(this._cellsData.values()))r.viewer.applySettings(t[e])}}saveSettings(){const t=[];for(const e of this._cellsData.values())t.push(e.viewer.saveSettings());return t}onSettingChange(t){for(const e of this._cellsData.keys()){const r=this._cellsData.get(e);l()(void 0!==r,"data !== undefined"),r.viewer.onSettingChange(((r,n)=>{(r=JSON.parse(JSON.stringify(r))).unshift(this._getCurrentPositionInGrid(e).toString()),t(r,n)}))}this._onSettingChangeCallbacks.push(t)}switchTarget(t){return sn(this,void 0,void 0,(function*(){this._target=t,this._updateEnvironments("atom"===this._target);const e=Array.from(this._cellsData.entries()).map((([t,e])=>this._refreshCell(t,e,"atom"===this._target)));yield Promise.all(e)}))}_updateEnvironments(t){if(this._environments=t?this._calculatedEnvironments:void 0,t){l()(void 0!==this._environments,"this._environments !== undefined");for(const t of this._cellsData.values())t.viewer.environments=this._environments[t.current.structure]}}_refreshCell(t,e,r){return sn(this,void 0,void 0,(function*(){e.current.atom=r?this._indexer.fromEnvironment(e.current.environment,this._target).atom:void 0,this._cellsData.set(t,e);const n=this._properties?Object.keys(this._properties):[];e.viewer.refreshOptions(r,n),yield this._loadViewer(e.viewer,e.current.structure,e.current.atom)}))}_duplicate(t){return sn(this,void 0,void 0,(function*(){const e=this._cellsData.get(t);l()(void 0!==e,"data !== undefined");const r=this.addViewer().guid;if(void 0===r)return;const n=this._cellsData.get(r);return l()(void 0!==n,"newData !== undefined"),yield this._showInViewer(r,e.current),n.viewer.applySettings(e.viewer.saveSettings()),this.setActive(r),n}))}_structure(t){if(void 0===this._resolvedStructures[t]){const e=this.loadStructure(t,this._structures[t]),r=tn(e);if(""!==r)throw Error(`got invalid object as structure: ${r}\n the object was ${JSON.stringify(e)}`);this._resolvedStructures[t]=e}return this._resolvedStructures[t]}_propertiesForStructure(t){const e={};if(void 0!==this._environments){const r=this._environments[t];for(const t in this._properties){const n=this._properties[t];e[t]=[];for(const i of r)void 0!==i?e[t].push(n[i.index]):e[t].push(void 0)}return e}}_showInViewer(t,e){return sn(this,void 0,void 0,(function*(){const r=this._cellsData.get(t);l()(void 0!==r,"data !== undefined");const n=r.viewer;r.current.structure!==e.structure&&(yield this._loadViewer(n,e.structure,e.atom),r.current=e),n.highlight("atom"===this._target?e.atom:void 0),r.current=e}))}_loadViewer(t,e,r){return new Promise((n=>{const i={trajectory:!0};void 0!==this._environments&&(i.environments=this._environments[e],"atom"===this._target&&(i.highlight=r)),t.load(this._structure(e),this._propertiesForStructure(e),i,(()=>{n()}))}))}_getNextColor(){const t=[];for(const e of this._cellsData.values())t.push(e.color);return(0,d.Lz)(t)}_setupCell(t,e,r){const n=`gi-${t}`;let i=this._root.querySelector(`#${n}`),o="";if(null===i){i=document.createElement("div"),i.id=n,i.classList.add("chsp-structure-viewer-cell","grid-item"),i.style.gridColumn=`${e}`,i.style.gridRow=`${r}`,o=this._getNextColor();const a=document.createElement("template");a.innerHTML=`\n
\n WILL BE FILLED LATER\n `;const s=a.content.firstChild;s.onclick=()=>{this.setActive(t);const e=this._cellsData.get(this._active);l()(void 0!==e,"data !== undefined"),this.activeChanged(t,e.current)},i.appendChild(s),a.innerHTML='\n \n\n Remove viewer\n ';const c=a.content.firstChild;c.onclick=()=>{1!==this._cellsData.size?(this.onremove(t),this.removeViewer(t),this._setupGrid(this._cellsData.size)):(0,d.R4)("can not remove the last viewer from the grid")},i.appendChild(c),a.innerHTML='\n \n\n Duplicate viewer\n ';const u=a.content.firstChild;u.onclick=()=>sn(this,void 0,void 0,(function*(){const e=yield this._duplicate(t);void 0!==e&&this.oncreate(this.active,e.color,e.current)})),i.appendChild(u),a.innerHTML=`\n ${P}\n Download PNG\n `;const h=a.content.firstChild;return h.onclick=()=>{const e=this._cellsData.get(t);l()(void 0!==e,"data !== undefined");const r=e.viewer,n=e.current.structure;if(void 0!==e.current.atom){const t=e.current.atom;cn(r.exportPNG(),`chemiscope-structure-${n+1}-atom-${t+1}.png`)}else cn(r.exportPNG(),`chemiscope-structure-${n+1}.png`)},i.appendChild(h),this._root.appendChild(i),o}return i.style.gridColumn=`${e}`,i.style.gridRow=`${r}`,""}_setupGrid(t){const e=[];if(t<1)return(0,d.R4)("Cannot delete last molecular viewer."),e;if(t>this._maxViewers)return(0,d.R4)(`Viewer grid cannot contain more than ${this._maxViewers} viewers.`),e;const r=this.bestGridArrangement(t);if(this._cellsData.size>t){(0,d.R4)(`Eliminating last ${this._cellsData.size-t} viewers.`);let e=0;for(const r of this._cellsData.keys())e>=t&&this.removeViewer(r),e+=1}let n=1,i=1;const o=this._cellsData.keys();for(let a=0;a=this._cellsData.size?(0,d.Nl)():o.next().value;let s=this._setupCell(t,i,n);if(""===s&&(s=this._getNextColor()),i++,i>r.columns&&(n++,i=1),!this._cellsData.has(t)){const r=this._properties?Object.keys(this._properties):[],n=new an.MoleculeViewer(this._getById(`gi-${t}`),r);n.onselect=e=>{if("atom"!==this._target||this._active!==t)return;const r=this._cellsData.get(this._active);l()(void 0!==r,"data !== undefined");const i=n.natoms();l()(void 0!==i,"natoms !== undefined");const o=this._indexer.fromStructureAtom(this._target,r.current.structure,e%i);void 0!==o&&(n.highlight(e),this.onselect(o))};const i={atom:void 0,structure:-1,environment:-1};this._cellsData.set(t,{color:s,current:i,viewer:n}),void 0!==this._positionSettingsModal&&(n.positionSettingsModal=this._positionSettingsModal),e.push(t)}}for(const t of this._cellsData.values())t.viewer.resize();return e}bestGridArrangement(t){switch(t){case 1:case 2:return{rows:t,columns:1};case 3:case 4:return{rows:2,columns:2};case 5:case 6:return{rows:3,columns:2};case 8:case 7:case 9:return{rows:3,columns:3};default:throw Error("reached unreachable code: too many viewer in the grid")}}_getCurrentPositionInGrid(t){let e=0;for(const r of this._cellsData.keys()){if(t===r)break;e+=1}return e}}function cn(t,e){const r=document.createElement("a");r.download=e,r.href=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),r.remove()}r(59838);class dn{constructor(t,e){this._containerElement=(0,d.V6)(t);const r=document.createElement("div");this._containerElement.appendChild(r),this._shadow=r.attachShadow({mode:"open"}),this._shadow.adoptedStyleSheets=[x.A,w.A],this._toggleContainer=this._createToggleElement("atom"===e),this._shadow.appendChild(this._toggleContainer),this._containerElement.style.setProperty("height",`calc(100% - ${this._toggleContainer.offsetHeight}px)`),this.onchange=()=>{}}_createToggleElement(t){const e=document.createElement("div");return e.innerHTML=`\n
\n \x3c!-- Spinner --\x3e\n \n\n \x3c!-- Buttons --\x3e\n
\n \n \n
\n
\n `,e.querySelector("#structure-btn").onclick=()=>this._select("structure"),e.querySelector("#atom-btn").onclick=()=>this._select("atom"),e.firstElementChild}_select(t){const e="atom"===t;this._toggleContainer.querySelector("#structure-btn").classList.toggle("active",!e),this._toggleContainer.querySelector("#atom-btn").classList.toggle("active",e),this.onchange(t)}loader(t){this._toggleContainer.querySelector("#chsp-target-spinner").style.display=t?"inline-block":"none",this._toggleContainer.querySelectorAll(".btn-outline-secondary").forEach((e=>{t?e.setAttribute("disabled","true"):e.removeAttribute("disabled")}))}remove(){this._shadow.host.remove(),this._containerElement.style.setProperty("height","100%")}}var un=r(85072),hn=r.n(un),pn=r(97825),fn=r.n(pn),mn=r(77659),gn=r.n(mn),vn=r(55056),bn=r.n(vn),yn=r(10540),xn=r.n(yn),wn=r(41113),_n=r.n(wn),kn=r(5018),An={};An.styleTagTransform=_n(),An.setAttributes=bn(),An.insert=gn().bind(null,"head"),An.domAPI=fn(),An.insertStyleElement=xn(),hn()(kn.A,An),kn.A&&kn.A.locals&&kn.A.locals;function Tn(t){const e=(t,e)=>{if("object"!=typeof e||null===e)throw Error(`"settings.${t}" must be an object`)},r=(t,e)=>{if(!(Array.isArray(e)&&e.length>0))throw Error(`"settings.${t}" must be an array containing at least one element`)};for(const n in t)if("map"===n)e(n,t.map);else if("structure"===n){r(n,t.structure);for(const r of t.structure)e("structure entry",r)}else if("pinned"===n){r(n,t.pinned);for(const e of t.pinned)if(!(Number.isInteger(e)&&e>=0))throw Error('"settings.pinned" must be an array of number')}else{if("target"!==n)throw Error(`invalid key "${n}" in settings`);if(!["atom","structure"].includes(t.target))throw Error('"settings.target" should be either "atom" or "structure"')}}class Mn{static load(t,e){return new Promise((r=>{r(new Mn(t,e))}))}constructor(t,e){var r;this._target="structure",function(t,e){if("object"!=typeof t||null===t)throw Error("the configuration must be a JavaScript object");for(const r of e)if(!(r in t)||!("string"==typeof t[r]||t[r]instanceof HTMLElement))throw Error(`missing "${r}" key in chemiscope configuration`);if("settings"in t){if("object"!=typeof t.settings||null===t.settings)throw Error('"settings" must be an object in chemiscope configuration');Tn(t.settings)}if("loadStructure"in t&&void 0!==t.loadStructure&&!((r=t.loadStructure)&&r.constructor&&r.call&&r.apply))throw Error('"loadStructure" should be a function in chemiscope config');var r;if("maxStructureViewers"in t&&"number"!=typeof t.maxStructureViewers)throw Error('"maxStructureViewers" should be a number in chemiscope config')}(t,["meta","map","info","structure"]),function(t){if("object"!=typeof t||null===t)throw Error("the dataset must be a JavaScript object");if(!("meta"in t))throw Error('missing "meta" key in the dataset');if("object"!=typeof t.meta||null===t.meta)throw Error('"meta" must be an object in the dataset');if(function(t){if(l()(null!==t,"o !== null"),!("name"in t))throw Error('missing "meta.name" key in the dataset');if("string"!=typeof t.name)throw Error('"meta.name" must be a string in the dataset');if("description"in t&&"string"!=typeof t.description)throw Error('"meta.description" should be a string in the dataset');if("authors"in t){if(!Array.isArray(t.authors))throw Error('"meta.authors" must be an array in the dataset');for(const e of t.authors)if("string"!=typeof e)throw Error('"meta.authors" must be an array of strings in the dataset')}if("references"in t){if(!Array.isArray(t.references))throw Error('"meta.references" must be an array in the dataset');for(const e of t.references)if("string"!=typeof e)throw Error('"meta.references" must be an array of strings in the dataset')}}(t.meta),!("structures"in t))throw Error('missing "structures" key in the dataset');if(!Array.isArray(t.structures))throw Error('"structures" must be an array in the dataset');const[e,r]=function(t){let e=0;for(let r=0;r=e.length)throw Error(`out of bounds 'structure' for environment ${r}: index is ${n.structure}, we have ${e.length} structures`);if(!("center"in n)||"number"!=typeof n.center)throw Error(`missing 'center' for environment ${r}`);const i=e[n.structure].size;if(!en(n.center)||n.center>=i)throw Error(`out of bounds 'center' for environment ${r}: index is ${n.center}, we have ${i} atoms in structure ${n.structure}`);if(!("cutoff"in n)||"number"!=typeof n.cutoff)throw Error(`missing 'cutoff' for environment ${r}`)}}(t.environments,t.structures)}if("shapes"in t){const r=function(t,e,r){if("object"!=typeof t||null===t)return"'shapes' must be an object";for(const[n,i]of Object.entries(t)){const t=i;if(!("kind"in t))return`missing "kind" in shape ${n}`;if("string"!=typeof t.kind)return`shapes 'kind' must be a string for shape ${n}`;if(!("parameters"in t))return`missing "parameters" in shape ${n}`;const o=t.parameters;if("structure"in o){const t=o.structure;if(!Array.isArray(t))return`'structure' parameters should be an array in shape ${n}`;if(t.length!==e)return`'structure' parameters in shape ${n} contain ${t.length} entries, but there are ${e} structures.`}if("atom"in o){const t=o.atom;if(!Array.isArray(t))return`'atom' parameters should be an array in shape ${n}`;if(t.length!==r)return`'atom' parameters in shape ${n} contain ${t.length} entries, but there are ${r} environments.`}}return""}(t.shapes,e,n);if(""!==r)throw Error("Error checking shape definitions: "+r);const i=function(t,e){let r=0;for(let n=0;n0&&o.values.length!==a)throw Error(`wrong size for 'properties['${i}'].values': expected ${a}, got ${o.values.length}`);const s=typeof o.values[0];if("string"!==s&&"number"!==s&&!rn(o.values))throw Error(`'properties['${i}'].values' should contain string or number or an array of numbers`);for(const t of o.values)if(typeof t!==s)throw Error(`'properties['${i}'].values' should be of a single type`);if(rn(o.values)){if(!n)throw Error(`'parameters' should be provided for multidimensional properties '${i}'`);const t=o.parameters;if(!on(t))throw Error(`'properties['${i}'].parameters' should be an array of strings`);if(1!==t.length)throw Error(`'properties['${i}'].parameters' should contain a single parameter`);for(const e of t)if(!(e in n))throw Error(`parameter '${e}' of 'properties['${i}']' does not appear in the list provided parameters`);const e=o.values[0];for(const r of t){const t=n[r].values;if(e.length!==t.length)throw Error(`'properties['${i}'].values' and 'parameters['${r}'].values' should have the same length`)}if(!nn(o.values))throw Error(`'properties['${i}].values' should contain arrays of the same length`)}if("description"in o&&"string"!=typeof o.description)throw Error(`'properties['${i}'].description' should contain a string`);if("units"in o&&"string"!=typeof o.units)throw Error(`'properties['${i}'].units' should contain a string`)}}(t.properties,e,n,t.parameters)}(e),this._dataset=e,this._pinned=[],this._target=function(t){var e;const r=null===(e=t.settings)||void 0===e?void 0:e.target;if(void 0!==r){if("atom"===r&&void 0===t.environments)throw new Error('To use "atom" target, a list of environments should be provided');return r}const n=Object.values(t.properties).filter((t=>"atom"===t.target));return void 0!==t.environments&&n.length>0?"atom":"structure"}(e),this._indexer=new c(e.structures,e.environments),this.meta=new Jr(t.meta,e.meta),this.structure=new ln(t.structure,this._indexer,e.structures,this._target,e.properties,e.environments,t.maxStructureViewers),void 0!==t.loadStructure&&(this.structure.loadStructure=t.loadStructure),this.structure.activeChanged=(t,e)=>{this.map.setActive(t),this.info.show(e)},this.structure.onselect=t=>{this.map.select(t),this.info.show(t)},this.structure.onremove=t=>{this.map.removeMarker(t);const e=this._pinned.indexOf(t);l()(e>-1,"index > -1"),this._pinned.splice(e,1)},this.structure.oncreate=(t,e,r)=>{this.map.addMarker(t,e,r),this.info.show(r),this._pinned.push(t)},this.map=new B(t.map,function(t){if(void 0===t)return{};if("map"in t){const e=t.map;if("object"==typeof e){if(null===e)throw Error("invalid settings for map, should not be null");return e}throw Error(`invalid type '${typeof e}' for map, should be an object`)}return{}}(e.settings),this._indexer,this._target,e.properties),this.map.onselect=t=>{this.info.show(t),this.structure.show(t)},this.map.activeChanged=(t,e)=>{this.info.show(e),this.structure.setActive(t)};const n="atom"===this._target?"structure":"atom",i=Object.values(e.properties).filter((t=>t.target===n));void 0!==e.environments&&i.length>1&&(this._toggle=new dn(t.map,this._target),this._toggle.onchange=t=>this._switchTarget(t)),this.info=new k(t.info,e.properties,this._indexer,this._target,e.parameters),this.info.onchange=t=>{this.map.select(t),this.structure.show(t)},this.structure.delayChanged=t=>{this.info.playbackDelay=t};let o={environment:0,structure:0,atom:0};if(void 0!==e.environments&&(o=this._indexer.fromEnvironment(0,this._target)),e.settings&&e.settings.pinned){if(!Array.isArray(e.settings.pinned)||"number"!=typeof e.settings.pinned[0])throw Error("settings.pinned must be an array of numbers");o=this._indexer.fromEnvironment(e.settings.pinned[0],this._target)}const a=this.structure.active;this.map.addMarker(a,(0,d.Lz)([]),o),this._pinned.push(a),this.structure.show(o),this.info.show(o),void 0!==e.settings&&(delete e.settings.map,this.applySettings(e.settings)),void 0!==this._toggle&&(null===(r=e.settings)||void 0===r?void 0:r.target)&&this._switchTarget(this._target,!0)}_switchTarget(t,e=!1){(e||this._target!==t)&&(l()(void 0!==this._toggle,"this._toggle !== undefined"),this._toggle.loader(!0),this._target=t,setTimeout((()=>{return t=this,e=void 0,n=function*(){var t;try{this.info.switchTarget(this._target),yield this.map.switchTarget(this._target),yield this.structure.switchTarget(this._target)}finally{null===(t=this._toggle)||void 0===t||t.loader(!1)}},new((r=void 0)||(r=Promise))((function(i,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function s(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}l((n=n.apply(t,e||[])).next())}));var t,e,r,n}),0))}remove(){var t;this.map.remove(),this.meta.remove(),this.info.remove(),this.structure.remove(),null===(t=this._toggle)||void 0===t||t.remove()}saveSettings(){return{target:this._target,map:this.map.saveSettings(),pinned:this.structure.pinned().map((t=>"atom"===this._target?t.environment:t.structure)),structure:this.structure.saveSettings()}}applySettings(t){if(Tn(t),void 0!==t.map&&this.map.applySettings(t.map),void 0!==t.pinned){if(!Array.isArray(t.pinned))throw Error("settings.pinned must be an array");for(const t of this._pinned.slice(1))this.map.removeMarker(t),this.structure.removeViewer(t);if(this._pinned=[this._pinned[0]],l()(t.pinned.length>0,"settings.pinned.length > 0"),"number"!=typeof t.pinned[0])throw Error("settings.pinned must be an array of numbers");const e=this._indexer.fromEnvironment(t.pinned[0],this._target);this.map.select(e),this.info.show(e),this.structure.show(e);for(const e of t.pinned.slice(1)){if("number"!=typeof e)throw Error("settings.pinned must be an array of numbers");const{guid:t,color:r}=this.structure.addViewer();if(void 0===t)throw Error("too many environments in 'pinned' setting");const n=this._indexer.fromEnvironment(e,this._target);this.map.addMarker(t,r,n),this.map.setActive(t),this._pinned.push(t),this.info.show(n),this.structure.setActive(t),this.structure.show(n)}}void 0!==t.structure&&this.structure.applySettings(t.structure)}onSettingChange(t){this.map.onSettingChange(((e,r)=>{(e=JSON.parse(JSON.stringify(e))).unshift("map"),t(e,r)})),this.structure.onSettingChange(((e,r)=>{(e=JSON.parse(JSON.stringify(e))).unshift("structure"),t(e,r)}))}dataset(t=!1){const e=JSON.parse(JSON.stringify(this._dataset,((t,e)=>"number"==typeof e&&isNaN(e)?"***NaN***":e)),((t,e)=>"***NaN***"===e?NaN:e));if(t){e.structures=[];for(let t=0;t{"use strict";function n(t){return t.map((t=>[t[0],`rgb(${t[1][0]}, ${t[1][1]}, ${t[1][2]})`]))}r.d(e,{s:()=>i});const i={inferno:n([[0,[0,0,3]],[.0159,[1,1,9]],[.0317,[3,2,18]],[.0476,[6,4,27]],[.0635,[10,7,35]],[.0794,[15,9,45]],[.0952,[20,11,54]],[.1111,[26,11,64]],[.127,[32,12,74]],[.1429,[39,11,82]],[.1587,[46,10,90]],[.1746,[53,9,96]],[.1905,[60,9,101]],[.2063,[67,10,104]],[.2222,[74,11,106]],[.2381,[80,13,108]],[.254,[88,16,109]],[.2698,[95,18,110]],[.2857,[101,21,110]],[.3016,[107,23,110]],[.3175,[114,25,109]],[.3333,[120,28,109]],[.3492,[126,30,108]],[.3651,[133,32,106]],[.381,[139,34,105]],[.3968,[145,37,103]],[.4127,[152,39,101]],[.4286,[158,41,99]],[.4444,[164,44,96]],[.4603,[171,46,93]],[.4762,[177,49,90]],[.4921,[183,52,86]],[.5079,[190,56,82]],[.5238,[196,60,78]],[.5397,[201,63,74]],[.5556,[207,68,70]],[.5714,[212,72,65]],[.5873,[217,77,61]],[.6032,[221,82,56]],[.619,[226,87,51]],[.6349,[230,92,46]],[.6508,[233,98,42]],[.6667,[237,104,37]],[.6825,[240,111,31]],[.6984,[242,117,26]],[.7143,[245,124,21]],[.7302,[247,131,16]],[.746,[248,138,11]],[.7619,[250,147,6]],[.7778,[251,155,6]],[.7937,[251,162,8]],[.8095,[251,170,14]],[.8254,[251,177,22]],[.8413,[251,185,30]],[.8571,[250,193,40]],[.873,[248,201,49]],[.8889,[247,209,60]],[.9048,[245,217,72]],[.9206,[243,224,86]],[.9365,[241,232,100]],[.9524,[241,238,116]],[.9683,[242,244,133]],[.9841,[246,250,149]],[1,[252,254,164]]]),magma:n([[0,[0,0,3]],[.0159,[1,1,9]],[.0317,[3,3,17]],[.0476,[6,5,25]],[.0635,[10,7,34]],[.0794,[14,10,42]],[.0952,[18,13,51]],[.1111,[23,15,60]],[.127,[28,16,70]],[.1429,[34,17,80]],[.1587,[40,17,89]],[.1746,[47,16,98]],[.1905,[53,15,106]],[.2063,[60,15,113]],[.2222,[67,15,117]],[.2381,[74,16,121]],[.254,[82,18,124]],[.2698,[88,21,126]],[.2857,[94,23,127]],[.3016,[101,26,128]],[.3175,[107,28,128]],[.3333,[113,31,129]],[.3492,[119,33,129]],[.3651,[126,36,129]],[.381,[132,38,129]],[.3968,[138,40,129]],[.4127,[145,42,128]],[.4286,[151,44,127]],[.4444,[158,46,126]],[.4603,[164,48,125]],[.4762,[171,51,124]],[.4921,[177,53,122]],[.5079,[185,55,120]],[.5238,[192,58,117]],[.5397,[198,60,115]],[.5556,[205,63,112]],[.5714,[211,66,109]],[.5873,[217,70,106]],[.6032,[222,74,103]],[.619,[228,78,100]],[.6349,[232,84,97]],[.6508,[237,89,95]],[.6667,[240,96,93]],[.6825,[243,103,91]],[.6984,[246,110,91]],[.7143,[248,117,92]],[.7302,[249,125,93]],[.746,[251,132,96]],[.7619,[252,142,99]],[.7778,[253,149,103]],[.7937,[253,157,107]],[.8095,[253,164,112]],[.8254,[254,172,117]],[.8413,[254,179,123]],[.8571,[254,187,128]],[.873,[254,194,134]],[.8889,[254,201,141]],[.9048,[253,209,147]],[.9206,[253,216,154]],[.9365,[253,223,161]],[.9524,[252,230,168]],[.9683,[252,238,176]],[.9841,[252,245,183]],[1,[251,252,191]]]),plasma:n([[0,[12,7,134]],[.0159,[24,6,139]],[.0317,[33,5,143]],[.0476,[41,5,147]],[.0635,[49,4,150]],[.0794,[56,4,153]],[.0952,[63,3,156]],[.1111,[69,3,158]],[.127,[76,2,161]],[.1429,[82,1,163]],[.1587,[89,1,164]],[.1746,[95,0,166]],[.1905,[101,0,167]],[.2063,[108,0,168]],[.2222,[114,0,168]],[.2381,[120,1,168]],[.254,[127,3,167]],[.2698,[133,6,166]],[.2857,[139,9,164]],[.3016,[144,14,163]],[.3175,[150,18,160]],[.3333,[155,23,158]],[.3492,[160,27,155]],[.3651,[165,31,151]],[.381,[170,36,148]],[.3968,[175,40,144]],[.4127,[180,45,141]],[.4286,[184,50,137]],[.4444,[188,54,133]],[.4603,[192,59,129]],[.4762,[196,63,126]],[.4921,[200,68,122]],[.5079,[205,73,117]],[.5238,[209,78,114]],[.5397,[212,82,110]],[.5556,[215,87,107]],[.5714,[219,91,103]],[.5873,[222,96,100]],[.6032,[225,101,96]],[.619,[228,106,93]],[.6349,[231,110,90]],[.6508,[234,115,86]],[.6667,[236,120,83]],[.6825,[239,125,79]],[.6984,[241,130,76]],[.7143,[243,135,72]],[.7302,[245,141,69]],[.746,[247,146,65]],[.7619,[249,153,61]],[.7778,[250,159,58]],[.7937,[251,164,54]],[.8095,[252,170,51]],[.8254,[253,176,48]],[.8413,[253,182,45]],[.8571,[253,188,42]],[.873,[253,195,40]],[.8889,[252,201,38]],[.9048,[251,208,36]],[.9206,[250,214,36]],[.9365,[248,221,36]],[.9524,[246,228,37]],[.9683,[244,234,38]],[.9841,[242,241,38]],[1,[239,248,33]]]),viridis:n([[0,[68,1,84]],[.0159,[69,6,90]],[.0317,[70,12,95]],[.0476,[71,18,101]],[.0635,[71,24,106]],[.0794,[72,29,111]],[.0952,[72,34,115]],[.1111,[71,39,119]],[.127,[71,44,123]],[.1429,[70,49,126]],[.1587,[69,54,129]],[.1746,[67,59,131]],[.1905,[66,64,133]],[.2063,[64,68,135]],[.2222,[62,73,137]],[.2381,[60,77,138]],[.254,[58,83,139]],[.2698,[56,87,140]],[.2857,[54,91,140]],[.3016,[52,95,141]],[.3175,[50,99,141]],[.3333,[48,103,141]],[.3492,[46,107,142]],[.3651,[45,111,142]],[.381,[43,115,142]],[.3968,[42,119,142]],[.4127,[40,122,142]],[.4286,[39,126,142]],[.4444,[37,130,142]],[.4603,[36,134,141]],[.4762,[34,137,141]],[.4921,[33,141,140]],[.5079,[31,146,140]],[.5238,[31,150,139]],[.5397,[30,153,138]],[.5556,[30,157,136]],[.5714,[31,161,135]],[.5873,[32,165,133]],[.6032,[35,168,131]],[.619,[38,172,129]],[.6349,[42,176,126]],[.6508,[47,179,123]],[.6667,[53,183,120]],[.6825,[59,186,117]],[.6984,[66,190,113]],[.7143,[73,193,109]],[.7302,[81,196,104]],[.746,[89,199,100]],[.7619,[100,203,93]],[.7778,[109,206,88]],[.7937,[119,208,82]],[.8095,[129,211,76]],[.8254,[139,213,70]],[.8413,[149,215,63]],[.8571,[159,217,56]],[.873,[170,219,50]],[.8889,[181,221,43]],[.9048,[191,223,36]],[.9206,[202,224,30]],[.9365,[212,225,26]],[.9524,[223,227,24]],[.9683,[233,228,25]],[.9841,[243,229,30]],[1,[253,231,36]]]),cividis:n([[0,[0,34,77]],[.0159,[0,37,84]],[.0317,[0,40,91]],[.0476,[0,42,98]],[.0635,[0,45,105]],[.0794,[0,48,112]],[.0952,[4,50,112]],[.1111,[17,53,111]],[.127,[26,56,111]],[.1429,[33,59,110]],[.1587,[39,61,109]],[.1746,[44,64,109]],[.1905,[49,67,108]],[.2063,[54,70,108]],[.2222,[58,72,107]],[.2381,[63,75,107]],[.254,[68,79,107]],[.2698,[72,81,107]],[.2857,[76,84,108]],[.3016,[79,87,108]],[.3175,[83,90,108]],[.3333,[87,93,109]],[.3492,[90,95,109]],[.3651,[94,98,110]],[.381,[97,101,111]],[.3968,[101,104,112]],[.4127,[104,107,113]],[.4286,[108,109,114]],[.4444,[111,112,115]],[.4603,[115,115,116]],[.4762,[118,118,118]],[.4921,[121,121,119]],[.5079,[126,125,120]],[.5238,[130,128,120]],[.5397,[133,131,120]],[.5556,[137,134,120]],[.5714,[141,137,120]],[.5873,[145,140,119]],[.6032,[149,143,119]],[.619,[153,146,118]],[.6349,[157,149,117]],[.6508,[161,152,116]],[.6667,[165,155,115]],[.6825,[169,158,114]],[.6984,[173,162,113]],[.7143,[177,165,112]],[.7302,[181,168,110]],[.746,[185,171,109]],[.7619,[190,176,106]],[.7778,[195,179,104]],[.7937,[199,182,102]],[.8095,[203,186,100]],[.8254,[207,189,97]],[.8413,[212,193,94]],[.8571,[216,196,91]],[.873,[220,200,88]],[.8889,[225,204,84]],[.9048,[229,207,80]],[.9206,[234,211,76]],[.9365,[238,215,71]],[.9524,[243,218,66]],[.9683,[248,222,59]],[.9841,[253,226,52]],[1,[253,231,55]]]),seismic:n([[0,[0,0,77]],[.0159,[0,0,88]],[.0317,[0,0,99]],[.0476,[0,0,111]],[.0635,[0,0,122]],[.0794,[0,0,133]],[.0952,[0,0,144]],[.1111,[0,0,156]],[.127,[0,0,167]],[.1429,[0,0,178]],[.1587,[0,0,189]],[.1746,[0,0,200]],[.1905,[0,0,212]],[.2063,[0,0,223]],[.2222,[0,0,234]],[.2381,[0,0,245]],[.254,[5,5,255]],[.2698,[21,21,255]],[.2857,[37,37,255]],[.3016,[53,53,255]],[.3175,[69,69,255]],[.3333,[85,85,255]],[.3492,[101,101,255]],[.3651,[117,117,255]],[.381,[134,134,255]],[.3968,[150,150,255]],[.4127,[166,166,255]],[.4286,[182,182,255]],[.4444,[198,198,255]],[.4603,[214,214,255]],[.4762,[230,230,255]],[.4921,[246,246,255]],[.5079,[255,246,246]],[.5238,[255,230,230]],[.5397,[255,214,214]],[.5556,[255,198,198]],[.5714,[255,182,182]],[.5873,[255,166,166]],[.6032,[255,150,150]],[.619,[255,134,134]],[.6349,[255,117,117]],[.6508,[255,101,101]],[.6667,[255,85,85]],[.6825,[255,69,69]],[.6984,[255,53,53]],[.7143,[255,37,37]],[.7302,[255,21,21]],[.746,[255,5,5]],[.7619,[248,0,0]],[.7778,[240,0,0]],[.7937,[232,0,0]],[.8095,[224,0,0]],[.8254,[216,0,0]],[.8413,[208,0,0]],[.8571,[200,0,0]],[.873,[192,0,0]],[.8889,[184,0,0]],[.9048,[176,0,0]],[.9206,[168,0,0]],[.9365,[160,0,0]],[.9524,[152,0,0]],[.9683,[144,0,0]],[.9841,[136,0,0]],[1,[128,0,0]]]),brg:n([[0,[0,0,255]],[.0159,[8,0,248]],[.0317,[16,0,240]],[.0476,[24,0,232]],[.0635,[32,0,224]],[.0794,[40,0,216]],[.0952,[48,0,208]],[.1111,[56,0,200]],[.127,[64,0,192]],[.1429,[72,0,184]],[.1587,[80,0,176]],[.1746,[88,0,168]],[.1905,[96,0,160]],[.2063,[104,0,152]],[.2222,[112,0,144]],[.2381,[120,0,136]],[.254,[131,0,125]],[.2698,[139,0,117]],[.2857,[147,0,109]],[.3016,[155,0,101]],[.3175,[163,0,93]],[.3333,[171,0,85]],[.3492,[179,0,77]],[.3651,[187,0,69]],[.381,[195,0,61]],[.3968,[203,0,53]],[.4127,[211,0,45]],[.4286,[219,0,37]],[.4444,[227,0,29]],[.4603,[235,0,21]],[.4762,[243,0,13]],[.4921,[251,0,5]],[.5079,[251,5,0]],[.5238,[243,13,0]],[.5397,[235,21,0]],[.5556,[227,29,0]],[.5714,[219,37,0]],[.5873,[211,45,0]],[.6032,[203,53,0]],[.619,[195,61,0]],[.6349,[187,69,0]],[.6508,[179,77,0]],[.6667,[171,85,0]],[.6825,[163,93,0]],[.6984,[155,101,0]],[.7143,[147,109,0]],[.7302,[139,117,0]],[.746,[131,125,0]],[.7619,[120,136,0]],[.7778,[112,144,0]],[.7937,[104,152,0]],[.8095,[96,160,0]],[.8254,[88,168,0]],[.8413,[80,176,0]],[.8571,[72,184,0]],[.873,[64,192,0]],[.8889,[56,200,0]],[.9048,[48,208,0]],[.9206,[40,216,0]],[.9365,[32,224,0]],[.9524,[24,232,0]],[.9683,[16,240,0]],[.9841,[8,248,0]],[1,[0,255,0]]]),bwr:n([[0,[0,0,255]],[.01587,[8,8,255]],[.03175,[16,16,255]],[.04762,[24,24,255]],[.06349,[32,32,255]],[.07937,[40,40,255]],[.09524,[48,48,255]],[.1111,[56,56,255]],[.127,[64,64,255]],[.1429,[72,72,255]],[.1587,[80,80,255]],[.1746,[89,89,255]],[.1905,[97,97,255]],[.2063,[105,105,255]],[.2222,[113,113,255]],[.2381,[121,121,255]],[.254,[129,129,255]],[.2698,[137,137,255]],[.2857,[145,145,255]],[.3016,[153,153,255]],[.3175,[161,161,255]],[.3333,[170,170,255]],[.3492,[178,178,255]],[.3651,[186,186,255]],[.381,[194,194,255]],[.3968,[202,202,255]],[.4127,[210,210,255]],[.4286,[218,218,255]],[.4444,[226,226,255]],[.4603,[234,234,255]],[.4762,[242,242,255]],[.4921,[250,250,255]],[.5079,[255,250,250]],[.5238,[254,242,242]],[.5397,[255,234,234]],[.5556,[255,226,226]],[.5714,[255,218,218]],[.5873,[254,210,210]],[.6032,[255,202,202]],[.619,[255,194,194]],[.6349,[255,186,186]],[.6508,[254,178,178]],[.6667,[255,170,170]],[.6825,[255,161,161]],[.6984,[255,153,153]],[.7143,[254,145,145]],[.7302,[255,137,137]],[.746,[255,129,129]],[.7619,[255,121,121]],[.7778,[255,113,113]],[.7937,[255,105,105]],[.8095,[255,97,97]],[.8254,[255,89,89]],[.8413,[255,80,80]],[.8571,[255,72,72]],[.873,[255,64,64]],[.8889,[255,56,56]],[.9048,[255,48,48]],[.9206,[255,40,40]],[.9365,[255,32,32]],[.9524,[255,24,24]],[.9683,[255,16,16]],[.9841,[255,8,8]],[1,[255,0,0]]]),rwg:n([[0,[200,0,0]],[.01587,[201,8,8]],[.03175,[203,16,16]],[.04762,[205,24,24]],[.06349,[206,32,32]],[.07937,[208,40,40]],[.09524,[210,48,48]],[.1111,[212,56,56]],[.127,[213,64,64]],[.1429,[215,72,72]],[.1587,[217,80,80]],[.1746,[219,89,89]],[.1905,[220,97,97]],[.2063,[222,105,105]],[.2222,[224,113,113]],[.2381,[226,121,121]],[.254,[227,129,129]],[.2698,[229,137,137]],[.2857,[231,145,145]],[.3016,[233,153,153]],[.3175,[234,161,161]],[.3333,[236,170,170]],[.3492,[238,178,178]],[.3651,[240,186,186]],[.381,[241,194,194]],[.3968,[243,202,202]],[.4127,[245,210,210]],[.4286,[247,218,218]],[.4444,[248,226,226]],[.4603,[250,234,234]],[.4762,[252,242,242]],[.4921,[254,250,250]],[.5079,[250,252,250]],[.5238,[242,248,242]],[.5397,[234,244,234]],[.5556,[226,240,226]],[.5714,[218,236,218]],[.5873,[210,232,210]],[.6032,[202,228,202]],[.619,[194,224,194]],[.6349,[186,220,186]],[.6508,[178,216,178]],[.6667,[170,212,170]],[.6825,[161,208,161]],[.6984,[153,204,153]],[.7143,[145,200,145]],[.7302,[137,196,137]],[.746,[129,192,129]],[.7619,[121,188,121]],[.7778,[113,184,113]],[.7937,[105,180,105]],[.8095,[97,176,97]],[.8254,[89,172,89]],[.8413,[80,168,80]],[.8571,[72,164,72]],[.873,[64,160,64]],[.8889,[56,156,56]],[.9048,[48,152,48]],[.9206,[40,148,40]],[.9365,[32,144,32]],[.9524,[24,140,24]],[.9683,[16,136,16]],[.9841,[8,132,8]],[1,[0,128,0]]]),"twilight (periodic)":n([[0,[225,216,226]],[.0159,[221,217,224]],[.0317,[214,214,220]],[.0476,[205,210,216]],[.0635,[194,205,211]],[.0794,[182,199,207]],[.0952,[170,193,203]],[.1111,[158,187,200]],[.127,[147,180,198]],[.1429,[137,172,196]],[.1587,[128,165,195]],[.1746,[119,156,193]],[.1905,[112,149,192]],[.2063,[107,141,191]],[.2222,[102,132,189]],[.2381,[99,124,187]],[.254,[97,115,185]],[.2698,[96,106,183]],[.2857,[95,97,180]],[.3016,[94,87,176]],[.3175,[94,78,171]],[.3333,[93,67,164]],[.3492,[92,57,157]],[.3651,[90,48,149]],[.381,[88,39,139]],[.3968,[84,31,127]],[.4127,[79,25,114]],[.4286,[73,21,100]],[.4444,[66,18,87]],[.4603,[59,17,75]],[.4762,[54,16,65]],[.4921,[50,17,58]],[.5079,[49,18,55]],[.5238,[55,17,56]],[.5397,[62,17,60]],[.5556,[70,18,64]],[.5714,[80,20,68]],[.5873,[90,22,72]],[.6032,[101,25,75]],[.619,[111,28,78]],[.6349,[122,32,79]],[.6508,[131,37,80]],[.6667,[141,44,80]],[.6825,[150,50,79]],[.6984,[157,58,79]],[.7143,[164,66,79]],[.7302,[170,75,80]],[.746,[176,84,81]],[.7619,[181,93,83]],[.7778,[186,102,87]],[.7937,[190,112,91]],[.8095,[193,121,96]],[.8254,[196,131,104]],[.8413,[199,142,113]],[.8571,[201,152,123]],[.873,[203,162,135]],[.8889,[206,171,148]],[.9048,[209,180,161]],[.9206,[212,189,175]],[.9365,[216,197,188]],[.9524,[219,205,201]],[.9683,[222,211,212]],[.9841,[224,215,220]],[1,[225,216,225]]]),"twilight dark (periodic)":n([[0,[47,19,55]],[.0159,[51,17,61]],[.0317,[56,16,70]],[.0476,[62,17,81]],[.0635,[69,19,93]],[.0794,[76,22,107]],[.0952,[82,27,120]],[.1111,[86,34,133]],[.127,[89,43,144]],[.1429,[91,52,153]],[.1587,[93,62,161]],[.1746,[93,73,168]],[.1905,[94,83,173]],[.2063,[94,92,178]],[.2222,[95,101,181]],[.2381,[96,110,184]],[.254,[98,119,186]],[.2698,[101,128,188]],[.2857,[104,136,190]],[.3016,[109,145,191]],[.3175,[115,153,193]],[.3333,[124,161,194]],[.3492,[132,169,195]],[.3651,[142,176,197]],[.381,[152,183,199]],[.3968,[164,190,202]],[.4127,[176,196,205]],[.4286,[188,202,209]],[.4444,[199,208,214]],[.4603,[210,213,218]],[.4762,[217,216,222]],[.4921,[223,217,225]],[.5079,[225,216,223]],[.5238,[223,213,216]],[.5397,[221,208,207]],[.5556,[217,201,195]],[.5714,[214,193,181]],[.5873,[210,185,168]],[.6032,[207,176,154]],[.619,[204,167,141]],[.6349,[202,157,129]],[.6508,[200,147,118]],[.6667,[197,136,108]],[.6825,[195,126,100]],[.6984,[192,116,93]],[.7143,[188,107,89]],[.7302,[184,97,85]],[.746,[179,88,82]],[.7619,[173,79,80]],[.7778,[167,70,79]],[.7937,[161,62,79]],[.8095,[154,54,79]],[.8254,[146,47,79]],[.8413,[136,40,80]],[.8571,[127,34,80]],[.873,[117,30,79]],[.8889,[106,26,77]],[.9048,[95,23,74]],[.9206,[85,21,70]],[.9365,[75,19,66]],[.9524,[66,17,61]],[.9683,[58,17,58]],[.9841,[52,17,55]],[1,[47,20,54]]]),"hsv (periodic)":n([[0,[165,38,38]],[.0159,[172,57,45]],[.0317,[179,76,52]],[.0476,[187,94,59]],[.0635,[194,113,66]],[.0794,[201,132,73]],[.0952,[208,151,80]],[.1111,[215,170,87]],[.127,[222,189,94]],[.1429,[229,208,102]],[.1587,[236,227,109]],[.1746,[237,239,113]],[.1905,[223,237,110]],[.2063,[208,234,106]],[.2222,[193,230,103]],[.2381,[177,227,99]],[.254,[158,222,95]],[.2698,[143,219,91]],[.2857,[127,215,88]],[.3016,[112,212,84]],[.3175,[97,208,81]],[.3333,[81,205,77]],[.3492,[77,204,85]],[.3651,[78,205,98]],[.381,[79,207,111]],[.3968,[80,208,124]],[.4127,[82,209,137]],[.4286,[83,210,150]],[.4444,[84,211,163]],[.4603,[85,213,176]],[.4762,[86,214,189]],[.4921,[87,215,202]],[.5079,[88,214,215]],[.5238,[81,195,208]],[.5397,[74,176,201]],[.5556,[67,157,194]],[.5714,[60,138,187]],[.5873,[52,120,180]],[.6032,[45,101,173]],[.619,[38,82,166]],[.6349,[31,63,159]],[.6508,[24,44,152]],[.6667,[17,25,145]],[.6825,[17,14,141]],[.6984,[33,17,144]],[.7143,[48,20,148]],[.7302,[63,24,152]],[.746,[79,28,155]],[.7619,[98,32,160]],[.7778,[113,36,163]],[.7937,[129,39,167]],[.8095,[144,43,170]],[.8254,[159,46,174]],[.8413,[173,49,176]],[.8571,[177,50,168]],[.873,[176,48,155]],[.8889,[175,47,142]],[.9048,[174,46,129]],[.9206,[172,45,116]],[.9365,[171,44,103]],[.9524,[170,42,90]],[.9683,[169,41,77]],[.9841,[168,40,64]],[1,[166,39,51]]])}},50112:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});class n{constructor(t){this._element=t,this._activeElement=null,this._open=!1;const e=document.createElement("div");document.body.appendChild(e),this.shadow=e.attachShadow({mode:"open"}),this.shadow.appendChild(this._element),this._backdrop=document.createElement("div"),this._backdrop.classList.add("modal-backdrop","fade"),this._element.addEventListener("click",(t=>{t.target===t.currentTarget&&this.close()}));for(const t of this._element.querySelectorAll('[data-bs-dismiss="modal"]'))t.addEventListener("click",(()=>{this.close()}));document.addEventListener("keydown",(t=>{"Escape"===t.key&&(t.preventDefault(),this.close())})),this._element.addEventListener("transitionend",(t=>{t.target!==t.currentTarget||this._open||this._element.style.setProperty("display","none")})),this._backdrop.addEventListener("transitionend",(()=>{this._open||(this._backdrop.remove(),this._activeElement&&this._activeElement instanceof HTMLElement&&this._activeElement.focus(),this._activeElement=null)}))}close(){this._backdrop.classList.remove("show"),this._element.classList.remove("show"),this._open=!1}open(){this._element.getRootNode().appendChild(this._backdrop),this._element.style.setProperty("display","block"),this._element.offsetHeight,this._backdrop.classList.add("show"),this._element.classList.add("show"),this._activeElement=i(),this._activeElement&&this._activeElement instanceof HTMLElement&&this._activeElement.blur(),this._open=!0}toggle(t=!this.open){t?this.open():this.close()}remove(){this.shadow.host.remove()}}function i(t=document){const e=t.activeElement;return(null==e?void 0:e.shadowRoot)?i(e.shadowRoot):e}},45127:(t,e,r)=>{"use strict";r.d(e,{Je:()=>s,W2:()=>l,qP:()=>a});var n=r(34961),i=r.n(n),o=r(91683);function a(t,e=""){return r=>{if(!t.includes(r))throw Error(`invalid property '${r}' for ${e}, are you sure the settings correspond to the current dataset?`)}}class s{constructor(t,e){this.type=t,this._value=e,this._previous_value=e,this._boundList=[],this.validate=()=>{},this.onchange=[],Object.preventExtensions(this)}get value(){return this._value}set value(t){this._update(t.toString(),"JS")}changed(t){for(const t of this._boundList)if("multival"===t.attribute){const e=this._value.split(","),r=t.element;for(const t of r.options)t.selected=e.includes(t.value)}else t.element[t.attribute]=this._value;for(const e of this.onchange)e(this._value,t)}reset(){this.value=this._previous_value}bind(t,e){let r;if("string"==typeof t&&(t=(0,o.VT)(t)),"multival"===e){r=t=>{i()(null!==t.target,"event.target !== null");const e=t.target,r=Array.from(e.options).filter((t=>t.selected)).map((t=>t.value));this._update(r.toString(),"DOM")};const e=this._value.split(",");for(const r of t.options)r.selected=e.includes(r.value)}else r=t=>{i()(null!==t.target,"event.target !== null"),this._update(t.target[e].toString(),"DOM")},t[e]=this._value;t.addEventListener("change",r),this._boundList.push({element:t,attribute:e,listener:r})}disable(){for(const t of this._boundList){const e=t.element;"disabled"in e&&(e.disabled=!0)}}enable(){for(const t of this._boundList){const e=t.element;"disabled"in e&&(e.disabled=!1)}}unbindAll(){for(const t of this._boundList)t.element.removeEventListener("change",t.listener);this._boundList=[]}_update(t,e){const r=function(t,e){if("string"===t)return e;if("int"===t)return parseInt(e,10);if("number"===t)return parseFloat(e);if("boolean"===t){if("false"===e)return!1;if("true"===e)return!0;throw Error(`invalid value for boolean: ${e}`)}throw Error(`unknown type '${t}' passed to parse`)}(this.type,t);this._value!==r&&(this.validate(r),this._previous_value=this.value,this._value=r,this.changed(e))}}class l{saveSettings(){const t={};return this.foreachOption(((e,r)=>{i()(e.length>=1,"keys.length >= 1");const n=r.value;if(void 0!==n||null!==n||!Number.isNaN(n)){let r=t;for(const t of e.slice(0,e.length-1))t in r||(r[t]={}),r=r[t];r[e[e.length-1]]=n}})),t}applySettings(t){const e=JSON.parse(JSON.stringify(t));this.foreachOption(((t,r)=>{i()(t.length>=1,"keys.length >= 1");let n,a=e;for(const e of t.slice(0,t.length-1)){if(!(e in a))return;n=a,a=a[e]}const s=t[t.length-1];if(s in a){const e=a[s];if(null==e||Number.isNaN(e))return void(0,o.R4)(`ignored setting '${s}' with invalid value '${e}'`);r.value=e,delete a[s],void 0!==n&&0===Object.keys(a).length&&(i()(t.length>=2,"keys.length >= 2"),delete n[t[t.length-2]])}})),0!==Object.keys(e).length&&(0,o.R4)(`ignored unknown settings '${JSON.stringify(e)}'`)}onSettingChange(t){this.foreachOption(((e,r)=>{r.onchange.push((r=>t(e,r)))}))}foreachOption(t){c(this,t,[])}}function c(t,e,r=[]){if(r.length>10)throw Error("setting object is too deep");for(const n in t){if(n.startsWith("_"))continue;const i=r.concat([n]),o=t[n];o instanceof s?e(i,o):"object"==typeof o&&null!==o&&c(o,e,i)}}},59838:(t,e,r)=>{"use strict";r.d(e,{O:()=>u});var n=r(34961),i=r.n(n),o=r(88862),a=r(50112),s=r(45127),l=r(91683),c=r(17136),d=r(90170);class u extends s.W2{constructor(t,e,r=[]){super(),this.bonds=new s.Je("boolean",!0),this.atoms=new s.Je("boolean",!0),this.spaceFilling=new s.Je("boolean",!1),this.atomLabels=new s.Je("boolean",!1),this.shape=new s.Je("string",""),this.unitCell=new s.Je("boolean",!1),this.rotation=new s.Je("boolean",!1),this.supercell=[new s.Je("int",1),new s.Je("int",1),new s.Je("int",1)];const n=t=>{if(!(Number.isInteger(t)&&t>0))throw Error("supercell count should be a positive integer")};this.supercell[0].validate=n,this.supercell[1].validate=n,this.supercell[2].validate=n,this.axes=new s.Je("string","off"),this.axes.validate=(0,s.qP)(["off","abc","xyz"],"axes"),this.keepOrientation=new s.Je("boolean",!1),this.playbackDelay=new s.Je("number",700),this.environments={activated:new s.Je("boolean",!0),bgColor:new s.Je("string","grey"),bgStyle:new s.Je("string","ball-stick"),center:new s.Je("boolean",!1),cutoff:new s.Je("number",4)},this.color={property:new s.Je("string","element"),min:new s.Je("number",0),max:new s.Je("number",0),transform:new s.Je("string","linear"),palette:new s.Je("string","bwr")},r.includes("element")?this.color.property.validate=(0,s.qP)(r,"color"):this.color.property.validate=(0,s.qP)(r.concat(["element"]),"color"),this.color.transform.validate=(0,s.qP)(["linear","log","sqrt","inverse"],"transform"),this.color.palette.validate=(0,s.qP)(Object.keys(c.s),"palette"),this.environments.bgColor.validate=(0,s.qP)(["grey","CPK","property"],"background atoms coloring"),this.environments.bgStyle.validate=(0,s.qP)(["ball-stick","licorice","hide"],"background atoms style"),this.environments.cutoff.validate=t=>{if(t<0)throw Error("cutoff should be a positive number")},this._positionSettingsModal=e;const{openModal:i,modal:o}=this._createSettingsHTML();this._modal=o,this._modal.shadow.adoptedStyleSheets=t.getRootNode().adoptedStyleSheets,this._openModal=i,t.appendChild(this._openModal),this._bind(r)}getModalElement(t){return(0,l.VT)(t,this._modal.shadow)}get modal(){return this._modal}remove(){this._modal.remove(),this._openModal.remove()}applySettings(t){"packedCell"in t&&(!1!==t.packedCell&&(0,l.R4)("packedCell option has been removed, but it is set to true in the settings"),delete t.packedCell),super.applySettings(t)}_createSettingsHTML(){const t=document.createElement("template");t.innerHTML=`\n
${d.A}
\n `;const e=t.content.firstChild;t.innerHTML='\n';const r=t.content.querySelector(".modal");i()(null!==r&&r instanceof HTMLElement,"modalElement !== null && modalElement instanceof HTMLElement");const n=r.querySelector(".modal-dialog");i()(null!==n&&n instanceof HTMLElement,"modalDialog !== null && modalDialog instanceof HTMLElement"),e.addEventListener("click",(()=>{if(null===n.getAttribute("data-initial-modal-positions-set")){n.setAttribute("data-initial-modal-positions-set","true"),n.parentNode.style.display="block";const{top:t,left:e}=this._positionSettingsModal(n.getBoundingClientRect());n.style.width=n.offsetWidth/1.5+"px",n.style.minWidth="500px",n.style.margin="0",n.style.position="fixed",n.style.top=`${t}px`,n.style.left=`${e}px`}s.open()})),(0,l.eB)(n,".modal-header"),r.addEventListener("keydown",(t=>t.stopPropagation()));const s=new a.A(r);return o.A.initialize(r),{modal:s,openModal:e}}_bind(t){this.atomLabels.bind(this.getModalElement("atom-labels"),"checked");const e=this.getModalElement("shapes");this.shape.bind(e,"multival"),this.spaceFilling.bind(this.getModalElement("space-filling"),"checked"),this.bonds.bind(this.getModalElement("bonds"),"checked"),this.atoms.bind(this.getModalElement("atoms"),"checked"),this.rotation.bind(this.getModalElement("rotation"),"checked"),this.unitCell.bind(this.getModalElement("unit-cell"),"checked"),this.supercell[0].bind(this.getModalElement("supercell-a"),"value"),this.supercell[1].bind(this.getModalElement("supercell-b"),"value"),this.supercell[2].bind(this.getModalElement("supercell-c"),"value");const r=this.getModalElement("atom-color-property");r.options.length=0,t.includes("element")||r.options.add(new Option("element","element"));for(const e of t)r.options.add(new Option(e,e));this.color.property.bind(r,"value"),this.color.transform.bind(this.getModalElement("atom-color-transform"),"value"),this.color.min.bind(this.getModalElement("atom-color-min"),"value"),this.color.max.bind(this.getModalElement("atom-color-max"),"value");const n=this.getModalElement("atom-color-palette");n.options.length=0;for(const t in c.s)n.options.add(new Option(t,t));this.color.palette.bind(n,"value"),this.axes.bind(this.getModalElement("axes"),"value"),this.keepOrientation.bind(this.getModalElement("keep-orientation"),"checked"),this.playbackDelay.bind(this.getModalElement("playback-delay"),"value"),this.environments.activated.bind(this.getModalElement("env-activated"),"checked"),this.environments.bgColor.bind(this.getModalElement("env-bg-color"),"value"),this.environments.bgStyle.bind(this.getModalElement("env-bg-style"),"value"),this.environments.cutoff.bind(this.getModalElement("env-cutoff"),"value"),this.environments.center.bind(this.getModalElement("env-center"),"checked")}}},14761:(t,e,r)=>{"use strict";r.d(e,{C1:()=>b,N2:()=>k,Nh:()=>w,T:()=>x,i3:()=>y,iy:()=>v});var n=r(34961),i=r.n(n),o=r(37821);function a(t,e){return{x:t.x+e.x,y:t.y+e.y,z:t.z+e.z}}function s(t,e){return{x:t.x-e.x,y:t.y-e.y,z:t.z-e.z}}function l(t,e){return{x:t.x*e,y:t.y*e,z:t.z*e}}function c(t,e){return t.x*e.x+t.y*e.y+t.z*e.z}function d(t,e){return{x:t.y*e.z-t.z*e.y,y:t.z*e.x-t.x*e.z,z:t.x*e.y-t.y*e.x}}function u(t,e,r){const n=new o.Quaternion(t.x,t.y,t.z,0);return n.multiplyQuaternions(e.clone(),n),n.multiply(e.clone().inverse()),a({x:n.x,y:n.y,z:n.z},r)}function h(t,e){const r=[],n=[];for(let e=0;e1e-6)throw Error(`orientation must be normalized to 1 for "${e}" shapes`);return""}function g(t){return"number"==typeof t&&Number.isInteger(t)&&t>=0}class v extends p{constructor(t){super(t),this.radius=(t.radius||1)*this.scale}static validateParameters(t){return"radius"in t?"orientation"in t?'"orientation" has no effect on a sphere shape':"number"!=typeof t.radius?'"radius" must be a number in "sphere" shape':"":'"radius" is required for "sphere" shapes'}outputTo3Dmol(t,e=20){const r=f([this.radius,this.radius,this.radius],e),n=r.vertices,i=r.indices,o=[],s=[];for(const t of n){const e=a(t,this.position);o.push(e);const r={x:t.x/Math.pow(this.radius,2),y:t.y/Math.pow(this.radius,2),z:t.z/Math.pow(this.radius,2)};s.push(r)}return{vertexArr:o,normalArr:s,faceArr:i,color:t}}}class b extends p{constructor(t){super(t),i()(t.semiaxes,"data.semiaxes"),this.semiaxes=[this.scale*t.semiaxes[0],this.scale*t.semiaxes[1],this.scale*t.semiaxes[2]]}static validateParameters(t){if(!("semiaxes"in t))return'"semiaxes" is required for "ellipsoid" shapes';if(!Array.isArray(t.semiaxes)||3!==t.semiaxes.length)return'"semiaxes" must be an array with 3 elements for "ellipsoid" shapes';const[e,r,n]=t.semiaxes;if("number"!=typeof e||"number"!=typeof r||"number"!=typeof n)return'"semiaxes" elements must be numbers for "ellipsoid" shapes';if("orientation"in t){const e=m(t.orientation,"ellipsoid");if(""!==e)return e}return""}outputTo3Dmol(t,e=20){const r=f(this.semiaxes,e),n=r.vertices,i=r.indices,o=[],a=[];for(const t of n){const e=u(t,this.orientation,this.position);o.push(e);const r=u({x:t.x/Math.pow(this.semiaxes[0],2),y:t.y/Math.pow(this.semiaxes[1],2),z:t.z/Math.pow(this.semiaxes[2],2)},this.orientation,{x:0,y:0,z:0});a.push(r)}return{vertexArr:o,normalArr:a,faceArr:i,color:t}}}class y extends p{constructor(t){super(t),i()(t.vector,"data.vector"),this.vector=[this.scale*t.vector[0],this.scale*t.vector[1],this.scale*t.vector[2]],this.baseRadius=this.scale*(t.baseRadius||.1),this.headRadius=this.scale*(t.headRadius||.15),this.headLength=this.scale*(t.headLength||.2)}static validateParameters(t){if(!("vector"in t))return'"vector" is required for "arrow" shapes';if(!Array.isArray(t.vector)||3!==t.vector.length)return'"vector" must be an array with 3 elements for "vector" shapes';const[e,r,n]=t.vector;return"number"!=typeof e||"number"!=typeof r||"number"!=typeof n?'"vector" elements must be numbers for "vector" shapes':"orientation"in t?'"orientation" cannot be used on "arrow" shapes. define "vector" instead':""}outputTo3Dmol(t,e=20){const r=function(t,e,r,n,i=20){const[o,s,u]=t,h={x:o,y:s,z:u},p=Math.sqrt(o*o+s*s+u*u);n>p&&(n=p);const f={x:h.x*(1-n/p),y:h.y*(1-n/p),z:h.z*(1-n/p)},m=l(h,1/p);let g;g=0!==m.x||0!==m.y?{x:0,y:0,z:1}:{x:0,y:1,z:0};let v=a(g,l(m,-c(g,m)));v=l(v,1/Math.sqrt(c(v,v)));const b=d(v,m),y=[];for(let t=0;t=_&&(r.addCustom(t),t.vertexArr.length=0,Array.isArray(t.normalArr)&&(t.normalArr.length=0),Array.isArray(t.faceArr)&&(t.faceArr.length=0),Array.isArray(t.color)&&(t.color.length=0)),t.faceArr&&e.faceArr&&t.vertexArr){const r=null!==(n=t.vertexArr.length)&&void 0!==n?n:0,i=e.faceArr.map((t=>t+r));t.faceArr.push(...i)}if(t.vertexArr&&e.vertexArr&&(null===(i=t.vertexArr)||void 0===i||i.push(...e.vertexArr)),t.normalArr&&e.normalArr&&(null===(o=t.normalArr)||void 0===o||o.push(...e.normalArr)),e.vertexArr&&Array.isArray(t.color)){const r=e.color&&!Array.isArray(e.color)?e.color:16777215,n=Array(null!==(a=e.vertexArr.length)&&void 0!==a?a:0).fill(r);t.color.push(...n)}}},79352:(t,e,r)=>{"use strict";r.d(e,{MoleculeViewer:()=>v});var n=r(34961),i=r.n(n),o=r(37821);const a={H:.37,He:.32,Li:1.34,Be:.9,B:.82,C:.77,N:.75,O:.73,F:.71,Ne:.69,Na:1.54,Mg:1.3,Al:1.18,Si:1.11,P:1.06,S:1.02,Cl:.99,Ar:.97,K:1.96,Ca:1.74,Sc:1.44,Ti:1.56,V:1.25,Mn:1.39,Fe:1.25,Co:1.26,Ni:1.21,Cu:1.38,Zn:1.31,Ga:1.26,Ge:1.22,Se:1.16,Br:1.14,Kr:1.1,Rb:2.11,Sr:1.92,Y:1.62,Zr:1.48,Nb:1.37,Mo:1.45,Tc:1.56,Ru:1.26,Rh:1.35,Pd:1.31,Ag:1.53,Cd:1.48,In:1.44,Sn:1.41,Sb:1.38,Te:1.35,I:1.33,Xe:1.3,Cs:2.25,Ba:1.98,Lu:1.6,Hf:1.5,Ta:1.38,W:1.46,Re:1.59,Os:1.44,Ir:1.37,Pt:1.28,Au:1.44,Hg:1.49,Tl:1.48,Pb:1.47,Bi:1.46,Rn:1.45};function s(t){return a[t]||1.6}function l(t,e){if("X"===t.elem||"X"===e.elem)return!1;let r=s(t.elem)+s(e.elem);r+=.25,r*=r;let n=t.x-e.x;if(n*=n,n>r)return!1;let i=t.y-e.y;if(i*=i,i>r)return!1;let o=t.z-e.z;if(o*=o,o>r)return!1;const a=n+i+o;return!(isNaN(a)||a<.5||a>r)}function c(t,e){for(let r=0;r-1&&-1===navigator.userAgent.indexOf("CriOS")&&-1===navigator.userAgent.indexOf("FxiOS");function g(){return m?.87:.7}class v{constructor(t,e){const r=(0,u.V6)(t),n=document.createElement("div");r.appendChild(n),n.style.setProperty("height","100%"),this._shadow=n.attachShadow({mode:"open"}),this._root=document.createElement("div"),this._shadow.appendChild(this._root),this._root.style.position="relative",this._root.style.width="100%",this._root.style.height="100%";const a=o.createViewer(this._root,{antialias:!0,defaultcolors:o.elementColors.Jmol,backgroundColor:"0xffffff",backgroundAlpha:0,disableFog:!0,orthographic:!0});if(void 0===a)throw Error("unable to create WebGL canvas");this._viewer=a,this.onselect=()=>{},this._cellInfo=document.createElement("span"),this._cellInfo.classList.add("chsp-cell-info","chsp-hide-if-no-cell","badge","bg-light","text-dark"),this._root.appendChild(this._cellInfo);const s=new CSSStyleSheet,l=new CSSStyleSheet,c=new CSSStyleSheet,d=new CSSStyleSheet;this._styles={noCell:s,noEnvs:l,noShape:c,noProperties:d},this._shadow.adoptedStyleSheets=[...r.getRootNode().adoptedStyleSheets,s,l,c,d],this._options=new p.O(this._root,(t=>this.positionSettingsModal(t)),e),this._options.modal.shadow.adoptedStyleSheets=[...this._options.modal.shadow.adoptedStyleSheets,s,l,c,d],this._colorReset=this._options.getModalElement("atom-color-reset"),this._colorMoreOptions=this._options.getModalElement("atom-color-more-options"),this._colorMoreOptions.disabled=!0,this._connectOptions(),this._trajectoryOptions=this._options.getModalElement("trajectory-settings-group"),this.positionSettingsModal=t=>{const e=this._root.getBoundingClientRect();return{left:e.left+e.width/2-t.width/2,top:e.top+20}},this._root.addEventListener("wheel",(t=>{if(t.isTrusted){t.preventDefault(),t.stopImmediatePropagation();const e=new Event("wheel");Object.assign(e,{ctrlKey:!0,detail:t.detail,wheelDelta:t.wheelDelta,pageX:t.pageX,pageY:t.pageY}),i()(t.target,"event.target"),t.target.dispatchEvent(e)}}),{capture:!0}),window.addEventListener("resize",(()=>this.resize())),window.requestAnimationFrame((()=>{window.dispatchEvent(new Event("resize"))}))}refreshOptions(t,e){const r=this._options.modal.shadow.adoptedStyleSheets;this._options.remove(),this._options=new p.O(this._root,(t=>this.positionSettingsModal(t)),e),this._options.modal.shadow.adoptedStyleSheets=r,this._colorReset=this._options.getModalElement("atom-color-reset"),this._colorMoreOptions=this._options.getModalElement("atom-color-more-options"),this._trajectoryOptions=this._options.getModalElement("trajectory-settings-group"),this._colorReset.disabled=!0,this._colorMoreOptions.disabled=!0,this._connectOptions(),t?this._options.environments.activated.enable():this._options.environments.activated.disable()}remove(){null!==this._root.parentElement&&(this._root.parentElement.innerHTML=""),this._options.remove()}resize(){this._viewer.resize(),this._updateColorBar()}natoms(){return void 0===this._current?void 0:this._current.structure.size}set environments(t){this._environments=t}load(t,e,r={},n){let a,s,l,c,u;if(this.resize(),this._properties=e,void 0!==this._highlighted&&(a=this._defaultCutoff(this._highlighted.center)),this._environments=r.environments,s=void 0===r.keepOrientation?this._options.keepOrientation.value:r.keepOrientation,void 0===r.supercell?[l,c,u]=[this._options.supercell[0].value,this._options.supercell[1].value,this._options.supercell[2].value]:([l,c,u]=r.supercell,this._options.supercell[0].value=l,this._options.supercell[1].value=c,this._options.supercell[2].value=u),void 0===this._initialSupercell&&(this._initialSupercell=[l,c,u],this._resetSupercell.innerHTML=`reset ${l}x${c}x${u} supercell`),void 0===t.cell?this._styles.noCell.replaceSync(".chsp-hide-if-no-cell { display: none; }"):this._styles.noCell.replaceSync(""),this._showSupercellInfo(),void 0!==r.trajectory&&r.trajectory?this._trajectoryOptions.style.display="block":this._trajectoryOptions.style.display="none",this._options.unitCell.value&&void 0!==this._current&&this._viewer.removeUnitCell(this._current.model),this._viewer.removeAllModels(),void 0!==this._current)for(const t of this._current.atomLabels)this._viewer.removeLabel(t);void 0!==this._highlighted&&(this._viewer.removeModel(this._highlighted.model),this._highlighted=void 0),this._current={model:this._viewer.addModel(),structure:t,atomLabels:[]},function(t,e){if(void 0!==e.cell){const r=e.cell,n=new o.Matrix3(r[0],r[3],r[6],r[1],r[4],r[7],r[2],r[5],r[8]);t.setCrystMatrix(n)}const r=[];for(let t=0;t{n&&n()}))}_setEnvironmentInteractions(){if(void 0===this._environments)return;const t=this._environments.filter((t=>void 0!==t)).map((t=>t.center));for(const t of this._viewer.selectedAtoms({}))t.clickable=!1,t.hoverable=!1;i()(void 0!==this._current,"this._current !== undefined"),this._viewer.setClickable({model:this._current.model,index:t},!0,(t=>this._selectAtom(t))),this._setHoverable(t)}highlight(t){let e;void 0!==this._highlighted&&(e=this._defaultCutoff(this._highlighted.center)),this._changeHighlighted(t,e),this._updateStyle();const r=this._options.environments.center.value;void 0!==this._highlighted&&r&&(this._options.keepOrientation.value||this._resetView(),this._centerView()),this._viewer.render()}applySettings(t){this._options.applySettings(t)}saveSettings(){return this._options.saveSettings()}onSettingChange(t){this._options.onSettingChange(t)}exportPNG(){return this._viewer.pngURI()}_setHoverable(t){i()(void 0!==this._current,"this._current !== undefined"),this._viewer.setHoverDuration(0);const e=this.natoms();i()(void 0!==e,"n_atoms !== undefined");const r=new Map;this._viewer.setHoverable({model:this._current.model,index:t},!0,(t=>{if(i()(void 0!==t.index,"atom.index !== undefined"),void 0!==r.get(t.index))return;const e=this._viewer.addModel();e.addAtoms([t]),e.setStyle({},this._centralStyle(.3));const n=e.selectedAtoms({});n[0].clickable=!1,n[0].hoverable=!1,r.set(t.index,e),this._viewer.render()}),(t=>{i()(void 0!==t.index,"atom.index !== undefined");const e=r.get(t.index);void 0!==e&&(this._viewer.removeModel(e),r.delete(t.index),this._viewer.render())}))}_connectOptions(){const t=()=>{this._updateStyle(),this._viewer.render()};this._options.spaceFilling.onchange.push(t),this._options.bonds.onchange.push(t),this._options.atoms.onchange.push(t),this._options.atomLabels.onchange.push((t=>{if(void 0!==this._current)if(t){i()(0===this._current.atomLabels.length,"this._current.atomLabels.length === 0");const t=this._current.structure;for(let e=0;ethis._addAxes(t))),this._options.rotation.onchange.push((t=>{t?this._viewer.spin("vy"):this._viewer.spin(!1)})),this._options.unitCell.onchange.push((t=>{void 0!==this._current&&(t?this._viewer.addUnitCell(this._current.model,{box:{color:"black"},astyle:{hidden:!0},bstyle:{hidden:!0},cstyle:{hidden:!0}}):this._viewer.removeUnitCell(this._current.model),this._viewer.render())})),this._options.shape.onchange.push((()=>{void 0!==this._current&&(this._updateStyle(),this._viewer.render())}));const e=()=>{if(this._showSupercellInfo(),void 0===this._current)return;const t=this._current.model.selectedAtoms({});this._current.model.removeAtoms(t.splice(this._current.structure.size));const e=this._options.supercell[0].value,r=this._options.supercell[1].value,n=this._options.supercell[2].value;if(1===e&&1===r&&1===n||this._viewer.replicateUnitCell(this._options.supercell[0].value,this._options.supercell[1].value,this._options.supercell[2].value,this._current.model),d(this._current.model.selectedAtoms({})),void 0!==this._highlighted){const t=this._defaultCutoff(this._highlighted.center);this._changeHighlighted(this._highlighted.center,t)}this._environmentsEnabled()&&this._setEnvironmentInteractions(),this._updateStyle(),this._viewer.render()};this._options.supercell[0].onchange.push(e),this._options.supercell[1].onchange.push(e),this._options.supercell[2].onchange.push(e),this._options.environments.bgColor.onchange.push(t),this._options.environments.bgStyle.onchange.push(t),this._options.environments.cutoff.onchange.push((()=>{if(void 0!==this._highlighted){const t=this._defaultCutoff(this._highlighted.center);this._changeHighlighted(this._highlighted.center,t)}t()})),this._options.environments.center.onchange.push((t=>{this._options.keepOrientation.value||this._resetView(),t&&this._centerView(),this._viewer.render()})),this._options.environments.activated.onchange.push((e=>{if(this._enableEnvironmentSettings(e),e){i()(void 0!==this._lastHighlighted,"this._lastHighlighted !== undefined"),this._options.environments.cutoff.value=this._lastHighlighted.cutoff;const t=this._lastHighlighted.center,e=this._defaultCutoff(t);this._changeHighlighted(t,e)}else i()(void 0!==this._highlighted,"this._highlighted !== undefined"),this._viewer.removeModel(this._highlighted.model),this._lastHighlighted={center:this._highlighted.center,cutoff:this._options.environments.cutoff.value};t()})),this._options.color.property.onchange.push((()=>{const e=this._options.color.property.value;if("element"!==e){this._options.color.transform.enable(),this._options.color.transform.value="linear",this._options.color.min.enable(),this._options.color.max.enable(),this._colorReset.disabled=!1,this._colorMoreOptions.disabled=!1,this._options.color.palette.enable();const t=this._colorValues(e,"linear");t.some((t=>null===t))&&(0,u.R4)("The selected structure has undefined properties for some atoms, these atoms will be colored in light gray.");const{max:r,min:n}=(0,u.GI)(t);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=r,this._options.color.min.value=n,this._setScaleStep([n,r])}else this._options.color.transform.disable(),this._options.color.min.disable(),this._options.color.max.disable(),this._options.getModalElement("atom-color-extra").classList.contains("show")&&this._colorMoreOptions.click(),this._colorReset.disabled=!0,this._colorMoreOptions.disabled=!0,this._options.color.palette.disable(),this._viewer.setColorByElement({},o.elementColors.Jmol);this._updateColorBar(),t()}));const r=e=>{const r=this._options.color.min.value,n=this._options.color.max.value;if(r>n)return(0,u.R4)("The inserted min and max values in color are such that min > max! The last inserted value was reset."),void("min"===e?this._options.color.min.reset():this._options.color.max.reset());this._setScaleStep([r,n]),this._updateColorBar(),t()};this._options.color.transform.onchange.push((()=>{const e=this._options.color.property.value;i()("element"!==e,"property !== 'element'");const r=this._options.color.transform.value,n=this._colorValues(e,r),{min:o,max:a}=(0,u.GI)(n);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=a,this._options.color.min.value=o,this._setScaleStep([o,a]),this._updateColorBar(),t()})),this._options.color.min.onchange.push((()=>{r("min"),t()})),this._options.color.max.onchange.push((()=>{r("max"),t()})),this._colorReset.addEventListener("click",(()=>{const e=JSON.parse(JSON.stringify(this._properties))[this._options.color.property.value].filter((t=>!isNaN(Number(t)))),[r,n]=[Math.min(...e),Math.max(...e)];this._options.color.min.value=r,this._options.color.max.value=n,this._setScaleStep([r,n]),this._updateColorBar(),t()})),this._options.color.palette.onchange.push((()=>{this._updateColorBar(),t()})),this._resetEnvCutoff=this._options.getModalElement("env-reset"),this._resetEnvCutoff.onclick=()=>{i()(void 0!==this._highlighted,"this._highlighted !== undefined"),this._options.environments.cutoff.value=this._defaultCutoff(this._highlighted.center),t()},this._options.getModalElement("align-x").onclick=()=>this._viewAlong([1,0,0]),this._options.getModalElement("align-y").onclick=()=>this._viewAlong([0,1,0]),this._options.getModalElement("align-z").onclick=()=>this._viewAlong([0,0,1]),this._options.getModalElement("align-a").onclick=()=>{if(void 0===this._current||void 0===this._current.structure.cell)return;const t=this._current.structure.cell,e=[t[0],t[1],t[2]];this._viewAlong(e)},this._options.getModalElement("align-b").onclick=()=>{if(void 0===this._current||void 0===this._current.structure.cell)return;const t=this._current.structure.cell,e=[t[3],t[4],t[5]];this._viewAlong(e)},this._options.getModalElement("align-c").onclick=()=>{if(void 0===this._current||void 0===this._current.structure.cell)return;const t=this._current.structure.cell,e=[t[6],t[7],t[8]];this._viewAlong(e)},this._resetSupercell=this._options.getModalElement("reset-supercell"),this._resetSupercell.onclick=()=>{i()(void 0!==this._initialSupercell,"this._initialSupercell !== undefined"),this._options.supercell[0].value=this._initialSupercell[0],this._options.supercell[1].value=this._initialSupercell[1],this._options.supercell[2].value=this._initialSupercell[2]},this._root.ondblclick=()=>{this._resetView(),this._options.environments.center.value&&this._centerView(),this._viewer.render()}}_selectAtom(t){i()(void 0!==t.serial,"atom.serial !== undefined"),this.onselect(t.serial)}_updateStyle(){void 0!==this._current&&(""!==this._options.shape.value&&this._addShapes(),this._environmentsEnabled()?(i()(void 0!==this._highlighted,"this._highlighted !== undefined"),this._current.model.setStyle({},this._hiddenStyle()),this._current.model.setStyle({index:this._highlighted.center},this._centralStyle(.4),!0),this._highlighted.model.setStyle({},this._mainStyle())):this._current.model.setStyle({},this._mainStyle()))}_addAxes(t){if(void 0!==this._axes&&(this._viewer.removeShape(this._axes[0].arrow),this._viewer.removeLabel(this._axes[0].label),this._viewer.removeShape(this._axes[1].arrow),this._viewer.removeLabel(this._axes[1].label),this._viewer.removeShape(this._axes[2].arrow),this._viewer.removeLabel(this._axes[2].label),this._axes=void 0),"off"===t);else if("xyz"===t)this._axes=[this._addLabeledArrow([2,0,0],"red","X"),this._addLabeledArrow([0,2,0],"green","Y"),this._addLabeledArrow([0,0,2],"blue","Z")];else if("abc"===t){if(void 0===this._current||void 0===this._current.structure.cell)return;const t=this._current.structure.cell,e=[t[0],t[1],t[2]],r=[t[3],t[4],t[5]],n=[t[6],t[7],t[8]];this._axes=[this._addLabeledArrow(e,"red","A"),this._addLabeledArrow(r,"green","B"),this._addLabeledArrow(n,"blue","C")]}this._viewer.render()}_addShapes(){if(void 0===this._current)return;if(""===this._options.shape.value)return;this._viewer.removeAllShapes(),this._options.unitCell.value&&this._viewer.addUnitCell(this._current.model,{box:{color:"black"},astyle:{hidden:!0},bstyle:{hidden:!0},cstyle:{hidden:!0}}),this._addAxes(this._options.axes.value),i()(0===this._current.atomLabels.length,"this._current.atomLabels.length === 0");const t=this._current.structure;i()(!(void 0===t.shapes),"!(structure.shapes === undefined)");const e=this._options.shape.value.split(","),r={vertexArr:[],normalArr:[],faceArr:[],color:[]},n=this._colorFunction(),a={};for(const s of e){if(""===s)continue;i()(s in t.shapes,"shape in structure.shapes");const e=t.shapes[s];let l=this._options.supercell[0].value,c=this._options.supercell[1].value,d=this._options.supercell[2].value,u=this._current.structure.cell;void 0===u&&(u=[1,0,0,0,1,0,0,0,1],(l>1||c>1||d>1)&&(l=1,c=1,d=1));for(let s=0;s0&&this._viewer.addCustom(r),this._viewer.render()}_mainStyle(){const t={};return this._options.atoms.value&&(t.sphere={scale:this._options.spaceFilling.value?1:.22,colorfunc:this._colorFunction()}),this._options.bonds.value&&(t.stick={radius:.15,colorfunc:this._colorFunction()}),t}_colorValues(t,e){i()(void 0!==this._properties,"this._properties !== undefined"),i()(Object.keys(this._properties).includes(t),"Object.keys(this._properties).includes(property)");let r=JSON.parse(JSON.stringify(this._properties[t])),n=t=>t;return"log"===e?n=Math.log10:"sqrt"===e?n=Math.sqrt:"inverse"===e&&(n=t=>1/t),r=r.map((t=>null===t||isNaN(t)?t:n(t))),r}_colorFunction(){if(void 0===this._properties)return;const t=this._options.color.property.value;if("element"===t)return;const e=this._options.color.transform.value,r=this._colorValues(t,e),n=this._options.color.min.value,a=this._options.color.max.value,s=f.s[this._options.color.palette.value],l=[];for(let t=0;t{i()(void 0!==t.serial,"atom.serial !== undefined");const e=r[t.serial];return null===e?14540253:isNaN(e)?2236962:Number.isFinite(n)&&Number.isFinite(a)?c.valueToHex(e):2236962}}_hiddenStyle(){const t={},e=this._options.environments.bgStyle.value;"hide"===e||("licorice"===e||"ball-stick"===e?(t.stick={radius:.149,opacity:g(),hidden:!this._options.bonds.value},"ball-stick"===e&&""===this._options.shape.value&&(t.sphere={scale:this._options.spaceFilling.value?.999:.219,opacity:g()})):(0,u.HB)());const r=this._options.environments.bgColor.value;return"CPK"===r||("grey"===r?(void 0!==t.stick&&(t.stick.color=8421504),void 0!==t.sphere&&(t.sphere.color=8421504)):"property"===r?(void 0!==t.stick&&(t.stick={radius:.149,opacity:g(),hidden:!this._options.bonds.value,colorfunc:this._colorFunction()}),void 0!==t.sphere&&(t.sphere={scale:this._options.spaceFilling.value?.999:.219,opacity:g(),colorfunc:this._colorFunction()})):(0,u.HB)()),t}_centralStyle(t){return{sphere:{scale:t,color:"green",opacity:g()}}}_showSupercellInfo(){const t=this._options.supercell[0].value,e=this._options.supercell[1].value,r=this._options.supercell[2].value;this._cellInfo.innerText=1!==t||1!==e||1!==r?`${t}x${e}x${r} supercell`:""}_environmentsEnabled(){return void 0!==this._highlighted&&!this._resetEnvCutoff.disabled}_enableEnvironmentSettings(t){const e=this._options.getModalElement("env-activated").nextElementSibling;i()(null!==e,"toggle !== null");const r=this._resetEnvCutoff;if(t){if(this._environmentsEnabled())return;r.disabled=!1,e.innerText="Disable",this._options.environments.cutoff.enable(),this._options.environments.bgStyle.enable(),this._options.environments.bgColor.enable()}else{if(!this._environmentsEnabled())return;r.disabled=!0,e.innerText="Enable",this._options.environments.cutoff.disable(),this._options.environments.bgStyle.disable(),this._options.environments.bgColor.disable()}}_defaultCutoff(t){i()(void 0!==this._environments,"this._environments !== undefined");const e=this._environments[t];return i()(void 0!==e,"environment !== undefined"),e.cutoff}_changeHighlighted(t,e){if(void 0!==this._highlighted&&this._viewer.removeModel(this._highlighted.model),void 0===t)this._options.environments.cutoff.value=0,this._highlighted=void 0;else{if(void 0===this._environments)throw Error("can not highlight an atom without having a list of environments");const r=this._environments[t];if(void 0===r)throw Error(`can not highlight atom ${t}: it is not part of the list of environments`);const n=this._options.environments.cutoff.value;void 0!==e&&e!==n||(this._options.environments.cutoff.value=r.cutoff);const i={or:[{index:t},{within:{distance:this._options.environments.cutoff.value,sel:{index:t}}}]};this._highlighted={model:this._viewer.createModelFrom(i),center:t},this._highlighted.model.setStyle({},this._mainStyle())}}_resetView(){this._viewer.zoomTo(),this._viewer.zoom(2),this._viewer.setSlab(-1e3,1e3)}_centerView(){void 0!==this._highlighted&&void 0!==this._current&&this._viewer.center({index:this._highlighted.center,model:this._current.model})}_viewAlong(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]),r=Math.acos(t[2]/e),n=[t[1]/e*Math.sin(r/2),-t[0]/e*Math.sin(r/2),0,Math.cos(r/2)],i=this._viewer.getView();i[4]=n[0],i[5]=n[1],i[6]=n[2],i[7]=n[3],this._viewer.setView(i)}_addLabeledArrow(t,e,r){const n=new o.Vector3(t[0],t[1],t[2]);return{arrow:this._viewer.addArrow({start:new o.Vector3(0,0,0),end:n,radius:.1,color:e,midpos:-1}),label:this._viewer.addLabel(r,{position:n,inFront:!0,fontColor:"black",fontSize:14,showBackground:!1})}}_setScaleStep(t){if(void 0!==t){const e=Math.round((t[1]-t[0])/20*Math.pow(10,10))/Math.pow(10,10),r=this._options.getModalElement("atom-color-min"),n=this._options.getModalElement("atom-color-max");r.step=`${e}`,n.step=`${e}`}}_colorTitle(){let t=this._options.color.property.value;switch(this._options.color.transform.value){case"inverse":t=`(${t})⁻¹`;break;case"log":t=`log10(${t})`;break;case"sqrt":t=`√(${t})`}return t}_addColorBar(){var t,e;const r=this._options.color.palette.value,n=this._colorTitle(),a=null===(t=this._viewer.container)||void 0===t?void 0:t.clientWidth,s=null===(e=this._viewer.container)||void 0===e?void 0:e.clientHeight;i()(void 0!==a&&void 0!==s,"viewerWidth !== undefined && viewerHeight !== undefined");const l=s-80,c=document.createElement("canvas");c.width=20,c.height=l;const d=f.s[r],u=c.getContext("2d");if(!u)throw new Error("Could not get 2D context from canvas");const h=u.createLinearGradient(0,l,0,0);for(let t=0;t0){if(t<1e4&&t>.009){if(Number.isInteger(t))return t.toString();{let e=t.toFixed(3).substring(0,4);return"."===e[3]&&(e=e.substring(0,3)),e}}return t.toExponential(0).replace("+","")}if(t>-1e3&&t<-.09){if(Number.isInteger(t))return t.toString();{let e=t.toFixed(3).substring(0,4);return"."===e[3]&&(e=e.substring(0,3)),e}}return t.toExponential(0).replace("+","")}},91683:(t,e,r)=>{"use strict";r.d(e,{eK:()=>l,GI:()=>m,El:()=>b,HL:()=>p,Nl:()=>u,VT:()=>h,V6:()=>v,o:()=>f,Lz:()=>d,eB:()=>o,R4:()=>s,HB:()=>g});var n=r(34961),i=r.n(n);function o(t,e){const r=t.querySelector(e);if(null===r)throw Error(`no element matching '${e}'`);const n=e=>{const r=t.dragOffset;i()(void 0!==r,"offset !== undefined");const n=e.clientX-r.x,o=e.clientY-r.y;t.style.left=`${n}px`,t.style.top=`${o}px`},o=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",o)};r.addEventListener("mousedown",(e=>{const r=e;t.dragOffset={x:r.clientX-t.offsetLeft,y:r.clientY-t.offsetTop},t.style.left=`${t.offsetLeft}px`,t.style.top=`${t.offsetTop}px`,t.style.width=`${t.offsetWidth}px`,t.style.margin="0",t.style.position="absolute",document.addEventListener("mousemove",n,!1),document.addEventListener("mouseup",o,!1)}),!1)}const a=[t=>console.warn(t)];function s(t){for(const e of a)e(t)}function l(t){a.push(t)}const c=["red","yellow","green","blue","orange","aqua","purple","teal","silver"];function d(t){for(const e of c)if(!t.includes(e))return e;throw Error("required more colors than available")}function u(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}function h(t,e=document){let r;if(r=e instanceof HTMLElement?e.querySelector(`#${t}`):e.getElementById(t),null===r)throw Error(`unable to get element with id ${t}`);return r}function p(t){return{[Symbol.iterator]:function*(){let e=0;for(const r of t)yield[e,r],e++}}}function f(t,e){i()(t.size>=1,"map.size >= 1");const r=t.keys(),n=r.next().value;return void 0!==e&&n===e?(i()(t.size>=2,"map.size >= 2"),r.next().value):n}function m(t){let e=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(const n of t)null!==n&&(n>e&&isFinite(n)&&(e=n),n>>1,t[r]===e)return r;t[r]{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%272%27 fill=%27%23fff%27/%3e%3c/svg%3e"},35782:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%2386b7fe%27/%3e%3c/svg%3e"},54718:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%23fff%27/%3e%3c/svg%3e"},57154:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27rgba%280, 0, 0, 0.25%29%27/%3e%3c/svg%3e"},35372:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27 width=%2712%27 height=%2712%27 fill=%27none%27 stroke=%27%23dc3545%27%3e%3ccircle cx=%276%27 cy=%276%27 r=%274.5%27/%3e%3cpath stroke-linejoin=%27round%27 d=%27M5.8 3.6h.4L6 6.5z%27/%3e%3ccircle cx=%276%27 cy=%278.2%27 r=%27.6%27 fill=%27%23dc3545%27 stroke=%27none%27/%3e%3c/svg%3e"},57249:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23000%27%3e%3cpath d=%27M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z%27/%3e%3c/svg%3e"},88832:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%230c63e4%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},67830:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23212529%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},75932:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z%27/%3e%3c/svg%3e"},11144:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},35531:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3e%3cpath fill=%27none%27 stroke=%27%23343a40%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e"},14274:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27M6 10h8%27/%3e%3c/svg%3e"},45419:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27m6 10 3 3 6-6%27/%3e%3c/svg%3e"},17914:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%280, 0, 0, 0.55%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e"},36366:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%28255, 255, 255, 0.55%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e"},48487:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 8 8%27%3e%3cpath fill=%27%23198754%27 d=%27M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z%27/%3e%3c/svg%3e"},25446:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2722%27 height=%2722%27 fill=%27%23333%27 viewBox=%270 0 22 22%27%3E%3Cpath d=%27m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0%27/%3E%3C/svg%3E"},56694:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2722%27 height=%2722%27 fill=%27%2333b5e5%27 viewBox=%270 0 22 22%27%3E%3Cpath d=%27m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0%27/%3E%3C/svg%3E"},26117:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 fill-rule=%27evenodd%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0%27/%3E%3C/svg%3E"},66311:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 fill=%27%23fff%27 fill-rule=%27evenodd%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0%27/%3E%3C/svg%3E"},24420:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},77035:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z%27/%3E%3C/svg%3E"},43470:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5%27/%3E%3C/svg%3E"},13490:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z%27/%3E%3C/svg%3E"},80216:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27m10.5 14 4-8 4 8z%27/%3E%3Cpath fill=%27%23ccc%27 d=%27m10.5 16 4 8 4-8z%27/%3E%3C/svg%3E"},47695:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%2333b5e5%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3C/svg%3E"},92228:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%2333b5e5%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},43737:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23666%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3Cpath fill=%27red%27 d=%27m14 5 1 1-9 9-1-1z%27/%3E%3C/svg%3E"},48460:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23999%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3Cpath fill=%27red%27 d=%27m14 5 1 1-9 9-1-1z%27/%3E%3C/svg%3E"},75796:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23aaa%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3Cpath fill=%27red%27 d=%27m14 5 1 1-9 9-1-1z%27/%3E%3C/svg%3E"},28869:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23e54e33%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3C/svg%3E"},9819:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23e58978%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},30557:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},68164:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z%27/%3E%3C/svg%3E"},64665:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5%27/%3E%3C/svg%3E"},91413:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z%27/%3E%3C/svg%3E"},13913:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z%27/%3E%3C/svg%3E"},61907:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27m10.5 14 4-8 4 8z%27/%3E%3Cpath fill=%27%23ccc%27 d=%27m10.5 16 4 8 4-8z%27/%3E%3C/svg%3E"},56539:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},4890:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z%27/%3E%3C/svg%3E"},13363:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5%27/%3E%3C/svg%3E"},47603:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z%27/%3E%3C/svg%3E"},64643:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z%27/%3E%3C/svg%3E"},68605:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27m10.5 14 4-8 4 8z%27/%3E%3Cpath fill=%27%23ccc%27 d=%27m10.5 16 4 8 4-8z%27/%3E%3C/svg%3E"},47914:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2788%27 height=%2723%27 fill=%27none%27%3E%3Cpath fill=%27%23000%27 fill-opacity=%27.4%27 fill-rule=%27evenodd%27 d=%27M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%27/%3E%3Cpath fill=%27%23fff%27 d=%27m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z%27/%3E%3Cpath fill=%27%23e1e3e9%27 d=%27M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z%27/%3E%3Cpath d=%27M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z%27 style=%27fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001%27/%3E%3Cg style=%27stroke-width:1.12603545%27%3E%3Cpath d=%27M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668%27 style=%27color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto%27 transform=%27translate%2815.553 2.85%29scale%28.88807%29%27/%3E%3Cpath d=%27M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3%27 style=%27clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4%27 transform=%27translate%2815.553 2.85%29scale%28.88807%29%27/%3E%3Cpath d=%27M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%27 style=%27clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4%27 transform=%27translate%2815.553 2.85%29scale%28.88807%29%27/%3E%3C/g%3E%3C/svg%3E"},75208:(t,e,r)=>{"use strict";var n=r(97905),i="undefined"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=k(t,360),e=k(e,100),r=k(r,100),0===e)n=i=o=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=a(l,s,t+1/3),i=a(l,s,t),o=a(l,s,t-1/3)}return{r:255*n,g:255*i,b:255*o}}(n.h,a,l),c=!0,d="hsl"),n.hasOwnProperty("a")&&(o=n.a)),o=_(o),{ok:c,format:n.format||d,r:Math.min(255,Math.max(i.r,0)),g:Math.min(255,Math.max(i.g,0)),b:Math.min(255,Math.max(i.b,0)),a:o};var u,h,p}(i);this._originalInput=i,this._r=a.r,this._g=a.g,this._b=a.b,this._a=a.a,this._roundA=Math.round(100*this._a)/100,this._format=o.format||a.format,this._gradientType=o.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=a.ok}function i(t,e,r){t=k(t,255),e=k(e,255),r=k(r,255);var n,i,o=Math.max(t,e,r),a=Math.min(t,e,r),s=(o+a)/2;if(o==a)n=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case t:n=(e-r)/l+(e>1)+720)%360;--e;)i.h=(i.h+o)%360,a.push(n(i));return a}function y(t,e){e=e||6;for(var r=n(t).toHsv(),i=r.h,o=r.s,a=r.v,s=[],l=1/e;e--;)s.push(n({h:i,s:o,v:a})),a=(a+l)%1;return s}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,n=this.toRgb();return t=n.r/255,e=n.g/255,r=n.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=_(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=o(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=o(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),n=Math.round(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=i(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),n=Math.round(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return a(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var o=[M(Math.round(t).toString(16)),M(Math.round(e).toString(16)),M(Math.round(r).toString(16)),M(C(n))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*k(this._r,255))+"%",g:Math.round(100*k(this._g,255))+"%",b:Math.round(100*k(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*k(this._r,255))+"%, "+Math.round(100*k(this._g,255))+"%, "+Math.round(100*k(this._b,255))+"%)":"rgba("+Math.round(100*k(this._r,255))+"%, "+Math.round(100*k(this._g,255))+"%, "+Math.round(100*k(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(w[a(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+s(this._r,this._g,this._b,this._a),r=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var o=n(t);r="#"+s(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return n(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(u,arguments)},brighten:function(){return this._applyModification(h,arguments)},darken:function(){return this._applyModification(p,arguments)},desaturate:function(){return this._applyModification(l,arguments)},saturate:function(){return this._applyModification(c,arguments)},greyscale:function(){return this._applyModification(d,arguments)},spin:function(){return this._applyModification(f,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(b,arguments)},complement:function(){return this._applyCombination(m,arguments)},monochromatic:function(){return this._applyCombination(y,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(g,[3])},tetrad:function(){return this._applyCombination(g,[4])}},n.fromRatio=function(e,r){if("object"==t(e)){var i={};for(var o in e)e.hasOwnProperty(o)&&(i[o]="a"===o?e[o]:S(e[o]));e=i}return n(e,r)},n.equals=function(t,e){return!(!t||!e)&&n(t).toRgbString()==n(e).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},n.mix=function(t,e,r){r=0===r?0:r||50;var i=n(t).toRgb(),o=n(e).toRgb(),a=r/100;return n({r:(o.r-i.r)*a+i.r,g:(o.g-i.g)*a+i.g,b:(o.b-i.b)*a+i.b,a:(o.a-i.a)*a+i.a})},n.readability=function(t,e){var r=n(t),i=n(e);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)},n.isReadable=function(t,e,r){var i,o,a,s,l,c=n.readability(t,e);switch(o=!1,(a=r,"AA"!==(s=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==s&&(s="AA"),"small"!==(l=(a.size||"small").toLowerCase())&&"large"!==l&&(l="small"),i={level:s,size:l}).level+i.size){case"AAsmall":case"AAAlarge":o=c>=4.5;break;case"AAlarge":o=c>=3;break;case"AAAsmall":o=c>=7}return o},n.mostReadable=function(t,e,r){var i,o,a,s,l=null,c=0;o=(r=r||{}).includeFallbackColors,a=r.level,s=r.size;for(var d=0;dc&&(c=i,l=n(e[d]));return n.isReadable(t,l,{level:a,size:s})||!o?l:(r.includeFallbackColors=!1,n.mostReadable(t,["#fff","#000"],r))};var x=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},w=n.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(x);function _(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function k(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function A(t){return Math.min(1,Math.max(0,t))}function T(t){return parseInt(t,16)}function M(t){return 1==t.length?"0"+t:""+t}function S(t){return t<=1&&(t=100*t+"%"),t}function C(t){return Math.round(255*parseFloat(t)).toString(16)}function E(t){return T(t)/255}var L,z,O,D=(z="[\\s|\\(]+("+(L="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+L+")[,|\\s]+("+L+")\\s*\\)?",O="[\\s|\\(]+("+L+")[,|\\s]+("+L+")[,|\\s]+("+L+")[,|\\s]+("+L+")\\s*\\)?",{CSS_UNIT:new RegExp(L),rgb:new RegExp("rgb"+z),rgba:new RegExp("rgba"+O),hsl:new RegExp("hsl"+z),hsla:new RegExp("hsla"+O),hsv:new RegExp("hsv"+z),hsva:new RegExp("hsva"+O),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function I(t){return!!D.CSS_UNIT.exec(t)}return n}()},4026:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>i});var n=r(22319);const i=function(t){var e,r,i=[],a=1;if("number"==typeof t)return{space:"rgb",values:[t>>>16,(65280&t)>>>8,255&t],alpha:1};if("number"==typeof t)return{space:"rgb",values:[t>>>16,(65280&t)>>>8,255&t],alpha:1};if(t=String(t).toLowerCase(),n[t])i=n[t].slice(),r="rgb";else if("transparent"===t)a=0,r="rgb",i=[0,0,0];else if("#"===t[0]){var s=t.slice(1),l=s.length;a=1,l<=4?(i=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===l&&(a=parseInt(s[3]+s[3],16)/255)):(i=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===l&&(a=parseInt(s[6]+s[7],16)/255)),i[0]||(i[0]=0),i[1]||(i[1]=0),i[2]||(i[2]=0),r="rgb"}else if(e=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(t)){var c=e[1],d="cmyk"===(r=c.replace(/a$/,""))?4:"gray"===r?1:3;i=e[2].trim().split(/\s*[,\/]\s*|\s+/),"color"===r&&(r=i.shift()),a=(i=i.map((function(t,e){if("%"===t[t.length-1])return t=parseFloat(t)/100,3===e?t:"rgb"===r?255*t:"h"===r[0]?100*t:"l"!==r[0]||e?"lab"===r?125*t:"lch"===r?e<2?150*t:360*t:"o"!==r[0]||e?"oklab"===r?.4*t:"oklch"===r?e<2?.4*t:360*t:t:t:100*t;if("h"===r[e]||2===e&&"h"===r[r.length-1]){if(void 0!==o[t])return o[t];if(t.endsWith("deg"))return parseFloat(t);if(t.endsWith("turn"))return 360*parseFloat(t);if(t.endsWith("grad"))return 360*parseFloat(t)/400;if(t.endsWith("rad"))return 180*parseFloat(t)/Math.PI}return"none"===t?0:parseFloat(t)}))).length>d?i.pop():1}else/[0-9](?:\s|\/|,)/.test(t)&&(i=t.match(/([0-9]+)/g).map((function(t){return parseFloat(t)})),r=t.match(/([a-z])/gi)?.join("")?.toLowerCase()||"rgb");return{space:r,values:i,alpha:a}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},23648:t=>{"use strict";t.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:t=>{"use strict";t.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:t=>{"use strict";t.exports=JSON.parse('["normal","italic","oblique"]')},99803:t=>{"use strict";t.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:t=>{"use strict";t.exports=JSON.parse('["inherit","initial","unset"]')},94316:t=>{"use strict";t.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={id:t,exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var r in e)__webpack_require__.o(e,r)&&!__webpack_require__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.b=document.baseURI||self.location.href,__webpack_require__.nc=void 0;var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ChemiscopeApp:()=>Kl});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{afterMain:()=>x,afterRead:()=>v,afterWrite:()=>k,applyStyles:()=>L,arrow:()=>J,auto:()=>o,basePlacements:()=>a,beforeMain:()=>b,beforeRead:()=>m,beforeWrite:()=>w,bottom:()=>r,clippingParents:()=>c,computeStyles:()=>et,createPopper:()=>Lt,createPopperBase:()=>Et,createPopperLite:()=>zt,detectOverflow:()=>gt,end:()=>l,eventListeners:()=>nt,flip:()=>vt,hide:()=>xt,left:()=>i,main:()=>y,modifierPhases:()=>A,offset:()=>wt,placements:()=>f,popper:()=>u,popperGenerator:()=>Ct,popperOffsets:()=>_t,preventOverflow:()=>kt,read:()=>g,reference:()=>h,right:()=>n,start:()=>s,top:()=>e,variationPlacements:()=>p,viewport:()=>d,write:()=>_});var e="top",r="bottom",n="right",i="left",o="auto",a=[e,r,n,i],s="start",l="end",c="clippingParents",d="viewport",u="popper",h="reference",p=a.reduce((function(t,e){return t.concat([e+"-"+s,e+"-"+l])}),[]),f=[].concat(a,[o]).reduce((function(t,e){return t.concat([e,e+"-"+s,e+"-"+l])}),[]),m="beforeRead",g="read",v="afterRead",b="beforeMain",y="main",x="afterMain",w="beforeWrite",_="write",k="afterWrite",A=[m,g,v,b,y,x,w,_,k];function T(t){return t?(t.nodeName||"").toLowerCase():null}function M(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function S(t){return t instanceof M(t).Element||t instanceof Element}function C(t){return t instanceof M(t).HTMLElement||t instanceof HTMLElement}function E(t){return"undefined"!=typeof ShadowRoot&&(t instanceof M(t).ShadowRoot||t instanceof ShadowRoot)}const L={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var r=e.styles[t]||{},n=e.attributes[t]||{},i=e.elements[t];C(i)&&T(i)&&(Object.assign(i.style,r),Object.keys(n).forEach((function(t){var e=n[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],i=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:r[t]).reduce((function(t,e){return t[e]="",t}),{});C(n)&&T(n)&&(Object.assign(n.style,o),Object.keys(i).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function z(t){return t.split("-")[0]}var O=Math.max,D=Math.min,I=Math.round;function F(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function R(){return!/^((?!chrome|android).)*safari/i.test(F())}function P(t,e,r){void 0===e&&(e=!1),void 0===r&&(r=!1);var n=t.getBoundingClientRect(),i=1,o=1;e&&C(t)&&(i=t.offsetWidth>0&&I(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&I(n.height)/t.offsetHeight||1);var a=(S(t)?M(t):window).visualViewport,s=!R()&&r,l=(n.left+(s&&a?a.offsetLeft:0))/i,c=(n.top+(s&&a?a.offsetTop:0))/o,d=n.width/i,u=n.height/o;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l,x:l,y:c}}function j(t){var e=P(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}function N(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&E(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function B(t){return M(t).getComputedStyle(t)}function U(t){return["table","td","th"].indexOf(T(t))>=0}function G(t){return((S(t)?t.ownerDocument:t.document)||window.document).documentElement}function V(t){return"html"===T(t)?t:t.assignedSlot||t.parentNode||(E(t)?t.host:null)||G(t)}function H(t){return C(t)&&"fixed"!==B(t).position?t.offsetParent:null}function W(t){for(var e=M(t),r=H(t);r&&U(r)&&"static"===B(r).position;)r=H(r);return r&&("html"===T(r)||"body"===T(r)&&"static"===B(r).position)?e:r||function(t){var e=/firefox/i.test(F());if(/Trident/i.test(F())&&C(t)&&"fixed"===B(t).position)return null;var r=V(t);for(E(r)&&(r=r.host);C(r)&&["html","body"].indexOf(T(r))<0;){var n=B(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(t)||e}function q(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Y(t,e,r){return O(t,D(e,r))}function Z(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function X(t,e){return e.reduce((function(e,r){return e[r]=t,e}),{})}const J={name:"arrow",enabled:!0,phase:"main",fn:function(t){var o,s=t.state,l=t.name,c=t.options,d=s.elements.arrow,u=s.modifiersData.popperOffsets,h=z(s.placement),p=q(h),f=[i,n].indexOf(h)>=0?"height":"width";if(d&&u){var m=function(t,e){return Z("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:X(t,a))}(c.padding,s),g=j(d),v="y"===p?e:i,b="y"===p?r:n,y=s.rects.reference[f]+s.rects.reference[p]-u[p]-s.rects.popper[f],x=u[p]-s.rects.reference[p],w=W(d),_=w?"y"===p?w.clientHeight||0:w.clientWidth||0:0,k=y/2-x/2,A=m[v],T=_-g[f]-m[b],M=_/2-g[f]/2+k,S=Y(A,M,T),C=p;s.modifiersData[l]=((o={})[C]=S,o.centerOffset=S-M,o)}},effect:function(t){var e=t.state,r=t.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&N(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function K(t){return t.split("-")[1]}var Q={top:"auto",right:"auto",bottom:"auto",left:"auto"};function tt(t){var o,a=t.popper,s=t.popperRect,c=t.placement,d=t.variation,u=t.offsets,h=t.position,p=t.gpuAcceleration,f=t.adaptive,m=t.roundOffsets,g=t.isFixed,v=u.x,b=void 0===v?0:v,y=u.y,x=void 0===y?0:y,w="function"==typeof m?m({x:b,y:x}):{x:b,y:x};b=w.x,x=w.y;var _=u.hasOwnProperty("x"),k=u.hasOwnProperty("y"),A=i,T=e,S=window;if(f){var C=W(a),E="clientHeight",L="clientWidth";C===M(a)&&"static"!==B(C=G(a)).position&&"absolute"===h&&(E="scrollHeight",L="scrollWidth"),(c===e||(c===i||c===n)&&d===l)&&(T=r,x-=(g&&C===S&&S.visualViewport?S.visualViewport.height:C[E])-s.height,x*=p?1:-1),c!==i&&(c!==e&&c!==r||d!==l)||(A=n,b-=(g&&C===S&&S.visualViewport?S.visualViewport.width:C[L])-s.width,b*=p?1:-1)}var z,O=Object.assign({position:h},f&&Q),D=!0===m?function(t,e){var r=t.x,n=t.y,i=e.devicePixelRatio||1;return{x:I(r*i)/i||0,y:I(n*i)/i||0}}({x:b,y:x},M(a)):{x:b,y:x};return b=D.x,x=D.y,p?Object.assign({},O,((z={})[T]=k?"0":"",z[A]=_?"0":"",z.transform=(S.devicePixelRatio||1)<=1?"translate("+b+"px, "+x+"px)":"translate3d("+b+"px, "+x+"px, 0)",z)):Object.assign({},O,((o={})[T]=k?x+"px":"",o[A]=_?b+"px":"",o.transform="",o))}const et={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,r=t.options,n=r.gpuAcceleration,i=void 0===n||n,o=r.adaptive,a=void 0===o||o,s=r.roundOffsets,l=void 0===s||s,c={placement:z(e.placement),variation:K(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,tt(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,tt(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var rt={passive:!0};const nt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,r=t.instance,n=t.options,i=n.scroll,o=void 0===i||i,a=n.resize,s=void 0===a||a,l=M(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",r.update,rt)})),s&&l.addEventListener("resize",r.update,rt),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",r.update,rt)})),s&&l.removeEventListener("resize",r.update,rt)}},data:{}};var it={left:"right",right:"left",bottom:"top",top:"bottom"};function ot(t){return t.replace(/left|right|bottom|top/g,(function(t){return it[t]}))}var at={start:"end",end:"start"};function st(t){return t.replace(/start|end/g,(function(t){return at[t]}))}function lt(t){var e=M(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ct(t){return P(G(t)).left+lt(t).scrollLeft}function dt(t){var e=B(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function ut(t){return["html","body","#document"].indexOf(T(t))>=0?t.ownerDocument.body:C(t)&&dt(t)?t:ut(V(t))}function ht(t,e){var r;void 0===e&&(e=[]);var n=ut(t),i=n===(null==(r=t.ownerDocument)?void 0:r.body),o=M(n),a=i?[o].concat(o.visualViewport||[],dt(n)?n:[]):n,s=e.concat(a);return i?s:s.concat(ht(V(a)))}function pt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ft(t,e,r){return e===d?pt(function(t,e){var r=M(t),n=G(t),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=R();(c||!c&&"fixed"===e)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+ct(t),y:l}}(t,r)):S(e)?function(t,e){var r=P(t,!1,"fixed"===e);return r.top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r}(e,r):pt(function(t){var e,r=G(t),n=lt(t),i=null==(e=t.ownerDocument)?void 0:e.body,o=O(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=O(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+ct(t),l=-n.scrollTop;return"rtl"===B(i||r).direction&&(s+=O(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(G(t)))}function mt(t){var o,a=t.reference,c=t.element,d=t.placement,u=d?z(d):null,h=d?K(d):null,p=a.x+a.width/2-c.width/2,f=a.y+a.height/2-c.height/2;switch(u){case e:o={x:p,y:a.y-c.height};break;case r:o={x:p,y:a.y+a.height};break;case n:o={x:a.x+a.width,y:f};break;case i:o={x:a.x-c.width,y:f};break;default:o={x:a.x,y:a.y}}var m=u?q(u):null;if(null!=m){var g="y"===m?"height":"width";switch(h){case s:o[m]=o[m]-(a[g]/2-c[g]/2);break;case l:o[m]=o[m]+(a[g]/2-c[g]/2)}}return o}function gt(t,i){void 0===i&&(i={});var o=i,s=o.placement,l=void 0===s?t.placement:s,p=o.strategy,f=void 0===p?t.strategy:p,m=o.boundary,g=void 0===m?c:m,v=o.rootBoundary,b=void 0===v?d:v,y=o.elementContext,x=void 0===y?u:y,w=o.altBoundary,_=void 0!==w&&w,k=o.padding,A=void 0===k?0:k,M=Z("number"!=typeof A?A:X(A,a)),E=x===u?h:u,L=t.rects.popper,z=t.elements[_?E:x],I=function(t,e,r,n){var i="clippingParents"===e?function(t){var e=ht(V(t)),r=["absolute","fixed"].indexOf(B(t).position)>=0&&C(t)?W(t):t;return S(r)?e.filter((function(t){return S(t)&&N(t,r)&&"body"!==T(t)})):[]}(t):[].concat(e),o=[].concat(i,[r]),a=o[0],s=o.reduce((function(e,r){var i=ft(t,r,n);return e.top=O(i.top,e.top),e.right=D(i.right,e.right),e.bottom=D(i.bottom,e.bottom),e.left=O(i.left,e.left),e}),ft(t,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(S(z)?z:z.contextElement||G(t.elements.popper),g,b,f),F=P(t.elements.reference),R=mt({reference:F,element:L,strategy:"absolute",placement:l}),j=pt(Object.assign({},L,R)),U=x===u?j:F,H={top:I.top-U.top+M.top,bottom:U.bottom-I.bottom+M.bottom,left:I.left-U.left+M.left,right:U.right-I.right+M.right},q=t.modifiersData.offset;if(x===u&&q){var Y=q[l];Object.keys(H).forEach((function(t){var i=[n,r].indexOf(t)>=0?1:-1,o=[e,r].indexOf(t)>=0?"y":"x";H[t]+=Y[o]*i}))}return H}const vt={name:"flip",enabled:!0,phase:"main",fn:function(t){var l=t.state,c=t.options,d=t.name;if(!l.modifiersData[d]._skip){for(var u=c.mainAxis,h=void 0===u||u,m=c.altAxis,g=void 0===m||m,v=c.fallbackPlacements,b=c.padding,y=c.boundary,x=c.rootBoundary,w=c.altBoundary,_=c.flipVariations,k=void 0===_||_,A=c.allowedAutoPlacements,T=l.options.placement,M=z(T),S=v||(M!==T&&k?function(t){if(z(t)===o)return[];var e=ot(t);return[st(t),e,st(e)]}(T):[ot(T)]),C=[T].concat(S).reduce((function(t,e){return t.concat(z(e)===o?function(t,e){void 0===e&&(e={});var r=e,n=r.placement,i=r.boundary,o=r.rootBoundary,s=r.padding,l=r.flipVariations,c=r.allowedAutoPlacements,d=void 0===c?f:c,u=K(n),h=u?l?p:p.filter((function(t){return K(t)===u})):a,m=h.filter((function(t){return d.indexOf(t)>=0}));0===m.length&&(m=h);var g=m.reduce((function(e,r){return e[r]=gt(t,{placement:r,boundary:i,rootBoundary:o,padding:s})[z(r)],e}),{});return Object.keys(g).sort((function(t,e){return g[t]-g[e]}))}(l,{placement:e,boundary:y,rootBoundary:x,padding:b,flipVariations:k,allowedAutoPlacements:A}):e)}),[]),E=l.rects.reference,L=l.rects.popper,O=new Map,D=!0,I=C[0],F=0;F=0,B=N?"width":"height",U=gt(l,{placement:R,boundary:y,rootBoundary:x,altBoundary:w,padding:b}),G=N?j?n:i:j?r:e;E[B]>L[B]&&(G=ot(G));var V=ot(G),H=[];if(h&&H.push(U[P]<=0),g&&H.push(U[G]<=0,U[V]<=0),H.every((function(t){return t}))){I=R,D=!1;break}O.set(R,H)}if(D)for(var W=function(t){var e=C.find((function(e){var r=O.get(e);if(r)return r.slice(0,t).every((function(t){return t}))}));if(e)return I=e,"break"},q=k?3:1;q>0&&"break"!==W(q);q--);l.placement!==I&&(l.modifiersData[d]._skip=!0,l.placement=I,l.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,r){return void 0===r&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function yt(t){return[e,n,r,i].some((function(e){return t[e]>=0}))}const xt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,r=t.name,n=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,a=gt(e,{elementContext:"reference"}),s=gt(e,{altBoundary:!0}),l=bt(a,n),c=bt(s,i,o),d=yt(l),u=yt(c);e.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}},wt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var r=t.state,o=t.options,a=t.name,s=o.offset,l=void 0===s?[0,0]:s,c=f.reduce((function(t,o){return t[o]=function(t,r,o){var a=z(t),s=[i,e].indexOf(a)>=0?-1:1,l="function"==typeof o?o(Object.assign({},r,{placement:t})):o,c=l[0],d=l[1];return c=c||0,d=(d||0)*s,[i,n].indexOf(a)>=0?{x:d,y:c}:{x:c,y:d}}(o,r.rects,l),t}),{}),d=c[r.placement],u=d.x,h=d.y;null!=r.modifiersData.popperOffsets&&(r.modifiersData.popperOffsets.x+=u,r.modifiersData.popperOffsets.y+=h),r.modifiersData[a]=c}},_t={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,r=t.name;e.modifiersData[r]=mt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},kt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var o=t.state,a=t.options,l=t.name,c=a.mainAxis,d=void 0===c||c,u=a.altAxis,h=void 0!==u&&u,p=a.boundary,f=a.rootBoundary,m=a.altBoundary,g=a.padding,v=a.tether,b=void 0===v||v,y=a.tetherOffset,x=void 0===y?0:y,w=gt(o,{boundary:p,rootBoundary:f,padding:g,altBoundary:m}),_=z(o.placement),k=K(o.placement),A=!k,T=q(_),M="x"===T?"y":"x",S=o.modifiersData.popperOffsets,C=o.rects.reference,E=o.rects.popper,L="function"==typeof x?x(Object.assign({},o.rects,{placement:o.placement})):x,I="number"==typeof L?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),F=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,R={x:0,y:0};if(S){if(d){var P,N="y"===T?e:i,B="y"===T?r:n,U="y"===T?"height":"width",G=S[T],V=G+w[N],H=G-w[B],Z=b?-E[U]/2:0,$=k===s?C[U]:E[U],X=k===s?-E[U]:-C[U],J=o.elements.arrow,Q=b&&J?j(J):{width:0,height:0},tt=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[N],rt=tt[B],nt=Y(0,C[U],Q[U]),it=A?C[U]/2-Z-nt-et-I.mainAxis:$-nt-et-I.mainAxis,ot=A?-C[U]/2+Z+nt+rt+I.mainAxis:X+nt+rt+I.mainAxis,at=o.elements.arrow&&W(o.elements.arrow),st=at?"y"===T?at.clientTop||0:at.clientLeft||0:0,lt=null!=(P=null==F?void 0:F[T])?P:0,ct=G+ot-lt,dt=Y(b?D(V,G+it-lt-st):V,G,b?O(H,ct):H);S[T]=dt,R[T]=dt-G}if(h){var ut,ht="x"===T?e:i,pt="x"===T?r:n,ft=S[M],mt="y"===M?"height":"width",vt=ft+w[ht],bt=ft-w[pt],yt=-1!==[e,i].indexOf(_),xt=null!=(ut=null==F?void 0:F[M])?ut:0,wt=yt?vt:ft-C[mt]-E[mt]-xt+I.altAxis,_t=yt?ft+C[mt]+E[mt]-xt-I.altAxis:bt,kt=b&&yt?function(t,e,r){var n=Y(t,e,r);return n>r?r:n}(wt,ft,_t):Y(b?wt:vt,ft,b?_t:bt);S[M]=kt,R[M]=kt-ft}o.modifiersData[l]=R}},requiresIfExists:["offset"]};function At(t,e,r){void 0===r&&(r=!1);var n,i,o=C(e),a=C(e)&&function(t){var e=t.getBoundingClientRect(),r=I(e.width)/t.offsetWidth||1,n=I(e.height)/t.offsetHeight||1;return 1!==r||1!==n}(e),s=G(e),l=P(t,a,r),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(o||!o&&!r)&&(("body"!==T(e)||dt(s))&&(c=(n=e)!==M(n)&&C(n)?{scrollLeft:(i=n).scrollLeft,scrollTop:i.scrollTop}:lt(n)),C(e)?((d=P(e,!0)).x+=e.clientLeft,d.y+=e.clientTop):s&&(d.x=ct(s))),{x:l.left+c.scrollLeft-d.x,y:l.top+c.scrollTop-d.y,width:l.width,height:l.height}}function Tt(t){var e=new Map,r=new Set,n=[];function i(t){r.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!r.has(t)){var n=e.get(t);n&&i(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){r.has(t.name)||i(t)})),n}var Mt={placement:"bottom",modifiers:[],strategy:"absolute"};function St(){for(var t=arguments.length,e=new Array(t),r=0;r{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let r=t.getAttribute("href");if(!r||!r.includes("#")&&!r.startsWith("."))return null;r.includes("#")&&!r.startsWith("#")&&(r=`#${r.split("#")[1]}`),e=r&&"#"!==r?r.trim():null}return e},It=t=>{const e=Dt(t);return e&&document.querySelector(e)?e:null},Ft=t=>{const e=Dt(t);return e?document.querySelector(e):null},Rt=t=>{t.dispatchEvent(new Event(Ot))},Pt=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),jt=t=>Pt(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,Nt=t=>{if(!Pt(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),r=t.closest("details:not([open])");if(!r)return e;if(r!==t){const e=t.closest("summary");if(e&&e.parentNode!==r)return!1;if(null===e)return!1}return e},Bt=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),Ut=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?Ut(t.parentNode):null},Gt=()=>{},Vt=t=>{t.offsetHeight},Ht=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Wt=[],qt=()=>"rtl"===document.documentElement.dir,Yt=t=>{var e;e=()=>{const e=Ht();if(e){const r=t.NAME,n=e.fn[r];e.fn[r]=t.jQueryInterface,e.fn[r].Constructor=t,e.fn[r].noConflict=()=>(e.fn[r]=n,t.jQueryInterface)}},"loading"===document.readyState?(Wt.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of Wt)t()})),Wt.push(e)):e()},Zt=t=>{"function"==typeof t&&t()},$t=(t,e,r=!0)=>{if(!r)return void Zt(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:r}=window.getComputedStyle(t);const n=Number.parseFloat(e),i=Number.parseFloat(r);return n||i?(e=e.split(",")[0],r=r.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(r))):0})(e)+5;let i=!1;const o=({target:r})=>{r===e&&(i=!0,e.removeEventListener(Ot,o),Zt(t))};e.addEventListener(Ot,o),setTimeout((()=>{i||Rt(e)}),n)},Xt=(t,e,r,n)=>{const i=t.length;let o=t.indexOf(e);return-1===o?!r&&n?t[i-1]:t[0]:(o+=r?1:-1,n&&(o=(o+i)%i),t[Math.max(0,Math.min(o,i-1))])},Jt=/[^.]*(?=\..*)\.|.*/,Kt=/\..*/,Qt=/::\d+$/,te={};let ee=1;const re={mouseenter:"mouseover",mouseleave:"mouseout"},ne=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function ie(t,e){return e&&`${e}::${ee++}`||t.uidEvent||ee++}function oe(t){const e=ie(t);return t.uidEvent=e,te[e]=te[e]||{},te[e]}function ae(t,e,r=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===r))}function se(t,e,r){const n="string"==typeof e,i=n?r:e||r;let o=ue(t);return ne.has(o)||(o=t),[n,i,o]}function le(t,e,r,n,i){if("string"!=typeof e||!t)return;let[o,a,s]=se(e,r,n);if(e in re){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};a=t(a)}const l=oe(t),c=l[s]||(l[s]={}),d=ae(c,a,o?r:null);if(d)return void(d.oneOff=d.oneOff&&i);const u=ie(a,e.replace(Jt,"")),h=o?function(t,e,r){return function n(i){const o=t.querySelectorAll(e);for(let{target:a}=i;a&&a!==this;a=a.parentNode)for(const s of o)if(s===a)return pe(i,{delegateTarget:a}),n.oneOff&&he.off(t,i.type,e,r),r.apply(a,[i])}}(t,r,a):function(t,e){return function r(n){return pe(n,{delegateTarget:t}),r.oneOff&&he.off(t,n.type,e),e.apply(t,[n])}}(t,a);h.delegationSelector=o?r:null,h.callable=a,h.oneOff=i,h.uidEvent=u,c[u]=h,t.addEventListener(s,h,o)}function ce(t,e,r,n,i){const o=ae(e[r],n,i);o&&(t.removeEventListener(r,o,Boolean(i)),delete e[r][o.uidEvent])}function de(t,e,r,n){const i=e[r]||{};for(const o of Object.keys(i))if(o.includes(n)){const n=i[o];ce(t,e,r,n.callable,n.delegationSelector)}}function ue(t){return t=t.replace(Kt,""),re[t]||t}const he={on(t,e,r,n){le(t,e,r,n,!1)},one(t,e,r,n){le(t,e,r,n,!0)},off(t,e,r,n){if("string"!=typeof e||!t)return;const[i,o,a]=se(e,r,n),s=a!==e,l=oe(t),c=l[a]||{},d=e.startsWith(".");if(void 0===o){if(d)for(const r of Object.keys(l))de(t,l,r,e.slice(1));for(const r of Object.keys(c)){const n=r.replace(Qt,"");if(!s||e.includes(n)){const e=c[r];ce(t,l,a,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;ce(t,l,a,o,i?r:null)}},trigger(t,e,r){if("string"!=typeof e||!t)return null;const n=Ht();let i=null,o=!0,a=!0,s=!1;e!==ue(e)&&n&&(i=n.Event(e,r),n(t).trigger(i),o=!i.isPropagationStopped(),a=!i.isImmediatePropagationStopped(),s=i.isDefaultPrevented());let l=new Event(e,{bubbles:o,cancelable:!0});return l=pe(l,r),s&&l.preventDefault(),a&&t.dispatchEvent(l),l.defaultPrevented&&i&&i.preventDefault(),l}};function pe(t,e){for(const[r,n]of Object.entries(e||{}))try{t[r]=n}catch(e){Object.defineProperty(t,r,{configurable:!0,get:()=>n})}return t}const fe=new Map,me={set(t,e,r){fe.has(t)||fe.set(t,new Map);const n=fe.get(t);n.has(e)||0===n.size?n.set(e,r):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>fe.has(t)&&fe.get(t).get(e)||null,remove(t,e){if(!fe.has(t))return;const r=fe.get(t);r.delete(e),0===r.size&&fe.delete(t)}};function ge(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function ve(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const be={setDataAttribute(t,e,r){t.setAttribute(`data-bs-${ve(e)}`,r)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${ve(e)}`)},getDataAttributes(t){if(!t)return{};const e={},r=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of r){let r=n.replace(/^bs/,"");r=r.charAt(0).toLowerCase()+r.slice(1,r.length),e[r]=ge(t.dataset[n])}return e},getDataAttribute:(t,e)=>ge(t.getAttribute(`data-bs-${ve(e)}`))};class ye{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const r=Pt(e)?be.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof r?r:{},...Pt(e)?be.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const n of Object.keys(e)){const i=e[n],o=t[n],a=Pt(o)?"element":null==(r=o)?`${r}`:Object.prototype.toString.call(r).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(i).test(a))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${a}" but expected type "${i}".`)}var r}}class xe extends ye{constructor(t,e){super(),(t=jt(t))&&(this._element=t,this._config=this._getConfig(e),me.set(this._element,this.constructor.DATA_KEY,this))}dispose(){me.remove(this._element,this.constructor.DATA_KEY),he.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,r=!0){$t(t,e,r)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return me.get(jt(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.2.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const we=(t,e="hide")=>{const r=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;he.on(document,r,`[data-bs-dismiss="${n}"]`,(function(r){if(["A","AREA"].includes(this.tagName)&&r.preventDefault(),Bt(this))return;const i=Ft(this)||this.closest(`.${n}`);t.getOrCreateInstance(i)[e]()}))},_e=".bs.alert",ke=`close${_e}`,Ae=`closed${_e}`;class Te extends xe{static get NAME(){return"alert"}close(){if(he.trigger(this._element,ke).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),he.trigger(this._element,Ae),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=Te.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}we(Te,"close"),Yt(Te);const Me='[data-bs-toggle="button"]';class Se extends xe{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=Se.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}he.on(document,"click.bs.button.data-api",Me,(t=>{t.preventDefault();const e=t.target.closest(Me);Se.getOrCreateInstance(e).toggle()})),Yt(Se);const Ce={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const r=[];let n=t.parentNode.closest(e);for(;n;)r.push(n),n=n.parentNode.closest(e);return r},prev(t,e){let r=t.previousElementSibling;for(;r;){if(r.matches(e))return[r];r=r.previousElementSibling}return[]},next(t,e){let r=t.nextElementSibling;for(;r;){if(r.matches(e))return[r];r=r.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!Bt(t)&&Nt(t)))}},Ee=".bs.swipe",Le=`touchstart${Ee}`,ze=`touchmove${Ee}`,Oe=`touchend${Ee}`,De=`pointerdown${Ee}`,Ie=`pointerup${Ee}`,Fe={endCallback:null,leftCallback:null,rightCallback:null},Re={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Pe extends ye{constructor(t,e){super(),this._element=t,t&&Pe.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Fe}static get DefaultType(){return Re}static get NAME(){return"swipe"}dispose(){he.off(this._element,Ee)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),Zt(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&Zt(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(he.on(this._element,De,(t=>this._start(t))),he.on(this._element,Ie,(t=>this._end(t))),this._element.classList.add("pointer-event")):(he.on(this._element,Le,(t=>this._start(t))),he.on(this._element,ze,(t=>this._move(t))),he.on(this._element,Oe,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const je=".bs.carousel",Ne=".data-api",Be="ArrowLeft",Ue="ArrowRight",Ge="next",Ve="prev",He="left",We="right",qe=`slide${je}`,Ye=`slid${je}`,Ze=`keydown${je}`,$e=`mouseenter${je}`,Xe=`mouseleave${je}`,Je=`dragstart${je}`,Ke=`load${je}${Ne}`,Qe=`click${je}${Ne}`,tr="carousel",er="active",rr=".active",nr=".carousel-item",ir=rr+nr,or={[Be]:We,[Ue]:He},ar={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},sr={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class lr extends xe{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Ce.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===tr&&this.cycle()}static get Default(){return ar}static get DefaultType(){return sr}static get NAME(){return"carousel"}next(){this._slide(Ge)}nextWhenVisible(){!document.hidden&&Nt(this._element)&&this.next()}prev(){this._slide(Ve)}pause(){this._isSliding&&Rt(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?he.one(this._element,Ye,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void he.one(this._element,Ye,(()=>this.to(t)));const r=this._getItemIndex(this._getActive());if(r===t)return;const n=t>r?Ge:Ve;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&he.on(this._element,Ze,(t=>this._keydown(t))),"hover"===this._config.pause&&(he.on(this._element,$e,(()=>this.pause())),he.on(this._element,Xe,(()=>this._maybeEnableCycle()))),this._config.touch&&Pe.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of Ce.find(".carousel-item img",this._element))he.on(t,Je,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(He)),rightCallback:()=>this._slide(this._directionToOrder(We)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new Pe(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=or[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=Ce.findOne(rr,this._indicatorsElement);e.classList.remove(er),e.removeAttribute("aria-current");const r=Ce.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);r&&(r.classList.add(er),r.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const r=this._getActive(),n=t===Ge,i=e||Xt(this._getItems(),r,n,this._config.wrap);if(i===r)return;const o=this._getItemIndex(i),a=e=>he.trigger(this._element,e,{relatedTarget:i,direction:this._orderToDirection(t),from:this._getItemIndex(r),to:o});if(a(qe).defaultPrevented)return;if(!r||!i)return;const s=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=i;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";i.classList.add(c),Vt(i),r.classList.add(l),i.classList.add(l),this._queueCallback((()=>{i.classList.remove(l,c),i.classList.add(er),r.classList.remove(er,c,l),this._isSliding=!1,a(Ye)}),r,this._isAnimated()),s&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Ce.findOne(ir,this._element)}_getItems(){return Ce.find(nr,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return qt()?t===He?Ve:Ge:t===He?Ge:Ve}_orderToDirection(t){return qt()?t===Ve?He:We:t===Ve?We:He}static jQueryInterface(t){return this.each((function(){const e=lr.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}he.on(document,Qe,"[data-bs-slide], [data-bs-slide-to]",(function(t){const e=Ft(this);if(!e||!e.classList.contains(tr))return;t.preventDefault();const r=lr.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(r.to(n),void r._maybeEnableCycle()):"next"===be.getDataAttribute(this,"slide")?(r.next(),void r._maybeEnableCycle()):(r.prev(),void r._maybeEnableCycle())})),he.on(window,Ke,(()=>{const t=Ce.find('[data-bs-ride="carousel"]');for(const e of t)lr.getOrCreateInstance(e)})),Yt(lr);const cr=".bs.collapse",dr=`show${cr}`,ur=`shown${cr}`,hr=`hide${cr}`,pr=`hidden${cr}`,fr=`click${cr}.data-api`,mr="show",gr="collapse",vr="collapsing",br=`:scope .${gr} .${gr}`,yr='[data-bs-toggle="collapse"]',xr={parent:null,toggle:!0},wr={parent:"(null|element)",toggle:"boolean"};class _r extends xe{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const r=Ce.find(yr);for(const t of r){const e=It(t),r=Ce.find(e).filter((t=>t===this._element));null!==e&&r.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return xr}static get DefaultType(){return wr}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>_r.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(he.trigger(this._element,dr).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(gr),this._element.classList.add(vr),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const r=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(vr),this._element.classList.add(gr,mr),this._element.style[e]="",he.trigger(this._element,ur)}),this._element,!0),this._element.style[e]=`${this._element[r]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(he.trigger(this._element,hr).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,Vt(this._element),this._element.classList.add(vr),this._element.classList.remove(gr,mr);for(const t of this._triggerArray){const e=Ft(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(vr),this._element.classList.add(gr),he.trigger(this._element,pr)}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(mr)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=jt(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(yr);for(const e of t){const t=Ft(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=Ce.find(br,this._config.parent);return Ce.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const r of t)r.classList.toggle("collapsed",!e),r.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const r=_r.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===r[t])throw new TypeError(`No method named "${t}"`);r[t]()}}))}}he.on(document,fr,yr,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=It(this),r=Ce.find(e);for(const t of r)_r.getOrCreateInstance(t,{toggle:!1}).toggle()})),Yt(_r);const kr="dropdown",Ar=".bs.dropdown",Tr=".data-api",Mr="ArrowUp",Sr="ArrowDown",Cr=`hide${Ar}`,Er=`hidden${Ar}`,Lr=`show${Ar}`,zr=`shown${Ar}`,Or=`click${Ar}${Tr}`,Dr=`keydown${Ar}${Tr}`,Ir=`keyup${Ar}${Tr}`,Fr="show",Rr='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Pr=`${Rr}.${Fr}`,jr=".dropdown-menu",Nr=qt()?"top-end":"top-start",Br=qt()?"top-start":"top-end",Ur=qt()?"bottom-end":"bottom-start",Gr=qt()?"bottom-start":"bottom-end",Vr=qt()?"left-start":"right-start",Hr=qt()?"right-start":"left-start",Wr={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},qr={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Yr extends xe{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=Ce.next(this._element,jr)[0]||Ce.prev(this._element,jr)[0]||Ce.findOne(jr,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Wr}static get DefaultType(){return qr}static get NAME(){return kr}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Bt(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!he.trigger(this._element,Lr,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))he.on(t,"mouseover",Gt);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Fr),this._element.classList.add(Fr),he.trigger(this._element,zr,t)}}hide(){if(Bt(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!he.trigger(this._element,Cr,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))he.off(t,"mouseover",Gt);this._popper&&this._popper.destroy(),this._menu.classList.remove(Fr),this._element.classList.remove(Fr),this._element.setAttribute("aria-expanded","false"),be.removeDataAttribute(this._menu,"popper"),he.trigger(this._element,Er,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!Pt(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${kr.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){let t=this._element;"parent"===this._config.reference?t=this._parent:Pt(this._config.reference)?t=jt(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=Lt(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Fr)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return Vr;if(t.classList.contains("dropstart"))return Hr;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?Br:Nr:e?Gr:Ur}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(be.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const r=Ce.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>Nt(t)));r.length&&Xt(r,e,t===Sr,!r.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=Yr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=Ce.find(Pr);for(const r of e){const e=Yr.getInstance(r);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),i=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!i||"outside"===e._config.autoClose&&i)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),r="Escape"===t.key,n=[Mr,Sr].includes(t.key);if(!n&&!r)return;if(e&&!r)return;t.preventDefault();const i=this.matches(Rr)?this:Ce.prev(this,Rr)[0]||Ce.next(this,Rr)[0]||Ce.findOne(Rr,t.delegateTarget.parentNode),o=Yr.getOrCreateInstance(i);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),i.focus())}}he.on(document,Dr,Rr,Yr.dataApiKeydownHandler),he.on(document,Dr,jr,Yr.dataApiKeydownHandler),he.on(document,Or,Yr.clearMenus),he.on(document,Ir,Yr.clearMenus),he.on(document,Or,Rr,(function(t){t.preventDefault(),Yr.getOrCreateInstance(this).toggle()})),Yt(Yr);const Zr=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",$r=".sticky-top",Xr="padding-right",Jr="margin-right";class Kr{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Xr,(e=>e+t)),this._setElementAttributes(Zr,Xr,(e=>e+t)),this._setElementAttributes($r,Jr,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Xr),this._resetElementAttributes(Zr,Xr),this._resetElementAttributes($r,Jr)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,r){const n=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const i=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${r(Number.parseFloat(i))}px`)}))}_saveInitialAttribute(t,e){const r=t.style.getPropertyValue(e);r&&be.setDataAttribute(t,e,r)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const r=be.getDataAttribute(t,e);null!==r?(be.removeDataAttribute(t,e),t.style.setProperty(e,r)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(Pt(t))e(t);else for(const r of Ce.find(t,this._element))e(r)}}const Qr="backdrop",tn="show",en=`mousedown.bs.${Qr}`,rn={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},nn={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class on extends ye{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return rn}static get DefaultType(){return nn}static get NAME(){return Qr}show(t){if(!this._config.isVisible)return void Zt(t);this._append();const e=this._getElement();this._config.isAnimated&&Vt(e),e.classList.add(tn),this._emulateAnimation((()=>{Zt(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(tn),this._emulateAnimation((()=>{this.dispose(),Zt(t)}))):Zt(t)}dispose(){this._isAppended&&(he.off(this._element,en),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=jt(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),he.on(t,en,(()=>{Zt(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){$t(t,this._getElement(),this._config.isAnimated)}}const an=".bs.focustrap",sn=`focusin${an}`,ln=`keydown.tab${an}`,cn="backward",dn={autofocus:!0,trapElement:null},un={autofocus:"boolean",trapElement:"element"};class hn extends ye{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return dn}static get DefaultType(){return un}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),he.off(document,an),he.on(document,sn,(t=>this._handleFocusin(t))),he.on(document,ln,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,he.off(document,an))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const r=Ce.focusableChildren(e);0===r.length?e.focus():this._lastTabNavDirection===cn?r[r.length-1].focus():r[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?cn:"forward")}}const pn=".bs.modal",fn=`hide${pn}`,mn=`hidePrevented${pn}`,gn=`hidden${pn}`,vn=`show${pn}`,bn=`shown${pn}`,yn=`resize${pn}`,xn=`click.dismiss${pn}`,wn=`mousedown.dismiss${pn}`,_n=`keydown.dismiss${pn}`,kn=`click${pn}.data-api`,An="modal-open",Tn="show",Mn="modal-static",Sn={backdrop:!0,focus:!0,keyboard:!0},Cn={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class En extends xe{constructor(t,e){super(t,e),this._dialog=Ce.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Kr,this._addEventListeners()}static get Default(){return Sn}static get DefaultType(){return Cn}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||he.trigger(this._element,vn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(An),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(he.trigger(this._element,fn).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Tn),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const t of[window,this._dialog])he.off(t,pn);this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new on({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new hn({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=Ce.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),Vt(this._element),this._element.classList.add(Tn),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,he.trigger(this._element,bn,{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){he.on(this._element,_n,(t=>{if("Escape"===t.key)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),he.on(window,yn,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),he.on(this._element,wn,(t=>{he.one(this._element,xn,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(An),this._resetAdjustments(),this._scrollBar.reset(),he.trigger(this._element,gn)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(he.trigger(this._element,mn).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Mn)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Mn),this._queueCallback((()=>{this._element.classList.remove(Mn),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),r=e>0;if(r&&!t){const t=qt()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!r&&t){const t=qt()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const r=En.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===r[t])throw new TypeError(`No method named "${t}"`);r[t](e)}}))}}he.on(document,kn,'[data-bs-toggle="modal"]',(function(t){const e=Ft(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),he.one(e,vn,(t=>{t.defaultPrevented||he.one(e,gn,(()=>{Nt(this)&&this.focus()}))}));const r=Ce.findOne(".modal.show");r&&En.getInstance(r).hide(),En.getOrCreateInstance(e).toggle(this)})),we(En),Yt(En);const Ln=".bs.offcanvas",zn=".data-api",On=`load${Ln}${zn}`,Dn="show",In="showing",Fn="hiding",Rn=".offcanvas.show",Pn=`show${Ln}`,jn=`shown${Ln}`,Nn=`hide${Ln}`,Bn=`hidePrevented${Ln}`,Un=`hidden${Ln}`,Gn=`resize${Ln}`,Vn=`click${Ln}${zn}`,Hn=`keydown.dismiss${Ln}`,Wn={backdrop:!0,keyboard:!0,scroll:!1},qn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Yn extends xe{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Wn}static get DefaultType(){return qn}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||he.trigger(this._element,Pn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Kr).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(In),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Dn),this._element.classList.remove(In),he.trigger(this._element,jn,{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&(he.trigger(this._element,Nn).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Fn),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(Dn,Fn),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Kr).reset(),he.trigger(this._element,Un)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new on({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():he.trigger(this._element,Bn)}:null})}_initializeFocusTrap(){return new hn({trapElement:this._element})}_addEventListeners(){he.on(this._element,Hn,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():he.trigger(this._element,Bn))}))}static jQueryInterface(t){return this.each((function(){const e=Yn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}he.on(document,Vn,'[data-bs-toggle="offcanvas"]',(function(t){const e=Ft(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Bt(this))return;he.one(e,Un,(()=>{Nt(this)&&this.focus()}));const r=Ce.findOne(Rn);r&&r!==e&&Yn.getInstance(r).hide(),Yn.getOrCreateInstance(e).toggle(this)})),he.on(window,On,(()=>{for(const t of Ce.find(Rn))Yn.getOrCreateInstance(t).show()})),he.on(window,Gn,(()=>{for(const t of Ce.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Yn.getOrCreateInstance(t).hide()})),we(Yn),Yt(Yn);const Zn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),$n=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Xn=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Jn=(t,e)=>{const r=t.nodeName.toLowerCase();return e.includes(r)?!Zn.has(r)||Boolean($n.test(t.nodeValue)||Xn.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(r)))},Kn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Qn={allowList:Kn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},ti={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ei={entry:"(string|element|function|null)",selector:"(string|element)"};class ri extends ye{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Qn}static get DefaultType(){return ti}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,r]of Object.entries(this._config.content))this._setContent(t,r,e);const e=t.children[0],r=this._resolvePossibleFunction(this._config.extraClass);return r&&e.classList.add(...r.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,r]of Object.entries(t))super._typeCheckConfig({selector:e,entry:r},ei)}_setContent(t,e,r){const n=Ce.findOne(r,t);n&&((e=this._resolvePossibleFunction(e))?Pt(e)?this._putElementInTemplate(jt(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,r){if(!t.length)return t;if(r&&"function"==typeof r)return r(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),i=[].concat(...n.body.querySelectorAll("*"));for(const t of i){const r=t.nodeName.toLowerCase();if(!Object.keys(e).includes(r)){t.remove();continue}const n=[].concat(...t.attributes),i=[].concat(e["*"]||[],e[r]||[]);for(const e of n)Jn(e,i)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return"function"==typeof t?t(this):t}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const ni=new Set(["sanitize","allowList","sanitizeFn"]),ii="fade",oi="show",ai=".tooltip-inner",si=".modal",li="hide.bs.modal",ci="hover",di="focus",ui={AUTO:"auto",TOP:"top",RIGHT:qt()?"left":"right",BOTTOM:"bottom",LEFT:qt()?"right":"left"},hi={allowList:Kn,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},pi={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class fi extends xe{constructor(t,e){super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return hi}static get DefaultType(){return pi}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),he.off(this._element.closest(si),li,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=he.trigger(this._element,this.constructor.eventName("show")),e=(Ut(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const r=this._getTipElement();this._element.setAttribute("aria-describedby",r.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(r),he.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(r),r.classList.add(oi),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))he.on(t,"mouseover",Gt);this._queueCallback((()=>{he.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!he.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(oi),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))he.off(t,"mouseover",Gt);this._activeTrigger.click=!1,this._activeTrigger[di]=!1,this._activeTrigger[ci]=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),he.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(ii,oi),e.classList.add(`bs-${this.constructor.NAME}-auto`);const r=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",r),this._isAnimated()&&e.classList.add(ii),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new ri({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[ai]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(ii)}_isShown(){return this.tip&&this.tip.classList.contains(oi)}_createPopper(t){const e="function"==typeof this._config.placement?this._config.placement.call(this,t,this._element):this._config.placement,r=ui[e.toUpperCase()];return Lt(this._element,t,this._getPopperConfig(r))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)he.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===ci?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),r=e===ci?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");he.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?di:ci]=!0,e._enter()})),he.on(this._element,r,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?di:ci]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},he.on(this._element.closest(si),li,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=be.getDataAttributes(this._element);for(const t of Object.keys(e))ni.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:jt(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=fi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}Yt(fi);const mi=".popover-header",gi=".popover-body",vi={...fi.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},bi={...fi.DefaultType,content:"(null|string|element|function)"};class yi extends fi{static get Default(){return vi}static get DefaultType(){return bi}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[mi]:this._getTitle(),[gi]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=yi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}Yt(yi);const xi=".bs.scrollspy",wi=`activate${xi}`,_i=`click${xi}`,ki=`load${xi}.data-api`,Ai="active",Ti="[href]",Mi=".nav-link",Si=`${Mi}, .nav-item > ${Mi}, .list-group-item`,Ci={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Ei={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Li extends xe{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Ci}static get DefaultType(){return Ei}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=jt(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(he.off(this._config.target,_i),he.on(this._config.target,_i,Ti,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const r=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(r.scrollTo)return void r.scrollTo({top:n,behavior:"smooth"});r.scrollTop=n}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),r=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,i=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(i&&t){if(r(o),!n)return}else i||t||r(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=Ce.find(Ti,this._config.target);for(const e of t){if(!e.hash||Bt(e))continue;const t=Ce.findOne(e.hash,this._element);Nt(t)&&(this._targetLinks.set(e.hash,e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Ai),this._activateParents(t),he.trigger(this._element,wi,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))Ce.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Ai);else for(const e of Ce.parents(t,".nav, .list-group"))for(const t of Ce.prev(e,Si))t.classList.add(Ai)}_clearActiveClass(t){t.classList.remove(Ai);const e=Ce.find(`${Ti}.${Ai}`,t);for(const t of e)t.classList.remove(Ai)}static jQueryInterface(t){return this.each((function(){const e=Li.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}he.on(window,ki,(()=>{for(const t of Ce.find('[data-bs-spy="scroll"]'))Li.getOrCreateInstance(t)})),Yt(Li);const zi=".bs.tab",Oi=`hide${zi}`,Di=`hidden${zi}`,Ii=`show${zi}`,Fi=`shown${zi}`,Ri=`click${zi}`,Pi=`keydown${zi}`,ji=`load${zi}`,Ni="ArrowLeft",Bi="ArrowRight",Ui="ArrowUp",Gi="ArrowDown",Vi="active",Hi="fade",Wi="show",qi=":not(.dropdown-toggle)",Yi='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Zi=`.nav-link${qi}, .list-group-item${qi}, [role="tab"]${qi}, ${Yi}`,$i=`.${Vi}[data-bs-toggle="tab"], .${Vi}[data-bs-toggle="pill"], .${Vi}[data-bs-toggle="list"]`;class Xi extends xe{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),he.on(this._element,Pi,(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),r=e?he.trigger(e,Oi,{relatedTarget:t}):null;he.trigger(t,Ii,{relatedTarget:e}).defaultPrevented||r&&r.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(Vi),this._activate(Ft(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),he.trigger(t,Fi,{relatedTarget:e})):t.classList.add(Wi)}),t,t.classList.contains(Hi)))}_deactivate(t,e){t&&(t.classList.remove(Vi),t.blur(),this._deactivate(Ft(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),he.trigger(t,Di,{relatedTarget:e})):t.classList.remove(Wi)}),t,t.classList.contains(Hi)))}_keydown(t){if(![Ni,Bi,Ui,Gi].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[Bi,Gi].includes(t.key),r=Xt(this._getChildren().filter((t=>!Bt(t))),t.target,e,!0);r&&(r.focus({preventScroll:!0}),Xi.getOrCreateInstance(r).show())}_getChildren(){return Ce.find(Zi,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),r=this._getOuterElement(t);t.setAttribute("aria-selected",e),r!==t&&this._setAttributeIfNotExists(r,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=Ft(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`#${t.id}`))}_toggleDropDown(t,e){const r=this._getOuterElement(t);if(!r.classList.contains("dropdown"))return;const n=(t,n)=>{const i=Ce.findOne(t,r);i&&i.classList.toggle(n,e)};n(".dropdown-toggle",Vi),n(".dropdown-menu",Wi),r.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,r){t.hasAttribute(e)||t.setAttribute(e,r)}_elemIsActive(t){return t.classList.contains(Vi)}_getInnerElement(t){return t.matches(Zi)?t:Ce.findOne(Zi,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=Xi.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}he.on(document,Ri,Yi,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),Bt(this)||Xi.getOrCreateInstance(this).show()})),he.on(window,ji,(()=>{for(const t of Ce.find($i))Xi.getOrCreateInstance(t)})),Yt(Xi);const Ji=".bs.toast",Ki=`mouseover${Ji}`,Qi=`mouseout${Ji}`,to=`focusin${Ji}`,eo=`focusout${Ji}`,ro=`hide${Ji}`,no=`hidden${Ji}`,io=`show${Ji}`,oo=`shown${Ji}`,ao="hide",so="show",lo="showing",co={animation:"boolean",autohide:"boolean",delay:"number"},uo={animation:!0,autohide:!0,delay:5e3};class ho extends xe{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return uo}static get DefaultType(){return co}static get NAME(){return"toast"}show(){he.trigger(this._element,io).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(ao),Vt(this._element),this._element.classList.add(so,lo),this._queueCallback((()=>{this._element.classList.remove(lo),he.trigger(this._element,oo),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(he.trigger(this._element,ro).defaultPrevented||(this._element.classList.add(lo),this._queueCallback((()=>{this._element.classList.add(ao),this._element.classList.remove(lo,so),he.trigger(this._element,no)}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(so),super.dispose()}isShown(){return this._element.classList.contains(so)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const r=t.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){he.on(this._element,Ki,(t=>this._onInteraction(t,!0))),he.on(this._element,Qi,(t=>this._onInteraction(t,!1))),he.on(this._element,to,(t=>this._onInteraction(t,!0))),he.on(this._element,eo,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=ho.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}we(ho),Yt(ho);var po=__webpack_require__(85072),fo=__webpack_require__.n(po),mo=__webpack_require__(97825),go=__webpack_require__.n(mo),vo=__webpack_require__(77659),bo=__webpack_require__.n(vo),yo=__webpack_require__(55056),xo=__webpack_require__.n(yo),wo=__webpack_require__(10540),_o=__webpack_require__.n(wo),ko=__webpack_require__(41113),Ao=__webpack_require__.n(ko),To=__webpack_require__(11261),Mo={};Mo.styleTagTransform=Ao(),Mo.setAttributes=xo(),Mo.insert=bo().bind(null,"head"),Mo.domAPI=go(),Mo.insertStyleElement=_o(),fo()(To.A,Mo),To.A&&To.A.locals&&To.A.locals;var So=__webpack_require__(91683),Co=__webpack_require__(31945);function Eo(t){let e=t.length;for(;--e>=0;)t[e]=0}const Lo=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),zo=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),Oo=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Do=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Io=new Array(576);Eo(Io);const Fo=new Array(60);Eo(Fo);const Ro=new Array(512);Eo(Ro);const Po=new Array(256);Eo(Po);const jo=new Array(29);Eo(jo);const No=new Array(30);function Bo(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}let Uo,Go,Vo;function Ho(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}Eo(No);const Wo=t=>t<256?Ro[t]:Ro[256+(t>>>7)],qo=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},Yo=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<{Yo(t,r[2*e],r[2*e+1])},$o=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},Xo=(t,e,r)=>{const n=new Array(16);let i,o,a=0;for(i=1;i<=15;i++)a=a+r[i-1]<<1,n[i]=a;for(o=0;o<=e;o++){let e=t[2*o+1];0!==e&&(t[2*o]=$o(n[e]++,e))}},Jo=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},Ko=t=>{t.bi_valid>8?qo(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},Qo=(t,e,r,n)=>{const i=2*e,o=2*r;return t[i]{const n=t.heap[r];let i=r<<1;for(;i<=t.heap_len&&(i{let n,i,o,a,s=0;if(0!==t.sym_next)do{n=255&t.pending_buf[t.sym_buf+s++],n+=(255&t.pending_buf[t.sym_buf+s++])<<8,i=t.pending_buf[t.sym_buf+s++],0===n?Zo(t,i,e):(o=Po[i],Zo(t,o+256+1,e),a=Lo[o],0!==a&&(i-=jo[o],Yo(t,i,a)),n--,o=Wo(n),Zo(t,o,r),a=zo[o],0!==a&&(n-=No[o],Yo(t,n,a)))}while(s{const r=e.dyn_tree,n=e.stat_desc.static_tree,i=e.stat_desc.has_stree,o=e.stat_desc.elems;let a,s,l,c=-1;for(t.heap_len=0,t.heap_max=573,a=0;a>1;a>=1;a--)ta(t,r,a);l=o;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],ta(t,r,1),s=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=s,r[2*l]=r[2*a]+r[2*s],t.depth[l]=(t.depth[a]>=t.depth[s]?t.depth[a]:t.depth[s])+1,r[2*a+1]=r[2*s+1]=l,t.heap[1]=l++,ta(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,i=e.stat_desc.static_tree,o=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,l=e.stat_desc.max_length;let c,d,u,h,p,f,m=0;for(h=0;h<=15;h++)t.bl_count[h]=0;for(r[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<573;c++)d=t.heap[c],h=r[2*r[2*d+1]+1]+1,h>l&&(h=l,m++),r[2*d+1]=h,d>n||(t.bl_count[h]++,p=0,d>=s&&(p=a[d-s]),f=r[2*d],t.opt_len+=f*(h+p),o&&(t.static_len+=f*(i[2*d+1]+p)));if(0!==m){do{for(h=l-1;0===t.bl_count[h];)h--;t.bl_count[h]--,t.bl_count[h+1]+=2,t.bl_count[l]--,m-=2}while(m>0);for(h=l;0!==h;h--)for(d=t.bl_count[h];0!==d;)u=t.heap[--c],u>n||(r[2*u+1]!==h&&(t.opt_len+=(h-r[2*u+1])*r[2*u],r[2*u+1]=h),d--)}})(t,e),Xo(r,c,t.bl_count)},na=(t,e,r)=>{let n,i,o=-1,a=e[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++s{let n,i,o=-1,a=e[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),n=0;n<=r;n++)if(i=a,a=e[2*(n+1)+1],!(++s{Yo(t,0+(n?1:0),3),Ko(t),qo(t,r),qo(t,~r),r&&t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r};var sa={_tr_init:t=>{oa||((()=>{let t,e,r,n,i;const o=new Array(16);for(r=0,n=0;n<28;n++)for(jo[n]=r,t=0;t<1<>=7;n<30;n++)for(No[n]=i<<7,t=0;t<1<{let i,o,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),ra(t,t.l_desc),ra(t,t.d_desc),a=(t=>{let e;for(na(t,t.dyn_ltree,t.l_desc.max_code),na(t,t.dyn_dtree,t.d_desc.max_code),ra(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*Do[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),i=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?aa(t,e,r,n):4===t.strategy||o===i?(Yo(t,2+(n?1:0),3),ea(t,Io,Fo)):(Yo(t,4+(n?1:0),3),((t,e,r,n)=>{let i;for(Yo(t,e-257,5),Yo(t,r-1,5),Yo(t,n-4,4),i=0;i(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=r,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(Po[r]+256+1)]++,t.dyn_dtree[2*Wo(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{Yo(t,2,3),Zo(t,256,Io),(t=>{16===t.bi_valid?(qo(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}},la=(t,e,r,n)=>{let i=65535&t,o=t>>>16&65535,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{i=i+e[n++]|0,o=o+i|0}while(--a);i%=65521,o%=65521}return i|o<<16};const ca=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());var da=(t,e,r,n)=>{const i=ca,o=n+r;t^=-1;for(let r=n;r>>8^i[255&(t^e[r])];return~t},ua={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ha={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:pa,_tr_stored_block:fa,_tr_flush_block:ma,_tr_tally:ga,_tr_align:va}=sa,{Z_NO_FLUSH:ba,Z_PARTIAL_FLUSH:ya,Z_FULL_FLUSH:xa,Z_FINISH:wa,Z_BLOCK:_a,Z_OK:ka,Z_STREAM_END:Aa,Z_STREAM_ERROR:Ta,Z_DATA_ERROR:Ma,Z_BUF_ERROR:Sa,Z_DEFAULT_COMPRESSION:Ca,Z_FILTERED:Ea,Z_HUFFMAN_ONLY:La,Z_RLE:za,Z_FIXED:Oa,Z_DEFAULT_STRATEGY:Da,Z_UNKNOWN:Ia,Z_DEFLATED:Fa}=ha,Ra=258,Pa=262,ja=42,Na=113,Ba=666,Ua=(t,e)=>(t.msg=ua[e],e),Ga=t=>2*t-(t>4?9:0),Va=t=>{let e=t.length;for(;--e>=0;)t[e]=0},Ha=t=>{let e,r,n,i=t.w_size;e=t.hash_size,n=e;do{r=t.head[--n],t.head[n]=r>=i?r-i:0}while(--e);e=i,n=e;do{r=t.prev[--n],t.prev[n]=r>=i?r-i:0}while(--e)};let Wa=(t,e,r)=>(e<{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},Ya=(t,e)=>{ma(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,qa(t.strm)},Za=(t,e)=>{t.pending_buf[t.pending++]=e},$a=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Xa=(t,e,r,n)=>{let i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),r),1===t.state.wrap?t.adler=la(t.adler,e,i,r):2===t.state.wrap&&(t.adler=da(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)},Ja=(t,e)=>{let r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match;const l=t.strstart>t.w_size-Pa?t.strstart-(t.w_size-Pa):0,c=t.window,d=t.w_mask,u=t.prev,h=t.strstart+Ra;let p=c[o+a-1],f=c[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(r=e,c[r+a]===f&&c[r+a-1]===p&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&oa){if(t.match_start=e,a=n,n>=s)break;p=c[o+a-1],f=c[o+a]}}}while((e=u[e&d])>l&&0!=--i);return a<=t.lookahead?a:t.lookahead},Ka=t=>{const e=t.w_size;let r,n,i;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-Pa)&&(t.window.set(t.window.subarray(e,e+e-n),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),Ha(t),n+=e),0===t.strm.avail_in)break;if(r=Xa(t.strm,t.window,t.strstart+t.lookahead,n),t.lookahead+=r,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=Wa(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=Wa(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead{let r,n,i,o=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,a=0,s=t.strm.avail_in;do{if(r=65535,i=t.bi_valid+42>>3,t.strm.avail_outn+t.strm.avail_in&&(r=n+t.strm.avail_in),r>i&&(r=i),r>8,t.pending_buf[t.pending-2]=~r,t.pending_buf[t.pending-1]=~r>>8,qa(t.strm),n&&(n>r&&(n=r),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,r-=n),r&&(Xa(t.strm,t.strm.output,t.strm.next_out,r),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r)}while(0===a);return s-=t.strm.avail_in,s&&(s>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=s&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-s,t.strm.next_in),t.strstart),t.strstart+=s,t.insert+=s>t.w_size-t.insert?t.w_size-t.insert:s),t.block_start=t.strstart),t.high_wateri&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,i+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),i>t.strm.avail_in&&(i=t.strm.avail_in),i&&(Xa(t.strm,t.window,t.strstart,i),t.strstart+=i,t.insert+=i>t.w_size-t.insert?t.w_size-t.insert:i),t.high_water>3,i=t.pending_buf_size-i>65535?65535:t.pending_buf_size-i,o=i>t.w_size?t.w_size:i,n=t.strstart-t.block_start,(n>=o||(n||e===wa)&&e!==ba&&0===t.strm.avail_in&&n<=i)&&(r=n>i?i:n,a=e===wa&&0===t.strm.avail_in&&r===n?1:0,fa(t,t.block_start,r,a),t.block_start+=r,qa(t.strm)),a?3:1)},ts=(t,e)=>{let r,n;for(;;){if(t.lookahead=3&&(t.ins_h=Wa(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-Pa&&(t.match_length=Ja(t,r)),t.match_length>=3)if(n=ga(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=Wa(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=Wa(t,t.ins_h,t.window[t.strstart+1]);else n=ga(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Ya(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===wa?(Ya(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Ya(t,!1),0===t.strm.avail_out)?1:2},es=(t,e)=>{let r,n,i;for(;;){if(t.lookahead=3&&(t.ins_h=Wa(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=ga(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=Wa(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Ya(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=ga(t,0,t.window[t.strstart-1]),n&&Ya(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=ga(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===wa?(Ya(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Ya(t,!1),0===t.strm.avail_out)?1:2};function rs(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}const ns=[new rs(0,0,0,0,Qa),new rs(4,4,8,4,ts),new rs(4,5,16,8,ts),new rs(4,6,32,32,ts),new rs(4,4,16,16,es),new rs(8,16,32,32,es),new rs(8,16,128,128,es),new rs(8,32,128,256,es),new rs(32,128,258,1024,es),new rs(32,258,258,4096,es)];function is(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Fa,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Va(this.dyn_ltree),Va(this.dyn_dtree),Va(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Va(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Va(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const os=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==ja&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==Na&&e.status!==Ba?1:0},as=t=>{if(os(t))return Ua(t,Ta);t.total_in=t.total_out=0,t.data_type=Ia;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?ja:Na,t.adler=2===e.wrap?0:1,e.last_flush=-2,pa(e),ka},ss=t=>{const e=as(t);var r;return e===ka&&((r=t.state).window_size=2*r.w_size,Va(r.head),r.max_lazy_match=ns[r.level].max_lazy,r.good_match=ns[r.level].good_length,r.nice_match=ns[r.level].nice_length,r.max_chain_length=ns[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),e},ls=(t,e,r,n,i,o)=>{if(!t)return Ta;let a=1;if(e===Ca&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>9||r!==Fa||n<8||n>15||e<0||e>9||o<0||o>Oa||8===n&&1!==a)return Ua(t,Ta);8===n&&(n=9);const s=new is;return t.state=s,s.strm=t,s.status=ja,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<os(t)||2!==t.state.wrap?Ta:(t.state.gzhead=e,ka),us=(t,e)=>{if(os(t)||e>_a||e<0)return t?Ua(t,Ta):Ta;const r=t.state;if(!t.output||0!==t.avail_in&&!t.input||r.status===Ba&&e!==wa)return Ua(t,0===t.avail_out?Sa:Ta);const n=r.last_flush;if(r.last_flush=e,0!==r.pending){if(qa(t),0===t.avail_out)return r.last_flush=-1,ka}else if(0===t.avail_in&&Ga(e)<=Ga(n)&&e!==wa)return Ua(t,Sa);if(r.status===Ba&&0!==t.avail_in)return Ua(t,Sa);if(r.status===ja&&0===r.wrap&&(r.status=Na),r.status===ja){let e=Fa+(r.w_bits-8<<4)<<8,n=-1;if(n=r.strategy>=La||r.level<2?0:r.level<6?1:6===r.level?2:3,e|=n<<6,0!==r.strstart&&(e|=32),e+=31-e%31,$a(r,e),0!==r.strstart&&($a(r,t.adler>>>16),$a(r,65535&t.adler)),t.adler=1,r.status=Na,qa(t),0!==r.pending)return r.last_flush=-1,ka}if(57===r.status)if(t.adler=0,Za(r,31),Za(r,139),Za(r,8),r.gzhead)Za(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Za(r,255&r.gzhead.time),Za(r,r.gzhead.time>>8&255),Za(r,r.gzhead.time>>16&255),Za(r,r.gzhead.time>>24&255),Za(r,9===r.level?2:r.strategy>=La||r.level<2?4:0),Za(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Za(r,255&r.gzhead.extra.length),Za(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=da(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(Za(r,0),Za(r,0),Za(r,0),Za(r,0),Za(r,0),Za(r,9===r.level?2:r.strategy>=La||r.level<2?4:0),Za(r,3),r.status=Na,qa(t),0!==r.pending)return r.last_flush=-1,ka;if(69===r.status){if(r.gzhead.extra){let e=r.pending,n=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+n>r.pending_buf_size;){let i=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+i),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>e&&(t.adler=da(t.adler,r.pending_buf,r.pending-e,e)),r.gzindex+=i,qa(t),0!==r.pending)return r.last_flush=-1,ka;e=0,n-=i}let i=new Uint8Array(r.gzhead.extra);r.pending_buf.set(i.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending+=n,r.gzhead.hcrc&&r.pending>e&&(t.adler=da(t.adler,r.pending_buf,r.pending-e,e)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let e,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(t.adler=da(t.adler,r.pending_buf,r.pending-n,n)),qa(t),0!==r.pending)return r.last_flush=-1,ka;n=0}e=r.gzindexn&&(t.adler=da(t.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let e,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(t.adler=da(t.adler,r.pending_buf,r.pending-n,n)),qa(t),0!==r.pending)return r.last_flush=-1,ka;n=0}e=r.gzindexn&&(t.adler=da(t.adler,r.pending_buf,r.pending-n,n))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(qa(t),0!==r.pending))return r.last_flush=-1,ka;Za(r,255&t.adler),Za(r,t.adler>>8&255),t.adler=0}if(r.status=Na,qa(t),0!==r.pending)return r.last_flush=-1,ka}if(0!==t.avail_in||0!==r.lookahead||e!==ba&&r.status!==Ba){let n=0===r.level?Qa(r,e):r.strategy===La?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(Ka(t),0===t.lookahead)){if(e===ba)return 1;break}if(t.match_length=0,r=ga(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(Ya(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===wa?(Ya(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Ya(t,!1),0===t.strm.avail_out)?1:2})(r,e):r.strategy===za?((t,e)=>{let r,n,i,o;const a=t.window;for(;;){if(t.lookahead<=Ra){if(Ka(t),t.lookahead<=Ra&&e===ba)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=t.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=t.strstart+Ra;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=ga(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=ga(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(Ya(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===wa?(Ya(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Ya(t,!1),0===t.strm.avail_out)?1:2})(r,e):ns[r.level].func(r,e);if(3!==n&&4!==n||(r.status=Ba),1===n||3===n)return 0===t.avail_out&&(r.last_flush=-1),ka;if(2===n&&(e===ya?va(r):e!==_a&&(fa(r,0,0,!1),e===xa&&(Va(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),qa(t),0===t.avail_out))return r.last_flush=-1,ka}return e!==wa?ka:r.wrap<=0?Aa:(2===r.wrap?(Za(r,255&t.adler),Za(r,t.adler>>8&255),Za(r,t.adler>>16&255),Za(r,t.adler>>24&255),Za(r,255&t.total_in),Za(r,t.total_in>>8&255),Za(r,t.total_in>>16&255),Za(r,t.total_in>>24&255)):($a(r,t.adler>>>16),$a(r,65535&t.adler)),qa(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?ka:Aa)},hs=t=>{if(os(t))return Ta;const e=t.state.status;return t.state=null,e===Na?Ua(t,Ma):ka},ps=(t,e)=>{let r=e.length;if(os(t))return Ta;const n=t.state,i=n.wrap;if(2===i||1===i&&n.status!==ja||n.lookahead)return Ta;if(1===i&&(t.adler=la(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===i&&(Va(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const o=t.avail_in,a=t.next_in,s=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,Ka(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=Wa(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,Ka(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=a,t.input=s,t.avail_in=o,n.wrap=i,ka};const fs=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var ms=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const e in r)fs(r,e)&&(t[e]=r[e])}}return t},gs=t=>{let e=0;for(let r=0,n=t.length;r=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;bs[254]=bs[254]=1;var ys=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,i,o,a=t.length,s=0;for(i=0;i>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e},xs=(t,e)=>{const r=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let n,i;const o=new Array(2*r);for(i=0,n=0;n4)o[i++]=65533,n+=a-1;else{for(e&=2===a?31:3===a?15:7;a>1&&n1?o[i++]=65533:e<65536?o[i++]=e:(e-=65536,o[i++]=55296|e>>10&1023,o[i++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&vs)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let n=0;n{(e=e||t.length)>t.length&&(e=t.length);let r=e-1;for(;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+bs[t[r]]>e?r:e},_s=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const ks=Object.prototype.toString,{Z_NO_FLUSH:As,Z_SYNC_FLUSH:Ts,Z_FULL_FLUSH:Ms,Z_FINISH:Ss,Z_OK:Cs,Z_STREAM_END:Es,Z_DEFAULT_COMPRESSION:Ls,Z_DEFAULT_STRATEGY:zs,Z_DEFLATED:Os}=ha;function Ds(t){this.options=ms({level:Ls,method:Os,chunkSize:16384,windowBits:15,memLevel:8,strategy:zs},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new _s,this.strm.avail_out=0;let r=cs(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==Cs)throw new Error(ua[r]);if(e.header&&ds(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?ys(e.dictionary):"[object ArrayBuffer]"===ks.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=ps(this.strm,t),r!==Cs)throw new Error(ua[r]);this._dict_set=!0}}function Is(t,e){const r=new Ds(e);if(r.push(t,!0),r.err)throw r.msg||ua[r.err];return r.result}Ds.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize;let i,o;if(this.ended)return!1;for(o=e===~~e?e:!0===e?Ss:As,"string"==typeof t?r.input=ys(t):"[object ArrayBuffer]"===ks.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(o===Ts||o===Ms)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(i=us(r,o),i===Es)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),i=hs(this.strm),this.onEnd(i),this.ended=!0,i===Cs;if(0!==r.avail_out){if(o>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Ds.prototype.onData=function(t){this.chunks.push(t)},Ds.prototype.onEnd=function(t){t===Cs&&(this.result=gs(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Fs={Deflate:Ds,deflate:Is,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Is(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Is(t,e)},constants:ha};const Rs=16209;var Ps=function(t,e){let r,n,i,o,a,s,l,c,d,u,h,p,f,m,g,v,b,y,x,w,_,k,A,T;const M=t.state;r=t.next_in,A=t.input,n=r+(t.avail_in-5),i=t.next_out,T=t.output,o=i-(e-t.avail_out),a=i+(t.avail_out-257),s=M.dmax,l=M.wsize,c=M.whave,d=M.wnext,u=M.window,h=M.hold,p=M.bits,f=M.lencode,m=M.distcode,g=(1<>>24,h>>>=y,p-=y,y=b>>>16&255,0===y)T[i++]=65535&b;else{if(!(16&y)){if(64&y){if(32&y){M.mode=16191;break t}t.msg="invalid literal/length code",M.mode=Rs;break t}b=f[(65535&b)+(h&(1<>>=y,p-=y),p<15&&(h+=A[r++]<>>24,h>>>=y,p-=y,y=b>>>16&255,16&y){if(w=65535&b,y&=15,ps){t.msg="invalid distance too far back",M.mode=Rs;break t}if(h>>>=y,p-=y,y=i-o,w>y){if(y=w-y,y>c&&M.sane){t.msg="invalid distance too far back",M.mode=Rs;break t}if(_=0,k=u,0===d){if(_+=l-y,y2;)T[i++]=k[_++],T[i++]=k[_++],T[i++]=k[_++],x-=3;x&&(T[i++]=k[_++],x>1&&(T[i++]=k[_++]))}else{_=i-w;do{T[i++]=T[_++],T[i++]=T[_++],T[i++]=T[_++],x-=3}while(x>2);x&&(T[i++]=T[_++],x>1&&(T[i++]=T[_++]))}break}if(64&y){t.msg="invalid distance code",M.mode=Rs;break t}b=m[(65535&b)+(h&(1<>3,r-=x,p-=x<<3,h&=(1<{const l=s.bits;let c,d,u,h,p,f,m=0,g=0,v=0,b=0,y=0,x=0,w=0,_=0,k=0,A=0,T=null;const M=new Uint16Array(16),S=new Uint16Array(16);let C,E,L,z=null;for(m=0;m<=15;m++)M[m]=0;for(g=0;g=1&&0===M[b];b--);if(y>b&&(y=b),0===b)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(v=1;v0&&(0===t||1!==b))return-1;for(S[1]=0,m=1;m<15;m++)S[m+1]=S[m]+M[m];for(g=0;g852||2===t&&k>592)return 1;for(;;){C=m-w,a[g]+1=f?(E=z[a[g]-f],L=T[a[g]-f]):(E=96,L=0),c=1<>w)+d]=C<<24|E<<16|L}while(0!==d);for(c=1<>=1;if(0!==c?(A&=c-1,A+=c):A=0,g++,0==--M[m]){if(m===b)break;m=e[r+a[g]]}if(m>y&&(A&h)!==u){for(0===w&&(w=y),p+=v,x=m-w,_=1<852||2===t&&k>592)return 1;u=A&h,i[u]=y<<24|x<<16|p-o}}return 0!==A&&(i[p+A]=m-w<<24|64<<16),s.bits=y,0};const{Z_FINISH:Vs,Z_BLOCK:Hs,Z_TREES:Ws,Z_OK:qs,Z_STREAM_END:Ys,Z_NEED_DICT:Zs,Z_STREAM_ERROR:$s,Z_DATA_ERROR:Xs,Z_MEM_ERROR:Js,Z_BUF_ERROR:Ks,Z_DEFLATED:Qs}=ha,tl=16180,el=16190,rl=16191,nl=16192,il=16194,ol=16199,al=16200,sl=16206,ll=16209,cl=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function dl(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const ul=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode16211?1:0},hl=t=>{if(ul(t))return $s;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=tl,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,qs},pl=t=>{if(ul(t))return $s;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,hl(t)},fl=(t,e)=>{let r;if(ul(t))return $s;const n=t.state;return e<0?(r=0,e=-e):(r=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?$s:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,pl(t))},ml=(t,e)=>{if(!t)return $s;const r=new dl;t.state=r,r.strm=t,r.window=null,r.mode=tl;const n=fl(t,e);return n!==qs&&(t.state=null),n};let gl,vl,bl=!0;const yl=t=>{if(bl){gl=new Int32Array(512),vl=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(Gs(1,t.lens,0,288,gl,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Gs(2,t.lens,0,32,vl,0,t.work,{bits:5}),bl=!1}t.lencode=gl,t.lenbits=9,t.distcode=vl,t.distbits=5},xl=(t,e,r,n)=>{let i;const o=t.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(e.subarray(r-o.wsize,r),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),o.window.set(e.subarray(r-n,r-n+i),o.wnext),(n-=i)?(o.window.set(e.subarray(r-n,r),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave{let r,n,i,o,a,s,l,c,d,u,h,p,f,m,g,v,b,y,x,w,_,k,A=0;const T=new Uint8Array(4);let M,S;const C=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ul(t)||!t.output||!t.input&&0!==t.avail_in)return $s;r=t.state,r.mode===rl&&(r.mode=nl),a=t.next_out,i=t.output,l=t.avail_out,o=t.next_in,n=t.input,s=t.avail_in,c=r.hold,d=r.bits,u=s,h=l,k=qs;t:for(;;)switch(r.mode){case tl:if(0===r.wrap){r.mode=nl;break}for(;d<16;){if(0===s)break t;s--,c+=n[o++]<>>8&255,r.check=da(r.check,T,2,0),c=0,d=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=ll;break}if((15&c)!==Qs){t.msg="unknown compression method",r.mode=ll;break}if(c>>>=4,d-=4,_=8+(15&c),0===r.wbits&&(r.wbits=_),_>15||_>r.wbits){t.msg="invalid window size",r.mode=ll;break}r.dmax=1<>8&1),512&r.flags&&4&r.wrap&&(T[0]=255&c,T[1]=c>>>8&255,r.check=da(r.check,T,2,0)),c=0,d=0,r.mode=16182;case 16182:for(;d<32;){if(0===s)break t;s--,c+=n[o++]<>>8&255,T[2]=c>>>16&255,T[3]=c>>>24&255,r.check=da(r.check,T,4,0)),c=0,d=0,r.mode=16183;case 16183:for(;d<16;){if(0===s)break t;s--,c+=n[o++]<>8),512&r.flags&&4&r.wrap&&(T[0]=255&c,T[1]=c>>>8&255,r.check=da(r.check,T,2,0)),c=0,d=0,r.mode=16184;case 16184:if(1024&r.flags){for(;d<16;){if(0===s)break t;s--,c+=n[o++]<>>8&255,r.check=da(r.check,T,2,0)),c=0,d=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(p=r.length,p>s&&(p=s),p&&(r.head&&(_=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(o,o+p),_)),512&r.flags&&4&r.wrap&&(r.check=da(r.check,n,p,o)),s-=p,o+=p,r.length-=p),r.length))break t;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===s)break t;p=0;do{_=n[o+p++],r.head&&_&&r.length<65536&&(r.head.name+=String.fromCharCode(_))}while(_&&p>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=rl;break;case 16189:for(;d<32;){if(0===s)break t;s--,c+=n[o++]<>>=7&d,d-=7&d,r.mode=sl;break}for(;d<3;){if(0===s)break t;s--,c+=n[o++]<>>=1,d-=1,3&c){case 0:r.mode=16193;break;case 1:if(yl(r),r.mode=ol,e===Ws){c>>>=2,d-=2;break t}break;case 2:r.mode=16196;break;case 3:t.msg="invalid block type",r.mode=ll}c>>>=2,d-=2;break;case 16193:for(c>>>=7&d,d-=7&d;d<32;){if(0===s)break t;s--,c+=n[o++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=ll;break}if(r.length=65535&c,c=0,d=0,r.mode=il,e===Ws)break t;case il:r.mode=16195;case 16195:if(p=r.length,p){if(p>s&&(p=s),p>l&&(p=l),0===p)break t;i.set(n.subarray(o,o+p),a),s-=p,o+=p,l-=p,a+=p,r.length-=p;break}r.mode=rl;break;case 16196:for(;d<14;){if(0===s)break t;s--,c+=n[o++]<>>=5,d-=5,r.ndist=1+(31&c),c>>>=5,d-=5,r.ncode=4+(15&c),c>>>=4,d-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=ll;break}r.have=0,r.mode=16197;case 16197:for(;r.have>>=3,d-=3}for(;r.have<19;)r.lens[C[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},k=Gs(0,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,k){t.msg="invalid code lengths set",r.mode=ll;break}r.have=0,r.mode=16198;case 16198:for(;r.have>>24,v=A>>>16&255,b=65535&A,!(g<=d);){if(0===s)break t;s--,c+=n[o++]<>>=g,d-=g,r.lens[r.have++]=b;else{if(16===b){for(S=g+2;d>>=g,d-=g,0===r.have){t.msg="invalid bit length repeat",r.mode=ll;break}_=r.lens[r.have-1],p=3+(3&c),c>>>=2,d-=2}else if(17===b){for(S=g+3;d>>=g,d-=g,_=0,p=3+(7&c),c>>>=3,d-=3}else{for(S=g+7;d>>=g,d-=g,_=0,p=11+(127&c),c>>>=7,d-=7}if(r.have+p>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=ll;break}for(;p--;)r.lens[r.have++]=_}}if(r.mode===ll)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=ll;break}if(r.lenbits=9,M={bits:r.lenbits},k=Gs(1,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,k){t.msg="invalid literal/lengths set",r.mode=ll;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},k=Gs(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,k){t.msg="invalid distances set",r.mode=ll;break}if(r.mode=ol,e===Ws)break t;case ol:r.mode=al;case al:if(s>=6&&l>=258){t.next_out=a,t.avail_out=l,t.next_in=o,t.avail_in=s,r.hold=c,r.bits=d,Ps(t,h),a=t.next_out,i=t.output,l=t.avail_out,o=t.next_in,n=t.input,s=t.avail_in,c=r.hold,d=r.bits,r.mode===rl&&(r.back=-1);break}for(r.back=0;A=r.lencode[c&(1<>>24,v=A>>>16&255,b=65535&A,!(g<=d);){if(0===s)break t;s--,c+=n[o++]<>y)],g=A>>>24,v=A>>>16&255,b=65535&A,!(y+g<=d);){if(0===s)break t;s--,c+=n[o++]<>>=y,d-=y,r.back+=y}if(c>>>=g,d-=g,r.back+=g,r.length=b,0===v){r.mode=16205;break}if(32&v){r.back=-1,r.mode=rl;break}if(64&v){t.msg="invalid literal/length code",r.mode=ll;break}r.extra=15&v,r.mode=16201;case 16201:if(r.extra){for(S=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;A=r.distcode[c&(1<>>24,v=A>>>16&255,b=65535&A,!(g<=d);){if(0===s)break t;s--,c+=n[o++]<>y)],g=A>>>24,v=A>>>16&255,b=65535&A,!(y+g<=d);){if(0===s)break t;s--,c+=n[o++]<>>=y,d-=y,r.back+=y}if(c>>>=g,d-=g,r.back+=g,64&v){t.msg="invalid distance code",r.mode=ll;break}r.offset=b,r.extra=15&v,r.mode=16203;case 16203:if(r.extra){for(S=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=ll;break}r.mode=16204;case 16204:if(0===l)break t;if(p=h-l,r.offset>p){if(p=r.offset-p,p>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=ll;break}p>r.wnext?(p-=r.wnext,f=r.wsize-p):f=r.wnext-p,p>r.length&&(p=r.length),m=r.window}else m=i,f=a-r.offset,p=r.length;p>l&&(p=l),l-=p,r.length-=p;do{i[a++]=m[f++]}while(--p);0===r.length&&(r.mode=al);break;case 16205:if(0===l)break t;i[a++]=r.length,l--,r.mode=al;break;case sl:if(r.wrap){for(;d<32;){if(0===s)break t;s--,c|=n[o++]<{if(ul(t))return $s;let e=t.state;return e.window&&(e.window=null),t.state=null,qs},Tl=(t,e)=>{if(ul(t))return $s;const r=t.state;return 2&r.wrap?(r.head=e,e.done=!1,qs):$s},Ml=(t,e)=>{const r=e.length;let n,i,o;return ul(t)?$s:(n=t.state,0!==n.wrap&&n.mode!==el?$s:n.mode===el&&(i=1,i=la(i,e,r,0),i!==n.check)?Xs:(o=xl(t,e,r,r),o?(n.mode=16210,Js):(n.havedict=1,qs)))},Sl=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Cl=Object.prototype.toString,{Z_NO_FLUSH:El,Z_FINISH:Ll,Z_OK:zl,Z_STREAM_END:Ol,Z_NEED_DICT:Dl,Z_STREAM_ERROR:Il,Z_DATA_ERROR:Fl,Z_MEM_ERROR:Rl}=ha;function Pl(t){this.options=ms({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new _s,this.strm.avail_out=0;let r=_l(this.strm,e.windowBits);if(r!==zl)throw new Error(ua[r]);if(this.header=new Sl,Tl(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=ys(e.dictionary):"[object ArrayBuffer]"===Cl.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=Ml(this.strm,e.dictionary),r!==zl)))throw new Error(ua[r])}function jl(t,e){const r=new Pl(e);if(r.push(t),r.err)throw r.msg||ua[r.err];return r.result}Pl.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize,i=this.options.dictionary;let o,a,s;if(this.ended)return!1;for(a=e===~~e?e:!0===e?Ll:El,"[object ArrayBuffer]"===Cl.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),o=kl(r,a),o===Dl&&i&&(o=Ml(r,i),o===zl?o=kl(r,a):o===Fl&&(o=Dl));r.avail_in>0&&o===Ol&&r.state.wrap>0&&0!==t[r.next_in];)wl(r),o=kl(r,a);switch(o){case Il:case Fl:case Dl:case Rl:return this.onEnd(o),this.ended=!0,!1}if(s=r.avail_out,r.next_out&&(0===r.avail_out||o===Ol))if("string"===this.options.to){let t=ws(r.output,r.next_out),e=r.next_out-t,i=xs(r.output,t);r.next_out=e,r.avail_out=n-e,e&&r.output.set(r.output.subarray(t,t+e),0),this.onData(i)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(o!==zl||0!==s){if(o===Ol)return o=Al(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},Pl.prototype.onData=function(t){this.chunks.push(t)},Pl.prototype.onEnd=function(t){t===zl&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=gs(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Nl={Inflate:Pl,inflate:jl,inflateRaw:function(t,e){return(e=e||{}).raw=!0,jl(t,e)},ungzip:jl,constants:ha};const{Deflate:Bl,deflate:Ul,deflateRaw:Gl,gzip:Vl}=Fs,{Inflate:Hl,inflate:Wl,inflateRaw:ql,ungzip:Yl}=Nl;var Zl=Wl,$l=__webpack_require__(745),Xl={};Xl.styleTagTransform=Ao(),Xl.setAttributes=xo(),Xl.insert=bo().bind(null,"head"),Xl.domAPI=go(),Xl.insertStyleElement=_o(),fo()($l.A,Xl),$l.A&&$l.A.locals&&$l.A.locals;var Jl=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function s(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}l((n=n.apply(t,e||[])).next())}))};class Kl{constructor(t){(0,So.VT)("chemiscope-version").innerText=`version ${(0,Co.version)()}`,(0,So.eK)((t=>function(t){const e=(0,So.VT)("warning-display");e.getElementsByTagName("p")[0].innerText=t,e.style.display="block",setTimeout((()=>{e.style.display="none"}),4e3)}(t))),window.addEventListener("resize",nc),(0,So.VT)(t).innerHTML='
\n
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n \x3c!-- height: 0 below is a hack to force safari to\n respect height: 100% on the children\n https://github.com/philipwalton/flexbugs/issues/197#issuecomment-378908438\n --\x3e\n
\n
\n
\n
\n
\n
\n
',this._setupLoadSaveMenu(),this.hideOnDemandStructures=document.createElement("style"),document.head.appendChild(this.hideOnDemandStructures),this.hideOnDemandStructures.sheet.insertRule(".hide-on-demand-structures {display: none}"),this.hideOnDemandStructures.sheet.disabled=!1}loadExample(t){return Jl(this,void 0,void 0,(function*(){let e={loadStructure:void 0};"Azaphenacenes"==t&&(e.loadStructure=(t,e)=>JSON.parse($.ajax({type:"GET",url:`examples/${e.data}`,async:!1}).responseText)),yield this.fetchAndLoad(`/examples/${t}.json.gz`,e)}))}fetchAndLoad(t){return Jl(this,arguments,void 0,(function*(t,e={}){Ql(),this.dataset=t;const r=yield fetch(this.dataset);if(!r.ok)throw Error(`unable to load file at '${this.dataset}'`);const n=yield r.arrayBuffer();if(0===n.byteLength&&this.dataset.startsWith("https://api.allorigins.win/raw?url=")){let t=decodeURIComponent(this.dataset.substr(35));throw Error(`unable to load file at '${t}'`)}const i=ec(n);yield this.load(e,i)}))}load(t,e){return Jl(this,void 0,void 0,(function*(){(0,So.VT)("error-display").style.display="none";const r={map:"chemiscope-map",info:"chemiscope-info",meta:"chemiscope-meta",structure:"chemiscope-structure",loadStructure:t.loadStructure};this.hideOnDemandStructures.sheet.disabled=void 0!==t.loadStructure,void 0!==this.visualizer&&this.visualizer.remove(),this.visualizer=yield Co.DefaultVisualizer.load(r,e),this.visualizer.structure.positionSettingsModal=t=>{const e=(0,So.VT)("chemiscope-structure").getBoundingClientRect();let r=e.left-t.width+25;return r<25&&(r=25),{top:e.top,left:r}},this.visualizer.map.positionSettingsModal=t=>{const e=(0,So.VT)("chemiscope-map").getBoundingClientRect();let r;return r=window.innerWidth<1400?window.innerWidth-t.width-10:e.left+e.width+25,{top:e.top,left:r}},nc(),tc()}))}_setupLoadSaveMenu(){const t=(0,So.VT)("load-dataset"),e=(0,So.VT)("load-save"),r=(0,So.VT)("close-load-save-modal");t.onchange=()=>{e.classList.remove("fade"),r.click(),Ql();const n=t.files[0];this.dataset=n.name,rc(n,(r=>{const n=ec(r);this.load({},n),t.value="",e.classList.add("fade")}))};const n=(0,So.VT)("save-dataset"),i=(0,So.VT)("save-dataset-name"),o=(0,So.VT)("save-dataset-settings"),a=(0,So.VT)("save-dataset-structures");n.onclick=()=>{if(void 0===this.visualizer)return;const t=this.visualizer.dataset(a.checked);var e;o.checked&&(t.settings=this.visualizer.saveSettings()),ic(i.value,(e=t,JSON.stringify(e,((t,e)=>"number"==typeof e&&isNaN(e)?"***NaN***":e)).replace(/"\*\*\*NaN\*\*\*"/g,"NaN"))),r.click()};const s=(0,So.VT)("load-settings");s.onchange=()=>{e.classList.remove("fade"),r.click(),Ql(),rc(s.files[0],(t=>{void 0!==this.visualizer&&(this.visualizer.applySettings(ec(t)),s.value="",tc(),e.classList.add("fade"))}))};const l=(0,So.VT)("save-settings"),c=(0,So.VT)("save-settings-name"),d=(0,So.VT)("save-settings-map"),u=(0,So.VT)("save-settings-structure"),h=(0,So.VT)("save-settings-selected");l.onclick=()=>{if(void 0===this.visualizer)return;const t=this.visualizer.saveSettings();d.checked||delete t.map,u.checked||delete t.structure,h.checked||delete t.pinned,ic(c.value,JSON.stringify(t)),r.click()}}}function Ql(){(0,So.VT)("loading").style.display="block";const t=document.getElementsByTagName("main")[0];t.onclick=()=>{},t.style.opacity="0.3"}function tc(){(0,So.VT)("loading").style.display="none";const t=document.getElementsByTagName("main")[0];t.onclick=null,t.style.opacity="1"}function ec(t){const e=new Uint8Array(t.slice(0,2));let r;return r=31==e[0]&&139==e[1]?Zl(new Uint8Array(t),{to:"string"}):new TextDecoder("utf-8").decode(t),function(t){return JSON.parse(t.replace(/\bNaN\b/g,'"***NaN***"'),((t,e)=>"***NaN***"===e?NaN:e))}(r)}function rc(t,e){const r=new FileReader;r.onload=()=>{if(r.error)throw Error(`could not read ${t.name}: ${r.error}`);r.result&&e(r.result)},r.readAsArrayBuffer(t)}function nc(){const t=(0,So.VT)("chemiscope-structure").getBoundingClientRect().height,e=document.getElementsByClassName("chsp-info-table");for(let r=0;r{document.body.removeChild(r),URL.revokeObjectURL(r.href)}),2e3)}})(),__webpack_exports__})())); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Chemiscope=e():t.Chemiscope=e()}(self,(()=>(()=>{var __webpack_modules__={745:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(78706),i=r.n(n),o=r(72859),a=r.n(o)()(i());a.push([t.id,":root {\n --header-height: 48px;\n --footer-height: 30px;\n}\n\nhtml {\n position: relative;\n min-height: 100%;\n}\n\nbody {\n margin-bottom: 30px;\n}\n\n.footer {\n position: absolute;\n bottom: 0;\n width: 100%;\n height: var(--footer-height);\n padding-top: 7px;\n background-color: #2c3e50;\n color: white;\n font-size: 0.8rem;\n}\n\n.footer .container {\n max-width: 1140px;\n}\n\n.footer a {\n color: inherit;\n text-decoration: underline;\n}\n\nheader {\n background-color: #2c3e50;\n width: 100%;\n height: var(--header-height);\n}\n\n.navbar {\n max-width: 1100px;\n margin-bottom: 1em;\n z-index: 999;\n background-color: inherit;\n}\n\n.references a {\n color: grey;\n}\n\n#loading {\n font-size: 6em;\n margin: auto;\n text-align: center;\n color: grey;\n position: absolute;\n z-index: 100000;\n left: 50%;\n}\n\nmain.container-fluid {\n margin: 1.5em 0em calc(1.5em + var(--header-height)) 0em;\n width: 100%;\n}\n\n@media screen and (min-width: 900px) {\n main.container-fluid {\n margin: 2em 2em calc(2em + var(--header-height)) 2em;\n width: calc(100% - 4em);\n }\n}\n\n@media screen and (min-width: 1200px) {\n main.container-fluid {\n margin: 2em auto calc(2em + var(--header-height)) auto;\n width: 1200px;\n }\n}\n\nmain .ratio {\n margin: auto;\n width: 90%; \n}\n\nmain .ratio > * {\n display: flex;\n flex-flow: column;\n}\n\n.ratio-5x7 {\n overflow-y: hidden;\n overflow-x: hidden;\n}\n\n.ratio-5x7::before {\n padding-top: 140%;\n}\n\n@media screen and (min-width: 768px) {\n .ratio-5x7 {\n max-height: calc(100vh - 2em - var(--header-height) - var(--footer-height)); \n }\n\n main .ratio {\n /* set the width to fit the vertical space, and the height will be set automatically */\n max-width: calc(100vh - 2em - var(--header-height) - var(--footer-height));\n width: 100%;\n }\n}\n\n.clickable {\n cursor: pointer;\n}\n\n.pop-on-top {\n z-index: 100;\n position: absolute;\n width: 80%;\n left: 50%;\n margin-left: -40%;\n}\n\n#chemiscope-meta {\n width: max-content;\n height: max-content;\n position: absolute;\n top: 0;\n left: 2em;\n font-size: 16pt;\n}\n\n#chemiscope-map {\n display: block;\n}\n\n#chemiscope-structure {\n flex: 1 1 auto;\n}\n\n#chemiscope-info {\n flex: 0 1 auto;\n width: 100%;\n}\n\n#upload {\n width: 280px;\n}\n\n#open-save-menu {\n background-color: #e2e6ea;\n border-color: #ced4da;\n}\n\n#open-save-menu:hover {\n background-color: #f8f9fa;\n}\n\n.grid-1-1 {\n display: grid;\n align-items: center;\n justify-content: center;\n align-content: start;\n grid-gap: 1em;\n grid-template-columns: 1fr 1fr;\n}\n\n.grid-1-1-1 {\n display: grid;\n align-items: center;\n justify-content: center;\n align-content: start;\n grid-gap: 1em;\n grid-template-columns: 1fr 1fr 1fr;\n}\n\n.width-10em {\n width: 10em;\n}\n\n.btn-outline-secondary-less-hover:hover {\n color: inherit;\n background-color: #f2f2f2;\n}\n\n.hidden-input-file {\n position: absolute;\n left: 0;\n opacity: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n}\n",""]);const s=a},11261:(t,e,r)=>{"use strict";r.d(e,{A:()=>G});var n=r(78706),i=r.n(n),o=r(72859),a=r.n(o),s=r(21906),l=r.n(s),c=new URL(r(35531),r.b),d=new URL(r(45419),r.b),u=new URL(r(83385),r.b),h=new URL(r(14274),r.b),f=new URL(r(57154),r.b),p=new URL(r(35782),r.b),m=new URL(r(54718),r.b),g=new URL(r(48487),r.b),v=new URL(r(35372),r.b),b=new URL(r(17914),r.b),y=new URL(r(36366),r.b),x=new URL(r(67830),r.b),w=new URL(r(88832),r.b),_=new URL(r(57249),r.b),k=new URL(r(75932),r.b),A=new URL(r(11144),r.b),T=a()(i()),M=l()(c),S=l()(d),C=l()(u),E=l()(h),L=l()(f),z=l()(p),O=l()(m),D=l()(g),I=l()(v),R=l()(b),F=l()(y),P=l()(x),j=l()(w),N=l()(_),B=l()(k),U=l()(A);T.push([t.id,`@charset "UTF-8";/*!\n * Bootstrap v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors\n * Copyright 2011-2022 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-body-color-rgb:33,37,41;--bs-body-bg-rgb:255,255,255;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, 0.175);--bs-border-radius:0.375rem;--bs-border-radius-sm:0.25rem;--bs-border-radius-lg:0.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-2xl:2rem;--bs-border-radius-pill:50rem;--bs-link-color:#0d6efd;--bs-link-hover-color:#0a58ca;--bs-code-color:#d63384;--bs-highlight-bg:#fff3cd}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;border:0;border-top:1px solid;opacity:.25}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.small,small{font-size:.875em}.mark,mark{padding:.1875em;background-color:var(--bs-highlight-bg)}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:var(--bs-link-color);text-decoration:underline}a:hover{color:var(--bs-link-hover-color)}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:var(--bs-code-color);word-wrap:break-word}a>code{color:inherit}kbd{padding:.1875rem .375rem;font-size:.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:.25rem}kbd kbd{padding:0;font-size:1em}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none!important}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}::file-selector-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:calc(1.625rem + 4.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-1{font-size:5rem}}.display-2{font-size:calc(1.575rem + 3.9vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-2{font-size:4.5rem}}.display-3{font-size:calc(1.525rem + 3.3vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-3{font-size:4rem}}.display-4{font-size:calc(1.475rem + 2.7vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-4{font-size:3.5rem}}.display-5{font-size:calc(1.425rem + 2.1vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-5{font-size:3rem}}.display-6{font-size:calc(1.375rem + 1.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-6{font-size:2.5rem}}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:.875em;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote>:last-child{margin-bottom:0}.blockquote-footer{margin-top:-1rem;margin-bottom:1rem;font-size:.875em;color:#6c757d}.blockquote-footer::before{content:"— "}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid var(--bs-border-color);border-radius:.375rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:.875em;color:#6c757d}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{--bs-gutter-x:1.5rem;--bs-gutter-y:0;width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(-1 * var(--bs-gutter-y));margin-right:calc(-.5 * var(--bs-gutter-x));margin-left:calc(-.5 * var(--bs-gutter-x))}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.33333333%}.col-2{flex:0 0 auto;width:16.66666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.33333333%}.col-5{flex:0 0 auto;width:41.66666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.33333333%}.col-8{flex:0 0 auto;width:66.66666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.33333333%}.col-11{flex:0 0 auto;width:91.66666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.33333333%}.col-sm-2{flex:0 0 auto;width:16.66666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.33333333%}.col-sm-5{flex:0 0 auto;width:41.66666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.33333333%}.col-sm-8{flex:0 0 auto;width:66.66666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.33333333%}.col-sm-11{flex:0 0 auto;width:91.66666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.33333333%}.col-md-2{flex:0 0 auto;width:16.66666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.33333333%}.col-md-5{flex:0 0 auto;width:41.66666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.33333333%}.col-md-8{flex:0 0 auto;width:66.66666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.33333333%}.col-md-11{flex:0 0 auto;width:91.66666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.33333333%}.col-lg-2{flex:0 0 auto;width:16.66666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.33333333%}.col-lg-5{flex:0 0 auto;width:41.66666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.33333333%}.col-lg-8{flex:0 0 auto;width:66.66666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.33333333%}.col-lg-11{flex:0 0 auto;width:91.66666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.33333333%}.col-xl-2{flex:0 0 auto;width:16.66666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.33333333%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.33333333%}.col-xl-8{flex:0 0 auto;width:66.66666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.33333333%}.col-xl-11{flex:0 0 auto;width:91.66666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0%}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.33333333%}.col-xxl-2{flex:0 0 auto;width:16.66666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.33333333%}.col-xxl-5{flex:0 0 auto;width:41.66666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.33333333%}.col-xxl-8{flex:0 0 auto;width:66.66666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.33333333%}.col-xxl-11{flex:0 0 auto;width:91.66666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.33333333%}.offset-xxl-2{margin-left:16.66666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.33333333%}.offset-xxl-5{margin-left:41.66666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.33333333%}.offset-xxl-8{margin-left:66.66666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.33333333%}.offset-xxl-11{margin-left:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.table{--bs-table-color:var(--bs-body-color);--bs-table-bg:transparent;--bs-table-border-color:var(--bs-border-color);--bs-table-accent-bg:transparent;--bs-table-striped-color:var(--bs-body-color);--bs-table-striped-bg:rgba(0, 0, 0, 0.05);--bs-table-active-color:var(--bs-body-color);--bs-table-active-bg:rgba(0, 0, 0, 0.1);--bs-table-hover-color:var(--bs-body-color);--bs-table-hover-bg:rgba(0, 0, 0, 0.075);width:100%;margin-bottom:1rem;color:var(--bs-table-color);vertical-align:top;border-color:var(--bs-table-border-color)}.table>:not(caption)>*>*{padding:.5rem .5rem;background-color:var(--bs-table-bg);border-bottom-width:1px;box-shadow:inset 0 0 0 9999px var(--bs-table-accent-bg)}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table-group-divider{border-top:2px solid currentcolor}.caption-top{caption-side:top}.table-sm>:not(caption)>*>*{padding:.25rem .25rem}.table-bordered>:not(caption)>*{border-width:1px 0}.table-bordered>:not(caption)>*>*{border-width:0 1px}.table-borderless>:not(caption)>*>*{border-bottom-width:0}.table-borderless>:not(:first-child){border-top-width:0}.table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-striped-columns>:not(caption)>tr>:nth-child(2n){--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-active{--bs-table-accent-bg:var(--bs-table-active-bg);color:var(--bs-table-active-color)}.table-hover>tbody>tr:hover>*{--bs-table-accent-bg:var(--bs-table-hover-bg);color:var(--bs-table-hover-color)}.table-primary{--bs-table-color:#000;--bs-table-bg:#cfe2ff;--bs-table-border-color:#bacbe6;--bs-table-striped-bg:#c5d7f2;--bs-table-striped-color:#000;--bs-table-active-bg:#bacbe6;--bs-table-active-color:#000;--bs-table-hover-bg:#bfd1ec;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-secondary{--bs-table-color:#000;--bs-table-bg:#e2e3e5;--bs-table-border-color:#cbccce;--bs-table-striped-bg:#d7d8da;--bs-table-striped-color:#000;--bs-table-active-bg:#cbccce;--bs-table-active-color:#000;--bs-table-hover-bg:#d1d2d4;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-success{--bs-table-color:#000;--bs-table-bg:#d1e7dd;--bs-table-border-color:#bcd0c7;--bs-table-striped-bg:#c7dbd2;--bs-table-striped-color:#000;--bs-table-active-bg:#bcd0c7;--bs-table-active-color:#000;--bs-table-hover-bg:#c1d6cc;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-info{--bs-table-color:#000;--bs-table-bg:#cff4fc;--bs-table-border-color:#badce3;--bs-table-striped-bg:#c5e8ef;--bs-table-striped-color:#000;--bs-table-active-bg:#badce3;--bs-table-active-color:#000;--bs-table-hover-bg:#bfe2e9;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-warning{--bs-table-color:#000;--bs-table-bg:#fff3cd;--bs-table-border-color:#e6dbb9;--bs-table-striped-bg:#f2e7c3;--bs-table-striped-color:#000;--bs-table-active-bg:#e6dbb9;--bs-table-active-color:#000;--bs-table-hover-bg:#ece1be;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-danger{--bs-table-color:#000;--bs-table-bg:#f8d7da;--bs-table-border-color:#dfc2c4;--bs-table-striped-bg:#eccccf;--bs-table-striped-color:#000;--bs-table-active-bg:#dfc2c4;--bs-table-active-color:#000;--bs-table-hover-bg:#e5c7ca;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-light{--bs-table-color:#000;--bs-table-bg:#f8f9fa;--bs-table-border-color:#dfe0e1;--bs-table-striped-bg:#ecedee;--bs-table-striped-color:#000;--bs-table-active-bg:#dfe0e1;--bs-table-active-color:#000;--bs-table-hover-bg:#e5e6e7;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-dark{--bs-table-color:#fff;--bs-table-bg:#212529;--bs-table-border-color:#373b3e;--bs-table-striped-bg:#2c3034;--bs-table-striped-color:#fff;--bs-table-active-bg:#373b3e;--bs-table-active-color:#fff;--bs-table-hover-bg:#323539;--bs-table-hover-color:#fff;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media (max-width:575.98px){.table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:767.98px){.table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:991.98px){.table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1199.98px){.table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1399.98px){.table-responsive-xxl{overflow-x:auto;-webkit-overflow-scrolling:touch}}.form-label{margin-bottom:.5rem}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem}.form-text{margin-top:.25rem;font-size:.875em;color:#6c757d}.form-control{display:block;width:100%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.375rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not([readonly]){cursor:pointer}.form-control:focus{color:#212529;background-color:#fff;border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-control::-webkit-date-and-time-value{height:1.5em}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled{background-color:#e9ecef;opacity:1}.form-control::-webkit-file-upload-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control::file-selector-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}.form-control::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#dde0e3}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:#dde0e3}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext:focus{outline:0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{min-height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;border-radius:.25rem}.form-control-sm::-webkit-file-upload-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-sm::file-selector-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-lg{min-height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;border-radius:.5rem}.form-control-lg::-webkit-file-upload-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.form-control-lg::file-selector-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}textarea.form-control{min-height:calc(1.5em + .75rem + 2px)}textarea.form-control-sm{min-height:calc(1.5em + .5rem + 2px)}textarea.form-control-lg{min-height:calc(1.5em + 1rem + 2px)}.form-control-color{width:3rem;height:calc(1.5em + .75rem + 2px);padding:.375rem}.form-control-color:not(:disabled):not([readonly]){cursor:pointer}.form-control-color::-moz-color-swatch{border:0!important;border-radius:.375rem}.form-control-color::-webkit-color-swatch{border-radius:.375rem}.form-control-color.form-control-sm{height:calc(1.5em + .5rem + 2px)}.form-control-color.form-control-lg{height:calc(1.5em + 1rem + 2px)}.form-select{display:block;width:100%;padding:.375rem 2.25rem .375rem .75rem;-moz-padding-start:calc(0.75rem - 3px);font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-image:url(${M});background-repeat:no-repeat;background-position:right .75rem center;background-size:16px 12px;border:1px solid #ced4da;border-radius:.375rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-select{transition:none}}.form-select:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-select[multiple],.form-select[size]:not([size="1"]){padding-right:.75rem;background-image:none}.form-select:disabled{background-color:#e9ecef}.form-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #212529}.form-select-sm{padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem;border-radius:.25rem}.form-select-lg{padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem;border-radius:.5rem}.form-check{display:block;min-height:1.5rem;padding-left:1.5em;margin-bottom:.125rem}.form-check .form-check-input{float:left;margin-left:-1.5em}.form-check-reverse{padding-right:1.5em;padding-left:0;text-align:right}.form-check-reverse .form-check-input{float:right;margin-right:-1.5em;margin-left:0}.form-check-input{width:1em;height:1em;margin-top:.25em;vertical-align:top;background-color:#fff;background-repeat:no-repeat;background-position:center;background-size:contain;border:1px solid rgba(0,0,0,.25);-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;print-color-adjust:exact}.form-check-input[type=checkbox]{border-radius:.25em}.form-check-input[type=radio]{border-radius:50%}.form-check-input:active{filter:brightness(90%)}.form-check-input:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-check-input:checked{background-color:#0d6efd;border-color:#0d6efd}.form-check-input:checked[type=checkbox]{background-image:url(${S})}.form-check-input:checked[type=radio]{background-image:url(${C})}.form-check-input[type=checkbox]:indeterminate{background-color:#0d6efd;border-color:#0d6efd;background-image:url(${E})}.form-check-input:disabled{pointer-events:none;filter:none;opacity:.5}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:default;opacity:.5}.form-switch{padding-left:2.5em}.form-switch .form-check-input{width:2em;margin-left:-2.5em;background-image:url(${L});background-position:left center;border-radius:2em;transition:background-position .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-switch .form-check-input{transition:none}}.form-switch .form-check-input:focus{background-image:url(${z})}.form-switch .form-check-input:checked{background-position:right center;background-image:url(${O})}.form-switch.form-check-reverse{padding-right:2.5em;padding-left:0}.form-switch.form-check-reverse .form-check-input{margin-right:-2.5em;margin-left:0}.form-check-inline{display:inline-block;margin-right:1rem}.btn-check{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.btn-check:disabled+.btn,.btn-check[disabled]+.btn{pointer-events:none;filter:none;opacity:.65}.form-range{width:100%;height:1.5rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.form-range:focus{outline:0}.form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range::-moz-focus-outer{border:0}.form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#0d6efd;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}.form-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#0d6efd;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-moz-range-thumb{-moz-transition:none;transition:none}}.form-range::-moz-range-thumb:active{background-color:#b6d4fe}.form-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range:disabled{pointer-events:none}.form-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.form-range:disabled::-moz-range-thumb{background-color:#adb5bd}.form-floating{position:relative}.form-floating>.form-control,.form-floating>.form-control-plaintext,.form-floating>.form-select{height:calc(3.5rem + 2px);line-height:1.25}.form-floating>label{position:absolute;top:0;left:0;width:100%;height:100%;padding:1rem .75rem;overflow:hidden;text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:1px solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media (prefers-reduced-motion:reduce){.form-floating>label{transition:none}}.form-floating>.form-control,.form-floating>.form-control-plaintext{padding:1rem .75rem}.form-floating>.form-control-plaintext::-moz-placeholder,.form-floating>.form-control::-moz-placeholder{color:transparent}.form-floating>.form-control-plaintext::placeholder,.form-floating>.form-control::placeholder{color:transparent}.form-floating>.form-control-plaintext:not(:-moz-placeholder-shown),.form-floating>.form-control:not(:-moz-placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control-plaintext:focus,.form-floating>.form-control-plaintext:not(:placeholder-shown),.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control-plaintext:-webkit-autofill,.form-floating>.form-control:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-select{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:not(:-moz-placeholder-shown)~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control-plaintext~label,.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:-webkit-autofill~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control-plaintext~label{border-width:1px 0}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-floating,.input-group>.form-select{position:relative;flex:1 1 auto;width:1%;min-width:0}.input-group>.form-control:focus,.input-group>.form-floating:focus-within,.input-group>.form-select:focus{z-index:5}.input-group .btn{position:relative;z-index:2}.input-group .btn:focus{z-index:5}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.375rem}.input-group-lg>.btn,.input-group-lg>.form-control,.input-group-lg>.form-select,.input-group-lg>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;border-radius:.5rem}.input-group-sm>.btn,.input-group-sm>.form-control,.input-group-sm>.form-select,.input-group-sm>.input-group-text{padding:.25rem .5rem;font-size:.875rem;border-radius:.25rem}.input-group-lg>.form-select,.input-group-sm>.form-select{padding-right:3rem}.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3),.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-control,.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-select,.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.dropdown-toggle:nth-last-child(n+4),.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-control,.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-select,.input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.form-floating:not(:first-child)>.form-control,.input-group>.form-floating:not(:first-child)>.form-select{border-top-left-radius:0;border-bottom-left-radius:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#198754}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(25,135,84,.9);border-radius:.375rem}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#198754;padding-right:calc(1.5em + .75rem);background-image:url(${D});background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-valid,.was-validated .form-select:valid{border-color:#198754}.form-select.is-valid:not([multiple]):not([size]),.form-select.is-valid:not([multiple])[size="1"],.was-validated .form-select:valid:not([multiple]):not([size]),.was-validated .form-select:valid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url(${M}),url(${D});background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-valid:focus,.was-validated .form-select:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-control-color.is-valid,.was-validated .form-control-color:valid{width:calc(3rem + calc(1.5em + .75rem))}.form-check-input.is-valid,.was-validated .form-check-input:valid{border-color:#198754}.form-check-input.is-valid:checked,.was-validated .form-check-input:valid:checked{background-color:#198754}.form-check-input.is-valid:focus,.was-validated .form-check-input:valid:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#198754}.form-check-inline .form-check-input~.valid-feedback{margin-left:.5em}.input-group>.form-control:not(:focus).is-valid,.input-group>.form-floating:not(:focus-within).is-valid,.input-group>.form-select:not(:focus).is-valid,.was-validated .input-group>.form-control:not(:focus):valid,.was-validated .input-group>.form-floating:not(:focus-within):valid,.was-validated .input-group>.form-select:not(:focus):valid{z-index:3}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.375rem}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url(${I});background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-invalid,.was-validated .form-select:invalid{border-color:#dc3545}.form-select.is-invalid:not([multiple]):not([size]),.form-select.is-invalid:not([multiple])[size="1"],.was-validated .form-select:invalid:not([multiple]):not([size]),.was-validated .form-select:invalid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url(${M}),url(${I});background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-invalid:focus,.was-validated .form-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-control-color.is-invalid,.was-validated .form-control-color:invalid{width:calc(3rem + calc(1.5em + .75rem))}.form-check-input.is-invalid,.was-validated .form-check-input:invalid{border-color:#dc3545}.form-check-input.is-invalid:checked,.was-validated .form-check-input:invalid:checked{background-color:#dc3545}.form-check-input.is-invalid:focus,.was-validated .form-check-input:invalid:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-inline .form-check-input~.invalid-feedback{margin-left:.5em}.input-group>.form-control:not(:focus).is-invalid,.input-group>.form-floating:not(:focus-within).is-invalid,.input-group>.form-select:not(:focus).is-invalid,.was-validated .input-group>.form-control:not(:focus):invalid,.was-validated .input-group>.form-floating:not(:focus-within):invalid,.was-validated .input-group>.form-select:not(:focus):invalid{z-index:4}.btn{--bs-btn-padding-x:0.75rem;--bs-btn-padding-y:0.375rem;--bs-btn-font-family: ;--bs-btn-font-size:1rem;--bs-btn-font-weight:400;--bs-btn-line-height:1.5;--bs-btn-color:#212529;--bs-btn-bg:transparent;--bs-btn-border-width:1px;--bs-btn-border-color:transparent;--bs-btn-border-radius:0.375rem;--bs-btn-hover-border-color:transparent;--bs-btn-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.15),0 1px 1px rgba(0, 0, 0, 0.075);--bs-btn-disabled-opacity:0.65;--bs-btn-focus-box-shadow:0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5);display:inline-block;padding:var(--bs-btn-padding-y) var(--bs-btn-padding-x);font-family:var(--bs-btn-font-family);font-size:var(--bs-btn-font-size);font-weight:var(--bs-btn-font-weight);line-height:var(--bs-btn-line-height);color:var(--bs-btn-color);text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;border:var(--bs-btn-border-width) solid var(--bs-btn-border-color);border-radius:var(--bs-btn-border-radius);background-color:var(--bs-btn-bg);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color)}.btn-check+.btn:hover{color:var(--bs-btn-color);background-color:var(--bs-btn-bg);border-color:var(--bs-btn-border-color)}.btn:focus-visible{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:focus-visible+.btn{border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:checked+.btn,.btn.active,.btn.show,.btn:first-child:active,:not(.btn-check)+.btn:active{color:var(--bs-btn-active-color);background-color:var(--bs-btn-active-bg);border-color:var(--bs-btn-active-border-color)}.btn-check:checked+.btn:focus-visible,.btn.active:focus-visible,.btn.show:focus-visible,.btn:first-child:active:focus-visible,:not(.btn-check)+.btn:active:focus-visible{box-shadow:var(--bs-btn-focus-box-shadow)}.btn.disabled,.btn:disabled,fieldset:disabled .btn{color:var(--bs-btn-disabled-color);pointer-events:none;background-color:var(--bs-btn-disabled-bg);border-color:var(--bs-btn-disabled-border-color);opacity:var(--bs-btn-disabled-opacity)}.btn-primary{--bs-btn-color:#fff;--bs-btn-bg:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0b5ed7;--bs-btn-hover-border-color:#0a58ca;--bs-btn-focus-shadow-rgb:49,132,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0a58ca;--bs-btn-active-border-color:#0a53be;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#0d6efd;--bs-btn-disabled-border-color:#0d6efd}.btn-secondary{--bs-btn-color:#fff;--bs-btn-bg:#6c757d;--bs-btn-border-color:#6c757d;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#5c636a;--bs-btn-hover-border-color:#565e64;--bs-btn-focus-shadow-rgb:130,138,145;--bs-btn-active-color:#fff;--bs-btn-active-bg:#565e64;--bs-btn-active-border-color:#51585e;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#6c757d;--bs-btn-disabled-border-color:#6c757d}.btn-success{--bs-btn-color:#fff;--bs-btn-bg:#198754;--bs-btn-border-color:#198754;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#157347;--bs-btn-hover-border-color:#146c43;--bs-btn-focus-shadow-rgb:60,153,110;--bs-btn-active-color:#fff;--bs-btn-active-bg:#146c43;--bs-btn-active-border-color:#13653f;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#198754;--bs-btn-disabled-border-color:#198754}.btn-info{--bs-btn-color:#000;--bs-btn-bg:#0dcaf0;--bs-btn-border-color:#0dcaf0;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#31d2f2;--bs-btn-hover-border-color:#25cff2;--bs-btn-focus-shadow-rgb:11,172,204;--bs-btn-active-color:#000;--bs-btn-active-bg:#3dd5f3;--bs-btn-active-border-color:#25cff2;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#0dcaf0;--bs-btn-disabled-border-color:#0dcaf0}.btn-warning{--bs-btn-color:#000;--bs-btn-bg:#ffc107;--bs-btn-border-color:#ffc107;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#ffca2c;--bs-btn-hover-border-color:#ffc720;--bs-btn-focus-shadow-rgb:217,164,6;--bs-btn-active-color:#000;--bs-btn-active-bg:#ffcd39;--bs-btn-active-border-color:#ffc720;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#ffc107;--bs-btn-disabled-border-color:#ffc107}.btn-danger{--bs-btn-color:#fff;--bs-btn-bg:#dc3545;--bs-btn-border-color:#dc3545;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#bb2d3b;--bs-btn-hover-border-color:#b02a37;--bs-btn-focus-shadow-rgb:225,83,97;--bs-btn-active-color:#fff;--bs-btn-active-bg:#b02a37;--bs-btn-active-border-color:#a52834;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#dc3545;--bs-btn-disabled-border-color:#dc3545}.btn-light{--bs-btn-color:#000;--bs-btn-bg:#f8f9fa;--bs-btn-border-color:#f8f9fa;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#d3d4d5;--bs-btn-hover-border-color:#c6c7c8;--bs-btn-focus-shadow-rgb:211,212,213;--bs-btn-active-color:#000;--bs-btn-active-bg:#c6c7c8;--bs-btn-active-border-color:#babbbc;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#f8f9fa;--bs-btn-disabled-border-color:#f8f9fa}.btn-dark{--bs-btn-color:#fff;--bs-btn-bg:#212529;--bs-btn-border-color:#212529;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#424649;--bs-btn-hover-border-color:#373b3e;--bs-btn-focus-shadow-rgb:66,70,73;--bs-btn-active-color:#fff;--bs-btn-active-bg:#4d5154;--bs-btn-active-border-color:#373b3e;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#212529;--bs-btn-disabled-border-color:#212529}.btn-outline-primary{--bs-btn-color:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0d6efd;--bs-btn-hover-border-color:#0d6efd;--bs-btn-focus-shadow-rgb:13,110,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0d6efd;--bs-btn-active-border-color:#0d6efd;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#0d6efd;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#0d6efd;--bs-gradient:none}.btn-outline-secondary{--bs-btn-color:#6c757d;--bs-btn-border-color:#6c757d;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#6c757d;--bs-btn-hover-border-color:#6c757d;--bs-btn-focus-shadow-rgb:108,117,125;--bs-btn-active-color:#fff;--bs-btn-active-bg:#6c757d;--bs-btn-active-border-color:#6c757d;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#6c757d;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#6c757d;--bs-gradient:none}.btn-outline-success{--bs-btn-color:#198754;--bs-btn-border-color:#198754;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#198754;--bs-btn-hover-border-color:#198754;--bs-btn-focus-shadow-rgb:25,135,84;--bs-btn-active-color:#fff;--bs-btn-active-bg:#198754;--bs-btn-active-border-color:#198754;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#198754;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#198754;--bs-gradient:none}.btn-outline-info{--bs-btn-color:#0dcaf0;--bs-btn-border-color:#0dcaf0;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#0dcaf0;--bs-btn-hover-border-color:#0dcaf0;--bs-btn-focus-shadow-rgb:13,202,240;--bs-btn-active-color:#000;--bs-btn-active-bg:#0dcaf0;--bs-btn-active-border-color:#0dcaf0;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#0dcaf0;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#0dcaf0;--bs-gradient:none}.btn-outline-warning{--bs-btn-color:#ffc107;--bs-btn-border-color:#ffc107;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#ffc107;--bs-btn-hover-border-color:#ffc107;--bs-btn-focus-shadow-rgb:255,193,7;--bs-btn-active-color:#000;--bs-btn-active-bg:#ffc107;--bs-btn-active-border-color:#ffc107;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#ffc107;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#ffc107;--bs-gradient:none}.btn-outline-danger{--bs-btn-color:#dc3545;--bs-btn-border-color:#dc3545;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#dc3545;--bs-btn-hover-border-color:#dc3545;--bs-btn-focus-shadow-rgb:220,53,69;--bs-btn-active-color:#fff;--bs-btn-active-bg:#dc3545;--bs-btn-active-border-color:#dc3545;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#dc3545;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#dc3545;--bs-gradient:none}.btn-outline-light{--bs-btn-color:#f8f9fa;--bs-btn-border-color:#f8f9fa;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#f8f9fa;--bs-btn-hover-border-color:#f8f9fa;--bs-btn-focus-shadow-rgb:248,249,250;--bs-btn-active-color:#000;--bs-btn-active-bg:#f8f9fa;--bs-btn-active-border-color:#f8f9fa;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#f8f9fa;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#f8f9fa;--bs-gradient:none}.btn-outline-dark{--bs-btn-color:#212529;--bs-btn-border-color:#212529;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#212529;--bs-btn-hover-border-color:#212529;--bs-btn-focus-shadow-rgb:33,37,41;--bs-btn-active-color:#fff;--bs-btn-active-bg:#212529;--bs-btn-active-border-color:#212529;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#212529;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#212529;--bs-gradient:none}.btn-link{--bs-btn-font-weight:400;--bs-btn-color:var(--bs-link-color);--bs-btn-bg:transparent;--bs-btn-border-color:transparent;--bs-btn-hover-color:var(--bs-link-hover-color);--bs-btn-hover-border-color:transparent;--bs-btn-active-color:var(--bs-link-hover-color);--bs-btn-active-border-color:transparent;--bs-btn-disabled-color:#6c757d;--bs-btn-disabled-border-color:transparent;--bs-btn-box-shadow:none;--bs-btn-focus-shadow-rgb:49,132,253;text-decoration:underline}.btn-link:focus-visible{color:var(--bs-btn-color)}.btn-link:hover{color:var(--bs-btn-hover-color)}.btn-group-lg>.btn,.btn-lg{--bs-btn-padding-y:0.5rem;--bs-btn-padding-x:1rem;--bs-btn-font-size:1.25rem;--bs-btn-border-radius:0.5rem}.btn-group-sm>.btn,.btn-sm{--bs-btn-padding-y:0.25rem;--bs-btn-padding-x:0.5rem;--bs-btn-font-size:0.875rem;--bs-btn-border-radius:0.25rem}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.collapsing.collapse-horizontal{width:0;height:auto;transition:width .35s ease}@media (prefers-reduced-motion:reduce){.collapsing.collapse-horizontal{transition:none}}.dropdown,.dropdown-center,.dropend,.dropstart,.dropup,.dropup-center{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{--bs-dropdown-zindex:1000;--bs-dropdown-min-width:10rem;--bs-dropdown-padding-x:0;--bs-dropdown-padding-y:0.5rem;--bs-dropdown-spacer:0.125rem;--bs-dropdown-font-size:1rem;--bs-dropdown-color:#212529;--bs-dropdown-bg:#fff;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-border-radius:0.375rem;--bs-dropdown-border-width:1px;--bs-dropdown-inner-border-radius:calc(0.375rem - 1px);--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-divider-margin-y:0.5rem;--bs-dropdown-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-dropdown-link-color:#212529;--bs-dropdown-link-hover-color:#1e2125;--bs-dropdown-link-hover-bg:#e9ecef;--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:#adb5bd;--bs-dropdown-item-padding-x:1rem;--bs-dropdown-item-padding-y:0.25rem;--bs-dropdown-header-color:#6c757d;--bs-dropdown-header-padding-x:1rem;--bs-dropdown-header-padding-y:0.5rem;position:absolute;z-index:var(--bs-dropdown-zindex);display:none;min-width:var(--bs-dropdown-min-width);padding:var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x);margin:0;font-size:var(--bs-dropdown-font-size);color:var(--bs-dropdown-color);text-align:left;list-style:none;background-color:var(--bs-dropdown-bg);background-clip:padding-box;border:var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color);border-radius:var(--bs-dropdown-border-radius)}.dropdown-menu[data-bs-popper]{top:100%;left:0;margin-top:var(--bs-dropdown-spacer)}.dropdown-menu-start{--bs-position:start}.dropdown-menu-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-end{--bs-position:end}.dropdown-menu-end[data-bs-popper]{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-start{--bs-position:start}.dropdown-menu-sm-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-sm-end{--bs-position:end}.dropdown-menu-sm-end[data-bs-popper]{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-start{--bs-position:start}.dropdown-menu-md-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-md-end{--bs-position:end}.dropdown-menu-md-end[data-bs-popper]{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-start{--bs-position:start}.dropdown-menu-lg-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-lg-end{--bs-position:end}.dropdown-menu-lg-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-start{--bs-position:start}.dropdown-menu-xl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xl-end{--bs-position:end}.dropdown-menu-xl-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1400px){.dropdown-menu-xxl-start{--bs-position:start}.dropdown-menu-xxl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xxl-end{--bs-position:end}.dropdown-menu-xxl-end[data-bs-popper]{right:0;left:auto}}.dropup .dropdown-menu[data-bs-popper]{top:auto;bottom:100%;margin-top:0;margin-bottom:var(--bs-dropdown-spacer)}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-menu[data-bs-popper]{top:0;right:auto;left:100%;margin-top:0;margin-left:var(--bs-dropdown-spacer)}.dropend .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropend .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-toggle::after{vertical-align:0}.dropstart .dropdown-menu[data-bs-popper]{top:0;right:100%;left:auto;margin-top:0;margin-right:var(--bs-dropdown-spacer)}.dropstart .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropstart .dropdown-toggle::after{display:none}.dropstart .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropstart .dropdown-toggle:empty::after{margin-left:0}.dropstart .dropdown-toggle::before{vertical-align:0}.dropdown-divider{height:0;margin:var(--bs-dropdown-divider-margin-y) 0;overflow:hidden;border-top:1px solid var(--bs-dropdown-divider-bg);opacity:1}.dropdown-item{display:block;width:100%;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);clear:both;font-weight:400;color:var(--bs-dropdown-link-color);text-align:inherit;text-decoration:none;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:var(--bs-dropdown-link-hover-color);background-color:var(--bs-dropdown-link-hover-bg)}.dropdown-item.active,.dropdown-item:active{color:var(--bs-dropdown-link-active-color);text-decoration:none;background-color:var(--bs-dropdown-link-active-bg)}.dropdown-item.disabled,.dropdown-item:disabled{color:var(--bs-dropdown-link-disabled-color);pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x);margin-bottom:0;font-size:.875rem;color:var(--bs-dropdown-header-color);white-space:nowrap}.dropdown-item-text{display:block;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);color:var(--bs-dropdown-link-color)}.dropdown-menu-dark{--bs-dropdown-color:#dee2e6;--bs-dropdown-bg:#343a40;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-box-shadow: ;--bs-dropdown-link-color:#dee2e6;--bs-dropdown-link-hover-color:#fff;--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-link-hover-bg:rgba(255, 255, 255, 0.15);--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:#adb5bd;--bs-dropdown-header-color:#adb5bd}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group-vertical>.btn-check:checked+.btn,.btn-group-vertical>.btn-check:focus+.btn,.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn-check:checked+.btn,.btn-group>.btn-check:focus+.btn,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group{border-radius:.375rem}.btn-group>.btn-group:not(:first-child),.btn-group>:not(.btn-check:first-child)+.btn{margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn.dropdown-toggle-split:first-child,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:nth-child(n+3),.btn-group>:not(.btn-check)+.btn{border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropend .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropstart .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn~.btn{border-top-left-radius:0;border-top-right-radius:0}.nav{--bs-nav-link-padding-x:1rem;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color:var(--bs-link-color);--bs-nav-link-hover-color:var(--bs-link-hover-color);--bs-nav-link-disabled-color:#6c757d;display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);font-size:var(--bs-nav-link-font-size);font-weight:var(--bs-nav-link-font-weight);color:var(--bs-nav-link-color);text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}@media (prefers-reduced-motion:reduce){.nav-link{transition:none}}.nav-link:focus,.nav-link:hover{color:var(--bs-nav-link-hover-color)}.nav-link.disabled{color:var(--bs-nav-link-disabled-color);pointer-events:none;cursor:default}.nav-tabs{--bs-nav-tabs-border-width:1px;--bs-nav-tabs-border-color:#dee2e6;--bs-nav-tabs-border-radius:0.375rem;--bs-nav-tabs-link-hover-border-color:#e9ecef #e9ecef #dee2e6;--bs-nav-tabs-link-active-color:#495057;--bs-nav-tabs-link-active-bg:#fff;--bs-nav-tabs-link-active-border-color:#dee2e6 #dee2e6 #fff;border-bottom:var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color)}.nav-tabs .nav-link{margin-bottom:calc(-1 * var(--bs-nav-tabs-border-width));background:0 0;border:var(--bs-nav-tabs-border-width) solid transparent;border-top-left-radius:var(--bs-nav-tabs-border-radius);border-top-right-radius:var(--bs-nav-tabs-border-radius)}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{isolation:isolate;border-color:var(--bs-nav-tabs-link-hover-border-color)}.nav-tabs .nav-link.disabled,.nav-tabs .nav-link:disabled{color:var(--bs-nav-link-disabled-color);background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}.nav-tabs .dropdown-menu{margin-top:calc(-1 * var(--bs-nav-tabs-border-width));border-top-left-radius:0;border-top-right-radius:0}.nav-pills{--bs-nav-pills-border-radius:0.375rem;--bs-nav-pills-link-active-color:#fff;--bs-nav-pills-link-active-bg:#0d6efd}.nav-pills .nav-link{background:0 0;border:0;border-radius:var(--bs-nav-pills-border-radius)}.nav-pills .nav-link:disabled{color:var(--bs-nav-link-disabled-color);background-color:transparent;border-color:transparent}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:var(--bs-nav-pills-link-active-color);background-color:var(--bs-nav-pills-link-active-bg)}.nav-fill .nav-item,.nav-fill>.nav-link{flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{flex-basis:0;flex-grow:1;text-align:center}.nav-fill .nav-item .nav-link,.nav-justified .nav-item .nav-link{width:100%}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{--bs-navbar-padding-x:0;--bs-navbar-padding-y:0.5rem;--bs-navbar-color:rgba(0, 0, 0, 0.55);--bs-navbar-hover-color:rgba(0, 0, 0, 0.7);--bs-navbar-disabled-color:rgba(0, 0, 0, 0.3);--bs-navbar-active-color:rgba(0, 0, 0, 0.9);--bs-navbar-brand-padding-y:0.3125rem;--bs-navbar-brand-margin-end:1rem;--bs-navbar-brand-font-size:1.25rem;--bs-navbar-brand-color:rgba(0, 0, 0, 0.9);--bs-navbar-brand-hover-color:rgba(0, 0, 0, 0.9);--bs-navbar-nav-link-padding-x:0.5rem;--bs-navbar-toggler-padding-y:0.25rem;--bs-navbar-toggler-padding-x:0.75rem;--bs-navbar-toggler-font-size:1.25rem;--bs-navbar-toggler-icon-bg:url(${R});--bs-navbar-toggler-border-color:rgba(0, 0, 0, 0.1);--bs-navbar-toggler-border-radius:0.375rem;--bs-navbar-toggler-focus-width:0.25rem;--bs-navbar-toggler-transition:box-shadow 0.15s ease-in-out;position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:var(--bs-navbar-padding-y) var(--bs-navbar-padding-x)}.navbar>.container,.navbar>.container-fluid,.navbar>.container-lg,.navbar>.container-md,.navbar>.container-sm,.navbar>.container-xl,.navbar>.container-xxl{display:flex;flex-wrap:inherit;align-items:center;justify-content:space-between}.navbar-brand{padding-top:var(--bs-navbar-brand-padding-y);padding-bottom:var(--bs-navbar-brand-padding-y);margin-right:var(--bs-navbar-brand-margin-end);font-size:var(--bs-navbar-brand-font-size);color:var(--bs-navbar-brand-color);text-decoration:none;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{color:var(--bs-navbar-brand-hover-color)}.navbar-nav{--bs-nav-link-padding-x:0;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color:var(--bs-navbar-color);--bs-nav-link-hover-color:var(--bs-navbar-hover-color);--bs-nav-link-disabled-color:var(--bs-navbar-disabled-color);display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link.active,.navbar-nav .show>.nav-link{color:var(--bs-navbar-active-color)}.navbar-nav .dropdown-menu{position:static}.navbar-text{padding-top:.5rem;padding-bottom:.5rem;color:var(--bs-navbar-color)}.navbar-text a,.navbar-text a:focus,.navbar-text a:hover{color:var(--bs-navbar-active-color)}.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}.navbar-toggler{padding:var(--bs-navbar-toggler-padding-y) var(--bs-navbar-toggler-padding-x);font-size:var(--bs-navbar-toggler-font-size);line-height:1;color:var(--bs-navbar-color);background-color:transparent;border:var(--bs-border-width) solid var(--bs-navbar-toggler-border-color);border-radius:var(--bs-navbar-toggler-border-radius);transition:var(--bs-navbar-toggler-transition)}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-toggler:hover{text-decoration:none}.navbar-toggler:focus{text-decoration:none;outline:0;box-shadow:0 0 0 var(--bs-navbar-toggler-focus-width)}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;background-image:var(--bs-navbar-toggler-icon-bg);background-repeat:no-repeat;background-position:center;background-size:100%}.navbar-nav-scroll{max-height:var(--bs-scroll-height,75vh);overflow-y:auto}@media (min-width:576px){.navbar-expand-sm{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}.navbar-expand-sm .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-sm .offcanvas .offcanvas-header{display:none}.navbar-expand-sm .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}.navbar-expand-md .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-md .offcanvas .offcanvas-header{display:none}.navbar-expand-md .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:992px){.navbar-expand-lg{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}.navbar-expand-lg .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-lg .offcanvas .offcanvas-header{display:none}.navbar-expand-lg .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1200px){.navbar-expand-xl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}.navbar-expand-xl .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-xl .offcanvas .offcanvas-header{display:none}.navbar-expand-xl .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1400px){.navbar-expand-xxl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xxl .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}.navbar-expand-xxl .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-xxl .offcanvas .offcanvas-header{display:none}.navbar-expand-xxl .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}.navbar-expand{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-expand .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand .offcanvas .offcanvas-header{display:none}.navbar-expand .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}.navbar-dark{--bs-navbar-color:rgba(255, 255, 255, 0.55);--bs-navbar-hover-color:rgba(255, 255, 255, 0.75);--bs-navbar-disabled-color:rgba(255, 255, 255, 0.25);--bs-navbar-active-color:#fff;--bs-navbar-brand-color:#fff;--bs-navbar-brand-hover-color:#fff;--bs-navbar-toggler-border-color:rgba(255, 255, 255, 0.1);--bs-navbar-toggler-icon-bg:url(${F})}.card{--bs-card-spacer-y:1rem;--bs-card-spacer-x:1rem;--bs-card-title-spacer-y:0.5rem;--bs-card-border-width:1px;--bs-card-border-color:var(--bs-border-color-translucent);--bs-card-border-radius:0.375rem;--bs-card-box-shadow: ;--bs-card-inner-border-radius:calc(0.375rem - 1px);--bs-card-cap-padding-y:0.5rem;--bs-card-cap-padding-x:1rem;--bs-card-cap-bg:rgba(0, 0, 0, 0.03);--bs-card-cap-color: ;--bs-card-height: ;--bs-card-color: ;--bs-card-bg:#fff;--bs-card-img-overlay-padding:1rem;--bs-card-group-margin:0.75rem;position:relative;display:flex;flex-direction:column;min-width:0;height:var(--bs-card-height);word-wrap:break-word;background-color:var(--bs-card-bg);background-clip:border-box;border:var(--bs-card-border-width) solid var(--bs-card-border-color);border-radius:var(--bs-card-border-radius)}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:var(--bs-card-inner-border-radius);border-top-right-radius:var(--bs-card-inner-border-radius)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:var(--bs-card-inner-border-radius);border-bottom-left-radius:var(--bs-card-inner-border-radius)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{flex:1 1 auto;padding:var(--bs-card-spacer-y) var(--bs-card-spacer-x);color:var(--bs-card-color)}.card-title{margin-bottom:var(--bs-card-title-spacer-y)}.card-subtitle{margin-top:calc(-.5 * var(--bs-card-title-spacer-y));margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link+.card-link{margin-left:var(--bs-card-spacer-x)}.card-header{padding:var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);margin-bottom:0;color:var(--bs-card-cap-color);background-color:var(--bs-card-cap-bg);border-bottom:var(--bs-card-border-width) solid var(--bs-card-border-color)}.card-header:first-child{border-radius:var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0}.card-footer{padding:var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);color:var(--bs-card-cap-color);background-color:var(--bs-card-cap-bg);border-top:var(--bs-card-border-width) solid var(--bs-card-border-color)}.card-footer:last-child{border-radius:0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius)}.card-header-tabs{margin-right:calc(-.5 * var(--bs-card-cap-padding-x));margin-bottom:calc(-1 * var(--bs-card-cap-padding-y));margin-left:calc(-.5 * var(--bs-card-cap-padding-x));border-bottom:0}.card-header-tabs .nav-link.active{background-color:var(--bs-card-bg);border-bottom-color:var(--bs-card-bg)}.card-header-pills{margin-right:calc(-.5 * var(--bs-card-cap-padding-x));margin-left:calc(-.5 * var(--bs-card-cap-padding-x))}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:var(--bs-card-img-overlay-padding);border-radius:var(--bs-card-inner-border-radius)}.card-img,.card-img-bottom,.card-img-top{width:100%}.card-img,.card-img-top{border-top-left-radius:var(--bs-card-inner-border-radius);border-top-right-radius:var(--bs-card-inner-border-radius)}.card-img,.card-img-bottom{border-bottom-right-radius:var(--bs-card-inner-border-radius);border-bottom-left-radius:var(--bs-card-inner-border-radius)}.card-group>.card{margin-bottom:var(--bs-card-group-margin)}@media (min-width:576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.accordion{--bs-accordion-color:#212529;--bs-accordion-bg:#fff;--bs-accordion-transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out,border-radius 0.15s ease;--bs-accordion-border-color:var(--bs-border-color);--bs-accordion-border-width:1px;--bs-accordion-border-radius:0.375rem;--bs-accordion-inner-border-radius:calc(0.375rem - 1px);--bs-accordion-btn-padding-x:1.25rem;--bs-accordion-btn-padding-y:1rem;--bs-accordion-btn-color:#212529;--bs-accordion-btn-bg:var(--bs-accordion-bg);--bs-accordion-btn-icon:url(${P});--bs-accordion-btn-icon-width:1.25rem;--bs-accordion-btn-icon-transform:rotate(-180deg);--bs-accordion-btn-icon-transition:transform 0.2s ease-in-out;--bs-accordion-btn-active-icon:url(${j});--bs-accordion-btn-focus-border-color:#86b7fe;--bs-accordion-btn-focus-box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);--bs-accordion-body-padding-x:1.25rem;--bs-accordion-body-padding-y:1rem;--bs-accordion-active-color:#0c63e4;--bs-accordion-active-bg:#e7f1ff}.accordion-button{position:relative;display:flex;align-items:center;width:100%;padding:var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x);font-size:1rem;color:var(--bs-accordion-btn-color);text-align:left;background-color:var(--bs-accordion-btn-bg);border:0;border-radius:0;overflow-anchor:none;transition:var(--bs-accordion-transition)}@media (prefers-reduced-motion:reduce){.accordion-button{transition:none}}.accordion-button:not(.collapsed){color:var(--bs-accordion-active-color);background-color:var(--bs-accordion-active-bg);box-shadow:inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color)}.accordion-button:not(.collapsed)::after{background-image:var(--bs-accordion-btn-active-icon);transform:var(--bs-accordion-btn-icon-transform)}.accordion-button::after{flex-shrink:0;width:var(--bs-accordion-btn-icon-width);height:var(--bs-accordion-btn-icon-width);margin-left:auto;content:"";background-image:var(--bs-accordion-btn-icon);background-repeat:no-repeat;background-size:var(--bs-accordion-btn-icon-width);transition:var(--bs-accordion-btn-icon-transition)}@media (prefers-reduced-motion:reduce){.accordion-button::after{transition:none}}.accordion-button:hover{z-index:2}.accordion-button:focus{z-index:3;border-color:var(--bs-accordion-btn-focus-border-color);outline:0;box-shadow:var(--bs-accordion-btn-focus-box-shadow)}.accordion-header{margin-bottom:0}.accordion-item{color:var(--bs-accordion-color);background-color:var(--bs-accordion-bg);border:var(--bs-accordion-border-width) solid var(--bs-accordion-border-color)}.accordion-item:first-of-type{border-top-left-radius:var(--bs-accordion-border-radius);border-top-right-radius:var(--bs-accordion-border-radius)}.accordion-item:first-of-type .accordion-button{border-top-left-radius:var(--bs-accordion-inner-border-radius);border-top-right-radius:var(--bs-accordion-inner-border-radius)}.accordion-item:not(:first-of-type){border-top:0}.accordion-item:last-of-type{border-bottom-right-radius:var(--bs-accordion-border-radius);border-bottom-left-radius:var(--bs-accordion-border-radius)}.accordion-item:last-of-type .accordion-button.collapsed{border-bottom-right-radius:var(--bs-accordion-inner-border-radius);border-bottom-left-radius:var(--bs-accordion-inner-border-radius)}.accordion-item:last-of-type .accordion-collapse{border-bottom-right-radius:var(--bs-accordion-border-radius);border-bottom-left-radius:var(--bs-accordion-border-radius)}.accordion-body{padding:var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x)}.accordion-flush .accordion-collapse{border-width:0}.accordion-flush .accordion-item{border-right:0;border-left:0;border-radius:0}.accordion-flush .accordion-item:first-child{border-top:0}.accordion-flush .accordion-item:last-child{border-bottom:0}.accordion-flush .accordion-item .accordion-button,.accordion-flush .accordion-item .accordion-button.collapsed{border-radius:0}.breadcrumb{--bs-breadcrumb-padding-x:0;--bs-breadcrumb-padding-y:0;--bs-breadcrumb-margin-bottom:1rem;--bs-breadcrumb-bg: ;--bs-breadcrumb-border-radius: ;--bs-breadcrumb-divider-color:#6c757d;--bs-breadcrumb-item-padding-x:0.5rem;--bs-breadcrumb-item-active-color:#6c757d;display:flex;flex-wrap:wrap;padding:var(--bs-breadcrumb-padding-y) var(--bs-breadcrumb-padding-x);margin-bottom:var(--bs-breadcrumb-margin-bottom);font-size:var(--bs-breadcrumb-font-size);list-style:none;background-color:var(--bs-breadcrumb-bg);border-radius:var(--bs-breadcrumb-border-radius)}.breadcrumb-item+.breadcrumb-item{padding-left:var(--bs-breadcrumb-item-padding-x)}.breadcrumb-item+.breadcrumb-item::before{float:left;padding-right:var(--bs-breadcrumb-item-padding-x);color:var(--bs-breadcrumb-divider-color);content:var(--bs-breadcrumb-divider, "/")}.breadcrumb-item.active{color:var(--bs-breadcrumb-item-active-color)}.pagination{--bs-pagination-padding-x:0.75rem;--bs-pagination-padding-y:0.375rem;--bs-pagination-font-size:1rem;--bs-pagination-color:var(--bs-link-color);--bs-pagination-bg:#fff;--bs-pagination-border-width:1px;--bs-pagination-border-color:#dee2e6;--bs-pagination-border-radius:0.375rem;--bs-pagination-hover-color:var(--bs-link-hover-color);--bs-pagination-hover-bg:#e9ecef;--bs-pagination-hover-border-color:#dee2e6;--bs-pagination-focus-color:var(--bs-link-hover-color);--bs-pagination-focus-bg:#e9ecef;--bs-pagination-focus-box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);--bs-pagination-active-color:#fff;--bs-pagination-active-bg:#0d6efd;--bs-pagination-active-border-color:#0d6efd;--bs-pagination-disabled-color:#6c757d;--bs-pagination-disabled-bg:#fff;--bs-pagination-disabled-border-color:#dee2e6;display:flex;padding-left:0;list-style:none}.page-link{position:relative;display:block;padding:var(--bs-pagination-padding-y) var(--bs-pagination-padding-x);font-size:var(--bs-pagination-font-size);color:var(--bs-pagination-color);text-decoration:none;background-color:var(--bs-pagination-bg);border:var(--bs-pagination-border-width) solid var(--bs-pagination-border-color);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.page-link{transition:none}}.page-link:hover{z-index:2;color:var(--bs-pagination-hover-color);background-color:var(--bs-pagination-hover-bg);border-color:var(--bs-pagination-hover-border-color)}.page-link:focus{z-index:3;color:var(--bs-pagination-focus-color);background-color:var(--bs-pagination-focus-bg);outline:0;box-shadow:var(--bs-pagination-focus-box-shadow)}.active>.page-link,.page-link.active{z-index:3;color:var(--bs-pagination-active-color);background-color:var(--bs-pagination-active-bg);border-color:var(--bs-pagination-active-border-color)}.disabled>.page-link,.page-link.disabled{color:var(--bs-pagination-disabled-color);pointer-events:none;background-color:var(--bs-pagination-disabled-bg);border-color:var(--bs-pagination-disabled-border-color)}.page-item:not(:first-child) .page-link{margin-left:-1px}.page-item:first-child .page-link{border-top-left-radius:var(--bs-pagination-border-radius);border-bottom-left-radius:var(--bs-pagination-border-radius)}.page-item:last-child .page-link{border-top-right-radius:var(--bs-pagination-border-radius);border-bottom-right-radius:var(--bs-pagination-border-radius)}.pagination-lg{--bs-pagination-padding-x:1.5rem;--bs-pagination-padding-y:0.75rem;--bs-pagination-font-size:1.25rem;--bs-pagination-border-radius:0.5rem}.pagination-sm{--bs-pagination-padding-x:0.5rem;--bs-pagination-padding-y:0.25rem;--bs-pagination-font-size:0.875rem;--bs-pagination-border-radius:0.25rem}.badge{--bs-badge-padding-x:0.65em;--bs-badge-padding-y:0.35em;--bs-badge-font-size:0.75em;--bs-badge-font-weight:700;--bs-badge-color:#fff;--bs-badge-border-radius:0.375rem;display:inline-block;padding:var(--bs-badge-padding-y) var(--bs-badge-padding-x);font-size:var(--bs-badge-font-size);font-weight:var(--bs-badge-font-weight);line-height:1;color:var(--bs-badge-color);text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:var(--bs-badge-border-radius)}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.alert{--bs-alert-bg:transparent;--bs-alert-padding-x:1rem;--bs-alert-padding-y:1rem;--bs-alert-margin-bottom:1rem;--bs-alert-color:inherit;--bs-alert-border-color:transparent;--bs-alert-border:1px solid var(--bs-alert-border-color);--bs-alert-border-radius:0.375rem;position:relative;padding:var(--bs-alert-padding-y) var(--bs-alert-padding-x);margin-bottom:var(--bs-alert-margin-bottom);color:var(--bs-alert-color);background-color:var(--bs-alert-bg);border:var(--bs-alert-border);border-radius:var(--bs-alert-border-radius)}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:3rem}.alert-dismissible .btn-close{position:absolute;top:0;right:0;z-index:2;padding:1.25rem 1rem}.alert-primary{--bs-alert-color:#084298;--bs-alert-bg:#cfe2ff;--bs-alert-border-color:#b6d4fe}.alert-primary .alert-link{color:#06357a}.alert-secondary{--bs-alert-color:#41464b;--bs-alert-bg:#e2e3e5;--bs-alert-border-color:#d3d6d8}.alert-secondary .alert-link{color:#34383c}.alert-success{--bs-alert-color:#0f5132;--bs-alert-bg:#d1e7dd;--bs-alert-border-color:#badbcc}.alert-success .alert-link{color:#0c4128}.alert-info{--bs-alert-color:#055160;--bs-alert-bg:#cff4fc;--bs-alert-border-color:#b6effb}.alert-info .alert-link{color:#04414d}.alert-warning{--bs-alert-color:#664d03;--bs-alert-bg:#fff3cd;--bs-alert-border-color:#ffecb5}.alert-warning .alert-link{color:#523e02}.alert-danger{--bs-alert-color:#842029;--bs-alert-bg:#f8d7da;--bs-alert-border-color:#f5c2c7}.alert-danger .alert-link{color:#6a1a21}.alert-light{--bs-alert-color:#636464;--bs-alert-bg:#fefefe;--bs-alert-border-color:#fdfdfe}.alert-light .alert-link{color:#4f5050}.alert-dark{--bs-alert-color:#141619;--bs-alert-bg:#d3d3d4;--bs-alert-border-color:#bcbebf}.alert-dark .alert-link{color:#101214}@keyframes progress-bar-stripes{0%{background-position-x:1rem}}.progress{--bs-progress-height:1rem;--bs-progress-font-size:0.75rem;--bs-progress-bg:#e9ecef;--bs-progress-border-radius:0.375rem;--bs-progress-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.075);--bs-progress-bar-color:#fff;--bs-progress-bar-bg:#0d6efd;--bs-progress-bar-transition:width 0.6s ease;display:flex;height:var(--bs-progress-height);overflow:hidden;font-size:var(--bs-progress-font-size);background-color:var(--bs-progress-bg);border-radius:var(--bs-progress-border-radius)}.progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:var(--bs-progress-bar-color);text-align:center;white-space:nowrap;background-color:var(--bs-progress-bar-bg);transition:var(--bs-progress-bar-transition)}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:var(--bs-progress-height) var(--bs-progress-height)}.progress-bar-animated{animation:1s linear infinite progress-bar-stripes}@media (prefers-reduced-motion:reduce){.progress-bar-animated{animation:none}}.list-group{--bs-list-group-color:#212529;--bs-list-group-bg:#fff;--bs-list-group-border-color:rgba(0, 0, 0, 0.125);--bs-list-group-border-width:1px;--bs-list-group-border-radius:0.375rem;--bs-list-group-item-padding-x:1rem;--bs-list-group-item-padding-y:0.5rem;--bs-list-group-action-color:#495057;--bs-list-group-action-hover-color:#495057;--bs-list-group-action-hover-bg:#f8f9fa;--bs-list-group-action-active-color:#212529;--bs-list-group-action-active-bg:#e9ecef;--bs-list-group-disabled-color:#6c757d;--bs-list-group-disabled-bg:#fff;--bs-list-group-active-color:#fff;--bs-list-group-active-bg:#0d6efd;--bs-list-group-active-border-color:#0d6efd;display:flex;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:var(--bs-list-group-border-radius)}.list-group-numbered{list-style-type:none;counter-reset:section}.list-group-numbered>.list-group-item::before{content:counters(section, ".") ". ";counter-increment:section}.list-group-item-action{width:100%;color:var(--bs-list-group-action-color);text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:var(--bs-list-group-action-hover-color);text-decoration:none;background-color:var(--bs-list-group-action-hover-bg)}.list-group-item-action:active{color:var(--bs-list-group-action-active-color);background-color:var(--bs-list-group-action-active-bg)}.list-group-item{position:relative;display:block;padding:var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x);color:var(--bs-list-group-color);text-decoration:none;background-color:var(--bs-list-group-bg);border:var(--bs-list-group-border-width) solid var(--bs-list-group-border-color)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:var(--bs-list-group-disabled-color);pointer-events:none;background-color:var(--bs-list-group-disabled-bg)}.list-group-item.active{z-index:2;color:var(--bs-list-group-active-color);background-color:var(--bs-list-group-active-bg);border-color:var(--bs-list-group-active-border-color)}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:calc(-1 * var(--bs-list-group-border-width));border-top-width:var(--bs-list-group-border-width)}.list-group-horizontal{flex-direction:row}.list-group-horizontal>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}@media (min-width:576px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:768px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:992px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:1400px){.list-group-horizontal-xxl{flex-direction:row}.list-group-horizontal-xxl>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-xxl>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-xxl>.list-group-item.active{margin-top:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 var(--bs-list-group-border-width)}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#084298;background-color:#cfe2ff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#084298;background-color:#bacbe6}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#084298;border-color:#084298}.list-group-item-secondary{color:#41464b;background-color:#e2e3e5}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#41464b;background-color:#cbccce}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#41464b;border-color:#41464b}.list-group-item-success{color:#0f5132;background-color:#d1e7dd}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#0f5132;background-color:#bcd0c7}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#0f5132;border-color:#0f5132}.list-group-item-info{color:#055160;background-color:#cff4fc}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#055160;background-color:#badce3}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#055160;border-color:#055160}.list-group-item-warning{color:#664d03;background-color:#fff3cd}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#664d03;background-color:#e6dbb9}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#664d03;border-color:#664d03}.list-group-item-danger{color:#842029;background-color:#f8d7da}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#842029;background-color:#dfc2c4}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#842029;border-color:#842029}.list-group-item-light{color:#636464;background-color:#fefefe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#636464;background-color:#e5e5e5}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#636464;border-color:#636464}.list-group-item-dark{color:#141619;background-color:#d3d3d4}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#141619;background-color:#bebebf}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#141619;border-color:#141619}.btn-close{box-sizing:content-box;width:1em;height:1em;padding:.25em .25em;color:#000;background:transparent url(${N}) center/1em auto no-repeat;border:0;border-radius:.375rem;opacity:.5}.btn-close:hover{color:#000;text-decoration:none;opacity:.75}.btn-close:focus{outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25);opacity:1}.btn-close.disabled,.btn-close:disabled{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:.25}.btn-close-white{filter:invert(1) grayscale(100%) brightness(200%)}.toast{--bs-toast-zindex:1090;--bs-toast-padding-x:0.75rem;--bs-toast-padding-y:0.5rem;--bs-toast-spacing:1.5rem;--bs-toast-max-width:350px;--bs-toast-font-size:0.875rem;--bs-toast-color: ;--bs-toast-bg:rgba(255, 255, 255, 0.85);--bs-toast-border-width:1px;--bs-toast-border-color:var(--bs-border-color-translucent);--bs-toast-border-radius:0.375rem;--bs-toast-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-toast-header-color:#6c757d;--bs-toast-header-bg:rgba(255, 255, 255, 0.85);--bs-toast-header-border-color:rgba(0, 0, 0, 0.05);width:var(--bs-toast-max-width);max-width:100%;font-size:var(--bs-toast-font-size);color:var(--bs-toast-color);pointer-events:auto;background-color:var(--bs-toast-bg);background-clip:padding-box;border:var(--bs-toast-border-width) solid var(--bs-toast-border-color);box-shadow:var(--bs-toast-box-shadow);border-radius:var(--bs-toast-border-radius)}.toast.showing{opacity:0}.toast:not(.show){display:none}.toast-container{--bs-toast-zindex:1090;position:absolute;z-index:var(--bs-toast-zindex);width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:100%;pointer-events:none}.toast-container>:not(:last-child){margin-bottom:var(--bs-toast-spacing)}.toast-header{display:flex;align-items:center;padding:var(--bs-toast-padding-y) var(--bs-toast-padding-x);color:var(--bs-toast-header-color);background-color:var(--bs-toast-header-bg);background-clip:padding-box;border-bottom:var(--bs-toast-border-width) solid var(--bs-toast-header-border-color);border-top-left-radius:calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width));border-top-right-radius:calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width))}.toast-header .btn-close{margin-right:calc(-.5 * var(--bs-toast-padding-x));margin-left:var(--bs-toast-padding-x)}.toast-body{padding:var(--bs-toast-padding-x);word-wrap:break-word}.modal{--bs-modal-zindex:1055;--bs-modal-width:500px;--bs-modal-padding:1rem;--bs-modal-margin:0.5rem;--bs-modal-color: ;--bs-modal-bg:#fff;--bs-modal-border-color:var(--bs-border-color-translucent);--bs-modal-border-width:1px;--bs-modal-border-radius:0.5rem;--bs-modal-box-shadow:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--bs-modal-inner-border-radius:calc(0.5rem - 1px);--bs-modal-header-padding-x:1rem;--bs-modal-header-padding-y:1rem;--bs-modal-header-padding:1rem 1rem;--bs-modal-header-border-color:var(--bs-border-color);--bs-modal-header-border-width:1px;--bs-modal-title-line-height:1.5;--bs-modal-footer-gap:0.5rem;--bs-modal-footer-bg: ;--bs-modal-footer-border-color:var(--bs-border-color);--bs-modal-footer-border-width:1px;position:fixed;top:0;left:0;z-index:var(--bs-modal-zindex);display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}.modal-dialog{position:relative;width:auto;margin:var(--bs-modal-margin);pointer-events:none}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{height:calc(100% - var(--bs-modal-margin) * 2)}.modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - var(--bs-modal-margin) * 2)}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;color:var(--bs-modal-color);pointer-events:auto;background-color:var(--bs-modal-bg);background-clip:padding-box;border:var(--bs-modal-border-width) solid var(--bs-modal-border-color);border-radius:var(--bs-modal-border-radius);outline:0}.modal-backdrop{--bs-backdrop-zindex:1050;--bs-backdrop-bg:#000;--bs-backdrop-opacity:0.5;position:fixed;top:0;left:0;z-index:var(--bs-backdrop-zindex);width:100vw;height:100vh;background-color:var(--bs-backdrop-bg)}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:var(--bs-backdrop-opacity)}.modal-header{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:var(--bs-modal-header-padding);border-bottom:var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color);border-top-left-radius:var(--bs-modal-inner-border-radius);border-top-right-radius:var(--bs-modal-inner-border-radius)}.modal-header .btn-close{padding:calc(var(--bs-modal-header-padding-y) * .5) calc(var(--bs-modal-header-padding-x) * .5);margin:calc(-.5 * var(--bs-modal-header-padding-y)) calc(-.5 * var(--bs-modal-header-padding-x)) calc(-.5 * var(--bs-modal-header-padding-y)) auto}.modal-title{margin-bottom:0;line-height:var(--bs-modal-title-line-height)}.modal-body{position:relative;flex:1 1 auto;padding:var(--bs-modal-padding)}.modal-footer{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * .5);background-color:var(--bs-modal-footer-bg);border-top:var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color);border-bottom-right-radius:var(--bs-modal-inner-border-radius);border-bottom-left-radius:var(--bs-modal-inner-border-radius)}.modal-footer>*{margin:calc(var(--bs-modal-footer-gap) * .5)}@media (min-width:576px){.modal{--bs-modal-margin:1.75rem;--bs-modal-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15)}.modal-dialog{max-width:var(--bs-modal-width);margin-right:auto;margin-left:auto}.modal-sm{--bs-modal-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{--bs-modal-width:800px}}@media (min-width:1200px){.modal-xl{--bs-modal-width:1140px}}.modal-fullscreen{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen .modal-footer,.modal-fullscreen .modal-header{border-radius:0}.modal-fullscreen .modal-body{overflow-y:auto}@media (max-width:575.98px){.modal-fullscreen-sm-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-sm-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-sm-down .modal-footer,.modal-fullscreen-sm-down .modal-header{border-radius:0}.modal-fullscreen-sm-down .modal-body{overflow-y:auto}}@media (max-width:767.98px){.modal-fullscreen-md-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-md-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-md-down .modal-footer,.modal-fullscreen-md-down .modal-header{border-radius:0}.modal-fullscreen-md-down .modal-body{overflow-y:auto}}@media (max-width:991.98px){.modal-fullscreen-lg-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-lg-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-lg-down .modal-footer,.modal-fullscreen-lg-down .modal-header{border-radius:0}.modal-fullscreen-lg-down .modal-body{overflow-y:auto}}@media (max-width:1199.98px){.modal-fullscreen-xl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xl-down .modal-footer,.modal-fullscreen-xl-down .modal-header{border-radius:0}.modal-fullscreen-xl-down .modal-body{overflow-y:auto}}@media (max-width:1399.98px){.modal-fullscreen-xxl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xxl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xxl-down .modal-footer,.modal-fullscreen-xxl-down .modal-header{border-radius:0}.modal-fullscreen-xxl-down .modal-body{overflow-y:auto}}.tooltip{--bs-tooltip-zindex:1080;--bs-tooltip-max-width:200px;--bs-tooltip-padding-x:0.5rem;--bs-tooltip-padding-y:0.25rem;--bs-tooltip-margin: ;--bs-tooltip-font-size:0.875rem;--bs-tooltip-color:#fff;--bs-tooltip-bg:#000;--bs-tooltip-border-radius:0.375rem;--bs-tooltip-opacity:0.9;--bs-tooltip-arrow-width:0.8rem;--bs-tooltip-arrow-height:0.4rem;z-index:var(--bs-tooltip-zindex);display:block;padding:var(--bs-tooltip-arrow-height);margin:var(--bs-tooltip-margin);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-tooltip-font-size);word-wrap:break-word;opacity:0}.tooltip.show{opacity:var(--bs-tooltip-opacity)}.tooltip .tooltip-arrow{display:block;width:var(--bs-tooltip-arrow-width);height:var(--bs-tooltip-arrow-height)}.tooltip .tooltip-arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow,.bs-tooltip-top .tooltip-arrow{bottom:0}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,.bs-tooltip-top .tooltip-arrow::before{top:-1px;border-width:var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0;border-top-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow,.bs-tooltip-end .tooltip-arrow{left:0;width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before,.bs-tooltip-end .tooltip-arrow::before{right:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0;border-right-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow,.bs-tooltip-bottom .tooltip-arrow{top:0}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before,.bs-tooltip-bottom .tooltip-arrow::before{bottom:-1px;border-width:0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height);border-bottom-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow,.bs-tooltip-start .tooltip-arrow{right:0;width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before,.bs-tooltip-start .tooltip-arrow::before{left:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * .5) 0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height);border-left-color:var(--bs-tooltip-bg)}.tooltip-inner{max-width:var(--bs-tooltip-max-width);padding:var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x);color:var(--bs-tooltip-color);text-align:center;background-color:var(--bs-tooltip-bg);border-radius:var(--bs-tooltip-border-radius)}.popover{--bs-popover-zindex:1070;--bs-popover-max-width:276px;--bs-popover-font-size:0.875rem;--bs-popover-bg:#fff;--bs-popover-border-width:1px;--bs-popover-border-color:var(--bs-border-color-translucent);--bs-popover-border-radius:0.5rem;--bs-popover-inner-border-radius:calc(0.5rem - 1px);--bs-popover-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-popover-header-padding-x:1rem;--bs-popover-header-padding-y:0.5rem;--bs-popover-header-font-size:1rem;--bs-popover-header-color: ;--bs-popover-header-bg:#f0f0f0;--bs-popover-body-padding-x:1rem;--bs-popover-body-padding-y:1rem;--bs-popover-body-color:#212529;--bs-popover-arrow-width:1rem;--bs-popover-arrow-height:0.5rem;--bs-popover-arrow-border:var(--bs-popover-border-color);z-index:var(--bs-popover-zindex);display:block;max-width:var(--bs-popover-max-width);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-popover-font-size);word-wrap:break-word;background-color:var(--bs-popover-bg);background-clip:padding-box;border:var(--bs-popover-border-width) solid var(--bs-popover-border-color);border-radius:var(--bs-popover-border-radius)}.popover .popover-arrow{display:block;width:var(--bs-popover-arrow-width);height:var(--bs-popover-arrow-height)}.popover .popover-arrow::after,.popover .popover-arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid;border-width:0}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow,.bs-popover-top>.popover-arrow{bottom:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width))}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::after,.bs-popover-top>.popover-arrow::before{border-width:var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * .5) 0}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::before{bottom:0;border-top-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-top>.popover-arrow::after{bottom:var(--bs-popover-border-width);border-top-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow,.bs-popover-end>.popover-arrow{left:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));width:var(--bs-popover-arrow-height);height:var(--bs-popover-arrow-width)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::after,.bs-popover-end>.popover-arrow::before{border-width:calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * .5) 0}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::before{left:0;border-right-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-end>.popover-arrow::after{left:var(--bs-popover-border-width);border-right-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow,.bs-popover-bottom>.popover-arrow{top:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width))}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::before{border-width:0 calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::before{top:0;border-bottom-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::after{top:var(--bs-popover-border-width);border-bottom-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:var(--bs-popover-arrow-width);margin-left:calc(-.5 * var(--bs-popover-arrow-width));content:"";border-bottom:var(--bs-popover-border-width) solid var(--bs-popover-header-bg)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow,.bs-popover-start>.popover-arrow{right:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));width:var(--bs-popover-arrow-height);height:var(--bs-popover-arrow-width)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::after,.bs-popover-start>.popover-arrow::before{border-width:calc(var(--bs-popover-arrow-width) * .5) 0 calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::before{right:0;border-left-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-start>.popover-arrow::after{right:var(--bs-popover-border-width);border-left-color:var(--bs-popover-bg)}.popover-header{padding:var(--bs-popover-header-padding-y) var(--bs-popover-header-padding-x);margin-bottom:0;font-size:var(--bs-popover-header-font-size);color:var(--bs-popover-header-color);background-color:var(--bs-popover-header-bg);border-bottom:var(--bs-popover-border-width) solid var(--bs-popover-border-color);border-top-left-radius:var(--bs-popover-inner-border-radius);border-top-right-radius:var(--bs-popover-inner-border-radius)}.popover-header:empty{display:none}.popover-body{padding:var(--bs-popover-body-padding-y) var(--bs-popover-body-padding-x);color:var(--bs-popover-body-color)}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-end,.carousel-item-next:not(.carousel-item-start){transform:translateX(100%)}.active.carousel-item-start,.carousel-item-prev:not(.carousel-item-end){transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item-next.carousel-item-start,.carousel-fade .carousel-item-prev.carousel-item-end,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:0 0;border:0;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:2rem;height:2rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}.carousel-control-prev-icon{background-image:url(${B})}.carousel-control-next-icon{background-image:url(${U})}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:2;display:flex;justify-content:center;padding:0;margin-right:15%;margin-bottom:1rem;margin-left:15%;list-style:none}.carousel-indicators [data-bs-target]{box-sizing:content-box;flex:0 1 auto;width:30px;height:3px;padding:0;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border:0;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators [data-bs-target]{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:1.25rem;left:15%;padding-top:1.25rem;padding-bottom:1.25rem;color:#fff;text-align:center}.carousel-dark .carousel-control-next-icon,.carousel-dark .carousel-control-prev-icon{filter:invert(1) grayscale(100)}.carousel-dark .carousel-indicators [data-bs-target]{background-color:#000}.carousel-dark .carousel-caption{color:#000}.spinner-border,.spinner-grow{display:inline-block;width:var(--bs-spinner-width);height:var(--bs-spinner-height);vertical-align:var(--bs-spinner-vertical-align);border-radius:50%;animation:var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name)}@keyframes spinner-border{to{transform:rotate(360deg)}}.spinner-border{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-border-width:0.25em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-border;border:var(--bs-spinner-border-width) solid currentcolor;border-right-color:transparent}.spinner-border-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem;--bs-spinner-border-width:0.2em}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-grow;background-color:currentcolor;opacity:0}.spinner-grow-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{--bs-spinner-animation-speed:1.5s}}.offcanvas,.offcanvas-lg,.offcanvas-md,.offcanvas-sm,.offcanvas-xl,.offcanvas-xxl{--bs-offcanvas-zindex:1045;--bs-offcanvas-width:400px;--bs-offcanvas-height:30vh;--bs-offcanvas-padding-x:1rem;--bs-offcanvas-padding-y:1rem;--bs-offcanvas-color: ;--bs-offcanvas-bg:#fff;--bs-offcanvas-border-width:1px;--bs-offcanvas-border-color:var(--bs-border-color-translucent);--bs-offcanvas-box-shadow:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075)}@media (max-width:575.98px){.offcanvas-sm{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:575.98px) and (prefers-reduced-motion:reduce){.offcanvas-sm{transition:none}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:575.98px){.offcanvas-sm.show:not(.hiding),.offcanvas-sm.showing{transform:none}}@media (max-width:575.98px){.offcanvas-sm.hiding,.offcanvas-sm.show,.offcanvas-sm.showing{visibility:visible}}@media (min-width:576px){.offcanvas-sm{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-sm .offcanvas-header{display:none}.offcanvas-sm .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:767.98px){.offcanvas-md{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:767.98px) and (prefers-reduced-motion:reduce){.offcanvas-md{transition:none}}@media (max-width:767.98px){.offcanvas-md.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:767.98px){.offcanvas-md.show:not(.hiding),.offcanvas-md.showing{transform:none}}@media (max-width:767.98px){.offcanvas-md.hiding,.offcanvas-md.show,.offcanvas-md.showing{visibility:visible}}@media (min-width:768px){.offcanvas-md{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-md .offcanvas-header{display:none}.offcanvas-md .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:991.98px){.offcanvas-lg{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:991.98px) and (prefers-reduced-motion:reduce){.offcanvas-lg{transition:none}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:991.98px){.offcanvas-lg.show:not(.hiding),.offcanvas-lg.showing{transform:none}}@media (max-width:991.98px){.offcanvas-lg.hiding,.offcanvas-lg.show,.offcanvas-lg.showing{visibility:visible}}@media (min-width:992px){.offcanvas-lg{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-lg .offcanvas-header{display:none}.offcanvas-lg .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:1199.98px){.offcanvas-xl{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:1199.98px) and (prefers-reduced-motion:reduce){.offcanvas-xl{transition:none}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:1199.98px){.offcanvas-xl.show:not(.hiding),.offcanvas-xl.showing{transform:none}}@media (max-width:1199.98px){.offcanvas-xl.hiding,.offcanvas-xl.show,.offcanvas-xl.showing{visibility:visible}}@media (min-width:1200px){.offcanvas-xl{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-xl .offcanvas-header{display:none}.offcanvas-xl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:1399.98px){.offcanvas-xxl{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:1399.98px) and (prefers-reduced-motion:reduce){.offcanvas-xxl{transition:none}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:1399.98px){.offcanvas-xxl.show:not(.hiding),.offcanvas-xxl.showing{transform:none}}@media (max-width:1399.98px){.offcanvas-xxl.hiding,.offcanvas-xxl.show,.offcanvas-xxl.showing{visibility:visible}}@media (min-width:1400px){.offcanvas-xxl{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-xxl .offcanvas-header{display:none}.offcanvas-xxl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}.offcanvas{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}@media (prefers-reduced-motion:reduce){.offcanvas{transition:none}}.offcanvas.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}.offcanvas.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}.offcanvas.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}.offcanvas.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}.offcanvas.show:not(.hiding),.offcanvas.showing{transform:none}.offcanvas.hiding,.offcanvas.show,.offcanvas.showing{visibility:visible}.offcanvas-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.offcanvas-backdrop.fade{opacity:0}.offcanvas-backdrop.show{opacity:.5}.offcanvas-header{display:flex;align-items:center;justify-content:space-between;padding:var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x)}.offcanvas-header .btn-close{padding:calc(var(--bs-offcanvas-padding-y) * .5) calc(var(--bs-offcanvas-padding-x) * .5);margin-top:calc(-.5 * var(--bs-offcanvas-padding-y));margin-right:calc(-.5 * var(--bs-offcanvas-padding-x));margin-bottom:calc(-.5 * var(--bs-offcanvas-padding-y))}.offcanvas-title{margin-bottom:0;line-height:1.5}.offcanvas-body{flex-grow:1;padding:var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x);overflow-y:auto}.placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentcolor;opacity:.5}.placeholder.btn::before{display:inline-block;content:""}.placeholder-xs{min-height:.6em}.placeholder-sm{min-height:.8em}.placeholder-lg{min-height:1.2em}.placeholder-glow .placeholder{animation:placeholder-glow 2s ease-in-out infinite}@keyframes placeholder-glow{50%{opacity:.2}}.placeholder-wave{-webkit-mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);-webkit-mask-size:200% 100%;mask-size:200% 100%;animation:placeholder-wave 2s linear infinite}@keyframes placeholder-wave{100%{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}.clearfix::after{display:block;clear:both;content:""}.text-bg-primary{color:#fff!important;background-color:RGBA(13,110,253,var(--bs-bg-opacity,1))!important}.text-bg-secondary{color:#fff!important;background-color:RGBA(108,117,125,var(--bs-bg-opacity,1))!important}.text-bg-success{color:#fff!important;background-color:RGBA(25,135,84,var(--bs-bg-opacity,1))!important}.text-bg-info{color:#000!important;background-color:RGBA(13,202,240,var(--bs-bg-opacity,1))!important}.text-bg-warning{color:#000!important;background-color:RGBA(255,193,7,var(--bs-bg-opacity,1))!important}.text-bg-danger{color:#fff!important;background-color:RGBA(220,53,69,var(--bs-bg-opacity,1))!important}.text-bg-light{color:#000!important;background-color:RGBA(248,249,250,var(--bs-bg-opacity,1))!important}.text-bg-dark{color:#fff!important;background-color:RGBA(33,37,41,var(--bs-bg-opacity,1))!important}.link-primary{color:#0d6efd!important}.link-primary:focus,.link-primary:hover{color:#0a58ca!important}.link-secondary{color:#6c757d!important}.link-secondary:focus,.link-secondary:hover{color:#565e64!important}.link-success{color:#198754!important}.link-success:focus,.link-success:hover{color:#146c43!important}.link-info{color:#0dcaf0!important}.link-info:focus,.link-info:hover{color:#3dd5f3!important}.link-warning{color:#ffc107!important}.link-warning:focus,.link-warning:hover{color:#ffcd39!important}.link-danger{color:#dc3545!important}.link-danger:focus,.link-danger:hover{color:#b02a37!important}.link-light{color:#f8f9fa!important}.link-light:focus,.link-light:hover{color:#f9fafb!important}.link-dark{color:#212529!important}.link-dark:focus,.link-dark:hover{color:#1a1e21!important}.ratio{position:relative;width:100%}.ratio::before{display:block;padding-top:var(--bs-aspect-ratio);content:""}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-1x1{--bs-aspect-ratio:100%}.ratio-4x3{--bs-aspect-ratio:75%}.ratio-16x9{--bs-aspect-ratio:56.25%}.ratio-21x9{--bs-aspect-ratio:42.8571428571%}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}@media (min-width:576px){.sticky-sm-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-sm-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:768px){.sticky-md-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-md-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:992px){.sticky-lg-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-lg-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:1200px){.sticky-xl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-xl-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:1400px){.sticky-xxl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-xxl-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}.hstack{display:flex;flex-direction:row;align-items:center;align-self:stretch}.vstack{display:flex;flex:1 1 auto;flex-direction:column;align-self:stretch}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:""}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vr{display:inline-block;align-self:stretch;width:1px;min-height:1em;background-color:currentcolor;opacity:.25}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.float-start{float:left!important}.float-end{float:right!important}.float-none{float:none!important}.opacity-0{opacity:0!important}.opacity-25{opacity:.25!important}.opacity-50{opacity:.5!important}.opacity-75{opacity:.75!important}.opacity-100{opacity:1!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-visible{overflow:visible!important}.overflow-scroll{overflow:scroll!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.top-0{top:0!important}.top-50{top:50%!important}.top-100{top:100%!important}.bottom-0{bottom:0!important}.bottom-50{bottom:50%!important}.bottom-100{bottom:100%!important}.start-0{left:0!important}.start-50{left:50%!important}.start-100{left:100%!important}.end-0{right:0!important}.end-50{right:50%!important}.end-100{right:100%!important}.translate-middle{transform:translate(-50%,-50%)!important}.translate-middle-x{transform:translateX(-50%)!important}.translate-middle-y{transform:translateY(-50%)!important}.border{border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-0{border:0!important}.border-top{border-top:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-top-0{border-top:0!important}.border-end{border-right:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-end-0{border-right:0!important}.border-bottom{border-bottom:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-bottom-0{border-bottom:0!important}.border-start{border-left:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-start-0{border-left:0!important}.border-primary{--bs-border-opacity:1;border-color:rgba(var(--bs-primary-rgb),var(--bs-border-opacity))!important}.border-secondary{--bs-border-opacity:1;border-color:rgba(var(--bs-secondary-rgb),var(--bs-border-opacity))!important}.border-success{--bs-border-opacity:1;border-color:rgba(var(--bs-success-rgb),var(--bs-border-opacity))!important}.border-info{--bs-border-opacity:1;border-color:rgba(var(--bs-info-rgb),var(--bs-border-opacity))!important}.border-warning{--bs-border-opacity:1;border-color:rgba(var(--bs-warning-rgb),var(--bs-border-opacity))!important}.border-danger{--bs-border-opacity:1;border-color:rgba(var(--bs-danger-rgb),var(--bs-border-opacity))!important}.border-light{--bs-border-opacity:1;border-color:rgba(var(--bs-light-rgb),var(--bs-border-opacity))!important}.border-dark{--bs-border-opacity:1;border-color:rgba(var(--bs-dark-rgb),var(--bs-border-opacity))!important}.border-white{--bs-border-opacity:1;border-color:rgba(var(--bs-white-rgb),var(--bs-border-opacity))!important}.border-1{--bs-border-width:1px}.border-2{--bs-border-width:2px}.border-3{--bs-border-width:3px}.border-4{--bs-border-width:4px}.border-5{--bs-border-width:5px}.border-opacity-10{--bs-border-opacity:0.1}.border-opacity-25{--bs-border-opacity:0.25}.border-opacity-50{--bs-border-opacity:0.5}.border-opacity-75{--bs-border-opacity:0.75}.border-opacity-100{--bs-border-opacity:1}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.mw-100{max-width:100%!important}.vw-100{width:100vw!important}.min-vw-100{min-width:100vw!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mh-100{max-height:100%!important}.vh-100{height:100vh!important}.min-vh-100{min-height:100vh!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-right:0!important;margin-left:0!important}.mx-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-auto{margin-left:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-right:0!important;padding-left:0!important}.px-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-right:0!important}.pe-1{padding-right:.25rem!important}.pe-2{padding-right:.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-left:0!important}.ps-1{padding-left:.25rem!important}.ps-2{padding-left:.5rem!important}.ps-3{padding-left:1rem!important}.ps-4{padding-left:1.5rem!important}.ps-5{padding-left:3rem!important}.gap-0{gap:0!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:1rem!important}.gap-4{gap:1.5rem!important}.gap-5{gap:3rem!important}.font-monospace{font-family:var(--bs-font-monospace)!important}.fs-1{font-size:calc(1.375rem + 1.5vw)!important}.fs-2{font-size:calc(1.325rem + .9vw)!important}.fs-3{font-size:calc(1.3rem + .6vw)!important}.fs-4{font-size:calc(1.275rem + .3vw)!important}.fs-5{font-size:1.25rem!important}.fs-6{font-size:1rem!important}.fst-italic{font-style:italic!important}.fst-normal{font-style:normal!important}.fw-light{font-weight:300!important}.fw-lighter{font-weight:lighter!important}.fw-normal{font-weight:400!important}.fw-bold{font-weight:700!important}.fw-semibold{font-weight:600!important}.fw-bolder{font-weight:bolder!important}.lh-1{line-height:1!important}.lh-sm{line-height:1.25!important}.lh-base{line-height:1.5!important}.lh-lg{line-height:2!important}.text-start{text-align:left!important}.text-end{text-align:right!important}.text-center{text-align:center!important}.text-decoration-none{text-decoration:none!important}.text-decoration-underline{text-decoration:underline!important}.text-decoration-line-through{text-decoration:line-through!important}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-break{word-wrap:break-word!important;word-break:break-word!important}.text-primary{--bs-text-opacity:1;color:rgba(var(--bs-primary-rgb),var(--bs-text-opacity))!important}.text-secondary{--bs-text-opacity:1;color:rgba(var(--bs-secondary-rgb),var(--bs-text-opacity))!important}.text-success{--bs-text-opacity:1;color:rgba(var(--bs-success-rgb),var(--bs-text-opacity))!important}.text-info{--bs-text-opacity:1;color:rgba(var(--bs-info-rgb),var(--bs-text-opacity))!important}.text-warning{--bs-text-opacity:1;color:rgba(var(--bs-warning-rgb),var(--bs-text-opacity))!important}.text-danger{--bs-text-opacity:1;color:rgba(var(--bs-danger-rgb),var(--bs-text-opacity))!important}.text-light{--bs-text-opacity:1;color:rgba(var(--bs-light-rgb),var(--bs-text-opacity))!important}.text-dark{--bs-text-opacity:1;color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}.text-black{--bs-text-opacity:1;color:rgba(var(--bs-black-rgb),var(--bs-text-opacity))!important}.text-white{--bs-text-opacity:1;color:rgba(var(--bs-white-rgb),var(--bs-text-opacity))!important}.text-body{--bs-text-opacity:1;color:rgba(var(--bs-body-color-rgb),var(--bs-text-opacity))!important}.text-muted{--bs-text-opacity:1;color:#6c757d!important}.text-black-50{--bs-text-opacity:1;color:rgba(0,0,0,.5)!important}.text-white-50{--bs-text-opacity:1;color:rgba(255,255,255,.5)!important}.text-reset{--bs-text-opacity:1;color:inherit!important}.text-opacity-25{--bs-text-opacity:0.25}.text-opacity-50{--bs-text-opacity:0.5}.text-opacity-75{--bs-text-opacity:0.75}.text-opacity-100{--bs-text-opacity:1}.bg-primary{--bs-bg-opacity:1;background-color:rgba(var(--bs-primary-rgb),var(--bs-bg-opacity))!important}.bg-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-secondary-rgb),var(--bs-bg-opacity))!important}.bg-success{--bs-bg-opacity:1;background-color:rgba(var(--bs-success-rgb),var(--bs-bg-opacity))!important}.bg-info{--bs-bg-opacity:1;background-color:rgba(var(--bs-info-rgb),var(--bs-bg-opacity))!important}.bg-warning{--bs-bg-opacity:1;background-color:rgba(var(--bs-warning-rgb),var(--bs-bg-opacity))!important}.bg-danger{--bs-bg-opacity:1;background-color:rgba(var(--bs-danger-rgb),var(--bs-bg-opacity))!important}.bg-light{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-rgb),var(--bs-bg-opacity))!important}.bg-dark{--bs-bg-opacity:1;background-color:rgba(var(--bs-dark-rgb),var(--bs-bg-opacity))!important}.bg-black{--bs-bg-opacity:1;background-color:rgba(var(--bs-black-rgb),var(--bs-bg-opacity))!important}.bg-white{--bs-bg-opacity:1;background-color:rgba(var(--bs-white-rgb),var(--bs-bg-opacity))!important}.bg-body{--bs-bg-opacity:1;background-color:rgba(var(--bs-body-bg-rgb),var(--bs-bg-opacity))!important}.bg-transparent{--bs-bg-opacity:1;background-color:transparent!important}.bg-opacity-10{--bs-bg-opacity:0.1}.bg-opacity-25{--bs-bg-opacity:0.25}.bg-opacity-50{--bs-bg-opacity:0.5}.bg-opacity-75{--bs-bg-opacity:0.75}.bg-opacity-100{--bs-bg-opacity:1}.bg-gradient{background-image:var(--bs-gradient)!important}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.pe-none{pointer-events:none!important}.pe-auto{pointer-events:auto!important}.rounded{border-radius:var(--bs-border-radius)!important}.rounded-0{border-radius:0!important}.rounded-1{border-radius:var(--bs-border-radius-sm)!important}.rounded-2{border-radius:var(--bs-border-radius)!important}.rounded-3{border-radius:var(--bs-border-radius-lg)!important}.rounded-4{border-radius:var(--bs-border-radius-xl)!important}.rounded-5{border-radius:var(--bs-border-radius-2xl)!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:var(--bs-border-radius-pill)!important}.rounded-top{border-top-left-radius:var(--bs-border-radius)!important;border-top-right-radius:var(--bs-border-radius)!important}.rounded-end{border-top-right-radius:var(--bs-border-radius)!important;border-bottom-right-radius:var(--bs-border-radius)!important}.rounded-bottom{border-bottom-right-radius:var(--bs-border-radius)!important;border-bottom-left-radius:var(--bs-border-radius)!important}.rounded-start{border-bottom-left-radius:var(--bs-border-radius)!important;border-top-left-radius:var(--bs-border-radius)!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media (min-width:576px){.float-sm-start{float:left!important}.float-sm-end{float:right!important}.float-sm-none{float:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-right:0!important;margin-left:0!important}.mx-sm-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-sm-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-sm-3{margin-right:1rem!important;margin-left:1rem!important}.mx-sm-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-sm-5{margin-right:3rem!important;margin-left:3rem!important}.mx-sm-auto{margin-right:auto!important;margin-left:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-right:0!important}.me-sm-1{margin-right:.25rem!important}.me-sm-2{margin-right:.5rem!important}.me-sm-3{margin-right:1rem!important}.me-sm-4{margin-right:1.5rem!important}.me-sm-5{margin-right:3rem!important}.me-sm-auto{margin-right:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-left:0!important}.ms-sm-1{margin-left:.25rem!important}.ms-sm-2{margin-left:.5rem!important}.ms-sm-3{margin-left:1rem!important}.ms-sm-4{margin-left:1.5rem!important}.ms-sm-5{margin-left:3rem!important}.ms-sm-auto{margin-left:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-right:0!important;padding-left:0!important}.px-sm-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-sm-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-sm-3{padding-right:1rem!important;padding-left:1rem!important}.px-sm-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-sm-5{padding-right:3rem!important;padding-left:3rem!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-right:0!important}.pe-sm-1{padding-right:.25rem!important}.pe-sm-2{padding-right:.5rem!important}.pe-sm-3{padding-right:1rem!important}.pe-sm-4{padding-right:1.5rem!important}.pe-sm-5{padding-right:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-left:0!important}.ps-sm-1{padding-left:.25rem!important}.ps-sm-2{padding-left:.5rem!important}.ps-sm-3{padding-left:1rem!important}.ps-sm-4{padding-left:1.5rem!important}.ps-sm-5{padding-left:3rem!important}.gap-sm-0{gap:0!important}.gap-sm-1{gap:.25rem!important}.gap-sm-2{gap:.5rem!important}.gap-sm-3{gap:1rem!important}.gap-sm-4{gap:1.5rem!important}.gap-sm-5{gap:3rem!important}.text-sm-start{text-align:left!important}.text-sm-end{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.float-md-start{float:left!important}.float-md-end{float:right!important}.float-md-none{float:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-right:0!important;margin-left:0!important}.mx-md-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-md-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-md-3{margin-right:1rem!important;margin-left:1rem!important}.mx-md-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-md-5{margin-right:3rem!important;margin-left:3rem!important}.mx-md-auto{margin-right:auto!important;margin-left:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-right:0!important}.me-md-1{margin-right:.25rem!important}.me-md-2{margin-right:.5rem!important}.me-md-3{margin-right:1rem!important}.me-md-4{margin-right:1.5rem!important}.me-md-5{margin-right:3rem!important}.me-md-auto{margin-right:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-left:0!important}.ms-md-1{margin-left:.25rem!important}.ms-md-2{margin-left:.5rem!important}.ms-md-3{margin-left:1rem!important}.ms-md-4{margin-left:1.5rem!important}.ms-md-5{margin-left:3rem!important}.ms-md-auto{margin-left:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-right:0!important;padding-left:0!important}.px-md-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-md-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-md-3{padding-right:1rem!important;padding-left:1rem!important}.px-md-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-md-5{padding-right:3rem!important;padding-left:3rem!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-right:0!important}.pe-md-1{padding-right:.25rem!important}.pe-md-2{padding-right:.5rem!important}.pe-md-3{padding-right:1rem!important}.pe-md-4{padding-right:1.5rem!important}.pe-md-5{padding-right:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-left:0!important}.ps-md-1{padding-left:.25rem!important}.ps-md-2{padding-left:.5rem!important}.ps-md-3{padding-left:1rem!important}.ps-md-4{padding-left:1.5rem!important}.ps-md-5{padding-left:3rem!important}.gap-md-0{gap:0!important}.gap-md-1{gap:.25rem!important}.gap-md-2{gap:.5rem!important}.gap-md-3{gap:1rem!important}.gap-md-4{gap:1.5rem!important}.gap-md-5{gap:3rem!important}.text-md-start{text-align:left!important}.text-md-end{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.float-lg-start{float:left!important}.float-lg-end{float:right!important}.float-lg-none{float:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-right:0!important;margin-left:0!important}.mx-lg-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-lg-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-lg-3{margin-right:1rem!important;margin-left:1rem!important}.mx-lg-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-lg-5{margin-right:3rem!important;margin-left:3rem!important}.mx-lg-auto{margin-right:auto!important;margin-left:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-right:0!important}.me-lg-1{margin-right:.25rem!important}.me-lg-2{margin-right:.5rem!important}.me-lg-3{margin-right:1rem!important}.me-lg-4{margin-right:1.5rem!important}.me-lg-5{margin-right:3rem!important}.me-lg-auto{margin-right:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-left:0!important}.ms-lg-1{margin-left:.25rem!important}.ms-lg-2{margin-left:.5rem!important}.ms-lg-3{margin-left:1rem!important}.ms-lg-4{margin-left:1.5rem!important}.ms-lg-5{margin-left:3rem!important}.ms-lg-auto{margin-left:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-right:0!important;padding-left:0!important}.px-lg-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-lg-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-lg-3{padding-right:1rem!important;padding-left:1rem!important}.px-lg-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-lg-5{padding-right:3rem!important;padding-left:3rem!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-right:0!important}.pe-lg-1{padding-right:.25rem!important}.pe-lg-2{padding-right:.5rem!important}.pe-lg-3{padding-right:1rem!important}.pe-lg-4{padding-right:1.5rem!important}.pe-lg-5{padding-right:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-left:0!important}.ps-lg-1{padding-left:.25rem!important}.ps-lg-2{padding-left:.5rem!important}.ps-lg-3{padding-left:1rem!important}.ps-lg-4{padding-left:1.5rem!important}.ps-lg-5{padding-left:3rem!important}.gap-lg-0{gap:0!important}.gap-lg-1{gap:.25rem!important}.gap-lg-2{gap:.5rem!important}.gap-lg-3{gap:1rem!important}.gap-lg-4{gap:1.5rem!important}.gap-lg-5{gap:3rem!important}.text-lg-start{text-align:left!important}.text-lg-end{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.float-xl-start{float:left!important}.float-xl-end{float:right!important}.float-xl-none{float:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-right:0!important;margin-left:0!important}.mx-xl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xl-auto{margin-right:auto!important;margin-left:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-right:0!important}.me-xl-1{margin-right:.25rem!important}.me-xl-2{margin-right:.5rem!important}.me-xl-3{margin-right:1rem!important}.me-xl-4{margin-right:1.5rem!important}.me-xl-5{margin-right:3rem!important}.me-xl-auto{margin-right:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-left:0!important}.ms-xl-1{margin-left:.25rem!important}.ms-xl-2{margin-left:.5rem!important}.ms-xl-3{margin-left:1rem!important}.ms-xl-4{margin-left:1.5rem!important}.ms-xl-5{margin-left:3rem!important}.ms-xl-auto{margin-left:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-right:0!important;padding-left:0!important}.px-xl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-right:0!important}.pe-xl-1{padding-right:.25rem!important}.pe-xl-2{padding-right:.5rem!important}.pe-xl-3{padding-right:1rem!important}.pe-xl-4{padding-right:1.5rem!important}.pe-xl-5{padding-right:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-left:0!important}.ps-xl-1{padding-left:.25rem!important}.ps-xl-2{padding-left:.5rem!important}.ps-xl-3{padding-left:1rem!important}.ps-xl-4{padding-left:1.5rem!important}.ps-xl-5{padding-left:3rem!important}.gap-xl-0{gap:0!important}.gap-xl-1{gap:.25rem!important}.gap-xl-2{gap:.5rem!important}.gap-xl-3{gap:1rem!important}.gap-xl-4{gap:1.5rem!important}.gap-xl-5{gap:3rem!important}.text-xl-start{text-align:left!important}.text-xl-end{text-align:right!important}.text-xl-center{text-align:center!important}}@media (min-width:1400px){.float-xxl-start{float:left!important}.float-xxl-end{float:right!important}.float-xxl-none{float:none!important}.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-right:0!important;margin-left:0!important}.mx-xxl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xxl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xxl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xxl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xxl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xxl-auto{margin-right:auto!important;margin-left:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xxl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-right:0!important}.me-xxl-1{margin-right:.25rem!important}.me-xxl-2{margin-right:.5rem!important}.me-xxl-3{margin-right:1rem!important}.me-xxl-4{margin-right:1.5rem!important}.me-xxl-5{margin-right:3rem!important}.me-xxl-auto{margin-right:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-left:0!important}.ms-xxl-1{margin-left:.25rem!important}.ms-xxl-2{margin-left:.5rem!important}.ms-xxl-3{margin-left:1rem!important}.ms-xxl-4{margin-left:1.5rem!important}.ms-xxl-5{margin-left:3rem!important}.ms-xxl-auto{margin-left:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-right:0!important;padding-left:0!important}.px-xxl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xxl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xxl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xxl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xxl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xxl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pe-xxl-0{padding-right:0!important}.pe-xxl-1{padding-right:.25rem!important}.pe-xxl-2{padding-right:.5rem!important}.pe-xxl-3{padding-right:1rem!important}.pe-xxl-4{padding-right:1.5rem!important}.pe-xxl-5{padding-right:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-left:0!important}.ps-xxl-1{padding-left:.25rem!important}.ps-xxl-2{padding-left:.5rem!important}.ps-xxl-3{padding-left:1rem!important}.ps-xxl-4{padding-left:1.5rem!important}.ps-xxl-5{padding-left:3rem!important}.gap-xxl-0{gap:0!important}.gap-xxl-1{gap:.25rem!important}.gap-xxl-2{gap:.5rem!important}.gap-xxl-3{gap:1rem!important}.gap-xxl-4{gap:1.5rem!important}.gap-xxl-5{gap:3rem!important}.text-xxl-start{text-align:left!important}.text-xxl-end{text-align:right!important}.text-xxl-center{text-align:center!important}}@media (min-width:1200px){.fs-1{font-size:2.5rem!important}.fs-2{font-size:2rem!important}.fs-3{font-size:1.75rem!important}.fs-4{font-size:1.5rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}}`,""]);const G=T},5018:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(78706),i=r.n(n),o=r(72859),a=r.n(o)()(i());a.push([t.id,".chsp-meta {\n z-index: 1;\n cursor: pointer;\n}\n\n.chsp-meta .chsp-info-icon {\n float: right;\n margin-top: 5px;\n margin-left: 3px;\n}\n\n.chsp-meta .chsp-info-icon svg {\n display: block;\n width: 14px;\n height: 14px;\n opacity: 0.6;\n}\n\n.chsp-authors-list {\n padding: 0;\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n justify-content: center;\n}\n\n.chsp-authors-list li {\n border: solid #dee2e6 1px;\n padding: 10px;\n list-style-type: none;\n white-space: nowrap;\n}\n\n.chsp-open-map-settings {\n position: absolute;\n top: 3px;\n left: 5px;\n z-index: 10;\n}\n\n.chsp-open-viewer-settings {\n position: absolute;\n top: 5px;\n right: 5px;\n}\n\n.chsp-extra-options-btn {\n margin: auto;\n display: block;\n}\n\n/* Tooltip text */\n.chsp-tooltip {\n visibility: hidden;\n background: #69738a;\n color: white;\n padding: 6px;\n font-size: 12px;\n line-height: 12px;\n white-space: nowrap;\n border-radius: 2px;\n text-align: center;\n display: inline-block;\n width: 9em;\n position: absolute;\n z-index: 100000;\n}\n\n.chsp-tooltip-right {\n top: 0px;\n right: -9.5em;\n}\n\n.chsp-tooltip-below {\n top: 35px;\n left: -3.5em;\n}\n\n.chsp-has-tooltip:hover .chsp-tooltip {\n visibility: visible;\n}\n\n.chsp-pin-marker {\n border-radius: 50%;\n border: solid 1px black;\n --size: 12px;\n width: var(--size);\n height: var(--size);\n z-index: 10;\n}\n\n.chsp-map-pin-marker {\n position: absolute;\n /* ensure the top/right/left/bottom positioning is relative to the center of the div */\n transform: translate(calc(-50% + var(--size)), -50%);\n}\n\n.chsp-pin-marker:hover {\n --size: 20px;\n cursor: pointer;\n}\n\n/* This class is added on top of .chsp-pin-marker for the active pinned structure/environment */\n.chsp-active-pin {\n border-width: 2px;\n --size: 20px;\n}\n\n.chsp-active-pin:hover {\n --size: 22px;\n cursor: default;\n}\n\n.chsp-viewer-button {\n position: absolute;\n padding: 1px;\n margin: 0;\n height: 28px;\n width: 28px;\n z-index: 10;\n}\n\n.chsp-viewer-action-button {\n background-color: white;\n border: none;\n}\n\n.chsp-viewer-action-button:hover {\n background: white;\n}\n\n.chsp-viewer-action-button svg {\n opacity: 0.4;\n transition: opacity 0.15s ease-in-out;\n}\n\n.chsp-viewer-action-button:hover svg {\n opacity: 0.6;\n}\n\n.chsp-structure-viewer-grid {\n display: grid;\n position: relative;\n width: 100%;\n height: 100%;\n grid-column-gap: 2px;\n grid-row-gap: 2px;\n}\n\n.chsp-structure-viewer-cell {\n width: 99%;\n height: 99%;\n left: 0.5%;\n top: 0.5%;\n position: relative;\n border: 1px solid lightgray;\n padding: 1px;\n}\n\n.chsp-structure-viewer-cell-active {\n border-color: gray;\n}\n\n.chsp-map-options {\n display: grid;\n grid-template-columns: 1fr 0.5fr;\n align-items: center;\n justify-content: center;\n align-content: start;\n column-gap: 1em;\n}\n\n.chsp-map-options label {\n min-width: 6em;\n}\n\n.chsp-map-options > :nth-child(n + 3):not(.chsp-map-extra-options) {\n margin-top: 1.3rem;\n}\n\n.chsp-map-extra-options {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: auto 1fr 1fr;\n column-gap: 1em;\n}\n\n.chsp-map-extra-options > * {\n margin: 0.5em 0;\n}\n\n.chsp-map-extra-options label {\n min-width: auto;\n}\n\n.chsp-map-extra-options {\n grid-column: 1 / span 2;\n}\n\n.chsp-map-options .form-check-label {\n width: auto;\n}\n\n.chsp-modal-header {\n cursor: grab;\n}\n\n.chsp-play-button {\n border: 0;\n background: transparent;\n box-sizing: border-box;\n height: 1.2em;\n width: 1.2em;\n margin-left: 0.5ex;\n\n border-color: transparent transparent transparent #202020;\n transition: 100ms all ease;\n cursor: pointer;\n\n border-style: solid;\n border-width: 0.7em 0 0.7em 1em;\n}\n\n.chsp-play-button.chsp-playing {\n border-style: double;\n border-width: 0px 0 0px 1.2em;\n}\n\n.chsp-play-button:hover {\n border-color: transparent transparent transparent #404040;\n}\n\n.chsp-properties-table {\n height: 100%;\n width: 80%;\n margin: auto;\n}\n\n.chsp-properties-table td,\n.chsp-properties-table th {\n width: 50%;\n border-top: none;\n}\n\n.chsp-settings-section-title {\n font-weight: bold;\n}\n\n/* Change Plotly modebar style to match the style of the structure grid buttons */\n\n.chsp-map .modebar-group {\n padding-left: 0 !important;\n}\n\n.chsp-map .modebar-btn {\n cursor: default !important;\n font-family: apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n 'Noto Color Emoji';\n}\n\n.chsp-map .modebar-btn::after {\n opacity: 0.9;\n}\n\n.chsp-map .icon:hover + .modebar-btn::after {\n visibility: visible;\n}\n\n.chsp-map .modebar-btn::before {\n content: none !important;\n}\n\n.chsp-map .modebar-btn .icon {\n transition: opacity 0.15s ease-in-out;\n padding: 3px;\n opacity: 0.3;\n cursor: pointer;\n}\n\n.chsp-map .modebar-group svg.icon {\n width: 2em;\n height: 2em;\n border-radius: 0.2em;\n}\n\n.chsp-map .modebar-group svg.icon:active {\n color: #212529;\n background-color: #dae0e5;\n border-color: #d3d9df;\n box-shadow: 0 0 0 0.2rem rgb(216 217 219 / 50%);\n}\n\n.chsp-map .modebar-btn .icon path {\n transition:\n color 0.15s ease-in-out,\n background-color 0.15s ease-in-out,\n border-color 0.15s ease-in-out,\n box-shadow 0.15s ease-in-out;\n fill: black !important;\n}\n\n.chsp-map .modebar-btn .icon:hover {\n opacity: 0.6;\n}\n\n.chsp-map .modebar-btn.active .icon {\n opacity: 0.6;\n}\n\n.chsp-info-btns {\n display: flex;\n position: relative;\n margin-bottom: 0.5ex;\n margin-top: 0.5ex;\n justify-content: center;\n}\n\n.chsp-info-structure-btn {\n min-width: 8em;\n padding-left: 6px;\n padding-right: 4px;\n font-weight: bold;\n font-size: small;\n background-color: none;\n border-color: #66a5e8;\n border-width: 2px;\n float: left;\n}\n\n.chsp-info-structure-btn:hover {\n background-color: #5b94d0;\n}\n\n.chsp-info-atom-btn {\n margin-left: 1em;\n padding-left: 6px;\n padding-right: 4px;\n min-width: 8em;\n font-weight: bold;\n font-size: small;\n background-color: none;\n border-color: #4cb64c;\n border-width: 2px;\n}\n\n.chsp-info-atom-btn:hover {\n background-color: #44a344;\n}\n\n.chsp-info-btns-svg {\n float: left;\n padding-right: 6px;\n padding-top: 3px;\n}\n\n.chsp-info-btns-svg svg {\n display: block;\n opacity: 0.6;\n}\n\n.chsp-info-number {\n -moz-appearance: textfield;\n appearance: textfield;\n border: none;\n transition: background-color 0.15s;\n background-color: #ebedf0;\n margin-left: 2px;\n margin-right: 3px;\n font-family: inherit;\n width: 4em;\n}\n\n.chsp-info-atom-btn:hover .chsp-info-number {\n background-color: #69b569;\n}\n\n.chsp-info-structure-btn:hover .chsp-info-number {\n background-color: #7ba9d9;\n}\n\n.chsp-info-number::-webkit-outer-spin-button,\n.chsp-info-number::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.chsp-info-tables {\n position: relative;\n width: 100%;\n}\n\n.chsp-info-table {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 10;\n background-color: white;\n /* max-height is set in JavaScript */\n overflow: auto;\n}\n\n.chsp-info-table.collapsing {\n overflow: hidden;\n}\n\n.chsp-info-table table {\n margin: 0;\n}\n\n/* Change the atoms slider thumb color to green, to match structure highlight */\n.chsp-atom-slider::-webkit-slider-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-moz-range-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-ms-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-webkit-slider-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider::-moz-range-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider::-ms-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider:focus::-webkit-slider-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-atom-slider:focus::-moz-range-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-atom-slider:focus::-ms-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-settings-representation {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr;\n grid-row-gap: 1ex;\n}\n\n.chsp-settings-representation label {\n cursor: help;\n}\n\n.chsp-settings-supercell {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr 2fr;\n}\n\n.chsp-supercell-count {\n max-width: 3.5em;\n}\n\n.chsp-settings-camera {\n display: grid;\n gap: 1em;\n grid-template-columns: repeat(7, auto);\n justify-content: center;\n}\n\n.chsp-settings-environments {\n display: grid;\n align-items: center;\n column-gap: 1em;\n grid-template-columns: 1fr 1fr 1fr;\n}\n\n.chsp-settings-extra-options {\n display: grid;\n gap: 1em;\n grid-template-columns: 1fr 1fr 1fr;\n grid-column: 1 / span 3;\n}\n\n.chsp-settings-extra-options > :nth-child(-n + 3) {\n margin-top: 1em;\n}\n\n.chsp-settings-trajectory {\n display: grid;\n grid-template-columns: 12em 12em;\n justify-content: center;\n align-content: center;\n gap: 1em;\n margin-bottom: 1ex;\n}\n\n.chsp-cell-info {\n position: absolute;\n bottom: 5px;\n left: 5px;\n font-size: 0.8em;\n}\n\n.chsp-toggle-plot-btn {\n display: block;\n position: relative;\n margin-top: 3px;\n margin-bottom: 1px;\n}\n\n.chsp-atom-color-property {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: 1fr 1fr;\n column-gap: 1em;\n margin: 0.5em 0;\n}\n\n.chsp-atom-extra-options {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: auto 1fr 1fr;\n column-gap: 1em;\n}\n\n.chsp-atom-extra-options > * {\n margin: 0.5em 0;\n}\n\n.chsp-atom-extra-options label {\n min-width: auto;\n}\n\n.chsp-atom-extra-options {\n grid-column: 1 / span 2;\n}\n\n.chsp-target-toggle {\n padding-left: 5px;\n padding-right: 5px;\n display: flex;\n justify-content: flex-end;\n gap: 5px;\n}\n\n.chsp-target-spinner {\n width: 25px;\n height: 25px;\n margin-left: 5px;\n}\n",""]);const s=a},48654:(t,e,r)=>{"use strict";r.d(e,{A:()=>V});var n=r(78706),i=r.n(n),o=r(72859),a=r.n(o),s=r(21906),l=r.n(s),c=new URL(r(35531),r.b),d=new URL(r(45419),r.b),u=new URL(r(83385),r.b),h=new URL(r(14274),r.b),f=new URL(r(57154),r.b),p=new URL(r(35782),r.b),m=new URL(r(54718),r.b),g=new URL(r(48487),r.b),v=new URL(r(35372),r.b),b=new URL(r(17914),r.b),y=new URL(r(36366),r.b),x=new URL(r(67830),r.b),w=new URL(r(88832),r.b),_=new URL(r(57249),r.b),k=new URL(r(75932),r.b),A=new URL(r(11144),r.b),T=a()(i()),M=l()(c),S=l()(d),C=l()(u),E=l()(h),L=l()(f),z=l()(p),O=l()(m),D=l()(g),I=l()(v),R=l()(b),F=l()(y),P=l()(x),j=l()(w),N=l()(_),B=l()(k),U=l()(A);T.push([t.id,`@charset "UTF-8";/*!\n * Bootstrap v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors\n * Copyright 2011-2022 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-body-color-rgb:33,37,41;--bs-body-bg-rgb:255,255,255;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, 0.175);--bs-border-radius:0.375rem;--bs-border-radius-sm:0.25rem;--bs-border-radius-lg:0.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-2xl:2rem;--bs-border-radius-pill:50rem;--bs-link-color:#0d6efd;--bs-link-hover-color:#0a58ca;--bs-code-color:#d63384;--bs-highlight-bg:#fff3cd}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;border:0;border-top:1px solid;opacity:.25}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.small,small{font-size:.875em}.mark,mark{padding:.1875em;background-color:var(--bs-highlight-bg)}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:var(--bs-link-color);text-decoration:underline}a:hover{color:var(--bs-link-hover-color)}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:var(--bs-code-color);word-wrap:break-word}a>code{color:inherit}kbd{padding:.1875rem .375rem;font-size:.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:.25rem}kbd kbd{padding:0;font-size:1em}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none!important}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}::file-selector-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:calc(1.625rem + 4.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-1{font-size:5rem}}.display-2{font-size:calc(1.575rem + 3.9vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-2{font-size:4.5rem}}.display-3{font-size:calc(1.525rem + 3.3vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-3{font-size:4rem}}.display-4{font-size:calc(1.475rem + 2.7vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-4{font-size:3.5rem}}.display-5{font-size:calc(1.425rem + 2.1vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-5{font-size:3rem}}.display-6{font-size:calc(1.375rem + 1.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-6{font-size:2.5rem}}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:.875em;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote>:last-child{margin-bottom:0}.blockquote-footer{margin-top:-1rem;margin-bottom:1rem;font-size:.875em;color:#6c757d}.blockquote-footer::before{content:"— "}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid var(--bs-border-color);border-radius:.375rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:.875em;color:#6c757d}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{--bs-gutter-x:1.5rem;--bs-gutter-y:0;width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(-1 * var(--bs-gutter-y));margin-right:calc(-.5 * var(--bs-gutter-x));margin-left:calc(-.5 * var(--bs-gutter-x))}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.33333333%}.col-2{flex:0 0 auto;width:16.66666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.33333333%}.col-5{flex:0 0 auto;width:41.66666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.33333333%}.col-8{flex:0 0 auto;width:66.66666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.33333333%}.col-11{flex:0 0 auto;width:91.66666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.33333333%}.col-sm-2{flex:0 0 auto;width:16.66666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.33333333%}.col-sm-5{flex:0 0 auto;width:41.66666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.33333333%}.col-sm-8{flex:0 0 auto;width:66.66666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.33333333%}.col-sm-11{flex:0 0 auto;width:91.66666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.33333333%}.col-md-2{flex:0 0 auto;width:16.66666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.33333333%}.col-md-5{flex:0 0 auto;width:41.66666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.33333333%}.col-md-8{flex:0 0 auto;width:66.66666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.33333333%}.col-md-11{flex:0 0 auto;width:91.66666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.33333333%}.col-lg-2{flex:0 0 auto;width:16.66666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.33333333%}.col-lg-5{flex:0 0 auto;width:41.66666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.33333333%}.col-lg-8{flex:0 0 auto;width:66.66666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.33333333%}.col-lg-11{flex:0 0 auto;width:91.66666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.33333333%}.col-xl-2{flex:0 0 auto;width:16.66666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.33333333%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.33333333%}.col-xl-8{flex:0 0 auto;width:66.66666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.33333333%}.col-xl-11{flex:0 0 auto;width:91.66666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0%}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.33333333%}.col-xxl-2{flex:0 0 auto;width:16.66666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.33333333%}.col-xxl-5{flex:0 0 auto;width:41.66666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.33333333%}.col-xxl-8{flex:0 0 auto;width:66.66666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.33333333%}.col-xxl-11{flex:0 0 auto;width:91.66666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.33333333%}.offset-xxl-2{margin-left:16.66666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.33333333%}.offset-xxl-5{margin-left:41.66666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.33333333%}.offset-xxl-8{margin-left:66.66666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.33333333%}.offset-xxl-11{margin-left:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.table{--bs-table-color:var(--bs-body-color);--bs-table-bg:transparent;--bs-table-border-color:var(--bs-border-color);--bs-table-accent-bg:transparent;--bs-table-striped-color:var(--bs-body-color);--bs-table-striped-bg:rgba(0, 0, 0, 0.05);--bs-table-active-color:var(--bs-body-color);--bs-table-active-bg:rgba(0, 0, 0, 0.1);--bs-table-hover-color:var(--bs-body-color);--bs-table-hover-bg:rgba(0, 0, 0, 0.075);width:100%;margin-bottom:1rem;color:var(--bs-table-color);vertical-align:top;border-color:var(--bs-table-border-color)}.table>:not(caption)>*>*{padding:.5rem .5rem;background-color:var(--bs-table-bg);border-bottom-width:1px;box-shadow:inset 0 0 0 9999px var(--bs-table-accent-bg)}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table-group-divider{border-top:2px solid currentcolor}.caption-top{caption-side:top}.table-sm>:not(caption)>*>*{padding:.25rem .25rem}.table-bordered>:not(caption)>*{border-width:1px 0}.table-bordered>:not(caption)>*>*{border-width:0 1px}.table-borderless>:not(caption)>*>*{border-bottom-width:0}.table-borderless>:not(:first-child){border-top-width:0}.table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-striped-columns>:not(caption)>tr>:nth-child(2n){--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-active{--bs-table-accent-bg:var(--bs-table-active-bg);color:var(--bs-table-active-color)}.table-hover>tbody>tr:hover>*{--bs-table-accent-bg:var(--bs-table-hover-bg);color:var(--bs-table-hover-color)}.table-primary{--bs-table-color:#000;--bs-table-bg:#cfe2ff;--bs-table-border-color:#bacbe6;--bs-table-striped-bg:#c5d7f2;--bs-table-striped-color:#000;--bs-table-active-bg:#bacbe6;--bs-table-active-color:#000;--bs-table-hover-bg:#bfd1ec;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-secondary{--bs-table-color:#000;--bs-table-bg:#e2e3e5;--bs-table-border-color:#cbccce;--bs-table-striped-bg:#d7d8da;--bs-table-striped-color:#000;--bs-table-active-bg:#cbccce;--bs-table-active-color:#000;--bs-table-hover-bg:#d1d2d4;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-success{--bs-table-color:#000;--bs-table-bg:#d1e7dd;--bs-table-border-color:#bcd0c7;--bs-table-striped-bg:#c7dbd2;--bs-table-striped-color:#000;--bs-table-active-bg:#bcd0c7;--bs-table-active-color:#000;--bs-table-hover-bg:#c1d6cc;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-info{--bs-table-color:#000;--bs-table-bg:#cff4fc;--bs-table-border-color:#badce3;--bs-table-striped-bg:#c5e8ef;--bs-table-striped-color:#000;--bs-table-active-bg:#badce3;--bs-table-active-color:#000;--bs-table-hover-bg:#bfe2e9;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-warning{--bs-table-color:#000;--bs-table-bg:#fff3cd;--bs-table-border-color:#e6dbb9;--bs-table-striped-bg:#f2e7c3;--bs-table-striped-color:#000;--bs-table-active-bg:#e6dbb9;--bs-table-active-color:#000;--bs-table-hover-bg:#ece1be;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-danger{--bs-table-color:#000;--bs-table-bg:#f8d7da;--bs-table-border-color:#dfc2c4;--bs-table-striped-bg:#eccccf;--bs-table-striped-color:#000;--bs-table-active-bg:#dfc2c4;--bs-table-active-color:#000;--bs-table-hover-bg:#e5c7ca;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-light{--bs-table-color:#000;--bs-table-bg:#f8f9fa;--bs-table-border-color:#dfe0e1;--bs-table-striped-bg:#ecedee;--bs-table-striped-color:#000;--bs-table-active-bg:#dfe0e1;--bs-table-active-color:#000;--bs-table-hover-bg:#e5e6e7;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-dark{--bs-table-color:#fff;--bs-table-bg:#212529;--bs-table-border-color:#373b3e;--bs-table-striped-bg:#2c3034;--bs-table-striped-color:#fff;--bs-table-active-bg:#373b3e;--bs-table-active-color:#fff;--bs-table-hover-bg:#323539;--bs-table-hover-color:#fff;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media (max-width:575.98px){.table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:767.98px){.table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:991.98px){.table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1199.98px){.table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1399.98px){.table-responsive-xxl{overflow-x:auto;-webkit-overflow-scrolling:touch}}.form-label{margin-bottom:.5rem}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem}.form-text{margin-top:.25rem;font-size:.875em;color:#6c757d}.form-control{display:block;width:100%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.375rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not([readonly]){cursor:pointer}.form-control:focus{color:#212529;background-color:#fff;border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-control::-webkit-date-and-time-value{height:1.5em}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled{background-color:#e9ecef;opacity:1}.form-control::-webkit-file-upload-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control::file-selector-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}.form-control::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#dde0e3}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:#dde0e3}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext:focus{outline:0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{min-height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;border-radius:.25rem}.form-control-sm::-webkit-file-upload-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-sm::file-selector-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-lg{min-height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;border-radius:.5rem}.form-control-lg::-webkit-file-upload-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.form-control-lg::file-selector-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}textarea.form-control{min-height:calc(1.5em + .75rem + 2px)}textarea.form-control-sm{min-height:calc(1.5em + .5rem + 2px)}textarea.form-control-lg{min-height:calc(1.5em + 1rem + 2px)}.form-control-color{width:3rem;height:calc(1.5em + .75rem + 2px);padding:.375rem}.form-control-color:not(:disabled):not([readonly]){cursor:pointer}.form-control-color::-moz-color-swatch{border:0!important;border-radius:.375rem}.form-control-color::-webkit-color-swatch{border-radius:.375rem}.form-control-color.form-control-sm{height:calc(1.5em + .5rem + 2px)}.form-control-color.form-control-lg{height:calc(1.5em + 1rem + 2px)}.form-select{display:block;width:100%;padding:.375rem 2.25rem .375rem .75rem;-moz-padding-start:calc(0.75rem - 3px);font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-image:url(${M});background-repeat:no-repeat;background-position:right .75rem center;background-size:16px 12px;border:1px solid #ced4da;border-radius:.375rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-select{transition:none}}.form-select:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-select[multiple],.form-select[size]:not([size="1"]){padding-right:.75rem;background-image:none}.form-select:disabled{background-color:#e9ecef}.form-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #212529}.form-select-sm{padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem;border-radius:.25rem}.form-select-lg{padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem;border-radius:.5rem}.form-check{display:block;min-height:1.5rem;padding-left:1.5em;margin-bottom:.125rem}.form-check .form-check-input{float:left;margin-left:-1.5em}.form-check-reverse{padding-right:1.5em;padding-left:0;text-align:right}.form-check-reverse .form-check-input{float:right;margin-right:-1.5em;margin-left:0}.form-check-input{width:1em;height:1em;margin-top:.25em;vertical-align:top;background-color:#fff;background-repeat:no-repeat;background-position:center;background-size:contain;border:1px solid rgba(0,0,0,.25);-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;print-color-adjust:exact}.form-check-input[type=checkbox]{border-radius:.25em}.form-check-input[type=radio]{border-radius:50%}.form-check-input:active{filter:brightness(90%)}.form-check-input:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-check-input:checked{background-color:#0d6efd;border-color:#0d6efd}.form-check-input:checked[type=checkbox]{background-image:url(${S})}.form-check-input:checked[type=radio]{background-image:url(${C})}.form-check-input[type=checkbox]:indeterminate{background-color:#0d6efd;border-color:#0d6efd;background-image:url(${E})}.form-check-input:disabled{pointer-events:none;filter:none;opacity:.5}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:default;opacity:.5}.form-switch{padding-left:2.5em}.form-switch .form-check-input{width:2em;margin-left:-2.5em;background-image:url(${L});background-position:left center;border-radius:2em;transition:background-position .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-switch .form-check-input{transition:none}}.form-switch .form-check-input:focus{background-image:url(${z})}.form-switch .form-check-input:checked{background-position:right center;background-image:url(${O})}.form-switch.form-check-reverse{padding-right:2.5em;padding-left:0}.form-switch.form-check-reverse .form-check-input{margin-right:-2.5em;margin-left:0}.form-check-inline{display:inline-block;margin-right:1rem}.btn-check{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.btn-check:disabled+.btn,.btn-check[disabled]+.btn{pointer-events:none;filter:none;opacity:.65}.form-range{width:100%;height:1.5rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.form-range:focus{outline:0}.form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range::-moz-focus-outer{border:0}.form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#0d6efd;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}.form-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#0d6efd;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-moz-range-thumb{-moz-transition:none;transition:none}}.form-range::-moz-range-thumb:active{background-color:#b6d4fe}.form-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range:disabled{pointer-events:none}.form-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.form-range:disabled::-moz-range-thumb{background-color:#adb5bd}.form-floating{position:relative}.form-floating>.form-control,.form-floating>.form-control-plaintext,.form-floating>.form-select{height:calc(3.5rem + 2px);line-height:1.25}.form-floating>label{position:absolute;top:0;left:0;width:100%;height:100%;padding:1rem .75rem;overflow:hidden;text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:1px solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media (prefers-reduced-motion:reduce){.form-floating>label{transition:none}}.form-floating>.form-control,.form-floating>.form-control-plaintext{padding:1rem .75rem}.form-floating>.form-control-plaintext::-moz-placeholder,.form-floating>.form-control::-moz-placeholder{color:transparent}.form-floating>.form-control-plaintext::placeholder,.form-floating>.form-control::placeholder{color:transparent}.form-floating>.form-control-plaintext:not(:-moz-placeholder-shown),.form-floating>.form-control:not(:-moz-placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control-plaintext:focus,.form-floating>.form-control-plaintext:not(:placeholder-shown),.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control-plaintext:-webkit-autofill,.form-floating>.form-control:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-select{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:not(:-moz-placeholder-shown)~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control-plaintext~label,.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:-webkit-autofill~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control-plaintext~label{border-width:1px 0}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-floating,.input-group>.form-select{position:relative;flex:1 1 auto;width:1%;min-width:0}.input-group>.form-control:focus,.input-group>.form-floating:focus-within,.input-group>.form-select:focus{z-index:5}.input-group .btn{position:relative;z-index:2}.input-group .btn:focus{z-index:5}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.375rem}.input-group-lg>.btn,.input-group-lg>.form-control,.input-group-lg>.form-select,.input-group-lg>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;border-radius:.5rem}.input-group-sm>.btn,.input-group-sm>.form-control,.input-group-sm>.form-select,.input-group-sm>.input-group-text{padding:.25rem .5rem;font-size:.875rem;border-radius:.25rem}.input-group-lg>.form-select,.input-group-sm>.form-select{padding-right:3rem}.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3),.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-control,.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-select,.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.dropdown-toggle:nth-last-child(n+4),.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-control,.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-select,.input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.form-floating:not(:first-child)>.form-control,.input-group>.form-floating:not(:first-child)>.form-select{border-top-left-radius:0;border-bottom-left-radius:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#198754}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(25,135,84,.9);border-radius:.375rem}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#198754;padding-right:calc(1.5em + .75rem);background-image:url(${D});background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-valid,.was-validated .form-select:valid{border-color:#198754}.form-select.is-valid:not([multiple]):not([size]),.form-select.is-valid:not([multiple])[size="1"],.was-validated .form-select:valid:not([multiple]):not([size]),.was-validated .form-select:valid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url(${M}),url(${D});background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-valid:focus,.was-validated .form-select:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-control-color.is-valid,.was-validated .form-control-color:valid{width:calc(3rem + calc(1.5em + .75rem))}.form-check-input.is-valid,.was-validated .form-check-input:valid{border-color:#198754}.form-check-input.is-valid:checked,.was-validated .form-check-input:valid:checked{background-color:#198754}.form-check-input.is-valid:focus,.was-validated .form-check-input:valid:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#198754}.form-check-inline .form-check-input~.valid-feedback{margin-left:.5em}.input-group>.form-control:not(:focus).is-valid,.input-group>.form-floating:not(:focus-within).is-valid,.input-group>.form-select:not(:focus).is-valid,.was-validated .input-group>.form-control:not(:focus):valid,.was-validated .input-group>.form-floating:not(:focus-within):valid,.was-validated .input-group>.form-select:not(:focus):valid{z-index:3}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.375rem}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url(${I});background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-invalid,.was-validated .form-select:invalid{border-color:#dc3545}.form-select.is-invalid:not([multiple]):not([size]),.form-select.is-invalid:not([multiple])[size="1"],.was-validated .form-select:invalid:not([multiple]):not([size]),.was-validated .form-select:invalid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url(${M}),url(${I});background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-invalid:focus,.was-validated .form-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-control-color.is-invalid,.was-validated .form-control-color:invalid{width:calc(3rem + calc(1.5em + .75rem))}.form-check-input.is-invalid,.was-validated .form-check-input:invalid{border-color:#dc3545}.form-check-input.is-invalid:checked,.was-validated .form-check-input:invalid:checked{background-color:#dc3545}.form-check-input.is-invalid:focus,.was-validated .form-check-input:invalid:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-inline .form-check-input~.invalid-feedback{margin-left:.5em}.input-group>.form-control:not(:focus).is-invalid,.input-group>.form-floating:not(:focus-within).is-invalid,.input-group>.form-select:not(:focus).is-invalid,.was-validated .input-group>.form-control:not(:focus):invalid,.was-validated .input-group>.form-floating:not(:focus-within):invalid,.was-validated .input-group>.form-select:not(:focus):invalid{z-index:4}.btn{--bs-btn-padding-x:0.75rem;--bs-btn-padding-y:0.375rem;--bs-btn-font-family: ;--bs-btn-font-size:1rem;--bs-btn-font-weight:400;--bs-btn-line-height:1.5;--bs-btn-color:#212529;--bs-btn-bg:transparent;--bs-btn-border-width:1px;--bs-btn-border-color:transparent;--bs-btn-border-radius:0.375rem;--bs-btn-hover-border-color:transparent;--bs-btn-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.15),0 1px 1px rgba(0, 0, 0, 0.075);--bs-btn-disabled-opacity:0.65;--bs-btn-focus-box-shadow:0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5);display:inline-block;padding:var(--bs-btn-padding-y) var(--bs-btn-padding-x);font-family:var(--bs-btn-font-family);font-size:var(--bs-btn-font-size);font-weight:var(--bs-btn-font-weight);line-height:var(--bs-btn-line-height);color:var(--bs-btn-color);text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;border:var(--bs-btn-border-width) solid var(--bs-btn-border-color);border-radius:var(--bs-btn-border-radius);background-color:var(--bs-btn-bg);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color)}.btn-check+.btn:hover{color:var(--bs-btn-color);background-color:var(--bs-btn-bg);border-color:var(--bs-btn-border-color)}.btn:focus-visible{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:focus-visible+.btn{border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:checked+.btn,.btn.active,.btn.show,.btn:first-child:active,:not(.btn-check)+.btn:active{color:var(--bs-btn-active-color);background-color:var(--bs-btn-active-bg);border-color:var(--bs-btn-active-border-color)}.btn-check:checked+.btn:focus-visible,.btn.active:focus-visible,.btn.show:focus-visible,.btn:first-child:active:focus-visible,:not(.btn-check)+.btn:active:focus-visible{box-shadow:var(--bs-btn-focus-box-shadow)}.btn.disabled,.btn:disabled,fieldset:disabled .btn{color:var(--bs-btn-disabled-color);pointer-events:none;background-color:var(--bs-btn-disabled-bg);border-color:var(--bs-btn-disabled-border-color);opacity:var(--bs-btn-disabled-opacity)}.btn-primary{--bs-btn-color:#fff;--bs-btn-bg:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0b5ed7;--bs-btn-hover-border-color:#0a58ca;--bs-btn-focus-shadow-rgb:49,132,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0a58ca;--bs-btn-active-border-color:#0a53be;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#0d6efd;--bs-btn-disabled-border-color:#0d6efd}.btn-secondary{--bs-btn-color:#fff;--bs-btn-bg:#6c757d;--bs-btn-border-color:#6c757d;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#5c636a;--bs-btn-hover-border-color:#565e64;--bs-btn-focus-shadow-rgb:130,138,145;--bs-btn-active-color:#fff;--bs-btn-active-bg:#565e64;--bs-btn-active-border-color:#51585e;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#6c757d;--bs-btn-disabled-border-color:#6c757d}.btn-success{--bs-btn-color:#fff;--bs-btn-bg:#198754;--bs-btn-border-color:#198754;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#157347;--bs-btn-hover-border-color:#146c43;--bs-btn-focus-shadow-rgb:60,153,110;--bs-btn-active-color:#fff;--bs-btn-active-bg:#146c43;--bs-btn-active-border-color:#13653f;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#198754;--bs-btn-disabled-border-color:#198754}.btn-info{--bs-btn-color:#000;--bs-btn-bg:#0dcaf0;--bs-btn-border-color:#0dcaf0;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#31d2f2;--bs-btn-hover-border-color:#25cff2;--bs-btn-focus-shadow-rgb:11,172,204;--bs-btn-active-color:#000;--bs-btn-active-bg:#3dd5f3;--bs-btn-active-border-color:#25cff2;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#0dcaf0;--bs-btn-disabled-border-color:#0dcaf0}.btn-warning{--bs-btn-color:#000;--bs-btn-bg:#ffc107;--bs-btn-border-color:#ffc107;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#ffca2c;--bs-btn-hover-border-color:#ffc720;--bs-btn-focus-shadow-rgb:217,164,6;--bs-btn-active-color:#000;--bs-btn-active-bg:#ffcd39;--bs-btn-active-border-color:#ffc720;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#ffc107;--bs-btn-disabled-border-color:#ffc107}.btn-danger{--bs-btn-color:#fff;--bs-btn-bg:#dc3545;--bs-btn-border-color:#dc3545;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#bb2d3b;--bs-btn-hover-border-color:#b02a37;--bs-btn-focus-shadow-rgb:225,83,97;--bs-btn-active-color:#fff;--bs-btn-active-bg:#b02a37;--bs-btn-active-border-color:#a52834;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#dc3545;--bs-btn-disabled-border-color:#dc3545}.btn-light{--bs-btn-color:#000;--bs-btn-bg:#f8f9fa;--bs-btn-border-color:#f8f9fa;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#d3d4d5;--bs-btn-hover-border-color:#c6c7c8;--bs-btn-focus-shadow-rgb:211,212,213;--bs-btn-active-color:#000;--bs-btn-active-bg:#c6c7c8;--bs-btn-active-border-color:#babbbc;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#f8f9fa;--bs-btn-disabled-border-color:#f8f9fa}.btn-dark{--bs-btn-color:#fff;--bs-btn-bg:#212529;--bs-btn-border-color:#212529;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#424649;--bs-btn-hover-border-color:#373b3e;--bs-btn-focus-shadow-rgb:66,70,73;--bs-btn-active-color:#fff;--bs-btn-active-bg:#4d5154;--bs-btn-active-border-color:#373b3e;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#212529;--bs-btn-disabled-border-color:#212529}.btn-outline-primary{--bs-btn-color:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0d6efd;--bs-btn-hover-border-color:#0d6efd;--bs-btn-focus-shadow-rgb:13,110,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0d6efd;--bs-btn-active-border-color:#0d6efd;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#0d6efd;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#0d6efd;--bs-gradient:none}.btn-outline-secondary{--bs-btn-color:#6c757d;--bs-btn-border-color:#6c757d;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#6c757d;--bs-btn-hover-border-color:#6c757d;--bs-btn-focus-shadow-rgb:108,117,125;--bs-btn-active-color:#fff;--bs-btn-active-bg:#6c757d;--bs-btn-active-border-color:#6c757d;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#6c757d;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#6c757d;--bs-gradient:none}.btn-outline-success{--bs-btn-color:#198754;--bs-btn-border-color:#198754;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#198754;--bs-btn-hover-border-color:#198754;--bs-btn-focus-shadow-rgb:25,135,84;--bs-btn-active-color:#fff;--bs-btn-active-bg:#198754;--bs-btn-active-border-color:#198754;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#198754;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#198754;--bs-gradient:none}.btn-outline-info{--bs-btn-color:#0dcaf0;--bs-btn-border-color:#0dcaf0;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#0dcaf0;--bs-btn-hover-border-color:#0dcaf0;--bs-btn-focus-shadow-rgb:13,202,240;--bs-btn-active-color:#000;--bs-btn-active-bg:#0dcaf0;--bs-btn-active-border-color:#0dcaf0;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#0dcaf0;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#0dcaf0;--bs-gradient:none}.btn-outline-warning{--bs-btn-color:#ffc107;--bs-btn-border-color:#ffc107;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#ffc107;--bs-btn-hover-border-color:#ffc107;--bs-btn-focus-shadow-rgb:255,193,7;--bs-btn-active-color:#000;--bs-btn-active-bg:#ffc107;--bs-btn-active-border-color:#ffc107;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#ffc107;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#ffc107;--bs-gradient:none}.btn-outline-danger{--bs-btn-color:#dc3545;--bs-btn-border-color:#dc3545;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#dc3545;--bs-btn-hover-border-color:#dc3545;--bs-btn-focus-shadow-rgb:220,53,69;--bs-btn-active-color:#fff;--bs-btn-active-bg:#dc3545;--bs-btn-active-border-color:#dc3545;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#dc3545;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#dc3545;--bs-gradient:none}.btn-outline-light{--bs-btn-color:#f8f9fa;--bs-btn-border-color:#f8f9fa;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#f8f9fa;--bs-btn-hover-border-color:#f8f9fa;--bs-btn-focus-shadow-rgb:248,249,250;--bs-btn-active-color:#000;--bs-btn-active-bg:#f8f9fa;--bs-btn-active-border-color:#f8f9fa;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#f8f9fa;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#f8f9fa;--bs-gradient:none}.btn-outline-dark{--bs-btn-color:#212529;--bs-btn-border-color:#212529;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#212529;--bs-btn-hover-border-color:#212529;--bs-btn-focus-shadow-rgb:33,37,41;--bs-btn-active-color:#fff;--bs-btn-active-bg:#212529;--bs-btn-active-border-color:#212529;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#212529;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#212529;--bs-gradient:none}.btn-link{--bs-btn-font-weight:400;--bs-btn-color:var(--bs-link-color);--bs-btn-bg:transparent;--bs-btn-border-color:transparent;--bs-btn-hover-color:var(--bs-link-hover-color);--bs-btn-hover-border-color:transparent;--bs-btn-active-color:var(--bs-link-hover-color);--bs-btn-active-border-color:transparent;--bs-btn-disabled-color:#6c757d;--bs-btn-disabled-border-color:transparent;--bs-btn-box-shadow:none;--bs-btn-focus-shadow-rgb:49,132,253;text-decoration:underline}.btn-link:focus-visible{color:var(--bs-btn-color)}.btn-link:hover{color:var(--bs-btn-hover-color)}.btn-group-lg>.btn,.btn-lg{--bs-btn-padding-y:0.5rem;--bs-btn-padding-x:1rem;--bs-btn-font-size:1.25rem;--bs-btn-border-radius:0.5rem}.btn-group-sm>.btn,.btn-sm{--bs-btn-padding-y:0.25rem;--bs-btn-padding-x:0.5rem;--bs-btn-font-size:0.875rem;--bs-btn-border-radius:0.25rem}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.collapsing.collapse-horizontal{width:0;height:auto;transition:width .35s ease}@media (prefers-reduced-motion:reduce){.collapsing.collapse-horizontal{transition:none}}.dropdown,.dropdown-center,.dropend,.dropstart,.dropup,.dropup-center{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{--bs-dropdown-zindex:1000;--bs-dropdown-min-width:10rem;--bs-dropdown-padding-x:0;--bs-dropdown-padding-y:0.5rem;--bs-dropdown-spacer:0.125rem;--bs-dropdown-font-size:1rem;--bs-dropdown-color:#212529;--bs-dropdown-bg:#fff;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-border-radius:0.375rem;--bs-dropdown-border-width:1px;--bs-dropdown-inner-border-radius:calc(0.375rem - 1px);--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-divider-margin-y:0.5rem;--bs-dropdown-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-dropdown-link-color:#212529;--bs-dropdown-link-hover-color:#1e2125;--bs-dropdown-link-hover-bg:#e9ecef;--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:#adb5bd;--bs-dropdown-item-padding-x:1rem;--bs-dropdown-item-padding-y:0.25rem;--bs-dropdown-header-color:#6c757d;--bs-dropdown-header-padding-x:1rem;--bs-dropdown-header-padding-y:0.5rem;position:absolute;z-index:var(--bs-dropdown-zindex);display:none;min-width:var(--bs-dropdown-min-width);padding:var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x);margin:0;font-size:var(--bs-dropdown-font-size);color:var(--bs-dropdown-color);text-align:left;list-style:none;background-color:var(--bs-dropdown-bg);background-clip:padding-box;border:var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color);border-radius:var(--bs-dropdown-border-radius)}.dropdown-menu[data-bs-popper]{top:100%;left:0;margin-top:var(--bs-dropdown-spacer)}.dropdown-menu-start{--bs-position:start}.dropdown-menu-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-end{--bs-position:end}.dropdown-menu-end[data-bs-popper]{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-start{--bs-position:start}.dropdown-menu-sm-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-sm-end{--bs-position:end}.dropdown-menu-sm-end[data-bs-popper]{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-start{--bs-position:start}.dropdown-menu-md-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-md-end{--bs-position:end}.dropdown-menu-md-end[data-bs-popper]{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-start{--bs-position:start}.dropdown-menu-lg-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-lg-end{--bs-position:end}.dropdown-menu-lg-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-start{--bs-position:start}.dropdown-menu-xl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xl-end{--bs-position:end}.dropdown-menu-xl-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1400px){.dropdown-menu-xxl-start{--bs-position:start}.dropdown-menu-xxl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xxl-end{--bs-position:end}.dropdown-menu-xxl-end[data-bs-popper]{right:0;left:auto}}.dropup .dropdown-menu[data-bs-popper]{top:auto;bottom:100%;margin-top:0;margin-bottom:var(--bs-dropdown-spacer)}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-menu[data-bs-popper]{top:0;right:auto;left:100%;margin-top:0;margin-left:var(--bs-dropdown-spacer)}.dropend .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropend .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-toggle::after{vertical-align:0}.dropstart .dropdown-menu[data-bs-popper]{top:0;right:100%;left:auto;margin-top:0;margin-right:var(--bs-dropdown-spacer)}.dropstart .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropstart .dropdown-toggle::after{display:none}.dropstart .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropstart .dropdown-toggle:empty::after{margin-left:0}.dropstart .dropdown-toggle::before{vertical-align:0}.dropdown-divider{height:0;margin:var(--bs-dropdown-divider-margin-y) 0;overflow:hidden;border-top:1px solid var(--bs-dropdown-divider-bg);opacity:1}.dropdown-item{display:block;width:100%;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);clear:both;font-weight:400;color:var(--bs-dropdown-link-color);text-align:inherit;text-decoration:none;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:var(--bs-dropdown-link-hover-color);background-color:var(--bs-dropdown-link-hover-bg)}.dropdown-item.active,.dropdown-item:active{color:var(--bs-dropdown-link-active-color);text-decoration:none;background-color:var(--bs-dropdown-link-active-bg)}.dropdown-item.disabled,.dropdown-item:disabled{color:var(--bs-dropdown-link-disabled-color);pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x);margin-bottom:0;font-size:.875rem;color:var(--bs-dropdown-header-color);white-space:nowrap}.dropdown-item-text{display:block;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);color:var(--bs-dropdown-link-color)}.dropdown-menu-dark{--bs-dropdown-color:#dee2e6;--bs-dropdown-bg:#343a40;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-box-shadow: ;--bs-dropdown-link-color:#dee2e6;--bs-dropdown-link-hover-color:#fff;--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-link-hover-bg:rgba(255, 255, 255, 0.15);--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:#adb5bd;--bs-dropdown-header-color:#adb5bd}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group-vertical>.btn-check:checked+.btn,.btn-group-vertical>.btn-check:focus+.btn,.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn-check:checked+.btn,.btn-group>.btn-check:focus+.btn,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group{border-radius:.375rem}.btn-group>.btn-group:not(:first-child),.btn-group>:not(.btn-check:first-child)+.btn{margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn.dropdown-toggle-split:first-child,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:nth-child(n+3),.btn-group>:not(.btn-check)+.btn{border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropend .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropstart .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn~.btn{border-top-left-radius:0;border-top-right-radius:0}.nav{--bs-nav-link-padding-x:1rem;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color:var(--bs-link-color);--bs-nav-link-hover-color:var(--bs-link-hover-color);--bs-nav-link-disabled-color:#6c757d;display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);font-size:var(--bs-nav-link-font-size);font-weight:var(--bs-nav-link-font-weight);color:var(--bs-nav-link-color);text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}@media (prefers-reduced-motion:reduce){.nav-link{transition:none}}.nav-link:focus,.nav-link:hover{color:var(--bs-nav-link-hover-color)}.nav-link.disabled{color:var(--bs-nav-link-disabled-color);pointer-events:none;cursor:default}.nav-tabs{--bs-nav-tabs-border-width:1px;--bs-nav-tabs-border-color:#dee2e6;--bs-nav-tabs-border-radius:0.375rem;--bs-nav-tabs-link-hover-border-color:#e9ecef #e9ecef #dee2e6;--bs-nav-tabs-link-active-color:#495057;--bs-nav-tabs-link-active-bg:#fff;--bs-nav-tabs-link-active-border-color:#dee2e6 #dee2e6 #fff;border-bottom:var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color)}.nav-tabs .nav-link{margin-bottom:calc(-1 * var(--bs-nav-tabs-border-width));background:0 0;border:var(--bs-nav-tabs-border-width) solid transparent;border-top-left-radius:var(--bs-nav-tabs-border-radius);border-top-right-radius:var(--bs-nav-tabs-border-radius)}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{isolation:isolate;border-color:var(--bs-nav-tabs-link-hover-border-color)}.nav-tabs .nav-link.disabled,.nav-tabs .nav-link:disabled{color:var(--bs-nav-link-disabled-color);background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}.nav-tabs .dropdown-menu{margin-top:calc(-1 * var(--bs-nav-tabs-border-width));border-top-left-radius:0;border-top-right-radius:0}.nav-pills{--bs-nav-pills-border-radius:0.375rem;--bs-nav-pills-link-active-color:#fff;--bs-nav-pills-link-active-bg:#0d6efd}.nav-pills .nav-link{background:0 0;border:0;border-radius:var(--bs-nav-pills-border-radius)}.nav-pills .nav-link:disabled{color:var(--bs-nav-link-disabled-color);background-color:transparent;border-color:transparent}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:var(--bs-nav-pills-link-active-color);background-color:var(--bs-nav-pills-link-active-bg)}.nav-fill .nav-item,.nav-fill>.nav-link{flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{flex-basis:0;flex-grow:1;text-align:center}.nav-fill .nav-item .nav-link,.nav-justified .nav-item .nav-link{width:100%}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{--bs-navbar-padding-x:0;--bs-navbar-padding-y:0.5rem;--bs-navbar-color:rgba(0, 0, 0, 0.55);--bs-navbar-hover-color:rgba(0, 0, 0, 0.7);--bs-navbar-disabled-color:rgba(0, 0, 0, 0.3);--bs-navbar-active-color:rgba(0, 0, 0, 0.9);--bs-navbar-brand-padding-y:0.3125rem;--bs-navbar-brand-margin-end:1rem;--bs-navbar-brand-font-size:1.25rem;--bs-navbar-brand-color:rgba(0, 0, 0, 0.9);--bs-navbar-brand-hover-color:rgba(0, 0, 0, 0.9);--bs-navbar-nav-link-padding-x:0.5rem;--bs-navbar-toggler-padding-y:0.25rem;--bs-navbar-toggler-padding-x:0.75rem;--bs-navbar-toggler-font-size:1.25rem;--bs-navbar-toggler-icon-bg:url(${R});--bs-navbar-toggler-border-color:rgba(0, 0, 0, 0.1);--bs-navbar-toggler-border-radius:0.375rem;--bs-navbar-toggler-focus-width:0.25rem;--bs-navbar-toggler-transition:box-shadow 0.15s ease-in-out;position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:var(--bs-navbar-padding-y) var(--bs-navbar-padding-x)}.navbar>.container,.navbar>.container-fluid,.navbar>.container-lg,.navbar>.container-md,.navbar>.container-sm,.navbar>.container-xl,.navbar>.container-xxl{display:flex;flex-wrap:inherit;align-items:center;justify-content:space-between}.navbar-brand{padding-top:var(--bs-navbar-brand-padding-y);padding-bottom:var(--bs-navbar-brand-padding-y);margin-right:var(--bs-navbar-brand-margin-end);font-size:var(--bs-navbar-brand-font-size);color:var(--bs-navbar-brand-color);text-decoration:none;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{color:var(--bs-navbar-brand-hover-color)}.navbar-nav{--bs-nav-link-padding-x:0;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color:var(--bs-navbar-color);--bs-nav-link-hover-color:var(--bs-navbar-hover-color);--bs-nav-link-disabled-color:var(--bs-navbar-disabled-color);display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link.active,.navbar-nav .show>.nav-link{color:var(--bs-navbar-active-color)}.navbar-nav .dropdown-menu{position:static}.navbar-text{padding-top:.5rem;padding-bottom:.5rem;color:var(--bs-navbar-color)}.navbar-text a,.navbar-text a:focus,.navbar-text a:hover{color:var(--bs-navbar-active-color)}.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}.navbar-toggler{padding:var(--bs-navbar-toggler-padding-y) var(--bs-navbar-toggler-padding-x);font-size:var(--bs-navbar-toggler-font-size);line-height:1;color:var(--bs-navbar-color);background-color:transparent;border:var(--bs-border-width) solid var(--bs-navbar-toggler-border-color);border-radius:var(--bs-navbar-toggler-border-radius);transition:var(--bs-navbar-toggler-transition)}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-toggler:hover{text-decoration:none}.navbar-toggler:focus{text-decoration:none;outline:0;box-shadow:0 0 0 var(--bs-navbar-toggler-focus-width)}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;background-image:var(--bs-navbar-toggler-icon-bg);background-repeat:no-repeat;background-position:center;background-size:100%}.navbar-nav-scroll{max-height:var(--bs-scroll-height,75vh);overflow-y:auto}@media (min-width:576px){.navbar-expand-sm{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}.navbar-expand-sm .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-sm .offcanvas .offcanvas-header{display:none}.navbar-expand-sm .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}.navbar-expand-md .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-md .offcanvas .offcanvas-header{display:none}.navbar-expand-md .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:992px){.navbar-expand-lg{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}.navbar-expand-lg .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-lg .offcanvas .offcanvas-header{display:none}.navbar-expand-lg .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1200px){.navbar-expand-xl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}.navbar-expand-xl .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-xl .offcanvas .offcanvas-header{display:none}.navbar-expand-xl .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1400px){.navbar-expand-xxl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xxl .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}.navbar-expand-xxl .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-xxl .offcanvas .offcanvas-header{display:none}.navbar-expand-xxl .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}.navbar-expand{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-expand .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand .offcanvas .offcanvas-header{display:none}.navbar-expand .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}.navbar-dark{--bs-navbar-color:rgba(255, 255, 255, 0.55);--bs-navbar-hover-color:rgba(255, 255, 255, 0.75);--bs-navbar-disabled-color:rgba(255, 255, 255, 0.25);--bs-navbar-active-color:#fff;--bs-navbar-brand-color:#fff;--bs-navbar-brand-hover-color:#fff;--bs-navbar-toggler-border-color:rgba(255, 255, 255, 0.1);--bs-navbar-toggler-icon-bg:url(${F})}.card{--bs-card-spacer-y:1rem;--bs-card-spacer-x:1rem;--bs-card-title-spacer-y:0.5rem;--bs-card-border-width:1px;--bs-card-border-color:var(--bs-border-color-translucent);--bs-card-border-radius:0.375rem;--bs-card-box-shadow: ;--bs-card-inner-border-radius:calc(0.375rem - 1px);--bs-card-cap-padding-y:0.5rem;--bs-card-cap-padding-x:1rem;--bs-card-cap-bg:rgba(0, 0, 0, 0.03);--bs-card-cap-color: ;--bs-card-height: ;--bs-card-color: ;--bs-card-bg:#fff;--bs-card-img-overlay-padding:1rem;--bs-card-group-margin:0.75rem;position:relative;display:flex;flex-direction:column;min-width:0;height:var(--bs-card-height);word-wrap:break-word;background-color:var(--bs-card-bg);background-clip:border-box;border:var(--bs-card-border-width) solid var(--bs-card-border-color);border-radius:var(--bs-card-border-radius)}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:var(--bs-card-inner-border-radius);border-top-right-radius:var(--bs-card-inner-border-radius)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:var(--bs-card-inner-border-radius);border-bottom-left-radius:var(--bs-card-inner-border-radius)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{flex:1 1 auto;padding:var(--bs-card-spacer-y) var(--bs-card-spacer-x);color:var(--bs-card-color)}.card-title{margin-bottom:var(--bs-card-title-spacer-y)}.card-subtitle{margin-top:calc(-.5 * var(--bs-card-title-spacer-y));margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link+.card-link{margin-left:var(--bs-card-spacer-x)}.card-header{padding:var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);margin-bottom:0;color:var(--bs-card-cap-color);background-color:var(--bs-card-cap-bg);border-bottom:var(--bs-card-border-width) solid var(--bs-card-border-color)}.card-header:first-child{border-radius:var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0}.card-footer{padding:var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);color:var(--bs-card-cap-color);background-color:var(--bs-card-cap-bg);border-top:var(--bs-card-border-width) solid var(--bs-card-border-color)}.card-footer:last-child{border-radius:0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius)}.card-header-tabs{margin-right:calc(-.5 * var(--bs-card-cap-padding-x));margin-bottom:calc(-1 * var(--bs-card-cap-padding-y));margin-left:calc(-.5 * var(--bs-card-cap-padding-x));border-bottom:0}.card-header-tabs .nav-link.active{background-color:var(--bs-card-bg);border-bottom-color:var(--bs-card-bg)}.card-header-pills{margin-right:calc(-.5 * var(--bs-card-cap-padding-x));margin-left:calc(-.5 * var(--bs-card-cap-padding-x))}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:var(--bs-card-img-overlay-padding);border-radius:var(--bs-card-inner-border-radius)}.card-img,.card-img-bottom,.card-img-top{width:100%}.card-img,.card-img-top{border-top-left-radius:var(--bs-card-inner-border-radius);border-top-right-radius:var(--bs-card-inner-border-radius)}.card-img,.card-img-bottom{border-bottom-right-radius:var(--bs-card-inner-border-radius);border-bottom-left-radius:var(--bs-card-inner-border-radius)}.card-group>.card{margin-bottom:var(--bs-card-group-margin)}@media (min-width:576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.accordion{--bs-accordion-color:#212529;--bs-accordion-bg:#fff;--bs-accordion-transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out,border-radius 0.15s ease;--bs-accordion-border-color:var(--bs-border-color);--bs-accordion-border-width:1px;--bs-accordion-border-radius:0.375rem;--bs-accordion-inner-border-radius:calc(0.375rem - 1px);--bs-accordion-btn-padding-x:1.25rem;--bs-accordion-btn-padding-y:1rem;--bs-accordion-btn-color:#212529;--bs-accordion-btn-bg:var(--bs-accordion-bg);--bs-accordion-btn-icon:url(${P});--bs-accordion-btn-icon-width:1.25rem;--bs-accordion-btn-icon-transform:rotate(-180deg);--bs-accordion-btn-icon-transition:transform 0.2s ease-in-out;--bs-accordion-btn-active-icon:url(${j});--bs-accordion-btn-focus-border-color:#86b7fe;--bs-accordion-btn-focus-box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);--bs-accordion-body-padding-x:1.25rem;--bs-accordion-body-padding-y:1rem;--bs-accordion-active-color:#0c63e4;--bs-accordion-active-bg:#e7f1ff}.accordion-button{position:relative;display:flex;align-items:center;width:100%;padding:var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x);font-size:1rem;color:var(--bs-accordion-btn-color);text-align:left;background-color:var(--bs-accordion-btn-bg);border:0;border-radius:0;overflow-anchor:none;transition:var(--bs-accordion-transition)}@media (prefers-reduced-motion:reduce){.accordion-button{transition:none}}.accordion-button:not(.collapsed){color:var(--bs-accordion-active-color);background-color:var(--bs-accordion-active-bg);box-shadow:inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color)}.accordion-button:not(.collapsed)::after{background-image:var(--bs-accordion-btn-active-icon);transform:var(--bs-accordion-btn-icon-transform)}.accordion-button::after{flex-shrink:0;width:var(--bs-accordion-btn-icon-width);height:var(--bs-accordion-btn-icon-width);margin-left:auto;content:"";background-image:var(--bs-accordion-btn-icon);background-repeat:no-repeat;background-size:var(--bs-accordion-btn-icon-width);transition:var(--bs-accordion-btn-icon-transition)}@media (prefers-reduced-motion:reduce){.accordion-button::after{transition:none}}.accordion-button:hover{z-index:2}.accordion-button:focus{z-index:3;border-color:var(--bs-accordion-btn-focus-border-color);outline:0;box-shadow:var(--bs-accordion-btn-focus-box-shadow)}.accordion-header{margin-bottom:0}.accordion-item{color:var(--bs-accordion-color);background-color:var(--bs-accordion-bg);border:var(--bs-accordion-border-width) solid var(--bs-accordion-border-color)}.accordion-item:first-of-type{border-top-left-radius:var(--bs-accordion-border-radius);border-top-right-radius:var(--bs-accordion-border-radius)}.accordion-item:first-of-type .accordion-button{border-top-left-radius:var(--bs-accordion-inner-border-radius);border-top-right-radius:var(--bs-accordion-inner-border-radius)}.accordion-item:not(:first-of-type){border-top:0}.accordion-item:last-of-type{border-bottom-right-radius:var(--bs-accordion-border-radius);border-bottom-left-radius:var(--bs-accordion-border-radius)}.accordion-item:last-of-type .accordion-button.collapsed{border-bottom-right-radius:var(--bs-accordion-inner-border-radius);border-bottom-left-radius:var(--bs-accordion-inner-border-radius)}.accordion-item:last-of-type .accordion-collapse{border-bottom-right-radius:var(--bs-accordion-border-radius);border-bottom-left-radius:var(--bs-accordion-border-radius)}.accordion-body{padding:var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x)}.accordion-flush .accordion-collapse{border-width:0}.accordion-flush .accordion-item{border-right:0;border-left:0;border-radius:0}.accordion-flush .accordion-item:first-child{border-top:0}.accordion-flush .accordion-item:last-child{border-bottom:0}.accordion-flush .accordion-item .accordion-button,.accordion-flush .accordion-item .accordion-button.collapsed{border-radius:0}.breadcrumb{--bs-breadcrumb-padding-x:0;--bs-breadcrumb-padding-y:0;--bs-breadcrumb-margin-bottom:1rem;--bs-breadcrumb-bg: ;--bs-breadcrumb-border-radius: ;--bs-breadcrumb-divider-color:#6c757d;--bs-breadcrumb-item-padding-x:0.5rem;--bs-breadcrumb-item-active-color:#6c757d;display:flex;flex-wrap:wrap;padding:var(--bs-breadcrumb-padding-y) var(--bs-breadcrumb-padding-x);margin-bottom:var(--bs-breadcrumb-margin-bottom);font-size:var(--bs-breadcrumb-font-size);list-style:none;background-color:var(--bs-breadcrumb-bg);border-radius:var(--bs-breadcrumb-border-radius)}.breadcrumb-item+.breadcrumb-item{padding-left:var(--bs-breadcrumb-item-padding-x)}.breadcrumb-item+.breadcrumb-item::before{float:left;padding-right:var(--bs-breadcrumb-item-padding-x);color:var(--bs-breadcrumb-divider-color);content:var(--bs-breadcrumb-divider, "/")}.breadcrumb-item.active{color:var(--bs-breadcrumb-item-active-color)}.pagination{--bs-pagination-padding-x:0.75rem;--bs-pagination-padding-y:0.375rem;--bs-pagination-font-size:1rem;--bs-pagination-color:var(--bs-link-color);--bs-pagination-bg:#fff;--bs-pagination-border-width:1px;--bs-pagination-border-color:#dee2e6;--bs-pagination-border-radius:0.375rem;--bs-pagination-hover-color:var(--bs-link-hover-color);--bs-pagination-hover-bg:#e9ecef;--bs-pagination-hover-border-color:#dee2e6;--bs-pagination-focus-color:var(--bs-link-hover-color);--bs-pagination-focus-bg:#e9ecef;--bs-pagination-focus-box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);--bs-pagination-active-color:#fff;--bs-pagination-active-bg:#0d6efd;--bs-pagination-active-border-color:#0d6efd;--bs-pagination-disabled-color:#6c757d;--bs-pagination-disabled-bg:#fff;--bs-pagination-disabled-border-color:#dee2e6;display:flex;padding-left:0;list-style:none}.page-link{position:relative;display:block;padding:var(--bs-pagination-padding-y) var(--bs-pagination-padding-x);font-size:var(--bs-pagination-font-size);color:var(--bs-pagination-color);text-decoration:none;background-color:var(--bs-pagination-bg);border:var(--bs-pagination-border-width) solid var(--bs-pagination-border-color);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.page-link{transition:none}}.page-link:hover{z-index:2;color:var(--bs-pagination-hover-color);background-color:var(--bs-pagination-hover-bg);border-color:var(--bs-pagination-hover-border-color)}.page-link:focus{z-index:3;color:var(--bs-pagination-focus-color);background-color:var(--bs-pagination-focus-bg);outline:0;box-shadow:var(--bs-pagination-focus-box-shadow)}.active>.page-link,.page-link.active{z-index:3;color:var(--bs-pagination-active-color);background-color:var(--bs-pagination-active-bg);border-color:var(--bs-pagination-active-border-color)}.disabled>.page-link,.page-link.disabled{color:var(--bs-pagination-disabled-color);pointer-events:none;background-color:var(--bs-pagination-disabled-bg);border-color:var(--bs-pagination-disabled-border-color)}.page-item:not(:first-child) .page-link{margin-left:-1px}.page-item:first-child .page-link{border-top-left-radius:var(--bs-pagination-border-radius);border-bottom-left-radius:var(--bs-pagination-border-radius)}.page-item:last-child .page-link{border-top-right-radius:var(--bs-pagination-border-radius);border-bottom-right-radius:var(--bs-pagination-border-radius)}.pagination-lg{--bs-pagination-padding-x:1.5rem;--bs-pagination-padding-y:0.75rem;--bs-pagination-font-size:1.25rem;--bs-pagination-border-radius:0.5rem}.pagination-sm{--bs-pagination-padding-x:0.5rem;--bs-pagination-padding-y:0.25rem;--bs-pagination-font-size:0.875rem;--bs-pagination-border-radius:0.25rem}.badge{--bs-badge-padding-x:0.65em;--bs-badge-padding-y:0.35em;--bs-badge-font-size:0.75em;--bs-badge-font-weight:700;--bs-badge-color:#fff;--bs-badge-border-radius:0.375rem;display:inline-block;padding:var(--bs-badge-padding-y) var(--bs-badge-padding-x);font-size:var(--bs-badge-font-size);font-weight:var(--bs-badge-font-weight);line-height:1;color:var(--bs-badge-color);text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:var(--bs-badge-border-radius)}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.alert{--bs-alert-bg:transparent;--bs-alert-padding-x:1rem;--bs-alert-padding-y:1rem;--bs-alert-margin-bottom:1rem;--bs-alert-color:inherit;--bs-alert-border-color:transparent;--bs-alert-border:1px solid var(--bs-alert-border-color);--bs-alert-border-radius:0.375rem;position:relative;padding:var(--bs-alert-padding-y) var(--bs-alert-padding-x);margin-bottom:var(--bs-alert-margin-bottom);color:var(--bs-alert-color);background-color:var(--bs-alert-bg);border:var(--bs-alert-border);border-radius:var(--bs-alert-border-radius)}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:3rem}.alert-dismissible .btn-close{position:absolute;top:0;right:0;z-index:2;padding:1.25rem 1rem}.alert-primary{--bs-alert-color:#084298;--bs-alert-bg:#cfe2ff;--bs-alert-border-color:#b6d4fe}.alert-primary .alert-link{color:#06357a}.alert-secondary{--bs-alert-color:#41464b;--bs-alert-bg:#e2e3e5;--bs-alert-border-color:#d3d6d8}.alert-secondary .alert-link{color:#34383c}.alert-success{--bs-alert-color:#0f5132;--bs-alert-bg:#d1e7dd;--bs-alert-border-color:#badbcc}.alert-success .alert-link{color:#0c4128}.alert-info{--bs-alert-color:#055160;--bs-alert-bg:#cff4fc;--bs-alert-border-color:#b6effb}.alert-info .alert-link{color:#04414d}.alert-warning{--bs-alert-color:#664d03;--bs-alert-bg:#fff3cd;--bs-alert-border-color:#ffecb5}.alert-warning .alert-link{color:#523e02}.alert-danger{--bs-alert-color:#842029;--bs-alert-bg:#f8d7da;--bs-alert-border-color:#f5c2c7}.alert-danger .alert-link{color:#6a1a21}.alert-light{--bs-alert-color:#636464;--bs-alert-bg:#fefefe;--bs-alert-border-color:#fdfdfe}.alert-light .alert-link{color:#4f5050}.alert-dark{--bs-alert-color:#141619;--bs-alert-bg:#d3d3d4;--bs-alert-border-color:#bcbebf}.alert-dark .alert-link{color:#101214}@keyframes progress-bar-stripes{0%{background-position-x:1rem}}.progress{--bs-progress-height:1rem;--bs-progress-font-size:0.75rem;--bs-progress-bg:#e9ecef;--bs-progress-border-radius:0.375rem;--bs-progress-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.075);--bs-progress-bar-color:#fff;--bs-progress-bar-bg:#0d6efd;--bs-progress-bar-transition:width 0.6s ease;display:flex;height:var(--bs-progress-height);overflow:hidden;font-size:var(--bs-progress-font-size);background-color:var(--bs-progress-bg);border-radius:var(--bs-progress-border-radius)}.progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:var(--bs-progress-bar-color);text-align:center;white-space:nowrap;background-color:var(--bs-progress-bar-bg);transition:var(--bs-progress-bar-transition)}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:var(--bs-progress-height) var(--bs-progress-height)}.progress-bar-animated{animation:1s linear infinite progress-bar-stripes}@media (prefers-reduced-motion:reduce){.progress-bar-animated{animation:none}}.list-group{--bs-list-group-color:#212529;--bs-list-group-bg:#fff;--bs-list-group-border-color:rgba(0, 0, 0, 0.125);--bs-list-group-border-width:1px;--bs-list-group-border-radius:0.375rem;--bs-list-group-item-padding-x:1rem;--bs-list-group-item-padding-y:0.5rem;--bs-list-group-action-color:#495057;--bs-list-group-action-hover-color:#495057;--bs-list-group-action-hover-bg:#f8f9fa;--bs-list-group-action-active-color:#212529;--bs-list-group-action-active-bg:#e9ecef;--bs-list-group-disabled-color:#6c757d;--bs-list-group-disabled-bg:#fff;--bs-list-group-active-color:#fff;--bs-list-group-active-bg:#0d6efd;--bs-list-group-active-border-color:#0d6efd;display:flex;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:var(--bs-list-group-border-radius)}.list-group-numbered{list-style-type:none;counter-reset:section}.list-group-numbered>.list-group-item::before{content:counters(section, ".") ". ";counter-increment:section}.list-group-item-action{width:100%;color:var(--bs-list-group-action-color);text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:var(--bs-list-group-action-hover-color);text-decoration:none;background-color:var(--bs-list-group-action-hover-bg)}.list-group-item-action:active{color:var(--bs-list-group-action-active-color);background-color:var(--bs-list-group-action-active-bg)}.list-group-item{position:relative;display:block;padding:var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x);color:var(--bs-list-group-color);text-decoration:none;background-color:var(--bs-list-group-bg);border:var(--bs-list-group-border-width) solid var(--bs-list-group-border-color)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:var(--bs-list-group-disabled-color);pointer-events:none;background-color:var(--bs-list-group-disabled-bg)}.list-group-item.active{z-index:2;color:var(--bs-list-group-active-color);background-color:var(--bs-list-group-active-bg);border-color:var(--bs-list-group-active-border-color)}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:calc(-1 * var(--bs-list-group-border-width));border-top-width:var(--bs-list-group-border-width)}.list-group-horizontal{flex-direction:row}.list-group-horizontal>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}@media (min-width:576px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:768px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:992px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:1400px){.list-group-horizontal-xxl{flex-direction:row}.list-group-horizontal-xxl>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-xxl>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-xxl>.list-group-item.active{margin-top:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 var(--bs-list-group-border-width)}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#084298;background-color:#cfe2ff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#084298;background-color:#bacbe6}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#084298;border-color:#084298}.list-group-item-secondary{color:#41464b;background-color:#e2e3e5}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#41464b;background-color:#cbccce}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#41464b;border-color:#41464b}.list-group-item-success{color:#0f5132;background-color:#d1e7dd}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#0f5132;background-color:#bcd0c7}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#0f5132;border-color:#0f5132}.list-group-item-info{color:#055160;background-color:#cff4fc}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#055160;background-color:#badce3}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#055160;border-color:#055160}.list-group-item-warning{color:#664d03;background-color:#fff3cd}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#664d03;background-color:#e6dbb9}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#664d03;border-color:#664d03}.list-group-item-danger{color:#842029;background-color:#f8d7da}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#842029;background-color:#dfc2c4}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#842029;border-color:#842029}.list-group-item-light{color:#636464;background-color:#fefefe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#636464;background-color:#e5e5e5}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#636464;border-color:#636464}.list-group-item-dark{color:#141619;background-color:#d3d3d4}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#141619;background-color:#bebebf}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#141619;border-color:#141619}.btn-close{box-sizing:content-box;width:1em;height:1em;padding:.25em .25em;color:#000;background:transparent url(${N}) center/1em auto no-repeat;border:0;border-radius:.375rem;opacity:.5}.btn-close:hover{color:#000;text-decoration:none;opacity:.75}.btn-close:focus{outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25);opacity:1}.btn-close.disabled,.btn-close:disabled{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:.25}.btn-close-white{filter:invert(1) grayscale(100%) brightness(200%)}.toast{--bs-toast-zindex:1090;--bs-toast-padding-x:0.75rem;--bs-toast-padding-y:0.5rem;--bs-toast-spacing:1.5rem;--bs-toast-max-width:350px;--bs-toast-font-size:0.875rem;--bs-toast-color: ;--bs-toast-bg:rgba(255, 255, 255, 0.85);--bs-toast-border-width:1px;--bs-toast-border-color:var(--bs-border-color-translucent);--bs-toast-border-radius:0.375rem;--bs-toast-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-toast-header-color:#6c757d;--bs-toast-header-bg:rgba(255, 255, 255, 0.85);--bs-toast-header-border-color:rgba(0, 0, 0, 0.05);width:var(--bs-toast-max-width);max-width:100%;font-size:var(--bs-toast-font-size);color:var(--bs-toast-color);pointer-events:auto;background-color:var(--bs-toast-bg);background-clip:padding-box;border:var(--bs-toast-border-width) solid var(--bs-toast-border-color);box-shadow:var(--bs-toast-box-shadow);border-radius:var(--bs-toast-border-radius)}.toast.showing{opacity:0}.toast:not(.show){display:none}.toast-container{--bs-toast-zindex:1090;position:absolute;z-index:var(--bs-toast-zindex);width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:100%;pointer-events:none}.toast-container>:not(:last-child){margin-bottom:var(--bs-toast-spacing)}.toast-header{display:flex;align-items:center;padding:var(--bs-toast-padding-y) var(--bs-toast-padding-x);color:var(--bs-toast-header-color);background-color:var(--bs-toast-header-bg);background-clip:padding-box;border-bottom:var(--bs-toast-border-width) solid var(--bs-toast-header-border-color);border-top-left-radius:calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width));border-top-right-radius:calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width))}.toast-header .btn-close{margin-right:calc(-.5 * var(--bs-toast-padding-x));margin-left:var(--bs-toast-padding-x)}.toast-body{padding:var(--bs-toast-padding-x);word-wrap:break-word}.modal{--bs-modal-zindex:1055;--bs-modal-width:500px;--bs-modal-padding:1rem;--bs-modal-margin:0.5rem;--bs-modal-color: ;--bs-modal-bg:#fff;--bs-modal-border-color:var(--bs-border-color-translucent);--bs-modal-border-width:1px;--bs-modal-border-radius:0.5rem;--bs-modal-box-shadow:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--bs-modal-inner-border-radius:calc(0.5rem - 1px);--bs-modal-header-padding-x:1rem;--bs-modal-header-padding-y:1rem;--bs-modal-header-padding:1rem 1rem;--bs-modal-header-border-color:var(--bs-border-color);--bs-modal-header-border-width:1px;--bs-modal-title-line-height:1.5;--bs-modal-footer-gap:0.5rem;--bs-modal-footer-bg: ;--bs-modal-footer-border-color:var(--bs-border-color);--bs-modal-footer-border-width:1px;position:fixed;top:0;left:0;z-index:var(--bs-modal-zindex);display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}.modal-dialog{position:relative;width:auto;margin:var(--bs-modal-margin);pointer-events:none}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{height:calc(100% - var(--bs-modal-margin) * 2)}.modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - var(--bs-modal-margin) * 2)}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;color:var(--bs-modal-color);pointer-events:auto;background-color:var(--bs-modal-bg);background-clip:padding-box;border:var(--bs-modal-border-width) solid var(--bs-modal-border-color);border-radius:var(--bs-modal-border-radius);outline:0}.modal-backdrop{--bs-backdrop-zindex:1050;--bs-backdrop-bg:#000;--bs-backdrop-opacity:0.5;position:fixed;top:0;left:0;z-index:var(--bs-backdrop-zindex);width:100vw;height:100vh;background-color:var(--bs-backdrop-bg)}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:var(--bs-backdrop-opacity)}.modal-header{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:var(--bs-modal-header-padding);border-bottom:var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color);border-top-left-radius:var(--bs-modal-inner-border-radius);border-top-right-radius:var(--bs-modal-inner-border-radius)}.modal-header .btn-close{padding:calc(var(--bs-modal-header-padding-y) * .5) calc(var(--bs-modal-header-padding-x) * .5);margin:calc(-.5 * var(--bs-modal-header-padding-y)) calc(-.5 * var(--bs-modal-header-padding-x)) calc(-.5 * var(--bs-modal-header-padding-y)) auto}.modal-title{margin-bottom:0;line-height:var(--bs-modal-title-line-height)}.modal-body{position:relative;flex:1 1 auto;padding:var(--bs-modal-padding)}.modal-footer{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * .5);background-color:var(--bs-modal-footer-bg);border-top:var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color);border-bottom-right-radius:var(--bs-modal-inner-border-radius);border-bottom-left-radius:var(--bs-modal-inner-border-radius)}.modal-footer>*{margin:calc(var(--bs-modal-footer-gap) * .5)}@media (min-width:576px){.modal{--bs-modal-margin:1.75rem;--bs-modal-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15)}.modal-dialog{max-width:var(--bs-modal-width);margin-right:auto;margin-left:auto}.modal-sm{--bs-modal-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{--bs-modal-width:800px}}@media (min-width:1200px){.modal-xl{--bs-modal-width:1140px}}.modal-fullscreen{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen .modal-footer,.modal-fullscreen .modal-header{border-radius:0}.modal-fullscreen .modal-body{overflow-y:auto}@media (max-width:575.98px){.modal-fullscreen-sm-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-sm-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-sm-down .modal-footer,.modal-fullscreen-sm-down .modal-header{border-radius:0}.modal-fullscreen-sm-down .modal-body{overflow-y:auto}}@media (max-width:767.98px){.modal-fullscreen-md-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-md-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-md-down .modal-footer,.modal-fullscreen-md-down .modal-header{border-radius:0}.modal-fullscreen-md-down .modal-body{overflow-y:auto}}@media (max-width:991.98px){.modal-fullscreen-lg-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-lg-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-lg-down .modal-footer,.modal-fullscreen-lg-down .modal-header{border-radius:0}.modal-fullscreen-lg-down .modal-body{overflow-y:auto}}@media (max-width:1199.98px){.modal-fullscreen-xl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xl-down .modal-footer,.modal-fullscreen-xl-down .modal-header{border-radius:0}.modal-fullscreen-xl-down .modal-body{overflow-y:auto}}@media (max-width:1399.98px){.modal-fullscreen-xxl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xxl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xxl-down .modal-footer,.modal-fullscreen-xxl-down .modal-header{border-radius:0}.modal-fullscreen-xxl-down .modal-body{overflow-y:auto}}.tooltip{--bs-tooltip-zindex:1080;--bs-tooltip-max-width:200px;--bs-tooltip-padding-x:0.5rem;--bs-tooltip-padding-y:0.25rem;--bs-tooltip-margin: ;--bs-tooltip-font-size:0.875rem;--bs-tooltip-color:#fff;--bs-tooltip-bg:#000;--bs-tooltip-border-radius:0.375rem;--bs-tooltip-opacity:0.9;--bs-tooltip-arrow-width:0.8rem;--bs-tooltip-arrow-height:0.4rem;z-index:var(--bs-tooltip-zindex);display:block;padding:var(--bs-tooltip-arrow-height);margin:var(--bs-tooltip-margin);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-tooltip-font-size);word-wrap:break-word;opacity:0}.tooltip.show{opacity:var(--bs-tooltip-opacity)}.tooltip .tooltip-arrow{display:block;width:var(--bs-tooltip-arrow-width);height:var(--bs-tooltip-arrow-height)}.tooltip .tooltip-arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow,.bs-tooltip-top .tooltip-arrow{bottom:0}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,.bs-tooltip-top .tooltip-arrow::before{top:-1px;border-width:var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0;border-top-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow,.bs-tooltip-end .tooltip-arrow{left:0;width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before,.bs-tooltip-end .tooltip-arrow::before{right:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0;border-right-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow,.bs-tooltip-bottom .tooltip-arrow{top:0}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before,.bs-tooltip-bottom .tooltip-arrow::before{bottom:-1px;border-width:0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height);border-bottom-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow,.bs-tooltip-start .tooltip-arrow{right:0;width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before,.bs-tooltip-start .tooltip-arrow::before{left:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * .5) 0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height);border-left-color:var(--bs-tooltip-bg)}.tooltip-inner{max-width:var(--bs-tooltip-max-width);padding:var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x);color:var(--bs-tooltip-color);text-align:center;background-color:var(--bs-tooltip-bg);border-radius:var(--bs-tooltip-border-radius)}.popover{--bs-popover-zindex:1070;--bs-popover-max-width:276px;--bs-popover-font-size:0.875rem;--bs-popover-bg:#fff;--bs-popover-border-width:1px;--bs-popover-border-color:var(--bs-border-color-translucent);--bs-popover-border-radius:0.5rem;--bs-popover-inner-border-radius:calc(0.5rem - 1px);--bs-popover-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-popover-header-padding-x:1rem;--bs-popover-header-padding-y:0.5rem;--bs-popover-header-font-size:1rem;--bs-popover-header-color: ;--bs-popover-header-bg:#f0f0f0;--bs-popover-body-padding-x:1rem;--bs-popover-body-padding-y:1rem;--bs-popover-body-color:#212529;--bs-popover-arrow-width:1rem;--bs-popover-arrow-height:0.5rem;--bs-popover-arrow-border:var(--bs-popover-border-color);z-index:var(--bs-popover-zindex);display:block;max-width:var(--bs-popover-max-width);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-popover-font-size);word-wrap:break-word;background-color:var(--bs-popover-bg);background-clip:padding-box;border:var(--bs-popover-border-width) solid var(--bs-popover-border-color);border-radius:var(--bs-popover-border-radius)}.popover .popover-arrow{display:block;width:var(--bs-popover-arrow-width);height:var(--bs-popover-arrow-height)}.popover .popover-arrow::after,.popover .popover-arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid;border-width:0}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow,.bs-popover-top>.popover-arrow{bottom:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width))}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::after,.bs-popover-top>.popover-arrow::before{border-width:var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * .5) 0}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::before{bottom:0;border-top-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-top>.popover-arrow::after{bottom:var(--bs-popover-border-width);border-top-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow,.bs-popover-end>.popover-arrow{left:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));width:var(--bs-popover-arrow-height);height:var(--bs-popover-arrow-width)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::after,.bs-popover-end>.popover-arrow::before{border-width:calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * .5) 0}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::before{left:0;border-right-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-end>.popover-arrow::after{left:var(--bs-popover-border-width);border-right-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow,.bs-popover-bottom>.popover-arrow{top:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width))}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::before{border-width:0 calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::before{top:0;border-bottom-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::after{top:var(--bs-popover-border-width);border-bottom-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:var(--bs-popover-arrow-width);margin-left:calc(-.5 * var(--bs-popover-arrow-width));content:"";border-bottom:var(--bs-popover-border-width) solid var(--bs-popover-header-bg)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow,.bs-popover-start>.popover-arrow{right:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));width:var(--bs-popover-arrow-height);height:var(--bs-popover-arrow-width)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::after,.bs-popover-start>.popover-arrow::before{border-width:calc(var(--bs-popover-arrow-width) * .5) 0 calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::before{right:0;border-left-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-start>.popover-arrow::after{right:var(--bs-popover-border-width);border-left-color:var(--bs-popover-bg)}.popover-header{padding:var(--bs-popover-header-padding-y) var(--bs-popover-header-padding-x);margin-bottom:0;font-size:var(--bs-popover-header-font-size);color:var(--bs-popover-header-color);background-color:var(--bs-popover-header-bg);border-bottom:var(--bs-popover-border-width) solid var(--bs-popover-border-color);border-top-left-radius:var(--bs-popover-inner-border-radius);border-top-right-radius:var(--bs-popover-inner-border-radius)}.popover-header:empty{display:none}.popover-body{padding:var(--bs-popover-body-padding-y) var(--bs-popover-body-padding-x);color:var(--bs-popover-body-color)}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-end,.carousel-item-next:not(.carousel-item-start){transform:translateX(100%)}.active.carousel-item-start,.carousel-item-prev:not(.carousel-item-end){transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item-next.carousel-item-start,.carousel-fade .carousel-item-prev.carousel-item-end,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:0 0;border:0;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:2rem;height:2rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}.carousel-control-prev-icon{background-image:url(${B})}.carousel-control-next-icon{background-image:url(${U})}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:2;display:flex;justify-content:center;padding:0;margin-right:15%;margin-bottom:1rem;margin-left:15%;list-style:none}.carousel-indicators [data-bs-target]{box-sizing:content-box;flex:0 1 auto;width:30px;height:3px;padding:0;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border:0;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators [data-bs-target]{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:1.25rem;left:15%;padding-top:1.25rem;padding-bottom:1.25rem;color:#fff;text-align:center}.carousel-dark .carousel-control-next-icon,.carousel-dark .carousel-control-prev-icon{filter:invert(1) grayscale(100)}.carousel-dark .carousel-indicators [data-bs-target]{background-color:#000}.carousel-dark .carousel-caption{color:#000}.spinner-border,.spinner-grow{display:inline-block;width:var(--bs-spinner-width);height:var(--bs-spinner-height);vertical-align:var(--bs-spinner-vertical-align);border-radius:50%;animation:var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name)}@keyframes spinner-border{to{transform:rotate(360deg)}}.spinner-border{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-border-width:0.25em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-border;border:var(--bs-spinner-border-width) solid currentcolor;border-right-color:transparent}.spinner-border-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem;--bs-spinner-border-width:0.2em}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-grow;background-color:currentcolor;opacity:0}.spinner-grow-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{--bs-spinner-animation-speed:1.5s}}.offcanvas,.offcanvas-lg,.offcanvas-md,.offcanvas-sm,.offcanvas-xl,.offcanvas-xxl{--bs-offcanvas-zindex:1045;--bs-offcanvas-width:400px;--bs-offcanvas-height:30vh;--bs-offcanvas-padding-x:1rem;--bs-offcanvas-padding-y:1rem;--bs-offcanvas-color: ;--bs-offcanvas-bg:#fff;--bs-offcanvas-border-width:1px;--bs-offcanvas-border-color:var(--bs-border-color-translucent);--bs-offcanvas-box-shadow:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075)}@media (max-width:575.98px){.offcanvas-sm{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:575.98px) and (prefers-reduced-motion:reduce){.offcanvas-sm{transition:none}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:575.98px){.offcanvas-sm.show:not(.hiding),.offcanvas-sm.showing{transform:none}}@media (max-width:575.98px){.offcanvas-sm.hiding,.offcanvas-sm.show,.offcanvas-sm.showing{visibility:visible}}@media (min-width:576px){.offcanvas-sm{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-sm .offcanvas-header{display:none}.offcanvas-sm .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:767.98px){.offcanvas-md{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:767.98px) and (prefers-reduced-motion:reduce){.offcanvas-md{transition:none}}@media (max-width:767.98px){.offcanvas-md.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:767.98px){.offcanvas-md.show:not(.hiding),.offcanvas-md.showing{transform:none}}@media (max-width:767.98px){.offcanvas-md.hiding,.offcanvas-md.show,.offcanvas-md.showing{visibility:visible}}@media (min-width:768px){.offcanvas-md{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-md .offcanvas-header{display:none}.offcanvas-md .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:991.98px){.offcanvas-lg{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:991.98px) and (prefers-reduced-motion:reduce){.offcanvas-lg{transition:none}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:991.98px){.offcanvas-lg.show:not(.hiding),.offcanvas-lg.showing{transform:none}}@media (max-width:991.98px){.offcanvas-lg.hiding,.offcanvas-lg.show,.offcanvas-lg.showing{visibility:visible}}@media (min-width:992px){.offcanvas-lg{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-lg .offcanvas-header{display:none}.offcanvas-lg .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:1199.98px){.offcanvas-xl{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:1199.98px) and (prefers-reduced-motion:reduce){.offcanvas-xl{transition:none}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:1199.98px){.offcanvas-xl.show:not(.hiding),.offcanvas-xl.showing{transform:none}}@media (max-width:1199.98px){.offcanvas-xl.hiding,.offcanvas-xl.show,.offcanvas-xl.showing{visibility:visible}}@media (min-width:1200px){.offcanvas-xl{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-xl .offcanvas-header{display:none}.offcanvas-xl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:1399.98px){.offcanvas-xxl{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:1399.98px) and (prefers-reduced-motion:reduce){.offcanvas-xxl{transition:none}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:1399.98px){.offcanvas-xxl.show:not(.hiding),.offcanvas-xxl.showing{transform:none}}@media (max-width:1399.98px){.offcanvas-xxl.hiding,.offcanvas-xxl.show,.offcanvas-xxl.showing{visibility:visible}}@media (min-width:1400px){.offcanvas-xxl{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-xxl .offcanvas-header{display:none}.offcanvas-xxl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}.offcanvas{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}@media (prefers-reduced-motion:reduce){.offcanvas{transition:none}}.offcanvas.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}.offcanvas.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}.offcanvas.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}.offcanvas.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}.offcanvas.show:not(.hiding),.offcanvas.showing{transform:none}.offcanvas.hiding,.offcanvas.show,.offcanvas.showing{visibility:visible}.offcanvas-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.offcanvas-backdrop.fade{opacity:0}.offcanvas-backdrop.show{opacity:.5}.offcanvas-header{display:flex;align-items:center;justify-content:space-between;padding:var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x)}.offcanvas-header .btn-close{padding:calc(var(--bs-offcanvas-padding-y) * .5) calc(var(--bs-offcanvas-padding-x) * .5);margin-top:calc(-.5 * var(--bs-offcanvas-padding-y));margin-right:calc(-.5 * var(--bs-offcanvas-padding-x));margin-bottom:calc(-.5 * var(--bs-offcanvas-padding-y))}.offcanvas-title{margin-bottom:0;line-height:1.5}.offcanvas-body{flex-grow:1;padding:var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x);overflow-y:auto}.placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentcolor;opacity:.5}.placeholder.btn::before{display:inline-block;content:""}.placeholder-xs{min-height:.6em}.placeholder-sm{min-height:.8em}.placeholder-lg{min-height:1.2em}.placeholder-glow .placeholder{animation:placeholder-glow 2s ease-in-out infinite}@keyframes placeholder-glow{50%{opacity:.2}}.placeholder-wave{-webkit-mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);-webkit-mask-size:200% 100%;mask-size:200% 100%;animation:placeholder-wave 2s linear infinite}@keyframes placeholder-wave{100%{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}.clearfix::after{display:block;clear:both;content:""}.text-bg-primary{color:#fff!important;background-color:RGBA(13,110,253,var(--bs-bg-opacity,1))!important}.text-bg-secondary{color:#fff!important;background-color:RGBA(108,117,125,var(--bs-bg-opacity,1))!important}.text-bg-success{color:#fff!important;background-color:RGBA(25,135,84,var(--bs-bg-opacity,1))!important}.text-bg-info{color:#000!important;background-color:RGBA(13,202,240,var(--bs-bg-opacity,1))!important}.text-bg-warning{color:#000!important;background-color:RGBA(255,193,7,var(--bs-bg-opacity,1))!important}.text-bg-danger{color:#fff!important;background-color:RGBA(220,53,69,var(--bs-bg-opacity,1))!important}.text-bg-light{color:#000!important;background-color:RGBA(248,249,250,var(--bs-bg-opacity,1))!important}.text-bg-dark{color:#fff!important;background-color:RGBA(33,37,41,var(--bs-bg-opacity,1))!important}.link-primary{color:#0d6efd!important}.link-primary:focus,.link-primary:hover{color:#0a58ca!important}.link-secondary{color:#6c757d!important}.link-secondary:focus,.link-secondary:hover{color:#565e64!important}.link-success{color:#198754!important}.link-success:focus,.link-success:hover{color:#146c43!important}.link-info{color:#0dcaf0!important}.link-info:focus,.link-info:hover{color:#3dd5f3!important}.link-warning{color:#ffc107!important}.link-warning:focus,.link-warning:hover{color:#ffcd39!important}.link-danger{color:#dc3545!important}.link-danger:focus,.link-danger:hover{color:#b02a37!important}.link-light{color:#f8f9fa!important}.link-light:focus,.link-light:hover{color:#f9fafb!important}.link-dark{color:#212529!important}.link-dark:focus,.link-dark:hover{color:#1a1e21!important}.ratio{position:relative;width:100%}.ratio::before{display:block;padding-top:var(--bs-aspect-ratio);content:""}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-1x1{--bs-aspect-ratio:100%}.ratio-4x3{--bs-aspect-ratio:75%}.ratio-16x9{--bs-aspect-ratio:56.25%}.ratio-21x9{--bs-aspect-ratio:42.8571428571%}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}@media (min-width:576px){.sticky-sm-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-sm-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:768px){.sticky-md-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-md-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:992px){.sticky-lg-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-lg-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:1200px){.sticky-xl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-xl-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:1400px){.sticky-xxl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-xxl-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}.hstack{display:flex;flex-direction:row;align-items:center;align-self:stretch}.vstack{display:flex;flex:1 1 auto;flex-direction:column;align-self:stretch}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:""}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vr{display:inline-block;align-self:stretch;width:1px;min-height:1em;background-color:currentcolor;opacity:.25}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.float-start{float:left!important}.float-end{float:right!important}.float-none{float:none!important}.opacity-0{opacity:0!important}.opacity-25{opacity:.25!important}.opacity-50{opacity:.5!important}.opacity-75{opacity:.75!important}.opacity-100{opacity:1!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-visible{overflow:visible!important}.overflow-scroll{overflow:scroll!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.top-0{top:0!important}.top-50{top:50%!important}.top-100{top:100%!important}.bottom-0{bottom:0!important}.bottom-50{bottom:50%!important}.bottom-100{bottom:100%!important}.start-0{left:0!important}.start-50{left:50%!important}.start-100{left:100%!important}.end-0{right:0!important}.end-50{right:50%!important}.end-100{right:100%!important}.translate-middle{transform:translate(-50%,-50%)!important}.translate-middle-x{transform:translateX(-50%)!important}.translate-middle-y{transform:translateY(-50%)!important}.border{border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-0{border:0!important}.border-top{border-top:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-top-0{border-top:0!important}.border-end{border-right:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-end-0{border-right:0!important}.border-bottom{border-bottom:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-bottom-0{border-bottom:0!important}.border-start{border-left:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-start-0{border-left:0!important}.border-primary{--bs-border-opacity:1;border-color:rgba(var(--bs-primary-rgb),var(--bs-border-opacity))!important}.border-secondary{--bs-border-opacity:1;border-color:rgba(var(--bs-secondary-rgb),var(--bs-border-opacity))!important}.border-success{--bs-border-opacity:1;border-color:rgba(var(--bs-success-rgb),var(--bs-border-opacity))!important}.border-info{--bs-border-opacity:1;border-color:rgba(var(--bs-info-rgb),var(--bs-border-opacity))!important}.border-warning{--bs-border-opacity:1;border-color:rgba(var(--bs-warning-rgb),var(--bs-border-opacity))!important}.border-danger{--bs-border-opacity:1;border-color:rgba(var(--bs-danger-rgb),var(--bs-border-opacity))!important}.border-light{--bs-border-opacity:1;border-color:rgba(var(--bs-light-rgb),var(--bs-border-opacity))!important}.border-dark{--bs-border-opacity:1;border-color:rgba(var(--bs-dark-rgb),var(--bs-border-opacity))!important}.border-white{--bs-border-opacity:1;border-color:rgba(var(--bs-white-rgb),var(--bs-border-opacity))!important}.border-1{--bs-border-width:1px}.border-2{--bs-border-width:2px}.border-3{--bs-border-width:3px}.border-4{--bs-border-width:4px}.border-5{--bs-border-width:5px}.border-opacity-10{--bs-border-opacity:0.1}.border-opacity-25{--bs-border-opacity:0.25}.border-opacity-50{--bs-border-opacity:0.5}.border-opacity-75{--bs-border-opacity:0.75}.border-opacity-100{--bs-border-opacity:1}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.mw-100{max-width:100%!important}.vw-100{width:100vw!important}.min-vw-100{min-width:100vw!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mh-100{max-height:100%!important}.vh-100{height:100vh!important}.min-vh-100{min-height:100vh!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-right:0!important;margin-left:0!important}.mx-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-auto{margin-left:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-right:0!important;padding-left:0!important}.px-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-right:0!important}.pe-1{padding-right:.25rem!important}.pe-2{padding-right:.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-left:0!important}.ps-1{padding-left:.25rem!important}.ps-2{padding-left:.5rem!important}.ps-3{padding-left:1rem!important}.ps-4{padding-left:1.5rem!important}.ps-5{padding-left:3rem!important}.gap-0{gap:0!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:1rem!important}.gap-4{gap:1.5rem!important}.gap-5{gap:3rem!important}.font-monospace{font-family:var(--bs-font-monospace)!important}.fs-1{font-size:calc(1.375rem + 1.5vw)!important}.fs-2{font-size:calc(1.325rem + .9vw)!important}.fs-3{font-size:calc(1.3rem + .6vw)!important}.fs-4{font-size:calc(1.275rem + .3vw)!important}.fs-5{font-size:1.25rem!important}.fs-6{font-size:1rem!important}.fst-italic{font-style:italic!important}.fst-normal{font-style:normal!important}.fw-light{font-weight:300!important}.fw-lighter{font-weight:lighter!important}.fw-normal{font-weight:400!important}.fw-bold{font-weight:700!important}.fw-semibold{font-weight:600!important}.fw-bolder{font-weight:bolder!important}.lh-1{line-height:1!important}.lh-sm{line-height:1.25!important}.lh-base{line-height:1.5!important}.lh-lg{line-height:2!important}.text-start{text-align:left!important}.text-end{text-align:right!important}.text-center{text-align:center!important}.text-decoration-none{text-decoration:none!important}.text-decoration-underline{text-decoration:underline!important}.text-decoration-line-through{text-decoration:line-through!important}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-break{word-wrap:break-word!important;word-break:break-word!important}.text-primary{--bs-text-opacity:1;color:rgba(var(--bs-primary-rgb),var(--bs-text-opacity))!important}.text-secondary{--bs-text-opacity:1;color:rgba(var(--bs-secondary-rgb),var(--bs-text-opacity))!important}.text-success{--bs-text-opacity:1;color:rgba(var(--bs-success-rgb),var(--bs-text-opacity))!important}.text-info{--bs-text-opacity:1;color:rgba(var(--bs-info-rgb),var(--bs-text-opacity))!important}.text-warning{--bs-text-opacity:1;color:rgba(var(--bs-warning-rgb),var(--bs-text-opacity))!important}.text-danger{--bs-text-opacity:1;color:rgba(var(--bs-danger-rgb),var(--bs-text-opacity))!important}.text-light{--bs-text-opacity:1;color:rgba(var(--bs-light-rgb),var(--bs-text-opacity))!important}.text-dark{--bs-text-opacity:1;color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}.text-black{--bs-text-opacity:1;color:rgba(var(--bs-black-rgb),var(--bs-text-opacity))!important}.text-white{--bs-text-opacity:1;color:rgba(var(--bs-white-rgb),var(--bs-text-opacity))!important}.text-body{--bs-text-opacity:1;color:rgba(var(--bs-body-color-rgb),var(--bs-text-opacity))!important}.text-muted{--bs-text-opacity:1;color:#6c757d!important}.text-black-50{--bs-text-opacity:1;color:rgba(0,0,0,.5)!important}.text-white-50{--bs-text-opacity:1;color:rgba(255,255,255,.5)!important}.text-reset{--bs-text-opacity:1;color:inherit!important}.text-opacity-25{--bs-text-opacity:0.25}.text-opacity-50{--bs-text-opacity:0.5}.text-opacity-75{--bs-text-opacity:0.75}.text-opacity-100{--bs-text-opacity:1}.bg-primary{--bs-bg-opacity:1;background-color:rgba(var(--bs-primary-rgb),var(--bs-bg-opacity))!important}.bg-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-secondary-rgb),var(--bs-bg-opacity))!important}.bg-success{--bs-bg-opacity:1;background-color:rgba(var(--bs-success-rgb),var(--bs-bg-opacity))!important}.bg-info{--bs-bg-opacity:1;background-color:rgba(var(--bs-info-rgb),var(--bs-bg-opacity))!important}.bg-warning{--bs-bg-opacity:1;background-color:rgba(var(--bs-warning-rgb),var(--bs-bg-opacity))!important}.bg-danger{--bs-bg-opacity:1;background-color:rgba(var(--bs-danger-rgb),var(--bs-bg-opacity))!important}.bg-light{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-rgb),var(--bs-bg-opacity))!important}.bg-dark{--bs-bg-opacity:1;background-color:rgba(var(--bs-dark-rgb),var(--bs-bg-opacity))!important}.bg-black{--bs-bg-opacity:1;background-color:rgba(var(--bs-black-rgb),var(--bs-bg-opacity))!important}.bg-white{--bs-bg-opacity:1;background-color:rgba(var(--bs-white-rgb),var(--bs-bg-opacity))!important}.bg-body{--bs-bg-opacity:1;background-color:rgba(var(--bs-body-bg-rgb),var(--bs-bg-opacity))!important}.bg-transparent{--bs-bg-opacity:1;background-color:transparent!important}.bg-opacity-10{--bs-bg-opacity:0.1}.bg-opacity-25{--bs-bg-opacity:0.25}.bg-opacity-50{--bs-bg-opacity:0.5}.bg-opacity-75{--bs-bg-opacity:0.75}.bg-opacity-100{--bs-bg-opacity:1}.bg-gradient{background-image:var(--bs-gradient)!important}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.pe-none{pointer-events:none!important}.pe-auto{pointer-events:auto!important}.rounded{border-radius:var(--bs-border-radius)!important}.rounded-0{border-radius:0!important}.rounded-1{border-radius:var(--bs-border-radius-sm)!important}.rounded-2{border-radius:var(--bs-border-radius)!important}.rounded-3{border-radius:var(--bs-border-radius-lg)!important}.rounded-4{border-radius:var(--bs-border-radius-xl)!important}.rounded-5{border-radius:var(--bs-border-radius-2xl)!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:var(--bs-border-radius-pill)!important}.rounded-top{border-top-left-radius:var(--bs-border-radius)!important;border-top-right-radius:var(--bs-border-radius)!important}.rounded-end{border-top-right-radius:var(--bs-border-radius)!important;border-bottom-right-radius:var(--bs-border-radius)!important}.rounded-bottom{border-bottom-right-radius:var(--bs-border-radius)!important;border-bottom-left-radius:var(--bs-border-radius)!important}.rounded-start{border-bottom-left-radius:var(--bs-border-radius)!important;border-top-left-radius:var(--bs-border-radius)!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media (min-width:576px){.float-sm-start{float:left!important}.float-sm-end{float:right!important}.float-sm-none{float:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-right:0!important;margin-left:0!important}.mx-sm-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-sm-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-sm-3{margin-right:1rem!important;margin-left:1rem!important}.mx-sm-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-sm-5{margin-right:3rem!important;margin-left:3rem!important}.mx-sm-auto{margin-right:auto!important;margin-left:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-right:0!important}.me-sm-1{margin-right:.25rem!important}.me-sm-2{margin-right:.5rem!important}.me-sm-3{margin-right:1rem!important}.me-sm-4{margin-right:1.5rem!important}.me-sm-5{margin-right:3rem!important}.me-sm-auto{margin-right:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-left:0!important}.ms-sm-1{margin-left:.25rem!important}.ms-sm-2{margin-left:.5rem!important}.ms-sm-3{margin-left:1rem!important}.ms-sm-4{margin-left:1.5rem!important}.ms-sm-5{margin-left:3rem!important}.ms-sm-auto{margin-left:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-right:0!important;padding-left:0!important}.px-sm-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-sm-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-sm-3{padding-right:1rem!important;padding-left:1rem!important}.px-sm-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-sm-5{padding-right:3rem!important;padding-left:3rem!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-right:0!important}.pe-sm-1{padding-right:.25rem!important}.pe-sm-2{padding-right:.5rem!important}.pe-sm-3{padding-right:1rem!important}.pe-sm-4{padding-right:1.5rem!important}.pe-sm-5{padding-right:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-left:0!important}.ps-sm-1{padding-left:.25rem!important}.ps-sm-2{padding-left:.5rem!important}.ps-sm-3{padding-left:1rem!important}.ps-sm-4{padding-left:1.5rem!important}.ps-sm-5{padding-left:3rem!important}.gap-sm-0{gap:0!important}.gap-sm-1{gap:.25rem!important}.gap-sm-2{gap:.5rem!important}.gap-sm-3{gap:1rem!important}.gap-sm-4{gap:1.5rem!important}.gap-sm-5{gap:3rem!important}.text-sm-start{text-align:left!important}.text-sm-end{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.float-md-start{float:left!important}.float-md-end{float:right!important}.float-md-none{float:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-right:0!important;margin-left:0!important}.mx-md-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-md-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-md-3{margin-right:1rem!important;margin-left:1rem!important}.mx-md-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-md-5{margin-right:3rem!important;margin-left:3rem!important}.mx-md-auto{margin-right:auto!important;margin-left:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-right:0!important}.me-md-1{margin-right:.25rem!important}.me-md-2{margin-right:.5rem!important}.me-md-3{margin-right:1rem!important}.me-md-4{margin-right:1.5rem!important}.me-md-5{margin-right:3rem!important}.me-md-auto{margin-right:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-left:0!important}.ms-md-1{margin-left:.25rem!important}.ms-md-2{margin-left:.5rem!important}.ms-md-3{margin-left:1rem!important}.ms-md-4{margin-left:1.5rem!important}.ms-md-5{margin-left:3rem!important}.ms-md-auto{margin-left:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-right:0!important;padding-left:0!important}.px-md-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-md-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-md-3{padding-right:1rem!important;padding-left:1rem!important}.px-md-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-md-5{padding-right:3rem!important;padding-left:3rem!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-right:0!important}.pe-md-1{padding-right:.25rem!important}.pe-md-2{padding-right:.5rem!important}.pe-md-3{padding-right:1rem!important}.pe-md-4{padding-right:1.5rem!important}.pe-md-5{padding-right:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-left:0!important}.ps-md-1{padding-left:.25rem!important}.ps-md-2{padding-left:.5rem!important}.ps-md-3{padding-left:1rem!important}.ps-md-4{padding-left:1.5rem!important}.ps-md-5{padding-left:3rem!important}.gap-md-0{gap:0!important}.gap-md-1{gap:.25rem!important}.gap-md-2{gap:.5rem!important}.gap-md-3{gap:1rem!important}.gap-md-4{gap:1.5rem!important}.gap-md-5{gap:3rem!important}.text-md-start{text-align:left!important}.text-md-end{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.float-lg-start{float:left!important}.float-lg-end{float:right!important}.float-lg-none{float:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-right:0!important;margin-left:0!important}.mx-lg-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-lg-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-lg-3{margin-right:1rem!important;margin-left:1rem!important}.mx-lg-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-lg-5{margin-right:3rem!important;margin-left:3rem!important}.mx-lg-auto{margin-right:auto!important;margin-left:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-right:0!important}.me-lg-1{margin-right:.25rem!important}.me-lg-2{margin-right:.5rem!important}.me-lg-3{margin-right:1rem!important}.me-lg-4{margin-right:1.5rem!important}.me-lg-5{margin-right:3rem!important}.me-lg-auto{margin-right:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-left:0!important}.ms-lg-1{margin-left:.25rem!important}.ms-lg-2{margin-left:.5rem!important}.ms-lg-3{margin-left:1rem!important}.ms-lg-4{margin-left:1.5rem!important}.ms-lg-5{margin-left:3rem!important}.ms-lg-auto{margin-left:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-right:0!important;padding-left:0!important}.px-lg-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-lg-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-lg-3{padding-right:1rem!important;padding-left:1rem!important}.px-lg-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-lg-5{padding-right:3rem!important;padding-left:3rem!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-right:0!important}.pe-lg-1{padding-right:.25rem!important}.pe-lg-2{padding-right:.5rem!important}.pe-lg-3{padding-right:1rem!important}.pe-lg-4{padding-right:1.5rem!important}.pe-lg-5{padding-right:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-left:0!important}.ps-lg-1{padding-left:.25rem!important}.ps-lg-2{padding-left:.5rem!important}.ps-lg-3{padding-left:1rem!important}.ps-lg-4{padding-left:1.5rem!important}.ps-lg-5{padding-left:3rem!important}.gap-lg-0{gap:0!important}.gap-lg-1{gap:.25rem!important}.gap-lg-2{gap:.5rem!important}.gap-lg-3{gap:1rem!important}.gap-lg-4{gap:1.5rem!important}.gap-lg-5{gap:3rem!important}.text-lg-start{text-align:left!important}.text-lg-end{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.float-xl-start{float:left!important}.float-xl-end{float:right!important}.float-xl-none{float:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-right:0!important;margin-left:0!important}.mx-xl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xl-auto{margin-right:auto!important;margin-left:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-right:0!important}.me-xl-1{margin-right:.25rem!important}.me-xl-2{margin-right:.5rem!important}.me-xl-3{margin-right:1rem!important}.me-xl-4{margin-right:1.5rem!important}.me-xl-5{margin-right:3rem!important}.me-xl-auto{margin-right:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-left:0!important}.ms-xl-1{margin-left:.25rem!important}.ms-xl-2{margin-left:.5rem!important}.ms-xl-3{margin-left:1rem!important}.ms-xl-4{margin-left:1.5rem!important}.ms-xl-5{margin-left:3rem!important}.ms-xl-auto{margin-left:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-right:0!important;padding-left:0!important}.px-xl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-right:0!important}.pe-xl-1{padding-right:.25rem!important}.pe-xl-2{padding-right:.5rem!important}.pe-xl-3{padding-right:1rem!important}.pe-xl-4{padding-right:1.5rem!important}.pe-xl-5{padding-right:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-left:0!important}.ps-xl-1{padding-left:.25rem!important}.ps-xl-2{padding-left:.5rem!important}.ps-xl-3{padding-left:1rem!important}.ps-xl-4{padding-left:1.5rem!important}.ps-xl-5{padding-left:3rem!important}.gap-xl-0{gap:0!important}.gap-xl-1{gap:.25rem!important}.gap-xl-2{gap:.5rem!important}.gap-xl-3{gap:1rem!important}.gap-xl-4{gap:1.5rem!important}.gap-xl-5{gap:3rem!important}.text-xl-start{text-align:left!important}.text-xl-end{text-align:right!important}.text-xl-center{text-align:center!important}}@media (min-width:1400px){.float-xxl-start{float:left!important}.float-xxl-end{float:right!important}.float-xxl-none{float:none!important}.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-right:0!important;margin-left:0!important}.mx-xxl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xxl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xxl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xxl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xxl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xxl-auto{margin-right:auto!important;margin-left:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xxl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-right:0!important}.me-xxl-1{margin-right:.25rem!important}.me-xxl-2{margin-right:.5rem!important}.me-xxl-3{margin-right:1rem!important}.me-xxl-4{margin-right:1.5rem!important}.me-xxl-5{margin-right:3rem!important}.me-xxl-auto{margin-right:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-left:0!important}.ms-xxl-1{margin-left:.25rem!important}.ms-xxl-2{margin-left:.5rem!important}.ms-xxl-3{margin-left:1rem!important}.ms-xxl-4{margin-left:1.5rem!important}.ms-xxl-5{margin-left:3rem!important}.ms-xxl-auto{margin-left:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-right:0!important;padding-left:0!important}.px-xxl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xxl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xxl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xxl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xxl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xxl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pe-xxl-0{padding-right:0!important}.pe-xxl-1{padding-right:.25rem!important}.pe-xxl-2{padding-right:.5rem!important}.pe-xxl-3{padding-right:1rem!important}.pe-xxl-4{padding-right:1.5rem!important}.pe-xxl-5{padding-right:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-left:0!important}.ps-xxl-1{padding-left:.25rem!important}.ps-xxl-2{padding-left:.5rem!important}.ps-xxl-3{padding-left:1rem!important}.ps-xxl-4{padding-left:1.5rem!important}.ps-xxl-5{padding-left:3rem!important}.gap-xxl-0{gap:0!important}.gap-xxl-1{gap:.25rem!important}.gap-xxl-2{gap:.5rem!important}.gap-xxl-3{gap:1rem!important}.gap-xxl-4{gap:1.5rem!important}.gap-xxl-5{gap:3rem!important}.text-xxl-start{text-align:left!important}.text-xxl-end{text-align:right!important}.text-xxl-center{text-align:center!important}}@media (min-width:1200px){.fs-1{font-size:2.5rem!important}.fs-2{font-size:2rem!important}.fs-3{font-size:1.75rem!important}.fs-4{font-size:1.5rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}}`,""]);var G=new CSSStyleSheet;G.replaceSync(T.toString());const V=G},62621:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(78706),i=r.n(n),o=r(72859),a=r.n(o)()(i());a.push([t.id,".chsp-meta {\n z-index: 1;\n cursor: pointer;\n}\n\n.chsp-meta .chsp-info-icon {\n float: right;\n margin-top: 5px;\n margin-left: 3px;\n}\n\n.chsp-meta .chsp-info-icon svg {\n display: block;\n width: 14px;\n height: 14px;\n opacity: 0.6;\n}\n\n.chsp-authors-list {\n padding: 0;\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n justify-content: center;\n}\n\n.chsp-authors-list li {\n border: solid #dee2e6 1px;\n padding: 10px;\n list-style-type: none;\n white-space: nowrap;\n}\n\n.chsp-open-map-settings {\n position: absolute;\n top: 3px;\n left: 5px;\n z-index: 10;\n}\n\n.chsp-open-viewer-settings {\n position: absolute;\n top: 5px;\n right: 5px;\n}\n\n.chsp-extra-options-btn {\n margin: auto;\n display: block;\n}\n\n/* Tooltip text */\n.chsp-tooltip {\n visibility: hidden;\n background: #69738a;\n color: white;\n padding: 6px;\n font-size: 12px;\n line-height: 12px;\n white-space: nowrap;\n border-radius: 2px;\n text-align: center;\n display: inline-block;\n width: 9em;\n position: absolute;\n z-index: 100000;\n}\n\n.chsp-tooltip-right {\n top: 0px;\n right: -9.5em;\n}\n\n.chsp-tooltip-below {\n top: 35px;\n left: -3.5em;\n}\n\n.chsp-has-tooltip:hover .chsp-tooltip {\n visibility: visible;\n}\n\n.chsp-pin-marker {\n border-radius: 50%;\n border: solid 1px black;\n --size: 12px;\n width: var(--size);\n height: var(--size);\n z-index: 10;\n}\n\n.chsp-map-pin-marker {\n position: absolute;\n /* ensure the top/right/left/bottom positioning is relative to the center of the div */\n transform: translate(calc(-50% + var(--size)), -50%);\n}\n\n.chsp-pin-marker:hover {\n --size: 20px;\n cursor: pointer;\n}\n\n/* This class is added on top of .chsp-pin-marker for the active pinned structure/environment */\n.chsp-active-pin {\n border-width: 2px;\n --size: 20px;\n}\n\n.chsp-active-pin:hover {\n --size: 22px;\n cursor: default;\n}\n\n.chsp-viewer-button {\n position: absolute;\n padding: 1px;\n margin: 0;\n height: 28px;\n width: 28px;\n z-index: 10;\n}\n\n.chsp-viewer-action-button {\n background-color: white;\n border: none;\n}\n\n.chsp-viewer-action-button:hover {\n background: white;\n}\n\n.chsp-viewer-action-button svg {\n opacity: 0.4;\n transition: opacity 0.15s ease-in-out;\n}\n\n.chsp-viewer-action-button:hover svg {\n opacity: 0.6;\n}\n\n.chsp-structure-viewer-grid {\n display: grid;\n position: relative;\n width: 100%;\n height: 100%;\n grid-column-gap: 2px;\n grid-row-gap: 2px;\n}\n\n.chsp-structure-viewer-cell {\n width: 99%;\n height: 99%;\n left: 0.5%;\n top: 0.5%;\n position: relative;\n border: 1px solid lightgray;\n padding: 1px;\n}\n\n.chsp-structure-viewer-cell-active {\n border-color: gray;\n}\n\n.chsp-map-options {\n display: grid;\n grid-template-columns: 1fr 0.5fr;\n align-items: center;\n justify-content: center;\n align-content: start;\n column-gap: 1em;\n}\n\n.chsp-map-options label {\n min-width: 6em;\n}\n\n.chsp-map-options > :nth-child(n + 3):not(.chsp-map-extra-options) {\n margin-top: 1.3rem;\n}\n\n.chsp-map-extra-options {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: auto 1fr 1fr;\n column-gap: 1em;\n}\n\n.chsp-map-extra-options > * {\n margin: 0.5em 0;\n}\n\n.chsp-map-extra-options label {\n min-width: auto;\n}\n\n.chsp-map-extra-options {\n grid-column: 1 / span 2;\n}\n\n.chsp-map-options .form-check-label {\n width: auto;\n}\n\n.chsp-modal-header {\n cursor: grab;\n}\n\n.chsp-play-button {\n border: 0;\n background: transparent;\n box-sizing: border-box;\n height: 1.2em;\n width: 1.2em;\n margin-left: 0.5ex;\n\n border-color: transparent transparent transparent #202020;\n transition: 100ms all ease;\n cursor: pointer;\n\n border-style: solid;\n border-width: 0.7em 0 0.7em 1em;\n}\n\n.chsp-play-button.chsp-playing {\n border-style: double;\n border-width: 0px 0 0px 1.2em;\n}\n\n.chsp-play-button:hover {\n border-color: transparent transparent transparent #404040;\n}\n\n.chsp-properties-table {\n height: 100%;\n width: 80%;\n margin: auto;\n}\n\n.chsp-properties-table td,\n.chsp-properties-table th {\n width: 50%;\n border-top: none;\n}\n\n.chsp-settings-section-title {\n font-weight: bold;\n}\n\n/* Change Plotly modebar style to match the style of the structure grid buttons */\n\n.chsp-map .modebar-group {\n padding-left: 0 !important;\n}\n\n.chsp-map .modebar-btn {\n cursor: default !important;\n font-family: apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n 'Noto Color Emoji';\n}\n\n.chsp-map .modebar-btn::after {\n opacity: 0.9;\n}\n\n.chsp-map .icon:hover + .modebar-btn::after {\n visibility: visible;\n}\n\n.chsp-map .modebar-btn::before {\n content: none !important;\n}\n\n.chsp-map .modebar-btn .icon {\n transition: opacity 0.15s ease-in-out;\n padding: 3px;\n opacity: 0.3;\n cursor: pointer;\n}\n\n.chsp-map .modebar-group svg.icon {\n width: 2em;\n height: 2em;\n border-radius: 0.2em;\n}\n\n.chsp-map .modebar-group svg.icon:active {\n color: #212529;\n background-color: #dae0e5;\n border-color: #d3d9df;\n box-shadow: 0 0 0 0.2rem rgb(216 217 219 / 50%);\n}\n\n.chsp-map .modebar-btn .icon path {\n transition:\n color 0.15s ease-in-out,\n background-color 0.15s ease-in-out,\n border-color 0.15s ease-in-out,\n box-shadow 0.15s ease-in-out;\n fill: black !important;\n}\n\n.chsp-map .modebar-btn .icon:hover {\n opacity: 0.6;\n}\n\n.chsp-map .modebar-btn.active .icon {\n opacity: 0.6;\n}\n\n.chsp-info-btns {\n display: flex;\n position: relative;\n margin-bottom: 0.5ex;\n margin-top: 0.5ex;\n justify-content: center;\n}\n\n.chsp-info-structure-btn {\n min-width: 8em;\n padding-left: 6px;\n padding-right: 4px;\n font-weight: bold;\n font-size: small;\n background-color: none;\n border-color: #66a5e8;\n border-width: 2px;\n float: left;\n}\n\n.chsp-info-structure-btn:hover {\n background-color: #5b94d0;\n}\n\n.chsp-info-atom-btn {\n margin-left: 1em;\n padding-left: 6px;\n padding-right: 4px;\n min-width: 8em;\n font-weight: bold;\n font-size: small;\n background-color: none;\n border-color: #4cb64c;\n border-width: 2px;\n}\n\n.chsp-info-atom-btn:hover {\n background-color: #44a344;\n}\n\n.chsp-info-btns-svg {\n float: left;\n padding-right: 6px;\n padding-top: 3px;\n}\n\n.chsp-info-btns-svg svg {\n display: block;\n opacity: 0.6;\n}\n\n.chsp-info-number {\n -moz-appearance: textfield;\n appearance: textfield;\n border: none;\n transition: background-color 0.15s;\n background-color: #ebedf0;\n margin-left: 2px;\n margin-right: 3px;\n font-family: inherit;\n width: 4em;\n}\n\n.chsp-info-atom-btn:hover .chsp-info-number {\n background-color: #69b569;\n}\n\n.chsp-info-structure-btn:hover .chsp-info-number {\n background-color: #7ba9d9;\n}\n\n.chsp-info-number::-webkit-outer-spin-button,\n.chsp-info-number::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.chsp-info-tables {\n position: relative;\n width: 100%;\n}\n\n.chsp-info-table {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 10;\n background-color: white;\n /* max-height is set in JavaScript */\n overflow: auto;\n}\n\n.chsp-info-table.collapsing {\n overflow: hidden;\n}\n\n.chsp-info-table table {\n margin: 0;\n}\n\n/* Change the atoms slider thumb color to green, to match structure highlight */\n.chsp-atom-slider::-webkit-slider-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-moz-range-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-ms-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-webkit-slider-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider::-moz-range-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider::-ms-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider:focus::-webkit-slider-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-atom-slider:focus::-moz-range-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-atom-slider:focus::-ms-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-settings-representation {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr;\n grid-row-gap: 1ex;\n}\n\n.chsp-settings-representation label {\n cursor: help;\n}\n\n.chsp-settings-supercell {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr 2fr;\n}\n\n.chsp-supercell-count {\n max-width: 3.5em;\n}\n\n.chsp-settings-camera {\n display: grid;\n gap: 1em;\n grid-template-columns: repeat(7, auto);\n justify-content: center;\n}\n\n.chsp-settings-environments {\n display: grid;\n align-items: center;\n column-gap: 1em;\n grid-template-columns: 1fr 1fr 1fr;\n}\n\n.chsp-settings-extra-options {\n display: grid;\n gap: 1em;\n grid-template-columns: 1fr 1fr 1fr;\n grid-column: 1 / span 3;\n}\n\n.chsp-settings-extra-options > :nth-child(-n + 3) {\n margin-top: 1em;\n}\n\n.chsp-settings-trajectory {\n display: grid;\n grid-template-columns: 12em 12em;\n justify-content: center;\n align-content: center;\n gap: 1em;\n margin-bottom: 1ex;\n}\n\n.chsp-cell-info {\n position: absolute;\n bottom: 5px;\n left: 5px;\n font-size: 0.8em;\n}\n\n.chsp-toggle-plot-btn {\n display: block;\n position: relative;\n margin-top: 3px;\n margin-bottom: 1px;\n}\n\n.chsp-atom-color-property {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: 1fr 1fr;\n column-gap: 1em;\n margin: 0.5em 0;\n}\n\n.chsp-atom-extra-options {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: auto 1fr 1fr;\n column-gap: 1em;\n}\n\n.chsp-atom-extra-options > * {\n margin: 0.5em 0;\n}\n\n.chsp-atom-extra-options label {\n min-width: auto;\n}\n\n.chsp-atom-extra-options {\n grid-column: 1 / span 2;\n}\n\n.chsp-target-toggle {\n padding-left: 5px;\n padding-right: 5px;\n display: flex;\n justify-content: flex-end;\n gap: 5px;\n}\n\n.chsp-target-spinner {\n width: 25px;\n height: 25px;\n margin-left: 5px;\n}\n",""]);var s=new CSSStyleSheet;s.replaceSync(a.toString());const l=s},37821:function(module,__unused_webpack_exports,__webpack_require__){var process=__webpack_require__(39807),factory;factory=()=>(()=>{var __webpack_modules__={"./node_modules/iobuffer/lib-esm/IOBuffer.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{IOBuffer:()=>a});var n=r("./node_modules/iobuffer/lib-esm/text.browser.js");const i=(()=>{const t=new Uint8Array(4);return!((new Uint32Array(t.buffer)[0]=1)&t[0])})(),o={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class a{constructor(t=8192,e={}){let r=!1;"number"==typeof t?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);const n=e.offset?e.offset>>>0:0,i=t.byteLength-n;let o=n;(ArrayBuffer.isView(t)||t instanceof a)&&(t.byteLength!==t.buffer.byteLength&&(o=t.byteOffset+n),t=t.buffer),this.lastWrittenByte=r?i:0,this.buffer=t,this.length=i,this.byteLength=i,this.byteOffset=o,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,o,i),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}back(t=1){return this.offset-=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const t=this._marks.pop();if(void 0===t)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const e=2*(this.offset+t),r=new Uint8Array(e);r.set(new Uint8Array(this.buffer)),this.buffer=r.buffer,this.length=this.byteLength=e,this._data=new DataView(this.buffer)}return this}readBoolean(){return 0!==this.readUint8()}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,e){const r=o[e].BYTES_PER_ELEMENT*t,n=this.byteOffset+this.offset,a=this.buffer.slice(n,n+r);if(this.littleEndian===i&&"uint8"!==e&&"int8"!==e){const t=new Uint8Array(this.buffer.slice(n,n+r));t.reverse();const i=new o[e](t.buffer);return this.offset+=r,i.reverse(),i}const s=new o[e](a);return this.offset+=r,s}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let e="";for(let r=0;rthis.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}},"./node_modules/iobuffer/lib-esm/text-encoding-polyfill.js":function(){"use strict";!function(t){if(t.TextEncoder&&t.TextDecoder)return!1;function e(t="utf-8"){if("utf-8"!==t)throw new RangeError(`Failed to construct 'TextEncoder': The encoding label provided ('${t}') is invalid.`)}function r(t="utf-8",e={fatal:!1}){if("utf-8"!==t)throw new RangeError(`Failed to construct 'TextDecoder': The encoding label provided ('${t}') is invalid.`);if(e.fatal)throw new Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}Object.defineProperty(e.prototype,"encoding",{value:"utf-8"}),e.prototype.encode=function(t,e={stream:!1}){if(e.stream)throw new Error("Failed to encode: the 'stream' option is unsupported.");let r=0;const n=t.length;let i=0,o=Math.max(32,n+(n>>1)+7),a=new Uint8Array(o>>3<<3);for(;r=55296&&e<=56319){if(r=55296&&e<=56319)continue}if(i+4>a.length){o+=8,o*=1+r/t.length*2,o=o>>3<<3;const e=new Uint8Array(o);e.set(a),a=e}if(4294967168&e){if(4294965248&e)if(4294901760&e){if(4292870144&e)continue;a[i++]=e>>18&7|240,a[i++]=e>>12&63|128,a[i++]=e>>6&63|128}else a[i++]=e>>12&15|224,a[i++]=e>>6&63|128;else a[i++]=e>>6&31|192;a[i++]=63&e|128}else a[i++]=e}return a.slice(0,i)},Object.defineProperty(r.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(r.prototype,"fatal",{value:!1}),Object.defineProperty(r.prototype,"ignoreBOM",{value:!1}),r.prototype.decode=function(t,e={stream:!1}){if(e.stream)throw new Error("Failed to decode: the 'stream' option is unsupported.");const r=new Uint8Array(t);let n=0;const i=r.length,o=[];for(;n65535&&(e-=65536,o.push(e>>>10&1023|55296),e=56320|1023&e),o.push(e)}}else o.push(t)}return String.fromCharCode.apply(null,o)},t.TextEncoder=e,t.TextDecoder=r}("undefined"!=typeof window?window:"undefined"!=typeof self?self:this)},"./node_modules/iobuffer/lib-esm/text.browser.js":(t,e,r)=>{"use strict";function n(t,e="utf8"){return new TextDecoder(e).decode(t)}r.r(e),r.d(e,{decode:()=>n,encode:()=>o}),r("./node_modules/iobuffer/lib-esm/text-encoding-polyfill.js");const i=new TextEncoder;function o(t){return i.encode(t)}},"./node_modules/netcdfjs/lib-esm/data.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{nonRecord:()=>i,record:()=>o});var n=r("./node_modules/netcdfjs/lib-esm/types.js");function i(t,e){const r=(0,n.str2num)(e.type),i=e.size/(0,n.num2bytes)(r),o=new Array(i);for(let e=0;e{"use strict";r.r(e),r.d(e,{header:()=>d});var n=r("./node_modules/netcdfjs/lib-esm/types.js"),i=r("./node_modules/netcdfjs/lib-esm/utils.js");const o=0,a=10,s=11,l=12,c=0;function d(t,e){const r={version:e},l={length:t.readUint32()},d=function(t){const e={};let r,n;const s=t.readUint32();let l;if(s===o)return(0,i.notNetcdf)(t.readUint32()!==o,"wrong empty tag for list of dimensions"),[];{(0,i.notNetcdf)(s!==a,"wrong tag for list of dimensions");const e=t.readUint32();l=new Array(e);for(let o=0;o6,`non valid type ${f}`);const p=t.readUint32();let m=t.readUint32();2===r&&((0,i.notNetcdf)(m>0,"offsets larger than 4GB not supported"),m=t.readUint32());let g=!1;void 0!==e&&d[0]===e&&(c+=p,g=!0),l[a]={name:o,dimensions:d,attributes:h,type:(0,n.num2str)(f),size:p,offset:m,record:g}}}return{variables:l,recordStep:c}}(t,l?.id,e);return Array.isArray(h)||(r.variables=h.variables,l.recordStep=h.recordStep),r.recordDimension=l,r}function u(t){const e=t.readUint32();let r;if(e===o)return(0,i.notNetcdf)(t.readUint32()!==o,"wrong empty tag for list of attributes"),[];{(0,i.notNetcdf)(e!==l,"wrong tag for list of attributes");const o=t.readUint32();r=new Array(o);for(let e=0;e6,`non valid type ${a}`);const s=t.readUint32(),l=(0,n.readType)(t,a,s);(0,i.padding)(t),r[e]={name:o,type:(0,n.num2str)(a),value:l}}}return r}},"./node_modules/netcdfjs/lib-esm/index.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{NetCDFReader:()=>n.NetCDFReader});var n=r("./node_modules/netcdfjs/lib-esm/parser.js")},"./node_modules/netcdfjs/lib-esm/parser.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{NetCDFReader:()=>l});var n=r("./node_modules/iobuffer/lib-esm/IOBuffer.js"),i=r("./node_modules/netcdfjs/lib-esm/data.js"),o=r("./node_modules/netcdfjs/lib-esm/header.js"),a=r("./node_modules/netcdfjs/lib-esm/toString.js"),s=r("./node_modules/netcdfjs/lib-esm/utils.js");class l{constructor(t){this.toString=a.toString;const e=new n.IOBuffer(t);e.setBigEndian(),(0,s.notNetcdf)("CDF"!==e.readChars(3),"should start with CDF");const r=e.readByte();(0,s.notNetcdf)(r>2,"unknown version"),this.header=(0,o.header)(e,r),this.buffer=e}get version(){return 1===this.header.version?"classic format":"64-bit offset format"}get recordDimension(){return this.header.recordDimension}get dimensions(){return this.header.dimensions}get globalAttributes(){return this.header.globalAttributes}getAttribute(t){const e=this.globalAttributes.find((e=>e.name===t));return e?e.value:null}getDataVariableAsString(t){const e=this.getDataVariable(t);return e?e.join(""):null}get variables(){return this.header.variables}getDataVariable(t){let e;if(e="string"==typeof t?this.header.variables.find((e=>e.name===t)):t,void 0===e)throw new Error("Not a valid NetCDF v3.x file: variable not found");return this.buffer.seek(e.offset),e.record?(0,i.record)(this.buffer,e,this.header.recordDimension):(0,i.nonRecord)(this.buffer,e)}dataVariableExists(t){return void 0!==this.header.variables.find((e=>e.name===t))}attributeExists(t){return void 0!==this.globalAttributes.find((e=>e.name===t))}}},"./node_modules/netcdfjs/lib-esm/toString.js":(t,e,r)=>{"use strict";function n(){const t=[];t.push("DIMENSIONS");for(const e of this.dimensions)t.push(` ${e.name.padEnd(30)} = size: ${e.size}`);t.push(""),t.push("GLOBAL ATTRIBUTES");for(const e of this.globalAttributes)t.push(` ${e.name.padEnd(30)} = ${e.value}`);const e=JSON.parse(JSON.stringify(this.variables));t.push(""),t.push("VARIABLES:");for(const r of e){r.value=this.getDataVariable(r);let e=JSON.stringify(r.value);e.length>50&&(e=e.substring(0,50)),isNaN(r.value.length)||(e+=` (length: ${r.value.length})`),t.push(` ${r.name.padEnd(30)} = ${e}`)}return t.join("\n")}r.r(e),r.d(e,{toString:()=>n})},"./node_modules/netcdfjs/lib-esm/types.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{num2bytes:()=>o,num2str:()=>i,readType:()=>l,str2num:()=>a});const n={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6};function i(t){switch(Number(t)){case n.BYTE:return"byte";case n.CHAR:return"char";case n.SHORT:return"short";case n.INT:return"int";case n.FLOAT:return"float";case n.DOUBLE:return"double";default:return"undefined"}}function o(t){switch(Number(t)){case n.BYTE:case n.CHAR:return 1;case n.SHORT:return 2;case n.INT:case n.FLOAT:return 4;case n.DOUBLE:return 8;default:return-1}}function a(t){switch(String(t)){case"byte":return n.BYTE;case"char":return n.CHAR;case"short":return n.SHORT;case"int":return n.INT;case"float":return n.FLOAT;case"double":return n.DOUBLE;default:return-1}}function s(t,e){if(1!==t){const r=new Array(t);for(let n=0;n{"use strict";function n(t,e){if(t)throw new TypeError(`Not a valid NetCDF v3.x file: ${e}`)}function i(t){t.offset%4!=0&&t.skip(4-t.offset%4)}function o(t){const e=t.readUint32(),r=t.readChars(e);return i(t),r}r.r(e),r.d(e,{notNetcdf:()=>n,padding:()=>i,readName:()=>o})},"./src/WebGL/shaders/lib/basic/basic.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 viewMatrix;\nuniform float opacity;\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\nvoid main() {\n gl_FragColor = vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}"},"./src/WebGL/shaders/lib/basic/basic.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\n\nattribute vec3 position;\nattribute vec3 color;\n\nvarying vec3 vColor;\n\nvoid main() {\n\n vColor = color;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix * mvPosition;\n\n}"},"./src/WebGL/shaders/lib/instanced/instanced.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 viewMatrix;\nuniform float opacity;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLightFront;\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\n\n #ifndef WIREFRAME\n gl_FragColor.xyz *= vLightFront;\n #endif\n\n gl_FragColor = gl_FragColor * vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n}\n\n\n"},"./src/WebGL/shaders/lib/instanced/instanced.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 offset;\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute float radius;\n\nvarying vec3 vColor;\nvarying vec3 vLightFront;\n\nvoid main() {\n\n vColor = color;\n\n vec3 objectNormal = normal;\n vec3 transformedNormal = normalMatrix * objectNormal;\n vec4 mvPosition = modelViewMatrix * vec4( position * radius + offset, 1.0 );\n\n vLightFront = vec3( 0.0 );\n\n transformedNormal = normalize( transformedNormal );\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n\n vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\n\n gl_Position = projectionMatrix * mvPosition;\n}\n\n"},"./src/WebGL/shaders/lib/lambert/lambert.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 viewMatrix;\nuniform float opacity;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLightFront;\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\n\n #ifndef WIREFRAME\n gl_FragColor.xyz *= vLightFront;\n #endif\n\n gl_FragColor = gl_FragColor * vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n}"},"./src/WebGL/shaders/lib/lambert/lambert.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec3 vColor;\nvarying vec3 vLightFront;\n\nvoid main() {\n\n vColor = color;\n\n vec3 objectNormal = normal;\n vec3 transformedNormal = normalMatrix * objectNormal;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\n vLightFront = vec3( 0.0 );\n\n transformedNormal = normalize( transformedNormal );\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n\n vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\n\n gl_Position = projectionMatrix * mvPosition;\n}"},"./src/WebGL/shaders/lib/lambertdouble/lambertdouble.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 viewMatrix;\nuniform float opacity;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLightFront;\nvarying vec3 vLightBack;\n\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\n\n #ifndef WIREFRAME\n if ( gl_FrontFacing )\n gl_FragColor.xyz *= vLightFront;\n else\n gl_FragColor.xyz *= vLightBack;\n #endif\n\n gl_FragColor = gl_FragColor * vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n}\n\n\n"},"./src/WebGL/shaders/lib/lambertdouble/lambertdouble.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec3 vColor;\nvarying vec3 vLightFront;\nvarying vec3 vLightBack;\n\nvoid main() {\n\n vColor = color;\n\n vec3 objectNormal = normal;\n vec3 transformedNormal = normalMatrix * objectNormal;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\n vLightFront = vec3( 0.0 );\n vLightBack = vec3( 0.0 );\n\n transformedNormal = normalize( transformedNormal );\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n vec3 directionalLightWeightingBack = vec3( max( -dotProduct, 0.0 ) );\n\n vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\n vLightBack += directionalLightColor[ 0 ] * directionalLightWeightingBack;\n\n gl_Position = projectionMatrix * mvPosition;\n}\n\n"},"./src/WebGL/shaders/lib/outline/outline.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform float opacity;\nuniform vec3 outlineColor;\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n gl_FragColor = vec4( outlineColor, 1 );\n}\n\n\n"},"./src/WebGL/shaders/lib/outline/outline.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float outlineWidth;\nuniform float outlinePushback;\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvoid main() {\n\n vec4 norm = modelViewMatrix*vec4(normalize(normal),0.0);\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n mvPosition.xy += norm.xy*outlineWidth;\n gl_Position = projectionMatrix * mvPosition;\n mvPosition.z -= outlinePushback; //go backwards in model space\n vec4 pushpos = projectionMatrix*mvPosition; //project to get z in projection space, I'm probably missing some simple math to do the same thing..\n gl_Position.z = gl_Position.w*pushpos.z/pushpos.w;\n}\n\n"},"./src/WebGL/shaders/lib/screen/screen.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform sampler2D colormap;\nvarying highp vec2 vTexCoords;\nuniform vec2 dimensions;\n//DEFINEFRAGCOLOR\nvoid main (void) {\n gl_FragColor = texture2D(colormap, vTexCoords);\n}\n "},"./src/WebGL/shaders/lib/screen/screen.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="attribute vec2 vertexPosition;\nvarying highp vec2 vTexCoords;\nconst vec2 scale = vec2(0.5, 0.5);\n\nvoid main() {\n vTexCoords = vertexPosition * scale + scale; // scale vertex attribute to [0,1] range\n gl_Position = vec4(vertexPosition, 0.0, 1.0);\n}\n "},"./src/WebGL/shaders/lib/screenaa/screenaa.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform sampler2D colormap;\nvarying highp vec2 vTexCoords;\nuniform vec2 dimensions;\n\n// Basic FXAA implementation based on the code on geeks3d.com \n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#define FXAA_SPAN_MAX 8.0\n\nvec4 applyFXAA(vec2 fragCoord, sampler2D tex)\n{\n vec4 color;\n vec2 inverseVP = vec2(1.0 / dimensions.x, 1.0 / dimensions.y);\n vec3 rgbNW = texture2D(tex, fragCoord + vec2(-1.0, -1.0) * inverseVP).xyz;\n vec3 rgbNE = texture2D(tex, fragCoord + vec2(1.0, -1.0) * inverseVP).xyz;\n vec3 rgbSW = texture2D(tex, fragCoord + vec2(-1.0, 1.0) * inverseVP).xyz;\n vec3 rgbSE = texture2D(tex, fragCoord + vec2(1.0, 1.0) * inverseVP).xyz;\n vec3 rgbM = texture2D(tex, fragCoord * inverseVP).xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n\n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord + dir * -0.5).xyz +\n texture2D(tex, fragCoord + dir * 0.5).xyz);\n\n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, 1.0);\n else\n color = vec4(rgbB, 1.0);\n return color;\n}\n//DEFINEFRAGCOLOR\nvoid main (void) {\n gl_FragColor = applyFXAA(vTexCoords, colormap);\n}\n "},"./src/WebGL/shaders/lib/screenaa/screenaa.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="attribute vec2 vertexPosition;\nvarying highp vec2 vTexCoords;\nconst vec2 scale = vec2(0.5, 0.5);\n\nvoid main() {\n vTexCoords = vertexPosition * scale + scale; // scale vertex attribute to [0,1] range\n gl_Position = vec4(vertexPosition, 0.0, 1.0);\n}\n "},"./src/WebGL/shaders/lib/sphereimposter/sphereimposter.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\nuniform mat4 viewMatrix;\nuniform float opacity;\nuniform mat4 projectionMatrix;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\nuniform float uDepth;\nuniform vec3 directionalLightColor[ 1 ];\n\nvarying vec3 vColor;\nvarying vec2 mapping;\nvarying float rval;\nvarying vec3 vLight;\nvarying vec3 center;\n\n//DEFINEFRAGCOLOR\n\nvoid main() {\n float lensqr = dot(mapping,mapping);\n float rsqr = rval*rval;\n if(lensqr > rsqr)\n discard;\n float z = sqrt(rsqr-lensqr);\n vec3 cameraPos = center+ vec3(mapping.x,mapping.y,z);\n vec4 clipPos = projectionMatrix * vec4(cameraPos, 1.0);\n float ndcDepth = clipPos.z / clipPos.w;\n gl_FragDepthEXT = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n vec3 norm = normalize(vec3(mapping.x,mapping.y,z));\n float dotProduct = dot( norm, vLight );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n vec3 vLight = directionalLightColor[ 0 ] * directionalLightWeighting;\n gl_FragColor = vec4(vLight*vColor, opacity*opacity );\n float fogFactor = smoothstep( fogNear, fogFar, gl_FragDepthEXT/gl_FragCoord.w );\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n\n}\n\n"},"./src/WebGL/shaders/lib/sphereimposter/sphereimposter.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec2 mapping;\nvarying vec3 vColor;\nvarying float rval;\nvarying vec3 vLight;\nvarying vec3 center;\n\nvoid main() {\n\n vColor = color;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n center = mvPosition.xyz;\n vec4 projPosition = projectionMatrix * mvPosition;\n vec4 adjust = projectionMatrix* vec4(normal,0.0); adjust.z = 0.0; adjust.w = 0.0;\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vLight = normalize( lDirection.xyz );\n mapping = normal.xy;\n rval = abs(normal.x);\n gl_Position = projPosition+adjust;\n\n}\n"},"./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform float opacity;\nuniform vec3 outlineColor;\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\nuniform mat4 projectionMatrix;\nvarying vec2 mapping;\nvarying float rval;\nvarying vec3 center;\n\nuniform float outlinePushback;\n\n//DEFINEFRAGCOLOR\n\nvoid main() {\n float lensqr = dot(mapping,mapping);\n float rsqr = rval*rval;\n if(lensqr > rsqr)\n discard;\n float z = sqrt(rsqr-lensqr);\n vec3 cameraPos = center+ vec3(mapping.x,mapping.y,z-outlinePushback);\n vec4 clipPos = projectionMatrix * vec4(cameraPos, 1.0);\n float ndcDepth = clipPos.z / clipPos.w;\n gl_FragDepthEXT = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n gl_FragColor = vec4(outlineColor, 1 );\n}\n\n\n"},"./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float outlineWidth;\nuniform float outlinePushback;\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec2 mapping;\nvarying float rval;\nvarying vec3 center;\n\nvoid main() {\n\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n center = mvPosition.xyz;\n vec4 projPosition = projectionMatrix * mvPosition;\n vec2 norm = normal.xy + vec2(sign(normal.x)*outlineWidth,sign(normal.y)*outlineWidth);\n vec4 adjust = projectionMatrix* vec4(norm,normal.z,0.0); adjust.z = 0.0; adjust.w = 0.0;\n mapping = norm.xy;\n rval = abs(norm.x);\n gl_Position = projPosition+adjust;\n}\n\n"},"./src/WebGL/shaders/lib/sprite/sprite.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform vec3 color;\nuniform sampler2D map;\nuniform float opacity;\n\nuniform int fogType;\nuniform vec3 fogColor;\nuniform float fogDensity;\nuniform float fogNear;\nuniform float fogFar;\nuniform float alphaTest;\n\nvarying vec2 vUV;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n vec4 texture = texture2D(map, vUV);\n\n if (texture.a < alphaTest) discard;\n\n gl_FragColor = vec4(color * texture.xyz, texture.a * opacity);\n\n if (fogType > 0) {\n\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n float fogFactor = 0.0;\n\n if (fogType == 1) {\n fogFactor = smoothstep(fogNear, fogFar, depth);\n }\n\n else {\n const float LOG2 = 1.442695;\n float fogFactor = exp2(- fogDensity * fogDensity * depth * depth * LOG2);\n fogFactor = 1.0 - clamp(fogFactor, 0.0, 1.0);\n }\n\n gl_FragColor = mix(gl_FragColor, vec4(fogColor, gl_FragColor.w), fogFactor);\n\n }\n}\n\n"},"./src/WebGL/shaders/lib/sprite/sprite.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform int useScreenCoordinates;\nuniform vec3 screenPosition;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float rotation;\nuniform vec2 scale;\nuniform vec2 alignment;\nuniform vec2 uvOffset;\nuniform vec2 uvScale;\n\nattribute vec2 position;\nattribute vec2 uv;\n\nvarying vec2 vUV;\n\nvoid main() {\n\n vUV = uvOffset + uv * uvScale;\n\n vec2 alignedPosition = position + alignment;\n\n vec2 rotatedPosition;\n rotatedPosition.x = ( cos(rotation) * alignedPosition.x - sin(rotation) * alignedPosition.y ) * scale.x;\n rotatedPosition.y = ( sin(rotation) * alignedPosition.x + cos(rotation) * alignedPosition.y ) * scale.y;\n\n vec4 finalPosition;\n\n if(useScreenCoordinates != 0) {\n finalPosition = vec4(screenPosition.xy + rotatedPosition, screenPosition.z, 1.0);\n }\n\n else {\n finalPosition = projectionMatrix * modelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0); finalPosition /= finalPosition.w;\n finalPosition.xy += rotatedPosition; \n }\n\n gl_Position = finalPosition;\n\n}\n\n"},"./src/WebGL/shaders/lib/stickimposter/stickimposter.partial.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n=" float dotProduct = dot( norm, vLight );\n vec3 light = vec3( max( dotProduct, 0.0 ) );\n gl_FragColor = vec4(light*color, opacity*opacity );\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}"},"./src/WebGL/shaders/lib/stickimposter/stickimposter.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute float radius;\n\nvarying vec3 vColor;\nvarying vec3 vLight;\nvarying vec3 cposition;\nvarying vec3 p1;\nvarying vec3 p2;\nvarying float r;\n\nvoid main() {\n\n vColor = color; vColor.z = abs(vColor.z); //z indicates which vertex and so would vary\n r = abs(radius);\n vec4 to = modelViewMatrix*vec4(normal, 1.0); //normal is other point of cylinder\n vec4 pt = modelViewMatrix*vec4(position, 1.0);\n vec4 mvPosition = pt;\n p1 = pt.xyz; p2 = to.xyz;\n vec3 norm = to.xyz-pt.xyz;\n float mult = 1.1; //slop to account for perspective of sphere\n if(length(p1) > length(p2)) { //billboard at level of closest point\n mvPosition = to;\n }\n vec3 n = normalize(mvPosition.xyz);\n//intersect with the plane defined by the camera looking at the billboard point\n if(color.z >= 0.0) { //p1\n if(projectionMatrix[3][3] == 0.0) { //perspective\n vec3 pnorm = normalize(p1);\n float t = dot(mvPosition.xyz-p1,n)/dot(pnorm,n);\n mvPosition.xyz = p1+t*pnorm; \n } else { //orthographic\n mvPosition.xyz = p1;\n }\n } else {\n if(projectionMatrix[3][3] == 0.0) { //perspective\n vec3 pnorm = normalize(p2);\n float t = dot(mvPosition.xyz-p2,n)/dot(pnorm,n);\n mvPosition.xyz = p2+t*pnorm;\n } else { //orthographic\n mvPosition.xyz = p2;\n } \n mult *= -1.0;\n }\n vec3 cr = normalize(cross(mvPosition.xyz,norm))*radius;\n vec3 doublecr = normalize(cross(mvPosition.xyz,cr))*radius;\n mvPosition.xyz += mult*(cr + doublecr).xyz;\n cposition = mvPosition.xyz;\n gl_Position = projectionMatrix * mvPosition;\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vLight = normalize( lDirection.xyz )*directionalLightColor[0]; //not really sure this is right, but color is always white so..\n}\n\n"},"./src/WebGL/shaders/lib/stickimposteroutline/stickimposteroutline.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\nuniform vec3 outlineColor;\nuniform float outlineWidth;\nuniform float outlinePushback;\n\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute float radius;\n\nvarying vec3 vColor;\nvarying vec3 vLight;\nvarying vec3 cposition;\nvarying vec3 p1;\nvarying vec3 p2;\nvarying float r;\n\nvoid main() {\n\n vColor = outlineColor;\n float rad = radius+sign(radius)*outlineWidth;\n r = abs(rad);\n vec4 to = modelViewMatrix*vec4(normal, 1.0); //normal is other point of cylinder\n vec4 pt = modelViewMatrix*vec4(position, 1.0);\n//pushback\n to.xyz += normalize(to.xyz)*outlinePushback;\n pt.xyz += normalize(pt.xyz)*outlinePushback;\n\n vec4 mvPosition = pt;\n p1 = pt.xyz; p2 = to.xyz;\n vec3 norm = to.xyz-pt.xyz;\n float mult = 1.1; //slop to account for perspective of sphere\n if(length(p1) > length(p2)) { //billboard at level of closest point\n mvPosition = to;\n }\n vec3 n = normalize(mvPosition.xyz);\n//intersect with the plane defined by the camera looking at the billboard point\n if(color.z >= 0.0) { //p1\n vec3 pnorm = normalize(p1);\n float t = dot(mvPosition.xyz-p1,n)/dot(pnorm,n);\n mvPosition.xyz = p1+t*pnorm;\n } else {\n vec3 pnorm = normalize(p2);\n float t = dot(mvPosition.xyz-p2,n)/dot(pnorm,n);\n mvPosition.xyz = p2+t*pnorm;\n mult *= -1.0;\n }\n vec3 cr = normalize(cross(mvPosition.xyz,norm))*rad;\n vec3 doublecr = normalize(cross(mvPosition.xyz,cr))*rad;\n mvPosition.xy += mult*(cr + doublecr).xy;\n cposition = mvPosition.xyz;\n gl_Position = projectionMatrix * mvPosition;\n vLight = vec3(1.0,1.0,1.0);\n}\n\n"},"./src/WebGL/shaders/lib/volumetric/volumetric.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\nuniform highp sampler3D data;\nuniform highp sampler2D colormap;\nuniform highp sampler2D depthmap;\n\n\nuniform mat4 textmat;\nuniform mat4 projinv;\nuniform mat4 projectionMatrix;\n\nuniform float step;\nuniform float subsamples;\nuniform float maxdepth;\nuniform float transfermin;\nuniform float transfermax;\nin vec4 mvPosition;\nout vec4 color;\nvoid main(void) {\n\n vec4 pos = mvPosition;\n bool seengood = false;\n float i = 0.0;\n color = vec4(1,1,1,0);\n float increment = 1.0/subsamples;\n float maxsteps = (maxdepth*subsamples/step);\n//there's probably a better way to do this..\n//calculate farthest possible point in model coordinates\n vec4 maxpos = vec4(pos.x,pos.y,pos.z-maxdepth,1.0);\n// convert to projection\n maxpos = projectionMatrix*maxpos;\n vec4 startp = projectionMatrix*pos;\n// homogonize\n maxpos /= maxpos.w;\n startp /= startp.w;\n//take x,y from start and z from max\n maxpos = vec4(startp.x,startp.y,maxpos.z,1.0);\n//convert back to model space\n maxpos = projinv*maxpos;\n maxpos /= maxpos.w;\n float incr = step/subsamples;\n//get depth from depthmap\n//startp is apparently [-1,1]\n vec2 tpos = startp.xy/2.0+0.5;\n float depth = texture(depthmap, tpos).r;\n//compute vector between start and end\n vec4 direction = maxpos-pos;\n for( i = 0.0; i <= maxsteps; i++) {\n vec4 pt = (pos+(i/maxsteps)*direction);\n vec4 ppt = projectionMatrix*pt;\n float ptdepth = ppt.z/ppt.w;\n ptdepth = ((gl_DepthRange.diff * ptdepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n if(ptdepth > depth) break;\n pt = textmat*pt;\n// pt /= pt.w;\n if(pt.x >= -0.01 && pt.y >= -0.01 && pt.z >= -0.01 && pt.x <= 1.01 && pt.y <= 1.01 && pt.z <= 1.01) {\n seengood = true;\n } else if(seengood) {\n break;\n }\n if( pt.x < -0.01 || pt.x > 1.01 || pt.y < -0.01 || pt.y > 1.01 || pt.z < -0.01 || pt.z > 1.01 ){\n color.a = 0.0;\n continue;\n }\n else {\n float val = texture(data, pt.zyx).r;\n if(isinf(val)) continue; //masked out\n float cval = (val-transfermin)/(transfermax-transfermin); //scale to texture 0-1 range\n vec4 val_color = texture(colormap, vec2(cval,0.5));\n color.rgb = color.rgb*color.a + (1.0-color.a)*val_color.a*val_color.rgb;\n color.a += (1.0 - color.a) * val_color.a; \n if(color.a > 0.0) color.rgb /= color.a;\n// color = vec4(pt.x, pt.y, pt.z, 1.0);\n }\n// color = vec4(pt.x, pt.y, pt.z, 0.0)\n }\n}\n\n "},"./src/WebGL/shaders/lib/volumetric/volumetric.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\n\nin vec3 position;\nout vec4 mvPosition;\nvoid main() {\n\n mvPosition = modelViewMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix*mvPosition;\n}\n"},"./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform float opacity;\nuniform mat4 projectionMatrix;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLight;\nvarying vec3 vColor;\nvarying vec3 cposition;\nvarying vec3 p1;\nvarying vec3 p2;\nvarying float r;\n\n//DEFINEFRAGCOLOR\n\n//cylinder-ray intersection testing taken from http://mrl.nyu.edu/~dzorin/cg05/lecture12.pdf\n//also useful: http://stackoverflow.com/questions/9595300/cylinder-impostor-in-glsl\n//with a bit more care (caps) this could be a general cylinder imposter (see also outline)\nvoid main() {\n vec3 color = abs(vColor);\n vec3 pos = cposition;\n vec3 p = pos; //ray point\n vec3 v = vec3(0.0,0.0,-1.0); //ray normal - orthographic\n if(projectionMatrix[3][3] == 0.0) v = normalize(pos); //ray normal - perspective\n vec3 pa = p1; //cyl start\n vec3 va = normalize(p2-p1); //cyl norm\n vec3 tmp1 = v-(dot(v,va)*va);\n vec3 deltap = p-pa;\n float A = dot(tmp1,tmp1);\n if(A == 0.0) discard;\n vec3 tmp2 = deltap-(dot(deltap,va)*va);\n float B = 2.0*dot(tmp1, tmp2);\n float C = dot(tmp2,tmp2)-r*r;\n//quadratic equation!\n float det = (B*B) - (4.0*A*C);\n if(det < 0.0) discard;\n float sqrtDet = sqrt(det);\n float posT = (-B+sqrtDet)/(2.0*A);\n float negT = (-B-sqrtDet)/(2.0*A);\n float intersectionT = min(posT,negT);\n vec3 qi = p+v*intersectionT;\n float dotp1 = dot(va,qi-p1);\n float dotp2 = dot(va,qi-p2);\n vec3 norm;\n if( dotp1 < 0.0 || dotp2 > 0.0) { //(p-c)^2 + 2(p-c)vt +v^2+t^2 - r^2 = 0\n vec3 cp;\n if( dotp1 < 0.0) { \n// if(vColor.x < 0.0 ) discard; //color sign bit indicates if we should cap or not\n cp = p1;\n } else {\n// if(vColor.y < 0.0 ) discard;\n cp = p2;\n }\n vec3 diff = p-cp;\n A = dot(v,v);\n B = dot(diff,v)*2.0;\n C = dot(diff,diff)-r*r;\n det = (B*B) - (4.0*C);\n if(det < 0.0) discard;\n sqrtDet = sqrt(det);\n posT = (-B+sqrtDet)/(2.0);\n negT = (-B-sqrtDet)/(2.0);\n float t = min(posT,negT);\n qi = p+v*t; \n norm = normalize(qi-cp); \n } else {\n norm = normalize(qi-(dotp1*va + p1));\n }\n vec4 clipPos = projectionMatrix * vec4(qi, 1.0);\n float ndcDepth = clipPos.z / clipPos.w;\n float depth = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n gl_FragDepthEXT = depth;"},"./src/GLDraw.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{CAP:()=>n,GLDraw:()=>i});var n,i,o=r("./src/WebGL/math/index.ts");!function(t){t[t.NONE=0]="NONE",t[t.FLAT=1]="FLAT",t[t.ROUND=2]="ROUND"}(n||(n={})),function(t){function e(t,e,r){var n,i,o,a,s,l=Math.hypot(t,e);l<1e-4?(i=0,o=1):(i=-t/l,o=e/l),e=-i*t+o*e,(n=Math.hypot(e,r))<1e-4?(a=0,s=1):(a=r/n,s=e/n);var c=new Float32Array(9);return c[0]=o,c[1]=i,c[2]=0,c[3]=-i*s,c[4]=o*s,c[5]=a,c[6]=i*a,c[7]=-o*a,c[8]=s,c}var r=new class{constructor(){this.cache={};let t,e=[],r=Math.pow(2,4),n=2,i=Math.pow(2,n),a=r/i;for(e[0]=new o.Vector3(-1,0,0),e[a]=new o.Vector3(0,0,1),e[2*a]=new o.Vector3(1,0,0),e[3*a]=new o.Vector3(0,0,-1),n=3;n<=4;n++){for(i=Math.pow(2,n-1),a=r/i,t=0;t{"use strict";r.r(e),r.d(e,{GLModel:()=>g});var n=r("./src/WebGL/index.ts"),i=r("./src/WebGL/shapes/index.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/colors.ts"),s=r("./src/GLDraw.ts"),l=r("./src/glcartoon.ts"),c=r("./src/utilities.ts"),d=r("./src/Gradient.ts"),u=r("./src/parsers/index.ts"),h=r("./node_modules/netcdfjs/lib-esm/index.js"),f=r("./node_modules/pako/dist/pako.esm.mjs"),p=r("./src/parsers/utils/assignBonds.ts");function m(t){let e;return e="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t),(0,f.inflate)(e,{to:"string"})}class g{static sameObj(t,e){return t&&e?JSON.stringify(t)==JSON.stringify(e):t==e}constructor(t,e){this.atoms=[],this.frames=[],this.box=null,this.atomdfs=null,this.id=0,this.hidden=!1,this.molObj=null,this.renderedMolObj=null,this.lastColors=null,this.modelData={},this.modelDatas=null,this.idMatrix=new o.Matrix4,this.dontDuplicateAtoms=!0,this.defaultColor=a.elementColors.defaultColor,this.defaultStickRadius=.25,this.options=e||{},this.ElementColors=this.options.defaultcolors?this.options.defaultcolors:a.elementColors.defaultColors,this.defaultSphereRadius=this.options.defaultSphereRadius?this.options.defaultSphereRadius:1.5,this.defaultCartoonQuality=this.options.cartoonQuality?this.options.cartoonQuality:10,this.id=t}getRadiusFromStyle(t,e){var r=this.defaultSphereRadius;if(void 0!==e.radius)r=e.radius;else if(g.vdwRadii[t.elem])r=g.vdwRadii[t.elem];else if(t.elem.length>1){let e=t.elem;e=e[0].toUpperCase()+e[1].toLowerCase(),g.vdwRadii[e]&&(r=g.vdwRadii[e])}return void 0!==e.scale&&(r*=e.scale),r}drawAtomCross(t,e){if(t.style.cross){var r=t.style.cross;if(!r.hidden){var i=r.linewidth||g.defaultlineWidth;e[i]||(e[i]=new n.Geometry);var a=e[i].updateGeoGroup(6),s=this.getRadiusFromStyle(t,r),l=[[s,0,0],[-s,0,0],[0,s,0],[0,-s,0],[0,0,s],[0,0,-s]],d=t.clickable||t.hoverable;d&&void 0===t.intersectionShape&&(t.intersectionShape={sphere:[],cylinder:[],line:[]});for(var u=(0,c.getColorFromStyle)(t,r),h=a.vertexArray,f=a.colorArray,p=0;p<6;p++){var m=3*a.vertices;if(a.vertices++,h[m]=t.x+l[p][0],h[m+1]=t.y+l[p][1],h[m+2]=t.z+l[p][2],f[m]=u.r,f[m+1]=u.g,f[m+2]=u.b,d){var v=new o.Vector3(l[p][0],l[p][1],l[p][2]);v.multiplyScalar(.1),v.set(v.x+t.x,v.y+t.y,v.z+t.z),t.intersectionShape.line.push(v)}}}}}getGoodCross(t,e,r,n){for(var i=null,a=-1,s=0,l=t.bonds.length;sa&&(i=u,(a=c)>.1))return i}return i}getSideBondV(t,e,r){var n,i,a,s,l=new o.Vector3(t.x,t.y,t.z),c=new o.Vector3(e.x,e.y,e.z).clone(),d=null;if(c.sub(l),1===t.bonds.length)1===e.bonds.length?(d=c.clone(),Math.abs(d.x)>1e-4?d.y+=1:d.x+=1):(n=(r+1)%e.bonds.length,i=e.bonds[n],(a=this.atoms[i]).index==t.index&&(n=(n+1)%e.bonds.length,i=e.bonds[n],a=this.atoms[i]),(s=new o.Vector3(a.x,a.y,a.z).clone()).sub(l),(d=s.clone()).cross(c));else if((d=this.getGoodCross(t,e,l,c)).lengthSq()<.01){var u=this.getGoodCross(e,t,l,c);null!=u&&(d=u)}return d.lengthSq()<.01&&(d=c.clone(),Math.abs(d.x)>1e-4?d.y+=1:d.x+=1),d.cross(c),d.normalize(),d}addLine(t,e,r,n,i,o){t[r]=n.x,t[r+1]=n.y,t[r+2]=n.z,e[r]=o.r,e[r+1]=o.g,e[r+2]=o.b,t[r+3]=i.x,t[r+4]=i.y,t[r+5]=i.z,e[r+3]=o.r,e[r+4]=o.g,e[r+5]=o.b}drawBondLines(t,e,r){if(t.style.line){var i=t.style.line;if(!i.hidden){var s,l,d,u,h=i.linewidth||g.defaultlineWidth;r[h]||(r[h]=new n.Geometry);for(var f=r[h].updateGeoGroup(6*t.bonds.length),p=f.vertexArray,m=f.colorArray,v=0;v=b.index)){var y=new o.Vector3(t.x,t.y,t.z),x=new o.Vector3(b.x,b.y,b.z),w=y.clone().add(x).multiplyScalar(.5),_=!1,k=t.clickable||t.hoverable,A=b.clickable||b.hoverable;(k||A)&&(k&&(void 0===t.intersectionShape&&(t.intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]}),t.intersectionShape.line.push(y),t.intersectionShape.line.push(w)),A&&(void 0===b.intersectionShape&&(b.intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]}),b.intersectionShape.line.push(w),b.intersectionShape.line.push(x)));var T=(0,c.getColorFromStyle)(t,t.style.line),M=(0,c.getColorFromStyle)(b,b.style.line);if(t.bondStyles&&t.bondStyles[v]){var S=t.bondStyles[v];if(!S.iswire)continue;S.singleBond&&(_=!0),void 0!==S.color1&&(T=a.CC.color(S.color1)),void 0!==S.color2&&(M=a.CC.color(S.color2))}var C,E,L=3*f.vertices;if(t.bondOrder[v]>1&&t.bondOrder[v]<4&&!_){var z=this.getSideBondV(t,b,v),O=x.clone();O.sub(y),2==t.bondOrder[v]?(z.multiplyScalar(.1),(s=y.clone()).add(z),(l=y.clone()).sub(z),(d=s.clone()).add(O),(u=l.clone()).add(O),T==M?(f.vertices+=4,this.addLine(p,m,L,s,d,T),this.addLine(p,m,L+6,l,u,T)):(f.vertices+=8,O.multiplyScalar(.5),(C=s.clone()).add(O),(E=l.clone()).add(O),this.addLine(p,m,L,s,C,T),this.addLine(p,m,L+6,C,d,M),this.addLine(p,m,L+12,l,E,T),this.addLine(p,m,L+18,E,u,M))):3==t.bondOrder[v]&&(z.multiplyScalar(.1),(s=y.clone()).add(z),(l=y.clone()).sub(z),(d=s.clone()).add(O),(u=l.clone()).add(O),T==M?(f.vertices+=6,this.addLine(p,m,L,y,x,T),this.addLine(p,m,L+6,s,d,T),this.addLine(p,m,L+12,l,u,T)):(f.vertices+=12,O.multiplyScalar(.5),(C=s.clone()).add(O),(E=l.clone()).add(O),this.addLine(p,m,L,y,w,T),this.addLine(p,m,L+6,w,x,M),this.addLine(p,m,L+12,s,C,T),this.addLine(p,m,L+18,C,d,M),this.addLine(p,m,L+24,l,E,T),this.addLine(p,m,L+30,E,u,M)))}else T==M?(f.vertices+=2,this.addLine(p,m,L,y,x,T)):(f.vertices+=4,this.addLine(p,m,L,y,w,T),this.addLine(p,m,L+6,w,x,M))}}}}}drawAtomSphere(t,e){if(t.style.sphere){var r=t.style.sphere;if(!r.hidden){var n=(0,c.getColorFromStyle)(t,r),a=this.getRadiusFromStyle(t,r);if((!0===t.clickable||t.hoverable)&&void 0!==t.intersectionShape){var l=new o.Vector3(t.x,t.y,t.z);t.intersectionShape.sphere.push(new i.Sphere(l,a))}s.GLDraw.drawSphere(e,t,a,n)}}}drawAtomClickSphere(t){if(t.style.clicksphere){var e=t.style.clicksphere;if(!e.hidden){var r=this.getRadiusFromStyle(t,e);if((!0===t.clickable||t.hoverable)&&void 0!==t.intersectionShape){var n=new o.Vector3(t.x,t.y,t.z);t.intersectionShape.sphere.push(new i.Sphere(n,r))}}}}drawAtomInstanced(t,e){if(t.style.sphere){var r=t.style.sphere;if(!r.hidden){var n=this.getRadiusFromStyle(t,r),a=(0,c.getColorFromStyle)(t,r),s=e.updateGeoGroup(1),l=s.vertices,d=3*l,u=s.vertexArray,h=s.colorArray,f=s.radiusArray;if(u[d]=t.x,u[d+1]=t.y,u[d+2]=t.z,h[d]=a.r,h[d+1]=a.g,h[d+2]=a.b,f[l]=n,(!0===t.clickable||t.hoverable)&&void 0!==t.intersectionShape){var p=new o.Vector3(t.x,t.y,t.z);t.intersectionShape.sphere.push(new i.Sphere(p,n))}s.vertices+=1}}}drawSphereImposter(t,e,r,n){var i,o=t.updateGeoGroup(4),a=o.vertices,s=3*a,l=o.vertexArray,c=o.colorArray;for(i=0;i<4;i++)l[s+3*i]=e.x,l[s+3*i+1]=e.y,l[s+3*i+2]=e.z;var d=o.normalArray;for(i=0;i<4;i++)c[s+3*i]=n.r,c[s+3*i+1]=n.g,c[s+3*i+2]=n.b;d[s+0]=-r,d[s+1]=r,d[s+2]=0,d[s+3]=-r,d[s+4]=-r,d[s+5]=0,d[s+6]=r,d[s+7]=-r,d[s+8]=0,d[s+9]=r,d[s+10]=r,d[s+11]=0,o.vertices+=4;var u=o.faceArray,h=o.faceidx;u[h+0]=a,u[h+1]=a+1,u[h+2]=a+2,u[h+3]=a+2,u[h+4]=a+3,u[h+5]=a,o.faceidx+=6}drawAtomImposter(t,e){if(t.style.sphere){var r=t.style.sphere;if(!r.hidden){var n=this.getRadiusFromStyle(t,r),a=(0,c.getColorFromStyle)(t,r);if((!0===t.clickable||t.hoverable)&&void 0!==t.intersectionShape){var s=new o.Vector3(t.x,t.y,t.z);t.intersectionShape.sphere.push(new i.Sphere(s,n))}this.drawSphereImposter(e,t,n,a)}}}calculateDashes(t,e,r,n,i){var a=Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)+Math.pow(t.z-e.z,2));r=Math.max(r,0),i=Math.max(i,0)+2*r,(n=Math.max(n,.001))+i>a&&(n=a,i=0);var s,l=Math.floor((a-n)/(n+i))+1;i=(a-l*n)/l;for(var c=new o.Vector3(t.x,t.y,t.z),d=new o.Vector3((e.x-t.x)/(a/i),(e.y-t.y)/(a/i),(e.z-t.z)/(a/i)),u=new o.Vector3((e.x-t.x)/(a/n),(e.y-t.y)/(a/n),(e.z-t.z)/(a/n)),h=[],f=0;f{var e=r.imposter?g.drawStickImposter:s.GLDraw.drawCylinder;return!D&&t>=1?e:(t,r,n,i,o,a=0,s=0,l=.1,c=.25)=>{this.calculateDashes(r,n,i,l,c).forEach((r=>{e(t,r.from,r.to,i,o,a,s)}))}};for(f=0;f3){if(t.bondOrder[f]<1&&(z*=t.bondOrder[f]),!N.capDrawn&&N.bonds.length<4&&(R=2),F!=U?(k=(new o.Vector3).addVectors(G,V).multiplyScalar(.5),j(r,G,k,z,F,I,0,E,L),j(r,k,V,z,U,0,R,E,L)):j(r,G,V,z,F,I,R,E,L),u=t.clickable||t.hoverable,h=N.clickable||N.hoverable,u||h){if(k||(k=(new o.Vector3).addVectors(G,V).multiplyScalar(.5)),u){var H=new i.Cylinder(G,k,z),W=new i.Sphere(G,z);t.intersectionShape.cylinder.push(H),t.intersectionShape.sphere.push(W)}if(h){var q=new i.Cylinder(V,k,z),Y=new i.Sphere(V,z);N.intersectionShape.cylinder.push(q),N.intersectionShape.sphere.push(Y)}}}else if(t.bondOrder[f]>1){var Z=0,X=0;z!=M&&(Z=2,X=2);var $,J,K,Q,tt,et=V.clone(),rt=null;et.sub(G),rt=this.getSideBondV(t,N,f),2==t.bondOrder[f]?($=z*S,rt.multiplyScalar(1.5*$),(J=G.clone()).add(rt),(K=G.clone()).sub(rt),(Q=J.clone()).add(et),(tt=K.clone()).add(et),F!=U?(k=(new o.Vector3).addVectors(J,Q).multiplyScalar(.5),A=(new o.Vector3).addVectors(K,tt).multiplyScalar(.5),j(r,J,k,$,F,Z,0),j(r,k,Q,$,U,0,X),j(r,K,A,$,F,Z,0),j(r,A,tt,$,U,0,X)):(j(r,J,Q,$,F,Z,X),j(r,K,tt,$,F,Z,X)),u=t.clickable||t.hoverable,h=N.clickable||N.hoverable,(u||h)&&(k||(k=(new o.Vector3).addVectors(J,Q).multiplyScalar(.5)),A||(A=(new o.Vector3).addVectors(K,tt).multiplyScalar(.5)),u&&(v=new i.Cylinder(J,k,$),b=new i.Cylinder(K,A,$),t.intersectionShape.cylinder.push(v),t.intersectionShape.cylinder.push(b)),h&&(x=new i.Cylinder(Q,k,$),w=new i.Cylinder(tt,A,$),N.intersectionShape.cylinder.push(x),N.intersectionShape.cylinder.push(w)))):3==t.bondOrder[f]&&($=z*C,rt.cross(et),rt.normalize(),rt.multiplyScalar(3*$),(J=G.clone()).add(rt),(K=G.clone()).sub(rt),(Q=J.clone()).add(et),(tt=K.clone()).add(et),F!=U?(k=(new o.Vector3).addVectors(J,Q).multiplyScalar(.5),A=(new o.Vector3).addVectors(K,tt).multiplyScalar(.5),T=(new o.Vector3).addVectors(G,V).multiplyScalar(.5),j(r,J,k,$,F,Z,0),j(r,k,Q,$,U,0,X),j(r,G,T,$,F,I,0),j(r,T,V,$,U,0,R),j(r,K,A,$,F,Z,0),j(r,A,tt,$,U,0,X)):(j(r,J,Q,$,F,Z,X),j(r,G,V,$,F,I,R),j(r,K,tt,$,F,Z,X)),u=t.clickable||t.hoverable,h=N.clickable||N.hoverable,(u||h)&&(k||(k=(new o.Vector3).addVectors(J,Q).multiplyScalar(.5)),A||(A=(new o.Vector3).addVectors(K,tt).multiplyScalar(.5)),T||(T=(new o.Vector3).addVectors(G,V).multiplyScalar(.5)),u&&(v=new i.Cylinder(J.clone(),k.clone(),$),b=new i.Cylinder(K.clone(),A.clone(),$),y=new i.Cylinder(G.clone(),T.clone(),$),t.intersectionShape.cylinder.push(v),t.intersectionShape.cylinder.push(b),t.intersectionShape.cylinder.push(y)),h&&(x=new i.Cylinder(Q.clone(),k.clone(),$),w=new i.Cylinder(tt.clone(),A.clone(),$),_=new i.Cylinder(V.clone(),T.clone(),$),N.intersectionShape.cylinder.push(x),N.intersectionShape.cylinder.push(w),N.intersectionShape.cylinder.push(_))))}}}var nt=!1,it=0,ot=!1;for(f=0;f0&&(nt=!0):0==it&&(t.bonds.length>0||d.showNonBonded)&&(nt=!0),nt&&(z=M,r.imposter?this.drawSphereImposter(r.sphereGeometry,t,z,F):s.GLDraw.drawSphere(r,t,z,F))}}}createMolObj(t,e){e=e||{};var r,i,o,c,d=new n.Object3D,u=[],h={},f={},p=this.drawAtomSphere,m=null,g=null;e.supportsImposters?(p=this.drawAtomImposter,(m=new n.Geometry(!0)).imposter=!0,(g=new n.Geometry(!0,!0)).imposter=!0,g.sphereGeometry=new n.Geometry(!0),g.sphereGeometry.imposter=!0,g.drawnCaps={}):e.supportsAIA?(p=this.drawAtomInstanced,(m=new n.Geometry(!1,!0,!0)).instanced=!0,g=new n.Geometry(!0)):(m=new n.Geometry(!0),g=new n.Geometry(!0));var v,b={},y=[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(r=0,o=t.length;ry[1]&&(y[1]=x.resi)),u.push(x))}}if(u.length>0&&(0,l.drawCartoon)(d,u,y,this.defaultCartoonQuality),m&&m.vertices>0){m.initTypedArrays();var w=null,_=null;m.imposter?w=new n.SphereImposterMaterial({ambient:0,vertexColors:!0,reflectivity:0}):m.instanced?(_=new n.Geometry(!0),s.GLDraw.drawSphere(_,{x:0,y:0,z:0},1,new a.Color(.5,.5,.5)),_.initTypedArrays(),w=new n.InstancedMaterial({sphereMaterial:new n.MeshLambertMaterial({ambient:0,vertexColors:!0,reflectivity:0}),sphere:_})):w=new n.MeshLambertMaterial({ambient:0,vertexColors:!0,reflectivity:0}),b.sphere<1&&b.sphere>=0&&(w.transparent=!0,w.opacity=b.sphere),_=new n.Mesh(m,w),d.add(_)}if(g.vertices>0){var k=null,A=null,T=g.sphereGeometry;T&&void 0!==T.vertices&&0!=T.vertices||(T=null),g.initTypedArrays(),T&&T.initTypedArrays();var M={ambient:0,vertexColors:!0,reflectivity:0};g.imposter?(k=new n.StickImposterMaterial(M),A=new n.SphereImposterMaterial(M)):(k=new n.MeshLambertMaterial(M),A=new n.MeshLambertMaterial(M),k.wireframe&&(g.setUpWireframe(),T&&T.setUpWireframe())),b.stick<1&&b.stick>=0&&(k.transparent=!0,k.opacity=b.stick,A.transparent=!0,A.opacity=b.stick);var S=new n.Mesh(g,k);if(d.add(S),T){var C=new n.Mesh(T,A);d.add(C)}}for(r in h)if(h.hasOwnProperty(r)){v=r;var E=new n.LineBasicMaterial({linewidth:v,vertexColors:!0});b.line<1&&b.line>=0&&(E.transparent=!0,E.opacity=b.line),h[r].initTypedArrays();var L=new n.Line(h[r],E,n.LineStyle.LinePieces);d.add(L)}for(r in f)if(f.hasOwnProperty(r)){v=r;var z=new n.LineBasicMaterial({linewidth:v,vertexColors:!0});b.cross<1&&b.cross>=0&&(z.transparent=!0,z.opacity=b.cross),f[r].initTypedArrays();var O=new n.Line(f[r],z,n.LineStyle.LinePieces);d.add(O)}if(this.dontDuplicateAtoms&&this.modelData.symmetries&&this.modelData.symmetries.length>0){var D,I=new n.Object3D;for(D=0;Dr?e-n:e}adjustCoordinatesToBox(){if(this.box&&this.atomdfs)for(var t=this.box[0],e=this.box[1],r=this.box[2],n=.9*t,i=.9*e,o=.9*r,a=0;a=r)&&(t=r-1),null!=n.frames.url){var a=n.frames.url;(0,c.getbin)(a+"/traj/frame/"+t+"/"+n.frames.path,void 0,"POST",void 0).then((function(t){for(var e=new Float32Array(t,44),r=0,o=0;o=n&&t<=i)return!0}}return!1}static deepCopyAndCache(t,e){if("object"!=typeof t||null==t)return t;if(t.__cache_created)return t;const r={};for(const n in t){const i=t[n];if(Array.isArray(i)){r[n]=[];for(let t=0;t=n[0][0]&&a<=n[1][0]&&s>=n[0][1]&&s<=n[1][1]&&l>=n[0][2]&&l<=n[1][2]&&(a>=r[0][0]&&a<=r[1][0]&&s>=r[0][1]&&s<=r[1][1]&&l>=r[0][2]&&l<=r[1][2]||o.push(this.atoms[t]))}return o}static getFloat(t){return"number"==typeof t?t:parseFloat(t)}selectedAtoms(t,e){var r=[];t=g.deepCopyAndCache(t||{},this),e||(e=this.atoms);for(var n=e.length,i=0;i0&&r.push(n[t])}}if(t.hasOwnProperty("within")&&t.within.hasOwnProperty("sel")&&t.within.hasOwnProperty("distance")){var s=this.selectedAtoms(t.within.sel,this.atoms),l={};const e=g.getFloat(t.within.distance),n=e*e;for(let t=0;t0&&(l[e]=1)}var c=[];if(t.within.invert)for(let t=0;t0;)if(e=h.pop(),f=e.chain,p=e.resi,void 0===u[e.index]){u[e.index]=!0;for(var m=0;m0&&(this.molObj=null)}else console.log("Callback is not a function")}setHoverable(t,e,r,n){if(e=!!e,r=(0,c.makeFunction)(r),n=(0,c.makeFunction)(n),null!==r)if(null!==n){var i=this.selectedAtoms(t,this.atoms),o=i.length;for(let t=0;t0&&(this.molObj=null)}else console.log("Unhover_callback is not a function");else console.log("Hover_callback is not a function")}enableContextMenu(t,e){var r;e=!!e;var n=this.selectedAtoms(t,this.atoms),i=n.length;for(r=0;r0&&(this.molObj=null)}setColorByElement(t,e){if(null===this.molObj||!g.sameObj(e,this.lastColors)){this.lastColors=e;var r=this.selectedAtoms(t,r);r.length>0&&(this.molObj=null);for(var n=0;n0&&(this.molObj=null),"string"==typeof r&&void 0!==d.Gradient.builtinGradients[r]&&(r=new d.Gradient.builtinGradients[r]),n||(n=r.range()),n||(n=(0,c.getPropertyRange)(a,e)),i=0;i0&&(this.molObj=null);for(let t=0;t=i)continue;let a={b:r,e:i},s=o.bondOrder[t];1!=s&&(a.o=s),e.b.push(a)}}return e}globj(t,e){(null===this.molObj||e.regen)&&(this.molObj=this.createMolObj(this.atoms,e),this.renderedMolObj&&(t.remove(this.renderedMolObj),this.renderedMolObj=null),this.renderedMolObj=this.molObj.clone(),this.hidden&&(this.renderedMolObj.setVisible(!1),this.molObj.setVisible(!1)),t.add(this.renderedMolObj))}exportVRML(){return this.createMolObj(this.atoms,{supportsImposters:!1,supportsAIA:!1}).vrml()}removegl(t){this.renderedMolObj&&(void 0!==this.renderedMolObj.geometry&&this.renderedMolObj.geometry.dispose(),void 0!==this.renderedMolObj.material&&this.renderedMolObj.material.dispose(),t.remove(this.renderedMolObj),this.renderedMolObj=null),this.molObj=null}hide(){this.hidden=!0,this.renderedMolObj&&this.renderedMolObj.setVisible(!1),this.molObj&&this.molObj.setVisible(!1)}show(){this.hidden=!1,this.renderedMolObj&&this.renderedMolObj.setVisible(!0),this.molObj&&this.molObj.setVisible(!0)}addPropertyLabels(t,e,r,n){for(var i=this.selectedAtoms(e,i),o=(0,c.deepCopy)(n),a=0;aMOLECULE/gm)?"mol2":t.match(/^data_/gm)&&t.match(/^loop_/gm)?"cif":t.match(/^HETATM/gm)||t.match(/^ATOM/gm)?"pdb":t.match(/ITEM: TIMESTEP/gm)?"lammpstrj":t.match(/^.*\n.*\n.\s*(\d+)\s+(\d+)/gm)?"sdf":t.match(/^%VERSION\s+VERSION_STAMP/gm)?"prmtop":"xyz",console.log("Best guess: "+e))),(0,u.Parsers[e])(t,r)}}g.defaultAtomStyle={line:{}},g.defaultlineWidth=1,g.vdwRadii={H:1.2,He:1.4,Li:1.82,Be:1.53,B:1.92,C:1.7,N:1.55,O:1.52,F:1.47,Ne:1.54,Na:2.27,Mg:1.73,Al:1.84,Si:2.1,P:1.8,S:1.8,Cl:1.75,Ar:1.88,K:2.75,Ca:2.31,Ni:1.63,Cu:1.4,Zn:1.39,Ga:1.87,Ge:2.11,As:1.85,Se:1.9,Br:1.85,Kr:2.02,Rb:3.03,Sr:2.49,Pd:1.63,Ag:1.72,Cd:1.58,In:1.93,Sn:2.17,Sb:2.06,Te:2.06,I:1.98,Xe:2.16,Cs:3.43,Ba:2.68,Pt:1.75,Au:1.66,Hg:1.55,Tl:1.96,Pb:2.02,Bi:2.07,Po:1.97,At:2.02,Rn:2.2,Fr:3.48,Ra:2.83,U:1.86},g.ignoredKeys=new Set(["props","invert","model","frame","byres","expand","within","and","or","not"])},"./src/GLShape.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{GLShape:()=>h,splitMesh:()=>f});var n=r("./src/WebGL/index.ts"),i=r("./src/WebGL/shapes/index.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/colors.ts"),s=r("./src/ProteinSurface4.ts"),l=r("./src/VolumeData.ts"),c=r("./src/GLDraw.ts"),d=r("./src/glcartoon.ts"),u=r("./src/utilities.ts");class h{static finalizeGeo(t){var e=t.updateGeoGroup(0);e.vertices>0&&e.truncateArrayBuffers(!0,!0)}static updateColor(t,e){var r,n,i;e=e||a.CC.color(e),t.colorsNeedUpdate=!0,e.constructor!==Array&&(r=e.r,n=e.g,i=e.b);for(let o in t.geometryGroups){let a=t.geometryGroups[o],s=a.colorArray;for(let t=0,o=a.vertices;t0?d/t:(t+d)/t}h.multiplyScalar(c);var f=new o.Vector3(n.x,n.y,n.z).add(h),p=h.clone().negate();let m=new o.Vector3(n.x,n.y,n.z);t.intersectionShape.cylinder.push(new i.Cylinder(m,f.clone(),s)),t.intersectionShape.sphere.push(new i.Sphere(m,s));var g=[];g[0]=h.clone(),Math.abs(g[0].x)>1e-4?g[0].y+=1:g[0].x+=1,g[0].cross(h),g[0].normalize(),g[4]=g[0].clone(),g[4].crossVectors(g[0],h),g[4].normalize(),g[8]=g[0].clone().negate(),g[12]=g[4].clone().negate(),g[2]=g[0].clone().add(g[4]).normalize(),g[6]=g[4].clone().add(g[8]).normalize(),g[10]=g[8].clone().add(g[12]).normalize(),g[14]=g[12].clone().add(g[0]).normalize(),g[1]=g[0].clone().add(g[2]).normalize(),g[3]=g[2].clone().add(g[4]).normalize(),g[5]=g[4].clone().add(g[6]).normalize(),g[7]=g[6].clone().add(g[8]).normalize(),g[9]=g[8].clone().add(g[10]).normalize(),g[11]=g[10].clone().add(g[12]).normalize(),g[13]=g[12].clone().add(g[14]).normalize(),g[15]=g[14].clone().add(g[0]).normalize();var v,b,y,x,w,_,k,A,T,M,S,C,E,L,z,O,D,I,R,F,P,j,N=u.vertices,B=u.vertexArray,U=u.faceArray,G=u.normalArray,V=u.lineArray;for(b=0,y=g.length;b0){var Y=B[v-3],Z=B[v-2],X=B[v-1],$=new o.Vector3(Y,Z,X),J=new o.Vector3(a.x,a.y,a.z),K=f.clone(),Q=new o.Vector3(q.x,q.y,q.z);t.intersectionShape.triangle.push(new i.Triangle(Q,J,$)),t.intersectionShape.triangle.push(new i.Triangle($.clone(),K,Q.clone()))}}u.vertices+=48,B[v=3*u.vertices]=n.x,B[v+1]=n.y,B[v+2]=n.z,B[v+3]=f.x,B[v+4]=f.y,B[v+5]=f.z,B[v+6]=a.x,B[v+7]=a.y,B[v+8]=a.z,u.vertices+=3;var tt=u.vertices-3,et=u.vertices-2,rt=u.vertices-1,nt=3*tt,it=3*et,ot=3*rt;for(b=0,y=g.length-1;bs&&(s=d),u>l&&(l=u),h>c&&(c=h)}t.center.set((s+i)/2,(l+o)/2,(c+a)/2),t.radius=t.center.distanceTo({x:s,y:l,z:c}),t.box={min:{x:i,y:o,z:a},max:{x:s,y:l,z:c}}}static addCustomGeo(t,e,r,n,a){var s,l,c,d,u,f,p,m,g,v=e.addGeoGroup(),b=r.vertexArr,y=r.normalArr,x=r.faceArr;v.vertices=b.length,v.faceidx=x.length;var w=v.vertexArray,_=v.colorArray;for(n.constructor!==Array&&(m=n.r,g=n.g,d=n.b),f=0,p=v.vertices;fc?(u.fromCap=0,u.toCap=2):(u.fromCap=2,u.toCap=2),this.addCylinder(u)}}addLine(t){var e,r;e=t.start?new o.Vector3(t.start.x||0,t.start.y||0,t.start.z||0):new o.Vector3(0,0,0),t.end?void 0===(r=new o.Vector3(t.end.x,t.end.y||0,t.end.z||0)).x&&(r.x=3):r=new o.Vector3(3,0,0);var n=this.geo.updateGeoGroup(2),i=n.vertices,a=3*i,s=n.vertexArray;s[a]=e.x,s[a+1]=e.y,s[a+2]=e.z,s[a+3]=r.x,s[a+4]=r.y,s[a+5]=r.z,n.vertices+=2;var l=n.lineArray,c=n.lineidx;l[c]=i,l[c+1]=i+1,n.lineidx+=2;var d=new o.Vector3;this.components.push({centroid:d.addVectors(e,r).multiplyScalar(.5)}),n=this.geo.updateGeoGroup(0),h.updateBoundingFromPoints(this.boundingSphere,this.components,n.vertexArray,n.vertices)}addArrow(t){if(t.start?t.start=new o.Vector3(t.start.x||0,t.start.y||0,t.start.z||0):t.start=new o.Vector3(0,0,0),t.dir instanceof o.Vector3&&"number"==typeof t.length){var e=t.dir.clone().multiplyScalar(t.length).add(t.start);t.end=e}else t.end?(t.end=new o.Vector3(t.end.x,t.end.y||0,t.end.z||0),void 0===t.end.x&&(t.end.x=3)):t.end=new o.Vector3(3,0,0);t.radius=t.radius||.1,t.radiusRatio=t.radiusRatio||1.618034,t.mid=0=0?m[n]-a:a-m[n])>0&&(g[n]|=h.ISDONE);var v=[],b=[];s.MarchingCube.march(g,v,b,{fulltable:!0,voxel:l,unitCube:t.unit,origin:t.origin,matrix:t.matrix,nX:d,nY:u,nZ:f}),!l&&c>0&&s.MarchingCube.laplacianSmooth(c,v,b);var y=[],x=[],w=[];if(e.selectedRegion&&void 0===e.coords&&(e.coords=e.selectedRegion),void 0!==e.coords){var _=e.coords[0].x,k=e.coords[0].y,A=e.coords[0].z,T=e.coords[0].x,M=e.coords[0].y,S=e.coords[0].z;for(let t=0;t_?_=e.coords[t].x:e.coords[t].xk?k=e.coords[t].y:e.coords[t].yA?A=e.coords[t].z:e.coords[t].zT&&v[t].x<_&&v[t].y>M&&v[t].yS&&v[t].z=64e3&&(e.push({vertexArr:[],normalArr:[],faceArr:[]}),t.colorArr&&(e.colorArr=[]),i++)}return e}h.ISDONE=2,h.drawCustom=function(t,e,r){var n=r,i=n.vertexArr,o=n.faceArr;0!==i.length&&0!==o.length||console.warn("Error adding custom shape component: No vertices and/or face indices supplied!");var s=r.color;void 0===s&&(s=t.color),s=a.CC.color(s);for(var l=f(n),c=0,d=l.length;c{"use strict";r.r(e),r.d(e,{GLViewer:()=>m,createStereoViewer:()=>b,createViewer:()=>g,createViewerGrid:()=>v});var n=r("./src/WebGL/index.ts"),i=r("./src/WebGL/math/index.ts"),o=r("./src/colors.ts"),a=r("./src/utilities.ts"),s=r("./src/Gradient.ts"),l=r("./src/GLModel.ts"),c=r("./src/Label.ts"),d=r("./src/GLShape.ts"),u=r("./src/VolumeData.ts"),h=r("./src/ProteinSurface4.ts"),f=r("./src/VolumetricRender.ts"),p=r("./node_modules/upng-js/UPNG.js");class m{getRect(){let t=this.container,e=t.getBoundingClientRect();if(0==e.width&&0==e.height&&"none"===t.style.display){let r=t.style.position,n=t.style.visibility;t.style.display="block",t.style.visibility="hidden",t.style.position="absolute",e=t.getBoundingClientRect(),t.style.display="none",t.style.visibility=n,t.style.position=r}return e}getWidth(){return this.getRect().width}getHeight(){return this.getRect().height}setupRenderer(){this.renderer=new n.Renderer({antialias:this.config.antialias,preserveDrawingBuffer:!0,premultipliedAlpha:!1,id:this.config.id,row:this.config.row,col:this.config.col,rows:this.config.rows,cols:this.config.cols,canvas:this.config.canvas,containerWidth:this.WIDTH||1,containerHeight:this.HEIGHT||1}),this.renderer.domElement.style.width="100%",this.renderer.domElement.style.height="100%",this.renderer.domElement.style.padding="0",this.renderer.domElement.style.position="absolute",this.renderer.domElement.style.top="0px",this.renderer.domElement.style.left="0px",this.renderer.domElement.style.zIndex="0"}initializeScene(){this.scene=new n.Scene,this.scene.fog=new n.Fog(this.bgColor,100,200),this.modelGroup=new n.Object3D,this.rotationGroup=new n.Object3D,this.rotationGroup.useQuaternion=!0,this.rotationGroup.quaternion=new i.Quaternion(0,0,0,1),this.rotationGroup.add(this.modelGroup),this.scene.add(this.rotationGroup);var t=new n.Light(16777215);t.position=new i.Vector3(.2,.2,1).normalize(),t.intensity=1,this.scene.add(t)}initContainer(t){this.container=t,this.WIDTH=this.getWidth(),this.HEIGHT=this.getHeight(),this.ASPECT=this.renderer.getAspect(this.WIDTH,this.HEIGHT),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.container.append(this.renderer.domElement),this.glDOM=this.renderer.domElement,this.nomouse||(this.glDOM.addEventListener("mousedown",this._handleMouseDown.bind(this),{passive:!1}),this.glDOM.addEventListener("touchstart",this._handleMouseDown.bind(this),{passive:!1}),this.glDOM.addEventListener("wheel",this._handleMouseScroll.bind(this),{passive:!1}),this.glDOM.addEventListener("mousemove",this._handleMouseMove.bind(this),{passive:!1}),this.glDOM.addEventListener("touchmove",this._handleMouseMove.bind(this),{passive:!1}),this.glDOM.addEventListener("contextmenu",this._handleContextMenu.bind(this),{passive:!1}))}decAnim(){this.animated--,this.animated<0&&(this.animated=0)}incAnim(){this.animated++}nextSurfID(){var t=0;for(let r in this.surfaces)if(this.surfaces.hasOwnProperty(r)){var e=parseInt(r);isNaN(e)||e>t&&(t=e)}return t+1}setSlabAndFog(){let t=this.camera.position.z-this.rotationGroup.position.z;t<1&&(t=1),this.camera.near=t+this.slabNear,this.camera.near<1&&(this.camera.near=1),this.camera.far=t+this.slabFar,this.camera.near+1>this.camera.far&&(this.camera.far=this.camera.near+1),this.camera.fov=this.fov,this.camera.right=t*Math.tan(Math.PI/180*this.fov),this.camera.left=-this.camera.right,this.camera.top=this.camera.right/this.ASPECT,this.camera.bottom=-this.camera.top,this.camera.updateProjectionMatrix(),this.scene.fog.near=this.camera.near+this.fogStart*(this.camera.far-this.camera.near),this.scene.fog.far=this.camera.far,this.config.disableFog&&(this.scene.fog.near=this.scene.fog.far)}show(t){if(this.renderer.setViewport(),this.scene&&(this.setSlabAndFog(),this.renderer.render(this.scene,this.camera),this.viewChangeCallback&&this.viewChangeCallback(this._viewer.getView()),!t&&this.linkedViewers.length>0))for(var e=this._viewer.getView(),r=0;r0){let e=this.CAMERA_Z-this.config.lowerZoomLimit;t>e&&(t=e)}if(this.config.upperZoomLimit&&this.config.upperZoomLimit>0){let e=this.CAMERA_Z-this.config.upperZoomLimit;tthis.CAMERA_Z-1&&(t=this.CAMERA_Z-1),t}static slerp(t,e,r){if(1==r)return e.clone();if(0==r)return t.clone();let n=t.x*e.x+t.y*e.y+t.z*e.z+t.w*e.w;if(n>.9995){let n=new i.Quaternion(t.x+r*(e.x-t.x),t.y+r*(e.y-t.y),t.z+r*(e.z-t.z),t.w+r*(e.w-t.w));return n.normalize(),n}n<0&&(e=e.clone().multiplyScalar(-1),n=-n),n>1?n=1:n<-1&&(n=-1);var o=Math.acos(n)*r,a=e.clone();a.sub(t.clone().multiplyScalar(n)),a.normalize();var s=Math.cos(o),l=Math.sin(o),c=new i.Quaternion(t.x*s+a.x*l,t.y*s+a.y*l,t.z*s+a.z*l,t.w*s+a.w*l);return c.normalize(),c}constructor(t,e={}){this.nomouse=!1,this.glDOM=null,this.models=[],this.surfaces={},this.shapes=[],this.labels=[],this.clickables=[],this.hoverables=[],this.contextMenuEnabledAtoms=[],this.current_hover=null,this.hoverDuration=500,this.viewer_frame=0,this.viewChangeCallback=null,this.stateChangeCallback=null,this.NEAR=1,this.FAR=800,this.CAMERA_Z=150,this.fov=20,this.linkedViewers=[],this.renderer=null,this.control_all=!1,this.scene=null,this.rotationGroup=null,this.modelGroup=null,this.fogStart=.4,this.slabNear=-50,this.slabFar=50,this.cq=new i.Quaternion(0,0,0,1),this.dq=new i.Quaternion(0,0,0,1),this.animated=0,this.animationTimers=new Set,this.isDragging=!1,this.mouseStartX=0,this.mouseStartY=0,this.touchDistanceStart=0,this.touchHold=!1,this.currentModelPos=0,this.cz=0,this.cslabNear=0,this.cslabFar=0,this.userContextMenuHandler=null,this.config=e,this.callback=this.config.callback,this.defaultcolors=this.config.defaultcolors,this.defaultcolors||(this.defaultcolors=o.elementColors.defaultColors),this.nomouse=this.config.nomouse,this.bgColor=0,this.config.backgroundColor=this.config.backgroundColor||"#ffffff",void 0!==this.config.backgroundColor&&(this.bgColor=o.CC.color(this.config.backgroundColor).getHex()),this.config.backgroundAlpha=null==this.config.backgroundAlpha?1:this.config.backgroundAlpha,this.camerax=0,void 0!==this.config.camerax&&(this.camerax=parseFloat(this.config.camerax)),this._viewer=this,this.container=t,null!=this.config.hoverDuration&&(this.hoverDuration=this.config.hoverDuration),void 0===this.config.antialias&&(this.config.antialias=!0),void 0===this.config.cartoonQuality&&(this.config.cartoonQuality=10),this.WIDTH=this.getWidth(),this.HEIGHT=this.getHeight(),this.setupRenderer(),this.row=null==this.config.row?0:this.config.row,this.col=null==this.config.col?0:this.config.col,this.cols=this.config.cols,this.rows=this.config.rows,this.viewers=this.config.viewers,this.control_all=this.config.control_all,this.ASPECT=this.renderer.getAspect(this.WIDTH,this.HEIGHT),this.camera=new n.Camera(this.fov,this.ASPECT,this.NEAR,this.FAR,this.config.orthographic),this.camera.position=new i.Vector3(this.camerax,0,this.CAMERA_Z),this.lookingAt=new i.Vector3,this.camera.lookAt(this.lookingAt),this.raycaster=new n.Raycaster(new i.Vector3(0,0,0),new i.Vector3(0,0,0)),this.projector=new n.Projector,this.initializeScene(),this.renderer.setClearColorHex(this.bgColor,this.config.backgroundAlpha),this.scene.fog.color=o.CC.color(this.bgColor),document.body.addEventListener("mouseup",this._handleMouseUp.bind(this)),document.body.addEventListener("touchend",this._handleMouseUp.bind(this)),this.initContainer(this.container),this.config.style&&this.setViewStyle(this.config),window.addEventListener("resize",this.resize.bind(this)),void 0!==window.ResizeObserver&&(this.divwatcher=new window.ResizeObserver(this.resize.bind(this)),this.divwatcher.observe(this.container));try{"function"==typeof this.callback&&this.callback(this)}catch(t){console.log("error with glviewer callback: "+t)}}targetedObjects(t,e,r){var n={x:t,y:e,z:-1};return Array.isArray(r)||(r=this.selectedAtoms(r)),0==r.length?[]:(this.raycaster.setFromCamera(n,this.camera),this.raycaster.intersectObjects(this.modelGroup,r))}modelToScreen(t){let e=!1;Array.isArray(t)||(t=[t],e=!0);let r=this.renderer.getXRatio(),n=this.renderer.getYRatio(),o=this.col,a=this.row,s=o*(this.WIDTH/r),l=(n-a-1)*(this.HEIGHT/n),c=[],d=this.canvasOffset();return t.forEach((t=>{let e=new i.Vector3(t.x,t.y,t.z);e.applyMatrix4(this.modelGroup.matrixWorld),this.projector.projectVector(e,this.camera);let o=this.WIDTH/r*(e.x+1)/2+d.left+s,a=-this.HEIGHT/n*(e.y-1)/2+d.top+l;c.push({x:o,y:a})})),e&&(c=c[0]),c}screenOffsetToModel(t,e,r){var n=t/this.WIDTH,o=e/this.HEIGHT,a=void 0===r?this.rotationGroup.position.z:r,s=this.rotationGroup.quaternion,l=new i.Vector3(0,0,a);return this.projector.projectVector(l,this.camera),l.x+=2*n,l.y-=2*o,this.projector.unprojectVector(l,this.camera),l.z=0,l.applyQuaternion(s),l}screenToModelDistance(t,e){let r=this.canvasOffset(),n=new i.Vector3(e.x,e.y,e.z);n.applyMatrix4(this.modelGroup.matrixWorld);let o=n.clone();this.projector.projectVector(n,this.camera);let a=new i.Vector3(2*(t.x-r.left)/this.WIDTH-1,2*(t.y-r.top)/-this.HEIGHT+1,n.z);return this.projector.unprojectVector(a,this.camera),a.distanceTo(o)}setViewChangeCallback(t){"function"!=typeof t&&null!=t||(this.viewChangeCallback=t)}setStateChangeCallback(t){"function"!=typeof t&&null!=t||(this.stateChangeCallback=t)}getConfig(){return this.config}setConfig(t){this.config=t}getInternalState(){var t={models:[],surfaces:[],shapes:[],labels:[]};for(let e=0;e{e.getCanvas().toBlob((function(e){e.arrayBuffer().then(t)}),"image/png")}))),n+=1,n==t&&(e.viewChangeCallback=i,Promise.all(o).then((t=>{let n=[];for(let e=0;e0&&(this.hoverTimeout=setTimeout((function(){a.handleHoverSelection(o.x,o.y,t)}),this.hoverDuration)),this.isDragging)){var l=(e-this.mouseStartX)/this.WIDTH,c=(r-this.mouseStartY)/this.HEIGHT;0!=this.touchDistanceStart&&t.targetTouches&&2==t.targetTouches.length?(s=2,c=2*(this.calcTouchDistance(t)-this.touchDistanceStart)/(this.WIDTH+this.HEIGHT)):t.targetTouches&&3==t.targetTouches.length&&(s=1),l*=n,c*=i;var d,u=Math.hypot(l,c);if(3==s||3==this.mouseButton&&t.ctrlKey)this.slabNear=this.cslabNear+100*l,this.slabFar=this.cslabFar-100*c;else if(2==s||3==this.mouseButton||t.shiftKey)(d=.85*(this.CAMERA_Z-this.rotationGroup.position.z))<80&&(d=80),this.rotationGroup.position.z=this.cz+c*d,this.rotationGroup.position.z=this.adjustZoomToLimits(this.rotationGroup.position.z);else if(1==s||2==this.mouseButton||t.ctrlKey){var h=this.screenOffsetToModel(n*(e-this.mouseStartX),i*(r-this.mouseStartY));this.modelGroup.position.addVectors(this.currentModelPos,h)}else if((0===s||1==this.mouseButton)&&0!==u){var f=Math.sin(u*Math.PI)/u;this.dq.x=Math.cos(u*Math.PI),this.dq.y=0,this.dq.z=f*l,this.dq.w=-f*c,this.rotationGroup.quaternion.set(1,0,0,0),this.rotationGroup.quaternion.multiply(this.dq),this.rotationGroup.quaternion.multiply(this.cq)}this.show()}}_handleContextMenu(t){t.preventDefault();var e=this.getX(t),r=this.getY(t);if(e==this.mouseStartX&&r==this.mouseStartY){var n=this.mouseStartX,i=this.mouseStartY,o=this.canvasOffset();let t=this.mouseXY(n,i),e=t.x,r=t.y,s=this.targetedObjects(e,r,this.contextMenuEnabledAtoms);var a=null;s.length&&(a=s[0].clickable),o=this.canvasOffset(),n=this.mouseStartX-o.left,i=this.mouseStartY-o.top,this.userContextMenuHandler&&this.userContextMenuHandler(a,n,i,s)}}setContainer(t){let e=(0,a.getElement)(t)||this.container;return this.initContainer(e),this}setBackgroundColor(t,e){(void 0===e||e<0||e>1)&&(e=1);var r=o.CC.color(t);return this.scene.fog.color=r,this.bgColor=r.getHex(),this.renderer.setClearColorHex(r.getHex(),e),this.show(),this}setProjection(t){this.camera.ortho="orthographic"===t,this.setSlabAndFog()}setViewStyle(t){if("outline"===t.style){var e={};t.color&&(e.color=o.CC.color(t.color)),t.width&&(e.width=t.width),this.renderer.enableOutline(e)}else this.renderer.disableOutline();return this}updateSize(){this.renderer.setSize(this.WIDTH,this.HEIGHT),this.ASPECT=this.renderer.getAspect(this.WIDTH,this.HEIGHT),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.camera.aspect=this.ASPECT,this.camera.updateProjectionMatrix()}setWidth(t){return this.WIDTH=t||this.WIDTH,this.updateSize(),this}setHeight(t){return this.HEIGHT=t||this.HEIGHT,this.updateSize(),this}resize(){this.WIDTH=this.getWidth(),this.HEIGHT=this.getHeight();let t=!1;if(this.renderer.isLost()&&this.WIDTH>0&&this.HEIGHT>0){let e=!1,r=this.container.querySelector("canvas");r&&r!=this.renderer.getCanvas()?this.config.canvas=r:(r.remove(),this.config&&null!=this.config.canvas&&(delete this.config.canvas,e=!0)),this.setupRenderer(),this.initContainer(this.container),t=!0,e&&(this.config.canvas=this.renderer.getCanvas())}if(0==this.WIDTH||0==this.HEIGHT?this.animated&&this._viewer.pauseAnimate():this.animated&&this._viewer.resumeAnimate(),this.updateSize(),t){let t=this.renderer.supportedExtensions();if(t.regen=!0,this.viewers)for(let e=0,r=this.viewers.length;e=0&&(this.modelGroup.remove(this.labels[r].sprite),(this.viewer_frame<0||this.labels[r].frame==this.viewer_frame)&&this.modelGroup.add(this.labels[r].sprite));for(r in this.surfaces)if(this.surfaces.hasOwnProperty(r)){var a=this.surfaces[r];for(i=0;i1||1==a[i].symmetries.length&&!a[i].symmetries[i].isIdentity()){var c,d=new n.Object3D;for(c=0;c0?this.animateMotion(e,r,this.modelGroup.position,this.adjustZoomToLimits(i),this.rotationGroup.quaternion,this.lookingAt):(this.rotationGroup.position.z=this.adjustZoomToLimits(i),this.show()),this}translate(t,e,r=0,n=!1){var o=t/this.WIDTH,a=e/this.HEIGHT,s=new i.Vector3(0,0,-this.CAMERA_Z);this.projector.projectVector(s,this.camera),s.x-=o,s.y-=a,this.projector.unprojectVector(s,this.camera),s.z=0;var l=this.lookingAt.clone().add(s);return r>0?this.animateMotion(r,n,this.modelGroup.position,this.rotationGroup.position.z,this.rotationGroup.quaternion,l):(this.lookingAt=l,this.camera.lookAt(this.lookingAt),this.show()),this}translateScene(t,e,r=0,n=!1){var i=this.screenOffsetToModel(t,e),o=this.modelGroup.position.clone().add(i);return r>0?this.animateMotion(r,n,this.modelGroup.position,this.rotationGroup.position.z,this.rotationGroup.quaternion,this.lookingAt):(this.modelGroup.position=o,this.show()),this}fitSlab(t){t=t||{};var e=this.getAtomsFromSel(t),r=(0,a.getExtent)(e),n=r[1][0]-r[0][0],i=r[1][1]-r[0][1],o=r[1][2]-r[0][2],s=Math.hypot(n,i,o);return s<5&&(s=5),this.slabNear=-s/1.9,this.slabFar=s/2,this}center(t={},e=0,r=!1){var n,o,s=this.getAtomsFromSel(t),l=(0,a.getExtent)(s);(0,a.isEmptyObject)(t)?(this.shapes.forEach((t=>{if(t&&t.boundingSphere&&t.boundingSphere.center){var e=t.boundingSphere.center,r=t.boundingSphere.radius;r>0?(s.push(new i.Vector3(e.x+r,e.y,e.z)),s.push(new i.Vector3(e.x-r,e.y,e.z)),s.push(new i.Vector3(e.x,e.y+r,e.z)),s.push(new i.Vector3(e.x,e.y-r,e.z)),s.push(new i.Vector3(e.x,e.y,e.z+r)),s.push(new i.Vector3(e.x,e.y,e.z-r))):s.push(e)}})),l=(0,a.getExtent)(s),n=s,o=l):(n=this.getAtomsFromSel({}),o=(0,a.getExtent)(n));var c=new i.Vector3(l[2][0],l[2][1],l[2][2]),d=o[1][0]-o[0][0],u=o[1][1]-o[0][1],h=o[1][2]-o[0][2],f=Math.hypot(d,u,h);f<5&&(f=5),this.slabNear=-f/1.9,this.slabFar=f/2,d=l[1][0]-l[0][0],u=l[1][1]-l[0][1],h=l[1][2]-l[0][2],(f=Math.hypot(d,u,h))<5&&(f=5);for(var p=25,m=0;mp&&(p=g)}f=2*Math.sqrt(p);var v=c.clone().multiplyScalar(-1);return e>0?this.animateMotion(e,r,v,this.rotationGroup.position.z,this.rotationGroup.quaternion,this.lookingAt):(this.modelGroup.position=v,this.show()),this}zoomTo(t={},e=0,r=!1){let n=this.getAtomsFromSel(t),o=(0,a.getExtent)(n),s=o;if((0,a.isEmptyObject)(t)){let t=n&&n.length;if(this.shapes.forEach((t=>{if(t&&t.boundingSphere)if(t.boundingSphere.box){let e=t.boundingSphere.box;n.push(new i.Vector3(e.min.x,e.min.y,e.min.z)),n.push(new i.Vector3(e.max.x,e.max.y,e.max.z))}else if(t.boundingSphere.center){var e=t.boundingSphere.center,r=t.boundingSphere.radius;r>0?(n.push(new i.Vector3(e.x+r,e.y,e.z)),n.push(new i.Vector3(e.x-r,e.y,e.z)),n.push(new i.Vector3(e.x,e.y+r,e.z)),n.push(new i.Vector3(e.x,e.y-r,e.z)),n.push(new i.Vector3(e.x,e.y,e.z+r)),n.push(new i.Vector3(e.x,e.y,e.z-r))):n.push(e)}})),s=(0,a.getExtent)(n),!t)for(let t=0;t<3;t++)o[2][t]=(s[0][t]+s[1][t])/2}else{let t=this.getAtomsFromSel({});s=(0,a.getExtent)(t)}var l=new i.Vector3(o[2][0],o[2][1],o[2][2]),c=s[1][0]-s[0][0],d=s[1][1]-s[0][1],u=s[1][2]-s[0][2],h=Math.hypot(c,d,u);h<5&&(h=5),this.slabNear=-h/1.9,this.slabFar=h/2,0===Object.keys(t).length&&(this.slabNear=Math.min(2*-h,-50),this.slabFar=Math.max(2*h,50));var f=this.config.minimumZoomToDistance||5;c=o[1][0]-o[0][0],d=o[1][1]-o[0][1],u=o[1][2]-o[0][2],(h=Math.hypot(c,d,u))p&&(p=g)}h=2*Math.sqrt(p);var v=l.clone().multiplyScalar(-1),b=-(.5*h/Math.tan(Math.PI/180*this.camera.fov/2)-this.CAMERA_Z);return b=this.adjustZoomToLimits(b),e>0?this.animateMotion(e,r,v,b,this.rotationGroup.quaternion,this.lookingAt):(this.modelGroup.position=v,this.rotationGroup.position.z=b,this.show()),this}setSlab(t,e){this.slabNear=t,this.slabFar=e}getSlab(){return{near:this.slabNear,far:this.slabFar}}addLabel(t,e={},r,n=!1){if(r){var i=(0,a.getExtent)(this.getAtomsFromSel(r));e.position={x:i[2][0],y:i[2][1],z:i[2][2]}}var o=new c.Label(t,e);return o.setContext(),this.modelGroup.add(o.sprite),this.labels.push(o),n||this.show(),o}addResLabels(t,e,r=!1){let n=this.labels.length;return this.applyToModels("addResLabels",t,this,e,r),this.show(),this.labels.slice(n)}addPropertyLabels(t,e,r){return this.applyToModels("addPropertyLabels",t,e,this,r),this.show(),this}removeLabel(t){for(var e=0;e0&&void 0===this.shapes[this.shapes.length-1];)this.shapes.pop();return this}removeAllShapes(){for(var t=0;t-1e-4&&o.x<1.0001&&o.y>-1e-4&&o.y<1.0001&&o.z>-1e-4&&o.z<1.0001)}}for(let o=0;oo){t.start=r,t.end=n,e.addLine(t);break}u.addVectors(r,c),t.start=r,t.end=u,e.addLine(t),r=u.clone(),h+=a,u.addVectors(r,d),r=u.clone(),h+=s}return e.finalize(),e}addCustom(t){t=t||{};var e=new d.GLShape(t);return e.shapePosition=this.shapes.length,e.addCustom(t),this.shapes.push(e),e.finalize(),e}addVolumetricData(t,e,r={}){var n=new u.VolumeData(t,e);return r.hasOwnProperty("transferfn")?this.addVolumetricRender(n,r):this.addIsosurface(n,r)}addIsosurface(t,e={},r){var n=new d.GLShape(e);return n.shapePosition=this.shapes.length,n.addIsosurface(t,e,r),this.shapes.push(n),n}addVolumetricRender(t,e){e=e||{};var r=new f.GLVolumetricRender(t,e);return r.shapePosition=this.shapes.length,this.shapes.push(r),r}hasVolumetricRender(){return this.renderer.supportsVolumetric()}enableFog(t){t?this.scene.fog=new n.Fog(this.bgColor,100,200):(this.config.disableFog=!0,this.show())}setFrame(t){this.viewer_frame=t;let e=this;return new Promise((function(r){var n=e.models.map((function(r){return r.setFrame(t,e)}));Promise.all(n).then((function(){r()}))}))}getFrame(){return this.viewer_frame}getNumFrames(){var t=0;for(let e=0;et&&(t=this.models[e].getNumFrames());for(let e=0;e=t&&(t=this.shapes[e].frame+1);for(let e=0;e=t&&(t=this.labels[e].frame+1);return t}animate(t){this.incAnim();var e=100,r="forward",n=0;(t=t||{}).interval&&(e=t.interval),t.loop&&(r=t.loop),t.reps&&(n=t.reps);var i=this.getNumFrames(),o=this,s=0;t.startFrame&&(s=t.startFrame%i);var l=1;t.step&&(n/=l=t.step);var c,d,u=0,h=i*n,f=new Date,p=function(t){f=new Date,"forward"==t?o.setFrame(s).then((function(){s=(s+l)%i,c()})):"backward"==t?o.setFrame(i-1-s).then((function(){s=(s+l)%i,c()})):o.setFrame(s).then((function(){l*=(s+=l)%(i-1)==0?-1:1,c()}))};return c=function(){if(o.render(),o.getCanvas().isConnected)if(++u!=h&&o.isAnimated()){var t=e-((new Date).getTime()-f.getTime());t=t>0?t:0,o.animationTimers.delete(d),d=new a.PausableTimer(p,t,r),o.animationTimers.add(d)}else d.cancel(),o.animationTimers.delete(d),o.decAnim();else o.stopAnimate()},d=new a.PausableTimer(p,0,r),this.animationTimers.add(d),this}stopAnimate(){return this.animated=0,this.animationTimers.forEach((function(t){t.cancel()})),this.animationTimers=new Set,this}pauseAnimate(){return this.animationTimers.forEach((function(t){t.pause()})),this}resumeAnimate(){return this.animationTimers.forEach((function(t){t.resume()})),this}isAnimated(){return this.animated>0}getModelOpt(t){return t&&!t.defaultcolors?(t.defaultcolors=this.defaultcolors,t.cartoonQuality=t.cartoonQuality||this.config.cartoonQuality):void 0===t&&(t={defaultcolors:this.defaultcolors,cartoonQuality:this.config.cartoonQuality}),t}addModel(t,e="",r){r=this.getModelOpt(r);var n=new l.GLModel(this.models.length,r);return n.addMolData(t,e,r),this.models.push(n),n}addModels(t,e,r){(r=this.getModelOpt(r)).multimodel=!0,r.frames=!0;for(var n=l.GLModel.parseMolData(t,e,r),i=0;i0&&void 0===this.models[this.models.length-1];)this.models.pop();return this}}removeAllModels(){for(var t=0;te[1][0]||n.ye[1][1]||n.ze[1][2]||r.push(n))}return r}static volume(t){return(t[1][0]-t[0][0])*(t[1][1]-t[0][1])*(t[1][2]-t[0][2])}carveUpExtent(t,e,r){let n=[],i={};for(let t=0,r=e.length;tn&&r>i?0:n>r&&n>i?1:2;var o=a(t),l=a(t),c=(t[1][e]-t[0][e])/2+t[0][e];o[1][e]=c,l[0][e]=c;var d=s(o),u=s(l);return d.concat(u)},l=s(t);for(let t=0,i=l.length;t0)for(let t=0,e=u.length;t1||1==_.length&&!_[0].isIdentity()){w=!0;break}}var k=function(t,r,n){var i;b=l?m.shallowCopy(p.getAtomsFromSel(l)):n;var o=(0,a.getExtent)(n,!0);if(e.map&&e.map.prop){var c=e.map.prop;let t=(0,s.getGradient)(e.map.scheme||e.map.gradient||new s.Gradient.RWB),r=t.range();r||(r=(0,a.getPropertyRange)(n,c)),e.colorscheme={prop:c,gradient:t}}for(let t=0,n=r.length;t0){var x=(0,a.getExtent)(b,!0);y.sort((function(t,e){var r=function(t,e){var r=t.extent,n=r[1][0]-r[0][0],i=r[1][1]-r[0][1],o=r[1][2]-r[0][2],a=n-e[2][0];a*=a;var s=i-e[2][1];s*=s;var l=o-e[2][2];return a+s+l*l};return r(t,x)-r(e,x)}))}var w=[];for(let t=0,e=r.length;t0&&(A.push({geo:new n.Geometry(!0),mat:f,done:!1,finished:!1,symmetries:this.models[x].getSymmetries()}),C.push(k(A[A.length-1],M[x],S[x])));T=Promise.all(C)}else A.push({geo:new n.Geometry(!0),mat:f,done:!1,finished:!1,symmetries:[new i.Matrix4]}),T=k(A[A.length-1],v,y);return this.surfaces[u]=A,T.surfid=u,c&&"function"==typeof c?(T.then((function(t){c(t)})),u):T}setSurfaceMaterialStyle(t,e){if((0,a.adjustVolumeStyle)(e),this.surfaces[t]){var r=this.surfaces[t];r.style=e;for(var i=0;i0?this.camera.position.x=r*Math.tan(Math.PI/180*e):this.camera.position.x=-r*Math.tan(Math.PI/180*e),this.camera.lookAt(new i.Vector3(0,0,this.rotationGroup.position.z)),this.camera.position.x}setDefaultCartoonQuality(t){this.config.cartoonQuality=t}}function g(t,e){if(t=(0,a.getElement)(t)){e=e||{};try{return new m(t,e)}catch(t){throw"error creating viewer: "+t}}}function v(t,e={},r={}){if(t=(0,a.getElement)(t)){var n=[],i=document.createElement("canvas");r.rows=e.rows,r.cols=e.cols,r.control_all=null!=e.control_all&&e.control_all,t.appendChild(i);try{for(var o=0;o{"use strict";r.r(e),r.d(e,{CustomLinear:()=>d,Gradient:()=>h,GradientType:()=>i,ROYGB:()=>l,RWB:()=>s,Sinebow:()=>c,builtinGradients:()=>u,getGradient:()=>a,normalizeValue:()=>o});var n=r("./src/colors.ts");class i{}function o(t,e,r){return e>=t?(re&&(r=e),{lo:t,hi:e,val:r}):(r>t&&(r=t),r=2?(this.max=t[1],this.min=t[0]):t&&e&&!Array.isArray(t)&&(this.min=t,this.max=e)}range(){return void 0!==this.min&&void 0!==this.max?[this.min,this.max]:null}valueToHex(t,e){var r,n;if(t=this.mult*t,e?(r=e[0],n=e[1]):(r=this.min,n=this.max),void 0===t)return 16777215;var i=o(r,n,t);r=i.lo;var a,s=n=i.hi;return(t=i.val)<(s=e&&void 0!==e[2]?e[2]:void 0!==this.mid?this.mid:(r+n)/2)?16711680+256*(a=Math.floor(255*Math.sqrt((t-r)/(s-r))))+a:t>s?65536*(a=Math.floor(255*Math.sqrt(1-(t-s)/(n-s))))+256*a+255:16777215}}class l extends i{constructor(t,e){super(),this.gradient="ROYGB",this.mult=1,this.min=t,this.max=e,void 0===e&&Array.isArray(t)&&t.length>=2?(this.max=t[1],this.min=t[0]):t&&e&&!Array.isArray(t)&&(this.min=t,this.max=e)}valueToHex(t,e){var r,n;if(t=this.mult*t,e?(r=e[0],n=e[1]):(r=this.min,n=this.max),void 0===t)return 16777215;var i=o(r,n,t),a=((r=i.lo)+(n=i.hi))/2,s=(r+a)/2,l=(a+n)/2;return(t=i.val)=2&&(this.max=t[1],this.min=t[0]),e=2?(this.max=t[1],this.min=t[0],i=e):(this.min=t,this.max=e,i=r),i)for(let t of i)this.colors.push(n.CC.color(t));else this.colors.push(n.CC.color(0))}range(){return void 0!==this.min&&void 0!==this.max?[this.min,this.max]:null}valueToHex(t,e){var r,i;if(e?(r=e[0],i=e[1]):(r=this.min,i=this.max),void 0===t)return 16777215;var a=o(r,i,t);r=a.lo,i=a.hi,t=a.val;let s=this.colors.length,l=(i-r)/s,c=Math.min(Math.floor((t-r)/l),s-1),d=Math.min(c+1,s-1),u=(t-r-c*l)/l,h=this.colors[c],f=this.colors[d];return new n.Color(h.r+u*(f.r-h.r),h.g+u*(f.g-h.g),h.b+u*(f.b-h.b)).getHex()}}const u={rwb:s,RWB:s,roygb:l,ROYGB:l,sinebow:c,linear:d};class h extends i{valueToHex(t,e){return 0}range(){return null}}h.RWB=s,h.ROYGB=l,h.Sinebow=c,h.CustomLinear=d,h.builtinGradients=u,h.normalizeValue=o,h.getGradient=a},"./src/Label.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Label:()=>l,LabelCount:()=>a});var n=r("./src/WebGL/index.ts"),i=r("./src/Gradient.ts"),o=r("./src/colors.ts");let a=0;function s(t,e,r){var n=r;return void 0!==t&&(t instanceof o.Color?n=t.scaled():void 0!==(n=o.CC.color(t)).scaled&&(n=n.scaled())),void 0!==e&&(n.a=parseFloat(e)),n}class l{constructor(t,e){this.id=a++,this.stylespec=e||{},this.canvas=document.createElement("canvas"),this.canvas.width=134,this.canvas.height=35,this.context=this.canvas.getContext("2d"),this.sprite=new n.Sprite,this.text=t,this.frame=this.stylespec.frame}getStyle(){return this.stylespec}setContext(){var t=this.stylespec,e=void 0!==t.useScreen&&t.useScreen,r=t.showBackground;"0"!==r&&"false"!==r||(r=!1),void 0===r&&(r=!0);var o=t.font?t.font:"sans-serif",a=parseInt(t.fontSize)?parseInt(t.fontSize):18,l=s(t.fontColor,t.fontOpacity,{r:255,g:255,b:255,a:1}),c=t.padding?t.padding:4,d=t.borderThickness?t.borderThickness:0,u=s(t.backgroundColor,t.backgroundOpacity,{r:0,g:0,b:0,a:1}),h=s(t.borderColor,t.borderOpacity,u),f=t.position?t.position:{x:-10,y:1,z:1},p=void 0===t.inFront||t.inFront;"false"!==p&&"0"!==p||(p=!1);var m=t.alignment||n.SpriteAlignment.topLeft;"string"==typeof m&&m in n.SpriteAlignment&&(m=n.SpriteAlignment[m]);var g="";t.bold&&(g="bold "),this.context.font=g+a+"px "+o;var v=this.context.measureText(this.text).width;r||(d=0);var b=v+2.5*d+2*c,y=1.25*a+2*d+2*c;if(t.backgroundImage){var x=t.backgroundImage,w=t.backgroundWidth?t.backgroundWidth:x.width,_=t.backgroundHeight?t.backgroundHeight:x.height;w>b&&(b=w),_>y&&(y=_)}if(this.canvas.width=b,this.canvas.height=y,this.context.clearRect(0,0,this.canvas.width,this.canvas.height),g="",t.bold&&(g="bold "),this.context.font=g+a+"px "+o,this.context.fillStyle="rgba("+u.r+","+u.g+","+u.b+","+u.a+")",this.context.strokeStyle="rgba("+h.r+","+h.g+","+h.b+","+h.a+")",t.backgroundGradient){let e=this.context.createLinearGradient(0,y/2,b,y/2),r=i.Gradient.getGradient(t.backgroundGradient),n=r.range(),o=-1,a=1;n&&(o=n[0],a=n[1]);let l=a-o;for(let t=0;t<1.01;t+=.1){let n=s(r.valueToHex(o+l*t)),i="rgba("+n.r+","+n.g+","+n.b+","+n.a+")";e.addColorStop(t,i)}this.context.fillStyle=e}this.context.lineWidth=d,r&&function(t,e,r,n,i,o,a){t.beginPath(),t.moveTo(e+6,r),t.lineTo(e+n-6,r),t.quadraticCurveTo(e+n,r,e+n,r+6),t.lineTo(e+n,r+i-6),t.quadraticCurveTo(e+n,r+i,e+n-6,r+i),t.lineTo(e+6,r+i),t.quadraticCurveTo(e,r+i,e,r+i-6),t.lineTo(e,r+6),t.quadraticCurveTo(e,r,e+6,r),t.closePath(),t.fill(),a&&t.stroke()}(this.context,d,d,b-2*d,y-2*d,0,d>0),t.backgroundImage&&this.context.drawImage(x,0,0,b,y),this.context.fillStyle="rgba("+l.r+","+l.g+","+l.b+","+l.a+")",this.context.fillText(this.text,d+c,a+d+c,v);var k=new n.Texture(this.canvas);k.needsUpdate=!0,this.sprite.material=new n.SpriteMaterial({map:k,useScreenCoordinates:e,alignment:m,depthTest:!p,screenOffset:t.screenOffset||null}),this.sprite.scale.set(1,1,1),this.sprite.position.set(f.x,f.y,f.z)}dispose(){void 0!==this.sprite.material.map&&this.sprite.material.map.dispose(),void 0!==this.sprite.material&&this.sprite.material.dispose()}}},"./src/ProteinSurface4.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{MarchingCube:()=>l,MarchingCubeInitializer:()=>s,PointGrid:()=>c,ProteinSurface:()=>d,SurfaceType:()=>n,setSyncSurface:()=>a,syncSurface:()=>o});var n,i=r("./src/WebGL/math/index.ts");!function(t){t[t.VDW=1]="VDW",t[t.MS=2]="MS",t[t.SAS=3]="SAS",t[t.SES=4]="SES"}(n||(n={}));var o=!1;function a(t){o=t}(window.navigator.userAgent.indexOf("MSIE ")>=0||window.navigator.userAgent.indexOf("Trident/")>=0)&&(o=!0);class s{constructor(){this.ISDONE=2,this.edgeTable=new Uint32Array([0,0,0,0,0,0,0,2816,0,0,0,1792,0,3328,3584,3840,0,0,0,138,0,21,0,134,0,0,0,652,0,2067,3865,3600,0,0,0,42,0,0,0,294,0,0,21,28,0,3875,1049,3360,0,168,162,170,0,645,2475,2210,0,687,293,172,4010,3747,3497,3232,0,0,0,0,0,69,0,900,0,0,0,1792,138,131,1608,1920,0,81,0,2074,84,85,84,86,0,81,0,3676,330,1105,1881,1616,0,0,0,42,0,69,0,502,0,0,21,3580,138,2035,1273,1520,2816,104,2337,106,840,581,367,102,2816,3695,3429,3180,1898,1635,1385,1120,0,0,0,0,0,0,0,3910,0,0,69,588,42,2083,41,2880,0,0,0,1722,0,2293,4095,3830,0,255,757,764,2538,2291,3065,2800,0,0,81,338,0,3925,1119,3414,84,855,85,340,2130,2899,89,2384,1792,712,194,1162,4036,3781,3535,3270,708,719,197,204,3018,2755,2505,2240,0,0,0,0,168,420,168,1958,162,162,676,2988,170,163,680,928,3328,3096,3328,3642,52,53,1855,1590,2340,2111,2869,2620,298,51,825,560,3584,3584,3090,3482,1668,1941,1183,1430,146,2975,2069,2460,154,915,153,400,3840,3592,3329,3082,1796,1541,1295,1030,2818,2575,2309,2060,778,515,265,0]),this.triTable=[[],[],[],[],[],[],[],[11,9,8],[],[],[],[8,10,9],[],[10,8,11],[9,11,10],[8,10,9,8,11,10],[],[],[],[1,7,3],[],[4,2,0],[],[2,1,7],[],[],[],[2,7,3,2,9,7],[],[1,4,11,1,0,4],[3,8,0,11,9,4,11,10,9],[4,11,9,11,10,9],[],[],[],[5,3,1],[],[],[],[2,5,8,2,1,5],[],[],[2,4,0],[3,2,4],[],[0,9,1,8,10,5,8,11,10],[3,4,0,3,10,4],[5,8,10,8,11,10],[],[3,5,7],[7,1,5],[1,7,3,1,5,7],[],[9,2,0,9,7,2],[0,3,8,1,7,11,1,5,7],[11,1,7,1,5,7],[],[9,1,0,5,3,2,5,7,3],[8,2,5,8,0,2],[2,5,3,5,7,3],[3,9,1,3,8,9,7,11,10,7,10,5],[9,1,0,10,7,11,10,5,7],[3,8,0,7,10,5,7,11,10],[11,5,7,11,10,5],[],[],[],[],[],[0,6,2],[],[7,2,9,7,9,8],[],[],[],[8,10,9],[7,1,3],[7,1,0],[6,9,3,6,10,9],[7,10,8,10,9,8],[],[6,0,4],[],[11,1,4,11,3,1],[2,4,6],[2,0,4,2,4,6],[2,4,6],[1,4,2,4,6,2],[],[6,0,4],[],[2,11,3,6,9,4,6,10,9],[8,6,1,8,1,3],[10,0,6,0,4,6],[8,0,3,9,6,10,9,4,6],[10,4,6,10,9,4],[],[],[],[5,3,1],[],[0,6,2],[],[7,4,8,5,2,1,5,6,2],[],[],[2,4,0],[7,4,8,2,11,3,10,5,6],[7,1,3],[5,6,10,0,9,1,8,7,4],[5,6,10,7,0,3,7,4,0],[10,5,6,4,8,7],[9,11,8],[3,5,6],[0,5,11,0,11,8],[6,3,5,3,1,5],[3,9,6,3,8,9],[9,6,0,6,2,0],[0,3,8,2,5,6,2,1,5],[1,6,2,1,5,6],[9,11,8],[1,0,9,6,10,5,11,3,2],[6,10,5,2,8,0,2,11,8],[3,2,11,10,5,6],[10,5,6,9,3,8,9,1,3],[0,9,1,5,6,10],[8,0,3,10,5,6],[10,5,6],[],[],[],[],[],[],[],[1,10,2,9,11,6,9,8,11],[],[],[6,0,2],[3,6,9,3,2,6],[3,5,1],[0,5,1,0,11,5],[0,3,5],[6,9,11,9,8,11],[],[],[],[4,5,9,7,1,10,7,3,1],[],[11,6,7,2,4,5,2,0,4],[11,6,7,8,0,3,1,10,2,9,4,5],[6,7,11,1,10,2,9,4,5],[],[4,1,0,4,5,1,6,7,3,6,3,2],[9,4,5,0,6,7,0,2,6],[4,5,9,6,3,2,6,7,3],[6,7,11,5,3,8,5,1,3],[6,7,11,4,1,0,4,5,1],[4,5,9,3,8,0,11,6,7],[9,4,5,7,11,6],[],[],[0,6,4],[8,6,4,8,1,6],[],[0,10,2,0,9,10,4,8,11,4,11,6],[10,2,1,6,0,3,6,4,0],[10,2,1,11,4,8,11,6,4],[4,2,6],[1,0,9,2,4,8,2,6,4],[2,4,0,2,6,4],[8,2,4,2,6,4],[11,4,1,11,6,4],[0,9,1,4,11,6,4,8,11],[3,6,0,6,4,0],[8,6,4,8,11,6],[10,8,9],[6,3,9,6,7,3],[6,7,1],[10,7,1,7,3,1],[7,11,6,8,10,2,8,9,10],[11,6,7,10,0,9,10,2,0],[2,1,10,7,11,6,8,0,3],[1,10,2,6,7,11],[7,2,6,7,9,2],[1,0,9,3,6,7,3,2,6],[7,0,6,0,2,6],[2,7,3,2,6,7],[7,11,6,3,9,1,3,8,9],[9,1,0,11,6,7],[0,3,8,11,6,7],[11,6,7],[],[],[],[],[5,3,7],[8,5,2,8,7,5],[5,3,7],[1,10,2,5,8,7,5,9,8],[1,7,5],[1,7,5],[9,2,7,9,7,5],[11,3,2,8,5,9,8,7,5],[1,3,7,1,7,5],[0,7,1,7,5,1],[9,3,5,3,7,5],[9,7,5,9,8,7],[8,10,11],[3,4,10,3,10,11],[8,10,11],[5,9,4,1,11,3,1,10,11],[2,4,5],[5,2,4,2,0,4],[0,3,8,5,9,4,10,2,1],[2,1,10,9,4,5],[2,8,5,2,11,8],[3,2,11,1,4,5,1,0,4],[9,4,5,8,2,11,8,0,2],[11,3,2,9,4,5],[8,5,3,5,1,3],[5,0,4,5,1,0],[3,8,0,4,5,9],[9,4,5],[11,9,10],[11,9,10],[1,11,4,1,10,11],[8,7,4,11,1,10,11,3,1],[2,7,9,2,9,10],[4,8,7,0,10,2,0,9,10],[2,1,10,0,7,4,0,3,7],[10,2,1,8,7,4],[1,7,4],[3,2,11,4,8,7,9,1,0],[11,4,2,4,0,2],[2,11,3,7,4,8],[4,1,7,1,3,7],[1,0,9,8,7,4],[3,4,0,3,7,4],[8,7,4],[8,9,10,8,10,11],[3,9,11,9,10,11],[0,10,8,10,11,8],[10,3,1,10,11,3],[2,8,10,8,9,10],[9,2,0,9,10,2],[8,0,3,1,10,2],[10,2,1],[1,11,9,11,8,9],[11,3,2,0,9,1],[11,0,2,11,8,0],[11,3,2],[8,1,3,8,9,1],[9,1,0],[8,0,3],[]],this.edgeTable2=[0,265,515,778,2060,2309,2575,2822,1030,1295,1541,1804,3082,3331,3593,3840,400,153,915,666,2460,2197,2975,2710,1430,1183,1941,1692,3482,3219,3993,3728,560,825,51,314,2620,2869,2111,2358,1590,1855,1077,1340,3642,3891,3129,3376,928,681,419,170,2988,2725,2479,2214,1958,1711,1445,1196,4010,3747,3497,3232,2240,2505,2755,3018,204,453,719,966,3270,3535,3781,4044,1226,1475,1737,1984,2384,2137,2899,2650,348,85,863,598,3414,3167,3925,3676,1370,1107,1881,1616,2800,3065,2291,2554,764,1013,255,502,3830,4095,3317,3580,1786,2035,1273,1520,2912,2665,2403,2154,876,613,367,102,3942,3695,3429,3180,1898,1635,1385,1120,1120,1385,1635,1898,3180,3429,3695,3942,102,367,613,876,2154,2403,2665,2912,1520,1273,2035,1786,3580,3317,4095,3830,502,255,1013,764,2554,2291,3065,2800,1616,1881,1107,1370,3676,3925,3167,3414,598,863,85,348,2650,2899,2137,2384,1984,1737,1475,1226,4044,3781,3535,3270,966,719,453,204,3018,2755,2505,2240,3232,3497,3747,4010,1196,1445,1711,1958,2214,2479,2725,2988,170,419,681,928,3376,3129,3891,3642,1340,1077,1855,1590,2358,2111,2869,2620,314,51,825,560,3728,3993,3219,3482,1692,1941,1183,1430,2710,2975,2197,2460,666,915,153,400,3840,3593,3331,3082,1804,1541,1295,1030,2822,2575,2309,2060,778,515,265,0],this.triTable2=[[],[8,3,0],[9,0,1],[8,3,1,8,1,9],[11,2,3],[11,2,0,11,0,8],[11,2,3,0,1,9],[2,1,11,1,9,11,11,9,8],[10,1,2],[8,3,0,1,2,10],[9,0,2,9,2,10],[3,2,8,2,10,8,8,10,9],[10,1,3,10,3,11],[1,0,10,0,8,10,10,8,11],[0,3,9,3,11,9,9,11,10],[8,10,9,8,11,10],[8,4,7],[3,0,4,3,4,7],[1,9,0,8,4,7],[9,4,1,4,7,1,1,7,3],[2,3,11,7,8,4],[7,11,4,11,2,4,4,2,0],[3,11,2,4,7,8,9,0,1],[2,7,11,2,1,7,1,4,7,1,9,4],[10,1,2,8,4,7],[2,10,1,0,4,7,0,7,3],[4,7,8,0,2,10,0,10,9],[2,7,3,2,9,7,7,9,4,2,10,9],[8,4,7,11,10,1,11,1,3],[11,4,7,1,4,11,1,11,10,1,0,4],[3,8,0,7,11,4,11,9,4,11,10,9],[7,11,4,4,11,9,11,10,9],[9,5,4],[3,0,8,4,9,5],[5,4,0,5,0,1],[4,8,5,8,3,5,5,3,1],[11,2,3,9,5,4],[9,5,4,8,11,2,8,2,0],[3,11,2,1,5,4,1,4,0],[8,5,4,2,5,8,2,8,11,2,1,5],[2,10,1,9,5,4],[0,8,3,5,4,9,10,1,2],[10,5,2,5,4,2,2,4,0],[3,4,8,3,2,4,2,5,4,2,10,5],[5,4,9,1,3,11,1,11,10],[0,9,1,4,8,5,8,10,5,8,11,10],[3,4,0,3,10,4,4,10,5,3,11,10],[4,8,5,5,8,10,8,11,10],[9,5,7,9,7,8],[0,9,3,9,5,3,3,5,7],[8,0,7,0,1,7,7,1,5],[1,7,3,1,5,7],[11,2,3,8,9,5,8,5,7],[9,2,0,9,7,2,2,7,11,9,5,7],[0,3,8,2,1,11,1,7,11,1,5,7],[2,1,11,11,1,7,1,5,7],[1,2,10,5,7,8,5,8,9],[9,1,0,10,5,2,5,3,2,5,7,3],[5,2,10,8,2,5,8,5,7,8,0,2],[10,5,2,2,5,3,5,7,3],[3,9,1,3,8,9,7,11,10,7,10,5],[9,1,0,10,7,11,10,5,7],[3,8,0,7,10,5,7,11,10],[11,5,7,11,10,5],[11,7,6],[0,8,3,11,7,6],[9,0,1,11,7,6],[7,6,11,3,1,9,3,9,8],[2,3,7,2,7,6],[8,7,0,7,6,0,0,6,2],[1,9,0,3,7,6,3,6,2],[7,6,2,7,2,9,2,1,9,7,9,8],[1,2,10,6,11,7],[2,10,1,7,6,11,8,3,0],[11,7,6,10,9,0,10,0,2],[7,6,11,3,2,8,8,2,10,8,10,9],[6,10,7,10,1,7,7,1,3],[6,10,1,6,1,7,7,1,0,7,0,8],[9,0,3,6,9,3,6,10,9,6,3,7],[6,10,7,7,10,8,10,9,8],[8,4,6,8,6,11],[11,3,6,3,0,6,6,0,4],[0,1,9,4,6,11,4,11,8],[1,9,4,11,1,4,11,3,1,11,4,6],[3,8,2,8,4,2,2,4,6],[2,0,4,2,4,6],[1,9,0,3,8,2,2,8,4,2,4,6],[9,4,1,1,4,2,4,6,2],[10,1,2,11,8,4,11,4,6],[10,1,2,11,3,6,6,3,0,6,0,4],[0,2,10,0,10,9,4,11,8,4,6,11],[2,11,3,6,9,4,6,10,9],[8,4,6,8,6,1,6,10,1,8,1,3],[1,0,10,10,0,6,0,4,6],[8,0,3,9,6,10,9,4,6],[10,4,6,10,9,4],[9,5,4,7,6,11],[4,9,5,3,0,8,11,7,6],[6,11,7,4,0,1,4,1,5],[6,11,7,4,8,5,5,8,3,5,3,1],[4,9,5,6,2,3,6,3,7],[9,5,4,8,7,0,0,7,6,0,6,2],[4,0,1,4,1,5,6,3,7,6,2,3],[7,4,8,5,2,1,5,6,2],[6,11,7,1,2,10,9,5,4],[11,7,6,8,3,0,1,2,10,9,5,4],[11,7,6,10,5,2,2,5,4,2,4,0],[7,4,8,2,11,3,10,5,6],[4,9,5,6,10,7,7,10,1,7,1,3],[5,6,10,0,9,1,8,7,4],[5,6,10,7,0,3,7,4,0],[10,5,6,4,8,7],[5,6,9,6,11,9,9,11,8],[0,9,5,0,5,3,3,5,6,3,6,11],[0,1,5,0,5,11,5,6,11,0,11,8],[11,3,6,6,3,5,3,1,5],[9,5,6,3,9,6,3,8,9,3,6,2],[5,6,9,9,6,0,6,2,0],[0,3,8,2,5,6,2,1,5],[1,6,2,1,5,6],[1,2,10,5,6,9,9,6,11,9,11,8],[1,0,9,6,10,5,11,3,2],[6,10,5,2,8,0,2,11,8],[3,2,11,10,5,6],[10,5,6,9,3,8,9,1,3],[0,9,1,5,6,10],[8,0,3,10,5,6],[10,5,6],[10,6,5],[8,3,0,10,6,5],[0,1,9,5,10,6],[10,6,5,9,8,3,9,3,1],[3,11,2,10,6,5],[6,5,10,2,0,8,2,8,11],[1,9,0,6,5,10,11,2,3],[1,10,2,5,9,6,9,11,6,9,8,11],[1,2,6,1,6,5],[0,8,3,2,6,5,2,5,1],[5,9,6,9,0,6,6,0,2],[9,6,5,3,6,9,3,9,8,3,2,6],[11,6,3,6,5,3,3,5,1],[0,5,1,0,11,5,5,11,6,0,8,11],[0,5,9,0,3,5,3,6,5,3,11,6],[5,9,6,6,9,11,9,8,11],[10,6,5,4,7,8],[5,10,6,7,3,0,7,0,4],[5,10,6,0,1,9,8,4,7],[4,5,9,6,7,10,7,1,10,7,3,1],[7,8,4,2,3,11,10,6,5],[11,6,7,10,2,5,2,4,5,2,0,4],[11,6,7,8,0,3,1,10,2,9,4,5],[6,7,11,1,10,2,9,4,5],[7,8,4,5,1,2,5,2,6],[4,1,0,4,5,1,6,7,3,6,3,2],[9,4,5,8,0,7,0,6,7,0,2,6],[4,5,9,6,3,2,6,7,3],[6,7,11,4,5,8,5,3,8,5,1,3],[6,7,11,4,1,0,4,5,1],[4,5,9,3,8,0,11,6,7],[9,4,5,7,11,6],[10,6,4,10,4,9],[8,3,0,9,10,6,9,6,4],[1,10,0,10,6,0,0,6,4],[8,6,4,8,1,6,6,1,10,8,3,1],[2,3,11,6,4,9,6,9,10],[0,10,2,0,9,10,4,8,11,4,11,6],[10,2,1,11,6,3,6,0,3,6,4,0],[10,2,1,11,4,8,11,6,4],[9,1,4,1,2,4,4,2,6],[1,0,9,3,2,8,2,4,8,2,6,4],[2,4,0,2,6,4],[3,2,8,8,2,4,2,6,4],[1,4,9,11,4,1,11,1,3,11,6,4],[0,9,1,4,11,6,4,8,11],[11,6,3,3,6,0,6,4,0],[8,6,4,8,11,6],[6,7,10,7,8,10,10,8,9],[9,3,0,6,3,9,6,9,10,6,7,3],[6,1,10,6,7,1,7,0,1,7,8,0],[6,7,10,10,7,1,7,3,1],[7,11,6,3,8,2,8,10,2,8,9,10],[11,6,7,10,0,9,10,2,0],[2,1,10,7,11,6,8,0,3],[1,10,2,6,7,11],[7,2,6,7,9,2,2,9,1,7,8,9],[1,0,9,3,6,7,3,2,6],[8,0,7,7,0,6,0,2,6],[2,7,3,2,6,7],[7,11,6,3,9,1,3,8,9],[9,1,0,11,6,7],[0,3,8,11,6,7],[11,6,7],[11,7,5,11,5,10],[3,0,8,7,5,10,7,10,11],[9,0,1,10,11,7,10,7,5],[3,1,9,3,9,8,7,10,11,7,5,10],[10,2,5,2,3,5,5,3,7],[5,10,2,8,5,2,8,7,5,8,2,0],[9,0,1,10,2,5,5,2,3,5,3,7],[1,10,2,5,8,7,5,9,8],[2,11,1,11,7,1,1,7,5],[0,8,3,2,11,1,1,11,7,1,7,5],[9,0,2,9,2,7,2,11,7,9,7,5],[11,3,2,8,5,9,8,7,5],[1,3,7,1,7,5],[8,7,0,0,7,1,7,5,1],[0,3,9,9,3,5,3,7,5],[9,7,5,9,8,7],[4,5,8,5,10,8,8,10,11],[3,0,4,3,4,10,4,5,10,3,10,11],[0,1,9,4,5,8,8,5,10,8,10,11],[5,9,4,1,11,3,1,10,11],[3,8,4,3,4,2,2,4,5,2,5,10],[10,2,5,5,2,4,2,0,4],[0,3,8,5,9,4,10,2,1],[2,1,10,9,4,5],[8,4,5,2,8,5,2,11,8,2,5,1],[3,2,11,1,4,5,1,0,4],[9,4,5,8,2,11,8,0,2],[11,3,2,9,4,5],[4,5,8,8,5,3,5,1,3],[5,0,4,5,1,0],[3,8,0,4,5,9],[9,4,5],[7,4,11,4,9,11,11,9,10],[3,0,8,7,4,11,11,4,9,11,9,10],[11,7,4,1,11,4,1,10,11,1,4,0],[8,7,4,11,1,10,11,3,1],[2,3,7,2,7,9,7,4,9,2,9,10],[4,8,7,0,10,2,0,9,10],[2,1,10,0,7,4,0,3,7],[10,2,1,8,7,4],[2,11,7,2,7,1,1,7,4,1,4,9],[3,2,11,4,8,7,9,1,0],[7,4,11,11,4,2,4,0,2],[2,11,3,7,4,8],[9,1,4,4,1,7,1,3,7],[1,0,9,8,7,4],[3,4,0,3,7,4],[8,7,4],[8,9,10,8,10,11],[0,9,3,3,9,11,9,10,11],[1,10,0,0,10,8,10,11,8],[10,3,1,10,11,3],[3,8,2,2,8,10,8,9,10],[9,2,0,9,10,2],[8,0,3,1,10,2],[10,2,1],[2,11,1,1,11,9,11,8,9],[11,3,2,0,9,1],[11,0,2,11,8,0],[11,3,2],[8,1,3,8,9,1],[9,1,0],[8,0,3],[]]}march(t,e,r,n){let o=!!n.fulltable,a=n.hasOwnProperty("origin")&&n.origin.hasOwnProperty("x")?n.origin:{x:0,y:0,z:0},s=!!n.voxel,l=n.matrix,c=n.nX||0,d=n.nY||0,u=n.nZ||0,h=n.scale||1,f=null;f=n.unitCube?n.unitCube:{x:h,y:h,z:h};let p,m,g=new Int32Array(c*d*u);for(p=0,m=g.length;p>2))+n+((2&e)>>1))*u+i+(1&e)]&this.ISDONE)<=3&&(e.push(e[n]),n=e.length-1,e.push(e[i]),i=e.length-1,e.push(e[o]),o=e.length-1),r.push(n),r.push(i),r.push(o)}}}laplacianSmooth(t,e,r){let n,i,o,a,s,l=new Array(e.length);for(n=0,i=e.length;n1e6&&(this.scaleFactor=this.defaultScaleFactor/2);let n=1/this.scaleFactor*5.5;this.pminx=t[0][0],this.pmaxx=t[1][0],this.pminy=t[0][1],this.pmaxy=t[1][1],this.pminz=t[0][2],this.pmaxz=t[1][2],e?(this.pminx-=this.probeRadius+n,this.pminy-=this.probeRadius+n,this.pminz-=this.probeRadius+n,this.pmaxx+=this.probeRadius+n,this.pmaxy+=this.probeRadius+n,this.pmaxz+=this.probeRadius+n):(this.pminx-=n,this.pminy-=n,this.pminz-=n,this.pmaxx+=n,this.pmaxy+=n,this.pmaxz+=n),this.pminx=Math.floor(this.pminx*this.scaleFactor)/this.scaleFactor,this.pminy=Math.floor(this.pminy*this.scaleFactor)/this.scaleFactor,this.pminz=Math.floor(this.pminz*this.scaleFactor)/this.scaleFactor,this.pmaxx=Math.ceil(this.pmaxx*this.scaleFactor)/this.scaleFactor,this.pmaxy=Math.ceil(this.pmaxy*this.scaleFactor)/this.scaleFactor,this.pmaxz=Math.ceil(this.pmaxz*this.scaleFactor)/this.scaleFactor,this.ptranx=-this.pminx,this.ptrany=-this.pminy,this.ptranz=-this.pminz,this.pLength=Math.ceil(this.scaleFactor*(this.pmaxx-this.pminx))+1,this.pWidth=Math.ceil(this.scaleFactor*(this.pmaxy-this.pminy))+1,this.pHeight=Math.ceil(this.scaleFactor*(this.pmaxz-this.pminz))+1,this.boundingatom(e),this.cutRadius=this.probeRadius*this.scaleFactor,this.vpBits=new Uint8Array(this.pLength*this.pWidth*this.pHeight),this.vpDistance=new Float64Array(this.pLength*this.pWidth*this.pHeight),this.vpAtomID=new Int32Array(this.pLength*this.pWidth*this.pHeight)}boundingatom(t){let e={};for(const r in this.vdwRadii){let n=this.vdwRadii[r];e[r]=t?(n+this.probeRadius)*this.scaleFactor+.5:n*this.scaleFactor+.5;let i=e[r]*e[r];this.widxz[r]=Math.floor(e[r])+1,this.depty[r]=new Int32Array(this.widxz[r]*this.widxz[r]);let o=0;for(let t=0;ti)this.depty[r][o]=-1;else{let t=Math.sqrt(i-n);this.depty[r][o]=Math.floor(t)}o++}}}fillvoxels(t,e){for(let t=0,e=this.vpBits.length;t=this.pLength||c>=this.pWidth||d>=this.pHeight)continue;let h=a*s+c*this.pHeight+d;if(this.vpBits[h]&this.INOUT){let a=e[this.vpAtomID[h]];if(a.serial!=t.serial){let e=r+f-Math.floor(.5+this.scaleFactor*(a.x+this.ptranx)),s=n+o-Math.floor(.5+this.scaleFactor*(a.y+this.ptrany)),l=i+p-Math.floor(.5+this.scaleFactor*(a.z+this.ptranz));f*f+o*o+p*p=this.pLength||c>=this.pWidth||d>=this.pHeight)continue;let h=a*s+c*this.pHeight+d;if(this.vpBits[h]&this.ISDONE){let a=e[this.vpAtomID[h]];if(a.serial!=t.serial){let e=n+f-Math.floor(.5+this.scaleFactor*(a.x+this.ptranx)),s=i+r-Math.floor(.5+this.scaleFactor*(a.y+this.ptrany)),l=o+p-Math.floor(.5+this.scaleFactor*(a.z+this.ptranz));f*f+r*r+p*p-1&&a-1&&l-1&&s=s)||(this.vpBits[t]|=this.ISBOUND))}fastoneshell(t,e){let r,n,i,o,a,s,l,c,d,u=[];if(0===t.length)return u;let h={ix:-1,iy:-1,iz:-1},f=this.pWidth*this.pHeight;for(let p=0,m=t.length;p-1&&h.iy-1&&h.iz-1&&(d=h.ix*f+this.pHeight*h.iy+h.iz,this.vpBits[d]&this.INOUT&&!(this.vpBits[d]&this.ISDONE)?(e.set(h.ix,h.iy,i+this.nb[t][2],c),o=h.ix-c.ix,a=h.iy-c.iy,s=h.iz-c.iz,l=o*o+a*a+s*s,this.vpDistance[d]=l,this.vpBits[d]|=this.ISDONE,this.vpBits[d]|=this.ISBOUND,u.push({ix:h.ix,iy:h.iy,iz:h.iz})):this.vpBits[d]&this.INOUT&&this.vpBits[d]&this.ISDONE&&(o=h.ix-c.ix,a=h.iy-c.iy,s=h.iz-c.iz,l=o*o+a*a+s*s,l-1&&h.iy-1&&h.iz-1&&(d=h.ix*f+this.pHeight*h.iy+h.iz,this.vpBits[d]&this.INOUT&&!(this.vpBits[d]&this.ISDONE)?(e.set(h.ix,h.iy,i+this.nb[t][2],c),o=h.ix-c.ix,a=h.iy-c.iy,s=h.iz-c.iz,l=o*o+a*a+s*s,this.vpDistance[d]=l,this.vpBits[d]|=this.ISDONE,this.vpBits[d]|=this.ISBOUND,u.push({ix:h.ix,iy:h.iy,iz:h.iz})):this.vpBits[d]&this.INOUT&&this.vpBits[d]&this.ISDONE&&(o=h.ix-c.ix,a=h.iy-c.iy,s=h.iz-c.iz,l=o*o+a*a+s*s,l-1&&h.iy-1&&h.iz-1&&(d=h.ix*f+this.pHeight*h.iy+h.iz,this.vpBits[d]&this.INOUT&&!(this.vpBits[d]&this.ISDONE)?(e.set(h.ix,h.iy,i+this.nb[t][2],c),o=h.ix-c.ix,a=h.iy-c.iy,s=h.iz-c.iz,l=o*o+a*a+s*s,this.vpDistance[d]=l,this.vpBits[d]|=this.ISDONE,this.vpBits[d]|=this.ISBOUND,u.push({ix:h.ix,iy:h.iy,iz:h.iz})):this.vpBits[d]&this.INOUT&&this.vpBits[d]&this.ISDONE&&(o=h.ix-c.ix,a=h.iy-c.iy,s=h.iz-c.iz,l=o*o+a*a+s*s,l{"use strict";r.r(e),r.d(e,{VolumeData:()=>l});var n=r("./src/utilities.ts"),i=r("./src/WebGL/math/index.ts"),o=r("./src/parsers/VASP.ts"),a=r("./src/parsers/CUBE.ts"),s=r("./node_modules/pako/dist/pako.esm.mjs");class l{constructor(t,e,r){if(this.unit={x:1,y:1,z:1},this.origin={x:0,y:0,z:0},this.size={x:0,y:0,z:0},this.data=new Float32Array([]),this.matrix=null,this.inversematrix=null,this.isbinary=new Set(["ccp4","CCP4"]),this.getCoordinates=function(t){var e=t/(this.size.y*this.size.z),r=t%(this.size.y*this.size.z),n=t%this.size.z;return e*=this.unit.x,r*=this.unit.y,n*=this.unit.z,{x:e+=this.origin.x,y:r+=this.origin.y,z:n+=this.origin.z}},this.vasp=function(t){var e=t.replace(/^\s+/,"").split(/[\n\r]/),r=(0,o.VASP)(t)[0].length;if(0==r)return console.log("No good formating of CHG or CHGCAR file, not atomic information provided in the file."),void(this.data=[]);var n,a=1.889725992,s=parseFloat(e[1]);n=e[2].replace(/^\s+/,"").split(/\s+/);var l=new i.Vector3(parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2])).multiplyScalar(s*a);n=e[3].replace(/^\s+/,"").split(/\s+/);var c=new i.Vector3(parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2])).multiplyScalar(s*a);n=e[4].replace(/^\s+/,"").split(/\s+/);var d=new i.Vector3(parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2])).multiplyScalar(s*a),u=l.x*(c.y*d.z-d.y*c.z)-c.x*(l.y*d.z-d.y*l.z)+d.x*(l.y*c.z-c.y*l.z),h=1/(u=Math.abs(u)/Math.pow(a,3));e.splice(0,8+r+1);var f=e[0].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),p=Math.abs(parseFloat(f[0])),m=Math.abs(parseFloat(f[1])),g=Math.abs(parseFloat(f[2])),v=this.origin=new i.Vector3(0,0,0);this.size={x:p,y:m,z:g},this.unit=new i.Vector3(l.x,c.y,d.z),l=l.multiplyScalar(1/(a*p)),c=c.multiplyScalar(1/(a*m)),d=d.multiplyScalar(1/(a*g)),0==l.y&&0==l.z&&0==c.x&&0==c.z&&0==d.x&&0==d.y||(this.matrix=new i.Matrix4(l.x,c.x,d.x,0,l.y,c.y,d.y,0,l.z,c.z,d.z,0,0,0,0,1),this.matrix=this.matrix.multiplyMatrices(this.matrix,(new i.Matrix4).makeTranslation(v.x,v.y,v.z)),this.origin=new i.Vector3(0,0,0),this.unit=new i.Vector3(1,1,1)),e.splice(0,1);var b=e.join(" "),y=(b=b.replace(/^\s+/,"")).split(/[\s\r]+/);y.splice(p*m*g+1);for(var x=Float32Array.from(y,parseFloat),w=0;w=this.size.x||e<0||e>=this.size.y||r<0||r>=this.size.z?-1:t*this.size.y*this.size.z+e*this.size.z+r}getVal(t,e,r){let n=this.getIndex(t,e,r);return n<0?0:this.data[n]}cube(t){var e=t.split(/\r?\n/);if(!(e.length<6)){var r=(0,a.CUBE)(t,{}).modelData[0].cryst,n=e[2].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),i=parseFloat(n[0]),o=Math.abs(i);this.origin=r.origin,this.size=r.size,this.unit=r.unit,this.matrix=r.matrix4;var s=6;i<0&&s++;var l=e.splice(o+s).join(" "),c=(l=l.replace(/^\s+/,"")).split(/[\s\r]+/);this.data=Float32Array.from(c,parseFloat)}}ccp4(t){var e={};t=new Int8Array(t);var r=new Int32Array(t.buffer,0,56),n=new Float32Array(t.buffer,0,56),o=new DataView(t.buffer);if(e.MAP=String.fromCharCode(o.getUint8(208),o.getUint8(209),o.getUint8(210),o.getUint8(211)),e.MACHST=[o.getUint8(212),o.getUint8(213)],17===e.MACHST[0]&&17===e.MACHST[1])for(var a=t.byteLength,s=0;s{"use strict";r.r(e),r.d(e,{GLVolumetricRender:()=>l});var n=r("./src/WebGL/shapes/index.ts"),i=r("./src/WebGL/math/index.ts"),o=r("./src/WebGL/index.ts"),a=r("./src/colors.ts"),s=r("./src/GLShape.ts");class l{static interpolateArray(t,e){function r(t,e,r){return t+(e-t)*r}var n=[],i=(t.length-1)/(e-1);n[0]=t[0];for(var o=1;o=0||t.getIndex(d,u,h)>=0)for(let e=s;e=0&&!r[s]&&(e-a.x)*(e-a.x)+(n-a.y)*(n-a.y)+(o-a.z)*(o-a.z){"use strict";r.r(e),r.d(e,{Camera:()=>o});var n=r("./src/WebGL/core/index.ts"),i=r("./src/WebGL/math/index.ts");class o extends n.Object3D{constructor(t=50,e=1,r=.1,n=2e3,o=!1){super(),this.projectionMatrix=new i.Matrix4,this.projectionMatrixInverse=new i.Matrix4,this.matrixWorldInverse=new i.Matrix4,this.fov=t,this.aspect=e,this.near=r,this.far=n;var a=this.position.z;this.right=a*Math.tan(Math.PI/180*t),this.left=-this.right,this.top=this.right/this.aspect,this.bottom=-this.top,this.ortho=!!o,this.updateProjectionMatrix()}lookAt(t){this.matrix.lookAt(this.position,t,this.up),this.rotationAutoUpdate&&(!1===this.useQuaternion&&this.rotation instanceof i.Vector3?this.rotation.setEulerFromRotationMatrix(this.matrix,this.eulerOrder):console.error("Unimplemented math operation."))}updateProjectionMatrix(){this.ortho?this.projectionMatrix.makeOrthographic(this.left,this.right,this.top,this.bottom,this.near,this.far):this.projectionMatrix.makePerspective(this.fov,this.aspect,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)}}},"./src/WebGL/Fog.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Fog:()=>i});var n=r("./src/colors.ts");class i{constructor(t,e=1,r=1e3){this.name="",this.color=new n.Color(t),this.near=e,this.far=r}clone(){return new i(this.color.getHex(),this.near,this.far)}}},"./src/WebGL/Renderer.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Renderer:()=>f});var n=r("./src/WebGL/Camera.ts"),i=r("./src/WebGL/constants/Sides.ts"),o=r("./src/WebGL/constants/TextureConstants.ts"),a=r("./src/WebGL/core/index.ts"),s=r("./src/colors.ts"),l=r("./src/WebGL/materials/index.ts"),c=r("./src/WebGL/math/index.ts"),d=r("./src/WebGL/objects/index.ts"),u=r("./src/WebGL/shaders/index.ts"),h=r("./src/WebGL/SpritePlugin.ts");class f{constructor(t){this.context=null,this.devicePixelRatio=1,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.autoUpdateObjects=!0,this.autoUpdateScene=!0,this.info={memory:{programs:0,geometries:0,textures:0},render:{calls:0,vertices:0,faces:0,points:0}},this._programs=[],this._programs_counter=0,this._webglversion=1,this._currentProgram=null,this._currentMaterialId=-1,this._currentGeometryGroupHash=null,this._currentCamera=null,this._geometryGroupCounter=0,this._oldDoubleSided=-1,this._oldFlipSided=-1,this._oldDepthTest=-1,this._oldDepthWrite=-1,this._oldPolygonOffset=null,this._oldLineWidth=null,this._viewportWidth=0,this._viewportHeight=0,this._currentWidth=0,this._currentHeight=0,this._enabledAttributes={},this._projScreenMatrix=new c.Matrix4,this._vector3=new c.Vector3,this._worldInverse=new c.Matrix4,this._projInverse=new c.Matrix4,this._textureMatrix=new c.Matrix4,this._direction=new c.Vector3,this._lightsNeedUpdate=!0,this._lights={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[],distances:[]},spot:{length:0,colors:[],positions:[],distances:[],directions:[],anglesCos:[],exponents:[]},hemi:{length:0,skyColors:[],groundColors:[],positions:[]}},this.sprites=new h.SpritePlugin,this._screenshader=null,this._vertexattribpos=null,this._screenQuadVBO=null,this._fb=null,this._targetTexture=null,this._depthTexture=null,t=t||{},this.row=t.row,this.col=t.col,this.rows=t.rows,this.cols=t.cols,this._canvas=void 0!==t.canvas?t.canvas:document.createElement("canvas"),this._precision=void 0!==t.precision?t.precision:"highp",this._alpha=void 0===t.alpha||t.alpha,this._premultipliedAlpha=void 0===t.premultipliedAlpha||t.premultipliedAlpha,this._antialias=void 0!==t.antialias&&t.antialias,this._stencil=void 0===t.stencil||t.stencil,this._preserveDrawingBuffer=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,this._clearColor=void 0!==t.clearColor?new s.Color(t.clearColor):new s.Color(0),this._clearAlpha=void 0!==t.clearAlpha?t.clearAlpha:0,this._outlineMaterial=new l.MeshOutlineMaterial(t.outline),this._outlineSphereImposterMaterial=new l.SphereImposterOutlineMaterial(t.outline),this._outlineStickImposterMaterial=new l.StickImposterOutlineMaterial(t.outline),this._outlineEnabled=!!t.outline,this.domElement=this._canvas,this._canvas.id=t.id,this.initGL(),this.setDefaultGLState(),this.context=this._gl,this.isWebGL1()?this._extInstanced=this._gl.getExtension("ANGLE_instanced_arrays"):this._extInstanced={vertexAttribDivisorANGLE:this._gl.vertexAttribDivisor.bind(this._gl),drawElementsInstancedANGLE:this._gl.drawElementsInstanced.bind(this._gl)},this._extFragDepth=this._gl.getExtension("EXT_frag_depth"),this._extFloatLinear=this._gl.getExtension("OES_texture_float_linear"),this._extColorBufferFloat=this._gl.getExtension("EXT_color_buffer_float"),this.sprites.init(this)}supportedExtensions(){return{supportsAIA:Boolean(this._extInstanced),supportsImposters:Boolean(this._extFragDepth)||!this.isWebGL1(),regen:!1}}getContext(){return this._gl}getCanvas(){return this._canvas}isLost(){return this._gl.isContextLost()}getPrecision(){return this._precision}setClearColorHex(t,e){this._clearColor.setHex(t),this._clearAlpha=e,this._gl.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearAlpha)}enableOutline(t){this._outlineMaterial=new l.MeshOutlineMaterial(t),this._outlineSphereImposterMaterial=new l.SphereImposterOutlineMaterial(t),this._outlineStickImposterMaterial=new l.StickImposterOutlineMaterial(t),this._outlineEnabled=!0}disableOutline(){this._outlineEnabled=!1}setViewport(){if(null!=this.rows&&null!=this.cols&&null!=this.row&&null!=this.col){var t=this._canvas.width/this.cols,e=this._canvas.height/this.rows;this._viewportWidth=t,this._viewportHeight=e,this._gl.enable(this._gl.SCISSOR_TEST),this._gl.scissor(t*this.col,e*this.row,t,e),this._gl.viewport(t*this.col,e*this.row,t,e)}}setSize(t,e){if(this.devicePixelRatio=void 0!==window.devicePixelRatio?window.devicePixelRatio:1,this._antialias&&this.devicePixelRatio<2&&(this.devicePixelRatio*=2),null!=this.rows&&null!=this.cols&&null!=this.row&&null!=this.col){var r=t/this.cols,n=e/this.rows;this._canvas.width=t*this.devicePixelRatio,this._canvas.height=e*this.devicePixelRatio,this._viewportWidth=r*this.devicePixelRatio,this._viewportHeight=n*this.devicePixelRatio,this._canvas.style.width=t+"px",this._canvas.style.height=e+"px",this.setViewport()}else this._viewportWidth=this._canvas.width=t*this.devicePixelRatio,this._viewportHeight=this._canvas.height=e*this.devicePixelRatio,this._canvas.style.width=t+"px",this._canvas.style.height=e+"px",this._gl.viewport(0,0,this._gl.drawingBufferWidth,this._gl.drawingBufferHeight);this.initFrameBuffer()}clear(t,e,r){var n=0;(void 0===t||t)&&(n|=this._gl.COLOR_BUFFER_BIT),(void 0===e||e)&&(n|=this._gl.DEPTH_BUFFER_BIT),(void 0===r||r)&&(n|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(n)}clearTarget(t,e,r){this.clear(t,e,r)}setMaterialFaces(t,e){var r=t.side===i.DoubleSide,n=t.side===i.BackSide;t.imposter||(n=e?!n:n),this._oldDoubleSided!==r&&(r?this._gl.disable(this._gl.CULL_FACE):this._gl.enable(this._gl.CULL_FACE),this._oldDoubleSided=r),this._oldFlipSided!==n&&(n?this._gl.frontFace(this._gl.CW):this._gl.frontFace(this._gl.CCW),this._oldFlipSided=n),this._gl.cullFace(this._gl.BACK)}setDepthTest(t){this._oldDepthTest!==t&&(t?this._gl.enable(this._gl.DEPTH_TEST):this._gl.disable(this._gl.DEPTH_TEST),this._oldDepthTest=t)}setDepthWrite(t){this._oldDepthWrite!==t&&(this._gl.depthMask(t),this._oldDepthWrite=t)}setBlending(t){t?(this._gl.enable(this._gl.BLEND),this._gl.blendEquationSeparate(this._gl.FUNC_ADD,this._gl.FUNC_ADD),this._gl.blendFuncSeparate(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA)):this._gl.disable(this._gl.BLEND)}initMaterial(t,e,r,n){var i,o;if(t.addEventListener("dispose",this.onMaterialDispose.bind(this)),o=t.shaderID){var a=u.ShaderLib[o];t.vertexShader=a.vertexShader,t.fragmentShader=a.fragmentShader,t.uniforms=u.ShaderUtils.clone(a.uniforms)}i={wireframe:t.wireframe,fragdepth:t.imposter,volumetric:t.volumetric},t.program=this.buildProgram(t.fragmentShader,t.vertexShader,t.uniforms,i)}renderBuffer(t,e,r,n,i,o){var a,s;if(n.visible&&(a=this.setProgram(t,e,r,n,o,this))){s=a.attributes;var l,c,u=!1,h=n.wireframe?1:0,f=16777215*i.id+2*a.id+h;if(f!==this._currentGeometryGroupHash&&(this._currentGeometryGroupHash=f,u=!0),u&&(this.disableAttributes(),s.position>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglVertexBuffer),this.enableAttribute(s.position),this._gl.vertexAttribPointer(s.position,3,this._gl.FLOAT,!1,0,0)),s.color>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglColorBuffer),this.enableAttribute(s.color),this._gl.vertexAttribPointer(s.color,3,this._gl.FLOAT,!1,0,0)),s.normal>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglNormalBuffer),this.enableAttribute(s.normal),this._gl.vertexAttribPointer(s.normal,3,this._gl.FLOAT,!1,0,0)),s.offset>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglOffsetBuffer),this.enableAttribute(s.offset),this._gl.vertexAttribPointer(s.offset,3,this._gl.FLOAT,!1,0,0)),s.radius>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglRadiusBuffer),this.enableAttribute(s.radius),this._gl.vertexAttribPointer(s.radius,1,this._gl.FLOAT,!1,0,0))),o instanceof d.Mesh){if("instanced"===n.shaderID){var p=n.sphere.geometryGroups[0];u&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglVertexBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,p.vertexArray,this._gl.STATIC_DRAW),this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglNormalBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,p.normalArray,this._gl.STATIC_DRAW),this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,i.__webglFaceBuffer),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,p.faceArray,this._gl.STATIC_DRAW)),l=p.faceidx,this._extInstanced.vertexAttribDivisorANGLE(s.offset,1),this._extInstanced.vertexAttribDivisorANGLE(s.radius,1),this._extInstanced.vertexAttribDivisorANGLE(s.color,1),this._extInstanced.drawElementsInstancedANGLE(this._gl.TRIANGLES,l,this._gl.UNSIGNED_SHORT,0,i.radiusArray.length),this._extInstanced.vertexAttribDivisorANGLE(s.offset,0),this._extInstanced.vertexAttribDivisorANGLE(s.radius,0),this._extInstanced.vertexAttribDivisorANGLE(s.color,0)}else n.wireframe?(c=i.lineidx,this.setLineWidth(n.wireframeLinewidth),u&&this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,i.__webglLineBuffer),this._gl.drawElements(this._gl.LINES,c,this._gl.UNSIGNED_SHORT,0)):(l=i.faceidx,u&&this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,i.__webglFaceBuffer),this._gl.drawElements(this._gl.TRIANGLES,l,this._gl.UNSIGNED_SHORT,0));this.info.render.calls++,this.info.render.vertices+=l,this.info.render.faces+=l/3}else o instanceof d.Line&&(c=i.vertices,this.setLineWidth(n.linewidth),this._gl.drawArrays(this._gl.LINES,0,c),this.info.render.calls++)}}render(t,e,r){if(e instanceof n.Camera!=0){var i,o,a,s,l,c=t.__lights,d=t.fog;this._currentMaterialId=-1,this._lightsNeedUpdate=!0,this.autoUpdateScene&&t.updateMatrixWorld(),void 0===e.parent&&e.updateMatrixWorld(),e.matrixWorldInverse.getInverse(e.matrixWorld),this._projScreenMatrix.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this.autoUpdateObjects&&this.initWebGLObjects(t),this.info.render.calls=0,this.info.render.vertices=0,this.info.render.faces=0,this.info.render.points=0,this._currentWidth=this._viewportWidth,this._currentHeight=this._viewportHeight,this.setViewport(),this.setFrameBuffer(),(this.autoClear||r)&&(this._gl.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearAlpha),this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil));var u=!1;for(i=0,o=(l=t.__webglObjects).length;i=0;--r)t[r].object===e&&t.splice(r,1)}removeInstancesDirect(t,e){for(var r=t.length-1;r>=0;--r)t[r]===e&&t.splice(r,1)}unrollBufferMaterial(t){var e=t.object.material;if(e.volumetric)t.opaque=null,t.transparent=null,t.volumetric=e;else if(e.transparent){if(t.opaque=null,t.volumetric=null,t.transparent=e,!e.wireframe){var r=e.clone();r.opacity=0,t.blank=r}}else t.opaque=e,t.transparent=null,t.volumetric=null}setBuffers(t,e){var r=t.vertexArray,n=t.colorArray;if(void 0!==t.__webglOffsetBuffer?(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglOffsetBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,r,e)):(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglVertexBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,r,e)),this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglColorBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,n,e),t.normalArray&&void 0!==t.__webglNormalBuffer){var i=t.normalArray;this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglNormalBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,i,e)}if(t.radiusArray&&void 0!==t.__webglRadiusBuffer&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglRadiusBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,t.radiusArray,e)),t.faceArray&&void 0!==t.__webglFaceBuffer){var o=t.faceArray;this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,t.__webglFaceBuffer),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,o,e)}if(t.lineArray&&void 0!==t.__webglLineBuffer){var a=t.lineArray;this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,t.__webglLineBuffer),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,a,e)}}createMeshBuffers(t){t.radiusArray&&(t.__webglRadiusBuffer=this._gl.createBuffer()),t.useOffset&&(t.__webglOffsetBuffer=this._gl.createBuffer()),t.__webglVertexBuffer=this._gl.createBuffer(),t.__webglNormalBuffer=this._gl.createBuffer(),t.__webglColorBuffer=this._gl.createBuffer(),t.__webglFaceBuffer=this._gl.createBuffer(),t.__webglLineBuffer=this._gl.createBuffer(),this.info.memory.geometries++}createLineBuffers(t){t.__webglVertexBuffer=this._gl.createBuffer(),t.__webglColorBuffer=this._gl.createBuffer(),this.info.memory.geometries++}addBuffer(t,e,r){t.push({buffer:e,object:r,opaque:null,transparent:null})}setupMatrices(t,e){t._modelViewMatrix.multiplyMatrices(e.matrixWorldInverse,t.matrixWorld),t._normalMatrix.getInverse(t._modelViewMatrix),t._normalMatrix.transpose()}filterFallback(t){return this._gl.LINEAR}setTextureParameters(t,e){t==this._gl.TEXTURE_2D?(this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(t,this._gl.TEXTURE_MAG_FILTER,this.filterFallback(e.magFilter)),this._gl.texParameteri(t,this._gl.TEXTURE_MIN_FILTER,this.filterFallback(e.minFilter))):(this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_R,this._gl.CLAMP_TO_EDGE),this._extColorBufferFloat&&this._extFloatLinear?(this._gl.texParameteri(t,this._gl.TEXTURE_MAG_FILTER,this._gl.LINEAR),this._gl.texParameteri(t,this._gl.TEXTURE_MIN_FILTER,this._gl.LINEAR)):(this._gl.texParameteri(t,this._gl.TEXTURE_MAG_FILTER,this._gl.NEAREST),this._gl.texParameteri(t,this._gl.TEXTURE_MIN_FILTER,this._gl.NEAREST)))}paramToGL(t){return t===o.UnsignedByteType?this._gl.UNSIGNED_BYTE:t===o.RGBAFormat?this._gl.RGBA:t===o.NearestFilter?this._gl.NEAREST:0}setupLights(t,e){var r,n,i,o,s,l=this._lights,c=l.directional.colors,d=l.directional.positions,u=0,h=0;for(r=0,n=e.length;r{"use strict";r.r(e),r.d(e,{SpritePlugin:()=>i});var n=r("./src/WebGL/shaders/index.ts");class i{constructor(){this.sprite={vertices:null,faces:null,vertexBuffer:null,elementBuffer:null,program:null,attributes:{},uniforms:null}}init(t){this.gl=t.context,this.renderer=t,this.precision=t.getPrecision(),this.sprite.vertices=new Float32Array(16),this.sprite.faces=new Uint16Array(6);var e=0;this.sprite.vertices[e++]=-1,this.sprite.vertices[e++]=-1,this.sprite.vertices[e++]=0,this.sprite.vertices[e++]=0,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=-1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=0,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=-1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=0,this.sprite.vertices[e++]=1,e=0,this.sprite.faces[e++]=0,this.sprite.faces[e++]=1,this.sprite.faces[e++]=2,this.sprite.faces[e++]=0,this.sprite.faces[e++]=2,this.sprite.faces[e++]=3,this.sprite.vertexBuffer=this.gl.createBuffer(),this.sprite.elementBuffer=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.sprite.vertexBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,this.sprite.vertices,this.gl.STATIC_DRAW),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.sprite.elementBuffer),this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,this.sprite.faces,this.gl.STATIC_DRAW),this.sprite.program=this.createProgram(n.ShaderLib.sprite,this.precision||1),this.sprite.attributes={};const r={};this.sprite.attributes.position=this.gl.getAttribLocation(this.sprite.program,"position"),this.sprite.attributes.uv=this.gl.getAttribLocation(this.sprite.program,"uv"),r.uvOffset=this.gl.getUniformLocation(this.sprite.program,"uvOffset"),r.uvScale=this.gl.getUniformLocation(this.sprite.program,"uvScale"),r.rotation=this.gl.getUniformLocation(this.sprite.program,"rotation"),r.scale=this.gl.getUniformLocation(this.sprite.program,"scale"),r.alignment=this.gl.getUniformLocation(this.sprite.program,"alignment"),r.color=this.gl.getUniformLocation(this.sprite.program,"color"),r.map=this.gl.getUniformLocation(this.sprite.program,"map"),r.opacity=this.gl.getUniformLocation(this.sprite.program,"opacity"),r.useScreenCoordinates=this.gl.getUniformLocation(this.sprite.program,"useScreenCoordinates"),r.screenPosition=this.gl.getUniformLocation(this.sprite.program,"screenPosition"),r.modelViewMatrix=this.gl.getUniformLocation(this.sprite.program,"modelViewMatrix"),r.projectionMatrix=this.gl.getUniformLocation(this.sprite.program,"projectionMatrix"),r.fogType=this.gl.getUniformLocation(this.sprite.program,"fogType"),r.fogDensity=this.gl.getUniformLocation(this.sprite.program,"fogDensity"),r.fogNear=this.gl.getUniformLocation(this.sprite.program,"fogNear"),r.fogFar=this.gl.getUniformLocation(this.sprite.program,"fogFar"),r.fogColor=this.gl.getUniformLocation(this.sprite.program,"fogColor"),r.alphaTest=this.gl.getUniformLocation(this.sprite.program,"alphaTest"),this.sprite.uniforms=r}render(t,e,r,n,i){var a,s,l,c,d,u,h,f,p,m;if(!this.gl)throw new Error("WebGLRenderer not initialized");let g=[];null===(a=null==t?void 0:t.__webglSprites)||void 0===a||a.forEach((t=>{(i&&0==t.material.depthTest||!i&&t.material.depthTest)&&g.push(t)}));let v=g.length;if(!v)return;const b=this.sprite.attributes,y=this.sprite.uniforms;if(!y)throw new Error("Uniforms not defined");var x=.5*r,w=.5*n;this.gl.useProgram(this.sprite.program),this.gl.enableVertexAttribArray(b.position),this.gl.enableVertexAttribArray(b.uv),this.gl.disable(this.gl.CULL_FACE),this.gl.enable(this.gl.BLEND),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.sprite.vertexBuffer),this.gl.vertexAttribPointer(b.position,2,this.gl.FLOAT,!1,16,0),this.gl.vertexAttribPointer(b.uv,2,this.gl.FLOAT,!1,16,8),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.sprite.elementBuffer),this.gl.uniformMatrix4fv(y.projectionMatrix,!1,e.projectionMatrix.elements),this.gl.activeTexture(this.gl.TEXTURE0),this.gl.uniform1i(y.map,0);var _,k=0,A=0,T=t.fog;let M,S,C,E;T?(this.gl.uniform3f(y.fogColor,T.color.r,T.color.g,T.color.b),this.gl.uniform1f(y.fogNear,T.near),this.gl.uniform1f(y.fogFar,T.far),this.gl.uniform1i(y.fogType,1),k=1,A=1):(this.gl.uniform1i(y.fogType,0),k=0,A=0);let L=[];for(_=0;_{"use strict";var n;r.r(e),r.d(e,{Coloring:()=>n}),function(t){t[t.NoColors=0]="NoColors",t[t.FaceColors=1]="FaceColors",t[t.VertexColors=2]="VertexColors"}(n||(n={}))},"./src/WebGL/constants/Shading.ts":(t,e,r)=>{"use strict";var n;r.r(e),r.d(e,{Shading:()=>n}),function(t){t[t.NoShading=0]="NoShading",t[t.FlatShading=1]="FlatShading",t[t.SmoothShading=2]="SmoothShading"}(n||(n={}))},"./src/WebGL/constants/Sides.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BackSide:()=>i,DoubleSide:()=>o,FrontSide:()=>n});const n=0,i=1,o=2},"./src/WebGL/constants/SpriteAlignment.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SpriteAlignment:()=>i});var n=r("./src/WebGL/math/index.ts");const i={topLeft:new n.Vector2(1,-1),topCenter:new n.Vector2(0,-1),topRight:new n.Vector2(-1,-1),centerLeft:new n.Vector2(1,0),center:new n.Vector2(0,0),centerRight:new n.Vector2(-1,0),bottomLeft:new n.Vector2(1,1),bottomCenter:new n.Vector2(0,1),bottomRight:new n.Vector2(-1,1)}},"./src/WebGL/constants/TextureConstants.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ClampToEdgeWrapping:()=>n,FloatType:()=>l,LinearFilter:()=>i,LinearMipMapLinearFilter:()=>a,NearestFilter:()=>o,R32Format:()=>u,RFormat:()=>d,RGBAFormat:()=>c,UnsignedByteType:()=>s});const n=1001,i=1006,o=1007,a=1008,s=1009,l=1010,c=1021,d=1022,u=1023},"./src/WebGL/constants/TextureOperations.ts":(t,e,r)=>{"use strict";var n;r.r(e),r.d(e,{TextureOperations:()=>n}),function(t){t[t.MultiplyOperation=0]="MultiplyOperation",t[t.MixOperation=1]="MixOperation",t[t.AddOperation=2]="AddOperation"}(n||(n={}))},"./src/WebGL/constants/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BackSide:()=>i.BackSide,ClampToEdgeWrapping:()=>s.ClampToEdgeWrapping,Coloring:()=>n.Coloring,DoubleSide:()=>i.DoubleSide,FloatType:()=>s.FloatType,FrontSide:()=>i.FrontSide,LinearFilter:()=>s.LinearFilter,LinearMipMapLinearFilter:()=>s.LinearMipMapLinearFilter,NearestFilter:()=>s.NearestFilter,R32Format:()=>s.R32Format,RFormat:()=>s.RFormat,RGBAFormat:()=>s.RGBAFormat,Shading:()=>o.Shading,SpriteAlignment:()=>a.SpriteAlignment,TextureOperations:()=>l.TextureOperations,UnsignedByteType:()=>s.UnsignedByteType});var n=r("./src/WebGL/constants/Coloring.ts"),i=r("./src/WebGL/constants/Sides.ts"),o=r("./src/WebGL/constants/Shading.ts"),a=r("./src/WebGL/constants/SpriteAlignment.ts"),s=r("./src/WebGL/constants/TextureConstants.ts"),l=r("./src/WebGL/constants/TextureOperations.ts")},"./src/WebGL/core/EventDispatcher.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{EventDispatcher:()=>n});class n{constructor(){this.listeners={}}dispatchEvent(t){var e=this.listeners[t.type];if(void 0!==e){t.target=this;for(var r=0,n=e.length;r{"use strict";r.r(e),r.d(e,{Geometry:()=>l,GeometryGroup:()=>s,GeometryIDCount:()=>c});var n=r("./src/WebGL/materials/LineBasicMaterial.ts"),i=r("./src/WebGL/core/EventDispatcher.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/colors.ts");class s{constructor(t=0){this.vertexArray=null,this.colorArray=null,this.normalArray=null,this.radiusArray=null,this.faceArray=null,this.lineArray=null,this.vertices=0,this.faceidx=0,this.lineidx=0,this.__inittedArrays=!1,this.id=t}setColors(t){var e=this.vertexArray,r=this.colorArray;if(!e)throw new Error("vertex array not initialized");if(!r)throw new Error("color array not initialized");if(e.length==r.length)for(var n=0;n0?this.lineArray=(null==a?void 0:a.subarray(0,this.lineidx))||null:this.lineArray=new Uint16Array(0)):(this.normalArray=new Float32Array(0),this.faceArray=new Uint16Array(0),this.lineArray=new Uint16Array(0)),s&&(this.radiusArray=s.subarray(0,this.vertices)),e&&(this.normalArray&&(this.normalArray=new Float32Array(this.normalArray)),this.faceArray&&(this.faceArray=new Uint16Array(this.faceArray)),this.lineArray&&(this.lineArray=new Uint16Array(this.lineArray)),this.vertexArray&&(this.vertexArray=new Float32Array(this.vertexArray)),this.colorArray&&(this.colorArray=new Float32Array(this.colorArray)),this.radiusArray&&(this.radiusArray=new Float32Array(this.radiusArray))),this.__inittedArrays=!0}}class l extends i.EventDispatcher{constructor(t=!1,e=!1,r=!1){super(),this.name="",this.hasTangents=!1,this.dynamic=!0,this.verticesNeedUpdate=!1,this.elementsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.buffersNeedUpdate=!1,this.imposter=!1,this.instanced=!1,this.geometryGroups=[],this.groups=0,this.id=c++,this.mesh=t,this.radii=e,this.offset=r}updateGeoGroup(t=0){var e,r=this.groups>0?this.geometryGroups[this.groups-1]:null;return(!r||r.vertices+t>((null===(e=null==r?void 0:r.vertexArray)||void 0===e?void 0:e.length)||0)/3)&&(r=this.addGeoGroup()),r}vrml(t,e){for(var r="",n=this.geometryGroups.length,i=0;i{"use strict";r.r(e),r.d(e,{Light:()=>l,Object3D:()=>a,Object3DIDCount:()=>o,Scene:()=>s});var n=r("./src/WebGL/math/index.ts"),i=r("./src/colors.ts");let o=0;class a{constructor(){this.id=o++,this.name="",this.children=[],this.position=new n.Vector3,this.rotation=new n.Vector3,this.matrix=new n.Matrix4,this.matrixWorld=new n.Matrix4,this.quaternion=new n.Quaternion,this.eulerOrder="XYZ",this.up=new n.Vector3(0,1,0),this.scale=new n.Vector3(1,1,1),this.matrixAutoUpdate=!0,this.matrixWorldNeedsUpdate=!0,this.rotationAutoUpdate=!0,this.useQuaternion=!1,this.visible=!0}lookAt(t){this.matrix.lookAt(t,this.position,this.up),this.rotationAutoUpdate&&(!0===this.useQuaternion?console.error("Unimplemented math operation."):this.rotation instanceof n.Vector3&&this.rotation.setEulerFromRotationMatrix(this.matrix,this.eulerOrder))}add(t){if(t!==this){t.parent=this,this.children.push(t);for(var e=this;void 0!==e.parent;)e=e.parent;void 0!==e&&e instanceof s&&e.__addObject(t)}else console.error("Can't add $3Dmol.Object3D to itself")}remove(t){var e=this.children.indexOf(t);if(-1!==e){t.parent=void 0,this.children.splice(e,1);for(var r=this;void 0!==r.parent;)r=r.parent;void 0!==r&&r instanceof s&&r.__removeObject(t)}}vrml(t){t||(t=" ");var e=2*Math.atan2(this.quaternion.lengthxyz(),this.quaternion.w),r=0,n=0,i=0;if(0!=e){let t=Math.sin(e/2);r=this.quaternion.x/t,n=this.quaternion.y/t,i=this.quaternion.z/t}var o=t+"Transform {\n"+t+" center "+this.position.x+" "+this.position.y+" "+this.position.z+"\n"+t+" rotation "+r+" "+n+" "+i+" "+e+"\n"+t+" children [\n";this.geometry&&(o+=this.geometry.vrml(t,this.material));for(var a=0;a{"use strict";r.r(e),r.d(e,{Projector:()=>i});const n=new(r("./src/WebGL/math/index.ts").Matrix4);class i{static unprojectVector(t,e){return e.projectionMatrixInverse.getInverse(e.projectionMatrix),n.multiplyMatrices(e.matrixWorld,e.projectionMatrixInverse),t.applyProjection(n)}static projectVector(t,e){return e.matrixWorldInverse.getInverse(e.matrixWorld),n.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),t.applyProjection(n)}projectVector(t,e){return i.projectVector(t,e)}unprojectVector(t,e){return i.unprojectVector(t,e)}}},"./src/WebGL/core/Raycaster.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Raycaster:()=>s,intersectObject:()=>v});var n=r("./src/WebGL/math/index.ts"),i=r("./src/WebGL/shapes/index.ts");const o=(t,e)=>t.distance-e.distance,a=new n.Matrix4;class s{constructor(t,e,r,i){this.precision=1e-4,this.linePrecision=.2,this.ray=new n.Ray(t,e),this.ray.direction.lengthSq()>0&&this.ray.direction.normalize(),this.near=i||0,this.far=r||1/0}set(t,e){this.ray.set(t,e)}setFromCamera(t,e){e.ortho?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,t.z),e.projectionMatrixInverse.getInverse(e.projectionMatrix),a.multiplyMatrices(e.matrixWorld,e.projectionMatrixInverse),this.ray.direction.applyProjection(a),this.ray.direction.sub(this.ray.origin).normalize())}intersectObjects(t,e){for(var r=[],n=0,i=e.length;nMath.min(Math.max(t,-1),1);var c=new i.Sphere,d=new i.Cylinder,u=new i.Triangle,h=new n.Vector3,f=new n.Vector3,p=new n.Vector3,m=new n.Vector3,g=new n.Vector3;function v(t,e,r,n){if(g.getPositionFromMatrix(t.matrixWorld),void 0===e.intersectionShape)return n;var o,a,s,v,b,y,x,w,_,k,A,T,M,S,C=e.intersectionShape,E=r.linePrecision,L=(E*=t.matrixWorld.getMaxScaleOnAxis())*E;if(void 0!==e.boundingSphere&&e.boundingSphere instanceof i.Sphere&&(c.copy(e.boundingSphere),c.applyMatrix4(t.matrixWorld),!r.ray.isIntersectionSphere(c)))return n;for(o=0,a=C.triangle.length;o=0)continue;if(h.subVectors(u.a,r.ray.origin),(x=s.dot(h)/v)<0)continue;f.copy(r.ray.direction).multiplyScalar(x).add(r.ray.origin),f.sub(u.a),p.copy(u.b).sub(u.a),m.copy(u.c).sub(u.a);var z=p.dot(m),O=p.lengthSq(),D=m.lengthSq();if((T=(O*f.dot(m)-z*f.dot(p))/(O*D-z*z))<0||T>1)continue;if((A=(f.dot(p)-T*z)/O)<0||A>1||A+T>1)continue;n.push({clickable:e,distance:x})}for(o=0,a=C.cylinder.length;od.lengthSq()||T<0)continue;n.push({clickable:e,distance:x})}}for(o=0,a=C.line.length;o{"use strict";r.r(e),r.d(e,{Texture:()=>s,TextureIdCount:()=>l});var n=r("./src/WebGL/constants/TextureConstants.ts"),i=r("./src/WebGL/math/index.ts"),o=r("./src/WebGL/core/EventDispatcher.ts"),a=r("./src/WebGL/core/UVMapping.ts");class s extends o.EventDispatcher{constructor(t,e){super(),this.id=l++,this.name="",this.image=t,this.mapping=new a.UVMapping,this.wrapS=n.ClampToEdgeWrapping,this.wrapT=n.ClampToEdgeWrapping,this.anisotropy=1,e?(this.format=n.RFormat,this.type=n.FloatType,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.magFilter=n.NearestFilter,this.minFilter=n.NearestFilter):(this.format=n.RGBAFormat,this.type=n.UnsignedByteType,this.offset=new i.Vector2(0,0),this.repeat=new i.Vector2(1,1),this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.magFilter=n.LinearFilter,this.minFilter=n.LinearMipMapLinearFilter),this.needsUpdate=!1,this.onUpdate=null}clone(t=new s){return t.image=this.image,t.mapping=this.mapping,t.wrapS=this.wrapS,t.wrapT=this.wrapT,t.magFilter=this.magFilter,t.minFilter=this.minFilter,t.anisotropy=this.anisotropy,t.format=this.format,t.type=this.type,t.offset.copy(this.offset),t.repeat.copy(this.repeat),t.premultiplyAlpha=this.premultiplyAlpha,t.flipY=this.flipY,t.unpackAlignment=this.unpackAlignment,t}dispose(){this.dispatchEvent({type:"dispose"})}}let l=0},"./src/WebGL/core/UVMapping.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{UVMapping:()=>n});class n{}},"./src/WebGL/core/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{EventDispatcher:()=>n.EventDispatcher,Geometry:()=>i.Geometry,GeometryGroup:()=>i.GeometryGroup,GeometryIDCount:()=>i.GeometryIDCount,Light:()=>o.Light,Object3D:()=>o.Object3D,Object3DIDCount:()=>o.Object3DIDCount,Projector:()=>a.Projector,Raycaster:()=>s.Raycaster,Scene:()=>o.Scene,Texture:()=>l.Texture,TextureIdCount:()=>l.TextureIdCount,UVMapping:()=>c.UVMapping,intersectObject:()=>s.intersectObject});var n=r("./src/WebGL/core/EventDispatcher.ts"),i=r("./src/WebGL/core/Geometry.ts"),o=r("./src/WebGL/core/Object3D.ts"),a=r("./src/WebGL/core/Projector.ts"),s=r("./src/WebGL/core/Raycaster.ts"),l=r("./src/WebGL/core/Texture.ts"),c=r("./src/WebGL/core/UVMapping.ts")},"./src/WebGL/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BackSide:()=>n.BackSide,Camera:()=>d.Camera,ClampToEdgeWrapping:()=>n.ClampToEdgeWrapping,Coloring:()=>n.Coloring,Cylinder:()=>c.Cylinder,DoubleSide:()=>n.DoubleSide,EventDispatcher:()=>i.EventDispatcher,FloatType:()=>n.FloatType,Fog:()=>u.Fog,FrontSide:()=>n.FrontSide,Geometry:()=>i.Geometry,GeometryGroup:()=>i.GeometryGroup,GeometryIDCount:()=>i.GeometryIDCount,ImposterMaterial:()=>o.ImposterMaterial,InstancedMaterial:()=>o.InstancedMaterial,Light:()=>i.Light,Line:()=>s.Line,LineBasicMaterial:()=>o.LineBasicMaterial,LineStyle:()=>s.LineStyle,LinearFilter:()=>n.LinearFilter,LinearMipMapLinearFilter:()=>n.LinearMipMapLinearFilter,Material:()=>o.Material,MaterialIdCount:()=>o.MaterialIdCount,Matrix3:()=>a.Matrix3,Matrix4:()=>a.Matrix4,Mesh:()=>s.Mesh,MeshDoubleLambertMaterial:()=>o.MeshDoubleLambertMaterial,MeshLambertMaterial:()=>o.MeshLambertMaterial,MeshOutlineMaterial:()=>o.MeshOutlineMaterial,NearestFilter:()=>n.NearestFilter,Object3D:()=>i.Object3D,Object3DIDCount:()=>i.Object3DIDCount,Projector:()=>i.Projector,Quaternion:()=>a.Quaternion,R32Format:()=>n.R32Format,RFormat:()=>n.RFormat,RGBAFormat:()=>n.RGBAFormat,Ray:()=>a.Ray,Raycaster:()=>i.Raycaster,Renderer:()=>h.Renderer,Scene:()=>i.Scene,ShaderLib:()=>l.ShaderLib,ShaderUtils:()=>l.ShaderUtils,Shading:()=>n.Shading,Sphere:()=>c.Sphere,SphereImposterMaterial:()=>o.SphereImposterMaterial,SphereImposterOutlineMaterial:()=>o.SphereImposterOutlineMaterial,Sprite:()=>s.Sprite,SpriteAlignment:()=>n.SpriteAlignment,SpriteMaterial:()=>o.SpriteMaterial,SpritePlugin:()=>f.SpritePlugin,StickImposterMaterial:()=>o.StickImposterMaterial,StickImposterOutlineMaterial:()=>o.StickImposterOutlineMaterial,Texture:()=>i.Texture,TextureIdCount:()=>i.TextureIdCount,TextureOperations:()=>n.TextureOperations,Triangle:()=>c.Triangle,UVMapping:()=>i.UVMapping,UnsignedByteType:()=>n.UnsignedByteType,Vector2:()=>a.Vector2,Vector3:()=>a.Vector3,VolumetricMaterial:()=>o.VolumetricMaterial,basic:()=>l.basic,clamp:()=>a.clamp,clone:()=>l.clone,conversionMatrix3:()=>a.conversionMatrix3,degToRad:()=>a.degToRad,instanced:()=>l.instanced,intersectObject:()=>i.intersectObject,lambert:()=>l.lambert,lambertdouble:()=>l.lambertdouble,outline:()=>l.outline,screen:()=>l.screen,screenaa:()=>l.screenaa,sphereimposter:()=>l.sphereimposter,sphereimposteroutline:()=>l.sphereimposteroutline,sprite:()=>l.sprite,stickimposter:()=>l.stickimposter,stickimposteroutline:()=>l.stickimposteroutline,volumetric:()=>l.volumetric});var n=r("./src/WebGL/constants/index.ts"),i=r("./src/WebGL/core/index.ts"),o=r("./src/WebGL/materials/index.ts"),a=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/objects/index.ts"),l=r("./src/WebGL/shaders/index.ts"),c=r("./src/WebGL/shapes/index.ts"),d=r("./src/WebGL/Camera.ts"),u=r("./src/WebGL/Fog.ts"),h=r("./src/WebGL/Renderer.ts"),f=r("./src/WebGL/SpritePlugin.ts")},"./src/WebGL/materials/ImposterMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ImposterMaterial:()=>l});var n=r("./src/WebGL/constants/Coloring.ts"),i=r("./src/WebGL/constants/Shading.ts"),o=r("./src/colors.ts"),a=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/materials/Material.ts");class l extends s.Material{constructor(t){super(),this.color=new o.Color(16777215),this.ambient=new o.Color(1048575),this.emissive=new o.Color(0),this.imposter=!0,this.wrapAround=!1,this.wrapRGB=new a.Vector3(1,1,1),this.map=void 0,this.lightMap=null,this.specularMap=null,this.envMap=null,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.shading=i.Shading.SmoothShading,this.shaderID=null,this.vertexColors=n.Coloring.NoColors,this.skinning=!1,this.setValues(t)}clone(t=new l){return super.clone.call(this,t),t.color.copy(this.color),t.ambient.copy(this.ambient),t.emissive.copy(this.emissive),t.wrapAround=this.wrapAround,t.wrapRGB.copy(this.wrapRGB),t.map=this.map,t.lightMap=this.lightMap,t.specularMap=this.specularMap,t.envMap=this.envMap,t.combine=this.combine,t.reflectivity=this.reflectivity,t.refractionRatio=this.refractionRatio,t.fog=this.fog,t.shading=this.shading,t.shaderID=this.shaderID,t.vertexColors=this.vertexColors,t.skinning=this.skinning,t.morphTargets=this.morphTargets,t.morphNormals=this.morphNormals,t}}},"./src/WebGL/materials/InstancedMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{InstancedMaterial:()=>l});var n=r("./src/WebGL/constants/Coloring.ts"),i=r("./src/WebGL/constants/Shading.ts"),o=r("./src/colors.ts"),a=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/materials/Material.ts");class l extends s.Material{constructor(t){super(),this.color=new o.Color(16777215),this.ambient=new o.Color(1048575),this.emissive=new o.Color(0),this.wrapAround=!1,this.wrapRGB=new a.Vector3(1,1,1),this.map=void 0,this.lightMap=null,this.specularMap=null,this.envMap=null,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.shading=i.Shading.SmoothShading,this.shaderID="instanced",this.vertexColors=n.Coloring.NoColors,this.skinning=!1,this.sphere=null,this.setValues(t)}clone(t=new l){return super.clone.call(this,t),t.color.copy(this.color),t.ambient.copy(this.ambient),t.emissive.copy(this.emissive),t.wrapAround=this.wrapAround,t.wrapRGB.copy(this.wrapRGB),t.map=this.map,t.lightMap=this.lightMap,t.specularMap=this.specularMap,t.envMap=this.envMap,t.combine=this.combine,t.reflectivity=this.reflectivity,t.refractionRatio=this.refractionRatio,t.fog=this.fog,t.shading=this.shading,t.shaderID=this.shaderID,t.vertexColors=this.vertexColors,t.skinning=this.skinning,t.morphTargets=this.morphTargets,t.morphNormals=this.morphNormals,t.sphere=this.sphere,t}}},"./src/WebGL/materials/LineBasicMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{LineBasicMaterial:()=>o});var n=r("./src/colors.ts"),i=r("./src/WebGL/materials/Material.ts");class o extends i.Material{constructor(t){super(),this.color=new n.Color(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.vertexColors=!1,this.fog=!0,this.shaderID="basic",this.setValues(t)}clone(t=new o){return super.clone.call(this,t),t.color.copy(this.color),t}}},"./src/WebGL/materials/Material.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Material:()=>s,MaterialIdCount:()=>l});var n=r("./src/WebGL/constants/Sides.ts"),i=r("./src/WebGL/core/index.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/colors.ts");class s extends i.EventDispatcher{constructor(){super(...arguments),this.id=l++,this.name="",this.side=n.FrontSide,this.opacity=1,this.transparent=!1,this.depthTest=!0,this.depthWrite=!0,this.stencilTest=!0,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.alphaTest=0,this.visible=!0,this.needsUpdate=!0,this.outline=!1,this.wireframe=!1}setValues(t={}){if(void 0!==t)for(var e in t){var r=t[e];if(void 0!==r){if(e in this){var n=this[e];n instanceof a.Color&&r instanceof a.Color?n.copy(r):n instanceof a.Color?n.set(r):n instanceof o.Vector3&&r instanceof o.Vector3?n.copy(r):this[e]=r}}else console.warn("$3Dmol.Material: '"+e+"' parameter is undefined.")}}clone(t=new s){return t.name=this.name,t.side=this.side,t.opacity=this.opacity,t.transparent=this.transparent,t.depthTest=this.depthTest,t.depthWrite=this.depthWrite,t.stencilTest=this.stencilTest,t.polygonOffset=this.polygonOffset,t.polygonOffsetFactor=this.polygonOffsetFactor,t.polygonOffsetUnits=this.polygonOffsetUnits,t.alphaTest=this.alphaTest,t.overdraw=this.overdraw,t.visible=this.visible,t}dispose(){this.dispatchEvent({type:"dispose"})}}let l=0},"./src/WebGL/materials/MeshDoubleLambertMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{MeshDoubleLambertMaterial:()=>o});var n=r("./src/WebGL/constants/Sides.ts"),i=r("./src/WebGL/materials/MeshLambertMaterial.ts");class o extends i.MeshLambertMaterial{constructor(t){super(t),this.shaderID="lambertdouble",this.side=n.DoubleSide,this.outline=!1}clone(t=new o){return super.clone.call(this,t),t}}},"./src/WebGL/materials/MeshLambertMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{MeshLambertMaterial:()=>l});var n=r("./src/WebGL/constants/Coloring.ts"),i=r("./src/WebGL/constants/Shading.ts"),o=r("./src/WebGL/materials/Material.ts"),a=r("./src/colors.ts"),s=r("./src/WebGL/math/index.ts");class l extends o.Material{constructor(t){super(),this.color=new a.Color(16777215),this.ambient=new a.Color(1048575),this.emissive=new a.Color(0),this.wrapAround=!1,this.wrapRGB=new s.Vector3(1,1,1),this.map=void 0,this.lightMap=null,this.specularMap=null,this.envMap=null,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.shading=i.Shading.SmoothShading,this.shaderID="lambert",this.vertexColors=n.Coloring.NoColors,this.skinning=!1,this.setValues(t)}clone(t=new l){return super.clone.call(this,t),t.color.copy(this.color),t.ambient.copy(this.ambient),t.emissive.copy(this.emissive),t.wrapAround=this.wrapAround,t.wrapRGB.copy(this.wrapRGB),t.map=this.map,t.lightMap=this.lightMap,t.specularMap=this.specularMap,t.envMap=this.envMap,t.combine=this.combine,t.reflectivity=this.reflectivity,t.refractionRatio=this.refractionRatio,t.fog=this.fog,t.shading=this.shading,t.shaderID=this.shaderID,t.vertexColors=this.vertexColors,t.skinning=this.skinning,t.morphTargets=this.morphTargets,t.morphNormals=this.morphNormals,t}}},"./src/WebGL/materials/MeshOutlineMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{MeshOutlineMaterial:()=>o});var n=r("./src/colors.ts"),i=r("./src/WebGL/materials/Material.ts");class o extends i.Material{constructor(t){super(),t=t||{},this.fog=!0,this.shaderID="outline",this.wireframe=!1,this.outlineColor=t.color||new n.Color(0,0,0),this.outlineWidth=t.width||.1,this.outlinePushback=t.pushback||1}clone(t=new o){return super.clone.call(this,t),t.fog=this.fog,t.shaderID=this.shaderID,t.wireframe=this.wireframe,t}}},"./src/WebGL/materials/SphereImposterMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SphereImposterMaterial:()=>i});var n=r("./src/WebGL/materials/ImposterMaterial.ts");class i extends n.ImposterMaterial{constructor(t){super(t),this.shaderID="sphereimposter",this.setValues(t)}clone(t=new i){return super.clone.call(this,t),t}}},"./src/WebGL/materials/SphereImposterOutlineMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SphereImposterOutlineMaterial:()=>o});var n=r("./src/colors.ts"),i=r("./src/WebGL/materials/ImposterMaterial.ts");class o extends i.ImposterMaterial{constructor(t){super(t),t=t||{},this.shaderID="sphereimposteroutline",this.outlineColor=t.color||new n.Color(0,0,0),this.outlineWidth=t.width||.1,this.outlinePushback=t.pushback||1,this.setValues(t)}clone(t=new o){return super.clone.call(this,t),t.outlineColor=this.outlineColor,t.outlineWidth=this.outlineWidth,t.outlinePushback=this.outlinePushback,t}}},"./src/WebGL/materials/SpriteMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SpriteMaterial:()=>l});var n=r("./src/WebGL/constants/SpriteAlignment.ts"),i=r("./src/WebGL/core/Texture.ts"),o=r("./src/colors.ts"),a=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/materials/Material.ts");class l extends s.Material{constructor(t){super(),this.color=new o.Color(16777215),this.map=new i.Texture,this.useScreenCoordinates=!0,this.fog=!1,this.uvOffset=new a.Vector2(0,0),this.uvScale=new a.Vector2(1,1),this.depthTest=!this.useScreenCoordinates,this.sizeAttenuation=!this.useScreenCoordinates,this.screenOffset=this.screenOffset,this.scaleByViewPort=!this.sizeAttenuation,this.alignment=n.SpriteAlignment.center.clone(),this.setValues(t),void 0===(t=t||{}).depthTest&&(this.depthTest=!this.useScreenCoordinates),void 0===t.sizeAttenuation&&(this.sizeAttenuation=!this.useScreenCoordinates),void 0===t.scaleByViewPort&&(this.scaleByViewPort=!this.sizeAttenuation)}clone(t=new l){return super.clone.call(this,t),t.color.copy(this.color),t.map=this.map,t.useScreenCoordinates=this.useScreenCoordinates,t.screenOffset=this.screenOffset,t.sizeAttenuation=this.sizeAttenuation,t.scaleByViewport=this.scaleByViewPort,t.alignment.copy(this.alignment),t.uvOffset.copy(this.uvOffset),t}}},"./src/WebGL/materials/StickImposterMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{StickImposterMaterial:()=>i});var n=r("./src/WebGL/materials/ImposterMaterial.ts");class i extends n.ImposterMaterial{constructor(t){super(t),this.shaderID="stickimposter",this.setValues(t)}clone(t=new i){return super.clone.call(this,t),t}}},"./src/WebGL/materials/StickImposterOutlineMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{StickImposterOutlineMaterial:()=>o});var n=r("./src/colors.ts"),i=r("./src/WebGL/materials/ImposterMaterial.ts");class o extends i.ImposterMaterial{constructor(t={}){super(t),this.shaderID="stickimposteroutline",this.outlineColor=new n.Color(0,0,0),this.outlineWidth=.1,this.outlinePushback=1,t.color&&(this.outlineColor=t.color),t.width&&(this.outlineWidth=t.width),t.pushback&&(this.outlinePushback=t.pushback),this.setValues(t)}clone(t=new o){return super.clone.call(this,t),t.outlineColor=this.outlineColor,t.outlineWidth=this.outlineWidth,t.outlinePushback=this.outlinePushback,t}}},"./src/WebGL/materials/VolumetricMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{VolumetricMaterial:()=>a});var n=r("./src/WebGL/constants/Sides.ts"),i=r("./src/colors.ts"),o=r("./src/WebGL/materials/Material.ts");class a extends o.Material{constructor(t){super(),this.transparent=!1,this.volumetric=!0,this.color=new i.Color(16777215),this.transferfn=null,this.map=void 0,this.extent=[],this.maxdepth=100,this.unit=0,this.texmatrix=null,this.transfermin=-1,this.transfermax=1,this.subsamples=5,this.shaderID="volumetric",this.side=n.FrontSide,this.setValues(t)}clone(t=new a){return super.clone.call(this,t),t.transparent=this.transparent,t.volumetric=this.volumetric,t.color=this.color,t.transferfn=this.transferfn,t.map=this.map,t.extent=this.extent,t.maxdepth=this.maxdepth,t.unit=this.unit,t.texmatrix=this.texmatrix,t.transfermin=this.transfermin,t.transfermax=this.transfermax,t.subsamples=this.subsamples,t.shaderID=this.shaderID,t.side=this.side,t}}},"./src/WebGL/materials/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ImposterMaterial:()=>n.ImposterMaterial,InstancedMaterial:()=>i.InstancedMaterial,LineBasicMaterial:()=>o.LineBasicMaterial,Material:()=>a.Material,MaterialIdCount:()=>a.MaterialIdCount,MeshDoubleLambertMaterial:()=>s.MeshDoubleLambertMaterial,MeshLambertMaterial:()=>l.MeshLambertMaterial,MeshOutlineMaterial:()=>c.MeshOutlineMaterial,SphereImposterMaterial:()=>d.SphereImposterMaterial,SphereImposterOutlineMaterial:()=>u.SphereImposterOutlineMaterial,SpriteMaterial:()=>h.SpriteMaterial,StickImposterMaterial:()=>f.StickImposterMaterial,StickImposterOutlineMaterial:()=>p.StickImposterOutlineMaterial,VolumetricMaterial:()=>m.VolumetricMaterial});var n=r("./src/WebGL/materials/ImposterMaterial.ts"),i=r("./src/WebGL/materials/InstancedMaterial.ts"),o=r("./src/WebGL/materials/LineBasicMaterial.ts"),a=r("./src/WebGL/materials/Material.ts"),s=r("./src/WebGL/materials/MeshDoubleLambertMaterial.ts"),l=r("./src/WebGL/materials/MeshLambertMaterial.ts"),c=r("./src/WebGL/materials/MeshOutlineMaterial.ts"),d=r("./src/WebGL/materials/SphereImposterMaterial.ts"),u=r("./src/WebGL/materials/SphereImposterOutlineMaterial.ts"),h=r("./src/WebGL/materials/SpriteMaterial.ts"),f=r("./src/WebGL/materials/StickImposterMaterial.ts"),p=r("./src/WebGL/materials/StickImposterOutlineMaterial.ts"),m=r("./src/WebGL/materials/VolumetricMaterial.ts")},"./src/WebGL/math/Quaternion.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Quaternion:()=>n});class n{constructor(t,e,r,n){this.x=t||0,this.y=e||0,this.z=r||0,this.w=void 0!==n?n:1}set(t,e,r,n){return this.x=t,this.y=e,this.z=r,this.w=n,this}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this}conjugate(){return this.x*=-1,this.y*=-1,this.z*=-1,this}inverse(){return this.conjugate().normalize()}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}lengthxyz(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}normalize(){let t=this.length();return 0===t?(this.x=0,this.y=0,this.z=0,this.w=1):(t=1/t,this.x*=t,this.y*=t,this.z*=t,this.w*=t),this}multiply(t){return this.multiplyQuaternions(this,t)}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}multiplyQuaternions(t,e){const r=t.x,n=t.y,i=t.z,o=t.w,a=e.x,s=e.y,l=e.z,c=e.w;return this.x=r*c+o*a+n*l-i*s,this.y=n*c+o*s+i*a-r*l,this.z=i*c+o*l+r*s-n*a,this.w=o*c-r*a-n*s-i*l,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}clone(){return new n(this.x,this.y,this.z,this.w)}setFromEuler(t){const e=Math.cos(t.x/2),r=Math.cos(t.y/2),n=Math.cos(t.z/2),i=Math.sin(t.x/2),o=Math.sin(t.y/2),a=Math.sin(t.z/2);return this.x=i*r*n+e*o*a,this.y=e*o*n-i*r*a,this.z=e*r*a+i*o*n,this.w=e*r*n-i*o*a,this}}},"./src/WebGL/math/Vector2.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Vector2:()=>n});class n{constructor(t,e){this.x=t||0,this.y=e||0}set(t,e){return this.x=t,this.y=e,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}copy(t){return this.x=t.x,this.y=t.y,this}clone(){return new n(this.x,this.y)}}},"./src/WebGL/math/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Matrix3:()=>l.Matrix3,Matrix4:()=>l.Matrix4,Quaternion:()=>n.Quaternion,Ray:()=>l.Ray,Vector2:()=>i.Vector2,Vector3:()=>l.Vector3,clamp:()=>o.clamp,conversionMatrix3:()=>a.conversionMatrix3,degToRad:()=>s.degToRad});var n=r("./src/WebGL/math/Quaternion.ts"),i=r("./src/WebGL/math/Vector2.ts"),o=r("./src/WebGL/math/utils/clamp.ts"),a=r("./src/WebGL/math/utils/conversionMatrix3.ts"),s=r("./src/WebGL/math/utils/degToRad.ts"),l=r("./src/WebGL/math/math.ts")},"./src/WebGL/math/math.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Matrix3:()=>h,Matrix4:()=>d,Ray:()=>f,Vector3:()=>u});var n,i,o,a,s,l=r("./src/WebGL/math/utils/degToRad.ts"),c=r("./src/WebGL/math/utils/clamp.ts");class d{constructor(t=1,e=0,r=0,n=0,i=0,o=1,a=0,s=0,l=0,c=0,d=1,u=0,h=0,f=0,p=0,m=1){void 0!==t&&"number"!=typeof t?this.elements=new Float32Array(t):(this.elements=new Float32Array(16),this.elements[0]=t,this.elements[4]=e,this.elements[8]=r,this.elements[12]=n,this.elements[1]=i,this.elements[5]=o,this.elements[9]=a,this.elements[13]=s,this.elements[2]=l,this.elements[6]=c,this.elements[10]=d,this.elements[14]=u,this.elements[3]=h,this.elements[7]=f,this.elements[11]=p,this.elements[15]=m)}makeScale(t,e,r){throw new Error("Method not implemented.")}set(t,e,r,n,i,o,a,s,l,c,d,u,h,f,p,m){const g=this.elements;return g[0]=t,g[4]=e,g[8]=r,g[12]=n,g[1]=i,g[5]=o,g[9]=a,g[13]=s,g[2]=l,g[6]=c,g[10]=d,g[14]=u,g[3]=h,g[7]=f,g[11]=p,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}copy(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15]),this}matrix3FromTopLeft(){const t=this.elements;return new h(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10])}setRotationFromEuler(t,e){const r=this.elements,{x:n,y:i,z:o}=t,a=Math.cos(n),s=Math.sin(n),l=Math.cos(i),c=Math.sin(i),d=Math.cos(o),u=Math.sin(o);if(void 0===e||"XYZ"===e){const t=a*d,e=a*u,n=s*d,i=s*u;r[0]=l*d,r[4]=-l*u,r[8]=c,r[1]=e+n*c,r[5]=t-i*c,r[9]=-s*l,r[2]=i-t*c,r[6]=n+e*c,r[10]=a*l}else console.error(`Error with matrix4 setRotationFromEuler. Order: ${e}`);return this}setRotationFromQuaternion(t){const e=this.elements,{x:r,y:n,z:i,w:o}=t,a=r+r,s=n+n,l=i+i,c=r*a,d=r*s,u=r*l,h=n*s,f=n*l,p=i*l,m=o*a,g=o*s,v=o*l;return e[0]=1-(h+p),e[4]=d-v,e[8]=u+g,e[1]=d+v,e[5]=1-(c+p),e[9]=f-m,e[2]=u-g,e[6]=f+m,e[10]=1-(c+h),this}multiplyMatrices(t,e){const r=t.elements,n=e.elements,i=this.elements,o=r[0],a=r[4],s=r[8],l=r[12],c=r[1],d=r[5],u=r[9],h=r[13],f=r[2],p=r[6],m=r[10],g=r[14],v=r[3],b=r[7],y=r[11],x=r[15],w=n[0],_=n[4],k=n[8],A=n[12],T=n[1],M=n[5],S=n[9],C=n[13],E=n[2],L=n[6],z=n[10],O=n[14],D=n[3],I=n[7],R=n[11],F=n[15];return i[0]=o*w+a*T+s*E+l*D,i[4]=o*_+a*M+s*L+l*I,i[8]=o*k+a*S+s*z+l*R,i[12]=o*A+a*C+s*O+l*F,i[1]=c*w+d*T+u*E+h*D,i[5]=c*_+d*M+u*L+h*I,i[9]=c*k+d*S+u*z+h*R,i[13]=c*A+d*C+u*O+h*F,i[2]=f*w+p*T+m*E+g*D,i[6]=f*_+p*M+m*L+g*I,i[10]=f*k+p*S+m*z+g*R,i[14]=f*A+p*C+m*O+g*F,i[3]=v*w+b*T+y*E+x*D,i[7]=v*_+b*M+y*L+x*I,i[11]=v*k+b*S+y*z+x*R,i[15]=v*A+b*C+y*O+x*F,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}makeTranslation(t,e,r){return this.set(1,0,0,t,0,1,0,e,0,0,1,r,0,0,0,1),this}snap(t){t||(t=4);const e=Math.pow(10,4),r=this.elements;for(let t=0;t<16;t++){const n=Math.round(r[t]);n===Math.round(r[t]*e)/e&&(r[t]=n)}return this}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t){const e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this}translate(t){const e=this.elements;return e[12]+=t.x,e[13]+=t.y,e[14]+=t.z,this}getInverse(t,e){const r=this.elements,n=t.elements,i=n[0],o=n[4],a=n[8],s=n[12],l=n[1],c=n[5],d=n[9],u=n[13],h=n[2],f=n[6],p=n[10],m=n[14],g=n[3],v=n[7],b=n[11],y=n[15];r[0]=d*m*v-u*p*v+u*f*b-c*m*b-d*f*y+c*p*y,r[4]=s*p*v-a*m*v-s*f*b+o*m*b+a*f*y-o*p*y,r[8]=a*u*v-s*d*v+s*c*b-o*u*b-a*c*y+o*d*y,r[12]=s*d*f-a*u*f-s*c*p+o*u*p+a*c*m-o*d*m,r[1]=u*p*g-d*m*g-u*h*b+l*m*b+d*h*y-l*p*y,r[5]=a*m*g-s*p*g+s*h*b-i*m*b-a*h*y+i*p*y,r[9]=s*d*g-a*u*g-s*l*b+i*u*b+a*l*y-i*d*y,r[13]=a*u*h-s*d*h+s*l*p-i*u*p-a*l*m+i*d*m,r[2]=c*m*g-u*f*g+u*h*v-l*m*v-c*h*y+l*f*y,r[6]=s*f*g-o*m*g-s*h*v+i*m*v+o*h*y-i*f*y,r[10]=o*u*g-s*c*g+s*l*v-i*u*v-o*l*y+i*c*y,r[14]=s*c*h-o*u*h-s*l*f+i*u*f+o*l*m-i*c*m,r[3]=d*f*g-c*p*g-d*h*v+l*p*v+c*h*b-l*f*b,r[7]=o*p*g-a*f*g+a*h*v-i*p*v-o*h*b+i*f*b,r[11]=a*c*g-o*d*g-a*l*v+i*d*v+o*l*b-i*c*b,r[15]=o*d*h-a*c*h+a*l*f-i*d*f-o*l*p+i*c*p;const x=i*r[0]+l*r[4]+h*r[8]+g*r[12];if(0===x){const t="Matrix4.getInverse(): can't invert matrix, determinant is 0";if(e)throw new Error(t);return console.warn(t),this.identity(),this}return this.multiplyScalar(1/x),this}isReflected(){const t=this.elements,e=t[0],r=t[4],n=t[8],i=t[1],o=t[5],a=t[9],s=t[2],l=t[6],c=t[10];return e*o*c+i*l*n+s*r*a-s*o*n-i*r*c-e*l*a<0}scale(t){const e=this.elements,{x:r}=t,{y:n}=t,{z:i}=t;return e[0]*=r,e[4]*=n,e[8]*=i,e[1]*=r,e[5]*=n,e[9]*=i,e[2]*=r,e[6]*=n,e[10]*=i,e[3]*=r,e[7]*=n,e[11]*=i,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,Math.max(r,n)))}makeFrustum(t,e,r,n,i,o){const a=this.elements,s=2*i/(e-t),l=2*i/(n-r),c=(e+t)/(e-t),d=(n+r)/(n-r),u=-(o+i)/(o-i),h=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=l,a[9]=d,a[13]=0,a[2]=0,a[6]=0,a[10]=u,a[14]=h,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makePerspective(t,e,r,n){const i=r*Math.tan((0,l.degToRad)(.5*t)),o=-i,a=o*e,s=i*e;return this.makeFrustum(a,s,o,i,r,n)}makeOrthographic(t,e,r,n,i,o){const a=this.elements,s=1/(e-t),l=1/(r-n),c=1/(o-i),d=(e+t)*s,u=(r+n)*l,h=(o+i)*c;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-d,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-u,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-h,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}isEqual(t){const e=t.elements,r=this.elements;return r[0]===e[0]&&r[4]===e[4]&&r[8]===e[8]&&r[12]===e[12]&&r[1]===e[1]&&r[5]===e[5]&&r[9]===e[9]&&r[13]===e[13]&&r[2]===e[2]&&r[6]===e[6]&&r[10]===e[10]&&r[14]===e[14]&&r[3]===e[3]&&r[7]===e[7]&&r[11]===e[11]&&r[15]===e[15]}clone(){const t=this.elements;return new d(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])}isIdentity(){const t=this.elements;return 1===t[0]&&0===t[4]&&0===t[8]&&0===t[12]&&0===t[1]&&1===t[5]&&0===t[9]&&0===t[13]&&0===t[2]&&0===t[6]&&1===t[10]&&0===t[14]&&0===t[3]&&0===t[7]&&0===t[11]&&1===t[15]}isNearlyIdentity(t){return this.clone().snap(t).isIdentity()}getScale(t){const e=this.elements;return t=t||new u,o.set(e[0],e[1],e[2]),a.set(e[4],e[5],e[6]),s.set(e[8],e[9],e[10]),t.x=o.length(),t.y=a.length(),t.z=s.length(),t}lookAt(t,e,r){const n=this.elements;return s.subVectors(t,e).normalize(),0===s.length()&&(s.z=1),o.crossVectors(r,s).normalize(),0===o.length()&&(s.x+=1e-4,o.crossVectors(r,s).normalize()),a.crossVectors(s,o),n[0]=o.x,n[4]=a.x,n[8]=s.x,n[1]=o.y,n[5]=a.y,n[9]=s.y,n[2]=o.z,n[6]=a.z,n[10]=s.z,this}compose(t,e,r){const o=this.elements;return n.identity(),n.setRotationFromQuaternion(e),i.makeScale(r.x,r.y,r.z),this.multiplyMatrices(n,i),o[12]=t.x,o[13]=t.y,o[14]=t.z,this}}n=new d,i=new d;class u{constructor(t,e,r){this.x=t||0,this.y=e||0,this.z=r||0,this.atomid=void 0}set(t,e,r){return this.x=t,this.y=e,this.z=r,this}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}divideScalar(t){return 0!==t?(this.x/=t,this.y/=t,this.z/=t):(this.x=0,this.y=0,this.z=0),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,r=this.y-t.y,n=this.z-t.z;return e*e+r*r+n*n}applyMatrix3(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.elements;return this.x=i[0]*e+i[3]*r+i[6]*n,this.y=i[1]*e+i[4]*r+i[7]*n,this.z=i[2]*e+i[5]*r+i[8]*n,this}applyMatrix4(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.elements;return this.x=i[0]*e+i[4]*r+i[8]*n+i[12],this.y=i[1]*e+i[5]*r+i[9]*n+i[13],this.z=i[2]*e+i[6]*r+i[10]*n+i[14],this}applyProjection(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.elements,o=i[3]*e+i[7]*r+i[11]*n+i[15];return this.x=(i[0]*e+i[4]*r+i[8]*n+i[12])/o,this.y=(i[1]*e+i[5]*r+i[9]*n+i[13])/o,this.z=(i[2]*e+i[6]*r+i[10]*n+i[14])/o,this}applyQuaternion(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.x,o=t.y,a=t.z,s=t.w,l={};l.x=2*(r*a-n*o),l.y=2*(n*i-e*a),l.z=2*(e*o-r*i);const c={};return c.x=l.y*a-l.z*o,c.y=l.z*i-l.x*a,c.z=l.x*o-l.y*i,this.x=e+s*l.x+c.x,this.y=r+s*l.y+c.y,this.z=n+s*l.z+c.z,this}negate(){return this.multiplyScalar(-1)}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}normalize(){return this.divideScalar(this.length())}cross(t){const{x:e}=this,{y:r}=this,{z:n}=this;return this.x=r*t.z-n*t.y,this.y=n*t.x-e*t.z,this.z=e*t.y-r*t.x,this}crossVectors(t,e){return this.x=t.y*e.z-t.z*e.y,this.y=t.z*e.x-t.x*e.z,this.z=t.x*e.y-t.y*e.x,this}equals(t){return this.x==t.x&&this.y==t.y&&this.z==t.z}getPositionFromMatrix(t){return this.x=t.elements[12],this.y=t.elements[13],this.z=t.elements[14],this}setEulerFromRotationMatrix(t,e){const r=t.elements,n=r[0],i=r[4],o=r[8],a=r[5],s=r[9],l=r[6],d=r[10];return void 0===e||"XYZ"===e?(this.y=Math.asin((0,c.clamp)(o,-1,1)),Math.abs(o)<.99999?(this.x=Math.atan2(-s,d),this.z=Math.atan2(-i,n)):(this.x=Math.atan2(l,a),this.z=0)):console.error(`Error with vector's setEulerFromRotationMatrix: Unknown order: ${e}`),this}rotateAboutVector(t,e){t.normalize();const r=Math.cos(e),n=Math.sin(e),i=this.clone().multiplyScalar(r),o=t.clone().cross(this).multiplyScalar(n),a=t.clone().multiplyScalar(t.clone().dot(this)).multiplyScalar(1-r),s=i.add(o).add(a);return this.x=s.x,this.y=s.y,this.z=s.z,this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}transformDirection(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.elements;return this.x=i[0]*e+i[4]*r+i[8]*n,this.y=i[1]*e+i[5]*r+i[9]*n,this.z=i[2]*e+i[6]*r+i[10]*n,this.normalize()}clone(){return new u(this.x,this.y,this.z)}unproject(t){const e=n;return e.multiplyMatrices(t.matrixWorld,e.getInverse(t.projectionMatrix)),this.applyMatrix4(e)}}o=new u,a=new u,s=new u;class h{constructor(t=1,e=0,r=0,n=0,i=1,o=0,a=0,s=0,l=1){this.elements=new Float32Array(9),this.set(t,e,r,n,i,o,a,s,l)}set(t,e,r,n,i,o,a,s,l){const c=this.elements;return c[0]=t,c[3]=e,c[6]=r,c[1]=n,c[4]=i,c[7]=o,c[2]=a,c[5]=s,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=t.elements;this.set(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}getInverse3(t){const e=t.elements,r=this.elements;r[0]=e[4]*e[8]-e[5]*e[7],r[3]=e[6]*e[5]-e[3]*e[8],r[6]=e[3]*e[7]-e[6]*e[4],r[1]=e[7]*e[2]-e[1]*e[8],r[4]=e[0]*e[8]-e[6]*e[2],r[7]=e[1]*e[6]-e[0]*e[7],r[2]=e[1]*e[5]-e[2]*e[4],r[5]=e[2]*e[3]-e[0]*e[5],r[8]=e[0]*e[4]-e[1]*e[3];const n=e[0]*r[0]+e[3]*r[1]+e[6]*r[2];return this.multiplyScalar(1/n),this}getInverse(t,e){const r=t.elements,n=this.elements;n[0]=r[10]*r[5]-r[6]*r[9],n[1]=-r[10]*r[1]+r[2]*r[9],n[2]=r[6]*r[1]-r[2]*r[5],n[3]=-r[10]*r[4]+r[6]*r[8],n[4]=r[10]*r[0]-r[2]*r[8],n[5]=-r[6]*r[0]+r[2]*r[4],n[6]=r[9]*r[4]-r[5]*r[8],n[7]=-r[9]*r[0]+r[1]*r[8],n[8]=r[5]*r[0]-r[1]*r[4];const i=r[0]*n[0]+r[1]*n[3]+r[2]*n[6];if(0===i){const t="Matrix3.getInverse(): can't invert matrix, determinant is 0";if(e)throw new Error(t);return console.warn(t),this.identity(),this}return this.multiplyScalar(1/i),this}getDeterminant(){const t=this.elements;return t[0]*t[4]*t[8]+t[1]*t[5]*t[6]+t[2]*t[3]*t[7]-t[2]*t[4]*t[6]-t[1]*t[3]*t[8]-t[0]*t[5]*t[7]}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}clone(){const t=this.elements;return new h(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8])}getMatrix4(){const t=this.elements;return new d(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0)}}class f{constructor(t,e){this.origin=void 0!==t?t:new u,this.direction=void 0!==e?e:new u}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return(e||new u).copy(this.direction).multiplyScalar(t).add(this.origin)}recast(t){const e=o;return this.origin.copy(this.at(t,e)),this}closestPointToPoint(t,e){const r=e||new u;r.subVectors(t,this.origin);const n=r.dot(this.direction);return r.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(t){const e=o,r=e.subVectors(t,this.origin).dot(this.direction);return e.copy(this.direction).multiplyScalar(r).add(this.origin),e.distanceTo(t)}isIntersectionCylinder(){}isIntersectionSphere(t){return this.distanceToPoint(t.center)<=t.radius}isIntersectionPlane(t){return 0!==t.normal.dot(this.direction)||0===t.distanceToPoint(this.origin)}distanceToPlane(t){const e=t.normal.dot(this.direction);return 0===e?0===t.distanceToPoint(this.origin)?0:void 0:-(this.origin.dot(t.normal)+t.constant)/e}intersectPlane(t,e){const r=this.distanceToPlane(t);if(void 0!==r)return this.at(r,e)}applyMatrix4(t){return this.direction.add(this.origin).applyMatrix4(t),this.origin.applyMatrix4(t),this.direction.sub(this.origin),this}clone(){return(new f).copy(this)}}},"./src/WebGL/math/utils/clamp.ts":(t,e,r)=>{"use strict";function n(t,e,r){return Math.min(Math.max(t,e),r)}r.r(e),r.d(e,{clamp:()=>n})},"./src/WebGL/math/utils/conversionMatrix3.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{conversionMatrix3:()=>i});var n=r("./src/WebGL/math/math.ts");function i(t,e,r,i,o,a){i=i*Math.PI/180,o=o*Math.PI/180,a=a*Math.PI/180;const s=t=>t*t,l=Math.cos(i),c=Math.cos(o),d=Math.cos(a),u=Math.sin(a);return new n.Matrix3(t,e*d,r*c,0,e*u,r*(l-c*d)/u,0,0,r*Math.sqrt(1-s(l)-s(c)-s(d)+2*l*c*d)/u)}},"./src/WebGL/math/utils/degToRad.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{degToRad:()=>i});const n=Math.PI/180;function i(t){return t*n}},"./src/WebGL/objects/Line.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Line:()=>a,LineStyle:()=>n});var n,i=r("./src/WebGL/materials/index.ts"),o=r("./src/WebGL/core/index.ts");!function(t){t[t.LineStrip=0]="LineStrip",t[t.LinePieces=1]="LinePieces"}(n||(n={}));class a extends o.Object3D{constructor(t,e=new i.LineBasicMaterial({color:16777215*Math.random()}),r=n.LineStrip){super(),this.geometry=t,this.material=e,this.type=r}clone(t=new a(this.geometry,this.material,this.type)){return super.clone.call(this,t),t}}},"./src/WebGL/objects/Mesh.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Mesh:()=>i});var n=r("./src/WebGL/core/index.ts");class i extends n.Object3D{constructor(t,e){super(),this.geometry=t,this.material=e}clone(t){return void 0===t&&(t=new i(this.geometry,this.material)),super.clone.call(this,t),t}}},"./src/WebGL/objects/Sprite.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Sprite:()=>o});var n=r("./src/WebGL/materials/index.ts"),i=r("./src/WebGL/core/index.ts");class o extends i.Object3D{constructor(t=new n.SpriteMaterial){super(),this.material=t,this.rotation3d=this.rotation,this.rotation=0}updateMatrix(){this.matrix.setPosition(this.position),this.rotation3d.set(0,0,this.rotation),this.matrix.setRotationFromEuler(this.rotation3d),1===this.scale.x&&1===this.scale.y||this.matrix.scale(this.scale),this.matrixWorldNeedsUpdate=!0}clone(t=new o(this.material)){return i.Object3D.prototype.clone.call(this,t),t}}},"./src/WebGL/objects/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Line:()=>n.Line,LineStyle:()=>n.LineStyle,Mesh:()=>i.Mesh,Sprite:()=>o.Sprite});var n=r("./src/WebGL/objects/Line.ts"),i=r("./src/WebGL/objects/Mesh.ts"),o=r("./src/WebGL/objects/Sprite.ts")},"./src/WebGL/shaders/ShaderType.ts":(t,e,r)=>{"use strict";r.r(e)},"./src/WebGL/shaders/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ShaderLib:()=>n.ShaderLib,ShaderUtils:()=>i.ShaderUtils,basic:()=>n.basic,clone:()=>i.clone,instanced:()=>n.instanced,lambert:()=>n.lambert,lambertdouble:()=>n.lambertdouble,outline:()=>n.outline,screen:()=>n.screen,screenaa:()=>n.screenaa,sphereimposter:()=>n.sphereimposter,sphereimposteroutline:()=>n.sphereimposteroutline,sprite:()=>n.sprite,stickimposter:()=>n.stickimposter,stickimposteroutline:()=>n.stickimposteroutline,volumetric:()=>n.volumetric});var n=r("./src/WebGL/shaders/lib/index.ts"),i=r("./src/WebGL/shaders/utils/index.ts");r("./src/WebGL/shaders/ShaderType.ts")},"./src/WebGL/shaders/lib/basic/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{basic:()=>o});var n=r("./src/WebGL/shaders/lib/basic/uniforms.ts"),i=r("./src/WebGL/shaders/lib/basic/basic.frag");const o={vertexShader:r("./src/WebGL/shaders/lib/basic/basic.vert").default.replace("#define GLSLIFY 1",""),fragmentShader:i.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/basic/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3}}},"./src/WebGL/shaders/lib/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ShaderLib:()=>g,basic:()=>n.basic,instanced:()=>i.instanced,lambert:()=>o.lambert,lambertdouble:()=>a.lambertdouble,outline:()=>s.outline,screen:()=>l.screen,screenaa:()=>c.screenaa,sphereimposter:()=>d.sphereimposter,sphereimposteroutline:()=>u.sphereimposteroutline,sprite:()=>h.sprite,stickimposter:()=>f.stickimposter,stickimposteroutline:()=>p.stickimposteroutline,volumetric:()=>m.volumetric});var n=r("./src/WebGL/shaders/lib/basic/index.ts"),i=r("./src/WebGL/shaders/lib/instanced/index.ts"),o=r("./src/WebGL/shaders/lib/lambert/index.ts"),a=r("./src/WebGL/shaders/lib/lambertdouble/index.ts"),s=r("./src/WebGL/shaders/lib/outline/index.ts"),l=r("./src/WebGL/shaders/lib/screen/index.ts"),c=r("./src/WebGL/shaders/lib/screenaa/index.ts"),d=r("./src/WebGL/shaders/lib/sphereimposter/index.ts"),u=r("./src/WebGL/shaders/lib/sphereimposteroutline/index.ts"),h=r("./src/WebGL/shaders/lib/sprite/index.ts"),f=r("./src/WebGL/shaders/lib/stickimposter/index.ts"),p=r("./src/WebGL/shaders/lib/stickimposteroutline/index.ts"),m=r("./src/WebGL/shaders/lib/volumetric/index.ts");const g={basic:n.basic,instanced:i.instanced,lambert:o.lambert,lambertdouble:a.lambertdouble,outline:s.outline,screen:l.screen,screenaa:c.screenaa,sphereimposter:d.sphereimposter,sphereimposteroutline:u.sphereimposteroutline,sprite:h.sprite,stickimposter:f.stickimposter,stickimposteroutline:p.stickimposteroutline,volumetric:m.volumetric}},"./src/WebGL/shaders/lib/instanced/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{instanced:()=>a});var n=r("./src/WebGL/shaders/lib/instanced/uniforms.ts"),i=r("./src/WebGL/shaders/lib/instanced/instanced.frag"),o=r("./src/WebGL/shaders/lib/instanced/instanced.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/instanced/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/lambert/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{lambert:()=>a});var n=r("./src/WebGL/shaders/lib/lambert/uniforms.ts"),i=r("./src/WebGL/shaders/lib/lambert/lambert.frag"),o=r("./src/WebGL/shaders/lib/lambert/lambert.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/lambert/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/lambertdouble/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{lambertdouble:()=>a});var n=r("./src/WebGL/shaders/lib/lambertdouble/uniforms.ts"),i=r("./src/WebGL/shaders/lib/lambertdouble/lambertdouble.frag"),o=r("./src/WebGL/shaders/lib/lambertdouble/lambertdouble.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/lambertdouble/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/outline/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{outline:()=>a});var n=r("./src/WebGL/shaders/lib/outline/uniforms.ts"),i=r("./src/WebGL/shaders/lib/outline/outline.frag"),o=r("./src/WebGL/shaders/lib/outline/outline.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/outline/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>i});var n=r("./src/colors.ts");const i={opacity:{type:"f",value:1},outlineColor:{type:"c",value:new n.Color(0,0,0)},fogColor:{type:"c",value:new n.Color(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},outlineWidth:{type:"f",value:.1},outlinePushback:{type:"f",value:1}}},"./src/WebGL/shaders/lib/screen/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{screen:()=>a});var n=r("./src/WebGL/shaders/lib/screen/uniforms.ts"),i=r("./src/WebGL/shaders/lib/screen/screen.frag"),o=r("./src/WebGL/shaders/lib/screen/screen.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/screen/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={}},"./src/WebGL/shaders/lib/screenaa/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{screenaa:()=>a});var n=r("./src/WebGL/shaders/lib/screenaa/uniforms.ts"),i=r("./src/WebGL/shaders/lib/screenaa/screenaa.frag"),o=r("./src/WebGL/shaders/lib/screenaa/screenaa.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/screenaa/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={}},"./src/WebGL/shaders/lib/sphereimposter/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{sphereimposter:()=>o});var n=r("./src/WebGL/shaders/lib/sphereimposter/uniforms.ts"),i=r("./src/WebGL/shaders/lib/sphereimposter/sphereimposter.frag");const o={vertexShader:r("./src/WebGL/shaders/lib/sphereimposter/sphereimposter.vert").default.replace("#define GLSLIFY 1",""),fragmentShader:i.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/sphereimposter/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/sphereimposteroutline/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{sphereimposteroutline:()=>a});var n=r("./src/WebGL/shaders/lib/sphereimposteroutline/uniforms.ts"),i=r("./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.frag"),o=r("./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/sphereimposteroutline/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>i});var n=r("./src/colors.ts");const i={opacity:{type:"f",value:1},outlineColor:{type:"c",value:new n.Color(0,0,0)},fogColor:{type:"c",value:new n.Color(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},outlineWidth:{type:"f",value:.1},outlinePushback:{type:"f",value:1}}},"./src/WebGL/shaders/lib/sprite/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{sprite:()=>a});var n=r("./src/WebGL/shaders/lib/sprite/uniforms.ts"),i=r("./src/WebGL/shaders/lib/sprite/sprite.frag"),o=r("./src/WebGL/shaders/lib/sprite/sprite.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/sprite/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={}},"./src/WebGL/shaders/lib/stickimposter/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{stickimposter:()=>s});var n=r("./src/WebGL/shaders/lib/stickimposter/uniforms.ts"),i=r("./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag"),o=r("./src/WebGL/shaders/lib/stickimposter/stickimposter.partial.frag"),a=r("./src/WebGL/shaders/lib/stickimposter/stickimposter.vert");const s={fragmentShader:[i.default,o.default].join("\n").replace("#define GLSLIFY 1",""),vertexShader:a.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/stickimposter/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/stickimposteroutline/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{stickimposteroutline:()=>a});var n=r("./src/WebGL/shaders/lib/stickimposteroutline/uniforms.ts"),i=r("./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag"),o=r("./src/WebGL/shaders/lib/stickimposteroutline/stickimposteroutline.vert");const a={fragmentShader:(i.default+"gl_FragColor = vec4(color,1.0);}").replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/stickimposteroutline/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>i});var n=r("./src/colors.ts");const i={opacity:{type:"f",value:1},fogColor:{type:"c",value:new n.Color(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},outlineColor:{type:"c",value:new n.Color(0,0,0)},outlineWidth:{type:"f",value:.1},outlinePushback:{type:"f",value:1}}},"./src/WebGL/shaders/lib/volumetric/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{volumetric:()=>a});var n=r("./src/WebGL/shaders/lib/volumetric/uniforms.ts"),i=r("./src/WebGL/shaders/lib/volumetric/volumetric.frag"),o=r("./src/WebGL/shaders/lib/volumetric/volumetric.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/volumetric/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},data:{type:"i",value:3},colormap:{type:"i",value:4},depthmap:{type:"i",value:5},step:{type:"f",value:1},maxdepth:{type:"f",value:100},subsamples:{type:"f",value:5},textmat:{type:"mat4",value:[]},projinv:{type:"mat4",value:[]},transfermin:{type:"f",value:-.2},transfermax:{type:"f",value:.2}}},"./src/WebGL/shaders/utils/clone.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{clone:()=>i});var n=r("./src/colors.ts");function i(t){let e={};for(const i in t){e[i]={},e[i].type=t[i].type;var r=t[i].value;r instanceof n.Color?e[i].value=r.clone():"number"==typeof r?e[i].value=r:r instanceof Array?e[i].value=[]:console.error("Error copying shader uniforms from ShaderLib: unknown type for uniform")}return e}},"./src/WebGL/shaders/utils/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ShaderUtils:()=>o,clone:()=>n.clone});var n=r("./src/WebGL/shaders/utils/clone.ts"),i=r("./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag");const o={clone:n.clone,stickimposterFragmentShader:i.default}},"./src/WebGL/shapes/Cylinder.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Cylinder:()=>o});var n=r("./src/WebGL/math/index.ts");let i=new n.Vector3;class o{constructor(t=new n.Vector3,e=new n.Vector3,r=0){this.c1=t,this.c2=e,this.radius=r,this.direction=(new n.Vector3).subVectors(this.c2,this.c1).normalize()}copy(t){return this.c1.copy(t.c1),this.c2.copy(t.c2),this.direction.copy(t.direction),this.radius=t.radius,this}lengthSq(){return i.subVectors(this.c2,this.c1).lengthSq()}applyMatrix4(t){return this.direction.add(this.c1).applyMatrix4(t),this.c1.applyMatrix4(t),this.c2.applyMatrix4(t),this.direction.sub(this.c1).normalize(),this.radius=this.radius*t.getMaxScaleOnAxis(),this}}},"./src/WebGL/shapes/Sphere.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Sphere:()=>i});var n=r("./src/WebGL/math/index.ts");class i{constructor(t={x:0,y:0,z:0},e=0){this.center=new n.Vector3(t.x,t.y,t.z),this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new i).copy(this)}}},"./src/WebGL/shapes/Triangle.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Triangle:()=>o});var n=r("./src/WebGL/math/index.ts");const i=new n.Vector3;class o{constructor(t=new n.Vector3,e=new n.Vector3,r=new n.Vector3){this.a=t,this.b=e,this.c=r}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}applyMatrix4(t){return this.a.applyMatrix4(t),this.b.applyMatrix4(t),this.c.applyMatrix4(t),this}getNormal(){var t=this.a.clone();return t.sub(this.b),i.subVectors(this.c,this.b),t.cross(i),t.normalize(),t}}},"./src/WebGL/shapes/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Cylinder:()=>i.Cylinder,Sphere:()=>n.Sphere,Triangle:()=>o.Triangle});var n=r("./src/WebGL/shapes/Sphere.ts"),i=r("./src/WebGL/shapes/Cylinder.ts"),o=r("./src/WebGL/shapes/Triangle.ts")},"./src/autoload.ts":(__unused_webpack_module,__nested_webpack_exports__,__nested_webpack_require_886947__)=>{"use strict";__nested_webpack_require_886947__.r(__nested_webpack_exports__),__nested_webpack_require_886947__.d(__nested_webpack_exports__,{autoinit:()=>autoinit,autoload:()=>autoload,processing_autoinit:()=>processing_autoinit,viewers:()=>viewers});var _GLViewer__WEBPACK_IMPORTED_MODULE_0__=__nested_webpack_require_886947__("./src/GLViewer.ts"),_ProteinSurface4__WEBPACK_IMPORTED_MODULE_1__=__nested_webpack_require_886947__("./src/ProteinSurface4.ts"),_utilities__WEBPACK_IMPORTED_MODULE_2__=__nested_webpack_require_886947__("./src/utilities.ts"),_colors__WEBPACK_IMPORTED_MODULE_3__=__nested_webpack_require_886947__("./src/colors.ts"),autoinit=!1,processing_autoinit=!1,viewers={};function autoload(viewer,callback){var i,dataname,type;if(null!=document.querySelector(".viewer_3Dmoljs")&&(autoinit=!0),autoinit){processing_autoinit=!0,viewer=null!=viewer?viewer:null;var nviewers=0;document.querySelectorAll(".viewer_3Dmoljs").forEach((viewerdiv=>{var datauri=[],datatypes=[],uri="";"static"==viewerdiv.style.position&&(viewerdiv.style.position="relative");var UI=null;if(type=null,viewerdiv.dataset.pdb)datauri.push("https://files.rcsb.org/view/"+viewerdiv.dataset.pdb+".pdb"),datatypes.push("pdb");else if(viewerdiv.dataset.cid)datatypes.push("sdf"),datauri.push("https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"+viewerdiv.dataset.cid+"/SDF?record_type=3d");else if(viewerdiv.dataset.href||viewerdiv.dataset.url){uri=viewerdiv.dataset.href?viewerdiv.dataset.href:viewerdiv.dataset.url,datauri.push(uri),type=uri.substring(uri.lastIndexOf(".")+1),datatypes.push(type);var molName=uri.substring(uri.lastIndexOf("/")+1,uri.lastIndexOf("."));"/"==molName&&(molName=uri.substring(uri.lastIndexOf("/")+1)),viewerdiv.dataset[datatypes[datatypes.length-1]]=molName}var divdata=viewerdiv.dataset;for(i in divdata)"pdb"===i.substring(0,3)&&"pdb"!==i?(datauri.push("https://files.rcsb.org/view/"+divdata[i]+".pdb"),datatypes.push("pdb")):"href"===i.substring(0,4)&&"href"!==i?(uri=divdata[i],datauri.push(uri),datatypes.push(uri.substring(uri.lastIndexOf(".")+1))):"cid"===i.substring(0,3)&&"cid"!==i&&(datauri.push("https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"+divdata[i]+"/SDF?record_type=3d"),datatypes.push("sdf"));var options={};viewerdiv.dataset.options&&(options=(0,_utilities__WEBPACK_IMPORTED_MODULE_2__.specStringToObject)(viewerdiv.dataset.options));var bgcolor=_colors__WEBPACK_IMPORTED_MODULE_3__.CC.color(viewerdiv.dataset.backgroundcolor),bgalpha=viewerdiv.dataset.backgroundalpha;bgalpha=null==bgalpha?1:parseFloat(bgalpha);var style={line:{}};viewerdiv.dataset.style&&(style=(0,_utilities__WEBPACK_IMPORTED_MODULE_2__.specStringToObject)(viewerdiv.dataset.style));var select={};viewerdiv.dataset.select&&(select=(0,_utilities__WEBPACK_IMPORTED_MODULE_2__.specStringToObject)(viewerdiv.dataset.select));var selectstylelist=[],surfaces=[],labels=[],zoomto={},spin=null,d=viewerdiv.dataset,stylere=/style(.+)/,surfre=/surface(.*)/,reslabre=/labelres(.*)/,keys=[];for(dataname in d)Object.prototype.hasOwnProperty.call(d,dataname)&&keys.push(dataname);for(keys.sort(),i=0;i{UI.loadSurface("VDW",e,r,t)})):t.addSurface(_ProteinSurface4__WEBPACK_IMPORTED_MODULE_1__.SurfaceType.VDW,r,e,e)}for(i=0;i{"complete"===document.readyState&&autoload()}},"./src/colors.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{CC:()=>i,Color:()=>n,builtinColorSchemes:()=>u,chains:()=>d,elementColors:()=>l,htmlColors:()=>o,residues:()=>c,ssColors:()=>a});class n{constructor(t,e,r){return this.r=0,this.g=0,this.b=0,arguments.length>1&&"number"==typeof t?(this.r=t||0,this.g=e||0,this.b=r||0,this):this.set(t||0)}set(t){return t instanceof n?t.clone():("number"==typeof t?this.setHex(t):"object"==typeof t&&(this.r=(null==t?void 0:t.r)||0,this.g=(null==t?void 0:t.g)||0,this.b=(null==t?void 0:t.b)||0),this)}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this}getHex(){return Math.round(255*this.r)<<16|Math.round(255*this.g)<<8|Math.round(255*this.b)}clone(){return new n(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}scaled(){var t={};return t.r=Math.round(255*this.r),t.g=Math.round(255*this.g),t.b=Math.round(255*this.b),t.a=1,t}}class i{static color(t){if(!t)return i.cache[0];if(t instanceof n)return t;if("number"==typeof t&&void 0!==i.cache[t])return i.cache[t];if(t&&Array.isArray(t))return t.map(i.color);let e=i.getHex(t),r=new n(e);return i.cache[e]=r,r}static getHex(t){var e;if(Array.isArray(t))return t.map(i.getHex);if("string"==typeof t){let r=t;if(!isNaN(parseInt(r)))return parseInt(r);if(r=r.trim(),4==r.length&&"#"==r[0]&&(r="#"+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]),7==r.length&&"#"==r[0])return parseInt(r.substring(1),16);let n=i.rgbRegEx.exec(r);if(n){""!=n[1]&&console.log("WARNING: Opacity value in rgba ignored. Specify separately as opacity attribute.");let t=0;for(let e=2;e<5;e++){t*=256;let r=n[e].endsWith("%")?255*parseFloat(n[e])/100:parseFloat(n[e]);t+=Math.round(r)}return t}return(null===(e=null===window||void 0===window?void 0:window.$3Dmol)||void 0===e?void 0:e.htmlColors[t.toLowerCase()])||0}return t}}i.rgbRegEx=/rgb(a?)\(\s*([^ ,\)\t]+)\s*,\s*([^ ,\)\t]+)\s*,\s*([^ ,\)\t]+)/i,i.cache={0:new n(0)};const o={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,darkgrey:11119017,darkgreen:25600,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,grey:8421504,green:32768,greenyellow:11403055,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,lightgrey:13882323,lightgreen:9498256,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},a={pyMol:{h:16711680,s:16776960,c:65280},Jmol:{h:16711808,s:16762880,c:16777215}},s={H:16777215,He:16761035,HE:16761035,Li:11674146,LI:11674146,B:65280,C:13158600,N:9408511,O:15728640,F:14329120,Na:255,NA:255,Mg:2263842,MG:2263842,Al:8421520,AL:8421520,Si:14329120,SI:14329120,P:16753920,S:16762930,Cl:65280,CL:65280,Ca:8421520,CA:8421520,Ti:8421520,TI:8421520,Cr:8421520,CR:8421520,Mn:8421520,MN:8421520,Fe:16753920,FE:16753920,Ni:10824234,NI:10824234,Cu:10824234,CU:10824234,Zn:10824234,ZN:10824234,Br:10824234,BR:10824234,Ag:8421520,AG:8421520,I:10494192,Ba:16753920,BA:16753920,Au:14329120,AU:14329120},l={defaultColor:16716947,Jmol:{H:16777215,He:14286847,HE:14286847,Li:13402367,LI:13402367,Be:12779264,BE:12779264,B:16758197,C:9474192,N:3166456,O:16715021,F:9494608,Ne:11789301,NE:11789301,Na:11230450,NA:11230450,Mg:9109248,MG:9109248,Al:12560038,AL:12560038,Si:1578e4,SI:1578e4,P:16744448,S:16777008,Cl:2093087,CL:2093087,Ar:8442339,AR:8442339,K:9388244,Ca:4062976,CA:4062976,Sc:15132390,SC:15132390,Ti:12567239,TI:12567239,V:10921643,Cr:9083335,CR:9083335,Mn:10255047,MN:10255047,Fe:14706227,FE:14706227,Co:15765664,CO:15765664,Ni:5296208,NI:5296208,Cu:13140019,CU:13140019,Zn:8224944,ZN:8224944,Ga:12750735,GA:12750735,Ge:6721423,GE:6721423,As:12419299,AS:12419299,Se:16752896,SE:16752896,Br:10889513,BR:10889513,Kr:6076625,KR:6076625,Rb:7351984,RB:7351984,Sr:65280,SR:65280,Y:9764863,Zr:9756896,ZR:9756896,Nb:7586505,NB:7586505,Mo:5551541,MO:5551541,Tc:3907230,TC:3907230,Ru:2396047,RU:2396047,Rh:687500,RH:687500,Pd:27013,PD:27013,Ag:12632256,AG:12632256,Cd:16767375,CD:16767375,In:10909043,IN:10909043,Sn:6717568,SN:6717568,Sb:10380213,SB:10380213,Te:13924864,TE:13924864,I:9699476,Xe:4366e3,XE:4366e3,Cs:5707663,CS:5707663,Ba:51456,BA:51456,La:7394559,LA:7394559,Ce:16777159,CE:16777159,Pr:14286791,PR:14286791,Nd:13107143,ND:13107143,Pm:10747847,PM:10747847,Sm:9437127,SM:9437127,Eu:6422471,EU:6422471,Gd:4587463,GD:4587463,Tb:3211207,TB:3211207,Dy:2097095,DY:2097095,Ho:65436,HO:65436,Er:58997,ER:58997,Tm:54354,TM:54354,Yb:48952,YB:48952,Lu:43812,LU:43812,Hf:5096191,HF:5096191,Ta:5089023,TA:5089023,W:2200790,Re:2522539,RE:2522539,Os:2516630,OS:2516630,Ir:1528967,IR:1528967,Pt:13684960,PT:13684960,Au:16765219,AU:16765219,Hg:12105936,HG:12105936,Tl:10900557,TL:10900557,Pb:5724513,PB:5724513,Bi:10375093,BI:10375093,Po:11230208,PO:11230208,At:7688005,AT:7688005,Rn:4358806,RN:4358806,Fr:4325478,FR:4325478,Ra:32e3,RA:32e3,Ac:7384058,AC:7384058,Th:47871,TH:47871,Pa:41471,PA:41471,U:36863,Np:33023,NP:33023,Pu:27647,PU:27647,Am:5528818,AM:5528818,Cm:7888099,CM:7888099,Bk:9064419,BK:9064419,Cf:10565332,CF:10565332,Es:11739092,ES:11739092,Fm:11739066,FM:11739066,Md:11734438,MD:11734438,No:12389767,NO:12389767,Lr:13041766,LR:13041766,Rf:13369433,RF:13369433,Db:13697103,DB:13697103,Sg:14221381,SG:14221381,Bh:14680120,BH:14680120,Hs:15073326,HS:15073326,Mt:15400998,MT:15400998},rasmol:s,defaultColors:Object.assign({},s),greenCarbon:Object.assign(Object.assign({},s),{C:65280}),cyanCarbon:Object.assign(Object.assign({},s),{C:65535}),magentaCarbon:Object.assign(Object.assign({},s),{C:16711935}),yellowCarbon:Object.assign(Object.assign({},s),{C:16776960}),whiteCarbon:Object.assign(Object.assign({},s),{C:16777215}),orangeCarbon:Object.assign(Object.assign({},s),{C:16753920}),purpleCarbon:Object.assign(Object.assign({},s),{C:8388736}),blueCarbon:Object.assign(Object.assign({},s),{C:255})},c={amino:{ALA:13158600,ARG:1334015,ASN:56540,ASP:15075850,CYS:15132160,GLN:56540,GLU:15075850,GLY:15461355,HIS:8553170,ILE:1016335,LEU:1016335,LYS:1334015,MET:15132160,PHE:3289770,PRO:14456450,SER:16422400,THR:16422400,TRP:11819700,TYR:3289770,VAL:1016335,ASX:16738740,GLX:16738740},shapely:{ALA:9240460,ARG:124,ASN:16743536,ASP:10485826,CYS:16777072,GLN:16731212,GLU:6684672,GLY:16777215,HIS:7368959,ILE:19456,LEU:4546117,LYS:4671416,MET:12099650,PHE:5459026,PRO:5395026,SER:16740418,THR:12078080,TRP:5195264,TYR:9203788,VAL:16747775,ASX:16711935,GLX:16711935},nucleic:{A:10526975,G:16740464,I:8454143,C:16747595,T:10551200,U:16744576}},d={atom:{A:12636415,B:11599792,C:16761032,D:16777088,E:16761087,F:11596016,G:16765040,H:15761536,I:16113331,J:49151,K:13458524,L:6737322,M:10145074,N:15631086,O:52945,P:65407,Q:3978097,R:139,S:12433259,T:25600,U:8388608,V:8421376,W:8388736,X:32896,Y:12092939,Z:11674146},hetatm:{A:9478351,B:8441752,C:13602992,D:13619056,E:13603023,F:8437952,G:13607008,H:12603504,I:12955267,J:42959,K:11881548,L:5682578,M:9090346,N:12481214,O:46753,P:53103,Q:3447649,R:187,S:10854235,T:37888,U:11534336,V:11579392,W:11534512,X:45232,Y:15250963,Z:12726834}},u={ssPyMol:{prop:"ss",map:a.pyMol},ssJmol:{prop:"ss",map:a.Jmol},Jmol:{prop:"elem",map:l.Jmol},amino:{prop:"resn",map:c.amino},shapely:{prop:"resn",map:c.shapely},nucleic:{prop:"resn",map:c.nucleic},chain:{prop:"chain",map:d.atom},rasmol:{prop:"elem",map:l.rasmol},default:{prop:"elem",map:l.defaultColors},greenCarbon:{prop:"elem",map:l.greenCarbon},chainHetatm:{prop:"chain",map:d.hetatm},cyanCarbon:{prop:"elem",map:l.cyanCarbon},magentaCarbon:{prop:"elem",map:l.magentaCarbon},purpleCarbon:{prop:"elem",map:l.purpleCarbon},whiteCarbon:{prop:"elem",map:l.whiteCarbon},orangeCarbon:{prop:"elem",map:l.orangeCarbon},yellowCarbon:{prop:"elem",map:l.yellowCarbon},blueCarbon:{prop:"elem",map:l.blueCarbon}}},"./src/glcartoon.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{drawCartoon:()=>M,subdivide_spline:()=>d});var n=r("./src/WebGL/math/index.ts"),i=r("./src/WebGL/shapes/index.ts"),o=r("./src/WebGL/index.ts"),a=r("./src/Gradient.ts"),s=r("./src/colors.ts"),l=r("./src/GLDraw.ts"),c=r("./src/utilities.ts");function d(t,e){var r,i,o,a,s,l,c,d,u,h=[],f=t;for((f=[]).push(t[0]),r=1,i=t.length-1;r0){var g=[i,i+1,i-1,i-2],v=u.faceidx;p[v]=g[0],p[v+1]=g[1],p[v+2]=g[3],p[v+3]=g[1],p[v+4]=g[2],p[v+5]=g[3],u.faceidx+=6}u.vertices+=2}}function v(t,e,r,n,o,a,l){l&&"default"!==l||(l="rectangle"),"edged"===l?function(t,e,r,n,o,a){if(!(e.length<2)){var l,c;if(l=e[0],c=e[e.length-1],l=d(l,n),c=d(c,n),!o)return g(t,l,c,r);var u,h,f,p,m,v,b,y,x,w,_,k,A,T,M,S,C,E,L,z,O,D,I=[],R=[[0,2,-6,-8],[-4,-2,6,4],[7,-1,-5,3],[-3,5,1,-7]];for(A=0,T=l.length;A0){var P=void 0!==k&&void 0!==_&&k.serial!==_.serial;for(M=0;M<4;M++){var j=[v+R[M][0],v+R[M][1],v+R[M][2],v+R[M][3]];if(D[y=L.faceidx]=j[0],D[y+1]=j[1],D[y+2]=j[3],D[y+3]=j[1],D[y+4]=j[2],D[y+5]=j[3],L.faceidx+=6,_.clickable||k.clickable||_.hoverable||k.hoverable){var N=I[j[3]].clone(),B=I[j[0]].clone(),U=I[j[2]].clone(),G=I[j[1]].clone();if(N.atom=I[j[3]].atom||null,U.atom=I[j[2]].atom||null,B.atom=I[j[0]].atom||null,G.atom=I[j[1]].atom||null,P){var V=N.clone().add(B).multiplyScalar(.5),H=U.clone().add(G).multiplyScalar(.5),W=N.clone().add(G).multiplyScalar(.5);M%2==0?((k.clickable||k.hoverable)&&(S=new i.Triangle(V,W,N),C=new i.Triangle(H,U,W),E=new i.Triangle(W,U,N),k.intersectionShape.triangle.push(S),k.intersectionShape.triangle.push(C),k.intersectionShape.triangle.push(E)),(_.clickable||_.hoverable)&&(S=new i.Triangle(B,G,W),C=new i.Triangle(G,H,W),E=new i.Triangle(B,W,V),_.intersectionShape.triangle.push(S),_.intersectionShape.triangle.push(C),_.intersectionShape.triangle.push(E))):((_.clickable||_.hoverable)&&(S=new i.Triangle(V,W,N),C=new i.Triangle(H,U,W),E=new i.Triangle(W,U,N),_.intersectionShape.triangle.push(S),_.intersectionShape.triangle.push(C),_.intersectionShape.triangle.push(E)),(k.clickable||k.hoverable)&&(S=new i.Triangle(B,G,W),C=new i.Triangle(G,H,W),E=new i.Triangle(B,W,V),k.intersectionShape.triangle.push(S),k.intersectionShape.triangle.push(C),k.intersectionShape.triangle.push(E)))}else(_.clickable||_.hoverable)&&(S=new i.Triangle(B,G,N),C=new i.Triangle(G,U,N),_.intersectionShape.triangle.push(S),_.intersectionShape.triangle.push(C))}}}L.vertices+=8,k=_}var q=I.length-8;for(z=(L=t.updateGeoGroup(8)).vertexArray,O=L.colorArray,D=L.faceArray,b=3*(v=L.vertices),y=L.faceidx,A=0;A<4;A++){I.push(I[2*A]),I.push(I[q+2*A]);var Y=I[2*A],Z=I[q+2*A];z[b+6*A]=Y.x,z[b+1+6*A]=Y.y,z[b+2+6*A]=Y.z,z[b+3+6*A]=Z.x,z[b+4+6*A]=Z.y,z[b+5+6*A]=Z.z,O[b+6*A]=x.r,O[b+1+6*A]=x.g,O[b+2+6*A]=x.b,O[b+3+6*A]=x.r,O[b+4+6*A]=x.g,O[b+5+6*A]=x.b}q+=8,S=[v,v+2,v+6,v+4],C=[v+1,v+5,v+7,v+3],D[y]=S[0],D[y+1]=S[1],D[y+2]=S[3],D[y+3]=S[1],D[y+4]=S[2],D[y+5]=S[3],D[y+6]=C[0],D[y+7]=C[1],D[y+8]=C[3],D[y+9]=C[1],D[y+10]=C[2],D[y+11]=C[3],L.faceidx+=12,L.vertices+=8}}(t,e,r,n,o):"rectangle"!==l&&"oval"!==l&&"parabola"!==l||function(t,e,r,n,o,a,l){var c,u,h,f,p,m,v,b,y,x;if((h=e.length)<2||e[0].length<2)return;for(c=0;c0&&(c-=1,a=!0),E=Math.round(c*(r.length-1)/f),C=s.CC.color(r[E]),y=v,x=b,v=[],b=[],p=[],void 0!==e[0][c].atom&&(S=e[0][c].atom,"oval"===l?m=w:"rectangle"===l?m=_:"parabola"===l&&(m=k)),m||(m=_),u=0;u0&&!a){for(u=0;u<2*h;u++)D=[A+I[u][0],A+I[u][1],A+I[u][2],A+I[u][3]],O[M=R.faceidx]=D[0],O[M+1]=D[1],O[M+2]=D[3],O[M+3]=D[1],O[M+4]=D[2],O[M+5]=D[3],R.faceidx+=6;if(S.clickable||S.hoverable){var j=[];for(u in j.push(new i.Triangle(y[0],v[0],v[h-1])),j.push(new i.Triangle(y[0],v[h-1],y[h-1])),j.push(new i.Triangle(y[h-1],v[h-1],b[h-1])),j.push(new i.Triangle(y[h-1],b[h-1],x[h-1])),j.push(new i.Triangle(b[0],x[0],x[h-1])),j.push(new i.Triangle(b[h-1],b[0],x[h-1])),j.push(new i.Triangle(v[0],y[0],x[0])),j.push(new i.Triangle(b[0],v[0],x[0])),j)S.intersectionShape.triangle.push(j[u])}}R.vertices+=2*h}for(L=R.vertexArray,z=R.colorArray,O=R.faceArray,T=3*(A=R.vertices),M=R.faceidx,c=0;c=0&&r<1&&(a.transparent=!0,a.opacity=r),a.outline=n;var s=new o.Mesh(e,a);t.add(s)}}function w(t,e,r,i,o,a,s,l,c){var d,m,g,v,b,y;if(i&&o&&s){var x=o.sub(i);x.normalize();var w=l[c];for(m=c+1;m0&&v(V,W,H,h,L,0,W.style);var r=[],n=null;if(e){for(z=0;z0&&v(V,W,H,h,L,0,W.style),W=[],z=0;z{"use strict";r.r(e),r.d(e,{CAP:()=>m.CAP,CC:()=>i.CC,Color:()=>i.Color,CustomLinear:()=>n.CustomLinear,Cylinder:()=>c.Cylinder,GLDraw:()=>m.GLDraw,GLModel:()=>v.GLModel,GLShape:()=>p.GLShape,GLViewer:()=>b.GLViewer,GLVolumetricRender:()=>f.GLVolumetricRender,Gradient:()=>n.Gradient,GradientType:()=>n.GradientType,Label:()=>o.Label,LabelCount:()=>o.LabelCount,MarchingCube:()=>u.MarchingCube,MarchingCubeInitializer:()=>u.MarchingCubeInitializer,Matrix3:()=>l.Matrix3,Matrix4:()=>l.Matrix4,Parsers:()=>s.Parsers,PausableTimer:()=>d.PausableTimer,PointGrid:()=>u.PointGrid,ProteinSurface:()=>u.ProteinSurface,Quaternion:()=>l.Quaternion,ROYGB:()=>n.ROYGB,RWB:()=>n.RWB,Ray:()=>l.Ray,Sinebow:()=>n.Sinebow,Sphere:()=>c.Sphere,SurfaceType:()=>u.SurfaceType,Triangle:()=>c.Triangle,Vector2:()=>l.Vector2,Vector3:()=>l.Vector3,VolumeData:()=>h.VolumeData,adjustVolumeStyle:()=>d.adjustVolumeStyle,applyPartialCharges:()=>a.applyPartialCharges,autoinit:()=>y.autoinit,autoload:()=>y.autoload,base64ToArray:()=>d.base64ToArray,bondLength:()=>s.bondLength,builtinColorSchemes:()=>i.builtinColorSchemes,builtinGradients:()=>n.builtinGradients,chains:()=>i.chains,clamp:()=>l.clamp,conversionMatrix3:()=>l.conversionMatrix3,createStereoViewer:()=>b.createStereoViewer,createViewer:()=>b.createViewer,createViewerGrid:()=>b.createViewerGrid,deepCopy:()=>d.deepCopy,degToRad:()=>l.degToRad,download:()=>d.download,drawCartoon:()=>g.drawCartoon,elementColors:()=>i.elementColors,extend:()=>d.extend,get:()=>d.get,getAtomProperty:()=>d.getAtomProperty,getColorFromStyle:()=>d.getColorFromStyle,getElement:()=>d.getElement,getExtent:()=>d.getExtent,getGradient:()=>n.getGradient,getPropertyRange:()=>d.getPropertyRange,getbin:()=>d.getbin,htmlColors:()=>i.htmlColors,isEmptyObject:()=>d.isEmptyObject,isNumeric:()=>d.isNumeric,makeFunction:()=>d.makeFunction,mergeGeos:()=>d.mergeGeos,normalizeValue:()=>n.normalizeValue,partialCharges:()=>a.partialCharges,processing_autoinit:()=>y.processing_autoinit,residues:()=>i.residues,setBondLength:()=>s.setBondLength,setSyncSurface:()=>u.setSyncSurface,specStringToObject:()=>d.specStringToObject,splitMesh:()=>p.splitMesh,ssColors:()=>i.ssColors,subdivide_spline:()=>g.subdivide_spline,syncSurface:()=>u.syncSurface,viewers:()=>y.viewers});var n=r("./src/Gradient.ts"),i=r("./src/colors.ts"),o=r("./src/Label.ts"),a=r("./src/partialCharges.ts"),s=r("./src/parsers/index.ts"),l=r("./src/WebGL/math/index.ts"),c=r("./src/WebGL/shapes/index.ts"),d=r("./src/utilities.ts"),u=r("./src/ProteinSurface4.ts"),h=r("./src/VolumeData.ts"),f=r("./src/VolumetricRender.ts"),p=r("./src/GLShape.ts"),m=r("./src/GLDraw.ts"),g=r("./src/glcartoon.ts"),v=r("./src/GLModel.ts"),b=r("./src/GLViewer.ts"),y=r("./src/autoload.ts");r("./src/specs.ts"),window&&(window.$3Dmol=e)},"./src/parsers/CDJSON.ts":(t,e,r)=>{"use strict";function n(t,e){var r=[[]];"string"==typeof t&&(t=JSON.parse(t));for(var n=t.m,i=n[0].a,o=n[0].b,a=n[0].s,s=void 0!==e&&void 0!==e.parseStyle?e.parseStyle:void 0!==a,l=r[r.length-1].length,c=0;cn})},"./src/parsers/CIF.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{CIF:()=>s});var n=r("./src/parsers/utils/computeSecondaryStructure.ts"),i=r("./src/parsers/utils/processSymmetries.ts"),o=r("./src/WebGL/index.ts"),a=r("./src/parsers/utils/assignPDBBonds.ts");function s(t,e={}){var r=[],s=!e.doAssembly,l=r.modelData=[],c=void 0===e.assignBonds||e.assignBonds;function d(t,e){for(var r=[],n=0,i=0;i-1){let t=p.split("");t[m]="_",p=(p=t.join("")).substring(0,m)+"_"+p.substring(m+1)}}h.push(p)}}for(var g,v,b,y,x=0;x{"use strict";r.r(e),r.d(e,{CUBE:()=>a});var n=r("./src/WebGL/index.ts"),i=r("./src/parsers/utils/assignBonds.ts"),o=r("./src/parsers/utils/anumToSymbol.ts");function a(t,e){e=e||{};var r=[[]],a=t.split(/\r?\n/),s=void 0===e.assignBonds||e.assignBonds;if(a.length<6)return r;var l=a[2].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),c=Math.abs(parseFloat(l[0]));let d={};var u=d.origin=new n.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3]));l=a[3].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");var h=(l=a[3].replace(/^\s+/,"").replace(/\s+/g," ").split(" "))[0]>0?.529177:1;u.multiplyScalar(h);var f=Math.abs(l[0]),p=new n.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])).multiplyScalar(h);l=a[4].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");var m=Math.abs(l[0]),g=new n.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])).multiplyScalar(h);l=a[5].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");var v=Math.abs(l[0]),b=new n.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])).multiplyScalar(h);if(d.size={x:f,y:m,z:v},d.unit=new n.Vector3(p.x,g.y,b.z),0!=p.y||0!=p.z||0!=g.x||0!=g.z||0!=b.x||0!=b.y){d.matrix4=new n.Matrix4(p.x,g.x,b.x,0,p.y,g.y,b.y,0,p.z,g.z,b.z,0,0,0,0,1);let t=(new n.Matrix4).makeTranslation(u.x,u.y,u.z);d.matrix4=d.matrix4.multiplyMatrices(t,d.matrix4),d.matrix=d.matrix4.matrix3FromTopLeft(),d.origin=new n.Vector3(0,0,0),d.unit=new n.Vector3(1,1,1)}r.modelData=[{cryst:d}],a=a.splice(6,c);for(var y=r[r.length-1].length,x=y+a.length,w=y;w{"use strict";r.r(e),r.d(e,{GRO:()=>o});var n=r("./src/parsers/utils/assignPDBBonds.ts"),i=r("./src/parsers/utils/atomNameToElem.ts");function o(t,e){for(var r=[],o=t.split(/\r?\n|\r/);o.length>0&&!(o.length<3);){var a=parseInt(o[1]);if(isNaN(a)||a<=0)break;if(o.length44&&(f.dx=10*parseFloat(h.slice(44,52)),f.dy=10*parseFloat(h.slice(52,60)),f.dz=10*parseFloat(h.slice(60,68))),s[u]=f}if(o.length<=l+3){var p=o[l++].trim().split(/\s+/);if(3==p.length){for(var m=0;m<3;m++)p[m]=10*parseFloat(p[m]);r.box=p}}o.splice(0,++l)}for(let t=0;t{"use strict";r.r(e),r.d(e,{LAMMPSTRJ:()=>i});var n=r("./src/parsers/utils/assignBonds.ts");function i(t,e){for(var r=[],i={id:"serial",type:"atom",element:"elem",q:"charge",radius:"radius",x:"x",xu:"x",xs:"x",xsu:"x",y:"y",yu:"y",ys:"y",ysu:"y",z:"z",zu:"z",zs:"z",zsu:"z"},o=t.split(/\r?\n|\r/),a=0,s=0,l=0;l{"use strict";r.r(e),r.d(e,{MMTFparser:()=>u});var n=r("./src/utilities.ts"),i=r("./src/WebGL/index.ts"),o=r("./src/parsers/utils/computeSecondaryStructure.ts"),a=r("./src/parsers/utils/processSymmetries.ts"),s=r("./src/vendor/mmtf.js"),l=function(t){return String.fromCharCode.apply(null,t).replace(/\0/g,"")},c=function(t){return 0==t||2==t||4==t?"h":3==t?"s":"c"};let d=new Set(["D-SACCHARIDE","D-SACCHARIDE 1,4 AND 1,4 LINKING","D-SACCHARIDE 1,4 AND 1,6 LINKING","L-SACCHARIDE","L-SACCHARIDE 1,4 AND 1,4 LINKING","L-SACCHARIDE 1,4 AND 1,6 LINKING","NON-POLYMER","OTHER","PEPTIDE-LIKE","SACCHARIDE"]);function u(t,e){var r=!e.keepH,u=e.altLoc?e.altLoc:"A",h=!!e.noSecondaryStructure,f=!e.noComputeSecondaryStructure,p=!e.doAssembly,m=e.assemblyIndex?e.assemblyIndex:0;t="string"==typeof t?(0,n.base64ToArray)(t):new Uint8Array(t);var g,v,b,y,x,w,_=s.decode(t),k=[[]],A=k.modelData=[],T=0,M=0,S=0,C=_.secStructList,E=_.bFactorList,L=_.altLocList,z=_.occupancyList,O=_.bondAtomList,D=_.bondOrderList,I=_.numModels;if(0==I)return k;e.multimodel||(I=1);var R=[];if(!p&&_.bioAssemblyList&&_.bioAssemblyList.length>0){var F=_.bioAssemblyList[m].transformList;for(g=0,w=F.length;g{t.chainIndexList.forEach((e=>{B[e]="polymer"==t.type}))}));var U=0;for(x=0;x=C.length||c(C[et]!=tt))&&(Q=!0)}var rt=_.groupIdList[M],nt=X.groupName;let t=X.chemCompType;var it=S;let e=d.has(t)||!B[T];for(b=0;b<$;++b){var ot=X.elementList[b];if(r&&"H"==ot)S+=1;else{var at="";E&&(at=E[S]);var st="";L&&L[S]&&(st=String.fromCharCode(L[S]));var lt="";if(z&&(lt=z[S]),""==st||st==u||"*"==u){var ct=_.atomIdList[S],dt=X.atomNameList[b],ut=0;X.atomChargeList&&(ut=X.atomChargeList[b]);var ht=_.xCoordList[S],ft=_.yCoordList[S],pt=_.zCoordList[S];H[S]=V.length,V.push({resn:nt,x:ht,y:ft,z:pt,elem:ot,hetflag:e,chain:q,resi:rt,icode:st,rescode:rt+(" "!=st?"^"+st:""),serial:ct,altLoc:st,index:S,atom:dt,bonds:[],ss:c(J),ssbegin:K,ssend:Q,bondOrder:[],properties:{charge:ut,occupancy:lt},b:at}),S+=1}else S+=1}}var mt=X.bondAtomList;for(b=0,y=X.bondOrderList.length;b=S){U=t;break}let i=H[e],o=H[r],a=V[i],s=V[o];a&&s&&(a.bonds.push(o),a.bondOrder.push(n),s.bonds.push(i),s.bondOrder.push(n))}e.multimodel&&(e.onemol||k.push([]))}if(!p)for(let t=0;t{"use strict";r.r(e),r.d(e,{MOL2:()=>i});let n={"C.1":"C",C1:"C","C.2":"C",C2:"C","C.3":"C",C3:"C","C.ar":"C",Car:"C","C.cat":"C",Ccat:"C","H.spc":"H",Hspc:"H","H.t3p":"H",Ht3p:"H","N.1":"N",N1:"N","N.2":"N",N2:"N","N.3":"N",N3:"N","N.4":"N",N4:"N","N.am":"N",Nam:"N","N.ar":"N",Nar:"N","N.p13":"N",Np13:"N","O.2":"O",O2:"O","O.3":"O",O3:"O","O.co2":"O",Oco2:"O","O.spc":"O",Ospc:"O","O.t3p":"O",Ot3p:"O","P.3":"P",P3:"P","S.2":"S",S2:"S","S.3":"S",S3:"S","S.o":"S",So:"S","S.o2":"S",So2:"S"};function i(t,e){var r=[[]],i=!1;void 0!==e.keepH&&(i=!e.keepH);var o=t.search(/@MOLECULE/),a=t.search(/@ATOM/);if(-1==o||-1==a)return r;for(var s=t.substring(o).split(/\r?\n|\r/);s.length>0;){var l=[],c=s[2].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),d=parseInt(c[0]),u=0;c.length>1&&(u=parseInt(c[1]));var h,f=4;for(h=3;hATOM"==s[h]){f=h+1;break}var p=r[r.length-1].length,m=p+d;for(h=p;hBOND"==s[f++]){w=!0;break}if(w&&u)for(h=0;h{"use strict";r.r(e),r.d(e,{PDB:()=>i});var n=r("./src/parsers/utils/getSinglePDB.ts");function i(t,e){e=e||{};var r=[],i={};r.modelData=[];for(var o=t.split(/\r?\n|\r/);o.length>0;){var a=(0,n.getSinglePDB)(o,e,i),s=a[0],l=a[1];if(o=a[2],0!=s.length){if(e.multimodel&&e.onemol&&r.length>0)for(var c=r[0].length,d=0;d{"use strict";r.r(e),r.d(e,{PQR:()=>o});var n=r("./src/parsers/utils/assignPDBBonds.ts"),i=r("./src/parsers/utils/computeSecondaryStructure.ts");function o(t,e){var r=[[]],o=!e.noSecondaryStructure;r.modelData=[{symmetries:[]}];var a,s=[],l=t.split(/\r?\n|\r/);for(let t=0;t1&&e[1].toUpperCase()!=e[1]&&(v=e.substring(0,2)),d="H"==a[0],s[t]=r[r.length-1].length,r[r.length-1].push({resn:n,x:h,y:f,z:p,elem:v,hetflag:d,chain:i,resi:o,serial:t,atom:e,bonds:[],ss:"c",bondOrder:[],properties:{charge:m,partialCharge:m,radius:g},pdbline:a})}else if("CONECT"==c){var b=parseInt(a.substring(6,11)),y=r[r.length-1][s[b]];for(let t=0;t<4;t++){var x=parseInt(a.substring([11,16,21,26][t],[11,16,21,26][t]+5)),w=r[r.length-1][s[x]];void 0!==y&&void 0!==w&&(y.bonds.push(s[x]),y.bondOrder.push(1))}}}for(let t=0;t{"use strict";function n(t){var e,r=[],n=0,i=t.split(/\r?\n|\r/);if(!(i.length>0&&i[0].includes("VERSION")))return[];var o=i.filter((function(t){return t.includes("POINTERS")||t.includes("ATOM_NAME")||t.includes("CHARGE")||t.includes("RADII")||t.includes("BONDS_INC_HYDROGEN")||t.includes("BONDS_WITHOUT_HYDROGEN")})),a=d("POINTERS");if(-1==a)return[];var s=u(a),l=parseInt(i[a+1].slice(0,s[1]));if(isNaN(l)||l<=0)return[];if(-1==(a=d("ATOM_NAME")))return[];var c=(s=u(a))[0];for(let t=0;t0){for(;!i[e].includes("FORMAT");)e++;return e}return-1}function u(t){var e=i[t].match(/\((\d*)\S*/),r=i[t].match(/[a-zA-Z](\d*)\)\s*/);return null==r&&(r=i[t].match(/[a-zA-Z](\d*)\.\d*\)\s*/)),[e[1],r[1]]}return[r]}r.r(e),r.d(e,{PRMTOP:()=>n})},"./src/parsers/SDF.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SDF:()=>o});var n=function(t,e){var r=[[]],n=!1;for(void 0!==e.keepH&&(n=!e.keepH);t.length>0&&!(t.length<4);){var i=parseInt(t[3].substring(0,3));if(isNaN(i)||i<=0)break;var o=parseInt(t[3].substring(3,6)),a=4;if(t.length<4+i+o)break;var s,l,c=[],d=r[r.length-1].length,u=d+i;for(s=d;s0&&!(t.length<8)&&t[4].startsWith("M V30 BEGIN CTAB")&&t[5].startsWith("M V30 COUNTS")&&!(t[5].length<14);){var i=t[5].substring(13).match(/\S+/g);if(i.length<2)break;var o=parseInt(i[0]);if(isNaN(o)||o<=0)break;var a=parseInt(i[1]),s=7;if(t.length<8+o+a)break;var l,c=[],d=r[r.length-1].length,u=d+o;for(l=d;l4){var f={},p=h[1].replace(/ /g,"");f.atom=f.elem=p[0].toUpperCase()+p.substring(1).toLowerCase(),"H"===f.elem&&n||(f.serial=l,c[l]=r[r.length-1].length,f.x=parseFloat(h[2]),f.y=parseFloat(h[3]),f.z=parseFloat(h[4]),f.hetflag=!0,f.bonds=[],f.bondOrder=[],f.properties={},f.index=r[r.length-1].length,r[r.length-1].push(f))}}if("M V30 END ATOM"!==t[s])break;if(s++,0===a||"M V30 BEGIN BOND"!==t[s])break;for(s++,l=0;l3){var g=c[parseInt(m[2])-1+d],v=c[parseInt(m[3])-1+d],b=parseFloat(m[1]);void 0!==g&&void 0!==v&&(r[r.length-1][g].bonds.push(v),r[r.length-1][g].bondOrder.push(b),r[r.length-1][v].bonds.push(g),r[r.length-1][v].bondOrder.push(b))}}if(!e.multimodel)break;for(e.onemol||r.push([]);"$$$$"!==t[s]&&s3&&o[3].length>38&&(r=o[3].substring(34,39)),"V2000"===r?n(o,e):"V3000"===r?i(o,e):[[""]]}},"./src/parsers/VASP.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{VASP:()=>i});var n=r("./src/WebGL/index.ts");function i(t){var e=[[]],r={},i=t.replace(/^\s+/,"").split(/\r?\n/);if(i.length<3)return e;if(!i[1].match(/\d+/))return console.log("Warning: second line of the vasp structure file must be a number"),e;if(r.length=parseFloat(i[1]),r.length<0)return console.log("Warning: Vasp implementation for negative lattice lengths is not yet available"),e;r.xVec=new Float32Array(i[2].replace(/^\s+/,"").split(/\s+/)),r.yVec=new Float32Array(i[3].replace(/^\s+/,"").split(/\s+/)),r.zVec=new Float32Array(i[4].replace(/^\s+/,"").split(/\s+/));var o=new n.Matrix3(r.xVec[0],r.xVec[1],r.xVec[2],r.yVec[0],r.yVec[1],r.yVec[2],r.zVec[0],r.zVec[1],r.zVec[2]);o.multiplyScalar(r.length),e.modelData=[{symmetries:[],cryst:{matrix:o}}];var a=i[5].replace(/\s+/,"").replace(/\s+$/,"").split(/\s+/),s=new Int16Array(i[6].replace(/^\s+/,"").split(/\s+/)),l=i[7].replace(/\s+/,"");if(l.match(/C/))l="cartesian";else{if(!l.match(/D/))return console.log("Warning: Unknown vasp mode in POSCAR file: mode must be either C(artesian) or D(irect)"),e;l="direct"}if(a.length!=s.length)return console.log("Warning: declaration of atomary species wrong:"),console.log(a),console.log(s),e;i.splice(0,8);for(var c=0,d=0,u=a.length;d{"use strict";r.r(e),r.d(e,{XYZ:()=>o});var n=r("./src/WebGL/index.ts"),i=r("./src/parsers/utils/assignBonds.ts");function o(t,e){for(var r=[[]],o=void 0===(e=e||{}).assignBonds||e.assignBonds,a=t.split(/\r?\n|\r/);a.length>0&&!(a.length<3);){var s=parseInt(a[0]);if(isNaN(s)||s<=0)break;if(a.length1){var c=new Float32Array(l[1].split(/\s+/)),d=new n.Matrix3(c[0],c[3],c[6],c[1],c[4],c[7],c[2],c[5],c[8]);r.modelData=[{cryst:{matrix:d}}]}for(var u=2,h=r[r.length-1].length,f=h+s,p=h;p=7&&(g.dx=parseFloat(m[4]),g.dy=parseFloat(m[5]),g.dz=parseFloat(m[6]))}if(!e.multimodel)break;r.push([]),a.splice(0,u)}if(o)for(let t=0;t{"use strict";r.r(e),r.d(e,{Parsers:()=>v,bondLength:()=>g.bondLength,setBondLength:()=>g.setBondLength});var n=r("./src/parsers/VASP.ts"),i=r("./src/parsers/CUBE.ts"),o=r("./src/parsers/XYZ.ts"),a=r("./src/parsers/SDF.ts"),s=r("./src/parsers/CDJSON.ts"),l=r("./src/parsers/CIF.ts"),c=r("./src/parsers/MOL2.ts"),d=r("./src/parsers/PDB.ts"),u=r("./src/parsers/PQR.ts"),h=r("./src/parsers/MMTF.ts"),f=r("./src/parsers/PRMTOP.ts"),p=r("./src/parsers/GRO.ts"),m=r("./src/parsers/LAMMPSTRJ.ts"),g=r("./src/parsers/utils/bondLength.ts");const v={vasp:n.VASP,VASP:n.VASP,cube:i.CUBE,CUBE:i.CUBE,xyz:o.XYZ,XYZ:o.XYZ,sdf:a.SDF,SDF:a.SDF,json:s.CDJSON,cdjson:s.CDJSON,CDJSON:s.CDJSON,mcif:l.CIF,cif:l.CIF,CIF:l.CIF,mol2:c.MOL2,MOL2:c.MOL2,pdb:d.PDB,PDB:d.PDB,pdbqt:d.PDB,PDBQT:d.PDB,pqr:u.PQR,PQR:u.PQR,mmtf:h.MMTFparser,MMTF:h.MMTFparser,prmtop:f.PRMTOP,PRMTOP:f.PRMTOP,gro:p.GRO,GRO:p.GRO,lammpstrj:m.LAMMPSTRJ,LAMMPSTRJ:m.LAMMPSTRJ}},"./src/parsers/utils/anumToSymbol.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{anumToSymbol:()=>n});const n={1:"H",2:"He",3:"Li",4:"Be",5:"B",6:"C",7:"N",8:"O",9:"F",10:"Ne",11:"Na",12:"Mg",13:"Al",14:"Si",15:"P",16:"S",17:"Cl",18:"Ar",19:"K",20:"Ca",21:"Sc",22:"Ti",23:"V",24:"Cr",25:"Mn",26:"Fe",27:"Co",28:"Ni",29:"Cu",30:"Zn",31:"Ga",32:"Ge",33:"As",34:"Se",35:"Br",36:"Kr",37:"Rb",38:"Sr",39:"Y",40:"Zr",41:"Nb",42:"Mo",43:"Tc",44:"Ru",45:"Rh",46:"Pd",47:"Ag",48:"Cd",49:"In",50:"Sn",51:"Sb",52:"Te",53:"I",54:"Xe",55:"Cs",56:"Ba",71:"Lu",72:"Hf",73:"Ta",74:"W",75:"Re",76:"Os",77:"Ir",78:"Pt",79:"Au",80:"Hg",81:"Tl",82:"Pb",83:"Bi",84:"Po",85:"At",86:"Rn",87:"Fr",88:"Ra",104:"Rf",105:"Db",106:"Sg",107:"Bh",108:"Hs",109:"Mt",110:"Ds",111:"Rg",112:"Cn",113:"Nh",114:"Fl",115:"Mc",116:"Lv",117:"Ts",118:"Og",57:"La",58:"Ce",59:"Pr",60:"Nd",61:"Pm",62:"Sm",63:"Eu",64:"Gd",65:"Tb",66:"Dy",67:"Ho",68:"Er",69:"Tm",70:"Yb",89:"Ac",90:"Th",91:"Pa",92:"U",93:"Np",94:"Pu",95:"Am",96:"Cm",97:"Bk",98:"Cf",99:"Es",100:"Fm",101:"Md",102:"No"}},"./src/parsers/utils/areConnected.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{areConnected:()=>o});var n=r("./src/parsers/utils/bondLength.ts");const i=new Set(["Na","K","Ca","Mg","Mn","Sr"]);function o(t,e,r){if(r&&r.unboundCations&&(i.has(t.elem)||i.has(e.elem)))return!1;let o=(0,n.bondLength)(t.elem)+(0,n.bondLength)(e.elem);o+=.25,o*=o;let a=t.x-e.x;if(a*=a,a>o)return!1;let s=t.y-e.y;if(s*=s,s>o)return!1;let l=t.z-e.z;if(l*=l,l>o)return!1;const c=a+s+l;return!(isNaN(c)||c<.5||c>o||t.altLoc!==e.altLoc&&" "!==t.altLoc&&" "!==e.altLoc)}},"./src/parsers/utils/assignBackboneHBonds.ts":(t,e,r)=>{"use strict";function n(t,e){const r=e||3.2,n=r*r,i=[];for(let e=0,r=t.length;er)break;if(t.atom==o.atom)continue;const s=Math.abs(t.y-o.y);if(s>r)continue;const l=Math.abs(t.x-o.x);if(l>r)continue;const c=l*l+s*s+e*e;c>n||t.chain==o.chain&&Math.abs(t.resi-o.resi)<4||(cn})},"./src/parsers/utils/assignBonds.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{assignBonds:()=>a});var n=r("./src/parsers/utils/areConnected.ts");const i=[{x:0,y:0,z:1},{x:0,y:1,z:-1},{x:0,y:1,z:0},{x:0,y:1,z:1},{x:1,y:-1,z:-1},{x:1,y:-1,z:0},{x:1,y:-1,z:1},{x:1,y:0,z:-1},{x:1,y:0,z:0},{x:1,y:0,z:1},{x:1,y:1,z:-1},{x:1,y:1,z:0},{x:1,y:1,z:1}],o=4.95;function a(t,e){for(let e=0,r=t.length;e{"use strict";r.r(e),r.d(e,{assignPDBBonds:()=>a});var n=r("./src/parsers/utils/areConnected.ts"),i=r("./src/parsers/utils/assignBonds.ts"),o=r("./src/parsers/utils/standardResidues.ts");function a(t,e){const r=[],a=[];for(let e=0,n=t.length;e1)break;(0,n.areConnected)(i,t,e)&&(-1===i.bonds.indexOf(t.index)&&(i.bonds.push(t.index),i.bondOrder.push(1),t.bonds.push(i.index),t.bondOrder.push(1)),i.resi!==t.resi&&(s=!0))}}}},"./src/parsers/utils/atomNameToElem.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{atomNameToElem:()=>i});var n=r("./src/parsers/utils/bondLength.ts");function i(t,e){let r=t.replace(/ /g,"");return r.length>0&&"H"===r[0]&&"Hg"!==r&&"He"!==r&&"Hf"!==r&&"Hs"!==r&&"Ho"!==r&&(r="H"),r.length>1&&(r=r[0].toUpperCase()+r.substring(1).toLowerCase(),void 0===n.bondTable[r]?r=r[0]:e&&("Ca"===r||"Cd"===r)&&(r="C")),r}},"./src/parsers/utils/bondLength.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{bondLength:()=>i,bondTable:()=>n,setBondLength:()=>o});let n={H:.37,He:.32,Li:1.34,Be:.9,B:.82,C:.77,N:.75,O:.73,F:.71,Ne:.69,Na:1.54,Mg:1.3,Al:1.18,Si:1.11,P:1.06,S:1.02,Cl:.99,Ar:.97,K:1.96,Ca:1.74,Sc:1.44,Ti:1.56,V:1.25,Mn:1.39,Fe:1.25,Co:1.26,Ni:1.21,Cu:1.38,Zn:1.31,Ga:1.26,Ge:1.22,Se:1.16,Br:1.14,Kr:1.1,Rb:2.11,Sr:1.92,Y:1.62,Zr:1.48,Nb:1.37,Mo:1.45,Tc:1.56,Ru:1.26,Rh:1.35,Pd:1.31,Ag:1.53,Cd:1.48,In:1.44,Sn:1.41,Sb:1.38,Te:1.35,I:1.33,Xe:1.3,Cs:2.25,Ba:1.98,Lu:1.6,Hf:1.5,Ta:1.38,W:1.46,Re:1.59,Os:1.44,Ir:1.37,Pt:1.28,Au:1.44,Hg:1.49,Tl:1.48,Pb:1.47,Bi:1.46,Rn:1.45};function i(t){return n[t]||1.6}function o(t,e){e<0&&(e=0),n[t]=e}},"./src/parsers/utils/computeSecondaryStructure.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{computeSecondaryStructure:()=>i});var n=r("./src/parsers/utils/assignBackboneHBonds.ts");function i(t,e){(0,n.assignBackboneHBonds)(t,e);const r={};let i,o,a,s,l,c;for(i=0,o=t.length;i{"use strict";r.r(e),r.d(e,{getSinglePDB:()=>u});var n=r("./src/WebGL/index.ts"),i=r("./src/parsers/utils/atomNameToElem.ts"),o=r("./src/parsers/utils/bondLength.ts"),a=r("./src/parsers/utils/computeSecondaryStructure.ts"),s=r("./src/parsers/utils/isEmpty.ts"),l=r("./src/parsers/utils/processSymmetries.ts"),c=r("./src/parsers/utils/assignPDBBonds.ts"),d=r("./src/parsers/utils/validateBonds.ts");function u(t,e,r){const u=[],h=void 0===e.assignBonds||e.assignBonds,f=!e.keepH,p=!!e.noSecondaryStructure,m=!e.noComputeSecondaryStructure,g=!e.doAssembly,v=e.altLoc?e.altLoc:"A",b={symmetries:[],cryst:void 0};let y,x=[];const w=[];let _;const k={};for(let e=0;e=4?1:r}}else k[o]=1,0!=e.bonds.length&&e.bonds[e.bonds.length-1]===i||(e.bonds.push(i),e.bondOrder.push(1))}}else if("HELIX "===a){s=_.substring(19,20),l=parseInt(_.substring(21,25)),c=parseInt(_.substring(33,37)),s in r||(r[s]={}),r[s][l]="h1";for(let t=l+1;t1&&("1"==t[1]?e.ssbegin=!0:"2"==t[1]&&(e.ssend=!0))}}return[u,b,x]}},"./src/parsers/utils/isEmpty.ts":(t,e,r)=>{"use strict";function n(t){for(const e in t)return!1;return!0}r.r(e),r.d(e,{isEmpty:()=>n})},"./src/parsers/utils/processSymmetries.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{processSymmetries:()=>i});var n=r("./src/WebGL/index.ts");function i(t,e,r,i){const o=!r.duplicateAssemblyAtoms,a=e.length;let s=a,l=-1,c=null,d=null;(r.normalizeAssembly||r.wrapAtoms)&&i&&(c=(0,n.conversionMatrix3)(i.a,i.b,i.c,i.alpha,i.beta,i.gamma),d=new n.Matrix3,d.getInverse3(c));let u=function(t){let e=t.clone().applyMatrix3(d);const r=[e.x,e.y,e.z],i=[0,0,0];for(let t=0;t<3;t++){for(;r[t]<-.001;)r[t]+=1,i[t]+=1;for(;r[t]>1.001;)r[t]-=1,i[t]-=1}const o=new n.Vector3(i[0],i[1],i[2]);return o.applyMatrix3(c),o};if(r.normalizeAssembly&&i)for(let r=0;r.001&&(l=r),t[r].translate(o)}if(o){if(t.length>1)for(let r=0;r=0){const r=new n.Vector3;for(let n=0;n{"use strict";r.r(e),r.d(e,{standardResidues:()=>n});const n=new Set(["ABU","ACD","ALA","ALB","ALI","ARG","AR0","ASN","ASP","ASX","BAS","CYS","CYH","CYX","CSS","CSH","GLN","GLU","GLX","GLY","HIS","HIE","HID","HIP","HYP","ILE","ILU","LEU","LYS","MET","PCA","PGA","PHE","PR0","PRO","PRZ","SER","THR","TRP","TYR","VAL","A","1MA","C","5MC","OMC","G","1MG","2MG","M2G","7MG","OMG","YG","I","T","U","+U","H2U","5MU","PSU","ACE","F0R","H2O","HOH","WAT"])},"./src/parsers/utils/validateBonds.ts":(t,e,r)=>{"use strict";function n(t,e){for(let r=0,n=t.length;rn})},"./src/partialCharges.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{applyPartialCharges:()=>i,partialCharges:()=>n});const n={"ALA:N":-.15,"ALA:CA":.1,"ALA:CB":0,"ALA:C":.6,"ALA:O":-.55,"ARG:N":-.15,"ARG:CA":.1,"ARG:CB":0,"ARG:CG":0,"ARG:CD":.1,"ARG:NE":-.1,"ARG:CZ":.5,"ARG:NH1":.25,"ARG:NH2":.25,"ARG:C":.6,"ARG:O":-.55,"ASN:N":-.15,"ASN:CA":.1,"ASN:CB":0,"ASN:CG":.55,"ASN:OD1":-.55,"ASN:ND2":0,"ASN:C":.6,"ASN:O":-.55,"ASP:N":-.15,"ASP:CA":.1,"ASP:CB":0,"ASP:CG":.14,"ASP:OD1":-.57,"ASP:OD2":-.57,"ASP:C":.6,"ASP:O":-.55,"CYS:N":-.15,"CYS:CA":.1,"CYS:CB":.19,"CYS:SG":-.19,"CYS:C":.6,"CYS:O":-.55,"GLN:N":-.15,"GLN:CA":.1,"GLN:CB":0,"GLN:CG":0,"GLN:CD":.55,"GLN:OE1":-.55,"GLN:NE2":0,"GLN:C":.6,"GLN:O":-.55,"GLU:N":-.15,"GLU:CA":.1,"GLU:CB":0,"GLU:CG":0,"GLU:CD":.14,"GLU:OE1":-.57,"GLU:OE2":-.57,"GLU:C":.6,"GLU:O":-.55,"GLY:N":-.15,"GLY:CA":.1,"GLY:C":.6,"GLY:O":-.55,"HIS:N":-.15,"HIS:CA":.1,"HIS:CB":0,"HIS:CG":.1,"HIS:ND1":-.1,"HIS:CD2":.1,"HIS:NE2":-.4,"HIS:CE1":.3,"HIS:C":.6,"HIS:O":-.55,"ILE:N":-.15,"ILE:CA":.1,"ILE:CB":0,"ILE:CG2":0,"ILE:CG1":0,"ILE:CD":0,"ILE:C":.6,"ILE:O":-.55,"LEU:N":-.15,"LEU:CA":.1,"LEU:CB":0,"LEU:CG":0,"LEU:CD1":0,"LEU:CD2":0,"LEU:C":.6,"LEU:O":-.55,"LYS:N":-.15,"LYS:CA":.1,"LYS:CB":0,"LYS:CG":0,"LYS:CD":0,"LYS:CE":.25,"LYS:NZ":.75,"LYS:C":.6,"LYS:O":-.55,"MET:N":-.15,"MET:CA":.1,"MET:CB":0,"MET:CG":.06,"MET:SD":-.12,"MET:CE":.06,"MET:C":.6,"MET:O":-.55,"PHE:N":-.15,"PHE:CA":.1,"PHE:CB":0,"PHE:CG":0,"PHE:CD1":0,"PHE:CD2":0,"PHE:CE1":0,"PHE:CE2":0,"PHE:CZ":0,"PHE:C":.6,"PHE:O":-.55,"PRO:N":-.25,"PRO:CD":.1,"PRO:CA":.1,"PRO:CB":0,"PRO:CG":0,"PRO:C":.6,"PRO:O":-.55,"SER:N":-.15,"SER:CA":.1,"SER:CB":.25,"SER:OG":-.25,"SER:C":.6,"SER:O":-.55,"THR:N":-.15,"THR:CA":.1,"THR:CB":.25,"THR:OG1":-.25,"THR:CG2":0,"THR:C":.6,"THR:O":-.55,"TRP:N":-.15,"TRP:CA":.1,"TRP:CB":0,"TRP:CG":-.03,"TRP:CD2":.1,"TRP:CE2":-.04,"TRP:CE3":-.03,"TRP:CD1":.06,"TRP:NE1":-.06,"TRP:CZ2":0,"TRP:CZ3":0,"TRP:CH2":0,"TRP:C":.6,"TRP:O":-.55,"TYR:N":-.15,"TYR:CA":.1,"TYR:CB":0,"TYR:CG":0,"TYR:CD1":0,"TYR:CE1":0,"TYR:CD2":0,"TYR:CE2":0,"TYR:CZ":.25,"TYR:OH":-.25,"TYR:C":.6,"TYR:O":-.55,"VAL:N":-.15,"VAL:CA":.1,"VAL:CB":0,"VAL:CG1":0,"VAL:CG2":0,"VAL:C":.6,"VAL:O":-.55};function i(t,e){if((!e||void 0===t.partialCharge)&&t.resn&&t.atom){var r=t.resn+":"+t.atom;t.properties.partialCharge=n[r]}}},"./src/specs.ts":(t,e,r)=>{"use strict";r.r(e)},"./src/utilities.ts":(__unused_webpack_module,__nested_webpack_exports__,__nested_webpack_require_1113028__)=>{"use strict";__nested_webpack_require_1113028__.r(__nested_webpack_exports__),__nested_webpack_require_1113028__.d(__nested_webpack_exports__,{PausableTimer:()=>PausableTimer,adjustVolumeStyle:()=>adjustVolumeStyle,base64ToArray:()=>base64ToArray,deepCopy:()=>deepCopy,download:()=>download,extend:()=>extend,get:()=>get,getAtomProperty:()=>getAtomProperty,getColorFromStyle:()=>getColorFromStyle,getElement:()=>getElement,getExtent:()=>getExtent,getPropertyRange:()=>getPropertyRange,getbin:()=>getbin,isEmptyObject:()=>isEmptyObject,isNumeric:()=>isNumeric,makeFunction:()=>makeFunction,mergeGeos:()=>mergeGeos,specStringToObject:()=>specStringToObject});var _Gradient__WEBPACK_IMPORTED_MODULE_0__=__nested_webpack_require_1113028__("./src/Gradient.ts"),_VolumeData__WEBPACK_IMPORTED_MODULE_1__=__nested_webpack_require_1113028__("./src/VolumeData.ts"),_colors__WEBPACK_IMPORTED_MODULE_2__=__nested_webpack_require_1113028__("./src/colors.ts");function extend(t,e){for(var r in e)e.hasOwnProperty(r)&&void 0!==e[r]&&(t[r]=e[r]);return t}function deepCopy(t){let e,r,n;if(null==t)return{};if("object"!=typeof t||null===t)return t;for(n in e=Array.isArray(t)?[]:{},t)r=t[n],e[n]=deepCopy(r);return e}function isNumeric(t){var e=typeof t;return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))}function isEmptyObject(t){var e;for(e in t)return!1;return!0}function makeFunction(callback){return callback&&"string"==typeof callback&&(callback=eval("("+callback+")")),callback&&"function"!=typeof callback?null:callback}function adjustVolumeStyle(t){t&&(!t.volformat||t.voldata instanceof _VolumeData__WEBPACK_IMPORTED_MODULE_1__.VolumeData||(t.voldata=new _VolumeData__WEBPACK_IMPORTED_MODULE_1__.VolumeData(t.voldata,t.volformat)),t.volscheme&&(t.volscheme=_Gradient__WEBPACK_IMPORTED_MODULE_0__.Gradient.getGradient(t.volscheme)))}function getExtent(t,e){var r,n,i,o,a,s,l,c,d,u,h=!e;if(r=n=i=9999,o=a=s=-9999,l=c=d=u=0,0===t.length)return[[0,0,0],[0,0,0],[0,0,0]];for(var f=0;fp.x?o:p.x,a=a>p.y?a:p.y,s=s>p.z?s:p.z,p.symmetries&&h))for(var m=0;mp.symmetries[m].x?o:p.symmetries[m].x,a=a>p.symmetries[m].y?a:p.symmetries[m].y,s=s>p.symmetries[m].z?s:p.symmetries[m].z}return[[r,n,i],[o,a,s],[l/u,c/u,d/u]]}function getPropertyRange(t,e){for(var r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,i=0,o=t.length;in&&(n=a))}return isFinite(r)||isFinite(n)?isFinite(r)?isFinite(n)||(n=r):r=n:r=n=0,[r,n]}class PausableTimer{constructor(t,e,r){this.total_time_run=0,this.fn=t,this.arg=r,this.countdown=e,this.start_time=(new Date).getTime(),this.ident=setTimeout(t,e,r)}cancel(){clearTimeout(this.ident)}pause(){clearTimeout(this.ident),this.total_time_run=(new Date).getTime()-this.start_time}resume(){this.ident=setTimeout(this.fn,Math.max(0,this.countdown-this.total_time_run),this.arg)}}function base64ToArray(t){for(var e=window.atob(t),r=e.length,n=new Uint8Array(r),i=0;i=0?parseFloat(t):parseInt(t):"true"===t||"false"!==t&&t},r={};if("all"===(t=t.replace(/%7E/g,"~")))return r;for(var n=t.split(";"),i=0;it.text()));return e?r.then(e):r}function getbin(t,e,r,n){var i;return i="POST"==r?fetch(t,{method:"POST",body:n}).then((t=>checkStatus(t))).then((t=>t.arrayBuffer())):fetch(t).then((t=>checkStatus(t))).then((t=>t.arrayBuffer())),e?i.then(e):i}function download(t,e,r,n){var i="",o="",a="",s="",l=null,c=e.addModel();if(t.indexOf(":")<0&&(t=4==t.length?"pdb:"+t:isNaN(t)?"url:"+t:"cid:"+t),"mmtf:"===t.substring(0,5))o=r&&r.pdbUri?r.pdbUri:"https://mmtf.rcsb.org/v1.0/full/",t=t.substring(5).toUpperCase(),s=o+t,r&&void 0===r.noComputeSecondaryStructure&&(r.noComputeSecondaryStructure=!0),l=new Promise((function(t){getbin(s).then((function(n){c.addMolData(n,"mmtf",r),e.zoomTo(),e.render(),t(c)}),(function(){console.log("fetch of "+s+" failed.")}))}));else{if("pdb:"===t.substring(0,4)){if(i="mmtf",r&&r.format&&(i=r.format),r&&void 0===r.noComputeSecondaryStructure&&(r.noComputeSecondaryStructure=!0),!(t=t.substring(4).toUpperCase()).match(/^[1-9][A-Za-z0-9]{3}$/))return void alert("Wrong PDB ID");"mmtf"==i?(a=r&&r.mmtfUri?r.mmtfUri:"https://mmtf.rcsb.org/v1.0/full/",s=a+t.toUpperCase()):(o=r&&r.pdbUri?r.pdbUri:"https://files.rcsb.org/view/",s=o+t+"."+i)}else if("cid:"==t.substring(0,4)){if(i="sdf",!(t=t.substring(4)).match(/^[0-9]+$/))return void alert("Wrong Compound ID");s="https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"+t+"/SDF?record_type=3d"}else"url:"==t.substring(0,4)&&(s=t.substring(4),i=s);var d=function(t){c.addMolData(t,i,r),e.zoomTo(),e.render()};l=new Promise((function(e){"mmtf"==i?getbin(s).then((function(t){d(t),e(c)})).catch((function(){o=r&&r.pdbUri?r.pdbUri:"https://files.rcsb.org/view/",s=o+t+".pdb",i="pdb",console.log("falling back to pdb format"),get(s).then((function(t){d(t),e(c)})).catch((function(t){d(""),e(c),console.log("fetch of "+s+" failed: "+t.statusText)}))})):get(s).then((function(t){d(t),e(c)})).catch((function(t){d(""),e(c),console.log("fetch of "+s+" failed: "+t.statusText)}))}))}return n?(l.then((function(t){n(t)})),c):l}function getColorFromStyle(t,e){let r=e.colorscheme;if(void 0!==_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r])r=_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r];else if("string"==typeof r&&r.endsWith("Carbon")){let t=r.substring(0,r.lastIndexOf("Carbon")).toLowerCase();if(void 0!==_colors__WEBPACK_IMPORTED_MODULE_2__.htmlColors[t]){let e=Object.assign({},_colors__WEBPACK_IMPORTED_MODULE_2__.elementColors.defaultColors);e.C=_colors__WEBPACK_IMPORTED_MODULE_2__.htmlColors[t],_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r]={prop:"elem",map:e},r=_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r]}}let n=t.color;if(void 0!==e.color&&"spectrum"!=e.color&&(n=e.color),void 0!==r){let o,a;if(void 0!==_colors__WEBPACK_IMPORTED_MODULE_2__.elementColors[r])r=_colors__WEBPACK_IMPORTED_MODULE_2__.elementColors[r],void 0!==r[t[r.prop]]&&(n=r.map[t[r.prop]]);else if(void 0!==r[t[r.prop]])n=r.map[t[r.prop]];else if(void 0!==r.prop&&void 0!==r.gradient){o=r.prop;var i=r.gradient;void 0!==_Gradient__WEBPACK_IMPORTED_MODULE_0__.builtinGradients[i]&&(i=new _Gradient__WEBPACK_IMPORTED_MODULE_0__.builtinGradients[i](r.min,r.max,r.mid?r.mid:r.colors));let e=i.range()||[-1,1];a=getAtomProperty(t,o),null!=a&&(n=i.valueToHex(a,e))}else void 0!==r.prop&&void 0!==r.map?(o=r.prop,a=getAtomProperty(t,o),void 0!==r.map[a]&&(n=r.map[a])):void 0!==e.colorscheme[t.elem]?n=e.colorscheme[t.elem]:console.log("Could not interpret colorscheme "+r)}else void 0!==e.colorfunc&&(n=e.colorfunc(t));return _colors__WEBPACK_IMPORTED_MODULE_2__.CC.color(n)}function getElement(t){let e=t;return"string"==typeof t?e=document.querySelector("#"+t):"object"==typeof t&&t.get&&(e=t.get(0)),e}},"./node_modules/upng-js/UPNG.js":(t,e,r)=>{var n;n={},t.exports=n,function(t,e){t.toRGBA8=function(e){var r=e.width,n=e.height;if(null==e.tabs.acTL)return[t.toRGBA8.decodeImage(e.data,r,n,e).buffer];var i=[];null==e.frames[0].data&&(e.frames[0].data=e.data);for(var o,a=new Uint8Array(r*n*4),s=0;s>3)]>>7-(7&p)&1);l[M]=x[S],l[M+1]=x[S+1],l[M+2]=x[S+2],l[M+3]=C<_?w[C]:255}}if(2==u)for(k=0;k>2)]>>6-((3&p)<<1)&3),l[M]=x[S],l[M+1]=x[S+1],l[M+2]=x[S+2],l[M+3]=C<_?w[C]:255;if(4==u)for(k=0;k>1)]>>4-((1&p)<<2)&15),l[M]=x[S],l[M+1]=x[S+1],l[M+2]=x[S+2],l[M+3]=C<_?w[C]:255;if(8==u)for(p=0;p>3]>>7-(7&p)&1))==255*g?0:255;c[p]=z<<24|E<<16|E<<8|E}if(2==u)for(p=0;p>2]>>6-((3&p)<<1)&3))==85*g?0:255,c[p]=z<<24|E<<16|E<<8|E;if(4==u)for(p=0;p>1]>>4-((1&p)<<2)&15))==17*g?0:255,c[p]=z<<24|E<<16|E<<8|E;if(8==u)for(p=0;p>3,s=Math.ceil(n*o/8),l=new Uint8Array(i*s),c=0,d=[0,0,4,0,2,0,1],u=[0,4,0,2,0,1,0],h=[8,8,8,4,4,2,2],f=[8,8,4,4,2,2,1],p=0;p<7;){for(var m=h[p],g=f[p],v=0,b=0,y=d[p];y>3])>>7-(7&T)&1,l[k*s+(A>>3)]|=M<<7-(3&A)),2==o&&(M=(M=e[T>>3])>>6-(7&T)&3,l[k*s+(A>>2)]|=M<<6-((3&A)<<1)),4==o&&(M=(M=e[T>>3])>>4-(7&T)&15,l[k*s+(A>>1)]|=M<<4-((1&A)<<2)),o>=8)for(var S=k*s+A*a,C=0;C>3)+C];T+=o,A+=g}_++,k+=m}v*b!=0&&(c+=b*(1+w)),p+=1}return l},t.decode._getBPP=function(t){return[1,null,3,1,2,null,4][t.ctype]*t.depth},t.decode._filterZero=function(e,r,n,i,o){var a=t.decode._getBPP(r),s=Math.ceil(i*a/8),l=t.decode._paeth;a=Math.ceil(a/8);for(var c=0;c>1)&255;if(4==h)for(f=a;f>1)&255;for(f=a;f>1)&255}if(4==h){for(f=0;f>8&255,t[e+1]=255&r},readUint:function(t,e){return 16777216*t[e]+(t[e+1]<<16|t[e+2]<<8|t[e+3])},writeUint:function(t,e,r){t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r},readASCII:function(t,e,r){for(var n="",i=0;i=0&&s>=0?(u=f*e+p<<2,h=(s+f)*i+a+p<<2):(u=(-s+f)*e-a+p<<2,h=f*i+p<<2),0==l)n[h]=t[u],n[h+1]=t[u+1],n[h+2]=t[u+2],n[h+3]=t[u+3];else if(1==l){var m=t[u+3]*(1/255),g=t[u]*m,v=t[u+1]*m,b=t[u+2]*m,y=n[h+3]*(1/255),x=n[h]*y,w=n[h+1]*y,_=n[h+2]*y,k=1-m,A=m+y*k,T=0==A?0:1/A;n[h+3]=255*A,n[h+0]=(g+x*k)*T,n[h+1]=(v+w*k)*T,n[h+2]=(b+_*k)*T}else if(2==l)m=t[u+3],g=t[u],v=t[u+1],b=t[u+2],y=n[h+3],x=n[h],w=n[h+1],_=n[h+2],m==y&&g==x&&v==w&&b==_?(n[h]=0,n[h+1]=0,n[h+2]=0,n[h+3]=0):(n[h]=g,n[h+1]=v,n[h+2]=b,n[h+3]=m);else if(3==l){if(m=t[u+3],g=t[u],v=t[u+1],b=t[u+2],y=n[h+3],x=n[h],w=n[h+1],_=n[h+2],m==y&&g==x&&v==w&&b==_)continue;if(m<220&&y>20)return!1}return!0},t.encode=function(e,r,n,i,o,a){null==i&&(i=0),null==a&&(a=!1);for(var s=new Uint8Array(e[0].byteLength*e.length+100),l=[137,80,78,71,13,10,26,10],c=0;c<8;c++)s[c]=l[c];var d=8,u=t._bin,h=t.crc.crc,f=u.writeUint,p=u.writeUshort,m=u.writeASCII,g=t.encode.compressPNG(e,r,n,i,a);f(s,d,13),m(s,d+=4,"IHDR"),f(s,d+=4,r),f(s,d+=4,n),s[d+=4]=g.depth,s[++d]=g.ctype,s[++d]=0,s[++d]=0,s[++d]=0,f(s,++d,h(s,d-17,17)),f(s,d+=4,1),m(s,d+=4,"sRGB"),s[d+=4]=1,f(s,++d,h(s,d-5,5)),d+=4;var v=e.length>1;if(v&&(f(s,d,8),m(s,d+=4,"acTL"),f(s,d+=4,e.length),f(s,d+=4,0),f(s,d+=4,h(s,d-12,12)),d+=4),3==g.ctype){for(f(s,d,3*(M=g.plte.length)),m(s,d+=4,"PLTE"),d+=4,c=0;c>8&255,_=y>>16&255;s[d+b+0]=x,s[d+b+1]=w,s[d+b+2]=_}if(f(s,d+=3*M,h(s,d-3*M-4,3*M+4)),d+=4,g.gotAlpha){for(f(s,d,M),m(s,d+=4,"tRNS"),d+=4,c=0;c>24&255;f(s,d+=M,h(s,d-M-4,M+4)),d+=4}}for(var k=0,A=0;A=300))break}}var w=!!m&&o,_=v.length;_<=256&&0==a&&(l=_<=2?1:_<=4?2:_<=16?4:8,o&&(l=8),m=!0);var k=[];for(u=0;uN&&(N=G),UB&&(B=U));var V=-1==N?1:(N-P+1)*(B-j+1);V>1)]|=g[T[q+G]]<<4-4*(1&G);else if(2==l)for(G=0;G>2)]|=g[T[q+G]]<<6-2*(3&G);else if(1==l)for(G=0;G>3)]|=g[T[q+G]]<<7-1*(7&G)}A=H,s=3,c=1}else if(0==m&&1==e.length){H=new Uint8Array(C*E*3);var Y=C*E;for(p=0;p5e5)||2!=l&&3!=l&&4!=l){for(var c=0;c>1)+256&255;if(4==a)for(d=o;d>1)&255;for(d=o;d>1)&255}if(4==a){for(d=0;d>>1:r>>>=1;t[e]=r}return t}(),update:function(e,r,n,i){for(var o=0;o>>8;return e},crc:function(e,r,n){return 4294967295^t.crc.update(4294967295,e,r,n)}},t.quantize=function(e,r,n){for(var i=[],o=0,a=0;am&&(m=p[a].est.L,g=a);if(m<.001)break;var v=p[g],b=t.quantize.splitPixels(s,l,v.i0,v.i1,v.est.e,v.est.eMq255),y={i0:v.i0,i1:b,bst:null,est:null,tdst:0,left:null,right:null};y.bst=t.quantize.stats(s,y.i0,y.i1),y.est=t.quantize.estats(y.bst);var x={i0:b,i1:v.i1,bst:null,est:null,tdst:0,left:null,right:null};for(x.bst={R:[],m:[],N:v.bst.N-y.bst.N},a=0;a<16;a++)x.bst.R[a]=v.bst.R[a]-y.bst.R[a];for(a=0;a<4;a++)x.bst.m[a]=v.bst.m[a]-y.bst.m[a];x.est=t.quantize.estats(x.bst),v.left=y,v.right=x,p[g]=y,p.push(x)}p.sort((function(t,e){return e.bst.N-t.bst.N}));for(var w=0;w>2]=L.est.rgba}i[w]=A.buffer}return{bufs:i,plte:p}},t.quantize.getNearest=function(e,r,n,i,o){if(null==e.left)return e.tdst=t.quantize.dist(e.est.q,r,n,i,o),e;var a=t.quantize.planeDst(e.est,r,n,i,o),s=e.left,l=e.right;a>0&&(s=e.right,l=e.left);var c=t.quantize.getNearest(s,r,n,i,o);if(c.tdst<=a*a)return c;var d=t.quantize.getNearest(l,r,n,i,o);return d.tdsta;)i-=4;if(n>=i)break;var l=r[n>>2];r[n>>2]=r[i>>2],r[i>>2]=l,n+=4,i-=4}for(;s(e,n,o)>a;)n-=4;return n+4},t.quantize.vecDot=function(t,e,r){return t[e]*r[0]+t[e+1]*r[1]+t[e+2]*r[2]+t[e+3]*r[3]},t.quantize.stats=function(t,e,r){for(var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],o=r-e>>2,a=e;a>>0}},t.M4={multVec:function(t,e){return[t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3],t[4]*e[0]+t[5]*e[1]+t[6]*e[2]+t[7]*e[3],t[8]*e[0]+t[9]*e[1]+t[10]*e[2]+t[11]*e[3],t[12]*e[0]+t[13]*e[1]+t[14]*e[2]+t[15]*e[3]]},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},sml:function(t,e){return[t*e[0],t*e[1],t*e[2],t*e[3]]}},t.encode.alphaMul=function(t,e){for(var r=new Uint8Array(t.length),n=t.length>>2,i=0;i{"use strict";var n={};(0,r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js").assign)(n,r("./node_modules/upng-js/node_modules/pako/lib/deflate.js"),r("./node_modules/upng-js/node_modules/pako/lib/inflate.js"),r("./node_modules/upng-js/node_modules/pako/lib/zlib/constants.js")),t.exports=n},"./node_modules/upng-js/node_modules/pako/lib/deflate.js":(t,e,r)=>{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/zlib/deflate.js"),i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/utils/strings.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/zlib/zstream.js"),l=Object.prototype.toString,c=0,d=-1,u=0,h=8;function f(t){if(!(this instanceof f))return new f(t);this.options=i.assign({level:d,method:h,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==c)throw new Error(a[r]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var p;if(p="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===l.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(r=n.deflateSetDictionary(this.strm,p))!==c)throw new Error(a[r]);this._dict_set=!0}}function p(t,e){var r=new f(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}f.prototype.push=function(t,e){var r,a,s=this.strm,d=this.options.chunkSize;if(this.ended)return!1;a=e===~~e?e:!0===e?4:0,"string"==typeof t?s.input=o.string2buf(t):"[object ArrayBuffer]"===l.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(d),s.next_out=0,s.avail_out=d),1!==(r=n.deflate(s,a))&&r!==c)return this.onEnd(r),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==r);return 4===a?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===c):2!==a||(this.onEnd(c),s.avail_out=0,!0)},f.prototype.onData=function(t){this.chunks.push(t)},f.prototype.onEnd=function(t){t===c&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Deflate=f,e.deflate=p,e.deflateRaw=function(t,e){return(e=e||{}).raw=!0,p(t,e)},e.gzip=function(t,e){return(e=e||{}).gzip=!0,p(t,e)}},"./node_modules/upng-js/node_modules/pako/lib/inflate.js":(t,e,r)=>{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/zlib/inflate.js"),i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/utils/strings.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/constants.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js"),l=r("./node_modules/upng-js/node_modules/pako/lib/zlib/zstream.js"),c=r("./node_modules/upng-js/node_modules/pako/lib/zlib/gzheader.js"),d=Object.prototype.toString;function u(t){if(!(this instanceof u))return new u(t);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,e.windowBits);if(r!==a.Z_OK)throw new Error(s[r]);if(this.header=new c,n.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=o.string2buf(e.dictionary):"[object ArrayBuffer]"===d.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=n.inflateSetDictionary(this.strm,e.dictionary))!==a.Z_OK))throw new Error(s[r])}function h(t,e){var r=new u(e);if(r.push(t,!0),r.err)throw r.msg||s[r.err];return r.result}u.prototype.push=function(t,e){var r,s,l,c,u,h=this.strm,f=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;s=e===~~e?e:!0===e?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof t?h.input=o.binstring2buf(t):"[object ArrayBuffer]"===d.call(t)?h.input=new Uint8Array(t):h.input=t,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(f),h.next_out=0,h.avail_out=f),(r=n.inflate(h,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&p&&(r=n.inflateSetDictionary(this.strm,p)),r===a.Z_BUF_ERROR&&!0===m&&(r=a.Z_OK,m=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&r!==a.Z_STREAM_END&&(0!==h.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(h.output,h.next_out),c=h.next_out-l,u=o.buf2string(h.output,l),h.next_out=c,h.avail_out=f-c,c&&i.arraySet(h.output,h.output,l,c,0),this.onData(u)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(m=!0)}while((h.avail_in>0||0===h.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),h.avail_out=0,!0)},u.prototype.onData=function(t){this.chunks.push(t)},u.prototype.onEnd=function(t){t===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=u,e.inflate=h,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,h(t,e)},e.ungzip=h},"./node_modules/upng-js/node_modules/pako/lib/utils/common.js":(t,e)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(t[i]=r[i])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var o=0;o{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){o=!1}for(var a=new n.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function l(t,e){if(e<65534&&(t.subarray&&o||!t.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var r="",a=0;a>>6,e[a++]=128|63&r):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|63&r):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|63&r);return e},e.buf2binstring=function(t){return l(t,t.length)},e.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r4)c[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r1?c[n++]=65533:i<65536?c[n++]=i:(i-=65536,c[n++]=55296|i>>10&1023,c[n++]=56320|1023&i)}return l(c,n)},e.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+a[t[r]]>e?r:e}},"./node_modules/upng-js/node_modules/pako/lib/zlib/adler32.js":t=>{"use strict";t.exports=function(t,e,r,n){for(var i=65535&t,o=t>>>16&65535,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(i=i+e[n++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16}},"./node_modules/upng-js/node_modules/pako/lib/zlib/constants.js":t=>{"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},"./node_modules/upng-js/node_modules/pako/lib/zlib/crc32.js":t=>{"use strict";var e=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,r,n,i){var o=e,a=i+n;t^=-1;for(var s=i;s>>8^o[255&(t^r[s])];return~t}},"./node_modules/upng-js/node_modules/pako/lib/zlib/deflate.js":(t,e,r)=>{"use strict";var n,i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/zlib/trees.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/adler32.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/zlib/crc32.js"),l=r("./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js"),c=0,d=0,u=-2,h=2,f=8,p=286,m=30,g=19,v=2*p+1,b=15,y=3,x=258,w=x+y+1,_=42,k=103,A=113,T=666;function M(t,e){return t.msg=l[e],e}function S(t){return(t<<1)-(t>4?9:0)}function C(t){for(var e=t.length;--e>=0;)t[e]=0}function E(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function L(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,E(t.strm)}function z(t,e){t.pending_buf[t.pending++]=e}function O(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function D(t,e){var r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,l=t.strstart>t.w_size-w?t.strstart-(t.w_size-w):0,c=t.window,d=t.w_mask,u=t.prev,h=t.strstart+x,f=c[o+a-1],p=c[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(c[(r=e)+a]===p&&c[r+a-1]===f&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&oa){if(t.match_start=e,a=n,n>=s)break;f=c[o+a-1],p=c[o+a]}}}while((e=u[e&d])>l&&0!=--i);return a<=t.lookahead?a:t.lookahead}function I(t){var e,r,n,o,l,c,d,u,h,f,p=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=p+(p-w)){i.arraySet(t.window,t.window,p,p,0),t.match_start-=p,t.strstart-=p,t.block_start-=p,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=p?n-p:0}while(--r);e=r=p;do{n=t.prev[--e],t.prev[e]=n>=p?n-p:0}while(--r);o+=p}if(0===t.strm.avail_in)break;if(c=t.strm,d=t.window,u=t.strstart+t.lookahead,h=o,f=void 0,(f=c.avail_in)>h&&(f=h),r=0===f?0:(c.avail_in-=f,i.arraySet(d,c.input,c.next_in,f,u),1===c.state.wrap?c.adler=a(c.adler,d,f,u):2===c.state.wrap&&(c.adler=s(c.adler,d,f,u)),c.next_in+=f,c.total_in+=f,f),t.lookahead+=r,t.lookahead+t.insert>=y)for(l=t.strstart-t.insert,t.ins_h=t.window[l],t.ins_h=(t.ins_h<=y&&(t.ins_h=(t.ins_h<=y)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-y),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=y){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=y&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=y-1)),t.prev_length>=y&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-y,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-y),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<15&&(s=2,n-=16),o<1||o>9||r!==f||n<8||n>15||e<0||e>9||a<0||a>4)return M(t,u);8===n&&(n=9);var l=new j;return t.state=l,l.strm=t,l.wrap=s,l.gzhead=null,l.w_bits=n,l.w_size=1<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(I(t),0===t.lookahead&&e===c)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,L(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-w&&(L(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(L(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(L(t,!1),t.strm.avail_out),1)})),new P(4,4,8,4,R),new P(4,5,16,8,R),new P(4,6,32,32,R),new P(4,4,16,16,F),new P(8,16,32,32,F),new P(8,16,128,128,F),new P(8,32,128,256,F),new P(32,128,258,1024,F),new P(32,258,258,4096,F)],e.deflateInit=function(t,e){return U(t,e,f,15,8,0)},e.deflateInit2=U,e.deflateReset=B,e.deflateResetKeep=N,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?u:(t.state.gzhead=e,d):u},e.deflate=function(t,e){var r,i,a,l;if(!t||!t.state||e>5||e<0)return t?M(t,u):u;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||i.status===T&&4!==e)return M(t,0===t.avail_out?-5:u);if(i.strm=t,r=i.last_flush,i.last_flush=e,i.status===_)if(2===i.wrap)t.adler=0,z(i,31),z(i,139),z(i,8),i.gzhead?(z(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),z(i,255&i.gzhead.time),z(i,i.gzhead.time>>8&255),z(i,i.gzhead.time>>16&255),z(i,i.gzhead.time>>24&255),z(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),z(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(z(i,255&i.gzhead.extra.length),z(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=s(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(z(i,0),z(i,0),z(i,0),z(i,0),z(i,0),z(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),z(i,3),i.status=A);else{var h=f+(i.w_bits-8<<4)<<8;h|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(h|=32),h+=31-h%31,i.status=A,O(i,h),0!==i.strstart&&(O(i,t.adler>>>16),O(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),E(t),a=i.pending,i.pending!==i.pending_buf_size));)z(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),E(t),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),E(t),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.status=k)}else i.status=k;if(i.status===k&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&E(t),i.pending+2<=i.pending_buf_size&&(z(i,255&t.adler),z(i,t.adler>>8&255),t.adler=0,i.status=A)):i.status=A),0!==i.pending){if(E(t),0===t.avail_out)return i.last_flush=-1,d}else if(0===t.avail_in&&S(e)<=S(r)&&4!==e)return M(t,-5);if(i.status===T&&0!==t.avail_in)return M(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==c&&i.status!==T){var p=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(I(t),0===t.lookahead)){if(e===c)return 1;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(L(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(L(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(L(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,a,s=t.window;;){if(t.lookahead<=x){if(I(t),t.lookahead<=x&&e===c)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=y&&t.strstart>0&&(n=s[i=t.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){a=t.strstart+x;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=y?(r=o._tr_tally(t,1,t.match_length-y),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(L(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(L(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(L(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==p&&4!==p||(i.status=T),1===p||3===p)return 0===t.avail_out&&(i.last_flush=-1),d;if(2===p&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(C(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),E(t),0===t.avail_out))return i.last_flush=-1,d}return 4!==e?d:i.wrap<=0?1:(2===i.wrap?(z(i,255&t.adler),z(i,t.adler>>8&255),z(i,t.adler>>16&255),z(i,t.adler>>24&255),z(i,255&t.total_in),z(i,t.total_in>>8&255),z(i,t.total_in>>16&255),z(i,t.total_in>>24&255)):(O(i,t.adler>>>16),O(i,65535&t.adler)),E(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?d:1)},e.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==_&&69!==e&&73!==e&&91!==e&&e!==k&&e!==A&&e!==T?M(t,u):(t.state=null,e===A?M(t,-3):d):u},e.deflateSetDictionary=function(t,e){var r,n,o,s,l,c,h,f,p=e.length;if(!t||!t.state)return u;if(2===(s=(r=t.state).wrap)||1===s&&r.status!==_||r.lookahead)return u;for(1===s&&(t.adler=a(t.adler,e,p,0)),r.wrap=0,p>=r.w_size&&(0===s&&(C(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new i.Buf8(r.w_size),i.arraySet(f,e,p-r.w_size,r.w_size,0),e=f,p=r.w_size),l=t.avail_in,c=t.next_in,h=t.input,t.avail_in=p,t.next_in=0,t.input=e,I(r);r.lookahead>=y;){n=r.strstart,o=r.lookahead-(y-1);do{r.ins_h=(r.ins_h<{"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},"./node_modules/upng-js/node_modules/pako/lib/zlib/inffast.js":t=>{"use strict";t.exports=function(t,e){var r,n,i,o,a,s,l,c,d,u,h,f,p,m,g,v,b,y,x,w,_,k,A,T,M;r=t.state,n=t.next_in,T=t.input,i=n+(t.avail_in-5),o=t.next_out,M=t.output,a=o-(e-t.avail_out),s=o+(t.avail_out-257),l=r.dmax,c=r.wsize,d=r.whave,u=r.wnext,h=r.window,f=r.hold,p=r.bits,m=r.lencode,g=r.distcode,v=(1<>>=x=y>>>24,p-=x,0==(x=y>>>16&255))M[o++]=65535&y;else{if(!(16&x)){if(64&x){if(32&x){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}y=m[(65535&y)+(f&(1<>>=x,p-=x),p<15&&(f+=T[n++]<>>=x=y>>>24,p-=x,16&(x=y>>>16&255)){if(_=65535&y,p<(x&=15)&&(f+=T[n++]<l){t.msg="invalid distance too far back",r.mode=30;break t}if(f>>>=x,p-=x,_>(x=o-a)){if((x=_-x)>d&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(k=0,A=h,0===u){if(k+=c-x,x2;)M[o++]=A[k++],M[o++]=A[k++],M[o++]=A[k++],w-=3;w&&(M[o++]=A[k++],w>1&&(M[o++]=A[k++]))}else{k=o-_;do{M[o++]=M[k++],M[o++]=M[k++],M[o++]=M[k++],w-=3}while(w>2);w&&(M[o++]=M[k++],w>1&&(M[o++]=M[k++]))}break}if(64&x){t.msg="invalid distance code",r.mode=30;break t}y=g[(65535&y)+(f&(1<>3,f&=(1<<(p-=w<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),i=r("./node_modules/upng-js/node_modules/pako/lib/zlib/adler32.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/zlib/crc32.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/inffast.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/zlib/inftrees.js"),l=0,c=-2,d=1,u=12,h=30,f=852,p=592;function m(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=d,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(f),e.distcode=e.distdyn=new n.Buf32(p),e.sane=1,e.back=-1,l):c}function b(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,v(t)):c}function y(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?c:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,b(t))):c}function x(t,e){var r,n;return t?(n=new g,t.state=n,n.window=null,(r=y(t,e))!==l&&(t.state=null),r):c}var w,_,k=!0;function A(t){if(k){var e;for(w=new n.Buf32(512),_=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(s(1,t.lens,0,288,w,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;s(2,t.lens,0,32,_,0,t.work,{bits:5}),k=!1}t.lencode=w,t.lenbits=9,t.distcode=_,t.distbits=5}function T(t,e,r,i){var o,a=t.state;return null===a.window&&(a.wsize=1<=a.wsize?(n.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),n.arraySet(a.window,e,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,e,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=o(r.check,B,2,0),x=0,w=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&x)<<8)+(x>>8))%31){t.msg="incorrect header check",r.mode=h;break}if(8!=(15&x)){t.msg="unknown compression method",r.mode=h;break}if(w-=4,R=8+(15&(x>>>=4)),0===r.wbits)r.wbits=R;else if(R>r.wbits){t.msg="invalid window size",r.mode=h;break}r.dmax=1<>8&1),512&r.flags&&(B[0]=255&x,B[1]=x>>>8&255,r.check=o(r.check,B,2,0)),x=0,w=0,r.mode=3;case 3:for(;w<32;){if(0===b)break t;b--,x+=f[g++]<>>8&255,B[2]=x>>>16&255,B[3]=x>>>24&255,r.check=o(r.check,B,4,0)),x=0,w=0,r.mode=4;case 4:for(;w<16;){if(0===b)break t;b--,x+=f[g++]<>8),512&r.flags&&(B[0]=255&x,B[1]=x>>>8&255,r.check=o(r.check,B,2,0)),x=0,w=0,r.mode=5;case 5:if(1024&r.flags){for(;w<16;){if(0===b)break t;b--,x+=f[g++]<>>8&255,r.check=o(r.check,B,2,0)),x=0,w=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((M=r.length)>b&&(M=b),M&&(r.head&&(R=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,f,g,M,R)),512&r.flags&&(r.check=o(r.check,f,M,g)),b-=M,g+=M,r.length-=M),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===b)break t;M=0;do{R=f[g+M++],r.head&&R&&r.length<65536&&(r.head.name+=String.fromCharCode(R))}while(R&&M>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=u;break;case 10:for(;w<32;){if(0===b)break t;b--,x+=f[g++]<>>=7&w,w-=7&w,r.mode=27;break}for(;w<3;){if(0===b)break t;b--,x+=f[g++]<>>=1)){case 0:r.mode=14;break;case 1:if(A(r),r.mode=20,6===e){x>>>=2,w-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=h}x>>>=2,w-=2;break;case 14:for(x>>>=7&w,w-=7&w;w<32;){if(0===b)break t;b--,x+=f[g++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=h;break}if(r.length=65535&x,x=0,w=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(M=r.length){if(M>b&&(M=b),M>y&&(M=y),0===M)break t;n.arraySet(p,f,g,M,v),b-=M,g+=M,y-=M,v+=M,r.length-=M;break}r.mode=u;break;case 17:for(;w<14;){if(0===b)break t;b--,x+=f[g++]<>>=5,w-=5,r.ndist=1+(31&x),x>>>=5,w-=5,r.ncode=4+(15&x),x>>>=4,w-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=h;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,w-=3}for(;r.have<19;)r.lens[U[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,P={bits:r.lenbits},F=s(0,r.lens,0,19,r.lencode,0,r.work,P),r.lenbits=P.bits,F){t.msg="invalid code lengths set",r.mode=h;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,z=65535&N,!((E=N>>>24)<=w);){if(0===b)break t;b--,x+=f[g++]<>>=E,w-=E,r.lens[r.have++]=z;else{if(16===z){for(j=E+2;w>>=E,w-=E,0===r.have){t.msg="invalid bit length repeat",r.mode=h;break}R=r.lens[r.have-1],M=3+(3&x),x>>>=2,w-=2}else if(17===z){for(j=E+3;w>>=E)),x>>>=3,w-=3}else{for(j=E+7;w>>=E)),x>>>=7,w-=7}if(r.have+M>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=h;break}for(;M--;)r.lens[r.have++]=R}}if(r.mode===h)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=h;break}if(r.lenbits=9,P={bits:r.lenbits},F=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,P),r.lenbits=P.bits,F){t.msg="invalid literal/lengths set",r.mode=h;break}if(r.distbits=6,r.distcode=r.distdyn,P={bits:r.distbits},F=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,P),r.distbits=P.bits,F){t.msg="invalid distances set",r.mode=h;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(b>=6&&y>=258){t.next_out=v,t.avail_out=y,t.next_in=g,t.avail_in=b,r.hold=x,r.bits=w,a(t,k),v=t.next_out,p=t.output,y=t.avail_out,g=t.next_in,f=t.input,b=t.avail_in,x=r.hold,w=r.bits,r.mode===u&&(r.back=-1);break}for(r.back=0;L=(N=r.lencode[x&(1<>>16&255,z=65535&N,!((E=N>>>24)<=w);){if(0===b)break t;b--,x+=f[g++]<>O)])>>>16&255,z=65535&N,!(O+(E=N>>>24)<=w);){if(0===b)break t;b--,x+=f[g++]<>>=O,w-=O,r.back+=O}if(x>>>=E,w-=E,r.back+=E,r.length=z,0===L){r.mode=26;break}if(32&L){r.back=-1,r.mode=u;break}if(64&L){t.msg="invalid literal/length code",r.mode=h;break}r.extra=15&L,r.mode=22;case 22:if(r.extra){for(j=r.extra;w>>=r.extra,w-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;L=(N=r.distcode[x&(1<>>16&255,z=65535&N,!((E=N>>>24)<=w);){if(0===b)break t;b--,x+=f[g++]<>O)])>>>16&255,z=65535&N,!(O+(E=N>>>24)<=w);){if(0===b)break t;b--,x+=f[g++]<>>=O,w-=O,r.back+=O}if(x>>>=E,w-=E,r.back+=E,64&L){t.msg="invalid distance code",r.mode=h;break}r.offset=z,r.extra=15&L,r.mode=24;case 24:if(r.extra){for(j=r.extra;w>>=r.extra,w-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=h;break}r.mode=25;case 25:if(0===y)break t;if(M=k-y,r.offset>M){if((M=r.offset-M)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=h;break}M>r.wnext?(M-=r.wnext,S=r.wsize-M):S=r.wnext-M,M>r.length&&(M=r.length),C=r.window}else C=p,S=v-r.offset,M=r.length;M>y&&(M=y),y-=M,r.length-=M;do{p[v++]=C[S++]}while(--M);0===r.length&&(r.mode=21);break;case 26:if(0===y)break t;p[v++]=r.length,y--,r.mode=21;break;case 27:if(r.wrap){for(;w<32;){if(0===b)break t;b--,x|=f[g++]<{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(t,e,r,l,c,d,u,h){var f,p,m,g,v,b,y,x,w,_=h.bits,k=0,A=0,T=0,M=0,S=0,C=0,E=0,L=0,z=0,O=0,D=null,I=0,R=new n.Buf16(16),F=new n.Buf16(16),P=null,j=0;for(k=0;k<=15;k++)R[k]=0;for(A=0;A=1&&0===R[M];M--);if(S>M&&(S=M),0===M)return c[d++]=20971520,c[d++]=20971520,h.bits=1,0;for(T=1;T0&&(0===t||1!==M))return-1;for(F[1]=0,k=1;k<15;k++)F[k+1]=F[k]+R[k];for(A=0;A852||2===t&&z>592)return 1;for(;;){y=k-E,u[A]b?(x=P[j+u[A]],w=D[I+u[A]]):(x=96,w=0),f=1<>E)+(p-=f)]=y<<24|x<<16|w}while(0!==p);for(f=1<>=1;if(0!==f?(O&=f-1,O+=f):O=0,A++,0==--R[k]){if(k===M)break;k=e[r+u[A]]}if(k>S&&(O&g)!==m){for(0===E&&(E=S),v+=T,L=1<<(C=k-E);C+E852||2===t&&z>592)return 1;c[m=O&g]=S<<24|C<<16|v-d}}return 0!==O&&(c[v+O]=k-E<<24|64<<16),h.bits=S,0}},"./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js":t=>{"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},"./node_modules/upng-js/node_modules/pako/lib/zlib/trees.js":(t,e,r)=>{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js");function i(t){for(var e=t.length;--e>=0;)t[e]=0}var o=256,a=286,s=30,l=15,c=16,d=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],h=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],f=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=new Array(576);i(p);var m=new Array(60);i(m);var g=new Array(512);i(g);var v=new Array(256);i(v);var b=new Array(29);i(b);var y,x,w,_=new Array(s);function k(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function A(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function T(t){return t<256?g[t]:g[256+(t>>>7)]}function M(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function S(t,e,r){t.bi_valid>c-r?(t.bi_buf|=e<>c-t.bi_valid,t.bi_valid+=r-c):(t.bi_buf|=e<>>=1,r<<=1}while(--e>0);return r>>>1}function L(t,e,r){var n,i,o=new Array(l+1),a=0;for(n=1;n<=l;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=E(o[s]++,s))}}function z(t){var e;for(e=0;e8?M(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function D(t,e,r,n){var i=2*e,o=2*r;return t[i]>1;r>=1;r--)I(t,o,r);i=c;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],I(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,o[2*i]=o[2*r]+o[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,o[2*r+1]=o[2*n+1]=i,t.heap[1]=i++,I(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,o,a,s,c=e.dyn_tree,d=e.max_code,u=e.stat_desc.static_tree,h=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,m=e.stat_desc.max_length,g=0;for(o=0;o<=l;o++)t.bl_count[o]=0;for(c[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(o=c[2*c[2*(n=t.heap[r])+1]+1]+1)>m&&(o=m,g++),c[2*n+1]=o,n>d||(t.bl_count[o]++,a=0,n>=p&&(a=f[n-p]),s=c[2*n],t.opt_len+=s*(o+a),h&&(t.static_len+=s*(u[2*n+1]+a)));if(0!==g){do{for(o=m-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[m]--,g-=2}while(g>0);for(o=m;0!==o;o--)for(n=t.bl_count[o];0!==n;)(i=t.heap[--r])>d||(c[2*i+1]!==o&&(t.opt_len+=(o-c[2*i+1])*c[2*i],c[2*i+1]=o),n--)}}(t,e),L(o,d,t.bl_count)}function P(t,e,r){var n,i,o=-1,a=e[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++s>=7;n0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e=3&&0===t.bl_tree[2*f[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(a=t.static_len+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==e?B(t,e,r,n):4===t.strategy||a===i?(S(t,2+(n?1:0),3),R(t,p,m)):(S(t,4+(n?1:0),3),function(t,e,r,n){var i;for(S(t,e-257,5),S(t,r-1,5),S(t,n-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(v[r]+o+1)]++,t.dyn_dtree[2*T(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){S(t,2,3),C(t,256,p),function(t){16===t.bi_valid?(M(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},"./node_modules/upng-js/node_modules/pako/lib/zlib/zstream.js":t=>{"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},"./src/SurfaceWorker.js":()=>{$3Dmol.workerString=function(){self.onmessage=function(t){var e=t.data,r=e.type;if(r<0)self.atomData=e.atoms,self.volume=e.volume,self.ps=new ProteinSurface;else{var n=self.ps;n.initparm(e.expandedExtent,1!=r,self.volume),n.fillvoxels(self.atomData,e.extendedAtoms),n.buildboundary(),4!==r&&2!==r||(n.fastdistancemap(),n.boundingatom(!1),n.fillvoxelswaals(self.atomData,e.extendedAtoms)),n.marchingcube(r);var i=n.getFacesAndVertices(e.atomsToShow);self.postMessage(i)}}}.toString().replace(/(^.*?\{|\}$)/g,""),$3Dmol.workerString+=";\nfunction _classCallCheck() {};",$3Dmol.workerString+=";\n"+$3Dmol.Vector3.toString(),$3Dmol.workerString+=";\n"+$3Dmol.MarchingCubeInitializer.toString()+";\n\n",$3Dmol.workerString+=";\n"+$3Dmol.PointGrid.toString()+";\n",$3Dmol.workerString+=";\nvar ProteinSurface = "+$3Dmol.ProteinSurface.toString()+";\n",$3Dmol.SurfaceWorker=window.URL?window.URL.createObjectURL(new Blob([$3Dmol.workerString],{type:"text/javascript"})):void 0},"./src/exporter.js":t=>{"object"==typeof t.exports&&(t.exports=window.$3Dmol)},"./src/vendor/mmtf.js":function(t,e){!function(t){"use strict";function e(t,e,r){for(var n=(t.byteLength,0),i=r.length;i>n;n++){var o=r.charCodeAt(n);if(128>o)t.setUint8(e++,o>>>0&127);else if(2048>o)t.setUint8(e++,o>>>6&31|192),t.setUint8(e++,o>>>0&63|128);else if(65536>o)t.setUint8(e++,o>>>12&15|224),t.setUint8(e++,o>>>6&63|128),t.setUint8(e++,o>>>0&63|128);else{if(!(1114112>o))throw new Error("bad codepoint "+o);t.setUint8(e++,o>>>18&7|240),t.setUint8(e++,o>>>12&63|128),t.setUint8(e++,o>>>6&63|128),t.setUint8(e++,o>>>0&63|128)}}}function r(t){for(var e=0,r=0,n=t.length;n>r;r++){var i=t.charCodeAt(r);if(128>i)e+=1;else if(2048>i)e+=2;else if(65536>i)e+=3;else{if(!(1114112>i))throw new Error("bad codepoint "+i);e+=4}}return e}function n(t,i,o){var a=typeof t;if("string"===a){if(32>(s=r(t)))return i.setUint8(o,160|s),e(i,o+1,t),1+s;if(256>s)return i.setUint8(o,217),i.setUint8(o+1,s),e(i,o+2,t),2+s;if(65536>s)return i.setUint8(o,218),i.setUint16(o+1,s),e(i,o+3,t),3+s;if(4294967296>s)return i.setUint8(o,219),i.setUint32(o+1,s),e(i,o+5,t),5+s}if(t instanceof Uint8Array){var s=t.byteLength,l=new Uint8Array(i.buffer);if(256>s)return i.setUint8(o,196),i.setUint8(o+1,s),l.set(t,o+2),2+s;if(65536>s)return i.setUint8(o,197),i.setUint16(o+1,s),l.set(t,o+3),3+s;if(4294967296>s)return i.setUint8(o,198),i.setUint32(o+1,s),l.set(t,o+5),5+s}if("number"===a){if(!isFinite(t))throw new Error("Number not finite: "+t);if(Math.floor(t)!==t)return i.setUint8(o,203),i.setFloat64(o+1,t),9;if(t>=0){if(128>t)return i.setUint8(o,t),1;if(256>t)return i.setUint8(o,204),i.setUint8(o+1,t),2;if(65536>t)return i.setUint8(o,205),i.setUint16(o+1,t),3;if(4294967296>t)return i.setUint8(o,206),i.setUint32(o+1,t),5;throw new Error("Number too big 0x"+t.toString(16))}if(t>=-32)return i.setInt8(o,t),1;if(t>=-128)return i.setUint8(o,208),i.setInt8(o+1,t),2;if(t>=-32768)return i.setUint8(o,209),i.setInt16(o+1,t),3;if(t>=-2147483648)return i.setUint8(o,210),i.setInt32(o+1,t),5;throw new Error("Number too small -0x"+(-t).toString(16).substr(1))}if(null===t)return i.setUint8(o,192),1;if("boolean"===a)return i.setUint8(o,t?195:194),1;if("object"===a){var c=0,d=Array.isArray(t);if(d)s=t.length;else{var u=Object.keys(t);s=u.length}if(16>s?(i.setUint8(o,s|(d?144:128)),c=1):65536>s?(i.setUint8(o,d?220:222),i.setUint16(o+1,s),c=3):4294967296>s&&(i.setUint8(o,d?221:223),i.setUint32(o+1,s),c=5),d)for(var h=0;s>h;h++)c+=n(t[h],i,o+c);else for(h=0;s>h;h++){var f=u[h];c+=n(f,i,o+c),c+=n(t[f],i,o+c)}return c}throw new Error("Unknown type "+a)}function i(t){var e=typeof t;if("string"===e){if(32>(n=r(t)))return 1+n;if(256>n)return 2+n;if(65536>n)return 3+n;if(4294967296>n)return 5+n}if(t instanceof Uint8Array){if(256>(n=t.byteLength))return 2+n;if(65536>n)return 3+n;if(4294967296>n)return 5+n}if("number"===e){if(Math.floor(t)!==t)return 9;if(t>=0){if(128>t)return 1;if(256>t)return 2;if(65536>t)return 3;if(4294967296>t)return 5;throw new Error("Number too big 0x"+t.toString(16))}if(t>=-32)return 1;if(t>=-128)return 2;if(t>=-32768)return 3;if(t>=-2147483648)return 5;throw new Error("Number too small -0x"+t.toString(16).substr(1))}if("boolean"===e||null===t)return 1;if("object"===e){var n,o=0;if(Array.isArray(t)){n=t.length;for(var a=0;n>a;a++)o+=i(t[a])}else{var s=Object.keys(t);for(n=s.length,a=0;n>a;a++){var l=s[a];o+=i(l)+i(t[l])}}if(16>n)return 1+o;if(65536>n)return 3+o;if(4294967296>n)return 5+o;throw new Error("Array or object too long 0x"+n.toString(16))}throw new Error("Unknown type "+e)}function o(t){var e=new ArrayBuffer(i(t));return n(t,new DataView(e),0),new Uint8Array(e)}function a(t,e,r){return e?new t(e.buffer,e.byteOffset,e.byteLength/(r||1)):void 0}function s(t){return a(DataView,t)}function l(t){return a(Uint8Array,t)}function c(t){return a(Int8Array,t)}function d(t){return a(Int32Array,t,4)}function u(t,e){var r=t.length/2;e||(e=new Int16Array(r));for(var n=0,i=0;r>n;++n,i+=2)e[n]=t[i]<<8^t[i+1];return e}function h(t,e){var r=t.length/4;e||(e=new Int32Array(r));for(var n=0,i=0;r>n;++n,i+=4)e[n]=t[i]<<24^t[i+1]<<16^t[i+2]<<8^t[i+3];return e}function f(t,e){var r=t.length;e||(e=new Uint8Array(4*r));for(var n=s(e),i=0;r>i;++i)n.setInt32(4*i,t[i]);return l(e)}function p(t,e,r){var n=t.length,i=1/e;r||(r=new Float32Array(n));for(var o=0;n>o;++o)r[o]=t[o]*i;return r}function m(t,e,r){var n=t.length;r||(r=new Int32Array(n));for(var i=0;n>i;++i)r[i]=Math.round(t[i]*e);return r}function g(t,e){var r,n;if(!e){var i=0;for(r=0,n=t.length;n>r;r+=2)i+=t[r+1];e=new t.constructor(i)}var o=0;for(r=0,n=t.length;n>r;r+=2)for(var a=t[r],s=t[r+1],l=0;s>l;++l)e[o]=a,++o;return e}function v(t){if(0===t.length)return new Int32Array;var e,r,n=2;for(e=1,r=t.length;r>e;++e)t[e-1]!==t[e]&&(n+=2);var i=new Int32Array(n),o=0,a=1;for(e=1,r=t.length;r>e;++e)t[e-1]!==t[e]?(i[o]=t[e-1],i[o+1]=a,a=1,o+=2):++a;return i[o]=t[t.length-1],i[o+1]=a,i}function b(t,e){var r=t.length;e||(e=new t.constructor(r)),r&&(e[0]=t[0]);for(var n=1;r>n;++n)e[n]=t[n]+e[n-1];return e}function y(t,e){var r=t.length;e||(e=new t.constructor(r)),e[0]=t[0];for(var n=1;r>n;++n)e[n]=t[n]-t[n-1];return e}function x(t,e){var r,n,i=t instanceof Int8Array?127:32767,o=-i-1,a=t.length;if(!e){var s=0;for(r=0;a>r;++r)t[r]o&&++s;e=new Int32Array(s)}for(r=0,n=0;a>r;){for(var l=0;t[r]===i||t[r]===o;)l+=t[r],++r;l+=t[r],++r,e[n]=l,++n}return e}function w(t,e,r){return p(x(t,d(r)),e,r)}function _(t,e,r){var n=x(t,d(r));return function(t,e,r){return p(b(t,d(r)),e,r)}(n,e,function(t){return a(Float32Array,t,4)}(n))}function k(t,e,r){return function(t,e){var r,n=e?127:32767,i=-n-1,o=t.length,a=0;for(r=0;o>r;++r)0===(c=t[r])?++a:c>0?(a+=Math.ceil(c/n),c%n==0&&(a+=1)):(a+=Math.ceil(c/i),c%i==0&&(a+=1));var s=e?new Int8Array(a):new Int16Array(a),l=0;for(r=0;o>r;++r){var c;if((c=t[r])>=0)for(;c>=n;)s[l]=n,++l,c-=n;else for(;i>=c;)s[l]=i,++l,c-=i;s[l]=c,++l}return s}(function(t,e,r){return y(m(t,e),r)}(t,e),r)}function A(t,e,r,n){var i=new ArrayBuffer(12+n.byteLength),o=new Uint8Array(i),a=new DataView(i);return a.setInt32(0,t),a.setInt32(4,e),r&&o.set(r,8),o.set(n,12),o}function T(t){return A(2,t.length,void 0,l(t))}function M(t){return A(4,t.length,void 0,f(t))}function S(t,e){return A(5,t.length/e,f([e]),l(t))}function C(t){return A(6,t.length,void 0,f(v(t)))}function E(t){return A(8,t.length,void 0,f(function(t){return v(y(t))}(t)))}function L(t,e){return A(9,t.length,f([e]),f(function(t,e){return v(m(t,e))}(t,e)))}function z(t,e){return A(10,t.length,f([e]),function(t,e){var r=t.length;e||(e=new Uint8Array(2*r));for(var n=s(e),i=0;r>i;++i)n.setInt16(2*i,t[i]);return l(e)}(k(t,e)))}function O(t){var e={};return N.forEach((function(r){void 0!==t[r]&&(e[r]=t[r])})),t.bondAtomList&&(e.bondAtomList=M(t.bondAtomList)),t.bondOrderList&&(e.bondOrderList=T(t.bondOrderList)),e.xCoordList=z(t.xCoordList,1e3),e.yCoordList=z(t.yCoordList,1e3),e.zCoordList=z(t.zCoordList,1e3),t.bFactorList&&(e.bFactorList=z(t.bFactorList,100)),t.atomIdList&&(e.atomIdList=E(t.atomIdList)),t.altLocList&&(e.altLocList=C(t.altLocList)),t.occupancyList&&(e.occupancyList=L(t.occupancyList,100)),e.groupIdList=E(t.groupIdList),e.groupTypeList=M(t.groupTypeList),t.secStructList&&(e.secStructList=T(t.secStructList)),t.insCodeList&&(e.insCodeList=C(t.insCodeList)),t.sequenceIndexList&&(e.sequenceIndexList=E(t.sequenceIndexList)),e.chainIdList=S(t.chainIdList,4),t.chainNameList&&(e.chainNameList=S(t.chainNameList,4)),e}function D(t){function e(t){for(var e={},r=0;t>r;r++)e[o()]=o();return e}function r(e){var r=t.subarray(a,a+e);return a+=e,r}function n(e){var r=t.subarray(a,a+e);a+=e;var n=65535;if(e>n){for(var i=[],o=0;or;r++)e[r]=o();return e}function o(){var o,l,c=t[a];if(!(128&c))return a++,c;if(128==(240&c))return a++,e(l=15&c);if(144==(240&c))return a++,i(l=15&c);if(160==(224&c))return a++,n(l=31&c);if(!(224&~c))return o=s.getInt8(a),a++,o;switch(c){case 192:return a++,null;case 194:return a++,!1;case 195:return a++,!0;case 196:return l=s.getUint8(a+1),a+=2,r(l);case 197:return l=s.getUint16(a+1),a+=3,r(l);case 198:return l=s.getUint32(a+1),a+=5,r(l);case 202:return o=s.getFloat32(a+1),a+=5,o;case 203:return o=s.getFloat64(a+1),a+=9,o;case 204:return o=t[a+1],a+=2,o;case 205:return o=s.getUint16(a+1),a+=3,o;case 206:return o=s.getUint32(a+1),a+=5,o;case 208:return o=s.getInt8(a+1),a+=2,o;case 209:return o=s.getInt16(a+1),a+=3,o;case 210:return o=s.getInt32(a+1),a+=5,o;case 217:return l=s.getUint8(a+1),a+=2,n(l);case 218:return l=s.getUint16(a+1),a+=3,n(l);case 219:return l=s.getUint32(a+1),a+=5,n(l);case 220:return l=s.getUint16(a+1),a+=3,i(l);case 221:return l=s.getUint32(a+1),a+=5,i(l);case 222:return l=s.getUint16(a+1),a+=3,e(l);case 223:return l=s.getUint32(a+1),a+=5,e(l)}throw new Error("Unknown type 0x"+c.toString(16))}var a=0,s=new DataView(t.buffer);return o()}function I(t,e,r,n){switch(t){case 1:return function(t,e){var r=t.length;e||(e=new Float32Array(r/4));for(var n=s(e),i=s(t),o=0,a=0,l=r/4;l>o;++o,a+=4)n.setFloat32(a,i.getFloat32(a),!0);return e}(e);case 2:return c(e);case 3:return u(e);case 4:return h(e);case 5:return l(e);case 6:return g(h(e),new Uint8Array(r));case 7:return g(h(e));case 8:return function(t,e){return b(g(t),e)}(h(e));case 9:return function(t,e,r){return p(g(t,d(r)),e,r)}(h(e),h(n)[0]);case 10:return _(u(e),h(n)[0]);case 11:return p(u(e),h(n)[0]);case 12:return w(u(e),h(n)[0]);case 13:return w(c(e),h(n)[0]);case 14:return x(u(e));case 15:return x(c(e))}}function R(t,e){var r=(e=e||{}).ignoreFields,n={};return B.forEach((function(e){var i=!!r&&-1!==r.indexOf(e),o=t[e];i||void 0===o||(o instanceof Uint8Array?n[e]=I.apply(null,function(t){var e=s(t),r=e.getInt32(0),n=e.getInt32(4),i=t.subarray(8,12);return[r,t=t.subarray(12),n,i]}(o)):n[e]=o)})),n}function F(t){return String.fromCharCode.apply(null,t).replace(/\0/g,"")}function P(t,e){return t instanceof ArrayBuffer&&(t=new Uint8Array(t)),R(t instanceof Uint8Array?D(t):t,e)}function j(t,e,r,n){var i=new XMLHttpRequest;i.addEventListener("load",(function(){try{var t=P(i.response);r(t)}catch(t){n(t)}}),!0),i.addEventListener("error",n,!0),i.responseType="arraybuffer",i.open("GET",e+t.toUpperCase()),i.send()}var N=["mmtfVersion","mmtfProducer","unitCell","spaceGroup","structureId","title","depositionDate","releaseDate","experimentalMethods","resolution","rFree","rWork","bioAssemblyList","ncsOperatorList","entityList","groupList","numBonds","numAtoms","numGroups","numChains","numModels","groupsPerChain","chainsPerModel"],B=N.concat(["xCoordList","yCoordList","zCoordList","groupIdList","groupTypeList","chainIdList","bFactorList","atomIdList","altLocList","occupancyList","secStructList","insCodeList","sequenceIndexList","chainNameList","bondAtomList","bondOrderList"]),U="//mmtf.rcsb.org/v1.0/",G=U+"full/",V=U+"reduced/";t.encode=function(t){return o(O(t))},t.decode=P,t.traverse=function(t,e,r){var n,i,o,a,s,l,c=(r=r||{}).firstModelOnly,d=e.onModel,u=e.onChain,h=e.onGroup,f=e.onAtom,p=e.onBond,m=0,g=0,v=0,b=0,y=0,x=-1,w=t.chainNameList,_=t.secStructList,k=t.insCodeList,A=t.sequenceIndexList,T=t.atomIdList,M=t.bFactorList,S=t.altLocList,C=t.occupancyList,E=t.bondAtomList,L=t.bondOrderList;for(n=0,i=t.chainsPerModel.length;i>n&&!(c&&m>0);++n){var z=t.chainsPerModel[m];for(d&&d({chainCount:z,modelIndex:m}),o=0;z>o;++o){var O=t.groupsPerChain[g];if(u){var D=F(t.chainIdList.subarray(4*g,4*g+4)),I=null;w&&(I=F(w.subarray(4*g,4*g+4))),u({groupCount:O,chainIndex:g,modelIndex:m,chainId:D,chainName:I})}for(a=0;O>a;++a){var R=t.groupList[t.groupTypeList[v]],P=R.atomNameList.length;if(h){var j=null;_&&(j=_[v]);var N=null;t.insCodeList&&(N=String.fromCharCode(k[v]));var B=null;A&&(B=A[v]),h({atomCount:P,groupIndex:v,chainIndex:g,modelIndex:m,groupId:t.groupIdList[v],groupType:t.groupTypeList[v],groupName:R.groupName,singleLetterCode:R.singleLetterCode,chemCompType:R.chemCompType,secStruct:j,insCode:N,sequenceIndex:B})}for(s=0;P>s;++s){if(f){var U=null;T&&(U=T[b]);var G=null;M&&(G=M[b]);var V=null;S&&(V=String.fromCharCode(S[b]));var H=null;C&&(H=C[b]),f({atomIndex:b,groupIndex:v,chainIndex:g,modelIndex:m,atomId:U,element:R.elementList[s],atomName:R.atomNameList[s],formalCharge:R.formalChargeList[s],xCoord:t.xCoordList[b],yCoord:t.yCoordList[b],zCoord:t.zCoordList[b],bFactor:G,altLoc:V,occupancy:H})}b+=1}if(p){var W=R.bondAtomList;for(s=0,l=R.bondOrderList.length;l>s;++s)p({atomIndex1:b-P+W[2*s],atomIndex2:b-P+W[2*s+1],bondOrder:R.bondOrderList[s]})}v+=1}g+=1}if(y=x+1,x=b-1,p&&E)for(s=0,l=E.length;l>s;s+=2){var q=E[s],Y=E[s+1];(q>=y&&x>=q||Y>=y&&x>=Y)&&p({atomIndex1:q,atomIndex2:Y,bondOrder:L?L[s/2]:null})}m+=1}},t.fetch=function(t,e,r){j(t,G,e,r)},t.fetchReduced=function(t,e,r){j(t,V,e,r)},t.version="v1.0.1",t.fetchUrl=G,t.fetchReducedUrl=V,t.encodeMsgpack=o,t.encodeMmtf=O,t.decodeMsgpack=D,t.decodeMmtf=R}(e)},"./node_modules/pako/dist/pako.esm.mjs":(t,e,r)=>{"use strict";function n(t){let e=t.length;for(;--e>=0;)t[e]=0}r.r(e),r.d(e,{Deflate:()=>dr,Inflate:()=>pr,constants:()=>br,default:()=>yr,deflate:()=>ur,deflateRaw:()=>hr,gzip:()=>fr,inflate:()=>mr,inflateRaw:()=>gr,ungzip:()=>vr});const i=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),o=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),s=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=new Array(576);n(l);const c=new Array(60);n(c);const d=new Array(512);n(d);const u=new Array(256);n(u);const h=new Array(29);n(h);const f=new Array(30);function p(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}let m,g,v;function b(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}n(f);const y=t=>t<256?d[t]:d[256+(t>>>7)],x=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},w=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<{w(t,r[2*e],r[2*e+1])},k=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},A=(t,e,r)=>{const n=new Array(16);let i,o,a=0;for(i=1;i<=15;i++)a=a+r[i-1]<<1,n[i]=a;for(o=0;o<=e;o++){let e=t[2*o+1];0!==e&&(t[2*o]=k(n[e]++,e))}},T=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},M=t=>{t.bi_valid>8?x(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=(t,e,r,n)=>{const i=2*e,o=2*r;return t[i]{const n=t.heap[r];let i=r<<1;for(;i<=t.heap_len&&(i{let n,a,s,l,c=0;if(0!==t.sym_next)do{n=255&t.pending_buf[t.sym_buf+c++],n+=(255&t.pending_buf[t.sym_buf+c++])<<8,a=t.pending_buf[t.sym_buf+c++],0===n?_(t,a,e):(s=u[a],_(t,s+256+1,e),l=i[s],0!==l&&(a-=h[s],w(t,a,l)),n--,s=y(n),_(t,s,r),l=o[s],0!==l&&(n-=f[s],w(t,n,l)))}while(c{const r=e.dyn_tree,n=e.stat_desc.static_tree,i=e.stat_desc.has_stree,o=e.stat_desc.elems;let a,s,l,c=-1;for(t.heap_len=0,t.heap_max=573,a=0;a>1;a>=1;a--)C(t,r,a);l=o;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],C(t,r,1),s=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=s,r[2*l]=r[2*a]+r[2*s],t.depth[l]=(t.depth[a]>=t.depth[s]?t.depth[a]:t.depth[s])+1,r[2*a+1]=r[2*s+1]=l,t.heap[1]=l++,C(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,i=e.stat_desc.static_tree,o=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,l=e.stat_desc.max_length;let c,d,u,h,f,p,m=0;for(h=0;h<=15;h++)t.bl_count[h]=0;for(r[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<573;c++)d=t.heap[c],h=r[2*r[2*d+1]+1]+1,h>l&&(h=l,m++),r[2*d+1]=h,d>n||(t.bl_count[h]++,f=0,d>=s&&(f=a[d-s]),p=r[2*d],t.opt_len+=p*(h+f),o&&(t.static_len+=p*(i[2*d+1]+f)));if(0!==m){do{for(h=l-1;0===t.bl_count[h];)h--;t.bl_count[h]--,t.bl_count[h+1]+=2,t.bl_count[l]--,m-=2}while(m>0);for(h=l;0!==h;h--)for(d=t.bl_count[h];0!==d;)u=t.heap[--c],u>n||(r[2*u+1]!==h&&(t.opt_len+=(h-r[2*u+1])*r[2*u],r[2*u+1]=h),d--)}})(t,e),A(r,c,t.bl_count)},z=(t,e,r)=>{let n,i,o=-1,a=e[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++s{let n,i,o=-1,a=e[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),n=0;n<=r;n++)if(i=a,a=e[2*(n+1)+1],!(++s{w(t,0+(n?1:0),3),M(t),x(t,r),x(t,~r),r&&t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r};var R={_tr_init:t=>{D||((()=>{let t,e,r,n,s;const b=new Array(16);for(r=0,n=0;n<28;n++)for(h[n]=r,t=0;t<1<>=7;n<30;n++)for(f[n]=s<<7,t=0;t<1<{let i,o,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),L(t,t.l_desc),L(t,t.d_desc),a=(t=>{let e;for(z(t,t.dyn_ltree,t.l_desc.max_code),z(t,t.dyn_dtree,t.d_desc.max_code),L(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*s[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),i=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?I(t,e,r,n):4===t.strategy||o===i?(w(t,2+(n?1:0),3),E(t,l,c)):(w(t,4+(n?1:0),3),((t,e,r,n)=>{let i;for(w(t,e-257,5),w(t,r-1,5),w(t,n-4,4),i=0;i(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=r,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(u[r]+256+1)]++,t.dyn_dtree[2*y(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{w(t,2,3),_(t,256,l),(t=>{16===t.bi_valid?(x(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}},F=(t,e,r,n)=>{let i=65535&t,o=t>>>16&65535,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{i=i+e[n++]|0,o=o+i|0}while(--a);i%=65521,o%=65521}return i|o<<16};const P=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());var j=(t,e,r,n)=>{const i=P,o=n+r;t^=-1;for(let r=n;r>>8^i[255&(t^e[r])];return~t},N={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},B={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:U,_tr_stored_block:G,_tr_flush_block:V,_tr_tally:H,_tr_align:W}=R,{Z_NO_FLUSH:q,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:Z,Z_FINISH:X,Z_BLOCK:$,Z_OK:J,Z_STREAM_END:K,Z_STREAM_ERROR:Q,Z_DATA_ERROR:tt,Z_BUF_ERROR:et,Z_DEFAULT_COMPRESSION:rt,Z_FILTERED:nt,Z_HUFFMAN_ONLY:it,Z_RLE:ot,Z_FIXED:at,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:lt,Z_DEFLATED:ct}=B,dt=258,ut=262,ht=42,ft=113,pt=666,mt=(t,e)=>(t.msg=N[e],e),gt=t=>2*t-(t>4?9:0),vt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},bt=t=>{let e,r,n,i=t.w_size;e=t.hash_size,n=e;do{r=t.head[--n],t.head[n]=r>=i?r-i:0}while(--e);e=i,n=e;do{r=t.prev[--n],t.prev[n]=r>=i?r-i:0}while(--e)};let yt=(t,e,r)=>(e<{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},wt=(t,e)=>{V(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,xt(t.strm)},_t=(t,e)=>{t.pending_buf[t.pending++]=e},kt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},At=(t,e,r,n)=>{let i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),r),1===t.state.wrap?t.adler=F(t.adler,e,i,r):2===t.state.wrap&&(t.adler=j(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)},Tt=(t,e)=>{let r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match;const l=t.strstart>t.w_size-ut?t.strstart-(t.w_size-ut):0,c=t.window,d=t.w_mask,u=t.prev,h=t.strstart+dt;let f=c[o+a-1],p=c[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(r=e,c[r+a]===p&&c[r+a-1]===f&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&oa){if(t.match_start=e,a=n,n>=s)break;f=c[o+a-1],p=c[o+a]}}}while((e=u[e&d])>l&&0!=--i);return a<=t.lookahead?a:t.lookahead},Mt=t=>{const e=t.w_size;let r,n,i;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-ut)&&(t.window.set(t.window.subarray(e,e+e-n),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),bt(t),n+=e),0===t.strm.avail_in)break;if(r=At(t.strm,t.window,t.strstart+t.lookahead,n),t.lookahead+=r,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=yt(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=yt(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead{let r,n,i,o=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,a=0,s=t.strm.avail_in;do{if(r=65535,i=t.bi_valid+42>>3,t.strm.avail_outn+t.strm.avail_in&&(r=n+t.strm.avail_in),r>i&&(r=i),r>8,t.pending_buf[t.pending-2]=~r,t.pending_buf[t.pending-1]=~r>>8,xt(t.strm),n&&(n>r&&(n=r),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,r-=n),r&&(At(t.strm,t.strm.output,t.strm.next_out,r),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r)}while(0===a);return s-=t.strm.avail_in,s&&(s>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=s&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-s,t.strm.next_in),t.strstart),t.strstart+=s,t.insert+=s>t.w_size-t.insert?t.w_size-t.insert:s),t.block_start=t.strstart),t.high_wateri&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,i+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),i>t.strm.avail_in&&(i=t.strm.avail_in),i&&(At(t.strm,t.window,t.strstart,i),t.strstart+=i,t.insert+=i>t.w_size-t.insert?t.w_size-t.insert:i),t.high_water>3,i=t.pending_buf_size-i>65535?65535:t.pending_buf_size-i,o=i>t.w_size?t.w_size:i,n=t.strstart-t.block_start,(n>=o||(n||e===X)&&e!==q&&0===t.strm.avail_in&&n<=i)&&(r=n>i?i:n,a=e===X&&0===t.strm.avail_in&&r===n?1:0,G(t,t.block_start,r,a),t.block_start+=r,xt(t.strm)),a?3:1)},Ct=(t,e)=>{let r,n;for(;;){if(t.lookahead=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-ut&&(t.match_length=Tt(t,r)),t.match_length>=3)if(n=H(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=yt(t,t.ins_h,t.window[t.strstart+1]);else n=H(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(wt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===X?(wt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(wt(t,!1),0===t.strm.avail_out)?1:2},Et=(t,e)=>{let r,n,i;for(;;){if(t.lookahead=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=H(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(wt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=H(t,0,t.window[t.strstart-1]),n&&wt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=H(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===X?(wt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(wt(t,!1),0===t.strm.avail_out)?1:2};function Lt(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}const zt=[new Lt(0,0,0,0,St),new Lt(4,4,8,4,Ct),new Lt(4,5,16,8,Ct),new Lt(4,6,32,32,Ct),new Lt(4,4,16,16,Et),new Lt(8,16,32,32,Et),new Lt(8,16,128,128,Et),new Lt(8,32,128,256,Et),new Lt(32,128,258,1024,Et),new Lt(32,258,258,4096,Et)];function Ot(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ct,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),vt(this.dyn_ltree),vt(this.dyn_dtree),vt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),vt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),vt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Dt=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==ht&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==ft&&e.status!==pt?1:0},It=t=>{if(Dt(t))return mt(t,Q);t.total_in=t.total_out=0,t.data_type=lt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?ht:ft,t.adler=2===e.wrap?0:1,e.last_flush=-2,U(e),J},Rt=t=>{const e=It(t);var r;return e===J&&((r=t.state).window_size=2*r.w_size,vt(r.head),r.max_lazy_match=zt[r.level].max_lazy,r.good_match=zt[r.level].good_length,r.nice_match=zt[r.level].nice_length,r.max_chain_length=zt[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),e},Ft=(t,e,r,n,i,o)=>{if(!t)return Q;let a=1;if(e===rt&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>9||r!==ct||n<8||n>15||e<0||e>9||o<0||o>at||8===n&&1!==a)return mt(t,Q);8===n&&(n=9);const s=new Ot;return t.state=s,s.strm=t,s.status=ht,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<Ft(t,e,ct,15,8,st),deflateInit2:Ft,deflateReset:Rt,deflateResetKeep:It,deflateSetHeader:(t,e)=>Dt(t)||2!==t.state.wrap?Q:(t.state.gzhead=e,J),deflate:(t,e)=>{if(Dt(t)||e>$||e<0)return t?mt(t,Q):Q;const r=t.state;if(!t.output||0!==t.avail_in&&!t.input||r.status===pt&&e!==X)return mt(t,0===t.avail_out?et:Q);const n=r.last_flush;if(r.last_flush=e,0!==r.pending){if(xt(t),0===t.avail_out)return r.last_flush=-1,J}else if(0===t.avail_in&>(e)<=gt(n)&&e!==X)return mt(t,et);if(r.status===pt&&0!==t.avail_in)return mt(t,et);if(r.status===ht&&0===r.wrap&&(r.status=ft),r.status===ht){let e=ct+(r.w_bits-8<<4)<<8,n=-1;if(n=r.strategy>=it||r.level<2?0:r.level<6?1:6===r.level?2:3,e|=n<<6,0!==r.strstart&&(e|=32),e+=31-e%31,kt(r,e),0!==r.strstart&&(kt(r,t.adler>>>16),kt(r,65535&t.adler)),t.adler=1,r.status=ft,xt(t),0!==r.pending)return r.last_flush=-1,J}if(57===r.status)if(t.adler=0,_t(r,31),_t(r,139),_t(r,8),r.gzhead)_t(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),_t(r,255&r.gzhead.time),_t(r,r.gzhead.time>>8&255),_t(r,r.gzhead.time>>16&255),_t(r,r.gzhead.time>>24&255),_t(r,9===r.level?2:r.strategy>=it||r.level<2?4:0),_t(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(_t(r,255&r.gzhead.extra.length),_t(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=j(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(_t(r,0),_t(r,0),_t(r,0),_t(r,0),_t(r,0),_t(r,9===r.level?2:r.strategy>=it||r.level<2?4:0),_t(r,3),r.status=ft,xt(t),0!==r.pending)return r.last_flush=-1,J;if(69===r.status){if(r.gzhead.extra){let e=r.pending,n=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+n>r.pending_buf_size;){let i=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+i),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>e&&(t.adler=j(t.adler,r.pending_buf,r.pending-e,e)),r.gzindex+=i,xt(t),0!==r.pending)return r.last_flush=-1,J;e=0,n-=i}let i=new Uint8Array(r.gzhead.extra);r.pending_buf.set(i.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending+=n,r.gzhead.hcrc&&r.pending>e&&(t.adler=j(t.adler,r.pending_buf,r.pending-e,e)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let e,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(t.adler=j(t.adler,r.pending_buf,r.pending-n,n)),xt(t),0!==r.pending)return r.last_flush=-1,J;n=0}e=r.gzindexn&&(t.adler=j(t.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let e,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(t.adler=j(t.adler,r.pending_buf,r.pending-n,n)),xt(t),0!==r.pending)return r.last_flush=-1,J;n=0}e=r.gzindexn&&(t.adler=j(t.adler,r.pending_buf,r.pending-n,n))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(xt(t),0!==r.pending))return r.last_flush=-1,J;_t(r,255&t.adler),_t(r,t.adler>>8&255),t.adler=0}if(r.status=ft,xt(t),0!==r.pending)return r.last_flush=-1,J}if(0!==t.avail_in||0!==r.lookahead||e!==q&&r.status!==pt){let n=0===r.level?St(r,e):r.strategy===it?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(Mt(t),0===t.lookahead)){if(e===q)return 1;break}if(t.match_length=0,r=H(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(wt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(wt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(wt(t,!1),0===t.strm.avail_out)?1:2})(r,e):r.strategy===ot?((t,e)=>{let r,n,i,o;const a=t.window;for(;;){if(t.lookahead<=dt){if(Mt(t),t.lookahead<=dt&&e===q)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=t.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=t.strstart+dt;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=H(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=H(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(wt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(wt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(wt(t,!1),0===t.strm.avail_out)?1:2})(r,e):zt[r.level].func(r,e);if(3!==n&&4!==n||(r.status=pt),1===n||3===n)return 0===t.avail_out&&(r.last_flush=-1),J;if(2===n&&(e===Y?W(r):e!==$&&(G(r,0,0,!1),e===Z&&(vt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),xt(t),0===t.avail_out))return r.last_flush=-1,J}return e!==X?J:r.wrap<=0?K:(2===r.wrap?(_t(r,255&t.adler),_t(r,t.adler>>8&255),_t(r,t.adler>>16&255),_t(r,t.adler>>24&255),_t(r,255&t.total_in),_t(r,t.total_in>>8&255),_t(r,t.total_in>>16&255),_t(r,t.total_in>>24&255)):(kt(r,t.adler>>>16),kt(r,65535&t.adler)),xt(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?J:K)},deflateEnd:t=>{if(Dt(t))return Q;const e=t.state.status;return t.state=null,e===ft?mt(t,tt):J},deflateSetDictionary:(t,e)=>{let r=e.length;if(Dt(t))return Q;const n=t.state,i=n.wrap;if(2===i||1===i&&n.status!==ht||n.lookahead)return Q;if(1===i&&(t.adler=F(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===i&&(vt(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const o=t.avail_in,a=t.next_in,s=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,Mt(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,Mt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=a,t.input=s,t.avail_in=o,n.wrap=i,J},deflateInfo:"pako deflate (from Nodeca project)"};const jt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Nt={assign:function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const e in r)jt(r,e)&&(t[e]=r[e])}}return t},flattenChunks:t=>{let e=0;for(let r=0,n=t.length;r=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Ut[254]=Ut[254]=1;var Gt={string2buf:t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,i,o,a=t.length,s=0;for(i=0;i>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e},buf2string:(t,e)=>{const r=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let n,i;const o=new Array(2*r);for(i=0,n=0;n4)o[i++]=65533,n+=a-1;else{for(e&=2===a?31:3===a?15:7;a>1&&n1?o[i++]=65533:e<65536?o[i++]=e:(e-=65536,o[i++]=55296|e>>10&1023,o[i++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Bt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let n=0;n{(e=e||t.length)>t.length&&(e=t.length);let r=e-1;for(;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+Ut[t[r]]>e?r:e}},Vt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ht=Object.prototype.toString,{Z_NO_FLUSH:Wt,Z_SYNC_FLUSH:qt,Z_FULL_FLUSH:Yt,Z_FINISH:Zt,Z_OK:Xt,Z_STREAM_END:$t,Z_DEFAULT_COMPRESSION:Jt,Z_DEFAULT_STRATEGY:Kt,Z_DEFLATED:Qt}=B;function te(t){this.options=Nt.assign({level:Jt,method:Qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Kt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Vt,this.strm.avail_out=0;let r=Pt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==Xt)throw new Error(N[r]);if(e.header&&Pt.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Gt.string2buf(e.dictionary):"[object ArrayBuffer]"===Ht.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=Pt.deflateSetDictionary(this.strm,t),r!==Xt)throw new Error(N[r]);this._dict_set=!0}}function ee(t,e){const r=new te(e);if(r.push(t,!0),r.err)throw r.msg||N[r.err];return r.result}te.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize;let i,o;if(this.ended)return!1;for(o=e===~~e?e:!0===e?Zt:Wt,"string"==typeof t?r.input=Gt.string2buf(t):"[object ArrayBuffer]"===Ht.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(o===qt||o===Yt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(i=Pt.deflate(r,o),i===$t)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),i=Pt.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Xt;if(0!==r.avail_out){if(o>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},te.prototype.onData=function(t){this.chunks.push(t)},te.prototype.onEnd=function(t){t===Xt&&(this.result=Nt.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var re={Deflate:te,deflate:ee,deflateRaw:function(t,e){return(e=e||{}).raw=!0,ee(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,ee(t,e)},constants:B};const ne=16209;var ie=function(t,e){let r,n,i,o,a,s,l,c,d,u,h,f,p,m,g,v,b,y,x,w,_,k,A,T;const M=t.state;r=t.next_in,A=t.input,n=r+(t.avail_in-5),i=t.next_out,T=t.output,o=i-(e-t.avail_out),a=i+(t.avail_out-257),s=M.dmax,l=M.wsize,c=M.whave,d=M.wnext,u=M.window,h=M.hold,f=M.bits,p=M.lencode,m=M.distcode,g=(1<>>24,h>>>=y,f-=y,y=b>>>16&255,0===y)T[i++]=65535&b;else{if(!(16&y)){if(64&y){if(32&y){M.mode=16191;break t}t.msg="invalid literal/length code",M.mode=ne;break t}b=p[(65535&b)+(h&(1<>>=y,f-=y),f<15&&(h+=A[r++]<>>24,h>>>=y,f-=y,y=b>>>16&255,16&y){if(w=65535&b,y&=15,fs){t.msg="invalid distance too far back",M.mode=ne;break t}if(h>>>=y,f-=y,y=i-o,w>y){if(y=w-y,y>c&&M.sane){t.msg="invalid distance too far back",M.mode=ne;break t}if(_=0,k=u,0===d){if(_+=l-y,y2;)T[i++]=k[_++],T[i++]=k[_++],T[i++]=k[_++],x-=3;x&&(T[i++]=k[_++],x>1&&(T[i++]=k[_++]))}else{_=i-w;do{T[i++]=T[_++],T[i++]=T[_++],T[i++]=T[_++],x-=3}while(x>2);x&&(T[i++]=T[_++],x>1&&(T[i++]=T[_++]))}break}if(64&y){t.msg="invalid distance code",M.mode=ne;break t}b=m[(65535&b)+(h&(1<>3,r-=x,f-=x<<3,h&=(1<{const l=s.bits;let c,d,u,h,f,p,m=0,g=0,v=0,b=0,y=0,x=0,w=0,_=0,k=0,A=0,T=null;const M=new Uint16Array(16),S=new Uint16Array(16);let C,E,L,z=null;for(m=0;m<=15;m++)M[m]=0;for(g=0;g=1&&0===M[b];b--);if(y>b&&(y=b),0===b)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(v=1;v0&&(0===t||1!==b))return-1;for(S[1]=0,m=1;m<15;m++)S[m+1]=S[m]+M[m];for(g=0;g852||2===t&&k>592)return 1;for(;;){C=m-w,a[g]+1=p?(E=z[a[g]-p],L=T[a[g]-p]):(E=96,L=0),c=1<>w)+d]=C<<24|E<<16|L}while(0!==d);for(c=1<>=1;if(0!==c?(A&=c-1,A+=c):A=0,g++,0==--M[m]){if(m===b)break;m=e[r+a[g]]}if(m>y&&(A&h)!==u){for(0===w&&(w=y),f+=v,x=m-w,_=1<852||2===t&&k>592)return 1;u=A&h,i[u]=y<<24|x<<16|f-o}}return 0!==A&&(i[f+A]=m-w<<24|64<<16),s.bits=y,0};const{Z_FINISH:de,Z_BLOCK:ue,Z_TREES:he,Z_OK:fe,Z_STREAM_END:pe,Z_NEED_DICT:me,Z_STREAM_ERROR:ge,Z_DATA_ERROR:ve,Z_MEM_ERROR:be,Z_BUF_ERROR:ye,Z_DEFLATED:xe}=B,we=16180,_e=16190,ke=16191,Ae=16192,Te=16194,Me=16199,Se=16200,Ce=16206,Ee=16209,Le=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ze(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Oe=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode16211?1:0},De=t=>{if(Oe(t))return ge;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=we,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,fe},Ie=t=>{if(Oe(t))return ge;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,De(t)},Re=(t,e)=>{let r;if(Oe(t))return ge;const n=t.state;return e<0?(r=0,e=-e):(r=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?ge:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,Ie(t))},Fe=(t,e)=>{if(!t)return ge;const r=new ze;t.state=r,r.strm=t,r.window=null,r.mode=we;const n=Re(t,e);return n!==fe&&(t.state=null),n};let Pe,je,Ne=!0;const Be=t=>{if(Ne){Pe=new Int32Array(512),je=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ce(1,t.lens,0,288,Pe,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ce(2,t.lens,0,32,je,0,t.work,{bits:5}),Ne=!1}t.lencode=Pe,t.lenbits=9,t.distcode=je,t.distbits=5},Ue=(t,e,r,n)=>{let i;const o=t.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(e.subarray(r-o.wsize,r),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),o.window.set(e.subarray(r-n,r-n+i),o.wnext),(n-=i)?(o.window.set(e.subarray(r-n,r),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whaveFe(t,15),inflateInit2:Fe,inflate:(t,e)=>{let r,n,i,o,a,s,l,c,d,u,h,f,p,m,g,v,b,y,x,w,_,k,A=0;const T=new Uint8Array(4);let M,S;const C=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Oe(t)||!t.output||!t.input&&0!==t.avail_in)return ge;r=t.state,r.mode===ke&&(r.mode=Ae),a=t.next_out,i=t.output,l=t.avail_out,o=t.next_in,n=t.input,s=t.avail_in,c=r.hold,d=r.bits,u=s,h=l,k=fe;t:for(;;)switch(r.mode){case we:if(0===r.wrap){r.mode=Ae;break}for(;d<16;){if(0===s)break t;s--,c+=n[o++]<>>8&255,r.check=j(r.check,T,2,0),c=0,d=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=Ee;break}if((15&c)!==xe){t.msg="unknown compression method",r.mode=Ee;break}if(c>>>=4,d-=4,_=8+(15&c),0===r.wbits&&(r.wbits=_),_>15||_>r.wbits){t.msg="invalid window size",r.mode=Ee;break}r.dmax=1<>8&1),512&r.flags&&4&r.wrap&&(T[0]=255&c,T[1]=c>>>8&255,r.check=j(r.check,T,2,0)),c=0,d=0,r.mode=16182;case 16182:for(;d<32;){if(0===s)break t;s--,c+=n[o++]<>>8&255,T[2]=c>>>16&255,T[3]=c>>>24&255,r.check=j(r.check,T,4,0)),c=0,d=0,r.mode=16183;case 16183:for(;d<16;){if(0===s)break t;s--,c+=n[o++]<>8),512&r.flags&&4&r.wrap&&(T[0]=255&c,T[1]=c>>>8&255,r.check=j(r.check,T,2,0)),c=0,d=0,r.mode=16184;case 16184:if(1024&r.flags){for(;d<16;){if(0===s)break t;s--,c+=n[o++]<>>8&255,r.check=j(r.check,T,2,0)),c=0,d=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(f=r.length,f>s&&(f=s),f&&(r.head&&(_=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(o,o+f),_)),512&r.flags&&4&r.wrap&&(r.check=j(r.check,n,f,o)),s-=f,o+=f,r.length-=f),r.length))break t;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===s)break t;f=0;do{_=n[o+f++],r.head&&_&&r.length<65536&&(r.head.name+=String.fromCharCode(_))}while(_&&f>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=ke;break;case 16189:for(;d<32;){if(0===s)break t;s--,c+=n[o++]<>>=7&d,d-=7&d,r.mode=Ce;break}for(;d<3;){if(0===s)break t;s--,c+=n[o++]<>>=1,d-=1,3&c){case 0:r.mode=16193;break;case 1:if(Be(r),r.mode=Me,e===he){c>>>=2,d-=2;break t}break;case 2:r.mode=16196;break;case 3:t.msg="invalid block type",r.mode=Ee}c>>>=2,d-=2;break;case 16193:for(c>>>=7&d,d-=7&d;d<32;){if(0===s)break t;s--,c+=n[o++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=Ee;break}if(r.length=65535&c,c=0,d=0,r.mode=Te,e===he)break t;case Te:r.mode=16195;case 16195:if(f=r.length,f){if(f>s&&(f=s),f>l&&(f=l),0===f)break t;i.set(n.subarray(o,o+f),a),s-=f,o+=f,l-=f,a+=f,r.length-=f;break}r.mode=ke;break;case 16196:for(;d<14;){if(0===s)break t;s--,c+=n[o++]<>>=5,d-=5,r.ndist=1+(31&c),c>>>=5,d-=5,r.ncode=4+(15&c),c>>>=4,d-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=Ee;break}r.have=0,r.mode=16197;case 16197:for(;r.have>>=3,d-=3}for(;r.have<19;)r.lens[C[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},k=ce(0,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,k){t.msg="invalid code lengths set",r.mode=Ee;break}r.have=0,r.mode=16198;case 16198:for(;r.have>>24,v=A>>>16&255,b=65535&A,!(g<=d);){if(0===s)break t;s--,c+=n[o++]<>>=g,d-=g,r.lens[r.have++]=b;else{if(16===b){for(S=g+2;d>>=g,d-=g,0===r.have){t.msg="invalid bit length repeat",r.mode=Ee;break}_=r.lens[r.have-1],f=3+(3&c),c>>>=2,d-=2}else if(17===b){for(S=g+3;d>>=g,d-=g,_=0,f=3+(7&c),c>>>=3,d-=3}else{for(S=g+7;d>>=g,d-=g,_=0,f=11+(127&c),c>>>=7,d-=7}if(r.have+f>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=Ee;break}for(;f--;)r.lens[r.have++]=_}}if(r.mode===Ee)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=Ee;break}if(r.lenbits=9,M={bits:r.lenbits},k=ce(1,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,k){t.msg="invalid literal/lengths set",r.mode=Ee;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},k=ce(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,k){t.msg="invalid distances set",r.mode=Ee;break}if(r.mode=Me,e===he)break t;case Me:r.mode=Se;case Se:if(s>=6&&l>=258){t.next_out=a,t.avail_out=l,t.next_in=o,t.avail_in=s,r.hold=c,r.bits=d,ie(t,h),a=t.next_out,i=t.output,l=t.avail_out,o=t.next_in,n=t.input,s=t.avail_in,c=r.hold,d=r.bits,r.mode===ke&&(r.back=-1);break}for(r.back=0;A=r.lencode[c&(1<>>24,v=A>>>16&255,b=65535&A,!(g<=d);){if(0===s)break t;s--,c+=n[o++]<>y)],g=A>>>24,v=A>>>16&255,b=65535&A,!(y+g<=d);){if(0===s)break t;s--,c+=n[o++]<>>=y,d-=y,r.back+=y}if(c>>>=g,d-=g,r.back+=g,r.length=b,0===v){r.mode=16205;break}if(32&v){r.back=-1,r.mode=ke;break}if(64&v){t.msg="invalid literal/length code",r.mode=Ee;break}r.extra=15&v,r.mode=16201;case 16201:if(r.extra){for(S=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;A=r.distcode[c&(1<>>24,v=A>>>16&255,b=65535&A,!(g<=d);){if(0===s)break t;s--,c+=n[o++]<>y)],g=A>>>24,v=A>>>16&255,b=65535&A,!(y+g<=d);){if(0===s)break t;s--,c+=n[o++]<>>=y,d-=y,r.back+=y}if(c>>>=g,d-=g,r.back+=g,64&v){t.msg="invalid distance code",r.mode=Ee;break}r.offset=b,r.extra=15&v,r.mode=16203;case 16203:if(r.extra){for(S=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=Ee;break}r.mode=16204;case 16204:if(0===l)break t;if(f=h-l,r.offset>f){if(f=r.offset-f,f>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=Ee;break}f>r.wnext?(f-=r.wnext,p=r.wsize-f):p=r.wnext-f,f>r.length&&(f=r.length),m=r.window}else m=i,p=a-r.offset,f=r.length;f>l&&(f=l),l-=f,r.length-=f;do{i[a++]=m[p++]}while(--f);0===r.length&&(r.mode=Se);break;case 16205:if(0===l)break t;i[a++]=r.length,l--,r.mode=Se;break;case Ce:if(r.wrap){for(;d<32;){if(0===s)break t;s--,c|=n[o++]<{if(Oe(t))return ge;let e=t.state;return e.window&&(e.window=null),t.state=null,fe},inflateGetHeader:(t,e)=>{if(Oe(t))return ge;const r=t.state;return 2&r.wrap?(r.head=e,e.done=!1,fe):ge},inflateSetDictionary:(t,e)=>{const r=e.length;let n,i,o;return Oe(t)?ge:(n=t.state,0!==n.wrap&&n.mode!==_e?ge:n.mode===_e&&(i=1,i=F(i,e,r,0),i!==n.check)?ve:(o=Ue(t,e,r,r),o?(n.mode=16210,be):(n.havedict=1,fe)))},inflateInfo:"pako inflate (from Nodeca project)"},Ve=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const He=Object.prototype.toString,{Z_NO_FLUSH:We,Z_FINISH:qe,Z_OK:Ye,Z_STREAM_END:Ze,Z_NEED_DICT:Xe,Z_STREAM_ERROR:$e,Z_DATA_ERROR:Je,Z_MEM_ERROR:Ke}=B;function Qe(t){this.options=Nt.assign({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Vt,this.strm.avail_out=0;let r=Ge.inflateInit2(this.strm,e.windowBits);if(r!==Ye)throw new Error(N[r]);if(this.header=new Ve,Ge.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Gt.string2buf(e.dictionary):"[object ArrayBuffer]"===He.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=Ge.inflateSetDictionary(this.strm,e.dictionary),r!==Ye)))throw new Error(N[r])}function tr(t,e){const r=new Qe(e);if(r.push(t),r.err)throw r.msg||N[r.err];return r.result}Qe.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize,i=this.options.dictionary;let o,a,s;if(this.ended)return!1;for(a=e===~~e?e:!0===e?qe:We,"[object ArrayBuffer]"===He.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),o=Ge.inflate(r,a),o===Xe&&i&&(o=Ge.inflateSetDictionary(r,i),o===Ye?o=Ge.inflate(r,a):o===Je&&(o=Xe));r.avail_in>0&&o===Ze&&r.state.wrap>0&&0!==t[r.next_in];)Ge.inflateReset(r),o=Ge.inflate(r,a);switch(o){case $e:case Je:case Xe:case Ke:return this.onEnd(o),this.ended=!0,!1}if(s=r.avail_out,r.next_out&&(0===r.avail_out||o===Ze))if("string"===this.options.to){let t=Gt.utf8border(r.output,r.next_out),e=r.next_out-t,i=Gt.buf2string(r.output,t);r.next_out=e,r.avail_out=n-e,e&&r.output.set(r.output.subarray(t,t+e),0),this.onData(i)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(o!==Ye||0!==s){if(o===Ze)return o=Ge.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},Qe.prototype.onData=function(t){this.chunks.push(t)},Qe.prototype.onEnd=function(t){t===Ye&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Nt.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var er={Inflate:Qe,inflate:tr,inflateRaw:function(t,e){return(e=e||{}).raw=!0,tr(t,e)},ungzip:tr,constants:B};const{Deflate:rr,deflate:nr,deflateRaw:ir,gzip:or}=re,{Inflate:ar,inflate:sr,inflateRaw:lr,ungzip:cr}=er;var dr=rr,ur=nr,hr=ir,fr=or,pr=ar,mr=sr,gr=lr,vr=cr,br=B,yr={Deflate:rr,deflate:nr,deflateRaw:ir,gzip:or,Inflate:ar,inflate:sr,inflateRaw:lr,ungzip:cr,constants:B}}},__webpack_module_cache__={};function __nested_webpack_require_1637606__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__nested_webpack_require_1637606__),r.exports}__nested_webpack_require_1637606__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __nested_webpack_require_1637606__.d(e,{a:e}),e},__nested_webpack_require_1637606__.d=(t,e)=>{for(var r in e)__nested_webpack_require_1637606__.o(e,r)&&!__nested_webpack_require_1637606__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},__nested_webpack_require_1637606__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__nested_webpack_require_1637606__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__nested_webpack_require_1637606__("./src/index.ts"),__nested_webpack_require_1637606__("./src/SurfaceWorker.js");var __nested_webpack_exports__=__nested_webpack_require_1637606__("./src/exporter.js");return __nested_webpack_exports__})(),module.exports=factory()},27941:(t,e,r)=>{var n,i;(function(){var o={version:"3.8.0"},a=[].slice,s=function(t){return a.call(t)},l=self.document;function c(t){return t&&(t.ownerDocument||t.document||t).documentElement}function d(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(l)try{s(l.documentElement.childNodes)[0].nodeType}catch(t){s=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var u=this.Element.prototype,h=u.setAttribute,f=u.setAttributeNS,p=this.CSSStyleDeclaration.prototype,m=p.setProperty;u.setAttribute=function(t,e){h.call(this,t,e+"")},u.setAttributeNS=function(t,e,r){f.call(this,t,e,r+"")},p.setProperty=function(t,e,r){m.call(this,t,e+"",r)}}function g(t,e){return te?1:t>=e?0:NaN}function v(t){return null===t?NaN:+t}function b(t){return!isNaN(t)}function y(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[o],r)<0?n=o+1:i=o}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[o],r)>0?i=o:n=o+1}return n}}}o.ascending=g,o.descending=function(t,e){return et?1:e>=t?0:NaN},o.min=function(t,e){var r,n,i=-1,o=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},o.max=function(t,e){var r,n,i=-1,o=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},o.extent=function(t,e){var r,n,i,o=-1,a=t.length;if(1===arguments.length){for(;++o=n){r=i=n;break}for(;++on&&(r=n),i=n){r=i=n;break}for(;++on&&(r=n),i1)return a/(l-1)},o.deviation=function(){var t=o.variance.apply(this,arguments);return t?Math.sqrt(t):t};var x=y(g);function w(t){return t.length}o.bisectLeft=x.left,o.bisect=o.bisectRight=x.right,o.bisector=function(t){return y(1===t.length?function(e,r){return g(t(e),r)}:t)},o.shuffle=function(t,e,r){(o=arguments.length)<3&&(r=t.length,o<2&&(e=0));for(var n,i,o=r-e;o;)i=Math.random()*o--|0,n=t[o+e],t[o+e]=t[i+e],t[i+e]=n;return t},o.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},o.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e=0;)for(e=(n=t[i]).length;--e>=0;)r[--a]=n[e];return r};var _=Math.abs;function k(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function A(){this._=Object.create(null)}o.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error("infinite range");var n,i=[],o=function(t){for(var e=1;t*e%1;)e*=10;return e}(_(r)),a=-1;if(t*=o,e*=o,(r*=o)<0)for(;(n=t+r*++a)>e;)i.push(n/o);else for(;(n=t+r*++a)=n.length)return e?e.call(r,o):t?o.sort(t):o;for(var l,c,d,u,h=-1,f=o.length,p=n[s++],m=new A;++h=n.length)return t;var r=[],o=i[e++];return t.forEach((function(t,n){r.push({key:t,values:s(n,e)})})),o?r.sort((function(t,e){return o(t.key,e.key)})):r}return r.map=function(t,e){return a(e,t,0)},r.entries=function(t){return s(a(o.map,t,0),0)},r.key=function(t){return n.push(t),r},r.sortKeys=function(t){return i[n.length-1]=t,r},r.sortValues=function(e){return t=e,r},r.rollup=function(t){return e=t,r},r},o.set=function(t){var e=new I;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},o.event=null,o.requote=function(t){return t.replace(W,"\\$&")};var W=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,q={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function Y(t){return q(t,J),t}var Z=function(t,e){return e.querySelector(t)},X=function(t,e){return e.querySelectorAll(t)},$=function(t,e){var r=t.matches||t[P(t,"matchesSelector")];return $=function(t,e){return r.call(t,e)},$(t,e)};"function"==typeof Sizzle&&(Z=function(t,e){return Sizzle(t,e)[0]||null},X=Sizzle,$=Sizzle.matchesSelector),o.selection=function(){return o.select(l.documentElement)};var J=o.selection.prototype=[];function K(t){return"function"==typeof t?t:function(){return Z(t,this)}}function Q(t){return"function"==typeof t?t:function(){return X(t,this)}}J.select=function(t){var e,r,n,i,o=[];t=K(t);for(var a=-1,s=this.length;++a=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),et.hasOwnProperty(r)?{space:et[r],local:t}:t}},J.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node();return(t=o.ns.qualify(t)).local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(rt(e,t[e]));return this}return this.each(rt(t,e))},J.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=ot(t)).length,i=-1;if(e=r.classList){for(;++i=0;)(r=n[i])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this},J.sort=function(t){t=pt.apply(this,arguments);for(var e=-1,r=this.length;++e0&&(t=t.slice(0,i));var l=yt.get(t);function c(){var e=this[n];e&&(this.removeEventListener(t,e,e.$),delete this[n])}return l&&(t=l,a=wt),i?e?function(){var i=a(e,s(arguments));c.call(this),this.addEventListener(t,this[n]=i,i.$=r),i._=e}:c:e?N:function(){var e,r=new RegExp("^__on([^.]+)"+o.requote(t)+"$");for(var n in this)if(e=n.match(r)){var i=this[n];this.removeEventListener(e[1],i,i.$),delete this[n]}}}o.selection.enter=gt,o.selection.enter.prototype=vt,vt.append=J.append,vt.empty=J.empty,vt.node=J.node,vt.call=J.call,vt.size=J.size,vt.select=function(t){for(var e,r,n,i,o,a=[],s=-1,l=this.length;++s=n&&(n=e+1);!(a=s[n])&&++n1?Dt:t<-1?-Dt:Math.asin(t)}function Pt(t){return((t=Math.exp(t))+1/t)/2}var jt=Math.SQRT2;o.interpolateZoom=function(t,e){var r,n,i=t[0],o=t[1],a=t[2],s=e[0],l=e[1],c=e[2],d=s-i,u=l-o,h=d*d+u*u;if(h0&&(t=t.transition().duration(m)),t.call(_.event)}function S(){s&&s.domain(a.range().map((function(t){return(t-h.x)/h.k})).map(a.invert)),u&&u.domain(c.range().map((function(t){return(t-h.y)/h.k})).map(c.invert))}function C(t){g++||t({type:"zoomstart"})}function E(t){S(),t({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function L(t){--g||(t({type:"zoomend"}),e=null)}function z(){var t=this,e=w.of(t,arguments),r=0,n=o.select(d(t)).on(b,(function(){r=1,T(o.mouse(t),i),E(e)})).on(y,(function(){n.on(b,null).on(y,null),a(r),L(e)})),i=k(o.mouse(t)),a=At(t);$i.call(t),C(e)}function O(){var t,e=this,r=w.of(e,arguments),n={},a=0,s=".zoom-"+o.event.changedTouches[0].identifier,l="touchmove"+s,c="touchend"+s,d=[],u=o.select(e),f=At(e);function p(){var r=o.touches(e);return t=h.k,r.forEach((function(t){t.identifier in n&&(n[t.identifier]=k(t))})),r}function m(){var t=o.event.target;o.select(t).on(l,g).on(c,b),d.push(t);for(var r=o.event.changedTouches,s=0,u=r.length;s1){v=f[0];var y=f[1],x=v[0]-y[0],w=v[1]-y[1];a=x*x+w*w}}function g(){var s,l,c,d,u=o.touches(e);$i.call(e);for(var h=0,f=u.length;h360?t-=360:t<0&&(t+=360),t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)||e<0?0:e>1?1:e,n=2*(r=r<0?0:r>1?1:r)-(i=r<=.5?r*(1+e):r+e-r*e),new oe(o(t+120),o(t),o(t-120))}function qt(t,e,r){return this instanceof qt?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof qt?new qt(t.h,t.c,t.l):function(t,e,r){return t>0?new qt(Math.atan2(r,e)*Rt,Math.sqrt(e*e+r*r),t):new qt(NaN,NaN,t)}(t instanceof Xt?t.l:(t=he((t=o.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new qt(t,e,r)}Ht.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Vt(this.h,this.s,this.l/t)},Ht.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Vt(this.h,this.s,t*this.l)},Ht.rgb=function(){return Wt(this.h,this.s,this.l)},o.hcl=qt;var Yt=qt.prototype=new Gt;function Zt(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new Xt(r,Math.cos(t*=It)*e,Math.sin(t)*e)}function Xt(t,e,r){return this instanceof Xt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof Xt?new Xt(t.l,t.a,t.b):t instanceof qt?Zt(t.h,t.c,t.l):he((t=oe(t)).r,t.g,t.b):new Xt(t,e,r)}Yt.brighter=function(t){return new qt(this.h,this.c,Math.min(100,this.l+$t*(arguments.length?t:1)))},Yt.darker=function(t){return new qt(this.h,this.c,Math.max(0,this.l-$t*(arguments.length?t:1)))},Yt.rgb=function(){return Zt(this.h,this.c,this.l).rgb()},o.lab=Xt;var $t=18,Jt=.95047,Kt=1,Qt=1.08883,te=Xt.prototype=new Gt;function ee(t,e,r){var n=(t+16)/116,i=n+e/500,o=n-r/200;return new oe(ie(3.2404542*(i=re(i)*Jt)-1.5371385*(n=re(n)*Kt)-.4985314*(o=re(o)*Qt)),ie(-.969266*i+1.8760108*n+.041556*o),ie(.0556434*i-.2040259*n+1.0572252*o))}function re(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ne(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ie(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function oe(t,e,r){return this instanceof oe?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof oe?new oe(t.r,t.g,t.b):de(""+t,oe,Wt):new oe(t,e,r)}function ae(t){return new oe(t>>16,t>>8&255,255&t)}function se(t){return ae(t)+""}te.brighter=function(t){return new Xt(Math.min(100,this.l+$t*(arguments.length?t:1)),this.a,this.b)},te.darker=function(t){return new Xt(Math.max(0,this.l-$t*(arguments.length?t:1)),this.a,this.b)},te.rgb=function(){return ee(this.l,this.a,this.b)},o.rgb=oe;var le=oe.prototype=new Gt;function ce(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function de(t,e,r){var n,i,o,a=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(pe(i[0]),pe(i[1]),pe(i[2]))}return(o=me.get(t))?e(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,l=15&o,l|=l<<4):7===t.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),e(a,s,l))}function ue(t,e,r){var n,i,o=Math.min(t/=255,e/=255,r/=255),a=Math.max(t,e,r),s=a-o,l=(a+o)/2;return s?(i=l<.5?s/(a+o):s/(2-a-o),n=t==a?(e-r)/s+(e0&&l<1?0:n),new Vt(n,i,l)}function he(t,e,r){var n=ne((.4124564*(t=fe(t))+.3575761*(e=fe(e))+.1804375*(r=fe(r)))/Jt),i=ne((.2126729*t+.7151522*e+.072175*r)/Kt);return Xt(116*i-16,500*(n-i),200*(i-ne((.0193339*t+.119192*e+.9503041*r)/Qt)))}function fe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function pe(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}le.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b,i=30;return e||r||n?(e&&e=200&&e<300||304===e){try{t=r.call(i,c)}catch(t){return void a.error.call(i,t)}a.load.call(i,t)}else a.error.call(i,c)}return self.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(t)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(t){var e=o.event;o.event=t;try{a.progress.call(i,c)}finally{o.event=e}},i.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",i)},i.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",i):e},i.responseType=function(t){return arguments.length?(d=t,i):d},i.response=function(t){return r=t,i},["get","post"].forEach((function(t){i[t]=function(){return i.send.apply(i,[t].concat(s(arguments)))}})),i.send=function(r,n,o){if(2===arguments.length&&"function"==typeof n&&(o=n,n=null),c.open(r,t,!0),null==e||"accept"in l||(l.accept=e+",*/*"),c.setRequestHeader)for(var s in l)c.setRequestHeader(s,l[s]);return null!=e&&c.overrideMimeType&&c.overrideMimeType(e),null!=d&&(c.responseType=d),null!=o&&i.on("error",o).on("load",(function(t){o(null,t)})),a.beforesend.call(i,c),c.send(null==n?null:n),i},i.abort=function(){return c.abort(),i},o.rebind(i,a,"on"),null==n?i:i.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(n))}me.forEach((function(t,e){me.set(t,ae(e))})),o.functor=ge,o.xhr=ve(R),o.dsv=function(t,e){var r=new RegExp('["'+t+"\n]"),n=t.charCodeAt(0);function i(t,r,n){arguments.length<3&&(n=r,r=null);var i=be(t,e,null==r?o:a(r),n);return i.row=function(t){return arguments.length?i.response(null==(r=t)?o:a(t)):r},i}function o(t){return i.parse(t.responseText)}function a(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return r.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return i.parse=function(t,e){var r;return i.parseRows(t,(function(t,n){if(r)return r(t,n-1);var i=function(e){for(var r={},n=t.length,i=0;i=l)return a;if(i)return i=!1,o;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++24?(isFinite(e)&&(clearTimeout(_e),_e=setTimeout(Te,e)),we=0):(we=1,ke(Te))}function Me(){for(var t=Date.now(),e=ye;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Se(){for(var t,e=ye,r=1/0;e;)e.c?(e.t1&&(e=t[o[a-2]],r=t[o[a-1]],n=t[s],(r[0]-e[0])*(n[1]-e[1])-(r[1]-e[1])*(n[0]-e[0])<=0);)--a;o[a++]=s}return o.slice(0,a)}function ze(t,e){return t[0]-e[0]||t[1]-e[1]}o.timer=function(){Ae.apply(this,arguments)},o.timer.flush=function(){Me(),Se()},o.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)},o.geom={},o.geom.hull=function(t){var e=Ce,r=Ee;if(arguments.length)return n(t);function n(t){if(t.length<3)return[];var n,i=ge(e),o=ge(r),a=t.length,s=[],l=[];for(n=0;n=0;--n)f.push(t[s[c[n]][2]]);for(n=+u;nCt)s=s.L;else{if(!((i=o-Xe(s,a))>Ct)){n>-Ct?(e=s.P,r=s):i>-Ct?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=He(t);if(je.insert(e,l),e||r){if(e===r)return tr(e),r=He(e.site),je.insert(l,r),l.edge=r.edge=nr(e.site,l.site),Qe(e),void Qe(r);if(r){tr(e),tr(r);var c=e.site,d=c.x,u=c.y,h=t.x-d,f=t.y-u,p=r.site,m=p.x-d,g=p.y-u,v=2*(h*g-f*m),b=h*h+f*f,y=m*m+g*g,x={x:(g*b-f*y)/v+d,y:(h*y-m*b)/v+u};ir(r.edge,c,p,x),l.edge=nr(c,t,null,x),r.edge=nr(t,p,null,x),Qe(e),Qe(r)}else l.edge=nr(e.site,l.site)}}function Ze(t,e){var r=t.site,n=r.x,i=r.y,o=i-e;if(!o)return n;var a=t.P;if(!a)return-1/0;var s=(r=a.site).x,l=r.y,c=l-e;if(!c)return s;var d=s-n,u=1/o-1/c,h=d/c;return u?(-h+Math.sqrt(h*h-2*u*(d*d/(-2*c)-l+c/2+i-o/2)))/u+n:(n+s)/2}function Xe(t,e){var r=t.N;if(r)return Ze(r,e);var n=t.site;return n.y===e?n.x:1/0}function $e(t){this.site=t,this.edges=[]}function Je(t,e){return e.angle-t.angle}function Ke(){sr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Qe(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,i=t.site,o=r.site;if(n!==o){var a=i.x,s=i.y,l=n.x-a,c=n.y-s,d=o.x-a,u=2*(l*(g=o.y-s)-c*d);if(!(u>=-Et)){var h=l*l+c*c,f=d*d+g*g,p=(g*h-c*f)/u,m=(l*f-d*h)/u,g=m+s,v=Ge.pop()||new Ke;v.arc=t,v.site=i,v.x=p+a,v.y=g+Math.sqrt(p*p+m*m),v.cy=g,t.circle=v;for(var b=null,y=Be._;y;)if(v.y=s)return;if(h>p){if(o){if(o.y>=c)return}else o={x:g,y:l};r={x:g,y:c}}else{if(o){if(o.y1)if(h>p){if(o){if(o.y>=c)return}else o={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(o){if(o.y=s)return}else o={x:a,y:n*a+i};r={x:s,y:n*s+i}}else{if(o){if(o.x0)){if(e/=h,h<0){if(e0){if(e>u)return;e>d&&(d=e)}if(e=i-l,h||!(e<0)){if(e/=h,h<0){if(e>u)return;e>d&&(d=e)}else if(h>0){if(e0)){if(e/=f,f<0){if(e0){if(e>u)return;e>d&&(d=e)}if(e=o-c,f||!(e<0)){if(e/=f,f<0){if(e>u)return;e>d&&(d=e)}else if(f>0){if(e0&&(t.a={x:l+d*h,y:c+d*f}),u<1&&(t.b={x:l+u*h,y:c+u*f}),t}}}}}),l=a.length;l--;)(!er(e=a[l],t)||!s(e)||_(e.a.x-e.b.x)Ct||_(i-r)>Ct)&&(s.splice(a,0,new or((v=o.site,b=d,y=_(n-u)Ct?{x:u,y:_(e-u)Ct?{x:_(r-p)Ct?{x:h,y:_(e-h)Ct?{x:_(r-f)=r&&c.x<=i&&c.y>=n&&c.y<=a?[[r,a],[i,a],[i,n],[r,n]]:[]).point=t[s]})),e}function s(t){return t.map((function(t,e){return{x:Math.round(n(t,e)/Ct)*Ct,y:Math.round(i(t,e)/Ct)*Ct,i:e}}))}return a.links=function(t){return ur(s(t)).edges.filter((function(t){return t.l&&t.r})).map((function(e){return{source:t[e.l.i],target:t[e.r.i]}}))},a.triangles=function(t){var e=[];return ur(s(t)).cells.forEach((function(r,n){for(var i,o,a,s,l=r.site,c=r.edges.sort(Je),d=-1,u=c.length,h=c[u-1].edge,f=h.l===l?h.r:h.l;++do&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:yr(r,n)})),o=_r.lastIndex;return om&&(m=l.x),l.y>g&&(g=l.y),c.push(l.x),d.push(l.y);else for(u=0;um&&(m=y),x>g&&(g=x),c.push(y),d.push(x)}var w=m-f,k=g-p;function A(t,e,r,n,i,o,a,s){if(!isNaN(r)&&!isNaN(n))if(t.leaf){var l=t.x,c=t.y;if(null!=l)if(_(l-r)+_(c-n)<.01)T(t,e,r,n,i,o,a,s);else{var d=t.point;t.x=t.y=t.point=null,T(t,d,l,c,i,o,a,s),T(t,e,r,n,i,o,a,s)}else t.x=r,t.y=n,t.point=e}else T(t,e,r,n,i,o,a,s)}function T(t,e,r,n,i,o,a,s){var l=.5*(i+a),c=.5*(o+s),d=r>=l,u=n>=c,h=u<<1|d;t.leaf=!1,d?i=l:a=l,u?o=c:s=c,A(t=t.nodes[h]||(t.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null}),e,r,n,i,o,a,s)}w>k?g=p+w:m=f+k;var M={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){A(M,t,+v(t,++u),+b(t,u),f,p,m,g)}};if(M.visit=function(t){gr(t,M,f,p,m,g)},M.find=function(t){return function(t,e,r,n,i,o,a){var s,l=1/0;return function t(c,d,u,h,f){if(!(d>o||u>a||h=w)<<1|e>=x,k=_+4;_=0&&!(r=o.interpolators[n](t,e)););return r}function Ar(t,e){var r,n=[],i=[],o=t.length,a=e.length,s=Math.min(t.length,e.length);for(r=0;r=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function Dr(t){return 1-Math.cos(t*Dt)}function Ir(t){return Math.pow(2,10*(t-1))}function Rr(t){return 1-Math.sqrt(1-t*t)}function Fr(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Pr(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function jr(t){var e,r,n,i=[t.a,t.b],o=[t.c,t.d],a=Br(i),s=Nr(i,o),l=Br(((e=o)[0]+=(n=-s)*(r=i)[0],e[1]+=n*r[1],e))||0;i[0]*o[1]=0?t.slice(0,r):t,i=r>=0?t.slice(r+1):"in";return n=Mr.get(n)||Tr,i=Sr.get(i)||R,e=i(n.apply(null,a.call(arguments,1))),function(t){return t<=0?0:t>=1?1:e(t)}},o.interpolateHcl=function(t,e){t=o.hcl(t),e=o.hcl(e);var r=t.h,n=t.c,i=t.l,a=e.h-r,s=e.c-n,l=e.l-i;return isNaN(s)&&(s=0,n=isNaN(n)?e.c:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return Zt(r+a*t,n+s*t,i+l*t)+""}},o.interpolateHsl=function(t,e){t=o.hsl(t),e=o.hsl(e);var r=t.h,n=t.s,i=t.l,a=e.h-r,s=e.s-n,l=e.l-i;return isNaN(s)&&(s=0,n=isNaN(n)?e.s:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return Wt(r+a*t,n+s*t,i+l*t)+""}},o.interpolateLab=function(t,e){t=o.lab(t),e=o.lab(e);var r=t.l,n=t.a,i=t.b,a=e.l-r,s=e.a-n,l=e.b-i;return function(t){return ee(r+a*t,n+s*t,i+l*t)+""}},o.interpolateRound=Pr,o.transform=function(t){var e=l.createElementNS(o.ns.prefix.svg,"g");return(o.transform=function(t){if(null!=t){e.setAttribute("transform",t);var r=e.transform.baseVal.consolidate()}return new jr(r?r.matrix:Ur)})(t)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Ur={a:1,b:0,c:0,d:1,e:0,f:0};function Gr(t){return t.length?t.pop()+",":""}function Vr(t,e){var r=[],n=[];return t=o.transform(t),e=o.transform(e),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push("translate(",null,",",null,")");n.push({i:i-4,x:yr(t[0],e[0])},{i:i-2,x:yr(t[1],e[1])})}else(e[0]||e[1])&&r.push("translate("+e+")")}(t.translate,e.translate,r,n),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(Gr(r)+"rotate(",null,")")-2,x:yr(t,e)})):e&&r.push(Gr(r)+"rotate("+e+")")}(t.rotate,e.rotate,r,n),function(t,e,r,n){t!==e?n.push({i:r.push(Gr(r)+"skewX(",null,")")-2,x:yr(t,e)}):e&&r.push(Gr(r)+"skewX("+e+")")}(t.skew,e.skew,r,n),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(Gr(r)+"scale(",null,",",null,")");n.push({i:i-4,x:yr(t[0],e[0])},{i:i-2,x:yr(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(Gr(r)+"scale("+e+")")}(t.scale,e.scale,r,n),t=e=null,function(t){for(var e,i=-1,o=n.length;++i0?r=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:r=0})):e>0&&(l.start({type:"start",alpha:r=e}),t=Ae(s.tick)),s):r},s.start=function(){var t,e,r,o=v.length,l=b.length,d=c[0],p=c[1];for(t=0;t=0;)r.push(i[n])}function on(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(o=t.children)&&(i=o.length))for(var i,o,a=-1;++a=0;)a.push(d=c[l]),d.parent=o,d.depth=o.depth+1;r&&(o.value=0),o.children=c}else r&&(o.value=+r.call(n,o,o.depth)||0),delete o.children;return on(i,(function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)})),s}return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(nn(t,(function(t){t.children&&(t.value=0)})),on(t,(function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)}))),t},n},o.layout.partition=function(){var t=o.layout.hierarchy(),e=[1,1];function r(t,e,n,i){var o=t.children;if(t.x=e,t.y=t.depth*i,t.dx=n,t.dy=i,o&&(a=o.length)){var a,s,l,c=-1;for(n=t.value?n/t.value:0;++cs&&(s=n),a.push(n)}for(r=0;ri&&(n=r,i=e);return n}function yn(t){return t.reduce(xn,0)}function xn(t,e){return t+e[1]}function wn(t,e){return _n(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function _n(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,o=[];++r<=e;)o[r]=i*r+n;return o}function kn(t){return[o.min(t),o.max(t)]}function An(t,e){return t.value-e.value}function Tn(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function Mn(t,e){t._pack_next=e,e._pack_prev=t}function Sn(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function Cn(t){if((e=t.children)&&(l=e.length)){var e,r,n,i,o,a,s,l,c=1/0,d=-1/0,u=1/0,h=-1/0;if(e.forEach(En),(r=e[0]).x=-r.r,r.y=0,y(r),l>1&&((n=e[1]).x=n.r,n.y=0,y(n),l>2))for(On(r,n,i=e[2]),y(i),Tn(r,i),r._pack_prev=i,Tn(i,n),n=r._pack_next,o=3;o0)for(a=-1;++a=u[0]&&l<=u[1]&&((s=c[o.bisect(h,l,1,p)-1]).y+=m,s.push(i[a]));return c}return i.value=function(t){return arguments.length?(e=t,i):e},i.range=function(t){return arguments.length?(r=ge(t),i):r},i.bins=function(t){return arguments.length?(n="number"==typeof t?function(e){return _n(e,t)}:ge(t),i):n},i.frequency=function(e){return arguments.length?(t=!!e,i):t},i},o.layout.pack=function(){var t,e=o.layout.hierarchy().sort(An),r=0,n=[1,1];function i(i,o){var a=e.call(this,i,o),s=a[0],l=n[0],c=n[1],d=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,on(s,(function(t){t.r=+d(t.value)})),on(s,Cn),r){var u=r*(t?1:Math.max(2*s.r/l,2*s.r/c))/2;on(s,(function(t){t.r+=u})),on(s,Cn),on(s,(function(t){t.r-=u}))}return zn(s,l/2,c/2,t?1:1/Math.max(2*s.r/l,2*s.r/c)),a}return i.size=function(t){return arguments.length?(n=t,i):n},i.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,i):t},i.padding=function(t){return arguments.length?(r=+t,i):r},rn(i,e)},o.layout.tree=function(){var t=o.layout.hierarchy().sort(null).value(null),e=Dn,r=[1,1],n=null;function i(i,o){var c=t.call(this,i,o),d=c[0],u=function(t){for(var e,r={A:null,children:[t]},n=[r];null!=(e=n.pop());)for(var i,o=e.children,a=0,s=o.length;af.x&&(f=t),t.depth>p.depth&&(p=t)}));var m=e(h,f)/2-h.x,g=r[0]/(f.x+e(f,h)/2+m),v=r[1]/(p.depth||1);nn(d,(function(t){t.x=(t.x+m)*g,t.y=t.depth*v}))}return c}function a(t){var r=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(r.length){!function(t){for(var e,r=0,n=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var o=(r[0].z+r[r.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,r,n){if(r){for(var i,o=t,a=t,s=r,l=o.parent.children[0],c=o.m,d=a.m,u=s.m,h=l.m;s=Rn(s),o=In(o),s&&o;)l=In(l),(a=Rn(a)).a=t,(i=s.z+u-o.z-c+e(s._,o._))>0&&(Fn(Pn(s,t,n),t,i),c+=i,d+=i),u+=s.m,c+=o.m,h+=l.m,d+=a.m;s&&!Rn(a)&&(a.t=s,a.m+=u-d),o&&!In(l)&&(l.t=o,l.m+=c-h,n=t)}return n}(t,i,t.parent.A||n[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=r[0],t.y=t.depth*r[1]}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(n=null==(r=t)?l:null,i):n?null:r},i.nodeSize=function(t){return arguments.length?(n=null==(r=t)?null:l,i):n?r:null},rn(i,t)},o.layout.cluster=function(){var t=o.layout.hierarchy().sort(null).value(null),e=Dn,r=[1,1],n=!1;function i(i,a){var s,l=t.call(this,i,a),c=l[0],d=0;on(c,(function(t){var r=t.children;r&&r.length?(t.x=function(t){return t.reduce((function(t,e){return t+e.x}),0)/t.length}(r),t.y=function(t){return 1+o.max(t,(function(t){return t.y}))}(r)):(t.x=s?d+=e(t,s):0,t.y=0,s=t)}));var u=jn(c),h=Nn(c),f=u.x-e(u,h)/2,p=h.x+e(h,u)/2;return on(c,n?function(t){t.x=(t.x-c.x)*r[0],t.y=(c.y-t.y)*r[1]}:function(t){t.x=(t.x-f)/(p-f)*r[0],t.y=(1-(c.y?t.y/c.y:1))*r[1]}),l}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(n=null==(r=t),i):n?null:r},i.nodeSize=function(t){return arguments.length?(n=null!=(r=t),i):n?r:null},rn(i,t)},o.layout.treemap=function(){var t,e=o.layout.hierarchy(),r=Math.round,n=[1,1],i=null,a=Bn,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function d(t,e){for(var r,n,i=-1,o=t.length;++i0;)s.push(r=c[i-1]),s.area+=r.area,"squarify"!==l||(n=f(s,m))<=h?(c.pop(),h=n):(s.area-=s.pop().area,p(s,m,o,!1),m=Math.min(o.dx,o.dy),s.length=s.area=0,h=1/0);s.length&&(p(s,m,o,!0),s.length=s.area=0),e.forEach(u)}}function h(t){var e=t.children;if(e&&e.length){var r,n=a(t),i=e.slice(),o=[];for(d(i,n.dx*n.dy/t.value),o.area=0;r=i.pop();)o.push(r),o.area+=r.area,null!=r.z&&(p(o,r.z?n.dx:n.dy,n,!i.length),o.length=o.area=0);e.forEach(h)}}function f(t,e){for(var r,n=t.area,i=0,o=1/0,a=-1,s=t.length;++ai&&(i=r));return e*=e,(n*=n)?Math.max(e*i*c/n,n/(e*o*c)):1/0}function p(t,e,n,i){var o,a=-1,s=t.length,l=n.x,c=n.y,d=e?r(t.area/e):0;if(e==n.dx){for((i||d>n.dy)&&(d=n.dy);++an.dx)&&(d=n.dx);++a1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=o.random.normal.apply(o,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=o.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,r=0;r2?Zn:Hn,l=n?Wr:Hr;return i=a(t,e,l,r),o=a(e,t,l,kr),s}function s(t){return i(t)}return s.invert=function(t){return o(t)},s.domain=function(e){return arguments.length?(t=e.map(Number),a()):t},s.range=function(t){return arguments.length?(e=t,a()):e},s.rangeRound=function(t){return s.range(t).interpolate(Pr)},s.clamp=function(t){return arguments.length?(n=t,a()):n},s.interpolate=function(t){return arguments.length?(r=t,a()):r},s.ticks=function(e){return Qn(t,e)},s.tickFormat=function(e,r){return d3_scale_linearTickFormat(t,e,r)},s.nice=function(e){return Jn(t,e),a()},s.copy=function(){return Xn(t,e,r,n)},a()}function $n(t,e){return o.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Jn(t,e){return Wn(t,qn(Kn(t,e)[2])),Wn(t,qn(Kn(t,e)[2])),t}function Kn(t,e){null==e&&(e=10);var r=Gn(t),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),o=e/n*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function Qn(t,e){return o.range.apply(o,Kn(t,e))}function ti(t,e,r,n){function i(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function o(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function a(e){return t(i(e))}return a.invert=function(e){return o(t.invert(e))},a.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((n=e.map(Number)).map(i)),a):n},a.base=function(r){return arguments.length?(e=+r,t.domain(n.map(i)),a):e},a.nice=function(){var e=Wn(n.map(i),r?Math:ei);return t.domain(e),n=e.map(o),a},a.ticks=function(){var t=Gn(n),a=[],s=t[0],l=t[1],c=Math.floor(i(s)),d=Math.ceil(i(l)),u=e%1?2:e;if(isFinite(d-c)){if(r){for(;c0;h--)a.push(o(c)*h);for(c=0;a[c]l;d--);a=a.slice(c,d)}return a},a.copy=function(){return ti(t.copy(),e,r,n)},$n(a,t)}o.scale.linear=function(){return Xn([0,1],[0,1],kr,!1)},o.scale.log=function(){return ti(o.scale.linear().domain([0,1]),10,!0,[1,10])};var ei={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function ri(t,e,r){var n=ni(e),i=ni(1/e);function o(e){return t(n(e))}return o.invert=function(e){return i(t.invert(e))},o.domain=function(e){return arguments.length?(t.domain((r=e.map(Number)).map(n)),o):r},o.ticks=function(t){return Qn(r,t)},o.tickFormat=function(t,e){return d3_scale_linearTickFormat(r,t,e)},o.nice=function(t){return o.domain(Jn(r,t))},o.exponent=function(a){return arguments.length?(n=ni(e=a),i=ni(1/e),t.domain(r.map(n)),o):e},o.copy=function(){return ri(t.copy(),e,r)},$n(o,t)}function ni(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function ii(t,e){var r,n,i;function a(i){return n[((r.get(i)||("range"===e.t?r.set(i,t.push(i)):NaN))-1)%n.length]}function s(e,r){return o.range(t.length).map((function(t){return e+r*t}))}return a.domain=function(n){if(!arguments.length)return t;t=[],r=new A;for(var i,o=-1,s=n.length;++o0?r[n-1]:t[0],nu?0:1;if(c=Ot)return l(c,f)+(s?l(s,1-f):"")+"Z";var p,m,g,v,b,y,x,w,_,k,A,T,M=0,S=0,C=[];if((v=(+a.apply(this,arguments)||0)/2)&&(g=n===pi?Math.sqrt(s*s+c*c):+n.apply(this,arguments),f||(S*=-1),c&&(S=Ft(g/c*Math.sin(v))),s&&(M=Ft(g/s*Math.sin(v)))),c){b=c*Math.cos(d+S),y=c*Math.sin(d+S),x=c*Math.cos(u-S),w=c*Math.sin(u-S);var E=Math.abs(u-d-2*S)<=Lt?0:1;if(S&&xi(b,y,x,w)===f^E){var L=(d+u)/2;b=c*Math.cos(L),y=c*Math.sin(L),x=w=null}}else b=y=0;if(s){_=s*Math.cos(u-M),k=s*Math.sin(u-M),A=s*Math.cos(d+M),T=s*Math.sin(d+M);var z=Math.abs(d-u+2*M)<=Lt?0:1;if(M&&xi(_,k,A,T)===1-f^z){var O=(d+u)/2;_=s*Math.cos(O),k=s*Math.sin(O),A=T=null}}else _=k=0;if(h>Ct&&(p=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){m=s0?0:1}function wi(t,e,r,n,i){var o=t[0]-e[0],a=t[1]-e[1],s=(i?n:-n)/Math.sqrt(o*o+a*a),l=s*a,c=-s*o,d=t[0]+l,u=t[1]+c,h=e[0]+l,f=e[1]+c,p=(d+h)/2,m=(u+f)/2,g=h-d,v=f-u,b=g*g+v*v,y=r-n,x=d*f-h*u,w=(v<0?-1:1)*Math.sqrt(Math.max(0,y*y*b-x*x)),_=(x*v-g*w)/b,k=(-x*g-v*w)/b,A=(x*v+g*w)/b,T=(-x*g+v*w)/b,M=_-p,S=k-m,C=A-p,E=T-m;return M*M+S*S>C*C+E*E&&(_=A,k=T),[[_-l,k-c],[_*r/y,k*r/y]]}function _i(){return!0}function ki(t){var e=Ce,r=Ee,n=_i,i=Ti,o=i.key,a=.7;function s(o){var s,l=[],c=[],d=-1,u=o.length,h=ge(e),f=ge(r);function p(){l.push("M",i(t(c),a))}for(;++d1&&i.push("H",n[0]),i.join("")},"step-before":Si,"step-after":Ci,basis:zi,"basis-open":function(t){if(t.length<4)return Ti(t);for(var e,r=[],n=-1,i=t.length,o=[0],a=[0];++n<3;)e=t[n],o.push(e[0]),a.push(e[1]);for(r.push(Oi(Ri,o)+","+Oi(Ri,a)),--n;++n9&&(i=3*e/Math.sqrt(i),a[s]=i*r,a[s+1]=i*n);for(s=-1;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}(t))}});function Ti(t){return t.length>1?t.join("L"):t+"Z"}function Mi(t){return t.join("L")+"Z"}function Si(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1){s=e[1],o=t[l],l++,n+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var c=2;cLt)+",1 "+e}function l(t,e,r,n){return"Q 0,0 "+n}return o.radius=function(t){return arguments.length?(r=ge(t),o):r},o.source=function(e){return arguments.length?(t=ge(e),o):t},o.target=function(t){return arguments.length?(e=ge(t),o):e},o.startAngle=function(t){return arguments.length?(n=ge(t),o):n},o.endAngle=function(t){return arguments.length?(i=ge(t),o):i},o},o.svg.diagonal=function(){var t=Bi,e=Ui,r=Vi;function n(n,i){var o=t.call(this,n,i),a=e.call(this,n,i),s=(o.y+a.y)/2,l=[o,{x:o.x,y:s},{x:a.x,y:s},a];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(e){return arguments.length?(t=ge(e),n):t},n.target=function(t){return arguments.length?(e=ge(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},o.svg.diagonal.radial=function(){var t=o.svg.diagonal(),e=Vi,r=t.projection;return t.projection=function(t){return arguments.length?r(function(t){return function(){var e=t.apply(this,arguments),r=e[0],n=e[1]-Dt;return[r*Math.cos(n),r*Math.sin(n)]}}(e=t)):e},t},o.svg.symbol=function(){var t=Wi,e=Hi;function r(r,n){return(Yi.get(t.call(this,r,n))||qi)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=ge(e),r):t},r.size=function(t){return arguments.length?(e=ge(t),r):e},r};var Yi=o.map({circle:qi,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Xi)),r=e*Xi;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Zi),r=e*Zi/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Zi),r=e*Zi/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});o.svg.symbolTypes=Yi.keys();var Zi=Math.sqrt(3),Xi=Math.tan(30*It);J.transition=function(t){for(var e,r,n=Qi||++ro,i=oo(t),o=[],a=to||{time:Date.now(),ease:Or,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--h].call(t,a);if(o>=1)return u.event&&u.event.end.call(t,t.__data__,e),--d.count?delete d[n]:delete t[r],1}u||(o=i.time,a=Ae((function(t){var e=u.delay;if(a.t=e+o,e<=t)return h(t-e);a.c=h}),0,o),u=d[n]={tween:new A,time:o,timer:a,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++d.count)}eo.call=J.call,eo.empty=J.empty,eo.node=J.node,eo.size=J.size,o.transition=function(t,e){return t&&t.transition?Qi?t.transition(e):t:o.selection().transition(t)},o.transition.prototype=eo,eo.select=function(t){var e,r,n,i=this.id,o=this.namespace,a=[];t=K(t);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",a[1]-a[0])}function m(t){t.select(".extent").attr("y",s[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function g(){var u,g,v=this,b=o.select(o.event.target),y=r.of(v,arguments),x=o.select(v),w=b.datum(),_=!/^(n|s)$/.test(w)&&n,k=!/^(e|w)$/.test(w)&&i,A=b.classed("extent"),T=At(v),M=o.mouse(v),S=o.select(d(v)).on("keydown.brush",(function(){32==o.event.keyCode&&(A||(u=null,M[0]-=a[1],M[1]-=s[1],A=2),G())})).on("keyup.brush",(function(){32==o.event.keyCode&&2==A&&(M[0]+=a[1],M[1]+=s[1],A=0,G())}));if(o.event.changedTouches?S.on("touchmove.brush",L).on("touchend.brush",O):S.on("mousemove.brush",L).on("mouseup.brush",O),x.interrupt().selectAll("*").interrupt(),A)M[0]=a[0]-M[0],M[1]=s[0]-M[1];else if(w){var C=+/w$/.test(w),E=+/^n/.test(w);g=[a[1-C]-M[0],s[1-E]-M[1]],M[0]=a[C],M[1]=s[E]}else o.event.altKey&&(u=M.slice());function L(){var t=o.mouse(v),e=!1;g&&(t[0]+=g[0],t[1]+=g[1]),A||(o.event.altKey?(u||(u=[(a[0]+a[1])/2,(s[0]+s[1])/2]),M[0]=a[+(t[0]{"use strict";t.exports=r(48777)},48777:(t,e,r)=>{"use strict";var n=r(72478),i=r(90897),o=r(94698),a=r(25359),s=r(9994),l=r(7999),c=r(97e3),d=r(23754),u=r(22366),h=r(54387);function f(t,e){for(var r=e[0],n=e[1],o=1/(e[2]-r),a=1/(e[3]-n),s=new Array(t.length),l=0,c=t.length/2;l>>1;e.dtype||(e.dtype="array"),"string"==typeof e.dtype?p=new(u(e.dtype))(g):e.dtype&&(p=e.dtype,Array.isArray(p)&&(p.length=g));for(var v=0;vr||s>1073741824){for(var h=0;hr+i||M>n+i||S=L||a===s)){var l=b[o];void 0===s&&(s=l.length);for(var c=a;c=g&&u<=_&&h>=v&&h<=k&&z.push(d)}var f=y[o],p=f[4*a+0],m=f[4*a+1],x=f[4*a+2],w=f[4*a+3],A=function(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}(f,a+1),C=.5*i,O=o+1;e(r,n,C,O,p,m||x||w||A),e(r,n+C,C,O,m,x||w||A),e(r+C,n,C,O,x,w||A),e(r+C,n+C,C,O,w,A)}}(0,0,1,0,0,1),z},p;function C(t,e,r){for(var n=1,i=.5,o=.5,a=.5,s=0;s{t.exports=function(t){var e=0,r=0,n=0,i=0;return t.map((function(t){var o=(t=t.slice())[0],a=o.toUpperCase();if(o!=a)switch(t[0]=a,o){case"a":t[6]+=n,t[7]+=i;break;case"v":t[1]+=i;break;case"h":t[1]+=n;break;default:for(var s=1;s{"use strict";t.exports=function(t,e){if(!t||null==t.length)throw Error("Argument should be an array");e=null==e?1:Math.floor(e);for(var r=Array(2*e),n=0;ni&&(i=t[a]),t[a]{"use strict";t.exports=function(t,e,r){if("function"==typeof Array.prototype.findIndex)return t.findIndex(e,r);if("function"!=typeof e)throw new TypeError("predicate must be a function");var n=Object(t),i=n.length;if(0===i)return-1;for(var o=0;o{"use strict";var n=r(25359);t.exports=function(t,e,r){if(!t||null==t.length)throw Error("Argument should be an array");null==e&&(e=1),null==r&&(r=n(t,e));for(var i=0;i{"use strict";var n=r(39807);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){for(var r=0;r1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i{"use strict";var n=r(39807);function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;et.length)&&(r=t.length),t.substring(r-e.length,r)===e}var y="",x="",w="",_="",k={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function A(t){var e=Object.keys(t),r=Object.create(Object.getPrototypeOf(t));return e.forEach((function(e){r[e]=t[e]})),Object.defineProperty(r,"message",{value:t.message}),r}function T(t){return g(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var M=function(t,e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(M,t);var r,i,s,d,u=(r=M,i=h(),function(){var t,e=p(r);if(i){var n=p(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return l(this,t)});function M(t){var e;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,M),"object"!==m(t)||null===t)throw new v("options","Object",t);var r=t.message,i=t.operator,o=t.stackStartFn,a=t.actual,s=t.expected,d=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)e=u.call(this,String(r));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(y="",x="",_="",w=""):(y="",x="",_="",w="")),"object"===m(a)&&null!==a&&"object"===m(s)&&null!==s&&"stack"in a&&a instanceof Error&&"stack"in s&&s instanceof Error&&(a=A(a),s=A(s)),"deepStrictEqual"===i||"strictEqual"===i)e=u.call(this,function(t,e,r){var i="",o="",a=0,s="",l=!1,c=T(t),d=c.split("\n"),u=T(e).split("\n"),h=0,f="";if("strictEqual"===r&&"object"===m(t)&&"object"===m(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===d.length&&1===u.length&&d[0]!==u[0]){var p=d[0].length+u[0].length;if(p<=10){if(!("object"===m(t)&&null!==t||"object"===m(e)&&null!==e||0===t&&0===e))return"".concat(k[r],"\n\n")+"".concat(d[0]," !== ").concat(u[0],"\n")}else if("strictEqualObject"!==r&&p<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;d[0][h]===u[0][h];)h++;h>2&&(f="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var r=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+t.substring(0,r-t.length)}(" ",h),"^"),h=0)}}for(var g=d[d.length-1],v=u[u.length-1];g===v&&(h++<2?s="\n ".concat(g).concat(s):i=g,d.pop(),u.pop(),0!==d.length&&0!==u.length);)g=d[d.length-1],v=u[u.length-1];var A=Math.max(d.length,u.length);if(0===A){var M=c.split("\n");if(M.length>30)for(M[26]="".concat(y,"...").concat(_);M.length>27;)M.pop();return"".concat(k.notIdentical,"\n\n").concat(M.join("\n"),"\n")}h>3&&(s="\n".concat(y,"...").concat(_).concat(s),l=!0),""!==i&&(s="\n ".concat(i).concat(s),i="");var S=0,C=k[r]+"\n".concat(x,"+ actual").concat(_," ").concat(w,"- expected").concat(_),E=" ".concat(y,"...").concat(_," Lines skipped");for(h=0;h1&&h>2&&(L>4?(o+="\n".concat(y,"...").concat(_),l=!0):L>3&&(o+="\n ".concat(u[h-2]),S++),o+="\n ".concat(u[h-1]),S++),a=h,i+="\n".concat(w,"-").concat(_," ").concat(u[h]),S++;else if(u.length1&&h>2&&(L>4?(o+="\n".concat(y,"...").concat(_),l=!0):L>3&&(o+="\n ".concat(d[h-2]),S++),o+="\n ".concat(d[h-1]),S++),a=h,o+="\n".concat(x,"+").concat(_," ").concat(d[h]),S++;else{var z=u[h],O=d[h],D=O!==z&&(!b(O,",")||O.slice(0,-1)!==z);D&&b(z,",")&&z.slice(0,-1)===O&&(D=!1,O+=","),D?(L>1&&h>2&&(L>4?(o+="\n".concat(y,"...").concat(_),l=!0):L>3&&(o+="\n ".concat(d[h-2]),S++),o+="\n ".concat(d[h-1]),S++),a=h,o+="\n".concat(x,"+").concat(_," ").concat(O),i+="\n".concat(w,"-").concat(_," ").concat(z),S+=2):(o+=i,i="",1!==L&&0!==h||(o+="\n ".concat(O),S++))}if(S>20&&h30)for(f[26]="".concat(y,"...").concat(_);f.length>27;)f.pop();e=1===f.length?u.call(this,"".concat(h," ").concat(f[0])):u.call(this,"".concat(h,"\n\n").concat(f.join("\n"),"\n"))}else{var p=T(a),g="",S=k[i];"notDeepEqual"===i||"notEqual"===i?(p="".concat(k[i],"\n\n").concat(p)).length>1024&&(p="".concat(p.slice(0,1021),"...")):(g="".concat(T(s)),p.length>512&&(p="".concat(p.slice(0,509),"...")),g.length>512&&(g="".concat(g.slice(0,509),"...")),"deepEqual"===i||"equal"===i?p="".concat(S,"\n\n").concat(p,"\n\nshould equal\n\n"):g=" ".concat(i," ").concat(g)),e=u.call(this,"".concat(p).concat(g))}return Error.stackTraceLimit=d,e.generatedMessage=!r,Object.defineProperty(c(e),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),e.code="ERR_ASSERTION",e.actual=a,e.expected=s,e.operator=i,Error.captureStackTrace&&Error.captureStackTrace(c(e),o),e.stack,e.name="AssertionError",l(e)}return s=M,(d=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:e,value:function(t,e){return g(this,o(o({},e),{},{customInspect:!1,depth:0}))}}])&&a(s.prototype,d),Object.defineProperty(s,"prototype",{writable:!1}),M}(d(Error),g.custom);t.exports=M},81146:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},o(t)}var a,s,l={};function c(t,e,r){r||(r=Error);var a=function(r){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&i(t,e)}(d,r);var a,s,l,c=(s=d,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=o(s);if(l){var r=o(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function d(r,n,i){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),o=c.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i)),o.code=t,o}return a=d,Object.defineProperty(a,"prototype",{writable:!1}),a}(r);l[t]=a}function d(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",(function(t,e,i){var o,s,l,c,u;if(void 0===a&&(a=r(34961)),a("string"==typeof t,"'name' must be a string"),"string"==typeof e&&(s="not ",e.substr(0,4)===s)?(o="must not be",e=e.replace(/^not /,"")):o="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-9,r)===e}(t," argument"))l="The ".concat(t," ").concat(o," ").concat(d(e,"type"));else{var h=("number"!=typeof u&&(u=0),u+1>(c=t).length||-1===c.indexOf(".",u)?"argument":"property");l='The "'.concat(t,'" ').concat(h," ").concat(o," ").concat(d(e,"type"))}return l+". Received type ".concat(n(i))}),TypeError),c("ERR_INVALID_ARG_VALUE",(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=r(11276));var i=s.inspect(e);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),c("ERR_INVALID_RETURN_VALUE",(function(t,e,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(t,' to be returned from the "').concat(e,'"')+" function but got ".concat(i,".")}),TypeError),c("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),n=0;n0,"At least one arg needs to be specified");var i="The ",o=e.length;switch(e=e.map((function(t){return'"'.concat(t,'"')})),o){case 1:i+="".concat(e[0]," argument");break;case 2:i+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:i+=e.slice(0,o-1).join(", "),i+=", and ".concat(e[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),t.exports.codes=l},88884:(t,e,r)=>{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r10)return!0;for(var e=0;e57)return!0}return 10===t.length&&t>=Math.pow(2,32)}function D(t){return Object.keys(t).filter(O).concat(d(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}function I(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i{"use strict";r.r(e),r.d(e,{decode:()=>s,encode:()=>a});for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="undefined"==typeof Uint8Array?[]:new Uint8Array(256),o=0;o<64;o++)i[n.charCodeAt(o)]=o;var a=function(t){var e,r=new Uint8Array(t),i=r.length,o="";for(e=0;e>2],o+=n[(3&r[e])<<4|r[e+1]>>4],o+=n[(15&r[e+1])<<2|r[e+2]>>6],o+=n[63&r[e+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},s=function(t){var e,r,n,o,a,s=.75*t.length,l=t.length,c=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var d=new ArrayBuffer(s),u=new Uint8Array(d);for(e=0;e>4,u[c++]=(15&n)<<4|o>>2,u[c++]=(3&o)<<6|63&a;return d}},17507:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=s(t),a=o[0],l=o[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,a,l)),d=0,u=l>0?a-4:a;for(r=0;r>16&255,c[d++]=e>>8&255,c[d++]=255&e;return 2===l&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[d++]=255&e),1===l&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[d++]=e>>8&255,c[d++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,n){for(var i,o,a=[],s=e;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},72478:t=>{"use strict";function e(t,e,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)>=0?(o=a,i=a-1):n=a+1}return o}function r(t,e,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)>0?(o=a,i=a-1):n=a+1}return o}function n(t,e,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)<0?(o=a,n=a+1):i=a-1}return o}function i(t,e,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)<=0?(o=a,n=a+1):i=a-1}return o}function o(t,e,r,n,i){for(;n<=i;){var o=n+i>>>1,a=t[o],s=void 0!==r?r(a,e):a-e;if(0===s)return o;s<=0?n=o+1:i=o-1}return-1}function a(t,e,r,n,i,o){return"function"==typeof r?o(t,e,r,void 0===n?0:0|n,void 0===i?t.length-1:0|i):o(t,e,void 0,void 0===r?0:0|r,void 0===n?t.length-1:0|n)}t.exports={ge:function(t,r,n,i,o){return a(t,r,n,i,o,e)},gt:function(t,e,n,i,o){return a(t,e,n,i,o,r)},lt:function(t,e,r,i,o){return a(t,e,r,i,o,n)},le:function(t,e,r,n,o){return a(t,e,r,n,o,i)},eq:function(t,e,r,n,i){return a(t,e,r,n,i,o)}}},88828:(t,e)=>{"use strict";function r(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},25875:t=>{"use strict";t.exports=function(t,n){n||(n={});var i,o,a,s,l,c,d,u,h,f,p,m=null==n.cutoff?.25:n.cutoff,g=null==n.radius?8:n.radius,v=n.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!n.width||!n.height)throw Error("For raw data width and height should be provided by options");i=n.width,o=n.height,s=t,c=n.stride?n.stride:Math.floor(t.length/i/o)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(d=(u=t).getContext("2d"),i=u.width,o=u.height,s=(h=d.getImageData(0,0,i,o)).data,c=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(d=t,i=(u=t.canvas).width,o=u.height,s=(h=d.getImageData(0,0,i,o)).data,c=4):window.ImageData&&t instanceof window.ImageData&&(h=t,i=t.width,o=t.height,s=h.data,c=4);if(a=Math.max(i,o),window.Uint8ClampedArray&&s instanceof window.Uint8ClampedArray||window.Uint8Array&&s instanceof window.Uint8Array)for(l=s,s=Array(i*o),f=0,p=Math.floor(l.length/c);f{"use strict";const n=r(17507),i=r(23778),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=l,e.IS=50;const a=2147483647;function s(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return c(t,e,r)}function c(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|m(t,e);let n=s(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(X(t,Uint8Array)){const e=new Uint8Array(t);return f(e.buffer,e.byteOffset,e.byteLength)}return h(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(X(t,ArrayBuffer)||t&&X(t.buffer,ArrayBuffer))return f(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(X(t,SharedArrayBuffer)||t&&X(t.buffer,SharedArrayBuffer)))return f(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return l.from(n,e,r);const i=function(t){if(l.isBuffer(t)){const e=0|p(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||$(t.length)?s(0):h(t):"Buffer"===t.type&&Array.isArray(t.data)?h(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function d(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return d(t),s(t<0?0:0|p(t))}function h(t){const e=t.length<0?0:0|p(t.length),r=s(e);for(let n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function m(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||X(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(i)return n?-1:q(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,r);case"utf8":case"utf-8":return M(this,e,r);case"ascii":return C(this,e,r);case"latin1":case"binary":return E(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),$(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=l.from(e,n)),l.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){let o,a=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let n=-1;for(o=r;os&&(r=s-l),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=e.length;let a;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function M(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+a<=r){let r,n,s,l;switch(a){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(l=(31&e)<<6|63&r,l>127&&(o=l));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(l=(15&e)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:r=t[i+1],n=t[i+2],s=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(l=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&s,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(t){const e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nn.length?(l.isBuffer(e)||(e=l.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!l.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;er&&(t+=" ... "),""},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(t,e,r,n,i){if(X(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0);const s=Math.min(o,a),c=this.slice(n,i),d=t.slice(e,r);for(let t=0;t>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return x(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":case"latin1":case"binary":return _(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function C(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;in)&&(r=n);let i="";for(let n=e;nr)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,r,n,i,o){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function I(t,e,r,n,i){G(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function R(t,e,r,n,i){G(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function F(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(t,e,r,n,o){return e=+e,r>>>=0,o||F(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function j(t,e,r,n,o){return e=+e,r>>>=0,o||F(t,0,r,8),i.write(t,e,r,n,52,8),r+8}l.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],i=1,o=0;for(;++o>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readBigUInt64LE=K((function(t){V(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*e)),n},l.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},l.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readBigInt64LE=K((function(t){V(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<>>=0,e||O(t,4,this.length),i.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||D(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,n||D(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigUInt64LE=K((function(t,e=0){return I(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=K((function(t,e=0){return R(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);D(this,t,e,r,n-1,-n)}let i=0,o=1,a=0;for(this[e]=255&t;++i>>=0,!n){const n=Math.pow(2,8*r-1);D(this,t,e,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+r},l.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigInt64LE=K((function(t,e=0){return I(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=K((function(t,e=0){return R(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},l.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},l.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},l.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},l.prototype.copy=function(t,e,r,n){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function G(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new N.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){V(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||H(e,t.length-(r+1))}(n,i,o)}function V(t,e){if("number"!=typeof t)throw new N.ERR_INVALID_ARG_TYPE(e,"number",t)}function H(t,e,r){if(Math.floor(t)!==t)throw V(t,r),new N.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new N.ERR_BUFFER_OUT_OF_BOUNDS;throw new N.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}B("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),B("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),B("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=U(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=U(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function q(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let a=0;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Y(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Z(t,e,r,n){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function X(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function $(t){return t!=t}const J=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function K(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},24310:(t,e,r)=>{"use strict";var n=r(59412),i=r(61398),o=i(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&o(t,".prototype.")>-1?i(r):r}},61398:(t,e,r)=>{"use strict";var n=r(35366),i=r(59412),o=r(86928),a=r(48744),s=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),c=i("%Reflect.apply%",!0)||n.call(l,s),d=r(38232),u=i("%Math.max%");t.exports=function(t){if("function"!=typeof t)throw new a("a function is required");var e=c(n,l,arguments);return o(e,1+u(0,t.length-(arguments.length-1)),!0)};var h=function(){return c(n,s,arguments)};d?d(t.exports,"apply",{value:h}):t.exports.apply=h},90897:t=>{t.exports=function(t,e,r){return er?r:t:te?e:t}},92173:(t,e,r)=>{"use strict";var n=r(90897);function i(t,e){null==e&&(e=!0);var r=t[0],i=t[1],o=t[2],a=t[3];return null==a&&(a=e?1:255),e&&(r*=255,i*=255,o*=255,a*=255),16777216*(r=255&n(r,0,255))+((i=255&n(i,0,255))<<16)+((o=255&n(o,0,255))<<8)+(255&n(a,0,255))}t.exports=i,t.exports.to=i,t.exports.from=function(t,e){var r=(t=+t)>>>24,n=(16711680&t)>>>16,i=(65280&t)>>>8,o=255&t;return!1===e?[r,n,i,o]:[r/255,n/255,i/255,o/255]}},22319:t=>{"use strict";t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},34463:(t,e,r)=>{"use strict";var n=r(31562),i=r(90897),o=r(22366);t.exports=function(t,e){"float"!==e&&e||(e="array"),"uint"===e&&(e="uint8"),"uint_clamped"===e&&(e="uint8_clamped");var r=new(o(e))(4),a="uint8"!==e&&"uint8_clamped"!==e;return t.length&&"string"!=typeof t||((t=n(t))[0]/=255,t[1]/=255,t[2]/=255),function(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||!!(Array.isArray(t)&&(t[0]>1||0===t[0])&&(t[1]>1||0===t[1])&&(t[2]>1||0===t[2])&&(!t[3]||t[3]>1))}(t)?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:255,a&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(a?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:1):(r[0]=i(Math.floor(255*t[0]),0,255),r[1]=i(Math.floor(255*t[1]),0,255),r[2]=i(Math.floor(255*t[2]),0,255),r[3]=null==t[3]?255:i(Math.floor(255*t[3]),0,255)),r)}},11211:(t,e,r)=>{"use strict";var n=r(22319);t.exports=function(t){var e,r,o=[],a=1;if("string"==typeof t)if(t=t.toLowerCase(),n[t])o=n[t].slice(),r="rgb";else if("transparent"===t)a=0,r="rgb",o=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var s=t.slice(1);a=1,(d=s.length)<=4?(o=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===d&&(a=parseInt(s[3]+s[3],16)/255)):(o=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===d&&(a=parseInt(s[6]+s[7],16)/255)),o[0]||(o[0]=0),o[1]||(o[1]=0),o[2]||(o[2]=0),r="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var l=e[1],c="rgb"===l;r=s=l.replace(/a$/,"");var d="cmyk"===s?4:"gray"===s?1:3;o=e[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(t,e){if(/%$/.test(t))return e===d?parseFloat(t)/100:"rgb"===s?255*parseFloat(t)/100:parseFloat(t);if("h"===s[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==i[t])return i[t]}return parseFloat(t)})),l===s&&o.push(1),a=c||void 0===o[d]?1:o[d],o=o.slice(0,d)}else t.length>10&&/[0-9](?:\s|\/)/.test(t)&&(o=t.match(/([0-9]+)/g).map((function(t){return parseFloat(t)})),r=t.match(/([a-z])/gi).join("").toLowerCase());else isNaN(t)?Array.isArray(t)||t.length?(o=[t[0],t[1],t[2]],r="rgb",a=4===t.length?t[3]:1):t instanceof Object&&(null!=t.r||null!=t.red||null!=t.R?(r="rgb",o=[t.r||t.red||t.R||0,t.g||t.green||t.G||0,t.b||t.blue||t.B||0]):(r="hsl",o=[t.h||t.hue||t.H||0,t.s||t.saturation||t.S||0,t.l||t.lightness||t.L||t.b||t.brightness]),a=t.a||t.alpha||t.opacity||1,null!=t.opacity&&(a/=100)):(r="rgb",o=[t>>>16,(65280&t)>>>8,255&t]);return{space:r,values:o,alpha:a}};var i={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},31562:(t,e,r)=>{"use strict";var n=r(11211),i=r(31497),o=r(90897);t.exports=function(t){var e,r=n(t);return r.space?((e=Array(3))[0]=o(r.values[0],0,255),e[1]=o(r.values[1],0,255),e[2]=o(r.values[2],0,255),"h"===r.space[0]&&(e=i.rgb(e)),e.push(o(r.alpha,0,1)),e):[]}},31497:(t,e,r)=>{"use strict";var n=r(65837);t.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e,r,n,i,o,a=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[o=255*l,o,o];e=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(n=a+1/3*-(c-1))<0?n++:n>1&&n--,o=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[c]=255*o;return i}},n.hsl=function(t){var e,r,n=t[0]/255,i=t[1]/255,o=t[2]/255,a=Math.min(n,i,o),s=Math.max(n,i,o),l=s-a;return s===a?e=0:n===s?e=(i-o)/l:i===s?e=2+(o-n)/l:o===s&&(e=4+(n-i)/l),(e=Math.min(60*e,360))<0&&(e+=360),r=(a+s)/2,[e,100*(s===a?0:r<=.5?l/(s+a):l/(2-s-a)),100*r]}},65837:t=>{"use strict";t.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},86643:()=>{!function(){"use strict";if("undefined"!=typeof document&&!("adoptedStyleSheets"in document)){var t="ShadyCSS"in window&&!ShadyCSS.nativeShadow,e=document.implementation.createHTMLDocument(""),r=new WeakMap,n="object"==typeof DOMException?Error:DOMException,i=Object.defineProperty,o=Array.prototype.forEach,a=/@import.+?;?$/gm,s=CSSStyleSheet.prototype;s.replace=function(){return Promise.reject(new n("Can't call replace on non-constructed CSSStyleSheets."))},s.replaceSync=function(){throw new n("Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.")};var l=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakMap,h=S.prototype;h.replace=function(t){try{return this.replaceSync(t),Promise.resolve(this)}catch(t){return Promise.reject(t)}},h.replaceSync=function(t){if(M(this),"string"==typeof t){var e=this;l.get(e).textContent=function(t){var e=t.replace(a,"");return e!==t&&console.warn("@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418"),e.trim()}(t),u.set(e,[]),c.get(e).forEach((function(t){t.isConnected()&&T(e,A(e,t))}))}},i(h,"cssRules",{configurable:!0,enumerable:!0,get:function(){return M(this),l.get(this).sheet.cssRules}}),i(h,"media",{configurable:!0,enumerable:!0,get:function(){return M(this),l.get(this).sheet.media}}),["addRule","deleteRule","insertRule","removeRule"].forEach((function(t){h[t]=function(){var e=this;M(e);var r=arguments;u.get(e).push({method:t,args:r}),c.get(e).forEach((function(n){if(n.isConnected()){var i=A(e,n).sheet;i[t].apply(i,r)}}));var n=l.get(e).sheet;return n[t].apply(n,r)}})),i(S,Symbol.hasInstance,{configurable:!0,value:_});var f={childList:!0,subtree:!0},p=new WeakMap,m=new WeakMap,g=new WeakMap,v=new WeakMap;if(D.prototype={isConnected:function(){var t=m.get(this);return t instanceof Document?"loading"!==t.readyState:function(t){return"isConnected"in t?t.isConnected:document.contains(t)}(t.host)},connect:function(){var t=z(this);v.get(this).observe(t,f),g.get(this).length>0&&O(this),L(t,(function(t){C(t).connect()}))},disconnect:function(){v.get(this).disconnect()},update:function(t){var e=this,r=m.get(e)===document?"Document":"ShadowRoot";if(!Array.isArray(t))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+r+": Iterator getter is not callable.");if(!t.every(_))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+r+": Failed to convert value to 'CSSStyleSheet'");if(t.some(k))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+r+": Can't adopt non-constructed stylesheets");e.sheets=t;var n,i,o=g.get(e),a=(n=t).filter((function(t,e){return n.indexOf(t)===e}));(i=a,o.filter((function(t){return-1===i.indexOf(t)}))).forEach((function(t){var r;(r=A(t,e)).parentNode.removeChild(r),function(t,e){d.get(t).delete(e),c.set(t,c.get(t).filter((function(t){return t!==e})))}(t,e)})),g.set(e,a),e.isConnected()&&a.length>0&&O(e)}},window.CSSStyleSheet=S,E(Document),"ShadowRoot"in window){E(ShadowRoot);var b=Element.prototype,y=b.attachShadow;b.attachShadow=function(t){var e=y.call(this,t);return"closed"===t.mode&&r.set(this,e),e}}var x=C(document);x.isConnected()?x.connect():document.addEventListener("DOMContentLoaded",x.connect.bind(x))}function w(t){return t.shadowRoot||r.get(t)}function _(t){return"object"==typeof t&&(h.isPrototypeOf(t)||s.isPrototypeOf(t))}function k(t){return"object"==typeof t&&s.isPrototypeOf(t)}function A(t,e){return d.get(t).get(e)}function T(t,e){requestAnimationFrame((function(){e.textContent=l.get(t).textContent,u.get(t).forEach((function(t){return e.sheet[t.method].apply(e.sheet,t.args)}))}))}function M(t){if(!l.has(t))throw new TypeError("Illegal invocation")}function S(){var t=this,r=document.createElement("style");e.body.appendChild(r),l.set(t,r),c.set(t,[]),d.set(t,new WeakMap),u.set(t,[])}function C(t){var e=p.get(t);return e||(e=new D(t),p.set(t,e)),e}function E(t){i(t.prototype,"adoptedStyleSheets",{configurable:!0,enumerable:!0,get:function(){return C(this).sheets},set:function(t){C(this).update(t)}})}function L(t,e){for(var r=document.createNodeIterator(t,NodeFilter.SHOW_ELEMENT,(function(t){return w(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),null,!1),n=void 0;n=r.nextNode();)e(w(n))}function z(t){var e=m.get(t);return e instanceof Document?e.body:e}function O(t){var e=document.createDocumentFragment(),r=g.get(t),n=v.get(t),i=z(t);n.disconnect(),r.forEach((function(r){e.appendChild(A(r,t)||function(t,e){var r=document.createElement("style");return d.get(t).set(e,r),c.get(t).push(e),r}(r,t))})),i.insertBefore(e,null),n.observe(i,f),r.forEach((function(e){T(e,A(e,t))}))}function D(e){var r=this;r.sheets=[],m.set(r,e),g.set(r,[]),v.set(r,new MutationObserver((function(e,n){document?e.forEach((function(e){t||o.call(e.addedNodes,(function(t){t instanceof Element&&L(t,(function(t){C(t).connect()}))})),o.call(e.removedNodes,(function(e){e instanceof Element&&(function(t,e){return e instanceof HTMLStyleElement&&g.get(t).some((function(e){return A(e,t)}))}(r,e)&&O(r),t||L(e,(function(t){C(t).disconnect()})))}))})):n.disconnect()})))}}()},82393:(t,e,r)=>{"use strict";t.exports={parse:r(60062),stringify:r(40288)}},15305:(t,e,r)=>{"use strict";var n=r(23648);t.exports={isSize:function(t){return/^[\d\.]/.test(t)||-1!==t.indexOf("/")||-1!==n.indexOf(t)}}},60062:(t,e,r)=>{"use strict";var n=r(51183),i=r(54324),o=r(94316),a=r(99803),s=r(87486),l=r(2362),c=r(46492),d=r(15305).isSize;t.exports=h;var u=h.cache={};function h(t){if("string"!=typeof t)throw new Error("Font argument must be a string.");if(u[t])return u[t];if(""===t)throw new Error("Cannot parse an empty string.");if(-1!==o.indexOf(t))return u[t]={system:t};for(var e,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},h=c(t,/\s+/);e=h.shift();){if(-1!==i.indexOf(e))return["style","variant","weight","stretch"].forEach((function(t){r[t]=e})),u[t]=r;if(-1===s.indexOf(e))if("normal"!==e&&"small-caps"!==e)if(-1===l.indexOf(e)){if(-1===a.indexOf(e)){if(d(e)){var p=c(e,"/");if(r.size=p[0],null!=p[1]?r.lineHeight=f(p[1]):"/"===h[0]&&(h.shift(),r.lineHeight=f(h.shift())),!h.length)throw new Error("Missing required font-family.");return r.family=c(h.join(" "),/\s*,\s*/).map(n),u[t]=r}throw new Error("Unknown or unsupported font token: "+e)}r.weight=e}else r.stretch=e;else r.variant=e;else r.style=e}throw new Error("Missing required font-size.")}function f(t){var e=parseFloat(t);return e.toString()===t?e:t}},40288:(t,e,r)=>{"use strict";var n=r(9994),i=r(15305).isSize,o=p(r(54324)),a=p(r(94316)),s=p(r(99803)),l=p(r(87486)),c=p(r(2362)),d={normal:1,"small-caps":1},u={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},h="serif";function f(t,e){if(t&&!e[t]&&!o[t])throw Error("Unknown keyword `"+t+"`");return t}function p(t){for(var e={},r=0;r{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",n=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,n,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var s=0;s0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),r&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=r):d[2]=r),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),e.push(d))}},e}},21906:t=>{"use strict";t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},78706:t=>{"use strict";t.exports=function(t){return t[1]}},39683:(t,e,r)=>{"use strict";var n,i=r(59738),o=r(10040),a=r(4216),s=r(15498),l=r(54863),c=r(30829),d=Function.prototype.bind,u=Object.defineProperty,h=Object.prototype.hasOwnProperty;n=function(t,e,r){var n,i=o(e)&&a(e.value);return delete(n=s(e)).writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&h.call(this,t)?i:(e.value=d.call(i,r.resolveContext?r.resolveContext(this):this),u(this,t,e),this[t])},n},t.exports=function(t){var e=l(arguments[1]);return i(e.resolveContext)&&a(e.resolveContext),c(t,(function(t,r){return n(r,t,e)}))}},86142:(t,e,r)=>{"use strict";var n=r(59738),i=r(15034),o=r(18021),a=r(54863),s=r(79813);(t.exports=function(t,e){var r,i,l,c,d;return arguments.length<2||"string"!=typeof t?(c=e,e=t,t=null):c=arguments[2],n(t)?(r=s.call(t,"c"),i=s.call(t,"e"),l=s.call(t,"w")):(r=l=!0,i=!1),d={value:e,configurable:r,enumerable:i,writable:l},c?o(a(c),d):d}).gs=function(t,e,r){var l,c,d,u;return"string"!=typeof t?(d=r,r=e,e=t,t=null):d=arguments[3],n(e)?i(e)?n(r)?i(r)||(d=r,r=void 0):r=void 0:(d=e,e=r=void 0):e=void 0,n(t)?(l=s.call(t,"c"),c=s.call(t,"e")):(l=!0,c=!1),u={get:e,set:r,configurable:l,enumerable:c},d?o(a(d),u):u}},31830:(t,e,r)=>{"use strict";function n(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}r.d(e,{GP:()=>h,OE:()=>m});var i,o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a(t){if(!(e=o.exec(t)))throw new Error("invalid format: "+t);var e;return new s({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function s(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function l(t,e){var r=n(t,e);if(!r)return t+"";var i=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}a.prototype=s.prototype,s.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const c={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return l(100*t,e)},r:l,s:function(t,e){var r=n(t,e);if(!r)return t+"";var o=r[0],a=r[1],s=a-(i=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,l=o.length;return s===l?o:s>l?o+new Array(s-l+1).join("0"):s>0?o.slice(0,s)+"."+o.slice(s):"0."+new Array(1-s).join("0")+n(t,Math.max(0,e+s-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function d(t){return t}var u,h,f=Array.prototype.map,p=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function m(t){var e,r,o=void 0===t.grouping||void 0===t.thousands?d:(e=f.call(t.grouping,Number),r=t.thousands+"",function(t,n){for(var i=t.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(t.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[a=(a+1)%e.length];return o.reverse().join(r)}),s=void 0===t.currency?"":t.currency[0]+"",l=void 0===t.currency?"":t.currency[1]+"",u=void 0===t.decimal?".":t.decimal+"",h=void 0===t.numerals?d:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(f.call(t.numerals,String)),m=void 0===t.percent?"%":t.percent+"",g=void 0===t.minus?"-":t.minus+"",v=void 0===t.nan?"NaN":t.nan+"";function b(t){var e=(t=a(t)).fill,r=t.align,n=t.sign,d=t.symbol,f=t.zero,b=t.width,y=t.comma,x=t.precision,w=t.trim,_=t.type;"n"===_?(y=!0,_="g"):c[_]||(void 0===x&&(x=12),w=!0,_="g"),(f||"0"===e&&"="===r)&&(f=!0,e="0",r="=");var k="$"===d?s:"#"===d&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",A="$"===d?l:/[%p]/.test(_)?m:"",T=c[_],M=/[defgprs%]/.test(_);function S(t){var a,s,l,c=k,d=A;if("c"===_)d=T(t)+d,t="";else{var m=(t=+t)<0||1/t<0;if(t=isNaN(t)?v:T(Math.abs(t),x),w&&(t=function(t){t:for(var e,r=t.length,n=1,i=-1;n0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),m&&0==+t&&"+"!==n&&(m=!1),c=(m?"("===n?n:g:"-"===n||"("===n?"":n)+c,d=("s"===_?p[8+i/3]:"")+d+(m&&"("===n?")":""),M)for(a=-1,s=t.length;++a(l=t.charCodeAt(a))||l>57){d=(46===l?u+t.slice(a+1):t.slice(a))+d,t=t.slice(0,a);break}}y&&!f&&(t=o(t,1/0));var S=c.length+t.length+d.length,C=S>1)+c+t+d+C.slice(S);break;default:t=C+c+t+d}return h(t)}return x=void 0===x?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x)),S.toString=function(){return t+""},S}return{format:b,formatPrefix:function(t,e){var r,i=b(((t=a(t)).type="f",t)),o=3*Math.max(-8,Math.min(8,Math.floor((r=e,((r=n(Math.abs(r)))?r[1]:NaN)/3)))),s=Math.pow(10,-o),l=p[8+o/3];return function(t){return i(s*t)+l}}}}u=m({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),h=u.format,u.formatPrefix},79969:(t,e,r)=>{"use strict";r.d(e,{DC:()=>p,de:()=>h,aL:()=>m});var n=r(64772),i=r(79896),o=r(61396),a=r(67848),s=r(28397),l=r(34045);function c(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function d(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function u(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function h(t){var e=t.dateTime,r=t.date,s=t.time,l=t.periods,h=t.days,f=t.shortDays,p=t.months,m=t.shortMonths,v=_(l),b=k(l),y=_(h),x=k(h),w=_(f),et=k(f),wt=_(p),Dt=k(p),It=_(m),Rt=k(m),Ft={a:function(t){return f[t.getDay()]},A:function(t){return h[t.getDay()]},b:function(t){return m[t.getMonth()]},B:function(t){return p[t.getMonth()]},c:null,d:H,e:H,f:X,g:at,G:lt,H:W,I:q,j:Y,L:Z,m:$,M:J,p:function(t){return l[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:zt,s:Ot,S:K,u:Q,U:tt,V:rt,w:nt,W:it,x:null,X:null,y:ot,Y:st,Z:ct,"%":Lt},Pt={a:function(t){return f[t.getUTCDay()]},A:function(t){return h[t.getUTCDay()]},b:function(t){return m[t.getUTCMonth()]},B:function(t){return p[t.getUTCMonth()]},c:null,d:dt,e:dt,f:mt,g:Mt,G:Ct,H:ut,I:ht,j:ft,L:pt,m:gt,M:vt,p:function(t){return l[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:zt,s:Ot,S:bt,u:yt,U:xt,V:_t,w:kt,W:At,x:null,X:null,y:Tt,Y:St,Z:Et,"%":Lt},jt={a:function(t,e,r){var n=w.exec(e.slice(r));return n?(t.w=et[n[0].toLowerCase()],r+n[0].length):-1},A:function(t,e,r){var n=y.exec(e.slice(r));return n?(t.w=x[n[0].toLowerCase()],r+n[0].length):-1},b:function(t,e,r){var n=It.exec(e.slice(r));return n?(t.m=Rt[n[0].toLowerCase()],r+n[0].length):-1},B:function(t,e,r){var n=wt.exec(e.slice(r));return n?(t.m=Dt[n[0].toLowerCase()],r+n[0].length):-1},c:function(t,r,n){return Ut(t,e,r,n)},d:I,e:I,f:B,g:L,G:E,H:F,I:F,j:R,L:N,m:D,M:P,p:function(t,e,r){var n=v.exec(e.slice(r));return n?(t.p=b[n[0].toLowerCase()],r+n[0].length):-1},q:O,Q:G,s:V,S:j,u:T,U:M,V:S,w:A,W:C,x:function(t,e,n){return Ut(t,r,e,n)},X:function(t,e,r){return Ut(t,s,e,r)},y:L,Y:E,Z:z,"%":U};function Nt(t,e){return function(r){var n,i,o,a=[],s=-1,l=0,c=t.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in h||(h.w=1),"Z"in h?(l=(s=d(u(h.y,0,1))).getUTCDay(),s=l>4||0===l?n.rt.ceil(s):(0,n.rt)(s),s=i.A.offset(s,7*(h.V-1)),h.y=s.getUTCFullYear(),h.m=s.getUTCMonth(),h.d=s.getUTCDate()+(h.w+6)%7):(l=(s=c(u(h.y,0,1))).getDay(),s=l>4||0===l?o.By.ceil(s):(0,o.By)(s),s=a.A.offset(s,7*(h.V-1)),h.y=s.getFullYear(),h.m=s.getMonth(),h.d=s.getDate()+(h.w+6)%7)}else("W"in h||"U"in h)&&("w"in h||(h.w="u"in h?h.u%7:"W"in h?1:0),l="Z"in h?d(u(h.y,0,1)).getUTCDay():c(u(h.y,0,1)).getDay(),h.m=0,h.d="W"in h?(h.w+6)%7+7*h.W-(l+5)%7:h.w+7*h.U-(l+6)%7);return"Z"in h?(h.H+=h.Z/100|0,h.M+=h.Z%100,d(h)):c(h)}}function Ut(t,e,r,n){for(var i,o,a=0,s=e.length,l=r.length;a=l)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=jt[i in g?e.charAt(a++):i])||(n=o(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Ft.x=Nt(r,Ft),Ft.X=Nt(s,Ft),Ft.c=Nt(e,Ft),Pt.x=Nt(r,Pt),Pt.X=Nt(s,Pt),Pt.c=Nt(e,Pt),{format:function(t){var e=Nt(t+="",Ft);return e.toString=function(){return t},e},parse:function(t){var e=Bt(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=Nt(t+="",Pt);return e.toString=function(){return t},e},utcParse:function(t){var e=Bt(t+="",!0);return e.toString=function(){return t},e}}}var f,p,m,g={"-":"",_:" ",0:"0"},v=/^\s*\d+/,b=/^%/,y=/[\\^$*+?|[\]().{}]/g;function x(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",o=i.length;return n+(o68?1900:2e3),r+n[0].length):-1}function z(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function O(t,e,r){var n=v.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function D(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function I(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function R(t,e,r){var n=v.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function F(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function P(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function j(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function N(t,e,r){var n=v.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function B(t,e,r){var n=v.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function U(t,e,r){var n=b.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function G(t,e,r){var n=v.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function V(t,e,r){var n=v.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function H(t,e){return x(t.getDate(),e,2)}function W(t,e){return x(t.getHours(),e,2)}function q(t,e){return x(t.getHours()%12||12,e,2)}function Y(t,e){return x(1+a.A.count((0,s.A)(t),t),e,3)}function Z(t,e){return x(t.getMilliseconds(),e,3)}function X(t,e){return Z(t,e)+"000"}function $(t,e){return x(t.getMonth()+1,e,2)}function J(t,e){return x(t.getMinutes(),e,2)}function K(t,e){return x(t.getSeconds(),e,2)}function Q(t){var e=t.getDay();return 0===e?7:e}function tt(t,e){return x(o.fz.count((0,s.A)(t)-1,t),e,2)}function et(t){var e=t.getDay();return e>=4||0===e?(0,o.dt)(t):o.dt.ceil(t)}function rt(t,e){return t=et(t),x(o.dt.count((0,s.A)(t),t)+(4===(0,s.A)(t).getDay()),e,2)}function nt(t){return t.getDay()}function it(t,e){return x(o.By.count((0,s.A)(t)-1,t),e,2)}function ot(t,e){return x(t.getFullYear()%100,e,2)}function at(t,e){return x((t=et(t)).getFullYear()%100,e,2)}function st(t,e){return x(t.getFullYear()%1e4,e,4)}function lt(t,e){var r=t.getDay();return x((t=r>=4||0===r?(0,o.dt)(t):o.dt.ceil(t)).getFullYear()%1e4,e,4)}function ct(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+x(e/60|0,"0",2)+x(e%60,"0",2)}function dt(t,e){return x(t.getUTCDate(),e,2)}function ut(t,e){return x(t.getUTCHours(),e,2)}function ht(t,e){return x(t.getUTCHours()%12||12,e,2)}function ft(t,e){return x(1+i.A.count((0,l.A)(t),t),e,3)}function pt(t,e){return x(t.getUTCMilliseconds(),e,3)}function mt(t,e){return pt(t,e)+"000"}function gt(t,e){return x(t.getUTCMonth()+1,e,2)}function vt(t,e){return x(t.getUTCMinutes(),e,2)}function bt(t,e){return x(t.getUTCSeconds(),e,2)}function yt(t){var e=t.getUTCDay();return 0===e?7:e}function xt(t,e){return x(n.Hl.count((0,l.A)(t)-1,t),e,2)}function wt(t){var e=t.getUTCDay();return e>=4||0===e?(0,n.pT)(t):n.pT.ceil(t)}function _t(t,e){return t=wt(t),x(n.pT.count((0,l.A)(t),t)+(4===(0,l.A)(t).getUTCDay()),e,2)}function kt(t){return t.getUTCDay()}function At(t,e){return x(n.rt.count((0,l.A)(t)-1,t),e,2)}function Tt(t,e){return x(t.getUTCFullYear()%100,e,2)}function Mt(t,e){return x((t=wt(t)).getUTCFullYear()%100,e,2)}function St(t,e){return x(t.getUTCFullYear()%1e4,e,4)}function Ct(t,e){var r=t.getUTCDay();return x((t=r>=4||0===r?(0,n.pT)(t):n.pT.ceil(t)).getUTCFullYear()%1e4,e,4)}function Et(){return"+0000"}function Lt(){return"%"}function zt(t){return+t}function Ot(t){return Math.floor(+t/1e3)}f=h({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"]}),p=f.format,f.parse,m=f.utcFormat,f.utcParse},67848:(t,e,r)=>{"use strict";r.d(e,{A:()=>a,_:()=>s});var n=r(94825),i=r(37968),o=(0,n.A)((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.rR)/i.Nm}),(function(t){return t.getDate()-1}));const a=o;var s=o.range},37968:(t,e,r)=>{"use strict";r.d(e,{Fq:()=>s,JJ:()=>o,Nm:()=>a,Tt:()=>n,rR:()=>i});var n=1e3,i=6e4,o=36e5,a=864e5,s=6048e5},55622:(t,e,r)=>{"use strict";r.r(e),r.d(e,{timeDay:()=>v.A,timeDays:()=>v._,timeFriday:()=>b.Sh,timeFridays:()=>b.tz,timeHour:()=>m,timeHours:()=>g,timeInterval:()=>n.A,timeMillisecond:()=>o,timeMilliseconds:()=>a,timeMinute:()=>h,timeMinutes:()=>f,timeMonday:()=>b.By,timeMondays:()=>b.KP,timeMonth:()=>x,timeMonths:()=>w,timeSaturday:()=>b.kS,timeSaturdays:()=>b.t$,timeSecond:()=>c,timeSeconds:()=>d,timeSunday:()=>b.fz,timeSundays:()=>b.se,timeThursday:()=>b.dt,timeThursdays:()=>b.Q$,timeTuesday:()=>b.eQ,timeTuesdays:()=>b.yW,timeWednesday:()=>b.l3,timeWednesdays:()=>b.gf,timeWeek:()=>b.fz,timeWeeks:()=>b.se,timeYear:()=>_.A,timeYears:()=>_.V,utcDay:()=>E.A,utcDays:()=>E.o,utcFriday:()=>L.a1,utcFridays:()=>L.Zn,utcHour:()=>S,utcHours:()=>C,utcMillisecond:()=>o,utcMilliseconds:()=>a,utcMinute:()=>A,utcMinutes:()=>T,utcMonday:()=>L.rt,utcMondays:()=>L.ON,utcMonth:()=>O,utcMonths:()=>D,utcSaturday:()=>L.c8,utcSaturdays:()=>L.Xo,utcSecond:()=>c,utcSeconds:()=>d,utcSunday:()=>L.Hl,utcSundays:()=>L.aZ,utcThursday:()=>L.pT,utcThursdays:()=>L.wr,utcTuesday:()=>L.sr,utcTuesdays:()=>L.jN,utcWednesday:()=>L.z2,utcWednesdays:()=>L.G6,utcWeek:()=>L.Hl,utcWeeks:()=>L.aZ,utcYear:()=>I.A,utcYears:()=>I.j});var n=r(94825),i=(0,n.A)((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?(0,n.A)((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,r){e.setTime(+e+r*t)}),(function(e,r){return(r-e)/t})):i:null};const o=i;var a=i.range,s=r(37968),l=(0,n.A)((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*s.Tt)}),(function(t,e){return(e-t)/s.Tt}),(function(t){return t.getUTCSeconds()}));const c=l;var d=l.range,u=(0,n.A)((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*s.Tt)}),(function(t,e){t.setTime(+t+e*s.rR)}),(function(t,e){return(e-t)/s.rR}),(function(t){return t.getMinutes()}));const h=u;var f=u.range,p=(0,n.A)((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*s.Tt-t.getMinutes()*s.rR)}),(function(t,e){t.setTime(+t+e*s.JJ)}),(function(t,e){return(e-t)/s.JJ}),(function(t){return t.getHours()}));const m=p;var g=p.range,v=r(67848),b=r(61396),y=(0,n.A)((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));const x=y;var w=y.range,_=r(28397),k=(0,n.A)((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*s.rR)}),(function(t,e){return(e-t)/s.rR}),(function(t){return t.getUTCMinutes()}));const A=k;var T=k.range,M=(0,n.A)((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*s.JJ)}),(function(t,e){return(e-t)/s.JJ}),(function(t){return t.getUTCHours()}));const S=M;var C=M.range,E=r(79896),L=r(64772),z=(0,n.A)((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}));const O=z;var D=z.range,I=r(34045)},94825:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=new Date,i=new Date;function o(t,e,r,a){function s(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return s.floor=function(e){return t(e=new Date(+e)),e},s.ceil=function(r){return t(r=new Date(r-1)),e(r,1),t(r),r},s.round=function(t){var e=s(t),r=s.ceil(t);return t-e0))return a;do{a.push(o=new Date(+r)),e(r,i),t(r)}while(o=e)for(;t(e),!r(e);)e.setTime(e-1)}),(function(t,n){if(t>=t)if(n<0)for(;++n<=0;)for(;e(t,-1),!r(t););else for(;--n>=0;)for(;e(t,1),!r(t););}))},r&&(s.count=function(e,o){return n.setTime(+e),i.setTime(+o),t(n),t(i),Math.floor(r(n,i))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(a?function(e){return a(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}},79896:(t,e,r)=>{"use strict";r.d(e,{A:()=>a,o:()=>s});var n=r(94825),i=r(37968),o=(0,n.A)((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/i.Nm}),(function(t){return t.getUTCDate()-1}));const a=o;var s=o.range},64772:(t,e,r)=>{"use strict";r.d(e,{G6:()=>g,Hl:()=>a,ON:()=>p,Xo:()=>y,Zn:()=>b,a1:()=>u,aZ:()=>f,c8:()=>h,jN:()=>m,pT:()=>d,rt:()=>s,sr:()=>l,wr:()=>v,z2:()=>c});var n=r(94825),i=r(37968);function o(t){return(0,n.A)((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/i.Fq}))}var a=o(0),s=o(1),l=o(2),c=o(3),d=o(4),u=o(5),h=o(6),f=a.range,p=s.range,m=l.range,g=c.range,v=d.range,b=u.range,y=h.range},34045:(t,e,r)=>{"use strict";r.d(e,{A:()=>o,j:()=>a});var n=r(94825),i=(0,n.A)((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?(0,n.A)((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null};const o=i;var a=i.range},61396:(t,e,r)=>{"use strict";r.d(e,{By:()=>s,KP:()=>p,Q$:()=>v,Sh:()=>u,dt:()=>d,eQ:()=>l,fz:()=>a,gf:()=>g,kS:()=>h,l3:()=>c,se:()=>f,t$:()=>y,tz:()=>b,yW:()=>m});var n=r(94825),i=r(37968);function o(t){return(0,n.A)((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.rR)/i.Fq}))}var a=o(0),s=o(1),l=o(2),c=o(3),d=o(4),u=o(5),h=o(6),f=a.range,p=s.range,m=l.range,g=c.range,v=d.range,b=u.range,y=h.range},28397:(t,e,r)=>{"use strict";r.d(e,{A:()=>o,V:()=>a});var n=r(94825),i=(0,n.A)((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?(0,n.A)((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,r){e.setFullYear(e.getFullYear()+r*t)})):null};const o=i;var a=i.range},43362:(t,e,r)=>{"use strict";var n=r(38232),i=r(66367),o=r(48744),a=r(55572);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new o("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,d=arguments.length>6&&arguments[6],u=!!a&&a(t,e);if(n)n(t,e,{configurable:null===c&&u?u.configurable:!c,enumerable:null===s&&u?u.enumerable:!s,value:r,writable:null===l&&u?u.writable:!l});else{if(!d&&(s||l||c))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},10781:(t,e,r)=>{"use strict";var n=r(99952),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=r(43362),l=r(20419)(),c=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(i=n)||"[object Function]"!==o.call(i)||!n())return;var i;l?s(t,e,r,!0):s(t,e,r)},d=function(t,e){var r=arguments.length>2?arguments[2]:{},o=n(e);i&&(o=a.call(o,Object.getOwnPropertySymbols(e)));for(var s=0;s{"use strict";t.exports=function(){for(var t=0;t{"use strict";t.exports=n;var e=(n.canvas=document.createElement("canvas")).getContext("2d"),r=i([32,126]);function n(t,n){Array.isArray(t)&&(t=t.join(", "));var o,a={},s=16,l=.05;n&&(2===n.length&&"number"==typeof n[0]?o=i(n):Array.isArray(n)?o=n:(n.o?o=i(n.o):n.pairs&&(o=n.pairs),n.fontSize&&(s=n.fontSize),null!=n.threshold&&(l=n.threshold))),o||(o=r),e.font=s+"px "+t;for(var c=0;cs*l){var f=(h-u)/s;a[d]=1e3*f}}return a}function i(t){for(var e=[],r=t[0];r<=t[1];r++)for(var n=String.fromCharCode(r),i=t[0];i{var n=r(97883),i=r(25058),o={M:"moveTo",C:"bezierCurveTo"};t.exports=function(t,e){t.beginPath(),i(n(e)).forEach((function(e){var r=e[0],n=e.slice(1);t[o[r]].apply(t,n)})),t.closePath()}},22366:t=>{t.exports=function(t){switch(t){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},31338:t=>{"use strict";function e(t,r,n){var i=0|t[n];if(i<=0)return[];var o,a=new Array(i);if(n===t.length-1)for(o=0;o0)return function(t,e){var r,n;for(r=new Array(t),n=0;n{"use strict";function e(t,e,n){n=n||2;var o,a,s,l,u,h,p,m=e&&e.length,g=m?e[0]*n:t.length,v=r(t,0,g,n,!0),b=[];if(!v||v.next===v.prev)return b;if(m&&(v=function(t,e,n,i){var o,a,s,l=[];for(o=0,a=e.length;o80*n){o=s=t[0],a=l=t[1];for(var y=n;ys&&(s=u),h>l&&(l=h);p=0!==(p=Math.max(s-o,l-a))?32767/p:0}return i(v,b,n,o,a,p,0),b}function r(t,e,r,n,i){var o,a;if(i===M(t,e,r,n)>0)for(o=e;o=e;o-=n)a=k(o,t[o],t[o+1],a);return a&&v(a,a.next)&&(A(a),a=a.next),a}function n(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!v(n,n.next)&&0!==g(n.prev,n,n.next))n=n.next;else{if(A(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function i(t,e,r,c,d,u,f){if(t){!f&&u&&function(t,e,r,n){var i=t;do{0===i.z&&(i.z=h(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,o,a,s,l,c=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,n=r,s=0,e=0;e0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;r=n}o.nextZ=null,c*=2}while(a>1)}(i)}(t,c,d,u);for(var p,m,g=t;t.prev!==t.next;)if(p=t.prev,m=t.next,u?a(t,c,d,u):o(t))e.push(p.i/r|0),e.push(t.i/r|0),e.push(m.i/r|0),A(t),t=m.next,g=m.next;else if((t=m)===g){f?1===f?i(t=s(n(t),e,r),e,r,c,d,u,2):2===f&&l(t,e,r,c,d,u):i(n(t),e,r,c,d,u,1);break}}}function o(t){var e=t.prev,r=t,n=t.next;if(g(e,r,n)>=0)return!1;for(var i=e.x,o=r.x,a=n.x,s=e.y,l=r.y,c=n.y,d=io?i>a?i:a:o>a?o:a,f=s>l?s>c?s:c:l>c?l:c,m=n.next;m!==e;){if(m.x>=d&&m.x<=h&&m.y>=u&&m.y<=f&&p(i,s,o,l,a,c,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function a(t,e,r,n){var i=t.prev,o=t,a=t.next;if(g(i,o,a)>=0)return!1;for(var s=i.x,l=o.x,c=a.x,d=i.y,u=o.y,f=a.y,m=sl?s>c?s:c:l>c?l:c,y=d>u?d>f?d:f:u>f?u:f,x=h(m,v,e,r,n),w=h(b,y,e,r,n),_=t.prevZ,k=t.nextZ;_&&_.z>=x&&k&&k.z<=w;){if(_.x>=m&&_.x<=b&&_.y>=v&&_.y<=y&&_!==i&&_!==a&&p(s,d,l,u,c,f,_.x,_.y)&&g(_.prev,_,_.next)>=0)return!1;if(_=_.prevZ,k.x>=m&&k.x<=b&&k.y>=v&&k.y<=y&&k!==i&&k!==a&&p(s,d,l,u,c,f,k.x,k.y)&&g(k.prev,k,k.next)>=0)return!1;k=k.nextZ}for(;_&&_.z>=x;){if(_.x>=m&&_.x<=b&&_.y>=v&&_.y<=y&&_!==i&&_!==a&&p(s,d,l,u,c,f,_.x,_.y)&&g(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;k&&k.z<=w;){if(k.x>=m&&k.x<=b&&k.y>=v&&k.y<=y&&k!==i&&k!==a&&p(s,d,l,u,c,f,k.x,k.y)&&g(k.prev,k,k.next)>=0)return!1;k=k.nextZ}return!0}function s(t,e,r){var i=t;do{var o=i.prev,a=i.next.next;!v(o,a)&&b(o,i,i.next,a)&&w(o,a)&&w(a,o)&&(e.push(o.i/r|0),e.push(i.i/r|0),e.push(a.i/r|0),A(i),A(i.next),i=t=a),i=i.next}while(i!==t);return n(i)}function l(t,e,r,o,a,s){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&m(l,c)){var d=_(l,c);return l=n(l,l.next),d=n(d,d.next),i(l,e,r,o,a,s,0),void i(d,e,r,o,a,s,0)}c=c.next}l=l.next}while(l!==t)}function c(t,e){return t.x-e.x}function d(t,e){var r=function(t,e){var r,n=e,i=t.x,o=t.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>a&&(a=s,r=n.x=n.x&&n.x>=d&&i!==n.x&&p(or.x||n.x===r.x&&u(r,n)))&&(r=n,f=l)),n=n.next}while(n!==c);return r}(t,e);if(!r)return e;var i=_(r,t);return n(i,i.next),n(r,r.next)}function u(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function h(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function f(t){var e=t,r=t;do{(e.x=(t-a)*(o-s)&&(t-a)*(n-s)>=(r-a)*(e-s)&&(r-a)*(o-s)>=(i-a)*(n-s)}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&b(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(w(t,e)&&w(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||v(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,r,n){var i=x(g(t,e,r)),o=x(g(t,e,n)),a=x(g(r,n,t)),s=x(g(r,n,e));return i!==o&&a!==s||!(0!==i||!y(t,r,e))||!(0!==o||!y(t,n,e))||!(0!==a||!y(r,t,n))||!(0!==s||!y(r,e,n))}function y(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function x(t){return t>0?1:t<0?-1:0}function w(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function _(t,e){var r=new T(t.i,t.x,t.y),n=new T(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function k(t,e,r,n){var i=new T(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function A(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function T(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function M(t,e,r,n){for(var i=0,o=e,a=r-n;o0&&(n+=t[i-1].length,r.holes.push(n))}return r}},38232:(t,e,r)=>{"use strict";var n=r(59412)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(t){n=!1}t.exports=n},33674:t=>{"use strict";t.exports=EvalError},94234:t=>{"use strict";t.exports=Error},8975:t=>{"use strict";t.exports=RangeError},59299:t=>{"use strict";t.exports=ReferenceError},66367:t=>{"use strict";t.exports=SyntaxError},48744:t=>{"use strict";t.exports=TypeError},63432:t=>{"use strict";t.exports=URIError},18918:(t,e,r)=>{"use strict";var n=r(2033);t.exports=function(){return n(this).length=0,this}},54034:(t,e,r)=>{"use strict";t.exports=r(90329)()?Array.from:r(28741)},90329:t=>{"use strict";t.exports=function(){var t,e,r=Array.from;return"function"==typeof r&&(e=r(t=["raz","dwa"]),Boolean(e&&e!==t&&"dwa"===e[1]))}},28741:(t,e,r)=>{"use strict";var n=r(89791).iterator,i=r(40471),o=r(85875),a=r(60812),s=r(55366),l=r(2033),c=r(93767),d=r(54295),u=Array.isArray,h=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;t.exports=function(t){var e,r,m,g,v,b,y,x,w,_,k=arguments[1],A=arguments[2];if(t=Object(l(t)),c(k)&&s(k),this&&this!==Array&&o(this))e=this;else{if(!k){if(i(t))return 1!==(v=t.length)?Array.apply(null,t):((g=new Array(1))[0]=t[0],g);if(u(t)){for(g=new Array(v=t.length),r=0;r=55296&&b<=56319&&(_+=t[++r]),_=k?h.call(k,A,_,m):_,e?(f.value=_,p(g,m,f)):g[m]=_,++m;v=m}if(void 0===v)for(v=a(t.length),e&&(g=new e(v)),r=0;r{"use strict";var e=Object.prototype.toString,r=e.call(function(){return arguments}());t.exports=function(t){return e.call(t)===r}},85875:t=>{"use strict";var e=Object.prototype.toString,r=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);t.exports=function(t){return"function"==typeof t&&r(e.call(t))}},20450:t=>{"use strict";t.exports=function(){}},55334:(t,e,r)=>{"use strict";t.exports=r(42669)()?Math.sign:r(78209)},42669:t=>{"use strict";t.exports=function(){var t=Math.sign;return"function"==typeof t&&1===t(10)&&-1===t(-20)}},78209:t=>{"use strict";t.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},28371:(t,e,r)=>{"use strict";var n=r(55334),i=Math.abs,o=Math.floor;t.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&&isFinite(t)?n(t)*o(i(t)):t}},60812:(t,e,r)=>{"use strict";var n=r(28371),i=Math.max;t.exports=function(t){return i(0,n(t))}},78826:(t,e,r)=>{"use strict";var n=r(55366),i=r(2033),o=Function.prototype.bind,a=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(r,c){var d,u=arguments[2],h=arguments[3];return r=Object(i(r)),n(c),d=s(r),h&&d.sort("function"==typeof h?o.call(h,r):void 0),"function"!=typeof t&&(t=d[t]),a.call(t,d,(function(t,n){return l.call(r,t)?a.call(c,u,r[t],t,r,n):e}))}}},18021:(t,e,r)=>{"use strict";t.exports=r(99484)()?Object.assign:r(28752)},99484:t=>{"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},28752:(t,e,r)=>{"use strict";var n=r(87984),i=r(2033),o=Math.max;t.exports=function(t,e){var r,a,s,l=o(arguments.length,2);for(t=Object(i(t)),s=function(n){try{t[n]=e[n]}catch(t){r||(r=t)}},a=1;a{"use strict";var n=r(54034),i=r(18021),o=r(2033);t.exports=function(t){var e=Object(o(t)),r=arguments[1],a=Object(arguments[2]);if(e!==t&&!r)return e;var s={};return r?n(r,(function(e){(a.ensure||e in t)&&(s[e]=t[e])})):i(s,t),s}},39095:(t,e,r)=>{"use strict";var n,i,o,a,s=Object.create;r(11314)()||(n=r(786)),t.exports=n?1!==n.level?s:(i={},o={},a={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach((function(t){o[t]="__proto__"!==t?a:{configurable:!0,enumerable:!1,writable:!0,value:void 0}})),Object.defineProperties(i,o),Object.defineProperty(n,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:i}),function(t,e){return s(null===t?i:t,e)}):s},17916:(t,e,r)=>{"use strict";t.exports=r(78826)("forEach")},27375:(t,e,r)=>{"use strict";var n=r(93767),i={function:!0,object:!0};t.exports=function(t){return n(t)&&i[typeof t]||!1}},93767:(t,e,r)=>{"use strict";var n=r(20450)();t.exports=function(t){return t!==n&&null!==t}},87984:(t,e,r)=>{"use strict";t.exports=r(60263)()?Object.keys:r(42351)},60263:t=>{"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},42351:(t,e,r)=>{"use strict";var n=r(93767),i=Object.keys;t.exports=function(t){return i(n(t)?Object(t):t)}},30829:(t,e,r)=>{"use strict";var n=r(55366),i=r(17916),o=Function.prototype.call;t.exports=function(t,e){var r={},a=arguments[2];return n(e),i(t,(function(t,n,i,s){r[n]=o.call(e,a,t,n,i,s)})),r}},54863:(t,e,r)=>{"use strict";var n=r(93767),i=Array.prototype.forEach,o=Object.create;t.exports=function(t){var e=o(null);return i.call(arguments,(function(t){n(t)&&function(t,e){var r;for(r in t)e[r]=t[r]}(Object(t),e)})),e}},83579:(t,e,r)=>{"use strict";t.exports=r(11314)()?Object.setPrototypeOf:r(786)},11314:t=>{"use strict";var e=Object.create,r=Object.getPrototypeOf,n={};t.exports=function(){var t=Object.setPrototypeOf;return"function"==typeof t&&r(t((arguments[0]||e)(null),n))===n}},786:(t,e,r)=>{"use strict";var n,i,o,a,s=r(27375),l=r(2033),c=Object.prototype.isPrototypeOf,d=Object.defineProperty,u={configurable:!0,enumerable:!1,writable:!0,value:void 0};n=function(t,e){if(l(t),null===e||s(e))return t;throw new TypeError("Prototype must be null or an object")},t.exports=(i=function(){var t,e=Object.create(null),r={},n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{(t=n.set).call(e,r)}catch(t){}if(Object.getPrototypeOf(e)===r)return{set:t,level:2}}return e.__proto__=r,Object.getPrototypeOf(e)===r?{level:2}:((e={}).__proto__=r,Object.getPrototypeOf(e)===r&&{level:1})}(),i?(2===i.level?i.set?(a=i.set,o=function(t,e){return a.call(n(t,e),e),t}):o=function(t,e){return n(t,e).__proto__=e,t}:o=function t(e,r){var i;return n(e,r),(i=c.call(t.nullPolyfill,e))&&delete t.nullPolyfill.__proto__,null===r&&(r=t.nullPolyfill),e.__proto__=r,i&&d(t.nullPolyfill,"__proto__",u),e},Object.defineProperty(o,"level",{configurable:!1,enumerable:!1,writable:!1,value:i.level})):null),r(39095)},55366:t=>{"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},66529:(t,e,r)=>{"use strict";var n=r(27375);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not an Object");return t}},2033:(t,e,r)=>{"use strict";var n=r(93767);t.exports=function(t){if(!n(t))throw new TypeError("Cannot use null or undefined");return t}},79813:(t,e,r)=>{"use strict";t.exports=r(82844)()?String.prototype.contains:r(65040)},82844:t=>{"use strict";var e="razdwatrzy";t.exports=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}},65040:t=>{"use strict";var e=String.prototype.indexOf;t.exports=function(t){return e.call(this,t,arguments[1])>-1}},54295:t=>{"use strict";var e=Object.prototype.toString,r=e.call("");t.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||e.call(t)===r)||!1}},36434:t=>{"use strict";var e=Object.create(null),r=Math.random;t.exports=function(){var t;do{t=r().toString(36).slice(2)}while(e[t]);return t}},46136:(t,e,r)=>{"use strict";var n,i=r(83579),o=r(79813),a=r(86142),s=r(89791),l=r(15929),c=Object.defineProperty;n=t.exports=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");l.call(this,t),e=e?o.call(e,"key+value")?"key+value":o.call(e,"key")?"key":"value":"value",c(this,"__kind__",a("",e))},i&&i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:a((function(t){return"value"===this.__kind__?this.__list__[t]:"key+value"===this.__kind__?[t,this.__list__[t]]:t}))}),c(n.prototype,s.toStringTag,a("c","Array Iterator"))},88822:(t,e,r)=>{"use strict";var n=r(40471),i=r(55366),o=r(54295),a=r(28753),s=Array.isArray,l=Function.prototype.call,c=Array.prototype.some;t.exports=function(t,e){var r,d,u,h,f,p,m,g,v=arguments[2];if(s(t)||n(t)?r="array":o(t)?r="string":t=a(t),i(e),u=function(){h=!0},"array"!==r)if("string"!==r)for(d=t.next();!d.done;){if(l.call(e,v,d.value,u),h)return;d=t.next()}else for(p=t.length,f=0;f=55296&&g<=56319&&(m+=t[++f]),l.call(e,v,m,u),!h);++f);else c.call(t,(function(t){return l.call(e,v,t,u),h}))}},28753:(t,e,r)=>{"use strict";var n=r(40471),i=r(54295),o=r(46136),a=r(45408),s=r(86898),l=r(89791).iterator;t.exports=function(t){return"function"==typeof s(t)[l]?t[l]():n(t)?new o(t):i(t)?new a(t):new o(t)}},15929:(t,e,r)=>{"use strict";var n,i=r(18918),o=r(18021),a=r(55366),s=r(2033),l=r(86142),c=r(39683),d=r(89791),u=Object.defineProperty,h=Object.defineProperties;t.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");h(this,{__list__:l("w",s(t)),__context__:l("w",e),__nextIndex__:l("w",0)}),e&&(a(e.on),e.on("_add",this._onAdd),e.on("_delete",this._onDelete),e.on("_clear",this._onClear))},delete n.prototype.constructor,h(n.prototype,o({_next:l((function(){var t;if(this.__list__)return this.__redo__&&void 0!==(t=this.__redo__.shift())?t:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(e,r){e>=t&&(this.__redo__[r]=++e)}),this),this.__redo__.push(t)):u(this,"__redo__",l("c",[t])))})),_onDelete:l((function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(e=this.__redo__.indexOf(t))&&this.__redo__.splice(e,1),this.__redo__.forEach((function(e,r){e>t&&(this.__redo__[r]=--e)}),this)))})),_onClear:l((function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0}))}))),u(n.prototype,d.iterator,l((function(){return this})))},46692:(t,e,r)=>{"use strict";var n=r(40471),i=r(93767),o=r(54295),a=r(89791).iterator,s=Array.isArray;t.exports=function(t){return!(!i(t)||!s(t)&&!o(t)&&!n(t)&&"function"!=typeof t[a])}},45408:(t,e,r)=>{"use strict";var n,i=r(83579),o=r(86142),a=r(89791),s=r(15929),l=Object.defineProperty;n=t.exports=function(t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");t=String(t),s.call(this,t),l(this,"__length__",o("",t.length))},i&&i(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:o((function(){if(this.__list__)return this.__nextIndex__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,a.toStringTag,o("c","String Iterator"))},86898:(t,e,r)=>{"use strict";var n=r(46692);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not iterable");return t}},89791:(t,e,r)=>{"use strict";t.exports=r(87494)()?r(63844).Symbol:r(44164)},87494:(t,e,r)=>{"use strict";var n=r(63844),i={object:!0,symbol:!0};t.exports=function(){var t,e=n.Symbol;if("function"!=typeof e)return!1;t=e("test symbol");try{String(t)}catch(t){return!1}return!!i[typeof e.iterator]&&!!i[typeof e.toPrimitive]&&!!i[typeof e.toStringTag]}},84848:t=>{"use strict";t.exports=function(t){return!!t&&("symbol"==typeof t||!!t.constructor&&"Symbol"===t.constructor.name&&"Symbol"===t[t.constructor.toStringTag])}},78718:(t,e,r)=>{"use strict";var n=r(86142),i=Object.create,o=Object.defineProperty,a=Object.prototype,s=i(null);t.exports=function(t){for(var e,r,i=0;s[t+(i||"")];)++i;return s[t+=i||""]=!0,o(a,e="@@"+t,n.gs(null,(function(t){r||(r=!0,o(this,e,n(t)),r=!1)}))),e}},25052:(t,e,r)=>{"use strict";var n=r(86142),i=r(63844).Symbol;t.exports=function(t){return Object.defineProperties(t,{hasInstance:n("",i&&i.hasInstance||t("hasInstance")),isConcatSpreadable:n("",i&&i.isConcatSpreadable||t("isConcatSpreadable")),iterator:n("",i&&i.iterator||t("iterator")),match:n("",i&&i.match||t("match")),replace:n("",i&&i.replace||t("replace")),search:n("",i&&i.search||t("search")),species:n("",i&&i.species||t("species")),split:n("",i&&i.split||t("split")),toPrimitive:n("",i&&i.toPrimitive||t("toPrimitive")),toStringTag:n("",i&&i.toStringTag||t("toStringTag")),unscopables:n("",i&&i.unscopables||t("unscopables"))})}},68813:(t,e,r)=>{"use strict";var n=r(86142),i=r(85618),o=Object.create(null);t.exports=function(t){return Object.defineProperties(t,{for:n((function(e){return o[e]?o[e]:o[e]=t(String(e))})),keyFor:n((function(t){var e;for(e in i(t),o)if(o[e]===t)return e}))})}},44164:(t,e,r)=>{"use strict";var n,i,o,a=r(86142),s=r(85618),l=r(63844).Symbol,c=r(78718),d=r(25052),u=r(68813),h=Object.create,f=Object.defineProperties,p=Object.defineProperty;if("function"==typeof l)try{String(l()),o=!0}catch(t){}else l=null;i=function(t){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return n(t)},t.exports=n=function t(e){var r;if(this instanceof t)throw new TypeError("Symbol is not a constructor");return o?l(e):(r=h(i.prototype),e=void 0===e?"":String(e),f(r,{__description__:a("",e),__name__:a("",c(e))}))},d(n),u(n),f(i.prototype,{constructor:a(n),toString:a("",(function(){return this.__name__}))}),f(n.prototype,{toString:a((function(){return"Symbol ("+s(this).__description__+")"})),valueOf:a((function(){return s(this)}))}),p(n.prototype,n.toPrimitive,a("",(function(){var t=s(this);return"symbol"==typeof t?t:t.toString()}))),p(n.prototype,n.toStringTag,a("c","Symbol")),p(i.prototype,n.toStringTag,a("c",n.prototype[n.toStringTag])),p(i.prototype,n.toPrimitive,a("c",n.prototype[n.toPrimitive]))},85618:(t,e,r)=>{"use strict";var n=r(84848);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not a symbol");return t}},41456:(t,e,r)=>{"use strict";t.exports=r(39687)()?WeakMap:r(87841)},39687:t=>{"use strict";t.exports=function(){var t,e;if("function"!=typeof WeakMap)return!1;try{t=new WeakMap([[e={},"one"],[{},"two"],[{},"three"]])}catch(t){return!1}return"[object WeakMap]"===String(t)&&"function"==typeof t.set&&t.set({},1)===t&&"function"==typeof t.delete&&"function"==typeof t.has&&"one"===t.get(e)}},99037:t=>{"use strict";t.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)},87841:(t,e,r)=>{"use strict";var n,i=r(93767),o=r(83579),a=r(66529),s=r(2033),l=r(36434),c=r(86142),d=r(28753),u=r(88822),h=r(89791).toStringTag,f=r(99037),p=Array.isArray,m=Object.defineProperty,g=Object.prototype.hasOwnProperty,v=Object.getPrototypeOf;t.exports=n=function(){var t,e=arguments[0];if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");return t=f&&o&&WeakMap!==n?o(new WeakMap,v(this)):this,i(e)&&(p(e)||(e=d(e))),m(t,"__weakMapData__",c("c","$weakMap$"+l())),e?(u(e,(function(e){s(e),t.set(e[0],e[1])})),t):t},f&&(o&&o(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:c(n)})),Object.defineProperties(n.prototype,{delete:c((function(t){return!!g.call(a(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)})),get:c((function(t){if(g.call(a(t),this.__weakMapData__))return t[this.__weakMapData__]})),has:c((function(t){return g.call(a(t),this.__weakMapData__)})),set:c((function(t,e){return m(a(t),this.__weakMapData__,c("c",e)),this})),toString:c((function(){return"[object WeakMap]"}))}),m(n.prototype,h,c("c","WeakMap"))},86626:t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}m(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&m(t,"error",e,{once:!0})}(t,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function c(t,e,r,n){var i,o,a,c;if(s(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"==typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=l(t))>0&&a.length>i&&!a.warned){a.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=t,d.type=e,d.count=a.length,c=d,console&&console.warn&&console.warn(c)}return t}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=d.bind(n);return i.listener=r,n.wrapFn=i,i}function h(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[t];if(void 0===l)return!1;if("function"==typeof l)n(l,this,e);else{var c=l.length,d=p(l,c);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return h(this,t,!0)},o.prototype.rawListeners=function(t){return h(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):f.call(t,e)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},44232:t=>{var e=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};t.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return e()}try{return __global__||e()}finally{delete Object.prototype.__global__}}()},63844:(t,e,r)=>{"use strict";t.exports=r(25515)()?globalThis:r(44232)},25515:t=>{"use strict";t.exports=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}},7370:(t,e,r)=>{"use strict";var n=r(45219);t.exports=function(t){var e=typeof t;if("string"===e){var r=t;if(0==(t=+t)&&n(r))return!1}else if("number"!==e)return!1;return t-t<1}},97e3:(t,e,r)=>{var n=r(22366);t.exports=function(t,e,r){if(!t)throw new TypeError("must specify data as first parameter");if(r=0|+(r||0),Array.isArray(t)&&t[0]&&"number"==typeof t[0][0]){var i,o,a,s,l=t[0].length,c=t.length*l;e&&"string"!=typeof e||(e=new(n(e||"float32"))(c+r));var d=e.length-r;if(c!==d)throw new Error("source length "+c+" ("+l+"x"+t.length+") does not match destination length "+d);for(i=0,a=r;i{"use strict";var n=r(40288),i=[32,126];t.exports=function(t){var e=(t=t||{}).shape?t.shape:t.canvas?[t.canvas.width,t.canvas.height]:[512,512],r=t.canvas||document.createElement("canvas"),o=t.font,a="number"==typeof t.step?[t.step,t.step]:t.step||[32,32],s=t.chars||i;if(o&&"string"!=typeof o&&(o=n(o)),Array.isArray(s)){if(2===s.length&&"number"==typeof s[0]&&"number"==typeof s[1]){for(var l=[],c=s[0],d=0;c<=s[1];c++)l[d++]=String.fromCharCode(c);s=l}}else s=String(s).split("");e=e.slice(),r.width=e[0],r.height=e[1];var u=r.getContext("2d");u.fillStyle="#000",u.fillRect(0,0,r.width,r.height),u.font=o,u.textAlign="center",u.textBaseline="middle",u.fillStyle="#fff";var h=a[0]/2,f=a[1]/2;for(c=0;ce[0]-a[0]/2&&(h=a[0]/2,f+=a[1]);return r}},45250:t=>{"use strict";function e(t,o){o||(o={}),("string"==typeof t||Array.isArray(t))&&(o.family=t);var a=Array.isArray(o.family)?o.family.join(", "):o.family;if(!a)throw Error("`family` must be defined");var s=o.size||o.fontSize||o.em||48,l=o.weight||o.fontWeight||"",c=(t=[o.style||o.fontStyle||"",l,s].join(" ")+"px "+a,o.origin||"top");if(e.cache[a]&&s<=e.cache[a].em)return r(e.cache[a],c);var d=o.canvas||e.canvas,u=d.getContext("2d"),h={upper:void 0!==o.upper?o.upper:"H",lower:void 0!==o.lower?o.lower:"x",descent:void 0!==o.descent?o.descent:"p",ascent:void 0!==o.ascent?o.ascent:"h",tittle:void 0!==o.tittle?o.tittle:"i",overshoot:void 0!==o.overshoot?o.overshoot:"O"},f=Math.ceil(1.5*s);d.height=f,d.width=.5*f,u.font=t;var p="H",m={top:0};u.clearRect(0,0,f,f),u.textBaseline="top",u.fillStyle="black",u.fillText(p,0,0);var g=n(u.getImageData(0,0,f,f));u.clearRect(0,0,f,f),u.textBaseline="bottom",u.fillText(p,0,f);var v=n(u.getImageData(0,0,f,f));m.lineHeight=m.bottom=f-v+g,u.clearRect(0,0,f,f),u.textBaseline="alphabetic",u.fillText(p,0,f);var b=f-n(u.getImageData(0,0,f,f))-1+g;m.baseline=m.alphabetic=b,u.clearRect(0,0,f,f),u.textBaseline="middle",u.fillText(p,0,.5*f);var y=n(u.getImageData(0,0,f,f));m.median=m.middle=f-y-1+g-.5*f,u.clearRect(0,0,f,f),u.textBaseline="hanging",u.fillText(p,0,.5*f);var x=n(u.getImageData(0,0,f,f));m.hanging=f-x-1+g-.5*f,u.clearRect(0,0,f,f),u.textBaseline="ideographic",u.fillText(p,0,f);var w=n(u.getImageData(0,0,f,f));if(m.ideographic=f-w-1+g,h.upper&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(h.upper,0,0),m.upper=n(u.getImageData(0,0,f,f)),m.capHeight=m.baseline-m.upper),h.lower&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(h.lower,0,0),m.lower=n(u.getImageData(0,0,f,f)),m.xHeight=m.baseline-m.lower),h.tittle&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(h.tittle,0,0),m.tittle=n(u.getImageData(0,0,f,f))),h.ascent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(h.ascent,0,0),m.ascent=n(u.getImageData(0,0,f,f))),h.descent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(h.descent,0,0),m.descent=i(u.getImageData(0,0,f,f))),h.overshoot){u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(h.overshoot,0,0);var _=i(u.getImageData(0,0,f,f));m.overshoot=_-b}for(var k in m)m[k]/=s;return m.em=s,e.cache[a]=m,r(m,c)}function r(t,e){var r={};for(var n in"string"==typeof e&&(e=t[e]),t)"em"!==n&&(r[n]=t[n]-e);return r}function n(t){for(var e=t.height,r=t.data,n=3;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}t.exports=e,e.canvas=document.createElement("canvas"),e.cache={}},85573:(t,e,r)=>{"use strict";var n=r(60245),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===i.call(t)?function(t,e,r){for(var n=0,i=t.length;n{"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n{"use strict";var n=r(5438);t.exports=Function.prototype.bind||n},64487:t=>{t.exports=function(t,e){if("string"!=typeof t)throw new TypeError("must specify type string");if(e=e||{},"undefined"==typeof document&&!e.canvas)return null;var r=e.canvas||document.createElement("canvas");"number"==typeof e.width&&(r.width=e.width),"number"==typeof e.height&&(r.height=e.height);var n,i=e;try{var o=[t];0===t.indexOf("webgl")&&o.push("experimental-"+t);for(var a=0;a{"use strict";var n,i=r(94234),o=r(33674),a=r(8975),s=r(59299),l=r(66367),c=r(48744),d=r(63432),u=Function,h=function(t){try{return u('"use strict"; return ('+t+").constructor;")()}catch(t){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(t){f=null}var p=function(){throw new c},m=f?function(){try{return p}catch(t){try{return f(arguments,"callee").get}catch(t){return p}}}():p,g=r(23266)(),v=r(39681)(),b=Object.getPrototypeOf||(v?function(t){return t.__proto__}:null),y={},x="undefined"!=typeof Uint8Array&&b?b(Uint8Array):n,w={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":u,"%GeneratorFunction%":y,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":l,"%ThrowTypeError%":m,"%TypedArray%":x,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":d,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(b)try{null.error}catch(t){var _=b(b(t));w["%Error.prototype%"]=_}var k=function t(e){var r;if("%AsyncFunction%"===e)r=h("async function () {}");else if("%GeneratorFunction%"===e)r=h("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=h("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&b&&(r=b(i.prototype))}return w[e]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},T=r(35366),M=r(19942),S=T.call(Function.call,Array.prototype.concat),C=T.call(Function.apply,Array.prototype.splice),E=T.call(Function.call,String.prototype.replace),L=T.call(Function.call,String.prototype.slice),z=T.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,I=function(t,e){var r,n=t;if(M(A,n)&&(n="%"+(r=A[n])[0]+"%"),M(w,n)){var i=w[n];if(i===y&&(i=k(n)),void 0===i&&!e)throw new c("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new l("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new c('"allowMissing" argument must be a boolean');if(null===z(/^%?[^%]*%?$/,t))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=L(t,0,1),r=L(t,-1);if("%"===e&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new l("invalid intrinsic syntax, expected opening `%`");var n=[];return E(t,O,(function(t,e,r,i){n[n.length]=r?E(i,D,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=I("%"+n+"%",e),o=i.name,a=i.value,s=!1,d=i.alias;d&&(n=d[0],C(r,S([0,1],d)));for(var u=1,h=!0;u=r.length){var v=f(a,p);a=(h=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:a[p]}else h=M(a,p),a=a[p];h&&!s&&(w[o]=a)}}return a}},4813:t=>{t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],d=e[8],u=e[9],h=e[10],f=e[11],p=e[12],m=e[13],g=e[14],v=e[15];return t[0]=s*(h*v-f*g)-u*(l*v-c*g)+m*(l*f-c*h),t[1]=-(n*(h*v-f*g)-u*(i*v-o*g)+m*(i*f-o*h)),t[2]=n*(l*v-c*g)-s*(i*v-o*g)+m*(i*c-o*l),t[3]=-(n*(l*f-c*h)-s*(i*f-o*h)+u*(i*c-o*l)),t[4]=-(a*(h*v-f*g)-d*(l*v-c*g)+p*(l*f-c*h)),t[5]=r*(h*v-f*g)-d*(i*v-o*g)+p*(i*f-o*h),t[6]=-(r*(l*v-c*g)-a*(i*v-o*g)+p*(i*c-o*l)),t[7]=r*(l*f-c*h)-a*(i*f-o*h)+d*(i*c-o*l),t[8]=a*(u*v-f*m)-d*(s*v-c*m)+p*(s*f-c*u),t[9]=-(r*(u*v-f*m)-d*(n*v-o*m)+p*(n*f-o*u)),t[10]=r*(s*v-c*m)-a*(n*v-o*m)+p*(n*c-o*s),t[11]=-(r*(s*f-c*u)-a*(n*f-o*u)+d*(n*c-o*s)),t[12]=-(a*(u*g-h*m)-d*(s*g-l*m)+p*(s*h-l*u)),t[13]=r*(u*g-h*m)-d*(n*g-i*m)+p*(n*h-i*u),t[14]=-(r*(s*g-l*m)-a*(n*g-i*m)+p*(n*l-i*s)),t[15]=r*(s*h-l*u)-a*(n*h-i*u)+d*(n*l-i*s),t}},1903:t=>{t.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},42981:t=>{t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},46864:t=>{t.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},49921:t=>{t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],c=t[8],d=t[9],u=t[10],h=t[11],f=t[12],p=t[13],m=t[14],g=t[15];return(e*a-r*o)*(u*g-h*m)-(e*s-n*o)*(d*g-h*p)+(e*l-i*o)*(d*m-u*p)+(r*s-n*a)*(c*g-h*f)-(r*l-i*a)*(c*m-u*f)+(n*l-i*s)*(c*p-d*f)}},17399:t=>{t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=r+r,s=n+n,l=i+i,c=r*a,d=n*a,u=n*s,h=i*a,f=i*s,p=i*l,m=o*a,g=o*s,v=o*l;return t[0]=1-u-p,t[1]=d+v,t[2]=h-g,t[3]=0,t[4]=d-v,t[5]=1-c-p,t[6]=f+m,t[7]=0,t[8]=h+g,t[9]=f-m,t[10]=1-c-u,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},7354:t=>{t.exports=function(t,e,r){var n,i,o,a=r[0],s=r[1],l=r[2],c=Math.sqrt(a*a+s*s+l*l);return Math.abs(c)<1e-6?null:(a*=c=1/c,s*=c,l*=c,n=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=s*a*o+l*n,t[2]=l*a*o-s*n,t[3]=0,t[4]=a*s*o-l*n,t[5]=s*s*o+i,t[6]=l*s*o+a*n,t[7]=0,t[8]=a*l*o+s*n,t[9]=s*l*o-a*n,t[10]=l*l*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}},76743:t=>{t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3],s=n+n,l=i+i,c=o+o,d=n*s,u=n*l,h=n*c,f=i*l,p=i*c,m=o*c,g=a*s,v=a*l,b=a*c;return t[0]=1-(f+m),t[1]=u+b,t[2]=h-v,t[3]=0,t[4]=u-b,t[5]=1-(d+m),t[6]=p+g,t[7]=0,t[8]=h+v,t[9]=p-g,t[10]=1-(d+f),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}},90367:t=>{t.exports=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},68673:t=>{t.exports=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}},80180:t=>{t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},68727:t=>{t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},96402:t=>{t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},29192:t=>{t.exports=function(t,e,r,n,i,o,a){var s=1/(r-e),l=1/(i-n),c=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(r+e)*s,t[9]=(i+n)*l,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t}},87894:t=>{t.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},79538:(t,e,r)=>{t.exports={create:r(46864),clone:r(1903),copy:r(42981),identity:r(87894),transpose:r(45665),invert:r(27608),adjoint:r(4813),determinant:r(49921),multiply:r(66760),translate:r(77656),scale:r(62504),rotate:r(26079),rotateX:r(15567),rotateY:r(52408),rotateZ:r(27089),fromRotation:r(7354),fromRotationTranslation:r(76743),fromScaling:r(90367),fromTranslation:r(68673),fromXRotation:r(80180),fromYRotation:r(68727),fromZRotation:r(96402),fromQuat:r(17399),frustum:r(29192),perspective:r(4772),perspectiveFromFieldOfView:r(11882),ortho:r(74040),lookAt:r(66582),str:r(65213)}},27608:t=>{t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],d=e[8],u=e[9],h=e[10],f=e[11],p=e[12],m=e[13],g=e[14],v=e[15],b=r*s-n*a,y=r*l-i*a,x=r*c-o*a,w=n*l-i*s,_=n*c-o*s,k=i*c-o*l,A=d*m-u*p,T=d*g-h*p,M=d*v-f*p,S=u*g-h*m,C=u*v-f*m,E=h*v-f*g,L=b*E-y*C+x*S+w*M-_*T+k*A;return L?(L=1/L,t[0]=(s*E-l*C+c*S)*L,t[1]=(i*C-n*E-o*S)*L,t[2]=(m*k-g*_+v*w)*L,t[3]=(h*_-u*k-f*w)*L,t[4]=(l*M-a*E-c*T)*L,t[5]=(r*E-i*M+o*T)*L,t[6]=(g*x-p*k-v*y)*L,t[7]=(d*k-h*x+f*y)*L,t[8]=(a*C-s*M+c*A)*L,t[9]=(n*M-r*C-o*A)*L,t[10]=(p*_-m*x+v*b)*L,t[11]=(u*x-d*_-f*b)*L,t[12]=(s*T-a*S-l*A)*L,t[13]=(r*S-n*T+i*A)*L,t[14]=(m*y-p*w-g*b)*L,t[15]=(d*w-u*y+h*b)*L,t):null}},66582:(t,e,r)=>{var n=r(87894);t.exports=function(t,e,r,i){var o,a,s,l,c,d,u,h,f,p,m=e[0],g=e[1],v=e[2],b=i[0],y=i[1],x=i[2],w=r[0],_=r[1],k=r[2];return Math.abs(m-w)<1e-6&&Math.abs(g-_)<1e-6&&Math.abs(v-k)<1e-6?n(t):(u=m-w,h=g-_,f=v-k,o=y*(f*=p=1/Math.sqrt(u*u+h*h+f*f))-x*(h*=p),a=x*(u*=p)-b*f,s=b*h-y*u,(p=Math.sqrt(o*o+a*a+s*s))?(o*=p=1/p,a*=p,s*=p):(o=0,a=0,s=0),l=h*s-f*a,c=f*o-u*s,d=u*a-h*o,(p=Math.sqrt(l*l+c*c+d*d))?(l*=p=1/p,c*=p,d*=p):(l=0,c=0,d=0),t[0]=o,t[1]=l,t[2]=u,t[3]=0,t[4]=a,t[5]=c,t[6]=h,t[7]=0,t[8]=s,t[9]=d,t[10]=f,t[11]=0,t[12]=-(o*m+a*g+s*v),t[13]=-(l*m+c*g+d*v),t[14]=-(u*m+h*g+f*v),t[15]=1,t)}},66760:t=>{t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=e[9],f=e[10],p=e[11],m=e[12],g=e[13],v=e[14],b=e[15],y=r[0],x=r[1],w=r[2],_=r[3];return t[0]=y*n+x*s+w*u+_*m,t[1]=y*i+x*l+w*h+_*g,t[2]=y*o+x*c+w*f+_*v,t[3]=y*a+x*d+w*p+_*b,y=r[4],x=r[5],w=r[6],_=r[7],t[4]=y*n+x*s+w*u+_*m,t[5]=y*i+x*l+w*h+_*g,t[6]=y*o+x*c+w*f+_*v,t[7]=y*a+x*d+w*p+_*b,y=r[8],x=r[9],w=r[10],_=r[11],t[8]=y*n+x*s+w*u+_*m,t[9]=y*i+x*l+w*h+_*g,t[10]=y*o+x*c+w*f+_*v,t[11]=y*a+x*d+w*p+_*b,y=r[12],x=r[13],w=r[14],_=r[15],t[12]=y*n+x*s+w*u+_*m,t[13]=y*i+x*l+w*h+_*g,t[14]=y*o+x*c+w*f+_*v,t[15]=y*a+x*d+w*p+_*b,t}},74040:t=>{t.exports=function(t,e,r,n,i,o,a){var s=1/(e-r),l=1/(n-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(a+o)*c,t[15]=1,t}},4772:t=>{t.exports=function(t,e,r,n,i){var o=1/Math.tan(e/2),a=1/(n-i);return t[0]=o/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*a,t[15]=0,t}},11882:t=>{t.exports=function(t,e,r,n){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(a+s),c=2/(i+o);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(a-s)*l*.5,t[9]=(i-o)*c*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t}},26079:t=>{t.exports=function(t,e,r,n){var i,o,a,s,l,c,d,u,h,f,p,m,g,v,b,y,x,w,_,k,A,T,M,S,C=n[0],E=n[1],L=n[2],z=Math.sqrt(C*C+E*E+L*L);return Math.abs(z)<1e-6?null:(C*=z=1/z,E*=z,L*=z,i=Math.sin(r),a=1-(o=Math.cos(r)),s=e[0],l=e[1],c=e[2],d=e[3],u=e[4],h=e[5],f=e[6],p=e[7],m=e[8],g=e[9],v=e[10],b=e[11],y=C*C*a+o,x=E*C*a+L*i,w=L*C*a-E*i,_=C*E*a-L*i,k=E*E*a+o,A=L*E*a+C*i,T=C*L*a+E*i,M=E*L*a-C*i,S=L*L*a+o,t[0]=s*y+u*x+m*w,t[1]=l*y+h*x+g*w,t[2]=c*y+f*x+v*w,t[3]=d*y+p*x+b*w,t[4]=s*_+u*k+m*A,t[5]=l*_+h*k+g*A,t[6]=c*_+f*k+v*A,t[7]=d*_+p*k+b*A,t[8]=s*T+u*M+m*S,t[9]=l*T+h*M+g*S,t[10]=c*T+f*M+v*S,t[11]=d*T+p*M+b*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}},15567:t=>{t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],d=e[9],u=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*n,t[5]=a*i+d*n,t[6]=s*i+u*n,t[7]=l*i+h*n,t[8]=c*i-o*n,t[9]=d*i-a*n,t[10]=u*i-s*n,t[11]=h*i-l*n,t}},52408:t=>{t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],a=e[1],s=e[2],l=e[3],c=e[8],d=e[9],u=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*n,t[1]=a*i-d*n,t[2]=s*i-u*n,t[3]=l*i-h*n,t[8]=o*n+c*i,t[9]=a*n+d*i,t[10]=s*n+u*i,t[11]=l*n+h*i,t}},27089:t=>{t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],a=e[1],s=e[2],l=e[3],c=e[4],d=e[5],u=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*n,t[1]=a*i+d*n,t[2]=s*i+u*n,t[3]=l*i+h*n,t[4]=c*i-o*n,t[5]=d*i-a*n,t[6]=u*i-s*n,t[7]=h*i-l*n,t}},62504:t=>{t.exports=function(t,e,r){var n=r[0],i=r[1],o=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},65213:t=>{t.exports=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}},77656:t=>{t.exports=function(t,e,r){var n,i,o,a,s,l,c,d,u,h,f,p,m=r[0],g=r[1],v=r[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*v+e[12],t[13]=e[1]*m+e[5]*g+e[9]*v+e[13],t[14]=e[2]*m+e[6]*g+e[10]*v+e[14],t[15]=e[3]*m+e[7]*g+e[11]*v+e[15]):(n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=e[9],f=e[10],p=e[11],t[0]=n,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=c,t[7]=d,t[8]=u,t[9]=h,t[10]=f,t[11]=p,t[12]=n*m+s*g+u*v+e[12],t[13]=i*m+l*g+h*v+e[13],t[14]=o*m+c*g+f*v+e[14],t[15]=a*m+d*g+p*v+e[15]),t}},45665:t=>{t.exports=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},69499:(t,e,r)=>{"use strict";var n=r(82393),i=r(9994),o=r(83029),a=r(6627),s=r(41456),l=r(34463),c=r(81937),d=r(31888),u=r(94698),h=r(35867),f=r(3202),p=r(70665),m=r(3812),g=r(34597),v=r(45250),b=r(97e3),y=r(88828).nextPow2,x=new s,w=!1;if(document.body){var _=document.body.appendChild(document.createElement("div"));_.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(_).fontStretch&&(w=!0),document.body.removeChild(_)}var k=function(t){!function(t){return"function"==typeof t&&t._gl&&t.prop&&t.texture&&t.buffer}(t)?this.gl=a(t):(t={regl:t},this.gl=t.regl._gl),this.shader=x.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||o({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),x.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(h(t)?t:{})};k.prototype.createShader=function(){var t=this.regl,e=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop("count"),offset:t.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this("sizeBuffer")},width:{offset:0,stride:8,buffer:t.this("sizeBuffer")},char:t.this("charBuffer"),position:t.this("position")},uniforms:{atlasSize:function(t,e){return[e.atlas.width,e.atlas.height]},atlasDim:function(t,e){return[e.atlas.cols,e.atlas.rows]},atlas:function(t,e){return e.atlas.texture},charStep:function(t,e){return e.atlas.step},em:function(t,e){return e.atlas.em},color:t.prop("color"),opacity:t.prop("opacity"),viewport:t.this("viewportArray"),scale:t.this("scale"),align:t.prop("align"),baseline:t.prop("baseline"),translate:t.this("translate"),positionOffset:t.prop("positionOffset")},primitive:"points",viewport:t.this("viewport"),vert:"\n\t\t\tprecision highp float;\n\t\t\tattribute float width, charOffset, char;\n\t\t\tattribute vec2 position;\n\t\t\tuniform float fontSize, charStep, em, align, baseline;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform vec4 color;\n\t\t\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvoid main () {\n\t\t\t\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\n\t\t\t\t\t+ vec2(positionOffset.x, -positionOffset.y)))\n\t\t\t\t\t/ (viewport.zw * scale.xy);\n\n\t\t\t\tvec2 position = (position + translate) * scale;\n\t\t\t\tposition += offset * scale;\n\n\t\t\t\tcharCoord = position * viewport.zw + viewport.xy;\n\n\t\t\t\tgl_Position = vec4(position * 2. - 1., 0, 1);\n\n\t\t\t\tgl_PointSize = charStep;\n\n\t\t\t\tcharId.x = mod(char, atlasDim.x);\n\t\t\t\tcharId.y = floor(char / atlasDim.x);\n\n\t\t\t\tcharWidth = width * em;\n\n\t\t\t\tfontColor = color / 255.;\n\t\t\t}",frag:"\n\t\t\tprecision highp float;\n\t\t\tuniform float fontSize, charStep, opacity;\n\t\t\tuniform vec2 atlasSize;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform sampler2D atlas;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\n\t\t\tfloat lightness(vec4 color) {\n\t\t\t\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\n\t\t\t}\n\n\t\t\tvoid main () {\n\t\t\t\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\n\t\t\t\tfloat halfCharStep = floor(charStep * .5 + .5);\n\n\t\t\t\t// invert y and shift by 1px (FF expecially needs that)\n\t\t\t\tuv.y = charStep - uv.y;\n\n\t\t\t\t// ignore points outside of character bounding box\n\t\t\t\tfloat halfCharWidth = ceil(charWidth * .5);\n\t\t\t\tif (floor(uv.x) > halfCharStep + halfCharWidth ||\n\t\t\t\t\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\n\n\t\t\t\tuv += charId * charStep;\n\t\t\t\tuv = uv / atlasSize;\n\n\t\t\t\tvec4 color = fontColor;\n\t\t\t\tvec4 mask = texture2D(atlas, uv);\n\n\t\t\t\tfloat maskY = lightness(mask);\n\t\t\t\t// float colorY = lightness(color);\n\t\t\t\tcolor.a *= maskY;\n\t\t\t\tcolor.a *= opacity;\n\n\t\t\t\t// color.a += .1;\n\n\t\t\t\t// antialiasing, see yiq color space y-channel formula\n\t\t\t\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n\n\t\t\t\tgl_FragColor = color;\n\t\t\t}"});return{regl:t,draw:e,atlas:{}}},k.prototype.update=function(t){var e=this;if("string"==typeof t)t={text:t};else if(!t)return;null!=(t=i(t,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0)).opacity&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map((function(t){return parseFloat(t)})):this.opacity=parseFloat(t.opacity)),null!=t.viewport&&(this.viewport=u(t.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=t.kerning&&(this.kerning=t.kerning),null!=t.offset&&("number"==typeof t.offset&&(t.offset=[t.offset,0]),this.positionOffset=b(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||t.font||(t.font=k.baseFontSize+"px sans-serif");var r,o=!1,a=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach((function(t,r){if("string"==typeof t)try{t=n.parse(t)}catch(e){t=n.parse(k.baseFontSize+"px "+t)}else{var i=t.style,s=t.weight,l=t.stretch,c=t.variant;t=n.parse(n.stringify(t)),i&&(t.style=i),s&&(t.weight=s),l&&(t.stretch=l),c&&(t.variant=c)}var d=n.stringify({size:k.baseFontSize,family:t.family,stretch:w?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style}),u=f(t.size),h=Math.round(u[0]*p(u[1]));if(h!==e.fontSize[r]&&(a=!0,e.fontSize[r]=h),!(e.font[r]&&d==e.font[r].baseString||(o=!0,e.font[r]=k.fonts[d],e.font[r]))){var m=t.family.join(", "),g=[t.style];t.style!=t.variant&&g.push(t.variant),t.variant!=t.weight&&g.push(t.weight),w&&t.weight!=t.stretch&&g.push(t.stretch),e.font[r]={baseString:d,family:m,weight:t.weight,stretch:t.stretch,style:t.style,variant:t.variant,width:{},kerning:{},metrics:v(m,{origin:"top",fontSize:k.baseFontSize,fontStyle:g.join(" ")})},k.fonts[d]=e.font[r]}})),(o||a)&&this.font.forEach((function(r,i){var o=n.stringify({size:e.fontSize[i],family:r.family,stretch:w?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(e.fontAtlas[i]=e.shader.atlas[o],!e.fontAtlas[i]){var a=r.metrics;e.shader.atlas[o]=e.fontAtlas[i]={fontString:o,step:2*Math.ceil(e.fontSize[i]*a.bottom*.5),em:e.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:e.regl.texture()}}null==t.text&&(t.text=e.text)})),"string"==typeof t.text&&t.position&&t.position.length>2){for(var s=Array(.5*t.position.length),h=0;h2){for(var _=!t.position[0].length,A=d.mallocFloat(2*this.count),T=0,M=0;T1?e.align[r]:e.align[0]:e.align;if("number"==typeof n)return n;switch(n){case"right":case"end":return-t;case"center":case"centre":case"middle":return.5*-t}return 0}))),null==this.baseline&&null==t.baseline&&(t.baseline=0),null!=t.baseline&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(t,r){var n=(e.font[r]||e.font[0]).metrics,i=0;return i+=.5*n.bottom,-1*(i+="number"==typeof t?t-n.baseline:-n[t])}))),null!=t.color)if(t.color||(t.color="transparent"),"string"!=typeof t.color&&isNaN(t.color)){var H;if("number"==typeof t.color[0]&&t.color.length>this.counts.length){var W=t.color.length;H=d.mallocUint8(W);for(var q=(t.color.subarray||t.color.slice).bind(t.color),Y=0;Y4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var $=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array($);for(var J=0;J1?this.counts[J]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[J]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*J,4*J+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[J]:this.opacity,baseline:null!=this.baselineOffset[J]?this.baselineOffset[J]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[J]?this.alignOffset[J]:this.alignOffset[0]:0,atlas:this.fontAtlas[J]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*J,2*J+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},k.prototype.destroy=function(){},k.prototype.kerning=!0,k.prototype.position={constant:new Float32Array(2)},k.prototype.translate=null,k.prototype.scale=null,k.prototype.font=null,k.prototype.text="",k.prototype.positionOffset=[0,0],k.prototype.opacity=1,k.prototype.color=new Uint8Array([0,0,0,255]),k.prototype.alignOffset=[0,0],k.maxAtlasSize=1024,k.atlasCanvas=document.createElement("canvas"),k.atlasContext=k.atlasCanvas.getContext("2d",{alpha:!1}),k.baseFontSize=64,k.fonts={},t.exports=k},6627:(t,e,r)=>{"use strict";var n=r(9994);function i(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*r.g.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*r.g.innerHeight);else{var e=t.container.getBoundingClientRect();t.canvas.width=t.width||e.right-e.left,t.canvas.height=t.height||e.bottom-e.top}}function o(t){return"function"==typeof t.getContext&&"width"in t&&"height"in t}function a(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}t.exports=function(t){var e;if(t?"string"==typeof t&&(t={container:t}):t={},(t=o(t)||"string"==typeof(e=t).nodeName&&"function"==typeof e.appendChild&&"function"==typeof e.getBoundingClientRect?{container:t}:function(t){return"function"==typeof t.drawArrays||"function"==typeof t.drawElements}(t)?{gl:t}:n(t,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0)).pixelRatio||(t.pixelRatio=r.g.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if("string"==typeof t.container){var s=document.querySelector(t.container);if(!s)throw Error("Element "+t.container+" is not found");t.container=s}o(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=a(),t.container.appendChild(t.canvas),i(t))}else if(!t.canvas){if("undefined"==typeof document)throw Error("Not DOM environment. Use headless-gl.");t.container=document.body||document.documentElement,t.canvas=a(),t.container.appendChild(t.canvas),i(t)}return t.gl||["webgl","experimental-webgl","webgl-experimental"].some((function(e){try{t.gl=t.canvas.getContext(e,t.attrs)}catch(t){}return t.gl})),t.gl}},43236:t=>{t.exports=function(t){"string"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n{"use strict";var n=r(59412)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},56885:(t,e,r)=>{"use strict";var n,i=r(41888);n="function"==typeof r.g.matchMedia?!r.g.matchMedia("(hover: none)").matches:i,t.exports=n},17520:(t,e,r)=>{"use strict";var n=r(41888);t.exports=n&&function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){t=!1}return t}()},20419:(t,e,r)=>{"use strict";var n=r(38232),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=i},39681:t=>{"use strict";var e={__proto__:null,foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof r)}},23266:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(93272);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},93272:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},15541:(t,e,r)=>{"use strict";var n=r(93272);t.exports=function(){return n()&&!!Symbol.toStringTag}},19942:(t,e,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(35366);t.exports=o.call(n,i)},23778:(t,e)=>{e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,l=(1<>1,d=-7,u=r?i-1:0,h=r?-1:1,f=t[e+u];for(u+=h,o=f&(1<<-d)-1,f>>=-d,d+=s;d>0;o=256*o+t[e+u],u+=h,d-=8);for(a=o&(1<<-d)-1,o>>=-d,d+=n;d>0;a=256*a+t[e+u],u+=h,d-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=c}return(f?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,l,c=8*o-i-1,d=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=d):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+u>=1?h/l:h*Math.pow(2,1-u))*l>=2&&(a++,l/=2),a+u>=d?(s=0,a=d):a+u>=1?(s=(e*l-1)*Math.pow(2,i),a+=u):(s=e*Math.pow(2,u-1)*Math.pow(2,i),a=0));i>=8;t[r+f]=255&s,f+=p,s/=256,i-=8);for(a=a<0;t[r+f]=255&a,f+=p,a/=256,c-=8);t[r+f-p]|=128*m}},9715:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},68007:(t,e,r)=>{"use strict";var n=r(15541)(),i=r(24310)("Object.prototype.toString"),o=function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===i(t)},a=function(t){return!!o(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,t.exports=s?o:a},41888:t=>{t.exports=!0},60245:t=>{"use strict";var e,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,e)}catch(t){t!==r&&(i=null)}else i=null;var o=/^\s*class\b/,a=function(t){try{var e=n.call(t);return o.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},l=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,d=!(0 in[,]),u=function(){return!1};if("object"==typeof document){var h=document.all;l.call(h)===l.call(document.all)&&(u=function(t){if((d||!t)&&(void 0===t||"object"==typeof t))try{var e=l.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=i?function(t){if(u(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{i(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(u(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return s(t);if(a(t))return!1;var e=l.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},74205:(t,e,r)=>{"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=r(15541)(),l=Object.getPrototypeOf;t.exports=function(t){if("function"!=typeof t)return!1;if(a.test(o.call(t)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(t);if(!l)return!1;if(void 0===n){var e=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(t){}}();n=!!e&&l(e)}return l(t)===n}},47691:t=>{"use strict";t.exports="undefined"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},12431:t=>{"use strict";t.exports=i,t.exports.isMobile=i,t.exports.default=i;const e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(t){t||(t={});let i=t.ua;if(i||"undefined"==typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"==typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!=typeof i)return!1;let o=e.test(i)&&!r.test(i)||!!t.tablet&&n.test(i);return!o&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(o=!0),o}},87266:t=>{"use strict";t.exports=function(t){return t!=t}},74858:(t,e,r)=>{"use strict";var n=r(61398),i=r(10781),o=r(87266),a=r(29419),s=r(50317),l=n(a(),Number);i(l,{getPolyfill:a,implementation:o,shim:s}),t.exports=l},29419:(t,e,r)=>{"use strict";var n=r(87266);t.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},50317:(t,e,r)=>{"use strict";var n=r(10781),i=r(29419);t.exports=function(){var t=i();return n(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},23754:t=>{"use strict";t.exports=function(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}},35867:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r;return"[object Object]"===e.call(t)&&(null===(r=Object.getPrototypeOf(t))||r===Object.getPrototypeOf({}))}},45219:t=>{"use strict";t.exports=function(t){for(var e,r=t.length,n=0;n13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},12611:t=>{"use strict";t.exports=function(t){return"string"==typeof t&&(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}},94179:(t,e,r)=>{"use strict";var n=r(17478);t.exports=function(t){return!!n(t)}},54387:t=>{"use strict";t.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},10024:t=>{var e={left:0,top:0};t.exports=function(t,r,n){r=r||t.currentTarget||t.srcElement,Array.isArray(n)||(n=[0,0]);var i,o=t.clientX||0,a=t.clientY||0,s=(i=r)===window||i===document||i===document.body?e:i.getBoundingClientRect();return n[0]=o-s.left,n[1]=a-s.top,n}},60613:function(t,e,r){var n;!function(i,o,a){o[i]=o[i]||function(){"use strict";var t,e,r,n=Object.prototype.toString,i="undefined"!=typeof setImmediate?function(t){return setImmediate(t)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(t,e,r,n){return Object.defineProperty(t,e,{value:r,writable:!0,configurable:!1!==n})}}catch(e){t=function(t,e,r){return t[e]=r,t}}function o(t,n){r.add(t,n),e||(e=i(r.drain))}function a(t){var e,r=typeof t;return null==t||"object"!=r&&"function"!=r||(e=t.then),"function"==typeof e&&e}function s(){for(var t=0;t0&&o(s,r))}catch(t){d.call(new h(r),t)}}}function d(t){var e=this;e.triggered||(e.triggered=!0,e.def&&(e=e.def),e.msg=t,e.state=2,e.chain.length>0&&o(s,e))}function u(t,e,r,n){for(var i=0;i{var e=Math.PI,r=s(120);function n(t,e,r,n){return["C",t,e,r,n,r,n]}function i(t,e,r,n,i,o){return["C",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,o/3+2/3*n,i,o]}function o(t,n,i,s,l,c,d,u,h,f){if(f)k=f[0],A=f[1],w=f[2],_=f[3];else{var p=a(t,n,-l);t=p.x,n=p.y;var m=(t-(u=(p=a(u,h,-l)).x))/2,g=(n-(h=p.y))/2,v=m*m/(i*i)+g*g/(s*s);v>1&&(i*=v=Math.sqrt(v),s*=v);var b=i*i,y=s*s,x=(c==d?-1:1)*Math.sqrt(Math.abs((b*y-b*g*g-y*m*m)/(b*g*g+y*m*m)));x==1/0&&(x=1);var w=x*i*g/s+(t+u)/2,_=x*-s*m/i+(n+h)/2,k=Math.asin(((n-_)/s).toFixed(9)),A=Math.asin(((h-_)/s).toFixed(9));(k=tA&&(k-=2*e),!d&&A>k&&(A-=2*e)}if(Math.abs(A-k)>r){var T=A,M=u,S=h;A=k+r*(d&&A>k?1:-1);var C=o(u=w+i*Math.cos(A),h=_+s*Math.sin(A),i,s,l,0,d,M,S,[A,T,w,_])}var E=Math.tan((A-k)/4),L=4/3*i*E,z=4/3*s*E,O=[2*t-(t+L*Math.sin(k)),2*n-(n-z*Math.cos(k)),u+L*Math.sin(A),h-z*Math.cos(A),u,h];if(f)return O;C&&(O=O.concat(C));for(var D=0;D7&&(r.push(v.splice(0,7)),v.unshift("C"));break;case"S":var y=f,x=p;"C"!=e&&"S"!=e||(y+=y-a,x+=x-l),v=["C",y,x,v[1],v[2],v[3],v[4]];break;case"T":"Q"==e||"T"==e?(u=2*f-u,h=2*p-h):(u=f,h=p),v=i(f,p,u,h,v[1],v[2]);break;case"Q":u=v[1],h=v[2],v=i(f,p,v[1],v[2],v[3],v[4]);break;case"L":v=n(f,p,v[1],v[2]);break;case"H":v=n(f,p,v[1],p);break;case"V":v=n(f,p,f,v[1]);break;case"Z":v=n(f,p,c,d)}e=b,f=v[v.length-2],p=v[v.length-1],v.length>4?(a=v[v.length-4],l=v[v.length-3]):(a=f,l=p),r.push(v)}return r}},34597:t=>{"use strict";var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,i){for(var o,a,s=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l{"use strict";var e=function(t){return t!=t};t.exports=function(t,r){return 0===t&&0===r?1/t==1/r:t===r||!(!e(t)||!e(r))}},62956:(t,e,r)=>{"use strict";var n=r(10781),i=r(61398),o=r(36560),a=r(43765),s=r(6723),l=i(a(),Object);n(l,{getPolyfill:a,implementation:o,shim:s}),t.exports=l},43765:(t,e,r)=>{"use strict";var n=r(36560);t.exports=function(){return"function"==typeof Object.is?Object.is:n}},6723:(t,e,r)=>{"use strict";var n=r(43765),i=r(10781);t.exports=function(){var t=n();return i(Object,{is:t},{is:function(){return Object.is!==t}}),t}},77908:(t,e,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=r(12724),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),d=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(t){var e=t.constructor;return e&&e.prototype===t},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!h["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{u(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===o.call(t),n=a(t),s=e&&"[object String]"===o.call(t),h=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=c&&r;if(s&&t.length>0&&!i.call(t,0))for(var m=0;m0)for(var g=0;g{"use strict";var n=Array.prototype.slice,i=r(12724),o=Object.keys,a=o?function(t){return o(t)}:r(77908),s=Object.keys;a.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return i(t)?s(n.call(t)):s(t)})}else Object.keys=a;return Object.keys||a},t.exports=a},12724:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},99864:(t,e,r)=>{"use strict";var n=r(99952),i=r(93272)(),o=r(24310),a=Object,s=o("Array.prototype.push"),l=o("Object.prototype.propertyIsEnumerable"),c=i?Object.getOwnPropertySymbols:null;t.exports=function(t,e){if(null==t)throw new TypeError("target must be an object");var r=a(t);if(1===arguments.length)return r;for(var o=1;o{"use strict";var n=r(99864);t.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),r={},n=0;n{"use strict";function e(t,e){if("string"!=typeof t)return[t];var r=[t];"string"==typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var n=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],i=e.escape||"___",o=!!e.flat;n.forEach((function(t){var e=new RegExp(["\\",t[0],"[^\\",t[0],"\\",t[1],"]*\\",t[1]].join("")),n=[];function o(e,o,a){var s=r.push(e.slice(t[0].length,-t[1].length))-1;return n.push(s),i+s+i}r.forEach((function(t,n){for(var i,a=0;t!=i;)if(i=t,t=t.replace(e,o),a++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=t})),n=n.reverse(),r=r.map((function(e){return n.forEach((function(r){e=e.replace(new RegExp("(\\"+i+r+"\\"+i+")","g"),t[0]+"$1"+t[1])})),e}))}));var a=new RegExp("\\"+i+"([0-9]+)\\"+i);return o?r:function t(e,r,n){for(var i,o=[],s=0;i=a.exec(e);){if(s++>1e4)throw Error("Circular references in parenthesis");o.push(e.slice(0,i.index)),o.push(t(r[i[1]],r)),e=e.slice(i.index+i[0].length)}return o.push(e),o}(r[0],r)}function r(t,e){if(e&&e.flat){var r,n=e&&e.escape||"___",i=t[0];if(!i)return"";for(var o=new RegExp("\\"+n+"([0-9]+)\\"+n),a=0;i!=r;){if(a++>1e4)throw Error("Circular references in "+t);r=i,i=i.replace(o,s)}return i}return t.reduce((function t(e,r){return Array.isArray(r)&&(r=r.reduce(t,"")),e+r}),"");function s(e,r){if(null==t[r])throw Error("Reference "+r+"is undefined");return t[r]}}function n(t,n){return Array.isArray(t)?r(t,n):e(t,n)}n.parse=e,n.stringify=r,t.exports=n},94698:(t,e,r)=>{"use strict";var n=r(9994);t.exports=function(t){var e;return arguments.length>1&&(t=arguments),"string"==typeof t?t=t.split(/\s/).map(parseFloat):"number"==typeof t&&(t=[t]),t.length&&"number"==typeof t[0]?e=1===t.length?{width:t[0],height:t[0],x:0,y:0}:2===t.length?{width:t[0],height:t[1],x:0,y:0}:{x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&&(e={x:(t=n(t,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"})).left||0,y:t.top||0},null==t.width?t.right?e.width=t.right-e.x:e.width=0:e.width=t.width,null==t.height?t.bottom?e.height=t.bottom-e.y:e.height=0:e.height=t.height),e}},37974:t=>{t.exports=function(t){var i=[];return t.replace(r,(function(t,r,o){var a=r.toLowerCase();for(o=function(t){var e=t.match(n);return e?e.map(Number):[]}(o),"m"==a&&o.length>2&&(i.push([r].concat(o.splice(0,2))),a="l",r="m"==r?"l":"L");;){if(o.length==e[a])return o.unshift(r),i.push(o);if(o.length{t.exports=function(t,e){e||(e=[0,""]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},9994:t=>{"use strict";t.exports=function(t,e,n){var i,o,a={};if("string"==typeof e&&(e=r(e)),Array.isArray(e)){var s={};for(o=0;o{"use strict";var n=r(12822),i={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var o in i){var a=o.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(a,i[o])}},12028:(t,e,r)=>{"use strict";t.exports=r(7623)},72010:(t,e,r)=>{"use strict";t.exports=r(46443)},94646:(t,e,r)=>{"use strict";t.exports=r(88479)},91208:t=>{"use strict";t.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},77061:(t,e,r)=>{"use strict";var n=r(91208),i=r(75058),o=r(21197),a=r(46121).templatedArray,s=r(53644);function l(t){return["In order for absolute positioning of the arrow to work, *a"+t+"ref* must be exactly the same as *"+t+"ref*, otherwise *a"+t+"ref* will revert to *pixel* (explained next).","For relative positioning, *a"+t+"ref* can be set to *pixel*,","in which case the *a"+t+"* value is specified in pixels","relative to *"+t+"*.","Absolute positioning is useful","for trendline annotations which should continue to indicate","the correct trend when zoomed. Relative positioning is useful","for specifying the text offset for an annotated point."].join(" ")}function c(t,e,r){return["Sets the",t,"component of the arrow tail about the arrow head.","If `a"+t+"ref` is `pixel`, a positive (negative)","component corresponds to an arrow pointing","from",r,"to",e,"("+e,"to",r+").","If `a"+t+"ref` is not `pixel` and is exactly the same as `"+t+"ref`,","this is an absolute value on that axis,","like `"+t+"`, specified in the same coordinates as `"+t+"ref`."].join(" ")}t.exports=a("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not this annotation is visible."].join(" ")},text:{valType:"string",editType:"calc+arraydraw",description:["Sets the text associated with this annotation.","Plotly uses a subset of HTML tags to do things like","newline (
), bold (), italics (),","hyperlinks (). Tags , , "," are also supported."].join(" ")},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw",description:["Sets the angle at which the `text` is drawn","with respect to the horizontal."].join(" ")},font:i({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the annotation text font."}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit width for the text box. null (default) lets the","text set the box width. Wider text will be clipped.","There is no automatic wrapping; use
to start a new line."].join(" ")},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit height for the text box. null (default) lets the","text set the box height. Taller text will be clipped."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the annotation (text + arrow)."},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw",description:["Sets the horizontal alignment of the `text` within the box.","Has an effect only if `text` spans two or more lines","(i.e. `text` contains one or more
HTML tags) or if an","explicit width is set to override the text width."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw",description:["Sets the vertical alignment of the `text` within the box.","Has an effect only if an explicit height is set to override","the text height."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:"Sets the background color of the annotation."},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color of the border enclosing the annotation `text`."].join(" ")},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the padding (in px) between the `text`","and the enclosing border."].join(" ")},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the width (in px) of the border enclosing","the annotation `text`."].join(" ")},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not the annotation is drawn with an arrow.","If *true*, `text` is placed near the arrow's tail.","If *false*, `text` lines up with the `x` and `y` provided."].join(" ")},arrowcolor:{valType:"color",editType:"arraydraw",description:"Sets the color of the annotation arrow."},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw",description:"Sets the start annotation arrow head style."},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw",description:"Sets the annotation arrow head position."},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the end annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the start annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw",description:"Sets the width (in px) of annotation arrow line."},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the end arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the start arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},ax:{valType:"any",editType:"calc+arraydraw",description:[c("x","left","right")].join(" ")},ay:{valType:"any",editType:"calc+arraydraw",description:[c("y","top","bottom")].join(" ")},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.x.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",s.axisRefDescription("x","left","right"),l("x")].join(" ")},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.y.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",s.axisRefDescription("y","bottom","top"),l("y")].join(" ")},xref:{valType:"enumerated",values:["paper",o.idRegex.x.toString()],editType:"calc",description:["Sets the annotation's x coordinate axis.",s.axisRefDescription("x","left","right")].join(" ")},x:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's x position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's horizontal position anchor","This anchor binds the `x` position to the *left*, *center*","or *right* of the annotation.","For example, if `x` is set to 1, `xref` to *paper* and","`xanchor` to *right* then the right-most portion of the","annotation lines up with the right-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *center* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow to the","right (positive) or left (negative) by this many pixels."].join(" ")},yref:{valType:"enumerated",values:["paper",o.idRegex.y.toString()],editType:"calc",description:["Sets the annotation's y coordinate axis.",s.axisRefDescription("y","bottom","top")].join(" ")},y:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's y position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the annotation.","For example, if `y` is set to 1, `yref` to *paper* and","`yanchor` to *top* then the top-most portion of the","annotation lines up with the top-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *middle* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow up","(positive) or down (negative) by this many pixels."].join(" ")},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw",description:["Makes this annotation respond to clicks on the plot.","If you click a data point that exactly matches the `x` and `y`","values of this annotation, and it is hidden (visible: false),","it will appear. In *onoff* mode, you must click the same point","again to make it disappear, so if you click multiple points,","you can show multiple annotations. In *onout* mode, a click","anywhere else in the plot (on another data point or not) will","hide this annotation.","If you need to show/hide this annotation in response to different","`x` or `y` values, you can set `xclick` and/or `yclick`. This is","useful for example to label the side of a bar. To label markers","though, `standoff` is preferred over `xclick` and `yclick`."].join(" ")},xclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `x` value","is `xclick` rather than the annotation's `x` value."].join(" ")},yclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `y` value","is `yclick` rather than the annotation's `y` value."].join(" ")},hovertext:{valType:"string",editType:"arraydraw",description:["Sets text to appear when hovering over this annotation.","If omitted or blank, no hover label will appear."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw",description:["Sets the background color of the hover label.","By default uses the annotation's `bgcolor` made opaque,","or white if it was transparent."].join(" ")},bordercolor:{valType:"color",editType:"arraydraw",description:["Sets the border color of the hover label.","By default uses either dark grey or white, for maximum","contrast with `hoverlabel.bgcolor`."].join(" ")},font:i({editType:"arraydraw",description:["Sets the hover label text font.","By default uses the global hover font and size,","with color from `hoverlabel.bordercolor`."].join(" ")}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw",description:["Determines whether the annotation text box captures mouse move","and click events, or allows those events to pass through to data","points in the plot that may be behind the annotation. By default","`captureevents` is *false* unless `hovertext` is provided.","If you use the event `plotly_clickannotation` without `hovertext`","you must explicitly enable `captureevents`."].join(" ")},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc",description:["Obsolete. Set `xref` and `yref` separately instead."].join(" ")}}})},37830:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(8214).draw;function a(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach((function(e){var r=i.getFromId(t,e.xref),n=i.getFromId(t,e.yref),o=i.getRefType(e.xref),a=i.getRefType(e.yref);e._extremes={},"range"===o&&s(e,r),"range"===a&&s(e,n)}))}function s(t,e){var r,n=e._id,o=n.charAt(0),a=t[o],s=t["a"+o],l=t[o+"ref"],c=t["a"+o+"ref"],d=t["_"+o+"padplus"],u=t["_"+o+"padminus"],h={x:1,y:-1}[o]*t[o+"shift"],f=3*t.arrowsize*t.arrowwidth||0,p=f+h,m=f-h,g=3*t.startarrowsize*t.arrowwidth||0,v=g+h,b=g-h;if(c===l){var y=i.findExtremes(e,[e.r2c(a)],{ppadplus:p,ppadminus:m}),x=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(d,v),ppadminus:Math.max(u,b)});r={min:[y.min[0],x.min[0]],max:[y.max[0],x.max[0]]}}else v=s?v+s:v,b=s?b-s:b,r=i.findExtremes(e,[e.r2c(a)],{ppadplus:Math.max(d,p,v),ppadminus:Math.max(u,m,b)});t._extremes[n]=r}t.exports=function(t){var e=t._fullLayout;if(n.filterVisible(e.annotations).length&&t._fullData.length)return n.syncOrAsync([o,a],t)}},74434:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059),o=r(46121).arrayEditor;function a(t,e){var r,n,i,o,a,l,c,d=t._fullLayout.annotations,u=[],h=[],f=[],p=(e||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(t,e){var r,s,l=a(t,e),c=l.on,d=l.off.concat(l.explicitOff),u={},h=t._fullLayout.annotations;if(c.length||d.length){for(r=0;r{"use strict";var n=r(12822),i=r(17499);t.exports=function(t,e,r,o){o("opacity");var a=o("bgcolor"),s=o("bordercolor"),l=i.opacity(s);o("borderpad");var c=o("borderwidth"),d=o("showarrow");if(o("text",d?" ":r._dfltTitle.annotation),o("textangle"),n.coerceFont(o,"font",r.font),o("width"),o("align"),o("height")&&o("valign"),d){var u,h,f=o("arrowside");-1!==f.indexOf("end")&&(u=o("arrowhead"),h=o("arrowsize")),-1!==f.indexOf("start")&&(o("startarrowhead",u),o("startarrowsize",h)),o("arrowcolor",l?e.bordercolor:i.defaultLine),o("arrowwidth",2*(l&&c||1)),o("standoff"),o("startstandoff")}var p=o("hovertext"),m=r.hoverlabel||{};if(p){var g=o("hoverlabel.bgcolor",m.bgcolor||(i.opacity(a)?i.rgb(a):i.defaultLine)),v=o("hoverlabel.bordercolor",m.bordercolor||i.contrast(g)),b=n.extendFlat({},m.font);b.color||(b.color=v),n.coerceFont(o,"hoverlabel.font",b)}o("captureevents",!!p)}},44102:(t,e,r)=>{"use strict";var n=r(7370),i=r(61814);t.exports=function(t,e,r,o){e=e||{};var a="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(a||s)for(var l,c,d=t._fullLayout.annotations,u=e._id.charAt(0),h=0;h{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(35486),s=r(77061);function l(t,e,r){function o(r,i){return n.coerce(t,e,s,r,i)}var l=o("visible"),c=o("clicktoshow");if(l||c){a(t,e,r,o);for(var d=e.showarrow,u=["x","y"],h=[-10,-30],f={_fullLayout:r},p=0;p<2;p++){var m=u[p],g=i.coerceRef(t,e,f,m,"","paper");if("paper"!==g&&i.getFromId(f,g)._annIndices.push(e._index),i.coercePosition(e,f,o,g,m,.5),d){var v="a"+m,b=i.coerceRef(t,e,f,v,"pixel",["pixel","paper"]);"pixel"!==b&&b!==g&&(b=e[v]="pixel");var y="pixel"===b?h[p]:.4;i.coercePosition(e,f,o,b,v,y)}o(m+"anchor"),o(m+"shift")}if(n.noneOrAll(t,e,["x","y"]),d&&n.noneOrAll(t,e,["ax","ay"]),c){var x=o("xclick"),w=o("yclick");e._xclick=void 0===x?e.x:i.cleanPosition(x,f,e.xref),e._yclick=void 0===w?e.y:i.cleanPosition(w,f,e.yref)}}}t.exports=function(t,e){o(t,e,{name:"annotations",handleItemDefaults:l})}},8214:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(51137),a=r(12822),s=a.strTranslate,l=r(75815),c=r(17499),d=r(40666),u=r(70410),h=r(80394),f=r(76292),p=r(19846),m=r(46121).arrayEditor,g=r(65753);function v(t,e){var r=t._fullLayout.annotations[e]||{},n=l.getFromId(t,r.xref),i=l.getFromId(t,r.yref);n&&n.setScale(),i&&i.setScale(),y(t,r,e,!1,n,i)}function b(t,e,r,n,i){var o=i[r],a=i[r+"ref"],s=-1!==r.indexOf("y"),c="domain"===l.getRefType(a),d=s?n.h:n.w;return t?c?o+(s?-e:e)/t._length:t.p2r(t.r2p(o)+e):o+(s?-e:e)/d}function y(t,e,r,o,v,y){var x,w,_=t._fullLayout,k=t._fullLayout._size,A=t._context.edits;o?(x="annotation-"+o,w=o+".annotations"):(x="annotation",w="annotations");var T=m(t.layout,w,e),M=T.modifyBase,S=T.modifyItem,C=T.getUpdateObj;_._infolayer.selectAll("."+x+'[data-index="'+r+'"]').remove();var E="clip"+_._uid+"_ann"+r;if(e._input&&!1!==e.visible){var L={x:{},y:{}},z=+e.textangle||0,O=_._infolayer.append("g").classed(x,!0).attr("data-index",String(r)).style("opacity",e.opacity),D=O.append("g").classed("annotation-text-g",!0),I=A[e.showarrow?"annotationTail":"annotationPosition"],R=e.captureevents||A.annotationText||I,F=D.append("g").style("pointer-events",R?"all":null).call(f,"pointer").on("click",(function(){t._dragging=!1,t.emit("plotly_clickannotation",q(n.event))}));e.hovertext&&F.on("mouseover",(function(){var r=e.hoverlabel,n=r.font,i=this.getBoundingClientRect(),o=t.getBoundingClientRect();u.loneHover({x0:i.left-o.left,x1:i.right-o.left,y:(i.top+i.bottom)/2-o.top,text:e.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:t})})).on("mouseout",(function(){u.loneUnhover(_._hoverlayer.node())}));var P=e.borderwidth,j=e.borderpad,N=P+j,B=F.append("rect").attr("class","bg").style("stroke-width",P+"px").call(c.stroke,e.bordercolor).call(c.fill,e.bgcolor),U=e.width||e.height,G=_._topclips.selectAll("#"+E).data(U?[0]:[]);G.enter().append("clipPath").classed("annclip",!0).attr("id",E).append("rect"),G.exit().remove();var V=e.font,H=_._meta?a.templateString(e.text,_._meta):e.text,W=F.append("text").classed("annotation-text",!0).text(H);A.annotationText?W.call(h.makeEditable,{delegate:F,gd:t}).call(Y).on("edit",(function(r){e.text=r,this.call(Y),S("text",r),v&&v.autorange&&M(v._name+".autorange",!0),y&&y.autorange&&M(y._name+".autorange",!0),i.call("_guiRelayout",t,C())})):W.call(Y)}else n.selectAll("#"+E).remove();function q(t){var n={index:r,annotation:e._input,fullAnnotation:e,event:t};return o&&(n.subplotId=o),n}function Y(r){return r.call(d.font,V).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),h.convertToTspans(r,t,Z),r}function Z(){var r=W.selectAll("a");1===r.size()&&r.text()===W.text()&&F.insert("a",":first-child").attr({"xlink:xlink:href":r.attr("xlink:href"),"xlink:xlink:show":r.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(B.node());var n=F.select(".annotation-text-math-group"),u=!n.empty(),m=d.bBox((u?n:W).node()),x=m.width,w=m.height,T=e.width||x,R=e.height||w,j=Math.round(T+2*N),V=Math.round(R+2*N);function H(t,e){return"auto"===e&&(e=t<1/3?"left":t>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var Y=!1,Z=["x","y"],X=0;X1)&&(nt===rt?((ft=it.r2fraction(e["a"+et]))<0||ft>1)&&(Y=!0):Y=!0),$=it._offset+it.r2p(e[et]),Q=.5}else{var pt="domain"===ht;"x"===et?(K=e[et],$=pt?it._offset+it._length*K:$=k.l+k.w*K):(K=1-e[et],$=pt?it._offset+it._length*K:$=k.t+k.h*K),Q=e.showarrow?.5:K}if(e.showarrow){ut.head=$;var mt=e["a"+et];if(tt=at*H(.5,e.xanchor)-st*H(.5,e.yanchor),nt===rt){var gt=l.getRefType(nt);"domain"===gt?("y"===et&&(mt=1-mt),ut.tail=it._offset+it._length*mt):"paper"===gt?"y"===et?(mt=1-mt,ut.tail=k.t+k.h*mt):ut.tail=k.l+k.w*mt:ut.tail=it._offset+it.r2p(mt),J=tt}else ut.tail=$+mt,J=tt+mt;ut.text=ut.tail+tt;var vt=_["x"===et?"width":"height"];if("paper"===rt&&(ut.head=a.constrain(ut.head,1,vt-1)),"pixel"===nt){var bt=-Math.max(ut.tail-3,ut.text),yt=Math.min(ut.tail+3,ut.text)-vt;bt>0?(ut.tail+=bt,ut.text+=bt):yt>0&&(ut.tail-=yt,ut.text-=yt)}ut.tail+=dt,ut.head+=dt}else J=tt=lt*H(Q,ct),ut.text=$+tt;ut.text+=dt,tt+=dt,J+=dt,e["_"+et+"padplus"]=lt/2+J,e["_"+et+"padminus"]=lt/2-J,e["_"+et+"size"]=lt,e["_"+et+"shift"]=tt}if(Y)F.remove();else{var xt=0,wt=0;if("left"!==e.align&&(xt=(T-x)*("center"===e.align?.5:1)),"top"!==e.valign&&(wt=(R-w)*("middle"===e.valign?.5:1)),u)n.select("svg").attr({x:N+xt-1,y:N+wt}).call(d.setClipUrl,U?E:null,t);else{var _t=N+wt-m.top,kt=N+xt-m.left;W.call(h.positionText,kt,_t).call(d.setClipUrl,U?E:null,t)}G.select("rect").call(d.setRect,N,N,T,R),B.call(d.setRect,P/2,P/2,j-P,V-P),F.call(d.setTranslate,Math.round(L.x.text-j/2),Math.round(L.y.text-V/2)),D.attr({transform:"rotate("+z+","+L.x.text+","+L.y.text+")"});var At,Tt=function(r,n){O.selectAll(".annotation-arrow-g").remove();var l=L.x.head,u=L.y.head,h=L.x.tail+r,f=L.y.tail+n,m=L.x.text+r,x=L.y.text+n,w=a.rotationXYMatrix(z,m,x),_=a.apply2DTransform(w),T=a.apply2DTransform2(w),E=+B.attr("width"),I=+B.attr("height"),R=m-.5*E,P=R+E,j=x-.5*I,N=j+I,U=[[R,j,R,N],[R,N,P,N],[P,N,P,j],[P,j,R,j]].map(T);if(!U.reduce((function(t,e){return t^!!a.segmentsIntersect(l,u,l+1e6,u+1e6,e[0],e[1],e[2],e[3])}),!1)){U.forEach((function(t){var e=a.segmentsIntersect(h,f,l,u,t[0],t[1],t[2],t[3]);e&&(h=e.x,f=e.y)}));var G=e.arrowwidth,V=e.arrowcolor,H=e.arrowside,W=O.append("g").style({opacity:c.opacity(V)}).classed("annotation-arrow-g",!0),q=W.append("path").attr("d","M"+h+","+f+"L"+l+","+u).style("stroke-width",G+"px").call(c.stroke,c.rgb(V));if(g(q,H,e),A.annotationPosition&&q.node().parentNode&&!o){var Y=l,Z=u;if(e.standoff){var X=Math.sqrt(Math.pow(l-h,2)+Math.pow(u-f,2));Y+=e.standoff*(h-l)/X,Z+=e.standoff*(f-u)/X}var $,J,K=W.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(h-Y)+","+(f-Z),transform:s(Y,Z)}).style("stroke-width",G+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)");p.init({element:K.node(),gd:t,prepFn:function(){var t=d.getTranslate(F);$=t.x,J=t.y,v&&v.autorange&&M(v._name+".autorange",!0),y&&y.autorange&&M(y._name+".autorange",!0)},moveFn:function(t,r){var n=_($,J),i=n[0]+t,o=n[1]+r;F.call(d.setTranslate,i,o),S("x",b(v,t,"x",k,e)),S("y",b(y,r,"y",k,e)),e.axref===e.xref&&S("ax",b(v,t,"ax",k,e)),e.ayref===e.yref&&S("ay",b(y,r,"ay",k,e)),W.attr("transform",s(t,r)),D.attr({transform:"rotate("+z+","+i+","+o+")"})},doneFn:function(){i.call("_guiRelayout",t,C());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};e.showarrow&&Tt(0,0),I&&p.init({element:F.node(),gd:t,prepFn:function(){At=D.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?S("ax",b(v,t,"ax",k,e)):S("ax",e.ax+t),e.ayref===e.yref?S("ay",b(y,r,"ay",k.w,e)):S("ay",e.ay+r),Tt(t,r);else{if(o)return;var i,a;if(v)i=b(v,t,"x",k,e);else{var l=e._xsize/k.w,c=e.x+(e._xshift-e.xshift)/k.w-l/2;i=p.align(c+t/k.w,l,0,1,e.xanchor)}if(y)a=b(y,r,"y",k,e);else{var d=e._ysize/k.h,u=e.y-(e._yshift+e.yshift)/k.h-d/2;a=p.align(u-r/k.h,d,0,1,e.yanchor)}S("x",i),S("y",a),v&&y||(n=p.getCursor(v?.5:i,y?.5:a,e.xanchor,e.yanchor))}D.attr({transform:s(t,r)+At}),f(F,n)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",q(n))},doneFn:function(){f(F),i.call("_guiRelayout",t,C());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}}t.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r{"use strict";var n=r(27941),i=r(17499),o=r(91208),a=r(12822),s=a.strScale,l=a.strRotate,c=a.strTranslate;t.exports=function(t,e,r){var a,d,u,h,f=t.node(),p=o[r.arrowhead||0],m=o[r.startarrowhead||0],g=(r.arrowwidth||1)*(r.arrowsize||1),v=(r.arrowwidth||1)*(r.startarrowsize||1),b=e.indexOf("start")>=0,y=e.indexOf("end")>=0,x=p.backoff*g+r.standoff,w=m.backoff*v+r.startstandoff;if("line"===f.nodeName){a={x:+t.attr("x1"),y:+t.attr("y1")},d={x:+t.attr("x2"),y:+t.attr("y2")};var _=a.x-d.x,k=a.y-d.y;if(h=(u=Math.atan2(k,_))+Math.PI,x&&w&&x+w>Math.sqrt(_*_+k*k))return void I();if(x){if(x*x>_*_+k*k)return void I();var A=x*Math.cos(u),T=x*Math.sin(u);d.x+=A,d.y+=T,t.attr({x2:d.x,y2:d.y})}if(w){if(w*w>_*_+k*k)return void I();var M=w*Math.cos(u),S=w*Math.sin(u);a.x-=M,a.y-=S,t.attr({x1:a.x,y1:a.y})}}else if("path"===f.nodeName){var C=f.getTotalLength(),E="";if(C{"use strict";var n=r(8214),i=r(74434);t.exports={moduleType:"component",name:"annotations",layoutAttributes:r(77061),supplyLayoutDefaults:r(26194),includeBasePlot:r(39859)("annotations"),calcAutorange:r(37830),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:r(44102)}},98368:(t,e,r)=>{"use strict";var n=r(77061),i=r(62309).overrideAll,o=r(46121).templatedArray;t.exports=i(o("annotation",{visible:n.visible,x:{valType:"any",description:["Sets the annotation's x position."].join(" ")},y:{valType:"any",description:["Sets the annotation's y position."].join(" ")},z:{valType:"any",description:["Sets the annotation's z position."].join(" ")},ax:{valType:"number",description:["Sets the x component of the arrow tail about the arrow head (in pixels)."].join(" ")},ay:{valType:"number",description:["Sets the y component of the arrow tail about the arrow head (in pixels)."].join(" ")},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents}),"calc","from-root")},81030:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815);function o(t,e){var r=e.fullSceneLayout.domain,o=e.fullLayout._size,a={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};t._xa={},n.extendFlat(t._xa,a),i.setConvert(t._xa),t._xa._offset=o.l+r.x[0]*o.w,t._xa.l2p=function(){return.5*(1+t._pdata[0]/t._pdata[3])*o.w*(r.x[1]-r.x[0])},t._ya={},n.extendFlat(t._ya,a),i.setConvert(t._ya),t._ya._offset=o.t+(1-r.y[1])*o.h,t._ya.l2p=function(){return.5*(1-t._pdata[1]/t._pdata[3])*o.h*(r.y[1]-r.y[0])}}t.exports=function(t){for(var e=t.fullSceneLayout.annotations,r=0;r{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(35486),s=r(98368);function l(t,e,r,o){function l(r,i){return n.coerce(t,e,s,r,i)}function c(t){var n=t+"axis",o={_fullLayout:{}};return o._fullLayout[n]=r[n],i.coercePosition(e,o,l,t,t,.5)}l("visible")&&(a(t,e,o.fullLayout,l),c("x"),c("y"),c("z"),n.noneOrAll(t,e,["x","y","z"]),e.xref="x",e.yref="y",e.zref="z",l("xanchor"),l("yanchor"),l("xshift"),l("yshift"),e.showarrow&&(e.axref="pixel",e.ayref="pixel",l("ax",-10),l("ay",-30),n.noneOrAll(t,e,["ax","ay"])))}t.exports=function(t,e,r){o(t,e,{name:"annotations",handleItemDefaults:l,fullLayout:r.fullLayout})}},86191:(t,e,r)=>{"use strict";var n=r(8214).drawRaw,i=r(40747),o=["x","y","z"];t.exports=function(t){for(var e=t.fullSceneLayout,r=t.dataScale,a=e.annotations,s=0;s1){c=!0;break}}c?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+s+'"]').remove():(l._pdata=i(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},95997:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822);t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(98368)}}},layoutAttributes:r(98368),handleDefaults:r(76023),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(r)for(var o=r.attrRegex,a=Object.keys(t),s=0;s{"use strict";e.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],e.defaultLine="#444",e.lightLine="#eee",e.background="#fff",e.borderLine="#BEC8D9",e.lightFraction=1e3/11},17499:(t,e,r)=>{"use strict";var n=r(18106),i=r(7370),o=r(98507).isTypedArray,a=t.exports={},s=r(84226);a.defaults=s.defaults;var l=a.defaultLine=s.defaultLine;a.lightLine=s.lightLine;var c=a.background=s.background;function d(t){if(i(t)||"string"!=typeof t)return t;var e=t.trim();if("rgb"!==e.substr(0,3))return t;var r=e.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return t;var n=r[1].trim().split(/\s*[\s,]\s*/),o="a"===e.charAt(3)&&4===n.length;if(!o&&3!==n.length)return t;for(var a=0;a=0))return t;if(3===a)n[a]>1&&(n[a]=1);else if(n[a]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return o?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}a.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},a.rgb=function(t){return a.tinyRGB(n(t))},a.opacity=function(t){return t?n(t).getAlpha():0},a.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},a.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||c).toRgb(),o=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},a={r:o.r*(1-r.a)+r.r*r.a,g:o.g*(1-r.a)+r.g*r.a,b:o.b*(1-r.a)+r.b*r.a};return n(a).toRgbString()},a.interpolate=function(t,e,r){var i=n(t).toRgb(),o=n(e).toRgb(),a={r:r*i.r+(1-r)*o.r,g:r*i.g+(1-r)*o.g,b:r*i.b+(1-r)*o.b};return n(a).toRgbString()},a.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(a.combine(t,c))),(i.isDark()?e?i.lighten(e):c:r?i.darken(r):l).toString()},a.stroke=function(t,e){var r=n(e);t.style({stroke:a.tinyRGB(r),"stroke-opacity":r.getAlpha()})},a.fill=function(t,e){var r=n(e);t.style({fill:a.tinyRGB(r),"fill-opacity":r.getAlpha()})},a.clean=function(t){if(t&&"object"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e{"use strict";var n=r(86130),i=r(75058),o=r(98260).extendFlat,a=r(62309).overrideAll;t.exports=a({orientation:{valType:"enumerated",values:["h","v"],dflt:"v",description:"Sets the orientation of the colorbar."},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",description:["Determines whether this color bar's thickness","(i.e. the measure in the constant color direction)","is set in units of plot *fraction* or in *pixels*.","Use `thickness` to set the value."].join(" ")},thickness:{valType:"number",min:0,dflt:30,description:["Sets the thickness of the color bar","This measure excludes the size of the padding, ticks and labels."].join(" ")},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this color bar's length","(i.e. the measure in the color variation direction)","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the color bar","This measure excludes the padding of both ends.","That is, the color bar length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",description:["Sets the x position with respect to `xref` of the color bar (in plot fraction).","When `xref` is *paper*, defaults to 1.02 when `orientation` is *v* and","0.5 when `orientation` is *h*.","When `xref` is *container*, defaults to *1* when `orientation` is *v* and","0.5 when `orientation` is *h*.","Must be between *0* and *1* if `xref` is *container*","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],description:["Sets this color bar's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the color bar.","Defaults to *left* when `orientation` is *v* and","*center* when `orientation` is *h*."].join(" ")},xpad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the x direction."},y:{valType:"number",description:["Sets the y position with respect to `yref` of the color bar (in plot fraction).","When `yref` is *paper*, defaults to 0.5 when `orientation` is *v* and","1.02 when `orientation` is *h*.","When `yref` is *container*, defaults to 0.5 when `orientation` is *v* and","1 when `orientation` is *h*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets this color bar's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the color bar.","Defaults to *middle* when `orientation` is *v* and","*bottom* when `orientation` is *h*."].join(" ")},ypad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the y direction."},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:"number",min:0,dflt:0,description:["Sets the width (in px) or the border enclosing this color bar."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:"Sets the color of padded area."},tickmode:n.minor.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:o({},n.ticks,{dflt:""}),ticklabeloverflow:o({},n.ticklabeloverflow,{description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","In other cases the default is *hide past div*."].join(" ")}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",description:["Determines where tick labels are drawn relative to the ticks.","Left and right options are used when `orientation` is *h*,","top and bottom when `orientation` is *v*."].join(" ")},ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,showticklabels:n.showticklabels,labelalias:n.labelalias,tickfont:i({description:"Sets the color bar's tick label font"}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,minexponent:n.minexponent,showexponent:n.showexponent,title:{text:{valType:"string",description:["Sets the title of the color bar.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:i({description:["Sets this color bar's title font.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),side:{valType:"enumerated",values:["right","top","bottom"],description:["Determines the location of color bar's title","with respect to the color bar.","Defaults to *top* when `orientation` if *v* and ","defaults to *right* when `orientation` if *h*.","Note that the title's location used to be set","by the now deprecated `titleside` attribute."].join(" ")}},_deprecated:{title:{valType:"string",description:["Deprecated in favor of color bar's `title.text`.","Note that value of color bar's `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:i({description:"Deprecated in favor of color bar's `title.font`."}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top",description:"Deprecated in favor of color bar's `title.side`."}}},"colorbars","from-root")},30733:t=>{"use strict";t.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},81692:(t,e,r)=>{"use strict";var n=r(12822),i=r(46121),o=r(49342),a=r(8736),s=r(84411),l=r(12213),c=r(76699);t.exports=function(t,e,r){var d=i.newContainer(e,"colorbar"),u=t.colorbar||{};function h(t,e){return n.coerce(u,d,c,t,e)}var f=r.margin||{t:0,b:0,l:0,r:0},p=r.width-f.l-f.r,m=r.height-f.t-f.b,g="v"===h("orientation"),v=h("thicknessmode");h("thickness","fraction"===v?30/(g?p:m):30);var b=h("lenmode");h("len","fraction"===b?1:g?m:p);var y,x,w,_="paper"===h("yref"),k="paper"===h("xref"),A="left";g?(w="middle",A=k?"left":"right",y=k?1.02:1,x=.5):(w=_?"bottom":"top",A="center",y=.5,x=_?1.02:1),n.coerce(u,d,{x:{valType:"number",min:k?-2:0,max:k?3:1,dflt:y}},"x"),n.coerce(u,d,{y:{valType:"number",min:_?-2:0,max:_?3:1,dflt:x}},"y"),h("xanchor",A),h("xpad"),h("yanchor",w),h("ypad"),n.noneOrAll(u,d,["x","y"]),h("outlinecolor"),h("outlinewidth"),h("bordercolor"),h("borderwidth"),h("bgcolor");var T=n.coerce(u,d,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:g?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");h("ticklabeloverflow",-1!==T.indexOf("inside")?"hide past domain":"hide past div"),o(u,d,h,"linear");var M=r.font,S={noAutotickangles:!0,outerTicks:!1,font:M};-1!==T.indexOf("inside")&&(S.bgColor="black"),l(u,d,h,"linear",S),s(u,d,h,"linear",S),a(u,d,h,"linear",S),h("title.text",r._dfltTitle.colorbar);var C=d.showticklabels?d.tickfont:M,E=n.extendFlat({},C,{weight:M.weight,style:M.style,variant:M.variant,color:M.color,size:n.bigFont(C.size)});n.coerceFont(h,"title.font",E),h("title.side",g?"top":"right")}},29648:(t,e,r)=>{"use strict";var n=r(27941),i=r(18106),o=r(51137),a=r(25059),s=r(75815),l=r(19846),c=r(12822),d=c.strTranslate,u=r(98260).extendFlat,h=r(76292),f=r(40666),p=r(17499),m=r(6883),g=r(80394),v=r(42226).flipScale,b=r(91200),y=r(52869),x=r(86130),w=r(89701),_=w.LINE_SPACING,k=w.FROM_TL,A=w.FROM_BR,T=r(30733).cn;t.exports={draw:function(t){var e=t._fullLayout._infolayer.selectAll("g."+T.colorbar).data(function(t){var e,r,n,i,o=t._fullLayout,a=t.calcdata,s=[];function l(t){return u(t,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function c(){"function"==typeof i.calc?i.calc(t,n,e):(e._fillgradient=r.reversescale?v(r.colorscale):r.colorscale,e._zrange=[r[i.min],r[i.max]])}for(var d=0;d0?n>=l:n<=l));i++)n>d&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var ft=Math.pow(10,Math.floor(Math.log(ht)/Math.LN10));dt*=ft*c.roundUp(ht/ft,[2,5,10]),(Math.abs(q.start)/q.size+1e-6)%1<2e-6&&(lt.tick0=0)}lt.dtick=dt}lt.domain=a?[at+O/j.h,at+Q-O/j.h]:[at+z/j.w,at+Q-z/j.w],lt.setScale(),t.attr("transform",d(Math.round(j.l),Math.round(j.t)));var pt,mt=t.select("."+T.cbtitleunshift).attr("transform",d(-Math.round(j.l),-Math.round(j.t))),gt=lt.ticklabelposition,vt=lt.title.font.size,bt=t.select("."+T.cbaxis),yt=0,xt=0;function wt(n,i){var o={propContainer:lt,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:P._dfltTitle.colorbar,containerGroup:t.select("."+T.cbtitle)},a="h"===n.charAt(0)?n.substr(1):"h"+n;t.selectAll("."+a+",."+a+"-math-group").remove(),m.draw(r,n,u(o,i||{}))}return c.syncOrAsync([o.previousPromises,function(){var t,e;(a&&ct||!a&&!ct)&&("top"===G&&(t=z+j.l+tt*D,e=O+j.t+et*(1-at-Q)+3+.75*vt),"bottom"===G&&(t=z+j.l+tt*D,e=O+j.t+et*(1-at)-3-.25*vt),"right"===G&&(e=O+j.t+et*I+3+.75*vt,t=z+j.l+tt*at),wt(lt._id+"title",{attributes:{x:t,y:e,"text-anchor":a?"start":"middle"}}))},function(){if(!a&&!ct||a&&ct){var o,l=t.select("."+T.cbtitle),u=l.select("text"),h=[-M/2,M/2],p=l.select(".h"+lt._id+"title-math-group").node(),m=15.6;if(u.node()&&(m=parseInt(u.node().style.fontSize,10)*_),p?(o=f.bBox(p),xt=o.width,(yt=o.height)>m&&(h[1]-=(yt-m)/2)):u.node()&&!u.classed(T.jsPlaceholder)&&(o=f.bBox(u.node()),xt=o.width,yt=o.height),a){if(yt){if(yt+=5,"top"===G)lt.domain[1]-=yt/j.h,h[1]*=-1;else{lt.domain[0]+=yt/j.h;var v=g.lineCount(u);h[1]+=(1-v)*m}l.attr("transform",d(h[0],h[1])),lt.setScale()}}else xt&&("right"===G&&(lt.domain[0]+=(xt+vt/2)/j.w),l.attr("transform",d(h[0],h[1])),lt.setScale())}t.selectAll("."+T.cbfills+",."+T.cblines).attr("transform",a?d(0,Math.round(j.h*(1-lt.domain[1]))):d(Math.round(j.w*lt.domain[0]),0)),bt.attr("transform",a?d(0,Math.round(-j.t)):d(Math.round(-j.l),0));var b=t.select("."+T.cbfills).selectAll("rect."+T.cbfill).attr("style","").data(Z);b.enter().append("rect").classed(T.cbfill,!0).attr("style",""),b.exit().remove();var y=V.map(lt.c2p).map(Math.round).sort((function(t,e){return t-e}));b.each((function(t,o){var s=[0===o?V[0]:(Z[o]+Z[o-1])/2,o===Z.length-1?V[1]:(Z[o]+Z[o+1])/2].map(lt.c2p).map(Math.round);a&&(s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,y[0],y[1]));var l=n.select(this).attr(a?"x":"y",rt).attr(a?"y":"x",n.min(s)).attr(a?"width":"height",Math.max($,2)).attr(a?"height":"width",Math.max(n.max(s)-n.min(s),2));if(e._fillgradient)f.gradient(l,r,e._id,a?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var d=W(t).replace("e-","");l.attr("fill",i(d).toHexString())}}));var x=t.select("."+T.cblines).selectAll("path."+T.cbline).data(B.color&&B.width?X:[]);x.enter().append("path").classed(T.cbline,!0),x.exit().remove(),x.each((function(t){var e=rt,r=Math.round(lt.c2p(t))+B.width/2%1;n.select(this).attr("d","M"+(a?e+","+r:r+","+e)+(a?"h":"v")+$).call(f.lineGroupStyle,B.width,H(t),B.dash)})),bt.selectAll("g."+lt._id+"tick,path").remove();var w=rt+$+(M||0)/2-("outside"===e.ticks?1:0),k=s.calcTicks(lt),A=s.getTickSigns(lt)[2];return s.drawTicks(r,lt,{vals:"inside"===lt.ticks?s.clipEnds(lt,k):k,layer:bt,path:s.makeTickPath(lt,w,A),transFn:s.makeTransTickFn(lt)}),s.drawLabels(r,lt,{vals:k,layer:bt,transFn:s.makeTransTickLabelFn(lt),labelFns:s.makeLabelFns(lt,w)})},function(){if(a&&!ct||!a&&ct){var t,i,o=lt.position||0,s=lt._offset+lt._length/2;if("right"===G)i=s,t=j.l+tt*o+10+vt*(lt.showticklabels?1:.5);else if(t=s,"bottom"===G&&(i=j.t+et*o+10+(-1===gt.indexOf("inside")?lt.tickfont.size:0)+("intside"!==lt.ticks&&e.ticklen||0)),"top"===G){var l=U.text.split("
").length;i=j.t+et*o+10-$-_*vt*l}wt((a?"h":"v")+lt._id+"title",{avoid:{selection:n.select(r).selectAll("g."+lt._id+"tick"),side:G,offsetTop:a?0:j.t,offsetLeft:a?j.l:0,maxShift:a?P.width:P.height},attributes:{x:t,y:i,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}},o.previousPromises,function(){var n,s=$+M/2;-1===gt.indexOf("inside")&&(n=f.bBox(bt.node()),s+=a?n.width:n.height),pt=mt.select("text");var c=0,u=a&&"top"===G,m=!a&&"right"===G,g=0;if(pt.node()&&!pt.classed(T.jsPlaceholder)){var b,y=mt.select(".h"+lt._id+"title-math-group").node();y&&(a&&ct||!a&&!ct)?(c=(n=f.bBox(y)).width,b=n.height):(c=(n=f.bBox(mt.node())).right-j.l-(a?rt:st),b=n.bottom-j.t-(a?st:rt),a||"top"!==G||(s+=n.height,g=n.height)),m&&(pt.attr("transform",d(c/2+vt/2,0)),c*=2),s=Math.max(s,a?c:b)}var x=2*(a?z:O)+s+S+M/2,_=0;!a&&U.text&&"bottom"===L&&I<=0&&(x+=_=x/2,g+=_),P._hColorbarMoveTitle=_,P._hColorbarMoveCBTitle=g;var N=S+M,B=(a?rt:st)-N/2-(a?z:0),V=(a?st:rt)-(a?K:O+g-_);t.select("."+T.cbbg).attr("x",B).attr("y",V).attr(a?"width":"height",Math.max(x-_,2)).attr(a?"height":"width",Math.max(K+N,2)).call(p.fill,C).call(p.stroke,e.bordercolor).style("stroke-width",S);var H=m?Math.max(c-10,0):0;t.selectAll("."+T.cboutline).attr("x",(a?rt:st+z)+H).attr("y",(a?st+O-K:rt)+(u?yt:0)).attr(a?"width":"height",Math.max($,2)).attr(a?"height":"width",Math.max(K-(a?2*O+yt:2*z+H),2)).call(p.stroke,e.outlinecolor).style({fill:"none","stroke-width":M});var W=a?nt*x:0,q=a?0:(1-it)*x-g;if(W=F?j.l-W:-W,q=R?j.t-q:-q,t.attr("transform",d(W,q)),!a&&(S||i(C).getAlpha()&&!i.equals(P.paper_bgcolor,C))){var Y=bt.selectAll("text"),Z=Y[0].length,X=t.select("."+T.cbbg).node(),J=f.bBox(X),Q=f.getTranslate(t);Y.each((function(t,e){var r=Z-1;if(0===e||e===r){var n,i=f.bBox(this),o=f.getTranslate(this);if(e===r){var a=i.right+o.x;(n=J.right+Q.x+st-S-2+D-a)>0&&(n=0)}else if(0===e){var s=i.left+o.x;(n=J.left+Q.x+st+S+2-s)<0&&(n=0)}n&&(Z<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var tt={},et=k[E],ot=A[E],at=k[L],dt=A[L],ut=x-$;a?("pixels"===h?(tt.y=I,tt.t=K*at,tt.b=K*dt):(tt.t=tt.b=0,tt.yt=I+l*at,tt.yb=I-l*dt),"pixels"===w?(tt.x=D,tt.l=x*et,tt.r=x*ot):(tt.l=ut*et,tt.r=ut*ot,tt.xl=D-v*et,tt.xr=D+v*ot)):("pixels"===h?(tt.x=D,tt.l=K*et,tt.r=K*ot):(tt.l=tt.r=0,tt.xl=D+l*et,tt.xr=D-l*ot),"pixels"===w?(tt.y=1-I,tt.t=x*at,tt.b=x*dt):(tt.t=ut*at,tt.b=ut*dt,tt.yt=I-v*at,tt.yb=I+v*dt));var ht=e.y<.5?"b":"t",ft=e.x<.5?"l":"r";r._fullLayout._reservedMargin[e._id]={};var xt={r:P.width-B-W,l:B+tt.r,b:P.height-V-q,t:V+tt.b};F&&R?o.autoMargin(r,e._id,tt):F?r._fullLayout._reservedMargin[e._id][ht]=xt[ht]:R||a?r._fullLayout._reservedMargin[e._id][ft]=xt[ft]:r._fullLayout._reservedMargin[e._id][ht]=xt[ht]}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,o,s="v"===e.orientation,c=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr("transform"),h(t)},moveFn:function(r,a){t.attr("transform",n+d(r,a)),i=l.align((s?e._uFrac:e._vFrac)+r/c.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),o=l.align((s?e._vFrac:1-e._uFrac)-a/c.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var u=l.getCursor(i,o,e.xanchor,e.yanchor);h(t,u)},doneFn:function(){if(h(t),void 0!==i&&void 0!==o){var n={};n[e._propPrefix+"x"]=i,n[e._propPrefix+"y"]=o,void 0!==e._traceIndex?a.call("_guiRestyle",r,n,e._traceIndex):a.call("_guiRelayout",r,n)}}})}(r,e,t)})),e.exit().each((function(e){o.autoMargin(t,e._id)})).remove(),e.order()}}},52467:(t,e,r)=>{"use strict";var n=r(12822);t.exports=function(t){return n.isPlainObject(t.colorbar)}},10552:(t,e,r)=>{"use strict";t.exports={moduleType:"component",name:"colorbar",attributes:r(76699),supplyDefaults:r(81692),draw:r(29648).draw,hasColorbar:r(52467)}},89322:(t,e,r)=>{"use strict";var n=r(76699),i=r(46233).counter,o=r(54747),a=r(78920).scales,s=o(a);function l(t){return"`"+t+"`"}t.exports=function(t,e){t=t||"";var r,o,c=(e=e||{}).cLetter||"c",d="onlyIfNumerical"in e?e.onlyIfNumerical:Boolean(t),u="noScale"in e?e.noScale:"marker.line"===t,h="showScaleDflt"in e?e.showScaleDflt:"z"===c,f="string"==typeof e.colorscaleDflt?a[e.colorscaleDflt]:null,p=e.editTypeOverride||"",m=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,o=e.colorAttr):o="in "+l(m+(r={z:"z",c:"color"}[c]));var g=d?" Has an effect only if "+o+" is set to a numerical array.":"",v=c+"auto",b=c+"min",y=c+"max",x=c+"mid",w=l(m+v),_=l(m+b),k=l(m+y),A=_+" and "+k,T={};T[b]=T[y]=void 0;var M={};M[v]=!1;var S={};return"color"===r&&(S.color={valType:"color",arrayOk:!0,editType:p||"style",description:["Sets the",t,"color.","It accepts either a specific color","or an array of numbers that are mapped to the colorscale","relative to the max and min values of the array or relative to",A,"if set."].join(" ")},e.anim&&(S.color.anim=!0)),S[v]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:T,description:["Determines whether or not the color domain is computed","with respect to the input data (here "+o+") or the bounds set in",A+g,"Defaults to `false` when",A,"are set by the user."].join(" ")},S[b]={valType:"number",dflt:null,editType:p||"plot",impliedEdits:M,description:["Sets the lower bound of the color domain."+g,"Value should have the same units as",o,"and if set,",k,"must be set as well."].join(" ")},S[y]={valType:"number",dflt:null,editType:p||"plot",impliedEdits:M,description:["Sets the upper bound of the color domain."+g,"Value should have the same units as",o,"and if set,",_,"must be set as well."].join(" ")},S[x]={valType:"number",dflt:null,editType:"calc",impliedEdits:T,description:["Sets the mid-point of the color domain by scaling",_,"and/or",k,"to be equidistant to this point."+g,"Value should have the same units as",o+".","Has no effect when",w,"is `false`."].join(" ")},S.colorscale={valType:"colorscale",editType:"calc",dflt:f,impliedEdits:{autocolorscale:!1},description:["Sets the colorscale."+g,"The colorscale must be an array containing","arrays mapping a normalized value to an","rgb, rgba, hex, hsl, hsv, or named color string.","At minimum, a mapping for the lowest (0) and highest (1)","values are required. For example,","`[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`.","To control the bounds of the colorscale in color space,","use",A+".","Alternatively, `colorscale` may be a palette name string","of the following list: "+s+"."].join(" ")},S.autocolorscale={valType:"boolean",dflt:!1!==e.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0},description:["Determines whether the colorscale is a default palette (`autocolorscale: true`)","or the palette determined by",l(m+"colorscale")+"."+g,"In case `colorscale` is unspecified or `autocolorscale` is true, the default","palette will be chosen according to whether numbers in the `color` array are","all positive, all negative or mixed."].join(" ")},S.reversescale={valType:"boolean",dflt:!1,editType:"plot",description:["Reverses the color mapping if true."+g,"If true,",_,"will correspond to the last color","in the array and",k,"will correspond to the first color."].join(" ")},u||(S.showscale={valType:"boolean",dflt:h,editType:"calc",description:["Determines whether or not a colorbar is displayed for this trace."+g].join(" ")},S.colorbar=n),e.noColorAxis||(S.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc",description:["Sets a reference to a shared color axis.","References to these shared color axes are *coloraxis*, *coloraxis2*, *coloraxis3*, etc.","Settings for these shared color axes are set in the layout, under","`layout.coloraxis`, `layout.coloraxis2`, etc.","Note that multiple color scales can be linked to the same color axis."].join(" ")}),S}},62182:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822),o=r(42226).extractOpts;t.exports=function(t,e,r){var a,s=t._fullLayout,l=r.vals,c=r.containerStr,d=c?i.nestedProperty(e,c).get():e,u=o(d),h=!1!==u.auto,f=u.min,p=u.max,m=u.mid,g=function(){return i.aggNums(Math.min,null,l)},v=function(){return i.aggNums(Math.max,null,l)};void 0===f?f=g():h&&(f=d._colorAx&&n(f)?Math.min(f,g()):g()),void 0===p?p=v():h&&(p=d._colorAx&&n(p)?Math.max(p,v()):v()),h&&void 0!==m&&(p-m>m-f?f=m-(p-m):p-m=0?s.colorscale.sequential:s.colorscale.sequentialminus,u._sync("colorscale",a))}},51774:(t,e,r)=>{"use strict";var n=r(12822),i=r(42226).hasColorscale,o=r(42226).extractOpts;t.exports=function(t,e){function r(t,e){var r=t["_"+e];void 0!==r&&(t[e]=r)}function a(t,i){var a=i.container?n.nestedProperty(t,i.container).get():t;if(a)if(a.coloraxis)a._colorAx=e[a.coloraxis];else{var s=o(a),l=s.auto;(l||void 0===s.min)&&r(a,i.min),(l||void 0===s.max)&&r(a,i.max),s.autocolorscale&&r(a,"colorscale")}}for(var s=0;s{"use strict";var n=r(7370),i=r(12822),o=r(52467),a=r(81692),s=r(78920).isValid,l=r(25059).traceIs;function c(t,e){var r=e.slice(0,e.length-1);return e?i.nestedProperty(t,r).get()||{}:t}t.exports=function t(e,r,d,u,h){var f=h.prefix,p=h.cLetter,m="_module"in r,g=c(e,f),v=c(r,f),b=c(r._template||{},f)||{},y=function(){return delete e.coloraxis,delete r.coloraxis,t(e,r,d,u,h)};if(m){var x=d._colorAxes||{},w=u(f+"coloraxis");if(w){var _=l(r,"contour")&&i.nestedProperty(r,"contours.coloring").get()||"heatmap",k=x[w];return void(k?(k[2].push(y),k[0]!==_&&(k[0]=!1,i.warn(["Ignoring coloraxis:",w,"setting","as it is linked to incompatible colorscales."].join(" ")))):x[w]=[_,r,[y]])}}var A=g[p+"min"],T=g[p+"max"],M=n(A)&&n(T)&&A{"use strict";var n=r(27941),i=r(18106),o=r(7370),a=r(12822),s=r(17499),l=r(78920).isValid,c=["showscale","autocolorscale","colorscale","reversescale","colorbar"],d=["min","max","mid","auto"];function u(t){var e,r,n,i=t._colorAx,o=i||t,a={};for(r=0;r=0;n--,i++){var o=t[n];r[i]=[1-o[0],o[1]]}return r}function p(t,e){e=e||{};for(var r=t.domain,a=t.range,l=a.length,c=new Array(l),d=0;d{"use strict";var n=r(78920),i=r(42226);t.exports={moduleType:"component",name:"colorscale",attributes:r(89322),layoutAttributes:r(92425),supplyLayoutDefaults:r(28558),handleDefaults:r(94461),crossTraceDefaults:r(51774),calc:r(62182),scales:n.scales,defaultScale:n.defaultScale,getScale:n.get,isValidScale:n.isValid,hasColorscale:i.hasColorscale,extractOpts:i.extractOpts,extractScale:i.extractScale,flipScale:i.flipScale,makeColorScaleFunc:i.makeColorScaleFunc,makeColorScaleFuncFromTrace:i.makeColorScaleFuncFromTrace}},92425:(t,e,r)=>{"use strict";var n=r(98260).extendFlat,i=r(89322),o=r(78920).scales,a="Note that `autocolorscale` must be true for this attribute to work.";t.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:o.Reds,editType:"calc",description:["Sets the default sequential colorscale for positive values.",a].join(" ")},sequentialminus:{valType:"colorscale",dflt:o.Blues,editType:"calc",description:["Sets the default sequential colorscale for negative values.",a].join(" ")},diverging:{valType:"colorscale",dflt:o.RdBu,editType:"calc",description:["Sets the default diverging colorscale.",a].join(" ")}},coloraxis:n({_isSubplotObj:!0,editType:"calc",description:[""].join(" ")},i("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},28558:(t,e,r)=>{"use strict";var n=r(12822),i=r(46121),o=r(92425),a=r(94461);t.exports=function(t,e){function r(r,i){return n.coerce(t,e,o,r,i)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var s,l,c=e._colorAxes;function d(t,e){return n.coerce(s,l,o.coloraxis,t,e)}for(var u in c){var h=c[u];if(h[0])s=t[u]||{},(l=i.newContainer(e,u,"coloraxis"))._name=u,a(s,l,e,d,{prefix:"",cLetter:"c"});else{for(var f=0;f{"use strict";var n=r(18106),i={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},o=i.RdBu;function a(t){var e=0;if(!Array.isArray(t)||t.length<2)return!1;if(!t[0]||!t[t.length-1])return!1;if(0!=+t[0][0]||1!=+t[t.length-1][0])return!1;for(var r=0;r{"use strict";t.exports=function(t,e,r,n,i){var o=(t-r)/(n-r),a=o+e/(n-r),s=(o+a)/2;return"left"===i||"bottom"===i?o:"center"===i||"middle"===i?s:"right"===i||"top"===i?a:o<2/3-s?o:a>4/3-s?a:s}},29182:(t,e,r)=>{"use strict";var n=r(12822),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(t,e,r,o){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===o?0:"middle"===o?1:"top"===o?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},14295:(t,e)=>{"use strict";e.selectMode=function(t){return"lasso"===t||"select"===t},e.drawMode=function(t){return"drawclosedpath"===t||"drawopenpath"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},e.openMode=function(t){return"drawline"===t||"drawopenpath"===t},e.rectMode=function(t){return"select"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},e.freeMode=function(t){return"lasso"===t||"drawclosedpath"===t||"drawopenpath"===t},e.selectingOrDrawing=function(t){return e.freeMode(t)||e.rectMode(t)}},19846:(t,e,r)=>{"use strict";var n=r(10024),i=r(56885),o=r(17520),a=r(12822).removeElement,s=r(21197),l=t.exports={};l.align=r(45035),l.getCursor=r(29182);var c=r(99573);function d(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function u(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(t){var e,r,n,c,h,f,p,m,g=t.gd,v=1,b=g._context.doubleClickDelay,y=t.element;g._mouseDownTime||(g._mouseDownTime=0),y.style.pointerEvents="all",y.onmousedown=w,o?(y._ontouchstart&&y.removeEventListener("touchstart",y._ontouchstart),y._ontouchstart=w,y.addEventListener("touchstart",w,{passive:!1})):y.ontouchstart=w;var x=t.clampFn||function(t,e,r){return Math.abs(t)b&&(v=Math.max(v-1,1)),g._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(v,f),!m){var r;try{r=new MouseEvent("click",e)}catch(t){var n=u(e);(r=document.createEvent("MouseEvents")).initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,n[0],n[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}p.dispatchEvent(r)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},l.coverSlip=d},99573:(t,e,r)=>{"use strict";var n=r(16677),i=r(76324),o=r(16822).getGraphDiv,a=r(99259),s=t.exports={};s.wrapped=function(t,e,r){(t=o(t))._fullLayout&&i.clear(t._fullLayout._uid+a.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&!t._dragged&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&i&&t.emit("plotly_unhover",{event:e,points:i}))}},68057:(t,e)=>{"use strict";e.T={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style",description:["Sets the dash style of lines. Set to a dash type string","(*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*)","or a dash length list in px (eg *5px,10px,2px,2px*)."].join(" ")},e.k={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style",description:["Sets the shape of the pattern fill.","By default, no pattern is used for filling the area."].join(" ")},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style",description:["Determines whether `marker.color` should be used","as a default to `bgcolor` or a `fgcolor`."].join(" ")},bgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of background pattern fill.","Defaults to a `marker.color` background when `fillmode` is *overlay*.","Otherwise, defaults to a transparent background."].join(" ")},fgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of foreground pattern fill.","Defaults to a `marker.color` background when `fillmode` is *replace*.","Otherwise, defaults to dark grey or white","to increase contrast with the `bgcolor`."].join(" ")},fgopacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the foreground pattern fill.","Defaults to a 0.5 when `fillmode` is *overlay*.","Otherwise, defaults to 1."].join(" ")},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style",description:["Sets the size of unit squares of the pattern fill in pixels,","which corresponds to the interval of repetition of the pattern."].join(" ")},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style",description:["Sets the solidity of the pattern fill.","Solidity is roughly the fraction of the area filled by the pattern.","Solidity of 0 shows only the background color without pattern","and solidty of 1 shows only the foreground color without pattern."].join(" ")},editType:"style",description:["Sets the pattern within the marker."].join(" ")}},40666:(t,e,r)=>{"use strict";var n=r(27941),i=r(12822),o=i.numberFormat,a=r(7370),s=r(18106),l=r(25059),c=r(17499),d=r(80755),u=i.strTranslate,h=r(80394),f=r(25853),p=r(89701).LINE_SPACING,m=r(11891).DESELECTDIM,g=r(677),v=r(43710),b=r(66811).appendArrayPointValue,y=t.exports={};function x(t,e,r,n){var i=e.fillpattern,o=e.fillgradient,a=i&&y.getPatternAttr(i.shape,0,"");if(a){var s=y.getPatternAttr(i.bgcolor,0,null),l=y.getPatternAttr(i.fgcolor,0,null),d=i.fgopacity,u=y.getPatternAttr(i.size,0,8),h=y.getPatternAttr(i.solidity,0,.3),f=e.uid;y.pattern(t,"point",r,f,a,u,h,void 0,i.fillmode,s,l,d)}else if(o&&"none"!==o.type){var p,m,g=o.type,v="scatterfill-"+e.uid;n&&(v="legendfill-"+e.uid),n||void 0===o.start&&void 0===o.stop?("horizontal"===g&&(g+="reversed"),t.call(y.gradient,r,v,g,o.colorscale,"fill")):("horizontal"===g?(p={x:o.start,y:0},m={x:o.stop,y:0}):"vertical"===g&&(p={x:0,y:o.start},m={x:0,y:o.stop}),p.x=e._xA.c2p(void 0===p.x?e._extremes.x.min[0].val:p.x,!0),p.y=e._yA.c2p(void 0===p.y?e._extremes.y.min[0].val:p.y,!0),m.x=e._xA.c2p(void 0===m.x?e._extremes.x.max[0].val:m.x,!0),m.y=e._yA.c2p(void 0===m.y?e._extremes.y.max[0].val:m.y,!0),t.call(M,r,v,"linear",o.colorscale,"fill",p,m,!0,!1))}else e.fillcolor&&t.call(c.fill,e.fillcolor)}y.font=function(t,e,r,n,o,a,s){i.isPlainObject(e)&&(s=e.variant,a=e.style,o=e.weight,n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(c.fill,n),o&&t.style("font-weight",o),a&&t.style("font-style",a),s&&t.style("font-variant",s)},y.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},y.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},y.setRect=function(t,e,r,n,i){t.call(y.setPosition,e,r).call(y.setSize,n,i)},y.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),o=n.c2p(t.y);return!!(a(i)&&a(o)&&e.node())&&("text"===e.node().nodeName?e.attr("x",i).attr("y",o):e.attr("transform",u(i,o)),!0)},y.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);y.translatePoint(t,i,e,r)}))},y.hideOutsideRangePoint=function(t,e,r,n,i,o){e.attr("display",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,o)?null:"none")},y.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,i=e.yaxis;t.each((function(e){var o=e[0].trace,a=o.xcalendar,s=o.ycalendar,c=l.traceIs(o,"bar-like")?".bartext":".point,.textpoint";t.selectAll(c).each((function(t){y.hideOutsideRangePoint(t,n.select(this),r,i,a,s)}))}))}},y.crispRound=function(t,e,r){return e&&a(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},y.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var o=(((t||[])[0]||{}).trace||{}).line||{},a=r||o.width||0,s=i||o.dash||"";c.stroke(e,n||o.color),y.dashLine(e,s,a)},y.lineGroupStyle=function(t,e,r,i){t.style("fill","none").each((function(t){var o=(((t||[])[0]||{}).trace||{}).line||{},a=e||o.width||0,s=i||o.dash||"";n.select(this).call(c.stroke,r||o.color).call(y.dashLine,s,a)}))},y.dashLine=function(t,e,r){r=+r||0,e=y.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},y.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},y.singleFillStyle=function(t,e){var r=n.select(t.node());x(t,((r.data()[0]||[])[0]||{}).trace||{},e,!1)},y.fillGroupStyle=function(t,e,r){t.style("stroke-width",0).each((function(t){var i=n.select(this);t[0].trace&&x(i,t[0].trace,e,r)}))};var w=r(68735);y.symbolNames=[],y.symbolFuncs=[],y.symbolBackOffs=[],y.symbolNeedLines={},y.symbolNoDot={},y.symbolNoFill={},y.symbolList=[],Object.keys(w).forEach((function(t){var e=w[t],r=e.n;y.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),y.symbolNames[r]=t,y.symbolFuncs[r]=e.f,y.symbolBackOffs[r]=e.backoff||0,e.needLine&&(y.symbolNeedLines[r]=!0),e.noDot?y.symbolNoDot[r]=!0:y.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(y.symbolNoFill[r]=!0)}));var _=y.symbolNames.length;function k(t,e,r,n){var i=t%100;return y.symbolFuncs[i](e,r,n)+(t>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}y.symbolNumber=function(t){if(a(t))t=+t;else if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=y.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=_||t>=400?0:Math.floor(Math.max(t,0))};var A=o("~f"),T={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function M(t,e,r,o,a,l,d,u,h,f){var p,m=a.length;"linear"===o?p={node:"linearGradient",attrs:{x1:d.x,y1:d.y,x2:u.x,y2:u.y,gradientUnits:h?"userSpaceOnUse":"objectBoundingBox"},reversed:f}:"radial"===o&&(p={node:"radialGradient",reversed:f});for(var g=new Array(m),v=0;v=0&&void 0===t.i&&(t.i=a.i),e.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(t):void 0===t.mo?s.opacity:t.mo),n.ms2mrc){var d;d="various"===t.ms||"various"===s.size?3:n.ms2mrc(t.ms),t.mrc=d,n.selectedSizeFn&&(d=t.mrc=n.selectedSizeFn(t));var u=y.symbolNumber(t.mx||s.symbol)||0;t.om=u%200>=100;var h=et(t,r),f=H(t,r);e.attr("d",k(u,d,h,f))}var p,m,g,v=!1;if(t.so)g=l.outlierwidth,m=l.outliercolor,p=s.outliercolor;else{var b=(l||{}).width;g=(t.mlw+1||b+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,m="mlc"in t?t.mlcc=n.lineScale(t.mlc):i.isArrayOrTypedArray(l.color)?c.defaultLine:l.color,i.isArrayOrTypedArray(s.color)&&(p=c.defaultLine,v=!0),p="mc"in t?t.mcc=n.markerScale(t.mc):s.color||s.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(p=n.selectedColorFn(t))}if(t.om)e.call(c.stroke,p).style({"stroke-width":(g||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:g)+"px");var x=s.gradient,w=t.mgt;w?v=!0:w=x&&x.type,i.isArrayOrTypedArray(w)&&(w=w[0],T[w]||(w=0));var _=s.pattern,A=_&&y.getPatternAttr(_.shape,t.i,"");if(w&&"none"!==w){var M=t.mgc;M?v=!0:M=x.color;var S=r.uid;v&&(S+="-"+t.i),y.gradient(e,o,S,w,[[0,M],[1,p]],"fill")}else if(A){var C=!1,E=_.fgcolor;!E&&a&&a.color&&(E=a.color,C=!0);var L=y.getPatternAttr(E,t.i,a&&a.color||null),z=y.getPatternAttr(_.bgcolor,t.i,null),O=_.fgopacity,D=y.getPatternAttr(_.size,t.i,8),I=y.getPatternAttr(_.solidity,t.i,.3);C=C||t.mcc||i.isArrayOrTypedArray(_.shape)||i.isArrayOrTypedArray(_.bgcolor)||i.isArrayOrTypedArray(_.fgcolor)||i.isArrayOrTypedArray(_.size)||i.isArrayOrTypedArray(_.solidity);var R=r.uid;C&&(R+="-"+t.i),y.pattern(e,"point",o,R,A,D,I,t.mcc,_.fillmode,z,L,O)}else i.isArrayOrTypedArray(p)?c.fill(e,p[t.i]):c.fill(e,p);g&&c.stroke(e,m)}},y.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=y.tryColorscale(r,""),e.lineScale=y.tryColorscale(r,"line"),l.traceIs(t,"symbols")&&(e.ms2mrc=g.isBubble(t)?v(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,y.makeSelectedPointStyleFns(t)),e},y.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},o=t.marker||{},a=r.marker||{},s=n.marker||{},c=o.opacity,d=a.opacity,u=s.opacity,h=void 0!==d,f=void 0!==u;(i.isArrayOrTypedArray(c)||h||f)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?o.opacity:t.mo;return t.selected?h?d:e:f?u:m*e});var p=o.color,g=a.color,v=s.color;(g||v)&&(e.selectedColorFn=function(t){var e=t.mcc||p;return t.selected?g||e:v||e});var b=o.size,y=a.size,x=s.size,w=void 0!==y,_=void 0!==x;return l.traceIs(t,"symbols")&&(w||_)&&(e.selectedSizeFn=function(t){var e=t.mrc||b/2;return t.selected?w?y/2:e:_?x/2:e}),e},y.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},o=r.textfont||{},a=n.textfont||{},s=i.color,l=o.color,d=a.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:d||(l?e:c.addOpacity(e,m))},e},y.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=y.makeSelectedPointStyleFns(e),i=e.marker||{},o=[];r.selectedOpacityFn&&o.push((function(t,e){t.style("opacity",r.selectedOpacityFn(e))})),r.selectedColorFn&&o.push((function(t,e){c.fill(t,r.selectedColorFn(e))})),r.selectedSizeFn&&o.push((function(t,n){var o=n.mx||i.symbol||0,a=r.selectedSizeFn(n);t.attr("d",k(y.symbolNumber(o),a,et(n,e),H(n,e))),n.mrc2=a})),o.length&&t.each((function(t){for(var e=n.select(this),r=0;r0?r:0}function O(t,e,r){return r&&(t=j(t)),e?I(t[1]):D(t[0])}function D(t){var e=n.round(t,2);return S=e,e}function I(t){var e=n.round(t,2);return C=e,e}function R(t,e,r,n){var i=t[0]-e[0],o=t[1]-e[1],a=r[0]-e[0],s=r[1]-e[1],l=Math.pow(i*i+o*o,.25),c=Math.pow(a*a+s*s,.25),d=(c*c*i-l*l*a)*n,u=(c*c*o-l*l*s)*n,h=3*c*(l+c),f=3*l*(l+c);return[[D(e[0]+(h&&d/h)),I(e[1]+(h&&u/h))],[D(e[0]-(f&&d/f)),I(e[1]-(f&&u/f))]]}y.textPointStyle=function(t,e,r){if(t.size()){var o;if(e.selectedpoints){var a=y.makeSelectedTextStyleFns(e);o=a.selectedTextColorFn}var s=e.texttemplate,l=r._fullLayout;t.each((function(t){var a=n.select(this),c=s?i.extractOption(t,e,"txt","texttemplate"):i.extractOption(t,e,"tx","text");if(c||0===c){if(s){var d=e._module.formatLabels,u=d?d(t,e,l):{},f={};b(f,e,t.i);var p=e._meta||{};c=i.texttemplateString(c,u,l._d3locale,f,t,p)}var m=t.tp||e.textposition,g=z(t,e),v=o?o(t):t.tc||e.textfont.color;a.call(y.font,{family:t.tf||e.textfont.family,weight:t.tw||e.textfont.weight,style:t.ty||e.textfont.style,variant:t.tv||e.textfont.variant,size:g,color:v}).text(c).call(h.convertToTspans,r).call(L,m,g,t.mrc)}else a.remove()}))}},y.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=y.makeSelectedTextStyleFns(e);t.each((function(t){var i=n.select(this),o=r.selectedTextColorFn(t),a=t.tp||e.textposition,s=z(t,e);c.fill(i,o);var d=l.traceIs(e,"bar-like");L(i,a,s,t.mrc2||t.mrc,d)}))}},y.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],i=[];for(r=1;r=c||_>=u&&_<=c)&&(k<=h&&k>=d||k>=h&&k<=d)&&(t=[_,k])}return t}y.steps=function(t){var e=F[t]||P;return function(t){for(var r="M"+D(t[0][0])+","+I(t[0][1]),n=t.length,i=1;i=1e4&&(y.savedBBoxes={},N=0),r&&(y.savedBBoxes[r]=g),N++,i.extendFlat({},g)},y.setClipUrl=function(t,e,r){t.attr("clip-path",U(e,r))},y.getTranslate=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||0,y:+e[1]||0}},y.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",o=t[n]("transform")||"";return e=e||0,r=r||0,o=o.replace(/(\btranslate\(.*?\);?)/,"").trim(),o=(o+=u(e,r)).trim(),t[i]("transform",o),o},y.getScale=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||1,y:+e[1]||1}},y.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",o=t[n]("transform")||"";return e=e||1,r=r||1,o=o.replace(/(\bscale\(.*?\);?)/,"").trim(),o=(o+="scale("+e+","+r+")").trim(),t[i]("transform",o),o};var G=/\s*sc.*/;y.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":"scale("+e+","+r+")";t.each((function(){var t=(this.getAttribute("transform")||"").replace(G,"");t=(t+=n).trim(),this.setAttribute("transform",t)}))}};var V=/translate\([^)]*\)\s*$/;function H(t,e){var r;return t&&(r=t.mf),void 0===r&&(r=e.marker&&e.marker.standoff||0),e._geo||e._xA?r:-r}y.setTextPointsScale=function(t,e,r){t&&t.each((function(){var t,i=n.select(this),o=i.select("text");if(o.node()){var a=parseFloat(o.attr("x")||0),s=parseFloat(o.attr("y")||0),l=(i.attr("transform")||"").match(V);t=1===e&&1===r?[]:[u(a,s),"scale("+e+","+r+")",u(-a,-s)],l&&t.push(l),i.attr("transform",t.join(""))}}))},y.getMarkerStandoff=H;var W,q,Y,Z,X,$,J=Math.atan2,K=Math.cos,Q=Math.sin;function tt(t,e){var r=e[0],n=e[1];return[r*K(t)-n*Q(t),r*Q(t)+n*K(t)]}function et(t,e){var r,n,o=t.ma;void 0===o&&((o=e.marker.angle)&&!i.isArrayOrTypedArray(o)||(o=0));var s=e.marker.angleref;if("previous"===s||"north"===s){if(e._geo){var l=e._geo.project(t.lonlat);r=l[0],n=l[1]}else{var c=e._xA,d=e._yA;if(!c||!d)return 90;r=c.c2p(t.x),n=d.c2p(t.y)}if(e._geo){var u,h=t.lonlat[0],f=t.lonlat[1],p=e._geo.project([h,f+1e-5]),m=e._geo.project([h+1e-5,f]),g=J(m[1]-n,m[0]-r),v=J(p[1]-n,p[0]-r);if("north"===s)u=o/180*Math.PI;else if("previous"===s){var b=h/180*Math.PI,y=f/180*Math.PI,x=W/180*Math.PI,w=q/180*Math.PI,_=x-b,k=K(w)*Q(_),A=Q(w)*K(y)-K(w)*Q(y)*K(_);u=-J(k,A)-Math.PI,W=h,q=f}var T=tt(g,[K(u),0]),M=tt(v,[Q(u),0]);o=J(T[1]+M[1],T[0]+M[0])/Math.PI*180,"previous"!==s||$===e.uid&&t.i===X+1||(o=null)}if("previous"===s&&!e._geo)if($===e.uid&&t.i===X+1&&a(r)&&a(n)){var S=r-Y,C=n-Z,E=e.line&&e.line.shape||"",L=E.slice(E.length-1);"h"===L&&(C=0),"v"===L&&(S=0),o+=J(C,S)/Math.PI*180+90}else o=null}return Y=r,Z=n,X=t.i,$=e.uid,o}y.getMarkerAngle=et},68735:(t,e,r)=>{"use strict";var n,i,o,a,s=r(37974),l=r(27941).round,c="M0,0Z",d=Math.sqrt(2),u=Math.sqrt(3),h=Math.PI,f=Math.cos,p=Math.sin;function m(t){return null===t}function g(t,e,r){if(!(t&&t%360!=0||e))return r;if(o===t&&a===e&&n===r)return i;function l(t,r){var n=f(t),i=p(t),o=r[0],a=r[1]+(e||0);return[o*n-a*i,o*i+a*n]}o=t,a=e,n=r;for(var c=t/180*h,d=0,u=0,m=s(r),g="",v=0;v{"use strict";t.exports={visible:{valType:"boolean",editType:"calc",description:["Determines whether or not this set of error bars is visible."].join(" ")},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc",description:["Determines the rule used to generate the error bars.","If *constant`, the bar lengths are of a constant value.","Set this constant in `value`.","If *percent*, the bar lengths correspond to a percentage of","underlying data. Set this percentage in `value`.","If *sqrt*, the bar lengths correspond to the square of the","underlying data.","If *data*, the bar lengths are set with data set `array`."].join(" ")},symmetric:{valType:"boolean",editType:"calc",description:["Determines whether or not the error bars have the same length","in both direction","(top/bottom for vertical bars, left/right for horizontal bars."].join(" ")},array:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar.","Values are plotted relative to the underlying data."].join(" ")},arrayminus:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar in the","bottom (left) direction for vertical (horizontal) bars","Values are plotted relative to the underlying data."].join(" ")},value:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars."].join(" ")},valueminus:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars in the","bottom (left) direction for vertical (horizontal) bars"].join(" ")},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style",description:"Sets the stoke color of the error bars."},thickness:{valType:"number",min:0,dflt:2,editType:"style",description:"Sets the thickness (in px) of the error bars."},width:{valType:"number",min:0,editType:"plot",description:["Sets the width (in px) of the cross-bar at both ends","of the error bars."].join(" ")},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style",description:["Obsolete.","Use the alpha channel in error bar `color` to set the opacity."].join(" ")}}}},8295:(t,e,r)=>{"use strict";var n=r(7370),i=r(25059),o=r(75815),a=r(12822),s=r(27512);function l(t,e,r,i){var l=e["error_"+i]||{},c=[];if(l.visible&&-1!==["linear","log"].indexOf(r.type)){for(var d=s(l),u=0;u{"use strict";function e(t,e){return"percent"===t?function(t){return Math.abs(t*e/100)}:"constant"===t?function(){return Math.abs(e)}:"sqrt"===t?function(t){return Math.sqrt(Math.abs(t))}:void 0}t.exports=function(t){var r=t.type,n=t.symmetric;if("data"===r){var i=t.array||[];if(n)return function(t,e){var r=+i[e];return[r,r]};var o=t.arrayminus||[];return function(t,e){var r=+i[e],n=+o[e];return isNaN(r)&&isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var a=e(r,t.value),s=e(r,t.valueminus);return n||void 0===t.valueminus?function(t){var e=a(t);return[e,e]}:function(t){return[s(t),a(t)]}}},69440:(t,e,r)=>{"use strict";var n=r(7370),i=r(25059),o=r(12822),a=r(46121),s=r(96647);t.exports=function(t,e,r,l){var c="error_"+l.axis,d=a.newContainer(e,c),u=t[c]||{};function h(t,e){return o.coerce(u,d,s,t,e)}if(!1!==h("visible",void 0!==u.array||void 0!==u.value||"sqrt"===u.type)){var f=h("type","array"in u?"data":"percent"),p=!0;"sqrt"!==f&&(p=h("symmetric",!(("data"===f?"arrayminus":"valueminus")in u))),"data"===f?(h("array"),h("traceref"),p||(h("arrayminus"),h("tracerefminus"))):"percent"!==f&&"constant"!==f||(h("value"),p||h("valueminus"));var m="copy_"+l.inherit+"style";l.inherit&&(e["error_"+l.inherit]||{}).visible&&h(m,!(u.color||n(u.thickness)||n(u.width))),l.inherit&&d[m]||(h("color",r),h("thickness"),h("width",i.traceIs(e,"gl3d")?0:4))}}},90156:(t,e,r)=>{"use strict";var n=r(12822),i=r(62309).overrideAll,o=r(96647),a={error_x:n.extendFlat({},o),error_y:n.extendFlat({},o)};delete a.error_x.copy_zstyle,delete a.error_y.copy_zstyle,delete a.error_y.copy_ystyle;var s={error_x:n.extendFlat({},o),error_y:n.extendFlat({},o),error_z:n.extendFlat({},o)};delete s.error_x.copy_ystyle,delete s.error_y.copy_ystyle,delete s.error_z.copy_ystyle,delete s.error_z.copy_zstyle,t.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:a,bar:a,histogram:a,scatter3d:i(s,"calc","nested"),scattergl:i(a,"calc","nested")}},supplyDefaults:r(69440),calc:r(8295),makeComputeError:r(27512),plot:r(42961),style:r(83821),hoverInfo:function(t,e,r){(e.error_y||{}).visible&&(r.yerr=t.yh-t.y,e.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(e.error_x||{}).visible&&(r.xerr=t.xh-t.x,e.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}},42961:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=r(40666),a=r(677);t.exports=function(t,e,r,s){var l=r.xaxis,c=r.yaxis,d=s&&s.duration>0,u=t._context.staticPlot;e.each((function(e){var h,f=e[0].trace,p=f.error_x||{},m=f.error_y||{};f.ids&&(h=function(t){return t.id});var g=a.hasMarkers(f)&&f.marker.maxdisplayed>0;m.visible||p.visible||(e=[]);var v=n.select(this).selectAll("g.errorbar").data(e,h);if(v.exit().remove(),e.length){p.visible||v.selectAll("path.xerror").remove(),m.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var b=v.enter().append("g").classed("errorbar",!0);d&&b.style("opacity",0).transition().duration(s.duration).style("opacity",1),o.setClipUrl(v,r.layerClipId,t),v.each((function(t){var e=n.select(this),r=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};return void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0))),void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0))),n}(t,l,c);if(!g||t.vis){var o,a=e.select("path.yerror");if(m.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var h=m.width;o="M"+(r.x-h)+","+r.yh+"h"+2*h+"m-"+h+",0V"+r.ys,r.noYS||(o+="m-"+h+",0h"+2*h),a.size()?d&&(a=a.transition().duration(s.duration).ease(s.easing)):a=e.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0),a.attr("d",o)}else a.remove();var f=e.select("path.xerror");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var v=(p.copy_ystyle?m:p).width;o="M"+r.xh+","+(r.y-v)+"v"+2*v+"m0,-"+v+"H"+r.xs,r.noXS||(o+="m0,-"+v+"v"+2*v),f.size()?d&&(f=f.transition().duration(s.duration).ease(s.easing)):f=e.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0),f.attr("d",o)}else f.remove()}}))}}))}},83821:(t,e,r)=>{"use strict";var n=r(27941),i=r(17499);t.exports=function(t){t.each((function(t){var e=t[0].trace,r=e.error_y||{},o=e.error_x||{},a=n.select(this);a.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),o.copy_ystyle&&(o=r),a.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(i.stroke,o.color)}))}},60713:(t,e,r)=>{"use strict";var n=r(75058),i=r(53572).hoverlabel,o=r(98260).extendFlat;t.exports={hoverlabel:{bgcolor:o({},i.bgcolor,{arrayOk:!0,description:"Sets the background color of the hover labels for this trace"}),bordercolor:o({},i.bordercolor,{arrayOk:!0,description:"Sets the border color of the hover labels for this trace."}),font:n({arrayOk:!0,editType:"none",description:"Sets the font used in hover labels."}),align:o({},i.align,{arrayOk:!0}),namelength:o({},i.namelength,{arrayOk:!0}),editType:"none"}}},56173:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059);function o(t,e,r,i){i=i||n.identity,Array.isArray(t)&&(e[0][r]=i(t))}t.exports=function(t){var e=t.calcdata,r=t._fullLayout;function a(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},r)}}for(var s=0;s{"use strict";var n=r(25059),i=r(87408).hover;t.exports=function(t,e,r){var o=n.getComponentMethod("annotations","onClick")(t,t._hoverdata);function a(){t.emit("plotly_click",{points:t._hoverdata,event:e})}void 0!==r&&i(t,e,r,!0),t._hoverdata&&e&&e.target&&(o&&o.then?o.then(a):a(),e.stopImmediatePropagation&&e.stopImmediatePropagation())}},99259:t=>{"use strict";t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},55470:(t,e,r)=>{"use strict";var n=r(12822),i=r(60713),o=r(33369);t.exports=function(t,e,r,a){var s=n.extendFlat({},a.hoverlabel);e.hovertemplate&&(s.namelength=-1),o(t,e,(function(r,o){return n.coerce(t,e,i,r,o)}),s)}},66811:(t,e,r)=>{"use strict";var n=r(12822);e.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},e.isTraceInSubplots=function(t,r){if("splom"===t.type){for(var n=t.xaxes||[],i=t.yaxes||[],o=0;o=0&&r.index{"use strict";var n=r(27941),i=r(7370),o=r(18106),a=r(12822),s=a.pushUnique,l=a.strTranslate,c=a.strRotate,d=r(16677),u=r(80394),h=r(27517),f=r(40666),p=r(17499),m=r(19846),g=r(75815),v=r(25059),b=r(66811),y=r(99259),x=r(64083),w=r(67739),_=y.YANGLE,k=Math.PI*_/180,A=1/Math.sin(k),T=Math.cos(k),M=Math.sin(k),S=y.HOVERARROWSIZE,C=y.HOVERTEXTPAD,E={box:!0,ohlc:!0,violin:!0,candlestick:!0},L={scatter:!0,scattergl:!0,splom:!0};function z(t,e){return t.distance-e.distance}function O(t){return[t.trace.index,t.index,t.x0,t.y0,t.name,t.attr,t.xa?t.xa._id:"",t.ya?t.ya._id:""].join(",")}e.hover=function(t,e,r,o){t=a.getGraphDiv(t);var l=e.target;a.throttle(t._fullLayout._uid+y.HOVERID,y.HOVERMINTIME,(function(){!function(t,e,r,o,l){r||(r="xy");var c,u,f,y=Array.isArray(r)?r:[r],x=t._fullLayout,w=x.hoversubplots,_=x._plots||[],k=_[r],T=x._has("cartesian"),M=e.hovermode||x.hovermode,C="x"===(M||"").charAt(0),D="y"===(M||"").charAt(0);if(T&&(C||D)&&"axis"===w)for(var R=y.length,U=0;UX[0]._length||xt<0||xt>$[0]._length)return m.unhoverRaw(t,e)}else yt="xpx"in e?e.xpx:X[0]._length/2,xt="ypx"in e?e.ypx:$[0]._length/2;if(e.pointerX=yt+X[0]._offset,e.pointerY=xt+$[0]._offset,rt="xval"in e?b.flat(y,e.xval):b.p2c(X,yt),nt="yval"in e?b.flat(y,e.yval):b.p2c($,xt),!i(rt[0])||!i(nt[0]))return a.warn("Fx.hover failed",e,t),m.unhoverRaw(t,e)}var At=1/0;function Tt(r,n){for(ot=0;otpt&&(mt.splice(0,pt),At=mt[0].distance),T&&0!==et&&0===mt.length){ft.distance=et,ft.index=!1;var d=st._module.hoverPoints(ft,ut,ht,"closest",{hoverLayer:x._hoverlayer});if(d&&(d=d.filter((function(t){return t.spikeDistance<=et}))),d&&d.length){var u,h=d.filter((function(t){return t.xa.showspikes&&"hovered data"!==t.xa.spikesnap}));if(h.length){var f=h[0];i(f.x0)&&i(f.y0)&&(u=St(f),(!vt.vLinePoint||vt.vLinePoint.spikeDistance>u.spikeDistance)&&(vt.vLinePoint=u))}var m=d.filter((function(t){return t.ya.showspikes&&"hovered data"!==t.ya.spikesnap}));if(m.length){var g=m[0];i(g.x0)&&i(g.y0)&&(u=St(g),(!vt.hLinePoint||vt.hLinePoint.spikeDistance>u.spikeDistance)&&(vt.hLinePoint=u))}}}}}function Mt(t,e,r){for(var n,i=null,o=1/0,a=0;a0&&Math.abs(t.distance)jt-1;Nt--)Vt(mt[Nt]);mt=Bt,zt()}var Ht=t._hoverdata,Wt=[],qt=V(t),Yt=H(t);for(it=0;it1||mt.length>1)||"closest"===M&&bt&&mt.length>1,ae=p.combine(x.plot_bgcolor||p.background,x.paper_bgcolor),se=I(mt,{gd:t,hovermode:M,rotateLabels:oe,bgColor:ae,container:x._hoverlayer,outerContainer:x._paper.node(),commonLabelOpts:x.hoverlabel,hoverdistance:x.hoverdistance}),le=se.hoverLabels;if(b.isUnifiedHover(M)||(function(t,e,r,n){var i,o,a,s,l,c,d,u=e?"xa":"ya",h=e?"ya":"xa",f=0,p=1,m=t.size(),g=new Array(m),v=0,b=n.minX,y=n.maxX,x=n.minY,w=n.maxY,_=function(t){return t*r._invScaleX},k=function(t){return t*r._invScaleY};function T(t){var e=t[0],r=t[t.length-1];if(o=e.pmin-e.pos-e.dp+e.size,a=r.pos+r.dp+r.size-e.pmax,o>.01){for(l=t.length-1;l>=0;l--)t[l].dp+=o;i=!1}if(!(a<.01)){if(o<-.01){for(l=t.length-1;l>=0;l--)t[l].dp-=a;i=!1}if(i){var n=0;for(s=0;se.pmax&&n++;for(s=t.length-1;s>=0&&!(n<=0);s--)(c=t[s]).pos>e.pmax-1&&(c.del=!0,n--);for(s=0;s=0;l--)t[l].dp-=a;for(s=t.length-1;s>=0&&!(n<=0);s--)(c=t[s]).pos+c.dp+c.size>e.pmax&&(c.del=!0,n--)}}}for(t.each((function(t){var n=t[u],i=t[h],o="x"===n._id.charAt(0),a=n.range;0===v&&a&&a[0]>a[1]!==o&&(p=-1);var s=0,l=o?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var c,d,f=F(t,e),m=t.anchor,T="end"===m?-1:1;if("middle"===m)d=(c=t.crossPos+(o?k(f.y-t.by/2):_(t.bx/2+t.tx2width/2)))+(o?k(t.by):_(t.bx));else if(o)d=(c=t.crossPos+k(S+f.y)-k(t.by/2-S))+k(t.by);else{var M=_(T*S+f.x),C=M+_(T*t.bx);c=t.crossPos+Math.min(M,C),d=t.crossPos+Math.max(M,C)}o?void 0!==x&&void 0!==w&&Math.min(d,w)-Math.max(c,x)>1&&("left"===i.side?(s=i._mainLinePosition,l=r.width):l=i._mainLinePosition):void 0!==b&&void 0!==y&&Math.min(d,y)-Math.max(c,b)>1&&("top"===i.side?(s=i._mainLinePosition,l=r.height):l=i._mainLinePosition)}g[v++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(o?A:1)/2,pmin:s,pmax:l}]})),g.sort((function(t,e){return t[0].posref-e[0].posref||p*(e[0].traceIndex-t[0].traceIndex)}));!i&&f<=m;){for(f++,i=!0,s=0;s.01&&E.pmin===L.pmin&&E.pmax===L.pmax){for(l=C.length-1;l>=0;l--)C[l].dp+=o;for(M.push.apply(M,C),g.splice(s+1,1),d=0,l=M.length-1;l>=0;l--)d+=M[l].dp;for(a=d/M.length,l=M.length-1;l>=0;l--)M[l].dp-=a;i=!1}else s++}g.forEach(T)}for(s=g.length-1;s>=0;s--){var z=g[s];for(l=z.length-1;l>=0;l--){var O=z[l],D=O.datum;D.offset=O.dp,D.del=O.del}}}(le,oe,x,se.commonLabelBoundingBox),P(le,oe,x._invScaleX,x._invScaleY)),l&&l.tagName){var ce=v.getComponentMethod("annotations","hasClickToShow")(t,Wt);h(n.select(l),ce?"pointer":"")}l&&!o&&function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],o=t._hoverdata[n];if(i.curveNumber!==o.curveNumber||String(i.pointNumber)!==String(o.pointNumber)||String(i.pointNumbers)!==String(o.pointNumbers))return!0}return!1}(t,0,Ht)&&(Ht&&t.emit("plotly_unhover",{event:e,points:Ht}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:X,yaxes:$,xvals:rt,yvals:nt}))}(t,e,r,o,l)}))},e.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=e.gd,o=V(i),a=H(i),s=!1,l=I(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,c=t.eventData;if(c){var d=Math.min(r,n),u=Math.max(r,n),h=Math.min(s,l),f=Math.max(s,l),m=t.trace;if(v.traceIs(m,"gl3d")){var g=i._fullLayout[m.scene]._scene.container,b=g.offsetLeft,y=g.offsetTop;d+=b,u+=b,h+=y,f+=y}c.bbox={x0:d+a,x1:u+a,y0:h+o,y1:f+o},e.inOut_bbox&&e.inOut_bbox.push(c.bbox)}else c=!1;return{color:t.color||p.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontVariant:t.fontVariant,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:"closest",rotateLabels:s,bgColor:e.bgColor||p.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}).hoverLabels,c=0,d=0;return l.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5([\s\S]*)<\/extra>/;function I(t,e){var r=e.gd,i=r._fullLayout,o=e.hovermode,s=e.rotateLabels,d=e.bgColor,h=e.container,m=e.outerContainer,g=e.commonLabelOpts||{};if(0===t.length)return[[]];var k=e.fontFamily||y.HOVERFONT,A=e.fontSize||y.HOVERFONTSIZE,T=e.fontWeight||i.font.weight,M=e.fontStyle||i.font.style,E=e.fontVariant||i.font.variant,L=t[0],z=L.xa,D=L.ya,I=o.charAt(0),F=I+"Label",P=L[F];if(void 0===P&&"multicategory"===z.type)for(var j=0;ji.width-w&&(_=i.width-w),e.attr("d","M"+(v-_)+",0L"+(v-_+S)+","+x+S+"H"+w+"v"+x+(2*C+y.height)+"H"+-w+"V"+x+S+"H"+(v-_-S)+"Z"),v=_,$.minX=v-w,$.maxX=v+w,"top"===z.side?($.minY=b-(2*C+y.height),$.maxY=b-C):($.minY=b+C,$.maxY=b+(2*C+y.height))}else{var O,I,R;"right"===D.side?(O="start",I=1,R="",v=z._offset+z._length):(O="end",I=-1,R="-",v=z._offset),b=D._offset+(L.y0+L.y1)/2,s.attr("text-anchor",O),e.attr("d","M0,0L"+R+S+","+S+"V"+(C+y.height/2)+"h"+R+(2*C+y.width)+"V-"+(C+y.height/2)+"H"+R+S+"V-"+S+"Z"),$.minY=b-(C+y.height/2),$.maxY=b+(C+y.height/2),"right"===D.side?($.minX=v+S,$.maxX=v+S+(2*C+y.width)):($.minX=v-S-(2*C+y.width),$.maxX=v-S);var F,j=y.height/2,N=B-y.top-j,U="clip"+i._uid+"commonlabel"+D._id;if(v=0?ut:ht+mt=0?ht:kt+mt=0?ct:dt+gt=0?dt:At+gt=0,"top"!==t.idealAlign&&Z||!X?Z?(F+=N/2,t.anchor="start"):t.anchor="middle":(F-=N/2,t.anchor="end"),t.crossPos=F;else{if(t.pos=F,Z=I+j/2+$<=U,X=I-j/2-$>=0,"left"!==t.idealAlign&&Z||!X)if(Z)I+=j/2,t.anchor="start";else{t.anchor="middle";var J=$/2,K=I+J-U,Q=I-J;K>0&&(I-=K),Q<0&&(I+=-Q)}else I-=j/2,t.anchor="end";t.crossPos=I}w.attr("text-anchor",t.anchor),z&&L.attr("text-anchor",t.anchor),e.attr("transform",l(I,F)+(s?c(_):""))})),{hoverLabels:Tt,commonLabelBoundingBox:$}}function R(t,e,r,n,i,o){var s="",l="";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=a.templateString(t.name,t.trace._meta)),s=U(t.name,t.nameLength));var c=r.charAt(0),d="x"===c?"y":"x";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(l+="y: "+t.yLabel+"
"),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&(l+=(l?"z: ":"")+t.zLabel)):e&&t[c+"Label"]===i?l=t[d+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&"scattercarpet"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?"
":"")+t.text),void 0!==t.extraText&&(l+=(l?"
":"")+t.extraText),o&&""===l&&!t.hovertemplate&&(""===s&&o.remove(),l=s);var u=t.hovertemplate||!1;if(u){var h=t.hovertemplateLabels||t;t[c+"Label"]!==i&&(h[c+"other"]=h[c+"Val"],h[c+"otherLabel"]=h[c+"Label"]),l=(l=a.hovertemplateString(u,h,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(D,(function(e,r){return s=U(r,t.nameLength),""}))}return[l,s]}function F(t,e){var r=0,n=t.offset;return e&&(n*=-M,r=t.offset*T),{x:r,y:n}}function P(t,e,r,i){var o=function(t){return t*r},a=function(t){return t*i};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i,s,l,c,d=r.select("text.nums"),h=t.anchor,p="end"===h?-1:1,m=(c=(l=(s={start:1,end:-1,middle:0}[(i=t).anchor])*(S+C))+s*(i.txwidth+C),"middle"===i.anchor&&(l-=i.tx2width/2,c+=i.txwidth/2+C),{alignShift:s,textShiftX:l,text2ShiftX:c}),g=F(t,e),v=g.x,b=g.y,y="middle"===h;r.select("path").attr("d",y?"M-"+o(t.bx/2+t.tx2width/2)+","+a(b-t.by/2)+"h"+o(t.bx)+"v"+a(t.by)+"h-"+o(t.bx)+"Z":"M0,0L"+o(p*S+v)+","+a(S+b)+"v"+a(t.by/2-S)+"h"+o(p*t.bx)+"v-"+a(t.by)+"H"+o(p*S+v)+"V"+a(b-S)+"Z");var x=v+m.textShiftX,w=b+t.ty0-t.by/2+C,_=t.textAlign||"auto";"auto"!==_&&("left"===_&&"start"!==h?(d.attr("text-anchor","start"),x=y?-t.bx/2-t.tx2width/2+C:-t.bx-C):"right"===_&&"end"!==h&&(d.attr("text-anchor","end"),x=y?t.bx/2-t.tx2width/2-C:t.bx+C)),d.call(u.positionText,o(x),a(w)),t.tx2width&&(r.select("text.name").call(u.positionText,o(m.text2ShiftX+m.alignShift*C+v),a(b+t.ty0-t.by/2+C)),r.select("rect").call(f.setRect,o(m.text2ShiftX+(m.alignShift-1)*t.tx2width/2+v),a(b-t.by/2-1),o(t.tx2width),a(t.by+2)))}))}function j(t,e){var r=t.index,n=t.trace||{},o=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var c=Array.isArray(r)?function(t,e){var i=a.castOption(o,r,t);return l(i)?i:a.extractOption({},n,"",e)}:function(t,e){return a.extractOption(s,n,t,e)};function d(e,r,n){var i=c(r,n);l(i)&&(t[e]=i)}if(d("hoverinfo","hi","hoverinfo"),d("bgcolor","hbg","hoverlabel.bgcolor"),d("borderColor","hbc","hoverlabel.bordercolor"),d("fontFamily","htf","hoverlabel.font.family"),d("fontSize","hts","hoverlabel.font.size"),d("fontColor","htc","hoverlabel.font.color"),d("fontWeight","htw","hoverlabel.font.weight"),d("fontStyle","hty","hoverlabel.font.style"),d("fontVariant","htv","hoverlabel.font.variant"),d("nameLength","hnl","hoverlabel.namelength"),d("textAlign","hta","hoverlabel.align"),t.posref="y"===e||"closest"===e&&"h"===n.orientation?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=a.constrain(t.x0,0,t.xa._length),t.x1=a.constrain(t.x1,0,t.xa._length),t.y0=a.constrain(t.y0,0,t.ya._length),t.y1=a.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel="xLabel"in t?t.xLabel:g.hoverLabelText(t.xa,t.xLabelVal,n.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel="yLabel"in t?t.yLabel:g.hoverLabelText(t.ya,t.yLabelVal,n.yhoverformat),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var u=g.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+u+" / -"+g.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" ± "+u,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var h=g.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+h+" / -"+g.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" ± "+h,"y"===e&&(t.distance+=1)}var f=t.hoverinfo||t.trace.hoverinfo;return f&&"all"!==f&&(-1===(f=Array.isArray(f)?f:f.split("+")).indexOf("x")&&(t.xLabel=void 0),-1===f.indexOf("y")&&(t.yLabel=void 0),-1===f.indexOf("z")&&(t.zLabel=void 0),-1===f.indexOf("text")&&(t.text=void 0),-1===f.indexOf("name")&&(t.name=void 0)),t}function N(t,e,r){var n,i,a=r.container,s=r.fullLayout,l=s._size,c=r.event,d=!!e.hLinePoint,u=!!e.vLinePoint;if(a.selectAll(".spikeline").remove(),u||d){var h=p.combine(s.plot_bgcolor,s.paper_bgcolor);if(d){var m,v,b=e.hLinePoint;n=b&&b.xa,"cursor"===(i=b&&b.ya).spikesnap?(m=c.pointerX,v=c.pointerY):(m=n._offset+b.x,v=i._offset+b.y);var y,x,w=o.readability(b.color,h)<1.5?p.contrast(h):b.color,_=i.spikemode,k=i.spikethickness,A=i.spikecolor||w,T=g.getPxPosition(t,i);if(-1!==_.indexOf("toaxis")||-1!==_.indexOf("across")){if(-1!==_.indexOf("toaxis")&&(y=T,x=m),-1!==_.indexOf("across")){var M=i._counterDomainMin,S=i._counterDomainMax;"free"===i.anchor&&(M=Math.min(M,i.position),S=Math.max(S,i.position)),y=l.l+M*l.w,x=l.l+S*l.w}a.insert("line",":first-child").attr({x1:y,x2:x,y1:v,y2:v,"stroke-width":k,stroke:A,"stroke-dasharray":f.dashStyle(i.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:y,x2:x,y1:v,y2:v,"stroke-width":k+2,stroke:h}).classed("spikeline",!0).classed("crisp",!0)}-1!==_.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:T+("right"!==i.side?k:-k),cy:v,r:k,fill:A}).classed("spikeline",!0)}if(u){var C,E,L=e.vLinePoint;n=L&&L.xa,i=L&&L.ya,"cursor"===n.spikesnap?(C=c.pointerX,E=c.pointerY):(C=n._offset+L.x,E=i._offset+L.y);var z,O,D=o.readability(L.color,h)<1.5?p.contrast(h):L.color,I=n.spikemode,R=n.spikethickness,F=n.spikecolor||D,P=g.getPxPosition(t,n);if(-1!==I.indexOf("toaxis")||-1!==I.indexOf("across")){if(-1!==I.indexOf("toaxis")&&(z=P,O=E),-1!==I.indexOf("across")){var j=n._counterDomainMin,N=n._counterDomainMax;"free"===n.anchor&&(j=Math.min(j,n.position),N=Math.max(N,n.position)),z=l.t+(1-N)*l.h,O=l.t+(1-j)*l.h}a.insert("line",":first-child").attr({x1:C,x2:C,y1:z,y2:O,"stroke-width":R,stroke:F,"stroke-dasharray":f.dashStyle(n.spikedash,R)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:C,x2:C,y1:z,y2:O,"stroke-width":R+2,stroke:h}).classed("spikeline",!0).classed("crisp",!0)}-1!==I.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:C,cy:P-("top"!==n.side?R:-R),r:R,fill:F}).classed("spikeline",!0)}}}function B(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function U(t,e){return u.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}function G(t,e,r){var n=e[t+"a"],i=e[t+"Val"],o=e.cd[0];if("category"===n.type||"multicategory"===n.type)i=n._categoriesMap[i];else if("date"===n.type){var a=e.trace[t+"periodalignment"];if(a){var s=e.cd[e.index],l=s[t+"Start"];void 0===l&&(l=s[t]);var c=s[t+"End"];void 0===c&&(c=s[t]);var d=c-l;"end"===a?i+=d:"middle"===a&&(i+=d/2)}i=n.d2c(i)}return o&&o.t&&o.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(i+=o.t.dPos)),i}function V(t){return t.offsetTop+t.clientTop}function H(t){return t.offsetLeft+t.clientLeft}function W(t,e){var r=t._fullLayout,n=e.getBoundingClientRect(),i=n.left,o=n.top,s=i+n.width,l=o+n.height,c=a.apply3DTransform(r._invTransform)(i,o),d=a.apply3DTransform(r._invTransform)(s,l),u=c[0],h=c[1],f=d[0],p=d[1];return{x:u,y:h,width:f-u,height:p-h,top:Math.min(h,p),left:Math.min(u,f),right:Math.max(u,f),bottom:Math.max(h,p)}}},33369:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(66811).isUnifiedHover;t.exports=function(t,e,r,a){a=a||{};var s=e.legend;function l(t){a.font[t]||(a.font[t]=s?e.legend.font[t]:e.font[t])}e&&o(e.hovermode)&&(a.font||(a.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),s?(a.bgcolor||(a.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),a.bordercolor||(a.bordercolor=e.legend.bordercolor)):a.bgcolor||(a.bgcolor=e.paper_bgcolor)),r("hoverlabel.bgcolor",a.bgcolor),r("hoverlabel.bordercolor",a.bordercolor),r("hoverlabel.namelength",a.namelength),n.coerceFont(r,"hoverlabel.font",a.font),r("hoverlabel.align",a.align)}},85400:(t,e,r)=>{"use strict";var n=r(12822),i=r(53572);t.exports=function(t,e){function r(r,o){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,o)}return r("clickmode"),r("hoversubplots"),r("hovermode")}},70410:(t,e,r)=>{"use strict";var n=r(27941),i=r(12822),o=r(19846),a=r(66811),s=r(53572),l=r(87408);t.exports={moduleType:"component",name:"fx",constants:r(99259),schema:{layout:s},attributes:r(60713),layoutAttributes:s,supplyLayoutGlobalDefaults:r(26271),supplyDefaults:r(55470),supplyLayoutDefaults:r(3315),calc:r(56173),getDistanceFunction:a.getDistanceFunction,getClosest:a.getClosest,inbox:a.inbox,quadrature:a.quadrature,appendArrayPointValue:a.appendArrayPointValue,castHoverOption:function(t,e,r){return i.castOption(t,e,"hoverlabel."+r)},castHoverinfo:function(t,e,r){return i.castOption(t,r,"hoverinfo",(function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)}))},hover:l.hover,unhover:o.unhover,loneHover:l.loneHover,loneUnhover:function(t){var e=i.isD3Selection(t)?t:n.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()},click:r(43006)}},53572:(t,e,r)=>{"use strict";var n=r(99259),i=r(75058),o=i({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});o.family.dflt=n.HOVERFONT,o.size.dflt=n.HOVERFONTSIZE,t.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"],description:["Determines the mode of single click interactions.","*event* is the default value and emits the `plotly_click`","event. In addition this mode emits the `plotly_selected` event","in drag modes *lasso* and *select*, but with no event data attached","(kept for compatibility reasons).","The *select* flag enables selecting single","data points via click. This mode also supports persistent selections,","meaning that pressing Shift while clicking, adds to / subtracts from an","existing selection. *select* with `hovermode`: *x* can be confusing, consider","explicitly setting `hovermode`: *closest* when using this feature.","Selection events are sent accordingly as long as *event* flag is set as well.","When the *event* flag is missing, `plotly_click` and `plotly_selected`","events are not fired."].join(" ")},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar",description:["Determines the mode of drag interactions.","*select* and *lasso* apply only to scatter traces with","markers or text. *orbit* and *turntable* apply only to","3D scenes."].join(" ")},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions.","If *closest*, a single hoverlabel will appear","for the *closest* point within the `hoverdistance`.","If *x* (or *y*), multiple hoverlabels will appear for multiple points","at the *closest* x- (or y-) coordinate within the `hoverdistance`,","with the caveat that no more than one hoverlabel will appear per trace.","If *x unified* (or *y unified*), a single hoverlabel will appear","multiple points at the closest x- (or y-) coordinate within the `hoverdistance`","with the caveat that no more than one hoverlabel will appear per trace.","In this mode, spikelines are enabled by default perpendicular to the specified axis.","If false, hover interactions are disabled."].join(" ")},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none",description:["Determines expansion of hover effects to other subplots","If *single* just the axis pair of the primary point is included without overlaying subplots.","If *overlaying* all subplots using the main axis and occupying the same space are included.","If *axis*, also include stacked subplots using the same axis","when `hovermode` is set to *x*, *x unified*, *y* or *y unified*."].join(" ")},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none",description:["Sets the default distance (in pixels) to look for data","to add hover labels (-1 means no cutoff, 0 means no looking for data).","This is only a real distance for hovering on point-like objects,","like scatter points. For area-like objects (bars, scatter fills, etc)","hovering is on inside the area and off outside, but these objects","will not supersede hover on point-like objects in case of conflict."].join(" ")},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none",description:["Sets the default distance (in pixels) to look for data to draw","spikelines to (-1 means no cutoff, 0 means no looking for data).","As with hoverdistance, distance does not apply to area-like objects.","In addition, some objects can be hovered on but will not generate","spikelines, such as scatter fills."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"none",description:["Sets the background color of all hover labels on graph"].join(" ")},bordercolor:{valType:"color",editType:"none",description:["Sets the border color of all hover labels on graph."].join(" ")},font:o,grouptitlefont:i({editType:"none",description:["Sets the font for group titles in hover (unified modes).","Defaults to `hoverlabel.font`."].join(" ")}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none",description:["Sets the horizontal alignment of the text content within hover label box.","Has an effect only if the hover label text spans more two or more lines"].join(" ")},namelength:{valType:"integer",min:-1,dflt:15,editType:"none",description:["Sets the default length (in number of characters) of the trace name in","the hover labels for all traces. -1 shows the whole name","regardless of length. 0-3 shows the first 0-3 characters, and","an integer >3 will show the whole name if it is less than that","many characters, but if it is longer, will truncate to","`namelength - 3` characters and add an ellipsis."].join(" ")},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",description:["When `dragmode` is set to *select*, this limits the selection of the drag to","horizontal, vertical or diagonal. *h* only allows horizontal selection,","*v* only vertical, *d* only diagonal and *any* sets no limit."].join(" "),editType:"none"}}},3315:(t,e,r)=>{"use strict";var n=r(12822),i=r(53572),o=r(85400),a=r(33369);t.exports=function(t,e){function r(r,o){return n.coerce(t,e,i,r,o)}o(t,e)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var s=e._has("mapbox"),l=e._has("geo"),c=e._basePlotModules.length;"zoom"===e.dragmode&&((s||l)&&1===c||s&&l&&2===c)&&(e.dragmode="pan"),a(t,e,r),n.coerceFont(r,"hoverlabel.grouptitlefont",e.hoverlabel.font)}},26271:(t,e,r)=>{"use strict";var n=r(12822),i=r(33369),o=r(53572);t.exports=function(t,e){i(t,e,(function(r,i){return n.coerce(t,e,o,r,i)}))}},4664:(t,e,r)=>{"use strict";var n=r(12822),i=r(46233).counter,o=r(40365).u,a=r(21197).idRegex,s=r(46121),l={rows:{valType:"integer",min:1,editType:"plot",description:["The number of rows in the grid. If you provide a 2D `subplots`","array or a `yaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot",description:["Is the first row the top or the bottom? Note that columns","are always enumerated from left to right."].join(" ")},columns:{valType:"integer",min:1,editType:"plot",description:["The number of columns in the grid. If you provide a 2D `subplots`","array, the length of its longest row is used as the default.","If you give an `xaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[i("xy").toString(),""],editType:"plot"},editType:"plot",description:["Used for freeform grids, where some axes may be shared across subplots","but others are not. Each entry should be a cartesian subplot id, like","*xy* or *x3y2*, or ** to leave that cell empty. You may reuse x axes","within the same column, and y axes within the same row.","Non-cartesian subplots and traces that support `domain` can place themselves","in this grid separately using the `gridcell` attribute."].join(" ")},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[a.x.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an x axis id like *x*, *x2*, etc., or ** to","not put an x axis in that column. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `yaxes` is present,","will generate consecutive IDs."].join(" ")},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[a.y.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an y axis id like *y*, *y2*, etc., or ** to","not put a y axis in that row. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `xaxes` is present,","will generate consecutive IDs."].join(" ")},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot",description:["If no `subplots`, `xaxes`, or `yaxes` are given but we do have `rows` and `columns`,","we can generate defaults using consecutive axis IDs, in two ways:","*coupled* gives one x axis per column and one y axis per row.","*independent* uses a new xy pair for each cell, left-to-right across each row","then iterating rows according to `roworder`."].join(" ")},xgap:{valType:"number",min:0,max:1,editType:"plot",description:["Horizontal space between grid cells, expressed as a fraction","of the total width available to one cell. Defaults to 0.1","for coupled-axes grids and 0.2 for independent grids."].join(" ")},ygap:{valType:"number",min:0,max:1,editType:"plot",description:["Vertical space between grid cells, expressed as a fraction","of the total height available to one cell. Defaults to 0.1","for coupled-axes grids and 0.3 for independent grids."].join(" ")},domain:o({name:"grid",editType:"plot",noGridCell:!0},{description:["The first and last cells end exactly at the domain","edges, with no grout around the edges."].join(" ")}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot",description:["Sets where the x axis labels and titles go. *bottom* means","the very bottom of the grid. *bottom plot* is the lowest plot","that each x axis is used in. *top* and *top plot* are similar."].join(" ")},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot",description:["Sets where the y axis labels and titles go. *left* means","the very left edge of the grid. *left plot* is the leftmost plot","that each y axis is used in. *right* and *right plot* are similar."].join(" ")},editType:"plot"};function c(t,e,r){var n=e[r+"axes"],i=Object.keys((t._splomAxes||{})[r]||{});return Array.isArray(n)?n:i.length?i:void 0}function d(t,e,r,n,i,o){var a=e(t+"gap",r),s=e("domain."+t);e(t+"side",n);for(var l=new Array(i),c=s[0],d=(s[1]-c)/(i-a),u=d*(1-a),h=0;h1){h||f||p||"independent"===A("pattern")&&(h=!0),g._hasSubplotGrid=h;var y,x,w="top to bottom"===A("roworder"),_=h?.2:.1,k=h?.3:.1;m&&e._splomGridDflt&&(y=e._splomGridDflt.xside,x=e._splomGridDflt.yside),g._domains={x:d("x",A,_,y,b),y:d("y",A,k,x,v,w)}}else delete e.grid}function A(t,e){return n.coerce(r,g,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,i,o,a,s,l,d,h=t.grid||{},f=e._subplots,p=r._hasSubplotGrid,m=r.rows,g=r.columns,v="independent"===r.pattern,b=r._axisMap={};if(p){var y=h.subplots||[];l=r.subplots=new Array(m);var x=1;for(n=0;n{"use strict";var n=r(21197),i=r(46121).templatedArray,o=r(53644);t.exports=i("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw",description:["Determines whether or not this image is visible."].join(" ")},source:{valType:"string",editType:"arraydraw",description:["Specifies the URL of the image to be used.","The URL must be accessible from the domain where the","plot code is run, and can be either relative or absolute."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw",description:["Specifies whether images are drawn below or above traces.","When `xref` and `yref` are both set to `paper`,","image is drawn below the entire plot area."].join(" ")},sizex:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size horizontally.","The image will be sized based on the `position` value.","When `xref` is set to `paper`, units are sized relative","to the plot width.","When `xref` ends with ` domain`, units are sized relative","to the axis width."].join(" ")},sizey:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size vertically.","The image will be sized based on the `position` value.","When `yref` is set to `paper`, units are sized relative","to the plot height.","When `yref` ends with ` domain`, units are sized relative","to the axis height."].join(" ")},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw",description:["Specifies which dimension of the image to constrain."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the image."},x:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's x position.","When `xref` is set to `paper`, units are sized relative","to the plot height.","See `xref` for more info"].join(" ")},y:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's y position.","When `yref` is set to `paper`, units are sized relative","to the plot height.","See `yref` for more info"].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw",description:"Sets the anchor for the x position"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw",description:"Sets the anchor for the y position."},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's x coordinate axis.",o.axisRefDescription("x","left","right")].join(" ")},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's y coordinate axis.",o.axisRefDescription("y","bottom","top")].join(" ")},editType:"arraydraw"})},22470:(t,e,r)=>{"use strict";var n=r(7370),i=r(61814);t.exports=function(t,e,r,o){e=e||{};var a="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(a||s)for(var l,c,d=t._fullLayout.images,u=e._id.charAt(0),h=0;h{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(3653);function s(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}var s=o("source");if(!o("visible",!!s))return e;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var l={_fullLayout:r},c=["x","y"],d=0;d<2;d++){var u=c[d],h=i.coerceRef(t,e,l,u,"paper",void 0);"paper"!==h&&i.getFromId(l,h)._imgIndices.push(e._index),i.coercePosition(e,l,o,h,u,0)}return e}t.exports=function(t,e){o(t,e,{name:"images",handleItemDefaults:s})}},87030:(t,e,r)=>{"use strict";var n=r(27941),i=r(40666),o=r(75815),a=r(99246),s=r(25853);t.exports=function(t){var e,r,l=t._fullLayout,c=[],d={},u=[];for(r=0;r{"use strict";t.exports={moduleType:"component",name:"images",layoutAttributes:r(3653),supplyLayoutDefaults:r(96658),includeBasePlot:r(39859)("images"),draw:r(87030),convertCoords:r(22470)}},15524:(t,e,r)=>{"use strict";var n=r(75058),i=r(84226);t.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend",description:["Determines whether or not this legend is visible."].join(" ")},bgcolor:{valType:"color",editType:"legend",description:["Sets the legend background color.","Defaults to `layout.paper_bgcolor`."].join(" ")},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"legend",description:"Sets the color of the border enclosing the legend."},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend",description:"Sets the width (in px) of the border enclosing the legend."},font:n({editType:"legend",description:"Sets the font used to text the legend items."}),grouptitlefont:n({editType:"legend",description:["Sets the font for group titles in legend.","Defaults to `legend.font` with its size increased about 10%."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend",description:"Sets the orientation of the legend."},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend",description:["Determines the order at which the legend items are displayed.","If *normal*, the items are displayed top-to-bottom in the same","order as the input data.","If *reversed*, the items are displayed in the opposite order","as *normal*.","If *grouped*, the items are displayed in groups","(when a trace `legendgroup` is provided).","if *grouped+reversed*, the items are displayed in the opposite order","as *grouped*."].join(" ")},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend",description:["Sets the amount of vertical space (in px) between legend groups."].join(" ")},entrywidth:{valType:"number",min:0,editType:"legend",description:["Sets the width (in px or fraction) of the legend.","Use 0 to size the entry based on the text width,","when `entrywidthmode` is set to *pixels*."].join(" ")},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend",description:"Determines what entrywidth means."},indentation:{valType:"number",min:-15,dflt:0,editType:"legend",description:"Sets the indentation (in px) of the legend entries."},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend",description:["Determines if the legend items symbols scale with their corresponding *trace* attributes","or remain *constant* independent of the symbol size on the graph."].join(" ")},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend",description:"Sets the width (in px) of the legend item symbols (the part other than the title.text)."},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend",description:["Determines the behavior on legend item click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item click interactions."].join(" ")},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend",description:["Determines the behavior on legend item double-click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item double-click interactions."].join(" ")},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend",description:["Determines the behavior on legend group item click.","*toggleitem* toggles the visibility of the individual item clicked on the graph.","*togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph."].join(" ")},x:{valType:"number",editType:"legend",description:["Sets the x position with respect to `xref` (in normalized coordinates) of the legend.","When `xref` is *paper*, defaults to *1.02* for vertical legends and","defaults to *0* for horizontal legends.","When `xref` is *container*, defaults to *1* for vertical legends and","defaults to *0* for horizontal legends.","Must be between *0* and *1* if `xref` is *container*.","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend",description:["Sets the legend's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the legend.","Value *auto* anchors legends to the right for `x` values greater than or equal to 2/3,","anchors legends to the left for `x` values less than or equal to 1/3 and","anchors legends with respect to their center otherwise."].join(" ")},y:{valType:"number",editType:"legend",description:["Sets the y position with respect to `yref` (in normalized coordinates) of the legend.","When `yref` is *paper*, defaults to *1* for vertical legends,","defaults to *-0.1* for horizontal legends on graphs w/o range sliders and","defaults to *1.1* for horizontal legends on graph with one or multiple range sliders.","When `yref` is *container*, defaults to *1*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend",description:["Sets the legend's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the legend.","Value *auto* anchors legends at their bottom for `y` values less than or equal to 1/3,","anchors legends to at their top for `y` values greater than or equal to 2/3 and","anchors legends with respect to their middle otherwise."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of legend-driven changes in trace and pie label","visibility. Defaults to `layout.uirevision`."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend",description:["Sets the vertical alignment of the symbols with respect to their associated text."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"legend",description:["Sets the title of the legend."].join(" ")},font:n({editType:"legend",description:["Sets this legend's title font.","Defaults to `legend.font` with its size increased about 20%."].join(" ")}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend",description:["Determines the location of legend's title","with respect to the legend items.","Defaulted to *top* with `orientation` is *h*.","Defaulted to *left* with `orientation` is *v*.","The *top left* options could be used to expand","top center and top right are for horizontal alignment","legend area in both x and y sides."].join(" ")},editType:"legend"},editType:"legend"}},4496:t=>{"use strict";t.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},64083:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822),o=r(46121),a=r(3520),s=r(15524),l=r(13195),c=r(18804);function d(t,e,r,d){var u=e[t]||{},h=o.newContainer(r,t);function f(t,e){return i.coerce(u,h,s,t,e)}var p=i.coerceFont(f,"font",r.font);if(f("bgcolor",r.paper_bgcolor),f("bordercolor"),f("visible")){for(var m,g=function(t,e){var r=m._input,n=m;return i.coerce(r,n,a,t,e)},v=r.font||{},b=i.coerceFont(f,"grouptitlefont",i.extendFlat({},v,{size:Math.round(1.1*v.size)})),y=0,x=!1,w="normal",_=(r.shapes||[]).filter((function(t){return t.showlegend})),k=d.concat(_).filter((function(e){return t===(e.legend||"legend")})),A=0;A("legend"===t?1:0));if(!1===M&&(r[t]=void 0),(!1!==M||u.uirevision)&&(f("uirevision",r.uirevision),!1!==M)){f("borderwidth");var S,C,E,L="h"===f("orientation"),z="paper"===f("yref"),O="paper"===f("xref"),D="left";if(L?(S=0,n.getComponentMethod("rangeslider","isVisible")(e.xaxis)?z?(C=1.1,E="bottom"):(C=1,E="top"):z?(C=-.1,E="top"):(C=0,E="bottom")):(C=1,E="auto",O?S=1.02:(S=1,D="right")),i.coerce(u,h,{x:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:S}},"x"),i.coerce(u,h,{y:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:C}},"y"),f("traceorder",w),c.isGrouped(r[t])&&f("tracegroupgap"),f("entrywidth"),f("entrywidthmode"),f("indentation"),f("itemsizing"),f("itemwidth"),f("itemclick"),f("itemdoubleclick"),f("groupclick"),f("xanchor",D),f("yanchor",E),f("valign"),i.noneOrAll(u,h,["x","y"]),f("title.text")){f("title.side",L?"left":"top");var I=i.extendFlat({},p,{size:i.bigFont(p.size)});i.coerceFont(f,"title.font",I)}}}}t.exports=function(t,e,r){var n,o=r.slice(),a=e.shapes;if(a)for(n=0;n{"use strict";var n=r(27941),i=r(12822),o=r(51137),a=r(25059),s=r(16677),l=r(19846),c=r(40666),d=r(17499),u=r(80394),h=r(52656),f=r(4496),p=r(89701),m=p.LINE_SPACING,g=p.FROM_TL,v=p.FROM_BR,b=r(71988),y=r(26972),x=r(18804),w=1,_=/^legend[0-9]*$/;function k(t,e){var r,s,h=e||{},p=t._fullLayout,_=O(h),k=h._inHover;if(k?(s=h.layer,r="hover"):(s=p._infolayer,r=_),s){var S;if(r+=p._uid,t._legendMouseDownTime||(t._legendMouseDownTime=0),k){if(!h.entries)return;S=b(h.entries,h)}else{for(var D=(t.calcdata||[]).slice(),I=p.shapes,R=0;R1)}var j=p.hiddenlabels||[];if(!(k||p.showlegend&&S.length))return s.selectAll("."+_).remove(),p._topdefs.select("#"+r).remove(),o.autoMargin(t,_);var N=i.ensureSingle(s,"g",_,(function(t){k||t.attr("pointer-events","all")})),B=i.ensureSingleById(p._topdefs,"clipPath",r,(function(t){t.append("rect")})),U=i.ensureSingle(N,"rect","bg",(function(t){t.attr("shape-rendering","crispEdges")}));U.call(d.stroke,h.bordercolor).call(d.fill,h.bgcolor).style("stroke-width",h.borderwidth+"px");var G,V=i.ensureSingle(N,"g","scrollbox"),H=h.title;h._titleWidth=0,h._titleHeight=0,H.text?((G=i.ensureSingle(V,"text",_+"titletext")).attr("text-anchor","start").call(c.font,H.font).text(H.text),E(G,V,t,h,w)):V.selectAll("."+_+"titletext").remove();var W=i.ensureSingle(N,"rect","scrollbar",(function(t){t.attr(f.scrollBarEnterAttrs).call(d.fill,f.scrollBarColor)})),q=V.selectAll("g.groups").data(S);q.enter().append("g").attr("class","groups"),q.exit().remove();var Y=q.selectAll("g.traces").data(i.identity);Y.enter().append("g").attr("class","traces"),Y.exit().remove(),Y.style("opacity",(function(t){var e=t[0].trace;return a.traceIs(e,"pie-like")?-1!==j.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1})).each((function(){n.select(this).call(M,t,h)})).call(y,t,h).each((function(){k||n.select(this).call(C,t,_)})),i.syncOrAsync([o.previousPromises,function(){return function(t,e,r,i){var o=t._fullLayout,a=O(i);i||(i=o[a]);var s=o._size,l=x.isVertical(i),d=x.isGrouped(i),u="fraction"===i.entrywidthmode,h=i.borderwidth,p=2*h,m=f.itemGap,g=i.indentation+i.itemwidth+2*m,v=2*(h+m),b=z(i),y=i.y<0||0===i.y&&"top"===b,w=i.y>1||1===i.y&&"bottom"===b,_=i.tracegroupgap,k={};i._maxHeight=Math.max(y||w?o.height/2:s.h,30);var T=0;i._width=0,i._height=0;var M=function(t){var e=0,r=0,n=t.title.side;return n&&(-1!==n.indexOf("left")&&(e=t._titleWidth),-1!==n.indexOf("top")&&(r=t._titleHeight)),[e,r]}(i);if(l)r.each((function(t){var e=t[0].height;c.setTranslate(this,h+M[0],h+M[1]+i._height+e/2+m),i._height+=e,i._width=Math.max(i._width,t[0].width)})),T=g+i._width,i._width+=m+g+p,i._height+=v,d&&(e.each((function(t,e){c.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var S=L(i),C=i.x<0||0===i.x&&"right"===S,E=i.x>1||1===i.x&&"left"===S,D=w||y,I=o.width/2;i._maxWidth=Math.max(C?D&&"left"===S?s.l+s.w:I:E?D&&"right"===S?s.r+s.w:I:s.w,2*g);var R=0,F=0;r.each((function(t){var e=A(t,i,g);R=Math.max(R,e),F+=e})),T=null;var P=0;if(d){var j=0,N=0,B=0;e.each((function(){var t=0,e=0;n.select(this).selectAll("g.traces").each((function(r){var n=A(r,i,g),o=r[0].height;c.setTranslate(this,M[0],M[1]+h+m+o/2+e),e+=o,t=Math.max(t,n),k[r[0].trace.legendgroup]=t}));var r=t+m;N>0&&r+h+N>i._maxWidth?(P=Math.max(P,N),N=0,B+=j+_,j=e):j=Math.max(j,e),c.setTranslate(this,N,B),N+=r})),i._width=Math.max(P,N)+h,i._height=B+j+v}else{var U=r.size(),G=F+p+(U-1)*m=i._maxWidth&&(P=Math.max(P,q),H=0,W+=V,i._height+=V,V=0),c.setTranslate(this,M[0]+h+H,M[1]+h+W+e/2+m),q=H+r+m,H+=n,V=Math.max(V,e)})),G?(i._width=H+p,i._height=V+v):(i._width=Math.max(P,q)+p,i._height+=V+v)}}i._width=Math.ceil(Math.max(i._width+M[0],i._titleWidth+2*(h+f.titlePad))),i._height=Math.ceil(Math.max(i._height+M[1],i._titleHeight+2*(h+f.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var Y=t._context.edits,Z=Y.legendText||Y.legendPosition;r.each((function(t){var e=n.select(this).select("."+a+"toggle"),r=t[0].height,o=t[0].trace.legendgroup,s=A(t,i,g);d&&""!==o&&(s=k[o]);var h=Z?g:T||s;l||u||(h+=m/2),c.setRect(e,0,-r/2,h,r)}))}(t,q,Y,h)},function(){var e,d,b,y,x=p._size,w=h.borderwidth,A="paper"===h.xref,M="paper"===h.yref;if(H.text&&function(t,e,r){if("top center"===e.title.side||"top right"===e.title.side){var n=e.title.font.size*m,i=0,o=t.node(),a=c.bBox(o).width;"top center"===e.title.side?i=.5*(e._width-2*r-2*f.titlePad-a):"top right"===e.title.side&&(i=e._width-2*r-2*f.titlePad-a),u.positionText(t,r+f.titlePad+i,r+n)}}(G,h,w),!k){var S,C;S=A?x.l+x.w*h.x-g[L(h)]*h._width:p.width*h.x-g[L(h)]*h._width,C=M?x.t+x.h*(1-h.y)-g[z(h)]*h._effHeight:p.height*(1-h.y)-g[z(h)]*h._effHeight;var E=function(t,e,r,n){var i=t._fullLayout,a=i[e],s=L(a),l=z(a),c="paper"===a.xref,d="paper"===a.yref;t._fullLayout._reservedMargin[e]={};var u=a.y<.5?"b":"t",h=a.x<.5?"l":"r",f={r:i.width-r,l:r+a._width,b:i.height-n,t:n+a._effHeight};if(c&&d)return o.autoMargin(t,e,{x:a.x,y:a.y,l:a._width*g[s],r:a._width*v[s],b:a._effHeight*v[l],t:a._effHeight*g[l]});c?t._fullLayout._reservedMargin[e][u]=f[u]:d||"v"===a.orientation?t._fullLayout._reservedMargin[e][h]=f[h]:t._fullLayout._reservedMargin[e][u]=f[u]}(t,_,S,C);if(E)return;if(p.margin.autoexpand){var O=S,D=C;S=A?i.constrain(S,0,p.width-h._width):O,C=M?i.constrain(C,0,p.height-h._effHeight):D,S!==O&&i.log("Constrain "+_+".x to make legend fit inside graph"),C!==D&&i.log("Constrain "+_+".y to make legend fit inside graph")}c.setTranslate(N,S,C)}if(W.on(".drag",null),N.on("wheel",null),k||h._height<=h._maxHeight||t._context.staticPlot){var I=h._effHeight;k&&(I=h._height),U.attr({width:h._width-w,height:I-w,x:w/2,y:w/2}),c.setTranslate(V,0,0),B.select("rect").attr({width:h._width-2*w,height:I-2*w,x:w,y:w}),c.setClipUrl(V,r,t),c.setRect(W,0,0,0,0),delete h._scrollY}else{var R,F,P,j=Math.max(f.scrollBarMinHeight,h._effHeight*h._effHeight/h._height),q=h._effHeight-j-2*f.scrollBarMargin,Y=h._height-h._effHeight,Z=q/Y,X=Math.min(h._scrollY||0,Y);U.attr({width:h._width-2*w+f.scrollBarWidth+f.scrollBarMargin,height:h._effHeight-w,x:w/2,y:w/2}),B.select("rect").attr({width:h._width-2*w+f.scrollBarWidth+f.scrollBarMargin,height:h._effHeight-2*w,x:w,y:w+X}),c.setClipUrl(V,r,t),K(X,j,Z),N.on("wheel",(function(){K(X=i.constrain(h._scrollY+n.event.deltaY/q*Y,0,Y),j,Z),0!==X&&X!==Y&&n.event.preventDefault()}));var $=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;R="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,P=X})).on("drag",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(F="touchmove"===t.type?t.changedTouches[0].clientY:t.clientY,X=function(t,e,r){var n=(r-e)/Z+t;return i.constrain(n,0,Y)}(P,R,F),K(X,j,Z))}));W.call($);var J=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(R=t.changedTouches[0].clientY,P=X)})).on("drag",(function(){var t=n.event.sourceEvent;"touchmove"===t.type&&(F=t.changedTouches[0].clientY,X=function(t,e,r){var n=(e-r)/Z+t;return i.constrain(n,0,Y)}(P,R,F),K(X,j,Z))}));V.call(J)}function K(e,r,n){h._scrollY=t._fullLayout[_]._scrollY=e,c.setTranslate(V,0,-e),c.setRect(W,h._width,f.scrollBarMargin+e*n,f.scrollBarWidth,r),B.select("rect").attr("y",w+e)}t._context.edits.legendPosition&&(N.classed("cursor-move",!0),l.init({element:N.node(),gd:t,prepFn:function(){var t=c.getTranslate(N);b=t.x,y=t.y},moveFn:function(t,r){var n=b+t,i=y+r;c.setTranslate(N,n,i),e=l.align(n,h._width,x.l,x.l+x.w,h.xanchor),d=l.align(i+h._height,-h._height,x.t+x.h,x.t,h.yanchor)},doneFn:function(){if(void 0!==e&&void 0!==d){var r={};r[_+".x"]=e,r[_+".y"]=d,a.call("_guiRelayout",t,r)}},clickFn:function(e,r){var n=s.selectAll("g.traces").filter((function(){var t=this.getBoundingClientRect();return r.clientX>=t.left&&r.clientX<=t.right&&r.clientY>=t.top&&r.clientY<=t.bottom}));n.size()>0&&T(t,N,n,e,r)}}))}],t)}}function A(t,e,r){var n=t[0],i=n.width,o=e.entrywidthmode,a=n.trace.legendwidth||e.entrywidth;return"fraction"===o?e._maxWidth*a:r+(a||i)}function T(t,e,r,n,i){var o=r.data()[0][0].trace,l={event:i,node:r.node(),curveNumber:o.index,expandedIndex:o._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};o._group&&(l.group=o._group),a.traceIs(o,"pie-like")&&(l.label=r.datum()[0].label);var c=s.triggerHandler(t,"plotly_legendclick",l);if(1===n){if(!1===c)return;e._clickTimeout=setTimeout((function(){t._fullLayout&&h(r,t,n)}),t._context.doubleClickDelay)}else 2===n&&(e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,"plotly_legenddoubleclick",l)&&!1!==c&&h(r,t,n))}function M(t,e,r){var n,o,s=O(r),l=t.data()[0][0],d=l.trace,h=a.traceIs(d,"pie-like"),p=!r._inHover&&e._context.edits.legendText&&!h,m=r._maxNameLength;l.groupTitle?(n=l.groupTitle.text,o=l.groupTitle.font):(o=r.font,r.entries?n=l.text:(n=h?l.label:d.name,d._meta&&(n=i.templateString(n,d._meta))));var g=i.ensureSingle(t,"text",s+"text");g.attr("text-anchor","start").call(c.font,o).text(p?S(n,m):n);var v=r.indentation+r.itemwidth+2*f.itemGap;u.positionText(g,v,0),p?g.call(u.makeEditable,{gd:e,text:n}).call(E,t,e,r).on("edit",(function(n){this.text(S(n,m)).call(E,t,e,r);var o=l.trace._fullInput||{},s={};if(a.hasTransform(o,"groupby")){var c=a.getTransformIndices(o,"groupby"),u=c[c.length-1],h=i.keyedContainer(o,"transforms["+u+"].styles","target","value.name");h.set(l.trace._group,n),s=h.constructUpdate()}else s.name=n;return o._isShape?a.call("_guiRelayout",e,"shapes["+d.index+"].name",s.name):a.call("_guiRestyle",e,s,d.index)})):E(g,t,e,r)}function S(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;for(var n=r-(t=t||"").length;n>0;n--)t+=" ";return t}function C(t,e,r){var o,a=e._context.doubleClickDelay,s=1,l=i.ensureSingle(t,"rect",r+"toggle",(function(t){e._context.staticPlot||t.style("cursor","pointer").attr("pointer-events","all"),t.call(d.fill,"rgba(0,0,0,0)")}));e._context.staticPlot||(l.on("mousedown",(function(){(o=(new Date).getTime())-e._legendMouseDownTimea&&(s=Math.max(s-1,1)),T(e,i,t,s,n.event)}})))}function E(t,e,r,n,i){n._inHover&&t.attr("data-notex",!0),u.convertToTspans(t,r,(function(){!function(t,e,r,n){var i=t.data()[0][0];if(r._inHover||!i||i.trace.showlegend){var o=t.select("g[class*=math-group]"),a=o.node(),s=O(r);r||(r=e._fullLayout[s]);var l,d,h=r.borderwidth,p=(n===w?r.title.font:i.groupTitle?i.groupTitle.font:r.font).size*m;if(a){var g=c.bBox(a);l=g.height,d=g.width,n===w?c.setTranslate(o,h,h+.75*l):c.setTranslate(o,0,.25*l)}else{var v="."+s+(n===w?"title":"")+"text",b=t.select(v),y=u.lineCount(b),x=b.node();if(l=p*y,d=x?c.bBox(x).width:0,n===w)"left"===r.title.side&&(d+=2*f.itemGap),u.positionText(b,h+f.titlePad,h+p);else{var _=2*f.itemGap+r.indentation+r.itemwidth;i.groupTitle&&(_=f.itemGap,d-=r.indentation+r.itemwidth),u.positionText(b,_,-p*((y-1)/2-.3))}}n===w?(r._titleWidth=d,r._titleHeight=l):(i.lineHeight=p,i.height=Math.max(l,16)+3,i.width=d)}else t.remove()}(e,r,n,i)}))}function L(t){return i.isRightAnchor(t)?"right":i.isCenterAnchor(t)?"center":"left"}function z(t){return i.isBottomAnchor(t)?"bottom":i.isMiddleAnchor(t)?"middle":"top"}function O(t){return t._id||"legend"}t.exports=function(t,e){if(e)k(t,e);else{var r=t._fullLayout,i=r._legends;r._infolayer.selectAll('[class^="legend"]').each((function(){var t=n.select(this),e=t.attr("class").split(" ")[0];e.match(_)&&-1===i.indexOf(e)&&t.remove()}));for(var o=0;o{"use strict";var n=r(25059),i=r(18804);t.exports=function(t,e,r){var o,a,s=e._inHover,l=i.isGrouped(e),c=i.isReversed(e),d={},u=[],h=!1,f={},p=0,m=0;function g(t,n,o){if(!1!==e.visible&&(!r||t===e._id))if(""!==n&&i.isGrouped(e))-1===u.indexOf(n)?(u.push(n),h=!0,d[n]=[o]):d[n].push(o);else{var a="~~i"+p;u.push(a),d[a]=[o],p++}}for(o=0;oS&&(M=S)}A[o][0]._groupMinRank=M,A[o][0]._preGroupSort=o}var C=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(A.forEach((function(t,e){t[0]._preGroupSort=e})),A.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),o=0;o{"use strict";var n=r(25059),i=r(12822),o=i.pushUnique,a=!0;t.exports=function(t,e,r){var s=e._fullLayout;if(!e._dragged&&!e._editing){var l,c=s.legend.itemclick,d=s.legend.itemdoubleclick,u=s.legend.groupclick;if(1===r&&"toggle"===c&&"toggleothers"===d&&a&&e.data&&e._context.showTips?(i.notifier(i._(e,"Double-click on legend to isolate one trace"),"long"),a=!1):a=!1,1===r?l=c:2===r&&(l=d),l){var h="togglegroup"===u,f=s.hiddenlabels?s.hiddenlabels.slice():[],p=t.data()[0][0];if(!p.groupTitle||!p.noClick){var m=e._fullData,g=(s.shapes||[]).filter((function(t){return t.showlegend})),v=m.concat(g),b=p.trace;b._isShape&&(b=b._fullInput);var y,x,w,_,k,A=b.legendgroup,T={},M=[],S=[],C=[],E=(s.shapes||[]).map((function(t){return t._input})),L=!1,z=b.legend,O=b._fullInput;if(O&&O._isShape||!n.traceIs(b,"pie-like")){var D,I=A&&A.length,R=[];if(I)for(y=0;y{"use strict";e.isGrouped=function(t){return-1!==(t.traceorder||"").indexOf("grouped")},e.isVertical=function(t){return"h"!==t.orientation},e.isReversed=function(t){return-1!==(t.traceorder||"").indexOf("reversed")}},97833:(t,e,r)=>{"use strict";t.exports={moduleType:"component",name:"legend",layoutAttributes:r(15524),supplyLayoutDefaults:r(64083),draw:r(67739),style:r(26972)}},26972:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=o.strTranslate,s=r(40666),l=r(17499),c=r(42226).extractOpts,d=r(677),u=r(62970),h=r(17269).castOption,f=r(4496);function p(t,e){return(e?"radial":"horizontal")+(t?"":"reversed")}function m(t){var e=t[0].trace,r=e.contours,n=d.hasLines(e),i=d.hasMarkers(e),o=e.visible&&e.fill&&"none"!==e.fill,a=!1,s=!1;if(r){var l=r.coloring;"lines"===l?a=!0:n="none"===l||"heatmap"===l||r.showlines,"constraint"===r.type?o="="!==r._operation:"fill"!==l&&"heatmap"!==l||(s=!0)}return{showMarker:i,showLine:n,showFill:o,showGradientLine:a,showGradientFill:s,anyLine:n||a,anyFill:o||s}}function g(t,e,r){return t&&o.isArrayOrTypedArray(t)?e:t>r?r:t}t.exports=function(t,e,r){var v=e._fullLayout;r||(r=v.legend);var b="constant"===r.itemsizing,y=r.itemwidth,x=(y+2*f.itemGap)/2,w=a(x,0),_=function(t,e,r,n){var i;if(t+1)i=t;else{if(!(e&&e.width>0))return 0;i=e.width}return b?n:Math.min(i,r)};function k(t,o,a){var d=t[0].trace,u=d.marker||{},h=u.line||{},f=u.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",p=a?d.visible&&d.type===a:i.traceIs(d,"bar"),m=n.select(o).select("g.legendpoints").selectAll("path.legend"+a).data(p?[t]:[]);m.enter().append("path").classed("legend"+a,!0).attr("d",f).attr("transform",w),m.exit().remove(),m.each((function(t){var i=n.select(this),o=t[0],a=_(o.mlw,u.line,5,2);i.style("stroke-width",a+"px");var f=o.mcc;if(!r._inHover&&"mc"in o){var p=c(u),m=p.mid;void 0===m&&(m=(p.max+p.min)/2),f=s.tryColorscale(u,"")(m)}var v=f||o.mc||u.color,b=u.pattern,y=b&&s.getPatternAttr(b.shape,0,"");if(y){var x=s.getPatternAttr(b.bgcolor,0,null),w=s.getPatternAttr(b.fgcolor,0,null),k=b.fgopacity,A=g(b.size,8,10),T=g(b.solidity,.5,1),M="legend-"+d.uid;i.call(s.pattern,"legend",e,M,y,A,T,f,b.fillmode,x,w,k)}else i.call(l.fill,v);a&&l.stroke(i,o.mlc||h.color)}))}function A(t,r,a){var s=t[0],l=s.trace,c=a?l.visible&&l.type===a:i.traceIs(l,a),d=n.select(r).select("g.legendpoints").selectAll("path.legend"+a).data(c?[t]:[]);if(d.enter().append("path").classed("legend"+a,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",w),d.exit().remove(),d.size()){var f=l.marker||{},p=_(h(f.line.width,s.pts),f.line,5,2),m="pieLike",g=o.minExtend(l,{marker:{line:{width:p}}},m),v=o.minExtend(s,{trace:g},m);u(d,v,g,e)}}t.each((function(t){var e=n.select(this),i=o.ensureSingle(e,"g","layers");i.style("opacity",t[0].trace.opacity);var s=r.indentation,l=r.valign,c=t[0].lineHeight,d=t[0].height;if("middle"===l&&0===s||!c||!d)i.attr("transform",null);else{var u={top:1,bottom:-1}[l]*(.5*(c-d+3))||0,h=r.indentation;i.attr("transform",a(h,u))}i.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var f=i.selectAll("g.legendsymbols").data([t]);f.enter().append("g").classed("legendsymbols",!0),f.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)})).each((function(t){var r,i=t[0].trace,a=[];if(i.visible)switch(i.type){case"histogram2d":case"heatmap":a=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":a=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":a=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":a=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],r=!1;break;case"streamtube":a=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],r=!1;break;case"surface":a=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],r=!0;break;case"mesh3d":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var d=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(a);d.enter().append("path").classed("legend3dandfriends",!0).attr("transform",w).style("stroke-miterlimit",1),d.exit().remove(),d.each((function(t,a){var d,u=n.select(this),h=c(i),f=h.colorscale,m=h.reversescale;if(f){if(!r){var g=f.length;d=0===a?f[m?g-1:0][1]:1===a?f[m?0:g-1][1]:f[Math.floor((g-1)/2)][1]}}else{var v=i.vertexcolor||i.facecolor||i.color;d=o.isArrayOrTypedArray(v)?v[a]||v[0]:v}u.attr("d",t[0]),d?u.call(l.fill,d):u.call((function(t){if(t.size()){var n="legendfill-"+i.uid;s.gradient(t,e,n,p(m,"radial"===r),f,"fill")}}))}))})).each((function(t){var e=t[0].trace,r="waterfall"===e.type;if(t[0]._distinct&&r){var i=t[0].trace[t[0].dir].marker;return t[0].mc=i.color,t[0].mlw=i.line.width,t[0].mlc=i.line.color,k(t,this,"waterfall")}var o=[];e.visible&&r&&(o=t[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var a=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(o);a.enter().append("path").classed("legendwaterfall",!0).attr("transform",w).style("stroke-miterlimit",1),a.exit().remove(),a.each((function(t){var r=n.select(this),i=e[t[0]].marker,o=_(void 0,i.line,5,2);r.attr("d",t[1]).style("stroke-width",o+"px").call(l.fill,i.color),o&&r.call(l.stroke,i.line.color)}))})).each((function(t){k(t,this,"funnel")})).each((function(t){k(t,this)})).each((function(t){var r=t[0].trace,a=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&i.traceIs(r,"box-violin")?[t]:[]);a.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",w),a.exit().remove(),a.each((function(){var t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=_(void 0,r.line,5,2);t.style("stroke-width",i+"px").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var c=o.minExtend(r,{marker:{size:b?12:o.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});a.call(s.pointStyle,c,e)}}))})).each((function(t){A(t,this,"funnelarea")})).each((function(t){A(t,this,"pie")})).each((function(t){var r,i,a=m(t),l=a.showFill,u=a.showLine,h=a.showGradientLine,f=a.showGradientFill,g=a.anyFill,v=a.anyLine,b=t[0],x=b.trace,w=c(x),k=w.colorscale,A=w.reversescale,T=d.hasMarkers(x)||!g?"M5,0":v?"M5,-2":"M5,-3",M=n.select(this),S=M.select(".legendfill").selectAll("path").data(l||f?[t]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",T+"h"+y+"v6h-"+y+"z").call((function(t){if(t.size())if(l)s.fillGroupStyle(t,e,!0);else{var r="legendfill-"+x.uid;s.gradient(t,e,r,p(A),k,"fill")}})),u||h){var C=_(void 0,x.line,10,5);i=o.minExtend(x,{line:{width:C}}),r=[o.minExtend(b,{trace:i})]}var E=M.select(".legendlines").selectAll("path").data(u||h?[r]:[]);E.enter().append("path").classed("js-line",!0),E.exit().remove(),E.attr("d",T+(h?"l"+y+",0.0001":"h"+y)).call(u?s.lineGroupStyle:function(t){if(t.size()){var r="legendline-"+x.uid;s.lineGroupStyle(t),s.gradient(t,e,r,p(A),k,"stroke")}})})).each((function(t){var r,i,a=m(t),l=a.anyFill,c=a.anyLine,u=a.showLine,h=a.showMarker,f=t[0],p=f.trace,g=!h&&!c&&!l&&d.hasText(p);function v(t,e,r,n){var i=o.nestedProperty(p,t).get(),a=o.isArrayOrTypedArray(i)&&e?e(i):i;if(b&&a&&void 0!==n&&(a=n),r){if(ar[1])return r[1]}return a}function y(t){return f._distinct&&f.index&&t[f.index]?t[f.index]:t[0]}if(h||g||u){var x={},_={};if(h){x.mc=v("marker.color",y),x.mx=v("marker.symbol",y),x.mo=v("marker.opacity",o.mean,[.2,1]),x.mlc=v("marker.line.color",y),x.mlw=v("marker.line.width",o.mean,[0,5],2),_.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var k=v("marker.size",o.mean,[2,16],12);x.ms=k,_.marker.size=k}u&&(_.line={width:v("line.width",y,[0,10],5)}),g&&(x.tx="Aa",x.tp=v("textposition",y),x.ts=10,x.tc=v("textfont.color",y),x.tf=v("textfont.family",y),x.tw=v("textfont.weight",y),x.ty=v("textfont.style",y),x.tv=v("textfont.variant",y)),r=[o.minExtend(f,x)],(i=o.minExtend(p,_)).selectedpoints=null,i.texttemplate=null}var A=n.select(this).select("g.legendpoints"),T=A.selectAll("path.scatterpts").data(h?r:[]);T.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",w),T.exit().remove(),T.call(s.pointStyle,i,e),h&&(r[0].mrc=3);var M=A.selectAll("g.pointtext").data(g?r:[]);M.enter().append("g").classed("pointtext",!0).append("text").attr("transform",w),M.exit().remove(),M.selectAll("text").call(s.textPointStyle,i,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(e.visible&&"candlestick"===e.type?[t,t]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(t,e){return e?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",w).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),o=e[r?"increasing":"decreasing"],a=_(void 0,o.line,5,2);i.style("stroke-width",a+"px").call(l.fill,o.fillcolor),a&&l.stroke(i,o.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(e.visible&&"ohlc"===e.type?[t,t]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(t,e){return e?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",w).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),o=e[r?"increasing":"decreasing"],a=_(void 0,o.line,5,2);i.style("fill","none").call(s.dashLine,o.line.dash,a),a&&l.stroke(i,o.line.color)}))}))}},62799:(t,e,r)=>{"use strict";var n=r(7113);t.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.","This may include *"+n.backButtons.join("*, *")+"*."].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.","This may include *"+n.foreButtons.join("*, *")+"*."].join(" ")}}},47685:(t,e,r)=>{"use strict";var n=r(25059),i=r(51137),o=r(99246),a=r(50917),s=r(71422).eraseActiveShape,l=r(12822),c=l._,d=t.exports={};function u(t,e){var r,i,a=e.currentTarget,s=a.getAttribute("data-attr"),l=a.getAttribute("data-val")||!0,c=t._fullLayout,d={},u=o.list(t,null,!0),h=c._cartesianSpikesEnabled;if("zoom"===s){var f,p="in"===l?.5:2,m=(1+p)/2,g=(1-p)/2;for(i=0;i{"use strict";var n=r(47685),i=Object.keys(n),o=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],a=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(o),s=[];i.forEach((function(t){!function(t){if(-1===a.indexOf(t._cat||t.name)){var e=t.name,r=(t._cat||t.name).toLowerCase();-1===s.indexOf(e)&&s.push(e),-1===s.indexOf(r)&&s.push(r)}}(n[t])})),s.sort(),t.exports={DRAW_MODES:o,backButtons:a,foreButtons:s}},90120:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(46121),a=r(62799);t.exports=function(t,e){var r=t.modebar||{},s=o.newContainer(e,"modebar");function l(t,e){return n.coerce(r,s,a,t,e)}l("orientation"),l("bgcolor",i.addOpacity(e.paper_bgcolor,.5));var c=i.contrast(i.rgb(e.modebar.bgcolor));l("color",i.addOpacity(c,.3)),l("activecolor",i.addOpacity(c,.7)),l("uirevision",e.uirevision),l("add"),l("remove")}},45828:(t,e,r)=>{"use strict";t.exports={moduleType:"component",name:"modebar",layoutAttributes:r(62799),supplyLayoutDefaults:r(90120),manage:r(83493)}},83493:(t,e,r)=>{"use strict";var n=r(99246),i=r(677),o=r(25059),a=r(66811).isUnifiedHover,s=r(27756),l=r(47685),c=r(7113).DRAW_MODES,d=r(12822).extendDeep;t.exports=function(t){var e=t._fullLayout,r=t._context,u=e._modeBar;if(r.displayModeBar||r.watermark){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var h,f=r.modeBarButtons;h=Array.isArray(f)&&f.length?function(t){for(var e=d([],t),r=0;r1?(O=["toggleHover"],D=["resetViews"]):v?(z=["zoomInGeo","zoomOutGeo"],O=["hoverClosestGeo"],D=["resetGeo"]):g?(O=["hoverClosest3d"],D=["resetCameraDefault3d","resetCameraLastSave3d"]):_?(z=["zoomInMapbox","zoomOutMapbox"],O=["toggleHover"],D=["resetViewMapbox"]):x?O=["hoverClosestGl2d"]:b?O=["hoverClosestPie"]:T?(O=["hoverClosestCartesian","hoverCompareCartesian"],D=["resetViewSankey"]):O=["toggleHover"],m&&(O=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(t){for(var e=0;e{"use strict";var n=r(27941),i=r(7370),o=r(12822),a=r(50917),s=r(88566).version,l=new DOMParser;function c(t){this.container=t.container,this.element=document.createElement("div"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var d=c.prototype;d.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i="modebar-"+n._uid;this.element.setAttribute("id",i),this._uid=i,this.element.className="modebar","hover"===r.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===n.modebar.orientation&&(this.element.className+=" vertical",e=e.reverse());var a=n.modebar,s="hover"===r.displayModeBar?".js-plotly-plot .plotly:hover ":"";o.deleteRelatedStyleRule(i),o.addRelatedStyleRule(i,s+"#"+i+" .modebar-group","background-color: "+a.bgcolor),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+a.color),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+a.activecolor),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn.active .icon path","fill: "+a.activecolor);var l=!this.hasButtons(e),c=this.hasLogo!==r.displaylogo,d=this.locale!==r.locale;if(this.locale=r.locale,(l||c||d)&&(this.removeAllButtons(),this.updateButtons(e),r.watermark||r.displaylogo)){var u=this.getLogo();r.watermark&&(u.className=u.className+" watermark"),"v"===n.modebar.orientation?this.element.insertBefore(u,this.element.childNodes[0]):this.element.appendChild(u),this.hasLogo=!0}this.updateActiveButton()},d.updateButtons=function(t){var e=this;this.buttons=t,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach((function(t){var r=e.createGroup();t.forEach((function(t){var n=t.name;if(!n)throw new Error("must provide button 'name' in button config");if(-1!==e.buttonsNames.indexOf(n))throw new Error("button name '"+n+"' is taken");e.buttonsNames.push(n);var i=e.createButton(t);e.buttonElements.push(i),r.appendChild(i)})),e.element.appendChild(r)}))},d.createGroup=function(){var t=document.createElement("div");return t.className="modebar-group",t},d.createButton=function(t){var e=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var i=t.title;void 0===i?i=t.name:"function"==typeof i&&(i=i(this.graphInfo)),(i||0===i)&&r.setAttribute("data-title",i),void 0!==t.attr&&r.setAttribute("data-attr",t.attr);var o=t.val;if(void 0!==o&&("function"==typeof o&&(o=o(this.graphInfo)),r.setAttribute("data-val",o)),"function"!=typeof t.click)throw new Error("must provide button 'click' function in button config");r.addEventListener("click",(function(r){t.click(e.graphInfo,r),e.updateActiveButton(r.currentTarget)})),r.setAttribute("data-toggle",t.toggle||!1),t.toggle&&n.select(r).classed("active",!0);var s=t.icon;return"function"==typeof s?r.appendChild(s()):r.appendChild(this.createIcon(s||a.question)),r.setAttribute("data-gravity",t.gravity||"n"),r},d.createIcon=function(t){var e,r=i(t.height)?Number(t.height):t.ascent-t.descent,n="http://www.w3.org/2000/svg";if(t.path){(e=document.createElementNS(n,"svg")).setAttribute("viewBox",[0,0,t.width,r].join(" ")),e.setAttribute("class","icon");var o=document.createElementNS(n,"path");o.setAttribute("d",t.path),t.transform?o.setAttribute("transform",t.transform):void 0!==t.ascent&&o.setAttribute("transform","matrix(1 0 0 -1 0 "+t.ascent+")"),e.appendChild(o)}return t.svg&&(e=l.parseFromString(t.svg,"application/xml").childNodes[0]),e.setAttribute("height","1em"),e.setAttribute("width","1em"),e},d.updateActiveButton=function(t){var e=this.graphInfo._fullLayout,r=void 0!==t?t.getAttribute("data-attr"):null;this.buttonElements.forEach((function(t){var i=t.getAttribute("data-val")||!0,a=t.getAttribute("data-attr"),s="true"===t.getAttribute("data-toggle"),l=n.select(t);if(s)a===r&&l.classed("active",!l.classed("active"));else{var c=null===a?a:o.nestedProperty(e,a).get();l.classed("active",c===i)}}))},d.hasButtons=function(t){var e=this.buttons;if(!e)return!1;if(t.length!==e.length)return!1;for(var r=0;r{"use strict";var n=r(75058),i=r(84226),o=(0,r(46121).templatedArray)("button",{visible:{valType:"boolean",dflt:!0,editType:"plot",description:"Determines whether or not this button is visible."},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot",description:["The unit of measurement that the `count` value will set the range by."].join(" ")},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot",description:["Sets the range update mode.","If *backward*, the range update shifts the start of range","back *count* times *step* milliseconds.","If *todate*, the range update shifts the start of range","back to the first timestamp from *count* times","*step* milliseconds back.","For example, with `step` set to *year* and `count` set to *1*","the range update shifts the start of the range back to","January 01 of the current year.","Month and year *todate* are currently available only","for the built-in (Gregorian) calendar."].join(" ")},count:{valType:"number",min:0,dflt:1,editType:"plot",description:["Sets the number of steps to take to update the range.","Use with `step` to specify the update interval."].join(" ")},label:{valType:"string",editType:"plot",description:"Sets the text label to appear on the button."},editType:"plot",description:["Sets the specifications for each buttons.","By default, a range selector comes with no buttons."].join(" ")});t.exports={visible:{valType:"boolean",editType:"plot",description:["Determines whether or not this range selector is visible.","Note that range selectors are only available for x axes of","`type` set to or auto-typed to *date*."].join(" ")},buttons:o,x:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the x position (in normalized coordinates) of the range selector."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot",description:["Sets the range selector's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the y position (in normalized coordinates) of the range selector."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot",description:["Sets the range selector's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},font:n({editType:"plot",description:"Sets the font of the range selector button text."}),bgcolor:{valType:"color",dflt:i.lightLine,editType:"plot",description:"Sets the background color of the range selector buttons."},activecolor:{valType:"color",editType:"plot",description:"Sets the background color of the active range selector button."},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"plot",description:"Sets the color of the border enclosing the range selector."},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot",description:"Sets the width (in px) of the border enclosing the range selector."},editType:"plot"}},12057:t=>{"use strict";t.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},4088:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(46121),a=r(35677),s=r(76927),l=r(12057);function c(t,e,r,i){var o=i.calendar;function a(r,i){return n.coerce(t,e,s.buttons,r,i)}if(a("visible")){var l=a("step");"all"!==l&&(!o||"gregorian"===o||"month"!==l&&"year"!==l?a("stepmode"):e.stepmode="backward",a("count")),a("label")}}t.exports=function(t,e,r,d,u){var h=t.rangeselector||{},f=o.newContainer(e,"rangeselector");function p(t,e){return n.coerce(h,f,s,t,e)}if(p("visible",a(h,f,{name:"buttons",handleItemDefaults:c,calendar:u}).length>0)){var m=function(t,e,r){for(var n=r.filter((function(r){return e[r].anchor===t._id})),i=0,o=0;o{"use strict";var n=r(27941),i=r(25059),o=r(51137),a=r(17499),s=r(40666),l=r(12822),c=l.strTranslate,d=r(80394),u=r(99246),h=r(89701),f=h.LINE_SPACING,p=h.FROM_TL,m=h.FROM_BR,g=r(12057),v=r(98822);function b(t){return t._id}function y(t,e,r){var n=l.ensureSingle(t,"rect","selector-rect",(function(t){t.attr("shape-rendering","crispEdges")}));n.attr({rx:g.rx,ry:g.ry}),n.call(a.stroke,e.bordercolor).call(a.fill,function(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}(e,r)).style("stroke-width",e.borderwidth+"px")}function x(t,e,r,n){var i,o;l.ensureSingle(t,"text","selector-text",(function(t){t.attr("text-anchor","middle")})).call(s.font,e.font).text((i=r,o=n._fullLayout._meta,i.label?o?l.templateString(i.label,o):i.label:"all"===i.step?"all":i.count+i.step.charAt(0))).call((function(t){d.convertToTspans(t,n)}))}t.exports=function(t){var e=t._fullLayout._infolayer.selectAll(".rangeselector").data(function(t){for(var e=u.list(t,"x",!0),r=[],n=0;n{"use strict";var n=r(55622),i=r(12822).titleCase;t.exports=function(t,e){var r=t._name,o={};if("all"===e.step)o[r+".autorange"]=!0;else{var a=function(t,e){var r,o=t.range,a=new Date(t.r2l(o[1])),s=e.step,l=n["utc"+i(s)],c=e.count;switch(e.stepmode){case"backward":r=t.l2r(+l.offset(a,-c));break;case"todate":var d=l.offset(a,-c);r=t.l2r(+l.ceil(d))}return[r,o[1]]}(t,e);o[r+".range[0]"]=a[0],o[r+".range[1]"]=a[1]}return o}},36404:(t,e,r)=>{"use strict";t.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:r(76927)}}},layoutAttributes:r(76927),handleDefaults:r(4088),draw:r(58204)}},40959:(t,e,r)=>{"use strict";var n=r(84226);t.exports={bgcolor:{valType:"color",dflt:n.background,editType:"plot",description:"Sets the background color of the range slider."},bordercolor:{valType:"color",dflt:n.defaultLine,editType:"plot",description:"Sets the border color of the range slider."},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot",description:"Sets the border width of the range slider."},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range slider range is","computed in relation to the input data.","If `range` is provided, then `autorange` is set to *false*."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1},description:["Sets the range of the range slider.","If not set, defaults to the full xaxis range.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot",description:["The height of the range slider as a fraction of the","total plot area height."].join(" ")},visible:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the range slider will be visible.","If visible, perpendicular axes will be set to `fixedrange`"].join(" ")},editType:"calc"}},99224:(t,e,r)=>{"use strict";var n=r(99246).list,i=r(19496).getAutoRange,o=r(92601);t.exports=function(t){for(var e=n(t,"x",!0),r=0;r{"use strict";t.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},4504:(t,e,r)=>{"use strict";var n=r(12822),i=r(46121),o=r(99246),a=r(40959),s=r(73290);t.exports=function(t,e,r){var l=t[r],c=e[r];if(l.rangeslider||e._requestRangeslider[c._id]){n.isPlainObject(l.rangeslider)||(l.rangeslider={});var d,u,h=l.rangeslider,f=i.newContainer(c,"rangeslider");if(w("visible")){w("bgcolor",e.plot_bgcolor),w("bordercolor"),w("borderwidth"),w("thickness"),w("autorange",!c.isValidRange(h.range)),w("range");var p=e._subplots;if(p)for(var m=p.cartesian.filter((function(t){return t.substr(0,t.indexOf("y"))===o.name2id(r)})).map((function(t){return t.substr(t.indexOf("y"),t.length)})),g=n.simpleMap(m,o.id2name),v=0;v{"use strict";var n=r(27941),i=r(25059),o=r(51137),a=r(12822),s=a.strTranslate,l=r(40666),c=r(17499),d=r(6883),u=r(29592),h=r(99246),f=r(19846),p=r(76292),m=r(92601);function g(t){return"number"==typeof t.clientX?t.clientX:t.touches&&t.touches.length>0?t.touches[0].clientX:0}function v(t,e,r,n){var i=a.ensureSingle(t,"rect",m.bgClassName,(function(t){t.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),o=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,d=-n._offsetShift,u=l.crispRound(e,n.borderwidth);i.attr({width:n._width+o,height:n._height+o,transform:s(d,d),"stroke-width":u}).call(c.stroke,n.bordercolor).call(c.fill,n.bgcolor)}function b(t,e,r,n){var i=e._fullLayout;a.ensureSingleById(i._topdefs,"clipPath",n._clipId,(function(t){t.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function y(t,e,r,i){var s,c=e.calcdata,d=t.selectAll("g."+m.rangePlotClassName).data(r._subplotsWith,a.identity);d.enter().append("g").attr("class",(function(t){return m.rangePlotClassName+" "+t})).call(l.setClipUrl,i._clipId,e),d.order(),d.exit().remove(),d.each((function(t,a){var l=n.select(this),d=0===a,f=h.getFromId(e,t,"y"),p=f._name,m=i[p],g={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:i.range.slice(),calendar:r.calendar},width:i._width,height:i._height,margin:{t:0,b:0,l:0,r:0}},_context:e._context};r.rangebreaks&&(g.layout.xaxis.rangebreaks=r.rangebreaks),g.layout[p]={type:f.type,domain:[0,1],range:"match"!==m.rangemode?m.range.slice():f.range.slice(),calendar:f.calendar},f.rangebreaks&&(g.layout[p].rangebreaks=f.rangebreaks),o.supplyDefaults(g);var v=g._fullLayout.xaxis,b=g._fullLayout[p];v.clearCalc(),v.setScale(),b.clearCalc(),b.setScale();var y={id:t,plotgroup:l,xaxis:v,yaxis:b,isRangePlot:!0};d?s=y:(y.mainplot="xy",y.mainplotinfo=s),u.rangePlot(e,y,function(t,e){for(var r=[],n=0;n=n.max)e=j[r+1];else if(t=n.pmax)e=j[r+1];else if(tr._length||b+w<0)return;d=v+w,f=b+w;break;case l:if(x="col-resize",v+w>r._length)return;d=v+w,f=b;break;case c:if(x="col-resize",b+w<0)return;d=v,f=b+w;break;default:x="ew-resize",d=m,f=m+w}if(f{"use strict";var n=r(99246),i=r(80394),o=r(92601),a=r(89701).LINE_SPACING,s=o.name;function l(t){var e=t&&t[s];return e&&e.visible}e.isVisible=l,e.makeData=function(t){var e=n.list({_fullLayout:t},"x",!0),r=t.margin,i=[];if(!t._has("gl2d"))for(var o=0;o{"use strict";var n=r(12822),i=r(40959),o=r(73290),a=r(93729);t.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},i,{yaxis:o})}}},layoutAttributes:r(40959),handleDefaults:r(4504),calcAutorange:r(99224),draw:r(19260),isVisible:a.isVisible,makeData:a.makeData,autoMarginOpts:a.autoMarginOpts}},73290:t=>{"use strict";t.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc",description:["Determines whether or not the range of this axis in","the rangeslider use the same value than in the main plot","when zooming in/out.","If *auto*, the autorange will be used.","If *fixed*, the `range` is used.","If *match*, the current range of the corresponding y-axis on the main subplot is used."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Sets the range of this axis for the rangeslider."].join(" ")},editType:"calc"}},65586:(t,e,r)=>{"use strict";var n=r(77061),i=r(98387).line,o=r(68057).T,a=r(98260).extendFlat,s=r(62309).overrideAll,l=r(46121).templatedArray,c=r(53644);t.exports=s(l("selection",{type:{valType:"enumerated",values:["rect","path"],description:["Specifies the selection type to be drawn.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`) and (`x0`,`y1`).","If *path*, draw a custom SVG path using `path`."].join(" ")},xref:a({},n.xref,{description:["Sets the selection's x coordinate axis.",c.axisRefDescription("x","left","right")].join(" ")}),yref:a({},n.yref,{description:["Sets the selection's x coordinate axis.",c.axisRefDescription("y","bottom","top")].join(" ")}),x0:{valType:"any",description:"Sets the selection's starting x position."},x1:{valType:"any",description:"Sets the selection's end x position."},y0:{valType:"any",description:"Sets the selection's starting y position."},y1:{valType:"any",description:"Sets the selection's end y position."},path:{valType:"string",editType:"arraydraw",description:["For `type` *path* - a valid SVG path similar to `shapes.path` in data coordinates.","Allowed segments are: M, L and Z."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw",description:"Sets the opacity of the selection."},line:{color:i.color,width:a({},i.width,{min:1,dflt:1}),dash:a({},o,{dflt:"dot"})}}),"arraydraw","from-root")},76814:t=>{"use strict";t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},8037:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(65586),s=r(23223);function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}var l=o("path"),c="path"!==o("type",l?"path":"rect");c&&delete e.path,o("opacity"),o("line.color"),o("line.width"),o("line.dash");for(var d=["x","y"],u=0;u<2;u++){var h,f,p,m=d[u],g={_fullLayout:r},v=i.coerceRef(t,e,g,m);if((h=i.getFromId(g,v))._selectionIndices.push(e._index),p=s.rangeToShapePosition(h),f=s.shapePositionToRange(h),c){var b=m+"0",y=m+"1",x=t[b],w=t[y];t[b]=f(t[b],!0),t[y]=f(t[y],!0),i.coercePosition(e,g,o,v,b),i.coercePosition(e,g,o,v,y);var _=e[b],k=e[y];void 0!==_&&void 0!==k&&(e[b]=p(_),e[y]=p(k),t[b]=x,t[y]=w)}}c&&n.noneOrAll(t,e,["x0","x1","y0","y1"])}t.exports=function(t,e){o(t,e,{name:"selections",handleItemDefaults:l});for(var r=e.selections,n=0;n{"use strict";var n=r(59952).readPaths,i=r(49244),o=r(8867).clearOutlineControllers,a=r(17499),s=r(40666),l=r(46121).arrayEditor,c=r(23223),d=c.getPathString;function u(t){var e=t._fullLayout;for(var r in o(t),e._selectionLayer.selectAll("path").remove(),e._plots){var n=e._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var i=0;i=0;A--){var T=r.append("path").attr(g).style("opacity",A?.1:v).call(a.stroke,y).call(a.fill,b).call(s.dashLine,A?"solid":w,A?4+x:x);if(p(T,t,o),_){var M=l(t.layout,"selections",o);T.style({cursor:"move"});var S={element:T.node(),plotinfo:f,gd:t,editHelpers:M,isActiveSelection:!0},C=n(c,t);i(C,T,S)}else T.style("pointer-events",A?"all":"none");k[A]=T}var E=k[0];k[1].node().addEventListener("click",(function(){return function(t,e){if(h(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeSelectionIndex)return void m(t);t._fullLayout._activeSelectionIndex=r,t._fullLayout._deactivateSelection=m,u(t)}}}(t,E)}))}(t._fullLayout._selectionLayer)}function p(t,e,r){var n=r.xref+r.yref;s.setClipUrl(t,"clip"+e._fullLayout._uid+n,e)}function m(t){h(t)&&t._fullLayout._activeSelectionIndex>=0&&(o(t),delete t._fullLayout._activeSelectionIndex,u(t))}t.exports={draw:u,drawOne:f,activateLastSelection:function(t){if(h(t)){var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=m,u(t)}}}},21422:(t,e,r)=>{"use strict";var n=r(68057).T,i=r(98260).extendFlat;t.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none",description:["Describes how a new selection is created.","If `immediate`, a new selection is created after first mouse up.","If `gradual`, a new selection is not created after first mouse.","By adding to and subtracting from the initial selection,","this option allows declaring extra outlines of the selection."].join(" ")},line:{color:{valType:"color",editType:"none",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:1,dflt:1,editType:"none",description:"Sets the line width (in px)."},dash:i({},n,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none",description:"Sets the color filling the active selection' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none",description:"Sets the opacity of the active selection."},editType:"none"}}},80857:t=>{"use strict";t.exports=function(t,e,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},63750:(t,e,r)=>{"use strict";var n=r(14295).selectMode,i=r(8867).clearOutline,o=r(59952),a=o.readPaths,s=o.writePaths,l=o.fixDatesForPaths;t.exports=function(t,e){if(t.length){var r=t[0][0];if(r){var o=r.getAttribute("d"),c=e.gd,d=c._fullLayout.newselection,u=e.plotinfo,h=u.xaxis,f=u.yaxis,p=e.isActiveSelection,m=e.dragmode,g=(c.layout||{}).selections||[];if(!n(m)&&void 0!==p){var v=c._fullLayout._activeSelectionIndex;if(v{"use strict";var n=r(12822).strTranslate;function i(t,e){switch(t.type){case"log":return t.p2d(e);case"date":return t.p2r(e,0,t.calendar);default:return t.p2r(e)}}t.exports={p2r:i,r2p:function(t,e){switch(t.type){case"log":return t.d2p(e);case"date":return t.r2p(e,0,t.calendar);default:return t.r2p(e)}},axValue:function(t){var e="y"===t._id.charAt(0)?1:0;return function(r){return i(t,r[e])}},getTransform:function(t){return n(t.xaxis._offset,t.yaxis._offset)}}},70059:(t,e,r)=>{"use strict";var n=r(70445),i=r(80191);t.exports={moduleType:"component",name:"selections",layoutAttributes:r(65586),supplyLayoutDefaults:r(8037),supplyDrawNewSelectionDefaults:r(80857),includeBasePlot:r(39859)("selections"),draw:n.draw,drawOne:n.drawOne,reselect:i.reselect,prepSelect:i.prepSelect,clearOutline:i.clearOutline,clearSelectionsCache:i.clearSelectionsCache,selectOnClick:i.selectOnClick}},80191:(t,e,r)=>{"use strict";var n=r(48439),i=r(53824),o=r(25059),a=r(40666).dashStyle,s=r(17499),l=r(70410),c=r(66811).makeEventData,d=r(14295),u=d.freeMode,h=d.rectMode,f=d.drawMode,p=d.openMode,m=d.selectMode,g=r(23223),v=r(6583),b=r(49244),y=r(8867).clearOutline,x=r(59952),w=x.handleEllipse,_=x.readPaths,k=r(81941).newShapes,A=r(63750),T=r(70445).activateLastSelection,M=r(12822),S=M.sorterAsc,C=r(92620),E=r(76324),L=r(99246).getFromId,z=r(86748),O=r(39004).redrawReglTraces,D=r(76814),I=D.MINSELECT,R=C.filter,F=C.tester,P=r(38554),j=P.p2r,N=P.axValue,B=P.getTransform;function U(t){return void 0!==t.subplot}function G(t,e,r,n,i,o,a){var s,l,c,d,u,h,f,m,g,v=e._hoverdata,y=e._fullLayout.clickmode.indexOf("event")>-1,x=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(v)){q(t,e,o);var w=function(t,e){var r,n,i=t[0],o=-1,a=[];for(n=0;n0?function(t,e){var r,n,i,o=[];for(i=0;i0&&o.push(r);if(1===o.length&&o[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(i=0;i1)return!1;if((n+=e.selectedpoints.length)>1)return!1}return 1===n}(s)&&(h=J(w))){for(a&&a.remove(),g=0;g=0})(i)&&i._fullLayout._deactivateShape(i),function(t){return t._fullLayout._activeSelectionIndex>=0}(i)&&i._fullLayout._deactivateSelection(i);var a=i._fullLayout._zoomlayer,s=f(r),l=m(r);if(s||l){var c,d,u=a.selectAll(".select-outline-"+n.id);u&&i._fullLayout._outlining&&(s&&(c=k(u,t)),c&&o.call("_guiRelayout",i,{shapes:c}),l&&!U(t)&&(d=A(u,t)),d&&(i._fullLayout._noEmitSelectedAtStart=!0,o.call("_guiRelayout",i,{selections:d}).then((function(){e&&T(i)}))),i._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=t.selectionDefs=[],n.selection.mergedPolygons=t.mergedPolygons=[]}function Z(t){return t._id}function X(t,e,r,n){if(!t.calcdata)return[];var i,o,a,s=[],l=e.map(Z),c=r.map(Z);for(a=0;a0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function K(t,e,r){var n,i;for(n=0;n-1&&e;if(!o&&e){var et=at(t,!0);if(et.length){var nt=et[0].xref,ft=et[0].yref;if(nt&&ft){var pt=ct(et);dt([L(t,nt,"x"),L(t,ft,"y")])(Q,pt)}}t._fullLayout._noEmitSelectedAtStart?t._fullLayout._noEmitSelectedAtStart=!1:tt&&ut(t,Q),h._reselect=!1}if(!o&&h._deselect){var mt=h._deselect;(function(t,e,r){for(var n=0;n=0)A._fullLayout._deactivateShape(A);else if(!y){var r=T.clickmode;E.done(Mt).then((function(){if(E.clear(Mt),2===t){for(xt.remove(),J=0;J-1&&G(e,A,n.xaxes,n.yaxes,n.subplot,n,xt),"event"===r&&ut(A,void 0);l.click(A,e,z.id)})).catch(M.error)}},n.doneFn=function(){At.remove(),E.done(Mt).then((function(){E.clear(Mt),!S&&$&&n.selectionDefs&&($.subtract=yt,n.selectionDefs.push($),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,Z)),(S||y)&&Y(n,S),n.doneFnCompleted&&n.doneFnCompleted(St),x&&ut(A,ot)})).catch(M.error)}},clearOutline:y,clearSelectionsCache:Y,selectOnClick:G}},39677:(t,e,r)=>{"use strict";var n=r(77061),i=r(75058),o=r(98387).line,a=r(68057).T,s=r(98260).extendFlat,l=r(46121).templatedArray,c=r(53644),d=r(3520),u=r(24131).LF,h=r(12086);t.exports=l("shape",{visible:s({},d.visible,{editType:"calc+arraydraw",description:["Determines whether or not this shape is visible.","If *legendonly*, the shape is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether or not this","shape is shown in the legend."].join(" ")},legend:s({},d.legend,{editType:"calc+arraydraw",description:["Sets the reference to a legend to show this shape in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")}),legendgroup:s({},d.legendgroup,{editType:"calc+arraydraw",description:["Sets the legend group for this shape.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")}),legendgrouptitle:{text:s({},d.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:i({editType:"calc+arraydraw",description:["Sets this legend group's title font."].join(" ")}),editType:"calc+arraydraw"},legendrank:s({},d.legendrank,{editType:"calc+arraydraw",description:["Sets the legend rank for this shape.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items.","When having unranked or equal rank items shapes would be displayed after traces","i.e. according to their order in data and layout."].join(" ")}),legendwidth:s({},d.legendwidth,{editType:"calc+arraydraw",description:"Sets the width (in px or fraction) of the legend for this shape."}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw",description:["Specifies the shape type to be drawn.","If *line*, a line is drawn from (`x0`,`y0`) to (`x1`,`y1`)","with respect to the axes' sizing mode.","If *circle*, a circle is drawn from","((`x0`+`x1`)/2, (`y0`+`y1`)/2))","with radius","(|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|)","with respect to the axes' sizing mode.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`)","with respect to the axes' sizing mode.","If *path*, draw a custom SVG path using `path`.","with respect to the axes' sizing mode."].join(" ")},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw",description:["Specifies whether shapes are drawn below gridlines (*below*),","between gridlines and traces (*between*) or above traces (*above*)."].join(" ")},xref:s({},n.xref,{description:["Sets the shape's x coordinate axis.",c.axisRefDescription("x","left","right")].join(" ")}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the x axis.","If set to *scaled*, `x0`, `x1` and x coordinates within `path` refer to","data values on the x axis or a fraction of the plot area's width","(`xref` set to *paper*).","If set to *pixel*, `xanchor` specifies the x position in terms","of data or plot fraction but `x0`, `x1` and x coordinates within `path`","are pixels relative to `xanchor`. This way, the shape can have","a fixed width while maintaining a position relative to data or","plot fraction."].join(" ")},xanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `xsizemode` set to *pixel*.","Specifies the anchor point on the x axis to which `x0`, `x1`","and x coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `xsizemode` not set to *pixel*."].join(" ")},x0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting x position.","See `type` and `xsizemode` for more info."].join(" ")},x1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end x position.","See `type` and `xsizemode` for more info."].join(" ")},yref:s({},n.yref,{description:["Sets the shape's y coordinate axis.",c.axisRefDescription("y","bottom","top")].join(" ")}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the y axis.","If set to *scaled*, `y0`, `y1` and y coordinates within `path` refer to","data values on the y axis or a fraction of the plot area's height","(`yref` set to *paper*).","If set to *pixel*, `yanchor` specifies the y position in terms","of data or plot fraction but `y0`, `y1` and y coordinates within `path`","are pixels relative to `yanchor`. This way, the shape can have","a fixed height while maintaining a position relative to data or","plot fraction."].join(" ")},yanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `ysizemode` set to *pixel*.","Specifies the anchor point on the y axis to which `y0`, `y1`","and y coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `ysizemode` not set to *pixel*."].join(" ")},y0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting y position.","See `type` and `ysizemode` for more info."].join(" ")},y1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end y position.","See `type` and `ysizemode` for more info."].join(" ")},path:{valType:"string",editType:"calc+arraydraw",description:["For `type` *path* - a valid SVG path with the pixel values","replaced by data values in `xsizemode`/`ysizemode` being *scaled*","and taken unmodified as pixels relative to `xanchor` and `yanchor`","in case of *pixel* size mode.","There are a few restrictions / quirks","only absolute instructions, not relative. So the allowed segments","are: M, L, H, V, Q, C, T, S, and Z","arcs (A) are not allowed because radius rx and ry are relative.","In the future we could consider supporting relative commands,","but we would have to decide on how to handle date and log axes.","Note that even as is, Q and C Bezier paths that are smooth on","linear axes may not be smooth on log, and vice versa.",'no chained "polybezier" commands - specify the segment type for',"each one.","On category axes, values are numbers scaled to the serial numbers","of categories because using the categories themselves there would","be no way to describe fractional positions","On data axes: because space and T are both normal components of path","strings, we can't use either to separate date from time parts.","Therefore we'll use underscore for this purpose:","2015-02-21_13:45:56.789"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the shape."},line:{color:s({},o.color,{editType:"arraydraw"}),width:s({},o.width,{editType:"calc+arraydraw"}),dash:s({},a,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color filling the shape's interior. Only applies to closed shapes."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw",description:["Determines which regions of complex paths constitute the interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether the shape could be activated for edit or not.","Has no effect when the older editable shapes mode is enabled via","`config.editable` or `config.edits.shapePosition`."].join(" ")},label:{text:{valType:"string",dflt:"",editType:"arraydraw",description:["Sets the text to display with shape.","It is also used for legend item if `name` is not provided."].join(" ")},texttemplate:u({},{keys:Object.keys(h)}),font:i({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the shape label text font."}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw",description:["Sets the position of the label text relative to the shape.","Supported values for rectangles, circles and paths are","*top left*, *top center*, *top right*, *middle left*,","*middle center*, *middle right*, *bottom left*, *bottom center*,","and *bottom right*.","Supported values for lines are *start*, *middle*, and *end*.","Default: *middle center* for rectangles, circles, and paths; *middle* for lines."].join(" ")},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw",description:["Sets the angle at which the label text is drawn","with respect to the horizontal. For lines, angle *auto*","is the same angle as the line. For all other shapes,","angle *auto* is horizontal."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the label's horizontal position anchor","This anchor binds the specified `textposition` to the *left*, *center*","or *right* of the label text.","For example, if `textposition` is set to *top right* and","`xanchor` to *right* then the right-most portion of the","label text lines up with the right-most edge of the","shape."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw",description:["Sets the label's vertical position anchor","This anchor binds the specified `textposition` to the *top*, *middle*","or *bottom* of the label text.","For example, if `textposition` is set to *top right* and","`yanchor` to *top* then the top-most portion of the","label text lines up with the top-most edge of the","shape."].join(" ")},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw",description:"Sets padding (in px) between edge of label and edge of shape."},editType:"arraydraw"},editType:"arraydraw"})},37358:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(6583),a=r(23223);function s(t){return c(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function l(t){return c(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function c(t,e,r,i,s,l){var c=t/2,d=l;if("pixel"===e){var u=s?a.extractPathCoords(s,l?o.paramIsY:o.paramIsX):[r,i],h=n.aggNums(Math.max,null,u),f=n.aggNums(Math.min,null,u),p=f<0?Math.abs(f)+c:c,m=h>0?h+c:c;return{ppad:c,ppadplus:d?p:m,ppadminus:d?m:p}}return{ppad:c}}function d(t,e,r,n,i){var s="category"===t.type||"multicategory"===t.type?t.r2c:t.d2c;if(void 0!==e)return[s(e),s(r)];if(n){var l,c,d,u,h=1/0,f=-1/0,p=n.match(o.segmentRE);for("date"===t.type&&(s=a.decodeDate(s)),l=0;lf&&(f=u)));return f>=h?[h,f]:void 0}}t.exports=function(t){var e=t._fullLayout,r=n.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var a=0;a{"use strict";t.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},12138:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(39677),s=r(23223);function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}if(e._isShape=!0,o("visible")){o("showlegend")&&(o("legend"),o("legendwidth"),o("legendgroup"),o("legendgrouptitle.text"),n.coerceFont(o,"legendgrouptitle.font"),o("legendrank"));var l=o("path"),c=o("type",l?"path":"rect"),d="path"!==c;d&&delete e.path,o("editable"),o("layer"),o("opacity"),o("fillcolor"),o("fillrule"),o("line.width")&&(o("line.color"),o("line.dash"));for(var u=o("xsizemode"),h=o("ysizemode"),f=["x","y"],p=0;p<2;p++){var m,g,v,b=f[p],y=b+"anchor",x="x"===b?u:h,w={_fullLayout:r},_=i.coerceRef(t,e,w,b,void 0,"paper");if("range"===i.getRefType(_)?((m=i.getFromId(w,_))._shapeIndices.push(e._index),v=s.rangeToShapePosition(m),g=s.shapePositionToRange(m)):g=v=n.identity,d){var k=b+"0",A=b+"1",T=t[k],M=t[A];t[k]=g(t[k],!0),t[A]=g(t[A],!0),"pixel"===x?(o(k,0),o(A,10)):(i.coercePosition(e,w,o,_,k,.25),i.coercePosition(e,w,o,_,A,.75)),e[k]=v(e[k]),e[A]=v(e[A]),t[k]=T,t[A]=M}if("pixel"===x){var S=t[y];t[y]=g(t[y],!0),i.coercePosition(e,w,o,_,y,.25),e[y]=v(e[y]),t[y]=S}}d&&n.noneOrAll(t,e,["x0","x1","y0","y1"]);var C,E,L="line"===c;if(d&&(C=o("label.texttemplate")),C||(E=o("label.text")),E||C){o("label.textangle");var z=o("label.textposition",L?"middle":"middle center");o("label.xanchor"),o("label.yanchor",function(t,e){return t?"bottom":-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle"}(L,z)),o("label.padding"),n.coerceFont(o,"label.font",r.font)}}}t.exports=function(t,e){o(t,e,{name:"shapes",handleItemDefaults:l})}},64620:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(80394),a=r(40666),s=r(59952).readPaths,l=r(23223),c=l.getPathString,d=r(12086),u=r(89701).FROM_TL;t.exports=function(t,e,r,h){if(h.selectAll(".shape-label").remove(),r.label.text||r.label.texttemplate){var f;if(r.label.texttemplate){var p={};if("path"!==r.type){var m=i.getFromId(t,r.xref),g=i.getFromId(t,r.yref);for(var v in d){var b=d[v](r,m,g);void 0!==b&&(p[v]=b)}}f=n.texttemplateStringForShapes(r.label.texttemplate,{},t._fullLayout._d3locale,p)}else f=r.label.text;var y,x,w,_,k={"data-index":e},A=r.label.font,T=h.append("g").attr(k).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(f);if(r.path){var M=c(t,r),S=s(M,t);y=1/0,w=1/0,x=-1/0,_=-1/0;for(var C=0;C=t?e-n:n-e,-180/Math.PI*Math.atan2(i,o)}(y,w,x,_):0),T.call((function(e){return e.call(a.font,A).attr({}),o.convertToTspans(e,t),e}));var U=function(t,e,r,n,i,o,a){var s,l,c,d,h=i.label.textposition,f=i.label.textangle,p=i.label.padding,m=i.type,g=Math.PI/180*o,v=Math.sin(g),b=Math.cos(g),y=i.label.xanchor,x=i.label.yanchor;if("line"===m){"start"===h?(s=t,l=e):"end"===h?(s=r,l=n):(s=(t+r)/2,l=(e+n)/2),"auto"===y&&(y="start"===h?"auto"===f?r>t?"left":rt?"right":rt?"right":rt?"left":r{"use strict";var n=r(12822).strTranslate,i=r(19846),o=r(14295),a=o.drawMode,s=o.selectMode,l=r(25059),c=r(17499),d=r(81436),u=d.i000,h=d.i090,f=d.i180,p=d.i270,m=r(8867).clearOutlineControllers,g=r(59952),v=g.pointsOnRectangle,b=g.pointsOnEllipse,y=g.writePaths,x=r(81941).newShapes,w=r(81941).createShapeObj,_=r(63750),k=r(64620);function A(t,e){var r,n,i,o=t[e][1],a=t[e][2],s=t.length;return n=t[r=(e+1)%s][1],i=t[r][2],n===o&&i===a&&(n=t[r=(e+2)%s][1],i=t[r][2]),[r,n,i]}t.exports=function t(e,r,o,d){d||(d=0);var g=o.gd;function T(){t(e,r,o,d++),(b(e[0])||o.hasText)&&M({redrawing:!0})}function M(t){var e={};void 0!==o.isActiveShape&&(o.isActiveShape=!1,e=x(r,o)),void 0!==o.isActiveSelection&&(o.isActiveSelection=!1,e=_(r,o),g._fullLayout._reselect=!0),Object.keys(e).length&&l.call((t||{}).redrawing?"relayout":"_guiRelayout",g,e)}var S,C,E,L,z,O=g._fullLayout._zoomlayer,D=o.dragmode,I=a(D),R=s(D);if((I||R)&&(g._fullLayout._outlining=!0),m(g),r.attr("d",y(e)),d||!o.isActiveShape&&!o.isActiveSelection||(z=function(t,e){for(var r=0;r1&&(2!==t.length||"Z"!==t[1][0])&&(0===L&&(t[0][0]="M"),e[E]=t,T(),M())}}()}}function G(t,r){!function(t,r){if(e.length)for(var n=0;n{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=r(75815),s=r(59952).readPaths,l=r(49244),c=r(64620),d=r(8867).clearOutlineControllers,u=r(17499),h=r(40666),f=r(46121).arrayEditor,p=r(19846),m=r(76292),g=r(6583),v=r(23223),b=v.getPathString;function y(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove(),e._shapeUpperLayer.selectAll("text").remove(),e._shapeLowerLayer.selectAll("text").remove(),e._plots){var n=e._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var i=0;iw?(M=f,L="y0",S=w,z="y1"):(M=w,L="y1",S=f,z="y0"),tt(n),nt(l,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l="";"paper"===n||o.autorange||(l+=n),"paper"===i||s.autorange||(l+=i),h.setClipUrl(t,l?"clip"+r._fullLayout._uid+l:null,r)}(e,r,t),Q.moveFn="move"===R?et:rt,Q.altKey=n.altKey)},doneFn:function(){x(t)||(m(e),it(l),k(e,t,r),i.call("_guiRelayout",t,d.getUpdateObj()))},clickFn:function(){x(t)||it(l)}};function tt(r){if(x(t))R=null;else if(B)R="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=Q.element.getBoundingClientRect(),i=n.right-n.left,o=n.bottom-n.top,a=r.clientX-n.left,s=r.clientY-n.top,l=!U&&i>F&&o>P&&!r.shiftKey?p.getCursor(a/i,1-s/o):"move";m(e,l),R=l.split("-")[0]}}function et(n,i){if("path"===r.type){var o=function(t){return t},a=o,d=o;j?G("xanchor",r.xanchor=$(_+n)):(a=function(t){return $(Z(t)+n)},H&&"date"===H.type&&(a=v.encodeDate(a))),N?G("yanchor",r.yanchor=J(T+i)):(d=function(t){return J(X(t)+i)},q&&"date"===q.type&&(d=v.encodeDate(d))),G("path",r.path=A(I,a,d))}else j?G("xanchor",r.xanchor=$(_+n)):(G("x0",r.x0=$(u+n)),G("x1",r.x1=$(y+n))),N?G("yanchor",r.yanchor=J(T+i)):(G("y0",r.y0=J(f+i)),G("y1",r.y1=J(w+i)));e.attr("d",b(t,r)),nt(l,r),c(t,s,r,V)}function rt(n,i){if(U){var o=function(t){return t},a=o,d=o;j?G("xanchor",r.xanchor=$(_+n)):(a=function(t){return $(Z(t)+n)},H&&"date"===H.type&&(a=v.encodeDate(a))),N?G("yanchor",r.yanchor=J(T+i)):(d=function(t){return J(X(t)+i)},q&&"date"===q.type&&(d=v.encodeDate(d))),G("path",r.path=A(I,a,d))}else if(B){if("resize-over-start-point"===R){var h=u+n,p=N?f-i:f+i;G("x0",r.x0=j?h:$(h)),G("y0",r.y0=N?p:J(p))}else if("resize-over-end-point"===R){var m=y+n,g=N?w-i:w+i;G("x1",r.x1=j?m:$(m)),G("y1",r.y1=N?g:J(g))}}else{var x=function(t){return-1!==R.indexOf(t)},k=x("n"),W=x("s"),Y=x("w"),K=x("e"),Q=k?M+i:M,tt=W?S+i:S,et=Y?C+n:C,rt=K?E+n:E;N&&(k&&(Q=M-i),W&&(tt=S-i)),(!N&&tt-Q>P||N&&Q-tt>P)&&(G(L,r[L]=N?Q:J(Q)),G(z,r[z]=N?tt:J(tt))),rt-et>F&&(G(O,r[O]=j?et:$(et)),G(D,r[D]=j?rt:$(rt)))}e.attr("d",b(t,r)),nt(l,r),c(t,s,r,V)}function nt(t,e){(j||N)&&function(){var r="path"!==e.type,n=t.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var i=Z(j?e.xanchor:o.midRange(r?[e.x0,e.x1]:v.extractPathCoords(e.path,g.paramIsX))),a=X(N?e.yanchor:o.midRange(r?[e.y0,e.y1]:v.extractPathCoords(e.path,g.paramIsY)));if(i=v.roundPositionForSharpStrokeRendering(i,1),a=v.roundPositionForSharpStrokeRendering(a,1),j&&N){var s="M"+(i-1-1)+","+(a-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(j){var l="M"+(i-1-1)+","+(a-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var c="M"+(i-9-1)+","+(a-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function it(t){t.selectAll(".visual-cue").remove()}p.init(Q),K.node().onmousemove=tt}(t,P,d,e,r,R):!0===d.editable&&P.style("pointer-events",D||u.opacity(E)*C<=.5?"stroke":"all");P.node().addEventListener("click",(function(){return function(t,e){if(w(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void T(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=T,y(t)}}}(t,P)}))}d._input&&!0===d.visible&&("above"===d.layer?M(t._fullLayout._shapeUpperLayer):"paper"===d.xref||"paper"===d.yref?M(t._fullLayout._shapeLowerLayer):"between"===d.layer?M(_.shapelayerBetween):_._hadPlotinfo?M((_.mainplotinfo||_).shapelayer):M(t._fullLayout._shapeLowerLayer))}function k(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");h.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function A(t,e,r){return t.replace(g.segmentRE,(function(t){var n=0,i=t.charAt(0),o=g.paramIsX[i],a=g.paramIsY[i],s=g.numParams[i];return i+t.substr(1).replace(g.paramRE,(function(t){return n>=s||(o[n]?t=e(t):a[n]&&(t=r(t)),n++),t}))}))}function T(t){w(t)&&t._fullLayout._activeShapeIndex>=0&&(d(t),delete t._fullLayout._activeShapeIndex,y(t))}t.exports={draw:y,drawOne:_,eraseActiveShape:function(t){if(w(t)){d(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e{"use strict";var n=r(62309).overrideAll,i=r(3520),o=r(75058),a=r(68057).T,s=r(98260).extendFlat,l=r(24131).LF,c=r(12086);t.exports=n({newshape:{visible:s({},i.visible,{description:["Determines whether or not new shape is visible.","If *legendonly*, the shape is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")}),showlegend:{valType:"boolean",dflt:!1,description:["Determines whether or not new","shape is shown in the legend."].join(" ")},legend:s({},i.legend,{description:["Sets the reference to a legend to show new shape in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")}),legendgroup:s({},i.legendgroup,{description:["Sets the legend group for new shape.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")}),legendgrouptitle:{text:s({},i.legendgrouptitle.text,{}),font:o({description:["Sets this legend group's title font."].join(" ")})},legendrank:s({},i.legendrank,{description:["Sets the legend rank for new shape.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items."].join(" ")}),legendwidth:s({},i.legendwidth,{description:"Sets the width (in px or fraction) of the legend for new shape."}),line:{color:{valType:"color",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:0,dflt:4,description:"Sets the line width (in px)."},dash:s({},a,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:["Sets the color filling new shapes' interior.","Please note that if using a fillcolor with alpha greater than half,","drag inside the active shape starts moving the shape underneath,","otherwise a new shape could be started over."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",description:["Determines the path's interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:"Sets the opacity of new shapes."},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",description:["Specifies whether new shapes are drawn below gridlines (*below*),","between gridlines and traces (*between*) or above traces (*above*)."].join(" ")},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",description:["When `dragmode` is set to *drawrect*, *drawline* or *drawcircle*","this limits the drag to be horizontal, vertical or diagonal.","Using *diagonal* there is no limit e.g. in drawing lines in any direction.","*ortho* limits the draw to be either horizontal or vertical.","*horizontal* allows horizontal extend.","*vertical* allows vertical extend."].join(" ")},name:s({},i.name,{description:["Sets new shape name.","The name appears as the legend item."].join(" ")}),label:{text:{valType:"string",dflt:"",description:["Sets the text to display with the new shape.","It is also used for legend item if `name` is not provided."].join(" ")},texttemplate:l({newshape:!0},{keys:Object.keys(c)}),font:o({description:"Sets the new shape label text font."}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],description:["Sets the position of the label text relative to the new shape.","Supported values for rectangles, circles and paths are","*top left*, *top center*, *top right*, *middle left*,","*middle center*, *middle right*, *bottom left*, *bottom center*,","and *bottom right*.","Supported values for lines are *start*, *middle*, and *end*.","Default: *middle center* for rectangles, circles, and paths; *middle* for lines."].join(" ")},textangle:{valType:"angle",dflt:"auto",description:["Sets the angle at which the label text is drawn","with respect to the horizontal. For lines, angle *auto*","is the same angle as the line. For all other shapes,","angle *auto* is horizontal."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",description:["Sets the label's horizontal position anchor","This anchor binds the specified `textposition` to the *left*, *center*","or *right* of the label text.","For example, if `textposition` is set to *top right* and","`xanchor` to *right* then the right-most portion of the","label text lines up with the right-most edge of the","new shape."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets the label's vertical position anchor","This anchor binds the specified `textposition` to the *top*, *middle*","or *bottom* of the label text.","For example, if `textposition` is set to *top right* and","`yanchor` to *top* then the top-most portion of the","label text lines up with the top-most edge of the","new shape."].join(" ")},padding:{valType:"number",dflt:3,min:0,description:"Sets padding (in px) between edge of label and edge of new shape."}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,description:"Sets the opacity of the active shape."}}},"none","from-root")},81436:t=>{"use strict";t.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},24815:(t,e,r)=>{"use strict";var n=r(17499),i=r(12822);t.exports=function(t,e,r){if(r("newshape.visible"),r("newshape.name"),r("newshape.showlegend"),r("newshape.legend"),r("newshape.legendwidth"),r("newshape.legendgroup"),r("newshape.legendgrouptitle.text"),i.coerceFont(r,"newshape.legendgrouptitle.font"),r("newshape.legendrank"),r("newshape.drawdirection"),r("newshape.layer"),r("newshape.fillcolor"),r("newshape.fillrule"),r("newshape.opacity"),r("newshape.line.width")){var o=(t||{}).plot_bgcolor||"#FFF";r("newshape.line.color",n.contrast(o)),r("newshape.line.dash")}var a="drawline"===t.dragmode,s=r("newshape.label.text"),l=r("newshape.label.texttemplate");if(s||l){r("newshape.label.textangle");var c=r("newshape.label.textposition",a?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",function(t,e){return t?"bottom":-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle"}(a,c)),r("newshape.label.padding"),i.coerceFont(r,"newshape.label.font",e.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}},59952:(t,e,r)=>{"use strict";var n=r(37974),i=r(81436),o=i.CIRCLE_SIDES,a=i.SQRT2,s=r(38554),l=s.p2r,c=s.r2p,d=[0,3,4,5,6,1,2],u=[0,3,4,1,2];function h(t,e){return Math.abs(t-e)<=1e-6}function f(t,e){var r=e[1]-t[1],n=e[2]-t[2];return Math.sqrt(r*r+n*n)}e.writePaths=function(t){var e=t.length;if(!e)return"M0,0Z";for(var r="",n=0;n0&&l{"use strict";var n=r(14295),i=n.drawMode,o=n.openMode,a=r(81436),s=a.i000,l=a.i090,c=a.i180,d=a.i270,u=a.cos45,h=a.sin45,f=r(38554),p=f.p2r,m=f.r2p,g=r(8867).clearOutline,v=r(59952),b=v.readPaths,y=v.writePaths,x=v.ellipseOver,w=v.fixDatesForPaths;function _(t,e,r){var n,i=t[0][0],a=e.gd,f=i.getAttribute("d"),g=a._fullLayout.newshape,v=e.plotinfo,_=e.isActiveShape,k=v.xaxis,A=v.yaxis,T=!!v.domain||!v.xaxis,M=!!v.domain||!v.yaxis,S=o(r),C=b(f,a,v,_),E={editable:!0,visible:g.visible,name:g.name,showlegend:g.showlegend,legend:g.legend,legendwidth:g.legendwidth,legendgroup:g.legendgroup,legendgrouptitle:{text:g.legendgrouptitle.text,font:g.legendgrouptitle.font},legendrank:g.legendrank,label:g.label,xref:T?"paper":k._id,yref:M?"paper":A._id,layer:g.layer,opacity:g.opacity,line:{color:g.line.color,width:g.line.width,dash:g.line.dash}};if(S||(E.fillcolor=g.fillcolor,E.fillrule=g.fillrule),1===C.length&&(n=C[0]),n&&5===n.length&&"drawrect"===r)E.type="rect",E.x0=n[0][1],E.y0=n[0][2],E.x1=n[2][1],E.y1=n[2][2];else if(n&&"drawline"===r)E.type="line",E.x0=n[0][1],E.y0=n[0][2],E.x1=n[1][1],E.y1=n[1][2];else if(n&&"drawcircle"===r){E.type="circle";var L=n[s][1],z=n[l][1],O=n[c][1],D=n[d][1],I=n[s][2],R=n[l][2],F=n[c][2],P=n[d][2],j=v.xaxis&&("date"===v.xaxis.type||"log"===v.xaxis.type),N=v.yaxis&&("date"===v.yaxis.type||"log"===v.yaxis.type);j&&(L=m(v.xaxis,L),z=m(v.xaxis,z),O=m(v.xaxis,O),D=m(v.xaxis,D)),N&&(I=m(v.yaxis,I),R=m(v.yaxis,R),F=m(v.yaxis,F),P=m(v.yaxis,P));var B=(z+D)/2,U=(I+F)/2,G=x({x0:B,y0:U,x1:B+(D-z+O-L)/2*u,y1:U+(P-R+F-I)/2*h});j&&(G.x0=p(v.xaxis,G.x0),G.x1=p(v.xaxis,G.x1)),N&&(G.y0=p(v.yaxis,G.y0),G.y1=p(v.yaxis,G.y1)),E.x0=G.x0,E.y0=G.y0,E.x1=G.x1,E.y1=G.y1}else E.type="path",k&&A&&w(C,k,A),E.path=y(C),n=null;return E}t.exports={newShapes:function(t,e){if(t.length&&t[0][0]){var r=e.gd,n=e.isActiveShape,o=e.dragmode,a=(r.layout||{}).shapes||[];if(!i(o)&&void 0!==n){var s=r._fullLayout._activeShapeIndex;if(s{"use strict";t.exports={clearOutlineControllers:function(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".outline-controllers").remove()},clearOutline:function(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".select-outline").remove(),t._fullLayout._outlining=!1}}},23223:(t,e,r)=>{"use strict";var n=r(6583),i=r(12822),o=r(75815);e.rangeToShapePosition=function(t){return"log"===t.type?t.r2d:function(t){return t}},e.shapePositionToRange=function(t){return"log"===t.type?t.d2r:function(t){return t}},e.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},e.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},e.extractPathCoords=function(t,e,r){var o=[];return t.match(n.segmentRE).forEach((function(t){var a=e[t.charAt(0)].drawn;if(void 0!==a){var s=t.substr(1).match(n.paramRE);if(s&&!(s.lengthf&&(t="X"),t}));return o>f&&(p=p.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+t)),d+p}))}(r,s,c);if("pixel"===r.xsizemode){var x=s(r.xanchor);d=x+r.x0,u=x+r.x1}else d=s(r.x0),u=s(r.x1);if("pixel"===r.ysizemode){var w=c(r.yanchor);h=w-r.y0,f=w-r.y1}else h=c(r.y0),f=c(r.y1);if("line"===p)return"M"+d+","+h+"L"+u+","+f;if("rect"===p)return"M"+d+","+h+"H"+u+"V"+f+"H"+d+"Z";var _=(d+u)/2,k=(h+f)/2,A=Math.abs(_-d),T=Math.abs(k-h),M="A"+A+","+T,S=_+A+","+k;return"M"+S+M+" 0 1,1 "+_+","+(k-T)+M+" 0 0,1 "+S+"Z"}},60166:(t,e,r)=>{"use strict";var n=r(71422);t.exports={moduleType:"component",name:"shapes",layoutAttributes:r(39677),supplyLayoutDefaults:r(12138),supplyDrawNewShapeDefaults:r(24815),includeBasePlot:r(39859)("shapes"),calcAutorange:r(37358),draw:n.draw,drawOne:n.drawOne}},12086:t=>{"use strict";function e(t,e){return e?e.d2l(t):t}function r(t,e){return e?e.l2d(t):t}function n(t,r){return e(t.x1,r)-e(t.x0,r)}function i(t,r,n){return e(t.y1,n)-e(t.y0,n)}t.exports={x0:function(t){return t.x0},x1:function(t){return t.x1},y0:function(t){return t.y0},y1:function(t){return t.y1},slope:function(t,e,r){return"line"!==t.type?void 0:i(t,0,r)/n(t,e)},dx:n,dy:i,width:function(t,e){return Math.abs(n(t,e))},height:function(t,e,r){return Math.abs(i(t,0,r))},length:function(t,e,r){return"line"!==t.type?void 0:Math.sqrt(Math.pow(n(t,e),2)+Math.pow(i(t,0,r),2))},xcenter:function(t,n){return r((e(t.x1,n)+e(t.x0,n))/2,n)},ycenter:function(t,n,i){return r((e(t.y1,i)+e(t.y0,i))/2,i)}}},8421:(t,e,r)=>{"use strict";var n=r(75058),i=r(85538),o=r(98260).extendDeepAll,a=r(62309).overrideAll,s=r(46367),l=r(46121).templatedArray,c=r(92911),d=l("step",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not this step is included in the slider."].join(" ")},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called when the slider value is changed.","If the `skip` method is used, the API slider will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","slider events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on slide."].join(" ")},label:{valType:"string",description:"Sets the text label to appear on the slider"},value:{valType:"string",description:["Sets the value of the slider step, used to refer to the step programatically.","Defaults to the slider label if not provided."].join(" ")},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_sliderchange` method and executing the API command manually without losing","the benefit of the slider automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}});t.exports=a(l("slider",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not the slider is visible."].join(" ")},active:{valType:"number",min:0,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},steps:d,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this slider length","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the slider","This measure excludes the padding of both ends.","That is, the slider's length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the x position (in normalized coordinates) of the slider."},pad:o(i({editType:"arraydraw"}),{description:"Set the padding of the slider component along each side."},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",description:["Sets the slider's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the y position (in normalized coordinates) of the slider."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the slider's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},transition:{duration:{valType:"number",min:0,dflt:150,description:"Sets the duration of the slider transition"},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out",description:"Sets the easing function of the slider transition"}},currentvalue:{visible:{valType:"boolean",dflt:!0,description:["Shows the currently-selected value above the slider."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",description:["The alignment of the value readout relative to the length of the slider."].join(" ")},offset:{valType:"number",dflt:10,description:["The amount of space, in pixels, between the current value label","and the slider."].join(" ")},prefix:{valType:"string",description:"When currentvalue.visible is true, this sets the prefix of the label."},suffix:{valType:"string",description:"When currentvalue.visible is true, this sets the suffix of the label."},font:n({description:"Sets the font of the current value label text."})},font:n({description:"Sets the font of the slider step labels."}),activebgcolor:{valType:"color",dflt:c.gripBgActiveColor,description:["Sets the background color of the slider grip","while dragging."].join(" ")},bgcolor:{valType:"color",dflt:c.railBgColor,description:"Sets the background color of the slider."},bordercolor:{valType:"color",dflt:c.railBorderColor,description:"Sets the color of the border enclosing the slider."},borderwidth:{valType:"number",min:0,dflt:c.railBorderWidth,description:"Sets the width (in px) of the border enclosing the slider."},ticklen:{valType:"number",min:0,dflt:c.tickLength,description:"Sets the length in pixels of step tick marks"},tickcolor:{valType:"color",dflt:c.tickColor,description:"Sets the color of the border enclosing the slider."},tickwidth:{valType:"number",min:0,dflt:1,description:"Sets the tick width (in px)."},minorticklen:{valType:"number",min:0,dflt:c.minorTickLength,description:"Sets the length in pixels of minor step tick marks"}}),"arraydraw","from-root")},92911:t=>{"use strict";t.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},60626:(t,e,r)=>{"use strict";var n=r(12822),i=r(35677),o=r(8421),a=r(92911).name,s=o.steps;function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}for(var s=i(t,e,{name:"steps",handleItemDefaults:c}),l=0,d=0;d{"use strict";var n=r(27941),i=r(51137),o=r(17499),a=r(40666),s=r(12822),l=s.strTranslate,c=r(80394),d=r(46121).arrayEditor,u=r(92911),h=r(89701),f=h.LINE_SPACING,p=h.FROM_TL,m=h.FROM_BR;function g(t){return u.autoMarginIdRoot+t._index}function v(t){return t._index}function b(t,e){var r=a.tester.selectAll("g."+u.labelGroupClass).data(e._visibleSteps);r.enter().append("g").classed(u.labelGroupClass,!0);var o=0,l=0;r.each((function(t){var r=w(n.select(this),{step:t},e).node();if(r){var i=a.bBox(r);l=Math.max(l,i.height),o=Math.max(o,i.width)}})),r.remove();var d=e._dims={};d.inputAreaWidth=Math.max(u.railWidth,u.gripHeight);var h=t._fullLayout._size;d.lx=h.l+h.w*e.x,d.ly=h.t+h.h*(1-e.y),"fraction"===e.lenmode?d.outerLength=Math.round(h.w*e.len):d.outerLength=e.len,d.inputAreaStart=0,d.inputAreaLength=Math.round(d.outerLength-e.pad.l-e.pad.r);var f=(d.inputAreaLength-2*u.stepInset)/(e._stepCount-1),v=o+u.labelPadding;if(d.labelStride=Math.max(1,Math.ceil(v/f)),d.labelHeight=l,d.currentValueMaxWidth=0,d.currentValueHeight=0,d.currentValueTotalHeight=0,d.currentValueMaxLines=1,e.currentvalue.visible){var b=a.tester.append("g");r.each((function(t){var r=y(b,e,t.label),n=r.node()&&a.bBox(r.node())||{width:0,height:0},i=c.lineCount(r);d.currentValueMaxWidth=Math.max(d.currentValueMaxWidth,Math.ceil(n.width)),d.currentValueHeight=Math.max(d.currentValueHeight,Math.ceil(n.height)),d.currentValueMaxLines=Math.max(d.currentValueMaxLines,i)})),d.currentValueTotalHeight=d.currentValueHeight+e.currentvalue.offset,b.remove()}d.height=d.currentValueTotalHeight+u.tickOffset+e.ticklen+u.labelOffset+d.labelHeight+e.pad.t+e.pad.b;var x="left";s.isRightAnchor(e)&&(d.lx-=d.outerLength,x="right"),s.isCenterAnchor(e)&&(d.lx-=d.outerLength/2,x="center");var _="top";s.isBottomAnchor(e)&&(d.ly-=d.height,_="bottom"),s.isMiddleAnchor(e)&&(d.ly-=d.height/2,_="middle"),d.outerLength=Math.ceil(d.outerLength),d.height=Math.ceil(d.height),d.lx=Math.round(d.lx),d.ly=Math.round(d.ly);var k={y:e.y,b:d.height*m[_],t:d.height*p[_]};"fraction"===e.lenmode?(k.l=0,k.xl=e.x-e.len*p[x],k.r=0,k.xr=e.x+e.len*m[x]):(k.x=e.x,k.l=d.outerLength*p[x],k.r=d.outerLength*m[x]),i.autoMargin(t,g(e),k)}function y(t,e,r){if(e.currentvalue.visible){var n,i,o=e._dims;switch(e.currentvalue.xanchor){case"right":n=o.inputAreaLength-u.currentValueInset-o.currentValueMaxWidth,i="left";break;case"center":n=.5*o.inputAreaLength,i="middle";break;default:n=u.currentValueInset,i="left"}var l=s.ensureSingle(t,"text",u.labelClass,(function(t){t.attr({"text-anchor":i,"data-notex":1})})),d=e.currentvalue.prefix?e.currentvalue.prefix:"";if("string"==typeof r)d+=r;else{var h=e.steps[e.active].label,p=e._gd._fullLayout._meta;p&&(h=s.templateString(h,p)),d+=h}e.currentvalue.suffix&&(d+=e.currentvalue.suffix),l.call(a.font,e.currentvalue.font).text(d).call(c.convertToTspans,e._gd);var m=c.lineCount(l),g=(o.currentValueMaxLines+1-m)*e.currentvalue.font.size*f;return c.positionText(l,n,g),l}}function x(t,e,r){s.ensureSingle(t,"rect",u.gripRectClass,(function(n){n.call(T,e,t,r).style("pointer-events","all")})).attr({width:u.gripWidth,height:u.gripHeight,rx:u.gripRadius,ry:u.gripRadius}).call(o.stroke,r.bordercolor).call(o.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function w(t,e,r){var n=s.ensureSingle(t,"text",u.labelClass,(function(t){t.attr({"text-anchor":"middle","data-notex":1})})),i=e.step.label,o=r._gd._fullLayout._meta;return o&&(i=s.templateString(i,o)),n.call(a.font,r.font).text(i).call(c.convertToTspans,r._gd),n}function _(t,e){var r=s.ensureSingle(t,"g",u.labelsClass),i=e._dims,o=r.selectAll("g."+u.labelGroupClass).data(i.labelSteps);o.enter().append("g").classed(u.labelGroupClass,!0),o.exit().remove(),o.each((function(t){var r=n.select(this);r.call(w,t,e),a.setTranslate(r,C(e,t.fraction),u.tickOffset+e.ticklen+e.font.size*f+u.labelOffset+i.currentValueTotalHeight)}))}function k(t,e,r,n,i){var o=Math.round(n*(r._stepCount-1)),a=r._visibleSteps[o]._index;a!==r.active&&A(t,e,r,a,!0,i)}function A(t,e,r,n,o,a){var s=r.active;r.active=n,d(t.layout,u.name,r).applyUpdate("active",n);var l=r.steps[r.active];e.call(S,r,a),e.call(y,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:o,previousActive:s}),l&&l.method&&o&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=o,e._nextMethod.doTransition=a):(e._nextMethod={step:l,doCallback:o,doTransition:a},e._nextMethodRaf=window.requestAnimationFrame((function(){var r=e._nextMethod.step;r.method&&(r.execute&&i.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)}))))}function T(t,e,r){if(!e._context.staticPlot){var i=r.node(),a=n.select(e);t.on("mousedown",l),t.on("touchstart",l)}function s(){return r.data()[0]}function l(){var t=s();e.emit("plotly_sliderstart",{slider:t});var l=r.select("."+u.gripRectClass);n.event.stopPropagation(),n.event.preventDefault(),l.call(o.fill,t.activebgcolor);var c=E(t,n.mouse(i)[0]);function d(){var t=s(),o=E(t,n.mouse(i)[0]);k(e,r,t,o,!1)}function h(){var t=s();t._dragging=!1,l.call(o.fill,t.bgcolor),a.on("mouseup",null),a.on("mousemove",null),a.on("touchend",null),a.on("touchmove",null),e.emit("plotly_sliderend",{slider:t,step:t.steps[t.active]})}k(e,r,t,c,!0),t._dragging=!0,a.on("mousemove",d),a.on("touchmove",d),a.on("mouseup",h),a.on("touchend",h)}}function M(t,e){var r=t.selectAll("rect."+u.tickRectClass).data(e._visibleSteps),i=e._dims;r.enter().append("rect").classed(u.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each((function(t,r){var s=r%i.labelStride==0,l=n.select(this);l.attr({height:s?e.ticklen:e.minorticklen}).call(o.fill,e.tickcolor),a.setTranslate(l,C(e,r/(e._stepCount-1))-.5*e.tickwidth,(s?u.tickOffset:u.minorTickOffset)+i.currentValueTotalHeight)}))}function S(t,e,r){for(var n=t.select("rect."+u.gripRectClass),i=0,o=0;o0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform",l(a-.5*u.gripWidth,e._dims.currentValueTotalHeight))}}function C(t,e){var r=t._dims;return r.inputAreaStart+u.stepInset+(r.inputAreaLength-2*u.stepInset)*Math.min(1,Math.max(0,e))}function E(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-u.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*u.stepInset-2*r.inputAreaStart)))}function L(t,e,r){var n=r._dims,i=s.ensureSingle(t,"rect",u.railTouchRectClass,(function(n){n.call(T,e,t,r).style("pointer-events","all")}));i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,u.tickOffset+r.ticklen+n.labelHeight)}).call(o.fill,r.bgcolor).attr("opacity",0),a.setTranslate(i,0,n.currentValueTotalHeight)}function z(t,e){var r=e._dims,n=r.inputAreaLength-2*u.railInset,i=s.ensureSingle(t,"rect",u.railRectClass);i.attr({width:n,height:u.railWidth,rx:u.railRadius,ry:u.railRadius,"shape-rendering":"crispEdges"}).call(o.stroke,e.bordercolor).call(o.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),a.setTranslate(i,u.railInset,.5*(r.inputAreaWidth-u.railWidth)+r.currentValueTotalHeight)}t.exports=function(t){var e=t._context.staticPlot,r=t._fullLayout,o=function(t,e){for(var r=t[u.name],n=[],i=0;i0?[0]:[]);function l(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,g(e))}if(s.enter().append("g").classed(u.containerClassName,!0).style("cursor",e?null:"ew-resize"),s.exit().each((function(){n.select(this).selectAll("g."+u.groupClassName).each(l)})).remove(),0!==o.length){var c=s.selectAll("g."+u.groupClassName).data(o,v);c.enter().append("g").classed(u.groupClassName,!0),c.exit().each(l).remove();for(var d=0;d{"use strict";var n=r(92911);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(8421),supplyLayoutDefaults:r(60626),draw:r(23350)}},6883:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=r(51137),a=r(25059),s=r(12822),l=s.strTranslate,c=r(40666),d=r(17499),u=r(80394),h=r(11891),f=r(89701).OPPOSITE_SIDE,p=/ [XY][0-9]* /;t.exports={draw:function(t,e,r){var m,g=r.propContainer,v=r.propName,b=r.placeholder,y=r.traceIndex,x=r.avoid||{},w=r.attributes,_=r.transform,k=r.containerGroup,A=t._fullLayout,T=1,M=!1,S=g.title,C=(S&&S.text?S.text:"").trim(),E=S&&S.font?S.font:{},L=E.family,z=E.size,O=E.color,D=E.weight,I=E.style,R=E.variant;"title.text"===v?m="titleText":-1!==v.indexOf("axis")?m="axisTitleText":v.indexOf(!0)&&(m="colorbarTitleText");var F=t._context.edits[m];""===C?T=0:C.replace(p," % ")===b.replace(p," % ")&&(T=.2,M=!0,F||(C="")),r._meta?C=s.templateString(C,r._meta):A._meta&&(C=s.templateString(C,A._meta));var P,j=C||F;k||(k=s.ensureSingle(A._infolayer,"g","g-"+e),P=A._hColorbarMoveTitle);var N=k.selectAll("text").data(j?[0]:[]);if(N.enter().append("text"),N.text(C).attr("class",e),N.exit().remove(),!j)return k;function B(t){s.syncOrAsync([U,G],t)}function U(e){var r;return!_&&P&&(_={}),_?(r="",_.rotate&&(r+="rotate("+[_.rotate,w.x,w.y]+")"),(_.offset||P)&&(r+=l(0,(_.offset||0)-(P||0)))):r=null,e.attr("transform",r),e.style({"font-family":L,"font-size":n.round(z,2)+"px",fill:d.rgb(O),opacity:T*d.opacity(O),"font-weight":D,"font-style":I,"font-variant":R}).attr(w).call(u.convertToTspans,t),o.previousPromises(t)}function G(e){var r=n.select(e.node().parentNode);if(x&&x.selection&&x.side&&C){r.attr("transform",null);var o=f[x.side],a="left"===x.side||"top"===x.side?-1:1,d=i(x.pad)?x.pad:2,u=c.bBox(r.node()),h={t:0,b:0,l:0,r:0},p=t._fullLayout._reservedMargin;for(var m in p)for(var v in p[m]){var b=p[m][v];h[v]=Math.max(h[v],b)}var y={left:h.l,top:h.t,right:A.width-h.r,bottom:A.height-h.b},w=x.maxShift||a*(y[x.side]-u[x.side]),_=0;if(w<0)_=w;else{var k=x.offsetLeft||0,T=x.offsetTop||0;u.left-=k,u.right-=k,u.top-=T,u.bottom-=T,x.selection.each((function(){var t=c.bBox(this);s.bBoxIntersect(u,t,d)&&(_=Math.max(_,a*(t[x.side]-u[o])+d))})),_=Math.min(w,_),g._titleScoot=Math.abs(_)}if(_>0||w<0){var M={left:[-_,0],right:[_,0],top:[0,-_],bottom:[0,_]}[x.side];r.attr("transform",l(M[0],M[1]))}}}return N.call(B),F&&(C?N.on(".opacity",null):(T=0,M=!0,N.text(b).on("mouseover.opacity",(function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)}))),N.call(u.makeEditable,{gd:t}).on("edit",(function(e){void 0!==y?a.call("_guiRestyle",t,v,e,y):a.call("_guiRelayout",t,v,e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(B)})).on("input",(function(t){this.text(t||" ").call(u.positionText,w.x,w.y)}))),N.classed("js-placeholder",M),k}}},40658:(t,e,r)=>{"use strict";var n=r(75058),i=r(84226),o=r(98260).extendFlat,a=r(62309).overrideAll,s=r(85538),l=r(46121).templatedArray,c=l("button",{visible:{valType:"boolean",description:"Determines whether or not this button is visible."},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called on click.","If the `skip` method is used, the API updatemenu will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","updatemenu events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on click."].join(" ")},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets a 2nd set of `args`,","these arguments values are passed to the Plotly","method set in `method` when clicking this button while in the active state.","Use this to create toggle buttons."].join(" ")},label:{valType:"string",dflt:"",description:"Sets the text label to appear on the button."},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_buttonclicked` method and executing the API command manually without losing","the benefit of the updatemenu automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}});t.exports=a(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean",description:["Determines whether or not the update menu is visible."].join(" ")},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown",description:["Determines whether the buttons are accessible via a dropdown menu","or whether the buttons are stacked horizontally or vertically"].join(" ")},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down",description:["Determines the direction in which the buttons are laid out, whether","in a dropdown menu or a row/column of buttons. For `left` and `up`,","the buttons will still appear in left-to-right or top-to-bottom order","respectively."].join(" ")},active:{valType:"integer",min:-1,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},showactive:{valType:"boolean",dflt:!0,description:"Highlights active dropdown item or active button if true."},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05,description:"Sets the x position (in normalized coordinates) of the update menu."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right",description:["Sets the update menu's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:1,description:"Sets the y position (in normalized coordinates) of the update menu."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the update menu's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},pad:o(s({editType:"arraydraw"}),{description:"Sets the padding around the buttons or dropdown menu."}),font:n({description:"Sets the font of the update menu button text."}),bgcolor:{valType:"color",description:"Sets the background color of the update menu buttons."},bordercolor:{valType:"color",dflt:i.borderLine,description:"Sets the color of the border enclosing the update menu."},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw",description:"Sets the width (in px) of the border enclosing the update menu."}}),"arraydraw","from-root")},13518:t=>{"use strict";t.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},42757:(t,e,r)=>{"use strict";var n=r(12822),i=r(35677),o=r(40658),a=r(13518).name,s=o.buttons;function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}a("visible",i(t,e,{name:"buttons",handleItemDefaults:c}).length>0)&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),n.noneOrAll(t,e,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),n.coerceFont(a,"font",r.font),a("bgcolor",r.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function c(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}t.exports=function(t,e){i(t,e,{name:a,handleItemDefaults:l})}},86925:(t,e,r)=>{"use strict";var n=r(27941),i=r(51137),o=r(17499),a=r(40666),s=r(12822),l=r(80394),c=r(46121).arrayEditor,d=r(89701).LINE_SPACING,u=r(13518),h=r(90633);function f(t){return t._index}function p(t,e){return+t.attr(u.menuIndexAttrName)===e._index}function m(t,e,r,n,i,o,a,s){e.active=a,c(t.layout,u.name,e).applyUpdate("active",a),"buttons"===e.type?v(t,n,null,null,e):"dropdown"===e.type&&(i.attr(u.menuIndexAttrName,"-1"),g(t,n,i,o,e),s||v(t,n,i,o,e))}function g(t,e,r,n,i){var o=s.ensureSingle(e,"g",u.headerClassName,(function(t){t.style("pointer-events","all")})),l=i._dims,c=i.active,d=i.buttons[c]||u.blankHeaderOpts,h={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},f={width:l.headerWidth,height:l.headerHeight};o.call(b,i,d,t).call(M,i,h,f),s.ensureSingle(e,"text",u.headerArrowClassName,(function(t){t.attr("text-anchor","end").call(a.font,i.font).text(u.arrowSymbol[i.direction])})).attr({x:l.headerWidth-u.arrowOffsetX+i.pad.l,y:l.headerHeight/2+u.textOffsetY+i.pad.t}),o.on("click",(function(){r.call(S,String(p(r,i)?-1:i._index)),v(t,e,r,n,i)})),o.on("mouseover",(function(){o.call(_)})),o.on("mouseout",(function(){o.call(k,i)})),a.setTranslate(e,l.lx,l.ly)}function v(t,e,r,o,a){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(u.menuIndexAttrName)}(r)&&"buttons"!==a.type?[]:a.buttons,c="dropdown"===a.type?u.dropdownButtonClassName:u.buttonClassName,d=r.selectAll("g."+c).data(s.filterVisible(l)),h=d.enter().append("g").classed(c,!0),f=d.exit();"dropdown"===a.type?(h.attr("opacity","0").transition().attr("opacity","1"),f.transition().attr("opacity","0").remove()):f.remove();var p=0,g=0,v=a._dims,y=-1!==["up","down"].indexOf(a.direction);"dropdown"===a.type&&(y?g=v.headerHeight+u.gapButtonHeader:p=v.headerWidth+u.gapButtonHeader),"dropdown"===a.type&&"up"===a.direction&&(g=-u.gapButtonHeader+u.gapButton-v.openHeight),"dropdown"===a.type&&"left"===a.direction&&(p=-u.gapButtonHeader+u.gapButton-v.openWidth);var x={x:v.lx+p+a.pad.l,y:v.ly+g+a.pad.t,yPad:u.gapButton,xPad:u.gapButton,index:0},A={l:x.x+a.borderwidth,t:x.y+a.borderwidth};d.each((function(s,l){var c=n.select(this);c.call(b,a,s,t).call(M,a,x),c.on("click",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&a.active===l?(m(t,a,0,e,r,o,-1),i.executeAPICommand(t,s.method,s.args2)):(m(t,a,0,e,r,o,l),i.executeAPICommand(t,s.method,s.args))),t.emit("plotly_buttonclicked",{menu:a,button:s,active:a.active}))})),c.on("mouseover",(function(){c.call(_)})),c.on("mouseout",(function(){c.call(k,a),d.call(w,a)}))})),d.call(w,a),y?(A.w=Math.max(v.openWidth,v.headerWidth),A.h=x.y-A.t):(A.w=x.x-A.l,A.h=Math.max(v.openHeight,v.headerHeight)),A.direction=a.direction,o&&(d.size()?function(t,e,r,n,i,o){var a,s,l,c=i.direction,d="up"===c||"down"===c,h=i._dims,f=i.active;if(d)for(s=0,l=0;l0?[0]:[]);if(a.enter().append("g").classed(u.containerClassName,!0).style("cursor","pointer"),a.exit().each((function(){n.select(this).selectAll("g."+u.headerGroupClassName).each(o)})).remove(),0!==r.length){var l=a.selectAll("g."+u.headerGroupClassName).data(r,f);l.enter().append("g").classed(u.headerGroupClassName,!0);for(var c=s.ensureSingle(a,"g",u.dropdownButtonGroupClassName,(function(t){t.style("pointer-events","all")})),d=0;d{"use strict";var n=r(13518);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(40658),supplyLayoutDefaults:r(42757),draw:r(86925)}},90633:(t,e,r)=>{"use strict";t.exports=s;var n=r(27941),i=r(17499),o=r(40666),a=r(12822);function s(t,e,r){this.gd=t,this.container=e,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}s.barWidth=2,s.barLength=20,s.barRadius=2,s.barPad=1,s.barColor="#808BA4",s.prototype.enable=function(t,e,r){var a=this.gd._fullLayout,l=a.width,c=a.height;this.position=t;var d,u,h,f,p=this.position.l,m=this.position.w,g=this.position.t,v=this.position.h,b=this.position.direction,y="down"===b,x="left"===b,w="up"===b,_=m,k=v;y||x||"right"===b||w||(this.position.direction="down",y=!0),y||w?(u=(d=p)+_,y?(h=g,k=(f=Math.min(h+k,c))-h):k=(f=g+k)-(h=Math.max(f-k,0))):(f=(h=g)+k,x?_=(u=p+_)-(d=Math.max(u-_,0)):(d=p,_=(u=Math.min(d+_,l))-d)),this._box={l:d,t:h,w:_,h:k};var A=m>_,T=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=p,C=g+v;C+M>c&&(C=c-M);var E=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);E.exit().on(".drag",null).remove(),E.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),A?(this.hbar=E.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:C,width:T,height:M}),this._hbarXMin=S+T/2,this._hbarTranslateMax=_-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=v>k,z=s.barWidth+2*s.barPad,O=s.barLength+2*s.barPad,D=p+m,I=g;D+z>l&&(D=l-z);var R=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),L?(this.vbar=R.attr({rx:s.barRadius,ry:s.barRadius,x:D,y:I,width:z,height:O}),this._vbarYMin=I+O/2,this._vbarTranslateMax=k-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var F=this.id,P=d-.5,j=L?u+z+.5:u+.5,N=h-.5,B=A?f+M+.5:f+.5,U=a._topdefs.selectAll("#"+F).data(A||L?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",F).append("rect"),A||L?(this._clipRect=U.select("rect").attr({x:Math.floor(P),y:Math.floor(N),width:Math.ceil(j)-Math.floor(P),height:Math.ceil(B)-Math.floor(N)}),this.container.call(o.setClipUrl,F,this.gd),this.bg.attr({x:p,y:g,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),A||L){var G=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(G);var V=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(V),L&&this.vbar.on(".drag",null).call(V)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,i=r+this._hbarTranslateMax;t=(a.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var o=e+this._vbarYMin,s=o+this._vbarTranslateMax;e=(a.constrain(n.event.y,o,s)-o)/(s-o)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=a.constrain(t||0,0,r),e=a.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(o.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(o.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(o.setTranslate,t,e+s*this._vbarTranslateMax)}}},89701:t=>{"use strict";t.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},53644:t=>{"use strict";t.exports={axisRefDescription:function(t,e,r){return["If set to a",t,"axis id (e.g. *"+t+"* or","*"+t+"2*), the `"+t+"` position refers to a",t,"coordinate. If set to *paper*, the `"+t+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+r+"). If set to a",t,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",e,"of the domain of that axis: e.g.,","*"+t+"2 domain* refers to the domain of the second",t," axis and a",t,"position of 0.5 refers to the","point between the",e,"and the",r,"of the domain of the","second",t,"axis."].join(" ")}}},77201:t=>{"use strict";t.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},55697:t=>{"use strict";t.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},24134:t=>{"use strict";t.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},11891:t=>{"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},32994:t=>{"use strict";t.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},25853:(t,e)=>{"use strict";e.xmlns="http://www.w3.org/2000/xmlns/",e.svg="http://www.w3.org/2000/svg",e.xlink="http://www.w3.org/1999/xlink",e.svgAttrs={xmlns:e.svg,"xmlns:xlink":e.xlink}},7623:(t,e,r)=>{"use strict";e.version=r(88566).version,r(60613),r(1146);for(var n=r(25059),i=e.register=n.register,o=r(41103),a=Object.keys(o),s=0;s{"use strict";t.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:["",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},66379:(t,e)=>{"use strict";e.isLeftAnchor=function(t){return"left"===t.xanchor||"auto"===t.xanchor&&t.x<=1/3},e.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},e.isRightAnchor=function(t){return"right"===t.xanchor||"auto"===t.xanchor&&t.x>=2/3},e.isTopAnchor=function(t){return"top"===t.yanchor||"auto"===t.yanchor&&t.y>=2/3},e.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3},e.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3}},59804:(t,e,r)=>{"use strict";var n=r(31918),i=n.mod,o=n.modHalf,a=Math.PI,s=2*a;function l(t){return Math.abs(t[1]-t[0])>s-1e-14}function c(t,e){return o(e-t,s)}function d(t,e){if(l(e))return!0;var r,n;e[0](n=i(n,s))&&(n+=s);var o=i(t,s),a=o+s;return o>=r&&o<=n||a>=r&&a<=n}function u(t,e,r,n,i,o,c){i=i||0,o=o||0;var d,u,h,f,p,m=l([r,n]);function g(t,e){return[t*Math.cos(e)+i,o-t*Math.sin(e)]}m?(d=0,u=a,h=s):r=i&&t<=o);var i,o},pathArc:function(t,e,r,n,i){return u(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return u(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,o){return u(t,e,r,n,i,o,1)}}},98507:(t,e,r)=>{"use strict";var n=r(44514).decode,i=r(12517),o=Array.isArray,a=ArrayBuffer,s=DataView;function l(t){return a.isView(t)&&!(t instanceof s)}function c(t){return o(t)||l(t)}e.isTypedArray=l,e.isArrayOrTypedArray=c,e.isArray1D=function(t){return!c(t[0])},e.ensureArray=function(t,e){return o(t)||(t=[]),t.length=e,t};var d={u1c:"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,i1:"undefined"==typeof Int8Array?void 0:Int8Array,u1:"undefined"==typeof Uint8Array?void 0:Uint8Array,i2:"undefined"==typeof Int16Array?void 0:Int16Array,u2:"undefined"==typeof Uint16Array?void 0:Uint16Array,i4:"undefined"==typeof Int32Array?void 0:Int32Array,u4:"undefined"==typeof Uint32Array?void 0:Uint32Array,f4:"undefined"==typeof Float32Array?void 0:Float32Array,f8:"undefined"==typeof Float64Array?void 0:Float64Array};function u(t){return t.constructor===ArrayBuffer}function h(t,e,r){if(c(t)){if(c(t[0])){for(var n=r,i=0;i{"use strict";var n=r(7370),i=r(32994).BADNUM,o=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;t.exports=function(t){return"string"==typeof t&&(t=t.replace(o,"")),n(t)?Number(t):i}},86748:t=>{"use strict";t.exports=function(t){var e=t._fullLayout;e._glcanvas&&e._glcanvas.size()&&e._glcanvas.each((function(t){t.regl&&t.regl.clear({color:!0,depth:!0})}))}},11704:t=>{"use strict";t.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}},5365:(t,e,r)=>{"use strict";var n=r(7370),i=r(18106),o=r(3520),a=r(78920),s=r(17499),l=r(11891).DESELECTDIM,c=r(91355),d=r(46233).counter,u=r(31918).modHalf,h=r(98507).isArrayOrTypedArray,f=r(98507).isTypedArraySpec,p=r(98507).decodeTypedArraySpec;function m(t,r){var n=e.valObjectMeta[r.valType];if(r.arrayOk&&h(t))return!0;if(n.validateFunction)return n.validateFunction(t,r);var i={},o=i,a={set:function(t){o=t}};return n.coerceFunction(t,a,i,r),o!==i}e.valObjectMeta={data_array:{description:["An {array} of data.","The value must represent an {array} or it will be ignored,","but this array can be provided in several forms:","(1) a regular {array} object","(2) a typed array (e.g. Float32Array)","(3) an object with keys dtype, bdata, and optionally shape.","In this 3rd form, dtype is one of","*f8*, *f4*.","*i4*, *u4*,","*i2*, *u2*,","*i1*, *u1* or *u1c* for Uint8ClampedArray.","In addition to shorthand `dtype` above one could also use the following forms:","*float64*, *float32*,","*int32*, *uint32*,","*int16*, *uint16*,","*int8*, *uint8* or *uint8c* for Uint8ClampedArray.","`bdata` is either a base64-encoded string or the ArrayBuffer of","an integer or float typed array.","For either multi-dimensional arrays you must also","provide its dimensions separated by comma via `shape`.","For example using `dtype`: *f4* and `shape`: *5,100* you can","declare a 2-D array that has 5 rows and 100 columns","containing float32 values i.e. 4 bits per value.","`shape` is optional for one dimensional arrays."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(t,e,r){e.set(h(t)?t:f(t)?p(t):r)}},enumerated:{description:["Enumerated value type. The available values are listed","in `values`."].join(" "),requiredOpts:["values"],otherOpts:["dflt","coerceNumber","arrayOk"],coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),-1===n.values.indexOf(t)?e.set(r):e.set(t)},validateFunction:function(t,e){e.coerceNumber&&(t=+t);for(var r=e.values,n=0;ni.max?e.set(r):e.set(+t)}},integer:{description:["An integer or an integer inside a string.","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)}},string:{description:["A string value.","Numbers are converted to strings except for attributes with","`strict` set to true."].join(" "),requiredOpts:[],otherOpts:["dflt","noBlank","strict","arrayOk","values"],coerceFunction:function(t,e,r,n){if("string"!=typeof t){var i="number"==typeof t;!0!==n.strict&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{description:["A string describing color.","Supported formats:","- hex (e.g. '#d3d3d3')","- rgb (e.g. 'rgb(255, 0, 0)')","- rgba (e.g. 'rgb(255, 0, 0, 0.5)')","- hsl (e.g. 'hsl(0, 100%, 50%)')","- hsv (e.g. 'hsv(0, 100%, 100%)')","- named colors (full list: http://www.w3.org/TR/css3-color/#svg-color)"].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(t,e,r){i(t).isValid()?e.set(t):e.set(r)}},colorlist:{description:["A list of colors.","Must be an {array} containing valid colors."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every((function(t){return i(t).isValid()}))?e.set(t):e.set(r)}},colorscale:{description:["A Plotly colorscale either picked by a name:","(any of",Object.keys(a.scales).join(", "),")","customized as an {array} of 2-element {arrays} where","the first element is the normalized color level value","(starting at *0* and ending at *1*),","and the second item is a valid color string."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(t,e,r){e.set(a.get(t,r))}},angle:{description:["A number (in degree) between -180 and 180."].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(t,e,r){"auto"===t?e.set("auto"):n(t)?e.set(u(+t,360)):e.set(r)}},subplotid:{description:["An id string of a subplot type (given by dflt), optionally","followed by an integer >1. e.g. if dflt='geo', we can have","'geo', 'geo2', 'geo3', ..."].join(" "),requiredOpts:["dflt"],otherOpts:["regex"],coerceFunction:function(t,e,r,n){var i=n.regex||d(r);"string"==typeof t&&i.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||"string"==typeof t&&!!d(r).test(t)}},flaglist:{description:["A string representing a combination of flags","(order does not matter here).","Combine any of the available `flags` with *+*.","(e.g. ('lines+markers')).","Values in `extras` cannot be combined."].join(" "),requiredOpts:["flags"],otherOpts:["dflt","extras","arrayOk"],coerceFunction:function(t,e,r,n){if(-1===(n.extras||[]).indexOf(t))if("string"==typeof t){for(var i=t.split("+"),o=0;o{"use strict";var n,i,o=r(79969).DC,a=r(7370),s=r(64347),l=r(31918).mod,c=r(32994),d=c.BADNUM,u=c.ONEDAY,h=c.ONEHOUR,f=c.ONEMIN,p=c.ONESEC,m=c.EPOCHJD,g=r(25059),v=r(79969).aL,b=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,y=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,x=(new Date).getFullYear()-70;function w(t){return t&&g.componentsRegistry.calendars&&"string"==typeof t&&"gregorian"!==t}function _(t,e){return String(t+Math.pow(10,e)).substr(1)}e.dateTick0=function(t,r){var n=function(t,e){return w(t)?e?g.getComponentMethod("calendars","CANONICAL_SUNDAY")[t]:g.getComponentMethod("calendars","CANONICAL_TICK")[t]:e?"2000-01-02":"2000-01-01"}(t,!!r);if(r<2)return n;var i=e.dateTime2ms(n,t);return i+=u*(r-1),e.ms2DateTime(i,0,t)},e.dfltRange=function(t){return w(t)?g.getComponentMethod("calendars","DFLTRANGE")[t]:["2000-01-01","2001-01-01"]},e.isJSDate=function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.getTime},e.dateTime2ms=function(t,r){if(e.isJSDate(t)){var o=t.getTimezoneOffset()*f,a=(t.getUTCMinutes()-t.getMinutes())*f+(t.getUTCSeconds()-t.getSeconds())*p+(t.getUTCMilliseconds()-t.getMilliseconds());if(a){var s=3*f;o=o-s/2+l(a-o+s/2,s)}return(t=Number(t)-o)>=n&&t<=i?t:d}if("string"!=typeof t&&"number"!=typeof t)return d;t=String(t);var c=w(r),v=t.charAt(0);!c||"G"!==v&&"g"!==v||(t=t.substr(1),r="");var _=c&&"chinese"===r.substr(0,7),k=t.match(_?y:b);if(!k)return d;var A=k[1],T=k[3]||"1",M=Number(k[5]||1),S=Number(k[7]||0),C=Number(k[9]||0),E=Number(k[11]||0);if(c){if(2===A.length)return d;var L;A=Number(A);try{var z=g.getComponentMethod("calendars","getCal")(r);if(_){var O="i"===T.charAt(T.length-1);T=parseInt(T,10),L=z.newDate(A,z.toMonthIndex(A,T,O),M)}else L=z.newDate(A,Number(T),M)}catch(t){return d}return L?(L.toJD()-m)*u+S*h+C*f+E*p:d}A=2===A.length?(Number(A)+2e3-x)%100+x:Number(A),T-=1;var D=new Date(Date.UTC(2e3,T,M,S,C));return D.setUTCFullYear(A),D.getUTCMonth()!==T||D.getUTCDate()!==M?d:D.getTime()+E*p},n=e.MIN_MS=e.dateTime2ms("-9999"),i=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(t,r){return e.dateTime2ms(t,r)!==d};var k=90*u,A=3*h,T=5*f;function M(t,e,r,n,i){if((e||r||n||i)&&(t+=" "+_(e,2)+":"+_(r,2),(n||i)&&(t+=":"+_(n,2),i))){for(var o=4;i%10==0;)o-=1,i/=10;t+="."+_(i,o)}return t}e.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=n&&t<=i))return d;e||(e=0);var o,a,s,c,b,y,x=Math.floor(10*l(t+.05,1)),_=Math.round(t-x/10);if(w(r)){var S=Math.floor(_/u)+m,C=Math.floor(l(t,u));try{o=g.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(t){o=v("G%Y-%m-%d")(new Date(_))}if("-"===o.charAt(0))for(;o.length<11;)o="-0"+o.substr(1);else for(;o.length<10;)o="0"+o;a=e=n+u&&t<=i-u))return d;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return M(o("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},e.cleanDate=function(t,r,n){if(t===d)return r;if(e.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(w(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",t),r;if(!(t=e.ms2DateTimeLocal(+t))&&void 0!==r)return r}else if(!e.isDateTime(t,n))return s.error("unrecognized date",t),r;return t};var S=/%\d?f/g,C=/%h/g,E={1:"1",2:"1",3:"2",4:"2"};function L(t,e,r,n){t=t.replace(S,(function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(e+.05));if(t=t.replace(C,(function(){return E[r("%q")(i)]})),w(n))try{t=g.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(i)}var z=[59,59.9,59.99,59.999,59.9999];e.formatDate=function(t,e,r,n,i,o){if(i=w(i)&&i,!e)if("y"===r)e=o.year;else if("m"===r)e=o.month;else{if("d"!==r)return function(t,e){var r=l(t+.05,u),n=_(Math.floor(r/h),2)+":"+_(l(Math.floor(r/f),60),2);if("M"!==e){a(e)||(e=0);var i=(100+Math.min(l(t/p,60),z[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(t,r)+"\n"+L(o.dayMonthYear,t,n,i);e=o.dayMonth+"\n"+o.year}return L(e,t,n,i)};var O=3*u;e.incrementMonth=function(t,e,r){r=w(r)&&r;var n=l(t,u);if(t=Math.round(t-n),r)try{var i=Math.round(t/u)+m,o=g.getComponentMethod("calendars","getCal")(r),a=o.fromJD(i);return e%12?o.add(a,e,"m"):o.add(a,e/12,"y"),(a.toJD()-m)*u+n}catch(e){s.error("invalid ms "+t+" in calendar "+r)}var c=new Date(t+O);return c.setUTCMonth(c.getUTCMonth()+e)+n-O},e.findExactDates=function(t,e){for(var r,n,i=0,o=0,s=0,l=0,c=w(e)&&g.getComponentMethod("calendars","getCal")(e),d=0;d{"use strict";var n=r(27941),i=r(64347),o=r(75717),a=r(79538);function s(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function l(t,e,r){var n="plotly.js-style-"+t,o=document.getElementById(n);o||((o=document.createElement("style")).setAttribute("id",n),o.appendChild(document.createTextNode("")),document.head.appendChild(o));var a=o.sheet;a.insertRule?a.insertRule(e+"{"+r+"}",0):a.addRule?a.addRule(e,r,0):i.warn("addStyleRule failed")}function c(t){var e=window.getComputedStyle(t,null),r=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform");return"none"===r?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map((function(t){return+t}))}function d(t){for(var e=[];u(t);)e.push(t),t=t.parentNode;return e}function u(t){return t&&(t instanceof Element||t instanceof HTMLElement)}t.exports={getGraphDiv:function(t){var e;if("string"==typeof t){if(null===(e=document.getElementById(t)))throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null==t)throw new Error("DOM element provided is null or undefined");return t},isPlotDiv:function(t){var e=n.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")},removeElement:s,addStyleRule:function(t,e){l("global",t,e)},addRelatedStyleRule:l,deleteRelatedStyleRule:function(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&s(r)},getFullTransformMatrix:function(t){var e=d(t),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.forEach((function(t){var e=c(t);if(e){var n=o.convertCssMatrix(e);r=a.multiply(r,r,n)}})),r},getElementTransformMatrix:c,getElementAndAncestors:d,equalDomRects:function(t,e){return t&&e&&t.top===e.top&&t.left===e.left&&t.right===e.right&&t.bottom===e.bottom}}},16677:(t,e,r)=>{"use strict";var n=r(86626).EventEmitter,i={init:function(t){if(t._ev instanceof n)return t;var e=new n,r=new n;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(n,i){"undefined"!=typeof jQuery&&jQuery(t).trigger(n,i),e.emit(n,i),r.emit(n,i)},t},triggerHandler:function(t,e,r){var n,i;"undefined"!=typeof jQuery&&(n=jQuery(t).triggerHandler(e,r));var o=t._ev;if(!o)return n;var a,s=o._events[e];if(!s)return n;function l(t){return t.listener?(o.removeListener(e,t.listener),t.fired?void 0:(t.fired=!0,t.listener.apply(o,[r]))):t.apply(o,[r])}for(s=Array.isArray(s)?s:[s],a=0;a{"use strict";var n=r(12517),i=Array.isArray;function o(t,e,r,a){var s,l,c,d,u,h,f,p=t[0],m=t.length;if(2===m&&i(p)&&i(t[1])&&0===p.length){if(f=function(t,e){var r,n;for(r=0;r{"use strict";t.exports=function(t){for(var e={},r=[],n=0,i=0;i{"use strict";function e(t){return!0===t.visible}function r(t){var e=t[0].trace;return!0===e.visible&&0!==e._length}t.exports=function(t){for(var n,i=(n=t,Array.isArray(n)&&Array.isArray(n[0])&&n[0][0]&&n[0][0].trace?r:e),o=[],a=0;a{"use strict";var n,i,o,a=r(31918).mod;function s(t,e,r,n,i,o,a,s){var l=r-t,c=i-t,d=a-i,u=n-e,h=o-e,f=s-o,p=l*f-d*u;if(0===p)return null;var m=(c*f-d*h)/p,g=(c*u-l*h)/p;return g<0||g>1||m<0||m>1?null:{x:t+l*m,y:e+u*m}}function l(t,e,r,n,i){var o=n*t+i*e;if(o<0)return n*n+i*i;if(o>r){var a=n-t,s=i-e;return a*a+s*s}var l=n*e-i*t;return l*l/r}e.segmentsIntersect=s,e.segmentDistance=function(t,e,r,n,i,o,a,c){if(s(t,e,r,n,i,o,a,c))return 0;var d=r-t,u=n-e,h=a-i,f=c-o,p=d*d+u*u,m=h*h+f*f,g=Math.min(l(d,u,p,i-t,o-e),l(d,u,p,a-t,c-e),l(h,f,m,t-i,e-o),l(h,f,m,r-i,n-o));return Math.sqrt(g)},e.getTextLocation=function(t,e,r,s){if(t===i&&s===o||(n={},i=t,o=s),n[r])return n[r];var l=t.getPointAtLength(a(r-s/2,e)),c=t.getPointAtLength(a(r+s/2,e)),d=Math.atan((c.y-l.y)/(c.x-l.x)),u=t.getPointAtLength(a(r,e)),h={x:(4*u.x+l.x+c.x)/6,y:(4*u.y+l.y+c.y)/6,theta:d};return n[r]=h,h},e.clearLocationCache=function(){i=null},e.getVisibleSegment=function(t,e,r){var n,i,o=e.left,a=e.right,s=e.top,l=e.bottom,c=0,d=t.getTotalLength(),u=d;function h(e){var r=t.getPointAtLength(e);0===e?n=r:e===d&&(i=r);var c=r.xa?r.x-a:0,u=r.yl?r.y-l:0;return Math.sqrt(c*c+u*u)}for(var f=h(c);f;){if((c+=f+r)>u)return;f=h(c)}for(f=h(u);f;){if(c>(u-=f+r))return;f=h(u)}return{min:c,max:u,len:u-c,total:d,isClosed:0===c&&u===d&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},e.findPointOnPath=function(t,e,r,n){for(var i,o,a,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,d=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,u=0,h=0,f=s;u0?f=i:h=i,u++}return o}},25069:(t,e,r)=>{"use strict";var n=r(7370),i=r(18106),o=r(34463),a=r(80755),s=r(84226).defaultLine,l=r(98507).isArrayOrTypedArray,c=o(s);function d(t,e){var r=t;return r[3]*=e,r}function u(t){if(n(t))return c;var e=o(t);return e.length?e:c}function h(t){return n(t)?t:1}t.exports={formatColor:function(t,e,r){var n=t.color;n&&n._inputArray&&(n=n._inputArray);var i,s,f,p,m,g=l(n),v=l(e),b=a.extractOpts(t),y=[];if(i=void 0!==b.colorscale?a.makeColorScaleFuncFromTrace(t):u,s=g?function(t,e){return void 0===t[e]?c:o(i(t[e]))}:u,f=v?function(t,e){return void 0===t[e]?1:h(t[e])}:h,g||v)for(var x=0;x{"use strict";t.exports=function(t){return t}},98803:t=>{"use strict";t.exports=function(t,e){if(!e)return t;var r=1/Math.abs(e),n=r>1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var o=String(e).length;if(i>=String(t).length+o){var a=parseFloat(n).toPrecision(12);-1===a.indexOf("e+")&&(n=+a)}}return n}},12822:(t,e,r)=>{"use strict";var n=r(27941),i=r(79969).aL,o=r(31830).GP,a=r(7370),s=r(32994),l=s.FP_SAFE,c=-l,d=s.BADNUM,u=t.exports={};u.adjustFormat=function(t){return!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t)?t:"0.f"===t?"~f":/^\d%/.test(t)?"~%":/^\ds/.test(t)?"~s":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?"~"+t:t};var h={};u.warnBadFormat=function(t){var e=String(t);h[e]||(h[e]=1,u.warn('encountered bad format: "'+e+'"'))},u.noFormat=function(t){return String(t)},u.numberFormat=function(t){var e;try{e=o(u.adjustFormat(t))}catch(e){return u.warnBadFormat(t),u.noFormat}return e},u.nestedProperty=r(91355),u.keyedContainer=r(68588),u.relativeAttr=r(21904),u.isPlainObject=r(12517),u.toLogRange=r(61814),u.relinkPrivateKeys=r(45905);var f=r(98507);u.isArrayBuffer=f.isArrayBuffer,u.isTypedArray=f.isTypedArray,u.isArrayOrTypedArray=f.isArrayOrTypedArray,u.isArray1D=f.isArray1D,u.ensureArray=f.ensureArray,u.concat=f.concat,u.maxRowLength=f.maxRowLength,u.minRowLength=f.minRowLength;var p=r(31918);u.mod=p.mod,u.modHalf=p.modHalf;var m=r(5365);u.valObjectMeta=m.valObjectMeta,u.coerce=m.coerce,u.coerce2=m.coerce2,u.coerceFont=m.coerceFont,u.coercePattern=m.coercePattern,u.coerceHoverinfo=m.coerceHoverinfo,u.coerceSelectionMarkerOpacity=m.coerceSelectionMarkerOpacity,u.validate=m.validate;var g=r(41095);u.dateTime2ms=g.dateTime2ms,u.isDateTime=g.isDateTime,u.ms2DateTime=g.ms2DateTime,u.ms2DateTimeLocal=g.ms2DateTimeLocal,u.cleanDate=g.cleanDate,u.isJSDate=g.isJSDate,u.formatDate=g.formatDate,u.incrementMonth=g.incrementMonth,u.dateTick0=g.dateTick0,u.dfltRange=g.dfltRange,u.findExactDates=g.findExactDates,u.MIN_MS=g.MIN_MS,u.MAX_MS=g.MAX_MS;var v=r(45380);u.findBin=v.findBin,u.sorterAsc=v.sorterAsc,u.sorterDes=v.sorterDes,u.distinctVals=v.distinctVals,u.roundUp=v.roundUp,u.sort=v.sort,u.findIndexOfMin=v.findIndexOfMin,u.sortObjectKeys=r(54747);var b=r(6749);u.aggNums=b.aggNums,u.len=b.len,u.mean=b.mean,u.median=b.median,u.midRange=b.midRange,u.variance=b.variance,u.stdev=b.stdev,u.interp=b.interp;var y=r(75717);u.init2dArray=y.init2dArray,u.transposeRagged=y.transposeRagged,u.dot=y.dot,u.translationMatrix=y.translationMatrix,u.rotationMatrix=y.rotationMatrix,u.rotationXYMatrix=y.rotationXYMatrix,u.apply3DTransform=y.apply3DTransform,u.apply2DTransform=y.apply2DTransform,u.apply2DTransform2=y.apply2DTransform2,u.convertCssMatrix=y.convertCssMatrix,u.inverseTransformMatrix=y.inverseTransformMatrix;var x=r(59804);u.deg2rad=x.deg2rad,u.rad2deg=x.rad2deg,u.angleDelta=x.angleDelta,u.angleDist=x.angleDist,u.isFullCircle=x.isFullCircle,u.isAngleInsideSector=x.isAngleInsideSector,u.isPtInsideSector=x.isPtInsideSector,u.pathArc=x.pathArc,u.pathSector=x.pathSector,u.pathAnnulus=x.pathAnnulus;var w=r(66379);u.isLeftAnchor=w.isLeftAnchor,u.isCenterAnchor=w.isCenterAnchor,u.isRightAnchor=w.isRightAnchor,u.isTopAnchor=w.isTopAnchor,u.isMiddleAnchor=w.isMiddleAnchor,u.isBottomAnchor=w.isBottomAnchor;var _=r(8994);u.segmentsIntersect=_.segmentsIntersect,u.segmentDistance=_.segmentDistance,u.getTextLocation=_.getTextLocation,u.clearLocationCache=_.clearLocationCache,u.getVisibleSegment=_.getVisibleSegment,u.findPointOnPath=_.findPointOnPath;var k=r(98260);u.extendFlat=k.extendFlat,u.extendDeep=k.extendDeep,u.extendDeepAll=k.extendDeepAll,u.extendDeepNoArrays=k.extendDeepNoArrays;var A=r(64347);u.log=A.log,u.warn=A.warn,u.error=A.error;var T=r(46233);u.counterRegex=T.counter;var M=r(76324);u.throttle=M.throttle,u.throttleDone=M.done,u.clearThrottle=M.clear;var S=r(16822);function C(t){var e={};for(var r in t)for(var n=t[r],i=0;il||t=e)&&a(t)&&t>=0&&t%1==0},u.noop=r(51648),u.identity=r(75250),u.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},u.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},u.simpleMap=function(t,e,r,n,i){for(var o=t.length,a=new Array(o),s=0;s=Math.pow(2,r)?i>10?(u.warn("randstr failed uniqueness"),l):t(e,r,n,(i||0)+1):l},u.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},u.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,o,a=t.length,s=2*a,l=2*e-1,c=new Array(l),d=new Array(a);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=a&&(i=s-1-i),o+=t[i]*c[n];d[r]=o}return d},u.syncOrAsync=function(t,e,r){var n;function i(){return u.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},u.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},u.noneOrAll=function(t,e,r){if(t){var n,i=!1,o=!0;for(n=0;n0?e:0}))},u.fillArray=function(t,e,r,n){if(n=n||u.identity,u.isArrayOrTypedArray(t))for(var i=0;i1?i+a[1]:"";if(o&&(a.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+o+"$2");return s+l},u.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var R=/^\w*$/;u.templateString=function(t,e){var r={};return t.replace(u.TEMPLATE_STRING_REGEX,(function(t,n){var i;return R.test(n)?i=e[n]:(r[n]=r[n]||u.nestedProperty(e,n).get,i=r[n]()),u.isValidTextValue(i)?i:""}))};var F={max:10,count:0,name:"hovertemplate"};u.hovertemplateString=function(){return U.apply(F,arguments)};var P={max:10,count:0,name:"texttemplate"};u.texttemplateString=function(){return U.apply(P,arguments)};var j=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,N={max:10,count:0,name:"texttemplate",parseMultDiv:!0};u.texttemplateStringForShapes=function(){return U.apply(N,arguments)};var B=/^[:|\|]/;function U(t,e,r){var n=this,o=arguments;e||(e={});var a={};return t.replace(u.TEMPLATE_STRING_REGEX,(function(t,s,l){var c="_xother"===s||"_yother"===s,d="_xother_"===s||"_yother_"===s,h="xother_"===s||"yother_"===s,f="xother"===s||"yother"===s||c||h||d,p=s;(c||d)&&(p=p.substring(1)),(h||d)&&(p=p.substring(0,p.length-1));var m,g,v,b=null,y=null;if(n.parseMultDiv){var x=function(t){var e=t.match(j);return e?{key:e[1],op:e[2],number:Number(e[3])}:{key:t,op:null,number:null}}(p);p=x.key,b=x.op,y=x.number}if(f){if(void 0===(m=e[p]))return""}else for(v=3;v=48&&a<=57,c=s>=48&&s<=57;if(l&&(n=10*n+a-48),c&&(i=10*i+s-48),!l||!c){if(n!==i)return n-i;if(a!==s)return a-s}}return i-n};var G=2e9;u.seedPseudoRandom=function(){G=2e9},u.pseudoRandom=function(){var t=G;return G=(69069*G+1)%4294967296,Math.abs(G-t)<429496729?u.pseudoRandom():G/4294967296},u.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=u.extractOption(t,e,"htx","hovertext");if(u.isValidTextValue(i))return n(i);var o=u.extractOption(t,e,"tx","text");return u.isValidTextValue(o)?n(o):void 0},u.isValidTextValue=function(t){return t||0===t},u.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+"%",n=0;n1&&(c=1):c=0,u.strTranslate(i-c*(r+a),o-c*(n+s))+u.strScale(c)+(l?"rotate("+l+(e?"":" "+r+" "+n)+")":"")},u.setTransormAndDisplay=function(t,e){t.attr("transform",u.getTextTransform(e)),t.style("display",e.scale?null:"none")},u.ensureUniformFontSize=function(t,e){var r=u.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},u.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)},u.bigFont=function(t){return Math.round(1.2*t)};var V=u.getFirefoxVersion(),H=null!==V&&V<86;u.getPositionFromD3Event=function(){return H?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},12517:t=>{"use strict";t.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}},68588:(t,e,r)=>{"use strict";var n=r(91355),i=/^\w*$/;t.exports=function(t,e,r,o){var a,s,l;r=r||"name",o=o||"value";var c={};e&&e.length?(l=n(t,e),s=l.get()):s=t,e=e||"";var d={};if(s)for(a=0;a2)return c[e]=2|c[e],h.set(t,null);if(u){for(a=e;a{"use strict";var n=r(25059);t.exports=function(t,e){for(var r=t._context.locale,i=0;i<2;i++){for(var o=t._context.locales,a=0;a<2;a++){var s=(o[r]||{}).dictionary;if(s){var l=s[e];if(l)return l}o=n.localeRegistry}var c=r.split("-")[0];if(c===r)break;r=c}return e}},64347:(t,e,r)=>{"use strict";var n=r(58389).dfltConfig,i=r(39382),o=t.exports={};o.log=function(){var t;if(n.logging>1){var e=["LOG:"];for(t=0;t1){var r=[];for(t=0;t"),"long")}},o.warn=function(){var t;if(n.logging>0){var e=["WARN:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}},o.error=function(){var t;if(n.logging>0){var e=["ERROR:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}}},51915:(t,e,r)=>{"use strict";var n=r(27941);t.exports=function(t,e,r){var i=t.selectAll("g."+r.replace(/\s/g,".")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",r),i.order();var o=t.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(t){t[0][o]=n.select(this)})),i}},75717:(t,e,r)=>{"use strict";var n=r(79538);e.init2dArray=function(t,e){for(var r=new Array(t),n=0;n{"use strict";t.exports={mod:function(t,e){var r=t%e;return r<0?r+e:r},modHalf:function(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}}},91355:(t,e,r)=>{"use strict";var n=r(7370),i=r(98507).isArrayOrTypedArray;function o(t,e){return function(){var r,n,a,s,l,c=t;for(s=0;s{"use strict";t.exports=function(){}},39382:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=[];t.exports=function(t,e){if(-1===o.indexOf(t)){o.push(t);var r=1e3;i(e)?r=e:"long"===e&&(r=3e3);var a=n.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0),a.selectAll(".notifier-note").data(o).enter().append("div").classed("notifier-note",!0).style("opacity",0).each((function(t){var i=n.select(this);i.append("button").classed("notifier-close",!0).html("×").on("click",(function(){i.transition().call(s)}));for(var o=i.append("p"),a=t.split(//g),l=0;l{"use strict";var n=r(76292),i="data-savedcursor";t.exports=function(t,e){var r=t.attr(i);if(e){if(!r){for(var o=(t.attr("class")||"").split(" "),a=0;a{"use strict";var n=r(75717).dot,i=r(32994).BADNUM,o=t.exports={};o.tester=function(t){var e,r=t.slice(),n=r[0][0],o=n,a=r[0][1],s=a;for(r[r.length-1][0]===r[0][0]&&r[r.length-1][1]===r[0][1]||r.push(r[0]),e=1;eo||c===i||cs||e&&l(t))}:function(t,e){var l=t[0],c=t[1];if(l===i||lo||c===i||cs)return!1;var d,u,h,f,p,m=r.length,g=r[0][0],v=r[0][1],b=0;for(d=1;dMath.max(u,g)||c>Math.max(h,v)))if(cd||Math.abs(n(a,h))>i)return!0;return!1},o.filter=function(t,e){var r=[t[0]],n=0,i=0;function a(a){t.push(a);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c1&&a(t.pop()),{addPt:a,raw:t,filtered:r}}},41246:(t,e,r)=>{"use strict";var n=r(91203),i=r(83029);t.exports=function(t,e,o){var a=t._fullLayout,s=!0;return a._glcanvas.each((function(n){if(n.regl)n.regl.preloadCachedCode(o);else if(!n.pick||a._has("parcoords")){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.g.devicePixelRatio,extensions:e||[],cachedCode:o||{}})}catch(t){s=!1}n.regl||(s=!1),s&&this.addEventListener("webglcontextlost",(function(e){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:e,layer:n.key})}),!1)}})),s||n({container:a._glcontainer.node()}),s}},31406:(t,e,r)=>{"use strict";var n=r(7370),i=r(12431);t.exports=function(t){var e;if("string"!=typeof(e=t&&t.hasOwnProperty("userAgent")?t.userAgent:function(){var t;return"undefined"!=typeof navigator&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),t}()))return!0;var r=i({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!r)for(var o=e.split(" "),a=1;a-1;s--){var l=o[s];if("Version/"===l.substr(0,8)){var c=l.substr(8).split(".")[0];if(n(c)&&(c=+c),c>=13)return!0}}return r}},65280:t=>{"use strict";t.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;n{"use strict";var n=r(12822),i=r(58389).dfltConfig,o={add:function(t,e,r,n,o){var a,s;t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},s=t.undoQueue.index,t.autoplay?t.undoQueue.inSequence||(t.autoplay=!1):(!t.undoQueue.sequence||t.undoQueue.beginSequence?(a={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(s,t.undoQueue.queue.length-s,a),t.undoQueue.index+=1):a=t.undoQueue.queue[s-1],t.undoQueue.beginSequence=!1,a&&(a.undo.calls.unshift(e),a.undo.args.unshift(r),a.redo.calls.push(n),a.redo.args.push(o)),t.undoQueue.queue.length>i.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r{"use strict";e.counter=function(t,e,r,n){var i=(e||"")+(r?"":"$"),o=!1===n?"":"^";return"xy"===t?new RegExp(o+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(o+t+"([2-9]|[1-9][0-9]+)?"+i)}},21904:t=>{"use strict";var e=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,r=/^[^\.\[\]]+$/;t.exports=function(t,n){for(;n;){var i=t.match(e);if(i)t=i[1];else{if(!t.match(r))throw new Error("bad relativeAttr call:"+[t,n]);t=""}if("^"!==n.charAt(0))break;n=n.slice(1)}return t&&"["!==n.charAt(0)?t+"."+n:t+n}},45905:(t,e,r)=>{"use strict";var n=r(98507).isArrayOrTypedArray,i=r(12517);t.exports=function t(e,r){for(var o in r){var a=r[o],s=e[o];if(s!==a)if("_"===o.charAt(0)||"function"==typeof a){if(o in e)continue;e[o]=a}else if(n(a)&&n(s)&&i(a[0])){if("customdata"===o||"ids"===o)continue;for(var l=Math.min(a.length,s.length),c=0;c{"use strict";var n=r(7370),i=r(64347),o=r(75250),a=r(32994).BADNUM,s=1e-9;function l(t,e){return te}function u(t,e){return t>=e}e.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-s)-1:Math.floor((t-e.start)/e.size+s);var o,a,h=0,f=e.length,p=0,m=f>1?(e[f-1]-e[0])/(f-1):1;for(a=m>=0?r?l:c:r?u:d,t+=m*s*(r?-1:1)*(m>=0?1:-1);h90&&i.log("Long binary search..."),h-1},e.sorterAsc=function(t,e){return t-e},e.sorterDes=function(t,e){return e-t},e.distinctVals=function(t){var r,n=t.slice();for(n.sort(e.sorterAsc),r=n.length-1;r>-1&&n[r]===a;r--);for(var i,o=n[r]-n[0]||1,s=o/(r||1)/1e4,l=[],c=0;c<=r;c++){var d=n[c],u=d-i;void 0===i?(l.push(d),i=d):u>s&&(o=Math.min(o,u),l.push(d),i=d)}return{vals:l,minDiff:o}},e.roundUp=function(t,e,r){for(var n,i=0,o=e.length-1,a=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;i0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},e.findIndexOfMin=function(t,e){e=e||o;for(var r,n=1/0,i=0;i{"use strict";t.exports=function(t,e){(t.attr("class")||"").split(" ").forEach((function(e){0===e.indexOf("cursor-")&&t.classed(e,!1)})),e&&t.classed("cursor-"+e,!0)}},91203:(t,e,r)=>{"use strict";var n=r(17499),i=function(){};t.exports=function(t){for(var e in t)"function"==typeof t[e]&&(t[e]=i);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var r=document.createElement("div");r.className="no-webgl",r.style.cursor="pointer",r.style.fontSize="24px",r.style.color=n.defaults[0],r.style.position="absolute",r.style.left=r.style.top="0px",r.style.width=r.style.height="100%",r.style["background-color"]=n.lightLine,r.style["z-index"]=30;var o=document.createElement("p");return o.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",o.style.position="relative",o.style.top="50%",o.style.left="50%",o.style.height="30%",o.style.width="50%",o.style.margin="-15% 0 0 -25%",r.appendChild(o),t.container.appendChild(r),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}},54747:t=>{"use strict";t.exports=function(t){return Object.keys(t).sort()}},6749:(t,e,r)=>{"use strict";var n=r(7370),i=r(98507).isArrayOrTypedArray;e.aggNums=function(t,r,o,a){var s,l;if((!a||a>o.length)&&(a=o.length),n(r)||(r=!1),i(o[0])){for(l=new Array(a),s=0;st.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},17235:(t,e,r)=>{"use strict";var n=r(34463);t.exports=function(t){return t?n(t):[0,0,0,1]}},80394:(t,e,r)=>{"use strict";var n=r(27941),i=r(12822),o=i.strTranslate,a=r(25853),s=r(89701).LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;e.convertToTspans=function(t,r,g){var S=t.text(),C=!t.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!=typeof MathJax&&S.match(l),z=n.select(t.node().parentNode);if(!z.empty()){var O=t.attr("class")?t.attr("class").split(" ")[0]:"text";return O+="-math",z.selectAll("svg."+O).remove(),z.selectAll("g."+O+"-group").remove(),t.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),C?(r&&r._promises||[]).push(new Promise((function(e){t.style("display","none");var r=parseInt(t.node().style.fontSize,10),a={fontSize:r};!function(t,e,r){var o,a,s,l,h=parseInt((MathJax.version||"").split(".")[0]);if(2===h||3===h){var f=function(){var r="math-output-"+i.randstr({},64),o=(l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":e.fontSize+"px"}).text(t.replace(c,"\\lt ").replace(d,"\\gt "))).node();return 2===h?MathJax.Hub.Typeset(o):MathJax.typeset([o])},p=function(){var e=l.select(2===h?".MathJax_SVG":".MathJax"),o=!e.empty()&&l.select("svg").node();if(o){var a,s=o.getBoundingClientRect();a=2===h?n.select("body").select("#MathJax_SVG_glyphs"):e.select("defs"),r(e,a,s)}else i.log("There was an error in the tex syntax.",t),r();l.remove()};2===h?MathJax.Hub.Queue((function(){return a=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:u},displayAlign:"left"})}),(function(){if("SVG"!==(o=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),f,p,(function(){if("SVG"!==o)return MathJax.Hub.setRenderer(o)}),(function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(a)})):3===h&&(a=i.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=u,"svg"!==(o=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){f(),p(),"svg"!==o&&(MathJax.config.startup.output=o),MathJax.config=a})))}else i.warn("No MathJax version:",MathJax.version)}(C[2],a,(function(n,i,a){z.selectAll("svg."+O).remove(),z.selectAll("g."+O+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node())return D(),void e();var l=z.append("g").classed(O+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var c=a.width,d=a.height;s.attr({class:O,height:d,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var u=t.node().style.fill||"black",h=s.select("g");h.attr({fill:u,stroke:u});var f=h.node().getBoundingClientRect(),p=f.width,m=f.height;(p>c||m>d)&&(s.style("overflow","hidden"),p=(f=s.node().getBoundingClientRect()).width,m=f.height);var v=+t.attr("x"),b=+t.attr("y"),y=-(r||t.node().getBoundingClientRect().height)/4;if("y"===O[0])l.attr({transform:"rotate("+[-90,v,b]+")"+o(-p/2,y-m/2)});else if("l"===O[0])b=y-m/2;else if("a"===O[0]&&0!==O.indexOf("atitle"))v=0,b=y;else{var x=t.attr("text-anchor");v-=p*("middle"===x?.5:"end"===x?1:0),b=b+y-m/2}s.attr({x:v,y:b}),g&&g.call(t,l),e(l)}))}))):D(),t}function D(){z.empty()||(O=t.attr("class")+"-math",z.select("svg."+O).remove()),t.text("").style("white-space","pre");var r=function(t,e){e=e.replace(v," ");var r,o=!1,l=[],c=-1;function d(){c++;var e=document.createElementNS(a.svg,"tspan");n.select(e).attr({class:"line",dy:c*s+"em"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var o=1;o doesnt match end tag <"+t+">. Pretending it did match.",e),r=l[l.length-1].node}else i.log("Ignoring unexpected end tag .",e)}x.test(e)?d():(r=t,l=[{node:t}]);for(var C=e.split(b),z=0;z|>|>)/g,u=[["$","$"],["\\(","\\)"]],h={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},f={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},m="​",g=["http:","https:","mailto:","",void 0,":"],v=e.NEWLINES=/(\r\n?|\n)/g,b=/(<[^<>]*>)/,y=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=//i;e.BR_TAG_ALL=//gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,_=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,k=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,A=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function T(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&E(n)}var M=/(^|;)\s*color:/;e.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:["br"],i=t.split(b),o=[],a="",s=0,l=0;l3?o.push(c.substr(0,f-3)+"..."):o.push(c.substr(0,f));break}a=""}}return o.join("")};var S={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},C=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(t){return t.replace(C,(function(t,e){return("#"===e.charAt(0)?function(t){if(!(t>1114111)){var e=String.fromCodePoint;if(e)return e(t);var r=String.fromCharCode;return t<=65535?r(t):r(55232+(t>>10),t%1024+56320)}}("x"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):S[e])||t}))}function L(t){var e=encodeURI(decodeURI(t)),r=document.createElement("a"),n=document.createElement("a");r.href=t,n.href=e;var i=r.protocol,o=n.protocol;return-1!==g.indexOf(i)&&-1!==g.indexOf(o)?e:""}function z(t,e,r){var n,o,a,s=r.horizontalAlign,l=r.verticalAlign||"top",c=t.node().getBoundingClientRect(),d=e.node().getBoundingClientRect();return o="bottom"===l?function(){return c.bottom-n.height}:"middle"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},a="right"===s?function(){return c.right-n.width}:"center"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var t=a()-d.left,e=o()-d.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+"px",left:t+"px","z-index":1e3}),this}}e.convertEntities=E,e.sanitizeHTML=function(t){t=t.replace(v," ");for(var e=document.createElement("p"),r=e,i=[],o=t.split(b),a=0;a{"use strict";var r={};function n(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}e.throttle=function(t,e,i){var o=r[t],a=Date.now();if(!o){for(var s in r)r[s].tso.ts+e?l():o.timer=setTimeout((function(){l(),o.timer=null}),e)},e.done=function(t){var e=r[t];return e&&e.timer?new Promise((function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}})):Promise.resolve()},e.clear=function(t){if(t)n(r[t]),delete r[t];else for(var i in r)e.clear(i)}},61814:(t,e,r)=>{"use strict";var n=r(7370);t.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},10701:t=>{"use strict";t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6048:t=>{"use strict";t.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{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"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},81776:(t,e,r)=>{"use strict";var n=r(25059);t.exports=function(t){for(var e,r,i=n.layoutArrayContainers,o=n.layoutArrayRegexes,a=t.split("[")[0],s=0;s{"use strict";var n=r(98260).extendFlat,i=r(12517),o={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"],description:["trace attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*clearAxisTypes* resets the types of the axes this trace is on, because new data could","cause the automatic axis type detection to change. Log type will not be cleared, as that","is never automatically chosen so must have been user-specified.","*plot* (re)plots but without first clearing `gd.calcdata`.","*style* only calls `module.style` (or module.editStyle) for all trace modules and redraws the legend.","*markerSize* is like *style*, but propagate axis-range changes due to scatter `marker.size`","*colorbars* only redraws colorbars."].join(" ")},a={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"],description:["layout attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*plot* (re)plots but without first clearing `gd.calcdata`.","*legend* only redraws the legend.","*ticks* only redraws axis ticks, labels, and gridlines.","*axrange* minimal sequence when updating axis ranges.","*layoutstyle* reapplies global and SVG cartesian axis styles.","*modebar* just updates the modebar.","*camera* just updates the camera settings for gl3d scenes.","*arraydraw* allows component arrays to invoke the redraw routines just for the","component(s) that changed.","*colorbars* only redraws colorbars."].join(" ")},s=o.flags.slice().concat(["fullReplot"]),l=a.flags.slice().concat("layoutReplot");function c(t){for(var e={},r=0;r{"use strict";var n=r(7370),i=r(17399),o=r(25059),a=r(12822),s=r(51137),l=r(99246),c=r(17499),d=l.cleanId,u=l.getFromTrace,h=o.traceIs;function f(t,e){var r=t[e],n=e.charAt(0);r&&"paper"!==r&&(t[e]=d(r,n,!0))}function p(t){function e(e,r){var n=t[e],i=t.title&&t.title[r];n&&!i&&(t.title||(t.title={}),t.title[r]=t[e],delete t[e])}t&&("string"!=typeof t.title&&"number"!=typeof t.title||(t.title={text:t.title}),e("titlefont","font"),e("titleposition","position"),e("titleside","side"),e("titleoffset","offset"))}function m(t){if(!a.isPlainObject(t))return!1;var e=t.name;return delete t.name,delete t.showlegend,("string"==typeof e||"number"==typeof e)&&String(e)}function g(t,e,r,n){if(r&&!n)return t;if(n&&!r)return e;if(!t.trim())return e;if(!e.trim())return t;var i,o=Math.min(t.length,e.length);for(i=0;i0&&a.log("Clearing previous rejected promises from queue."),t._promises=[]},e.cleanLayout=function(t){var r,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var o=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,u=(s.subplotsRegistry.ternary||{}).attrRegex,h=(s.subplotsRegistry.gl3d||{}).attrRegex,m=Object.keys(t);for(r=0;r3?(D.x=1.02,D.xanchor="left"):D.x<-2&&(D.x=-.02,D.xanchor="right"),D.y>3?(D.y=1.02,D.yanchor="bottom"):D.y<-2&&(D.y=-.02,D.yanchor="top")),p(t),"rotate"===t.dragmode&&(t.dragmode="orbit"),c.clean(t),t.template&&t.template.layout&&e.cleanLayout(t.template.layout),t},e.cleanData=function(t){for(var r=0;r0)return t.substr(0,e)}e.hasParent=function(t,e){for(var r=x(e);r;){if(r in t)return!0;r=x(r)}return!1};var w=["x","y","z"];e.clearAxisTypes=function(t,e,r){for(var n=0;n{"use strict";var n=r(57755);e._doPlot=n._doPlot,e.newPlot=n.newPlot,e.restyle=n.restyle,e.relayout=n.relayout,e.redraw=n.redraw,e.update=n.update,e._guiRestyle=n._guiRestyle,e._guiRelayout=n._guiRelayout,e._guiUpdate=n._guiUpdate,e._storeDirectGUIEdit=n._storeDirectGUIEdit,e.react=n.react,e.extendTraces=n.extendTraces,e.prependTraces=n.prependTraces,e.addTraces=n.addTraces,e.deleteTraces=n.deleteTraces,e.moveTraces=n.moveTraces,e.purge=n.purge,e.addFrames=n.addFrames,e.deleteFrames=n.deleteFrames,e.animate=n.animate,e.setPlotConfig=n.setPlotConfig;var i=r(16822).getGraphDiv,o=r(71422).eraseActiveShape;e.deleteActiveShape=function(t){return o(i(t))},e.toImage=r(42704),e.validate=r(56205),e.downloadImage=r(56787);var a=r(89170);e.makeTemplate=a.makeTemplate,e.validateTemplate=a.validateTemplate},50305:(t,e,r)=>{"use strict";var n=r(12517),i=r(51648),o=r(64347),a=r(45380).sorterAsc,s=r(25059);e.containerArrayMatch=r(81776);var l=e.isAddVal=function(t){return"add"===t||n(t)},c=e.isRemoveVal=function(t){return null===t||"remove"===t};e.applyContainerArrayChanges=function(t,e,r,n,d){var u=e.astr,h=s.getComponentMethod(u,"supplyLayoutDefaults"),f=s.getComponentMethod(u,"draw"),p=s.getComponentMethod(u,"drawOne"),m=n.replot||n.recalc||h===i||f===i,g=t.layout,v=t._fullLayout;if(r[""]){Object.keys(r).length>1&&o.warn("Full array edits are incompatible with other edits",u);var b=r[""][""];if(c(b))e.set(null);else{if(!Array.isArray(b))return o.warn("Unrecognized full array edit value",u,b),!0;e.set(b)}return!m&&(h(g,v),f(t),!0)}var y,x,w,_,k,A,T,M,S=Object.keys(r).map(Number).sort(a),C=e.get(),E=C||[],L=d(v,u).get(),z=[],O=-1,D=E.length;for(y=0;yE.length-(T?0:1))o.warn("index out of range",u,w);else if(void 0!==A)k.length>1&&o.warn("Insertion & removal are incompatible with edits to the same index.",u,w),c(A)?z.push(w):T?("add"===A&&(A={}),E.splice(w,0,A),L&&L.splice(w,0,{})):o.warn("Unrecognized full object edit value",u,w,A),-1===O&&(O=w);else for(x=0;x=0;y--)E.splice(z[y],1),L&&L.splice(z[y],1);if(E.length?C||e.set(E):e.set(null),m)return!1;if(h(g,v),p!==i){var I;if(-1===O)I=S;else{for(D=Math.max(E.length,D),I=[],y=0;y=O);y++)I.push(w);for(y=O;y{"use strict";var n=r(27941),i=r(7370),o=r(56885),a=r(12822),s=a.nestedProperty,l=r(16677),c=r(79385),d=r(25059),u=r(35852),h=r(51137),f=r(75815),p=r(46458),m=r(86130),g=r(40666),v=r(17499),b=r(30977).initInteractions,y=r(25853),x=r(70059).clearOutline,w=r(58389).dfltConfig,_=r(50305),k=r(32862),A=r(39004),T=r(62309),M=r(21197).AX_NAME_PATTERN,S=0;function C(t){var e=t._fullLayout;e._redrawFromAutoMarginCount?e._redrawFromAutoMarginCount--:t.emit("plotly_afterplot")}function E(t,e){try{t._fullLayout._paper.style("background",e)}catch(t){a.error(t)}}function L(t,e){E(t,v.combine(e,"white"))}function z(t,e){if(!t._context){t._context=a.extendDeep({},w);var r=n.select("base");t._context._baseUrl=r.size()&&r.attr("href")?window.location.href.split("#")[0]:""}var i,s,l,c=t._context;if(e){for(s=Object.keys(e),i=0;i=t.data.length||i<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function I(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),D(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&D(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function R(t,e,r,n,o){!function(t,e,r,n){var i=a.isPlainObject(n);if(!Array.isArray(t.data))throw new Error("gd.data must be an array");if(!a.isPlainObject(e))throw new Error("update must be a key:value object");if(void 0===r)throw new Error("indices must be an integer or array of integers");for(var o in D(t,r,"indices"),e){if(!Array.isArray(e[o])||e[o].length!==r.length)throw new Error("attribute "+o+" must be an array of length equal to indices array length");if(i&&(!(o in n)||!Array.isArray(n[o])||n[o].length!==e[o].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(t,e,r,n);for(var l=function(t,e,r,n){var o,l,c,d,u,h=a.isPlainObject(n),f=[];for(var p in Array.isArray(r)||(r=[r]),r=O(r,t.data.length-1),e)for(var m=0;m-1&&-1===r.indexOf("grouptitlefont")?l(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?l(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?l(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&l(r,r.replace("titleoffset","title.offset")):l(r,r.replace("title","title.text"));function l(e,r){t[r]=t[e],delete t[e]}}function V(t,e,r){t=a.getGraphDiv(t),k.clearPromiseQueue(t);var n={};if("string"==typeof e)n[e]=r;else{if(!a.isPlainObject(e))return a.warn("Relayout fail.",e,r),Promise.reject();n=a.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=X(t,n),o=i.flags;o.calc&&(t.calcdata=void 0);var s=[h.previousPromises];o.layoutReplot?s.push(A.layoutReplot):Object.keys(n).length&&(H(t,o,i)||h.supplyDefaults(t),o.legend&&s.push(A.doLegend),o.layoutstyle&&s.push(A.layoutStyles),o.axrange&&W(s,i.rangesAltered),o.ticks&&s.push(A.doTicksRelayout),o.modebar&&s.push(A.doModeBar),o.camera&&s.push(A.doCamera),o.colorbars&&s.push(A.doColorBars),s.push(C)),s.push(h.rehover,h.redrag,h.reselect),c.add(t,V,[t,i.undoit],V,[t,i.redoit]);var l=a.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit("plotly_relayout",i.eventData),t}))}function H(t,e,r){var n,i,o=t._fullLayout;if(!e.axrange)return!1;for(var s in e)if("axrange"!==s&&e[s])return!1;var l=function(t,e){return a.coerce(n,i,m,t,e)},c={};for(var d in r.rangesAltered){var u=f.id2name(d);if(n=t.layout[u],i=o[u],p(n,i,l,c),i._matchGroup)for(var h in i._matchGroup)if(h!==d){var g=o[f.id2name(h)];g.autorange=i.autorange,g.range=i.range.slice(),g._input.range=i.range.slice()}}return!0}function W(t,e){var r=e?function(t){var r=[];for(var n in e){var i=f.getFromId(t,n);if(r.push(n),-1!==(i.ticklabelposition||"").indexOf("inside")&&i._anchorAxis&&r.push(i._anchorAxis._id),i._matchGroup)for(var o in i._matchGroup)e[o]||r.push(o)}return f.draw(t,r,{skipTitle:!0})}:function(t){return f.draw(t,"redraw")};t.push(x,A.doAutoRangeAndConstraints,r,A.drawData,A.finalDraw)}var q=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Y=/^[xyz]axis[0-9]*\.autorange$/,Z=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function X(t,e){var r,n,i,o=t.layout,l=t._fullLayout,c=l._guiEditing,h=N(l._preGUI,c),p=Object.keys(e),m=f.list(t),g=a.extendDeepAll({},e),v={};for(G(e),p=Object.keys(e),n=0;n0&&"string"!=typeof D.parts[R];)R--;var F=D.parts[R],P=D.parts[R-1]+"."+F,B=D.parts.slice(0,R).join("."),U=s(t.layout,B).get(),V=s(l,B).get(),H=D.get();if(void 0!==I){A[O]=I,S[O]="reverse"===F?I:j(H);var W=u.getLayoutValObject(l,D.parts);if(W&&W.impliedEdits&&null!==I)for(var X in W.impliedEdits)C(a.relativeAttr(O,X),W.impliedEdits[X]);if(-1!==["width","height"].indexOf(O))if(I){C("autosize",null);var J="height"===O?"width":"height";C(J,l[J])}else l[O]=t._initialAutoSize[O];else if("autosize"===O)C("width",I?null:l.width),C("height",I?null:l.height);else if(P.match(q))z(P),s(l,B+"._inputRange").set(null);else if(P.match(Y)){z(P),s(l,B+"._inputRange").set(null);var K=s(l,B).get();K._inputDomain&&(K._input.domain=K._inputDomain.slice())}else P.match(Z)&&s(l,B+"._inputDomain").set(null);if("type"===F){E=U;var Q="linear"===V.type&&"log"===I,tt="log"===V.type&&"linear"===I;if(Q||tt){if(E&&E.range)if(V.autorange)Q&&(E.range=E.range[1]>E.range[0]?[1,2]:[2,1]);else{var et=E.range[0],rt=E.range[1];Q?(et<=0&&rt<=0&&C(B+".autorange",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),C(B+".range[0]",Math.log(et)/Math.LN10),C(B+".range[1]",Math.log(rt)/Math.LN10)):(C(B+".range[0]",Math.pow(10,et)),C(B+".range[1]",Math.pow(10,rt)))}else C(B+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[D.parts[0]]&&"radialaxis"===D.parts[1]&&delete l[D.parts[0]]._subplot.viewInitial["radialaxis.range"],d.getComponentMethod("annotations","convertCoords")(t,V,I,C),d.getComponentMethod("images","convertCoords")(t,V,I,C)}else C(B+".autorange",!0),C(B+".range",null);s(l,B+"._inputRange").set(null)}else if(F.match(M)){var nt=s(l,O).get(),it=(I||{}).type;it&&"-"!==it||(it="linear"),d.getComponentMethod("annotations","convertCoords")(t,nt,it,C),d.getComponentMethod("images","convertCoords")(t,nt,it,C)}var ot=_.containerArrayMatch(O);if(ot){r=ot.array,n=ot.index;var at=ot.property,st=W||{editType:"calc"};""!==n&&""===at&&(_.isAddVal(I)?S[O]=null:_.isRemoveVal(I)?S[O]=(s(o,r).get()||[])[n]:a.warn("unrecognized full object value",e)),T.update(w,st),v[r]||(v[r]={});var lt=v[r][n];lt||(lt=v[r][n]={}),lt[at]=I,delete e[O]}else"reverse"===F?(U.range?U.range.reverse():(C(B+".autorange",!0),U.range=[1,0]),V.autorange?w.calc=!0:w.plot=!0):("dragmode"===O&&(!1===I&&!1!==H||!1!==I&&!1===H)||l._has("scatter-like")&&l._has("regl")&&"dragmode"===O&&("lasso"===I||"select"===I)&&"lasso"!==H&&"select"!==H||l._has("gl2d")?w.plot=!0:W?T.update(w,W):w.calc=!0,D.set(I))}}for(r in v)_.applyContainerArrayChanges(t,h(o,r),v[r],w,h)||(w.plot=!0);for(var ct in L){var dt=(E=f.getFromId(t,ct))&&E._constraintGroup;if(dt)for(var ut in w.calc=!0,dt)L[ut]||(f.getFromId(t,ut)._constraintShrinkable=!0)}($(t)||e.height||e.width)&&(w.plot=!0);var ht=l.shapes;for(n=0;n1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function nt(t,e){for(var r=0;r=i.length?i[0]:i[t]:i}function l(t){return Array.isArray(o)?t>=o.length?o[0]:o[t]:o}function c(t,e){var r=0;return function(){if(t&&++r===e)return t()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(o,d){function u(){t.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&function(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,h.transition(t,e.frame.data,e.frame.layout,k.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then((function(){e.onComplete&&e.onComplete()})),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}()};e()}var f,p,m=0;function g(t){return Array.isArray(i)?m>=i.length?t.transitionOpts=i[m]:t.transitionOpts=i[0]:t.transitionOpts=i,m++,t}var v=[],b=null==e,y=Array.isArray(e);if(b||y||!a.isPlainObject(e)){if(b||-1!==["string","number"].indexOf(typeof e))for(f=0;f0&&__)&&A.push(p);v=A}}v.length>0?function(e){if(0!==e.length){for(var i=0;i=0;n--)if(a.isPlainObject(e[n])){var m=e[n].name,g=(d[m]||p[m]||{}).name,v=e[n].name,b=d[g]||p[g];g&&v&&"number"==typeof v&&b&&S<5&&(S++,a.warn('addFrames: overwriting frame "'+(d[g]||p[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===S&&a.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),p[m]={name:m},f.push({frame:h.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:u+n})}f.sort((function(t,e){return t.index>e.index?-1:t.index=0;n--){if("number"==typeof(i=f[n].frame).name&&a.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;d[i.name="frame "+t._transitionData._counter++];);if(d[i.name]){for(o=0;o=0;r--)n=e[r],o.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:i[n]});var l=h.modifyFrames,d=h.modifyFrames,u=[t,s],f=[t,o];return c&&c.add(t,l,u,d,f),h.modifyFrames(t,o)},e.addTraces=function t(r,n,i){r=a.getGraphDiv(r);var o,s,l=[],d=e.deleteTraces,u=t,h=[r,l],f=[r,n];for(function(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r{"use strict";var e={staticPlot:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are interactive or not.","If *false*, no interactivity, for export or image generation."].join(" ")},typesetMath:{valType:"boolean",dflt:!0,description:["Determines whether math should be typeset or not,","when MathJax (either v2 or v3) is present on the page."].join(" ")},plotlyServerURL:{valType:"string",dflt:"",description:["When set it determines base URL for","the 'Edit in Chart Studio' `showEditInChartStudio`/`showSendToCloud` mode bar button","and the showLink/sendData on-graph link.","To enable sending your data to Chart Studio Cloud, you need to","set both `plotlyServerURL` to 'https://chart-studio.plotly.com' and","also set `showSendToCloud` to true."].join(" ")},editable:{valType:"boolean",dflt:!1,description:["Determines whether the graph is editable or not.","Sets all pieces of `edits`","unless a separate `edits` config item overrides individual parts."].join(" ")},edits:{annotationPosition:{valType:"boolean",dflt:!1,description:["Determines if the main anchor of the annotation is editable.","The main anchor corresponds to the","text (if no arrow) or the arrow (which drags the whole thing leaving","the arrow length & direction unchanged)."].join(" ")},annotationTail:{valType:"boolean",dflt:!1,description:["Has only an effect for annotations with arrows.","Enables changing the length and direction of the arrow."].join(" ")},annotationText:{valType:"boolean",dflt:!1,description:"Enables editing annotation text."},axisTitleText:{valType:"boolean",dflt:!1,description:"Enables editing axis title text."},colorbarPosition:{valType:"boolean",dflt:!1,description:"Enables moving colorbars."},colorbarTitleText:{valType:"boolean",dflt:!1,description:"Enables editing colorbar title text."},legendPosition:{valType:"boolean",dflt:!1,description:"Enables moving the legend."},legendText:{valType:"boolean",dflt:!1,description:"Enables editing the trace name fields from the legend"},shapePosition:{valType:"boolean",dflt:!1,description:"Enables moving shapes."},titleText:{valType:"boolean",dflt:!1,description:"Enables editing the global layout title."}},editSelection:{valType:"boolean",dflt:!0,description:"Enables moving selections."},autosizable:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are plotted with respect to","layout.autosize:true and infer its container size."].join(" ")},responsive:{valType:"boolean",dflt:!1,description:["Determines whether to change the layout size when window is resized.","In v3, this option will be removed and will always be true."].join(" ")},fillFrame:{valType:"boolean",dflt:!1,description:["When `layout.autosize` is turned on, determines whether the graph","fills the container (the default) or the screen (if set to *true*)."].join(" ")},frameMargins:{valType:"number",dflt:0,min:0,max:.5,description:["When `layout.autosize` is turned on, set the frame margins","in fraction of the graph size."].join(" ")},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox",description:["Determines whether mouse wheel or two-finger scroll zooms is enable.","Turned on by default for gl3d, geo and mapbox subplots","(as these subplot types do not have zoombox via pan),","but turned off by default for cartesian subplots.","Set `scrollZoom` to *false* to disable scrolling for all subplots."].join(" ")},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize",description:["Sets the double click interaction mode.","Has an effect only in cartesian plots.","If *false*, double click is disable.","If *reset*, double click resets the axis ranges to their initial values.","If *autosize*, double click set the axis ranges to their autorange values.","If *reset+autosize*, the odd double clicks resets the axis ranges","to their initial values and even double clicks set the axis ranges","to their autorange values."].join(" ")},doubleClickDelay:{valType:"number",dflt:300,min:0,description:["Sets the delay for registering a double-click in ms.","This is the time interval (in ms) between first mousedown and","2nd mouseup to constitute a double-click.","This setting propagates to all on-subplot double clicks","(except for geo and mapbox) and on-legend double clicks."].join(" ")},showAxisDragHandles:{valType:"boolean",dflt:!0,description:["Set to *false* to omit cartesian axis pan/zoom drag handles."].join(" ")},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0,description:["Set to *false* to omit direct range entry at the pan/zoom drag points,","note that `showAxisDragHandles` must be enabled to have an effect."].join(" ")},showTips:{valType:"boolean",dflt:!0,description:["Determines whether or not tips are shown while interacting","with the resulting graphs."].join(" ")},showLink:{valType:"boolean",dflt:!1,description:["Determines whether a link to Chart Studio Cloud is displayed","at the bottom right corner of resulting graphs.","Use with `sendData` and `linkText`."].join(" ")},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0,description:["Sets the text appearing in the `showLink` link."].join(" ")},sendData:{valType:"boolean",dflt:!0,description:["If *showLink* is true, does it contain data","just link to a Chart Studio Cloud file?"].join(" ")},showSources:{valType:"any",dflt:!1,description:["Adds a source-displaying function to show sources on","the resulting graphs."].join(" ")},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover",description:["Determines the mode bar display mode.","If *true*, the mode bar is always visible.","If *false*, the mode bar is always hidden.","If *hover*, the mode bar is visible while the mouse cursor","is on the graph container."].join(" ")},showSendToCloud:{valType:"boolean",dflt:!1,description:['Should we include a ModeBar button, labeled "Edit in Chart Studio",',"that sends this chart to chart-studio.plotly.com (formerly plot.ly) or another plotly server","as specified by `plotlyServerURL` for editing, export, etc? Prior to version 1.43.0","this button was included by default, now it is opt-in using this flag.","Note that this button can (depending on `plotlyServerURL` being set) send your data","to an external server. However that server does not persist your data",'until you arrive at the Chart Studio and explicitly click "Save".'].join(" ")},showEditInChartStudio:{valType:"boolean",dflt:!1,description:["Same as `showSendToCloud`, but use a pencil icon instead of a floppy-disk.","Note that if both `showSendToCloud` and `showEditInChartStudio` are turned,","only `showEditInChartStudio` will be honored."].join(" ")},modeBarButtonsToRemove:{valType:"any",dflt:[],description:["Remove mode bar buttons by name.","See ./components/modebar/buttons.js for the list of names."].join(" ")},modeBarButtonsToAdd:{valType:"any",dflt:[],description:["Add mode bar button using config objects","See ./components/modebar/buttons.js for list of arguments.","To enable predefined modebar buttons e.g. shape drawing, hover and spikelines,","simply provide their string name(s). This could include:","*v1hovermode*, *hoverclosest*, *hovercompare*, *togglehover*, *togglespikelines*,","*drawline*, *drawopenpath*, *drawclosedpath*, *drawcircle*, *drawrect* and *eraseshape*.","Please note that these predefined buttons will only be shown if they are compatible","with all trace types used in a graph."].join(" ")},modeBarButtons:{valType:"any",dflt:!1,description:["Define fully custom mode bar buttons as nested array,","where the outer arrays represents button groups, and","the inner arrays have buttons config objects or names of default buttons","See ./components/modebar/buttons.js for more info."].join(" ")},toImageButtonOptions:{valType:"any",dflt:{},description:["Statically override options for toImage modebar button","allowed keys are format, filename, width, height, scale","see ../components/modebar/buttons.js"].join(" ")},displaylogo:{valType:"boolean",dflt:!0,description:["Determines whether or not the plotly logo is displayed","on the end of the mode bar."].join(" ")},watermark:{valType:"boolean",dflt:!1,description:"watermark the images with the company's logo"},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4,description:["Set the pixel ratio during WebGL image export.","This config option was formerly named `plot3dPixelRatio`","which is now deprecated."].join(" ")},setBackground:{valType:"any",dflt:"transparent",description:["Set function to add the background color (i.e. `layout.paper_color`)","to a different container.","This function take the graph div as first argument and the current background","color as second argument.","Alternatively, set to string *opaque* to ensure there is white behind it."].join(" ")},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/",description:["Set the URL to topojson used in geo charts.","By default, the topojson files are fetched from cdn.plot.ly.","For example, set this option to:","/dist/topojson/","to render geographical feature using the topojson files","that ship with the plotly.js module."].join(" ")},mapboxAccessToken:{valType:"string",dflt:null,description:["Mapbox access token (required to plot mapbox trace types)","If using an Mapbox Atlas server, set this option to ''","so that plotly.js won't attempt to authenticate to the public Mapbox server."].join(" ")},logging:{valType:"integer",min:0,max:2,dflt:1,description:["Turn all console logging on or off (errors will be thrown)","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0,description:["Set on-graph logging (notifier) level","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no on-graph logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},queueLength:{valType:"integer",min:0,dflt:0,description:"Sets the length of the undo/redo queue."},globalTransforms:{valType:"any",dflt:[],description:["Set global transform to be applied to all traces with no","specification needed"].join(" ")},locale:{valType:"string",dflt:"en-US",description:["Which localization should we use?","Should be a string like 'en' or 'en-US'."].join(" ")},locales:{valType:"any",dflt:{},description:["Localization definitions","Locales can be provided either here (specific to one chart) or globally","by registering them as modules.","Should be an object of objects {locale: {dictionary: {...}, format: {...}}}","{"," da: {"," dictionary: {'Reset axes': 'Nulstil aksler', ...},"," format: {months: [...], shortMonths: [...]}"," },"," ...","}","All parts are optional. When looking for translation or format fields, we","look first for an exact match in a config locale, then in a registered","module. If those fail, we strip off any regionalization ('en-US' -> 'en')","and try each (config, registry) again. The final fallback for translation","is untranslated (which is US English) and for formats is the base English","(the only consequence being the last fallback date format %x is DD/MM/YYYY","instead of MM/DD/YYYY). Currently `grouping` and `currency` are ignored","for our automatic number formatting, but can be used in custom formats."].join(" ")}},r={};!function t(e,r){for(var n in e){var i=e[n];i.valType?r[n]=i.dflt:(r[n]||(r[n]={}),t(i,r[n]))}}(e,r),t.exports={configAttributes:e,dfltConfig:r}},35852:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822),o=r(3520),a=r(13195),s=r(53874),l=r(46367),c=r(58389).configAttributes,d=r(62309),u=i.extendDeepAll,h=i.isPlainObject,f=i.isArrayOrTypedArray,p=i.nestedProperty,m=i.valObjectMeta,g="_isSubplotObj",v="_isLinkedToArray",b="_deprecated",y=[g,v,"_arrayAttrRegexps",b];function x(t,e,r){if(!t)return!1;if(t._isLinkedToArray)if(w(e[r]))r++;else if(r=o.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var a=e[r];if(!w(a))return!1;t=o[i][a]}else t=o[i]}else t=o}}return t}function w(t){return t===Math.round(t)&&t>=0}function _(){var t,e,r={};for(t in u(r,a),n.subplotsRegistry)if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else{var d=t._module;if(d||(d=(n.modules[t.type||o.type.dflt]||{})._module),!d)return!1;if(!(i=(r=d.attributes)&&r[a])){var u=d.basePlotModule;u&&u.attributes&&(i=u.attributes[a])}i||(i=o[a])}return x(i,e,s)},e.getLayoutValObject=function(t,e){var r=function(t,e){var r,i,o,s,l=t._basePlotModules;if(l){var c;for(r=0;r{"use strict";var n=r(12822),i=r(3520),o="templateitemname",a={name:{valType:"string",editType:"none",description:["When used in a template, named items are created in the output figure","in addition to any items the figure already has in this array.","You can modify these items in the output figure by making your own","item with `templateitemname` matching this `name`","alongside your modifications (including `visible: false` or","`enabled: false` to hide it).","Has no effect outside of a template."].join(" ")}};function s(t){return t&&"string"==typeof t}function l(t){var e=t.length-1;return"s"!==t.charAt(e)&&n.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}a[o]={valType:"string",editType:"calc",description:["Used to refer to a named item in this array in the template. Named","items from the template will be created even without a matching item","in the input figure, but you can modify one by making an item with","`templateitemname` matching its `name`, alongside your modifications","(including `visible: false` or `enabled: false` to hide it).","If there is no template or no matching item, this item will be","hidden unless you explicitly show it with `visible: true`."].join(" ")},e.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=a.name,e[o]=a[o],e},e.traceTemplater=function(t){var e,r,o={};for(e in t)r=t[e],Array.isArray(r)&&r.length&&(o[e]=0);return{newTrace:function(a){var s={type:e=n.coerce(a,{},i,"type"),_template:null};if(e in o){r=t[e];var l=o[e]%r.length;o[e]++,s._template=r[l]}return s}}},e.newContainer=function(t,e,r){var i=t._template,o=i&&(i[e]||r&&i[r]);return n.isPlainObject(o)||(o=null),t[e]={_template:o}},e.arrayTemplater=function(t,e,r){var n=t._template,i=n&&n[l(e)],a=n&&n[e];Array.isArray(a)&&a.length||(a=[]);var c={};return{newItem:function(t){var e={name:t.name,_input:t},n=e[o]=t[o];if(!s(n))return e._template=i,e;for(var l=0;l=i&&(r._input||{})._templateitemname;s&&(a=i);var l,c=e+"["+a+"]";function d(){l={},s&&(l[c]={},l[c][o]=s)}function u(t,e){s?n.nestedProperty(l[c],t).set(e):l[c+"."+t]=e}function h(){var t=l;return d(),t}return d(),{modifyBase:function(t,e){l[t]=e},modifyItem:u,getUpdateObj:h,applyUpdate:function(e,r){e&&u(e,r);var i=h();for(var o in i)n.nestedProperty(t,o).set(i[o])}}}},39004:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(51137),a=r(12822),s=r(80394),l=r(86748),c=r(17499),d=r(40666),u=r(6883),h=r(45828),f=r(75815),p=r(89701),m=r(69352),g=m.enforce,v=m.clean,b=r(19496).doAutoRange,y="start";function x(t,e,r){for(var n=0;n=t[1]||i[1]<=t[0])&&o[0]e[0])return!0}return!1}function w(t){var r,i,s,l,u,m,g=t._fullLayout,v=g._size,b=v.p,y=f.list(t,"",!0);if(g._paperdiv.style({width:t._context.responsive&&g.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":g.width+"px",height:t._context.responsive&&g.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(d.setSize,g.width,g.height),t._context.setBackground(t,g.paper_bgcolor),e.drawMainTitle(t),h.manage(t),!g._has("cartesian"))return o.previousPromises(t);function w(t,e,r){var n=t._lw/2;return"x"===t._id.charAt(0)?e?"top"===r?e._offset-b-n:e._offset+e._length+b+n:v.t+v.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+b+n:e._offset-b-n:v.l+v.w*(t.position||0)+n%1}for(r=0;r.5?"t":"b",a=t._fullLayout.margin[o],s=0;return"paper"===e.yref?s=r+e.pad.t+e.pad.b:"container"===e.yref&&(s=function(t,e,r,n,i){var o=0;return"middle"===r&&(o+=i/2),"t"===t?("top"===r&&(o+=i),o+=n-e*n):("bottom"===r&&(o+=i),o+=e*n),o}(o,n,i,t._fullLayout.height,r)+e.pad.t+e.pad.b),s>a?s:0}(t,r,g);if(v>0){!function(t,e,r,n){var i="title.automargin",s=t._fullLayout.title,l=s.y>.5?"t":"b",c={x:s.x,y:s.y,t:0,b:0},d={};"paper"===s.yref&&function(t,e,r,n,i){var o="paper"===e.yref?t._fullLayout._size.h:t._fullLayout.height,s=a.isTopAnchor(e)?n:n-i,l="b"===r?o-s:s;return!(a.isTopAnchor(e)&&"t"===r||a.isBottomAnchor(e)&&"b"===r)&&l{"use strict";var n=r(12822),i=n.isPlainObject,o=r(35852),a=r(51137),s=r(3520),l=r(46121),c=r(58389).dfltConfig;function d(t,e){t=n.extendDeep({},t);var r,o,a=Object.keys(t).sort();function s(e,r,n){if(i(r)&&i(e))d(e,r);else if(Array.isArray(r)&&Array.isArray(e)){var a=l.arrayTemplater({_template:t},n);for(o=0;ok?d.push({code:"unused",traceType:b,templateCount:_,dataCount:k}):k>_&&d.push({code:"reused",traceType:b,templateCount:_,dataCount:k})}}else d.push({code:"data"});if(function t(e,r){for(var n in e)if("_"!==n.charAt(0)){var o=e[n],a=m(e,n,r);i(o)?(Array.isArray(e)&&!1===o._template&&o.templateitemname&&d.push({code:"missing",path:a,templateitemname:o.templateitemname}),t(o,a)):Array.isArray(o)&&g(o)&&t(o,a)}}({data:f,layout:h},""),d.length)return d.map(v)}},42704:(t,e,r)=>{"use strict";var n=r(7370),i=r(57755),o=r(51137),a=r(12822),s=r(13078),l=r(48402),c=r(40241),d=r(88566).version,u={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png",description:"Sets the format of exported image."},width:{valType:"number",min:1,description:["Sets the exported image width.","Defaults to the value found in `layout.width`","If set to *null*, the exported image width will match the current graph width."].join(" ")},height:{valType:"number",min:1,description:["Sets the exported image height.","Defaults to the value found in `layout.height`","If set to *null*, the exported image height will match the current graph height."].join(" ")},scale:{valType:"number",min:0,dflt:1,description:["Sets a scaling for the generated image.","If set, all features of a graphs (e.g. text, line width)","are scaled, unlike simply setting","a bigger *width* and *height*."].join(" ")},setBackground:{valType:"any",dflt:!1,description:["Sets the image background mode.","By default, the image background is determined by `layout.paper_bgcolor`,","the *transparent* mode.","One might consider setting `setBackground` to *opaque*","when exporting a *jpeg* image as JPEGs do not support opacity."].join(" ")},imageDataOnly:{valType:"boolean",dflt:!1,description:["Determines whether or not the return value is prefixed by","the image format's corresponding 'data:image;' spec."].join(" ")}};t.exports=function(t,e){var r,h,f,p;function m(t){return!(t in e)||a.validate(e[t],u[t])}if(e=e||{},a.isPlainObject(t)?(r=t.data||[],h=t.layout||{},f=t.config||{},p={}):(t=a.getGraphDiv(t),r=a.extendDeep([],t.data),h=a.extendDeep({},t.layout),f=t._context,p=t._fullLayout||{}),!m("width")&&null!==e.width||!m("height")&&null!==e.height)throw new Error("Height and width should be pixel values.");if(!m("format"))throw new Error("Export format is not "+a.join2(u.format.values,", "," or ")+".");var g={};function v(t,r){return a.coerce(e,g,u,t,r)}var b=v("format"),y=v("width"),x=v("height"),w=v("scale"),_=v("setBackground"),k=v("imageDataOnly"),A=document.createElement("div");A.style.position="absolute",A.style.left="-5000px",document.body.appendChild(A);var T=a.extendFlat({},h);y?T.width=y:null===e.width&&n(p.width)&&(T.width=p.width),x?T.height=x:null===e.height&&n(p.height)&&(T.height=p.height);var M=a.extendFlat({},f,{_exportedPlot:!0,staticPlot:!0,setBackground:_}),S=s.getRedrawFunc(A);function C(){return new Promise((function(t){setTimeout(t,s.getDelay(A._fullLayout))}))}function E(){return new Promise((function(t,e){var r=l(A,b,w),n=A._fullLayout.width,u=A._fullLayout.height;function h(){i.purge(A),document.body.removeChild(A)}if("full-json"===b){var f=o.graphJson(A,!1,"keepdata","object",!0,!0);return f.version=d,f=JSON.stringify(f),h(),t(k?f:s.encodeJSON(f))}if(h(),"svg"===b)return t(k?r:s.encodeSVG(r));var p=document.createElement("canvas");p.id=a.randstr(),c({format:b,width:n,height:u,scale:w,canvas:p,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.newPlot(A,r,T,M).then(S).then(C).then(E).then((function(e){t(function(t){return k?t.replace(s.IMAGE_URL_PREFIX,""):t}(e))})).catch((function(t){e(t)}))}))}},56205:(t,e,r)=>{"use strict";var n=r(12822),i=r(51137),o=r(35852),a=r(58389).dfltConfig,s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function d(t,e,r,i,o,a){a=a||[];for(var u=Object.keys(t),h=0;hy.length&&i.push(f("unused",o,v.concat(y.length)));var T,M,S,C,E,L=y.length,z=Array.isArray(A);if(z&&(L=Math.min(L,A.length)),2===x.dimensions)for(M=0;My[M].length&&i.push(f("unused",o,v.concat(M,y[M].length)));var O=y[M].length;for(T=0;T<(z?Math.min(O,A[M].length):O);T++)S=z?A[M][T]:A,C=b[M][T],E=y[M][T],n.validate(C,S)?E!==C&&E!==+C&&i.push(f("dynamic",o,v.concat(M,T),C,E)):i.push(f("value",o,v.concat(M,T),C))}else i.push(f("array",o,v.concat(M),b[M]));else for(M=0;M1&&h.push(f("object","layout"))),i.supplyDefaults(p);for(var m=p._fullData,g=r.length,v=0;v{"use strict";t.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"],description:["Describes how a new animate call interacts with currently-running","animations. If `immediate`, current animations are interrupted and","the new animation is started. If `next`, the current frame is allowed","to complete, after which the new animation is started. If `afterall`","all existing frames are animated to completion before the new animation","is started."].join(" ")},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward",description:["The direction in which to play the frames triggered by the animation call"].join(" ")},fromcurrent:{valType:"boolean",dflt:!1,description:["Play frames starting at the current frame instead of the beginning."].join(" ")},frame:{duration:{valType:"number",min:0,dflt:500,description:["The duration in milliseconds of each frame. If greater than the frame","duration, it will be limited to the frame duration."].join(" ")},redraw:{valType:"boolean",dflt:!0,description:["Redraw the plot at completion of the transition. This is desirable","for transitions that include properties that cannot be transitioned,","but may significantly slow down updates that do not require a full","redraw of the plot"].join(" ")}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none",description:["The duration of the transition, in milliseconds. If equal to zero,","updates are synchronous."].join(" ")},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none",description:"The easing function used for the transition"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none",description:["Determines whether the figure's layout or traces smoothly transitions","during updates that make both traces and layout change."].join(" ")}}}},35677:(t,e,r)=>{"use strict";var n=r(12822),i=r(46121);t.exports=function(t,e,r){var o,a,s=r.name,l=r.inclusionAttr||"visible",c=e[s],d=n.isArrayOrTypedArray(t[s])?t[s]:[],u=e[s]=[],h=i.arrayTemplater(e,s,l);for(o=0;o{"use strict";var n=r(75058),i=r(60713);t.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc",description:["Determines whether or not this trace is visible.","If *legendonly*, the trace is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")},showlegend:{valType:"boolean",dflt:!0,editType:"style",description:["Determines whether or not an item corresponding to this","trace is shown in the legend."].join(" ")},legend:{valType:"subplotid",dflt:"legend",editType:"style",description:["Sets the reference to a legend to show this trace in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")},legendgroup:{valType:"string",dflt:"",editType:"style",description:["Sets the legend group for this trace.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style",description:["Sets the title of the legend group."].join(" ")},font:n({editType:"style",description:["Sets this legend group's title font."].join(" ")}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style",description:["Sets the legend rank for this trace.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items.","When having unranked or equal rank items shapes would be displayed after traces","i.e. according to their order in data and layout."].join(" ")},legendwidth:{valType:"number",min:0,editType:"style",description:"Sets the width (in px or fraction) of the legend for this trace."},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style",description:"Sets the opacity of the trace."},name:{valType:"string",editType:"style",description:["Sets the trace name.","The trace name appears as the legend item and on hover."].join(" ")},uid:{valType:"string",editType:"plot",anim:!0,description:["Assign an id to this trace,","Use this to provide object constancy between traces during animations","and transitions."].join(" ")},ids:{valType:"data_array",editType:"calc",anim:!0,description:["Assigns id labels to each datum.","These ids for object constancy of data points during animation.","Should be an array of strings, not numbers or any other type."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data each datum.","This may be useful when listening to hover, click and selection events.","Note that, *scatter* traces also appends customdata items in the markers","DOM elements"].join(" ")},meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information associated with this trace","that can be used in various text attributes.","Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text`","`rangeselector`, `updatemenues` and `sliders` `label` text","all support `meta`.","To access the trace `meta` values in an attribute in the same trace, simply use","`%{meta[i]}` where `i` is the index or key of the `meta`","item in question.","To access trace `meta` in layout attributes, use","`%{data[n[.meta[i]}` where `i` is the index or key of the `meta`","and `n` is the trace index."].join(" ")},selectedpoints:{valType:"any",editType:"calc",description:["Array containing integer indices of selected points.","Has an effect only for traces that support selections.","Note that an empty array means an empty selection where the `unselected`","are turned on for all points, whereas, any other non-array values means no","selection all where the `selected` and `unselected` styles have no effect."].join(" ")},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none",description:["Determines which trace information appear on hover.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:i.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc",description:["The stream id number links a data trace on a plot with a stream.","See https://chart-studio.plotly.com/settings for more details."].join(" ")},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc",description:["Sets the maximum number of points to keep on the plots from an","incoming stream.","If `maxpoints` is set to *50*, only the newest 50 points will","be displayed on the plot."].join(" ")},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc",description:["WARNING: All transforms are deprecated and may be removed from the API in next major version.","An array of operations that manipulate the trace data,","for example filtering or sorting the data arrays."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of some user-driven changes to the trace:","`constraintrange` in `parcoords` traces, as well as some","`editable: true` modifications such as `name` and `colorbar.title`.","Defaults to `layout.uirevision`.","Note that other user-driven trace attribute changes are controlled","by `layout` attributes:","`trace.visible` is controlled by `layout.legend.uirevision`,","`selectedpoints` is controlled by `layout.selectionrevision`,","and `colorbar.(x|y)` (accessible with `config: {editable: true}`)","is controlled by `layout.editrevision`.","Trace changes are tracked by `uid`, which only falls back on trace","index if no `uid` is provided. So if your app can add/remove traces","before the end of the `data` array, such that the same trace has a","different index, you can still preserve user-driven changes if you","give each trace a `uid` that stays with it as it moves."].join(" ")}}},15389:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822),o=i.dateTime2ms,a=i.incrementMonth,s=r(32994).ONEAVGMONTH;t.exports=function(t,e,r,i){if("date"!==e.type)return{vals:i};var l=t[r+"periodalignment"];if(!l)return{vals:i};var c,d=t[r+"period"];if(n(d)){if((d=+d)<=0)return{vals:i}}else if("string"==typeof d&&"M"===d.charAt(0)){var u=+d.substring(1);if(!(u>0&&Math.round(u)===u))return{vals:i};c=u}for(var h=e.calendar,f="start"===l,p="end"===l,m=t[r+"period0"],g=o(m,h)||0,v=[],b=[],y=[],x=i.length,w=0;wT;)A=a(A,-c,h);for(;A<=T;)A=a(A,c,h);k=a(A,-c,h)}else{for(A=g+(_=Math.round((T-g)/d))*d;A>T;)A-=d;for(;A<=T;)A+=d;k=A-d}v[w]=f?k:p?A:(k+A)/2,b[w]=k,y[w]=A}return{vals:v,starts:b,ends:y}}},36187:t=>{"use strict";t.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's x coordinates and","a 2D cartesian x axis.","If *x* (the default value), the x coordinates refer to","`layout.xaxis`.","If *x2*, the x coordinates refer to `layout.xaxis2`, and so on."].join(" ")},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's y coordinates and","a 2D cartesian y axis.","If *y* (the default value), the y coordinates refer to","`layout.yaxis`.","If *y2*, the y coordinates refer to `layout.yaxis2`, and so on."].join(" ")}}},19496:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=r(12822),a=r(32994).FP_SAFE,s=r(25059),l=r(40666),c=r(99246),d=c.getFromId,u=c.isLinked;function h(t,e){var r,n,i=[],a=t._fullLayout,s=p(a,e,0),l=p(a,e,1),c=g(t,e),d=c.min,u=c.max;if(0===d.length||0===u.length)return o.simpleMap(e.range,e.r2l);var h=d[0].val,m=u[0].val;for(r=1;r0&&((T=L-s(x)-l(w))>z?M/T>O&&(_=x,k=w,O=M/T):M/L>O&&(_={val:x.val,nopad:1},k={val:w.val,nopad:1},O=M/L));if(h===m){var D=h-1,I=h+1;if(C)if(0===h)i=[0,1];else{var R=(h>0?u:d).reduce((function(t,e){return Math.max(t,l(e))}),0),F=h/(1-Math.min(.5,R/L));i=h>0?[0,F]:[F,0]}else i=E?[Math.max(0,D),Math.max(1,I)]:[D,I]}else C?(_.val>=0&&(_={val:0,nopad:1}),k.val<=0&&(k={val:0,nopad:1})):E&&(_.val-O*s(_)<0&&(_={val:0,nopad:1}),k.val<=0&&(k={val:1,nopad:1})),O=(k.val-_.val-f(e,x.val,w.val))/(L-s(_)-l(k)),i=[_.val-O*s(_),k.val+O*l(k)];return i=A(i,e),e.limitRange&&e.limitRange(),b&&i.reverse(),o.simpleMap(i,e.l2r||Number)}function f(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),o=0;o0?r.ppadplus:r.ppadminus)||r.ppad||0),S=T((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),C=T(r.vpadplus||r.vpad),E=T(r.vpadminus||r.vpad);if(!k){if(h=1/0,f=-1/0,_)for(n=0;n0&&(h=o),o>f&&o-a&&(h=o),o>f&&o=O;n--)z(n);return{min:p,max:m,opts:r}},concatExtremes:g};var m=3;function g(t,e,r){var n,i,o,a=e._id,s=t._fullData,l=t._fullLayout,c=[],u=[];function h(t,e){for(n=0;n=r&&(c.extrapad||!a)){s=!1;break}i(e,c.val)&&c.pad<=r&&(a||!c.extrapad)&&(t.splice(l,1),l--)}if(s){var d=o&&0===e;t.push({val:e,pad:d?0:r,extrapad:!d&&a})}}function x(t){return i(t)&&Math.abs(t)=e}function k(t,e,r){return void 0===e||void 0===r||(e=t.d2l(e))=c&&(a=c,r=c),s<=c&&(s=c,n=c)}}return r=function(t,e){var r=e.autorangeoptions;return r&&void 0!==r.minallowed&&k(e,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&k(e,r.clipmin,r.clipmax)?Math.max(t,e.d2l(r.clipmin)):t}(r,e),n=function(t,e){var r=e.autorangeoptions;return r&&void 0!==r.maxallowed&&k(e,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&k(e,r.clipmin,r.clipmax)?Math.min(t,e.d2l(r.clipmax)):t}(n,e),[r,n]}},49826:t=>{"use strict";t.exports=function(t,e,r){var n,i;if(r){var o="reversed"===e||"min reversed"===e||"max reversed"===e;n=r[o?1:0],i=r[o?0:1]}var a=t("autorangeoptions.minallowed",null===i?n:void 0),s=t("autorangeoptions.maxallowed",null===n?i:void 0);void 0===a&&t("autorangeoptions.clipmin"),void 0===s&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}},75815:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=r(51137),a=r(25059),s=r(12822),l=s.strTranslate,c=r(80394),d=r(6883),u=r(17499),h=r(40666),f=r(86130),p=r(84696),m=r(32994),g=m.ONEMAXYEAR,v=m.ONEAVGYEAR,b=m.ONEMINYEAR,y=m.ONEMAXQUARTER,x=m.ONEAVGQUARTER,w=m.ONEMINQUARTER,_=m.ONEMAXMONTH,k=m.ONEAVGMONTH,A=m.ONEMINMONTH,T=m.ONEWEEK,M=m.ONEDAY,S=M/2,C=m.ONEHOUR,E=m.ONEMIN,L=m.ONESEC,z=m.MINUS_SIGN,O=m.BADNUM,D={K:"zeroline"},I={K:"gridline",L:"path"},R={K:"minor-gridline",L:"path"},F={K:"tick",L:"path"},P={K:"tick",L:"text"},j={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},N=r(89701),B=N.MID_SHIFT,U=N.CAP_SHIFT,G=N.LINE_SPACING,V=N.OPPOSITE_SIDE,H=t.exports={};H.setConvert=r(30632);var W=r(17821),q=r(99246),Y=q.idSort,Z=q.isLinked;H.id2name=q.id2name,H.name2id=q.name2id,H.cleanId=q.cleanId,H.list=q.list,H.listIds=q.listIds,H.getFromId=q.getFromId,H.getFromTrace=q.getFromTrace;var X=r(19496);H.getAutoRange=X.getAutoRange,H.findExtremes=X.findExtremes;var $=1e-4;function J(t){var e=(t[1]-t[0])*$;return[t[0]-e,t[1]+e]}H.coerceRef=function(t,e,r,n,i,o){var a=n.charAt(n.length-1),l=r._fullLayout._subplots[a+"axis"],c=n+"ref",d={};return i||(i=l[0]||("string"==typeof o?o:o[0])),o||(o=i),l=l.concat(l.map((function(t){return t+" domain"}))),d[c]={valType:"enumerated",values:l.concat(o?"string"==typeof o?[o]:o:[]),dflt:i},s.coerce(t,e,d,c)},H.getRefType=function(t){return void 0===t?t:"paper"===t?"paper":"pixel"===t?"pixel":/( domain)$/.test(t)?"domain":"range"},H.coercePosition=function(t,e,r,n,i,o){var a,l;if("range"!==H.getRefType(n))a=s.ensureNumber,l=r(i,o);else{var c=H.getFromId(e,n);l=r(i,o=c.fraction2r(o)),a=c.cleanPos}t[i]=a(l)},H.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:H.getFromId(e,r).cleanPos)(t)},H.redrawComponents=function(t,e){e=e||H.listIds(t);var r=t._fullLayout;function n(n,i,o,s){for(var l=a.getComponentMethod(n,i),c={},d=0;dn&&h2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},H.saveRangeInitial=function(t,e){for(var r=H.list(t,"",!0),n=!1,i=0;i.3*h||d(n)||d(o))){var f=r.dtick/2;t+=t+f.8){var a=Number(r.substr(1));o.exactYears>.8&&a%12==0?t=H.tickIncrement(t,"M6","reverse")+1.5*M:o.exactMonths>.8?t=H.tickIncrement(t,"M1","reverse")+15.5*M:t-=S;var l=H.tickIncrement(t,r);if(l<=n)return l}return t}(b,t,v,c,o)),g=b;g<=d;)g=H.tickIncrement(g,v,!1,o);return{start:e.c2r(b,0,o),end:e.c2r(g,0,o),size:v,_dataSpan:d-c}},H.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var n,o=e.dtick&&i(e._tmin);if(o){var a=H.tickIncrement(e._tmin,e.dtick,!0);n=[e._tmin,.99*a+.01*e._tmin]}else{var l=s.simpleMap(e.range,e.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(t.range=s.simpleMap(n,e.l2r),t._isMinor=!0,H.prepTicks(t,r),o){var c=i(e.dtick),d=i(t.dtick),u=c?e.dtick:+e.dtick.substring(1),h=d?t.dtick:+t.dtick.substring(1);c&&d?et(u,h)?u===2*T&&h===2*M&&(t.dtick=T):u===2*T&&h===3*M?t.dtick=T:u!==T||(e._input.minor||{}).nticks?rt(u/h,2.5)?t.dtick=u/2:t.dtick=u:t.dtick=M:"M"===String(e.dtick).charAt(0)?d?t.dtick="M1":et(u,h)?u>=12&&2===h&&(t.dtick="M3"):t.dtick=e.dtick:"L"===String(t.dtick).charAt(0)?"L"===String(e.dtick).charAt(0)?et(u,h)||(t.dtick=rt(u/h,2.5)?e.dtick/2:e.dtick):t.dtick="D1":"D2"===t.dtick&&+e.dtick>1&&(t.dtick=1)}t.range=e.range}void 0===e.minor._tick0Init&&(t.tick0=e.tick0)},H.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if("auto"===t.tickmode||!t.dtick){var n,o=t.nticks;o||("category"===t.type||"multicategory"===t.type?(n=t.tickfont?s.bigFont(t.tickfont.size||12):15,o=t._length/n):(n="y"===t._id.charAt(0)?40:80,o=s.constrain(t._length/n,4,9)+1),"radialaxis"===t._name&&(o*=2)),t.minor&&"array"!==t.minor.tickmode||"array"===t.tickmode&&(o*=100),t._roughDTick=Math.abs(r[1]-r[0])/o,H.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}"period"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||"M"!==t.dtick.charAt(0))}var n=r(),o=H.getTickFormat(t);if(o){var a=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(o)||(/%[HI]/.test(o)?(e=C,a&&!n&&t.dtick=(D?0:1);I--){var R=!I;I?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var F=I?t:s.extendFlat({},t,t.minor);if(R?H.prepMinorTicks(F,t,e):H.prepTicks(F,e),"array"!==F.tickmode)if("sync"!==F.tickmode){var P=J(d),j=P[0],N=P[1],B=i(F.dtick),U="log"===o&&!(B||"L"===F.dtick.charAt(0)),G=H.tickFirst(F,e);if(I){if(t._tmin=G,G=N:Y<=N;Y=H.tickIncrement(Y,Z,u,a)){if(I&&V++,F.rangebreaks&&!u){if(Y=f)break}if(L.length>p||Y===q)break;q=Y;var X={value:Y};I?(U&&Y!==(0|Y)&&(X.simpleLabel=!0),l>1&&V%l&&(X.skipLabel=!0),L.push(X)):(X.minor=!0,z.push(X))}}else L=[],m=ot(t);else I?(L=[],m=at(t,!R)):(z=[],E=at(t,!R))}if(D&&!("inside"===t.minor.ticks&&"outside"===t.ticks||"outside"===t.minor.ticks&&"inside"===t.ticks)){for(var $=L.map((function(t){return t.value})),K=[],Q=0;Q0?(o=n-1,a=n):(o=n,a=n);var s,l=t[o].value,c=t[a].value,d=Math.abs(c-l),u=r||d,h=0;u>=b?h=d>=b&&d<=g?d:v:r===x&&u>=w?h=d>=w&&d<=y?d:x:u>=A?h=d>=A&&d<=_?d:k:r===T&&u>=T?h=T:u>=M?h=M:r===S&&u>=S?h=S:r===C&&u>=C&&(h=C),h>=d&&(h=d,s=!0);var f=i+h;if(e.rangebreaks&&h>0){for(var p=0,m=0;m<84;m++){var E=(m+.5)/84;e.maskBreaks(i*(1-E)+E*f)!==O&&p++}(h*=p/84)||(t[n].drop=!0),s&&d>T&&(h=d)}(h>0||0===n)&&(t[n].periodX=i+h/2)}}(L,t,t._definedDelta),t.rangebreaks){var it="y"===t._id.charAt(0),st=1;"auto"===t.tickmode&&(st=t.tickfont?t.tickfont.size:12);var lt=NaN;for(r=L.length-1;r>-1;r--)if(L[r].drop)L.splice(r,1);else{L[r].value=Rt(L[r].value,t);var ct=t.c2p(L[r].value);(it?lt>ct-st:ltf||utf&&(dt.periodX=f),ut10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=M&&o<=10||e>=15*M)t._tickround="d";else if(e>=E&&o<=16||e>=C)t._tickround="M";else if(e>=L&&o<=19||e>=E)t._tickround="S";else{var a=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(o,a)-20,t._tickround<0&&(t._tickround=4)}}else if(i(e)||"L"===e.charAt(0)){var s=t.range.map(t.r2d||Number);i(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01),d=void 0===t.minexponent?3:t.minexponent;Math.abs(c)>d&&(bt(t.exponentformat)&&!yt(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function gt(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontColor:n.color}}H.autoTicks=function(t,e,r){var n;function o(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar,0);var a=2*e;if(a>v)e/=v,n=o(10),t.dtick="M"+12*pt(e,n,st);else if(a>k)e/=k,t.dtick="M"+pt(e,1,lt);else if(a>M){if(t.dtick=pt(e,M,t._hasDayOfWeekBreaks?[1,2,7,14]:dt),!r){var l=H.getTickFormat(t),c="period"===t.ticklabelmode;c&&(t._rawTick0=t.tick0),/%[uVW]/.test(l)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),c&&(t._dowTick0=t.tick0)}}else a>C?t.dtick=pt(e,C,lt):a>E?t.dtick=pt(e,E,ct):a>L?t.dtick=pt(e,L,ct):(n=o(10),t.dtick=pt(e,n,st))}else if("log"===t.type){t.tick0=0;var d=s.simpleMap(t.range,t.r2l);if(t._isMinor&&(e*=1.5),e>.7)t.dtick=Math.ceil(e);else if(Math.abs(d[1]-d[0])<1){var u=1.5*Math.abs((d[1]-d[0])/e);e=Math.abs(Math.pow(10,d[1])-Math.pow(10,d[0]))/u,n=o(10),t.dtick="L"+pt(e,n,st)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type||"multicategory"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):It(t)?(t.tick0=0,n=1,t.dtick=pt(e,n,ft)):(t.tick0=0,n=o(10),t.dtick=pt(e,n,st));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&"string"!=typeof t.dtick){var h=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(h)}},H.tickIncrement=function(t,e,r,o){var a=r?-1:1;if(i(e))return s.increment(t,a*e);var l=e.charAt(0),c=a*Number(e.substr(1));if("M"===l)return s.incrementMonth(t,c,o);if("L"===l)return Math.log(Math.pow(10,t)+c)/Math.LN10;if("D"===l){var d="D2"===e?ht:ut,u=t+.01*a,h=s.roundUp(s.mod(u,1),d,r);return Math.floor(u)+Math.log(n.round(Math.pow(10,h),1))/Math.LN10}throw"unrecognized dtick "+String(e)},H.tickFirst=function(t,e){var r=t.r2l||Number,o=s.simpleMap(t.range,r,void 0,void 0,e),a=o[1]=0&&r<=t._length?e:null};if(l&&s.isArrayOrTypedArray(t.ticktext)){var f=s.simpleMap(t.range,t.r2l),p=(Math.abs(f[1]-f[0])-(t._lBreaks||0))/1e4;for(o=0;o ")}else t._prevDateHead=l,c+="
"+l;e.text=c}(t,a,r,c):"log"===d?function(t,e,r,n,o){var a=t.dtick,l=e.x,c=t.tickformat,d="string"==typeof a&&a.charAt(0);if("never"===o&&(o=""),n&&"L"!==d&&(a="L3",d="L"),c||"L"===d)e.text=xt(Math.pow(10,l),t,o,n);else if(i(a)||"D"===d&&s.mod(l+.01,1)<.1){var u=Math.round(l),h=Math.abs(u),f=t.exponentformat;"power"===f||bt(f)&&yt(u)?(e.text=0===u?1:1===u?"10":"10"+(u>1?"":z)+h+"",e.fontSize*=1.25):("e"===f||"E"===f)&&h>2?e.text="1"+f+(u>0?"+":z)+h:(e.text=xt(Math.pow(10,l),t,"","fakehover"),"D1"===a&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if("D"!==d)throw"unrecognized dtick "+String(a);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if("D1"===t.dtick){var p=String(e.text).charAt(0);"0"!==p&&"1"!==p||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,a,0,c,g):"category"===d?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}(t,a):"multicategory"===d?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],o=void 0===i[1]?"":String(i[1]),a=void 0===i[0]?"":String(i[0]);r?e.text=a+" - "+o:(e.text=o,e.text2=a)}(t,a,r):It(t)?function(t,e,r,n,i){if("radians"!==t.thetaunit||r)e.text=xt(e.x,t,i,n);else{var o=e.x/180;if(0===o)e.text="0";else{var a=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){for(var r=1;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,i=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(o);if(a[1]>=100)e.text=xt(s.deg2rad(e.x),t,i,n);else{var l=e.x<0;1===a[1]?1===a[0]?e.text="π":e.text=a[0]+"π":e.text=["",a[0],"","⁄","",a[1],"","π"].join(""),l&&(e.text=z+e.text)}}}}(t,a,r,c,g):function(t,e,r,n,i){"never"===i?i="":"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=xt(e.x,t,i,n)}(t,a,0,c,g),n||(t.tickprefix&&!m(t.showtickprefix)&&(a.text=t.tickprefix+a.text),t.ticksuffix&&!m(t.showticksuffix)&&(a.text+=t.ticksuffix)),t.labelalias&&t.labelalias.hasOwnProperty(a.text)){var v=t.labelalias[a.text];"string"==typeof v&&(a.text=v)}return("boundaries"===t.tickson||t.showdividers)&&(a.xbnd=[h(a.x-.5),h(a.x+t.dtick-.5)]),a},H.hoverLabelText=function(t,e,r){r&&(t=s.extendFlat({},t,{hoverformat:r}));var n=s.isArrayOrTypedArray(e)?e[0]:e,i=s.isArrayOrTypedArray(e)?e[1]:void 0;if(void 0!==i&&i!==n)return H.hoverLabelText(t,n,r)+" - "+H.hoverLabelText(t,i,r);var o="log"===t.type&&n<=0,a=H.tickText(t,t.c2l(o?-n:n),"hover").text;return o?0===n?"0":z+a:a};var vt=["f","p","n","μ","m","","k","M","G","T"];function bt(t){return"SI"===t||"B"===t}function yt(t){return t>14||t<-15}function xt(t,e,r,n){var o=t<0,a=e._tickround,l=r||e.exponentformat||"B",c=e._tickexponent,d=H.getTickFormat(e),u=e.separatethousands;if(n){var h={exponentformat:l,minexponent:e.minexponent,dtick:"none"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};mt(h),a=(Number(h._tickround)||0)+4,c=h._tickexponent,e.hoverformat&&(d=e.hoverformat)}if(d)return e._numFormat(d)(t).replace(/-/g,z);var f,p=Math.pow(10,-a)/2;if("none"===l&&(c=0),(t=Math.abs(t))"+f+"
":"B"===l&&9===c?t+="B":bt(l)&&(t+=vt[c/3+5])),o?z+t:t}function wt(t,e){if(t){var r=Object.keys(j).reduce((function(t,r){return-1!==e.indexOf(r)&&j[r].forEach((function(e){t[e]=1})),t}),{});Object.keys(t).forEach((function(e){r[e]||(1===e.length?t[e]=0:delete t[e])}))}}function _t(t,e){for(var r=[],n={},i=0;i1&&r=i.min&&t=0,o=d(t,e[1])<=0;return(r||i)&&(n||o)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":for(e=0;e=a(i)))){r=n;break}break;case"log":for(e=0;e=0&&i.unshift(i.splice(n,1).shift())}}));var a={false:{left:0,right:0}};return s.syncOrAsync(i.map((function(e){return function(){if(e){var n=H.getFromId(t,e);r||(r={}),r.axShifts=a,r.overlayingShiftedAx=o;var i=H.drawOne(t,n,r);return n._shiftPusher&&jt(n,n._fullDepth||0,a,!0),n._r=n.range.slice(),n._rl=s.simpleMap(n._r,n.r2l),i}}})))},H.drawOne=function(t,e,r){var n,i,l,f=(r=r||{}).axShifts||{},p=r.overlayingShiftedAx||[];e.setScale();var m=t._fullLayout,g=e._id,v=g.charAt(0),b=H.counterLetter(g),y=m._plots[e._mainSubplot];if(y){if(e._shiftPusher=e.autoshift||-1!==p.indexOf(e._id)||-1!==p.indexOf(e.overlaying),e._shiftPusher&"free"===e.anchor){var x=e.linewidth/2||0;"inside"===e.ticks&&(x+=e.ticklen),jt(e,x,f,!0),jt(e,e.shift||0,f,!1)}!0===r.skipTitle&&void 0!==e._shift||(e._shift=function(t,e){return t.autoshift?e[t.overlaying][t.side]:t.shift||0}(e,f));var w=y[v+"axislayer"],_=e._mainLinePosition,k=_+=e._shift,A=e._mainMirrorPosition,T=e._vals=H.calcTicks(e),M=[e.mirror,k,A].join("_");for(n=0;n0?r.bottom-d:0,u))));var h=0,f=0;if(e._shiftPusher&&(h=Math.max(u,r.height>0?"l"===l?d-r.left:r.right-d:0),e.title.text!==m._dfltTitle[v]&&(f=(e._titleStandoff||0)+(e._titleScoot||0),"l"===l&&(f+=Tt(e))),e._fullDepth=Math.max(h,f)),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1],g="number"==typeof e._shift?e._shift:0;if("x"===v){if("b"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?d-r.top:0,u),p.reverse()),r.width>0){var y=r.right-(e._offset+e._length);y>0&&(n.xr=1,n.r=y);var x=e._offset-r.left;x>0&&(n.xl=0,n.l=x)}}else if("l"===l?(e._depth=Math.max(r.height>0?d-r.left:0,u),n[l]=e._depth-g):(e._depth=Math.max(r.height>0?r.right-d:0,u),n[l]=e._depth+g,p.reverse()),r.height>0){var w=r.bottom-(e._offset+e._length);w>0&&(n.yb=0,n.b=w);var _=e._offset-r.top;_>0&&(n.yt=1,n.t=_)}n[b]="free"===e.anchor?e.position:e._anchorAxis.domain[p[0]],e.title.text!==m._dfltTitle[v]&&(n[l]+=Tt(e)+(e.title.standoff||0)),e.mirror&&"free"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[c]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[c]+=u),!0===e.mirror||"ticks"===e.mirror?i[b]=e._anchorAxis.domain[p[1]]:"all"!==e.mirror&&"allticks"!==e.mirror||(i[b]=[e._counterDomainMin,e._counterDomainMax][p[1]]))}ut&&(s=a.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),"string"==typeof e.automargin&&(wt(n,e.automargin),wt(i,e.automargin)),o.autoMargin(t,Ct(e),n),o.autoMargin(t,Et(e),i),o.autoMargin(t,Lt(e),s)})),s.syncOrAsync(ct)}}function ht(t){var r=g+(t||"tick");return S[r]||(S[r]=function(t,e,r){var n,i,o,a;if(t._selections[e].size())n=1/0,i=-1/0,o=1/0,a=-1/0,t._selections[e].each((function(){var t=St(this),e=h.bBox(t.node().parentNode);n=Math.min(n,e.top),i=Math.max(i,e.bottom),o=Math.min(o,e.left),a=Math.max(a,e.right)}));else{var s=H.makeLabelFns(t,r);n=i=s.yFn({dx:0,dy:0,fontSize:0}),o=a=s.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:i,left:o,right:a,height:i-n,width:a-o}}(e,r,k)),S[r]}},H.getTickSigns=function(t,e){var r=t._id.charAt(0),n={x:"top",y:"right"}[r],i=t.side===n?1:-1,o=[-1,1,i,-i];return"inside"!==(e?(t.minor||{}).ticks:t.ticks)==("x"===r)&&(o=o.map((function(t){return-t}))),t.side&&o.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),o},H.makeTransTickFn=function(t){return"x"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},H.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||"",r=function(t){return-1!==e.indexOf(t)},n=r("top"),i=r("left"),o=r("right"),a=r("bottom"),s=r("inside"),l=a||i||n||o;if(!l&&!s)return[0,0];var c=t.side,d=l?(t.tickwidth||0)/2:0,u=3,h=t.tickfont?t.tickfont.size:12;return(a||n)&&(d+=h*U,u+=(t.linewidth||0)/2),(i||o)&&(d+=(t.linewidth||0)/2,u+=3),s&&"top"===c&&(u-=h*(1-U)),(i||n)&&(d=-d),"bottom"!==c&&"right"!==c||(u=-u),[l?d:0,s?u:0]}(t),r=e[0],n=e[1];return"x"===t._id.charAt(0)?function(e){return l(r+t._offset+t.l2p(kt(e)),n)}:function(e){return l(n,r+t._offset+t.l2p(kt(e)))}},H.makeTickPath=function(t,e,r,n){n||(n={});var i=n.minor;if(i&&!t.minor)return"";var o=void 0!==n.len?n.len:i?t.minor.ticklen:t.ticklen,a=t._id.charAt(0),s=(t.linewidth||1)/2;return"x"===a?"M0,"+(e+s*r)+"v"+o*r:"M"+(e+s*r)+",0h"+o*r},H.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||"",o=function(t){return-1!==n.indexOf(t)},a=o("top"),l=o("left"),c=o("right"),d=o("bottom")||l||a||c,u=o("inside"),h="inside"===n&&"inside"===t.ticks||!u&&"outside"===t.ticks&&"boundaries"!==t.tickson,f=0,p=0,m=h?t.ticklen:0;if(u?m*=-1:d&&(m=0),h&&(f+=m,r)){var g=s.deg2rad(r);f=m*Math.cos(g)+1,p=m*Math.sin(g)}t.showticklabels&&(h||t.showline)&&(f+=.2*t.tickfont.size);var v,b,y,x,w,_={labelStandoff:f+=(t.linewidth||1)/2*(u?-1:1),labelShift:p},k=0,A=t.side,T=t._id.charAt(0),M=t.tickangle;if("x"===T)x=(w=!u&&"bottom"===A||u&&"top"===A)?1:-1,u&&(x*=-1),v=p*x,b=e+f*x,y=w?1:-.2,90===Math.abs(M)&&(u?y+=B:y=-90===M&&"bottom"===A?U:90===M&&"top"===A?B:.5,k=B/2*(M/90)),_.xFn=function(t){return t.dx+v+k*t.fontSize},_.yFn=function(t){return t.dy+b+t.fontSize*y},_.anchorFn=function(t,e){if(d){if(l)return"end";if(c)return"start"}return i(e)&&0!==e&&180!==e?e*x<0!==u?"end":"start":"middle"},_.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side!==u?-n:0};else if("y"===T){if(x=(w=!u&&"left"===A||u&&"right"===A)?1:-1,u&&(x*=-1),v=f,b=p*x,y=0,u||90!==Math.abs(M)||(y=-90===M&&"left"===A||90===M&&"right"===A?U:.5),u){var S=i(M)?+M:0;if(0!==S){var C=s.deg2rad(S);k=Math.abs(Math.sin(C))*U*x,y=0}}_.xFn=function(t){return t.dx+e-(v+t.fontSize*y)*x+k*t.fontSize},_.yFn=function(t){return t.dy+b+t.fontSize*B},_.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?"middle":w?"end":"start"},_.heightFn=function(e,r,n){return"right"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return _},H.drawTicks=function(t,e,r){r=r||{};var i=e._id+"tick",o=[].concat(e.minor&&e.minor.ticks?r.vals.filter((function(t){return t.minor&&!t.noTick})):[]).concat(e.ticks?r.vals.filter((function(t){return!t.minor&&!t.noTick})):[]),a=r.layer.selectAll("path."+i).data(o,At);a.exit().remove(),a.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(t){return u.stroke(n.select(this),t.minor?e.minor.tickcolor:e.tickcolor)})).style("stroke-width",(function(r){return h.crispRound(t,r.minor?e.minor.tickwidth:e.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),Pt(e,[F]),a.attr("transform",r.transFn)},H.drawGrid=function(t,e,r){if(r=r||{},"sync"!==e.tickmode){var i=e._id+"grid",o=e.minor&&e.minor.showgrid,a=o?r.vals.filter((function(t){return t.minor})):[],s=e.showgrid?r.vals.filter((function(t){return!t.minor})):[],l=r.counterAxis;if(l&&H.shouldShowZeroLine(t,e,l))for(var c="array"===e.tickmode,d=0;d=0;v--){var b=v?m:g;if(b){var y=b.selectAll("path."+i).data(v?s:a,At);y.exit().remove(),y.enter().append("path").classed(i,1).classed("crisp",!1!==r.crisp),y.attr("transform",r.transFn).attr("d",r.path).each((function(t){return u.stroke(n.select(this),t.minor?e.minor.gridcolor:e.gridcolor||"#ddd")})).style("stroke-dasharray",(function(t){return h.dashStyle(t.minor?e.minor.griddash:e.griddash,t.minor?e.minor.gridwidth:e.gridwidth)})).style("stroke-width",(function(t){return(t.minor?p:e._gw)+"px"})).style("display",null),"function"==typeof r.path&&y.attr("d",r.path)}}Pt(e,[I,R])}},H.drawZeroLine=function(t,e,r){r=r||r;var n=e._id+"zl",i=H.shouldShowZeroLine(t,e,r.counterAxis),o=r.layer.selectAll("path."+n).data(i?[{x:0,id:e._id}]:[]);o.exit().remove(),o.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(t,e){return Y(t.id,e.id)}))})),o.attr("transform",r.transFn).attr("d",r.path).call(u.stroke,e.zerolinecolor||u.defaultLine).style("stroke-width",h.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),Pt(e,[D])},H.drawLabels=function(t,e,r){r=r||{};var o=t._fullLayout,a=e._id,d=r.cls||a+"tick",u=r.vals.filter((function(t){return t.text})),f=r.labelFns,p=r.secondary?0:e.tickangle,m=(e._prevTickAngles||{})[d],g=r.layer.selectAll("g."+d).data(e.showticklabels?u:[],At),v=[];function b(t,o){t.each((function(t){var a=n.select(this),s=a.select(".text-math-group"),d=f.anchorFn(t,o),u=r.transFn.call(a.node(),t)+(i(o)&&0!=+o?" rotate("+o+","+f.xFn(t)+","+(f.yFn(t)-t.fontSize/2)+")":""),p=c.lineCount(a),m=G*t.fontSize,g=f.heightFn(t,i(o)?+o:0,(p-1)*m);if(g&&(u+=l(0,g)),s.empty()){var v=a.select("text");v.attr({transform:u,"text-anchor":d}),v.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var b=h.bBox(s.node()).width*{end:-.5,start:.5}[d];s.attr("transform",u+l(b,0))}}))}g.enter().append("g").classed(d,1).append("text").attr("text-anchor","middle").each((function(e){var r=n.select(this),i=t._promises.length;r.call(c.positionText,f.xFn(e),f.yFn(e)).call(h.font,{family:e.font,size:e.fontSize,color:e.fontColor,weight:e.fontWeight,style:e.fontStyle,variant:e.fontVariant}).text(e.text).call(c.convertToTspans,t),t._promises[i]?v.push(t._promises.pop().then((function(){b(r,p)}))):b(r,p)})),Pt(e,[P]),g.exit().remove(),r.repositionOnUpdate&&g.each((function(t){n.select(this).select("text").call(c.positionText,f.xFn(t),f.yFn(t))})),e._adjustTickLabelsOverflow=function(){var r=e.ticklabeloverflow;if(r&&"allow"!==r){var i=-1!==r.indexOf("hide"),a="x"===e._id.charAt(0),l=0,c=a?t._fullLayout.width:t._fullLayout.height;if(-1!==r.indexOf("domain")){var d=s.simpleMap(e.range,e.r2l);l=e.l2p(d[0])+e._offset,c=e.l2p(d[1])+e._offset}var u=Math.min(l,c),f=Math.max(l,c),p=e.side,m=1/0,v=-1/0;for(var b in g.each((function(t){var r=n.select(this);if(r.select(".text-math-group").empty()){var o=h.bBox(r.node()),s=0;a?(o.right>f||o.leftf||o.top+(e.tickangle?0:t.fontSize/4)e["_visibleLabelMin_"+r._id]?l.style("display","none"):"tick"!==t.K||i||l.style("display",null)}))}))}))}))},b(g,m+1?m:p);var y=null;e._selections&&(e._selections[d]=g);var x=[function(){return v.length&&Promise.all(v)}];e.automargin&&o._redrawFromAutoMarginCount&&90===m?(y=m,x.push((function(){b(g,m)}))):x.push((function(){if(b(g,p),u.length&&e.autotickangles&&("log"!==e.type||"D"!==String(e.dtick).charAt(0))){y=e.autotickangles[0];var t,n=0,i=[],o=1;g.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),a=St(this),s=h.bBox(a.node());o=Math.max(o,c.lineCount(a)),i.push({top:0,bottom:10,height:10,left:r-s.width/2,right:r+s.width/2+2,width:s.width+2})}));var a=("boundaries"===e.tickson||e.showdividers)&&!r.secondary,l=u.length,d=Math.abs((u[l-1].x-u[0].x)*e._m)/(l-1),f=a?d/2:d,m=a?e.ticklen:1.25*n*o,v=f/Math.sqrt(Math.pow(f,2)+Math.pow(m,2)),x=e.autotickangles.map((function(t){return t*Math.PI/180})),w=x.find((function(t){return Math.abs(Math.cos(t))<=v}));void 0===w&&(w=x.reduce((function(t,e){return Math.abs(Math.cos(t))B*N&&(z=N,C[S]=E[S]=O[S])}var U=Math.abs(z-L);U-A>0?A*=1+A/(U-=A):A=0,"y"!==e._id.charAt(0)&&(A=-A),C[M]=_.p2r(_.r2p(E[M])+T*A),"min"===_.autorange||"max reversed"===_.autorange?(C[0]=null,_._rangeInitial0=void 0,_._rangeInitial1=void 0):"max"!==_.autorange&&"min reversed"!==_.autorange||(C[1]=null,_._rangeInitial0=void 0,_._rangeInitial1=void 0),o._insideTickLabelsUpdaterange[_._name+".range"]=C}var V=s.syncOrAsync(x);return V&&V.then&&t._promises.push(V),V},H.getPxPosition=function(t,e){var r,n=t._fullLayout._size,i=e._id.charAt(0),o=e.side;return"free"!==e.anchor?r=e._anchorAxis:"x"===i?r={_offset:n.t+(1-(e.position||0))*n.h,_length:0}:"y"===i&&(r={_offset:n.l+(e.position||0)*n.w+e._shift,_length:0}),"top"===o||"left"===o?r._offset:"bottom"===o||"right"===o?r._offset+r._length:void 0},H.shouldShowZeroLine=function(t,e,r){var n=s.simpleMap(e.range,e.r2l);return n[0]*n[1]<=0&&e.zeroline&&("linear"===e.type||"-"===e.type)&&!(e.rangebreaks&&e.maskBreaks(0)===O)&&(Mt(e,0)||!function(t,e,r,n){var i=r._mainAxis;if(i){var o=t._fullLayout,a=e._id.charAt(0),s=H.counterLetter(e._id),l=e._offset+(Math.abs(n[0])1)for(n=1;n{"use strict";var n=r(7370),i=r(12822),o=r(32994).BADNUM,a=i.isArrayOrTypedArray,s=i.isDateTime,l=i.cleanNumber,c=Math.round;function d(t,e){return e?n(t):"number"==typeof t}function u(t){return Math.max(1,(t-1)/1e3)}t.exports=function(t,e,r){var i=t,h=r.noMultiCategory;if(a(i)&&!i.length)return"-";if(!h&&function(t){return a(t[0])&&a(t[1])}(i))return"multicategory";if(h&&Array.isArray(i[0])){for(var f=[],p=0;p2*a}(i,e))return"date";var g="strict"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=u(r),i=0,a=0,s={},d=0;d2*i}(i,g)?"category":function(t,e){for(var r=t.length,n=0;n{"use strict";var n=r(7370),i=r(25059),o=r(12822),a=r(46121),s=r(35677),l=r(86130),c=r(49342),d=r(8736),u=r(84411),h=r(12213),f=r(33322),p=r(65412),m=r(46458),g=r(30632),v=r(21197).WEEKDAY_PATTERN,b=r(21197).HOUR_PATTERN;function y(t,e,r){function i(r,n){return o.coerce(t,e,l.rangebreaks,r,n)}if(i("enabled")){var a=i("bounds");if(a&&a.length>=2){var s,c,d="";if(2===a.length)for(s=0;s<2;s++)if(c=w(a[s])){d=v;break}var u=i("pattern",d);if(u===v)for(s=0;s<2;s++)(c=w(a[s]))&&(e.bounds[s]=a[s]=c-1);if(u)for(s=0;s<2;s++)switch(c=a[s],u){case v:if(!n(c))return void(e.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(e.enabled=!1);e.bounds[s]=a[s]=c;break;case b:if(!n(c))return void(e.enabled=!1);if((c=+c)<0||c>24)return void(e.enabled=!1);e.bounds[s]=a[s]=c}if(!1===r.autorange){var h=r.range;if(h[0]h[1])return void(e.enabled=!1)}else if(a[0]>h[0]&&a[1]{"use strict";var n=r(77201),i=n.FORMAT_LINK,o=n.DATE_FORMAT_LINK;function a(t,e){return["Sets the "+t+" formatting rule"+(e?"for `"+e+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+i+"."].join(" ")}function s(t,e){return a(t,e)+[" And for dates see: "+o+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}t.exports={axisHoverFormat:function(t,e){return{valType:"string",dflt:"",editType:"none",description:(e?a:s)("hover text",t)+["By default the values are formatted using "+(e?"generic number format":"`"+t+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:a,descriptionWithDates:s}},99246:(t,e,r)=>{"use strict";var n=r(25059),i=r(21197);function o(t,e){if(e&&e.length)for(var r=0;rn?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},e.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(" ")[0]},e.isLinked=function(t,e){return o(e,t._axisMatchGroups)||o(e,t._axisConstraintGroups)}},33322:(t,e,r)=>{"use strict";var n=r(98507).isTypedArraySpec;t.exports=function(t,e,r,i){if("category"===e.type){var o,a=t.categoryarray,s=Array.isArray(a)&&a.length>0||n(a);s&&(o="array");var l,c=r("categoryorder",o);"array"===c&&(l=r("categoryarray")),s||"array"!==c||(c=e.categoryorder="trace"),"trace"===c?e._initialCategories=[]:"array"===c?e._initialCategories=l.slice():(l=function(t,e){var r,n,i,o=e.dataAttr||t._id.charAt(0),a={};if(e.axData)r=e.axData;else for(r=[],n=0;n{"use strict";var n=r(7370),i=r(12822),o=r(32994),a=o.ONEDAY,s=o.ONEWEEK;e.dtick=function(t,e){var r="log"===e,i="date"===e,o="category"===e,s=i?a:1;if(!t)return s;if(n(t))return(t=Number(t))<=0?s:o?Math.max(1,Math.round(t)):i?Math.max(.1,t):t;if("string"!=typeof t||!i&&!r)return s;var l=t.charAt(0),c=t.substr(1);return(c=n(c)?Number(c):0)<=0||!(i&&"M"===l&&c===Math.round(c)||r&&"L"===l||r&&"D"===l&&(1===c||2===c))?s:t},e.tick0=function(t,e,r,o){return"date"===e?i.cleanDate(t,i.dateTick0(r,o%s==0?1:0)):"D1"!==o&&"D2"!==o?n(t)?Number(t):0:void 0}},21197:(t,e,r)=>{"use strict";var n=r(46233).counter;t.exports={idRegex:{x:n("x","( domain)?"),y:n("y","( domain)?")},attrRegex:n("[xy]axis"),xAxisMatch:n("xaxis"),yAxisMatch:n("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},69352:(t,e,r)=>{"use strict";var n=r(12822),i=r(19496),o=r(99246).id2name,a=r(86130),s=r(92578),l=r(30632),c=r(32994).ALMOST_EQUAL,d=r(89701).FROM_BL;function u(t,e,r){var i=r.axIds,s=r.layoutOut,l=r.hasImage,c=s._axisConstraintGroups,d=s._axisMatchGroups,u=e._id,m=u.charAt(0),g=((s._splomAxes||{})[m]||{})[u]||{},v=e._id,b="x"===v.charAt(0);function y(r,i){return n.coerce(t,e,a,r,i)}e._matchGroup=null,e._constraintGroup=null,y("constrain",l?"domain":"range"),n.coerce(t,e,{constraintoward:{valType:"enumerated",values:b?["left","center","right"]:["bottom","middle","top"],dflt:b?"center":"middle"}},"constraintoward");var x,w,_=e.type,k=[];for(x=0;xn?i.substr(n):o.substr(r))+a:i+o+t*e:a}function g(t,e){for(var r=e._size,n=r.h/r.w,i={},o=Object.keys(t),a=0;ac*y)||k)for(r=0;rD&&Pz&&(z=P);h/=(z-L)/(2*O),L=l.l2r(L),z=l.l2r(z),l.range=l._input.range=S{"use strict";var n=r(27941),i=r(12822),o=i.numberFormat,a=r(18106),s=r(17520),l=r(25059),c=i.strTranslate,d=r(80394),u=r(17499),h=r(40666),f=r(70410),p=r(75815),m=r(76292),g=r(19846),v=r(14295),b=v.selectingOrDrawing,y=v.freeMode,x=r(89701).FROM_TL,w=r(86748),_=r(39004).redrawReglTraces,k=r(51137),A=r(99246).getFromId,T=r(70059).prepSelect,M=r(70059).clearOutline,S=r(70059).selectOnClick,C=r(92578),E=r(21197),L=E.MINDRAG,z=E.MINZOOM,O=!0;function D(t,e,r,n){var o=i.ensureSingle(t.draglayer,e,r,(function(e){e.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",t.id)}));return o.call(m,n),o.node()}function I(t,e,r,i,o,a,s){var l=D(t,"rect",e,r);return n.select(l).call(h.setRect,i,o,a,s),l}function R(t,e){for(var r=0;r=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function N(t,e,r,n,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",c(r,n)).attr("d",i+"Z")}function B(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("transform",c(e,r)).attr("d","M0,0Z")}function U(t,e,r,n,i,o){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),G(t,e,i,o)}function G(t,e,r,n){r||(t.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function V(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function H(t){O&&t.data&&t._context.showTips&&(i.notifier(i._(t,"Double-click to zoom back out"),"long"),O=!1)}function W(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,z)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function q(t,e,r,n,o){for(var a,s,l,c,d=!1,u={},h={},f=(o||{}).xaHash,p=(o||{}).yaHash,m=0;m=0)i._fullLayout._deactivateShape(i);else{var a=i._fullLayout.clickmode;if(V(i),2!==t||vt||Ht(),gt)a.indexOf("select")>-1&&S(r,i,$,J,e.id,zt),a.indexOf("event")>-1&&f.click(i,r,e.id);else if(1===t&&vt){var s=m?D:O,c="s"===m||"w"===v?0:1,u=s._name+".range["+c+"]",h=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return"date"===t.type?n:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,o("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,o("."+String(r)+"g")(n))}(s,c),p="left",g="middle";if(s.fixedrange)return;m?(g="n"===m?"top":"bottom","right"===s.side&&(p="right")):"e"===v&&(p="right"),i._context.showAxisRangeEntryBoxes&&n.select(xt).call(d.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(h),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:p,verticalAlign:g}).on("edit",(function(t){var e=s.d2r(t);void 0!==e&&l.call("_guiRelayout",i,u,e)}))}}}function It(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(tt,ft*e+wt)),i=Math.max(0,Math.min(et,pt*r+_t)),o=Math.abs(n-wt),a=Math.abs(i-_t);function s(){St="",kt.r=kt.l,kt.t=kt.b,Et.attr("d","M0,0Z")}if(kt.l=Math.min(wt,n),kt.r=Math.max(wt,n),kt.t=Math.min(_t,i),kt.b=Math.max(_t,i),rt.isSubplotConstrained)o>z||a>z?(St="xy",o/tt>a/et?(a=o*et/tt,_t>i?kt.t=_t-a:kt.b=_t+a):(o=a*tt/et,wt>n?kt.l=wt-o:kt.r=wt+o),Et.attr("d",W(kt))):s();else if(nt.isSubplotConstrained)if(o>z||a>z){St="xy";var l=Math.min(kt.l/tt,(et-kt.b)/et),c=Math.max(kt.r/tt,(et-kt.t)/et);kt.l=l*tt,kt.r=c*tt,kt.b=(1-l)*et,kt.t=(1-c)*et,Et.attr("d",W(kt))}else s();else!ot||a0){var d;if(nt.isSubplotConstrained||!it&&1===ot.length){for(d=0;d<$.length;d++)$[d].range=$[d]._r.slice(),C($[d],1-r/et);a=(e=r*tt/et)/2}if(nt.isSubplotConstrained||!ot&&1===it.length){for(d=0;d1&&(void 0!==o.maxallowed&&st===(o.range[0]1&&(void 0!==a.maxallowed&<===(a.range[0]{"use strict";var n=r(27941),i=r(70410),o=r(19846),a=r(76292),s=r(45731).makeDragBox,l=r(21197).DRAGGERSIZE;e.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot)n.select(t).selectAll(".drag").remove();else if(r._has("cartesian")||r._has("splom")){Object.keys(r._plots||{}).sort((function(t,e){if((r._plots[t].mainplot&&!0)===(r._plots[e].mainplot&&!0)){var n=t.split("y"),i=e.split("y");return n[0]===i[0]?Number(n[1]||1)-Number(i[1]||1):Number(n[0]||1)-Number(i[0]||1)}return r._plots[t].mainplot?1:-1})).forEach((function(e){var n=r._plots[e],a=n.xaxis,c=n.yaxis;if(!n.mainplot){var d=s(t,n,a._offset,c._offset,a._length,c._length,"ns","ew");d.onmousemove=function(r){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===e&&t._fullLayout._plots[e]&&i.hover(t,r,e)},i.hover(t,r,e),t._fullLayout._lasthover=d,t._fullLayout._hoversubplot=e},d.onmouseout=function(e){t._dragging||(t._fullLayout._hoversubplot=null,o.unhover(t,e))},t._context.showAxisDragHandles&&(s(t,n,a._offset-l,c._offset-l,l,l,"n","w"),s(t,n,a._offset+a._length,c._offset-l,l,l,"n","e"),s(t,n,a._offset-l,c._offset+c._length,l,l,"s","w"),s(t,n,a._offset+a._length,c._offset+c._length,l,l,"s","e"))}if(t._context.showAxisDragHandles){if(e===a._mainSubplot){var u=a._mainLinePosition;"top"===a.side&&(u-=l),s(t,n,a._offset+.1*a._length,u,.8*a._length,l,"","ew"),s(t,n,a._offset,u,.1*a._length,l,"","w"),s(t,n,a._offset+.9*a._length,u,.1*a._length,l,"","e")}if(e===c._mainSubplot){var h=c._mainLinePosition;"right"!==c.side&&(h-=l),s(t,n,h,c._offset+.1*c._length,l,.8*c._length,"ns",""),s(t,n,h,c._offset+.9*c._length,l,.1*c._length,"s",""),s(t,n,h,c._offset,l,.1*c._length,"n","")}}}));var a=r._hoverlayer.node();a.onmousemove=function(e){e.target=t._fullLayout._lasthover,i.hover(t,e,r._hoversubplot)},a.onclick=function(e){e.target=t._fullLayout._lasthover,i.click(t,e)},a.onmousedown=function(e){t._fullLayout._lasthover.onmousedown(e)},e.updateFx(t)}},e.updateFx=function(t){var e=t._fullLayout,r="pan"===e.dragmode?"move":"crosshair";a(e._draggers,r)}},39859:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822),o=r(99246);t.exports=function(t){return function(e,r){var a=e[t];if(Array.isArray(a))for(var s=n.subplotsRegistry.cartesian,l=s.idRegex,c=r._subplots,d=c.xaxis,u=c.yaxis,h=c.cartesian,f=r._has("cartesian")||r._has("gl2d"),p=0;p{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=r(51137),s=r(40666),l=r(47388).eV,c=r(99246),d=r(21197),u=r(25853),h=o.ensureSingle;function f(t,e,r){return o.ensureSingle(t,e,r,(function(t){t.datum(r)}))}function p(t,e,r,a,c){for(var u,h,f,p=d.traceLayerClasses,m=t._fullLayout,g=m._modules,v={},b=0;b{"use strict";var n=r(75058),i=r(84226),o=r(68057).T,a=r(98260).extendFlat,s=r(46121).templatedArray,l=r(60393).descriptionWithDates,c=r(32994).ONEDAY,d=r(21197),u=d.HOUR_PATTERN,h=d.WEEKDAY_PATTERN,f={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0},description:["Sets the tick mode for this axis.","If *auto*, the number of ticks is set via `nticks`.","If *linear*, the placement of the ticks is determined by","a starting position `tick0` and a tick step `dtick`","(*linear* is the default value if `tick0` and `dtick` are provided).","If *array*, the placement of the ticks is set via `tickvals`","and the tick text is `ticktext`.","(*array* is the default value if `tickvals` is provided)."].join(" ")},p=a({},f,{values:f.values.slice().concat(["sync"]),description:[f.description,"If *sync*, the number of ticks will sync with the overlayed axis","set by `overlaying` property."].join(" ")});function m(t){return{valType:"integer",min:0,dflt:t?5:0,editType:"ticks",description:["Specifies the maximum number of ticks for the particular axis.","The actual number of ticks will be chosen automatically to be","less than or equal to `nticks`.","Has an effect only if `tickmode` is set to *auto*."].join(" ")}}var g={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the placement of the first tick on this axis.","Use with `dtick`.","If the axis `type` is *log*, then you must take the log of your starting tick","(e.g. to set the starting tick to 100, set the `tick0` to 2)","except when `dtick`=*L* (see `dtick` for more info).","If the axis `type` is *date*, it should be a date string, like date data.","If the axis `type` is *category*, it should be a number, using the scale where","each category is assigned a serial number from zero in the order it appears."].join(" ")},v={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the step in-between ticks on this axis. Use with `tick0`.","Must be a positive number, or special strings available to *log* and *date* axes.","If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n","is the tick number. For example,","to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1.","To set tick marks at 1, 100, 10000, ... set dtick to 2.","To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433.","*log* has several special values; *L*, where `f` is a positive number,","gives ticks linearly spaced in value (but not position).","For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc.","To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5).","`tick0` is ignored for *D1* and *D2*.","If the axis `type` is *date*, then you must convert the time to milliseconds.","For example, to set the interval between ticks to one day,","set `dtick` to 86400000.0.","*date* also has special values *M* gives ticks spaced by a number of months.","`n` must be a positive integer.","To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*.","To set ticks every 4 years, set `dtick` to *M48*"].join(" ")},b={valType:"data_array",editType:"ticks",description:["Sets the values at which ticks on this axis appear.","Only has an effect if `tickmode` is set to *array*.","Used with `ticktext`."].join(" ")},y={valType:"enumerated",values:["outside","inside",""],editType:"ticks",description:["Determines whether ticks are drawn or not.","If **, this axis' ticks are not drawn.","If *outside* (*inside*), this axis' are drawn outside (inside)","the axis lines."].join(" ")};function x(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick length (in px)."};return t||(e.dflt=5),e}function w(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick width (in px)."};return t||(e.dflt=1),e}var _={valType:"color",dflt:i.defaultLine,editType:"ticks",description:"Sets the tick color."},k={valType:"color",dflt:i.lightLine,editType:"ticks",description:"Sets the color of the grid lines."};function A(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the width (in px) of the grid lines."};return t||(e.dflt=1),e}var T=a({},o,{editType:"ticks"}),M={valType:"boolean",editType:"ticks",description:["Determines whether or not grid lines are drawn.","If *true*, the grid lines are drawn at every tick mark."].join(" ")};t.exports={visible:{valType:"boolean",editType:"plot",description:["A single toggle to hide the axis while preserving interaction like dragging.","Default is true when a cheater plot is present on the axis, otherwise","false"].join(" ")},color:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:["Sets default for all colors associated with this axis","all at once: line, font, tick, and grid colors.","Grid color is lightened by blending this with the plot background","Individual pieces can override this."].join(" ")},title:{text:{valType:"string",editType:"ticks",description:["Sets the title of this axis.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:n({editType:"ticks",description:["Sets this axis' title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),standoff:{valType:"number",min:0,editType:"ticks",description:["Sets the standoff distance (in px) between the axis labels and the title text","The default value is a function of the axis tick labels, the title `font.size`","and the axis `linewidth`.","Note that the axis title position is always constrained within the margins,","so the actual standoff distance is always less than the set or default value.","By setting `standoff` and turning on `automargin`, plotly.js will push the","margins to fit the axis title at given standoff distance."].join(" ")},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0,description:["Sets the axis type.","By default, plotly attempts to determined the axis type","by looking into the data of the traces that referenced","the axis in question."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","Defaults to layout.autotypenumbers."].join(" ")},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range of this axis is","computed in relation to the input data.","See `rangemode` for more info.","If `range` is provided and it has a value for both the","lower and upper bound, `autorange` is set to *false*.","Using *min* applies autorange only to set the minimum.","Using *max* applies autorange only to set the maximum.","Using *min reversed* applies autorange only to set the minimum on a reversed axis.","Using *max reversed* applies autorange only to set the maximum on a reversed axis.","Using *reversed* applies autorange on both ends and reverses the axis direction."].join(" ")},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange minimum."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange maximum."].join(" ")},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange minimum if it goes beyond this value.","Has no effect when `autorangeoptions.minallowed` is provided."].join(" ")},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange maximum if it goes beyond this value.","Has no effect when `autorangeoptions.maxallowed` is provided."].join(" ")},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Ensure this value is included in autorange."].join(" ")},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot",description:["If *normal*, the range is computed in relation to the extrema","of the input data.","If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data.","Applies only to linear axes."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0,description:["Sets the range of this axis.","If the axis `type` is *log*, then you must take the log of your","desired range (e.g. to set the range from 1 to 100,","set the range from 0 to 2).","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears.","Leaving either or both elements `null` impacts the default `autorange`."].join(" ")},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the minimum range of this axis."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the maximum range of this axis."].join(" ")},fixedrange:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not this axis is zoom-able.","If true, then zoom is disabled."].join(" ")},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Could be used to set the desired inside range of this axis","(excluding the labels) when `ticklabelposition` of","the anchored axis has *inside*.","Not implemented for axes with `type` *log*.","This would be ignored when `range` is provided."].join(" ")},scaleanchor:{valType:"enumerated",values:[d.idRegex.x.toString(),d.idRegex.y.toString(),!1],editType:"plot",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","changes together with the range of the corresponding axis","such that the scale of pixels per unit is in a constant ratio.","Both axes are still zoomable, but when you zoom one, the other will","zoom the same amount, keeping a fixed midpoint.","`constrain` and `constraintoward` determine how we enforce the constraint.","You can chain these, ie `yaxis: {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}`","but you can only link axes of the same `type`.","The linked axis can have the opposite letter (to constrain the aspect ratio)","or the same letter (to match scales across subplots).","Loops (`yaxis: {scaleanchor: *x*}, xaxis: {scaleanchor: *y*}` or longer) are redundant","and the last constraint encountered will be ignored to avoid possible","inconsistent constraints via `scaleratio`.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Setting `false` allows to remove a default constraint (occasionally,","you may need to prevent a default `scaleanchor` constraint from",'being applied, eg. when having an image trace `yaxis: {scaleanchor: "x"}`',"is set automatically in order for pixels to be rendered as squares,","setting `yaxis: {scaleanchor: false}` allows to remove the constraint)."].join(" ")},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot",description:["If this axis is linked to another by `scaleanchor`, this determines the pixel","to unit scale ratio. For example, if this value is 10, then every unit on","this axis spans 10 times the number of pixels as a unit on the linked axis.","Use this for example to create an elevation profile where the vertical scale","is exaggerated a fixed amount with respect to the horizontal."].join(" ")},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines how that happens:","by increasing the *range*, or by decreasing the *domain*.","Default is *domain* for axes containing image traces, *range* otherwise."].join(" ")},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines which direction we push","the originally specified plot area. Options are *left*, *center* (default),","and *right* for x axes, and *top*, *middle* (default), and *bottom* for y axes."].join(" ")},matches:{valType:"enumerated",values:[d.idRegex.x.toString(),d.idRegex.y.toString()],editType:"calc",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","will match the range of the corresponding axis in data-coordinates space.","Moreover, matching axes share auto-range values, category lists and","histogram auto-bins.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Moreover, note that matching axes must have the same `type`."].join(" ")},rangebreaks:s("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this axis rangebreak is enabled or disabled.","Please note that `rangebreaks` only work for *date* axis type."].join(" ")},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc",description:["Sets the lower and upper bounds of this axis rangebreak.","Can be used with `pattern`."].join(" ")},pattern:{valType:"enumerated",values:[h,u,""],editType:"calc",description:["Determines a pattern on the time line that generates breaks.","If *"+h+"* - days of the week in English e.g. 'Sunday' or `sun`","(matching is case-insensitive and considers only the first three characters),","as well as Sunday-based integers between 0 and 6.","If *"+u+"* - hour (24-hour clock) as decimal numbers between 0 and 24.","for more info.","Examples:","- { pattern: '"+h+"', bounds: [6, 1] }"," or simply { bounds: ['sat', 'mon'] }"," breaks from Saturday to Monday (i.e. skips the weekends).","- { pattern: '"+u+"', bounds: [17, 8] }"," breaks from 5pm to 8am (i.e. skips non-work hours)."].join(" ")},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"},description:["Sets the coordinate values corresponding to the rangebreaks.","An alternative to `bounds`.","Use `dvalue` to set the size of the values along the axis."].join(" ")},dvalue:{valType:"number",editType:"calc",min:0,dflt:c,description:["Sets the size of each `values` item.","The default is one day in milliseconds."].join(" ")},editType:"calc"}),tickmode:p,nticks:m(),tick0:g,dtick:v,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks",description:["Sets the spacing between tick labels as compared to the spacing between ticks.","A value of 1 (default) means each tick gets a label.","A value of 2 means shows every 2nd label.","A larger value n means only every nth tick is labeled.","`tick0` determines which labels are shown.","Not implemented for axes with `type` *log* or *multicategory*, or when `tickmode` is *array*."].join(" ")},tickvals:b,ticktext:{valType:"data_array",editType:"ticks",description:["Sets the text displayed at the ticks position via `tickvals`.","Only has an effect if `tickmode` is set to *array*.","Used with `tickvals`."].join(" ")},ticks:y,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks",description:["Determines where ticks and grid lines are drawn with respect to their","corresponding tick labels.","Only has an effect for axes of `type` *category* or *multicategory*.","When set to *boundaries*, ticks and grid lines are drawn half a category","to the left/bottom of labels."].join(" ")},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks",description:["Determines where tick labels are drawn with respect to their","corresponding ticks and grid lines.","Only has an effect for axes of `type` *date*","When set to *period*, tick labels are drawn in the middle of the period","between ticks."].join(" ")},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc",description:["Determines where tick labels are drawn with respect to the axis","Please note that","top or bottom has no effect on x axes or when `ticklabelmode` is set to *period*.","Similarly","left or right has no effect on y axes or when `ticklabelmode` is set to *period*.","Has no effect on *multicategory* axes or when `tickson` is set to *boundaries*.","When used on axes linked by `matches` or `scaleanchor`,","no extra padding for inside labels would be added by autorange,","so that the scales could match."].join(" ")},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc",description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","Otherwise on *category* and *multicategory* axes the default is *allow*.","In other cases the default is *hide past div*."].join(" ")},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle",description:["Determines if the axis lines or/and ticks are mirrored to","the opposite side of the plotting area.","If *true*, the axis lines are mirrored.","If *ticks*, the axis lines and ticks are mirrored.","If *false*, mirroring is disable.","If *all*, axis lines are mirrored on all shared-axes subplots.","If *allticks*, axis lines and ticks are mirrored","on all shared-axes subplots."].join(" ")},ticklen:x(),tickwidth:w(),tickcolor:_,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks",description:"Determines whether or not the tick labels are drawn."},labelalias:{valType:"any",dflt:!1,editType:"ticks",description:["Replacement text for specific tick or hover labels.","For example using {US: 'USA', CA: 'Canada'} changes US to USA","and CA to Canada. The labels we would have shown must match","the keys exactly, after adding any tickprefix or ticksuffix.","For negative numbers the minus sign symbol used (U+2212) is wider than the regular ascii dash.","That means you need to use −1 instead of -1.","labelalias can be used with any axis type, and both keys (if needed)","and values (if desired) can include html-like tags or MathJax."].join(" ")},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks",description:["Determines whether long tick labels automatically grow the figure","margins."].join(" ")},showspikes:{valType:"boolean",dflt:!1,editType:"modebar",description:["Determines whether or not spikes (aka droplines) are drawn for this axis.","Note: This only takes affect when hovermode = closest"].join(" ")},spikecolor:{valType:"color",dflt:null,editType:"none",description:"Sets the spike color. If undefined, will use the series color"},spikethickness:{valType:"number",dflt:3,editType:"none",description:"Sets the width (in px) of the zero line."},spikedash:a({},o,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none",description:["Determines the drawing mode for the spike line","If *toaxis*, the line is drawn from the data point to the axis the ","series is plotted on.","If *across*, the line is drawn across the entire plot area, and","supercedes *toaxis*.","If *marker*, then a marker dot is drawn on the axis the series is","plotted on"].join(" ")},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none",description:"Determines whether spikelines are stuck to the cursor or to the closest datapoints."},tickfont:n({editType:"ticks",description:"Sets the tick font."}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks",description:["Sets the angle of the tick labels with respect to the horizontal.","For example, a `tickangle` of -90 draws the tick labels","vertically."].join(" ")},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks",description:["When `tickangle` is set to *auto*, it will be set to the first","angle in this array that is large enough to prevent label","overlap."].join(" ")},tickprefix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label prefix."},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all tick labels are displayed with a prefix.","If *first*, only the first tick is displayed with a prefix.","If *last*, only the last tick is displayed with a suffix.","If *none*, tick prefixes are hidden."].join(" ")},ticksuffix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label suffix."},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:"Same as `showtickprefix` but for tick suffixes."},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all exponents are shown besides their significands.","If *first*, only the exponent of the first tick is shown.","If *last*, only the exponent of the last tick is shown.","If *none*, no exponents appear."].join(" ")},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks",description:["Determines a formatting rule for the tick exponents.","For example, consider the number 1,000,000,000.","If *none*, it appears as 1,000,000,000.","If *e*, 1e+9.","If *E*, 1E+9.","If *power*, 1x10^9 (with 9 in a super script).","If *SI*, 1G.","If *B*, 1B."].join(" ")},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks",description:["Hide SI prefix for 10^n if |n| is below this number.","This only has an effect when `tickformat` is *SI* or *B*."].join(" ")},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks",description:['If "true", even 4-digit integers are separated'].join(" ")},tickformat:{valType:"string",dflt:"",editType:"ticks",description:l("tick label")},tickformatstops:s("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not this stop is used.","If `false`, this stop is ignored even within its `dtickrange`."].join(" ")},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks",description:["range [*min*, *max*], where *min*, *max* - dtick values","which describe some zoom level, it is possible to omit *min*","or *max* value by passing *null*"].join(" ")},value:{valType:"string",dflt:"",editType:"ticks",description:["string - dtickformat for described zoom level, the same as *tickformat*"].join(" ")},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:l("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle",description:["Determines whether or not a line bounding this axis is drawn."].join(" ")},linecolor:{valType:"color",dflt:i.defaultLine,editType:"layoutstyle",description:"Sets the axis line color."},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle",description:"Sets the width (in px) of the axis line."},showgrid:M,gridcolor:k,gridwidth:A(),griddash:T,zeroline:{valType:"boolean",editType:"ticks",description:["Determines whether or not a line is drawn at along the 0 value","of this axis.","If *true*, the zero line is drawn on top of the grid lines."].join(" ")},zerolinecolor:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:"Sets the line color of the zero line."},zerolinewidth:{valType:"number",dflt:1,editType:"ticks",description:"Sets the width (in px) of the zero line."},showdividers:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not a dividers are drawn","between the category levels of this axis.","Only has an effect on *multicategory* axes."].join(" ")},dividercolor:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:["Sets the color of the dividers","Only has an effect on *multicategory* axes."].join(" ")},dividerwidth:{valType:"number",dflt:1,editType:"ticks",description:["Sets the width (in px) of the dividers","Only has an effect on *multicategory* axes."].join(" ")},anchor:{valType:"enumerated",values:["free",d.idRegex.x.toString(),d.idRegex.y.toString()],editType:"plot",description:["If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to","the corresponding opposite-letter axis.","If set to *free*, this axis' position is determined by `position`."].join(" ")},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot",description:["Determines whether a x (y) axis is positioned","at the *bottom* (*left*) or *top* (*right*)","of the plotting area."].join(" ")},overlaying:{valType:"enumerated",values:["free",d.idRegex.x.toString(),d.idRegex.y.toString()],editType:"plot",description:["If set a same-letter axis id, this axis is overlaid on top of","the corresponding same-letter axis, with traces and axes visible for both","axes.","If *false*, this axis does not overlay any same-letter axes.","In this case, for axes with overlapping domains only the highest-numbered","axis will be visible."].join(" ")},minor:{tickmode:f,nticks:m("minor"),tick0:g,dtick:v,tickvals:b,ticks:y,ticklen:x("minor"),tickwidth:w("minor"),tickcolor:_,gridcolor:k,gridwidth:A("minor"),griddash:T,showgrid:M,editType:"ticks"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot",description:["Sets the layer on which this axis is displayed.","If *above traces*, this axis is displayed above all the subplot's traces","If *below traces*, this axis is displayed below all the subplot's traces,","but above the grid lines.","Useful when used together with scatter-like traces with `cliponaxis`","set to *false* to show markers and/or text nodes above this axis."].join(" ")},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot",description:["Sets the domain of this axis (in plot fraction)."].join(" ")},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot",description:["Sets the position of this axis in the plotting space","(in normalized coordinates).","Only has an effect if `anchor` is set to *free*."].join(" ")},autoshift:{valType:"boolean",dflt:!1,editType:"plot",description:["Automatically reposition the axis to avoid","overlap with other axes with the same `overlaying` value.","This repositioning will account for any `shift` amount applied to other","axes on the same side with `autoshift` is set to true.","Only has an effect if `anchor` is set to *free*."].join(" ")},shift:{valType:"number",editType:"plot",description:["Moves the axis a given number of pixels from where it would have been otherwise.","Accepts both positive and negative values, which will shift the axis either right","or left, respectively.","If `autoshift` is set to true, then this defaults to a padding of -3 if `side` is set to *left*.","and defaults to +3 if `side` is set to *right*. Defaults to 0 if `autoshift` is set to false.","Only has an effect if `anchor` is set to *free*."].join(" ")},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","median ascending","median descending"],dflt:"trace",editType:"calc",description:["Specifies the ordering logic for the case of categorical variables.","By default, plotly uses *trace*, which specifies the order that is present in the data supplied.","Set `categoryorder` to *category ascending* or *category descending* if order should be determined by","the alphanumerical order of the category names.","Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category","is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to","the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.","Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the","numerical order of the values.","Similarly, the order can be determined by the min, max, sum, mean or median of all the values."].join(" ")},categoryarray:{valType:"data_array",editType:"calc",description:["Sets the order in which categories on this axis appear.","Only has an effect if `categoryorder` is set to *array*.","Used with `categoryorder`."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `range`,","`autorange`, and `title` if in `editable: true` configuration.","Defaults to `layout.uirevision`."].join(" ")},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks",description:["Obsolete.","Set `tickmode` to *auto* for old `autotick` *true* behavior.","Set `tickmode` to *linear* for `autotick` *false*."].join(" ")},title:{valType:"string",editType:"ticks",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the axis' title, please use `title.text` now."].join(" ")},titlefont:n({editType:"ticks",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}}},36741:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(66811).isUnifiedHover,a=r(85400),s=r(46121),l=r(13195),c=r(86130),d=r(25119),u=r(91200),h=r(69352),f=r(52869),p=r(99246),m=p.id2name,g=p.name2id,v=r(21197).AX_ID_PATTERN,b=r(25059),y=b.traceIs,x=b.getComponentMethod;function w(t,e,r){Array.isArray(t[e])?t[e].push(r):t[e]=[r]}t.exports=function(t,e,r){var b,_,k=e.autotypenumbers,A={},T={},M={},S={},C={},E={},L={},z={},O={},D={};for(b=0;b{"use strict";var n=r(18106).mix,i=r(84226),o=r(12822);t.exports=function(t,e,r,a){var s=(a=a||{}).dfltColor;function l(r,n){return o.coerce2(t,e,a.attributes,r,n)}var c=l("linecolor",s),d=l("linewidth");r("showline",a.showLine||!!c||!!d)||(delete e.linecolor,delete e.linewidth);var u=l("gridcolor",n(s,a.bgColor,a.blend||i.lightFraction).toRgbString()),h=l("gridwidth"),f=l("griddash");if(r("showgrid",a.showGrid||!!u||!!h||!!f)||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),a.hasMinor){var p=l("minor.gridcolor",n(e.gridcolor,a.bgColor,67).toRgbString()),m=l("minor.gridwidth",e.gridwidth||1),g=l("minor.griddash",e.griddash||"solid");r("minor.showgrid",!!p||!!m||!!g)||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!a.noZeroLine){var v=l("zerolinecolor",s),b=l("zerolinewidth");r("zeroline",a.showGrid||!!v||!!b)||(delete e.zerolinecolor,delete e.zerolinewidth)}}},52869:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822);t.exports=function(t,e,r,o){var a,s,l,c,d,u,h=o.counterAxes||[],f=o.overlayableAxes||[],p=o.letter,m=o.grid,g=o.overlayingDomain;m&&(s=m._domains[p][m._axisMap[e._id]],a=m._anchors[e._id],s&&(l=m[p+"side"].split(" ")[0],c=m.domain[p]["right"===l||"top"===l?1:0])),s=s||[0,1],a=a||(n(t.position)?"free":h[0]||"free"),l=l||("x"===p?"bottom":"left"),c=c||0,d=0,u=!1;var v=i.coerce(t,e,{anchor:{valType:"enumerated",values:["free"].concat(h),dflt:a}},"anchor"),b=i.coerce(t,e,{side:{valType:"enumerated",values:"x"===p?["bottom","top"]:["left","right"],dflt:l}},"side");"free"===v&&("y"===p&&(r("autoshift")&&(c="left"===b?g[0]:g[1],u=!e.automargin||e.automargin,d="left"===b?-3:3),r("shift",d)),r("position",c)),r("automargin",u);var y=!1;if(f.length&&(y=i.coerce(t,e,{overlaying:{valType:"enumerated",values:[!1].concat(f),dflt:!1}},"overlaying")),!y){var x=r("domain",s);x[0]>x[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s),"sync"===e.tickmode&&(e.tickmode="auto")}return r("layer"),e}},12213:(t,e,r)=>{"use strict";var n=r(95768);t.exports=function(t,e,r,i,o){o||(o={});var a=o.tickSuffixDflt,s=n(t);r("tickprefix")&&r("showtickprefix",s),r("ticksuffix",a)&&r("showticksuffix",s)}},46458:(t,e,r)=>{"use strict";var n=r(49826);t.exports=function(t,e,r,i){var o=e._template||{},a=e.type||o.type||"-";r("minallowed"),r("maxallowed");var s,l=r("range");l||i.noInsiderange||"log"===a||(!(s=r("insiderange"))||null!==s[0]&&null!==s[1]||(e.insiderange=!1,s=void 0),s&&(l=r("range",s)));var c,d=e.getAutorangeDflt(l,i),u=r("autorange",d);!l||(null!==l[0]||null!==l[1])&&(null!==l[0]&&null!==l[1]||"reversed"!==u&&!0!==u)&&(null===l[0]||"min"!==u&&"max reversed"!==u)&&(null===l[1]||"max"!==u&&"min reversed"!==u)||(l=void 0,delete e.range,e.autorange=!0,c=!0),c||(u=r("autorange",d=e.getAutorangeDflt(l,i))),u&&(n(r,u,l),"linear"!==a&&"-"!==a||r("rangemode")),e.cleanRange()}},92578:(t,e,r)=>{"use strict";var n=r(89701).FROM_BL;t.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||"center"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],o=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(o+(i[0]-o)*e),t.l2r(o+(i[1]-o)*e)],t.setScale()}},30632:(t,e,r)=>{"use strict";var n=r(27941),i=r(79969).aL,o=r(12822),a=o.numberFormat,s=r(7370),l=o.cleanNumber,c=o.ms2DateTime,d=o.dateTime2ms,u=o.ensureNumber,h=o.isArrayOrTypedArray,f=r(32994),p=f.FP_SAFE,m=f.BADNUM,g=f.LOG_CLIP,v=f.ONEWEEK,b=f.ONEDAY,y=f.ONEHOUR,x=f.ONEMIN,w=f.ONESEC,_=r(99246),k=r(21197),A=k.HOUR_PATTERN,T=k.WEEKDAY_PATTERN;function M(t){return Math.pow(10,t)}function S(t){return null!=t}t.exports=function(t,e){e=e||{};var r=t._id||"x",f=r.charAt(0);function C(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-2*g*Math.abs(n-i))}return m}function E(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var a=d(e,n||t.calendar);if(a===m){if(!s(e))return m;e=+e;var l=Math.floor(10*o.mod(e+.05,1)),c=Math.round(e-l/10);a=d(new Date(c))+l/10}return a}function L(e,r,n){return c(e,r,n||t.calendar)}function z(e){return t._categories[Math.round(e)]}function O(e){if(S(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push("number"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return m}function D(e){if(t._categoriesMap)return t._categoriesMap[e]}function I(t){var e=D(t);return void 0!==e?e:s(t)?+t:void 0}function R(t){return s(t)?+t:D(t)}function F(t,e,r){return n.round(r+e*t,2)}function P(t,e,r){return(t-r)/e}var j=function(e){return s(e)?F(e,t._m,t._b):m},N=function(e){return P(e,t._m,t._b)};if(t.rangebreaks){var B="y"===f;j=function(e){if(!s(e))return m;var r=t._rangebreaks.length;if(!r)return F(e,t._m,t._b);var n=B;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,o=i*e,a=0,l=0;ld)){a=o<(c+d)/2?l:l+1;break}a=l+1}var u=t._B[a]||0;return isFinite(u)?F(e,t._m2,u):0},N=function(e){var r=t._rangebreaks.length;if(!r)return P(e,t._m,t._b);for(var n=0,i=0;it._rangebreaks[i].pmax&&(n=i+1);return P(e,t._m2,t._B[n])}}t.c2l="log"===t.type?C:u,t.l2c="log"===t.type?M:u,t.l2p=j,t.p2l=N,t.c2p="log"===t.type?function(t,e){return j(C(t,e))}:j,t.p2c="log"===t.type?function(t){return M(N(t))}:N,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=u,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=N,t.cleanPos=u):"log"===t.type?(t.d2r=t.d2l=function(t,e){return C(l(t),e)},t.r2d=t.r2c=function(t){return M(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=u,t.c2r=C,t.l2d=M,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return M(N(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=N,t.cleanPos=u):"date"===t.type?(t.d2r=t.r2d=o.identity,t.d2c=t.r2c=t.d2l=t.r2l=E,t.c2d=t.c2r=t.l2d=t.l2r=L,t.d2p=t.r2p=function(e,r,n){return t.l2p(E(e,0,n))},t.p2d=t.p2r=function(t,e,r){return L(N(t),e,r)},t.cleanPos=function(e){return o.cleanDate(e,m,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=O,t.r2d=t.c2d=t.l2d=z,t.d2r=t.d2l_noadd=I,t.r2c=function(e){var r=R(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=u,t.r2l=R,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return z(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:u(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=z,t.d2r=t.d2l_noadd=I,t.r2c=function(e){var r=I(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=D,t.l2r=t.c2r=u,t.r2l=I,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return z(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return Array.isArray(t)||"string"==typeof t&&""!==t?t:u(t)},t.setupMultiCategory=function(n){var i,a,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var c in l)if(c!==r){var d=e[_.id2name(c)];s=s.concat(d._traceIndices)}var u=[[0,{}],[0,{}]],p=[];for(i=0;il[1]&&(i[s?0:1]=n),i[0]===i[1]){var c=t.l2r(r),d=t.l2r(n);if(void 0!==r){var u=c+1;void 0!==n&&(u=Math.min(u,d)),i[s?1:0]=u}if(void 0!==n){var h=d+1;void 0!==r&&(h=Math.max(h,c)),i[s?0:1]=h}}}},t.cleanRange=function(e,r){t._cleanRange(e,r),t.limitRange(e)},t._cleanRange=function(e,r){r||(r={}),e||(e="range");var n,i,a=o.nestedProperty(t,e).get();if(i=(i="date"===t.type?o.dfltRange(t.calendar):"y"===f?k.DFLTRANGEY:"realaxis"===t._name?[0,1]:r.dfltRange||k.DFLTRANGEX).slice(),"tozero"!==t.rangemode&&"nonnegative"!==t.rangemode||(i[0]=0),a&&2===a.length){var l=null===a[0],c=null===a[1];for("date"!==t.type||t.autorange||(a[0]=o.cleanDate(a[0],m,t.calendar),a[1]=o.cleanDate(a[1],m,t.calendar)),n=0;n<2;n++)if("date"===t.type){if(!o.isDateTime(a[n],t.calendar)){t[e]=i;break}if(t.r2l(a[0])===t.r2l(a[1])){var d=o.constrain(t.r2l(a[0]),o.MIN_MS+1e3,o.MAX_MS-1e3);a[0]=t.l2r(d-1e3),a[1]=t.l2r(d+1e3);break}}else{if(!s(a[n])){if(l||c||!s(a[1-n])){t[e]=i;break}a[n]=a[1-n]*(n?10:.1)}if(a[n]<-p?a[n]=-p:a[n]>p&&(a[n]=p),a[0]===a[1]){var u=Math.max(1,Math.abs(1e-6*a[0]));a[0]-=u,a[1]+=u}}}else o.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=_.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var o=r&&t._r?"_r":"range",a=t.calendar;t.cleanRange(o);var s,l,c=t.r2l(t[o][0],a),d=t.r2l(t[o][1],a),u="y"===f;if(u?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(c-d),t._b=-t._m*d):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(d-c),t._b=-t._m*c),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks&&(t._rangebreaks=t.locateBreaks(Math.min(c,d),Math.max(c,d)),t._rangebreaks.length)){for(s=0;sd&&(h=!h),h&&t._rangebreaks.reverse();var p=h?-1:1;for(t._m2=p*t._length/(Math.abs(d-c)-t._lBreaks),t._B.push(-t._m2*(u?d:c)),s=0;si&&(i+=7,ai&&(i+=24,a=n&&a=n&&e=s.min&&(ts.max&&(s.max=n),i=!1)}i&&c.push({min:t,max:n})}};for(n=0;n{"use strict";t.exports=function(t){var e=["showexponent","showtickprefix","showticksuffix"].filter((function(e){return void 0!==t[e]}));if(e.every((function(r){return t[r]===t[e[0]]}))||1===e.length)return t[e[0]]}},84411:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499).contrast,o=r(86130),a=r(95768),s=r(35677);function l(t,e){function r(r,i){return n.coerce(t,e,o.tickformatstops,r,i)}r("enabled")&&(r("dtickrange"),r("value"))}t.exports=function(t,e,r,c,d){d||(d={});var u=r("labelalias");n.isPlainObject(u)||delete e.labelalias;var h=a(t);if(r("showticklabels")){var f=d.font||{},p=e.color,m=-1!==(e.ticklabelposition||"").indexOf("inside")?i(d.bgColor):p&&p!==o.color.dflt?p:f.color;if(n.coerceFont(r,"tickfont",{family:f.family,weight:f.weight,style:f.style,variant:f.variant,size:f.size,color:m}),d.noTicklabelstep||"multicategory"===c||"log"===c||r("ticklabelstep"),!d.noAng){var g=r("tickangle");d.noAutotickangles||"auto"!==g||r("autotickangles")}if("category"!==c){var v=r("tickformat");s(t,e,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:l}),e.tickformatstops.length||delete e.tickformatstops,d.noExp||v||"date"===c||(r("showexponent",h),r("exponentformat"),r("minexponent"),r("separatethousands"))}}}},8736:(t,e,r)=>{"use strict";var n=r(12822),i=r(86130);t.exports=function(t,e,r,o){var a=o.isMinor,s=a?t.minor||{}:t,l=a?e.minor:e,c=a?i.minor:i,d=a?"minor.":"",u=n.coerce2(s,l,c,"ticklen",a?.6*(e.ticklen||5):void 0),h=n.coerce2(s,l,c,"tickwidth",a?e.tickwidth||1:void 0),f=n.coerce2(s,l,c,"tickcolor",(a?e.tickcolor:void 0)||l.color);r(d+"ticks",!a&&o.outerTicks||u||h||f?"outside":"")||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}},49342:(t,e,r)=>{"use strict";var n=r(84696),i=r(12822).isArrayOrTypedArray,o=r(98507).isTypedArraySpec,a=r(98507).decodeTypedArraySpec;t.exports=function(t,e,r,s,l){l||(l={});var c=l.isMinor,d=c?t.minor||{}:t,u=c?e.minor:e,h=c?"minor.":"";function f(t){var e=d[t];return o(e)&&(e=a(e)),void 0!==e?e:(u._template||{})[t]}var p=f("tick0"),m=f("dtick"),g=f("tickvals"),v=r(h+"tickmode",i(g)?"array":m?"linear":"auto");if("auto"===v||"sync"===v)r(h+"nticks");else if("linear"===v){var b=u.dtick=n.dtick(m,s);u.tick0=n.tick0(p,s,e.calendar,b)}else"multicategory"!==s&&(void 0===r(h+"tickvals")?u.tickmode="auto":c||r("ticktext"))}},88313:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=r(40666),s=r(75815);t.exports=function(t,e,r,l){var c=t._fullLayout;if(0!==e.length){var d,u,h,f;l&&(d=l());var p=n.ease(r.easing);return t._transitionData._interruptCallbacks.push((function(){return window.cancelAnimationFrame(f),f=null,function(){for(var r={},n=0;nr.duration?(function(){for(var r={},n=0;n rect").call(a.setTranslate,0,0).call(a.setScale,1,1),t.plot.call(a.setTranslate,e._offset,r._offset).call(a.setScale,1,1);var n=t.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(a.setPointGroupScale,1,1),n.selectAll(".textpoint").call(a.setTextPointsScale,1,1),n.call(a.hideOutsideRangePoints,t)}function g(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,c=i._length,d=l._length,u=!!e.xr1,h=!!e.yr1,f=[];if(u){var p=o.simpleMap(e.xr0,i.r2l),m=o.simpleMap(e.xr1,i.r2l),g=p[1]-p[0],v=m[1]-m[0];f[0]=(p[0]*(1-r)+r*m[0]-p[0])/(p[1]-p[0])*c,f[2]=c*(1-r+r*v/g),i.range[0]=i.l2r(p[0]*(1-r)+r*m[0]),i.range[1]=i.l2r(p[1]*(1-r)+r*m[1])}else f[0]=0,f[2]=c;if(h){var b=o.simpleMap(e.yr0,l.r2l),y=o.simpleMap(e.yr1,l.r2l),x=b[1]-b[0],w=y[1]-y[0];f[1]=(b[1]*(1-r)+r*y[1]-b[1])/(b[0]-b[1])*d,f[3]=d*(1-r+r*w/x),l.range[0]=i.l2r(b[0]*(1-r)+r*y[0]),l.range[1]=l.l2r(b[1]*(1-r)+r*y[1])}else f[1]=0,f[3]=d;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var _=u?c/f[2]:1,k=h?d/f[3]:1,A=u?f[0]:0,T=h?f[1]:0,M=u?f[0]/f[2]*c:0,S=h?f[1]/f[3]*d:0,C=i._offset-M,E=l._offset-S;n.clipRect.call(a.setTranslate,A,T).call(a.setScale,1/_,1/k),n.plot.call(a.setTranslate,C,E).call(a.setScale,_,k),a.setPointGroupScale(n.zoomScalePts,1/_,1/k),a.setTextPointsScale(n.zoomScaleTxt,1/_,1/k)}s.redrawComponents(t)}},25119:(t,e,r)=>{"use strict";var n=r(25059).traceIs,i=r(17821);function o(t){return{v:"x",h:"y"}[t.orientation||"v"]}function a(t,e){var r=o(t),i=n(t,"box-violin"),a=n(t._fullInput||{},"candlestick");return i&&!a&&e===r&&void 0===t[r]&&void 0===t[r+"0"]}t.exports=function(t,e,r,s){r("autotypenumbers",s.autotypenumbersDflt),"-"===r("type",(s.splomStash||{}).type)&&(function(t,e){if("-"===t.type){var r,s=t._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var c=function(t,e,r){for(var n=0;n0&&(i["_"+r+"axes"]||{})[e])return i;if((i[r+"axis"]||r)===e){if(a(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}(e,s,l);if(c)if("histogram"!==c.type||l!=={v:"y",h:"x"}[c.orientation||"v"]){var d=l+"calendar",u=c[d],h={noMultiCategory:!n(c,"cartesian")||n(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&l==={h:"x",v:"y"}[c.orientation||"v"]&&(h.noMultiCategory=!0),h.autotypenumbers=t.autotypenumbers,a(c,l)){var f=o(c),p=[];for(r=0;r{"use strict";var n=r(25059),i=r(12822);function o(t,e,r){var n,o,a,s=!1;if("data"===e.type)n=t._fullData[null!==e.traces?e.traces[0]:0];else{if("layout"!==e.type)return!1;n=t._fullLayout}return o=i.nestedProperty(n,e.prop).get(),(a=r[e.type]=r[e.type]||{}).hasOwnProperty(e.prop)&&a[e.prop]!==o&&(s=!0),a[e.prop]=o,{changed:s,value:o}}function a(t,e){var r=[],n=e[0],o={};if("string"==typeof n)o[n]=e[1];else{if(!i.isPlainObject(n))return r;o=n}return l(o,(function(t,e,n){r.push({type:"layout",prop:t,value:n})}),"",0),r}function s(t,e){var r,n,o,a,s=[];if(n=e[0],o=e[1],r=e[2],a={},"string"==typeof n)a[n]=o;else{if(!i.isPlainObject(n))return s;a=n,void 0===r&&(r=o)}return void 0===r&&(r=null),l(a,(function(e,n,i){var o,a;if(Array.isArray(i)){a=i.slice();var l=Math.min(a.length,t.data.length);r&&(l=Math.min(l,r.length)),o=[];for(var c=0;c0?".":"")+o;i.isPlainObject(a)?l(a,e,s,n+1):e(s,o,a)}}))}e.manageCommandObserver=function(t,r,n,a){var s={},l=!0;r&&r._commandObserver&&(s=r._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=e.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(r&&r._commandObserver){if(c)return s;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,s}if(c){o(t,c,s.cache),s.check=function(){if(l){var e=o(t,c,s.cache);return e.changed&&a&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(a({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var d=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],u=0;u{"use strict";var n=r(98260).extendFlat;e.u=function(t,e){e=e||{};var r={valType:"info_array",editType:(t=t||{}).editType,items:[{valType:"number",min:0,max:1,editType:t.editType},{valType:"number",min:0,max:1,editType:t.editType}],dflt:[0,1]},i=t.name?t.name+" ":"",o=t.trace?"trace ":"subplot ",a=e.description?" "+e.description:"",s={x:n({},r,{description:["Sets the horizontal domain of this ",i,o,"(in plot fraction).",a].join("")}),y:n({},r,{description:["Sets the vertical domain of this ",i,o,"(in plot fraction).",a].join("")}),editType:t.editType};return t.noGridCell||(s.row={valType:"integer",min:0,dflt:0,editType:t.editType,description:["If there is a layout grid, use the domain ","for this row in the grid for this ",i,o,".",a].join("")},s.column={valType:"integer",min:0,dflt:0,editType:t.editType,description:["If there is a layout grid, use the domain ","for this column in the grid for this ",i,o,".",a].join("")}),s},e.N=function(t,e,r,n){var i=n&&n.x||[0,1],o=n&&n.y||[0,1],a=e.grid;if(a){var s=r("domain.column");void 0!==s&&(s{"use strict";t.exports=function(t){var e=t.variantValues,r=t.editType,n=t.colorEditType;void 0===n&&(n=r);var i={family:{valType:"string",noBlank:!0,strict:!0,editType:r,description:["HTML font family - the typeface that will be applied by the web browser.","The web browser will only be able to apply a font if it is available on the system","which it operates. Provide multiple font families, separated by commas, to indicate","the preference in which to apply fonts if they aren't available on the system.","The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server,","where only a select number of","fonts are installed and supported.","These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*,","*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,","*PT Sans Narrow*, *Raleway*, *Times New Roman*."].join(" ")},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:{editType:r,valType:"enumerated",values:["normal","bold"],dflt:"normal",description:["Sets the weight (or boldness) of the font."].join(" ")},style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal",description:["Sets whether a font should be styled with a normal or italic face from its family."].join(" ")},variant:t.noFontVariant?void 0:{editType:r,valType:"enumerated",values:e||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal",description:["Sets the variant of the font."].join(" ")},editType:r,description:""+(t.description||"")};return t.autoSize&&(i.size.dflt="auto"),t.autoColor&&(i.color.dflt="auto"),t.arrayOk&&(i.family.arrayOk=!0,i.weight.arrayOk=!0,i.style.arrayOk=!0,i.variant.arrayOk=!0,i.size.arrayOk=!0,i.color.arrayOk=!0),i}},53874:t=>{"use strict";t.exports={_isLinkedToArray:"frames_entry",group:{valType:"string",description:["An identifier that specifies the group to which the frame belongs,","used by animate to select a subset of frames."].join(" ")},name:{valType:"string",description:"A label by which to identify the frame"},traces:{valType:"any",description:["A list of trace indices that identify the respective traces in the","data attribute"].join(" ")},baseframe:{valType:"string",description:["The name of the frame into which this frame's properties are merged","before applying. This is used to unify properties and avoid needing","to specify the same values for the same properties in multiple frames."].join(" ")},data:{valType:"any",description:["A list of traces this frame modifies. The format is identical to the","normal trace definition."].join(" ")},layout:{valType:"any",description:["Layout properties which this frame modifies. The format is identical","to the normal layout definition."].join(" ")}}},47388:(t,e,r)=>{"use strict";var n=r(25059),i=r(21197).SUBPLOT_PATTERN;e.eV=function(t,e,r){var i,o=[],a=[];if(!(i="string"==typeof e?n.getModule(e).plot:"function"==typeof e?e:e.plot))return[o,t];for(var s=r,l=0;l{"use strict";var n=r(62309).overrideAll,i=r(53572),o=r(85833),a=r(47388).KO,s=r(12822),l=r(25853),c="gl3d",d="scene";e.name=c,e.attr=d,e.idRoot=d,e.idRegex=e.attrRegex=s.counterRegex("scene"),e.attributes=r(816),e.layoutAttributes=r(41019),e.baseLayoutAttrOverrides=n({hoverlabel:i.hoverlabel},"plot","nested"),e.supplyLayoutDefaults=r(13351),e.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots[c],i=0;i{"use strict";t.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's 3D coordinate system and","a 3D scene.","If *scene* (the default value), the (x,y,z) coordinates refer to","`layout.scene`.","If *scene2*, the (x,y,z) coordinates refer to `layout.scene2`,","and so on."].join(" ")}}},82854:(t,e,r)=>{"use strict";var n=r(17499),i=r(86130),o=r(98260).extendFlat,a=r(62309).overrideAll;t.exports=a({visible:i.visible,showspikes:{valType:"boolean",dflt:!0,description:["Sets whether or not spikes starting from","data points to this axis' wall are shown on hover."].join(" ")},spikesides:{valType:"boolean",dflt:!0,description:["Sets whether or not spikes extending from the","projection data points to this axis' wall boundaries","are shown on hover."].join(" ")},spikethickness:{valType:"number",min:0,dflt:2,description:"Sets the thickness (in px) of the spikes."},spikecolor:{valType:"color",dflt:n.defaultLine,description:"Sets the color of the spikes."},showbackground:{valType:"boolean",dflt:!1,description:["Sets whether or not this axis' wall","has a background color."].join(" ")},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)",description:"Sets the background color of this axis' wall."},showaxeslabels:{valType:"boolean",dflt:!0,description:"Sets whether or not this axis is labeled"},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:{text:i.title.text,font:i.title.font},type:o({},i.type,{values:["-","linear","log","date","category"]}),autotypenumbers:i.autotypenumbers,autorange:i.autorange,autorangeoptions:{minallowed:i.autorangeoptions.minallowed,maxallowed:i.autorangeoptions.maxallowed,clipmin:i.autorangeoptions.clipmin,clipmax:i.autorangeoptions.clipmax,include:i.autorangeoptions.include,editType:"plot"},rangemode:i.rangemode,minallowed:i.minallowed,maxallowed:i.maxallowed,range:o({},i.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:i.minor.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,mirror:i.mirror,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,labelalias:i.labelalias,tickfont:i.tickfont,tickangle:i.tickangle,tickprefix:i.tickprefix,showtickprefix:i.showtickprefix,ticksuffix:i.ticksuffix,showticksuffix:i.showticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:i.showline,linecolor:i.linecolor,linewidth:i.linewidth,showgrid:i.showgrid,gridcolor:o({},i.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:i.gridwidth,zeroline:i.zeroline,zerolinecolor:i.zerolinecolor,zerolinewidth:i.zerolinewidth,_deprecated:{title:i._deprecated.title,titlefont:i._deprecated.titlefont}},"plot","from-root")},20049:(t,e,r)=>{"use strict";var n=r(18106).mix,i=r(12822),o=r(46121),a=r(82854),s=r(25119),l=r(91200),c=["xaxis","yaxis","zaxis"],d=13600/187;t.exports=function(t,e,r){var u,h;function f(t,e){return i.coerce(u,h,a,t,e)}for(var p=0;p{"use strict";var n=r(17235),i=r(12822),o=["xaxis","yaxis","zaxis"];function a(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}a.prototype.merge=function(t,e){for(var r=this,a=0;a<3;++a){var s=e[o[a]];s.visible?(r.labels[a]=t._meta?i.templateString(s.title.text,t._meta):s.title.text,"font"in s.title&&(s.title.font.color&&(r.labelColor[a]=n(s.title.font.color)),s.title.font.family&&(r.labelFont[a]=s.title.font.family),s.title.font.size&&(r.labelSize[a]=s.title.font.size),s.title.font.weight&&(r.labelFontWeight[a]=s.title.font.weight),s.title.font.style&&(r.labelFontStyle[a]=s.title.font.style),s.title.font.variant&&(r.labelFontVariant[a]=s.title.font.variant)),"showline"in s&&(r.lineEnable[a]=s.showline),"linecolor"in s&&(r.lineColor[a]=n(s.linecolor)),"linewidth"in s&&(r.lineWidth[a]=s.linewidth),"showgrid"in s&&(r.gridEnable[a]=s.showgrid),"gridcolor"in s&&(r.gridColor[a]=n(s.gridcolor)),"gridwidth"in s&&(r.gridWidth[a]=s.gridwidth),"log"===s.type?r.zeroEnable[a]=!1:"zeroline"in s&&(r.zeroEnable[a]=s.zeroline),"zerolinecolor"in s&&(r.zeroLineColor[a]=n(s.zerolinecolor)),"zerolinewidth"in s&&(r.zeroLineWidth[a]=s.zerolinewidth),"ticks"in s&&s.ticks?r.lineTickEnable[a]=!0:r.lineTickEnable[a]=!1,"ticklen"in s&&(r.lineTickLength[a]=r._defaultLineTickLength[a]=s.ticklen),"tickcolor"in s&&(r.lineTickColor[a]=n(s.tickcolor)),"tickwidth"in s&&(r.lineTickWidth[a]=s.tickwidth),"tickangle"in s&&(r.tickAngle[a]="auto"===s.tickangle?-3600:Math.PI*-s.tickangle/180),"showticklabels"in s&&(r.tickEnable[a]=s.showticklabels),"tickfont"in s&&(s.tickfont.color&&(r.tickColor[a]=n(s.tickfont.color)),s.tickfont.family&&(r.tickFont[a]=s.tickfont.family),s.tickfont.size&&(r.tickSize[a]=s.tickfont.size),s.tickfont.weight&&(r.tickFontWeight[a]=s.tickfont.weight),s.tickfont.style&&(r.tickFontStyle[a]=s.tickfont.style),s.tickfont.variant&&(r.tickFontVariant[a]=s.tickfont.variant)),"mirror"in s?-1!==["ticks","all","allticks"].indexOf(s.mirror)?(r.lineTickMirror[a]=!0,r.lineMirror[a]=!0):!0===s.mirror?(r.lineTickMirror[a]=!1,r.lineMirror[a]=!0):(r.lineTickMirror[a]=!1,r.lineMirror[a]=!1):r.lineMirror[a]=!1,"showbackground"in s&&!1!==s.showbackground?(r.backgroundEnable[a]=!0,r.backgroundColor[a]=n(s.backgroundcolor)):r.backgroundEnable[a]=!1):(r.tickEnable[a]=!1,r.labelEnable[a]=!1,r.lineEnable[a]=!1,r.lineTickEnable[a]=!1,r.gridEnable[a]=!1,r.zeroEnable[a]=!1,r.backgroundEnable[a]=!1)}},t.exports=function(t,e){var r=new a;return r.merge(t,e),r}},13351:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(25059),a=r(84313),s=r(20049),l=r(41019),c=r(47388).KO,d="gl3d";function u(t,e,r,n){for(var a=r("bgcolor"),l=i.combine(a,n.paper_bgcolor),u=["up","center","eye"],h=0;h.999&&(g="turntable"):g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",n.getDfltFromLayout("hovermode"))}t.exports=function(t,e,r){var i=e._basePlotModules.length>1;a(t,e,r,{type:d,attributes:l,handleDefaults:u,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},41019:(t,e,r)=>{"use strict";var n=r(82854),i=r(40365).u,o=r(98260).extendFlat,a=r(12822).counterRegex;function s(t,e,r){return{x:{valType:"number",dflt:t,editType:"camera"},y:{valType:"number",dflt:e,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}t.exports={_arrayAttrRegexps:[a("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:o(s(0,0,1),{description:["Sets the (x,y,z) components of the 'up' camera vector.","This vector determines the up direction of this scene","with respect to the page.","The default is *{x: 0, y: 0, z: 1}* which means that","the z axis points up."].join(" ")}),center:o(s(0,0,0),{description:["Sets the (x,y,z) components of the 'center' camera vector","This vector determines the translation (x,y,z) space","about the center of this scene.","By default, there is no such translation."].join(" ")}),eye:o(s(1.25,1.25,1.25),{description:["Sets the (x,y,z) components of the 'eye' camera vector.","This vector determines the view point about the origin","of this scene."].join(" ")}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc",description:["Sets the projection type. The projection type could be","either *perspective* or *orthographic*. The default is","*perspective*."].join(" ")},editType:"calc"},editType:"camera"},domain:i({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0},description:["If *cube*, this scene's axes are drawn as a cube,","regardless of the axes' ranges.","If *data*, this scene's axes are drawn","in proportion with the axes' ranges.","If *manual*, this scene's axes are drawn","in proportion with the input of *aspectratio*","(the default behavior if *aspectratio* is provided).","If *auto*, this scene's axes are drawn","using the results of *data* except when one axis","is more than four times the size of the two others,","where in that case the results of *cube* are used."].join(" ")},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"},description:["Sets this scene's axis aspectratio."].join(" ")},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot",description:["Determines the mode of drag interactions for this scene."].join(" ")},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions for this scene."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in camera attributes.","Defaults to `layout.uirevision`."].join(" ")},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera",description:"Obsolete. Use `camera` instead."}}}},63306:(t,e,r)=>{"use strict";var n=r(17235),i=["xaxis","yaxis","zaxis"];function o(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}o.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[i[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=n(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},t.exports=function(t){var e=new o;return e.merge(t),e}},1285:(t,e,r)=>{"use strict";t.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var d=s[o[c]];if(d._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/t.dataScale[c],Math.abs(d._length)===1/0||isNaN(d._length))l[c]=[];else{d._input_range=d.range.slice(),d.range[0]=r[c].lo/t.dataScale[c],d.range[1]=r[c].hi/t.dataScale[c],d._m=1/(t.dataScale[c]*r[c].pixelsPerDataUnit),d.range[0]===d.range[1]&&(d.range[0]-=1,d.range[1]+=1);var u=d.tickmode;if("auto"===d.tickmode){d.tickmode="linear";var h=d.nticks||i.constrain(d._length/40,4,9);n.autoTicks(d,Math.abs(d.range[1]-d.range[0])/h)}for(var f=n.calcTicks(d,{msUTC:!0}),p=0;p/g," "));l[c]=f,d.tickmode=u}}for(e.ticks=l,c=0;c<3;++c)for(a[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]),p=0;p<2;++p)e.bounds[p][c]=t.glplot.bounds[p][c];t.contourLevels=function(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),o=0;o{"use strict";function e(t,e){var r,n,i=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)i[n]+=t[4*r+n]*e[r];return i}t.exports=function(t,r){return e(t.projection,e(t.view,e(t.model,[r[0],r[1],r[2],1])))}},85833:(t,e,r)=>{"use strict";var n,i,o=r(31845).gl_plot3d,a=o.createCamera,s=o.createScene,l=r(62945),c=r(17520),d=r(25059),u=r(12822),h=u.preserveDrawingBuffer(),f=r(75815),p=r(70410),m=r(17235),g=r(91203),v=r(40747),b=r(82678),y=r(63306),x=r(1285),w=r(19496).applyAutorangeOptions,_=!1;function k(t,e){var r=document.createElement("div"),n=t.container;this.graphDiv=t.graphDiv;var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.style.position="absolute",i.style.top=i.style.left="0px",i.style.width=i.style.height="100%",i.style["z-index"]=20,i.style["pointer-events"]="none",r.appendChild(i),this.svgContainer=i,r.id=t.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=e,this.id=t.id||"scene",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=b(e,e[this.id]),this.spikeOptions=y(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=this.pixelRatio||t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=d.getComponentMethod("annotations3d","convert"),this.drawAnnotations=d.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var A=k.prototype;A.prepareOptions=function(){var t=this,e={canvas:t.canvas,gl:t.gl,glOptions:{preserveDrawingBuffer:h,premultipliedAlpha:!0,antialias:!0},container:t.container,axes:t.axesOptions,spikes:t.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:t.camera,pixelRatio:t.pixelRatio};if(t.staticMode){if(!(i||(n=document.createElement("canvas"),i=l({canvas:n,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error("error creating static canvas/context for image server");e.gl=i,e.canvas=n}return e};var T=!0;A.tryCreatePlot=function(){var t=this,e=t.prepareOptions(),r=!0;try{t.glplot=s(e)}catch(n){if(t.staticMode||!T||h)r=!1;else{u.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{h=e.glOptions.preserveDrawingBuffer=!0,t.glplot=s(e)}catch(t){h=e.glOptions.preserveDrawingBuffer=!1,r=!1}}}return T=!1,r},A.initializeGLCamera=function(){var t=this,e=t.fullSceneLayout.camera,r="orthographic"===e.projection.type;t.camera=a(t.container,{center:[e.center.x,e.center.y,e.center.z],eye:[e.eye.x,e.eye.y,e.eye.z],up:[e.up.x,e.up.y,e.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})},A.initializeGLPlot=function(){var t=this;if(t.initializeGLCamera(),!t.tryCreatePlot())return g(t);t.traces={},t.make4thDimension();var e=t.graphDiv,r=e.layout,n=function(){var e={};return t.isCameraChanged(r)&&(e[t.id+".camera"]=t.getCamera()),t.isAspectChanged(r)&&(e[t.id+".aspectratio"]=t.glplot.getAspectratio(),"manual"!==r[t.id].aspectmode&&(t.fullSceneLayout.aspectmode=r[t.id].aspectmode=e[t.id+".aspectmode"]="manual")),e},i=function(t){if(!1!==t.fullSceneLayout.dragmode){var e=n();t.saveLayout(r),t.graphDiv.emit("plotly_relayout",e)}};return t.glplot.canvas&&(t.glplot.canvas.addEventListener("mouseup",(function(){i(t)})),t.glplot.canvas.addEventListener("touchstart",(function(){_=!0})),t.glplot.canvas.addEventListener("wheel",(function(r){if(e._context._scrollZoom.gl3d){if(t.camera._ortho){var n=r.deltaX>r.deltaY?1.1:1/1.1,o=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*o.x,y:n*o.y,z:n*o.z})}i(t)}}),!!c&&{passive:!1}),t.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit("plotly_relayouting",e)}})),t.staticMode||t.glplot.canvas.addEventListener("webglcontextlost",(function(r){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},A.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var o=r._fullLayout._invScaleX,a=r._fullLayout._invScaleY,s=i.width*o,l=i.height*a;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),x(e),e.glplot.axes.update(e.axesOptions);for(var c=Object.keys(e.traces),d=null,h=e.glplot.selection,m=0;m")):"isosurface"===t.type||"volume"===t.type?(A.valueLabel=f.hoverLabelText(e._mockAxis,e._mockAxis.d2l(h.traceCoordinate[3]),t.valuehoverformat),C.push("value: "+A.valueLabel),h.textLabel&&C.push(h.textLabel),y=C.join("
")):y=h.textLabel;var E={x:h.traceCoordinate[0],y:h.traceCoordinate[1],z:h.traceCoordinate[2],data:w._input,fullData:w,curveNumber:w.index,pointNumber:k};p.appendArrayPointValue(E,w,k),t._module.eventData&&(E=w._module.eventData(E,h,w,{},k));var L={points:[E]};if(e.fullSceneLayout.hovermode){var z=[];p.loneHover({trace:w,x:(.5+.5*b[0]/b[3])*s,y:(.5-.5*b[1]/b[3])*l,xLabel:A.xLabel,yLabel:A.yLabel,zLabel:A.zLabel,text:y,name:d.name,color:p.castHoverOption(w,k,"bgcolor")||d.color,borderColor:p.castHoverOption(w,k,"bordercolor"),fontFamily:p.castHoverOption(w,k,"font.family"),fontSize:p.castHoverOption(w,k,"font.size"),fontColor:p.castHoverOption(w,k,"font.color"),nameLength:p.castHoverOption(w,k,"namelength"),textAlign:p.castHoverOption(w,k,"align"),hovertemplate:u.castOption(w,k,"hovertemplate"),hovertemplateLabels:u.extendFlat({},E,A),eventData:[E]},{container:n,gd:r,inOut_bbox:z}),E.bbox=z[0]}h.distance<5&&(h.buttons||_)?r.emit("plotly_click",L):r.emit("plotly_hover",L),this.oldEventData=L}else p.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},A.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):u.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(e)};var M=["xaxis","yaxis","zaxis"];function S(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var o=M[i],a=o.charAt(0),s=n[o],l=e[a],c=e[a+"calendar"],d=e["_"+a+"length"];if(u.isArrayOrTypedArray(l))for(var h,f=0;f<(d||l.length);f++)if(u.isArrayOrTypedArray(l[f]))for(var p=0;pv[1][a])v[0][a]=-1,v[1][a]=1;else{var O=v[1][a]-v[0][a];v[0][a]-=O/32,v[1][a]+=O/32}if(x=[v[0][a],v[1][a]],x=w(x,l),v[0][a]=x[0],v[1][a]=x[1],l.isReversed()){var D=v[0][a];v[0][a]=v[1][a],v[1][a]=D}}else x=l.range,v[0][a]=l.r2l(x[0]),v[1][a]=l.r2l(x[1]);v[0][a]===v[1][a]&&(v[0][a]-=1,v[1][a]+=1),b[a]=v[1][a]-v[0][a],l.range=[v[0][a],v[1][a]],l.limitRange(),n.glplot.setBounds(a,{min:l.range[0]*f[a],max:l.range[1]*f[a]})}var I=d.aspectmode;if("cube"===I)g=[1,1,1];else if("manual"===I){var R=d.aspectratio;g=[R.x,R.y,R.z]}else{if("auto"!==I&&"data"!==I)throw new Error("scene.js aspectRatio was not one of the enumerated types");var F=[1,1,1];for(a=0;a<3;++a){var P=y[c=(l=d[M[a]]).type];F[a]=Math.pow(P.acc,1/P.count)/f[a]}g="data"===I||Math.max.apply(null,F)/Math.min.apply(null,F)<=4?F:[1,1,1]}d.aspectratio.x=u.aspectratio.x=g[0],d.aspectratio.y=u.aspectratio.y=g[1],d.aspectratio.z=u.aspectratio.z=g[2],n.glplot.setAspectratio(d.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:d.aspectratio.x,y:d.aspectratio.y,z:d.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=d.aspectmode);var j=d.domain||null,N=e._size||null;if(j&&N){var B=n.container.style;B.position="absolute",B.left=N.l+j.x[0]*N.w+"px",B.top=N.t+(1-j.y[1])*N.h+"px",B.width=N.w*(j.x[1]-j.x[0])+"px",B.height=N.h*(j.y[1]-j.y[0])+"px"}n.glplot.redraw()}},A.destroy=function(){var t=this;t.glplot&&(t.camera.mouseListener.enabled=!1,t.container.removeEventListener("wheel",t.camera.wheelListener),t.camera=null,t.glplot.dispose(),t.container.parentNode.removeChild(t.container),t.glplot=null)},A.getCamera=function(){var t,e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),{up:{x:(t=e.camera).up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]},projection:{type:!0===t._ortho?"orthographic":"perspective"}}},A.setViewport=function(t){var e,r=this,n=t.camera;r.camera.lookAt.apply(this,[[(e=n).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]),r.glplot.setAspectratio(t.aspectratio),"orthographic"===n.projection.type!==r.camera._ortho&&(r.glplot.redraw(),r.glplot.clearRGBA(),r.glplot.dispose(),r.initializeGLPlot())},A.isCameraChanged=function(t){var e=this.getCamera(),r=u.nestedProperty(t,this.id+".camera").get();function n(t,e,r,n){var i=["up","center","eye"],o=["x","y","z"];return e[i[r]]&&t[i[r]][o[n]]===e[i[r]][o[n]]}var i=!1;if(void 0===r)i=!0;else{for(var o=0;o<3;o++)for(var a=0;a<3;a++)if(!n(e,r,o,a)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},A.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=u.nestedProperty(t,this.id+".aspectratio").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},A.saveLayout=function(t){var e,r,n,i,o,a,s=this,l=s.fullLayout,c=s.isCameraChanged(t),h=s.isAspectChanged(t),f=c||h;if(f){var p={};c&&(e=s.getCamera(),n=(r=u.nestedProperty(t,s.id+".camera")).get(),p[s.id+".camera"]=n),h&&(i=s.glplot.getAspectratio(),a=(o=u.nestedProperty(t,s.id+".aspectratio")).get(),p[s.id+".aspectratio"]=a),d.call("_storeDirectGUIEdit",t,l._preGUI,p),c&&(r.set(e),u.nestedProperty(l,s.id+".camera").set(e)),h&&(o.set(i),u.nestedProperty(l,s.id+".aspectratio").set(i),s.glplot.redraw())}return f},A.updateFx=function(t,e){var r=this,n=r.camera;if(n)if("orbit"===t)n.mode="orbit",n.keyBindingMode="rotate";else if("turntable"===t){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,o=i._fullLayout,a=r.fullSceneLayout.camera,s=a.up.x,l=a.up.y,c=a.up.z;if(c/Math.sqrt(s*s+l*l+c*c)<.999){var h=r.id+".camera.up",f={x:0,y:0,z:1},p={};p[h]=f;var m=i.layout;d.call("_storeDirectGUIEdit",m,o._preGUI,p),a.up=f,u.nestedProperty(m,h).set(f)}}else n.keyBindingMode=t;r.fullSceneLayout.hovermode=e},A.toImage=function(t){var e=this;t||(t="png"),e.staticMode&&e.container.appendChild(n),e.glplot.redraw();var r=e.glplot.gl,i=r.drawingBufferWidth,o=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var a=new Uint8Array(i*o*4);r.readPixels(0,0,i,o,r.RGBA,r.UNSIGNED_BYTE,a),function(t,e,r){for(var n=0,i=r-1;n0)for(var s=255/a,l=0;l<3;++l)t[o+l]=Math.min(s*t[o+l],255)}}(a,i,o);var s=document.createElement("canvas");s.width=i,s.height=o;var l,c=s.getContext("2d",{willReadFrequently:!0}),d=c.createImageData(i,o);switch(d.data.set(a),c.putImageData(d,0,0),t){case"jpeg":l=s.toDataURL("image/jpeg");break;case"webp":l=s.toDataURL("image/webp");break;default:l=s.toDataURL("image/png")}return e.staticMode&&e.container.removeChild(n),l},A.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[M[t]];f.setConvert(e,this.fullLayout),e.setScale=u.noop}},A.make4thDimension=function(){var t=this,e=t.graphDiv._fullLayout;t._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},f.setConvert(t._mockAxis,e)},t.exports=k},13195:(t,e,r)=>{"use strict";var n=r(75058),i=r(46367),o=r(84226),a=r(18360),s=r(21422),l=r(85538),c=r(98260).extendFlat,d=n({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});d.family.dflt='"Open Sans", verdana, arial, sans-serif',d.size.dflt=12,d.color.dflt=o.defaultLine,t.exports={font:d,title:{text:{valType:"string",editType:"layoutstyle",description:["Sets the plot's title.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:n({editType:"layoutstyle",description:["Sets the title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle",description:["Sets the x position with respect to `xref` in normalized","coordinates from *0* (left) to *1* (right)."].join(" ")},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle",description:["Sets the y position with respect to `yref` in normalized","coordinates from *0* (bottom) to *1* (top).","*auto* places the baseline of the title onto the","vertical center of the top margin."].join(" ")},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle",description:["Sets the title's horizontal alignment with respect to its x position.","*left* means that the title starts at x,","*right* means that the title ends at x","and *center* means that the title's center is at x.","*auto* divides `xref` by three and calculates the `xanchor`","value automatically based on the value of `x`."].join(" ")},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle",description:["Sets the title's vertical alignment with respect to its y position.","*top* means that the title's cap line is at y,","*bottom* means that the title's baseline is at y","and *middle* means that the title's midline is at y.","*auto* divides `yref` by three and calculates the `yanchor`","value automatically based on the value of `y`."].join(" ")},pad:c(l({editType:"layoutstyle"}),{description:["Sets the padding of the title.","Each padding value only applies when the corresponding","`xanchor`/`yanchor` value is set accordingly. E.g. for left","padding to take effect, `xanchor` must be set to *left*.","The same rule applies if `xanchor`/`yanchor` is determined automatically.","Padding is muted if the respective anchor value is *middle*/*center*."].join(" ")}),automargin:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether the title can automatically push the figure margins.","If `yref='paper'` then the margin will expand to ensure that the title doesn’t","overlap with the edges of the container. If `yref='container'` then the margins","will ensure that the title doesn’t overlap with the plot area, tick labels,","and axis titles. If `automargin=true` and the margins need to be expanded,","then y will be set to a default 1 and yanchor will be set to an appropriate","default to ensure that minimal margin space is needed. Note that when `yref='paper'`,","only 1 or 0 are allowed y values. Invalid values will be reset to the default 1."].join(" ")},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot",description:["Determines how the font size for various text","elements are uniformed between each trace type.","If the computed text sizes were smaller than","the minimum size defined by `uniformtext.minsize`","using *hide* option hides the text; and","using *show* option shows the text without further downscaling.","Please note that if the size defined by `minsize` is greater than","the font size defined by trace, then the `minsize` is used."].join(" ")},minsize:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the minimum text size between traces of the same type."].join(" ")},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none",description:["Determines whether or not a layout width or height","that has been left undefined by the user","is initialized on each relayout.","Note that, regardless of this attribute,","an undefined layout width or height","is always initialized on the first call to plot."].join(" ")},width:{valType:"number",min:10,dflt:700,editType:"plot",description:["Sets the plot's width (in px)."].join(" ")},height:{valType:"number",min:10,dflt:450,editType:"plot",description:["Sets the plot's height (in px)."].join(" ")},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum width of the plot with margin.automargin applied (in px)"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum height of the plot with margin.automargin applied (in px)"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the left margin (in px)."},r:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the right margin (in px)."},t:{valType:"number",min:0,dflt:100,editType:"plot",description:"Sets the top margin (in px)."},b:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the bottom margin (in px)."},pad:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the amount of padding (in px)","between the plotting area and the axis lines"].join(" ")},autoexpand:{valType:"boolean",dflt:!0,editType:"plot",description:["Turns on/off margin expansion computations.","Legends, colorbars, updatemenus, sliders, axis rangeselector and rangeslider","are allowed to push the margins by defaults."].join(" ")},editType:"plot"},computed:{valType:"any",editType:"none",description:["Placeholder for exporting automargin-impacting values namely","`margin.t`, `margin.b`, `margin.l` and `margin.r` in *full-json* mode."].join(" ")},paper_bgcolor:{valType:"color",dflt:o.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:o.background,editType:"layoutstyle",description:["Sets the background color of the plotting area in-between x and y axes."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","This is the default value; however it could be overridden for individual axes."].join(" ")},separators:{valType:"string",editType:"plot",description:["Sets the decimal and thousand separators.","For example, *. * puts a '.' before decimals and a space","between thousands. In English locales, dflt is *.,* but","other locales may alter this default."].join(" ")},hidesources:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether or not a text link citing the data source is","placed at the bottom-right cored of the figure.","Has only an effect only on graphs that have been generated via","forked graphs from the Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise)."].join(" ")},showlegend:{valType:"boolean",editType:"legend",description:["Determines whether or not a legend is drawn.","Default is `true` if there is a trace to show and any of these:","a) Two or more traces would by default be shown in the legend.","b) One pie trace is shown in the legend.","c) One trace is explicitly given with `showlegend: true`."].join(" ")},colorway:{valType:"colorlist",dflt:o.defaults,editType:"calc",description:"Sets the default trace colors."},datarevision:{valType:"any",editType:"calc",description:["If provided, a changed value tells `Plotly.react` that","one or more data arrays has changed. This way you can modify","arrays in-place rather than making a complete new copy for an","incremental change.","If NOT provided, `Plotly.react` assumes that data arrays are","being treated as immutable, thus any data array with a","different identity from its predecessor contains new data."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Used to allow user interactions with the plot to persist after","`Plotly.react` calls that are unaware of these interactions.","If `uirevision` is omitted, or if it is given and it changed from","the previous `Plotly.react` call, the exact new figure is used.","If `uirevision` is truthy and did NOT change, any attribute","that has been affected by user interactions and did not receive a","different value in the new figure will keep the interaction value.","`layout.uirevision` attribute serves as the default for","`uirevision` attributes in various sub-containers. For finer","control you can set these sub-attributes directly. For example,","if your app separately controls the data on the x and y axes you","might set `xaxis.uirevision=*time*` and `yaxis.uirevision=*cost*`.","Then if only the y data is changed, you can update","`yaxis.uirevision=*quantity*` and the y axis range will reset but","the x axis range will retain any user-driven zoom."].join(" ")},editrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in `editable: true`","configuration, other than trace names and axis titles.","Defaults to `layout.uirevision`."].join(" ")},selectionrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in selected points","from all traces."].join(" ")},template:{valType:"any",editType:"calc",description:["Default attributes to be applied to the plot. Templates can be","created from existing plots using `Plotly.makeTemplate`, or","created manually. They should be objects with format:","`{layout: layoutTemplate, data: {[type]: [traceTemplate, ...]}, ...}`","`layoutTemplate` and `traceTemplate` are objects matching the","attribute structure of `layout` and a data trace. ","Trace templates are applied cyclically to traces of each type.","Container arrays (eg `annotations`) have special handling:","An object ending in `defaults` (eg `annotationdefaults`) is applied","to each array item. But if an item has a `templateitemname` key","we look in the template array for an item with matching `name` and","apply that instead. If no matching `name` is found we mark the item","invisible. Any named template item not referenced is appended to","the end of the array, so you can use this for a watermark annotation","or a logo image, for example. To omit one of these items on the plot,","make an item with matching `templateitemname` and `visible: false`."].join(" ")},newshape:a.newshape,activeshape:a.activeshape,newselection:s.newselection,activeselection:s.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information that can be used in various `text` attributes.","Attributes such as the graph, axis and colorbar `title.text`, annotation `text`","`trace.name` in legend items, `rangeselector`, `updatemenus` and `sliders` `label` text","all support `meta`. One can access `meta` fields using template strings:","`%{meta[i]}` where `i` is the index of the `meta`","item in question.","`meta` can also be an object for example `{key: value}` which can be accessed","%{meta[key]}."].join(" ")},transition:c({},i.transition,{description:["Sets transition options used during Plotly.react updates."].join(" "),editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the contents of the title, please use `title.text` now."].join(" ")},titlefont:n({editType:"layoutstyle",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}}},85538:t=>{"use strict";t.exports=function(t){var e=t.editType;return{t:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) along the top of the component."},r:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) on the right side of the component."},b:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) along the bottom of the component."},l:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) on the left side of the component."},editType:e}}},51137:(t,e,r)=>{"use strict";var n=r(27941),i=r(79969).de,o=r(31830).OE,a=r(7370),s=r(44514),l=r(25059),c=r(35852),d=r(46121),u=r(12822),h=r(17499),f=r(32994).BADNUM,p=r(99246),m=r(8867).clearOutline,g=r(49114),v=r(46367),b=r(53874),y=r(47388).eV,x=u.relinkPrivateKeys,w=u._,_=t.exports={};u.extendFlat(_,l),_.attributes=r(3520),_.attributes.type.values=_.allTypes,_.fontAttrs=r(75058),_.layoutAttributes=r(13195);var k=_.transformsRegistry,A=r(74036);_.executeAPICommand=A.executeAPICommand,_.computeAPICommandBindings=A.computeAPICommandBindings,_.manageCommandObserver=A.manageCommandObserver,_.hasSimpleAPICommandBindings=A.hasSimpleAPICommandBindings,_.redrawText=function(t){return t=u.getGraphDiv(t),new Promise((function(e){setTimeout((function(){t._fullLayout&&(l.getComponentMethod("annotations","draw")(t),l.getComponentMethod("legend","draw")(t),l.getComponentMethod("colorbar","draw")(t),e(_.previousPromises(t)))}),300)}))},_.resize=function(t){var e;t=u.getGraphDiv(t);var r=new Promise((function(r,n){t&&!u.isHidden(t)||n(new Error("Resize must be passed a displayed plot div element.")),t._redrawTimer&&clearTimeout(t._redrawTimer),t._resolveResize&&(e=t._resolveResize),t._resolveResize=r,t._redrawTimer=setTimeout((function(){if(!t.layout||t.layout.width&&t.layout.height||u.isHidden(t))r(t);else{delete t.layout.width,delete t.layout.height;var e=t.changed;t.autoplay=!0,l.call("relayout",t,{autosize:!0}).then((function(){t.changed=e,t._resolveResize===r&&(delete t._resolveResize,r(t))}))}}),100)}));return e&&e(r),r},_.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then((function(){t._promises=[]}))},_.addLinks=function(t){if(t._context.showLink||t._context.showSources){var e=t._fullLayout,r=u.ensureSingle(e._paper,"text","js-plot-link-container",(function(t){t.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:h.defaultLine,"pointer-events":"all"}).each((function(){var t=n.select(this);t.append("tspan").classed("js-link-to-tool",!0),t.append("tspan").classed("js-link-spacer",!0),t.append("tspan").classed("js-sourcelinks",!0)}))})),i=r.node(),o={y:e._paper.attr("height")-9};document.body.contains(i)&&i.getComputedTextLength()>=e.width-20?(o["text-anchor"]="start",o.x=5):(o["text-anchor"]="end",o.x=e._paper.attr("width")-7),r.attr(o);var a=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",(function(){_.sendDataToCloud(t)}));else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}(t,a),s.text(a.text()&&l.text()?" - ":"")}},_.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit("plotly_beforeexport");var r=n.select(t).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=_.graphJson(t,!1,"keepdata"),i.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var T=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],M=["year","month","dayMonth","dayMonthYear"];function S(t,e){var r=t._context.locale;r||(r="en-US");var n=!1,i={};function o(t){for(var r=!0,o=0;o1&&I.length>1){for(l.getComponentMethod("grid","sizeDefaults")(c,s),a=0;a15&&I.length>15&&0===s.shapes.length&&0===s.images.length,_.linkSubplots(h,s,d,n),_.cleanPlot(h,s,d,n);var N=!(!n._has||!n._has("gl2d")),B=!(!s._has||!s._has("gl2d")),U=!(!n._has||!n._has("cartesian"))||N,G=!(!s._has||!s._has("cartesian"))||B;U&&!G?n._bgLayer.remove():G&&!U&&(s._shouldCreateBgLayer=!0),n._zoomlayer&&!t._dragging&&m({_fullLayout:n}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i0){var d=1-2*s;n=Math.round(d*n),i=Math.round(d*i)}}var h=_.layoutAttributes.width.min,f=_.layoutAttributes.height.min;n1,m=!e.height&&Math.abs(r.height-i)>1;(m||p)&&(p&&(r.width=n),m&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),_.sanitizeMargins(r)},_.supplyLayoutModuleDefaults=function(t,e,r,n){var i,o,a,s=l.componentsRegistry,c=e._basePlotModules,d=l.subplotsRegistry.cartesian;for(i in s)(a=s[i]).includeBasePlot&&a.includeBasePlot(t,e);for(var h in c.length||c.push(d),e._has("cartesian")&&(l.getComponentMethod("grid","contentDefaults")(t,e),d.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(u.subplotSort);for(o=0;o1&&(r.l/=v,r.r/=v)}if(f){var b=(r.t+r.b)/f;b>1&&(r.t/=b,r.b/=b)}var y=void 0!==r.xl?r.xl:r.x,x=void 0!==r.xr?r.xr:r.x,w=void 0!==r.yt?r.yt:r.y,k=void 0!==r.yb?r.yb:r.y;p[e]={l:{val:y,size:r.l+g},r:{val:x,size:r.r+g},b:{val:k,size:r.b+g},t:{val:w,size:r.t+g}},m[e]=1}else delete p[e],delete m[e];if(!n._replotting)return _.doAutoMargin(t)}},_.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),O(e);var i=e._size,o=e.margin,s={t:0,b:0,l:0,r:0},c=u.extendFlat({},i),d=o.l,h=o.r,f=o.t,m=o.b,g=e._pushmargin,v=e._pushmarginIds,b=e.minreducedwidth,y=e.minreducedheight;if(!1!==o.autoexpand){for(var x in g)v[x]||delete g[x];var w=t._fullLayout._reservedMargin;for(var k in w)for(var A in w[k]){var T=w[k][A];s[A]=Math.max(s[A],T)}for(var M in g.base={l:{val:0,size:d},r:{val:1,size:h},t:{val:1,size:f},b:{val:0,size:m}},s){var S=0;for(var C in g)"base"!==C&&a(g[C][M].size)&&(S=g[C][M].size>S?g[C][M].size:S);var E=Math.max(0,o[M]-S);s[M]=Math.max(0,s[M]-E)}for(var L in g){var z=g[L].l||{},D=g[L].b||{},I=z.val,R=z.size,F=D.val,P=D.size,j=r-s.r-s.l,N=n-s.t-s.b;for(var B in g){if(a(R)&&g[B].r){var U=g[B].r.val,G=g[B].r.size;if(U>I){var V=(R*U+(G-j)*I)/(U-I),H=(G*(1-I)+(R-j)*(1-U))/(U-I);V+H>d+h&&(d=V,h=H)}}if(a(P)&&g[B].t){var W=g[B].t.val,q=g[B].t.size;if(W>F){var Y=(P*W+(q-N)*F)/(W-F),Z=(q*(1-F)+(P-N)*(1-W))/(W-F);Y+Z>m+f&&(m=Y,f=Z)}}}}}var X=u.constrain(r-o.l-o.r,2,b),$=u.constrain(n-o.t-o.b,2,y),J=Math.max(0,r-X),K=Math.max(0,n-$);if(J){var Q=(d+h)/J;Q>1&&(d/=Q,h/=Q)}if(K){var tt=(m+f)/K;tt>1&&(m/=tt,f/=tt)}if(i.l=Math.round(d)+s.l,i.r=Math.round(h)+s.r,i.t=Math.round(f)+s.t,i.b=Math.round(m)+s.b,i.p=Math.round(o.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&(_.didMarginChange(c,i)||function(t){if("_redrawFromAutoMarginCount"in t._fullLayout)return!1;var e=p.list(t,"",!0);for(var r in e)if(e[r].autoshift||e[r].shift)return!0;return!1}(t))){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var et=3*(1+Object.keys(v).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return l.call("redraw",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit("plotly_transitioninterrupted",[])}));var o=0,a=0;function s(){return o++,function(){var e;a++,n||a!==o||(e=i,t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return l.call("redraw",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])})).then(e)))}}r.runFn(s),setTimeout(s())}))}],o=u.syncOrAsync(i,t);return o&&o.then||(o=Promise.resolve()),o.then((function(){return t}))}_.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},_.graphJson=function(t,e,r,n,i,o){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&_.supplyDefaults(t);var a=i?t._fullData:t.data,l=i?t._fullLayout:t.layout,c=(t._transitionData||{})._frames;function d(t,e){if("function"==typeof t)return e?"_function_":null;if(u.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(o){if(-1===["_","["].indexOf(o.charAt(0)))if("function"!=typeof t[o]){if("keepdata"===r){if("src"===o.substr(o.length-3))return}else if("keepstream"===r){if("string"==typeof(n=t[o+"src"])&&n.indexOf(":")>0&&!u.isPlainObject(t.stream))return}else if("keepall"!==r&&"string"==typeof(n=t[o+"src"])&&n.indexOf(":")>0)return;i[o]=d(t[o],e)}else e&&(i[o]="_function")})),i}var o=Array.isArray(t),a=u.isTypedArray(t);if((o||a)&&t.dtype&&t.shape){var l=t.bdata;return d({dtype:t.dtype,shape:t.shape,bdata:u.isArrayBuffer(l)?s.encode(l):l},e)}return o?t.map((function(t){return d(t,e)})):a?u.simpleMap(t,u.identity):u.isJSDate(t)?u.ms2DateTimeLocal(+t):t}var h={data:(a||[]).map((function(t){var r=d(t);return e&&delete r.fit,r}))};if(!e&&(h.layout=d(l),i)){var f=l._size;h.layout.computed={margin:{b:f.b,l:f.l,r:f.r,t:f.t}}}return c&&(h.frames=d(c)),o&&(h.config=d(t._context,!0)),"object"===n?h:JSON.stringify(h)},_.modifyFrames=function(t,e){var r,n,i,o=t._transitionData._frames,a=t._transitionData._frameHash;for(r=0;r=0;o--)if(l[o].enabled){r._indexToPoints=l[o]._indexToPoints;break}n&&n.calc&&(a=n.calc(t,r))}Array.isArray(a)&&a[0]||(a=[{x:f,y:f}]),a[0].t||(a[0].t={}),a[0].trace=r,h[e]=a}}for(F(a,s,d),i=0;i{"use strict";var n=r(12822),i=r(46121),o=r(40365).N;t.exports=function(t,e,r,a){var s,l,c=a.type,d=a.attributes,u=a.handleDefaults,h=a.partition||"x",f=e._subplots[c],p=f.length,m=p&&f[0].replace(/\d+$/,"");function g(t,e){return n.coerce(s,l,d,t,e)}for(var v=0;v{"use strict";var n=r(77201),i=n.FORMAT_LINK,o=n.DATE_FORMAT_LINK;function a(t){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(t&&t.supportOther?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),'Numbers are formatted using d3-format\'s syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".',i,"for details on the formatting syntax.",'Dates are formatted using d3-time-format\'s syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".',o,"for details on the date formatting syntax."].join(" ")}function s(t){var e=t.description?" "+t.description:"",r=t.keys||[];if(r.length>0){for(var n=[],i=0;i` is displayed in the secondary box, for example "{fullData.name}".',"To hide the secondary box completely, use an empty tag ``."].join(" ")};return!1!==t.arrayOk&&(n.arrayOk=!0),n},e.ay=function(t,e){t=t||{};var r=s(e=e||{}),n={valType:"string",dflt:"",editType:t.editType||"calc",description:["Template string used for rendering the information text that appear on points.","Note that this will override `textinfo`.",a(),"Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",r].join(" ")};return!1!==t.arrayOk&&(n.arrayOk=!0),n},e.LF=function(t,e){e=e||{};var r=(t=t||{}).newshape?"new ":"",n=s(e);return{valType:"string",dflt:"",editType:t.editType||"arraydraw",description:["Template string used for rendering the "+r+"shape's label.","Note that this will override `text`.",["Variables are inserted using %{variable},",'for example "x0: %{x0}".','Numbers are formatted using d3-format\'s syntax %{variable:d3-format}, for example "Price: %{x0:$.2f}". See',i,"for details on the formatting syntax.",'Dates are formatted using d3-time-format\'s syntax %{variable|d3-time-format}, for example "Day: %{x0|%m %b %Y}". See',o,"for details on the date formatting syntax.","A single multiplication or division operation may be applied to numeric variables, and combined with",'d3 number formatting, for example "Length in cm: %{x0*2.54}", "%{slope*60:.1f} meters per second."',"For log axes, variable values are given in log units.","For date axes, x/y coordinate variables and center variables use datetimes, while all other variable values use values in ms."].join(" "),n].join(" ")}}},25059:(t,e,r)=>{"use strict";var n=r(64347),i=r(51648),o=r(65280),a=r(12517),s=r(16822).addStyleRule,l=r(98260),c=r(3520),d=r(13195),u=l.extendFlat,h=l.extendDeepAll;function f(t){var r=t.name,i=t.categories,o=t.meta;if(e.modules[r])n.log("Type "+r+" already registered");else{e.subplotsRegistry[t.basePlotModule.name]||function(t){var r=t.name;if(e.subplotsRegistry[r])n.log("Plot type "+r+" already registered.");else for(var i in v(t),e.subplotsRegistry[r]=t,e.componentsRegistry)x(i,t.name)}(t.basePlotModule);for(var a={},l=0;l{"use strict";var n=r(25059),i=r(12822),o=i.extendFlat,a=i.extendDeep;function s(t){var e;switch(t){case"themes__thumb":e={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":e={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:e={}}return e}t.exports=function(t,e){var r,i,l=t.data,c=t.layout,d=a([],l),u=a({},c,s(e.tileClass)),h=t._context||{};if(e.width&&(u.width=e.width),e.height&&(u.height=e.height),"thumbnail"===e.tileClass||"themes__thumb"===e.tileClass){u.annotations=[];var f=Object.keys(u);for(r=0;r-1&&(u[f[r]].title={text:""});for(r=0;r{"use strict";var n=r(12822),i=r(42704),o=r(11148),a=r(13078);t.exports=function(t,e){var r;return n.isPlainObject(t)||(r=n.getGraphDiv(t)),(e=e||{}).format=e.format||"png",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise((function(s,l){r&&r._snapshotInProgress&&l(new Error("Snapshotting already in progress.")),n.isIE()&&"svg"!==e.format&&l(new Error(a.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var c=i(t,e),d=e.filename||t.fn||"newplot";d+="."+e.format.replace("-","."),c.then((function(t){return r&&(r._snapshotInProgress=!1),o(t,d,e.format)})).then((function(t){s(t)})).catch((function(t){r&&(r._snapshotInProgress=!1),l(t)}))}))}},11148:(t,e,r)=>{"use strict";var n=r(12822),i=r(13078);t.exports=function(t,e,r){var o=document.createElement("a"),a="download"in o;return new Promise((function(s,l){var c,d;if(n.isIE())return c=i.createBlob(t,"svg"),window.navigator.msSaveBlob(c,e),c=null,s(e);if(a)return c=i.createBlob(t,r),d=i.createObjectURL(c),o.href=d,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),i.revokeObjectURL(d),c=null,s(e);if(n.isSafari()){var u="svg"===r?",":";base64,";return i.octetStream(u+encodeURIComponent(t)),s(e)}l(new Error("download error"))}))}},13078:(t,e,r)=>{"use strict";var n=r(25059);e.getDelay=function(t){return t._has&&(t._has("gl3d")||t._has("gl2d")||t._has("mapbox"))?500:0},e.getRedrawFunc=function(t){return function(){n.getComponentMethod("colorbar","draw")(t)}},e.encodeSVG=function(t){return"data:image/svg+xml,"+encodeURIComponent(t)},e.encodeJSON=function(t){return"data:application/json,"+encodeURIComponent(t)};var i=window.URL||window.webkitURL;e.createObjectURL=function(t){return i.createObjectURL(t)},e.revokeObjectURL=function(t){return i.revokeObjectURL(t)},e.createBlob=function(t,e){if("svg"===e)return new window.Blob([t],{type:"image/svg+xml;charset=utf-8"});if("full-json"===e)return new window.Blob([t],{type:"application/json;charset=utf-8"});var r=function(t){for(var e=t.length,r=new ArrayBuffer(e),n=new Uint8Array(r),i=0;i{"use strict";var n=r(13078),i={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:r(5041),toSVG:r(48402),svgToImg:r(40241),toImage:r(91117),downloadImage:r(56787)};t.exports=i},40241:(t,e,r)=>{"use strict";var n=r(12822),i=r(86626).EventEmitter,o=r(13078);t.exports=function(t){var e=t.emitter||new i,r=new Promise((function(i,a){var s=window.Image,l=t.svg,c=t.format||"png";if(n.isIE()&&"svg"!==c){var d=new Error(o.MSG_IE_BAD_FORMAT);return a(d),t.promise?r:e.emit("error",d)}var u,h,f=t.canvas,p=t.scale||1,m=t.width||300,g=t.height||150,v=p*m,b=p*g,y=f.getContext("2d",{willReadFrequently:!0}),x=new s;"svg"===c||n.isSafari()?h=o.encodeSVG(l):(u=o.createBlob(l,"svg"),h=o.createObjectURL(u)),f.width=v,f.height=b,x.onload=function(){var r;switch(u=null,o.revokeObjectURL(h),"svg"!==c&&y.drawImage(x,0,0,v,b),c){case"jpeg":r=f.toDataURL("image/jpeg");break;case"png":r=f.toDataURL("image/png");break;case"webp":r=f.toDataURL("image/webp");break;case"svg":r=h;break;default:var n="Image format is not jpeg, png, svg or webp.";if(a(new Error(n)),!t.promise)return e.emit("error",n)}i(r),t.promise||e.emit("success",r)},x.onerror=function(r){if(u=null,o.revokeObjectURL(h),a(r),!t.promise)return e.emit("error",r)},x.src=h}));return t.promise?r:e}},91117:(t,e,r)=>{"use strict";var n=r(86626).EventEmitter,i=r(25059),o=r(12822),a=r(13078),s=r(5041),l=r(48402),c=r(40241);t.exports=function(t,e){var r=new n,d=s(t,{format:"png"}),u=d.gd;u.style.position="absolute",u.style.left="-5000px",document.body.appendChild(u);var h=a.getRedrawFunc(u);return i.call("_doPlot",u,d.data,d.layout,d.config).then(h).then((function(){var t=a.getDelay(u._fullLayout);setTimeout((function(){var t=l(u),n=document.createElement("canvas");n.id=o.randstr(),(r=c({format:e.format,width:u._fullLayout.width,height:u._fullLayout.height,canvas:n,emitter:r,svg:t})).clean=function(){u&&document.body.removeChild(u)}}),t)})).catch((function(t){r.emit("error",t)})),r}},48402:(t,e,r)=>{"use strict";var n=r(27941),i=r(12822),o=r(40666),a=r(17499),s=r(25853),l=/"/g,c="TOBESTRIPPED",d=new RegExp('("'+c+")|("+c+'")',"g");t.exports=function(t,e,r){var u,h=t._fullLayout,f=h._paper,p=h._toppaper,m=h.width,g=h.height;f.insert("rect",":first-child").call(o.setRect,0,0,m,g).call(a.fill,h.paper_bgcolor);var v=h._basePlotModules||[];for(u=0;u")?"":e.html(t).text()}));return e.remove(),r}(_)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(d,"'"),i.isIE()&&(_=(_=(_=_.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),_}},77881:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822).isArrayOrTypedArray,o=r(32994).BADNUM,a=r(25059),s=r(75815),l=r(69352).getAxisGroup,c=r(53481);function d(t,e,r,a,d){if(a.length){var x,w,_,k;switch(function(t,e){var r,o;for(r=0;ru+c||!n(d))}for(var f=0;f{"use strict";t.exports=i;var n=r(12822).distinctVals;function i(t,e){this.traces=t,this.sepNegVal=e.sepNegVal,this.overlapNoMerge=e.overlapNoMerge;for(var r=1/0,i=e.posAxis._id.charAt(0),o=[],a=0;a{"use strict";var n=r(40666),i=r(17499);t.exports=function(t,e,r,o){var a=r.marker.pattern;a&&a.shape?n.pointStyle(t,r,o,e):i.fill(t,e.color)}},17269:(t,e,r)=>{"use strict";var n=r(12822);function i(t){return-1!==t.indexOf("e")?t.replace(/[.]?0+e/,"e"):-1!==t.indexOf(".")?t.replace(/[.]?0+$/,""):t}e.formatPiePercent=function(t,e){var r=i((100*t).toPrecision(3));return n.numSeparate(r,e)+"%"},e.formatPieValue=function(t,e){var r=i(t.toPrecision(10));return n.numSeparate(r,e)},e.getFirstFilled=function(t,e){if(n.isArrayOrTypedArray(t))for(var r=0;r{"use strict";var n=r(17499),i=r(17269).castOption,o=r(44380);t.exports=function(t,e,r,a){var s=r.marker.line,l=i(s.color,e.pts)||n.defaultLine,c=i(s.width,e.pts)||0;t.call(o,e,r,a).style("stroke-width",c).call(n.stroke,l)}},55508:(t,e,r)=>{"use strict";var n=r(12822);t.exports=function(t,e){for(var r=0;r{"use strict";var n=r(60393).axisHoverFormat,i=r(24131).ay,o=r(24131).rb,a=r(89322),s=r(75058),l=r(68057).T,c=r(68057).k,d=r(40666),u=r(32565),h=r(98260).extendFlat,f=r(43591);function p(t){return{valType:"any",dflt:0,editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the period positioning in milliseconds or *M* on the "+t+" axis.","Special values in the form of *M* could be used to declare","the number of months. In this case `n` must be a positive integer."].join(" ")}}function m(t){return{valType:"any",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the base for period positioning in milliseconds or date string on the "+t+" axis.","When `"+t+"period` is round number of weeks,","the `"+t+"period0` by default would be on a Sunday i.e. 2000-01-02,","otherwise it would be at 2000-01-01."].join(" ")}}function g(t){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the alignment of data points on the "+t+" axis."].join(" ")}}t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the x coordinates."},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `x`.","Builds a linear space of x coordinates.","Use with `dx`","where `x0` is the starting coordinate and `dx` the step."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the x coordinate step.","See `x0` for more info."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the y coordinates."},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `y`.","Builds a linear space of y coordinates.","Use with `dy`","where `y0` is the starting coordinate and `dy` the step."].join(" ")},dy:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the y coordinate step.","See `y0` for more info."].join(" ")},xperiod:p("x"),yperiod:p("y"),xperiod0:m("x0"),yperiod0:m("y0"),xperiodalignment:g("x"),yperiodalignment:g("y"),xhoverformat:n("x"),yhoverformat:n("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","offsetgroup where bars of the same position coordinate will line up."].join(" ")},alignmentgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","alignmentgroup. This controls whether bars compute their positional","range dependently or independently."].join(" ")},stackgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several scatter traces (on the same subplot) to the same","stackgroup in order to add their y values (or their x values if","`orientation` is *h*). If blank or omitted this trace will not be","stacked. Stacking also turns `fill` on by default, using *tonexty*","(*tonextx*) if `orientation` is *h* (*v*) and sets the default","`mode` to *lines* irrespective of point count.","You can only stack on a numeric (linear or log) axis.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},orientation:{valType:"enumerated",values:["v","h"],editType:"calc",description:["Only relevant in the following cases:","1. when `scattermode` is set to *group*.","2. when `stackgroup` is used, and only the first","`orientation` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`. Sets the","stacking direction. With *v* (*h*), the y (x) values of subsequent","traces are added. Also affects the default value of `fill`."].join(" ")},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`groupnorm` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Sets the normalization for the sum of this `stackgroup`.","With *fraction*, the value of each trace at each location is","divided by the sum of all trace values at that location.","*percent* is the same but multiplied by 100 to show percentages.","If there are multiple subplots, or multiple `stackgroup`s on one","subplot, each will be normalized within its own set."].join(" ")},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`stackgaps` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Determines how we handle locations at which other traces in this","group have data but this one does not.","With *infer zero* we insert a zero at these locations.","With *interpolate* we linearly interpolate between existing","values, and extrapolate a constant beyond the existing values."].join(" ")},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},texttemplate:i({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc",description:["Determines the drawing mode for this scatter trace.","If the provided `mode` includes *text* then the `text` elements","appear at the coordinates. Otherwise, the `text` elements","appear on hover.","If there are less than "+u.PTS_LINESONLY+" points","and the trace is not stacked","then the default is *lines+markers*. Otherwise, *lines*."].join(" ")},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style",description:["Do the hover effects highlight individual points (markers or","line points) or do they highlight filled regions?","If the fill is *toself* or *tonext* and there are no markers","or text, then the default is *fills*, otherwise it is *points*."].join(" ")},hovertemplate:o({},{keys:u.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0,description:"Sets the line color."},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0,description:"Sets the line width (in px)."},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","With *spline* the lines are drawn using spline interpolation.","The other available values correspond to step-wise line shapes."].join(" ")},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot",description:["Has an effect only if `shape` is set to *spline*","Sets the amount of smoothing.","*0* corresponds to no smoothing (equivalent to a *linear* shape)."].join(" ")},dash:h({},l,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot",description:["Sets the line back off from the end point of the nth line segment (in px).","This option is useful e.g. to avoid overlap with arrowhead markers.","With *auto* the lines would trim before markers if `marker.angleref` is set to *previous*."].join(" ")},simplify:{valType:"boolean",dflt:!0,editType:"plot",description:["Simplifies lines by removing nearly-collinear points. When transitioning","lines, it may be desirable to disable this so that the number of points","along the resulting SVG path is unaffected."].join(" ")},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the provided data arrays are connected."].join(" ")},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines whether or not markers and text nodes","are clipped about the subplot axes.","To show markers and text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc",description:["Sets the area to fill with a solid color.","Defaults to *none* unless this trace is stacked, then it gets","*tonexty* (*tonextx*) if `orientation` is *v* (*h*)","Use with `fillcolor` if not *none*.","*tozerox* and *tozeroy* fill to x=0 and y=0 respectively.","*tonextx* and *tonexty* fill between the endpoints of this","trace and the endpoints of the trace before it, connecting those","endpoints with straight lines (to make a stacked area graph);","if there is no trace before it, they behave like *tozerox* and","*tozeroy*.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},fillcolor:f(!0),fillgradient:h({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc",description:["Sets the type/orientation of the color gradient for the fill.","Defaults to *none*."].join(" ")},start:{valType:"number",editType:"calc",description:["Sets the gradient start value.","It is given as the absolute position on the axis determined by","the orientiation. E.g., if orientation is *horizontal*, the","gradient will be horizontal and start from the x-position","given by start. If omitted, the gradient starts at the lowest","value of the trace along the respective axis.","Ignored if orientation is *radial*."].join(" ")},stop:{valType:"number",editType:"calc",description:["Sets the gradient end value.","It is given as the absolute position on the axis determined by","the orientiation. E.g., if orientation is *horizontal*, the","gradient will be horizontal and end at the x-position","given by end. If omitted, the gradient ends at the highest","value of the trace along the respective axis.","Ignored if orientation is *radial*."].join(" ")},colorscale:{valType:"colorscale",editType:"style",description:["Sets the fill gradient colors as a color scale.","The color scale is interpreted as a gradient","applied in the direction specified by *orientation*,","from the lowest to the highest value of the scatter","plot along that axis, or from the center to the most","distant point from it, if orientation is *radial*."].join(" ")},editType:"calc",description:["Sets a fill gradient.","If not specified, the fillcolor is used instead."].join(" ")}),fillpattern:c,marker:h({symbol:{valType:"enumerated",values:d.symbolList,dflt:"circle",arrayOk:!0,editType:"style",description:["Sets the marker symbol type.","Adding 100 is equivalent to appending *-open* to a symbol name.","Adding 200 is equivalent to appending *-dot* to a symbol name.","Adding 300 is equivalent to appending *-open-dot*","or *dot-open* to a symbol name."].join(" ")},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0,description:"Sets the marker opacity."},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1,description:["Sets the marker angle in respect to `angleref`."].join(" ")},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1,description:["Sets the reference for marker angle.","With *previous*, angle 0 points along the line from the previous point to this one.","With *up*, angle 0 points toward the top of the screen."].join(" ")},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0,description:["Moves the marker away from the data point in the direction of `angle` (in px).","This can be useful for example if you have another marker at this","location and you want to point an arrowhead marker at it."].join(" ")},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0,description:"Sets the marker size (in px)."},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets a maximum number of points to be drawn on the graph.","*0* corresponds to no limit."].join(" ")},sizeref:{valType:"number",dflt:1,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the scale factor used to determine the rendered size of","marker points. Use with `sizemin` and `sizemode`."].join(" ")},sizemin:{valType:"number",min:0,dflt:0,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the minimum size (in px) of the rendered marker points."].join(" ")},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the rule for which the data in `size` is converted","to pixels."].join(" ")},line:h({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0,description:"Sets the width (in px) of the lines bounding the marker points."},editType:"calc"},a("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc",description:["Sets the type of gradient used to fill the markers"].join(" ")},color:{valType:"color",arrayOk:!0,editType:"calc",description:["Sets the final color of the gradient fill:","the center color for radial, the right for horizontal,","or the bottom for vertical."].join(" ")},editType:"calc"},editType:"calc"},a("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of selected points."},color:{valType:"color",editType:"style",description:"Sets the marker color of selected points."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of selected points."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of selected points."},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of unselected points, applied only when a selection exists."},color:{valType:"color",editType:"style",description:"Sets the marker color of unselected points, applied only when a selection exists."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of unselected points, applied only when a selection exists."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of unselected points, applied only when a selection exists."},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc",description:["Sets the positions of the `text` elements","with respects to the (x,y) coordinates."].join(" ")},textfont:s({editType:"calc",colorEditType:"style",arrayOk:!0,description:"Sets the text font."}),zorder:{valType:"integer",dflt:0,editType:"plot",description:["Sets the layer on which this trace is displayed, relative to","other SVG traces on the same subplot. SVG traces with higher `zorder`","appear in front of those with lower `zorder`."].join(" ")}}},93459:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822),o=r(75815),a=r(15389),s=r(32994).BADNUM,l=r(677),c=r(45065),d=r(55508),u=r(58146);function h(t,e,r,n,i,a,s){var c=e._length,d=t._fullLayout,u=r._id,h=n._id,f=d._firstScatter[m(e)]===e.uid,p=(g(e,d,r,n)||{}).orientation,v=e.fill;r._minDtick=0,n._minDtick=0;var b={padded:!0},y={padded:!0};s&&(b.ppad=y.ppad=s);var x=c<2||i[0]!==i[c-1]||a[0]!==a[c-1];x&&("tozerox"===v||"tonextx"===v&&(f||"h"===p))?b.tozero=!0:(e.error_y||{}).visible||"tonexty"!==v&&"tozeroy"!==v&&(l.hasMarkers(e)||l.hasText(e))||(b.padded=!1,b.ppad=0),x&&("tozeroy"===v||"tonexty"===v&&(f||"v"===p))?y.tozero=!0:"tonextx"!==v&&"tozerox"!==v||(y.padded=!1),u&&(e._extremes[u]=o.findExtremes(r,i,b)),h&&(e._extremes[h]=o.findExtremes(n,a,y))}function f(t,e){if(l.hasMarkers(t)){var r,n=t.marker,a=1.6*(t.marker.sizeref||1);if(r="area"===t.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/a),3)}:function(t){return Math.max((t||0)/a,3)},i.isArrayOrTypedArray(n.size)){var s={type:"linear"};o.setConvert(s);for(var c=s.makeCalcdata(t.marker,"size"),d=new Array(e),u=0;ul&&L[v].gap;)v--;for(y=L[v].s,m=L.length-1;m>v;m--)L[m].s=y;for(;l{"use strict";var n=r(12822);t.exports=function(t,e){n.isArrayOrTypedArray(e.selectedpoints)&&n.tagSelected(t,e)}},45065:(t,e,r)=>{"use strict";var n=r(42226).hasColorscale,i=r(62182),o=r(677);t.exports=function(t,e){o.hasLines(e)&&n(e,"line")&&i(t,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),o.hasMarkers(e)&&(n(e,"marker")&&i(t,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),n(e,"marker.line")&&i(t,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}},32565:t=>{"use strict";t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},30888:(t,e,r)=>{"use strict";var n=r(93459),i=r(77881).setGroupPositions;function o(t,e,r,n,i,o,a){i[n]=!0;var s={i:null,gap:!0,s:0};if(s[a]=r,t.splice(e,0,s),e&&r===t[e-1][a]){var l=t[e-1];s.s=l.s,s.i=l.i,s.gap=l.gap}else o&&(s.s=function(t,e,r,n){var i=t[e-1],o=t[e+1];return o?i?i.s+(o.s-i.s)*(r-i[n])/(o[n]-i[n]):o.s:i.s}(t,e,r,a));e||(t[0].t=t[1].t,t[0].trace=t[1].trace,delete t[1].t,delete t[1].trace)}t.exports=function(t,e){"group"===t._fullLayout.scattermode&&function(t,e){for(var r=e.xaxis,n=e.yaxis,o=t._fullLayout,a=t._fullData,s=t.calcdata,l=[],c=[],d=0;dS[u]&&u{"use strict";var n=r(12822),i=r(28104),o=r(98387);t.exports=function(t,e){var r,a,s;function l(t){return n.coerce(a._input,a,o,t)}if("group"===e.scattermode)for(s=0;s=0;u--){var h=t[u];if("scatter"===h.type&&h.xaxis===c.xaxis&&h.yaxis===c.yaxis){h.opacity=void 0;break}}}}}},28724:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059),o=r(98387),a=r(32565),s=r(677),l=r(56666),c=r(45952),d=r(82349),u=r(86277),h=r(51725),f=r(32335),p=r(46574),m=r(12261),g=r(12822).coercePattern;t.exports=function(t,e,r,v){function b(r,i){return n.coerce(t,e,o,r,i)}var y=l(t,e,v,b);if(y||(e.visible=!1),e.visible){c(t,e,v,b),b("xhoverformat"),b("yhoverformat"),b("zorder");var x=d(t,e,v,b);"group"===v.scattermode&&void 0===e.orientation&&b("orientation","v");var w=!x&&y{"use strict";t.exports=function(t){return{valType:"color",editType:"style",anim:!0,description:["Sets the fill color.","Defaults to a half-transparent variant of the line color,","marker color, or marker line color, whichever is available."+(t?" If fillgradient is specified, fillcolor is ignored except for setting the background color of the hover label, if any.":"")].join(" ")}}},12261:(t,e,r)=>{"use strict";var n=r(17499),i=r(12822).isArrayOrTypedArray;t.exports=function(t,e,r,o,a){a||(a={});var s,l=!1;if(e.marker){var c=e.marker.color,d=(e.marker.line||{}).color;c&&!i(c)?l=c:d&&!i(d)&&(l=d)}if(a.moduleHasFillgradient&&"none"!==o("fillgradient.type")){o("fillgradient.start"),o("fillgradient.stop");var u=o("fillgradient.colorscale");u&&(s=function(t){for(var e=n.interpolate(t[0][1],t[1][1],.5),r=2;r{"use strict";var n=r(75815);t.exports=function(t,e,r){var i={},o={_fullLayout:r},a=n.getFromTrace(o,e,"x"),s=n.getFromTrace(o,e,"y"),l=t.orig_x;void 0===l&&(l=t.x);var c=t.orig_y;return void 0===c&&(c=t.y),i.xLabel=n.tickText(a,a.c2l(l),!0).text,i.yLabel=n.tickText(s,s.c2l(c),!0).text,i}},90566:(t,e,r)=>{"use strict";var n=r(17499),i=r(677);t.exports=function(t,e){var r,o;if("lines"===t.mode)return(r=t.line.color)&&n.opacity(r)?r:t.fillcolor;if("none"===t.mode)return t.fill?t.fillcolor:"";var a=e.mcc||(t.marker||{}).color,s=e.mlcc||((t.marker||{}).line||{}).color;return(o=a&&n.opacity(a)?a:s&&n.opacity(s)&&(e.mlw||((t.marker||{}).line||{}).width)?s:"")?n.opacity(o)<.3?n.addOpacity(o,.3):o:(r=(t.line||{}).color)&&n.opacity(r)&&i.hasLines(t)&&t.line.width?r:t.fillcolor}},28104:(t,e,r)=>{"use strict";var n=r(69352).getAxisGroup;t.exports=function(t,e,r,i){var o=e.orientation,a=e[{v:"x",h:"y"}[o]+"axis"],s=n(r,a)+o,l=r._alignmentOpts||{},c=i("alignmentgroup"),d=l[s];d||(d=l[s]={});var u=d[c];u?u.traces.push(e):u=d[c]={traces:[e],alignmentIndex:Object.keys(d).length,offsetGroups:{}};var h=i("offsetgroup"),f=u.offsetGroups,p=f[h];h&&(p||(p=f[h]={offsetIndex:Object.keys(f).length}),e._offsetIndex=p.offsetIndex)}},2686:(t,e,r)=>{"use strict";var n=r(12822),i=r(70410),o=r(25059),a=r(90566),s=r(17499),l=n.fillText;t.exports=function(t,e,r,c){var d=t.cd,u=d[0].trace,h=t.xa,f=t.ya,p=h.c2p(e),m=f.c2p(r),g=[p,m],v=u.hoveron||"",b=-1!==u.mode.indexOf("markers")?3:.5,y=!!u.xperiodalignment,x=!!u.yperiodalignment;if(-1!==v.indexOf("points")){var w=function(t){var e=Math.max(b,t.mrc||0),r=h.c2p(t.x)-p,n=f.c2p(t.y)-m;return Math.max(Math.sqrt(r*r+n*n)-e,1-b/e)},_=i.getDistanceFunction(c,(function(t){if(y){var e=h.c2p(t.xStart),r=h.c2p(t.xEnd);return p>=Math.min(e,r)&&p<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,o=Math.abs(h.c2p(t.x)-p);return o=Math.min(e,r)&&m<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,o=Math.abs(f.c2p(t.y)-m);return or!=(c=i[n][1])>=r&&(a=i[n-1][0],s=i[n][0],c-l&&(o=a+(s-a)*(r-l)/(c-l),u=Math.min(u,o),p=Math.max(p,o)));return{x0:u=Math.max(u,0),x1:p=Math.min(p,h._length),y0:r,y1:r}}(u._polygons);null===O&&(O={x0:g[0],x1:g[0],y0:g[1],y1:g[1]});var D=s.defaultLine;return s.opacity(u.fillcolor)?D=u.fillcolor:s.opacity((u.line||{}).color)&&(D=u.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:O.x0,x1:O.x1,y0:O.y0,y1:O.y1,color:D,hovertemplate:!1}),delete t.index,u.text&&!n.isArrayOrTypedArray(u.text)?t.text=String(u.text):t.text=u.name,[t]}}},56384:(t,e,r)=>{"use strict";var n=r(677);t.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:r(98387),layoutAttributes:r(49114),supplyDefaults:r(28724),crossTraceDefaults:r(30415),supplyLayoutDefaults:r(25229),calc:r(93459).calc,crossTraceCalc:r(30888),arraysToCalcdata:r(55508),plot:r(54461),colorbar:r(89927),formatLabels:r(23315),style:r(21905).style,styleOnSelect:r(21905).styleOnSelect,hoverPoints:r(2686),selectPoints:r(96414),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:r(29592),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{description:["The scatter trace type encompasses line charts, scatter charts, text charts, and bubble charts.","The data visualized as scatter point or lines is set in `x` and `y`.","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}}},49114:t=>{"use strict";t.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc",description:["Determines how scatter points at the same location coordinate","are displayed on the graph.","With *group*, the scatter points are plotted next to one another","centered around the shared location.","With *overlay*, the scatter points are plotted over one another,","you might need to reduce *opacity* to see multiple scatter points."].join(" ")},scattergap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between scatter points of","adjacent location coordinates.","Defaults to `bargap`."].join(" ")}}},25229:(t,e,r)=>{"use strict";var n=r(12822),i=r(49114);t.exports=function(t,e){var r,o="group"===e.barmode;"group"===e.scattermode&&("scattergap",r=o?e.bargap:.2,n.coerce(t,e,i,"scattergap",r))}},51725:(t,e,r)=>{"use strict";var n=r(12822).isArrayOrTypedArray,i=r(42226).hasColorscale,o=r(94461);t.exports=function(t,e,r,a,s,l){l||(l={});var c=(t.marker||{}).color;c&&c._inputArray&&(c=c._inputArray),s("line.color",r),i(t,"line")?o(t,e,a,s,{prefix:"line.",cLetter:"c"}):s("line.color",!n(c)&&c||r),s("line.width"),l.noDash||s("line.dash"),l.backoff&&s("line.backoff")}},22980:(t,e,r)=>{"use strict";var n=r(40666),i=r(32994),o=i.BADNUM,a=i.LOG_CLIP,s=a+.5,l=a-.5,c=r(12822),d=c.segmentsIntersect,u=c.constrain,h=r(32565);t.exports=function(t,e){var r,i,a,f,p,m,g,v,b,y,x,w,_,k,A,T,M,S,C=e.trace||{},E=e.xaxis,L=e.yaxis,z="log"===E.type,O="log"===L.type,D=E._length,I=L._length,R=e.backoff,F=C.marker,P=e.connectGaps,j=e.baseTolerance,N=e.shape,B="linear"===N,U=C.fill&&"none"!==C.fill,G=[],V=h.minTolerance,H=t.length,W=new Array(H),q=0;function Y(r){var n=t[r];if(!n)return!1;var i=e.linearized?E.l2p(n.x):E.c2p(n.x),a=e.linearized?L.l2p(n.y):L.c2p(n.y);if(i===o){if(z&&(i=E.c2p(n.x,!0)),i===o)return!1;O&&a===o&&(i*=Math.abs(E._m*I*(E._m>0?s:l)/(L._m*D*(L._m>0?s:l)))),i*=1e3}if(a===o){if(O&&(a=L.c2p(n.y,!0)),a===o)return!1;a*=1e3}return[i,a]}function Z(t,e,r,n){var i=r-t,o=n-e,a=.5-t,s=.5-e,l=i*i+o*o,c=i*a+o*s;if(c>0&&cat||t[1]lt)return[u(t[0],ot,at),u(t[1],st,lt)]}function ut(t,e){return t[0]===e[0]&&(t[0]===ot||t[0]===at)||t[1]===e[1]&&(t[1]===st||t[1]===lt)||void 0}function ht(t,e,r){return function(n,i){var o=dt(n),a=dt(i),s=[];if(o&&a&&ut(o,a))return s;o&&s.push(o),a&&s.push(a);var l=2*c.constrain((n[t]+i[t])/2,e,r)-((o||n)[t]+(a||i)[t]);return l&&((o&&a?l>0==o[t]>a[t]?o:a:o||a)[t]+=l),s}}function ft(t){var e=t[0],r=t[1],n=e===W[q-1][0],i=r===W[q-1][1];if(!n||!i)if(q>1){var o=e===W[q-2][0],a=r===W[q-2][1];n&&(e===ot||e===at)&&o?a?q--:W[q-1]=t:i&&(r===st||r===lt)&&a?o?q--:W[q-1]=t:W[q++]=t}else W[q++]=t}function pt(t){W[q-1][0]!==t[0]&&W[q-1][1]!==t[1]&&ft([Q,tt]),ft(t),et=null,Q=tt=0}"linear"===N||"spline"===N?nt=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var o=ct[i],a=d(t[0],t[1],e[0],e[1],o[0],o[1],o[2],o[3]);a&&(!n||Math.abs(a.x-r[0][0])>1||Math.abs(a.y-r[0][1])>1)&&(a=[a.x,a.y],n&&$(a,t)<$(r[0],t)?r.unshift(a):r.push(a),n++)}return r}:"hv"===N||"vh"===N?nt=function(t,e){var r=[],n=dt(t),i=dt(e);return n&&i&&ut(n,i)||(n&&r.push(n),i&&r.push(i)),r}:"hvh"===N?nt=ht(0,ot,at):"vhv"===N&&(nt=ht(1,st,lt));var mt=c.isArrayOrTypedArray(F);function gt(e){if(e&&R&&(e.i=r,e.d=t,e.trace=C,e.marker=mt?F[e.i]:F,e.backoff=R),M=e[0]/D,S=e[1]/I,J=e[0]at?at:0,K=e[1]lt?lt:0,J||K){if(q)if(et){var n=nt(et,e);n.length>1&&(pt(n[0]),W[q++]=n[1])}else rt=nt(W[q-1],e)[0],W[q++]=rt;else W[q++]=[J||e[0],K||e[1]];var i=W[q-1];J&&K&&(i[0]!==J||i[1]!==K)?(et&&(Q!==J&&tt!==K?ft(Q&&tt?(o=et,s=(a=e)[0]-o[0],l=(a[1]-o[1])/s,(o[1]*a[0]-a[1]*o[0])/s>0?[l>0?ot:at,lt]:[l>0?at:ot,st]):[Q||J,tt||K]):Q&&tt&&ft([Q,tt])),ft([J,K])):Q-J&&tt-K&&ft([J||Q,K||tt]),et=e,Q=J,tt=K}else et&&pt(nt(et,e)[0]),W[q++]=e;var o,a,s,l}for(r=0;rX(m,vt))break;a=m,(_=b[0]*v[0]+b[1]*v[1])>x?(x=_,f=m,g=!1):_=t.length||!m)break;gt(m),i=m}}else gt(f)}et&&ft([Q||et[0],tt||et[1]]),G.push(W.slice(0,q))}var bt=N.slice(N.length-1);if(R&&"h"!==bt&&"v"!==bt){for(var yt=!1,xt=-1,wt=[],_t=0;_t{"use strict";t.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},57931:t=>{"use strict";var e={tonextx:1,tonexty:1,tonext:1};t.exports=function(t,r,n){var i,o,a,s,l,c={},d=!1,u=-1,h=0,f=-1;for(o=0;o=0?l=f:(l=f=h,h++),l{"use strict";var n=r(7370);t.exports=function(t,e){e||(e=2);var r=t.marker,i=r.sizeref||1,o=r.sizemin||0,a="area"===r.sizemode?function(t){return Math.sqrt(t/i)}:function(t){return t/i};return function(t){var r=a(t/e);return n(r)&&r>0?Math.max(r,o):0}}},89927:t=>{"use strict";t.exports={container:"marker",min:"cmin",max:"cmax"}},86277:(t,e,r)=>{"use strict";var n=r(17499),i=r(42226).hasColorscale,o=r(94461),a=r(677);t.exports=function(t,e,r,s,l,c){var d=a.isBubble(t),u=(t.line||{}).color;c=c||{},u&&(r=u),l("marker.symbol"),l("marker.opacity",d?.7:1),l("marker.size"),c.noAngle||(l("marker.angle"),c.noAngleRef||l("marker.angleref"),c.noStandOff||l("marker.standoff")),l("marker.color",r),i(t,"marker")&&o(t,e,s,l,{prefix:"marker.",cLetter:"c"}),c.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),c.noLine||(l("marker.line.color",u&&!Array.isArray(u)&&e.marker.color!==u?u:d?n.background:n.defaultLine),i(t,"marker.line")&&o(t,e,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",d?1:0)),d&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),c.gradient&&"none"!==l("marker.gradient.type")&&l("marker.gradient.color")}},45952:(t,e,r)=>{"use strict";var n=r(12822).dateTick0,i=r(32994).ONEWEEK;function o(t,e){return n(e,t%i==0?1:0)}t.exports=function(t,e,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var a=n("xperiod");a&&(n("xperiod0",o(a,e.xcalendar)),n("xperiodalignment"))}if(i.y){var s=n("yperiod");s&&(n("yperiod0",o(s,e.ycalendar)),n("yperiodalignment"))}}},54461:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=o.ensureSingle,s=o.identity,l=r(40666),c=r(677),d=r(22980),u=r(57931),h=r(92620).tester;function f(t,e,r,u,f,p,m){var g,v=t._context.staticPlot;!function(t,e,r,i,a){var s=r.xaxis,l=r.yaxis,d=n.extent(o.simpleMap(s.range,s.r2c)),u=n.extent(o.simpleMap(l.range,l.r2c)),h=i[0].trace;if(c.hasMarkers(h)){var f=h.marker.maxdisplayed;if(0!==f){var p=i.filter((function(t){return t.x>=d[0]&&t.x<=d[1]&&t.y>=u[0]&&t.y<=u[1]})),m=Math.ceil(p.length/f),g=0;a.forEach((function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return b?t.transition():t}var x=r.xaxis,w=r.yaxis,_=u[0].trace,k=_.line,A=n.select(p),T=a(A,"g","errorbars"),M=a(A,"g","lines"),S=a(A,"g","points"),C=a(A,"g","text");if(i.getComponentMethod("errorbars","plot")(t,T,r,m),!0===_.visible){var E,L;y(A).style("opacity",_.opacity);var z,O,D=_.fill.charAt(_.fill.length-1);"x"!==D&&"y"!==D&&(D=""),"y"===D?(z=1,O=w.c2p(0,!0)):"x"===D&&(z=0,O=x.c2p(0,!0)),u[0][r.isRangePlot?"nodeRangePlot3":"node3"]=A;var I,R,F="",P=[],j=_._prevtrace,N=null,B=null;j&&(F=j._prevRevpath||"",L=j._nextFill,P=j._ownPolygons,N=j._fillsegments,B=j._fillElement);var U,G,V,H,W,q,Y="",Z="",X=[];_._polygons=[];var $=[],J=[],K=o.noop;if(E=_._ownFill,c.hasLines(_)||"none"!==_.fill){L&&L.datum(u),-1!==["hv","vh","hvh","vhv"].indexOf(k.shape)?(U=l.steps(k.shape),G=l.steps(k.shape.split("").reverse().join(""))):U=G="spline"===k.shape?function(t){var e=t[t.length-1];return t.length>1&&t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),k.smoothing):l.smoothopen(t,k.smoothing)}:function(t){return"M"+t.join("L")},V=function(t){return G(t.reverse())},J=d(u,{xaxis:x,yaxis:w,trace:_,connectGaps:_.connectgaps,baseTolerance:Math.max(k.width||1,3)/4,shape:k.shape,backoff:k.backoff,simplify:k.simplify,fill:_.fill}),$=new Array(J.length);var Q=0;for(g=0;g0,g=u(t,e,r);(d=i.selectAll("g.trace").data(g,(function(t){return t[0].trace.uid}))).enter().append("g").attr("class",(function(t){return"trace scatter trace"+t[0].trace.uid})).style("stroke-miterlimit",2),d.order(),function(t,e,r){e.each((function(e){var i=a(n.select(this),"g","fills");l.setClipUrl(i,r.layerClipId,t);var o=e[0].trace,c=[];o._ownfill&&c.push("_ownFill"),o._nexttrace&&c.push("_nextFill");var d=i.selectAll("g").data(c,s);d.enter().append("g"),d.exit().each((function(t){o[t]=null})).remove(),d.order().each((function(t){o[t]=a(n.select(this),"path","js-fill")}))}))}(t,d,e),m?(c&&(h=c()),n.transition().duration(o.duration).ease(o.easing).each("end",(function(){h&&h()})).each("interrupt",(function(){h&&h()})).each((function(){i.selectAll("g.trace").each((function(r,n){f(t,n,e,r,g,this,o)}))}))):d.each((function(r,n){f(t,n,e,r,g,this,o)})),p&&d.exit().remove(),i.selectAll("path:not([d])").remove()}},96414:(t,e,r)=>{"use strict";var n=r(677);t.exports=function(t,e){var r,i,o,a,s=t.cd,l=t.xaxis,c=t.yaxis,d=[],u=s[0].trace;if(!n.hasMarkers(u)&&!n.hasText(u))return[];if(!1===e)for(r=0;r{"use strict";var e=["orientation","groupnorm","stackgaps"];t.exports=function(t,r,n,i){var o=n._scatterStackOpts,a=i("stackgroup");if(a){var s=r.xaxis+r.yaxis,l=o[s];l||(l=o[s]={});var c=l[a],d=!1;c?c.traces.push(r):(c=l[a]={traceIndices:[],traces:[r]},d=!0);for(var u={orientation:r.x&&!r.y?"h":"v"},h=0;h{"use strict";var n=r(27941),i=r(40666),o=r(25059);function a(t,e,r){i.pointStyle(t.selectAll("path.point"),e,r)}function s(t,e,r){i.textPointStyle(t.selectAll("text"),e,r)}t.exports={style:function(t){var e=n.select(t).selectAll("g.trace.scatter");e.style("opacity",(function(t){return t[0].trace.opacity})),e.selectAll("g.points").each((function(e){a(n.select(this),e.trace||e[0].trace,t)})),e.selectAll("g.text").each((function(e){s(n.select(this),e.trace||e[0].trace,t)})),e.selectAll("g.trace path.js-line").call(i.lineGroupStyle),e.selectAll("g.trace path.js-fill").call(i.fillGroupStyle,t,!1),o.getComponentMethod("errorbars","style")(e)},stylePoints:a,styleText:s,styleOnSelect:function(t,e,r){var n=e[0].trace;n.selectedpoints?(i.selectedPointStyle(r.selectAll("path.point"),n),i.selectedTextStyle(r.selectAll("text"),n)):(a(r,n,t),s(r,n,t))}}},677:(t,e,r)=>{"use strict";var n=r(12822),i=r(98507).isTypedArraySpec;t.exports={hasLines:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf("lines")},hasMarkers:function(t){return t.visible&&(t.mode&&-1!==t.mode.indexOf("markers")||"splom"===t.type)},hasText:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf("text")},isBubble:function(t){var e=t.marker;return n.isPlainObject(e)&&(n.isArrayOrTypedArray(e.size)||i(e.size))}}},46574:(t,e,r)=>{"use strict";var n=r(12822);t.exports=function(t,e,r,i,o){o=o||{},i("textposition"),n.coerceFont(i,"textfont",o.font||r.font,o),o.noSelect||(i("selected.textfont.color"),i("unselected.textfont.color"))}},56666:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059);t.exports=function(t,e,r,o){var a,s=o("x"),l=o("y");if(i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],r),s){var c=n.minRowLength(s);l?a=Math.min(c,n.minRowLength(l)):(a=c,o("y0"),o("dy"))}else{if(!l)return 0;a=n.minRowLength(l),o("x0"),o("dx")}return e._length=a,a}},42674:(t,e,r)=>{"use strict";var n=r(98387),i=r(75058),o=r(89322),a=r(60393).axisHoverFormat,s=r(24131).rb,l=r(24131).ay,c=r(3520),d=r(55697),u=r(24134),h=r(98260).extendFlat,f=r(62309).overrideAll,p=r(54747),m=n.line,g=n.marker,v=g.line,b=h({width:m.width,dash:{valType:"enumerated",values:p(d),dflt:"solid",description:"Sets the dash style of the lines."}},o("line"));function y(t){return{show:{valType:"boolean",dflt:!1,description:["Sets whether or not projections are shown along the",t,"axis."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:"Sets the projection color."},scale:{valType:"number",min:0,max:10,dflt:2/3,description:["Sets the scale factor determining the size of the","projection marker points."].join(" ")}}}var x=t.exports=f({x:n.x,y:n.y,z:{valType:"data_array",description:"Sets the z coordinates."},text:h({},n.text,{description:["Sets text elements associated with each (x,y,z) triplet.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y,z) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")}),texttemplate:l({},{}),hovertext:h({},n.hovertext,{description:["Sets text elements associated with each (x,y,z) triplet.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y,z) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),hovertemplate:s(),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),mode:h({},n.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1,description:["If *-1*, the scatter points are not fill with a surface","If *0*, *1*, *2*, the scatter points are filled with","a Delaunay surface about the x, y, z respectively."].join(" ")},surfacecolor:{valType:"color",description:"Sets the surface fill color."},projection:{x:y("x"),y:y("y"),z:y("z")},connectgaps:n.connectgaps,line:b,marker:h({symbol:{valType:"enumerated",values:p(u),dflt:"circle",arrayOk:!0,description:"Sets the marker symbol type."},size:h({},g.size,{dflt:8}),sizeref:g.sizeref,sizemin:g.sizemin,sizemode:g.sizemode,opacity:h({},g.opacity,{arrayOk:!1,description:["Sets the marker opacity.","Note that the marker opacity for scatter3d traces","must be a scalar value for performance reasons.","To set a blending opacity value","(i.e. which is not transparent), set *marker.color*","to an rgba color and use its alpha channel."].join(" ")}),colorbar:g.colorbar,line:h({width:h({},v.width,{arrayOk:!1})},o("marker.line"))},o("marker")),textposition:h({},n.textposition,{dflt:"top center"}),textfont:i({editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"],description:"Sets the text font."}),opacity:c.opacity,hoverinfo:h({},c.hoverinfo)},"calc","nested");x.x.editType=x.y.editType=x.z.editType="calc+clearAxisTypes"},34670:(t,e,r)=>{"use strict";var n=r(55508),i=r(45065);t.exports=function(t,e){var r=[{x:!1,y:!1,trace:e,t:{}}];return n(r,e),i(t,e),r}},35650:(t,e,r)=>{"use strict";var n=r(25059);function i(t,e,r,i){if(!e||!e.visible)return null;for(var o=n.getComponentMethod("errorbars","makeComputeError")(e),a=new Array(t.length),s=0;s0){var h=i.c2l(d);i._lowerLogErrorBound||(i._lowerLogErrorBound=h),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,h)}}else a[s]=[-l[0]*r,l[1]*r]}return a}t.exports=function(t,e,r){var n=[i(t.x,t.error_x,e[0],r.xaxis),i(t.y,t.error_y,e[1],r.yaxis),i(t.z,t.error_z,e[2],r.zaxis)],o=function(t){for(var e=0;e{"use strict";var n=r(31845).gl_line3d,i=r(31845).gl_scatter3d,o=r(31845).gl_error3d,a=r(31845).gl_mesh3d,s=r(31845).delaunay_triangulate,l=r(12822),c=r(17235),d=r(25069).formatColor,u=r(43710),h=r(55697),f=r(24134),p=r(75815),m=r(66811).appendArrayPointValue,g=r(35650);function v(t,e){this.scene=t,this.uid=e,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var b=v.prototype;function y(t){return null==t?0:t.indexOf("left")>-1?-1:t.indexOf("right")>-1?1:0}function x(t){return null==t?0:t.indexOf("top")>-1?-1:t.indexOf("bottom")>-1?1:0}function w(t,e){return e(4*t)}function _(t){return f[t]}function k(t,e,r,n,i){var o=null;if(l.isArrayOrTypedArray(t)){o=[];for(var a=0;a=0){var C=function(t,e,r){var n,i=(r+1)%3,o=(r+2)%3,a=[],l=[];for(n=0;n{"use strict";var n=r(25059),i=r(12822),o=r(677),a=r(86277),s=r(51725),l=r(46574),c=r(42674);t.exports=function(t,e,r,d){function u(r,n){return i.coerce(t,e,c,r,n)}var h=function(t,e,r,i){var o=0,a=r("x"),s=r("y"),l=r("z");return n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],i),a&&s&&l&&(o=Math.min(a.length,s.length,l.length),e._length=e._xlength=e._ylength=e._zlength=o),o}(t,e,u,d);if(h){u("text"),u("hovertext"),u("hovertemplate"),u("xhoverformat"),u("yhoverformat"),u("zhoverformat"),u("mode"),o.hasMarkers(e)&&a(t,e,r,d,u,{noSelect:!0,noAngle:!0}),o.hasLines(e)&&(u("connectgaps"),s(t,e,r,d,u)),o.hasText(e)&&(u("texttemplate"),l(t,e,d,u,{noSelect:!0}));var f=(e.line||{}).color,p=(e.marker||{}).color;u("surfaceaxis")>=0&&u("surfacecolor",f||p);for(var m=["x","y","z"],g=0;g<3;++g){var v="projection."+m[g];u(v+".show")&&(u(v+".opacity"),u(v+".scale"))}var b=n.getComponentMethod("errorbars","supplyDefaults");b(t,e,f||p||r,{axis:"z"}),b(t,e,f||p||r,{axis:"y",inherit:"z"}),b(t,e,f||p||r,{axis:"x",inherit:"z"})}else e.visible=!1}},46443:(t,e,r)=>{"use strict";t.exports={plot:r(37031),attributes:r(42674),markerSymbols:r(24134),supplyDefaults:r(49957),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:r(34670),moduleType:"trace",name:"scatter3d",basePlotModule:r(98030),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{hrName:"scatter_3d",description:["The data visualized as scatter point or lines in 3D dimension","is set in `x`, `y`, `z`.","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","Projections are achieved via `projection`.","Surface fills are achieved via `surfaceaxis`."].join(" ")}}},77982:(t,e,r)=>{"use strict";var n=r(3520),i=r(75058),o=r(43591),a=r(98387),s=r(60393).axisHoverFormat,l=r(89322),c=r(54747),d=r(98260).extendFlat,u=r(62309).overrideAll,h=r(49538).DASHES,f=a.line,p=a.marker,m=p.line,g=t.exports=u({x:a.x,x0:a.x0,dx:a.dx,y:a.y,y0:a.y0,dy:a.dy,xperiod:a.xperiod,yperiod:a.yperiod,xperiod0:a.xperiod0,yperiod0:a.yperiod0,xperiodalignment:a.xperiodalignment,yperiodalignment:a.yperiodalignment,xhoverformat:s("x"),yhoverformat:s("y"),text:a.text,hovertext:a.hovertext,textposition:a.textposition,textfont:i({editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"],description:"Sets the text font."}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],description:["Determines the drawing mode for this scatter trace."].join(" ")},line:{color:f.color,width:f.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","The values correspond to step-wise line shapes."].join(" ")},dash:{valType:"enumerated",values:c(h),dflt:"solid",description:"Sets the style of the lines."}},marker:d({},l("marker"),{symbol:p.symbol,angle:p.angle,size:p.size,sizeref:p.sizeref,sizemin:p.sizemin,sizemode:p.sizemode,opacity:p.opacity,colorbar:p.colorbar,line:d({},l("marker.line"),{width:m.width})}),connectgaps:a.connectgaps,fill:d({},a.fill,{dflt:"none"}),fillcolor:o(),selected:{marker:a.selected.marker,textfont:a.selected.textfont},unselected:{marker:a.unselected.marker,textfont:a.unselected.textfont},opacity:n.opacity},"calc","nested");g.x.editType=g.y.editType=g.x0.editType=g.y0.editType="calc+clearAxisTypes",g.hovertemplate=a.hovertemplate,g.texttemplate=a.texttemplate},78737:(t,e,r)=>{"use strict";var n=r(88625);t.exports={moduleType:"trace",name:"scattergl",basePlotModule:r(29592),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:r(77982),supplyDefaults:r(51465),crossTraceDefaults:r(30415),colorbar:r(89927),formatLabels:r(18948),calc:r(54874),hoverPoints:n.hoverPoints,selectPoints:r(76787),meta:{hrName:"scatter_gl",description:["The data visualized as scatter point or lines is set in `x` and `y`","using the WebGL plotting engine.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to a numerical arrays."].join(" ")}}},54874:(t,e,r)=>{"use strict";var n=r(4832),i=r(12822),o=r(99246),a=r(19496).findExtremes,s=r(15389),l=r(93459),c=l.calcMarkerSize,d=l.calcAxisExpansion,u=l.setFirstScatter,h=r(45065),f=r(77064),p=r(7111),m=r(32994).BADNUM,g=r(49538).TOO_MANY_POINTS;function v(t,e,r){var n=t._extremes[e._id],i=a(e,r._bnds,{padded:!0});n.min=n.min.concat(i.min),n.max=n.max.concat(i.max)}t.exports=function(t,e){var r,a=t._fullLayout,l=e._xA=o.getFromId(t,e.xaxis,"x"),b=e._yA=o.getFromId(t,e.yaxis,"y"),y=a._plots[e.xaxis+e.yaxis],x=e._length,w=x>=g,_=2*x,k={},A=l.makeCalcdata(e,"x"),T=b.makeCalcdata(e,"y"),M=s(e,l,"x",A),S=s(e,b,"y",T),C=M.vals,E=S.vals;e._x=C,e._y=E,e.xperiodalignment&&(e._origX=A,e._xStarts=M.starts,e._xEnds=M.ends),e.yperiodalignment&&(e._origY=T,e._yStarts=S.starts,e._yEnds=S.ends);var L=new Array(_),z=new Array(x);for(r=0;r1&&i.extendFlat(s.line,f.linePositions(t,r,n)),s.errorX||s.errorY){var l=f.errorBarPositions(t,r,n,o,a);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}return s.text&&(i.extendFlat(s.text,{positions:n},f.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},f.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},f.textPosition(t,r,s.text,s.markerUnsel))),s}(t,0,e,L,C,E),I=p(t,y);return u(a,e),w?D.marker&&(O=D.marker.sizeAvg||Math.max(D.marker.size,3)):O=c(e,x),d(t,e,l,b,C,E,O),D.errorX&&v(e,l,D.errorX),D.errorY&&v(e,b,D.errorY),D.fill&&!I.fill2d&&(I.fill2d=!0),D.marker&&!I.scatter2d&&(I.scatter2d=!0),D.line&&!I.line2d&&(I.line2d=!0),!D.errorX&&!D.errorY||I.error2d||(I.error2d=!0),D.text&&!I.glText&&(I.glText=!0),D.marker&&(D.marker.snap=x),I.lineOptions.push(D.line),I.errorXOptions.push(D.errorX),I.errorYOptions.push(D.errorY),I.fillOptions.push(D.fill),I.markerOptions.push(D.marker),I.markerSelectedOptions.push(D.markerSel),I.markerUnselectedOptions.push(D.markerUnsel),I.textOptions.push(D.text),I.textSelectedOptions.push(D.textSel),I.textUnselectedOptions.push(D.textUnsel),I.selectBatch.push([]),I.unselectBatch.push([]),k._scene=I,k.index=I.count,k.x=C,k.y=E,k.positions=L,I.count++,[{x:!1,y:!1,t:k,trace:e}]}},49538:t=>{"use strict";t.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},77064:(t,e,r)=>{"use strict";var n=r(7370),i=r(77622),o=r(34463),a=r(25059),s=r(12822),l=s.isArrayOrTypedArray,c=r(40666),d=r(99246),u=r(25069).formatColor,h=r(677),f=r(43710),p=r(91886),m=r(49538),g=r(11891).DESELECTDIM,v={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},b=r(66811).appendArrayPointValue;function y(t,e){var r,i=t._fullLayout,o=e._length,a=e.textfont,c=e.textposition,d=l(c)?c:[c],u=a.color,h=a.size,f=a.family,p=a.weight,m=a.style,g=a.variant,v={},y=t._context.plotGlPixelRatio,x=e.texttemplate;if(x){v.text=[];var w=i._d3locale,_=Array.isArray(x),k=_?Math.min(x.length,o):o,A=_?function(t){return x[t]}:function(){return x};for(r=0;rm.TOO_MANY_POINTS||h.hasMarkers(e)?"rect":"round";if(c&&e.connectgaps){var u=n[0],f=n[1];for(i=0;i1?c[i]:c[0]:c,m=l(d)?d.length>1?d[i]:d[0]:d,g=v[p],b=v[m],y=u?u/.8+1:0,x=-b*y-.5*b;a.offset[i]=[g*y/f,x/f]}}return a}}},51465:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059),o=r(91886),a=r(77982),s=r(32565),l=r(677),c=r(56666),d=r(45952),u=r(86277),h=r(51725),f=r(12261),p=r(46574);t.exports=function(t,e,r,m){function g(r,i){return n.coerce(t,e,a,r,i)}var v=!!t.marker&&o.isOpenSymbol(t.marker.symbol),b=l.isBubble(t),y=c(t,e,m,g);if(y){d(t,e,m,g),g("xhoverformat"),g("yhoverformat");var x=y{"use strict";var n=r(12822),i=r(17499),o=r(11891).DESELECTDIM;t.exports={styleTextSelection:function(t){var e,r,a=t[0],s=a.trace,l=a.t,c=l._scene,d=l.index,u=c.selectBatch[d],h=c.unselectBatch[d],f=c.textOptions[d],p=c.textSelectedOptions[d]||{},m=c.textUnselectedOptions[d]||{},g=n.extendFlat({},f);if(u.length||h.length){var v=p.color,b=m.color,y=f.color,x=n.isArrayOrTypedArray(y);for(g.color=new Array(s._length),e=0;e{"use strict";var n=r(23315);t.exports=function(t,e,r){var i=t.i;return"x"in t||(t.x=e._x[i]),"y"in t||(t.y=e._y[i]),n(t,e,r)}},91886:(t,e,r)=>{"use strict";var n=r(49538);e.isOpenSymbol=function(t){return"string"==typeof t?n.OPEN_RE.test(t):t%200>100},e.isDotSymbol=function(t){return"string"==typeof t?n.DOT_RE.test(t):t>200}},88625:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822),o=r(90566);function a(t,e,r,a){var s=t.xa,l=t.ya,c=t.distance,d=t.dxy,u=t.index,h={pointNumber:u,x:e[u],y:r[u]};h.tx=i.isArrayOrTypedArray(a.text)?a.text[u]:a.text,h.htx=Array.isArray(a.hovertext)?a.hovertext[u]:a.hovertext,h.data=Array.isArray(a.customdata)?a.customdata[u]:a.customdata,h.tp=Array.isArray(a.textposition)?a.textposition[u]:a.textposition;var f=a.textfont;f&&(h.ts=i.isArrayOrTypedArray(f.size)?f.size[u]:f.size,h.tc=i.isArrayOrTypedArray(f.color)?f.color[u]:f.color,h.tf=Array.isArray(f.family)?f.family[u]:f.family,h.tw=Array.isArray(f.weight)?f.weight[u]:f.weight,h.ty=Array.isArray(f.style)?f.style[u]:f.style,h.tv=Array.isArray(f.variant)?f.variant[u]:f.variant);var p=a.marker;p&&(h.ms=i.isArrayOrTypedArray(p.size)?p.size[u]:p.size,h.mo=i.isArrayOrTypedArray(p.opacity)?p.opacity[u]:p.opacity,h.mx=i.isArrayOrTypedArray(p.symbol)?p.symbol[u]:p.symbol,h.ma=i.isArrayOrTypedArray(p.angle)?p.angle[u]:p.angle,h.mc=i.isArrayOrTypedArray(p.color)?p.color[u]:p.color);var m=p&&p.line;m&&(h.mlc=Array.isArray(m.color)?m.color[u]:m.color,h.mlw=i.isArrayOrTypedArray(m.width)?m.width[u]:m.width);var g=p&&p.gradient;g&&"none"!==g.type&&(h.mgt=Array.isArray(g.type)?g.type[u]:g.type,h.mgc=Array.isArray(g.color)?g.color[u]:g.color);var v=s.c2p(h.x,!0),b=l.c2p(h.y,!0),y=h.mrc||1,x=a.hoverlabel;x&&(h.hbg=Array.isArray(x.bgcolor)?x.bgcolor[u]:x.bgcolor,h.hbc=Array.isArray(x.bordercolor)?x.bordercolor[u]:x.bordercolor,h.hts=i.isArrayOrTypedArray(x.font.size)?x.font.size[u]:x.font.size,h.htc=Array.isArray(x.font.color)?x.font.color[u]:x.font.color,h.htf=Array.isArray(x.font.family)?x.font.family[u]:x.font.family,h.hnl=i.isArrayOrTypedArray(x.namelength)?x.namelength[u]:x.namelength);var w=a.hoverinfo;w&&(h.hi=Array.isArray(w)?w[u]:w);var _=a.hovertemplate;_&&(h.ht=Array.isArray(_)?_[u]:_);var k={};k[t.index]=h;var A=a._origX,T=a._origY,M=i.extendFlat({},t,{color:o(a,h),x0:v-y,x1:v+y,xLabelVal:A?A[u]:h.x,y0:b-y,y1:b+y,yLabelVal:T?T[u]:h.y,cd:k,distance:c,spikeDistance:d,hovertemplate:h.ht});return h.htx?M.text=h.htx:h.tx?M.text=h.tx:a.text&&(M.text=a.text),i.fillText(h,a,M),n.getComponentMethod("errorbars","hoverInfo")(h,a,M),M}t.exports={hoverPoints:function(t,e,r,n){var i,o,s,l,c,d,u,h,f,p,m=t.cd,g=m[0].t,v=m[0].trace,b=t.xa,y=t.ya,x=g.x,w=g.y,_=b.c2p(e),k=y.c2p(r),A=t.distance;if(g.tree){var T=b.p2c(_-A),M=b.p2c(_+A),S=y.p2c(k-A),C=y.p2c(k+A);i="x"===n?g.tree.range(Math.min(T,M),Math.min(y._rl[0],y._rl[1]),Math.max(T,M),Math.max(y._rl[0],y._rl[1])):g.tree.range(Math.min(T,M),Math.min(S,C),Math.max(T,M),Math.max(S,C))}else i=g.ids;var E=A;if("x"===n){var L=!!v.xperiodalignment,z=!!v.yperiodalignment;for(d=0;d=Math.min(O,D)&&_<=Math.max(O,D)?0:1/0}if(u=Math.min(I,R)&&k<=Math.max(I,R)?0:1/0}p=Math.sqrt(u*u+h*h),s=i[d]}}}else for(d=i.length-1;d>-1;d--)l=x[o=i[d]],c=w[o],u=b.c2p(l)-_,h=y.c2p(c)-k,(f=Math.sqrt(u*u+h*h)){"use strict";var n=r(78737);n.plot=r(96360),t.exports=n},96360:(t,e,r)=>{"use strict";var n=r(51645),i=r(98331),o=r(86373),a=r(69499),s=r(12822),l=r(14295).selectMode,c=r(41246),d=r(677),u=r(57931),h=r(4673).styleTextSelection,f={};function p(t,e,r,n){var i=t._size,o=t.width*n,a=t.height*n,s=i.l*n,l=i.b*n,c=i.r*n,d=i.t*n,u=i.w*n,h=i.h*n;return[s+e.domain[0]*u,l+r.domain[0]*h,o-c-(1-e.domain[1])*u,a-d-(1-r.domain[1])*h]}(t.exports=function(t,e,r){if(r.length){var m,g,v=t._fullLayout,b=e._scene,y=e.xaxis,x=e.yaxis;if(b)if(c(t,["ANGLE_instanced_arrays","OES_element_index_uint"],f)){var w=b.count,_=v._glcanvas.data()[0].regl;if(u(t,e,r),b.dirty){if(!b.line2d&&!b.error2d||b.scatter2d||b.fill2d||b.glText||_.clear({}),!0===b.error2d&&(b.error2d=o(_)),!0===b.line2d&&(b.line2d=i(_)),!0===b.scatter2d&&(b.scatter2d=n(_)),!0===b.fill2d&&(b.fill2d=i(_)),!0===b.glText)for(b.glText=new Array(w),m=0;mb.glText.length){var k=w-b.glText.length;for(m=0;mr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t})),b.line2d.update(b.lineOptions)),b.error2d){var T=(b.errorXOptions||[]).concat(b.errorYOptions||[]);b.error2d.update(T)}b.scatter2d&&b.scatter2d.update(b.markerOptions),b.fillOrder=s.repeat(null,w),b.fill2d&&(b.fillOptions=b.fillOptions.map((function(t,e){var n=r[e];if(t&&n&&n[0]&&n[0].trace){var i,o,a=n[0],s=a.trace,l=a.t,c=b.lineOptions[e],d=[];s._ownfill&&d.push(e),s._nexttrace&&d.push(e+1),d.length&&(b.fillOrder[e]=d);var u,h,f=[],p=c&&c.positions||l.positions;if("tozeroy"===s.fill){for(u=0;uu&&isNaN(p[h+1]);)h-=2;0!==p[u+1]&&(f=[p[u],0]),f=f.concat(p.slice(u,h+2)),0!==p[h+1]&&(f=f.concat([p[h],0]))}else if("tozerox"===s.fill){for(u=0;uu&&isNaN(p[h]);)h-=2;0!==p[u]&&(f=[0,p[u+1]]),f=f.concat(p.slice(u,h+2)),0!==p[h]&&(f=f.concat([0,p[h+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(f=[],i=0,t.splitNull=!0,o=0;o-1;for(m=0;m{"use strict";var n=r(12822);t.exports=function(t,e){var r=e._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},o={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return e._scene||((r=e._scene={}).init=function(){n.extendFlat(r,o,i)},r.init(),r.update=function(t){var e=n.repeat(t,r.count);if(r.fill2d&&r.fill2d.update(e),r.scatter2d&&r.scatter2d.update(e),r.line2d&&r.line2d.update(e),r.error2d&&r.error2d.update(e.concat(e)),r.select2d&&r.select2d.update(e),r.glText)for(var i=0;i{"use strict";var n=r(677),i=r(4673).styleTextSelection;t.exports=function(t,e){var r=t.cd,o=t.xaxis,a=t.yaxis,s=[],l=r[0].trace,c=r[0].t,d=l._length,u=c.x,h=c.y,f=c._scene,p=c.index;if(!f)return s;var m=n.hasText(l),g=n.hasMarkers(l),v=!g&&!m;if(!0!==l.visible||v)return s;var b=[],y=[];if(!1!==e&&!e.degenerate)for(var x=0;x{"use strict";e.version="2.32.0"},31845:(t,e,r)=>{var n=r(39807);!function(){var e={1964:function(t,e,r){t.exports={alpha_shape:r(3502),convex_hull:r(7352),delaunay_triangulate:r(7642),gl_cone3d:r(6405),gl_error3d:r(9165),gl_heatmap2d:r(2510),gl_line3d:r(5714),gl_mesh3d:r(7201),gl_plot2d:r(1850),gl_plot3d:r(4100),gl_pointcloud2d:r(4696),gl_scatter3d:r(8418),gl_select_box:r(3161),gl_spikes2d:r(4098),gl_streamtube3d:r(7815),gl_surface3d:r(9499),ndarray:r(9618),ndarray_linear_interpolate:r(4317)}},4793:function(t,e,r){"use strict";function n(t,e){for(var r=0;rh)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,p.prototype),e}function p(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return v(t)}return m(t,e,r)}function m(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!p.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|w(t,e),n=f(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(et(t,Uint8Array)){var e=new Uint8Array(t);return y(e.buffer,e.byteOffset,e.byteLength)}return b(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(t));if(et(t,ArrayBuffer)||t&&et(t.buffer,ArrayBuffer))return y(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(et(t,SharedArrayBuffer)||t&&et(t.buffer,SharedArrayBuffer)))return y(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return p.from(n,e,r);var i=function(t){if(p.isBuffer(t)){var e=0|x(t.length),r=f(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||rt(t.length)?f(0):b(t):"Buffer"===t.type&&Array.isArray(t.data)?b(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return p.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(t))}function g(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function v(t){return g(t),f(t<0?0:0|x(t))}function b(t){for(var e=t.length<0?0:0|x(t.length),r=f(e),n=0;n=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return 0|t}function w(t,e){if(p.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||et(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+l(t));var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Q(t).length;default:if(i)return n?-1:K(t).length;e=(""+e).toLowerCase(),i=!0}}function _(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return F(this,e,r);case"utf8":case"utf-8":return O(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return z(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function k(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function A(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),rt(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=p.from(e,n)),p.isBuffer(e))return 0===e.length?-1:T(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):T(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function T(t,e,r,n,i){var o,a=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var d=-1;for(o=r;os&&(r=s-l),o=r;o>=0;o--){for(var u=!0,h=0;hi&&(n=i):n=i;var o,a=e.length;for(n>a/2&&(n=a/2),o=0;o>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function z(t,e,r){return 0===e&&r===t.length?c.fromByteArray(t):c.fromByteArray(t.slice(e,r))}function O(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:o>223?3:o>191?2:1;if(i+s<=r){var l=void 0,c=void 0,d=void 0,u=void 0;switch(s){case 1:o<128&&(a=o);break;case 2:128==(192&(l=t[i+1]))&&(u=(31&o)<<6|63&l)>127&&(a=u);break;case 3:l=t[i+1],c=t[i+2],128==(192&l)&&128==(192&c)&&(u=(15&o)<<12|(63&l)<<6|63&c)>2047&&(u<55296||u>57343)&&(a=u);break;case 4:l=t[i+1],c=t[i+2],d=t[i+3],128==(192&l)&&128==(192&c)&&128==(192&d)&&(u=(15&o)<<18|(63&l)<<12|(63&c)<<6|63&d)>65535&&u<1114112&&(a=u)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return function(t){var e=t.length;if(e<=D)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn.length?(p.isBuffer(o)||(o=p.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else{if(!p.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},p.byteLength=w,p.prototype._isBuffer=!0,p.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;er&&(t+=" ... "),""},u&&(p.prototype[u]=p.prototype.inspect),p.prototype.compare=function(t,e,r,n,i){if(et(t,Uint8Array)&&(t=p.from(t,t.offset,t.byteLength)),!p.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+l(t));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),c=this.slice(n,i),d=t.slice(e,r),u=0;u>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return M(this,t,e,r);case"utf8":case"utf-8":return S(this,t,e,r);case"ascii":case"latin1":case"binary":return C(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function N(t,e,r,n,i,o){if(!p.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function B(t,e,r,n,i){Z(e,n,i,t,r,7);var o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;var a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function U(t,e,r,n,i){Z(e,n,i,t,r,7);var o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;var a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function G(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function V(t,e,r,n,i){return e=+e,r>>>=0,i||G(t,0,r,4),d.write(t,e,r,n,23,4),r+4}function H(t,e,r,n,i){return e=+e,r>>>=0,i||G(t,0,r,8),d.write(t,e,r,n,52,8),r+8}p.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||j(t,e,this.length);for(var n=this[t],i=1,o=0;++o>>=0,e>>>=0,r||j(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},p.prototype.readUint8=p.prototype.readUInt8=function(t,e){return t>>>=0,e||j(t,1,this.length),this[t]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(t,e){return t>>>=0,e||j(t,2,this.length),this[t]|this[t+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(t,e){return t>>>=0,e||j(t,2,this.length),this[t]<<8|this[t+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(t,e){return t>>>=0,e||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(t,e){return t>>>=0,e||j(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},p.prototype.readBigUInt64LE=it((function(t){X(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);var n=e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24),i=this[++t]+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+r*Math.pow(2,24);return BigInt(n)+(BigInt(i)<>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);var n=e*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t],i=this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+r;return(BigInt(n)<>>=0,e>>>=0,r||j(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},p.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||j(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},p.prototype.readInt8=function(t,e){return t>>>=0,e||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},p.prototype.readInt16LE=function(t,e){t>>>=0,e||j(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},p.prototype.readInt16BE=function(t,e){t>>>=0,e||j(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},p.prototype.readInt32LE=function(t,e){return t>>>=0,e||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},p.prototype.readInt32BE=function(t,e){return t>>>=0,e||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},p.prototype.readBigInt64LE=it((function(t){X(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);var n=this[t+4]+this[t+5]*Math.pow(2,8)+this[t+6]*Math.pow(2,16)+(r<<24);return(BigInt(n)<>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);var n=(e<<24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t];return(BigInt(n)<>>=0,e||j(t,4,this.length),d.read(this,t,!0,23,4)},p.prototype.readFloatBE=function(t,e){return t>>>=0,e||j(t,4,this.length),d.read(this,t,!1,23,4)},p.prototype.readDoubleLE=function(t,e){return t>>>=0,e||j(t,8,this.length),d.read(this,t,!0,52,8)},p.prototype.readDoubleBE=function(t,e){return t>>>=0,e||j(t,8,this.length),d.read(this,t,!1,52,8)},p.prototype.writeUintLE=p.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||N(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,n||N(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},p.prototype.writeUint8=p.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,1,255,0),this[e]=255&t,e+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},p.prototype.writeBigUInt64LE=it((function(t){return B(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeBigUInt64BE=it((function(t){return U(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);N(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>>=0,!n){var i=Math.pow(2,8*r-1);N(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a|0)-s&255;return e+r},p.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},p.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},p.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},p.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},p.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},p.prototype.writeBigInt64LE=it((function(t){return B(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeBigInt64BE=it((function(t){return U(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeFloatLE=function(t,e,r){return V(this,t,e,!0,r)},p.prototype.writeFloatBE=function(t,e,r){return V(this,t,e,!1,r)},p.prototype.writeDoubleLE=function(t,e,r){return H(this,t,e,!0,r)},p.prototype.writeDoubleBE=function(t,e,r){return H(this,t,e,!1,r)},p.prototype.copy=function(t,e,r,n){if(!p.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o=n+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function Z(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(o+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(o+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(o+1)-1).concat(s):">= ".concat(e).concat(s," and <= ").concat(r).concat(s),new W.ERR_OUT_OF_RANGE("value",a,t)}!function(t,e,r){X(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||$(e,t.length-(r+1))}(n,i,o)}function X(t,e){if("number"!=typeof t)throw new W.ERR_INVALID_ARG_TYPE(e,"number",t)}function $(t,e,r){if(Math.floor(t)!==t)throw X(t,r),new W.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new W.ERR_BUFFER_OUT_OF_BOUNDS;throw new W.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(e),t)}q("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),q("ERR_INVALID_ARG_TYPE",(function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(l(e))}),TypeError),q("ERR_OUT_OF_RANGE",(function(t,e,r){var n='The value of "'.concat(t,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>Math.pow(2,32)?i=Y(String(r)):"bigint"==typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=Y(i)),i+="n"),n+" It must be ".concat(e,". Received ").concat(i)}),RangeError);var J=/[^+/0-9A-Za-z-_]/g;function K(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Q(t){return c.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(J,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function tt(t,e,r,n){var i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function et(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function rt(t){return t!=t}var nt=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}();function it(t){return"undefined"==typeof BigInt?ot:t}function ot(){throw new Error("BigInt not supported")}},9216:function(t){"use strict";t.exports=i,t.exports.isMobile=i,t.exports.default=i;var e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(t){t||(t={});var i=t.ua;if(i||"undefined"==typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"==typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!=typeof i)return!1;var o=e.test(i)&&!r.test(i)||!!t.tablet&&n.test(i);return!o&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(o=!0),o}},6296:function(t,e,r){"use strict";t.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],c=t.mode||"turntable",d=n(),u=i(),h=o();return d.setDistanceLimits(l[0],l[1]),d.lookAt(0,e,r,s),u.setDistanceLimits(l[0],l[1]),u.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),new a({turntable:d,orbit:u,matrix:h},c)};var n=r(7261),i=r(9977),o=r(4192);function a(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map((function(e){return t[e]})),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=a.prototype;s.flush=function(t){for(var e=this._controllerList,r=0;r0?a-4:a;for(r=0;r>16&255,c[d++]=e>>8&255,c[d++]=255&e;return 2===l&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[d++]=255&e),1===l&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[d++]=e>>8&255,c[d++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,n){for(var i,o,a=[],s=e;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},3865:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},1318:function(t){"use strict";t.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},8697:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},7842:function(t,e,r){"use strict";var n=r(6330),i=r(1533),o=r(2651),a=r(4387),s=r(869),l=r(8697);t.exports=function t(e,r){if(n(e))return r?l(e,t(r)):[e[0].clone(),e[1].clone()];var c,d,u=0;if(i(e))c=e.clone();else if("string"==typeof e)c=a(e);else{if(0===e)return[o(0),o(1)];if(e===Math.floor(e))c=o(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),u-=256;c=o(e)}}if(n(r))c.mul(r[1]),d=r[0].clone();else if(i(r))d=r.clone();else if("string"==typeof r)d=a(r);else if(r)if(r===Math.floor(r))d=o(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),u+=256;d=o(r)}else d=o(1);return u>0?c=c.ushln(u):u<0&&(d=d.ushln(-u)),s(c,d)}},6330:function(t,e,r){"use strict";var n=r(1533);t.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},5716:function(t,e,r){"use strict";var n=r(6859);t.exports=function(t){return t.cmp(new n(0))}},1369:function(t,e,r){"use strict";var n=r(5716);t.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var o=0;o20?52:r+32}},1533:function(t,e,r){"use strict";r(6859),t.exports=function(t){return t&&"object"==typeof t&&Boolean(t.words)}},2651:function(t,e,r){"use strict";var n=r(6859),i=r(2361);t.exports=function(t){var e=i.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},869:function(t,e,r){"use strict";var n=r(2651),i=r(5716);t.exports=function(t,e){var r=i(t),o=i(e);if(0===r)return[n(0),n(1)];if(0===o)return[n(0),n(0)];o<0&&(t=t.neg(),e=e.neg());var a=t.gcd(e);return a.cmpn(1)?[t.div(a),e.div(a)]:[t,e]}},4387:function(t,e,r){"use strict";var n=r(6859);t.exports=function(t){return new n(t)}},6504:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},7721:function(t,e,r){"use strict";var n=r(5716);t.exports=function(t){return n(t[0])*n(t[1])}},5572:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},946:function(t,e,r){"use strict";var n=r(1369),i=r(4025);t.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var o=e.abs().divmod(r.abs()),a=o.div,s=n(a),l=o.mod,c=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var d=i(s)+4;return c*(s+(h=n(l.ushln(d).divRound(r)))*Math.pow(2,-d))}var u=r.bitLength()-l.bitLength()+53,h=n(l.ushln(u).divRound(r));return u<1023?c*h*Math.pow(2,-u):c*(h*=Math.pow(2,-1023))*Math.pow(2,1023-u)}},2478:function(t){"use strict";function e(t,e,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)>=0?(o=a,i=a-1):n=a+1}return o}function r(t,e,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)>0?(o=a,i=a-1):n=a+1}return o}function n(t,e,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)<0?(o=a,n=a+1):i=a-1}return o}function i(t,e,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)<=0?(o=a,n=a+1):i=a-1}return o}function o(t,e,r,n,i){for(;n<=i;){var o=n+i>>>1,a=t[o],s=void 0!==r?r(a,e):a-e;if(0===s)return o;s<=0?n=o+1:i=o-1}return-1}function a(t,e,r,n,i,o){return"function"==typeof r?o(t,e,r,void 0===n?0:0|n,void 0===i?t.length-1:0|i):o(t,e,void 0,void 0===r?0:0|r,void 0===n?t.length-1:0|n)}t.exports={ge:function(t,r,n,i,o){return a(t,r,n,i,o,e)},gt:function(t,e,n,i,o){return a(t,e,n,i,o,r)},lt:function(t,e,r,i,o){return a(t,e,r,i,o,n)},le:function(t,e,r,n,o){return a(t,e,r,n,o,i)},eq:function(t,e,r,n,i){return a(t,e,r,n,i,o)}}},8828:function(t,e){"use strict";function r(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},6859:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(7790).Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=l(t,e,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,l=0,d=r;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,l=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,u=67108863&l,h=Math.min(c,e.length-1),f=Math.max(0,c-t.length+1);f<=h;f++){var p=c-f|0;d+=(a=(i=0|t.words[p])*(o=0|e.words[f])+u)/67108864|0,u=67108863&a}r.words[c]=0|u,l=0|d}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?d[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=u[t],f=h[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(t);r=(p=p.idivn(f)).isZero()?m+r:d[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,l="le"===e,c=new t(o),d=this.clone();if(l){for(s=0;!d.isZero();s++)a=d.andln(255),d.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,f=0|a[1],p=8191&f,m=f>>>13,g=0|a[2],v=8191&g,b=g>>>13,y=0|a[3],x=8191&y,w=y>>>13,_=0|a[4],k=8191&_,A=_>>>13,T=0|a[5],M=8191&T,S=T>>>13,C=0|a[6],E=8191&C,L=C>>>13,z=0|a[7],O=8191&z,D=z>>>13,I=0|a[8],R=8191&I,F=I>>>13,P=0|a[9],j=8191&P,N=P>>>13,B=0|s[0],U=8191&B,G=B>>>13,V=0|s[1],H=8191&V,W=V>>>13,q=0|s[2],Y=8191&q,Z=q>>>13,X=0|s[3],$=8191&X,J=X>>>13,K=0|s[4],Q=8191&K,tt=K>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,dt=0|s[8],ut=8191&dt,ht=dt>>>13,ft=0|s[9],pt=8191&ft,mt=ft>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(c+(n=Math.imul(u,U))|0)+((8191&(i=(i=Math.imul(u,G))+Math.imul(h,U)|0))<<13)|0;c=((o=Math.imul(h,G))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,G))+Math.imul(m,U)|0,o=Math.imul(m,G);var vt=(c+(n=n+Math.imul(u,H)|0)|0)+((8191&(i=(i=i+Math.imul(u,W)|0)+Math.imul(h,H)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=(i=Math.imul(v,G))+Math.imul(b,U)|0,o=Math.imul(b,G),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var bt=(c+(n=n+Math.imul(u,Y)|0)|0)+((8191&(i=(i=i+Math.imul(u,Z)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(x,U),i=(i=Math.imul(x,G))+Math.imul(w,U)|0,o=Math.imul(w,G),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var yt=(c+(n=n+Math.imul(u,$)|0)|0)+((8191&(i=(i=i+Math.imul(u,J)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,J)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(k,U),i=(i=Math.imul(k,G))+Math.imul(A,U)|0,o=Math.imul(A,G),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,J)|0;var xt=(c+(n=n+Math.imul(u,Q)|0)|0)+((8191&(i=(i=i+Math.imul(u,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,G))+Math.imul(S,U)|0,o=Math.imul(S,G),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(c+(n=n+Math.imul(u,rt)|0)|0)+((8191&(i=(i=i+Math.imul(u,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(E,U),i=(i=Math.imul(E,G))+Math.imul(L,U)|0,o=Math.imul(L,G),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(S,H)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,J)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var _t=(c+(n=n+Math.imul(u,ot)|0)|0)+((8191&(i=(i=i+Math.imul(u,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,G))+Math.imul(D,U)|0,o=Math.imul(D,G),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var kt=(c+(n=n+Math.imul(u,lt)|0)|0)+((8191&(i=(i=i+Math.imul(u,ct)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(R,U),i=(i=Math.imul(R,G))+Math.imul(F,U)|0,o=Math.imul(F,G),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(D,H)|0,o=o+Math.imul(D,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,J)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var At=(c+(n=n+Math.imul(u,ut)|0)|0)+((8191&(i=(i=i+Math.imul(u,ht)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(j,U),i=(i=Math.imul(j,G))+Math.imul(N,U)|0,o=Math.imul(N,G),n=n+Math.imul(R,H)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(F,H)|0,o=o+Math.imul(F,W)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,J)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var Tt=(c+(n=n+Math.imul(u,pt)|0)|0)+((8191&(i=(i=i+Math.imul(u,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,W))+Math.imul(N,H)|0,o=Math.imul(N,W),n=n+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(F,Y)|0,o=o+Math.imul(F,Z)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(w,lt)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0;var Mt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(j,Y),i=(i=Math.imul(j,Z))+Math.imul(N,Y)|0,o=Math.imul(N,Z),n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,J)|0)+Math.imul(F,$)|0,o=o+Math.imul(F,J)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,ct)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ht)|0;var St=(c+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,$),i=(i=Math.imul(j,J))+Math.imul(N,$)|0,o=Math.imul(N,J),n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(F,Q)|0,o=o+Math.imul(F,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(D,rt)|0,o=o+Math.imul(D,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,ct)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ht)|0;var Ct=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(j,Q),i=(i=Math.imul(j,tt))+Math.imul(N,Q)|0,o=Math.imul(N,tt),n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(F,rt)|0,o=o+Math.imul(F,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ht)|0;var Et=(c+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(A,pt)|0))<<13)|0;c=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(j,rt),i=(i=Math.imul(j,nt))+Math.imul(N,rt)|0,o=Math.imul(N,nt),n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,at)|0)+Math.imul(F,ot)|0,o=o+Math.imul(F,at)|0,n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,ct)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(L,ut)|0,o=o+Math.imul(L,ht)|0;var Lt=(c+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(j,ot),i=(i=Math.imul(j,at))+Math.imul(N,ot)|0,o=Math.imul(N,at),n=n+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,ct)|0)+Math.imul(F,lt)|0,o=o+Math.imul(F,ct)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0;var zt=(c+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(L,pt)|0))<<13)|0;c=((o=o+Math.imul(L,mt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,n=Math.imul(j,lt),i=(i=Math.imul(j,ct))+Math.imul(N,lt)|0,o=Math.imul(N,ct),n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ht)|0)+Math.imul(F,ut)|0,o=o+Math.imul(F,ht)|0;var Ot=(c+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(D,pt)|0))<<13)|0;c=((o=o+Math.imul(D,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(j,ut),i=(i=Math.imul(j,ht))+Math.imul(N,ut)|0,o=Math.imul(N,ht);var Dt=(c+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,mt)|0)+Math.imul(F,pt)|0))<<13)|0;c=((o=o+Math.imul(F,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var It=(c+(n=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,mt))+Math.imul(N,pt)|0))<<13)|0;return c=((o=Math.imul(N,mt))+(i>>>13)|0)+(It>>>26)|0,It&=67108863,l[0]=gt,l[1]=vt,l[2]=bt,l[3]=yt,l[4]=xt,l[5]=wt,l[6]=_t,l[7]=kt,l[8]=At,l[9]=Tt,l[10]=Mt,l[11]=St,l[12]=Ct,l[13]=Et,l[14]=Lt,l[15]=zt,l[16]=Ot,l[17]=Dt,l[18]=It,0!==c&&(l[19]=c,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?f(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==d||c>=i);c--){var u=0|this.words[c];this.words[c]=d<<26-o|u>>>o,d=u&s}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==e){(s=new o(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;u--){var h=67108864*(0|n.words[i.length+u])+(0|n.words[i.length+u-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,u);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,u),n.isZero()||(n.negative^=1);s&&(s.words[u]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):this.negative&t.negative?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),l=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var d=r.clone(),u=e.clone();!e.isZero();){for(var h=0,f=1;!(e.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(d),a.isub(u)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(d),l.isub(u)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(l)):(r.isub(e),s.isub(i),l.isub(a))}return{a:s,b:l,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),l=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,d=1;!(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var u=0,h=1;!(r.words[0]&h)&&u<26;++u,h<<=1);if(u>0)for(r.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(y,b),y.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new x;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return v[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(!(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new o(2*d*d).toRed(this);0!==this.pow(d,c).cmp(l);)d.redIAdd(l);for(var u=this.pow(d,i),h=this.pow(t,i.addn(1).iushrn(1)),f=this.pow(t,i),p=a;0!==f.cmp(s);){for(var m=f,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var c=e.words[n],d=l-1;d>=0;d--){var u=c>>d&1;i!==r[0]&&(i=this.sqr(i)),0!==u||0!==a?(a<<=1,a|=u,(4==++s||0===n&&0===d)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}l=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,k),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},6204:function(t){"use strict";t.exports=function(t){var e,r,n,i=t.length,o=0;for(e=0;e>>1;if(!(d<=0)){var u,h=i.mallocDouble(2*d*s),f=i.mallocInt32(s);if((s=l(t,d,h,f))>0){if(1===d&&n)o.init(s),u=o.sweepComplete(d,r,0,s,h,f,0,s,h,f);else{var p=i.mallocDouble(2*d*c),m=i.mallocInt32(c);(c=l(e,d,p,m))>0&&(o.init(s+c),u=1===d?o.sweepBipartite(d,r,0,s,h,f,0,c,p,m):a(d,r,n,s,h,f,c,p,m),i.free(p),i.free(m))}i.free(h),i.free(f)}return u}}}function d(t,e){n.push([t,e])}},2455:function(t,e){"use strict";function r(t){return t?function(t,e,r,n,i,o,a,s,l,c,d){return i-n>l-s?function(t,e,r,n,i,o,a,s,l,c,d){for(var u=2*t,h=n,f=u*n;hc-l?n?function(t,e,r,n,i,o,a,s,l,c,d){for(var u=2*t,h=n,f=u*n;h0;){var I=(O-=1)*x,R=_[I],F=_[I+1],P=_[I+2],j=_[I+3],N=_[I+4],B=_[I+5],U=O*w,G=k[U],V=k[U+1],H=1&B,W=!!(16&B),q=d,Y=S,Z=E,X=L;if(H&&(q=E,Y=L,Z=d,X=S),!(2&B&&F>=(P=g(t,R,F,P,q,Y,V))||4&B&&(F=v(t,R,F,P,q,Y,G))>=P)){var $=P-F,J=N-j;if(W){if(t*$*($+J)=p0)&&!(p1>=hi)"),m=d("lo===p0"),g=d("lo>>1,h=2*t,f=u,p=s[h*u+e];c=y?(f=b,p=y):v>=w?(f=g,p=v):(f=x,p=w):y>=w?(f=b,p=y):w>=v?(f=g,p=v):(f=x,p=w);for(var _=h*(d-1),k=h*f,A=0;Ar&&i[u+e]>c;--d,u-=a){for(var h=u,f=u+a,p=0;ph;++h,l+=s)if(i[l+u]===a)if(d===h)d+=1,c+=s;else{for(var f=0;s>f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var m=o[h];o[h]=o[d],o[d++]=m}return d},"loh;++h,l+=s)if(i[l+u]f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var m=o[h];o[h]=o[d],o[d++]=m}return d},"lo<=p0":function(t,e,r,n,i,o,a){for(var s=2*t,l=s*r,c=l,d=r,u=t+e,h=r;n>h;++h,l+=s)if(i[l+u]<=a)if(d===h)d+=1,c+=s;else{for(var f=0;s>f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var m=o[h];o[h]=o[d],o[d++]=m}return d},"hi<=p0":function(t,e,r,n,i,o,a){for(var s=2*t,l=s*r,c=l,d=r,u=t+e,h=r;n>h;++h,l+=s)if(i[l+u]<=a)if(d===h)d+=1,c+=s;else{for(var f=0;s>f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var m=o[h];o[h]=o[d],o[d++]=m}return d},"lof;++f,l+=s){var p=i[l+u],m=i[l+h];if(pg;++g){var v=i[l+g];i[l+g]=i[c],i[c++]=v}var b=o[f];o[f]=o[d],o[d++]=b}}return d},"lo<=p0&&p0<=hi":function(t,e,r,n,i,o,a){for(var s=2*t,l=s*r,c=l,d=r,u=e,h=t+e,f=r;n>f;++f,l+=s){var p=i[l+u],m=i[l+h];if(p<=a&&a<=m)if(d===f)d+=1,c+=s;else{for(var g=0;s>g;++g){var v=i[l+g];i[l+g]=i[c],i[c++]=v}var b=o[f];o[f]=o[d],o[d++]=b}}return d},"!(lo>=p0)&&!(p1>=hi)":function(t,e,r,n,i,o,a,s){for(var l=2*t,c=l*r,d=c,u=r,h=e,f=t+e,p=r;n>p;++p,c+=l){var m=i[c+h],g=i[c+f];if(!(m>=a||s>=g))if(u===p)u+=1,d+=l;else{for(var v=0;l>v;++v){var b=i[c+v];i[c+v]=i[d],i[d++]=b}var y=o[p];o[p]=o[u],o[u++]=y}}return u}}},1811:function(t){"use strict";t.exports=function(t,n){n<=4*e?r(0,n-1,t):c(0,n-1,t)};var e=32;function r(t,e,r){for(var n=2*(t+1),i=t+1;i<=e;++i){for(var o=r[n++],a=r[n++],s=i,l=n-2;s-- >t;){var c=r[l-2],d=r[l-1];if(cr[e+1])}function l(t,e,r,n){var i=n[t*=2];return i>1,g=m-h,v=m+h,b=f,y=g,x=m,w=v,_=p,k=t+1,A=d-1,T=0;s(b,y,u)&&(T=b,b=y,y=T),s(w,_,u)&&(T=w,w=_,_=T),s(b,x,u)&&(T=b,b=x,x=T),s(y,x,u)&&(T=y,y=x,x=T),s(b,w,u)&&(T=b,b=w,w=T),s(x,w,u)&&(T=x,x=w,w=T),s(y,_,u)&&(T=y,y=_,_=T),s(y,x,u)&&(T=y,y=x,x=T),s(w,_,u)&&(T=w,w=_,_=T);for(var M=u[2*y],S=u[2*y+1],C=u[2*w],E=u[2*w+1],L=2*b,z=2*x,O=2*_,D=2*f,I=2*m,R=2*p,F=0;F<2;++F){var P=u[L+F],j=u[z+F],N=u[O+F];u[D+F]=P,u[I+F]=j,u[R+F]=N}i(g,t,u),i(v,d,u);for(var B=k;B<=A;++B)if(l(B,M,S,u))B!==k&&n(B,k,u),++k;else if(!l(B,C,E,u))for(;;){if(l(A,C,E,u)){l(A,M,S,u)?(o(B,k,A,u),++k,--A):(n(B,A,u),--A);break}if(--A>>1;o(p,S);var C=0,E=0;for(k=0;k=a)m(d,u,E--,L=L-a|0);else if(L>=0)m(l,c,C--,L);else if(L<=-a){L=-L-a|0;for(var z=0;z>>1;o(p,C);var E=0,L=0,z=0;for(A=0;A>1==p[2*A+3]>>1&&(D=2,A+=1),O<0){for(var I=-(O>>1)-1,R=0;R>1)-1,0===D?m(l,c,E--,I):1===D?m(d,u,L--,I):2===D&&m(h,f,z--,I)}},scanBipartite:function(t,e,r,n,i,s,d,u,h,f,v,b){var y=0,x=2*t,w=e,_=e+t,k=1,A=1;n?A=a:k=a;for(var T=i;T>>1;o(p,E);var L=0;for(T=0;T=a?(O=!n,M-=a):(O=!!n,M-=1),O)g(l,c,L++,M);else{var D=b[M],I=x*M,R=v[I+e+1],F=v[I+e+1+t];t:for(var P=0;P>>1;o(p,k);var A=0;for(y=0;y=a)l[A++]=x-a;else{var M=f[x-=1],S=g*x,C=h[S+e+1],E=h[S+e+1+t];t:for(var L=0;L=0;--L)if(l[L]===x){for(I=L+1;I0;){for(var f=r.pop(),p=(d=-1,u=-1,l=a[s=r.pop()],1);p=0||(e.flip(s,f),i(t,e,r,d,s,u),i(t,e,r,s,u,d),i(t,e,r,u,f,d),i(t,e,r,f,d,u))}}},5023:function(t,e,r){"use strict";var n,i=r(2478);function o(t,e,r,n,i,o,a){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=o,this.boundary=a}function a(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}t.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,i=0;i0||l.length>0;){for(;s.length>0;){var f=s.pop();if(c[f]!==-i){c[f]=i,d[f];for(var p=0;p<3;++p){var m=h[3*f+p];m>=0&&0===c[m]&&(u[3*f+p]?l.push(m):(s.push(m),c[m]=i))}}}var g=l;l=s,s=g,l.length=0,i=-i}var v=function(t,e,r){for(var n=0,i=0;i1&&i(r[h[f-2]],r[h[f-1]],o)>0;)t.push([h[f-1],h[f-2],a]),f-=1;h.length=f,h.push(a);var p=u.upperIds;for(f=p.length;f>1&&i(r[p[f-2]],r[p[f-1]],o)<0;)t.push([p[f-2],p[f-1],a]),f-=1;p.length=f,p.push(a)}}function d(t,e){var r;return(r=t.a[0]p[0]&&i.push(new a(p,f,2,l),new a(f,p,1,l))}i.sort(s);for(var m=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),g=[new o([m,1],[m,0],-1,[],[],[],[])],v=[],b=(l=0,i.length);l=0}}(),o.removeTriangle=function(t,e,r){var n=this.stars;a(n[t],e,r),a(n[e],r,t),a(n[r],t,e)},o.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},o.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;ne[2]?1:0)}function v(t,e,r){if(0!==t.length){if(e)for(var n=0;n=0;--o){var y=e[d=(S=n[o])[0]],x=y[0],w=y[1],_=t[x],k=t[w];if((_[0]-k[0]||_[1]-k[1])<0){var A=x;x=w,w=A}y[0]=x;var T,M=y[1]=S[1];for(i&&(T=y[2]);o>0&&n[o-1][0]===d;){var S,C=(S=n[--o])[1];i?e.push([M,C,T]):e.push([M,C]),M=C}i?e.push([M,w,T]):e.push([M,w])}return h}(t,e,h,m,r),b=p(t,g);return v(e,b,r),!!b||h.length>0||m.length>0}},3637:function(t,e,r){"use strict";t.exports=function(t,e,r,n){var o=s(e,t),u=s(n,r),h=d(o,u);if(0===a(h))return null;var f=d(u,s(t,r)),p=i(f,h),m=c(o,p);return l(t,m)};var n=r(6504),i=r(8697),o=r(5572),a=r(7721),s=r(544),l=r(2653),c=r(8987);function d(t,e){return o(n(t[0],e[1]),n(t[1],e[0]))}},3642:function(t){t.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},6729:function(t,e,r){"use strict";var n=r(3642),i=r(395);function o(t){return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function a(t){for(var e,r="#",n=0;n<3;++n)r+=("00"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function s(t){return"rgba("+t.join(",")+")"}t.exports=function(t){var e,r,l,c,d,u,h,f,p,m;if(t||(t={}),f=(t.nshades||72)-1,h=t.format||"hex",(u=t.colormap)||(u="jet"),"string"==typeof u){if(u=u.toLowerCase(),!n[u])throw Error(u+" not a supported colorscale");d=n[u]}else{if(!Array.isArray(u))throw Error("unsupported colormap option",u);d=u.slice()}if(d.length>f+1)throw new Error(u+" map requires nshades to be at least size "+d.length);p=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1],e=d.map((function(t){return Math.round(t.index*f)})),p[0]=Math.min(Math.max(p[0],0),1),p[1]=Math.min(Math.max(p[1],0),1);var g=d.map((function(t,e){var r=d[e].index,n=d[e].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1||(n[3]=p[0]+(p[1]-p[0])*r),n})),v=[];for(m=0;m0||l(t,e,o)?-1:1:0===s?c>0||l(t,e,r)?1:-1:i(c-s)}var u=n(t,e,r);return u>0?a>0&&n(t,e,o)>0?1:-1:u<0?a>0||n(t,e,o)>0?1:-1:n(t,e,o)>0||l(t,e,r)?1:-1};var n=r(3250),i=r(8572),o=r(9362),a=r(5382),s=r(8210);function l(t,e,r){var n=o(t[0],-e[0]),i=o(t[1],-e[1]),l=o(r[0],-e[0]),c=o(r[1],-e[1]),d=s(a(n,l),a(i,c));return d[d.length-1]>=0}},8572:function(t){"use strict";t.exports=function(t){return t<0?-1:t>0?1:0}},8507:function(t){t.exports=function(t,n){var i=t.length,o=t.length-n.length;if(o)return o;switch(i){case 0:return 0;case 1:return t[0]-n[0];case 2:return t[0]+t[1]-n[0]-n[1]||e(t[0],t[1])-e(n[0],n[1]);case 3:var a=t[0]+t[1],s=n[0]+n[1];if(o=a+t[2]-(s+n[2]))return o;var l=e(t[0],t[1]),c=e(n[0],n[1]);return e(l,t[2])-e(c,n[2])||e(l+t[2],a)-e(c+n[2],s);case 4:var d=t[0],u=t[1],h=t[2],f=t[3],p=n[0],m=n[1],g=n[2],v=n[3];return d+u+h+f-(p+m+g+v)||e(d,u,h,f)-e(p,m,g,v,p)||e(d+u,d+h,d+f,u+h,u+f,h+f)-e(p+m,p+g,p+v,m+g,m+v,g+v)||e(d+u+h,d+u+f,d+h+f,u+h+f)-e(p+m+g,p+m+v,p+g+v,m+g+v);default:for(var b=t.slice().sort(r),y=n.slice().sort(r),x=0;xt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}},4750:function(t,e,r){"use strict";t.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var i=new Array(r),o=e[r-1],a=0;a=e[l]&&(s+=1);o[a]=s}}return t}(n(o,!0),r)}};var n=r(8954),i=r(3952)},4769:function(t){"use strict";t.exports=function(t,e,r,n,i,o){var a=i-1,s=i*i,l=a*a,c=(1+2*i)*l,d=i*l,u=s*(3-2*i),h=s*a;if(t.length){o||(o=new Array(t.length));for(var f=t.length-1;f>=0;--f)o[f]=c*t[f]+d*e[f]+u*r[f]+h*n[f];return o}return c*t+d*e+u*r+h*n},t.exports.derivative=function(t,e,r,n,i,o){var a=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(t.length){o||(o=new Array(t.length));for(var d=t.length-1;d>=0;--d)o[d]=a*t[d]+s*e[d]+l*r[d]+c*n[d];return o}return a*t+s*e+l*r[d]+c*n}},7642:function(t,e,r){"use strict";var n=r(8954),i=r(1682);function o(t,e){this.point=t,this.index=e}function a(t,e){for(var r=t.point,n=e.point,i=r.length,o=0;o=2)return!1;t[r]=n}return!0})):w.filter((function(t){for(var e=0;e<=s;++e){var r=v[t[e]];if(r<0)return!1;t[e]=r}return!0})),1&s)for(d=0;d>>31},t.exports.exponent=function(e){return(t.exports.hi(e)<<1>>>21)-1023},t.exports.fraction=function(e){var r=t.exports.lo(e),n=t.exports.hi(e),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},t.exports.denormalized=function(e){return!(2146435072&t.exports.hi(e))}},1338:function(t){"use strict";function e(t,r,n){var i=0|t[n];if(i<=0)return[];var o,a=new Array(i);if(n===t.length-1)for(o=0;o0)return function(t,e){var r,n;for(r=new Array(t),n=0;n=r-1){h=l.length-1;var p=t-e[r-1];for(f=0;f=r-1)for(var d=s.length-1,u=(e[r-1],0);u=0;--r)if(t[--e])return!1;return!0},s.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t0;--u)n.push(o(l[u-1],c[u-1],arguments[u])),i.push(0)}},s.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t1e-6?1/s:0;this._time.push(t);for(var h=r;h>0;--h){var f=o(c[h-1],d[h-1],arguments[h]);n.push(f),i.push((f-n[a++])*u)}}},s.set=function(t){var e=this.dimension;if(!(t0;--l)r.push(o(a[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var n=this._state,i=this._velocity,a=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],d=t-e,u=d>1e-6?1/d:0;this._time.push(t);for(var h=r;h>0;--h){var f=arguments[h];n.push(o(l[h-1],c[h-1],n[a++]+f)),i.push(f*u)}}},s.idle=function(t){var e=this.lastT();if(!(t=0;--u)n.push(o(l[u],c[u],n[a]+d*i[a])),i.push(0),a+=1}}},3840:function(t){"use strict";function e(t,e,r,n,i,o){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=o}function r(t){return new e(t._color,t.key,t.value,t.left,t.right,t._count)}function n(t,r){return new e(t,r.key,r.value,r.left,r.right,r._count)}function i(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function o(t,e){this._compare=t,this.root=e}t.exports=function(t){return new o(t||f,null)};var a=o.prototype;function s(t,e){var r;return e.left&&(r=s(t,e.left))?r:(r=t(e.key,e.value))||(e.right?s(t,e.right):void 0)}function l(t,e,r,n){if(e(t,n.key)<=0){var i;if(n.left&&(i=l(t,e,r,n.left)))return i;if(i=r(n.key,n.value))return i}if(n.right)return l(t,e,r,n.right)}function c(t,e,r,n,i){var o,a=r(t,i.key),s=r(e,i.key);if(a<=0){if(i.left&&(o=c(t,e,r,n,i.left)))return o;if(s>0&&(o=n(i.key,i.value)))return o}if(s>0&&i.right)return c(t,e,r,n,i.right)}function d(t,e){this.tree=t,this._stack=e}Object.defineProperty(a,"keys",{get:function(){var t=[];return this.forEach((function(e,r){t.push(e)})),t}}),Object.defineProperty(a,"values",{get:function(){var t=[];return this.forEach((function(e,r){t.push(r)})),t}}),Object.defineProperty(a,"length",{get:function(){return this.root?this.root._count:0}}),a.insert=function(t,r){for(var a=this._compare,s=this.root,l=[],c=[];s;){var d=a(t,s.key);l.push(s),c.push(d),s=d<=0?s.left:s.right}l.push(new e(0,t,r,null,null,1));for(var u=l.length-2;u>=0;--u)s=l[u],c[u]<=0?l[u]=new e(s._color,s.key,s.value,l[u+1],s.right,s._count+1):l[u]=new e(s._color,s.key,s.value,s.left,l[u+1],s._count+1);for(u=l.length-1;u>1;--u){var h=l[u-1];if(s=l[u],1===h._color||1===s._color)break;var f=l[u-2];if(f.left===h)if(h.left===s){if(!(p=f.right)||0!==p._color){f._color=0,f.left=h.right,h._color=1,h.right=f,l[u-2]=h,l[u-1]=s,i(f),i(h),u>=3&&((m=l[u-3]).left===f?m.left=h:m.right=h);break}h._color=1,f.right=n(1,p),f._color=0,u-=1}else{if(!(p=f.right)||0!==p._color){h.right=s.left,f._color=0,f.left=s.right,s._color=1,s.left=h,s.right=f,l[u-2]=s,l[u-1]=h,i(f),i(h),i(s),u>=3&&((m=l[u-3]).left===f?m.left=s:m.right=s);break}h._color=1,f.right=n(1,p),f._color=0,u-=1}else if(h.right===s){if(!(p=f.left)||0!==p._color){f._color=0,f.right=h.left,h._color=1,h.left=f,l[u-2]=h,l[u-1]=s,i(f),i(h),u>=3&&((m=l[u-3]).right===f?m.right=h:m.left=h);break}h._color=1,f.left=n(1,p),f._color=0,u-=1}else{var p;if(!(p=f.left)||0!==p._color){var m;h.left=s.right,f._color=0,f.right=s.left,s._color=1,s.right=h,s.left=f,l[u-2]=s,l[u-1]=h,i(f),i(h),i(s),u>=3&&((m=l[u-3]).right===f?m.right=s:m.left=s);break}h._color=1,f.left=n(1,p),f._color=0,u-=1}}return l[0]._color=1,new o(a,l[0])},a.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return s(t,this.root);case 2:return l(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return c(e,r,this._compare,t,this.root)}},Object.defineProperty(a,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new d(this,t)}}),Object.defineProperty(a,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new d(this,t)}}),a.at=function(t){if(t<0)return new d(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t=e.right._count)break;e=e.right}return new d(this,[])},a.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var o=e(t,r.key);n.push(r),o<=0&&(i=n.length),r=o<=0?r.left:r.right}return n.length=i,new d(this,n)},a.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var o=e(t,r.key);n.push(r),o<0&&(i=n.length),r=o<0?r.left:r.right}return n.length=i,new d(this,n)},a.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var o=e(t,r.key);n.push(r),o>0&&(i=n.length),r=o<=0?r.left:r.right}return n.length=i,new d(this,n)},a.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var o=e(t,r.key);n.push(r),o>=0&&(i=n.length),r=o<0?r.left:r.right}return n.length=i,new d(this,n)},a.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new d(this,n);r=i<=0?r.left:r.right}return new d(this,[])},a.remove=function(t){var e=this.find(t);return e?e.remove():this},a.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var u=d.prototype;function h(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function f(t,e){return te?1:0}Object.defineProperty(u,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(u,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),u.clone=function(){return new d(this.tree,this._stack.slice())},u.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var a=new Array(t.length),s=t[t.length-1];a[a.length-1]=new e(s._color,s.key,s.value,s.left,s.right,s._count);for(var l=t.length-2;l>=0;--l)(s=t[l]).left===t[l+1]?a[l]=new e(s._color,s.key,s.value,a[l+1],s.right,s._count):a[l]=new e(s._color,s.key,s.value,s.left,a[l+1],s._count);if((s=a[a.length-1]).left&&s.right){var c=a.length;for(s=s.left;s.right;)a.push(s),s=s.right;var d=a[c-1];for(a.push(new e(s._color,d.key,d.value,s.left,s.right,s._count)),a[c-1].key=s.key,a[c-1].value=s.value,l=a.length-2;l>=c;--l)s=a[l],a[l]=new e(s._color,s.key,s.value,s.left,a[l+1],s._count);a[c-1].left=a[c]}if(0===(s=a[a.length-1])._color){var u=a[a.length-2];for(u.left===s?u.left=null:u.right===s&&(u.right=null),a.pop(),l=0;l=0;--l){if(e=t[l],0===l)return void(e._color=1);if((o=t[l-1]).left===e){if((a=o.right).right&&0===a.right._color)return s=(a=o.right=r(a)).right=r(a.right),o.right=a.left,a.left=o,a.right=s,a._color=o._color,e._color=1,o._color=1,s._color=1,i(o),i(a),l>1&&((c=t[l-2]).left===o?c.left=a:c.right=a),void(t[l-1]=a);if(a.left&&0===a.left._color)return s=(a=o.right=r(a)).left=r(a.left),o.right=s.left,a.left=s.right,s.left=o,s.right=a,s._color=o._color,o._color=1,a._color=1,e._color=1,i(o),i(a),i(s),l>1&&((c=t[l-2]).left===o?c.left=s:c.right=s),void(t[l-1]=s);if(1===a._color){if(0===o._color)return o._color=1,void(o.right=n(0,a));o.right=n(0,a);continue}a=r(a),o.right=a.left,a.left=o,a._color=o._color,o._color=0,i(o),i(a),l>1&&((c=t[l-2]).left===o?c.left=a:c.right=a),t[l-1]=a,t[l]=o,l+11&&((c=t[l-2]).right===o?c.right=a:c.left=a),void(t[l-1]=a);if(a.right&&0===a.right._color)return s=(a=o.left=r(a)).right=r(a.right),o.left=s.right,a.right=s.left,s.right=o,s.left=a,s._color=o._color,o._color=1,a._color=1,e._color=1,i(o),i(a),i(s),l>1&&((c=t[l-2]).right===o?c.right=s:c.left=s),void(t[l-1]=s);if(1===a._color){if(0===o._color)return o._color=1,void(o.left=n(0,a));o.left=n(0,a);continue}var c;a=r(a),o.left=a.right,a.right=o,a._color=o._color,o._color=0,i(o),i(a),l>1&&((c=t[l-2]).right===o?c.right=a:c.left=a),t[l-1]=a,t[l]=o,l+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(u,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(u,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),u.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(u,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),u.update=function(t){var r=this._stack;if(0===r.length)throw new Error("Can't update empty node!");var n=new Array(r.length),i=r[r.length-1];n[n.length-1]=new e(i._color,i.key,t,i.left,i.right,i._count);for(var a=r.length-2;a>=0;--a)(i=r[a]).left===r[a+1]?n[a]=new e(i._color,i.key,i.value,n[a+1],i.right,i._count):n[a]=new e(i._color,i.key,i.value,i.left,n[a+1],i._count);return new o(this.tree._compare,n[0])},u.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(u,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},3837:function(t,e,r){"use strict";t.exports=function(t,e){var r=new d(t);return r.update(e),r};var n=r(4935),i=r(501),o=r(5304),a=r(6429),s=r(6444),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function c(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function d(t){this.gl=t,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=o(t)}var u=d.prototype;function h(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}u.update=function(t){function e(e,r,n){if(n in t){var i,o=t[n],a=this[n];(e?Array.isArray(o)&&Array.isArray(o[0]):Array.isArray(o))?this[n]=i=[r(o[0]),r(o[1]),r(o[2])]:this[n]=i=[r(o),r(o),r(o)];for(var s=0;s<3;++s)if(i[s]!==a[s])return!0}return!1}t=t||{};var r,o=e.bind(this,!1,Number),a=e.bind(this,!1,Boolean),l=e.bind(this,!1,String),c=e.bind(this,!0,(function(t){if(Array.isArray(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]})),d=!1,u=!1;if("bounds"in t)for(var h=t.bounds,f=0;f<2;++f)for(var p=0;p<3;++p)h[f][p]!==this.bounds[f][p]&&(u=!0),this.bounds[f][p]=h[f][p];if("ticks"in t)for(r=t.ticks,d=!0,this.autoTicks=!1,f=0;f<3;++f)this.tickSpacing[f]=0;else o("tickSpacing")&&(this.autoTicks=!0,u=!0);if(this._firstInit&&("ticks"in t||"tickSpacing"in t||(this.autoTicks=!0),u=!0,d=!0,this._firstInit=!1),u&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),d=!0),d){for(f=0;f<3;++f)r[f].sort((function(t,e){return t.x-e.x}));s.equal(r,this.ticks)?d=!1:this.ticks=r}a("tickEnable"),l("tickFont")&&(d=!0),l("tickFontStyle")&&(d=!0),l("tickFontWeight")&&(d=!0),l("tickFontVariant")&&(d=!0),o("tickSize"),o("tickAngle"),o("tickPad"),c("tickColor");var m=l("labels");l("labelFont")&&(m=!0),l("labelFontStyle")&&(m=!0),l("labelFontWeight")&&(m=!0),l("labelFontVariant")&&(m=!0),a("labelEnable"),o("labelSize"),o("labelPad"),c("labelColor"),a("lineEnable"),a("lineMirror"),o("lineWidth"),c("lineColor"),a("lineTickEnable"),a("lineTickMirror"),o("lineTickLength"),o("lineTickWidth"),c("lineTickColor"),a("gridEnable"),o("gridWidth"),c("gridColor"),a("zeroEnable"),c("zeroLineColor"),o("zeroLineWidth"),a("backgroundEnable"),c("backgroundColor");var g=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],v=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(m||d)&&this._text.update(this.bounds,this.labels,g,this.ticks,v):this._text=n(this.gl,this.bounds,this.labels,g,this.ticks,v),this._lines&&d&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var f=[new h,new h,new h];function p(t,e,r,n,i){for(var o=t.primalOffset,a=t.primalMinor,s=t.mirrorOffset,l=t.mirrorMinor,c=n[e],d=0;d<3;++d)if(e!==d){var u=o,h=s,f=a,p=l;c&1<0?(f[d]=-1,p[d]=0):(f[d]=0,p[d]=1)}}var m=[0,0,0],g={model:l,view:l,projection:l,_ortho:!1};u.isOpaque=function(){return!0},u.isTransparent=function(){return!1},u.drawTransparent=function(t){};var v=[0,0,0],b=[0,0,0],y=[0,0,0];u.draw=function(t){t=t||g;for(var e=this.gl,r=t.model||l,n=t.view||l,i=t.projection||l,o=this.bounds,s=t._ortho||!1,d=a(r,n,i,o,s),u=d.cubeEdges,h=d.axis,x=n[12],w=n[13],_=n[14],k=n[15],A=(s?2:1)*this.pixelRatio*(i[3]*x+i[7]*w+i[11]*_+i[15]*k)/e.drawingBufferHeight,T=0;T<3;++T)this.lastCubeProps.cubeEdges[T]=u[T],this.lastCubeProps.axis[T]=h[T];var M=f;for(T=0;T<3;++T)p(f[T],T,this.bounds,u,h);e=this.gl;var S,C,E,L=m;for(T=0;T<3;++T)this.backgroundEnable[T]?L[T]=h[T]:L[T]=0;for(this._background.draw(r,n,i,o,L,this.backgroundColor),this._lines.bind(r,n,i,this),T=0;T<3;++T){var z=[0,0,0];h[T]>0?z[T]=o[1][T]:z[T]=o[0][T];for(var O=0;O<2;++O){var D=(T+1+O)%3,I=(T+1+(1^O))%3;this.gridEnable[D]&&this._lines.drawGrid(D,I,this.bounds,z,this.gridColor[D],this.gridWidth[D]*this.pixelRatio)}for(O=0;O<2;++O)D=(T+1+O)%3,I=(T+1+(1^O))%3,this.zeroEnable[I]&&Math.min(o[0][I],o[1][I])<=0&&Math.max(o[0][I],o[1][I])>=0&&this._lines.drawZero(D,I,this.bounds,z,this.zeroLineColor[I],this.zeroLineWidth[I]*this.pixelRatio)}for(T=0;T<3;++T){this.lineEnable[T]&&this._lines.drawAxisLine(T,this.bounds,M[T].primalOffset,this.lineColor[T],this.lineWidth[T]*this.pixelRatio),this.lineMirror[T]&&this._lines.drawAxisLine(T,this.bounds,M[T].mirrorOffset,this.lineColor[T],this.lineWidth[T]*this.pixelRatio);var R=c(v,M[T].primalMinor),F=c(b,M[T].mirrorMinor),P=this.lineTickLength;for(O=0;O<3;++O){var j=A/r[5*O];R[O]*=P[O]*j,F[O]*=P[O]*j}this.lineTickEnable[T]&&this._lines.drawAxisTicks(T,M[T].primalOffset,R,this.lineTickColor[T],this.lineTickWidth[T]*this.pixelRatio),this.lineTickMirror[T]&&this._lines.drawAxisTicks(T,M[T].mirrorOffset,F,this.lineTickColor[T],this.lineTickWidth[T]*this.pixelRatio)}function N(t){(E=[0,0,0])[t]=1}function B(t,e,r){var n=(t+1)%3,i=(t+2)%3,o=e[n],a=e[i],s=r[n],l=r[i];o>0&&l>0||o>0&&l<0||o<0&&l>0||o<0&&l<0?N(n):(a>0&&s>0||a>0&&s<0||a<0&&s>0||a<0&&s<0)&&N(i)}for(this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio),T=0;T<3;++T){var U=M[T].primalMinor,G=M[T].mirrorMinor,V=c(y,M[T].primalOffset);for(O=0;O<3;++O)this.lineTickEnable[T]&&(V[O]+=A*U[O]*Math.max(this.lineTickLength[O],0)/r[5*O]);var H=[0,0,0];if(H[T]=1,this.tickEnable[T]){for(-3600===this.tickAngle[T]?(this.tickAngle[T]=0,this.tickAlign[T]="auto"):this.tickAlign[T]=-1,C=1,"auto"===(S=[this.tickAlign[T],.5,C])[0]?S[0]=0:S[0]=parseInt(""+S[0]),E=[0,0,0],B(T,U,G),O=0;O<3;++O)V[O]+=A*U[O]*this.tickPad[O]/r[5*O];this._text.drawTicks(T,this.tickSize[T],this.tickAngle[T],V,this.tickColor[T],H,E,S)}if(this.labelEnable[T]){for(C=0,E=[0,0,0],this.labels[T].length>4&&(N(T),C=1),"auto"===(S=[this.labelAlign[T],.5,C])[0]?S[0]=0:S[0]=parseInt(""+S[0]),O=0;O<3;++O)V[O]+=A*U[O]*this.labelPad[O]/r[5*O];V[T]+=.5*(o[0][T]+o[1][T]),this._text.drawLabel(T,this.labelSize[T],this.labelAngle[T],V,this.labelColor[T],[0,0,0],E,S)}}this._text.unbind()},u.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},5304:function(t,e,r){"use strict";t.exports=function(t){for(var e=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,d=(l+2)%3,u=[0,0,0],h=[0,0,0],f=-1;f<=1;f+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),u[l]=f,h[l]=f;for(var p=-1;p<=1;p+=2){u[c]=p;for(var m=-1;m<=1;m+=2)u[d]=m,e.push(u[0],u[1],u[2],h[0],h[1],h[2]),s+=1}var g=c;c=d,d=g}var v=n(t,new Float32Array(e)),b=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),y=i(t,[{buffer:v,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:t.FLOAT,size:3,offset:12,stride:24}],b),x=o(t);return x.attributes.position.location=0,x.attributes.normal.location=1,new a(t,v,y,x)};var n=r(2762),i=r(8116),o=r(1879).bg;function a(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}var s=a.prototype;s.draw=function(t,e,r,n,i,o){for(var a=!1,s=0;s<3;++s)a=a||i[s];if(a){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:o},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},6429:function(t,e,r){"use strict";t.exports=function(t,e,r,o,f){i(s,e,t),i(s,r,s);for(var b=0,y=0;y<2;++y){d[2]=o[y][2];for(var x=0;x<2;++x){d[1]=o[x][1];for(var w=0;w<2;++w)d[0]=o[w][0],h(l[b],d,s),b+=1}}var _=-1;for(y=0;y<8;++y){for(var k=l[y][3],A=0;A<3;++A)c[y][A]=l[y][A]/k;f&&(c[y][2]*=-1),k<0&&(_<0||c[y][2]C&&(_|=1<C&&(_|=1<c[y][1])&&(F=y);var P=-1;for(y=0;y<3;++y)(N=F^1<c[j][0]&&(j=N))}var B=m;B[0]=B[1]=B[2]=0,B[n.log2(P^F)]=F&P,B[n.log2(F^j)]=F&j;var U=7^j;U===_||U===R?(U=7^P,B[n.log2(j^U)]=U&j):B[n.log2(P^U)]=U&P;var G=g,V=_;for(T=0;T<3;++T)G[T]=V&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);e.Q=function(t){return i(t,s,l,null,[{name:"position",type:"vec3"}])};var c=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);e.bg=function(t){return i(t,c,d,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(t,e,r){"use strict";t.exports=function(t,e,r,n,a,l){var c=i(t),u=o(t,[{buffer:c,size:3}]),h=s(t);h.attributes.position.location=0;var f=new d(t,h,c,u);return f.update(e,r,n,a,l),f};var i=r(2762),o=r(8116),a=r(4359),s=r(1879).Q,l=window||n.global||{},c=l.__TEXT_CACHE||{};function d(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}l.__TEXT_CACHE={};var u=d.prototype,h=[0,0];u.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,h[0]=this.gl.drawingBufferWidth,h[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=h},u.unbind=function(){this.vao.unbind()},u.update=function(t,e,r,n,i){var o=[];function s(t,e,r,n,i,s){var l=[r.style,r.weight,r.variant,r.family].join("_"),d=c[l];d||(d=c[l]={});var u=d[e];u||(u=d[e]=function(t,e){try{return a(t,e)}catch(e){return console.warn('error vectorizing text:"'+t+'" error:',e),{cells:[],positions:[]}}}(e,{triangles:!0,font:r.family,fontStyle:r.style,fontWeight:r.weight,fontVariant:r.variant,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var h=(n||12)/12,f=u.positions,p=u.cells,m=0,g=p.length;m=0;--b){var y=f[v[b]];o.push(h*y[0],-h*y[1],t)}}for(var l=[0,0,0],d=[0,0,0],u=[0,0,0],h=[0,0,0],f={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},p=0;p<3;++p){u[p]=o.length/3|0,s(.5*(t[0][p]+t[1][p]),e[p],r[p],12,1.25,f),h[p]=(o.length/3|0)-u[p],l[p]=o.length/3|0;for(var m=0;m=0&&(i=r.length-n-1);var o=Math.pow(10,i),a=Math.round(t*e*o),s=a+"";if(s.indexOf("e")>=0)return s;var l=a/o,c=a%o;a<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var d=""+l;if(a<0&&(d="-"+d),i){for(var u=""+c;u.length=t[0][i];--a)o.push({x:a*e[i],text:r(e[i],a)});n.push(o)}return n},e.equal=function(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,o,i),r}function d(t,e){for(var r=n.malloc(t.length,e),i=t.length,o=0;o=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,t.data,e):this.length=c(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var s=n.malloc(t.size,r),l=o(s,t.shape);i.assign(l,t),this.length=c(this.gl,this.type,this.length,this.usage,e<0?s:s.subarray(0,t.size),e),n.free(s)}}else if(Array.isArray(t)){var u;u=this.type===this.gl.ELEMENT_ARRAY_BUFFER?d(t,"uint16"):d(t,"float32"),this.length=c(this.gl,this.type,this.length,this.usage,e<0?u:u.subarray(0,t.length),e),n.free(u)}else if("object"==typeof t&&"number"==typeof t.length)this.length=c(this.gl,this.type,this.length,this.usage,t,e);else{if("number"!=typeof t&&void 0!==t)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(t|=0)<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},t.exports=function(t,e,r,n){if(r=r||t.ARRAY_BUFFER,n=n||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(n!==t.DYNAMIC_DRAW&&n!==t.STATIC_DRAW&&n!==t.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var i=t.createBuffer(),o=new s(t,r,i,0,n);return o.update(e),o}},6405:function(t,e,r){"use strict";var n=r(2931);t.exports=function(t,e){var r=t.positions,i=t.vectors,o={positions:[],vertexIntensity:[],vertexIntensityBounds:t.vertexIntensityBounds,vectors:[],cells:[],coneOffset:t.coneOffset,colormap:t.colormap};if(0===t.positions.length)return e&&(e[0]=[0,0,0],e[1]=[0,0,0]),o;for(var a=0,s=1/0,l=-1/0,c=1/0,d=-1/0,u=1/0,h=-1/0,f=null,p=null,m=[],g=1/0,v=!1,b="raw"===t.coneSizemode,y=0;ya&&(a=n.length(w)),y&&!b){var _=2*n.distance(f,x)/(n.length(p)+n.length(w));_?(g=Math.min(g,_),v=!1):v=!0}v||(f=x,p=w),m.push(w)}var k=[s,c,u],A=[l,d,h];e&&(e[0]=k,e[1]=A),0===a&&(a=1);var T=1/a;isFinite(g)||(g=1),o.vectorScale=g;var M=t.coneSize||(b?1:.5);t.absoluteConeSize&&(M=t.absoluteConeSize*T),o.coneScale=M,y=0;for(var S=0;y=1},f.isTransparent=function(){return this.opacity<1},f.pickSlots=1,f.setPickBase=function(t){this.pickId=t},f.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,"lightPosition"in t&&(this.lightPosition=t.lightPosition),"opacity"in t&&(this.opacity=t.opacity),"ambient"in t&&(this.ambientLight=t.ambient),"diffuse"in t&&(this.diffuseLight=t.diffuse),"specular"in t&&(this.specularLight=t.specular),"roughness"in t&&(this.roughness=t.roughness),"fresnel"in t&&(this.fresnel=t.fresnel),void 0!==t.tubeScale&&(this.tubeScale=t.tubeScale),void 0!==t.vectorScale&&(this.vectorScale=t.vectorScale),void 0!==t.coneScale&&(this.coneScale=t.coneScale),void 0!==t.coneOffset&&(this.coneOffset=t.coneOffset),t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=d({colormap:t,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],o=0;o<3;++o)r[4*n+o]=i[o];r[4*n+3]=255*i[3]}return c(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions,i=t.vectors;if(n&&r&&i){var o=[],a=[],s=[],l=[],u=[];this.cells=r,this.positions=n,this.vectors=i;var h=t.meshColor||[1,1,1,1],f=t.vertexIntensity,p=1/0,m=-1/0;if(f)if(t.vertexIntensityBounds)p=+t.vertexIntensityBounds[0],m=+t.vertexIntensityBounds[1];else for(var g=0;g0){var m=this.triShader;m.bind(),m.uniforms=c,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},f.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||u,n=t.view||u,i=t.projection||u,o=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],a=0;a<3;++a)o[0][a]=Math.max(o[0][a],this.clipBounds[0][a]),o[1][a]=Math.min(o[1][a],this.clipBounds[1][a]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:o,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},f.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3),i={position:n,dataCoordinate:n,index:Math.floor(r[1]/48)};return"cone"===this.traceType?i.index=Math.floor(r[1]/48):"streamtube"===this.traceType&&(i.intensity=this.intensity[r[1]],i.velocity=this.vectors[r[1]].slice(0,3),i.divergence=this.vectors[r[1]][3],i.index=e),i},f.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()},t.exports=function(t,e,r){var s=r.shaders;1===arguments.length&&(t=(e=t).gl);var l=function(t,e){var r=n(t,e.meshShader.vertex,e.meshShader.fragment,null,e.meshShader.attributes);return r.attributes.position.location=0,r.attributes.color.location=2,r.attributes.uv.location=3,r.attributes.vector.location=4,r}(t,s),d=function(t,e){var r=n(t,e.pickShader.vertex,e.pickShader.fragment,null,e.pickShader.attributes);return r.attributes.position.location=0,r.attributes.id.location=1,r.attributes.vector.location=4,r}(t,s),u=a(t,c(new Uint8Array([255,255,255,255]),[1,1,4]));u.generateMipmap(),u.minFilter=t.LINEAR_MIPMAP_LINEAR,u.magFilter=t.LINEAR;var f=i(t),p=i(t),m=i(t),g=i(t),v=i(t),b=new h(t,u,l,d,f,p,v,m,g,o(t,[{buffer:f,type:t.FLOAT,size:4},{buffer:v,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:m,type:t.FLOAT,size:4},{buffer:g,type:t.FLOAT,size:2},{buffer:p,type:t.FLOAT,size:4}]),r.traceType||"cone");return b.update(e),b}},614:function(t,e,r){var n=r(3236),i=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, coneScale, coneOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),o=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),a=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float vectorScale, coneScale, coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * view * conePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);e.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(t){t.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(t,e,r){var n=r(737);t.exports=function(t){return n[t]}},9165:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl,r=n(e),a=i(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),l=o(e);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(e,r,a,l);return c.update(t),c};var n=r(2762),i=r(8116),o=r(3436),a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function c(t,e){for(var r=0;r<3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||a,i=r.projection=t.projection||a;r.model=t.model||a,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var o=n[12],s=n[13],l=n[14],c=n[15],d=(t._ortho?2:1)*this.pixelRatio*(i[3]*o+i[7]*s+i[11]*l+i[15]*c)/e.drawingBufferHeight;this.vao.bind();for(var u=0;u<3;++u)e.lineWidth(this.lineWidth[u]*this.pixelRatio),r.capSize=this.capSize[u]*d,this.lineCount[u]&&e.drawArrays(e.LINES,this.lineOffset[u],this.lineCount[u]);this.vao.unbind()};var d=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var o=[0,0,0];o[(n+e)%3]=i,r.push(o)}t[e]=r}return t}();function u(t,e,r,n){for(var i=d[n],o=0;o0&&((f=d.slice())[s]+=p[1][s],i.push(d[0],d[1],d[2],m[0],m[1],m[2],m[3],0,0,0,f[0],f[1],f[2],m[0],m[1],m[2],m[3],0,0,0),c(this.bounds,f),a+=2+u(i,f,m,s))}this.lineCount[s]=a-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},3436:function(t,e,r){"use strict";var n=r(3236),i=r(9405),o=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}"]),a=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);t.exports=function(t){return i(t,o,a,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(t,e,r){"use strict";var n=r(7766);t.exports=function(t,e,r,n){i||(i=t.FRAMEBUFFER_UNSUPPORTED,o=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,a=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=t.getExtension("WEBGL_draw_buffers");if(!l&&c&&function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),o=0;od||r<0||r>d)throw new Error("gl-fbo: Parameters are too large for FBO");var u=1;if("color"in(n=n||{})){if((u=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(u>1){if(!c)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(u>t.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+u+" draw buffers")}}var h=t.UNSIGNED_BYTE,f=t.getExtension("OES_texture_float");if(n.float&&u>0){if(!f)throw new Error("gl-fbo: Context does not support floating point textures");h=t.FLOAT}else n.preferFloat&&u>0&&f&&(h=t.FLOAT);var m=!0;"depth"in n&&(m=!!n.depth);var g=!1;return"stencil"in n&&(g=!!n.stencil),new p(t,e,r,h,u,m,g,c)};var i,o,a,s,l=null;function c(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function d(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function u(t){switch(t){case i:throw new Error("gl-fbo: Framebuffer unsupported");case o:throw new Error("gl-fbo: Framebuffer incomplete attachment");case a:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function h(t,e,r,i,o,a){if(!i)return null;var s=n(t,e,r,o,i);return s.magFilter=t.NEAREST,s.minFilter=t.NEAREST,s.mipSamples=1,s.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,a,t.TEXTURE_2D,s.handle,0),s}function f(t,e,r,n,i){var o=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,o),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,i,t.RENDERBUFFER,o),o}function p(t,e,r,n,i,o,a,s){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var p=0;p1&&s.drawBuffersWEBGL(l[a]);var b=r.getExtension("WEBGL_depth_texture");b?p?t.depth=h(r,i,o,b.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m&&(t.depth=h(r,i,o,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):m&&p?t._depth_rb=f(r,i,o,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m?t._depth_rb=f(r,i,o,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):p&&(t._depth_rb=f(r,i,o,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var y=r.checkFramebufferStatus(r.FRAMEBUFFER);if(y!==r.FRAMEBUFFER_COMPLETE){for(t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null),v=0;vi||r<0||r>i)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var o=c(n),a=0;a>8*f&255;this.pickOffset=r,i.bind();var p=i.uniforms;p.viewTransform=t,p.pickOffset=e,p.shape=this.shape;var m=i.attributes;return this.positionBuffer.bind(),m.position.pointer(),this.weightBuffer.bind(),m.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),m.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,a),r+this.shape[0]*this.shape[1]}}}(),u.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var o=r-n,a=this.xData,s=this.yData;return{object:this,pointId:o,dataCoord:[a[o%this.shape[0]],s[o/this.shape[0]|0]]}},u.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||i(e[0]),a=t.y||i(e[1]),s=t.z||new Float32Array(e[0]*e[1]),l=!1!==t.zsmooth;this.xData=r,this.yData=a;var c,d,u,f,p=t.colorLevels||[0],m=t.colorValues||[0,0,0,1],g=p.length,v=this.bounds;l?(c=v[0]=r[0],d=v[1]=a[0],u=v[2]=r[r.length-1],f=v[3]=a[a.length-1]):(c=v[0]=r[0]+(r[1]-r[0])/2,d=v[1]=a[0]+(a[1]-a[0])/2,u=v[2]=r[r.length-1]+(r[r.length-1]-r[r.length-2])/2,f=v[3]=a[a.length-1]+(a[a.length-1]-a[a.length-2])/2);var b=1/(u-c),y=1/(f-d),x=e[0],w=e[1];this.shape=[x,w];var _=(l?(x-1)*(w-1):x*w)*(h.length>>>1);this.numVertices=_;for(var k=o.mallocUint8(4*_),A=o.mallocFloat32(2*_),T=o.mallocUint8(2*_),M=o.mallocUint32(_),S=0,C=l?x-1:x,E=l?w-1:w,L=0;L max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\n// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl\nvec4 packFloat(float v) {\n float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n float e = floor(log2(av));\n float m = av * pow(2.0, -e) - 1.0;\n\n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n\n //Unpack exponent\n float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0;\n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];e.createShader=function(t){return i(t,o,a,null,l)},e.createPickShader=function(t){return i(t,o,s,null,l)}},5714:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl||t.scene&&t.scene.gl,r=u(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var a=h(e);a.attributes.position.location=0,a.attributes.nextPosition.location=1,a.attributes.arcLength.location=2,a.attributes.lineWidth.location=3,a.attributes.color.location=4;for(var s=n(e),l=i(e,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),d=c(new Array(1024),[256,1,4]),f=0;f<1024;++f)d.data[f]=255;var p=o(e,d);p.wrap=e.REPEAT;var m=new v(e,r,a,s,l,p);return m.update(t),m};var n=r(2762),i=r(8116),o=r(7766),a=new Uint8Array(4),s=new Float32Array(a.buffer),l=r(2478),c=r(9618),d=r(7319),u=d.createShader,h=d.createPickShader,f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function m(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function g(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function v(t,e,r,n,i,o){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=o,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var b=v.prototype;b.isTransparent=function(){return this.hasAlpha},b.isOpaque=function(){return!this.hasAlpha},b.pickSlots=1,b.setPickBase=function(t){this.pickId=t},b.drawTransparent=b.draw=function(t){if(this.vertexCount){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||f,view:t.view||f,projection:t.projection||f,clipBounds:m(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},b.drawPick=function(t){if(this.vertexCount){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||f,view:t.view||f,projection:t.projection||f,pickId:this.pickId,clipBounds:m(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},b.update=function(t){var e,r;this.dirty=!0;var n=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),this.hasAlpha=!1,"opacity"in t&&(this.opacity=+t.opacity,this.opacity<1&&(this.hasAlpha=!0));var i=[],o=[],a=[],s=0,d=0,u=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],h=t.position||t.positions;if(h){var f=t.color||t.colors||[0,0,0,1],m=t.lineWidth||1,g=!1;t:for(e=1;e0){for(var _=0;_<24;++_)i.push(i[i.length-12]);d+=2,g=!0}continue t}u[0][r]=Math.min(u[0][r],x[r],w[r]),u[1][r]=Math.max(u[1][r],x[r],w[r])}Array.isArray(f[0])?(v=f.length>e-1?f[e-1]:f.length>0?f[f.length-1]:[0,0,0,1],b=f.length>e?f[e]:f.length>0?f[f.length-1]:[0,0,0,1]):v=b=f,3===v.length&&(v=[v[0],v[1],v[2],1]),3===b.length&&(b=[b[0],b[1],b[2],1]),!this.hasAlpha&&v[3]<1&&(this.hasAlpha=!0),y=Array.isArray(m)?m.length>e-1?m[e-1]:m.length>0?m[m.length-1]:[0,0,0,1]:m;var k=s;if(s+=p(x,w),g){for(r=0;r<2;++r)i.push(x[0],x[1],x[2],w[0],w[1],w[2],k,y,v[0],v[1],v[2],v[3]);d+=2,g=!1}i.push(x[0],x[1],x[2],w[0],w[1],w[2],k,y,v[0],v[1],v[2],v[3],x[0],x[1],x[2],w[0],w[1],w[2],k,-y,v[0],v[1],v[2],v[3],w[0],w[1],w[2],x[0],x[1],x[2],s,-y,b[0],b[1],b[2],b[3],w[0],w[1],w[2],x[0],x[1],x[2],s,y,b[0],b[1],b[2],b[3]),d+=4}}if(this.buffer.update(i),o.push(s),a.push(h[h.length-1].slice()),this.bounds=u,this.vertexCount=d,this.points=a,this.arcLength=o,"dashes"in t){var A=t.dashes.slice();for(A.unshift(0),e=1;e1.0001)return null;v+=g[u]}return Math.abs(v-1)>.001?null:[h,s(t,g),g]}},840:function(t,e,r){var n=r(3236),i=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvec4 project(vec3 p) {\n return projection * view * model * vec4(p, 1.0);\n}\n\nvoid main() {\n gl_Position = project(position);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * vec4(position , 1.0);\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n f_color = color;\n f_data = position;\n f_uv = uv;\n}\n"]),o=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),a=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),h=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),f=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);e.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:d,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:h,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:f,fragment:p,attributes:[{name:"position",type:"vec3"}]}},7201:function(t,e,r){"use strict";var n=r(9405),i=r(2762),o=r(8116),a=r(7766),s=r(8406),l=r(6760),c=r(7608),d=r(9618),u=r(6729),h=r(7765),f=r(1888),p=r(840),m=r(7626),g=p.meshShader,v=p.wireShader,b=p.pointShader,y=p.pickShader,x=p.pointPickShader,w=p.contourShader,_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(t,e,r,n,i,o,a,s,l,c,d,u,h,f,p,m,g,v,b,y,x,w,k,A,T,M,S){this.gl=t,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=o,this.pointPickShader=a,this.contourShader=s,this.trianglePositions=l,this.triangleColors=d,this.triangleNormals=h,this.triangleUVs=u,this.triangleIds=c,this.triangleVAO=f,this.triangleCount=0,this.lineWidth=1,this.edgePositions=p,this.edgeColors=g,this.edgeUVs=v,this.edgeIds=m,this.edgeVAO=b,this.edgeCount=0,this.pointPositions=y,this.pointColors=w,this.pointUVs=k,this.pointSizes=A,this.pointIds=x,this.pointVAO=T,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=M,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=_,this._view=_,this._projection=_,this._resolution=[1,1]}var A=k.prototype;function T(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}function M(t){var e=n(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function S(t){var e=n(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function C(t){var e=n(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function E(t){var e=n(t,w.vertex,w.fragment);return e.attributes.position.location=0,e}A.isOpaque=function(){return!this.hasAlpha},A.isTransparent=function(){return this.hasAlpha},A.pickSlots=1,A.setPickBase=function(t){this.pickId=t},A.highlight=function(t){if(t&&this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,o=r.length,a=f.mallocFloat32(6*o),s=0,l=0;l0&&((u=this.triShader).bind(),u.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((u=this.lineShader).bind(),u.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((u=this.pointShader).bind(),u.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((u=this.contourShader).bind(),u.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},A.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||_,n=t.view||_,i=t.projection||_,o=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],a=0;a<3;++a)o[0][a]=Math.max(o[0][a],this.clipBounds[0][a]),o[1][a]=Math.min(o[1][a],this.clipBounds[1][a]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:o,pickId:this.pickId/255};(s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},A.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),o=0;oi[A]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=d,r.uniforms.color=g[t],r.uniforms.angle=v[t],o.drawArrays(o.TRIANGLES,i[A],i[T]-i[A]))),b[t]&&k&&(d[1^t]-=M*f*y[t],r.uniforms.dataAxis=u,r.uniforms.screenOffset=d,r.uniforms.color=x[t],r.uniforms.angle=w[t],o.drawArrays(o.TRIANGLES,_,k)),d[1^t]=M*s[2+(1^t)]-1,p[t+2]&&(d[1^t]+=M*f*m[t+2],Ai[A]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=d,r.uniforms.color=g[t+2],r.uniforms.angle=v[t+2],o.drawArrays(o.TRIANGLES,i[A],i[T]-i[A]))),b[t+2]&&k&&(d[1^t]+=M*f*y[t+2],r.uniforms.dataAxis=u,r.uniforms.screenOffset=d,r.uniforms.color=x[t+2],r.uniforms.angle=w[t+2],o.drawArrays(o.TRIANGLES,_,k))}),m.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,o=r.screenBox,a=r.titleCenter,s=r.titleAngle,l=r.titleColor,c=r.pixelRatio;if(this.titleCount){for(var d=0;d<2;++d)e[d]=2*(a[d]*c-o[d])/(o[2+d]-o[d])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),m.bind=(h=[0,0],f=[0,0],p=[0,0],function(){var t=this.plot,e=this.shader,r=t._tickBounds,n=t.dataBox,i=t.screenBox,o=t.viewBox;e.bind();for(var a=0;a<2;++a){var s=r[a],l=r[a+2]-s,c=.5*(n[a+2]+n[a]),d=n[a+2]-n[a],u=o[a],m=o[a+2]-u,g=i[a],v=i[a+2]-g;f[a]=2*l/d*m/v,h[a]=2*(s-c)/d*m/v}p[1]=2*t.pixelRatio/(i[3]-i[1]),p[0]=p[1]*(i[3]-i[1])/(i[2]-i[0]),e.uniforms.dataScale=f,e.uniforms.dataShift=h,e.uniforms.textScale=p,this.vbo.bind(),e.attributes.textCoordinate.pointer()}),m.update=function(t){var e,r,n,i,a,s=[],l=t.ticks,c=t.bounds;for(a=0;a<2;++a){var d=[Math.floor(s.length/3)],u=[-1/0],h=l[a];for(e=0;e=0){var m=e[p]-n[p]*(e[p+2]-e[p])/(n[p+2]-n[p]);0===p?a.drawLine(m,e[1],m,e[3],f[p],h[p]):a.drawLine(e[0],m,e[2],m,f[p],h[p])}}for(p=0;p=0;--t)this.objects[t].dispose();for(this.objects.length=0,t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},c.removeObject=function(t){for(var e=this.objects,r=0;rMath.abs(e))c.rotate(o,0,0,-t*r*Math.PI*p.rotateSpeed/window.innerWidth);else if(!p._ortho){var a=-p.zoomSpeed*i*e/window.innerHeight*(o-c.lastT())/20;c.pan(o,0,0,u*(Math.exp(a)-1))}}}),!0)},p.enableMouseListeners(),p};var n=r(3025),i=r(6296),o=r(351),a=r(8512),s=r(24),l=r(7520)},799:function(t,e,r){var n=r(3236),i=r(9405),o=n(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),a=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);t.exports=function(t){return i(t,o,a,null,[{name:"position",type:"vec2"}])}},4100:function(t,e,r){"use strict";var n=r(4437),i=r(3837),o=r(5445),a=r(4449),s=r(3589),l=r(2260),c=r(7169),d=r(351),u=r(4772),h=r(4040),f=r(799),p=r(9216)({tablet:!0,featureDetect:!0});function m(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function g(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e<0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}return e>0?(r=Math.round(Math.pow(10,e)),Math.ceil(t/r)*r):Math.ceil(t)}function v(t){return"boolean"!=typeof t||t}t.exports={createScene:function(t){(t=t||{}).camera=t.camera||{};var e=t.canvas;e||(e=document.createElement("canvas"),t.container?t.container.appendChild(e):document.body.appendChild(e));var r=t.gl;if(r||(t.glOptions&&(p=!!t.glOptions.preserveDrawingBuffer),r=function(t,e){var r=null;try{(r=t.getContext("webgl",e))||(r=t.getContext("experimental-webgl",e))}catch(t){return null}return r}(e,t.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:p})),!r)throw new Error("webgl not supported");var b=t.bounds||[[-10,-10,-10],[10,10,10]],y=new m,x=l(r,r.drawingBufferWidth,r.drawingBufferHeight,{preferFloat:!p}),w=f(r),_=t.cameraObject&&!0===t.cameraObject._ortho||t.camera.projection&&"orthographic"===t.camera.projection.type||!1,k={eye:t.camera.eye||[2,0,0],center:t.camera.center||[0,0,0],up:t.camera.up||[0,1,0],zoomMin:t.camera.zoomMax||.1,zoomMax:t.camera.zoomMin||100,mode:t.camera.mode||"turntable",_ortho:_},A=t.axes||{},T=i(r,A);T.enable=!A.disable;var M=t.spikes||{},S=a(r,M),C=[],E=[],L=[],z=[],O=!0,D=!0,I={view:null,projection:new Array(16),model:new Array(16),_ortho:!1},R=(D=!0,[r.drawingBufferWidth,r.drawingBufferHeight]),F=t.cameraObject||n(e,k),P={gl:r,contextLost:!1,pixelRatio:t.pixelRatio||1,canvas:e,selection:y,camera:F,axes:T,axesPixels:null,spikes:S,bounds:b,objects:C,shape:R,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:v(t.autoResize),autoBounds:v(t.autoBounds),autoScale:!!t.autoScale,autoCenter:v(t.autoCenter),clipToBounds:v(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:I,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(t){this.aspect[0]=t.x,this.aspect[1]=t.y,this.aspect[2]=t.z,D=!0},setBounds:function(t,e){this.bounds[0][t]=e.min,this.bounds[1][t]=e.max},setClearColor:function(t){this.clearColor=t},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},j=[r.drawingBufferWidth/P.pixelRatio|0,r.drawingBufferHeight/P.pixelRatio|0];function N(){if(!P._stopped&&P.autoResize){var t=e.parentNode,r=1,n=1;t&&t!==document.body?(r=t.clientWidth,n=t.clientHeight):(r=window.innerWidth,n=window.innerHeight);var i=0|Math.ceil(r*P.pixelRatio),o=0|Math.ceil(n*P.pixelRatio);if(i!==e.width||o!==e.height){e.width=i,e.height=o;var a=e.style;a.position=a.position||"absolute",a.left="0px",a.top="0px",a.width=r+"px",a.height=n+"px",O=!0}}}function B(){for(var t=C.length,e=z.length,n=0;n0&&0===L[e-1];)L.pop(),z.pop().dispose()}function U(){if(P.contextLost)return!0;r.isContextLost()&&(P.contextLost=!0,P.mouseListener.enabled=!1,P.selection.object=null,P.oncontextloss&&P.oncontextloss())}P.autoResize&&N(),window.addEventListener("resize",N),P.update=function(t){P._stopped||(t=t||{},O=!0,D=!0)},P.add=function(t){P._stopped||(t.axes=T,C.push(t),E.push(-1),O=!0,D=!0,B())},P.remove=function(t){if(!P._stopped){var e=C.indexOf(t);e<0||(C.splice(e,1),E.pop(),O=!0,D=!0,B())}},P.dispose=function(){if(!P._stopped&&(P._stopped=!0,window.removeEventListener("resize",N),e.removeEventListener("webglcontextlost",U),P.mouseListener.enabled=!1,!P.contextLost)){T.dispose(),S.dispose();for(var t=0;ty.distance)continue;for(var c=0;c 1.0) {\n discard;\n }\n baseColor = mix(borderColor, color, step(radius, centerFraction));\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n }\n}\n"]),e.pickVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n"]),e.pickFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n"])},4696:function(t,e,r){"use strict";var n=r(9405),i=r(2762),o=r(1888),a=r(6640);function s(t,e,r,n,i){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}t.exports=function(t,e){var r=t.gl,o=new s(t,i(r),i(r),n(r,a.pointVertex,a.pointFragment),n(r,a.pickVertex,a.pickFragment));return o.update(e),t.addObject(o),o};var l,c,d=s.prototype;d.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},d.update=function(t){var e;function r(e,r){return e in t?t[e]:r}t=t||{},this.sizeMin=r("sizeMin",.5),this.sizeMax=r("sizeMax",20),this.color=r("color",[1,0,0,1]).slice(),this.areaRatio=r("areaRatio",1),this.borderColor=r("borderColor",[0,0,0,1]).slice(),this.blend=r("blend",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,a=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,s=t.positions,l=i?s:o.mallocFloat32(s.length),c=a?t.idToIndex:o.mallocInt32(n);if(i||l.set(s),!a)for(l.set(s),e=0;e>>1;for(r=0;r=e[0]&&o<=e[2]&&a>=e[1]&&a<=e[3]&&n++}return n}(this.points,i),d=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/o,l[4]=2/a,l[6]=-2*i[0]/o-1,l[7]=-2*i[1]/a-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=d<5,r.uniforms.pointSize=d,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),e&&(c[0]=255&t,c[1]=t>>8&255,c[2]=t>>16&255,c[3]=t>>24&255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=c,this.pickOffset=t);var u=n.getParameter(n.BLEND),h=n.getParameter(n.DITHER);return u&&!this.blend&&n.disable(n.BLEND),h&&n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),u&&!this.blend&&n.enable(n.BLEND),h&&n.enable(n.DITHER),t+this.pointCount}),d.draw=d.unifiedDraw,d.drawPick=d.unifiedDraw,d.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var o=r-n,a=this.points;return{object:this,pointId:o,dataCoord:[a[2*o],a[2*o+1]]}}},783:function(t){t.exports=function(t,e,r,n){var i,o,a,s,l,c=e[0],d=e[1],u=e[2],h=e[3],f=r[0],p=r[1],m=r[2],g=r[3];return(o=c*f+d*p+u*m+h*g)<0&&(o=-o,f=-f,p=-p,m=-m,g=-g),1-o>1e-6?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-n)*i)/a,l=Math.sin(n*i)/a):(s=1-n,l=n),t[0]=s*c+l*f,t[1]=s*d+l*p,t[2]=s*u+l*m,t[3]=s*h+l*g,t}},5964:function(t){"use strict";t.exports=function(t){return t||0===t?t.toString():""}},9366:function(t,e,r){"use strict";var n=r(4359);t.exports=function(t,e,r){var o=[e.style,e.weight,e.variant,e.family].join("_"),a=i[o];if(a||(a=i[o]={}),t in a)return a[t];var s={textAlign:"center",textBaseline:"middle",lineHeight:1,font:e.family,fontStyle:e.style,fontWeight:e.weight,fontVariant:e.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},l=n(t,s);s.triangles=!1;var c,d,u=n(t,s);if(r&&1!==r){for(c=0;c max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),a=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * view * model * vec4(position, 1);\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),c=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),d=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],u={vertex:o,fragment:l,attributes:d},h={vertex:a,fragment:l,attributes:d},f={vertex:s,fragment:l,attributes:d},p={vertex:o,fragment:c,attributes:d},m={vertex:a,fragment:c,attributes:d},g={vertex:s,fragment:c,attributes:d};function v(t,e){var r=n(t,e),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}e.createPerspective=function(t){return v(t,u)},e.createOrtho=function(t){return v(t,h)},e.createProject=function(t){return v(t,f)},e.createPickPerspective=function(t){return v(t,p)},e.createPickOrtho=function(t){return v(t,m)},e.createPickProject=function(t){return v(t,g)}},8418:function(t,e,r){"use strict";var n=r(5219),i=r(2762),o=r(8116),a=r(1888),s=r(6760),l=r(1283),c=r(9366),d=r(5964),u=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(t,e){var r=t[0],n=t[1],i=t[2],o=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*i+e[12]*o,t[1]=e[1]*r+e[5]*n+e[9]*i+e[13]*o,t[2]=e[2]*r+e[6]*n+e[10]*i+e[14]*o,t[3]=e[3]*r+e[7]*n+e[11]*i+e[15]*o,t}function f(t,e,r,n){return h(n,n),h(n,n),h(n,n)}function p(t,e){this.index=t,this.dataCoordinate=this.position=e}function m(t){return!0===t||t>1?1:t}function g(t,e,r,n,i,o,a,s,l,c,d,u){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=o,this.glyphBuffer=a,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=d,this.pickProjectShader=u,this.points=[],this._selectResult=new p(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}t.exports=function(t){var e=t.gl,r=l.createPerspective(e),n=l.createOrtho(e),a=l.createProject(e),s=l.createPickPerspective(e),c=l.createPickOrtho(e),d=l.createPickProject(e),u=i(e),h=i(e),f=i(e),p=i(e),m=new g(e,r,n,a,u,h,f,p,o(e,[{buffer:u,size:3,type:e.FLOAT},{buffer:h,size:4,type:e.FLOAT},{buffer:f,size:2,type:e.FLOAT},{buffer:p,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),s,c,d);return m.update(t),m};var v=g.prototype;v.pickSlots=1,v.setPickBase=function(t){this.pickId=t},v.isTransparent=function(){if(this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectHasAlpha)return!0;return!1},v.isOpaque=function(){if(!this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&!this.projectHasAlpha)return!0;return!1};var b=[0,0],y=[0,0,0],x=[0,0,0],w=[0,0,0,1],_=[0,0,0,1],k=u.slice(),A=[0,0,0],T=[[0,0,0],[0,0,0]];function M(t){return t[0]=t[1]=t[2]=0,t}function S(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function C(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}var E=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function L(t,e,r,n,i,o,a){var l=r.gl;if((o===r.projectHasAlpha||a)&&function(t,e,r,n){var i,o=e.axesProject,a=e.gl,l=t.uniforms,c=r.model||u,d=r.view||u,h=r.projection||u,p=e.axesBounds,m=function(t){for(var e=T,r=0;r<2;++r)for(var n=0;n<3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);i=e.axes&&e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],b[0]=2/a.drawingBufferWidth,b[1]=2/a.drawingBufferHeight,t.bind(),l.view=d,l.projection=h,l.screenSize=b,l.highlightId=e.highlightId,l.highlightScale=e.highlightScale,l.clipBounds=m,l.pickGroup=e.pickId/255,l.pixelRatio=n;for(var g=0;g<3;++g)if(o[g]){l.scale=e.projectScale[g],l.opacity=e.projectOpacity[g];for(var v=k,E=0;E<16;++E)v[E]=0;for(E=0;E<4;++E)v[5*E]=1;v[5*g]=0,i[g]<0?v[12+g]=p[0][g]:v[12+g]=p[1][g],s(v,c,v),l.model=v;var L=(g+1)%3,z=(g+2)%3,O=M(y),D=M(x);O[L]=1,D[z]=1;var I=f(0,0,0,S(w,O)),R=f(0,0,0,S(_,D));if(Math.abs(I[1])>Math.abs(R[1])){var F=I;I=R,R=F,F=O,O=D,D=F;var P=L;L=z,z=P}I[0]<0&&(O[L]=-1),R[1]>0&&(D[z]=-1);var j=0,N=0;for(E=0;E<4;++E)j+=Math.pow(c[4*L+E],2),N+=Math.pow(c[4*z+E],2);O[L]/=Math.sqrt(j),D[z]/=Math.sqrt(N),l.axes[0]=O,l.axes[1]=D,l.fragClipBounds[0]=C(A,m[0],g,-1e8),l.fragClipBounds[1]=C(A,m[1],g,1e8),e.vao.bind(),e.vao.draw(a.TRIANGLES,e.vertexCount),e.lineWidth>0&&(a.lineWidth(e.lineWidth*n),e.vao.draw(a.LINES,e.lineVertexCount,e.vertexCount)),e.vao.unbind()}}(e,r,n,i),o===r.hasAlpha||a){t.bind();var c=t.uniforms;c.model=n.model||u,c.view=n.view||u,c.projection=n.projection||u,b[0]=2/l.drawingBufferWidth,b[1]=2/l.drawingBufferHeight,c.screenSize=b,c.highlightId=r.highlightId,c.highlightScale=r.highlightScale,c.fragClipBounds=E,c.clipBounds=r.axes.bounds,c.opacity=r.opacity,c.pickGroup=r.pickId/255,c.pixelRatio=i,r.vao.bind(),r.vao.draw(l.TRIANGLES,r.vertexCount),r.lineWidth>0&&(l.lineWidth(r.lineWidth*i),r.vao.draw(l.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function z(t,e,r,i){var o;o=Array.isArray(t)?e=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},v.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},v.update=function(t){if("perspective"in(t=t||{})&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if("projectScale"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in t){Array.isArray(t.projectOpacity)?this.projectOpacity=t.projectOpacity.slice():(r=+t.projectOpacity,this.projectOpacity=[r,r,r]);for(var n=0;n<3;++n)this.projectOpacity[n]=m(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in t&&(this.opacity=m(t.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,o,s=t.position,l={family:t.font||"normal",style:t.fontStyle||"normal",weight:t.fontWeight||"normal",variant:t.fontVariant||"normal"},c=t.alignment||[0,0];if(2===c.length)i=c[0],o=c[1];else for(i=[],o=[],n=0;n0){var D=0,I=y,R=[0,0,0,1],F=[0,0,0,1],P=Array.isArray(f)&&Array.isArray(f[0]),j=Array.isArray(v)&&Array.isArray(v[0]);t:for(n=0;n0?1-M[0][0]:q<0?1+M[1][0]:1,Y*=Y>0?1-M[0][1]:Y<0?1+M[1][1]:1],X=A.cells||[],$=A.positions||[];for(k=0;k0){var v=r*d;a.drawBox(u-v,h-v,f+v,h+v,o),a.drawBox(u-v,p-v,f+v,p+v,o),a.drawBox(u-v,h-v,u+v,p+v,o),a.drawBox(f-v,h-v,f+v,p+v,o)}}}},s.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},3589:function(t,e,r){"use strict";t.exports=function(t,e){var r=e[0],o=e[1];return new l(t,n(t,r,o,{}),i.mallocUint8(r*o*4))};var n=r(2260),i=r(1888),o=r(9618),a=r(8828).nextPow2;function s(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function l(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}var c=l.prototype;Object.defineProperty(c,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(t){if(this.gl){this.fbo.shape=t;var e=this.fbo.shape[0],r=this.fbo.shape[1];if(r*e*4>this.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(a(r*e*4)),o=0;or)for(t=r;te)for(t=e;t=0){for(var k=0|_.type.charAt(_.type.length-1),A=new Array(k),T=0;T=0;)M+=1;w[b]=M}var S=new Array(r.length);function C(){h.program=a.program(f,h._vref,h._fref,x,w);for(var t=0;t=0){if((p=h.charCodeAt(h.length-1)-48)<2||p>4)throw new n("","Invalid data type for attribute "+u+": "+h);s(t,e,f[0],i,p,o,u)}else{if(!(h.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+u+": "+h);var p;if((p=h.charCodeAt(h.length-1)-48)<2||p>4)throw new n("","Invalid data type for attribute "+u+": "+h);l(t,e,f,i,p,o,u)}}}return o};var n=r(8866);function i(t,e,r,n,i,o){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=o}var o=i.prototype;o.pointer=function(t,e,r,n){var i=this,o=i._gl,a=i._locations[i._index];o.vertexAttribPointer(a,i._dimension,t||o.FLOAT,!!e,r||0,n||0),o.enableVertexAttribArray(a)},o.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(o,"location",{get:function(){return this._locations[this._index]},set:function(t){return t!==this._locations[this._index]&&(this._locations[this._index]=0|t,this._wrapper.program=null),0|t}});var a=[function(t,e,r){return void 0===r.length?t.vertexAttrib1f(e,r):t.vertexAttrib1fv(e,r)},function(t,e,r,n){return void 0===r.length?t.vertexAttrib2f(e,r,n):t.vertexAttrib2fv(e,r)},function(t,e,r,n,i){return void 0===r.length?t.vertexAttrib3f(e,r,n,i):t.vertexAttrib3fv(e,r)},function(t,e,r,n,i,o){return void 0===r.length?t.vertexAttrib4f(e,r,n,i,o):t.vertexAttrib4fv(e,r)}];function s(t,e,r,n,o,s,l){var c=a[o],d=new i(t,e,r,n,o,c);Object.defineProperty(s,l,{set:function(e){return t.disableVertexAttribArray(n[r]),c(t,n[r],e),e},get:function(){return d},enumerable:!0})}function l(t,e,r,n,i,o,a){for(var l=new Array(i),c=new Array(i),d=0;d4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+b);t["uniformMatrix"+v+"fv"](s[u],!1,h);break}throw new i("","Unknown uniform data type for "+name+": "+b)}if((v=b.charCodeAt(b.length-1)-48)<2||v>4)throw new i("","Invalid data type");switch(b.charAt(0)){case"b":case"i":t["uniform"+v+"iv"](s[u],h);break;case"v":t["uniform"+v+"fv"](s[u],h);break;default:throw new i("","Unrecognized data type for vector "+name+": "+b)}}}}}}function c(t,e){if("object"!=typeof e)return[[t,e]];var r=[];for(var n in e){var i=e[n],o=t;parseInt(n)+""===n?o+="["+n+"]":o+="."+n,"object"==typeof i?r.push.apply(r,c(o,i)):r.push([o,i])}return r}function d(t,e,n){if("object"==typeof n){var c=u(n);Object.defineProperty(t,e,{get:o(c),set:l(n),enumerable:!0,configurable:!1})}else s[n]?Object.defineProperty(t,e,{get:(d=n,function(t,e,r){return t.getUniform(e.program,r[d])}),set:l(n),enumerable:!0,configurable:!1}):t[e]=function(t){switch(t){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var e=t.indexOf("vec");if(0<=e&&e<=1&&t.length===4+e){if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new i("","Invalid data type");return"b"===t.charAt(0)?a(r,!1):a(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r;if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+t);return a(r*r,0)}throw new i("","Unknown uniform data type for "+name+": "+t)}}(r[n].type);var d}function u(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r1){s[0]in o||(o[s[0]]=[]),o=o[s[0]];for(var l=1;l1)for(var l=0;l 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, tubeScale;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),o=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),a=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * view * tubePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);e.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},e.pickShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(t,e,r){"use strict";var n=r(2931),i=r(9970),o=["xyz","xzy","yxz","yzx","zxy","zyx"],a=function(t,e){var r,n=t.length;for(r=0;re)return r-1}return r},s=function(t,e,r){return tr?r:t},l=function(t){var e=1/0;t.sort((function(t,e){return t-e}));for(var r=t.length,n=1;nu-1||b>h-1||y>f-1)return n.create();var x,w,_,k,A,T,M=o[0][p],S=o[0][v],C=o[1][m],E=o[1][b],L=o[2][g],z=(l-M)/(S-M),O=(c-C)/(E-C),D=(d-L)/(o[2][y]-L);switch(isFinite(z)||(z=.5),isFinite(O)||(O=.5),isFinite(D)||(D=.5),r.reversedX&&(p=u-1-p,v=u-1-v),r.reversedY&&(m=h-1-m,b=h-1-b),r.reversedZ&&(g=f-1-g,y=f-1-y),r.filled){case 5:A=g,T=y,_=m*f,k=b*f,x=p*f*h,w=v*f*h;break;case 4:A=g,T=y,x=p*f,w=v*f,_=m*f*u,k=b*f*u;break;case 3:_=m,k=b,A=g*h,T=y*h,x=p*h*f,w=v*h*f;break;case 2:_=m,k=b,x=p*h,w=v*h,A=g*h*u,T=y*h*u;break;case 1:x=p,w=v,A=g*u,T=y*u,_=m*u*f,k=b*u*f;break;default:x=p,w=v,_=m*u,k=b*u,A=g*u*h,T=y*u*h}var I=i[x+_+A],R=i[x+_+T],F=i[x+k+A],P=i[x+k+T],j=i[w+_+A],N=i[w+_+T],B=i[w+k+A],U=i[w+k+T],G=n.create(),V=n.create(),H=n.create(),W=n.create();n.lerp(G,I,j,z),n.lerp(V,R,N,z),n.lerp(H,F,B,z),n.lerp(W,P,U,z);var q=n.create(),Y=n.create();n.lerp(q,G,H,O),n.lerp(Y,V,W,O);var Z=n.create();return n.lerp(Z,q,Y,D),Z}(e,t,f)},m=t.getDivergence||function(t,e){var r=n.create(),i=1e-4;n.add(r,t,[i,0,0]);var o=p(r);n.subtract(o,o,e),n.scale(o,o,1/i),n.add(r,t,[0,i,0]);var a=p(r);n.subtract(a,a,e),n.scale(a,a,1/i),n.add(r,t,[0,0,i]);var s=p(r);return n.subtract(s,s,e),n.scale(s,s,1/i),n.add(r,o,a),n.add(r,r,s),r},g=[],v=e[0][0],b=e[0][1],y=e[0][2],x=e[1][0],w=e[1][1],_=e[1][2],k=function(t){var e=t[0],r=t[1],n=t[2];return!(ex||rw||n_)},A=10*n.distance(e[0],e[1])/c,T=A*A,M=1,S=0,C=r.length;C>1&&(M=function(t){for(var e=[],r=[],n=[],i={},o={},a={},s=t.length,c=0;cS&&(S=P),R.push(P),g.push({points:z,velocities:O,divergences:R});for(var j=0;j<100*c&&z.lengthT&&n.scale(N,N,A/Math.sqrt(B)),n.add(N,N,L),D=p(N),n.squaredDistance(I,N)-T>-1e-4*T&&(z.push(N),I=N,O.push(D),F=m(N,D),P=n.length(F),isFinite(P)&&P>S&&(S=P),R.push(P)),L=N}}var U=function(t,e,r,o){for(var a=0,s=0;s0)for(k=0;k<8;k++){var A=(k+1)%8;c.push(h[k],f[k],f[A],f[A],h[A],h[k]),u.push(b,v,v,v,b,b),p.push(m,g,g,g,m,m);var T=c.length;d.push([T-6,T-5,T-4],[T-3,T-2,T-1])}var M=h;h=f,f=M;var S=b;b=v,v=S;var C=m;m=g,g=C}return{positions:c,cells:d,vectors:u,vertexIntensity:p}}(t,r,o,a)})),u=[],h=[],f=[],p=[];for(s=0;s max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (\n kill > 0.0 ||\n vColor.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n ) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color — in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);e.createShader=function(t){var e=n(t,o,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},e.createPickShader=function(t){var e=n(t,o,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},e.createContourShader=function(t){var e=n(t,s,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},e.createPickContourShader=function(t){var e=n(t,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},9499:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl,r=b(e),n=x(e),s=y(e),l=w(e),c=i(e),d=o(e,[{buffer:c,size:4,stride:_,offset:0},{buffer:c,size:3,stride:_,offset:16},{buffer:c,size:3,stride:_,offset:28}]),u=i(e),h=o(e,[{buffer:u,size:4,stride:20,offset:0},{buffer:u,size:1,stride:20,offset:16}]),f=i(e),p=o(e,[{buffer:f,size:2,type:e.FLOAT}]),m=a(e,1,S,e.RGBA,e.UNSIGNED_BYTE);m.minFilter=e.LINEAR,m.magFilter=e.LINEAR;var g=new C(e,[0,0],[[0,0,0],[0,0,0]],r,n,c,d,m,s,l,u,h,f,p,[0,0,0]),v={levels:[[],[],[]]};for(var k in t)v[k]=t[k];return v.colormap=v.colormap||"jet",g.update(v),g};var n=r(8828),i=r(2762),o=r(8116),a=r(7766),s=r(1888),l=r(6729),c=r(5298),d=r(9994),u=r(9618),h=r(3711),f=r(6760),p=r(7608),m=r(2478),g=r(6199),v=r(990),b=v.createShader,y=v.createContourShader,x=v.createPickShader,w=v.createPickContourShader,_=40,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],A=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],T=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function M(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}!function(){for(var t=0;t<3;++t){var e=T[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();var S=256;function C(t,e,r,n,i,o,a,l,c,d,h,f,p,m,g){this.gl=t,this.shape=e,this.bounds=r,this.objectOffset=g,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=o,this._vao=a,this._colorMap=l,this._contourShader=c,this._contourPickShader=d,this._contourBuffer=h,this._contourVAO=f,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new M([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=p,this._dynamicVAO=m,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[u(s.mallocFloat(1024),[0,0]),u(s.mallocFloat(1024),[0,0]),u(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var E=C.prototype;E.genColormap=function(t,e){var r=!1,n=d([l({colormap:t,nshades:S,format:"rgba"}).map((function(t,n){var i=e?function(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}(n/255,e):t[3];return i<1&&(r=!0),[t[0],t[1],t[2],255*i]}))]);return c.divseq(n,255),this.hasAlphaScale=r,n},E.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},E.isOpaque=function(){return!this.isTransparent()},E.pickSlots=1,E.setPickBase=function(t){this.pickId=t};var L=[0,0,0],z={showSurface:!1,showContour:!1,projections:[k.slice(),k.slice(),k.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function O(t,e){var r,n,i,o=e.axes&&e.axes.lastCubeProps.axis||L,a=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(a=a||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=z.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(o[r]>0)][r],f(l,t.model,l);var c=z.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)c[i][n]=t.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return z.showSurface=a,z.showContour=s,z}var D={model:k,view:k,projection:k,inverseModel:k.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},I=k.slice(),R=[1,0,0,0,1,0,0,0,1];function F(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=D;n.model=t.model||k,n.view=t.view||k,n.projection=t.projection||k,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.objectOffset=this.objectOffset,n.contourColor=this.contourColor[0],n.inverseModel=p(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var o=n.clipBounds[i],a=0;a<3;++a)o[a]=Math.min(Math.max(this.clipBounds[i][a],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=R,n.vertexColor=this.vertexColor;var s=I;for(f(s,n.view,n.model),f(s,n.projection,s),p(s,s),i=0;i<3;++i)n.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i<3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i<3;++i){var c=s[12+i];for(a=0;a<3;++a)c+=s[4*a+i]*this.lightPosition[a];n.lightPosition[i]=c/l}var d=O(n,this);if(d.showSurface){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=d.projections[i],this._shader.uniforms.clipBounds=d.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(d.showContour){var u=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,u.bind(),u.uniforms=n;var h=this._contourVAO;for(h.bind(),i=0;i<3;++i)for(u.uniforms.permutation=T[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),a=0;a>4)/16)/255,i=Math.floor(n),o=n-i,a=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(a),l=a-s;i+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var d=0;d<2;++d)for(var u=d?o:1-o,h=0;h<2;++h)for(var f=i+d,p=s+h,g=u*(h?l:1-l),v=0;v<3;++v)c[v]+=this._field[v].get(f,p)*g;for(var b=this._pickResult.level,y=0;y<3;++y)if(b[y]=m.le(this.contourLevels[y],c[y]),b[y]<0)this.contourLevels[y].length>0&&(b[y]=0);else if(b[y]Math.abs(w-c[y])&&(b[y]+=1)}for(r.index[0]=o<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=a/e[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},E.padField=function(t,e){var r=e.shape.slice(),n=t.shape.slice();c.assign(t.lo(1,1).hi(r[0],r[1]),e),c.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),c.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),c.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),c.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))},E.update=function(t){t=t||{},this.objectOffset=t.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in t&&(this.contourWidth=j(t.contourWidth,Number)),"showContour"in t&&(this.showContour=j(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=j(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=B(t.contourColor)),"contourProject"in t&&(this.contourProject=j(t.contourProject,(function(t){return j(t,Boolean)}))),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=B(t.dynamicColor)),"dynamicTint"in t&&(this.dynamicTint=j(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=j(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"opacityscale"in t&&(this.opacityscale=t.opacityscale),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0),"colormap"in t&&this._colorMap.setPixels(this.genColormap(t.colormap,this.opacityscale));var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var i=(e.shape[0]+2)*(e.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=u(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),this.padField(this._field[2],e),this.shape=e.shape.slice();for(var o=this.shape,a=0;a<2;++a)this._field[2].size>this._field[a].data.length&&(s.freeFloat(this._field[a].data),this._field[a].data=s.mallocFloat(this._field[2].size)),this._field[a]=u(this._field[a].data,[o[0]+2,o[1]+2]);if(t.coords){var l=t.coords;if(!Array.isArray(l)||3!==l.length)throw new Error("gl-surface: invalid coordinates for x/y");for(a=0;a<2;++a){var c=l[a];for(v=0;v<2;++v)if(c.shape[v]!==o[v])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[a],c)}}else if(t.ticks){var d=t.ticks;if(!Array.isArray(d)||2!==d.length)throw new Error("gl-surface: invalid ticks");for(a=0;a<2;++a){var f=d[a];if((Array.isArray(f)||f.length)&&(f=u(f)),f.shape[0]!==o[a])throw new Error("gl-surface: invalid tick length");var p=u(f.data,o);p.stride[a]=f.stride[0],p.stride[1^a]=0,this.padField(this._field[a],p)}}else{for(a=0;a<2;++a){var m=[0,0];m[a]=1,this._field[a]=u(this._field[a].data,[o[0]+2,o[1]+2],m,0)}this._field[0].set(0,0,0);for(var v=0;v0){for(var yt=0;yt<5;++yt)K.pop();U-=1}continue t}K.push(nt[0],nt[1],at[0],at[1],nt[2]),U+=1}}rt.push(U)}this._contourOffsets[Q]=et,this._contourCounts[Q]=rt}var xt=s.mallocFloat(K.length);for(a=0;as||a[1]<0||a[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=p(a,e.stride.slice()),c=0;"float32"===r?c=t.FLOAT:"float64"===r?(c=t.FLOAT,l=!1,r="float32"):"uint8"===r?c=t.UNSIGNED_BYTE:(c=t.UNSIGNED_BYTE,l=!1,r="uint8");var u,f,g=0;if(2===a.length)g=t.LUMINANCE,a=[a[0],a[1],1],e=n(e.data,a,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==a.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===a[2])g=t.ALPHA;else if(2===a[2])g=t.LUMINANCE_ALPHA;else if(3===a[2])g=t.RGB;else{if(4!==a[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=t.RGBA}}c!==t.FLOAT||t.getExtension("OES_texture_float")||(c=t.UNSIGNED_BYTE,l=!1);var v=e.size;if(l)u=0===e.offset&&e.data.length===v?e.data:e.data.subarray(e.offset,e.offset+v);else{var b=[a[2],a[2]*a[0],1];f=o.malloc(v,r);var y=n(f,a,b,0);"float32"!==r&&"float64"!==r||c!==t.UNSIGNED_BYTE?i.assign(y,e):d(y,e),u=f.subarray(0,v)}var x=m(t);return t.texImage2D(t.TEXTURE_2D,0,g,a[0],a[1],0,g,c,u),l||o.free(f),new h(t,x,a[0],a[1],g,c)}(t,e)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var a=null,s=null,l=null;function c(t){return"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&t instanceof ImageData}var d=function(t,e){i.muls(t,e,255)};function u(t,e,r){var n=t.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(e<0||e>i||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function h(t,e,r,n,i,o){this.gl=t,this.handle=e,this.format=i,this.type=o,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var a=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return a._wrapS},set:function(t){return a.wrapS=t}},{get:function(){return a._wrapT},set:function(t){return a.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return a._shape[0]},set:function(t){return a.width=t}},{get:function(){return a._shape[1]},set:function(t){return a.height=t}}]),this._shapeVector=l}var f=h.prototype;function p(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function m(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function g(t,e,r,n,i){var o=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>o||r<0||r>o)throw new Error("gl-texture2d: Invalid texture shape");if(i===t.FLOAT&&!t.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var a=m(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new h(t,a,e,r,n,i)}Object.defineProperties(f,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&a.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&a.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(l.indexOf(t[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return u(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return u(this,t|=0,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,u(this,this._shape[0],t),t}}}),f.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},f.dispose=function(){this.gl.deleteTexture(this.handle)},f.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},f.setPixels=function(t,e,r,a){var s=this.gl;this.bind(),Array.isArray(e)?(a=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),a=a||0;var l=c(t)?t:t.raw;if(l)this._mipLevels.indexOf(a)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(a)):s.texSubImage2D(s.TEXTURE_2D,a,e,r,this.format,this.type,l);else{if(!(t.shape&&t.stride&&t.data))throw new Error("gl-texture2d: Unsupported data type");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>a||r+t.shape[0]>this._shape[0]>>>a||e<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(t,e,r,a,s,l,c,u){var h=u.dtype,f=u.shape.slice();if(f.length<2||f.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var m=0,g=0,v=p(f,u.stride.slice());if("float32"===h?m=t.FLOAT:"float64"===h?(m=t.FLOAT,v=!1,h="float32"):"uint8"===h?m=t.UNSIGNED_BYTE:(m=t.UNSIGNED_BYTE,v=!1,h="uint8"),2===f.length)g=t.LUMINANCE,f=[f[0],f[1],1],u=n(u.data,f,[u.stride[0],u.stride[1],1],u.offset);else{if(3!==f.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===f[2])g=t.ALPHA;else if(2===f[2])g=t.LUMINANCE_ALPHA;else if(3===f[2])g=t.RGB;else{if(4!==f[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=t.RGBA}f[2]}if(g!==t.LUMINANCE&&g!==t.ALPHA||s!==t.LUMINANCE&&s!==t.ALPHA||(g=s),g!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var b=u.size,y=c.indexOf(a)<0;if(y&&c.push(a),m===l&&v)0===u.offset&&u.data.length===b?y?t.texImage2D(t.TEXTURE_2D,a,s,f[0],f[1],0,s,l,u.data):t.texSubImage2D(t.TEXTURE_2D,a,e,r,f[0],f[1],s,l,u.data):y?t.texImage2D(t.TEXTURE_2D,a,s,f[0],f[1],0,s,l,u.data.subarray(u.offset,u.offset+b)):t.texSubImage2D(t.TEXTURE_2D,a,e,r,f[0],f[1],s,l,u.data.subarray(u.offset,u.offset+b));else{var x;x=l===t.FLOAT?o.mallocFloat32(b):o.mallocUint8(b);var w=n(x,f,[f[2],f[2]*f[0],1]);m===t.FLOAT&&l===t.UNSIGNED_BYTE?d(w,u):i.assign(w,u),y?t.texImage2D(t.TEXTURE_2D,a,s,f[0],f[1],0,s,l,x.subarray(0,b)):t.texSubImage2D(t.TEXTURE_2D,a,e,r,f[0],f[1],s,l,x.subarray(0,b)),l===t.FLOAT?o.freeFloat32(x):o.freeUint8(x)}}(s,e,r,a,this.format,this.type,this._mipLevels,t)}}},1433:function(t){"use strict";t.exports=function(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(s)};var n=r(2825),i=r(3536),o=r(244)},9226:function(t){t.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},3126:function(t){t.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},3990:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},1091:function(t){t.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},5911:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[0],s=r[1],l=r[2];return t[0]=i*l-o*s,t[1]=o*a-n*l,t[2]=n*s-i*a,t}},5455:function(t,e,r){t.exports=r(7056)},7056:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}},4008:function(t,e,r){t.exports=r(6690)},6690:function(t){t.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}},244:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},2613:function(t){t.exports=1e-6},9922:function(t,e,r){t.exports=function(t,e){var r=t[0],i=t[1],o=t[2],a=e[0],s=e[1],l=e[2];return Math.abs(r-a)<=n*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=n*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-l)<=n*Math.max(1,Math.abs(o),Math.abs(l))};var n=r(2613)},9265:function(t){t.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},2681:function(t){t.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},5137:function(t,e,r){t.exports=function(t,e,r,i,o,a){var s,l;for(e||(e=3),r||(r=0),l=i?Math.min(i*e+r,t.length):t.length,s=r;s0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}},7636:function(t){t.exports=function(t,e){e=e||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*e,t}},6894:function(t){t.exports=function(t,e,r,n){var i=r[1],o=r[2],a=e[1]-i,s=e[2]-o,l=Math.sin(n),c=Math.cos(n);return t[0]=e[0],t[1]=i+a*c-s*l,t[2]=o+a*l+s*c,t}},109:function(t){t.exports=function(t,e,r,n){var i=r[0],o=r[2],a=e[0]-i,s=e[2]-o,l=Math.sin(n),c=Math.cos(n);return t[0]=i+s*l+a*c,t[1]=e[1],t[2]=o+s*c-a*l,t}},8692:function(t){t.exports=function(t,e,r,n){var i=r[0],o=r[1],a=e[0]-i,s=e[1]-o,l=Math.sin(n),c=Math.cos(n);return t[0]=i+a*c-s*l,t[1]=o+a*l+s*c,t[2]=e[2],t}},2447:function(t){t.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},6621:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}},8489:function(t){t.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}},1463:function(t){t.exports=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}},6141:function(t,e,r){t.exports=r(2953)},5486:function(t,e,r){t.exports=r(3066)},2953:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return r*r+n*n+i*i}},3066:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}},2229:function(t,e,r){t.exports=r(6843)},6843:function(t){t.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}},492:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2];return t[0]=n*r[0]+i*r[3]+o*r[6],t[1]=n*r[1]+i*r[4]+o*r[7],t[2]=n*r[2]+i*r[5]+o*r[8],t}},5673:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[3]*n+r[7]*i+r[11]*o+r[15];return a=a||1,t[0]=(r[0]*n+r[4]*i+r[8]*o+r[12])/a,t[1]=(r[1]*n+r[5]*i+r[9]*o+r[13])/a,t[2]=(r[2]*n+r[6]*i+r[10]*o+r[14])/a,t}},264:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[0],s=r[1],l=r[2],c=r[3],d=c*n+s*o-l*i,u=c*i+l*n-a*o,h=c*o+a*i-s*n,f=-a*n-s*i-l*o;return t[0]=d*c+f*-a+u*-l-h*-s,t[1]=u*c+f*-s+h*-a-d*-l,t[2]=h*c+f*-l+d*-s-u*-a,t}},4361:function(t){t.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}},2335:function(t){t.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},2933:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},7536:function(t){t.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},4691:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+o*o)}},1373:function(t){t.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}},3750:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},3390:function(t){t.exports=function(t,e,r,n){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=n,i}},9970:function(t,e,r){t.exports={create:r(7536),clone:r(2335),fromValues:r(3390),copy:r(2933),set:r(4578),add:r(4361),subtract:r(6860),multiply:r(3576),divide:r(1373),min:r(2334),max:r(160),scale:r(9288),scaleAndAdd:r(4844),distance:r(4691),squaredDistance:r(7960),length:r(6808),squaredLength:r(483),negate:r(1498),inverse:r(4494),normalize:r(5177),dot:r(3750),lerp:r(2573),random:r(9131),transformMat4:r(5352),transformQuat:r(4041)}},4494:function(t){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},6808:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)}},2573:function(t){t.exports=function(t,e,r,n){var i=e[0],o=e[1],a=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=o+n*(r[1]-o),t[2]=a+n*(r[2]-a),t[3]=s+n*(r[3]-s),t}},160:function(t){t.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}},2334:function(t){t.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}},3576:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}},1498:function(t){t.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},5177:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=r*r+n*n+i*i+o*o;return a>0&&(a=1/Math.sqrt(a),t[0]=r*a,t[1]=n*a,t[2]=i*a,t[3]=o*a),t}},9131:function(t,e,r){var n=r(5177),i=r(9288);t.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),n(t,t),i(t,t,e),t}},9288:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}},4844:function(t){t.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}},4578:function(t){t.exports=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}},7960:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return r*r+n*n+i*i+o*o}},483:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}},6860:function(t){t.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}},5352:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*a,t[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*a,t[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*a,t[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*a,t}},4041:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[0],s=r[1],l=r[2],c=r[3],d=c*n+s*o-l*i,u=c*i+l*n-a*o,h=c*o+a*i-s*n,f=-a*n-s*i-l*o;return t[0]=d*c+f*-a+u*-l-h*-s,t[1]=u*c+f*-s+h*-a-d*-l,t[2]=h*c+f*-l+d*-s-u*-a,t[3]=e[3],t}},1848:function(t,e,r){var n=r(4905),i=r(6468);t.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r0)continue;r=t.slice(0,1).join("")}return N(r),z+=r.length,(S=S.slice(r.length)).length}}function q(){return/[^a-fA-F0-9]/.test(e)?(N(S.join("")),M=l,A):(S.push(e),r=e,A+1)}function Y(){return"."===e||/[eE]/.test(e)?(S.push(e),M=m,r=e,A+1):"x"===e&&1===S.length&&"0"===S[0]?(M=w,S.push(e),r=e,A+1):/[^\d]/.test(e)?(N(S.join("")),M=l,A):(S.push(e),r=e,A+1)}function Z(){return"f"===e&&(S.push(e),r=e,A+=1),/[eE]/.test(e)?(S.push(e),r=e,A+1):("-"!==e&&"+"!==e||!/[eE]/.test(r))&&/[^\d]/.test(e)?(N(S.join("")),M=l,A):(S.push(e),r=e,A+1)}function X(){if(/[^\d\w_]/.test(e)){var t=S.join("");return M=j[t]?b:P[t]?v:g,N(S.join("")),M=l,A}return S.push(e),r=e,A+1}};var n=r(620),i=r(7827),o=r(6852),a=r(7932),s=r(3508),l=999,c=9999,d=0,u=1,h=2,f=3,p=4,m=5,g=6,v=7,b=8,y=9,x=10,w=11,_=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3508:function(t,e,r){var n=r(6852);n=n.slice().filter((function(t){return!/^(gl\_|texture)/.test(t)})),t.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(t){t.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(t,e,r){var n=r(620);t.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(t){t.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(t){t.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(t,e,r){var n=r(5874);t.exports=function(t,e){var r=n(e),i=[];return(i=i.concat(r(t))).concat(r(null))}},3236:function(t){t.exports=function(t){"string"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n>1,d=-7,u=r?i-1:0,h=r?-1:1,f=t[e+u];for(u+=h,o=f&(1<<-d)-1,f>>=-d,d+=s;d>0;o=256*o+t[e+u],u+=h,d-=8);for(a=o&(1<<-d)-1,o>>=-d,d+=n;d>0;a=256*a+t[e+u],u+=h,d-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=c}return(f?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,l,c=8*o-i-1,d=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=d):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+u>=1?h/l:h*Math.pow(2,1-u))*l>=2&&(a++,l/=2),a+u>=d?(s=0,a=d):a+u>=1?(s=(e*l-1)*Math.pow(2,i),a+=u):(s=e*Math.pow(2,u-1)*Math.pow(2,i),a=0));i>=8;t[r+f]=255&s,f+=p,s/=256,i-=8);for(a=a<0;t[r+f]=255&a,f+=p,a/=256,c-=8);t[r+f-p]|=128*m}},8954:function(t,e,r){"use strict";t.exports=function(t,e){var r=t.length;if(0===r)throw new Error("Must have at least d+1 points");var i=t[0].length;if(r<=i)throw new Error("Must input at least d+1 points");var a=t.slice(0,i+1),s=n.apply(void 0,a);if(0===s)throw new Error("Input not in general position");for(var l=new Array(i+1),d=0;d<=i;++d)l[d]=d;s<0&&(l[0]=1,l[1]=0);var u=new o(l,new Array(i+1),!1),h=u.adjacent,f=new Array(i+2);for(d=0;d<=i;++d){for(var p=l.slice(),m=0;m<=i;++m)m===d&&(p[m]=-1);var g=p[0];p[0]=p[1],p[1]=g;var v=new o(p,new Array(i+1),!0);h[d]=v,f[d]=v}for(f[i+1]=u,d=0;d<=i;++d){p=h[d].vertices;var b=h[d].adjacent;for(m=0;m<=i;++m){var y=p[m];if(y<0)b[m]=u;else for(var x=0;x<=i;++x)h[x].vertices.indexOf(y)<0&&(b[m]=h[x])}}var w=new c(i,a,f),_=!!e;for(d=i+1;d0;)for(var s=(t=a.pop()).adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var d=c.vertices,u=0;u<=r;++u){var h=d[u];i[u]=h<0?e:o[h]}var f=this.orient();if(f>0)return c;c.lastVisited=-n,0===f&&a.push(c)}}return null},d.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,o=this.tuple,a=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[a];t:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,d=0;d<=n;++d)o[d]=i[l[d]];for(s.lastVisited=r,d=0;d<=n;++d){var u=c[d];if(!(u.lastVisited>=r)){var h=o[d];o[d]=t;var f=this.orient();if(o[d]=h,f<0){s=u;continue t}u.boundary?u.lastVisited=-r:u.lastVisited=r}}return}return s},d.addPeaks=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,d=this.simplices,u=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,c.push(e);for(var h=[];u.length>0;){var f=(e=u.pop()).vertices,p=e.adjacent,m=f.indexOf(r);if(!(m<0))for(var g=0;g<=n;++g)if(g!==m){var v=p[g];if(v.boundary&&!(v.lastVisited>=r)){var b=v.vertices;if(v.lastVisited!==-r){for(var y=0,x=0;x<=n;++x)b[x]<0?(y=x,l[x]=t):l[x]=i[b[x]];if(this.orient()>0){b[y]=r,v.boundary=!1,c.push(v),u.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var w=v.adjacent,_=f.slice(),k=p.slice(),A=new o(_,k,!0);d.push(A);var T=w.indexOf(e);if(!(T<0))for(w[T]=A,k[m]=v,_[g]=-1,k[g]=e,p[g]=A,A.flip(),x=0;x<=n;++x){var M=_[x];if(!(M<0||M===r)){for(var S=new Array(n-1),C=0,E=0;E<=n;++E){var L=_[E];L<0||E===x||(S[C++]=L)}h.push(new a(S,A,x))}}}}}for(h.sort(s),g=0;g+1=0?a[l++]=s[d]:c=1&d;if(c===(1&t)){var u=a[0];a[0]=a[1],a[1]=u}e.push(a)}}return e}},3352:function(t,e,r){"use strict";var n=r(2478);function i(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}t.exports=function(t){return t&&0!==t.length?new v(g(t)):new v(null)};var o=i.prototype;function a(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function s(t,e){var r=g(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function l(t,e){var r=t.intervals([]);r.push(e),s(t,r)}function c(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?0:(r.splice(n,1),s(t,r),1)}function d(t,e,r){for(var n=0;n=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function h(t,e){for(var r=0;r>1],o=[],a=[],s=[];for(r=0;r3*(e+1)?l(this,t):this.left.insert(t):this.left=g([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?l(this,t):this.right.insert(t):this.right=g([t]);else{var r=n.ge(this.leftPoints,t,p),i=n.ge(this.rightPoints,t,m);this.leftPoints.splice(r,0,t),this.rightPoints.splice(i,0,t)}},o.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1)?c(this,t):2===(s=this.left.remove(t))?(this.left=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?c(this,t):2===(s=this.right.remove(t))?(this.right=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(1===this.count)return this.leftPoints[0]===t?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var r=this,i=this.left;i.right;)r=i,i=i.right;if(r===this)i.right=this.right;else{var o=this.left,s=this.right;r.count-=i.count,r.right=i.left,i.left=o,i.right=s}a(this,i),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?a(this,this.left):a(this,this.right);return 1}for(o=n.ge(this.leftPoints,t,p);othis.mid?this.right&&(r=this.right.queryPoint(t,e))?r:u(this.rightPoints,t,e):h(this.leftPoints,e);var r},o.queryInterval=function(t,e,r){var n;return tthis.mid&&this.right&&(n=this.right.queryInterval(t,e,r))?n:ethis.mid?u(this.rightPoints,t,r):h(this.leftPoints,r)};var b=v.prototype;b.insert=function(t){this.root?this.root.insert(t):this.root=new i(t[0],null,null,[t],[t])},b.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),0!==e}return!1},b.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},b.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(b,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},7762:function(t){"use strict";t.exports=function(t){for(var e=new Array(t),r=0;r13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},395:function(t){t.exports=function(t,e,r){return t*(1-r)+e*r}},2652:function(t,e,r){var n=r(4335),i=r(6864),o=r(1903),a=r(9921),s=r(7608),l=r(5665),c={length:r(1387),normalize:r(3536),dot:r(244),cross:r(5911)},d=i(),u=i(),h=[0,0,0,0],f=[[0,0,0],[0,0,0],[0,0,0]],p=[0,0,0];function m(t,e,r,n,i){t[0]=e[0]*n+r[0]*i,t[1]=e[1]*n+r[1]*i,t[2]=e[2]*n+r[2]*i}t.exports=function(t,e,r,i,g,v){if(e||(e=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),g||(g=[0,0,0,1]),v||(v=[0,0,0,1]),!n(d,t))return!1;if(o(u,d),u[3]=0,u[7]=0,u[11]=0,u[15]=1,Math.abs(a(u)<1e-8))return!1;var b,y,x,w,_,k,A,T=d[3],M=d[7],S=d[11],C=d[12],E=d[13],L=d[14],z=d[15];if(0!==T||0!==M||0!==S){if(h[0]=T,h[1]=M,h[2]=S,h[3]=z,!s(u,u))return!1;l(u,u),b=g,x=u,w=(y=h)[0],_=y[1],k=y[2],A=y[3],b[0]=x[0]*w+x[4]*_+x[8]*k+x[12]*A,b[1]=x[1]*w+x[5]*_+x[9]*k+x[13]*A,b[2]=x[2]*w+x[6]*_+x[10]*k+x[14]*A,b[3]=x[3]*w+x[7]*_+x[11]*k+x[15]*A}else g[0]=g[1]=g[2]=0,g[3]=1;if(e[0]=C,e[1]=E,e[2]=L,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(f,d),r[0]=c.length(f[0]),c.normalize(f[0],f[0]),i[0]=c.dot(f[0],f[1]),m(f[1],f[1],f[0],1,-i[0]),r[1]=c.length(f[1]),c.normalize(f[1],f[1]),i[0]/=r[1],i[1]=c.dot(f[0],f[2]),m(f[2],f[2],f[0],1,-i[1]),i[2]=c.dot(f[1],f[2]),m(f[2],f[2],f[1],1,-i[2]),r[2]=c.length(f[2]),c.normalize(f[2],f[2]),i[1]/=r[2],i[2]/=r[2],c.cross(p,f[1],f[2]),c.dot(f[0],p)<0)for(var O=0;O<3;O++)r[O]*=-1,f[O][0]*=-1,f[O][1]*=-1,f[O][2]*=-1;return v[0]=.5*Math.sqrt(Math.max(1+f[0][0]-f[1][1]-f[2][2],0)),v[1]=.5*Math.sqrt(Math.max(1-f[0][0]+f[1][1]-f[2][2],0)),v[2]=.5*Math.sqrt(Math.max(1-f[0][0]-f[1][1]+f[2][2],0)),v[3]=.5*Math.sqrt(Math.max(1+f[0][0]+f[1][1]+f[2][2],0)),f[2][1]>f[1][2]&&(v[0]=-v[0]),f[0][2]>f[2][0]&&(v[1]=-v[1]),f[1][0]>f[0][1]&&(v[2]=-v[2]),!0}},4335:function(t){t.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},7442:function(t,e,r){var n=r(6658),i=r(7182),o=r(2652),a=r(9921),s=r(8648),l=u(),c=u(),d=u();function u(){return{translate:h(),scale:h(1),skew:h(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function h(t){return[t||0,t||0,t||0]}t.exports=function(t,e,r,u){if(0===a(e)||0===a(r))return!1;var h=o(e,l.translate,l.scale,l.skew,l.perspective,l.quaternion),f=o(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!h||!f||(n(d.translate,l.translate,c.translate,u),n(d.skew,l.skew,c.skew,u),n(d.scale,l.scale,c.scale,u),n(d.perspective,l.perspective,c.perspective,u),s(d.quaternion,l.quaternion,c.quaternion,u),i(t,d.translate,d.scale,d.skew,d.perspective,d.quaternion),0))}},7182:function(t,e,r){var n={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)},i=(n.create(),n.create());t.exports=function(t,e,r,o,a,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=a[0],t[7]=a[1],t[11]=a[2],t[15]=a[3],n.identity(i),0!==o[2]&&(i[9]=o[2],n.multiply(t,t,i)),0!==o[1]&&(i[9]=0,i[8]=o[1],n.multiply(t,t,i)),0!==o[0]&&(i[8]=0,i[4]=o[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},4192:function(t,e,r){"use strict";var n=r(2478),i=r(7442),o=r(7608),a=r(5567),s=r(2408),l=r(7089),c=r(6582),d=r(7656),u=(r(2504),r(3536)),h=[0,0,0];function f(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}t.exports=function(t){return new f((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var p=f.prototype;p.recalcMatrix=function(t){var e=this._time,r=n.le(e,t),a=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===e.length-1)for(var l=16*r,c=0;c<16;++c)a[c]=s[l++];else{var d=e[r+1]-e[r],h=(l=16*r,this.prevMatrix),f=!0;for(c=0;c<16;++c)h[c]=s[l++];var p=this.nextMatrix;for(c=0;c<16;++c)p[c]=s[l++],f=f&&h[c]===p[c];if(d<1e-6||f)for(c=0;c<16;++c)a[c]=h[c];else i(a,h,p,(t-e[r])/d)}var m=this.computedUp;m[0]=a[1],m[1]=a[5],m[2]=a[9],u(m,m);var g=this.computedInverse;o(g,a);var v=this.computedEye,b=g[15];v[0]=g[12]/b,v[1]=g[13]/b,v[2]=g[14]/b;var y=this.computedCenter,x=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)y[c]=v[c]-a[2+4*c]*x}},p.idle=function(t){if(!(t1&&n(t[a[d-2]],t[a[d-1]],c)<=0;)d-=1,a.pop();for(a.push(l),d=s.length;d>1&&n(t[s[d-2]],t[s[d-1]],c)>=0;)d-=1,s.pop();s.push(l)}r=new Array(s.length+a.length-2);for(var u=0,h=(i=0,a.length);i0;--f)r[u++]=s[f];return r};var n=r(3250)[3]},351:function(t,e,r){"use strict";t.exports=function(t,e){e||(e=t,t=window);var r=0,i=0,o=0,a={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==a.alt,a.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==a.shift,a.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==a.control,a.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==a.meta,a.meta=!!t.metaKey),e}function c(t,s){var c=n.x(s),d=n.y(s);"buttons"in s&&(t=0|s.buttons),(t!==r||c!==i||d!==o||l(s))&&(r=0|t,i=c||0,o=d||0,e&&e(r,i,o,a))}function d(t){c(0,t)}function u(){(r||i||o||a.shift||a.alt||a.meta||a.control)&&(i=o=0,r=0,a.shift=a.alt=a.control=a.meta=!1,e&&e(0,0,0,a))}function h(t){l(t)&&e&&e(r,i,o,a)}function f(t){0===n.buttons(t)?c(0,t):c(r,t)}function p(t){c(r|n.buttons(t),t)}function m(t){c(r&~n.buttons(t),t)}function g(){s||(s=!0,t.addEventListener("mousemove",f),t.addEventListener("mousedown",p),t.addEventListener("mouseup",m),t.addEventListener("mouseleave",d),t.addEventListener("mouseenter",d),t.addEventListener("mouseout",d),t.addEventListener("mouseover",d),t.addEventListener("blur",u),t.addEventListener("keyup",h),t.addEventListener("keydown",h),t.addEventListener("keypress",h),t!==window&&(window.addEventListener("blur",u),window.addEventListener("keyup",h),window.addEventListener("keydown",h),window.addEventListener("keypress",h)))}g();var v={element:t};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(e){e?g():s&&(s=!1,t.removeEventListener("mousemove",f),t.removeEventListener("mousedown",p),t.removeEventListener("mouseup",m),t.removeEventListener("mouseleave",d),t.removeEventListener("mouseenter",d),t.removeEventListener("mouseout",d),t.removeEventListener("mouseover",d),t.removeEventListener("blur",u),t.removeEventListener("keyup",h),t.removeEventListener("keydown",h),t.removeEventListener("keypress",h),t!==window&&(window.removeEventListener("blur",u),window.removeEventListener("keyup",h),window.removeEventListener("keydown",h),window.removeEventListener("keypress",h)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return o},enumerable:!0},mods:{get:function(){return a},enumerable:!0}}),v};var n=r(4687)},24:function(t){var e={left:0,top:0};t.exports=function(t,r,n){r=r||t.currentTarget||t.srcElement,Array.isArray(n)||(n=[0,0]);var i,o=t.clientX||0,a=t.clientY||0,s=(i=r)===window||i===document||i===document.body?e:i.getBoundingClientRect();return n[0]=o-s.left,n[1]=a-s.top,n}},4687:function(t,e){"use strict";function r(t){return t.target||t.srcElement||window}e.buttons=function(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1< 0"),"function"!=typeof t.vertex&&e("Must specify vertex creation function"),"function"!=typeof t.cell&&e("Must specify cell creation function"),"function"!=typeof t.phase&&e("Must specify phase function");for(var a=t.getters||[],s=new Array(o),l=0;l=0?s[l]=!0:s[l]=!1;return function(t,e,r,o,a,s){var l=[s,a].join(",");return(0,i[l])(t,e,r,n.mallocUint32,n.freeUint32)}(t.vertex,t.cell,t.phase,0,r,s)};var i={"false,0,1":function(t,e,r,n,i){return function(o,a,s,l){var c,d=0|o.shape[0],u=0|o.shape[1],h=o.data,f=0|o.offset,p=0|o.stride[0],m=0|o.stride[1],g=f,v=0|-p,b=0,y=0|-m,x=0,w=-p-m|0,_=0,k=0|p,A=m-p*d|0,T=0,M=0,S=0,C=2*d|0,E=n(C),L=n(C),z=0,O=0,D=-1,I=-1,R=0,F=0|-d,P=0|d,j=0,N=-d-1|0,B=d-1|0,U=0,G=0,V=0;for(T=0;T0){if(M=1,E[z++]=r(h[g],a,s,l),g+=k,d>0)for(T=1,c=h[g],O=E[z]=r(c,a,s,l),R=E[z+D],j=E[z+F],U=E[z+N],O===R&&O===j&&O===U||(b=h[g+v],x=h[g+y],_=h[g+w],t(T,M,c,b,x,_,O,R,j,U,a,s,l),G=L[z]=S++),z+=1,g+=k,T=2;T0)for(T=1,c=h[g],O=E[z]=r(c,a,s,l),R=E[z+D],j=E[z+F],U=E[z+N],O===R&&O===j&&O===U||(b=h[g+v],x=h[g+y],_=h[g+w],t(T,M,c,b,x,_,O,R,j,U,a,s,l),G=L[z]=S++,U!==j&&e(L[z+F],G,x,_,j,U,a,s,l)),z+=1,g+=k,T=2;T0){if(T=1,E[z++]=r(h[g],a,s,l),g+=k,u>0)for(M=1,c=h[g],O=E[z]=r(c,a,s,l),j=E[z+F],R=E[z+D],U=E[z+N],O===j&&O===R&&O===U||(b=h[g+v],x=h[g+y],_=h[g+w],t(T,M,c,b,x,_,O,j,R,U,a,s,l),G=L[z]=S++),z+=1,g+=k,M=2;M0)for(M=1,c=h[g],O=E[z]=r(c,a,s,l),j=E[z+F],R=E[z+D],U=E[z+N],O===j&&O===R&&O===U||(b=h[g+v],x=h[g+y],_=h[g+w],t(T,M,c,b,x,_,O,j,R,U,a,s,l),G=L[z]=S++,U!==j&&e(L[z+F],G,_,b,U,j,a,s,l)),z+=1,g+=k,M=2;M2&&o[1]>2&&n(i.pick(-1,-1).lo(1,1).hi(o[0]-2,o[1]-2),t.pick(-1,-1,0).lo(1,1).hi(o[0]-2,o[1]-2),t.pick(-1,-1,1).lo(1,1).hi(o[0]-2,o[1]-2)),o[1]>2&&(r(i.pick(0,-1).lo(1).hi(o[1]-2),t.pick(0,-1,1).lo(1).hi(o[1]-2)),e(t.pick(0,-1,0).lo(1).hi(o[1]-2))),o[1]>2&&(r(i.pick(o[0]-1,-1).lo(1).hi(o[1]-2),t.pick(o[0]-1,-1,1).lo(1).hi(o[1]-2)),e(t.pick(o[0]-1,-1,0).lo(1).hi(o[1]-2))),o[0]>2&&(r(i.pick(-1,0).lo(1).hi(o[0]-2),t.pick(-1,0,0).lo(1).hi(o[0]-2)),e(t.pick(-1,0,1).lo(1).hi(o[0]-2))),o[0]>2&&(r(i.pick(-1,o[1]-1).lo(1).hi(o[0]-2),t.pick(-1,o[1]-1,0).lo(1).hi(o[0]-2)),e(t.pick(-1,o[1]-1,1).lo(1).hi(o[0]-2))),t.set(0,0,0,0),t.set(0,0,1,0),t.set(o[0]-1,0,0,0),t.set(o[0]-1,0,1,0),t.set(0,o[1]-1,0,0),t.set(0,o[1]-1,1,0),t.set(o[0]-1,o[1]-1,0,0),t.set(o[0]-1,o[1]-1,1,0),t}}t.exports=function(t,e,r){return Array.isArray(r)||(r=n(e.dimension,"string"==typeof r?r:"clamp")),0===e.size?t:0===e.dimension?(t.set(0),t):function(t){var e=t.join();if(o=d[e])return o;for(var r=t.length,n=[u,h],i=1;i<=r;++i)n.push(f(i));var o=p.apply(void 0,n);return d[e]=o,o}(r)(t,e)}},4317:function(t){"use strict";function e(t,e){var r=Math.floor(e),n=e-r,i=0<=r&&r0;){y<64?(l=y,y=0):(l=64,y-=64);for(var x=0|t[1];x>0;){x<64?(c=x,x=0):(c=64,x-=64),n=v+y*u+x*h,a=b+y*p+x*m;var w=0,_=0,k=0,A=f,T=u-d*f,M=h-l*u,S=g,C=p-d*g,E=m-l*p;for(k=0;k0;){m<64?(l=m,m=0):(l=64,m-=64);for(var g=0|t[0];g>0;){g<64?(s=g,g=0):(s=64,g-=64),n=f+m*d+g*c,a=p+m*h+g*u;var v=0,b=0,y=d,x=c-l*d,w=h,_=u-l*h;for(b=0;b0;){b<64?(c=b,b=0):(c=64,b-=64);for(var y=0|t[0];y>0;){y<64?(s=y,y=0):(s=64,y-=64);for(var x=0|t[1];x>0;){x<64?(l=x,x=0):(l=64,x-=64),n=g+b*h+y*d+x*u,a=v+b*m+y*f+x*p;var w=0,_=0,k=0,A=h,T=d-c*h,M=u-s*d,S=m,C=f-c*m,E=p-s*f;for(k=0;kr;){v=0,b=m-a;e:for(g=0;gx)break e;b+=u,v+=h}for(v=m,b=m-a,g=0;g>1,H=V-B,W=V+B,q=U,Y=H,Z=V,X=W,$=G,J=i+1,K=o-1,Q=!0,tt=0,et=0,rt=0,nt=u,it=e(nt),ot=e(nt);T=l*q,M=l*Y,N=s;t:for(A=0;A0){g=q,q=Y,Y=g;break t}if(rt<0)break t;N+=f}T=l*X,M=l*$,N=s;t:for(A=0;A0){g=X,X=$,$=g;break t}if(rt<0)break t;N+=f}T=l*q,M=l*Z,N=s;t:for(A=0;A0){g=q,q=Z,Z=g;break t}if(rt<0)break t;N+=f}T=l*Y,M=l*Z,N=s;t:for(A=0;A0){g=Y,Y=Z,Z=g;break t}if(rt<0)break t;N+=f}T=l*q,M=l*X,N=s;t:for(A=0;A0){g=q,q=X,X=g;break t}if(rt<0)break t;N+=f}T=l*Z,M=l*X,N=s;t:for(A=0;A0){g=Z,Z=X,X=g;break t}if(rt<0)break t;N+=f}T=l*Y,M=l*$,N=s;t:for(A=0;A0){g=Y,Y=$,$=g;break t}if(rt<0)break t;N+=f}T=l*Y,M=l*Z,N=s;t:for(A=0;A0){g=Y,Y=Z,Z=g;break t}if(rt<0)break t;N+=f}T=l*X,M=l*$,N=s;t:for(A=0;A0){g=X,X=$,$=g;break t}if(rt<0)break t;N+=f}for(T=l*q,M=l*Y,S=l*Z,C=l*X,E=l*$,L=l*U,z=l*V,O=l*G,j=0,N=s,A=0;A0)){if(rt<0){for(T=l*x,M=l*J,S=l*K,N=s,A=0;A0)for(;;){for(w=s+K*l,j=0,A=0;A0)){for(w=s+K*l,j=0,A=0;AG){t:for(;;){for(w=s+J*l,j=0,N=s,A=0;A1&&n?s(r,n[0],n[1]):s(r)}(t,e,l);return n(l,c)}},446:function(t,e,r){"use strict";var n=r(7640),i={};t.exports=function(t){var e=t.order,r=t.dtype,o=[e,r].join(":"),a=i[o];return a||(i[o]=a=n(e,r)),a(t),t}},9618:function(t,e,r){var n=r(7163),i="undefined"!=typeof Float64Array;function o(t,e){return t[0]-e[0]}function a(){var t,e=this.stride,r=new Array(e.length);for(t=0;t=0&&(e+=o*(r=0|t),i-=r),new n(this.data,i,o,e)},i.step=function(t){var e=this.shape[0],r=this.stride[0],i=this.offset,o=0,a=Math.ceil;return"number"==typeof t&&((o=0|t)<0?(i+=r*(e-1),e=a(-e/o)):e=a(e/o),r*=o),new n(this.data,e,r,i)},i.transpose=function(t){t=void 0===t?0:0|t;var e=this.shape,r=this.stride;return new n(this.data,e[t],r[t],this.offset)},i.pick=function(t){var r=[],n=[],i=this.offset;return"number"==typeof t&&t>=0?i=i+this.stride[0]*t|0:(r.push(this.shape[0]),n.push(this.stride[0])),(0,e[r.length+1])(this.data,r,n,i)},function(t,e,r,i){return new n(t,e[0],r[0],i)}},2:function(t,e,r){function n(t,e,r,n,i,o){this.data=t,this.shape=[e,r],this.stride=[n,i],this.offset=0|o}var i=n.prototype;return i.dtype=t,i.dimension=2,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(i,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),i.set=function(e,r,n){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r,n):this.data[this.offset+this.stride[0]*e+this.stride[1]*r]=n},i.get=function(e,r){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r):this.data[this.offset+this.stride[0]*e+this.stride[1]*r]},i.index=function(t,e){return this.offset+this.stride[0]*t+this.stride[1]*e},i.hi=function(t,e){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,this.stride[0],this.stride[1],this.offset)},i.lo=function(t,e){var r=this.offset,i=0,o=this.shape[0],a=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"==typeof t&&t>=0&&(r+=s*(i=0|t),o-=i),"number"==typeof e&&e>=0&&(r+=l*(i=0|e),a-=i),new n(this.data,o,a,s,l,r)},i.step=function(t,e){var r=this.shape[0],i=this.shape[1],o=this.stride[0],a=this.stride[1],s=this.offset,l=0,c=Math.ceil;return"number"==typeof t&&((l=0|t)<0?(s+=o*(r-1),r=c(-r/l)):r=c(r/l),o*=l),"number"==typeof e&&((l=0|e)<0?(s+=a*(i-1),i=c(-i/l)):i=c(i/l),a*=l),new n(this.data,r,i,o,a,s)},i.transpose=function(t,e){t=void 0===t?0:0|t,e=void 0===e?1:0|e;var r=this.shape,i=this.stride;return new n(this.data,r[t],r[e],i[t],i[e],this.offset)},i.pick=function(t,r){var n=[],i=[],o=this.offset;return"number"==typeof t&&t>=0?o=o+this.stride[0]*t|0:(n.push(this.shape[0]),i.push(this.stride[0])),"number"==typeof r&&r>=0?o=o+this.stride[1]*r|0:(n.push(this.shape[1]),i.push(this.stride[1])),(0,e[n.length+1])(this.data,n,i,o)},function(t,e,r,i){return new n(t,e[0],e[1],r[0],r[1],i)}},3:function(t,e,r){function n(t,e,r,n,i,o,a,s){this.data=t,this.shape=[e,r,n],this.stride=[i,o,a],this.offset=0|s}var i=n.prototype;return i.dtype=t,i.dimension=3,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(i,"order",{get:function(){var t=Math.abs(this.stride[0]),e=Math.abs(this.stride[1]),r=Math.abs(this.stride[2]);return t>e?e>r?[2,1,0]:t>r?[1,2,0]:[1,0,2]:t>r?[2,0,1]:r>e?[0,1,2]:[0,2,1]}}),i.set=function(e,r,n,i){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n,i):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n]=i},i.get=function(e,r,n){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n]},i.index=function(t,e,r){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r},i.hi=function(t,e,r){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,this.stride[0],this.stride[1],this.stride[2],this.offset)},i.lo=function(t,e,r){var i=this.offset,o=0,a=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.stride[0],d=this.stride[1],u=this.stride[2];return"number"==typeof t&&t>=0&&(i+=c*(o=0|t),a-=o),"number"==typeof e&&e>=0&&(i+=d*(o=0|e),s-=o),"number"==typeof r&&r>=0&&(i+=u*(o=0|r),l-=o),new n(this.data,a,s,l,c,d,u,i)},i.step=function(t,e,r){var i=this.shape[0],o=this.shape[1],a=this.shape[2],s=this.stride[0],l=this.stride[1],c=this.stride[2],d=this.offset,u=0,h=Math.ceil;return"number"==typeof t&&((u=0|t)<0?(d+=s*(i-1),i=h(-i/u)):i=h(i/u),s*=u),"number"==typeof e&&((u=0|e)<0?(d+=l*(o-1),o=h(-o/u)):o=h(o/u),l*=u),"number"==typeof r&&((u=0|r)<0?(d+=c*(a-1),a=h(-a/u)):a=h(a/u),c*=u),new n(this.data,i,o,a,s,l,c,d)},i.transpose=function(t,e,r){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r;var i=this.shape,o=this.stride;return new n(this.data,i[t],i[e],i[r],o[t],o[e],o[r],this.offset)},i.pick=function(t,r,n){var i=[],o=[],a=this.offset;return"number"==typeof t&&t>=0?a=a+this.stride[0]*t|0:(i.push(this.shape[0]),o.push(this.stride[0])),"number"==typeof r&&r>=0?a=a+this.stride[1]*r|0:(i.push(this.shape[1]),o.push(this.stride[1])),"number"==typeof n&&n>=0?a=a+this.stride[2]*n|0:(i.push(this.shape[2]),o.push(this.stride[2])),(0,e[i.length+1])(this.data,i,o,a)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],r[0],r[1],r[2],i)}},4:function(t,e,r){function n(t,e,r,n,i,o,a,s,l,c){this.data=t,this.shape=[e,r,n,i],this.stride=[o,a,s,l],this.offset=0|c}var i=n.prototype;return i.dtype=t,i.dimension=4,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(e,r,n,i,o){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i,o):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]=o},i.get=function(e,r,n,i){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]},i.index=function(t,e,r,n){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r+this.stride[3]*n},i.hi=function(t,e,r,i){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},i.lo=function(t,e,r,i){var o=this.offset,a=0,s=this.shape[0],l=this.shape[1],c=this.shape[2],d=this.shape[3],u=this.stride[0],h=this.stride[1],f=this.stride[2],p=this.stride[3];return"number"==typeof t&&t>=0&&(o+=u*(a=0|t),s-=a),"number"==typeof e&&e>=0&&(o+=h*(a=0|e),l-=a),"number"==typeof r&&r>=0&&(o+=f*(a=0|r),c-=a),"number"==typeof i&&i>=0&&(o+=p*(a=0|i),d-=a),new n(this.data,s,l,c,d,u,h,f,p,o)},i.step=function(t,e,r,i){var o=this.shape[0],a=this.shape[1],s=this.shape[2],l=this.shape[3],c=this.stride[0],d=this.stride[1],u=this.stride[2],h=this.stride[3],f=this.offset,p=0,m=Math.ceil;return"number"==typeof t&&((p=0|t)<0?(f+=c*(o-1),o=m(-o/p)):o=m(o/p),c*=p),"number"==typeof e&&((p=0|e)<0?(f+=d*(a-1),a=m(-a/p)):a=m(a/p),d*=p),"number"==typeof r&&((p=0|r)<0?(f+=u*(s-1),s=m(-s/p)):s=m(s/p),u*=p),"number"==typeof i&&((p=0|i)<0?(f+=h*(l-1),l=m(-l/p)):l=m(l/p),h*=p),new n(this.data,o,a,s,l,c,d,u,h,f)},i.transpose=function(t,e,r,i){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r,i=void 0===i?3:0|i;var o=this.shape,a=this.stride;return new n(this.data,o[t],o[e],o[r],o[i],a[t],a[e],a[r],a[i],this.offset)},i.pick=function(t,r,n,i){var o=[],a=[],s=this.offset;return"number"==typeof t&&t>=0?s=s+this.stride[0]*t|0:(o.push(this.shape[0]),a.push(this.stride[0])),"number"==typeof r&&r>=0?s=s+this.stride[1]*r|0:(o.push(this.shape[1]),a.push(this.stride[1])),"number"==typeof n&&n>=0?s=s+this.stride[2]*n|0:(o.push(this.shape[2]),a.push(this.stride[2])),"number"==typeof i&&i>=0?s=s+this.stride[3]*i|0:(o.push(this.shape[3]),a.push(this.stride[3])),(0,e[o.length+1])(this.data,o,a,s)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],e[3],r[0],r[1],r[2],r[3],i)}},5:function(t,e,r){function n(t,e,r,n,i,o,a,s,l,c,d,u){this.data=t,this.shape=[e,r,n,i,o],this.stride=[a,s,l,c,d],this.offset=0|u}var i=n.prototype;return i.dtype=t,i.dimension=5,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(e,r,n,i,o,a){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o,a):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o]=a},i.get=function(e,r,n,i,o){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o]},i.index=function(t,e,r,n,i){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r+this.stride[3]*n+this.stride[4]*i},i.hi=function(t,e,r,i,o){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,"number"!=typeof o||o<0?this.shape[4]:0|o,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},i.lo=function(t,e,r,i,o){var a=this.offset,s=0,l=this.shape[0],c=this.shape[1],d=this.shape[2],u=this.shape[3],h=this.shape[4],f=this.stride[0],p=this.stride[1],m=this.stride[2],g=this.stride[3],v=this.stride[4];return"number"==typeof t&&t>=0&&(a+=f*(s=0|t),l-=s),"number"==typeof e&&e>=0&&(a+=p*(s=0|e),c-=s),"number"==typeof r&&r>=0&&(a+=m*(s=0|r),d-=s),"number"==typeof i&&i>=0&&(a+=g*(s=0|i),u-=s),"number"==typeof o&&o>=0&&(a+=v*(s=0|o),h-=s),new n(this.data,l,c,d,u,h,f,p,m,g,v,a)},i.step=function(t,e,r,i,o){var a=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.shape[3],d=this.shape[4],u=this.stride[0],h=this.stride[1],f=this.stride[2],p=this.stride[3],m=this.stride[4],g=this.offset,v=0,b=Math.ceil;return"number"==typeof t&&((v=0|t)<0?(g+=u*(a-1),a=b(-a/v)):a=b(a/v),u*=v),"number"==typeof e&&((v=0|e)<0?(g+=h*(s-1),s=b(-s/v)):s=b(s/v),h*=v),"number"==typeof r&&((v=0|r)<0?(g+=f*(l-1),l=b(-l/v)):l=b(l/v),f*=v),"number"==typeof i&&((v=0|i)<0?(g+=p*(c-1),c=b(-c/v)):c=b(c/v),p*=v),"number"==typeof o&&((v=0|o)<0?(g+=m*(d-1),d=b(-d/v)):d=b(d/v),m*=v),new n(this.data,a,s,l,c,d,u,h,f,p,m,g)},i.transpose=function(t,e,r,i,o){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r,i=void 0===i?3:0|i,o=void 0===o?4:0|o;var a=this.shape,s=this.stride;return new n(this.data,a[t],a[e],a[r],a[i],a[o],s[t],s[e],s[r],s[i],s[o],this.offset)},i.pick=function(t,r,n,i,o){var a=[],s=[],l=this.offset;return"number"==typeof t&&t>=0?l=l+this.stride[0]*t|0:(a.push(this.shape[0]),s.push(this.stride[0])),"number"==typeof r&&r>=0?l=l+this.stride[1]*r|0:(a.push(this.shape[1]),s.push(this.stride[1])),"number"==typeof n&&n>=0?l=l+this.stride[2]*n|0:(a.push(this.shape[2]),s.push(this.stride[2])),"number"==typeof i&&i>=0?l=l+this.stride[3]*i|0:(a.push(this.shape[3]),s.push(this.stride[3])),"number"==typeof o&&o>=0?l=l+this.stride[4]*o|0:(a.push(this.shape[4]),s.push(this.stride[4])),(0,e[a.length+1])(this.data,a,s,l)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],e[3],e[4],r[0],r[1],r[2],r[3],r[4],i)}}};function l(t,e){var r=-1===e?"T":String(e),n=s[r];return-1===e?n(t):0===e?n(t,c[t][0]):n(t,c[t],a)}var c={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};t.exports=function(t,e,r,o){if(void 0===t)return(0,c.array[0])([]);"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var a=e.length;if(void 0===r){r=new Array(a);for(var s=a-1,d=1;s>=0;--s)r[s]=d,d*=e[s]}if(void 0===o)for(o=0,s=0;s>>0;t.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e<0?-i:i;var r=n.hi(t),a=n.lo(t);return e>t==t>0?a===o?(r+=1,a=0):a+=1:0===a?(a=o,r-=1):a-=1,n.pack(a,r)}},8406:function(t,e){e.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),o=void 0===r?1e-6:r,a=0;ao){var x=i[c],w=1/Math.sqrt(g*b);for(y=0;y<3;++y){var _=(y+1)%3,k=(y+2)%3;x[y]+=w*(v[_]*m[k]-v[k]*m[_])}}}for(a=0;ao)for(w=1/Math.sqrt(A),y=0;y<3;++y)x[y]*=w;else for(y=0;y<3;++y)x[y]=0}return i},e.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),o=void 0===r?1e-6:r,a=0;ao?1/Math.sqrt(f):0,c=0;c<3;++c)h[c]*=f;i[a]=h}return i}},4081:function(t){"use strict";t.exports=function(t,e,r,n,i,o,a,s,l,c){var d=e+o+c;if(u>0){var u=Math.sqrt(d+1);t[0]=.5*(a-l)/u,t[1]=.5*(s-n)/u,t[2]=.5*(r-o)/u,t[3]=.5*u}else{var h=Math.max(e,o,c);u=Math.sqrt(2*h-d+1),e>=h?(t[0]=.5*u,t[1]=.5*(i+r)/u,t[2]=.5*(s+n)/u,t[3]=.5*(a-l)/u):o>=h?(t[0]=.5*(r+i)/u,t[1]=.5*u,t[2]=.5*(l+a)/u,t[3]=.5*(s-n)/u):(t[0]=.5*(n+s)/u,t[1]=.5*(a+l)/u,t[2]=.5*u,t[3]=.5*(r-i)/u)}return t}},9977:function(t,e,r){"use strict";t.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),d(r=[].slice.call(r,0,4),r);var i=new u(r,e,Math.log(n));return i.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&i.lookAt(0,t.eye,t.center,t.up),i};var n=r(9215),i=r(6582),o=r(7399),a=r(7608),s=r(4081);function l(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function c(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function d(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=c(r,n,i,o);a>1e-6?(t[0]=r/a,t[1]=n/a,t[2]=i/a,t[3]=o/a):(t[0]=t[1]=t[2]=0,t[3]=1)}function u(t,e,r){this.radius=n([r]),this.center=n(e),this.rotation=n(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var h=u.prototype;h.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},h.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;d(e,e);var r=this.computedMatrix;o(r,e);var n=this.computedCenter,i=this.computedEye,a=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],a[0]=r[1],a[1]=r[5],a[2]=r[9];for(var l=0;l<3;++l){for(var c=0,u=0;u<3;++u)c+=r[l+4*u]*i[u];r[12+l]=-c}},h.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r},h.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},h.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},h.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,o=i[1],a=i[5],s=i[9],c=l(o,a,s);o/=c,a/=c,s/=c;var d=i[0],u=i[4],h=i[8],f=d*o+u*a+h*s,p=l(d-=o*f,u-=a*f,h-=s*f);d/=p,u/=p,h/=p;var m=i[2],g=i[6],v=i[10],b=m*o+g*a+v*s,y=m*d+g*u+v*h,x=l(m-=b*o+y*d,g-=b*a+y*u,v-=b*s+y*h);m/=x,g/=x,v/=x;var w=d*e+o*r,_=u*e+a*r,k=h*e+s*r;this.center.move(t,w,_,k);var A=Math.exp(this.computedRadius[0]);A=Math.max(1e-4,A+n),this.radius.set(t,Math.log(A))},h.rotate=function(t,e,r,n){this.recalcMatrix(t),e=e||0,r=r||0;var i=this.computedMatrix,o=i[0],a=i[4],s=i[8],d=i[1],u=i[5],h=i[9],f=i[2],p=i[6],m=i[10],g=e*o+r*d,v=e*a+r*u,b=e*s+r*h,y=-(p*b-m*v),x=-(m*g-f*b),w=-(f*v-p*g),_=Math.sqrt(Math.max(0,1-Math.pow(y,2)-Math.pow(x,2)-Math.pow(w,2))),k=c(y,x,w,_);k>1e-6?(y/=k,x/=k,w/=k,_/=k):(y=x=w=0,_=1);var A=this.computedRotation,T=A[0],M=A[1],S=A[2],C=A[3],E=T*_+C*y+M*w-S*x,L=M*_+C*x+S*y-T*w,z=S*_+C*w+T*x-M*y,O=C*_-T*y-M*x-S*w;if(n){y=f,x=p,w=m;var D=Math.sin(n)/l(y,x,w);y*=D,x*=D,w*=D,O=O*(_=Math.cos(e))-(E=E*_+O*y+L*w-z*x)*y-(L=L*_+O*x+z*y-E*w)*x-(z=z*_+O*w+E*x-L*y)*w}var I=c(E,L,z,O);I>1e-6?(E/=I,L/=I,z/=I,O/=I):(E=L=z=0,O=1),this.rotation.set(t,E,L,z,O)},h.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var o=this.computedMatrix;i(o,e,r,n);var a=this.computedRotation;s(a,o[0],o[1],o[2],o[4],o[5],o[6],o[8],o[9],o[10]),d(a,a),this.rotation.set(t,a[0],a[1],a[2],a[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-e[c],2);this.radius.set(t,.5*Math.log(Math.max(l,1e-6))),this.center.set(t,r[0],r[1],r[2])},h.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},h.setMatrix=function(t,e){var r=this.computedRotation;s(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),d(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;a(n,e);var i=n[15];if(Math.abs(i)>1e-6){var o=n[12]/i,l=n[13]/i,c=n[14]/i;this.recalcMatrix(t);var u=Math.exp(this.computedRadius[0]);this.center.set(t,o-n[2]*u,l-n[6]*u,c-n[10]*u),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},h.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},h.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},h.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},h.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},h.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},1371:function(t,e,r){"use strict";var n=r(3233);t.exports=function(t,e,r){return n(r=void 0!==r?r+"":" ",e)+t}},3202:function(t){t.exports=function(t,e){e||(e=[0,""]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},3088:function(t,e,r){"use strict";t.exports=function(t,e){for(var r=0|e.length,i=t.length,o=[new Array(r),new Array(r)],a=0;a0){a=o[d][r][0],l=d;break}s=a[1^l];for(var u=0;u<2;++u)for(var h=o[u][r],f=0;f0&&(a=p,s=m,l=u)}return i||a&&c(a,l),s}function u(t,r){var i=o[r][t][0],a=[t];c(i,r);for(var s=i[1^r];;){for(;s!==t;)a.push(s),s=d(a[a.length-2],s,!1);if(o[0][t].length+o[1][t].length===0)break;var l=a[a.length-1],u=t,h=a[1],f=d(l,u,!0);if(n(e[l],e[u],e[h],e[f])<0)break;a.push(t),s=d(l,u)}return a}function h(t,e){return e[1]===e[e.length-1]}for(a=0;a0;){o[0][a].length;var m=u(a,f);h(0,m)?p.push.apply(p,m):(p.length>0&&l.push(p),p=m)}p.length>0&&l.push(p)}return l};var n=r(3140)},5609:function(t,e,r){"use strict";t.exports=function(t,e){for(var r=n(t,e.length),i=new Array(e.length),o=new Array(e.length),a=[],s=0;s0;){i[f=a.pop()]=!1;var c=r[f];for(s=0;s0}))).length,g=new Array(m),v=new Array(m);for(f=0;f0;){var j=F.pop(),N=C[j];l(N,(function(t,e){return t-e}));var B,U=N.length,G=P[j];for(0===G&&(B=[V=p[j]]),f=0;f=0||(P[H]=1^G,F.push(H),0===G&&(R(V=p[H])||(V.reverse(),B.push(V))))}0===G&&r.push(B)}return r};var n=r(3134),i=r(3088),o=r(5085),a=r(5250),s=r(8210),l=r(1682),c=r(5609);function d(t,e){for(var r=new Array(t),n=0;n0&&e[i]===r[0]))return 1;o=t[i-1]}for(var s=1;o;){var l=o.key,c=n(r,l[0],l[1]);if(l[0][0]0))return 0;s=-1,o=o.right}else if(c>0)o=o.left;else{if(!(c<0))return 0;s=1,o=o.right}}return s}}(v.slabs,v.coordinates);return 0===o.length?b:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(l(o),b)};var n=r(3250)[3],i=r(4209),o=r(3352),a=r(2478);function s(){return!0}function l(t){for(var e={},r=0;r=c?(A=1,b=c+2*h+p):b=h*(A=-h/c)+p):(A=0,f>=0?(T=0,b=p):-f>=u?(T=1,b=u+2*f+p):b=f*(T=-f/u)+p);else if(T<0)T=0,h>=0?(A=0,b=p):-h>=c?(A=1,b=c+2*h+p):b=h*(A=-h/c)+p;else{var M=1/k;b=(A*=M)*(c*A+d*(T*=M)+2*h)+T*(d*A+u*T+2*f)+p}else A<0?(x=u+f)>(y=d+h)?(w=x-y)>=(_=c-2*d+u)?(A=1,T=0,b=c+2*h+p):b=(A=w/_)*(c*A+d*(T=1-A)+2*h)+T*(d*A+u*T+2*f)+p:(A=0,x<=0?(T=1,b=u+2*f+p):f>=0?(T=0,b=p):b=f*(T=-f/u)+p):T<0?(x=c+h)>(y=d+f)?(w=x-y)>=(_=c-2*d+u)?(T=1,A=0,b=u+2*f+p):b=(A=1-(T=w/_))*(c*A+d*T+2*h)+T*(d*A+u*T+2*f)+p:(T=0,x<=0?(A=1,b=c+2*h+p):h>=0?(A=0,b=p):b=h*(A=-h/c)+p):(w=u+f-d-h)<=0?(A=0,T=1,b=u+2*f+p):w>=(_=c-2*d+u)?(A=1,T=0,b=c+2*h+p):b=(A=w/_)*(c*A+d*(T=1-A)+2*h)+T*(d*A+u*T+2*f)+p;var S=1-A-T;for(l=0;l0){var c=t[r-1];if(0===n(s,c)&&o(c)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},3233:function(t){"use strict";var e,r="";t.exports=function(t,n){if("string"!=typeof t)throw new TypeError("expected a string");if(1===n)return t;if(2===n)return t+t;var i=t.length*n;if(e!==t||void 0===e)e=t,r="";else if(r.length>=i)return r.substr(0,i);for(;i>r.length&&n>1;)1&n&&(r+=t),n>>=1,t+=t;return r=(r+=t).substr(0,i)}},3025:function(t,e,r){t.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(t){"use strict";t.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,i=e-2;i>=0;--i){var o=r;(l=(s=t[i])-((r=o+s)-o))&&(t[--n]=r,r=l)}var a=0;for(i=n;i0){if(o<=0)return a;n=i+o}else{if(!(i<0))return a;if(o>=0)return a;n=-(i+o)}var s=33306690738754716e-32*n;return a>=s||a<=-s?a:u(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],o=e[0]-n[0],a=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],c=r[1]-n[1],d=t[2]-n[2],u=e[2]-n[2],f=r[2]-n[2],p=o*c,m=a*l,g=a*s,v=i*c,b=i*l,y=o*s,x=d*(p-m)+u*(g-v)+f*(b-y),w=7771561172376103e-31*((Math.abs(p)+Math.abs(m))*Math.abs(d)+(Math.abs(g)+Math.abs(v))*Math.abs(u)+(Math.abs(b)+Math.abs(y))*Math.abs(f));return x>w||-x>w?x:h(t,e,r,n)}];function p(t){var e=f[t.length];return e||(e=f[t.length]=d(t.length)),e.apply(void 0,t)}function m(t,e,r,n,i,o,a){return function(e,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return n(e,r);case 3:return i(e,r,s);case 4:return o(e,r,s,l);case 5:return a(e,r,s,l,c)}for(var d=new Array(arguments.length),u=0;u0&&a>0||o<0&&a<0)return!1;var s=n(r,t,e),l=n(i,t,e);return!(s>0&&l>0||s<0&&l<0)&&(0!==o||0!==a||0!==s||0!==l||function(t,e,r,n){for(var i=0;i<2;++i){var o=t[i],a=e[i],s=Math.min(o,a),l=Math.max(o,a),c=r[i],d=n[i],u=Math.min(c,d);if(Math.max(c,d)=n?(i=u,(l+=1)=n?(i=u,(l+=1)>1,c=e[2*l+1];if(c===o)return l;o>1,c=e[2*l+1];if(c===o)return l;o>1,c=e[2*l+1];if(c===o)return l;o0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},2014:function(t,e,r){"use strict";var n=r(3105),i=r(4623);function o(t,e){var r=t.length,n=t.length-e.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return(s=t[0]+t[1]-e[0]-e[1])||i(t[0],t[1])-i(e[0],e[1]);case 3:var o=t[0]+t[1],a=e[0]+e[1];if(s=o+t[2]-(a+e[2]))return s;var s,l=i(t[0],t[1]),c=i(e[0],e[1]);return(s=i(l,t[2])-i(c,e[2]))||i(l+t[2],o)-i(c+e[2],a);default:var d=t.slice(0);d.sort();var u=e.slice(0);u.sort();for(var h=0;h>1,s=o(t[a],e);s<=0?(0===s&&(i=a),r=a+1):s>0&&(n=a-1)}return i}function d(t,e){for(var r=new Array(t.length),i=0,a=r.length;i=t.length||0!==o(t[g],s)););}return r}function u(t,e){if(e<0)return[];for(var r=[],i=(1<>>d&1&&c.push(i[d]);e.push(c)}return s(e)},e.skeleton=u,e.boundary=function(t){for(var e=[],r=0,n=t.length;r>1:(t>>1)-1}function y(t){for(var e=v(t);;){var r=e,n=2*t+1,i=2*(t+1),o=t;if(n0;){var r=b(t);if(!(r>=0&&e0){var t=A[0];return g(0,M-1),M-=1,y(0),t}return-1}function _(t,e){var r=A[t];return c[r]===e?t:(c[r]=-1/0,x(t),w(),c[r]=e,x((M+=1)-1))}function k(t){if(!d[t]){d[t]=!0;var e=s[t],r=l[t];s[r]>=0&&(s[r]=e),l[e]>=0&&(l[e]=r),T[e]>=0&&_(T[e],m(e)),T[r]>=0&&_(T[r],m(r))}}var A=[],T=new Array(o);for(u=0;u>1;u>=0;--u)y(u);for(;;){var S=w();if(S<0||c[S]>r)break;k(S)}var C=[];for(u=0;u=0&&r>=0&&e!==r){var n=T[e],i=T[r];n!==i&&L.push([n,i])}})),i.unique(i.normalize(L)),{positions:C,edges:L}};var n=r(3250),i=r(2014)},1303:function(t,e,r){"use strict";t.exports=function(t,e){var r,o,a,s;if(e[0][0]e[1][0]))return i(e,t);r=e[1],o=e[0]}if(t[0][0]t[1][0]))return-i(t,e);a=t[1],s=t[0]}var l=n(r,o,s),c=n(r,o,a);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=n(s,a,o),c=n(s,a,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return o[0]-s[0]};var n=r(3250);function i(t,e){var r,i,o,a;if(e[0][0]e[1][0])){var s=Math.min(t[0][1],t[1][1]),l=Math.max(t[0][1],t[1][1]),c=Math.min(e[0][1],e[1][1]),d=Math.max(e[0][1],e[1][1]);return ld?s-d:l-d}r=e[1],i=e[0]}t[0][1]0)if(e[0]!==a[1][0])r=t,t=t.right;else{if(l=c(t.right,e))return l;t=t.left}else{if(e[0]!==a[1][0])return t;var l;if(l=c(t.right,e))return l;t=t.left}}return r}function d(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function u(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}s.prototype.castUp=function(t){var e=n.le(this.coordinates,t[0]);if(e<0)return-1;this.slabs[e];var r=c(this.slabs[e],t),i=-1;if(r&&(i=r.value),this.coordinates[e]===t[0]){var s=null;if(r&&(s=r.key),e>0){var d=c(this.slabs[e-1],t);d&&(s?a(d.key,s)>0&&(s=d.key,i=d.value):(i=d.value,s=d.key))}var u=this.horizontal[e];if(u.length>0){var h=n.ge(u,t[1],l);if(h=u.length)return i;f=u[h]}}if(f.start)if(s){var p=o(s[0],s[1],[t[0],f.y]);s[0][0]>s[1][0]&&(p=-p),p>0&&(i=f.index)}else i=f.index;else f.y!==t[1]&&(i=f.index)}}}return i}},5202:function(t,e,r){"use strict";var n=r(1944),i=r(8210);function o(t,e){var r=i(n(t,e),[e[e.length-1]]);return r[r.length-1]}function a(t,e,r,n){var i=-e/(n-e);i<0?i=0:i>1&&(i=1);for(var o=1-i,a=t.length,s=new Array(a),l=0;l0||i>0&&d<0){var u=a(s,d,l,i);r.push(u),n.push(u.slice())}d<0?n.push(l.slice()):d>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=d}return{positive:r,negative:n}},t.exports.positive=function(t,e){for(var r=[],n=o(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(a(i,c,s,n)),c>=0&&r.push(s.slice()),n=c}return r},t.exports.negative=function(t,e){for(var r=[],n=o(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(a(i,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},3387:function(t,e,r){var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return function(t,e){var r,n,a,s,l,c,d,u,h,f=1,p=t.length,m="";for(n=0;n=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?m+=r:(!i.number.test(s.type)||u&&!s.sign?h="":(h=u?"+":"-",r=r.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",d=s.width-(h+r).length,l=s.width&&d>0?c.repeat(d):"",m+=s.align?h+r+l:"0"===c?h+l+r:l+h+r)}return m}(function(t){if(s[t])return s[t];for(var e,r=t,n=[],o=0;r;){if(null!==(e=i.text.exec(r)))n.push(e[0]);else if(null!==(e=i.modulo.exec(r)))n.push("%");else{if(null===(e=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var a=[],l=e[2],c=[];if(null===(c=i.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=i.key_access.exec(l)))a.push(c[1]);else{if(null===(c=i.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}e[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}r=r.substring(e[0].length)}return s[t]=n}(t),arguments)}function a(t,e){return o.apply(null,[t].concat(e||[]))}var s=Object.create(null);e.sprintf=o,e.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(n=function(){return{sprintf:o,vsprintf:a}}.call(e,r,e,t))||(t.exports=n))}()},3711:function(t,e,r){"use strict";t.exports=function(t,e){if(t.dimension<=0)return{positions:[],cells:[]};if(1===t.dimension)return function(t,e){for(var r=i(t,e),n=r.length,o=new Array(n),a=new Array(n),s=0;sn|0},vertex:function(t,e,r,n,i,o,a,s,l,c,d,u,h){var f=(0|a)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==f&&15!==f)switch(f){case 0:case 15:d.push([t-.5,e-.5]);break;case 1:d.push([t-.25-.25*(n+r-2*h)/(r-n),e-.25-.25*(i+r-2*h)/(r-i)]);break;case 2:d.push([t-.75-.25*(-n-r+2*h)/(n-r),e-.25-.25*(o+n-2*h)/(n-o)]);break;case 3:d.push([t-.5,e-.5-.5*(i+r+o+n-4*h)/(r-i+n-o)]);break;case 4:d.push([t-.25-.25*(o+i-2*h)/(i-o),e-.75-.25*(-i-r+2*h)/(i-r)]);break;case 5:d.push([t-.5-.5*(n+r+o+i-4*h)/(r-n+i-o),e-.5]);break;case 6:d.push([t-.5-.25*(-n-r+o+i)/(n-r+i-o),e-.5-.25*(-i-r+o+n)/(i-r+n-o)]);break;case 7:d.push([t-.75-.25*(o+i-2*h)/(i-o),e-.75-.25*(o+n-2*h)/(n-o)]);break;case 8:d.push([t-.75-.25*(-o-i+2*h)/(o-i),e-.75-.25*(-o-n+2*h)/(o-n)]);break;case 9:d.push([t-.5-.25*(n+r+-o-i)/(r-n+o-i),e-.5-.25*(i+r+-o-n)/(r-i+o-n)]);break;case 10:d.push([t-.5-.5*(-n-r-o-i+4*h)/(n-r+o-i),e-.5]);break;case 11:d.push([t-.25-.25*(-o-i+2*h)/(o-i),e-.75-.25*(i+r-2*h)/(r-i)]);break;case 12:d.push([t-.5,e-.5-.5*(-i-r-o-n+4*h)/(i-r+o-n)]);break;case 13:d.push([t-.75-.25*(n+r-2*h)/(r-n),e-.25-.25*(-o-n+2*h)/(o-n)]);break;case 14:d.push([t-.25-.25*(-n-r+2*h)/(n-r),e-.25-.25*(-i-r+2*h)/(i-r)])}},cell:function(t,e,r,n,i,o,a,s,l){i?s.push([t,e]):s.push([e,t])}});return function(t,e){var r=[],i=[];return n(t,r,i,e),{positions:r,cells:i}}}},a={}},529:function(t,e,r){"use strict";t.exports=function t(e,r,n){var o=(n=n||{}).fontStyle||"normal",s=n.fontWeight||"normal",l=n.fontVariant||"normal",c=[o,s,l,e].join("_"),d=a[c];d||(d=a[c]={" ":{data:new Float32Array(0),shape:.2}});var u=d[r];if(!u)if(r.length<=1||!/\d/.test(r))u=d[r]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),i=0,o=0,a=0;a0&&(m+=.02);var v=new Float32Array(p),b=0,y=-.5*m;for(g=0;gMath.max(r,n)?i[2]=1:r>Math.max(e,n)?i[0]=1:i[1]=1;for(var o=0,a=0,l=0;l<3;++l)o+=t[l]*t[l],a+=i[l]*t[l];for(l=0;l<3;++l)i[l]-=a/o*t[l];return s(i,i),i}function h(t,e,r,i,o,a,s,l){this.center=n(r),this.up=n(i),this.right=n(o),this.radius=n([a]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var f=h.prototype;f.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},f.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},f.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,n=0,i=0,o=0;o<3;++o)i+=e[o]*r[o],n+=e[o]*e[o];var l=Math.sqrt(n),d=0;for(o=0;o<3;++o)r[o]-=e[o]*i/n,d+=r[o]*r[o],e[o]/=l;var u=Math.sqrt(d);for(o=0;o<3;++o)r[o]/=u;var h=this.computedToward;a(h,e,r),s(h,h);var f=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(p),v=Math.sin(p),b=Math.cos(m),y=Math.sin(m),x=this.computedCenter,w=g*b,_=v*b,k=y,A=-g*y,T=-v*y,M=b,S=this.computedEye,C=this.computedMatrix;for(o=0;o<3;++o){var E=w*r[o]+_*h[o]+k*e[o];C[4*o+1]=A*r[o]+T*h[o]+M*e[o],C[4*o+2]=E,C[4*o+3]=0}var L=C[1],z=C[5],O=C[9],D=C[2],I=C[6],R=C[10],F=z*R-O*I,P=O*D-L*R,j=L*I-z*D,N=c(F,P,j);for(F/=N,P/=N,j/=N,C[0]=F,C[4]=P,C[8]=j,o=0;o<3;++o)S[o]=x[o]+C[2+4*o]*f;for(o=0;o<3;++o){d=0;for(var B=0;B<3;++B)d+=C[o+4*B]*S[B];C[12+o]=-d}C[15]=1},f.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var p=[0,0,0];f.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;p[0]=i[2],p[1]=i[6],p[2]=i[10];for(var a=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)i[4*c]=a[c],i[4*c+1]=s[c],i[4*c+2]=l[c];for(o(i,i,n,p),c=0;c<3;++c)a[c]=i[4*c],s[c]=i[4*c+1];this.up.set(t,a[0],a[1],a[2]),this.right.set(t,s[0],s[1],s[2])}},f.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,o=(Math.exp(this.computedRadius[0]),i[1]),a=i[5],s=i[9],l=c(o,a,s);o/=l,a/=l,s/=l;var d=i[0],u=i[4],h=i[8],f=d*o+u*a+h*s,p=c(d-=o*f,u-=a*f,h-=s*f),m=(d/=p)*e+o*r,g=(u/=p)*e+a*r,v=(h/=p)*e+s*r;this.center.move(t,m,g,v);var b=Math.exp(this.computedRadius[0]);b=Math.max(1e-4,b+n),this.radius.set(t,Math.log(b))},f.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},f.setMatrix=function(t,e,r,n){var o=1;"number"==typeof r&&(o=0|r),(o<0||o>3)&&(o=1);var a=(o+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[o],l=e[o+4],u=e[o+8];if(n){var h=Math.abs(s),f=Math.abs(l),p=Math.abs(u),m=Math.max(h,f,p);h===m?(s=s<0?-1:1,l=u=0):p===m?(u=u<0?-1:1,s=l=0):(l=l<0?-1:1,s=u=0)}else{var g=c(s,l,u);s/=g,l/=g,u/=g}var v,b,y=e[a],x=e[a+4],w=e[a+8],_=y*s+x*l+w*u,k=c(y-=s*_,x-=l*_,w-=u*_),A=l*(w/=k)-u*(x/=k),T=u*(y/=k)-s*w,M=s*x-l*y,S=c(A,T,M);if(A/=S,T/=S,M/=S,this.center.jump(t,H,W,q),this.radius.idle(t),this.up.jump(t,s,l,u),this.right.jump(t,y,x,w),2===o){var C=e[1],E=e[5],L=e[9],z=C*y+E*x+L*w,O=C*A+E*T+L*M;v=F<0?-Math.PI/2:Math.PI/2,b=Math.atan2(O,z)}else{var D=e[2],I=e[6],R=e[10],F=D*s+I*l+R*u,P=D*y+I*x+R*w,j=D*A+I*T+R*M;v=Math.asin(d(F)),b=Math.atan2(j,P)}this.angle.jump(t,b,v),this.recalcMatrix(t);var N=e[2],B=e[6],U=e[10],G=this.computedMatrix;i(G,e);var V=G[15],H=G[12]/V,W=G[13]/V,q=G[14]/V,Y=Math.exp(this.computedRadius[0]);this.center.jump(t,H-N*Y,W-B*Y,q-U*Y)},f.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},f.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},f.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},f.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},f.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],o=n[1],a=n[2],s=c(i,o,a);if(!(s<1e-6)){i/=s,o/=s,a/=s;var l=e[0]-r[0],u=e[1]-r[1],h=e[2]-r[2],f=c(l,u,h);if(!(f<1e-6)){l/=f,u/=f,h/=f;var p=this.computedRight,m=p[0],g=p[1],v=p[2],b=i*m+o*g+a*v,y=c(m-=b*i,g-=b*o,v-=b*a);if(!(y<.01&&(y=c(m=o*h-a*u,g=a*l-i*h,v=i*u-o*l))<1e-6)){m/=y,g/=y,v/=y,this.up.set(t,i,o,a),this.right.set(t,m,g,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(f));var x=o*v-a*g,w=a*m-i*v,_=i*g-o*m,k=c(x,w,_),A=i*l+o*u+a*h,T=m*l+g*u+v*h,M=(x/=k)*l+(w/=k)*u+(_/=k)*h,S=Math.asin(d(A)),C=Math.atan2(M,T),E=this.angle._state,L=E[E.length-1],z=E[E.length-2];L%=2*Math.PI;var O=Math.abs(L+2*Math.PI-C),D=Math.abs(L-C),I=Math.abs(L-2*Math.PI-C);O0?r.pop():new ArrayBuffer(t)}function p(t){return new Uint8Array(f(t),0,t)}function m(t){return new Uint16Array(f(2*t),0,t)}function g(t){return new Uint32Array(f(4*t),0,t)}function v(t){return new Int8Array(f(t),0,t)}function b(t){return new Int16Array(f(2*t),0,t)}function y(t){return new Int32Array(f(4*t),0,t)}function x(t){return new Float32Array(f(4*t),0,t)}function w(t){return new Float64Array(f(8*t),0,t)}function _(t){return a?new Uint8ClampedArray(f(t),0,t):p(t)}function k(t){return s?new BigUint64Array(f(8*t),0,t):null}function A(t){return l?new BigInt64Array(f(8*t),0,t):null}function T(t){return new DataView(f(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=u[e];return r.length>0?r.pop():new o(t)}e.free=function(t){if(o.isBuffer(t))u[n.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|n.log2(e);d[r].push(t)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(t){h(t.buffer)},e.freeArrayBuffer=h,e.freeBuffer=function(t){u[n.log2(t.length)].push(t)},e.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return f(t);switch(e){case"uint8":return p(t);case"uint16":return m(t);case"uint32":return g(t);case"int8":return v(t);case"int16":return b(t);case"int32":return y(t);case"float":case"float32":return x(t);case"double":case"float64":return w(t);case"uint8_clamped":return _(t);case"bigint64":return A(t);case"biguint64":return k(t);case"buffer":return M(t);case"data":case"dataview":return T(t);default:return null}return null},e.mallocArrayBuffer=f,e.mallocUint8=p,e.mallocUint16=m,e.mallocUint32=g,e.mallocInt8=v,e.mallocInt16=b,e.mallocInt32=y,e.mallocFloat32=e.mallocFloat=x,e.mallocFloat64=e.mallocDouble=w,e.mallocUint8Clamped=_,e.mallocBigUint64=k,e.mallocBigInt64=A,e.mallocDataView=T,e.mallocBuffer=M,e.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,d[t].length=0,u[t].length=0}},1755:function(t){"use strict";function e(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e0&&(o=n.size),n.lineSpacing&&n.lineSpacing>0&&(a=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts)),r.font=[n.fontStyle,n.fontVariant,n.fontWeight,o+"px",n.font].filter((function(t){return t})).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",_(function(t,e,r,n,o,a){r=r.replace(/\n/g,""),r=!0===a.breaklines?r.replace(/\/g,"\n"):r.replace(/\/g," ");var s="",l=[];for(k=0;k-1?parseInt(t[1+i]):0,l=o>-1?parseInt(r[1+o]):0;s!==l&&(n=n.replace(P(),"?px "),M*=Math.pow(.75,l-s),n=n.replace("?px ",P())),T+=.25*E*(l-s)}if(!0===a.superscripts){var c=t.indexOf(p),u=r.indexOf(p),f=c>-1?parseInt(t[1+c]):0,m=u>-1?parseInt(r[1+u]):0;f!==m&&(n=n.replace(P(),"?px "),M*=Math.pow(.75,m-f),n=n.replace("?px ",P())),T-=.25*E*(m-f)}if(!0===a.bolds){var g=t.indexOf(d)>-1,b=r.indexOf(d)>-1;!g&&b&&(n=y?n.replace("italic ","italic bold "):"bold "+n),g&&!b&&(n=n.replace("bold ",""))}if(!0===a.italics){var y=t.indexOf(h)>-1,x=r.indexOf(h)>-1;!y&&x&&(n="italic "+n),y&&!x&&(n=n.replace("italic ",""))}e.font=n}for(_=0;_",o="",a=i.length,s=o.length,l=e[0]===p||e[0]===v,c=0,d=-s;c>-1&&-1!==(c=r.indexOf(i,c))&&-1!==(d=r.indexOf(o,c+a))&&!(d<=c);){for(var u=c;u=d)n[u]=null,r=r.substr(0,u)+" "+r.substr(u+1);else if(null!==n[u]){var h=n[u].indexOf(e[0]);-1===h?n[u]+=e:l&&(n[u]=n[u].substr(0,h+1)+(1+parseInt(n[u][h+1]))+n[u].substr(h+2))}var f=c+a,m=r.substr(f,d-f).indexOf(i);c=-1!==m?m:d+s}return n}function x(t,e){var r=n(t,128);return e?o(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function w(t,e,r,n){var i=x(t,n),o=function(t,e,r){for(var n=e.textAlign||"start",i=e.textBaseline||"alphabetic",o=[1<<30,1<<30],a=[0,0],s=t.length,l=0;l=0?e[o]:i}))},has___:{value:y((function(e){var n=b(e);return n?r in n:t.indexOf(e)>=0}))},set___:{value:y((function(n,i){var o,a=b(n);return a?a[r]=i:(o=t.indexOf(n))>=0?e[o]=i:(o=t.length,e[o]=i,t[o]=n),this}))},delete___:{value:y((function(n){var i,o,a=b(n);return a?r in a&&delete a[r]:!((i=t.indexOf(n))<0||(o=t.length-1,t[i]=void 0,e[i]=e[o],t[i]=t[o],t.length=o,e.length=o,0))}))}})};m.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof r?function(){function n(){this instanceof m||x();var t,n=new r,i=void 0,o=!1;return t=e?function(t,e){return n.set(t,e),n.has(t)||(i||(i=new m),i.set(t,e)),this}:function(t,e){if(o)try{n.set(t,e)}catch(r){i||(i=new m),i.set___(t,e)}else n.set(t,e);return this},Object.create(m.prototype,{get___:{value:y((function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)}))},has___:{value:y((function(t){return n.has(t)||!!i&&i.has___(t)}))},set___:{value:y(t)},delete___:{value:y((function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e}))},permitHostObjects___:{value:y((function(t){if(t!==g)throw new Error("bogus call to permitHostObjects___");o=!0}))}})}e&&"undefined"!=typeof Proxy&&(Proxy=void 0),n.prototype=m.prototype,t.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),t.exports=m)}function g(t){t.permitHostObjects___&&t.permitHostObjects___(g)}function v(t){return!(t.substr(0,8)==l&&"___"===t.substr(t.length-3))}function b(t){if(t!==Object(t))throw new TypeError("Not an object: "+t);var e=t[c];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return a(t,c,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function y(t){return t.prototype=null,Object.freeze(t)}function x(){f||"undefined"==typeof console||(f=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},236:function(t,e,r){var n=r(8284);t.exports=function(){var t={};return function(e){if(("object"!=typeof e||null===e)&&"function"!=typeof e)throw new Error("Weakmap-shim: Key must be object");var r=e.valueOf(t);return r&&r.identity===t?r:n(e,t)}}},8284:function(t){t.exports=function(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}},606:function(t,e,r){var n=r(236);t.exports=function(){var t=n();return{get:function(e,r){var n=t(e);return n.hasOwnProperty("value")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return"value"in t(e)},delete:function(e){return delete t(e).value}}}},3349:function(t){"use strict";t.exports=function(t){var e={};return function(r,n,i){var o=r.dtype,a=r.order,s=[o,a.join()].join(),l=e[s];return l||(e[s]=l=t([o,a])),l(r.shape.slice(0),r.data,r.stride,0|r.offset,n,i)}}(function(){return function(t,e,r,n,i,o){var a=t[0],s=r[0],l=[0],c=s;n|=0;var d=0,u=s;for(d=0;d=0!=f>=0&&i.push(l[0]+.5+.5*(h+f)/(h-f)),n+=u,++l[0]}}}.bind(void 0,{funcName:"zeroCrossings"}))},781:function(t,e,r){"use strict";t.exports=function(t,e){var r=[];return e=+e||0,n(t.hi(t.shape[0]-1),r,e),r};var n=r(3349)},7790:function(){}},r={};function i(t){var n=r[t];if(void 0!==n)return n.exports;var o=r[t]={id:t,loaded:!1,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t};var o=i(1964);t.exports=o}()},53824:t=>{t.exports=function(t,e,r,n){var i=t[0],o=t[1],a=!1;void 0===r&&(r=0),void 0===n&&(n=e.length);for(var s=n-r,l=0,c=s-1;lo!=f>o&&i<(h-d)*(o-u)/(f-u)+d&&(a=!a)}return a}},48439:(t,e,r)=>{var n,i=r(89528),o=r(45505),a=r(25645),s=r(31997),l=r(94638),c=r(52148),d=!1,u=o();function h(t,e,r){var i=n.segments(t),o=n.segments(e),a=r(n.combine(i,o));return n.polygon(a)}n={buildLog:function(t){return!0===t?d=i():!1===t&&(d=!1),!1!==d&&d.list},epsilon:function(t){return u.epsilon(t)},segments:function(t){var e=a(!0,u,d);return t.regions.forEach(e.addRegion),{segments:e.calculate(t.inverted),inverted:t.inverted}},combine:function(t,e){return{combined:a(!1,u,d).calculate(t.segments,t.inverted,e.segments,e.inverted),inverted1:t.inverted,inverted2:e.inverted}},selectUnion:function(t){return{segments:l.union(t.combined,d),inverted:t.inverted1||t.inverted2}},selectIntersect:function(t){return{segments:l.intersect(t.combined,d),inverted:t.inverted1&&t.inverted2}},selectDifference:function(t){return{segments:l.difference(t.combined,d),inverted:t.inverted1&&!t.inverted2}},selectDifferenceRev:function(t){return{segments:l.differenceRev(t.combined,d),inverted:!t.inverted1&&t.inverted2}},selectXor:function(t){return{segments:l.xor(t.combined,d),inverted:t.inverted1!==t.inverted2}},polygon:function(t){return{regions:s(t.segments,u,d),inverted:t.inverted}},polygonFromGeoJSON:function(t){return c.toPolygon(n,t)},polygonToGeoJSON:function(t){return c.fromPolygon(n,u,t)},union:function(t,e){return h(t,e,n.selectUnion)},intersect:function(t,e){return h(t,e,n.selectIntersect)},difference:function(t,e){return h(t,e,n.selectDifference)},differenceRev:function(t,e){return h(t,e,n.selectDifferenceRev)},xor:function(t,e){return h(t,e,n.selectXor)}},"object"==typeof window&&(window.PolyBool=n),t.exports=n},89528:t=>{t.exports=function(){var t,e=0,r=!1;function n(e,r){return t.list.push({type:e,data:r?JSON.parse(JSON.stringify(r)):void 0}),t}return t={list:[],segmentId:function(){return e++},checkIntersection:function(t,e){return n("check",{seg1:t,seg2:e})},segmentChop:function(t,e){return n("div_seg",{seg:t,pt:e}),n("chop",{seg:t,pt:e})},statusRemove:function(t){return n("pop_seg",{seg:t})},segmentUpdate:function(t){return n("seg_update",{seg:t})},segmentNew:function(t,e){return n("new_seg",{seg:t,primary:e})},segmentRemove:function(t){return n("rem_seg",{seg:t})},tempStatus:function(t,e,r){return n("temp_status",{seg:t,above:e,below:r})},rewind:function(t){return n("rewind",{seg:t})},status:function(t,e,r){return n("status",{seg:t,above:e,below:r})},vert:function(e){return e===r?t:(r=e,n("vert",{x:e}))},log:function(t){return"string"!=typeof t&&(t=JSON.stringify(t,!1," ")),n("log",{txt:t})},reset:function(){return n("reset")},selected:function(t){return n("selected",{segs:t})},chainStart:function(t){return n("chain_start",{seg:t})},chainRemoveHead:function(t,e){return n("chain_rem_head",{index:t,pt:e})},chainRemoveTail:function(t,e){return n("chain_rem_tail",{index:t,pt:e})},chainNew:function(t,e){return n("chain_new",{pt1:t,pt2:e})},chainMatch:function(t){return n("chain_match",{index:t})},chainClose:function(t){return n("chain_close",{index:t})},chainAddHead:function(t,e){return n("chain_add_head",{index:t,pt:e})},chainAddTail:function(t,e){return n("chain_add_tail",{index:t,pt:e})},chainConnect:function(t,e){return n("chain_con",{index1:t,index2:e})},chainReverse:function(t){return n("chain_rev",{index:t})},chainJoin:function(t,e){return n("chain_join",{index1:t,index2:e})},done:function(){return n("done")}}}},45505:t=>{t.exports=function(t){"number"!=typeof t&&(t=1e-10);var e={epsilon:function(e){return"number"==typeof e&&(t=e),t},pointAboveOrOnLine:function(e,r,n){var i=r[0],o=r[1],a=n[0],s=n[1],l=e[0];return(a-i)*(e[1]-o)-(s-o)*(l-i)>=-t},pointBetween:function(e,r,n){var i=e[1]-r[1],o=n[0]-r[0],a=e[0]-r[0],s=n[1]-r[1],l=a*o+i*s;return!(l-t)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])t!=a-i>t&&(o-c)*(i-d)/(a-d)+c-n>t&&(s=!s),o=c,a=d}return s}};return e}},52148:t=>{var e={toPolygon:function(t,e){function r(e){if(e.length<=0)return t.segments({inverted:!1,regions:[]});function r(e){var r=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[r]})}for(var n=r(e[0]),i=1;i{var n=r(68871);t.exports=function(t,e,r){function i(t,e,n){return{id:r?r.segmentId():-1,start:t,end:e,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var o=n.create();function a(t,r){o.insertBefore(t,(function(n){return i=t.isStart,o=t.pt,a=r,s=n.isStart,l=n.pt,c=n.other.pt,(0!==(d=e.pointsCompare(o,l))?d:e.pointsSame(a,c)?0:i!==s?i?1:-1:e.pointAboveOrOnLine(a,s?l:c,s?c:l)?1:-1)<0;var i,o,a,s,l,c,d}))}function s(t,e){var r=function(t,e){var r=n.node({isStart:!0,pt:t.start,seg:t,primary:e,other:null,status:null});return a(r,t.end),r}(t,e);return function(t,e,r){var i=n.node({isStart:!1,pt:e.end,seg:e,primary:r,other:t,status:null});t.other=i,a(i,t.pt)}(r,t,e),r}function l(t,e){var n=i(e,t.seg.end,t.seg);return function(t,e){r&&r.segmentChop(t.seg,e),t.other.remove(),t.seg.end=e,t.other.pt=e,a(t.other,t.pt)}(t,e),s(n,t.primary)}function c(i,a){var s=n.create();function c(t){return s.findTransition((function(r){var n,i,o,a,s,l;return n=t,i=r.ev,o=n.seg.start,a=n.seg.end,s=i.seg.start,l=i.seg.end,(e.pointsCollinear(o,s,l)?e.pointsCollinear(a,s,l)||e.pointAboveOrOnLine(a,s,l)?1:-1:e.pointAboveOrOnLine(o,s,l)?1:-1)>0}))}function d(t,n){var i=t.seg,o=n.seg,a=i.start,s=i.end,c=o.start,d=o.end;r&&r.checkIntersection(i,o);var u=e.linesIntersect(a,s,c,d);if(!1===u){if(!e.pointsCollinear(a,s,c))return!1;if(e.pointsSame(a,d)||e.pointsSame(s,c))return!1;var h=e.pointsSame(a,c),f=e.pointsSame(s,d);if(h&&f)return n;var p=!h&&e.pointBetween(a,c,d),m=!f&&e.pointBetween(s,c,d);if(h)return m?l(n,s):l(t,d),n;p&&(f||(m?l(n,s):l(t,d)),l(n,a))}else 0===u.alongA&&(-1===u.alongB?l(t,c):0===u.alongB?l(t,u.pt):1===u.alongB&&l(t,d)),0===u.alongB&&(-1===u.alongA?l(n,a):0===u.alongA?l(n,u.pt):1===u.alongA&&l(n,s));return!1}for(var u=[];!o.isEmpty();){var h=o.getHead();if(r&&r.vert(h.pt[0]),h.isStart){r&&r.segmentNew(h.seg,h.primary);var f=c(h),p=f.before?f.before.ev:null,m=f.after?f.after.ev:null;function g(){if(p){var t=d(h,p);if(t)return t}return!!m&&d(h,m)}r&&r.tempStatus(h.seg,!!p&&p.seg,!!m&&m.seg);var v,b,y=g();if(y)t?(b=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above):y.seg.otherFill=h.seg.myFill,r&&r.segmentUpdate(y.seg),h.other.remove(),h.remove();if(o.getHead()!==h){r&&r.rewind(h.seg);continue}t?(b=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,h.seg.myFill.below=m?m.seg.myFill.above:i,h.seg.myFill.above=b?!h.seg.myFill.below:h.seg.myFill.below):null===h.seg.otherFill&&(v=m?h.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:h.primary?a:i,h.seg.otherFill={above:v,below:v}),r&&r.status(h.seg,!!p&&p.seg,!!m&&m.seg),h.other.status=f.insert(n.node({ev:h}))}else{var x=h.status;if(null===x)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(x.prev)&&s.exists(x.next)&&d(x.prev.ev,x.next.ev),r&&r.statusRemove(x.ev.seg),x.remove(),!h.primary){var w=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=w}u.push(h.seg)}o.getHead().remove()}return r&&r.done(),u}return t?{addRegion:function(t){for(var n,i,o,a=t[t.length-1],l=0;l{t.exports={create:function(){var t={root:{root:!0,next:null},exists:function(e){return null!==e&&e!==t.root},isEmpty:function(){return null===t.root.next},getHead:function(){return t.root.next},insertBefore:function(e,r){for(var n=t.root,i=t.root.next;null!==i;){if(r(i))return e.prev=i.prev,e.next=i,i.prev.next=e,void(i.prev=e);n=i,i=i.next}n.next=e,e.prev=n,e.next=null},findTransition:function(e){for(var r=t.root,n=t.root.next;null!==n&&!e(n);)r=n,n=n.next;return{before:r===t.root?null:r,after:n,insert:function(t){return t.prev=r,t.next=n,r.next=t,null!==n&&(n.prev=t),t}}}};return t},node:function(t){return t.prev=null,t.next=null,t.remove=function(){t.prev.next=t.next,t.next&&(t.next.prev=t.prev),t.prev=null,t.next=null},t}}},31997:t=>{t.exports=function(t,e,r){var n=[],i=[];return t.forEach((function(t){var o=t.start,a=t.end;if(e.pointsSame(o,a))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{r&&r.chainStart(t);for(var s={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},c=s,d=0;d{function e(t,e,r){var n=[];return t.forEach((function(t){var i=(t.myFill.above?8:0)+(t.myFill.below?4:0)+(t.otherFill&&t.otherFill.above?2:0)+(t.otherFill&&t.otherFill.below?1:0);0!==e[i]&&n.push({id:r?r.segmentId():-1,start:t.start,end:t.end,myFill:{above:1===e[i],below:2===e[i]},otherFill:null})})),r&&r.selected(n),n}var r={union:function(t,r){return e(t,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(t,r){return e(t,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(t,r){return e(t,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(t,r){return e(t,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(t,r){return e(t,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};t.exports=r},97905:t=>{"use strict";t.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},39807:t=>{var e,r,n=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var s,l=[],c=!1,d=-1;function u(){c&&s&&(c=!1,s.length?l=s.concat(l):d=-1,l.length&&h())}function h(){if(!c){var t=a(u);c=!0;for(var e=l.length;e;){for(s=l,l=[];++d1)for(var r=1;r{"use strict";var n=r(25359),i=r(34463),o=r(6313),a=r(9994),s=r(34597),l=r(97e3),c=r(91101),d=c.float32,u=c.fract32;t.exports=function(t,e){if("function"==typeof t?(e||(e={}),e.regl=t):e=t,e.length&&(e.positions=e),!(t=e.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var r,c,f,p,m,g,v=t._gl,b={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},y=[];return p=t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),c=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),f=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),m=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=t.buffer({usage:"static",type:"float",data:h}),k(e),r=t({vert:"\n\t\tprecision highp float;\n\n\t\tattribute vec2 position, positionFract;\n\t\tattribute vec4 error;\n\t\tattribute vec4 color;\n\n\t\tattribute vec2 direction, lineOffset, capOffset;\n\n\t\tuniform vec4 viewport;\n\t\tuniform float lineWidth, capSize;\n\t\tuniform vec2 scale, scaleFract, translate, translateFract;\n\n\t\tvarying vec4 fragColor;\n\n\t\tvoid main() {\n\t\t\tfragColor = color / 255.;\n\n\t\t\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\n\n\t\t\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\n\n\t\t\tvec2 position = position + dxy;\n\n\t\t\tvec2 pos = (position + translate) * scale\n\t\t\t\t+ (positionFract + translateFract) * scale\n\t\t\t\t+ (position + translate) * scaleFract\n\t\t\t\t+ (positionFract + translateFract) * scaleFract;\n\n\t\t\tpos += pixelOffset / viewport.zw;\n\n\t\t\tgl_Position = vec4(pos * 2. - 1., 0, 1);\n\t\t}\n\t\t",frag:"\n\t\tprecision highp float;\n\n\t\tvarying vec4 fragColor;\n\n\t\tuniform float opacity;\n\n\t\tvoid main() {\n\t\t\tgl_FragColor = fragColor;\n\t\t\tgl_FragColor.a *= opacity;\n\t\t}\n\t\t",uniforms:{range:t.prop("range"),lineWidth:t.prop("lineWidth"),capSize:t.prop("capSize"),opacity:t.prop("opacity"),scale:t.prop("scale"),translate:t.prop("translate"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{color:{buffer:p,offset:function(t,e){return 4*e.offset},divisor:1},position:{buffer:c,offset:function(t,e){return 8*e.offset},divisor:1},positionFract:{buffer:f,offset:function(t,e){return 8*e.offset},divisor:1},error:{buffer:m,offset:function(t,e){return 16*e.offset},divisor:1},direction:{buffer:g,stride:24,offset:0},lineOffset:{buffer:g,stride:24,offset:8},capOffset:{buffer:g,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:t.prop("viewport")},viewport:t.prop("viewport"),stencil:!1,instances:t.prop("count"),count:h.length}),s(x,{update:k,draw:w,destroy:A,regl:t,gl:v,canvas:v.canvas,groups:y}),x;function x(t){t?k(t):null===t&&A(),w()}function w(e){if("number"==typeof e)return _(e);e&&!Array.isArray(e)&&(e=[e]),t._refresh(),y.forEach((function(t,r){t&&(e&&(e[r]?t.draw=!0:t.draw=!1),t.draw?_(r):t.draw=!0)}))}function _(t){"number"==typeof t&&(t=y[t]),null!=t&&t&&t.count&&t.color&&t.opacity&&t.positions&&t.positions.length>1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function k(t){if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(x.groups=y=t.map((function(t,c){var d=y[c];return t?("function"==typeof t?t={after:t}:"number"==typeof t[0]&&(t={positions:t}),t=a(t,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),d||(y[c]=d={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},b,t)),o(d,t,[{lineWidth:function(t){return.5*+t},capSize:function(t){return.5*+t},opacity:parseFloat,errors:function(t){return t=l(t),r+=t.length,t},positions:function(t,r){return t=l(t,"float64"),r.count=Math.floor(t.length/2),r.bounds=n(t,2),r.offset=e,e+=r.count,t}},{color:function(t,e){var r=e.count;if(t||(t="transparent"),!Array.isArray(t)||"number"==typeof t[0]){var n=t;t=Array(r);for(var o=0;o{"use strict";var n=r(34463),i=r(25359),o=r(34597),a=r(9994),s=r(97e3),l=r(31587),c=r(2433),d=r(91101),u=d.float32,h=d.fract32,f=r(41456),p=r(94698),m=r(72268);function g(t,e){if(!(this instanceof g))return new g(t,e);if("function"==typeof t?(e||(e={}),e.regl=t):e=t,e.length&&(e.positions=e),!(t=e.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=t._gl,this.regl=t,this.passes=[],this.shaders=g.shaders.has(t)?g.shaders.get(t):g.shaders.set(t,g.createShaders(t)).get(t),this.update(e)}t.exports=g,g.dashMult=2,g.maxPatternLength=256,g.precisionThreshold=3e6,g.maxPoints=1e4,g.maxLines=2048,g.shaders=new f,g.createShaders=function(t){var e,r=t.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),n={primitive:"triangle strip",instances:t.prop("count"),count:4,offset:0,uniforms:{miterMode:function(t,e){return"round"===e.join?2:1},miterLimit:t.prop("miterLimit"),scale:t.prop("scale"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),translate:t.prop("translate"),thickness:t.prop("thickness"),dashTexture:t.prop("dashTexture"),opacity:t.prop("opacity"),pixelRatio:t.context("pixelRatio"),id:t.prop("id"),dashLength:t.prop("dashLength"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]},depth:t.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:function(t,e){return!e.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:t.prop("viewport")},viewport:t.prop("viewport")},i=t(o({vert:"\nprecision highp float;\n\nattribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;\nattribute vec4 color;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {\n\t// the order is important\n\treturn position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n}\n\nvoid main() {\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineOffset = lineTop * 2. - 1.;\n\n\tvec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);\n\ttangent = normalize(diff * scale * viewport.zw);\n\tvec2 normal = vec2(-tangent.y, tangent.x);\n\n\tvec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart\n\t\t+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd\n\n\t\t+ thickness * normal * .5 * lineOffset / viewport.zw;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n}\n",frag:"\nprecision highp float;\n\nuniform float dashLength, pixelRatio, thickness, opacity, id;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvoid main() {\n\tfloat alpha = 1.;\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n",attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},n));try{e=t(o({cull:{enable:!0,face:"back"},vert:"\nprecision highp float;\n\nattribute vec2 aCoord, bCoord, nextCoord, prevCoord;\nattribute vec4 aColor, bColor;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, translate;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\nuniform float miterLimit, miterMode;\n\nvarying vec4 fragColor;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 tangent;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nconst float REVERSE_THRESHOLD = -.875;\nconst float MIN_DIFF = 1e-6;\n\n// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead\n// TODO: precalculate dot products, normalize things beforehead etc.\n// TODO: refactor to rectangular algorithm\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nbool isNaN( float val ){\n return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n}\n\nvoid main() {\n\tvec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;\n\n vec2 adjustedScale;\n adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;\n adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;\n\n vec2 scaleRatio = adjustedScale * viewport.zw;\n\tvec2 normalWidth = thickness / scaleRatio;\n\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineBot = 1. - lineTop;\n\n\tfragColor = (lineStart * aColor + lineEnd * bColor) / 255.;\n\n\tif (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;\n\n\tif (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);\n\tif (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);\n\n\n\tvec2 prevDiff = aCoord - prevCoord;\n\tvec2 currDiff = bCoord - aCoord;\n\tvec2 nextDiff = nextCoord - bCoord;\n\n\tvec2 prevTangent = normalize(prevDiff * scaleRatio);\n\tvec2 currTangent = normalize(currDiff * scaleRatio);\n\tvec2 nextTangent = normalize(nextDiff * scaleRatio);\n\n\tvec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);\n\tvec2 currNormal = vec2(-currTangent.y, currTangent.x);\n\tvec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);\n\n\tvec2 startJoinDirection = normalize(prevTangent - currTangent);\n\tvec2 endJoinDirection = normalize(currTangent - nextTangent);\n\n\t// collapsed/unidirectional segment cases\n\t// FIXME: there should be more elegant solution\n\tvec2 prevTanDiff = abs(prevTangent - currTangent);\n\tvec2 nextTanDiff = abs(nextTangent - currTangent);\n\tif (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {\n\t\tstartJoinDirection = currNormal;\n\t}\n\tif (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {\n\t\tendJoinDirection = currNormal;\n\t}\n\tif (aCoord == bCoord) {\n\t\tendJoinDirection = startJoinDirection;\n\t\tcurrNormal = prevNormal;\n\t\tcurrTangent = prevTangent;\n\t}\n\n\ttangent = currTangent;\n\n\t//calculate join shifts relative to normals\n\tfloat startJoinShift = dot(currNormal, startJoinDirection);\n\tfloat endJoinShift = dot(currNormal, endJoinDirection);\n\n\tfloat startMiterRatio = abs(1. / startJoinShift);\n\tfloat endMiterRatio = abs(1. / endJoinShift);\n\n\tvec2 startJoin = startJoinDirection * startMiterRatio;\n\tvec2 endJoin = endJoinDirection * endMiterRatio;\n\n\tvec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;\n\tstartTopJoin = sign(startJoinShift) * startJoin * .5;\n\tstartBotJoin = -startTopJoin;\n\n\tendTopJoin = sign(endJoinShift) * endJoin * .5;\n\tendBotJoin = -endTopJoin;\n\n\tvec2 aTopCoord = aCoord + normalWidth * startTopJoin;\n\tvec2 bTopCoord = bCoord + normalWidth * endTopJoin;\n\tvec2 aBotCoord = aCoord + normalWidth * startBotJoin;\n\tvec2 bBotCoord = bCoord + normalWidth * endBotJoin;\n\n\t//miter anti-clipping\n\tfloat baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));\n\tfloat abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));\n\n\t//prevent close to reverse direction switch\n\tbool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) < length(normalWidth * currNormal);\n\tbool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) < length(normalWidth * currNormal);\n\n\tif (prevReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);\n\t\taBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\taTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n",frag:"\nprecision highp float;\n\nuniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n",attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch(t){e=i}return{fill:t({primitive:"triangle",elements:function(t,e){return e.triangles},offset:0,vert:"\nprecision highp float;\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n",frag:"\nprecision highp float;\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n",uniforms:{scale:t.prop("scale"),color:t.prop("fill"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),translate:t.prop("translate"),opacity:t.prop("opacity"),pixelRatio:t.context("pixelRatio"),id:t.prop("id"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{position:{buffer:t.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:i,miter:e}},g.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},g.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];e.length&&(t=this).update.apply(t,e),this.draw()},g.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length?e:this.passes).forEach((function(e,r){var n;if(e&&Array.isArray(e))return(n=t).draw.apply(n,e);"number"==typeof e&&(e=t.passes[e]),e&&e.count>1&&e.opacity&&(t.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&t.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>g.precisionThreshold||e.scale[1]*e.viewport.height>g.precisionThreshold||"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=g.maxPoints)?t.shaders.rect(e):t.shaders.miter(e)))})),this},g.prototype.update=function(t){var e=this;if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var r=this.regl,d=this.gl;if(t.forEach((function(t,f){var v=e.passes[f];if(void 0!==t)if(null!==t){if("number"==typeof t[0]&&(t={positions:t}),t=a(t,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),v||(e.passes[f]=v={id:f,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:r.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},t=o({},g.defaults,t)),null!=t.thickness&&(v.thickness=parseFloat(t.thickness)),null!=t.opacity&&(v.opacity=parseFloat(t.opacity)),null!=t.miterLimit&&(v.miterLimit=parseFloat(t.miterLimit)),null!=t.overlay&&(v.overlay=!!t.overlay,f=R}));(O=O.slice(0,F)).push(R)}for(var P=function(t){var e=A.slice(2*I,2*O[t]).concat(R?A.slice(2*R):[]),r=(v.hole||[]).map((function(e){return e-R+(O[t]-I)})),n=l(e,r);n=n.map((function(e){return e+I+(e+I{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r 1.0 + delta) {\n\t\tdiscard;\n\t}\n\n\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n\tfloat borderRadius = fragBorderRadius;\n\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n\tcolor.a *= alpha * opacity;\n\tgl_FragColor = color;\n}\n"]),l.vert=u(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\n// `invariant` effectively turns off optimizations for the position.\n// We need this because -fast-math on M1 Macs is re-ordering\n// floating point operations in a way that causes floating point\n// precision limits to put points in the wrong locations.\ninvariant gl_Position;\n\nuniform bool constPointSize;\nuniform float pixelRatio;\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\nuniform sampler2D paletteTexture;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(paletteTexture,\n vec2(\n (id.x + .5) / paletteSize.x,\n (id.y + .5) / paletteSize.y\n )\n );\n}\n\nvoid main() {\n // ignore inactive points\n if (isActive == 0.) return;\n\n vec2 position = vec2(x, y);\n vec2 positionFract = vec2(xFract, yFract);\n\n vec4 color = getColor(colorId);\n vec4 borderColor = getColor(borderColorId);\n\n float size = size * maxSize / 255.;\n float borderSize = borderSize * maxSize / 255.;\n\n gl_PointSize = (size + borderSize) * pointSizeScale;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0., 1.);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),m&&(l.frag=l.frag.replace("smoothstep","smoothStep"),s.frag=s.frag.replace("smoothstep","smoothStep")),this.drawCircle=t(l)}y.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},y.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},y.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;nn)?e.tree=c(t,{bounds:u}):n&&n.length&&(e.tree=n),e.tree){var h={primitive:"points",usage:"static",data:e.tree,type:"uint32"};e.elements?e.elements(h):e.elements=a.elements(h)}var f=g.float32(t);return i({data:f,usage:"dynamic"}),o({data:g.fract32(t,f),usage:"dynamic"}),l({data:new Uint8Array(d),type:"uint8",usage:"stream"}),t}},{marker:function(e,r,n){var i=r.activation;if(i.forEach((function(t){return t&&t.destroy&&t.destroy()})),i.length=0,e&&"number"!=typeof e[0]){for(var o=[],s=0,l=Math.min(e.length,r.count);s=0)return o;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)e=t;else{e=new Uint8Array(t.length);for(var a=0,s=t.length;a4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},y.prototype.updatePalette=function(t){if(!this.tooManyColors){var e=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*t.length/e);if(n>1)for(var i=.25*(t=t.slice()).length%e;i>>=e))<<3,(e|=r=(15<(t>>>=r))<<2)|(r=(3<(t>>>=r))<<1)|t>>>r>>1}function l(){function t(t){t:{for(var e=16;268435456>=e;e*=16)if(t<=e){t=e;break t}t=0}return 0<(e=r[s(t)>>2]).length?e.pop():new ArrayBuffer(t)}function e(t){r[s(t.byteLength)>>2].push(t)}var r=a(8,(function(){return[]}));return{alloc:t,free:e,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(t){e(t.buffer)}}}function c(t){return!!t&&"object"==typeof t&&Array.isArray(t.shape)&&Array.isArray(t.stride)&&"number"==typeof t.offset&&t.shape.length===t.stride.length&&(Array.isArray(t.data)||K(t.data))}function d(t,e,r,n,i,o){for(var a=0;a(i=s)&&(i=n.buffer.byteLength,5123===u?i>>=1:5125===u&&(i>>=2)),n.vertCount=i,i=a,0>a&&(i=4,1===(a=n.buffer.dimension)&&(i=0),2===a&&(i=1),3===a&&(i=4)),n.primType=i}function a(t){n.elementsCount--,delete s[t.id],t.buffer.destroy(),t.buffer=null}var s={},l=0,d={uint8:5121,uint16:5123};e.oes_element_index_uint&&(d.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var u=[];return{create:function(t,e){function s(t){if(t)if("number"==typeof t)l(t),u.primType=4,u.vertCount=0|t,u.type=5121;else{var e=null,r=35044,n=-1,i=-1,a=0,h=0;Array.isArray(t)||K(t)||c(t)?e=t:("data"in t&&(e=t.data),"usage"in t&&(r=nt[t.usage]),"primitive"in t&&(n=st[t.primitive]),"count"in t&&(i=0|t.count),"type"in t&&(h=d[t.type]),"length"in t?a=0|t.length:(a=i,5123===h||5122===h?a*=2:5125!==h&&5124!==h||(a*=4))),o(u,e,r,n,i,a,h)}else l(),u.primType=4,u.vertCount=0,u.type=5121;return s}var l=r.create(null,34963,!0),u=new i(l._buffer);return n.elementsCount++,s(t),s._reglType="elements",s._elements=u,s.subdata=function(t,e){return l.subdata(t,e),s},s.destroy=function(){a(u)},s},createStream:function(t){var e=u.pop();return e||(e=new i(r.create(null,34963,!0,!1)._buffer)),o(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){u.push(t)},getElements:function(t){return"function"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){Q(s).forEach(a)}}}function v(t){for(var e=$.allocType(5123,t.length),r=0;r>>31<<15,i=(o<<1>>>24)-127,o=o>>13&1023;e[r]=-24>i?n:-14>i?n+(o+1024>>-14-i):15>=i,r.height>>=i,f(r,n[i]),t.mipmask|=1<e;++e)t.images[e]=null;return t}function L(t){for(var e=t.images,r=0;re){for(var r=0;r=--this.refCount&&P(this)}}),a.profile&&(o.getTotalTextureSize=function(){var t=0;return Object.keys(ct).forEach((function(e){t+=ct[e].stats.size})),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;z.call(r);var o=E();return"number"==typeof t?M(o,0|t,"number"==typeof e?0|e:0|t):t?(O(r,t),S(o,t)):M(o,1,1),r.genMipmaps&&(o.mipmask=(o.width<<1)-1),i.mipmask=o.mipmask,l(i,o),i.internalformat=o.internalformat,n.width=o.width,n.height=o.height,R(i),C(o,3553),D(r,3553),F(),L(o),a.profile&&(i.stats.size=T(i.internalformat,i.type,o.width,o.height,r.genMipmaps,!1)),n.format=X[i.internalformat],n.type=J[i.type],n.mag=rt[r.magFilter],n.min=nt[r.minFilter],n.wrapS=it[r.wrapS],n.wrapT=it[r.wrapT],n}var i=new I(3553);return ct[i.id]=i,o.textureCount++,n(e,r),n.subimage=function(t,e,r,o){e|=0,r|=0,o|=0;var a=m();return l(a,i),a.width=0,a.height=0,f(a,t),a.width=a.width||(i.width>>o)-e,a.height=a.height||(i.height>>o)-r,R(i),p(a,3553,e,r,o),F(),g(a),n},n.resize=function(e,r){var o=0|e,s=0|r||o;if(o===i.width&&s===i.height)return n;n.width=i.width=o,n.height=i.height=s,R(i);for(var l=0;i.mipmask>>l;++l){var c=o>>l,d=s>>l;if(!c||!d)break;t.texImage2D(3553,l,i.format,c,d,0,i.format,i.type,null)}return F(),a.profile&&(i.stats.size=T(i.internalformat,i.type,o,s,!1,!1)),n},n._reglType="texture2d",n._texture=i,a.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,n,i,s,c){function u(t,e,r,n,i,o){var s,c=h.texInfo;for(z.call(c),s=0;6>s;++s)v[s]=E();if("number"!=typeof t&&t){if("object"==typeof t)if(e)S(v[0],t),S(v[1],e),S(v[2],r),S(v[3],n),S(v[4],i),S(v[5],o);else if(O(c,t),d(h,t),"faces"in t)for(t=t.faces,s=0;6>s;++s)l(v[s],h),S(v[s],t[s]);else for(s=0;6>s;++s)S(v[s],t)}else for(t=0|t||1,s=0;6>s;++s)M(v[s],t,t);for(l(h,v[0]),h.mipmask=c.genMipmaps?(v[0].width<<1)-1:v[0].mipmask,h.internalformat=v[0].internalformat,u.width=v[0].width,u.height=v[0].height,R(h),s=0;6>s;++s)C(v[s],34069+s);for(D(c,34067),F(),a.profile&&(h.stats.size=T(h.internalformat,h.type,u.width,u.height,c.genMipmaps,!0)),u.format=X[h.internalformat],u.type=J[h.type],u.mag=rt[c.magFilter],u.min=nt[c.minFilter],u.wrapS=it[c.wrapS],u.wrapT=it[c.wrapT],s=0;6>s;++s)L(v[s]);return u}var h=new I(34067);ct[h.id]=h,o.cubeCount++;var v=Array(6);return u(e,r,n,i,s,c),u.subimage=function(t,e,r,n,i){r|=0,n|=0,i|=0;var o=m();return l(o,h),o.width=0,o.height=0,f(o,e),o.width=o.width||(h.width>>i)-r,o.height=o.height||(h.height>>i)-n,R(h),p(o,34069+t,r,n,i),F(),g(o),u},u.resize=function(e){if((e|=0)!==h.width){u.width=h.width=e,u.height=h.height=e,R(h);for(var r=0;6>r;++r)for(var n=0;h.mipmask>>n;++n)t.texImage2D(34069+r,n,h.format,e>>n,e>>n,0,h.format,h.type,null);return F(),a.profile&&(h.stats.size=T(h.internalformat,h.type,u.width,u.height,!1,!0)),u}},u._reglType="textureCube",u._texture=h,a.profile&&(u.stats=h.stats),u.destroy=function(){h.decRef()},u},clear:function(){for(var e=0;er;++r)if(e.mipmask&1<>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;6>n;++n)t.texImage2D(34069+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);D(e.texInfo,e.target)}))},refresh:function(){for(var e=0;ei;++i){for(c=0;ct;++t)r[t].resize(n);return e.width=e.height=n,e},_reglType:"framebufferCube",destroy:function(){r.forEach((function(t){t.destroy()}))}})},clear:function(){Q(A).forEach(g)},restore:function(){y.cur=null,y.next=null,y.dirty=!0,Q(A).forEach((function(e){e.framebuffer=t.createFramebuffer(),v(e)}))}})}function C(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function E(t,e,r,n,i,o,a){function s(){this.id=++u,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var t=e.oes_vertex_array_object;this.vao=t?t.createVertexArrayOES():null,h[this.id]=this,this.buffers=[]}var l=r.maxAttributes,d=Array(l);for(r=0;r=h.byteLength?l.subdata(h):(l.destroy(),r.buffers[s]=null)),r.buffers[s]||(l=r.buffers[s]=i.create(d,34962,!1,!0)),u.buffer=i.getBuffer(l),u.size=0|u.buffer.dimension,u.normalized=!1,u.type=u.buffer.dtype,u.offset=0,u.stride=0,u.divisor=0,u.state=1,t[s]=1):i.getBuffer(d)?(u.buffer=i.getBuffer(d),u.size=0|u.buffer.dimension,u.normalized=!1,u.type=u.buffer.dtype,u.offset=0,u.stride=0,u.divisor=0,u.state=1):i.getBuffer(d.buffer)?(u.buffer=i.getBuffer(d.buffer),u.size=0|(+d.size||u.buffer.dimension),u.normalized=!!d.normalized||!1,u.type="type"in d?rt[d.type]:u.buffer.dtype,u.offset=0|(d.offset||0),u.stride=0|(d.stride||0),u.divisor=0|(d.divisor||0),u.state=1):"x"in d&&(u.x=+d.x||0,u.y=+d.y||0,u.z=+d.z||0,u.w=+d.w||0,u.state=2)}for(l=0;lt&&(t=e.stats.uniformsCount)})),t},r.getMaxAttributesCount=function(){var t=0;return h.forEach((function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)})),t}),{clear:function(){var e=t.deleteShader.bind(t);Q(c).forEach(e),c={},Q(d).forEach(e),d={},h.forEach((function(e){t.deleteProgram(e.program)})),h.length=0,u={},r.shaderCount=0},program:function(e,n,i,o){var a=u[n];a||(a=u[n]={});var f=a[e];if(f&&(f.refCount++,!o))return f;var p=new s(n,e);return r.shaderCount++,l(p,i,o),f||(a[e]=p),h.push(p),W(p,{destroy:function(){if(p.refCount--,0>=p.refCount){t.deleteProgram(p.program);var e=h.indexOf(p);h.splice(e,1),r.shaderCount--}0>=a[p.vertId].refCount&&(t.deleteShader(d[p.vertId]),delete d[p.vertId],delete u[p.fragId][p.vertId]),Object.keys(u[p.fragId]).length||(t.deleteShader(c[p.fragId]),delete c[p.fragId],delete u[p.fragId])}})},restore:function(){c={},d={};for(var t=0;t>>e|t<<32-e}function D(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function I(t){return Array.prototype.slice.call(t)}function R(t){return I(t).join("")}function F(t){function e(){var t=[],e=[];return W((function(){t.push.apply(t,I(arguments))}),{def:function(){var r="v"+i++;return e.push(r),0>>4&15)+"0123456789abcdef".charAt(15&e);return r}(function(t){for(var e=Array(t.length>>2),r=0;r>5]|=(255&t.charCodeAt(r/8))<<24-r%32;var n,i,o,a,s,l,c,d,u,h,f,p=8*t.length;for(t=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],r=Array(64),e[p>>5]|=128<<24-p%32,e[15+(p+64>>9<<4)]=p,d=0;du;u++){var m;16>u?r[u]=e[u+d]:(h=u,f=D(f=O(f=r[u-2],17)^O(f,19)^f>>>10,r[u-7]),m=O(m=r[u-15],7)^O(m,18)^m>>>3,r[h]=D(D(f,m),r[u-16])),h=D(D(D(D(c,h=O(h=a,6)^O(h,11)^O(h,25)),a&s^~a&l),Mt[u]),r[u]),f=D(c=O(c=p,2)^O(c,13)^O(c,22),p&n^p&i^n&i),c=l,l=s,s=a,a=D(o,h),o=i,i=n,n=p,p=D(h,f)}t[0]=D(p,t[0]),t[1]=D(n,t[1]),t[2]=D(i,t[2]),t[3]=D(o,t[3]),t[4]=D(a,t[4]),t[5]=D(s,t[5]),t[6]=D(l,t[6]),t[7]=D(c,t[7])}for(e="",r=0;r<32*t.length;r+=8)e+=String.fromCharCode(t[r>>5]>>>24-r%32&255);return e}(function(t){for(var e,r,n="",i=-1;++i=e&&56320<=r&&57343>=r&&(e=65536+((1023&e)<<10)+(1023&r),i++),127>=e?n+=String.fromCharCode(e):2047>=e?n+=String.fromCharCode(192|e>>>6&31,128|63&e):65535>=e?n+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):2097151>=e&&(n+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return n}(r))),n[e])?n[e].apply(null,a):(r=Function.apply(null,o.concat(r)),n&&(n[e]=r),r.apply(null,a))}}}function P(t){return Array.isArray(t)||K(t)||c(t)}function j(t){return t.sort((function(t,e){return"viewport"===t?-1:"viewport"===e?1:t"+e+"?"+i+".constant["+e+"]:0;"})).join(""),"}}else{","if(",s,"(",i,".buffer)){",d,"=",o,".createStream(",34962,",",i,".buffer);","}else{",d,"=",o,".getBuffer(",i,".buffer);","}",u,'="type" in ',i,"?",a.glTypes,"[",i,".type]:",d,".dtype;",l.normalized,"=!!",i,".normalized;"),n("size"),n("offset"),n("stride"),n("divisor"),r("}}"),r.exit("if(",l.isStream,"){",o,".destroyStream(",d,");","}"),l}))})),a}function M(t,e,n,i,o){function s(t){var e=c[t];e&&(h[t]=e)}var l=function(t,e){if("string"==typeof(r=t.static).frag&&"string"==typeof r.vert){if(0>1)",s],");")}function e(){r(l,".drawArraysInstancedANGLE(",[p,m,g,s],");")}f&&"null"!==f?b?t():(r("if(",f,"){"),t(),r("}else{"),e(),r("}")):e()}function a(){function t(){r(d+".drawElements("+[p,g,v,m+"<<(("+v+"-5121)>>1)"]+");")}function e(){r(d+".drawArrays("+[p,m,g]+");")}f&&"null"!==f?b?t():(r("if(",f,"){"),t(),r("}else{"),e(),r("}")):e()}var s,l,c=t.shared,d=c.gl,u=c.draw,h=n.draw,f=function(){var i=h.elements,o=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(o=r),i=i.append(t,o),h.elementsActive&&o("if("+i+")"+d+".bindBuffer(34963,"+i+".buffer.buffer);")):(i=o.def(),o(i,"=",u,".","elements",";","if(",i,"){",d,".bindBuffer(",34963,",",i,".buffer.buffer);}","else if(",c.vao,".currentVAO){",i,"=",t.shared.elements+".getElements("+c.vao,".currentVAO.elements);",et?"":"if("+i+")"+d+".bindBuffer(34963,"+i+".buffer.buffer);","}")),i}(),p=i("primitive"),m=i("offset"),g=function(){var i=h.count,o=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(o=r),i=i.append(t,o)):i=o.def(u,".","count"),i}();if("number"==typeof g){if(0===g)return}else r("if(",g,"){"),r.exit("}");Q&&(s=i("instances"),l=t.instancing);var v=f+".type",b=h.elements&&B(h.elements)&&!h.vaoActive;Q&&("number"!=typeof s||0<=s)?"string"==typeof s?(r("if(",s,">0){"),o(),r("}else if(",s,"<0){"),a(),r("}")):o():a()}function V(t,e,r,n,i){return i=(e=w()).proc("body",i),Q&&(e.instancing=i.def(e.shared.extensions,".angle_instanced_arrays")),t(e,i,r,n),e.compile().body}function H(t,e,r,n){z(t,e),r.useVAO?r.drawVAO?e(t.shared.vao,".setVAO(",r.drawVAO.append(t,e),");"):e(t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"):(e(t.shared.vao,".setVAO(null);"),D(t,e,r,n.attributes,(function(){return!0}))),I(t,e,r,n.uniforms,(function(){return!0}),!1),R(t,e,e,r)}function q(t,e,r,n){function i(){return!0}t.batchId="a1",z(t,e),D(t,e,r,n.attributes,i),I(t,e,r,n.uniforms,i,!1),R(t,e,e,r)}function Z(t,e,r,n){function i(t){return t.contextDep&&a||t.propDep}function o(t){return!i(t)}z(t,e);var a=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var c=t.scope(),d=t.scope();e(c.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",d,"}",c.exit),r.needsContext&&S(t,d,r.context),r.needsFramebuffer&&C(t,d,r.framebuffer),L(t,d,r.state,i),r.profile&&i(r.profile)&&O(t,d,r,!1,!0),n?(r.useVAO?r.drawVAO?i(r.drawVAO)?d(t.shared.vao,".setVAO(",r.drawVAO.append(t,d),");"):c(t.shared.vao,".setVAO(",r.drawVAO.append(t,c),");"):c(t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"):(c(t.shared.vao,".setVAO(null);"),D(t,c,r,n.attributes,o),D(t,d,r,n.attributes,i)),I(t,c,r,n.uniforms,o,!1),I(t,d,r,n.uniforms,i,!0),R(t,c,d,r)):(e=t.global.def("{}"),n=r.shader.progVar.append(t,d),l=d.def(n,".id"),c=d.def(e,"[",l,"]"),d(t.shared.gl,".useProgram(",n,".program);","if(!",c,"){",c,"=",e,"[",l,"]=",t.link((function(e){return V(q,t,r,e,2)})),"(",n,");}",c,".call(this,a0[",s,"],",s,");"))}function X(t,r){function n(e){var n=r.shader[e];n&&(n=n.append(t,i),isNaN(n)?i.set(o.shader,"."+e,n):i.set(o.shader,"."+e,t.link(n,{stable:!0})))}var i=t.proc("scope",3);t.batchId="a2";var o=t.shared,a=o.current;if(S(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),j(Object.keys(r.state)).forEach((function(e){var n=r.state[e],a=n.append(t,i);b(a)?a.forEach((function(r,n){isNaN(r)?i.set(t.next[e],"["+n+"]",r):i.set(t.next[e],"["+n+"]",t.link(r,{stable:!0}))})):B(n)?i.set(o.next,"."+e,t.link(a,{stable:!0})):i.set(o.next,"."+e,a)})),O(t,i,r,!0,!0),["elements","offset","count","instances","primitive"].forEach((function(e){var n=r.draw[e];n&&(n=n.append(t,i),isNaN(n)?i.set(o.draw,"."+e,n):i.set(o.draw,"."+e,t.link(n),{stable:!0}))})),Object.keys(r.uniforms).forEach((function(n){var a=r.uniforms[n].append(t,i);Array.isArray(a)&&(a="["+a.map((function(e){return isNaN(e)?e:t.link(e,{stable:!0})}))+"]"),i.set(o.uniforms,"["+t.link(e.id(n),{stable:!0})+"]",a)})),Object.keys(r.attributes).forEach((function(e){var n=r.attributes[e].append(t,i),o=t.scopeAttrib(e);Object.keys(new J).forEach((function(t){i.set(o,"."+t,n[t])}))})),r.scopeVAO){var s=r.scopeVAO.append(t,i);isNaN(s)?i.set(o.vao,".targetVAO",s):i.set(o.vao,".targetVAO",t.link(s,{stable:!0}))}n("vert"),n("frag"),0=--this.refCount&&a(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(d).forEach((function(e){t+=d[e].stats.size})),t}),{create:function(e,r){function a(e,r){var n=0,o=0,d=32854;if("object"==typeof e&&e?("shape"in e?(n=0|(o=e.shape)[0],o=0|o[1]):("radius"in e&&(n=o=0|e.radius),"width"in e&&(n=0|e.width),"height"in e&&(o=0|e.height)),"format"in e&&(d=s[e.format])):"number"==typeof e?(n=0|e,o="number"==typeof r?0|r:n):e||(n=o=1),n!==c.width||o!==c.height||d!==c.format)return a.width=c.width=n,a.height=c.height=o,c.format=d,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,d,n,o),i.profile&&(c.stats.size=_t[c.format]*c.width*c.height),a.format=l[c.format],a}var c=new o(t.createRenderbuffer());return d[c.id]=c,n.renderbufferCount++,a(e,r),a.resize=function(e,r){var n=0|e,o=0|r||n;return n===c.width&&o===c.height||(a.width=c.width=n,a.height=c.height=o,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,c.format,n,o),i.profile&&(c.stats.size=_t[c.format]*c.width*c.height)),a},a._reglType="renderbuffer",a._renderbuffer=c,i.profile&&(a.stats=c.stats),a.destroy=function(){c.decRef()},a},clear:function(){Q(d).forEach(a)},restore:function(){Q(d).forEach((function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)})),t.bindRenderbuffer(36161,null)}}},At=[];At[6408]=4,At[6407]=3;var Tt=[];Tt[5121]=1,Tt[5126]=4,Tt[36193]=2;var Mt=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],St=["x","y","z","w"],Ct="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Et={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Lt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},zt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ot={cw:2304,ccw:2305},Dt=new N(!1,!1,!1,(function(){}));return function(t){function e(){if(0===$.length)k&&k.update(),et=null;else{et=Z.next(e),u();for(var t=$.length-1;0<=t;--t){var r=$[t];r&&r(O,null,0)}p.flush(),k&&k.update()}}function r(){!et&&0<$.length&&(et=Z.next(e))}function n(){et&&(Z.cancel(e),et=null)}function i(t){t.preventDefault(),n(),K.forEach((function(t){t()}))}function a(t){p.getError(),b.restore(),P.restore(),I.restore(),j.restore(),N.restore(),B.restore(),F.restore(),k&&k.restore(),U.procs.refresh(),r(),Q.forEach((function(t){t()}))}function s(t){function e(t,e){var r={},n={};return Object.keys(t).forEach((function(i){var o=t[i];if(Y.isDynamic(o))n[i]=Y.unbox(o,i);else{if(e&&Array.isArray(o))for(var a=0;a=$.length&&n()}}}}function d(){var t=G.viewport,e=G.scissor_box;t[0]=t[1]=e[0]=e[1]=0,O.viewportWidth=O.framebufferWidth=O.drawingBufferWidth=t[2]=e[2]=p.drawingBufferWidth,O.viewportHeight=O.framebufferHeight=O.drawingBufferHeight=t[3]=e[3]=p.drawingBufferHeight}function u(){O.tick+=1,O.time=f(),d(),U.procs.poll()}function h(){j.refresh(),d(),U.procs.refresh(),k&&k.update()}function f(){return(X()-A)/1e3}if(!(t=o(t)))return null;var p=t.gl,v=p.getContextAttributes();p.isContextLost();var b=function(t,e){function r(e){var r;e=e.toLowerCase();try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},i=0;ie;++e)rt(W({framebuffer:t.framebuffer.faces[e]},t),l);else rt(t,l);else l(0,t)},prop:Y.define.bind(null,1),context:Y.define.bind(null,2),this:Y.define.bind(null,3),draw:s({}),buffer:function(t){return I.create(t,34962,!1,!1)},elements:function(t){return R.create(t,!1)},texture:j.create2D,cube:j.createCube,renderbuffer:N.create,framebuffer:B.create,framebufferCube:B.createCube,vao:F.createVAO,attributes:v,frame:c,on:function(t,e){var r;switch(t){case"frame":return c(e);case"lost":r=K;break;case"restore":r=Q;break;case"destroy":r=tt}return r.push(e),{cancel:function(){for(var t=0;t{"use strict";var n=r(59412),i=r(43362),o=r(20419)(),a=r(55572),s=r(48744),l=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new s("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||l(e)!==e)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in t&&a){var d=a(t,"length");d&&!d.configurable&&(n=!1),d&&!d.writable&&(c=!1)}return(n||c||!r)&&(o?i(t,"length",e,!0,!0):i(t,"length",e)),t}},46492:(t,e,r)=>{"use strict";var n=r(2214);t.exports=function(t,e,r){if(null==t)throw Error("First argument should be a string");if(null==e)throw Error("Separator should be a string or a RegExp");r?("string"==typeof r||Array.isArray(r))&&(r={ignore:r}):r={},null==r.escape&&(r.escape=!0),null==r.ignore?r.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:("string"==typeof r.ignore&&(r.ignore=[r.ignore]),r.ignore=r.ignore.map((function(t){return 1===t.length&&(t+=t),t})));var i=n.parse(t,{flat:!0,brackets:r.ignore}),o=i[0].split(e);if(r.escape){for(var a=[],s=0;s{"use strict";var n=r(37974),i=r(97883),o=r(25058),a=r(12611);t.exports=function(t){if(Array.isArray(t)&&1===t.length&&"string"==typeof t[0]&&(t=t[0]),"string"==typeof t){if(!a(t))throw Error("String is not an SVG path.");t=n(t)}if(!Array.isArray(t))throw Error("Argument should be a string or an array of path segments.");if(t=i(t),!(t=o(t)).length)return[0,0,0,0];for(var e=[1/0,1/0,-1/0,-1/0],r=0,s=t.length;re[2]&&(e[2]=l[c+0]),l[c+1]>e[3]&&(e[3]=l[c+1]);return e}},77622:(t,e,r)=>{"use strict";var n,i=r(75798),o=r(37974),a=r(61085),s=r(12611),l=r(25875),c=document.createElement("canvas"),d=c.getContext("2d");t.exports=function(t,e){if(!s(t))throw Error("Argument should be valid svg path string");var r,u;e||(e={}),e.shape?(r=e.shape[0],u=e.shape[1]):(r=c.width=e.w||e.width||200,u=c.height=e.h||e.height||200);var h=Math.min(r,u),f=e.stroke||0,p=e.viewbox||e.viewBox||i(t),m=[r/(p[2]-p[0]),u/(p[3]-p[1])],g=Math.min(m[0]||0,m[1]||0)/2;if(d.fillStyle="black",d.fillRect(0,0,r,u),d.fillStyle="white",f&&("number"!=typeof f&&(f=1),d.strokeStyle=f>0?"white":"black",d.lineWidth=Math.abs(f)),d.translate(.5*r,.5*u),d.scale(g,g),function(){if(null!=n)return n;var t=document.createElement("canvas").getContext("2d");if(t.canvas.width=t.canvas.height=1,!window.Path2D)return n=!1;var e=new Path2D("M0,0h1v1h-1v-1Z");t.fillStyle="black",t.fill(e);var r=t.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var v=new Path2D(t);d.fill(v),f&&d.stroke(v)}else{var b=o(t);a(d,b),d.fill(),f&&d.stroke()}return d.setTransform(1,0,0,1,0,0),l(d,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*h})}},91101:t=>{"use strict";t.exports=r,t.exports.float32=t.exports.float=r,t.exports.fract32=t.exports.fract=function(t,e){if(t.length){if(t instanceof Float32Array)return new Float32Array(t.length);e instanceof Float32Array||(e=r(t));for(var n=0,i=e.length;n{"use strict";var n=r(3202);t.exports=a;var i=96;function o(t,e){var r=n(getComputedStyle(t).getPropertyValue(e));return r[0]*a(r[1],t)}function a(t,e){switch(e=e||document.body,t=(t||"px").trim().toLowerCase(),e!==window&&e!==document||(e=document.body),t){case"%":return e.clientHeight/100;case"ch":case"ex":return function(t,e){var r=document.createElement("div");r.style["font-size"]="128"+t,e.appendChild(r);var n=o(r,"font-size")/128;return e.removeChild(r),n}(t,e);case"em":return o(e,"font-size");case"rem":return o(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return i;case"cm":return i/2.54;case"mm":return i/25.4;case"pt":return i/72;case"pc":return i/6}return 1}},98479:(t,e,r)=>{"use strict";var n=r(38251);t.exports=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(t){return!1}return!n(t)}},55351:(t,e,r)=>{"use strict";var n=r(36181),i=r(50406);t.exports=function(t,e,r){r&&r.errorMessage&&(t=n(r.errorMessage));var o=t.indexOf("%v"),a=o>-1?i(e):null;if(r&&r.name){var s,l,c,d,u=t.indexOf("%n");if(u>-1)return o>-1?(u>o?(s=a,c=o,l=r.name,d=u):(s=r.name,c=u,l=a,d=o),t.slice(0,c)+s+t.slice(c+2,d)+l+t.slice(d+2)):t.slice(0,u)+r.name+t.slice(u+2)}return o>-1?t.slice(0,o)+a+t.slice(o+2):t}},81114:(t,e,r)=>{"use strict";var n=r(59738),i=r(55351);t.exports=function(t,e,r){if(r&&!n(t)){if("default"in r)return r.default;if(r.isOptional)return null}var o=new(r&&r.Error||TypeError)(i(e,t,r));throw r&&r.errorCode&&(o.code=r.errorCode),o}},74165:t=>{"use strict";t.exports=function(t){try{return t.toString()}catch(e){try{return String(t)}catch(t){return null}}}},50406:(t,e,r)=>{"use strict";var n=r(74165),i=/[\n\r\u2028\u2029]/g;t.exports=function(t){var e=n(t);return null===e?"":(e.length>100&&(e=e.slice(0,99)+"…"),e=e.replace(i,(function(t){switch(t){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})))}},10818:(t,e,r)=>{"use strict";var n=r(59738),i={object:!0,function:!0,undefined:!0};t.exports=function(t){return!!n(t)&&hasOwnProperty.call(i,typeof t)}},4216:(t,e,r)=>{"use strict";var n=r(81114),i=r(15034);t.exports=function(t){if(i(t))return t;var e=arguments[1],r=e&&e.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return n(t,r,e)}},15034:(t,e,r)=>{"use strict";var n=r(98479),i=/^\s*class[\s{/}]/,o=Function.prototype.toString;t.exports=function(t){return!!n(t)&&!i.test(o.call(t))}},38251:(t,e,r)=>{"use strict";var n=r(10818);t.exports=function(t){if(!n(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}}},36181:(t,e,r)=>{"use strict";var n=r(59738),i=r(10818),o=Object.prototype.toString;t.exports=function(t){if(!n(t))return null;if(i(t)){var e=t.toString;if("function"!=typeof e)return null;if(e===o)return null}try{return""+t}catch(t){return null}}},10040:(t,e,r)=>{"use strict";var n=r(81114),i=r(59738);t.exports=function(t){if(i(t))return t;var e=arguments[1],r=e&&e.name?"Expected a value for %n, received %v":"Cannot use %v";return n(t,r,e)}},59738:t=>{"use strict";t.exports=function(t){return null!=t}},31888:(t,e,r)=>{"use strict";var n=r(88828),i=r(31338),o=r(65500).hp;r.g.__TYPEDARRAY_POOL||(r.g.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var a="undefined"!=typeof Uint8ClampedArray,s="undefined"!=typeof BigUint64Array,l="undefined"!=typeof BigInt64Array,c=r.g.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=i([32,0])),c.BIGUINT64||(c.BIGUINT64=i([32,0])),c.BIGINT64||(c.BIGINT64=i([32,0])),c.BUFFER||(c.BUFFER=i([32,0]));var d=c.DATA,u=c.BUFFER;function h(t){if(t){var e=t.length||t.byteLength,r=n.log2(e);d[r].push(t)}}function f(t){t=n.nextPow2(t);var e=n.log2(t),r=d[e];return r.length>0?r.pop():new ArrayBuffer(t)}function p(t){return new Uint8Array(f(t),0,t)}function m(t){return new Uint16Array(f(2*t),0,t)}function g(t){return new Uint32Array(f(4*t),0,t)}function v(t){return new Int8Array(f(t),0,t)}function b(t){return new Int16Array(f(2*t),0,t)}function y(t){return new Int32Array(f(4*t),0,t)}function x(t){return new Float32Array(f(4*t),0,t)}function w(t){return new Float64Array(f(8*t),0,t)}function _(t){return a?new Uint8ClampedArray(f(t),0,t):p(t)}function k(t){return s?new BigUint64Array(f(8*t),0,t):null}function A(t){return l?new BigInt64Array(f(8*t),0,t):null}function T(t){return new DataView(f(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=u[e];return r.length>0?r.pop():new o(t)}e.free=function(t){if(o.isBuffer(t))u[n.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|n.log2(e);d[r].push(t)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(t){h(t.buffer)},e.freeArrayBuffer=h,e.freeBuffer=function(t){u[n.log2(t.length)].push(t)},e.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return f(t);switch(e){case"uint8":return p(t);case"uint16":return m(t);case"uint32":return g(t);case"int8":return v(t);case"int16":return b(t);case"int32":return y(t);case"float":case"float32":return x(t);case"double":case"float64":return w(t);case"uint8_clamped":return _(t);case"bigint64":return A(t);case"biguint64":return k(t);case"buffer":return M(t);case"data":case"dataview":return T(t);default:return null}return null},e.mallocArrayBuffer=f,e.mallocUint8=p,e.mallocUint16=m,e.mallocUint32=g,e.mallocInt8=v,e.mallocInt16=b,e.mallocInt32=y,e.mallocFloat32=e.mallocFloat=x,e.mallocFloat64=e.mallocDouble=w,e.mallocUint8Clamped=_,e.mallocBigUint64=k,e.mallocBigInt64=A,e.mallocDataView=T,e.mallocBuffer=M,e.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,d[t].length=0,u[t].length=0}},51183:t=>{var e=/[\'\"]/;t.exports=function(t){return t?(e.test(t.charAt(0))&&(t=t.substr(1)),e.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}},6313:t=>{"use strict";t.exports=function(t,e,r){Array.isArray(r)||(r=[].slice.call(arguments,2));for(var n=0,i=r.length;n{t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},41071:(t,e,r)=>{"use strict";var n=r(68007),i=r(74205),o=r(17478),a=r(94179);function s(t){return t.call.bind(t)}var l="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,d=s(Object.prototype.toString),u=s(Number.prototype.valueOf),h=s(String.prototype.valueOf),f=s(Boolean.prototype.valueOf);if(l)var p=s(BigInt.prototype.valueOf);if(c)var m=s(Symbol.prototype.valueOf);function g(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function v(t){return"[object Map]"===d(t)}function b(t){return"[object Set]"===d(t)}function y(t){return"[object WeakMap]"===d(t)}function x(t){return"[object WeakSet]"===d(t)}function w(t){return"[object ArrayBuffer]"===d(t)}function _(t){return"undefined"!=typeof ArrayBuffer&&(w.working?w(t):t instanceof ArrayBuffer)}function k(t){return"[object DataView]"===d(t)}function A(t){return"undefined"!=typeof DataView&&(k.working?k(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=i,e.isTypedArray=a,e.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},e.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):a(t)||A(t)},e.isUint8Array=function(t){return"Uint8Array"===o(t)},e.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===o(t)},e.isUint16Array=function(t){return"Uint16Array"===o(t)},e.isUint32Array=function(t){return"Uint32Array"===o(t)},e.isInt8Array=function(t){return"Int8Array"===o(t)},e.isInt16Array=function(t){return"Int16Array"===o(t)},e.isInt32Array=function(t){return"Int32Array"===o(t)},e.isFloat32Array=function(t){return"Float32Array"===o(t)},e.isFloat64Array=function(t){return"Float64Array"===o(t)},e.isBigInt64Array=function(t){return"BigInt64Array"===o(t)},e.isBigUint64Array=function(t){return"BigUint64Array"===o(t)},v.working="undefined"!=typeof Map&&v(new Map),e.isMap=function(t){return"undefined"!=typeof Map&&(v.working?v(t):t instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),e.isSet=function(t){return"undefined"!=typeof Set&&(b.working?b(t):t instanceof Set)},y.working="undefined"!=typeof WeakMap&&y(new WeakMap),e.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(y.working?y(t):t instanceof WeakMap)},x.working="undefined"!=typeof WeakSet&&x(new WeakSet),e.isWeakSet=function(t){return x(t)},w.working="undefined"!=typeof ArrayBuffer&&w(new ArrayBuffer),e.isArrayBuffer=_,k.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&k(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=A;var T="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function M(t){return"[object SharedArrayBuffer]"===d(t)}function S(t){return void 0!==T&&(void 0===M.working&&(M.working=M(new T)),M.working?M(t):t instanceof T)}function C(t){return g(t,u)}function E(t){return g(t,h)}function L(t){return g(t,f)}function z(t){return l&&g(t,p)}function O(t){return c&&g(t,m)}e.isSharedArrayBuffer=S,e.isAsyncFunction=function(t){return"[object AsyncFunction]"===d(t)},e.isMapIterator=function(t){return"[object Map Iterator]"===d(t)},e.isSetIterator=function(t){return"[object Set Iterator]"===d(t)},e.isGeneratorObject=function(t){return"[object Generator]"===d(t)},e.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===d(t)},e.isNumberObject=C,e.isStringObject=E,e.isBooleanObject=L,e.isBigIntObject=z,e.isSymbolObject=O,e.isBoxedPrimitive=function(t){return C(t)||E(t)||L(t)||z(t)||O(t)},e.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(_(t)||S(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))},11276:(t,e,r)=>{var n=r(39807),i=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&e._extend(n,r),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=d),h(n,t,n.depth)}function d(t,e){var r=c.styles[e];return r?"["+c.colors[r][0]+"m"+t+"["+c.colors[r][1]+"m":t}function u(t,e){return t}function h(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=h(t,i,n)),i}var o=function(t,e){if(x(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):v(e)?t.stylize("null","null"):void 0}(t,r);if(o)return o;var a=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),A(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(r);if(0===a.length){if(T(r)){var l=r.name?": "+r.name:"";return t.stylize("[Function"+l+"]","special")}if(w(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return t.stylize(Date.prototype.toString.call(r),"date");if(A(r))return f(r)}var c,d="",u=!1,_=["{","}"];return m(r)&&(u=!0,_=["[","]"]),T(r)&&(d=" [Function"+(r.name?": "+r.name:"")+"]"),w(r)&&(d=" "+RegExp.prototype.toString.call(r)),k(r)&&(d=" "+Date.prototype.toUTCString.call(r)),A(r)&&(d=" "+f(r)),0!==a.length||u&&0!=r.length?n<0?w(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=u?function(t,e,r,n,i){for(var o=[],a=0,s=e.length;a60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(c,d,_)):_[0]+d+_[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,n,i,o){var a,s,l;if((l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),E(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(l.value)<0?(s=v(r)?h(t,l.value,null):h(t,l.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").slice(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function m(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function v(t){return null===t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function x(t){return void 0===t}function w(t){return _(t)&&"[object RegExp]"===M(t)}function _(t){return"object"==typeof t&&null!==t}function k(t){return _(t)&&"[object Date]"===M(t)}function A(t){return _(t)&&("[object Error]"===M(t)||t instanceof Error)}function T(t){return"function"==typeof t}function M(t){return Object.prototype.toString.call(t)}function S(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!a[t])if(s.test(t)){var r=n.pid;a[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else a[t]=function(){};return a[t]},e.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(41071),e.isArray=m,e.isBoolean=g,e.isNull=v,e.isNullOrUndefined=function(t){return null==t},e.isNumber=b,e.isString=y,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=x,e.isRegExp=w,e.types.isRegExp=w,e.isObject=_,e.isDate=k,e.types.isDate=k,e.isError=A,e.types.isNativeError=A,e.isFunction=T,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(26900);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function E(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log("%s - %s",(r=[S((t=new Date).getHours()),S(t.getMinutes()),S(t.getSeconds())].join(":"),[t.getDate(),C[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(9715),e._extend=function(t,e){if(!e||!_(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var L="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function z(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(L&&t[L]){var e;if("function"!=typeof(e=t[L]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,L,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o{var n=r(64487);t.exports=function(t){return n("webgl",t)}},17478:(t,e,r)=>{"use strict";var n=r(85573),i=r(75208),o=r(61398),a=r(24310),s=r(55572),l=a("Object.prototype.toString"),c=r(15541)(),d="undefined"==typeof globalThis?r.g:globalThis,u=i(),h=a("String.prototype.slice"),f=Object.getPrototypeOf,p=a("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r-1?e:"Object"===e&&function(t){var e=!1;return n(m,(function(r,n){if(!e)try{r(t),e=h(n,1)}catch(t){}})),e}(t)}return s?function(t){var e=!1;return n(m,(function(r,n){if(!e)try{"$"+r(t)===n&&(e=h(n,1))}catch(t){}})),e}(t):null}},32688:(t,e,r)=>{"use strict";const n=r(12028);n.register([r(94646),r(72010)]),t.exports=n},90170:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n='\n'},85072:t=>{"use strict";var e=[];function r(t){for(var r=-1,n=0;n{"use strict";var e={};t.exports=function(t,r){var n=function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},10540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},55056:(t,e,r)=>{"use strict";t.exports=function(t){var e=r.nc;e&&t.setAttribute("nonce",e)}},97825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(r){!function(t,e,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var i=void 0!==r.layer;i&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,i&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,r)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},41113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},88862:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(34961),i=r.n(n);class o{constructor(t,e){this._element=t,this._parent=null,this._visible=!1,this._horizontal=this._element.classList.contains("horizontal"),this._property=this._horizontal?"width":"height";const r=this._element.dataset.bsParent;r&&(this._parent=e.querySelector(r),i()(this._parent,"this._parent")),this._element.addEventListener("transitionend",(t=>{t.target===t.currentTarget&&t.propertyName===this._property&&(this._element.classList.replace("collapsing","collapse"),this._visible&&(this._element.classList.add("show"),this._element.style.removeProperty(this._property)))}))}hide(){if(this._visible){const t=this._element.getBoundingClientRect()[this._property];this._element.style.setProperty(this._property,`${t}px`),this._element.classList.replace("collapse","collapsing"),this._element.classList.remove("show"),this._element.offsetHeight,this._element.style.removeProperty(this._property),this._visible=!1,this._parent&&d.get(this._parent)===this&&d.set(this._parent,null)}}show(){var t;if(!this._visible){this._parent&&(null===(t=d.get(this._parent))||void 0===t||t.hide(),d.set(this._parent,this));const e=this._horizontal?"scrollWidth":"scrollHeight";this._element.classList.replace("collapse","collapsing"),this._element.style.setProperty(this._property,"0");const r=this._element[e];this._element.style.setProperty(this._property,`${r}px`),this._visible=!0}}toggle(t=!this._visible){t?this.show():this.hide()}addTrigger(t){t.addEventListener("click",(t=>{t.preventDefault(),this.toggle()}))}static initialize(t=document.body){for(const e of t.querySelectorAll("[data-bs-toggle]"))if(e instanceof HTMLElement&&"bsTarget"in e.dataset){const r=t.querySelector(e.dataset.bsTarget);r&&s(r,t).addTrigger(e)}}}const a=new WeakMap,s=(l=a,c=(t,e)=>new o(t,e),(t,...e)=>{l.has(t)||l.set(t,c(t,...e));const r=l.get(t);return i()(r,"value"),r});var l,c;const d=new WeakMap},31945:(t,e,r)=>{"use strict";r.d(e,{DefaultVisualizer:()=>Mn,version:()=>Sn});var n={};r.r(n),r.d(n,{decode:()=>H,encode:()=>Y,format:()=>Z,parse:()=>st});var i={};r.r(i),r.d(i,{Any:()=>dt,Cc:()=>ut,Cf:()=>ht,P:()=>lt,S:()=>ct,Z:()=>ft});var o={};r.r(o),r.d(o,{arrayReplaceAt:()=>Nt,assign:()=>jt,escapeHtml:()=>Jt,escapeRE:()=>Qt,fromCodePoint:()=>Ut,has:()=>Pt,isMdAsciiPunct:()=>ne,isPunctChar:()=>re,isSpace:()=>te,isString:()=>Rt,isValidEntityCode:()=>Bt,isWhiteSpace:()=>ee,lib:()=>oe,normalizeReference:()=>ie,unescapeAll:()=>qt,unescapeMd:()=>Wt});var a={};r.r(a),r.d(a,{parseLinkDestination:()=>se,parseLinkLabel:()=>ae,parseLinkTitle:()=>le}),r(86643);var s=r(34961),l=r.n(s);class c{constructor(t,e){if(this._structures=t,this._environments=e,this._activeStructures=[],this._activeAtoms=Array.from({length:this._structures.length}).map((()=>[])),void 0!==this._environments){for(const t of this._environments)this._activeAtoms[t.structure].push(t.center);for(let t=0;t0){this._activeStructures.push(t);for(let r=0;rt-e));for(let t=0;tt-e))}fromEnvironment(t,e){if("structure"===e)return{environment:t,structure:t};l()(void 0!==this._environments,"this._environments !== undefined"),l()(t\n
\n \n `;const n=r.content.firstChild;t.appendChild(n),this._valid=[],this._slider=n.querySelector("input"),this._play=n.querySelector(".chsp-play-button"),this._play.onclick=()=>{this._play.classList.toggle("chsp-playing"),this.startPlayback((()=>this._play.classList.contains("chsp-playing")))},this._slider.onchange=()=>this.onchange(),this.onchange=()=>{},this.startPlayback=()=>{}}reset(t){this._valid=t,this._slider.value="0",this._slider.max=""+(this._valid.length-1)}update(t){const e=(0,d.El)(this._valid,t);l()(-1!==e,"position !== -1"),this._slider.value=e.toString()}value(){return this._valid[parseInt(this._slider.value,10)]}}function v(t,e,r,n,i,o){const a={xref:"paper",yref:"paper",xaxis:{title:i,titlefont:{size:12},showgrid:!1,zeroline:!1,showline:!0,nticks:5},yaxis:{title:o,titlefont:{size:12},showgrid:!1,showline:!0,zeroline:!1,nticks:4},showlegend:!1,x:.2,legend:{y:.5},margin:{l:n/6,r:0,b:n/6,t:0,pad:0},width:n,height:n/1.35,tracetoggle:!1},s=[{x:t,y:e,type:"scatter",mode:"lines"}];h().newPlot(r,s,a,{displayModeBar:!1,responsive:!0,staticPlot:!1})}class b{constructor(t,e,r,n,i){const o=document.createElement("template");o.innerHTML=`
\n
\n \n \n \n
\n
`;const a=o.content.firstChild;t.appendChild(a),this._root=t,this._header=a.querySelector("th"),this._target=e,this._properties=[];const s=a.querySelector("tbody");for(const t in n){const e=document.createElement("tr"),r=document.createElement("td"),o=n[t].units;let a=t;void 0!==o&&(a+=`/${o}`);const l=n[t].description;if(void 0!==l){r.innerHTML='';const t=r.firstChild;t.innerText=a,t.setAttribute("title",l)}else r.innerText=a;e.appendChild(r);const c=document.createElement("td");e.appendChild(c),s.appendChild(e);const d=n[t].parameters;if(void 0===d)this._properties.push({cell:c,values:n[t].values});else if(i&&"string"==typeof d[0]){let e=d[0];const o=i[d[0]].units;void 0!==o&&(e+=`/${o}`);const s=document.createElement("div");s.style.display="block",s.style.width="100%",c.appendChild(s),this._properties.push({cell:c,values:n[t].values,parameter:i[d[0]].values,xlabel:e,ylabel:a});const l=document.createElement("button");l.classList.add("btn","btn-secondary","btn-sm","chsp-toggle-plot-btn"),l.textContent="Show/Hide",l.onclick=()=>{"block"===s.style.display?s.style.display="none":s.style.display="block"},r.appendChild(l)}}this.show({environment:0,structure:0,atom:0})}show(t){let e,r;"structure"===this._target?(e=t.structure+1,r=t.structure):(l()("atom"===this._target,"this._target === 'atom'"),l()(void 0!==t.atom,"indexes.atom !== undefined"),e=t.atom+1,r=t.environment),this._header.innerText=`Properties for ${this._target} ${e}`;for(const t of this._properties)if(Array.isArray(t.values[r])){const e=this._root.offsetWidth/1.5;l()(null!==t.cell.firstElementChild,"s.cell.firstElementChild !== null"),v(t.parameter,t.values[r],t.cell.firstElementChild,e,t.xlabel,t.ylabel)}else t.cell.innerText=t.values[r].toString()}}const y='\n\n \n \n \n \n \n\n\x3c!--Icon taken from www.icons8.com and edited in Inkscape--\x3e\n';var x=r(48654),w=r(62621);function _(t,e){const r={};for(const n in t)Object.hasOwnProperty.call(t,n)&&e(t[n])&&(r[n]=t[n]);return r}class k{constructor(t,e,r,n,i){this.onchange=()=>{},this.playbackDelay=700;const o=(0,d.V6)(t),a=document.createElement("div");o.appendChild(a),this._shadow=a.attachShadow({mode:"open"}),this._shadow.adoptedStyleSheets=[x.A,w.A,f],this._root=document.createElement("div"),this._shadow.appendChild(this._root),this._indexer=r,this._target=n,this._properties=e,this._parameters=i,this._structure={number:document.createElement("input"),slider:new g(document.createElement("div"),"structure"),table:new b(document.createElement("div"),"structure","structure",e,i)},this._renderTargetPart()}switchTarget(t){this._target=t,this._renderTargetPart()}show(t){const e=this._indexes().structure;if(this._structure.number.value=`${t.structure+1}`,this._structure.slider.update(t.structure),this._structure.table.show(t),t.structure!==e&&void 0!==this._atom){const e=this._indexer.activeAtoms(t.structure);this._atom.number.value=`${e[0]+1}`,this._atom.slider.reset(e)}if(void 0!==t.atom)if(void 0===this._atom){if(0!==t.atom)throw Error("Invalid state: got an atomic number to update, but I am displaying only structures")}else this._atom.number.value=`${t.atom+1}`,this._atom.slider.update(t.atom),this._atom.table.show(t)}remove(){this._shadow.host.remove()}_renderTargetPart(){this._root.innerHTML=this._getMainHTMLStructure();const t=_(this._properties,(t=>"structure"===t.target));if(this._structure=this._createStructure(t,this._parameters),"atom"===this._target){const t=_(this._properties,(t=>"atom"===t.target));this._atom=this._createAtom(t,this._parameters)}else this._atom=void 0;m.A.initialize(this._root)}_getMainHTMLStructure(){const t="atom"===this._target?`\n `:"
";return`\n
\n
\n \n ${t}\n
`}_createStructure(t,e){const r=new g(this._root,"structure");r.reset(this._indexer.activeStructures()),r.startPlayback=t=>{setTimeout((()=>{if(t()){const e=this._findNextValidIndex(this._indexes().structure,this._indexer.structuresCount(),(t=>this._indexer.fromStructure(t,this._target)));void 0!==e&&(this.show(this._indexer.fromStructure(e,this._target)),this.onchange(this._indexes()),r.startPlayback(t))}}),this.playbackDelay)},r.onchange=()=>{const t=this._structure.slider.value();if(void 0!==this._atom){const e=this._indexer.activeAtoms(t);if(0===e.length)return void(0,d.R4)(`Cannot change to structure ${t+1}, which does not contain any active atoms`);this._atom.number.value=`${e[0]+1}`,this._atom.number.max=`${e.length}`,this._atom.slider.reset(e)}const e=this._indexes();l()(void 0!==e,"indexes !== undefined"),this._structure.table.show(e),this._structure.number.value=`${e.structure+1}`,void 0!==this._atom&&this._atom.table.show(e),this.onchange(e)};const n=this._root.children[0];l()("div"===n.tagName.toLowerCase(),"tableRoot.tagName.toLowerCase() === 'div'");const i=new b(n,"structure","structure",t,e),o=this._createNumberInput(".chsp-info-structure-btn .chsp-info-number",this._indexer.structuresCount().toString(),(t=>{if(isNaN(t)||t<0||t>=parseInt(o.max,10))o.value=`${this._structure.slider.value()+1}`;else if(-1===(0,d.El)(this._indexer.activeStructures(),t))o.value=`${this._structure.slider.value()+1}`;else{if(this._structure.slider.update(t),void 0!==this._atom){const e=this._indexer.activeAtoms(t);this._atom.number.value=`${e[0]+1}`,this._atom.number.max=`${e.length}`,this._atom.slider.reset(e)}const e=this._indexes();this._structure.table.show(e),void 0!==this._atom&&this._atom.table.show(e),this.onchange(e)}}));return{number:o,slider:r,table:i}}_createAtom(t,e){const r=new g(this._root,"atom");r.reset(this._indexer.activeAtoms(this._structure.slider.value())),r.startPlayback=t=>{setTimeout((()=>{if(t()){const e=this._indexes();l()(void 0!==e.atom,"current.atom !== undefined");const n=this._findNextValidIndex(e.atom,this._indexer.atomsCount(e.structure),(t=>this._indexer.fromStructureAtom(this._target,e.structure,t)));void 0!==n&&(this.show(this._indexer.fromStructureAtom(this._target,e.structure,n)),this.onchange(this._indexes()),r.startPlayback(t))}}),this.playbackDelay)},r.onchange=()=>{l()(void 0!==this._atom,"this._atom !== undefined");const t=this._indexes();if(void 0!==t)l()(void 0!==t.atom,"indexes.atom !== undefined"),this._atom.table.show(t),this._atom.number.value=`${t.atom+1}`,this.onchange(t);else{const t=this._structure.slider.value(),e=this._atom.slider.value();(0,d.R4)(`Environment for atom ${e} in structure ${t} is not part of this dataset`)}};const n=this._root.children[0];l()("div"===n.tagName.toLowerCase(),"tableRoot.tagName.toLowerCase() === 'div'");const i=new b(n,"atom","atom",t,e),o=this._createNumberInput(".chsp-info-atom-btn .chsp-info-number",this._indexer.atomsCount(this._structure.slider.value()).toString(),(t=>{l()(void 0!==this._atom,"this._atom !== undefined");const e=this._indexer.activeAtoms(this._structure.slider.value());if(isNaN(t)||t<0||t>=parseInt(o.max,10))o.value=`${this._atom.slider.value()+1}`;else if(-1===(0,d.El)(e,t))o.value=`${this._atom.slider.value()+1}`;else{this._atom.slider.update(t);const e=this._indexes();this._atom.table.show(e),this.onchange(e)}}));return{number:o,slider:r,table:i}}_findNextValidIndex(t,e,r){let n=0;for(;n<=e;){if(void 0!==r(t=(t+1)%e))return t;n++}}_createNumberInput(t,e,r){const n=this._root.querySelector(t);return n.max=e,n.onchange=()=>r(parseInt(n.value,10)-1),n.onclick=t=>t.stopPropagation(),n}_indexes(){const t=this._structure.slider.value();let e;if(void 0!==this._atom){const r=this._atom.slider.value();e=this._indexer.fromStructureAtom(this._target,t,r)}else l()("atom"!==this._target,"this._target !== 'atom'"),e=this._indexer.fromStructureAtom(this._target,t);return l()(void 0!==e,"indexes !== undefined"),e}}class A{constructor(){this._values=[]}get(t){let e=this._values.findIndex((e=>e===t));return-1===e&&(e=this._values.length,this._values.push(t)),e}string(t){if(t>=this._values.length)throw Error("requested unknown string from interner");return this._values[t]}strings(){return this._values}}function T(t,e){const r=typeof e.values[0];if("number"===r)return{values:e.values,units:e.units};if("string"===r){const r=new A,n=[];for(const i of e.values){const e=r.get(i);if(n.push(e),e>20)throw Error(`the '${t}' property contains more than 50 different values, it can not be interpreted as categories`)}return{string:r,values:n,units:e.units}}if(!Array.isArray(e.values[0]))throw Error(`unexpected property type '${r}'`)}function M(t,e){let r,n;for(const i in e)if(void 0!==r){if(e[i].values.length!==r)throw Error(`${t} property '${i}' do not have the same size as the first property '${n}': expected ${r}, got ${e[i].values.length}`)}else r=e[i].values.length,n=i}class S{constructor(t){this.structure={},this.atom={},this.maxSymbols=-1;for(const e in t){let r;try{r=T(e,t[e])}catch(t){(0,d.R4)(`warning: ${t.message}`);continue}void 0!==r&&(this[t[e].target][e]=r,void 0!==r.string&&(this.maxSymbols=Math.max(this.maxSymbols,r.string.strings().length)))}M("structure",this.structure),M("atom",this.atom)}}class C{constructor(t,e,r,n=!0){const i=document.createElement("div");i.classList.add("chsp-pin-marker","chsp-map-pin-marker"),i.id=`chsp-selected-${t}`,i.style.backgroundColor=e,this.marker=i,this.toggleVisible(n),this.color=e,this.current=r}update(t){isFinite(t.x)&&isFinite(t.y)?(this.marker.style.top=`${t.y}px`,this.marker.style.right=`${t.x}px`):this.toggleVisible(!1)}select(t){return this.current!==t.environment&&(this.current=t.environment,!0)}activate(){this.marker.classList.toggle("chsp-active-pin",!0)}deactivate(){this.marker.classList.toggle("chsp-active-pin",!1)}remove(){l()(null!==this.marker.parentNode,"this.marker.parentNode !== null"),this.marker.parentNode.removeChild(this.marker)}toggleVisible(t){this.marker.style.display=t?"block":"none"}}var E=r(50112),L=r(45127),z=r(17136),O=r(90170);const D=["circle","square","diamond","cross","x"];function I(t){return D[t%D.length]}class R extends L.W2{constructor(t){l()(t.length>0,"validProperties.length > 0"),super(),this.max=new L.Je("number",NaN),this.min=new L.Je("number",NaN),this.property=new L.Je("string",t[0]),this.scale=new L.Je("string","linear"),this.property.validate=(0,L.qP)(t,"axis"),this.scale.validate=(0,L.qP)(["linear","log"],"axis scale")}disable(){this.max.disable(),this.min.disable(),this.scale.disable()}enable(){this.max.enable(),this.min.enable(),this.scale.enable()}}class F extends L.W2{constructor(t,e,r,n={}){super();const i=Object.keys(e);if(i.length<2)throw new Error("Cannot show a map because the dataset contains fewer than two properties.");this.x=new R(i),this.y=new R(i),this.z=new R(i.concat([""])),this.symbol=new L.Je("string","");const o=[""];for(const t in e)void 0!==e[t].string&&o.push(t);this.symbol.validate=(0,L.qP)(o,"symbol"),this.palette=new L.Je("string","inferno"),this.palette.validate=(0,L.qP)(Object.keys(z.s),"palette"),this.color={mode:new L.Je("string","linear"),property:new L.Je("string",""),min:new L.Je("number",NaN),max:new L.Je("number",NaN)},this.color.property.validate=(0,L.qP)(i.concat([""]),"color"),this.color.mode.validate=(0,L.qP)(["linear","log","sqrt","inverse"],"mode"),this.size={factor:new L.Je("number",50),mode:new L.Je("string","linear"),property:new L.Je("string","")},this.size.property.validate=(0,L.qP)(i.concat([""]),"size"),this.size.factor.validate=t=>{if(t<1||t>100)throw Error(`size factor must be between 0 and 100, got ${t}`)},this.size.mode.validate=(0,L.qP)(["linear","log","sqrt","inverse","flip-linear","proportional"],"mode"),this.markerOutline=new L.Je("boolean",!0),this.joinPoints=new L.Je("boolean",!1),this.x.property.value=i[0],this.y.property.value=i[1],this.z.property.value="",i.length>2?this.color.property.value=i[2]:this.color.property.value="",this._positionSettingsModal=r;const{openModal:a,modal:s}=this._createSettingsHTML();this._modal=s,this._openModal=a,t.appendChild(this._openModal),this._bind(e),this.applySettings(n)}getModalElement(t){return(0,d.VT)(t,this._modal.shadow)}applySettings(t){if("size"in t){const e=t.size;"mode"in e&&"constant"===e.mode&&(delete e.mode,e.property="")}if("color"in t){const e=t.color;"scale"in e&&(e.mode=e.scale,delete e.scale)}super.applySettings(t)}remove(){this._modal.remove(),this._openModal.remove()}is3D(){return""!==this.z.property.value}hasColors(){return""!==this.color.property.value}hovertemplate(){if(this.hasColors()){let t=this.color.property.value;switch(this.color.mode.value){case"inverse":t=`(${t})-1`;break;case"log":t=`log(${t})`;break;case"sqrt":t=`sqrt(${t})`}return t+": %{marker.color:.2f}"}return"%{x:.2f}, %{y:.2f}"}calculateColors(t){let e=this.color.mode.value;const{min:r,max:n}=(0,d.GI)(t);return n===r&&(e="fixed"),t.map((t=>{let r=.5;switch(e){case"inverse":r=1/t;break;case"log":r=Math.log10(t);break;case"sqrt":r=Math.sqrt(t);break;case"linear":r=1*t;break;default:r=.5}return isNaN(r)?"#aaaaaa":r}))}calculateSizes(t){const e=(t=>{const e=Math.log(1/6),r=(Math.log(6)-e)/99;return Math.exp(e+r*(t-1))})(this.size.factor.value);let r=this.size.mode.value;const{min:n,max:i}=(0,d.GI)(t),o=this.is3D()?800:300,a=n>0?n:1e-6*(i-n),s=t.map((t=>{let s=.3;switch(i===n?r="fixed":s=(t-n)/(i-n),r){case"proportional":s=t/Math.abs(i);break;case"inverse":s=a/t;break;case"log":s=Math.log(t/a)/Math.log(i/a);break;case"sqrt":s=Math.sqrt(t/Math.abs(i));break;case"linear":s*=1;break;case"flip-linear":s=1-s;break;default:s=.3-.1}return s+=.1,o*s*e}));return s.some((t=>isNaN(t)||t<0))?((0,d.R4)(`After applying the selected scaling mode ${r}, some point sizesevaluated to invalid values. These points will be displayed at the minimum size.`),s.map((t=>isNaN(t)?.1*o*e:t))):s}getSymbols(t){l()(void 0!==t.string,"property.string !== undefined");const e=t.string.strings().length;return this.is3D()?(e>D.length&&(0,d.R4)(`${e} symbols are required, but we only have ${D.length}. Some symbols will be repeated`),t.values.map(I)):t.values}_createSettingsHTML(){const t=document.createElement("template");t.innerHTML=`\n
${O.A}
\n `;const e=t.content.firstChild;t.innerHTML='\n';const r=t.content.querySelector(".modal");l()(null!==r&&r instanceof HTMLElement,"modalElement !== null && modalElement instanceof HTMLElement");const n=r.querySelector(".modal-dialog");l()(null!==n&&n instanceof HTMLElement,"modalDialog !== null && modalDialog instanceof HTMLElement"),(0,d.eB)(n,".modal-header");const i=new E.A(r);return i.shadow.adoptedStyleSheets=[x.A,w.A],m.A.initialize(r),e.addEventListener("click",(()=>{if(null===n.getAttribute("data-initial-modal-positions-set")){n.setAttribute("data-initial-modal-positions-set","true"),n.parentNode.style.display="block",n.style.width=n.offsetWidth/1.5+"px",n.style.minWidth="500px",n.style.margin="0",n.style.position="fixed";const{top:t,left:e}=this._positionSettingsModal(n.getBoundingClientRect());n.style.top=`${t}px`,n.style.left=`${e}px`}i.open()})),r.addEventListener("keydown",(t=>{t.stopPropagation()})),{openModal:e,modal:i}}_bind(t){const e=this.getModalElement("map-x-property");e.options.length=0;for(const r in t)e.options.add(new Option(r,r));this.x.property.bind(e,"value"),this.x.min.bind(this.getModalElement("map-x-min"),"value"),this.x.max.bind(this.getModalElement("map-x-max"),"value"),this.x.scale.bind(this.getModalElement("map-x-scale"),"value");const r=this.getModalElement("map-y-property");r.options.length=0;for(const e in t)r.options.add(new Option(e,e));this.y.property.bind(r,"value"),this.y.min.bind(this.getModalElement("map-y-min"),"value"),this.y.max.bind(this.getModalElement("map-y-max"),"value"),this.y.scale.bind(this.getModalElement("map-y-scale"),"value");const n=this.getModalElement("map-z-property");n.options.length=0,n.options.add(new Option("none",""));for(const e in t)n.options.add(new Option(e,e));this.z.property.bind(n,"value"),this.z.min.bind(this.getModalElement("map-z-min"),"value"),this.z.max.bind(this.getModalElement("map-z-max"),"value"),this.z.scale.bind(this.getModalElement("map-z-scale"),"value");const i=this.getModalElement("map-color-property");i.options.length=0,i.options.add(new Option("fixed",""));for(const e in t)i.options.add(new Option(e,e));this.color.property.bind(i,"value"),this.color.mode.bind(this.getModalElement("map-color-transform"),"value"),this.color.min.bind(this.getModalElement("map-color-min"),"value"),this.color.max.bind(this.getModalElement("map-color-max"),"value");const o=this.getModalElement("map-color-palette");o.length=0;for(const t in z.s)o.options.add(new Option(t,t));this.palette.bind(o,"value");const a=this.getModalElement("map-symbol-property");a.options.length=0,a.options.add(new Option("fixed",""));for(const e in t)void 0!==t[e].string&&a.options.add(new Option(e,e));this.symbol.bind(a,"value");const s=this.getModalElement("map-size-property");s.options.length=0,s.options.add(new Option("fixed",""));for(const e in t)s.options.add(new Option(e,e));this.size.property.bind(s,"value"),this.size.factor.bind(this.getModalElement("map-size-factor"),"value"),this.size.mode.bind(this.getModalElement("map-size-transform"),"value"),this.markerOutline.bind(this.getModalElement("map-marker-outline"),"checked"),this.joinPoints.bind(this.getModalElement("map-join-points"),"checked")}colorScale(){return z.s[this.palette.value]}setLogLabel(t,e){const r=this.getModalElement(`map-${e}-min-label`),n=this.getModalElement(`map-${e}-max-label`);"log"===t.scale.value?(r.innerHTML="min: 10^",n.innerHTML="max: 10^"):(r.innerHTML="min:",n.innerHTML="max:")}}const P='\n\n \n \n\n\x3c!--Icon taken from www.uxwing.com and edited in Inkscape--\x3e\n\n';const j={coloraxis:{cmax:0,cmin:0,colorbar:{len:1,thickness:20,title:{text:"",side:"right",font:{size:15}},y:0,yanchor:"bottom"},colorscale:[],showscale:!0},hovermode:"closest",legend:{itemclick:!1,itemdoubleclick:!1,tracegroupgap:5,y:1,yanchor:"top"},margin:{b:50,l:50,r:50,t:50},scene:{camera:{projection:{type:"orthographic"}},xaxis:{showspikes:!1,title:""},yaxis:{showspikes:!1,title:""},zaxis:{showspikes:!1,title:""}},showlegend:!0,xaxis:{range:void 0,title:"",type:"linear",zeroline:!1},yaxis:{range:void 0,title:"",type:"linear",zeroline:!1},zaxis:{range:void 0,title:"",type:"linear",zeroline:!1}},N={displayModeBar:!0,displaylogo:!1,responsive:!0,scrollZoom:!0,modeBarButtonsToRemove:["hoverClosestCartesian","hoverCompareCartesian","toggleSpikelines","autoScale2d","zoomIn2d","zoomOut2d","select2d","lasso2d","hoverClosest3d","tableRotation","resetCameraLastSave3d","toImage"],modeBarButtonsToAdd:[[{name:"Download PNG",icon:{width:400,height:447,path:U(P)},click:function(t){h().downloadImage(t,{filename:"chemiscope-map",format:"png",width:Math.max(t._fullLayout.width,600),height:Math.max(t._fullLayout.width,600)}).catch((t=>setTimeout((()=>{throw t}))))}}],[{name:"Download SVG",icon:{width:400,height:447,path:U('\n\n \n \n \n\x3c!--Icon taken from www.uxwing.com and edited in Inkscape--\x3e\n\n')},click:function(t){h().downloadImage(t,{filename:"chemiscope-map",format:"svg",width:Math.max(t._fullLayout.width,600),height:Math.max(t._fullLayout.height,600)}).catch((t=>setTimeout((()=>{throw t}))))}}]]};class B{constructor(t,e,r,n,i){this._getAxisRange=(t,e,r)=>{const n=!isNaN(t),i=!isNaN(e);if(n&&i){if(t<=e)return[t,e];(0,d.R4)(`The inserted min and max values in ${r} are such that min > max!The default values will be used.`)}return[n?t:void 0,i?e:void 0]},this._indexer=r,this._target=n,this.onselect=()=>{},this.activeChanged=()=>{},this._selected=new Map;const o=(0,d.V6)(t),a=document.createElement("div");a.style.setProperty("height","100%"),o.appendChild(a),this._shadow=a.attachShadow({mode:"open"}),this._root=document.createElement("div"),this._root.style.setProperty("height","100%"),this._shadow.appendChild(this._root),""===this._root.style.position&&(this._root.style.position="relative"),this._plot=document.createElement("div"),this._plot.style.width="100%",this._plot.style.height="100%",this._root.appendChild(this._plot),this._data=new S(i);const s=this._getCurrentProperties();var l;this._options=new F(this._root,s,(t=>this.positionSettingsModal(t)),e),this._colorReset=this._options.getModalElement("map-color-reset"),this._connectSettings(),this.positionSettingsModal=t=>{const e=this._root.getBoundingClientRect();return{left:e.left+e.width/2-t.width/2,top:e.top+20}},this._createPlot(),this._shadow.adoptedStyleSheets=[x.A,w.A,f,(l=this._plot,p(l._fullLayout._modeBar._uid))]}switchTarget(t){return e=this,r=void 0,i=function*(){if(t!==this._target){if(this._target=t,this._handleMarkers(),void 0!==this._active){const t=this._selected.get(this._active);void 0!==t&&this.onselect(this._indexer.fromEnvironment(t.current,this._target))}this._setupMapOptions(),this._connectSettings(),yield this._react(this._getTraces(),this._getLayout())}},new((n=void 0)||(n=Promise))((function(t,o){function a(t){try{l(i.next(t))}catch(t){o(t)}}function s(t){try{l(i.throw(t))}catch(t){o(t)}}function l(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,s)}l((i=i.apply(e,r||[])).next())}));var e,r,n,i}_handleMarkers(){var t;for(const[e,r]of this._selected.entries()){if("structure"===this._target)r.current=this._indexer.fromEnvironment(r.current,"atom").structure;else{const e=null===(t=this._indexer.fromStructure(r.current,"atom"))||void 0===t?void 0:t.environment;l()(void 0!==e,"environment !== undefined"),r.current=e}this._selected.set(e,r)}}remove(){var t;this._shadow.host.remove(),this._options.remove(),null===(t=document.getElementById("js-plotly-tester"))||void 0===t||t.remove(),this._plotFix.disable()}select(t){if(void 0===this._active)throw Error("tries to update selected environment, but there is no active marker");if(void 0===t.environment){const e=this._indexer.fromStructureAtom(this._target,t.structure,t.atom);if(void 0===e){const e=void 0===t.atom?"":` / atom ${t.atom}`;throw Error(`can not find the environnement for structure ${t.structure}`+e)}t=e}const e=this._selected.get(this._active);l()(void 0!==e,"data !== undefined"),e.select(t)&&this._updateMarkers()}setActive(t){if(void 0!==this._active){const t=this._selected.get(this._active);l()(void 0!==t,"oldData !== undefined"),t.deactivate()}this._active=t;const e=this._selected.get(this._active);l()(void 0!==e,"data !== undefined"),e.activate(),this._is3D()&&this._restyle({"marker.size":this._sizes(1)},1)}addMarker(t,e,r){l()(!this._selected.has(t),"!this._selected.has(guid)");const n=new C(t,e,r.environment);this._root.appendChild(n.marker),n.marker.onclick=()=>{this.setActive(t),this.activeChanged(t,this._indexer.fromEnvironment(n.current,this._target))},this._selected.set(t,n),this._updateMarkers([n]),this.setActive(t)}removeMarker(t){this._active===t&&(1===this._selected.size?this._active=void 0:this.setActive((0,d.o)(this._selected,t)));const e=this._selected.get(t);l()(void 0!==e,"data !== undefined"),e.remove(),this._selected.delete(t),this._updateMarkers()}applySettings(t){this._options.applySettings(t)}saveSettings(){return this._options.saveSettings()}onSettingChange(t){this._options.onSettingChange(t)}_getTraces(){const t=this._is3D()?"scatter3d":"scattergl",e=[{name:"",type:t,x:this._coordinates(this._options.x,0)[0],y:this._coordinates(this._options.y,0)[0],z:this._coordinates(this._options.z,0)[0],hovertemplate:this._options.hovertemplate(),marker:{color:this._colors(0)[0],coloraxis:"coloraxis",line:{color:"black",width:this._options.markerOutline.value?.5:0},opacity:1,size:this._sizes(0)[0],sizemode:"area",symbol:this._symbols(0)[0]},line:{color:"black",width:.5,dash:"solid"},mode:this._options.joinPoints.value?"lines+markers":"markers",showlegend:!1},{name:"selected",type:t,x:[],y:[],z:[],hoverinfo:"none",marker:{color:[],line:{color:[],width:2},opacity:1,size:[],sizemode:"area"},mode:"markers",showlegend:!1}],r=this._legendNames().slice(2),n=this._showlegend().slice(2);l()(r.length===n.length,"legendNames.length === showlegend.length");const i=r.length;this._data.maxSymbols>0&&(r.length=this._data.maxSymbols,r.fill("",i),n.length=this._data.maxSymbols,n.fill(!1,i));for(let i=0;i{t&&Object.keys(t).length>1&&(this._options.remove(),this._options=new F(this._root,this._getCurrentProperties(),(t=>this.positionSettingsModal(t)),{}))};"atom"!==this._target?t(this._data.structure):t(this._data.atom)}_getCurrentProperties(){const t=this._data[this._target],e=Object.keys(t);if(e.length<2){if("structure"===this._target&&!this._indexer.hasEnvironments()&&Object.keys(this._data.atom).length>=2)throw Error("could not find enough structure properties to display, but there are atom properties. Please provide the environment list to display them");let t="we need at least two properties to plot in the map";throw 0===e.length?t+=", we have none":t+=`, we have only one: '${e[0]}'`,Error(t)}return t}_restyle(t,e){h().restyle(this._plot,t,e).catch((t=>setTimeout((()=>{throw t}))))}_relayout(t){h().relayout(this._plot,t).catch((t=>setTimeout((()=>{throw t}))))}_react(t,e){return new Promise(((r,n)=>{h().react(this._plot,t,e).then((()=>{r()})).catch((t=>{setTimeout((()=>{n(t)}))}))}))}_connectSettings(){const t=t=>{"log"===t.scale.value&&(0,d.GI)(this._coordinates(t,0)[0]).min<0&&t.min.value<=0&&(0,d.R4)("This property contains negative values. Note that taking the log will discard them.")};this._options.x.property.onchange.push((()=>{t(this._options.x);const e=this._coordinates(this._options.x);this._restyle({x:e},[0,1]),this._relayout({"scene.xaxis.title":this._title(this._options.x.property.value),"xaxis.title":this._title(this._options.x.property.value)}),this._is3D()?this._relayout({"scene.xaxis.autorange":!0}):this._relayout({"xaxis.autorange":!0}),this._setScaleStep(this._getBounds().x,"x")})),this._options.x.scale.onchange.push((()=>{t(this._options.x),this._options.setLogLabel(this._options.x,"x"),this._is3D()?this._relayout({"scene.xaxis.type":this._options.x.scale.value}):this._relayout({"xaxis.type":this._options.x.scale.value})}));const e=(e,r,n)=>(i,o)=>{if("JS"===o)return;const a=r.min.value,s=r.max.value;if(a>s)return(0,d.R4)(`The inserted min and max values in ${e} are such that min > max! The last inserted value was reset.`),void("min"===n?r.min.reset():r.max.reset());t(r),this._is3D()?this._relayout({[`scene.${e}.range`]:[a,s]}):this._relayout({[`${e}.range`]:[a,s]})};if(this._options.x.min.onchange.push(e("xaxis",this._options.x,"min")),this._options.x.max.onchange.push(e("xaxis",this._options.x,"max")),this._options.y.property.onchange.push((()=>{t(this._options.y);const e=this._coordinates(this._options.y);this._restyle({y:e},[0,1]),this._relayout({"scene.yaxis.title":this._title(this._options.y.property.value),"yaxis.title":this._title(this._options.y.property.value)}),this._is3D()?this._relayout({"scene.yaxis.autorange":!0}):this._relayout({"yaxis.autorange":!0}),this._setScaleStep(this._getBounds().y,"y")})),this._options.y.scale.onchange.push((()=>{t(this._options.y),this._options.setLogLabel(this._options.y,"y"),this._is3D()?this._relayout({"scene.yaxis.type":this._options.y.scale.value}):this._relayout({"yaxis.type":this._options.y.scale.value})})),this._options.y.min.onchange.push(e("yaxis",this._options.y,"min")),this._options.y.max.onchange.push(e("yaxis",this._options.y,"max")),""===this._options.z.property.value?this._options.z.disable():this._options.z.enable(),this._options.z.property.onchange.push((()=>{t(this._options.z);const e="scatter3d"===this._plot._fullData[0].type;if(""===this._options.z.property.value)return void(e&&this._switch2D());e||this._switch3D();const r=this._coordinates(this._options.z);this._restyle({z:r},[0,1]),this._relayout({"scene.zaxis.title":this._title(this._options.z.property.value),"scene.zaxis.autorange":!0}),this._is3D()&&this._setScaleStep(this._getBounds().z,"z")})),this._options.z.scale.onchange.push((()=>{t(this._options.z),this._options.setLogLabel(this._options.z,"z"),""!==this._options.z.property.value&&this._relayout({"scene.zaxis.type":this._options.z.scale.value})})),this._options.z.min.onchange.push(e("zaxis",this._options.z,"min")),this._options.z.max.onchange.push(e("zaxis",this._options.z,"max")),this._options.hasColors()){const t=(t,e)=>{const[r,n]=this._getAxisRange(t,e,"map.color"),i=void 0!==r,o=void 0!==n,a=()=>{const t=this._colors(0)[0];return(0,d.GI)(t)};if(i||o){const{min:r,max:n}=a();return{min:i?t:r,max:o?e:n}}return a()},{min:e,max:r}=t(this._options.color.min.value,this._options.color.max.value);this._options.color.min.value=e,this._options.color.max.value=r,this._setScaleStep([e,r],"color")}else this._options.color.min.value=0,this._options.color.max.value=0;this._options.color.property.onchange.push((()=>{if(this._options.hasColors()){this._options.color.mode.enable(),this._options.color.min.enable(),this._options.color.max.enable(),this._colorReset.disabled=!1;const t=this._colors(0)[0];if(n(t,"property")){const{min:e,max:r}=(0,d.GI)(t);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=r,this._options.color.min.value=e,this._setScaleStep([e,r],"color"),this._relayout({"coloraxis.colorbar.title.text":this._colorTitle(),"coloraxis.showscale":!0})}}else this._options.color.mode.disable(),this._options.color.min.disable(),this._options.color.max.disable(),this._colorReset.disabled=!0,this._options.color.min.value=0,this._options.color.max.value=0,this._relayout({"coloraxis.colorbar.title.text":void 0,"coloraxis.showscale":!1});this._restyle({hovertemplate:this._options.hovertemplate(),"marker.color":this._colors(0)},[0])}));const r=t=>{const e=this._options.color.min.value,r=this._options.color.max.value;if(e>r)return(0,d.R4)("The inserted min and max values in color are such that min > max! The last inserted value was reset."),void("min"===t?this._options.color.min.reset():this._options.color.max.reset());this._relayout({"coloraxis.cmax":r,"coloraxis.cmin":e,"coloraxis.colorscale":this._options.colorScale()})},n=(t,e)=>{const r=this._options.color.mode.value;let n="";"log"===r||"sqrt"===r?n="<= 0":"inverse"===r&&(n="== 0");const i=t.every((t=>isNaN(t))),o=t.some((t=>isNaN(t)));return i?((0,d.R4)(`The selected property contains only values ${n}. To display this property, select an appropriate color scale. The ${e} will be set to its last value.`),"property"===e?this._options.color.property.reset():this._options.color.mode.reset(),!1):!o||((0,d.R4)(`The selected property contains some values ${n}. These values will be colored in grey.`),!0)};this._options.color.mode.onchange.push((()=>{const t=this._colors(0)[0];if(n(t,"color scale")){const{min:e,max:r}=(0,d.GI)(t);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=r,this._options.color.min.value=e,this._setScaleStep([e,r],"color"),this._relayout({"coloraxis.colorbar.title.text":this._colorTitle(),"coloraxis.showscale":!0}),this._restyle({hovertemplate:this._options.hovertemplate(),"marker.color":this._colors(0)},[0])}})),this._options.color.min.onchange.push((()=>{r("min")})),this._options.color.max.onchange.push((()=>{r("max")})),this._colorReset.onclick=()=>{const t=this._colors(0)[0],{min:e,max:r}=(0,d.GI)(t);this._options.color.min.value=e,this._options.color.max.value=r,this._relayout({"coloraxis.cmax":r,"coloraxis.cmin":e,"coloraxis.colorscale":this._options.colorScale()})},this._options.color.property.enable(),this._options.hasColors()?(this._options.color.mode.enable(),this._options.color.min.enable(),this._options.color.max.enable(),this._colorReset.disabled=!1):(this._options.color.min.disable(),this._options.color.max.disable(),this._colorReset.disabled=!0),this._options.palette.onchange.push((()=>{this._relayout({"coloraxis.colorscale":this._options.colorScale()})})),this._options.symbol.onchange.push((()=>{this._restyle({"marker.symbol":this._symbols()},[0,1]),this._restyle({name:this._legendNames(),showlegend:this._showlegend()}),this._relayout({"coloraxis.colorbar.len":this._colorbarLen()})})),""===this._options.size.property.value?this._options.size.mode.disable():this._options.size.mode.enable(),this._options.size.property.onchange.push((()=>{""!==this._options.size.property.value?this._options.size.mode.enable():this._options.size.mode.disable(),this._restyle({"marker.size":this._sizes(0)},0)})),this._options.size.factor.onchange.push((()=>{this._restyle({"marker.size":this._sizes(0)},0)})),this._options.size.mode.onchange.push((()=>{this._restyle({"marker.size":this._sizes(0)},0)})),this._options.markerOutline.onchange.push((()=>{const t=this._options.markerOutline.value?.5:0;this._restyle({"marker.line.width":t},[0])})),this._options.joinPoints.onchange.push((()=>{const t=this._options.joinPoints.value?"lines+markers":"markers";this._restyle({mode:t},[0])}))}_createPlot(){this._plot.innerHTML="";const t=this._getTraces(),e=this._getLayout();h().newPlot(this._plot,t,e,N).then((()=>{window.requestAnimationFrame((()=>{window.dispatchEvent(new Event("resize"))}))})).catch((t=>setTimeout((()=>{throw t})))),this._plot.classList.add("chsp-map"),this._plotFix=function(t){let e=null;const r=t=>{t.isTrusted&&t.target&&(t.preventDefault(),t.stopPropagation(),e={data:t instanceof MouseEvent?{buttons:t.buttons,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey}:{buttons:1,clientX:t.touches[0].clientX,clientY:t.touches[0].clientY,ctrlKey:t.ctrlKey},target:t.target})},n=t=>{if(e&&t.target){t.preventDefault(),t.stopImmediatePropagation();const r=new Event("mousedown",{composed:!0});Object.assign(r,Object.assign(Object.assign({},e.data),{clientX:e.data.clientX-50,clientY:e.data.clientY-50}));const n=e.target;e=null,n.dispatchEvent(r);const i=new Event("mouseup",{bubbles:!0,composed:!0});t.target.dispatchEvent(i)}},i=t=>{if(e){t.preventDefault(),t.stopImmediatePropagation();const r=t instanceof MouseEvent?t:t.changedTouches[0];if(Math.abs(r.clientX-e.data.clientX)>5||Math.abs(r.clientY-e.data.clientY)>5){const t=new Event("mousedown",{composed:!0});Object.assign(t,e.data);const r=e.target;e=null,r.dispatchEvent(t)}}};let o=!1;const a=()=>{o=!0,t.addEventListener("mousedown",r,{capture:!0}),document.addEventListener("mouseup",n),document.addEventListener("mousemove",i),t.addEventListener("touchstart",r,{capture:!0}),document.addEventListener("touchmove",i,{passive:!1}),document.addEventListener("touchend",n,{passive:!1})},s=()=>{o=!1,t.removeEventListener("mousedown",r,{capture:!0}),document.removeEventListener("mouseup",n),document.removeEventListener("mousemove",i),t.removeEventListener("touchstart",r,{capture:!0}),document.removeEventListener("touchmove",i),document.removeEventListener("touchend",n)};return t.on("plotly_restyle",(([t])=>{"type"in t&&(o&&"scatter3d"===t.type&&s(),o||"scattergl"!==t.type||a())})),"scattergl"===t._fullData[0].type&&a(),{disable:s,enable:a}}(this._plot),this._plot.on("plotly_click",(t=>{if(t.event&&2===t.event.detail)return;let e=t.points[0].pointNumber;if(this._is3D()&&"selected"===t.points[0].data.name)for(const[r,[n,i]]of(0,d.HL)(this._selected.entries()))if(t.points[0].pointNumber===r){e=i.current,this._active!==n&&(this.setActive(n),this.activeChanged(n,this._indexer.fromEnvironment(i.current,this._target)));break}const r=this._indexer.fromEnvironment(e,this._target);this.select(r),this.onselect(r)})),this._plot.on("plotly_afterplot",(()=>this._afterplot())),this._updateMarkers();const r=this._getBounds();this._setScaleStep(r.x,"x"),this._setScaleStep(r.y,"y"),void 0!==r.z&&this._setScaleStep(r.z,"z"),this._plot.addEventListener("wheel",(()=>{}))}_getLayout(){const t=JSON.parse(JSON.stringify(j));return t.xaxis.title=this._title(this._options.x.property.value),t.yaxis.title=this._title(this._options.y.property.value),t.xaxis.type=this._options.x.scale.value,t.yaxis.type=this._options.y.scale.value,t.scene.xaxis.title=this._title(this._options.x.property.value),t.scene.yaxis.title=this._title(this._options.y.property.value),t.scene.zaxis.title=this._title(this._options.z.property.value),t.coloraxis.colorscale=this._options.colorScale(),t.coloraxis.cmin=this._options.color.min.value,t.coloraxis.cmax=this._options.color.max.value,t.coloraxis.colorbar.title.text=this._colorTitle(),t.coloraxis.colorbar.len=this._colorbarLen(),t.coloraxis.showscale=this._options.hasColors(),t.xaxis.range=this._getAxisRange(this._options.x.min.value,this._options.x.max.value,"map.x"),t.yaxis.range=this._getAxisRange(this._options.y.min.value,this._options.y.max.value,"map.y"),t.zaxis.range=this._getAxisRange(this._options.z.min.value,this._options.z.max.value,"map.z"),t}_property(t){const e=this._data[this._target][t];if(void 0===e)throw Error(`unknown property '${t}' requested in map`);return e}_coordinates(t,e){if(""===t.property.value)return this._selectTrace(void 0,void 0,e);const r=this._property(t.property.value).values,n=[];for(const t of this._selected.values())this._is3D()?n.push(r[t.current]):n.push(NaN);return this._selectTrace(r,n,e)}_title(t){let e=t;if(""!==t){const r=this._property(t).units;void 0!==r&&(e=t+` / ${r}`)}return e}_colorTitle(){let t=this._title(this._options.color.property.value);switch(this._options.color.mode.value){case"inverse":t=`(${t})-1`;break;case"log":t=`log10(${t})`;break;case"sqrt":t=`√(${t})`}return t}_colors(t){let e;e=this._options.hasColors()?this._property(this._options.color.property.value).values:new Array(this._property(this._options.x.property.value).values.length).fill(.5);const r=this._options.calculateColors(e),n=[];for(const t of this._selected.values())n.push(t.color);return this._selectTrace(r,n,t)}_sizes(t){let e;e=""!==this._options.size.property.value?this._property(this._options.size.property.value).values:new Array(this._property(this._options.x.property.value).values.length).fill(1);const r=this._options.calculateSizes(e),n=[];if(this._is3D())for(const t of this._selected.keys())t===this._active?n.push(1e3):n.push(500);return this._selectTrace(r,n,t)}_symbols(t){if(""===this._options.symbol.value)return this._selectTrace("circle","circle",t);const e=this._property(this._options.symbol.value),r=this._options.getSymbols(e),n=[];for(const t of this._selected.values())n.push(r[t.current]);return this._selectTrace(r,n,t)}_showlegend(){const t=[!1,!1];if(""!==this._options.symbol.value){for(let e=0;e{t.min.value=isNaN(t.min.value)?e:t.min.value,t.max.value=isNaN(t.max.value)?r:t.max.value};e(this._options.x,t.x),e(this._options.y,t.y),void 0!==t.z&&e(this._options.z,t.z),this._is3D()||this._updateMarkers()}_updateMarkers(t){if(void 0===t&&(t=Array.from(this._selected.values())),this._is3D())t.forEach((t=>t.toggleVisible(!1))),this._restyle({"marker.color":this._colors(1),"marker.size":this._sizes(1),"marker.symbol":this._symbols(1),x:this._coordinates(this._options.x,1),y:this._coordinates(this._options.y,1),z:this._coordinates(this._options.z,1)},1);else{const e=this._coordinates(this._options.x,0)[0],r=this._coordinates(this._options.y,0)[0],n=this._plot.getBoundingClientRect().width;for(const i of t){let t=e[i.current],o=r[i.current];"log"===this._options.x.scale.value&&(t=Math.log10(t)),"log"===this._options.y.scale.value&&(o=Math.log10(o)),t=n-this._pixelCoordinate(t,"x"),o=this._pixelCoordinate(o,"y");const a=this._getBounds(),s=n-this._pixelCoordinate(a.x[1],"x"),l=n-this._pixelCoordinate(a.x[0],"x"),c=this._pixelCoordinate(a.y[1],"y"),d=this._pixelCoordinate(a.y[0],"y"),u=(t,e,r)=>t+10>e&&t-10=55296&&t<=57343?"���":String.fromCharCode(t),n+=6;continue}}if(240==(248&o)&&n+91114111?e+="����":(t-=65536,e+=String.fromCharCode(55296+(t>>10),56320+(1023&t))),n+=9;continue}}e+="�"}}return e}))}V.defaultChars=";/?:@&=+$,#",V.componentChars="";const H=V,W={};function q(t,e,r){"string"!=typeof e&&(r=e,e=q.defaultChars),void 0===r&&(r=!0);const n=function(t){let e=W[t];if(e)return e;e=W[t]=[];for(let t=0;t<128;t++){const r=String.fromCharCode(t);/^[0-9a-z]$/i.test(r)?e.push(r):e.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2))}for(let r=0;r=55296&&a<=57343){if(a>=55296&&a<=56319&&e+1=56320&&r<=57343){i+=encodeURIComponent(t[e]+t[e+1]),e++;continue}}i+="%EF%BF%BD"}else i+=encodeURIComponent(t[e])}return i}q.defaultChars=";/?:@&=+$,-_.!~*'()#",q.componentChars="-_.!~*'()";const Y=q;function Z(t){let e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&-1!==t.hostname.indexOf(":")?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",e+=t.search||"",e+=t.hash||"",e}function X(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const $=/^([a-z0-9.+-]+:)/i,J=/:[0-9]*$/,K=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Q=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),tt=["'"].concat(Q),et=["%","/","?",";","#"].concat(tt),rt=["/","?","#"],nt=/^[+a-z0-9A-Z_-]{0,63}$/,it=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ot={javascript:!0,"javascript:":!0},at={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};X.prototype.parse=function(t,e){let r,n,i,o=t;if(o=o.trim(),!e&&1===t.split("#").length){const t=K.exec(o);if(t)return this.pathname=t[1],t[2]&&(this.search=t[2]),this}let a=$.exec(o);if(a&&(a=a[0],r=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(e||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i="//"===o.substr(0,2),!i||a&&ot[a]||(o=o.substr(2),this.slashes=!0)),!ot[a]&&(i||a&&!at[a])){let t,e,r=-1;for(let t=0;t127?n+="x":n+=r[t];if(!n.match(nt)){const n=t.slice(0,e),i=t.slice(e+1),a=r.match(it);a&&(n.push(a[1]),i.unshift(a[2])),i.length&&(o=i.join(".")+o),this.hostname=n.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),a&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=o.indexOf("#");-1!==s&&(this.hash=o.substr(s),o=o.slice(0,s));const l=o.indexOf("?");return-1!==l&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),at[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this},X.prototype.parseHost=function(t){let e=J.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};const st=function(t,e){if(t&&t instanceof X)return t;const r=new X;return r.parse(t,e),r},lt=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,ct=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,dt=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ut=/[\0-\x1F\x7F-\x9F]/,ht=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,ft=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,pt=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((t=>t.charCodeAt(0)))),mt=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((t=>t.charCodeAt(0))));var gt;const vt=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),bt=null!==(gt=String.fromCodePoint)&&void 0!==gt?gt:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t),e};var yt,xt,wt,_t,kt;function At(t){return t>=yt.ZERO&&t<=yt.NINE}!function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"}(yt||(yt={})),function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"}(xt||(xt={})),function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"}(wt||(wt={})),(kt=_t||(_t={}))[kt.Legacy=0]="Legacy",kt[kt.Strict=1]="Strict",kt[kt.Attribute=2]="Attribute";class Tt{constructor(t,e,r){this.decodeTree=t,this.emitCodePoint=e,this.errors=r,this.state=wt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=_t.Strict}startEntity(t){this.decodeMode=t,this.state=wt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,e){switch(this.state){case wt.EntityStart:return t.charCodeAt(e)===yt.NUM?(this.state=wt.NumericStart,this.consumed+=1,this.stateNumericStart(t,e+1)):(this.state=wt.NamedEntity,this.stateNamedEntity(t,e));case wt.NumericStart:return this.stateNumericStart(t,e);case wt.NumericDecimal:return this.stateNumericDecimal(t,e);case wt.NumericHex:return this.stateNumericHex(t,e);case wt.NamedEntity:return this.stateNamedEntity(t,e)}}stateNumericStart(t,e){return e>=t.length?-1:(32|t.charCodeAt(e))===yt.LOWER_X?(this.state=wt.NumericHex,this.consumed+=1,this.stateNumericHex(t,e+1)):(this.state=wt.NumericDecimal,this.stateNumericDecimal(t,e))}addToNumericResult(t,e,r,n){if(e!==r){const i=r-e;this.result=this.result*Math.pow(n,i)+parseInt(t.substr(e,i),n),this.consumed+=i}}stateNumericHex(t,e){const r=e;for(;e=yt.UPPER_A&&n<=yt.UPPER_F||n>=yt.LOWER_A&&n<=yt.LOWER_F)))return this.addToNumericResult(t,r,e,16),this.emitNumericEntity(i,3);e+=1}var n;return this.addToNumericResult(t,r,e,16),-1}stateNumericDecimal(t,e){const r=e;for(;e=55296&&t<=57343||t>1114111?65533:null!==(e=vt.get(t))&&void 0!==e?e:t}(this.result),this.consumed),this.errors&&(t!==yt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,e){const{decodeTree:r}=this;let n=r[this.treeIndex],i=(n&xt.VALUE_LENGTH)>>14;for(;e=yt.UPPER_A&&t<=yt.UPPER_Z||t>=yt.LOWER_A&&t<=yt.LOWER_Z||At(t)}(o)))?0:this.emitNotTerminatedNamedEntity();if(n=r[this.treeIndex],i=(n&xt.VALUE_LENGTH)>>14,0!==i){if(a===yt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==_t.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}var o;return-1}emitNotTerminatedNamedEntity(){var t;const{result:e,decodeTree:r}=this,n=(r[e]&xt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,n,this.consumed),null===(t=this.errors)||void 0===t||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,e,r){const{decodeTree:n}=this;return this.emitCodePoint(1===e?n[t]&~xt.VALUE_LENGTH:n[t+1],r),3===e&&this.emitCodePoint(n[t+2],r),r}end(){var t;switch(this.state){case wt.NamedEntity:return 0===this.result||this.decodeMode===_t.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case wt.NumericDecimal:return this.emitNumericEntity(0,2);case wt.NumericHex:return this.emitNumericEntity(0,3);case wt.NumericStart:return null===(t=this.errors)||void 0===t||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case wt.EntityStart:return 0}}}function Mt(t){let e="";const r=new Tt(t,(t=>e+=bt(t)));return function(t,n){let i=0,o=0;for(;(o=t.indexOf("&",o))>=0;){e+=t.slice(i,o),r.startEntity(n);const a=r.write(t,o+1);if(a<0){i=o+r.end();break}i=o+a,o=0===a?i+1:i}const a=e+t.slice(i);return e="",a}}function St(t,e,r,n){const i=(e&xt.BRANCH_LENGTH)>>7,o=e&xt.JUMP_TABLE;if(0===i)return 0!==o&&n===o?r:-1;if(o){const e=n-o;return e<0||e>=i?-1:t[r+e]-1}let a=r,s=a+i-1;for(;a<=s;){const e=a+s>>>1,r=t[e];if(rn))return t[e+i];s=e-1}}return-1}const Ct=Mt(pt);function Et(t,e=_t.Legacy){return Ct(t,e)}function Lt(t){for(let e=1;e'"]/g,zt),Ot(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),Ot(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),function(t){t[t.XML=0]="XML",t[t.HTML=1]="HTML"}(Dt||(Dt={})),function(t){t[t.UTF8=0]="UTF8",t[t.ASCII=1]="ASCII",t[t.Extensive=2]="Extensive",t[t.Attribute=3]="Attribute",t[t.Text=4]="Text"}(It||(It={}));const Ft=Object.prototype.hasOwnProperty;function Pt(t,e){return Ft.call(t,e)}function jt(t){return Array.prototype.slice.call(arguments,1).forEach((function(e){if(e){if("object"!=typeof e)throw new TypeError(e+"must be object");Object.keys(e).forEach((function(r){t[r]=e[r]}))}})),t}function Nt(t,e,r){return[].concat(t.slice(0,e),r,t.slice(e+1))}function Bt(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||!(65535&~t&&65534!=(65535&t))||t>=0&&t<=8||11===t||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function Ut(t){if(t>65535){const e=55296+((t-=65536)>>10),r=56320+(1023&t);return String.fromCharCode(e,r)}return String.fromCharCode(t)}const Gt=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Vt=new RegExp(Gt.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),Ht=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Wt(t){return t.indexOf("\\")<0?t:t.replace(Gt,"$1")}function qt(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(Vt,(function(t,e,r){return e||function(t,e){if(35===e.charCodeAt(0)&&Ht.test(e)){const r="x"===e[1].toLowerCase()?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return Bt(r)?Ut(r):t}const r=Et(t);return r!==t?r:t}(t,r)}))}const Yt=/[&<>"]/,Zt=/[&<>"]/g,Xt={"&":"&","<":"<",">":">",'"':"""};function $t(t){return Xt[t]}function Jt(t){return Yt.test(t)?t.replace(Zt,$t):t}const Kt=/[.?*+^$[\]\\(){}|-]/g;function Qt(t){return t.replace(Kt,"\\$&")}function te(t){switch(t){case 9:case 32:return!0}return!1}function ee(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function re(t){return lt.test(t)||ct.test(t)}function ne(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function ie(t){return t=t.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}const oe={mdurl:n,ucmicro:i};function ae(t,e,r){let n,i,o,a;const s=t.posMax,l=t.pos;for(t.pos=e+1,n=1;t.pos32))return o;if(41===n){if(0===a)break;a--}i++}return e===i||0!==a||(o.str=qt(t.slice(e,i)),o.pos=i,o.ok=!0),o}function le(t,e,r,n){let i,o=e;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)a.str=n.str,a.marker=n.marker;else{if(o>=r)return a;let n=t.charCodeAt(o);if(34!==n&&39!==n&&40!==n)return a;e++,o++,40===n&&(n=41),a.marker=n}for(;o"+Jt(o.content)+""},ce.code_block=function(t,e,r,n,i){const o=t[e];return""+Jt(t[e].content)+"\n"},ce.fence=function(t,e,r,n,i){const o=t[e],a=o.info?qt(o.info).trim():"";let s,l="",c="";if(a){const t=a.split(/(\s+)/g);l=t[0],c=t.slice(2).join("")}if(s=r.highlight&&r.highlight(o.content,l,c)||Jt(o.content),0===s.indexOf("${s}\n`}return`
${s}
\n`},ce.image=function(t,e,r,n,i){const o=t[e];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,r,n),i.renderToken(t,e,r)},ce.hardbreak=function(t,e,r){return r.xhtmlOut?"
\n":"
\n"},ce.softbreak=function(t,e,r){return r.breaks?r.xhtmlOut?"
\n":"
\n":"\n"},ce.text=function(t,e){return Jt(t[e].content)},ce.html_block=function(t,e){return t[e].content},ce.html_inline=function(t,e){return t[e].content},de.prototype.renderAttrs=function(t){let e,r,n;if(!t.attrs)return"";for(n="",e=0,r=t.attrs.length;e\n":">",i},de.prototype.renderInline=function(t,e,r){let n="";const i=this.rules;for(let o=0,a=t.length;o=0&&(r=this.attrs[e][1]),r},pe.prototype.attrJoin=function(t,e){const r=this.attrIndex(t);r<0?this.attrPush([t,e]):this.attrs[r][1]=this.attrs[r][1]+" "+e};const me=pe;function ge(t,e,r){this.src=t,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=e}ge.prototype.Token=me;const ve=ge,be=/\r\n?|\n/g,ye=/\0/g;function xe(t){return/^<\/a\s*>/i.test(t)}const we=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,_e=/\((c|tm|r)\)/i,ke=/\((c|tm|r)\)/gi,Ae={c:"©",r:"®",tm:"™"};function Te(t,e){return Ae[e.toLowerCase()]}function Me(t){let e=0;for(let r=t.length-1;r>=0;r--){const n=t[r];"text"!==n.type||e||(n.content=n.content.replace(ke,Te)),"link_open"===n.type&&"auto"===n.info&&e--,"link_close"===n.type&&"auto"===n.info&&e++}}function Se(t){let e=0;for(let r=t.length-1;r>=0;r--){const n=t[r];"text"!==n.type||e||we.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===n.type&&"auto"===n.info&&e--,"link_close"===n.type&&"auto"===n.info&&e++}}const Ce=/['"]/,Ee=/['"]/g;function Le(t,e,r){return t.slice(0,e)+r+t.slice(e+1)}function ze(t,e){let r;const n=[];for(let i=0;i=0&&!(n[r].level<=a);r--);if(n.length=r+1,"text"!==o.type)continue;let s=o.content,l=0,c=s.length;t:for(;l=0)p=s.charCodeAt(d.index-1);else for(r=i-1;r>=0&&"softbreak"!==t[r].type&&"hardbreak"!==t[r].type;r--)if(t[r].content){p=t[r].content.charCodeAt(t[r].content.length-1);break}let m=32;if(l=48&&p<=57&&(h=u=!1),u&&h&&(u=g,h=v),u||h){if(h)for(r=n.length-1;r>=0;r--){let u=n[r];if(n[r].level=0;a--){const s=i[a];if("link_close"!==s.type){if("html_inline"===s.type&&(r=s.content,/^\s]/i.test(r)&&o>0&&o--,xe(s.content)&&o++),!(o>0)&&"text"===s.type&&t.md.linkify.test(s.content)){const r=s.content;let o=t.md.linkify.match(r);const l=[];let c=s.level,d=0;o.length>0&&0===o[0].index&&a>0&&"text_special"===i[a-1].type&&(o=o.slice(1));for(let e=0;ed){const e=new t.Token("text","",0);e.content=r.slice(d,s),e.level=c,l.push(e)}const u=new t.Token("link_open","a",1);u.attrs=[["href",i]],u.level=c++,u.markup="linkify",u.info="auto",l.push(u);const h=new t.Token("text","",0);h.content=a,h.level=c,l.push(h);const f=new t.Token("link_close","a",-1);f.level=--c,f.markup="linkify",f.info="auto",l.push(f),d=o[e].lastIndex}if(d=0;e--)"inline"===t.tokens[e].type&&(_e.test(t.tokens[e].content)&&Me(t.tokens[e].children),we.test(t.tokens[e].content)&&Se(t.tokens[e].children))}],["smartquotes",function(t){if(t.md.options.typographer)for(let e=t.tokens.length-1;e>=0;e--)"inline"===t.tokens[e].type&&Ce.test(t.tokens[e].content)&&ze(t.tokens[e].children,t)}],["text_join",function(t){let e,r;const n=t.tokens,i=n.length;for(let t=0;t0&&this.level++,this.tokens.push(n),n},Re.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},Re.prototype.skipEmptyLines=function(t){for(let e=this.lineMax;te;)if(!te(this.src.charCodeAt(--t)))return t+1;return t},Re.prototype.skipChars=function(t,e){for(let r=this.src.length;tr;)if(e!==this.src.charCodeAt(--t))return t+1;return t},Re.prototype.getLines=function(t,e,r,n){if(t>=e)return"";const i=new Array(e-t);for(let o=0,a=t;ar?new Array(t-r+1).join(" ")+this.src.slice(c,l):this.src.slice(c,l)}return i.join("")},Re.prototype.Token=me;const Fe=Re;function Pe(t,e){const r=t.bMarks[e]+t.tShift[e],n=t.eMarks[e];return t.src.slice(r,n)}function je(t){const e=[],r=t.length;let n=0,i=t.charCodeAt(n),o=!1,a=0,s="";for(;n=n)return-1;let o=t.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=n)return-1;if(o=t.src.charCodeAt(i++),!(o>=48&&o<=57)){if(41===o||46===o)break;return-1}if(i-r>=10)return-1}return i`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",Ge="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Ve=new RegExp("^(?:"+Ue+"|"+Ge+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|]*>|)"),He=new RegExp("^(?:"+Ue+"|"+Ge+")"),We=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(He.source+"\\s*$"),/^$/,!1]],qe=[["table",function(t,e,r,n){if(e+2>r)return!1;let i=e+1;if(t.sCount[i]=4)return!1;let o=t.bMarks[i]+t.tShift[i];if(o>=t.eMarks[i])return!1;const a=t.src.charCodeAt(o++);if(124!==a&&45!==a&&58!==a)return!1;if(o>=t.eMarks[i])return!1;const s=t.src.charCodeAt(o++);if(124!==s&&45!==s&&58!==s&&!te(s))return!1;if(45===a&&te(s))return!1;for(;o=4)return!1;c=je(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop();const u=c.length;if(0===u||u!==d.length)return!1;if(n)return!0;const h=t.parentType;t.parentType="table";const f=t.md.block.ruler.getRules("blockquote"),p=[e,0];t.push("table_open","table",1).map=p,t.push("thead_open","thead",1).map=[e,e+1],t.push("tr_open","tr",1).map=[e,e+1];for(let e=0;e=4)break;if(c=je(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop(),g+=u-c.length,g>65536)break;i===e+2&&(t.push("tbody_open","tbody",1).map=m=[e+2,0]),t.push("tr_open","tr",1).map=[i,i+1];for(let e=0;e=4))break;n++,i=n}t.line=i;const o=t.push("code_block","code",0);return o.content=t.getLines(e,i,4+t.blkIndent,!1)+"\n",o.map=[e,t.line],!0}],["fence",function(t,e,r,n){let i=t.bMarks[e]+t.tShift[e],o=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(i+3>o)return!1;const a=t.src.charCodeAt(i);if(126!==a&&96!==a)return!1;let s=i;i=t.skipChars(i,a);let l=i-s;if(l<3)return!1;const c=t.src.slice(s,i),d=t.src.slice(i,o);if(96===a&&d.indexOf(String.fromCharCode(a))>=0)return!1;if(n)return!0;let u=e,h=!1;for(;!(u++,u>=r||(i=s=t.bMarks[u]+t.tShift[u],o=t.eMarks[u],i=4||(i=t.skipChars(i,a),i-s=4)return!1;if(62!==t.src.charCodeAt(i))return!1;if(n)return!0;const s=[],l=[],c=[],d=[],u=t.md.block.ruler.getRules("blockquote"),h=t.parentType;t.parentType="blockquote";let f,p=!1;for(f=e;f=o)break;if(62===t.src.charCodeAt(i++)&&!e){let e,r,n=t.sCount[f]+1;32===t.src.charCodeAt(i)?(i++,n++,r=!1,e=!0):9===t.src.charCodeAt(i)?(e=!0,(t.bsCount[f]+n)%4==3?(i++,n++,r=!1):r=!0):e=!1;let a=n;for(s.push(t.bMarks[f]),t.bMarks[f]=i;i=o,l.push(t.bsCount[f]),t.bsCount[f]=t.sCount[f]+1+(e?1:0),c.push(t.sCount[f]),t.sCount[f]=a-n,d.push(t.tShift[f]),t.tShift[f]=i-t.bMarks[f];continue}if(p)break;let n=!1;for(let e=0,i=u.length;e";const v=[e,0];g.map=v,t.md.block.tokenize(t,e,f),t.push("blockquote_close","blockquote",-1).markup=">",t.lineMax=a,t.parentType=h,v[1]=t.line;for(let r=0;r=4)return!1;let o=t.bMarks[e]+t.tShift[e];const a=t.src.charCodeAt(o++);if(42!==a&&45!==a&&95!==a)return!1;let s=1;for(;o=4)return!1;if(t.listIndent>=0&&t.sCount[l]-t.listIndent>=4&&t.sCount[l]=t.blkIndent&&(f=!0),(h=Be(t,l))>=0){if(d=!0,a=t.bMarks[l]+t.tShift[l],u=Number(t.src.slice(a,h-1)),f&&1!==u)return!1}else{if(!((h=Ne(t,l))>=0))return!1;d=!1}if(f&&t.skipSpaces(h)>=t.eMarks[l])return!1;if(n)return!0;const p=t.src.charCodeAt(h-1),m=t.tokens.length;d?(s=t.push("ordered_list_open","ol",1),1!==u&&(s.attrs=[["start",u]])):s=t.push("bullet_list_open","ul",1);const g=[l,0];s.map=g,s.markup=String.fromCharCode(p);let v=!1;const b=t.md.block.ruler.getRules("list"),y=t.parentType;for(t.parentType="list";l=i?1:n-e,f>4&&(f=1);const m=e+f;s=t.push("list_item_open","li",1),s.markup=String.fromCharCode(p);const g=[l,0];s.map=g,d&&(s.info=t.src.slice(a,h-1));const y=t.tight,x=t.tShift[l],w=t.sCount[l],_=t.listIndent;if(t.listIndent=t.blkIndent,t.blkIndent=m,t.tight=!0,t.tShift[l]=u-t.bMarks[l],t.sCount[l]=n,u>=i&&t.isEmpty(l+1)?t.line=Math.min(t.line+2,r):t.md.block.tokenize(t,l,r,!0),t.tight&&!v||(c=!1),v=t.line-l>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=_,t.tShift[l]=x,t.sCount[l]=w,t.tight=y,s=t.push("list_item_close","li",-1),s.markup=String.fromCharCode(p),l=t.line,g[1]=l,l>=r)break;if(t.sCount[l]=4)break;let k=!1;for(let e=0,n=b.length;e=4)return!1;if(91!==t.src.charCodeAt(i))return!1;function s(e){const r=t.lineMax;if(e>=r||t.isEmpty(e))return null;let n=!1;if(t.sCount[e]-t.blkIndent>3&&(n=!0),t.sCount[e]<0&&(n=!0),!n){const n=t.md.block.ruler.getRules("reference"),i=t.parentType;t.parentType="reference";let o=!1;for(let i=0,a=n.length;i=4)return!1;if(!t.md.options.html)return!1;if(60!==t.src.charCodeAt(i))return!1;let a=t.src.slice(i,o),s=0;for(;s=4)return!1;let a=t.src.charCodeAt(i);if(35!==a||i>=o)return!1;let s=1;for(a=t.src.charCodeAt(++i);35===a&&i6||ii&&te(t.src.charCodeAt(l-1))&&(o=l),t.line=e+1;const c=t.push("heading_open","h"+String(s),1);c.markup="########".slice(0,s),c.map=[e,t.line];const d=t.push("inline","",0);return d.content=t.src.slice(i,o).trim(),d.map=[e,t.line],d.children=[],t.push("heading_close","h"+String(s),-1).markup="########".slice(0,s),!0},["paragraph","reference","blockquote"]],["lheading",function(t,e,r){const n=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;const i=t.parentType;t.parentType="paragraph";let o,a=0,s=e+1;for(;s3)continue;if(t.sCount[s]>=t.blkIndent){let e=t.bMarks[s]+t.tShift[s];const r=t.eMarks[s];if(e=r))){a=61===o?1:2;break}}if(t.sCount[s]<0)continue;let e=!1;for(let i=0,o=n.length;i3)continue;if(t.sCount[o]<0)continue;let e=!1;for(let i=0,a=n.length;i=r))&&!(t.sCount[a]=o){t.line=r;break}const e=t.line;let l=!1;for(let o=0;o=t.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");t.tight=!s,t.isEmpty(t.line-1)&&(s=!0),a=t.line,a0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(i),n},Xe.prototype.scanDelims=function(t,e){const r=this.posMax,n=this.src.charCodeAt(t),i=t>0?this.src.charCodeAt(t-1):32;let o=t;for(;o?@[]^_`{|}~-".split("").forEach((function(t){Qe[t.charCodeAt(0)]=1}));const er={tokenize:function(t,e){const r=t.pos,n=t.src.charCodeAt(r);if(e)return!1;if(126!==n)return!1;const i=t.scanDelims(t.pos,!0);let o=i.length;const a=String.fromCharCode(n);if(o<2)return!1;let s;o%2&&(s=t.push("text","",0),s.content=a,o--);for(let e=0;e=0;r--){const n=e[r];if(95!==n.marker&&42!==n.marker)continue;if(-1===n.end)continue;const i=e[n.end],o=r>0&&e[r-1].end===n.end+1&&e[r-1].marker===n.marker&&e[r-1].token===n.token-1&&e[n.end+1].token===i.token+1,a=String.fromCharCode(n.marker),s=t.tokens[n.token];s.type=o?"strong_open":"em_open",s.tag=o?"strong":"em",s.nesting=1,s.markup=o?a+a:a,s.content="";const l=t.tokens[i.token];l.type=o?"strong_close":"em_close",l.tag=o?"strong":"em",l.nesting=-1,l.markup=o?a+a:a,l.content="",o&&(t.tokens[e[r-1].token].content="",t.tokens[e[n.end+1].token].content="",r--)}}const nr={tokenize:function(t,e){const r=t.pos,n=t.src.charCodeAt(r);if(e)return!1;if(95!==n&&42!==n)return!1;const i=t.scanDelims(t.pos,42===n);for(let e=0;e\x00-\x20]*)$/,ar=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,sr=/^&([a-z][a-z0-9]{1,31});/i;function lr(t){const e={},r=t.length;if(!r)return;let n=0,i=-2;const o=[];for(let a=0;as;l-=o[l]+1){const e=t[l];if(e.marker===r.marker&&e.open&&e.end<0){let n=!1;if((e.close||r.open)&&(e.length+r.length)%3==0&&(e.length%3==0&&r.length%3==0||(n=!0)),!n){const n=l>0&&!t[l-1].open?o[l-1]+1:0;o[a]=a-l+n,o[l]=n,r.open=!1,e.end=a,e.close=!1,c=-1,i=-2;break}}}-1!==c&&(e[r.marker][(r.open?3:0)+(r.length||0)%3]=c)}}const cr=[["text",function(t,e){let r=t.pos;for(;r0)return!1;const r=t.pos;if(r+3>t.posMax)return!1;if(58!==t.src.charCodeAt(r))return!1;if(47!==t.src.charCodeAt(r+1))return!1;if(47!==t.src.charCodeAt(r+2))return!1;const n=t.pending.match(Ke);if(!n)return!1;const i=n[1],o=t.md.linkify.matchAtStart(t.src.slice(r-i.length));if(!o)return!1;let a=o.url;if(a.length<=i.length)return!1;a=a.replace(/\*+$/,"");const s=t.md.normalizeLink(a);if(!t.md.validateLink(s))return!1;if(!e){t.pending=t.pending.slice(0,-i.length);const e=t.push("link_open","a",1);e.attrs=[["href",s]],e.markup="linkify",e.info="auto",t.push("text","",0).content=t.md.normalizeLinkText(a);const r=t.push("link_close","a",-1);r.markup="linkify",r.info="auto"}return t.pos+=a.length-i.length,!0}],["newline",function(t,e){let r=t.pos;if(10!==t.src.charCodeAt(r))return!1;const n=t.pending.length-1,i=t.posMax;if(!e)if(n>=0&&32===t.pending.charCodeAt(n))if(n>=1&&32===t.pending.charCodeAt(n-1)){let e=n-1;for(;e>=1&&32===t.pending.charCodeAt(e-1);)e--;t.pending=t.pending.slice(0,e),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(r++;r=n)return!1;let i=t.src.charCodeAt(r);if(10===i){for(e||t.push("hardbreak","br",0),r++;r=55296&&i<=56319&&r+1=56320&&e<=57343&&(o+=t.src[r+1],r++)}const a="\\"+o;if(!e){const e=t.push("text_special","",0);i<256&&0!==Qe[i]?e.content=o:e.content=a,e.markup=a,e.info="escape"}return t.pos=r+1,!0}],["backticks",function(t,e){let r=t.pos;if(96!==t.src.charCodeAt(r))return!1;const n=r;r++;const i=t.posMax;for(;r=u)return!1;if(l=p,i=t.md.helpers.parseLinkDestination(t.src,p,t.posMax),i.ok){for(a=t.md.normalizeLink(i.str),t.md.validateLink(a)?p=i.pos:a="",l=p;p=u||41!==t.src.charCodeAt(p))&&(c=!0),p++}if(c){if(void 0===t.env.references)return!1;if(p=0?n=t.src.slice(l,p++):p=f+1):p=f+1,n||(n=t.src.slice(h,f)),o=t.env.references[ie(n)],!o)return t.pos=d,!1;a=o.href,s=o.title}if(!e){t.pos=h,t.posMax=f;const e=[["href",a]];t.push("link_open","a",1).attrs=e,s&&e.push(["title",s]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)}return t.pos=p,t.posMax=u,!0}],["image",function(t,e){let r,n,i,o,a,s,l,c,d="";const u=t.pos,h=t.posMax;if(33!==t.src.charCodeAt(t.pos))return!1;if(91!==t.src.charCodeAt(t.pos+1))return!1;const f=t.pos+2,p=t.md.helpers.parseLinkLabel(t,t.pos+1,!1);if(p<0)return!1;if(o=p+1,o=h)return!1;for(c=o,s=t.md.helpers.parseLinkDestination(t.src,o,t.posMax),s.ok&&(d=t.md.normalizeLink(s.str),t.md.validateLink(d)?o=s.pos:d=""),c=o;o=h||41!==t.src.charCodeAt(o))return t.pos=u,!1;o++}else{if(void 0===t.env.references)return!1;if(o=0?i=t.src.slice(c,o++):o=p+1):o=p+1,i||(i=t.src.slice(f,p)),a=t.env.references[ie(i)],!a)return t.pos=u,!1;d=a.href,l=a.title}if(!e){n=t.src.slice(f,p);const e=[];t.md.inline.parse(n,t.md,t.env,e);const r=t.push("image","img",0),i=[["src",d],["alt",""]];r.attrs=i,r.children=e,r.content=n,l&&i.push(["title",l])}return t.pos=o,t.posMax=h,!0}],["autolink",function(t,e){let r=t.pos;if(60!==t.src.charCodeAt(r))return!1;const n=t.pos,i=t.posMax;for(;;){if(++r>=i)return!1;const e=t.src.charCodeAt(r);if(60===e)return!1;if(62===e)break}const o=t.src.slice(n+1,r);if(or.test(o)){const r=t.md.normalizeLink(o);if(!t.md.validateLink(r))return!1;if(!e){const e=t.push("link_open","a",1);e.attrs=[["href",r]],e.markup="autolink",e.info="auto",t.push("text","",0).content=t.md.normalizeLinkText(o);const n=t.push("link_close","a",-1);n.markup="autolink",n.info="auto"}return t.pos+=o.length+2,!0}if(ir.test(o)){const r=t.md.normalizeLink("mailto:"+o);if(!t.md.validateLink(r))return!1;if(!e){const e=t.push("link_open","a",1);e.attrs=[["href",r]],e.markup="autolink",e.info="auto",t.push("text","",0).content=t.md.normalizeLinkText(o);const n=t.push("link_close","a",-1);n.markup="autolink",n.info="auto"}return t.pos+=o.length+2,!0}return!1}],["html_inline",function(t,e){if(!t.md.options.html)return!1;const r=t.posMax,n=t.pos;if(60!==t.src.charCodeAt(n)||n+2>=r)return!1;const i=t.src.charCodeAt(n+1);if(33!==i&&63!==i&&47!==i&&!function(t){const e=32|t;return e>=97&&e<=122}(i))return!1;const o=t.src.slice(n).match(Ve);if(!o)return!1;if(!e){const e=t.push("html_inline","",0);e.content=o[0],a=e.content,/^\s]/i.test(a)&&t.linkLevel++,function(t){return/^<\/a\s*>/i.test(t)}(e.content)&&t.linkLevel--}var a;return t.pos+=o[0].length,!0}],["entity",function(t,e){const r=t.pos,n=t.posMax;if(38!==t.src.charCodeAt(r))return!1;if(r+1>=n)return!1;if(35===t.src.charCodeAt(r+1)){const n=t.src.slice(r).match(ar);if(n){if(!e){const e="x"===n[1][0].toLowerCase()?parseInt(n[1].slice(1),16):parseInt(n[1],10),r=t.push("text_special","",0);r.content=Bt(e)?Ut(e):Ut(65533),r.markup=n[0],r.info="entity"}return t.pos+=n[0].length,!0}}else{const n=t.src.slice(r).match(sr);if(n){const r=Et(n[0]);if(r!==n[0]){if(!e){const e=t.push("text_special","",0);e.content=r,e.markup=n[0],e.info="entity"}return t.pos+=n[0].length,!0}}}return!1}]],dr=[["balance_pairs",function(t){const e=t.tokens_meta,r=t.tokens_meta.length;lr(t.delimiters);for(let t=0;t0&&n++,"text"===i[e].type&&e+1=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;a||t.pos++,o[e]=t.pos},ur.prototype.tokenize=function(t){const e=this.ruler.getRules(""),r=e.length,n=t.posMax,i=t.md.options.maxNesting;for(;t.pos=t.pos)throw new Error("inline rule didn't increment state.pos");break}if(a){if(t.pos>=n)break}else t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()},ur.prototype.parse=function(t,e,r,n){const i=new this.State(t,e,r,n);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let t=0;t=3&&":"===t[e-3]||e>=3&&"/"===t[e-3]?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,r){const n=t.slice(e);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},yr="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",xr="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function wr(t){const e=t.re=function(t){const e={};t=t||{},e.src_Any=dt.source,e.src_Cc=ut.source,e.src_Z=ft.source,e.src_P=lt.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");return e.src_pseudo_letter="(?:(?![><|]|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|[><|]|"+e.src_ZPCc+")(?!"+(t["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy='(^|[><|]|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}(t.__opts__),r=t.__tlds__.slice();function n(t){return t.replace("%TLDS%",e.src_tlds)}t.onCompile(),t.__tlds_replaced__||r.push(yr),r.push(e.src_xn),e.src_tlds=r.join("|"),e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");const i=[];function o(t,e){throw new Error('(LinkifyIt) Invalid schema "'+t+'": '+e)}t.__compiled__={},Object.keys(t.__schemas__).forEach((function(e){const r=t.__schemas__[e];if(null===r)return;const n={validate:null,link:null};if(t.__compiled__[e]=n,"[object Object]"===pr(r))return"[object RegExp]"!==pr(r.validate)?mr(r.validate)?n.validate=r.validate:o(e,r):n.validate=function(t){return function(e,r){const n=e.slice(r);return t.test(n)?n.match(t)[0].length:0}}(r.validate),void(mr(r.normalize)?n.normalize=r.normalize:r.normalize?o(e,r):n.normalize=function(t,e){e.normalize(t)});!function(t){return"[object String]"===pr(t)}(r)?o(e,r):i.push(e)})),i.forEach((function(e){t.__compiled__[t.__schemas__[e]]&&(t.__compiled__[e].validate=t.__compiled__[t.__schemas__[e]].validate,t.__compiled__[e].normalize=t.__compiled__[t.__schemas__[e]].normalize)})),t.__compiled__[""]={validate:null,normalize:function(t,e){e.normalize(t)}};const a=Object.keys(t.__compiled__).filter((function(e){return e.length>0&&t.__compiled__[e]})).map(gr).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+a+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+a+")","ig"),t.re.schema_at_start=RegExp("^"+t.re.schema_search.source,"i"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),function(t){t.__index__=-1,t.__text_cache__=""}(t)}function _r(t,e){const r=t.__index__,n=t.__last_index__,i=t.__text_cache__.slice(r,n);this.schema=t.__schema__.toLowerCase(),this.index=r+e,this.lastIndex=n+e,this.raw=i,this.text=i,this.url=i}function kr(t,e){const r=new _r(t,e);return t.__compiled__[r.schema].normalize(r,t),r}function Ar(t,e){if(!(this instanceof Ar))return new Ar(t,e);var r;e||(r=t,Object.keys(r||{}).reduce((function(t,e){return t||vr.hasOwnProperty(e)}),!1)&&(e=t,t={})),this.__opts__=fr({},vr,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=fr({},br,t),this.__compiled__={},this.__tlds__=xr,this.__tlds_replaced__=!1,this.re={},wr(this)}Ar.prototype.add=function(t,e){return this.__schemas__[t]=e,wr(this),this},Ar.prototype.set=function(t){return this.__opts__=fr(this.__opts__,t),this},Ar.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let e,r,n,i,o,a,s,l,c;if(this.re.schema_test.test(t))for(s=this.re.schema_search,s.lastIndex=0;null!==(e=s.exec(t));)if(i=this.testSchemaAt(t,e[2],s.lastIndex),i){this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&null!==(n=t.match(this.re.email_fuzzy))&&(o=n.index+n[1].length,a=n.index+n[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a))),this.__index__>=0},Ar.prototype.pretest=function(t){return this.re.pretest.test(t)},Ar.prototype.testSchemaAt=function(t,e,r){return this.__compiled__[e.toLowerCase()]?this.__compiled__[e.toLowerCase()].validate(t,r,this):0},Ar.prototype.match=function(t){const e=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(e.push(kr(this,r)),r=this.__last_index__);let n=r?t.slice(r):t;for(;this.test(n);)e.push(kr(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return e.length?e:null},Ar.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const e=this.re.schema_at_start.exec(t);if(!e)return null;const r=this.testSchemaAt(t,e[2],e[0].length);return r?(this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+r,kr(this,0)):null},Ar.prototype.tlds=function(t,e){return t=Array.isArray(t)?t:[t],e?(this.__tlds__=this.__tlds__.concat(t).sort().filter((function(t,e,r){return t!==r[e-1]})).reverse(),wr(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,wr(this),this)},Ar.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),"mailto:"!==t.schema||/^mailto:/i.test(t.url)||(t.url="mailto:"+t.url)},Ar.prototype.onCompile=function(){};const Tr=Ar,Mr=2147483647,Sr=36,Cr=/^xn--/,Er=/[^\0-\x7F]/,Lr=/[\x2E\u3002\uFF0E\uFF61]/g,zr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Or=Math.floor,Dr=String.fromCharCode;function Ir(t){throw new RangeError(zr[t])}function Rr(t,e){const r=t.split("@");let n="";r.length>1&&(n=r[0]+"@",t=r[1]);const i=function(t,e){const r=[];let n=t.length;for(;n--;)r[n]=e(t[n]);return r}((t=t.replace(Lr,".")).split("."),e).join(".");return n+i}function Fr(t){const e=[];let r=0;const n=t.length;for(;r=55296&&i<=56319&&r>1,t+=Or(t/e);t>455;n+=Sr)t=Or(t/35);return Or(n+36*t/(t+38))},Nr=function(t){const e=[],r=t.length;let n=0,i=128,o=72,a=t.lastIndexOf("-");a<0&&(a=0);for(let r=0;r=128&&Ir("not-basic"),e.push(t.charCodeAt(r));for(let l=a>0?a+1:0;l=r&&Ir("invalid-input");const a=(s=t.charCodeAt(l++))>=48&&s<58?s-48+26:s>=65&&s<91?s-65:s>=97&&s<123?s-97:Sr;a>=Sr&&Ir("invalid-input"),a>Or((Mr-n)/e)&&Ir("overflow"),n+=a*e;const c=i<=o?1:i>=o+26?26:i-o;if(aOr(Mr/d)&&Ir("overflow"),e*=d}const c=e.length+1;o=jr(n-a,c,0==a),Or(n/c)>Mr-i&&Ir("overflow"),i+=Or(n/c),n%=c,e.splice(n++,0,i)}var s;return String.fromCodePoint(...e)},Br=function(t){const e=[],r=(t=Fr(t)).length;let n=128,i=0,o=72;for(const r of t)r<128&&e.push(Dr(r));const a=e.length;let s=a;for(a&&e.push("-");s=n&&eOr((Mr-i)/l)&&Ir("overflow"),i+=(r-n)*l,n=r;for(const r of t)if(rMr&&Ir("overflow"),r===n){let t=i;for(let r=Sr;;r+=Sr){const n=r<=o?1:r>=o+26?26:r-o;if(tString.fromCodePoint(...t)},decode:Nr,encode:Br,toASCII:function(t){return Rr(t,(function(t){return Er.test(t)?"xn--"+Br(t):t}))},toUnicode:function(t){return Rr(t,(function(t){return Cr.test(t)?Nr(t.slice(4).toLowerCase()):t}))}},Gr={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},Vr=/^(vbscript|javascript|file|data):/,Hr=/^data:image\/(gif|png|jpeg|webp);/;function Wr(t){const e=t.trim().toLowerCase();return!Vr.test(e)||Hr.test(e)}const qr=["http:","https:","mailto:"];function Yr(t){const e=st(t,!0);if(e.hostname&&(!e.protocol||qr.indexOf(e.protocol)>=0))try{e.hostname=Ur.toASCII(e.hostname)}catch(t){}return Y(Z(e))}function Zr(t){const e=st(t,!0);if(e.hostname&&(!e.protocol||qr.indexOf(e.protocol)>=0))try{e.hostname=Ur.toUnicode(e.hostname)}catch(t){}return H(Z(e),H.defaultChars+"%")}function Xr(t,e){if(!(this instanceof Xr))return new Xr(t,e);e||Rt(t)||(e=t||{},t="default"),this.inline=new hr,this.block=new Ze,this.core=new Ie,this.renderer=new ue,this.linkify=new Tr,this.validateLink=Wr,this.normalizeLink=Yr,this.normalizeLinkText=Zr,this.utils=o,this.helpers=jt({},a),this.options={},this.configure(t),e&&this.set(e)}Xr.prototype.set=function(t){return jt(this.options,t),this},Xr.prototype.configure=function(t){const e=this;if(Rt(t)){const e=t;if(!(t=Gr[e]))throw new Error('Wrong `markdown-it` preset "'+e+'", check name')}if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach((function(r){t.components[r].rules&&e[r].ruler.enableOnly(t.components[r].rules),t.components[r].rules2&&e[r].ruler2.enableOnly(t.components[r].rules2)})),this},Xr.prototype.enable=function(t,e){let r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){r=r.concat(this[e].ruler.enable(t,!0))}),this),r=r.concat(this.inline.ruler2.enable(t,!0));const n=t.filter((function(t){return r.indexOf(t)<0}));if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},Xr.prototype.disable=function(t,e){let r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){r=r.concat(this[e].ruler.disable(t,!0))}),this),r=r.concat(this.inline.ruler2.disable(t,!0));const n=t.filter((function(t){return r.indexOf(t)<0}));if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},Xr.prototype.use=function(t){const e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},Xr.prototype.parse=function(t,e){if("string"!=typeof t)throw new Error("Input data should be a String");const r=new this.core.State(t,this,e);return this.core.process(r),r.tokens},Xr.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},Xr.prototype.parseInline=function(t,e){const r=new this.core.State(t,this,e);return r.inlineMode=!0,this.core.process(r),r.tokens},Xr.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};const $r=Xr;class Jr{constructor(t,e){e.name=e.name.replace(//g,">");const r=(0,d.V6)(t),n=document.createElement("div");n.style.setProperty("height","100%"),r.appendChild(n),this._shadow=n.attachShadow({mode:"open"}),this._shadow.adoptedStyleSheets=[x.A,w.A],this._name=document.createElement("div"),this._shadow.appendChild(this._name),this._name.innerHTML=`
\n ${e.name} \n
${y}
\n
`;const i=document.createElement("template");i.innerHTML=function(t){const e=$r({html:!1,linkify:!0,typographer:!0});let r="No description for this dataset.";void 0!==t.description&&(r=t.description);let n="No authors for this dataset.";if(void 0!==t.authors){n='
    ';for(const r of t.authors)n+=`
  • ${e.render(r).slice(3,-5)}
  • `;n+="
"}let i="No references for this dataset.";if(void 0!==t.references){i="
    ";for(const r of t.references)i+=`
  • ${e.render(r)}
  • `;i+="
"}return``}(e);const o=i.content.firstChild;this._modal=new E.A(o),this._modal.shadow.adoptedStyleSheets=[x.A,w.A],this._name.onclick=()=>this._modal.open(),o.addEventListener("keydown",(t=>{t.stopPropagation()}))}remove(){this._modal.remove(),this._shadow.host.remove()}}var Kr=r(14761);function Qr(t,e){return"sphere"===t?Kr.iy.validateParameters(e):"ellipsoid"===t?Kr.C1.validateParameters(e):"arrow"===t?Kr.i3.validateParameters(e):"cylinder"===t?Kr.T.validateParameters(e):"custom"===t?Kr.Nh.validateParameters(e):""}function tn(t){if("object"!=typeof t||null===t)throw Error("the structure must be a JavaScript object");if(!("size"in t)||"number"!=typeof t.size||!en(t.size))return'missing "size"';for(const e of["names","x","y","z"]){if(!(e in t))return`missing "${e}"`;const r=t[e];if(!Array.isArray(r))return`"${e}" must be an array`;if(t.size>0&&r.length!==t.size)return`wrong size for "${e}", expected ${t.size}, got ${r.length}`}return!("cell"in t)||Array.isArray(t.cell)&&9===t.cell.length?"":'"cell" must be an array of size 9'}function en(t){return Number.isInteger(t)&&t>=0}function rn(t){let e=!0;for(const r of t)e=Array.isArray(r)&&e;return e}function nn(t){const e=t[0];let r=!0;for(const n of t)r=n.length===e.length&&r;return r}function on(t){if(Array.isArray(t)){let e=!0;for(const r of t)e="string"==typeof r&&e;return e}return!1}var an=r(79352),sn=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function s(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}l((n=n.apply(t,e||[])).next())}))};class ln{constructor(t,e,r,n,i,o,a=9){if(this._target=n,this._structures=r,void 0===i)this._properties={};else{const t=_(i,(t=>Object.values(t.values).every((t=>"number"==typeof t)))),e=_(t,(t=>"atom"===t.target));this._properties=Object.fromEntries(Object.entries(e).map((([t,e])=>[t,e.values])))}if(this._resolvedStructures=new Array(r.length),this._indexer=e,this._calculatedEnvironments=function(t,e){if(void 0===e)return;const r=Array.from({length:t.length}).map(((e,r)=>Array.from({length:t[r].size})));for(let t=0;t{if(""!==tn(e))throw Error(`got custom data for this structure, but no custom loadStructure callback\nthe object was ${JSON.stringify(e)}`);return e},this._cellsData=new Map,this.onselect=()=>{},this.onremove=()=>{},this.oncreate=()=>{},this.activeChanged=()=>{},this.delayChanged=()=>{},this._onSettingChangeCallbacks=[],a>9)throw Error("chemiscope only supports up to 9 structure viewers in the grid");this._maxViewers=a;const s=(0,d.V6)(t),l=document.createElement("div");l.style.setProperty("height","100%"),s.appendChild(l),this._shadow=l.attachShadow({mode:"open"}),this._shadow.adoptedStyleSheets=[x.A,w.A],this._root=document.createElement("div"),this._root.id="grid-root",this._root.className="chsp-structure-viewer-grid",this._shadow.appendChild(this._root),this._setupGrid(1),this._active=(0,d.o)(this._cellsData),this.setActive(this._active)}_getById(t){return(0,d.VT)(t,this._shadow)}get active(){return this._active}pinned(){const t=[];for(const e of this._cellsData.values())t.push(e.current);return t}show(t){this._showInViewer(this.active,t).catch((t=>{throw t}))}addViewer(){const t=this._setupGrid(this._cellsData.size+1);if(0===t.length)return{guid:void 0,color:""};l()(1===t.length,"newGUIDs.length === 1");const e=t[0],r=this._cellsData.get(e);l()(void 0!==r,"newData !== undefined");for(const t of this._onSettingChangeCallbacks)r.viewer.onSettingChange(((r,n)=>{let i=0;for(const t of this._cellsData.keys()){if(e===t)break;i+=1}r.unshift(i.toString()),t(r,n)}));return{guid:e,color:r.color}}removeViewer(t){l()(this._cellsData.size>1,"this._cellsData.size > 1"),this._active===t&&this.setActive((0,d.o)(this._cellsData,t));const e=this._cellsData.get(t);l()(void 0!==e,"data !== undefined"),e.viewer.remove(),this._getById(`gi-${t}`).remove(),this._cellsData.delete(t)}remove(){for(const t of this._cellsData.values())t.viewer.remove();this._shadow.host.remove()}setActive(t){const e=(t,e)=>{const r=this._getById(`chsp-activate-${t}`);r.classList.toggle("chsp-active-pin",e),l()(null!==r.parentElement,"button.parentElement !== null");const n=r.parentElement.querySelector(".chsp-tooltip");l()(null!==n,"tooltip !== null"),n.innerHTML=e?"Active viewer":"Choose as active",this._getById(`gi-${t}`).classList.toggle("chsp-structure-viewer-cell-active",e)},r=this._cellsData.get(this._active);l()(void 0!==r,"current !== undefined"),e(this._active,!1),this._active=t;const n=this._cellsData.get(this._active);l()(void 0!==n,"newData !== undefined"),n.viewer._options.playbackDelay.onchange.push((t=>{this.delayChanged(t)})),this.delayChanged(n.viewer._options.playbackDelay.value),e(this._active,!0)}set positionSettingsModal(t){this._positionSettingsModal=t;for(const e of this._cellsData.values())e.viewer.positionSettingsModal=t}applySettings(t){if(0!==t.length){l()(t.length===this._cellsData.size,"settings.length === this._cellsData.size");for(const[e,r]of(0,d.HL)(this._cellsData.values()))r.viewer.applySettings(t[e])}}saveSettings(){const t=[];for(const e of this._cellsData.values())t.push(e.viewer.saveSettings());return t}onSettingChange(t){for(const e of this._cellsData.keys()){const r=this._cellsData.get(e);l()(void 0!==r,"data !== undefined"),r.viewer.onSettingChange(((r,n)=>{(r=JSON.parse(JSON.stringify(r))).unshift(this._getCurrentPositionInGrid(e).toString()),t(r,n)}))}this._onSettingChangeCallbacks.push(t)}switchTarget(t){return sn(this,void 0,void 0,(function*(){this._target=t,this._updateEnvironments("atom"===this._target);const e=Array.from(this._cellsData.entries()).map((([t,e])=>this._refreshCell(t,e,"atom"===this._target)));yield Promise.all(e)}))}_updateEnvironments(t){if(this._environments=t?this._calculatedEnvironments:void 0,t){l()(void 0!==this._environments,"this._environments !== undefined");for(const t of this._cellsData.values())t.viewer.environments=this._environments[t.current.structure]}}_refreshCell(t,e,r){return sn(this,void 0,void 0,(function*(){e.current.atom=r?this._indexer.fromEnvironment(e.current.environment,this._target).atom:void 0,this._cellsData.set(t,e);const n=this._properties?Object.keys(this._properties):[];e.viewer.refreshOptions(r,n),yield this._loadViewer(e.viewer,e.current.structure,e.current.atom)}))}_duplicate(t){return sn(this,void 0,void 0,(function*(){const e=this._cellsData.get(t);l()(void 0!==e,"data !== undefined");const r=this.addViewer().guid;if(void 0===r)return;const n=this._cellsData.get(r);return l()(void 0!==n,"newData !== undefined"),yield this._showInViewer(r,e.current),n.viewer.applySettings(e.viewer.saveSettings()),this.setActive(r),n}))}_structure(t){if(void 0===this._resolvedStructures[t]){const e=this.loadStructure(t,this._structures[t]),r=tn(e);if(""!==r)throw Error(`got invalid object as structure: ${r}\n the object was ${JSON.stringify(e)}`);this._resolvedStructures[t]=e}return this._resolvedStructures[t]}_propertiesForStructure(t){const e={};if(void 0!==this._environments){const r=this._environments[t];for(const t in this._properties){const n=this._properties[t];e[t]=[];for(const i of r)void 0!==i?e[t].push(n[i.index]):e[t].push(void 0)}return e}}_showInViewer(t,e){return sn(this,void 0,void 0,(function*(){const r=this._cellsData.get(t);l()(void 0!==r,"data !== undefined");const n=r.viewer;r.current.structure!==e.structure&&(yield this._loadViewer(n,e.structure,e.atom),r.current=e),n.highlight("atom"===this._target?e.atom:void 0),r.current=e}))}_loadViewer(t,e,r){return new Promise((n=>{const i={trajectory:!0};void 0!==this._environments&&(i.environments=this._environments[e],"atom"===this._target&&(i.highlight=r)),t.load(this._structure(e),this._propertiesForStructure(e),i,(()=>{n()}))}))}_getNextColor(){const t=[];for(const e of this._cellsData.values())t.push(e.color);return(0,d.Lz)(t)}_setupCell(t,e,r){const n=`gi-${t}`;let i=this._root.querySelector(`#${n}`),o="";if(null===i){i=document.createElement("div"),i.id=n,i.classList.add("chsp-structure-viewer-cell","grid-item"),i.style.gridColumn=`${e}`,i.style.gridRow=`${r}`,o=this._getNextColor();const a=document.createElement("template");a.innerHTML=`\n
\n WILL BE FILLED LATER\n `;const s=a.content.firstChild;s.onclick=()=>{this.setActive(t);const e=this._cellsData.get(this._active);l()(void 0!==e,"data !== undefined"),this.activeChanged(t,e.current)},i.appendChild(s),a.innerHTML='\n \n\n Remove viewer\n ';const c=a.content.firstChild;c.onclick=()=>{1!==this._cellsData.size?(this.onremove(t),this.removeViewer(t),this._setupGrid(this._cellsData.size)):(0,d.R4)("can not remove the last viewer from the grid")},i.appendChild(c),a.innerHTML='\n \n\n Duplicate viewer\n ';const u=a.content.firstChild;u.onclick=()=>sn(this,void 0,void 0,(function*(){const e=yield this._duplicate(t);void 0!==e&&this.oncreate(this.active,e.color,e.current)})),i.appendChild(u),a.innerHTML=`\n ${P}\n Download PNG\n `;const h=a.content.firstChild;return h.onclick=()=>{const e=this._cellsData.get(t);l()(void 0!==e,"data !== undefined");const r=e.viewer,n=e.current.structure;if(void 0!==e.current.atom){const t=e.current.atom;cn(r.exportPNG(),`chemiscope-structure-${n+1}-atom-${t+1}.png`)}else cn(r.exportPNG(),`chemiscope-structure-${n+1}.png`)},i.appendChild(h),this._root.appendChild(i),o}return i.style.gridColumn=`${e}`,i.style.gridRow=`${r}`,""}_setupGrid(t){const e=[];if(t<1)return(0,d.R4)("Cannot delete last molecular viewer."),e;if(t>this._maxViewers)return(0,d.R4)(`Viewer grid cannot contain more than ${this._maxViewers} viewers.`),e;const r=this.bestGridArrangement(t);if(this._cellsData.size>t){(0,d.R4)(`Eliminating last ${this._cellsData.size-t} viewers.`);let e=0;for(const r of this._cellsData.keys())e>=t&&this.removeViewer(r),e+=1}let n=1,i=1;const o=this._cellsData.keys();for(let a=0;a=this._cellsData.size?(0,d.Nl)():o.next().value;let s=this._setupCell(t,i,n);if(""===s&&(s=this._getNextColor()),i++,i>r.columns&&(n++,i=1),!this._cellsData.has(t)){const r=this._properties?Object.keys(this._properties):[],n=new an.MoleculeViewer(this._getById(`gi-${t}`),r);n.onselect=e=>{if("atom"!==this._target||this._active!==t)return;const r=this._cellsData.get(this._active);l()(void 0!==r,"data !== undefined");const i=n.natoms();l()(void 0!==i,"natoms !== undefined");const o=this._indexer.fromStructureAtom(this._target,r.current.structure,e%i);void 0!==o&&(n.highlight(e),this.onselect(o))};const i={atom:void 0,structure:-1,environment:-1};this._cellsData.set(t,{color:s,current:i,viewer:n}),void 0!==this._positionSettingsModal&&(n.positionSettingsModal=this._positionSettingsModal),e.push(t)}}for(const t of this._cellsData.values())t.viewer.resize();return e}bestGridArrangement(t){switch(t){case 1:case 2:return{rows:t,columns:1};case 3:case 4:return{rows:2,columns:2};case 5:case 6:return{rows:3,columns:2};case 8:case 7:case 9:return{rows:3,columns:3};default:throw Error("reached unreachable code: too many viewer in the grid")}}_getCurrentPositionInGrid(t){let e=0;for(const r of this._cellsData.keys()){if(t===r)break;e+=1}return e}}function cn(t,e){const r=document.createElement("a");r.download=e,r.href=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),r.remove()}r(59838);class dn{constructor(t,e){this._containerElement=(0,d.V6)(t);const r=document.createElement("div");this._containerElement.appendChild(r),this._shadow=r.attachShadow({mode:"open"}),this._shadow.adoptedStyleSheets=[x.A,w.A],this._toggleContainer=this._createToggleElement("atom"===e),this._shadow.appendChild(this._toggleContainer),this._containerElement.style.setProperty("height",`calc(100% - ${this._toggleContainer.offsetHeight}px)`),this.onchange=()=>{}}_createToggleElement(t){const e=document.createElement("div");return e.innerHTML=`\n
\n \x3c!-- Spinner --\x3e\n \n\n \x3c!-- Buttons --\x3e\n
\n \n \n
\n
\n `,e.querySelector("#structure-btn").onclick=()=>this._select("structure"),e.querySelector("#atom-btn").onclick=()=>this._select("atom"),e.firstElementChild}_select(t){const e="atom"===t;this._toggleContainer.querySelector("#structure-btn").classList.toggle("active",!e),this._toggleContainer.querySelector("#atom-btn").classList.toggle("active",e),this.onchange(t)}loader(t){this._toggleContainer.querySelector("#chsp-target-spinner").style.display=t?"inline-block":"none",this._toggleContainer.querySelectorAll(".btn-outline-secondary").forEach((e=>{t?e.setAttribute("disabled","true"):e.removeAttribute("disabled")}))}remove(){this._shadow.host.remove(),this._containerElement.style.setProperty("height","100%")}}var un=r(85072),hn=r.n(un),fn=r(97825),pn=r.n(fn),mn=r(77659),gn=r.n(mn),vn=r(55056),bn=r.n(vn),yn=r(10540),xn=r.n(yn),wn=r(41113),_n=r.n(wn),kn=r(5018),An={};An.styleTagTransform=_n(),An.setAttributes=bn(),An.insert=gn().bind(null,"head"),An.domAPI=pn(),An.insertStyleElement=xn(),hn()(kn.A,An),kn.A&&kn.A.locals&&kn.A.locals;function Tn(t){const e=(t,e)=>{if("object"!=typeof e||null===e)throw Error(`"settings.${t}" must be an object`)},r=(t,e)=>{if(!(Array.isArray(e)&&e.length>0))throw Error(`"settings.${t}" must be an array containing at least one element`)};for(const n in t)if("map"===n)e(n,t.map);else if("structure"===n){r(n,t.structure);for(const r of t.structure)e("structure entry",r)}else if("pinned"===n){r(n,t.pinned);for(const e of t.pinned)if(!(Number.isInteger(e)&&e>=0))throw Error('"settings.pinned" must be an array of number')}else{if("target"!==n)throw Error(`invalid key "${n}" in settings`);if(!["atom","structure"].includes(t.target))throw Error('"settings.target" should be either "atom" or "structure"')}}class Mn{static load(t,e){return new Promise((r=>{r(new Mn(t,e))}))}constructor(t,e){var r;this._target="structure",function(t,e){if("object"!=typeof t)throw Error("the configuration must be a JavaScript object");for(const r of e)if(!(r in t)||!("string"==typeof t[r]||t[r]instanceof HTMLElement))throw Error(`missing "${r}" key in chemiscope configuration`);if("settings"in t){if("object"!=typeof t.settings||null===t.settings)throw Error('"settings" must be an object in chemiscope configuration');Tn(t.settings)}if("loadStructure"in t&&void 0!==t.loadStructure&&!((r=t.loadStructure)&&r.constructor&&r.call&&r.apply))throw Error('"loadStructure" should be a function in chemiscope config');var r;if("maxStructureViewers"in t&&"number"!=typeof t.maxStructureViewers)throw Error('"maxStructureViewers" should be a number in chemiscope config')}(t,["meta","map","info","structure"]),function(t){if("object"!=typeof t)throw Error("the dataset must be a JavaScript object");if(!("meta"in t))throw Error('missing "meta" key in the dataset');if("object"!=typeof t.meta||null===t.meta)throw Error('"meta" must be an object in the dataset');if(function(t){if(!("name"in t))throw Error('missing "meta.name" key in the dataset');if("string"!=typeof t.name)throw Error('"meta.name" must be a string in the dataset');if("description"in t&&"string"!=typeof t.description)throw Error('"meta.description" should be a string in the dataset');if("authors"in t){if(!Array.isArray(t.authors))throw Error('"meta.authors" must be an array in the dataset');for(const e of t.authors)if("string"!=typeof e)throw Error('"meta.authors" must be an array of strings in the dataset')}if("references"in t){if(!Array.isArray(t.references))throw Error('"meta.references" must be an array in the dataset');for(const e of t.references)if("string"!=typeof e)throw Error('"meta.references" must be an array of strings in the dataset')}}(t.meta),!("structures"in t))throw Error('missing "structures" key in the dataset');if(!Array.isArray(t.structures))throw Error('"structures" must be an array in the dataset');const[e,r]=function(t){let e=0;for(let r=0;r=e.length)throw Error(`out of bounds 'structure' for environment ${r}: index is ${n.structure}, we have ${e.length} structures`);if(!("center"in n)||"number"!=typeof n.center)throw Error(`missing 'center' for environment ${r}`);const i=e[n.structure].size;if(!en(n.center)||n.center>=i)throw Error(`out of bounds 'center' for environment ${r}: index is ${n.center}, we have ${i} atoms in structure ${n.structure}`);if(!("cutoff"in n)||"number"!=typeof n.cutoff)throw Error(`missing 'cutoff' for environment ${r}`)}}(t.environments,t.structures)}if("shapes"in t){const r=function(t,e,r){if("object"!=typeof t||null===t)return"'shapes' must be an object";for(const[n,i]of Object.entries(t)){const t=i;if(!("kind"in t))return`missing "kind" in shape ${n}`;if("string"!=typeof t.kind)return`shapes 'kind' must be a string for shape ${n}`;if(!("parameters"in t))return`missing "parameters" in shape ${n}`;const o=t.parameters;if("structure"in o){const t=o.structure;if(!Array.isArray(t))return`'structure' parameters should be an array in shape ${n}`;if(t.length!==e)return`'structure' parameters in shape ${n} contain ${t.length} entries, but there are ${e} structures.`}if("atom"in o){const t=o.atom;if(!Array.isArray(t))return`'atom' parameters should be an array in shape ${n}`;if(t.length!==r)return`'atom' parameters in shape ${n} contain ${t.length} entries, but there are ${r} environments.`}}return""}(t.shapes,e,n);if(""!==r)throw Error("Error checking shape definitions: "+r);const i=function(t,e){let r=0;for(let n=0;n0&&o.values.length!==a)throw Error(`wrong size for 'properties['${i}'].values': expected ${a}, got ${o.values.length}`);const s=typeof o.values[0];if("string"!==s&&"number"!==s&&!rn(o.values))throw Error(`'properties['${i}'].values' should contain string or number or an array of numbers`);for(const t of o.values)if(typeof t!==s)throw Error(`'properties['${i}'].values' should be of a single type`);if(rn(o.values)){if(!n)throw Error(`'parameters' should be provided for multidimensional properties '${i}'`);const t=o.parameters;if(!on(t))throw Error(`'properties['${i}'].parameters' should be an array of strings`);if(1!==t.length)throw Error(`'properties['${i}'].parameters' should contain a single parameter`);for(const e of t)if(!(e in n))throw Error(`parameter '${e}' of 'properties['${i}']' does not appear in the list provided parameters`);const e=o.values[0];for(const r of t){const t=n[r].values;if(e.length!==t.length)throw Error(`'properties['${i}'].values' and 'parameters['${r}'].values' should have the same length`)}if(!nn(o.values))throw Error(`'properties['${i}].values' should contain arrays of the same length`)}if("description"in o&&"string"!=typeof o.description)throw Error(`'properties['${i}'].description' should contain a string`);if("units"in o&&"string"!=typeof o.units)throw Error(`'properties['${i}'].units' should contain a string`)}}(t.properties,e,n,t.parameters)}(e),this._dataset=e,this._pinned=[],this._target=function(t){var e;const r=null===(e=t.settings)||void 0===e?void 0:e.target;if(void 0!==r){if("atom"===r&&void 0===t.environments)throw new Error('To use "atom" target, a list of environments should be provided');return r}const n=Object.values(t.properties).filter((t=>"atom"===t.target));return void 0!==t.environments&&n.length>0?"atom":"structure"}(e),this._indexer=new c(e.structures,e.environments),this.meta=new Jr(t.meta,e.meta),this.structure=new ln(t.structure,this._indexer,e.structures,this._target,e.properties,e.environments,t.maxStructureViewers),void 0!==t.loadStructure&&(this.structure.loadStructure=t.loadStructure),this.structure.activeChanged=(t,e)=>{this.map.setActive(t),this.info.show(e)},this.structure.onselect=t=>{this.map.select(t),this.info.show(t)},this.structure.onremove=t=>{this.map.removeMarker(t);const e=this._pinned.indexOf(t);l()(e>-1,"index > -1"),this._pinned.splice(e,1)},this.structure.oncreate=(t,e,r)=>{this.map.addMarker(t,e,r),this.info.show(r),this._pinned.push(t)},this.map=new B(t.map,function(t){if(void 0===t)return{};if("map"in t){const e=t.map;if("object"==typeof e){if(null===e)throw Error("invalid settings for map, should not be null");return e}throw Error(`invalid type '${typeof e}' for map, should be an object`)}return{}}(e.settings),this._indexer,this._target,e.properties),this.map.onselect=t=>{this.info.show(t),this.structure.show(t)},this.map.activeChanged=(t,e)=>{this.info.show(e),this.structure.setActive(t)};const n="atom"===this._target?"structure":"atom",i=Object.values(e.properties).filter((t=>t.target===n));void 0!==e.environments&&i.length>1&&(this._toggle=new dn(t.map,this._target),this._toggle.onchange=t=>this._switchTarget(t)),this.info=new k(t.info,e.properties,this._indexer,this._target,e.parameters),this.info.onchange=t=>{this.map.select(t),this.structure.show(t)},this.structure.delayChanged=t=>{this.info.playbackDelay=t};let o={environment:0,structure:0,atom:0};if(void 0!==e.environments&&(o=this._indexer.fromEnvironment(0,this._target)),e.settings&&e.settings.pinned){if(!Array.isArray(e.settings.pinned)||"number"!=typeof e.settings.pinned[0])throw Error("settings.pinned must be an array of numbers");o=this._indexer.fromEnvironment(e.settings.pinned[0],this._target)}const a=this.structure.active;this.map.addMarker(a,(0,d.Lz)([]),o),this._pinned.push(a),this.structure.show(o),this.info.show(o),void 0!==e.settings&&(delete e.settings.map,this.applySettings(e.settings)),void 0!==this._toggle&&(null===(r=e.settings)||void 0===r?void 0:r.target)&&this._switchTarget(this._target,!0)}_switchTarget(t,e=!1){(e||this._target!==t)&&(l()(void 0!==this._toggle,"this._toggle !== undefined"),this._toggle.loader(!0),this._target=t,setTimeout((()=>{return t=this,e=void 0,n=function*(){var t;try{this.info.switchTarget(this._target),yield this.map.switchTarget(this._target),yield this.structure.switchTarget(this._target)}finally{null===(t=this._toggle)||void 0===t||t.loader(!1)}},new((r=void 0)||(r=Promise))((function(i,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function s(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}l((n=n.apply(t,e||[])).next())}));var t,e,r,n}),0))}remove(){var t;this.map.remove(),this.meta.remove(),this.info.remove(),this.structure.remove(),null===(t=this._toggle)||void 0===t||t.remove()}saveSettings(){return{target:this._target,map:this.map.saveSettings(),pinned:this.structure.pinned().map((t=>"atom"===this._target?t.environment:t.structure)),structure:this.structure.saveSettings()}}applySettings(t){if(Tn(t),void 0!==t.map&&this.map.applySettings(t.map),void 0!==t.pinned){if(!Array.isArray(t.pinned))throw Error("settings.pinned must be an array");for(const t of this._pinned.slice(1))this.map.removeMarker(t),this.structure.removeViewer(t);if(this._pinned=[this._pinned[0]],l()(t.pinned.length>0,"settings.pinned.length > 0"),"number"!=typeof t.pinned[0])throw Error("settings.pinned must be an array of numbers");const e=this._indexer.fromEnvironment(t.pinned[0],this._target);this.map.select(e),this.info.show(e),this.structure.show(e);for(const e of t.pinned.slice(1)){if("number"!=typeof e)throw Error("settings.pinned must be an array of numbers");const{guid:t,color:r}=this.structure.addViewer();if(void 0===t)throw Error("too many environments in 'pinned' setting");const n=this._indexer.fromEnvironment(e,this._target);this.map.addMarker(t,r,n),this.map.setActive(t),this._pinned.push(t),this.info.show(n),this.structure.setActive(t),this.structure.show(n)}}void 0!==t.structure&&this.structure.applySettings(t.structure)}onSettingChange(t){this.map.onSettingChange(((e,r)=>{(e=JSON.parse(JSON.stringify(e))).unshift("map"),t(e,r)})),this.structure.onSettingChange(((e,r)=>{(e=JSON.parse(JSON.stringify(e))).unshift("structure"),t(e,r)}))}dataset(t=!1){const e=JSON.parse(JSON.stringify(this._dataset,((t,e)=>"number"==typeof e&&isNaN(e)?"***NaN***":e)),((t,e)=>"***NaN***"===e?NaN:e));if(t){e.structures=[];for(let t=0;t{"use strict";function n(t){return t.map((t=>[t[0],`rgb(${t[1][0]}, ${t[1][1]}, ${t[1][2]})`]))}r.d(e,{s:()=>i});const i={inferno:n([[0,[0,0,3]],[.0159,[1,1,9]],[.0317,[3,2,18]],[.0476,[6,4,27]],[.0635,[10,7,35]],[.0794,[15,9,45]],[.0952,[20,11,54]],[.1111,[26,11,64]],[.127,[32,12,74]],[.1429,[39,11,82]],[.1587,[46,10,90]],[.1746,[53,9,96]],[.1905,[60,9,101]],[.2063,[67,10,104]],[.2222,[74,11,106]],[.2381,[80,13,108]],[.254,[88,16,109]],[.2698,[95,18,110]],[.2857,[101,21,110]],[.3016,[107,23,110]],[.3175,[114,25,109]],[.3333,[120,28,109]],[.3492,[126,30,108]],[.3651,[133,32,106]],[.381,[139,34,105]],[.3968,[145,37,103]],[.4127,[152,39,101]],[.4286,[158,41,99]],[.4444,[164,44,96]],[.4603,[171,46,93]],[.4762,[177,49,90]],[.4921,[183,52,86]],[.5079,[190,56,82]],[.5238,[196,60,78]],[.5397,[201,63,74]],[.5556,[207,68,70]],[.5714,[212,72,65]],[.5873,[217,77,61]],[.6032,[221,82,56]],[.619,[226,87,51]],[.6349,[230,92,46]],[.6508,[233,98,42]],[.6667,[237,104,37]],[.6825,[240,111,31]],[.6984,[242,117,26]],[.7143,[245,124,21]],[.7302,[247,131,16]],[.746,[248,138,11]],[.7619,[250,147,6]],[.7778,[251,155,6]],[.7937,[251,162,8]],[.8095,[251,170,14]],[.8254,[251,177,22]],[.8413,[251,185,30]],[.8571,[250,193,40]],[.873,[248,201,49]],[.8889,[247,209,60]],[.9048,[245,217,72]],[.9206,[243,224,86]],[.9365,[241,232,100]],[.9524,[241,238,116]],[.9683,[242,244,133]],[.9841,[246,250,149]],[1,[252,254,164]]]),magma:n([[0,[0,0,3]],[.0159,[1,1,9]],[.0317,[3,3,17]],[.0476,[6,5,25]],[.0635,[10,7,34]],[.0794,[14,10,42]],[.0952,[18,13,51]],[.1111,[23,15,60]],[.127,[28,16,70]],[.1429,[34,17,80]],[.1587,[40,17,89]],[.1746,[47,16,98]],[.1905,[53,15,106]],[.2063,[60,15,113]],[.2222,[67,15,117]],[.2381,[74,16,121]],[.254,[82,18,124]],[.2698,[88,21,126]],[.2857,[94,23,127]],[.3016,[101,26,128]],[.3175,[107,28,128]],[.3333,[113,31,129]],[.3492,[119,33,129]],[.3651,[126,36,129]],[.381,[132,38,129]],[.3968,[138,40,129]],[.4127,[145,42,128]],[.4286,[151,44,127]],[.4444,[158,46,126]],[.4603,[164,48,125]],[.4762,[171,51,124]],[.4921,[177,53,122]],[.5079,[185,55,120]],[.5238,[192,58,117]],[.5397,[198,60,115]],[.5556,[205,63,112]],[.5714,[211,66,109]],[.5873,[217,70,106]],[.6032,[222,74,103]],[.619,[228,78,100]],[.6349,[232,84,97]],[.6508,[237,89,95]],[.6667,[240,96,93]],[.6825,[243,103,91]],[.6984,[246,110,91]],[.7143,[248,117,92]],[.7302,[249,125,93]],[.746,[251,132,96]],[.7619,[252,142,99]],[.7778,[253,149,103]],[.7937,[253,157,107]],[.8095,[253,164,112]],[.8254,[254,172,117]],[.8413,[254,179,123]],[.8571,[254,187,128]],[.873,[254,194,134]],[.8889,[254,201,141]],[.9048,[253,209,147]],[.9206,[253,216,154]],[.9365,[253,223,161]],[.9524,[252,230,168]],[.9683,[252,238,176]],[.9841,[252,245,183]],[1,[251,252,191]]]),plasma:n([[0,[12,7,134]],[.0159,[24,6,139]],[.0317,[33,5,143]],[.0476,[41,5,147]],[.0635,[49,4,150]],[.0794,[56,4,153]],[.0952,[63,3,156]],[.1111,[69,3,158]],[.127,[76,2,161]],[.1429,[82,1,163]],[.1587,[89,1,164]],[.1746,[95,0,166]],[.1905,[101,0,167]],[.2063,[108,0,168]],[.2222,[114,0,168]],[.2381,[120,1,168]],[.254,[127,3,167]],[.2698,[133,6,166]],[.2857,[139,9,164]],[.3016,[144,14,163]],[.3175,[150,18,160]],[.3333,[155,23,158]],[.3492,[160,27,155]],[.3651,[165,31,151]],[.381,[170,36,148]],[.3968,[175,40,144]],[.4127,[180,45,141]],[.4286,[184,50,137]],[.4444,[188,54,133]],[.4603,[192,59,129]],[.4762,[196,63,126]],[.4921,[200,68,122]],[.5079,[205,73,117]],[.5238,[209,78,114]],[.5397,[212,82,110]],[.5556,[215,87,107]],[.5714,[219,91,103]],[.5873,[222,96,100]],[.6032,[225,101,96]],[.619,[228,106,93]],[.6349,[231,110,90]],[.6508,[234,115,86]],[.6667,[236,120,83]],[.6825,[239,125,79]],[.6984,[241,130,76]],[.7143,[243,135,72]],[.7302,[245,141,69]],[.746,[247,146,65]],[.7619,[249,153,61]],[.7778,[250,159,58]],[.7937,[251,164,54]],[.8095,[252,170,51]],[.8254,[253,176,48]],[.8413,[253,182,45]],[.8571,[253,188,42]],[.873,[253,195,40]],[.8889,[252,201,38]],[.9048,[251,208,36]],[.9206,[250,214,36]],[.9365,[248,221,36]],[.9524,[246,228,37]],[.9683,[244,234,38]],[.9841,[242,241,38]],[1,[239,248,33]]]),viridis:n([[0,[68,1,84]],[.0159,[69,6,90]],[.0317,[70,12,95]],[.0476,[71,18,101]],[.0635,[71,24,106]],[.0794,[72,29,111]],[.0952,[72,34,115]],[.1111,[71,39,119]],[.127,[71,44,123]],[.1429,[70,49,126]],[.1587,[69,54,129]],[.1746,[67,59,131]],[.1905,[66,64,133]],[.2063,[64,68,135]],[.2222,[62,73,137]],[.2381,[60,77,138]],[.254,[58,83,139]],[.2698,[56,87,140]],[.2857,[54,91,140]],[.3016,[52,95,141]],[.3175,[50,99,141]],[.3333,[48,103,141]],[.3492,[46,107,142]],[.3651,[45,111,142]],[.381,[43,115,142]],[.3968,[42,119,142]],[.4127,[40,122,142]],[.4286,[39,126,142]],[.4444,[37,130,142]],[.4603,[36,134,141]],[.4762,[34,137,141]],[.4921,[33,141,140]],[.5079,[31,146,140]],[.5238,[31,150,139]],[.5397,[30,153,138]],[.5556,[30,157,136]],[.5714,[31,161,135]],[.5873,[32,165,133]],[.6032,[35,168,131]],[.619,[38,172,129]],[.6349,[42,176,126]],[.6508,[47,179,123]],[.6667,[53,183,120]],[.6825,[59,186,117]],[.6984,[66,190,113]],[.7143,[73,193,109]],[.7302,[81,196,104]],[.746,[89,199,100]],[.7619,[100,203,93]],[.7778,[109,206,88]],[.7937,[119,208,82]],[.8095,[129,211,76]],[.8254,[139,213,70]],[.8413,[149,215,63]],[.8571,[159,217,56]],[.873,[170,219,50]],[.8889,[181,221,43]],[.9048,[191,223,36]],[.9206,[202,224,30]],[.9365,[212,225,26]],[.9524,[223,227,24]],[.9683,[233,228,25]],[.9841,[243,229,30]],[1,[253,231,36]]]),cividis:n([[0,[0,34,77]],[.0159,[0,37,84]],[.0317,[0,40,91]],[.0476,[0,42,98]],[.0635,[0,45,105]],[.0794,[0,48,112]],[.0952,[4,50,112]],[.1111,[17,53,111]],[.127,[26,56,111]],[.1429,[33,59,110]],[.1587,[39,61,109]],[.1746,[44,64,109]],[.1905,[49,67,108]],[.2063,[54,70,108]],[.2222,[58,72,107]],[.2381,[63,75,107]],[.254,[68,79,107]],[.2698,[72,81,107]],[.2857,[76,84,108]],[.3016,[79,87,108]],[.3175,[83,90,108]],[.3333,[87,93,109]],[.3492,[90,95,109]],[.3651,[94,98,110]],[.381,[97,101,111]],[.3968,[101,104,112]],[.4127,[104,107,113]],[.4286,[108,109,114]],[.4444,[111,112,115]],[.4603,[115,115,116]],[.4762,[118,118,118]],[.4921,[121,121,119]],[.5079,[126,125,120]],[.5238,[130,128,120]],[.5397,[133,131,120]],[.5556,[137,134,120]],[.5714,[141,137,120]],[.5873,[145,140,119]],[.6032,[149,143,119]],[.619,[153,146,118]],[.6349,[157,149,117]],[.6508,[161,152,116]],[.6667,[165,155,115]],[.6825,[169,158,114]],[.6984,[173,162,113]],[.7143,[177,165,112]],[.7302,[181,168,110]],[.746,[185,171,109]],[.7619,[190,176,106]],[.7778,[195,179,104]],[.7937,[199,182,102]],[.8095,[203,186,100]],[.8254,[207,189,97]],[.8413,[212,193,94]],[.8571,[216,196,91]],[.873,[220,200,88]],[.8889,[225,204,84]],[.9048,[229,207,80]],[.9206,[234,211,76]],[.9365,[238,215,71]],[.9524,[243,218,66]],[.9683,[248,222,59]],[.9841,[253,226,52]],[1,[253,231,55]]]),seismic:n([[0,[0,0,77]],[.0159,[0,0,88]],[.0317,[0,0,99]],[.0476,[0,0,111]],[.0635,[0,0,122]],[.0794,[0,0,133]],[.0952,[0,0,144]],[.1111,[0,0,156]],[.127,[0,0,167]],[.1429,[0,0,178]],[.1587,[0,0,189]],[.1746,[0,0,200]],[.1905,[0,0,212]],[.2063,[0,0,223]],[.2222,[0,0,234]],[.2381,[0,0,245]],[.254,[5,5,255]],[.2698,[21,21,255]],[.2857,[37,37,255]],[.3016,[53,53,255]],[.3175,[69,69,255]],[.3333,[85,85,255]],[.3492,[101,101,255]],[.3651,[117,117,255]],[.381,[134,134,255]],[.3968,[150,150,255]],[.4127,[166,166,255]],[.4286,[182,182,255]],[.4444,[198,198,255]],[.4603,[214,214,255]],[.4762,[230,230,255]],[.4921,[246,246,255]],[.5079,[255,246,246]],[.5238,[255,230,230]],[.5397,[255,214,214]],[.5556,[255,198,198]],[.5714,[255,182,182]],[.5873,[255,166,166]],[.6032,[255,150,150]],[.619,[255,134,134]],[.6349,[255,117,117]],[.6508,[255,101,101]],[.6667,[255,85,85]],[.6825,[255,69,69]],[.6984,[255,53,53]],[.7143,[255,37,37]],[.7302,[255,21,21]],[.746,[255,5,5]],[.7619,[248,0,0]],[.7778,[240,0,0]],[.7937,[232,0,0]],[.8095,[224,0,0]],[.8254,[216,0,0]],[.8413,[208,0,0]],[.8571,[200,0,0]],[.873,[192,0,0]],[.8889,[184,0,0]],[.9048,[176,0,0]],[.9206,[168,0,0]],[.9365,[160,0,0]],[.9524,[152,0,0]],[.9683,[144,0,0]],[.9841,[136,0,0]],[1,[128,0,0]]]),brg:n([[0,[0,0,255]],[.0159,[8,0,248]],[.0317,[16,0,240]],[.0476,[24,0,232]],[.0635,[32,0,224]],[.0794,[40,0,216]],[.0952,[48,0,208]],[.1111,[56,0,200]],[.127,[64,0,192]],[.1429,[72,0,184]],[.1587,[80,0,176]],[.1746,[88,0,168]],[.1905,[96,0,160]],[.2063,[104,0,152]],[.2222,[112,0,144]],[.2381,[120,0,136]],[.254,[131,0,125]],[.2698,[139,0,117]],[.2857,[147,0,109]],[.3016,[155,0,101]],[.3175,[163,0,93]],[.3333,[171,0,85]],[.3492,[179,0,77]],[.3651,[187,0,69]],[.381,[195,0,61]],[.3968,[203,0,53]],[.4127,[211,0,45]],[.4286,[219,0,37]],[.4444,[227,0,29]],[.4603,[235,0,21]],[.4762,[243,0,13]],[.4921,[251,0,5]],[.5079,[251,5,0]],[.5238,[243,13,0]],[.5397,[235,21,0]],[.5556,[227,29,0]],[.5714,[219,37,0]],[.5873,[211,45,0]],[.6032,[203,53,0]],[.619,[195,61,0]],[.6349,[187,69,0]],[.6508,[179,77,0]],[.6667,[171,85,0]],[.6825,[163,93,0]],[.6984,[155,101,0]],[.7143,[147,109,0]],[.7302,[139,117,0]],[.746,[131,125,0]],[.7619,[120,136,0]],[.7778,[112,144,0]],[.7937,[104,152,0]],[.8095,[96,160,0]],[.8254,[88,168,0]],[.8413,[80,176,0]],[.8571,[72,184,0]],[.873,[64,192,0]],[.8889,[56,200,0]],[.9048,[48,208,0]],[.9206,[40,216,0]],[.9365,[32,224,0]],[.9524,[24,232,0]],[.9683,[16,240,0]],[.9841,[8,248,0]],[1,[0,255,0]]]),bwr:n([[0,[0,0,255]],[.01587,[8,8,255]],[.03175,[16,16,255]],[.04762,[24,24,255]],[.06349,[32,32,255]],[.07937,[40,40,255]],[.09524,[48,48,255]],[.1111,[56,56,255]],[.127,[64,64,255]],[.1429,[72,72,255]],[.1587,[80,80,255]],[.1746,[89,89,255]],[.1905,[97,97,255]],[.2063,[105,105,255]],[.2222,[113,113,255]],[.2381,[121,121,255]],[.254,[129,129,255]],[.2698,[137,137,255]],[.2857,[145,145,255]],[.3016,[153,153,255]],[.3175,[161,161,255]],[.3333,[170,170,255]],[.3492,[178,178,255]],[.3651,[186,186,255]],[.381,[194,194,255]],[.3968,[202,202,255]],[.4127,[210,210,255]],[.4286,[218,218,255]],[.4444,[226,226,255]],[.4603,[234,234,255]],[.4762,[242,242,255]],[.4921,[250,250,255]],[.5079,[255,250,250]],[.5238,[254,242,242]],[.5397,[255,234,234]],[.5556,[255,226,226]],[.5714,[255,218,218]],[.5873,[254,210,210]],[.6032,[255,202,202]],[.619,[255,194,194]],[.6349,[255,186,186]],[.6508,[254,178,178]],[.6667,[255,170,170]],[.6825,[255,161,161]],[.6984,[255,153,153]],[.7143,[254,145,145]],[.7302,[255,137,137]],[.746,[255,129,129]],[.7619,[255,121,121]],[.7778,[255,113,113]],[.7937,[255,105,105]],[.8095,[255,97,97]],[.8254,[255,89,89]],[.8413,[255,80,80]],[.8571,[255,72,72]],[.873,[255,64,64]],[.8889,[255,56,56]],[.9048,[255,48,48]],[.9206,[255,40,40]],[.9365,[255,32,32]],[.9524,[255,24,24]],[.9683,[255,16,16]],[.9841,[255,8,8]],[1,[255,0,0]]]),rwg:n([[0,[200,0,0]],[.01587,[201,8,8]],[.03175,[203,16,16]],[.04762,[205,24,24]],[.06349,[206,32,32]],[.07937,[208,40,40]],[.09524,[210,48,48]],[.1111,[212,56,56]],[.127,[213,64,64]],[.1429,[215,72,72]],[.1587,[217,80,80]],[.1746,[219,89,89]],[.1905,[220,97,97]],[.2063,[222,105,105]],[.2222,[224,113,113]],[.2381,[226,121,121]],[.254,[227,129,129]],[.2698,[229,137,137]],[.2857,[231,145,145]],[.3016,[233,153,153]],[.3175,[234,161,161]],[.3333,[236,170,170]],[.3492,[238,178,178]],[.3651,[240,186,186]],[.381,[241,194,194]],[.3968,[243,202,202]],[.4127,[245,210,210]],[.4286,[247,218,218]],[.4444,[248,226,226]],[.4603,[250,234,234]],[.4762,[252,242,242]],[.4921,[254,250,250]],[.5079,[250,252,250]],[.5238,[242,248,242]],[.5397,[234,244,234]],[.5556,[226,240,226]],[.5714,[218,236,218]],[.5873,[210,232,210]],[.6032,[202,228,202]],[.619,[194,224,194]],[.6349,[186,220,186]],[.6508,[178,216,178]],[.6667,[170,212,170]],[.6825,[161,208,161]],[.6984,[153,204,153]],[.7143,[145,200,145]],[.7302,[137,196,137]],[.746,[129,192,129]],[.7619,[121,188,121]],[.7778,[113,184,113]],[.7937,[105,180,105]],[.8095,[97,176,97]],[.8254,[89,172,89]],[.8413,[80,168,80]],[.8571,[72,164,72]],[.873,[64,160,64]],[.8889,[56,156,56]],[.9048,[48,152,48]],[.9206,[40,148,40]],[.9365,[32,144,32]],[.9524,[24,140,24]],[.9683,[16,136,16]],[.9841,[8,132,8]],[1,[0,128,0]]]),"twilight (periodic)":n([[0,[225,216,226]],[.0159,[221,217,224]],[.0317,[214,214,220]],[.0476,[205,210,216]],[.0635,[194,205,211]],[.0794,[182,199,207]],[.0952,[170,193,203]],[.1111,[158,187,200]],[.127,[147,180,198]],[.1429,[137,172,196]],[.1587,[128,165,195]],[.1746,[119,156,193]],[.1905,[112,149,192]],[.2063,[107,141,191]],[.2222,[102,132,189]],[.2381,[99,124,187]],[.254,[97,115,185]],[.2698,[96,106,183]],[.2857,[95,97,180]],[.3016,[94,87,176]],[.3175,[94,78,171]],[.3333,[93,67,164]],[.3492,[92,57,157]],[.3651,[90,48,149]],[.381,[88,39,139]],[.3968,[84,31,127]],[.4127,[79,25,114]],[.4286,[73,21,100]],[.4444,[66,18,87]],[.4603,[59,17,75]],[.4762,[54,16,65]],[.4921,[50,17,58]],[.5079,[49,18,55]],[.5238,[55,17,56]],[.5397,[62,17,60]],[.5556,[70,18,64]],[.5714,[80,20,68]],[.5873,[90,22,72]],[.6032,[101,25,75]],[.619,[111,28,78]],[.6349,[122,32,79]],[.6508,[131,37,80]],[.6667,[141,44,80]],[.6825,[150,50,79]],[.6984,[157,58,79]],[.7143,[164,66,79]],[.7302,[170,75,80]],[.746,[176,84,81]],[.7619,[181,93,83]],[.7778,[186,102,87]],[.7937,[190,112,91]],[.8095,[193,121,96]],[.8254,[196,131,104]],[.8413,[199,142,113]],[.8571,[201,152,123]],[.873,[203,162,135]],[.8889,[206,171,148]],[.9048,[209,180,161]],[.9206,[212,189,175]],[.9365,[216,197,188]],[.9524,[219,205,201]],[.9683,[222,211,212]],[.9841,[224,215,220]],[1,[225,216,225]]]),"twilight dark (periodic)":n([[0,[47,19,55]],[.0159,[51,17,61]],[.0317,[56,16,70]],[.0476,[62,17,81]],[.0635,[69,19,93]],[.0794,[76,22,107]],[.0952,[82,27,120]],[.1111,[86,34,133]],[.127,[89,43,144]],[.1429,[91,52,153]],[.1587,[93,62,161]],[.1746,[93,73,168]],[.1905,[94,83,173]],[.2063,[94,92,178]],[.2222,[95,101,181]],[.2381,[96,110,184]],[.254,[98,119,186]],[.2698,[101,128,188]],[.2857,[104,136,190]],[.3016,[109,145,191]],[.3175,[115,153,193]],[.3333,[124,161,194]],[.3492,[132,169,195]],[.3651,[142,176,197]],[.381,[152,183,199]],[.3968,[164,190,202]],[.4127,[176,196,205]],[.4286,[188,202,209]],[.4444,[199,208,214]],[.4603,[210,213,218]],[.4762,[217,216,222]],[.4921,[223,217,225]],[.5079,[225,216,223]],[.5238,[223,213,216]],[.5397,[221,208,207]],[.5556,[217,201,195]],[.5714,[214,193,181]],[.5873,[210,185,168]],[.6032,[207,176,154]],[.619,[204,167,141]],[.6349,[202,157,129]],[.6508,[200,147,118]],[.6667,[197,136,108]],[.6825,[195,126,100]],[.6984,[192,116,93]],[.7143,[188,107,89]],[.7302,[184,97,85]],[.746,[179,88,82]],[.7619,[173,79,80]],[.7778,[167,70,79]],[.7937,[161,62,79]],[.8095,[154,54,79]],[.8254,[146,47,79]],[.8413,[136,40,80]],[.8571,[127,34,80]],[.873,[117,30,79]],[.8889,[106,26,77]],[.9048,[95,23,74]],[.9206,[85,21,70]],[.9365,[75,19,66]],[.9524,[66,17,61]],[.9683,[58,17,58]],[.9841,[52,17,55]],[1,[47,20,54]]]),"hsv (periodic)":n([[0,[165,38,38]],[.0159,[172,57,45]],[.0317,[179,76,52]],[.0476,[187,94,59]],[.0635,[194,113,66]],[.0794,[201,132,73]],[.0952,[208,151,80]],[.1111,[215,170,87]],[.127,[222,189,94]],[.1429,[229,208,102]],[.1587,[236,227,109]],[.1746,[237,239,113]],[.1905,[223,237,110]],[.2063,[208,234,106]],[.2222,[193,230,103]],[.2381,[177,227,99]],[.254,[158,222,95]],[.2698,[143,219,91]],[.2857,[127,215,88]],[.3016,[112,212,84]],[.3175,[97,208,81]],[.3333,[81,205,77]],[.3492,[77,204,85]],[.3651,[78,205,98]],[.381,[79,207,111]],[.3968,[80,208,124]],[.4127,[82,209,137]],[.4286,[83,210,150]],[.4444,[84,211,163]],[.4603,[85,213,176]],[.4762,[86,214,189]],[.4921,[87,215,202]],[.5079,[88,214,215]],[.5238,[81,195,208]],[.5397,[74,176,201]],[.5556,[67,157,194]],[.5714,[60,138,187]],[.5873,[52,120,180]],[.6032,[45,101,173]],[.619,[38,82,166]],[.6349,[31,63,159]],[.6508,[24,44,152]],[.6667,[17,25,145]],[.6825,[17,14,141]],[.6984,[33,17,144]],[.7143,[48,20,148]],[.7302,[63,24,152]],[.746,[79,28,155]],[.7619,[98,32,160]],[.7778,[113,36,163]],[.7937,[129,39,167]],[.8095,[144,43,170]],[.8254,[159,46,174]],[.8413,[173,49,176]],[.8571,[177,50,168]],[.873,[176,48,155]],[.8889,[175,47,142]],[.9048,[174,46,129]],[.9206,[172,45,116]],[.9365,[171,44,103]],[.9524,[170,42,90]],[.9683,[169,41,77]],[.9841,[168,40,64]],[1,[166,39,51]]])}},50112:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});class n{constructor(t){this._element=t,this._activeElement=null,this._open=!1;const e=document.createElement("div");document.body.appendChild(e),this.shadow=e.attachShadow({mode:"open"}),this.shadow.appendChild(this._element),this._backdrop=document.createElement("div"),this._backdrop.classList.add("modal-backdrop","fade"),this._element.addEventListener("click",(t=>{t.target===t.currentTarget&&this.close()}));for(const t of this._element.querySelectorAll('[data-bs-dismiss="modal"]'))t.addEventListener("click",(()=>{this.close()}));document.addEventListener("keydown",(t=>{"Escape"===t.key&&(t.preventDefault(),this.close())})),this._element.addEventListener("transitionend",(t=>{t.target!==t.currentTarget||this._open||this._element.style.setProperty("display","none")})),this._backdrop.addEventListener("transitionend",(()=>{this._open||(this._backdrop.remove(),this._activeElement&&this._activeElement instanceof HTMLElement&&this._activeElement.focus(),this._activeElement=null)}))}close(){this._backdrop.classList.remove("show"),this._element.classList.remove("show"),this._open=!1}open(){this._element.getRootNode().appendChild(this._backdrop),this._element.style.setProperty("display","block"),this._element.offsetHeight,this._backdrop.classList.add("show"),this._element.classList.add("show"),this._activeElement=i(),this._activeElement&&this._activeElement instanceof HTMLElement&&this._activeElement.blur(),this._open=!0}toggle(t=!this.open){t?this.open():this.close()}remove(){this.shadow.host.remove()}}function i(t=document){const e=t.activeElement;return(null==e?void 0:e.shadowRoot)?i(e.shadowRoot):e}},45127:(t,e,r)=>{"use strict";r.d(e,{Je:()=>s,W2:()=>l,qP:()=>a});var n=r(34961),i=r.n(n),o=r(91683);function a(t,e=""){return r=>{if(!t.includes(r))throw Error(`invalid property '${r}' for ${e}, are you sure the settings correspond to the current dataset?`)}}class s{constructor(t,e){this.type=t,this._value=e,this._previous_value=e,this._boundList=[],this.validate=()=>{},this.onchange=[],Object.preventExtensions(this)}get value(){return this._value}set value(t){this._update(t.toString(),"JS")}changed(t){for(const t of this._boundList)if("multival"===t.attribute){const e=this._value.split(","),r=t.element;for(const t of r.options)t.selected=e.includes(t.value)}else t.element[t.attribute]=this._value;for(const e of this.onchange)e(this._value,t)}reset(){this.value=this._previous_value}bind(t,e){let r;if("string"==typeof t&&(t=(0,o.VT)(t)),"multival"===e){r=t=>{i()(null!==t.target,"event.target !== null");const e=t.target,r=Array.from(e.options).filter((t=>t.selected)).map((t=>t.value));this._update(r.toString(),"DOM")};const e=this._value.split(",");for(const r of t.options)r.selected=e.includes(r.value)}else r=t=>{i()(null!==t.target,"event.target !== null"),this._update(t.target[e].toString(),"DOM")},t[e]=this._value;t.addEventListener("change",r),this._boundList.push({element:t,attribute:e,listener:r})}disable(){for(const t of this._boundList){const e=t.element;"disabled"in e&&(e.disabled=!0)}}enable(){for(const t of this._boundList){const e=t.element;"disabled"in e&&(e.disabled=!1)}}unbindAll(){for(const t of this._boundList)t.element.removeEventListener("change",t.listener);this._boundList=[]}_update(t,e){const r=function(t,e){if("string"===t)return e;if("int"===t)return parseInt(e,10);if("number"===t)return parseFloat(e);if("boolean"===t){if("false"===e)return!1;if("true"===e)return!0;throw Error(`invalid value for boolean: ${e}`)}throw Error(`unknown type '${t}' passed to parse`)}(this.type,t);this._value!==r&&(this.validate(r),this._previous_value=this.value,this._value=r,this.changed(e))}}class l{saveSettings(){const t={};return this.foreachOption(((e,r)=>{i()(e.length>=1,"keys.length >= 1");const n=r.value;if(void 0!==n||null!==n||!Number.isNaN(n)){let r=t;for(const t of e.slice(0,e.length-1))t in r||(r[t]={}),r=r[t];r[e[e.length-1]]=n}})),t}applySettings(t){const e=JSON.parse(JSON.stringify(t));this.foreachOption(((t,r)=>{i()(t.length>=1,"keys.length >= 1");let n,a=e;for(const e of t.slice(0,t.length-1)){if(!(e in a))return;n=a,a=a[e]}const s=t[t.length-1];if(s in a){const e=a[s];if(null==e||Number.isNaN(e))return void(0,o.R4)(`ignored setting '${s}' with invalid value '${e}'`);r.value=e,delete a[s],void 0!==n&&0===Object.keys(a).length&&(i()(t.length>=2,"keys.length >= 2"),delete n[t[t.length-2]])}})),0!==Object.keys(e).length&&(0,o.R4)(`ignored unknown settings '${JSON.stringify(e)}'`)}onSettingChange(t){this.foreachOption(((e,r)=>{r.onchange.push((r=>t(e,r)))}))}foreachOption(t){c(this,t,[])}}function c(t,e,r=[]){if(r.length>10)throw Error("setting object is too deep");for(const n in t){if(n.startsWith("_"))continue;const i=r.concat([n]),o=t[n];o instanceof s?e(i,o):"object"==typeof o&&null!==o&&c(o,e,i)}}},59838:(t,e,r)=>{"use strict";r.d(e,{O:()=>u});var n=r(34961),i=r.n(n),o=r(88862),a=r(50112),s=r(45127),l=r(91683),c=r(17136),d=r(90170);class u extends s.W2{constructor(t,e,r=[]){super(),this.bonds=new s.Je("boolean",!0),this.atoms=new s.Je("boolean",!0),this.spaceFilling=new s.Je("boolean",!1),this.atomLabels=new s.Je("boolean",!1),this.shape=new s.Je("string",""),this.unitCell=new s.Je("boolean",!1),this.rotation=new s.Je("boolean",!1),this.supercell=[new s.Je("int",1),new s.Je("int",1),new s.Je("int",1)];const n=t=>{if(!(Number.isInteger(t)&&t>0))throw Error("supercell count should be a positive integer")};this.supercell[0].validate=n,this.supercell[1].validate=n,this.supercell[2].validate=n,this.axes=new s.Je("string","off"),this.axes.validate=(0,s.qP)(["off","abc","xyz"],"axes"),this.keepOrientation=new s.Je("boolean",!1),this.playbackDelay=new s.Je("number",700),this.environments={activated:new s.Je("boolean",!0),bgColor:new s.Je("string","grey"),bgStyle:new s.Je("string","ball-stick"),center:new s.Je("boolean",!1),cutoff:new s.Je("number",4)},this.color={property:new s.Je("string","element"),min:new s.Je("number",0),max:new s.Je("number",0),transform:new s.Je("string","linear"),palette:new s.Je("string","bwr")},r.includes("element")?this.color.property.validate=(0,s.qP)(r,"color"):this.color.property.validate=(0,s.qP)(r.concat(["element"]),"color"),this.color.transform.validate=(0,s.qP)(["linear","log","sqrt","inverse"],"transform"),this.color.palette.validate=(0,s.qP)(Object.keys(c.s),"palette"),this.environments.bgColor.validate=(0,s.qP)(["grey","CPK","property"],"background atoms coloring"),this.environments.bgStyle.validate=(0,s.qP)(["ball-stick","licorice","hide"],"background atoms style"),this.environments.cutoff.validate=t=>{if(t<0)throw Error("cutoff should be a positive number")},this._positionSettingsModal=e;const{openModal:i,modal:o}=this._createSettingsHTML();this._modal=o,this._modal.shadow.adoptedStyleSheets=t.getRootNode().adoptedStyleSheets,this._openModal=i,t.appendChild(this._openModal),this._bind(r)}getModalElement(t){return(0,l.VT)(t,this._modal.shadow)}get modal(){return this._modal}remove(){this._modal.remove(),this._openModal.remove()}applySettings(t){"packedCell"in t&&(!1!==t.packedCell&&(0,l.R4)("packedCell option has been removed, but it is set to true in the settings"),delete t.packedCell),super.applySettings(t)}_createSettingsHTML(){const t=document.createElement("template");t.innerHTML=`\n
${d.A}
\n `;const e=t.content.firstChild;t.innerHTML='\n';const r=t.content.querySelector(".modal");i()(null!==r&&r instanceof HTMLElement,"modalElement !== null && modalElement instanceof HTMLElement");const n=r.querySelector(".modal-dialog");i()(null!==n&&n instanceof HTMLElement,"modalDialog !== null && modalDialog instanceof HTMLElement"),e.addEventListener("click",(()=>{if(null===n.getAttribute("data-initial-modal-positions-set")){n.setAttribute("data-initial-modal-positions-set","true"),n.parentNode.style.display="block";const{top:t,left:e}=this._positionSettingsModal(n.getBoundingClientRect());n.style.width=n.offsetWidth/1.5+"px",n.style.minWidth="500px",n.style.margin="0",n.style.position="fixed",n.style.top=`${t}px`,n.style.left=`${e}px`}s.open()})),(0,l.eB)(n,".modal-header"),r.addEventListener("keydown",(t=>t.stopPropagation()));const s=new a.A(r);return o.A.initialize(r),{modal:s,openModal:e}}_bind(t){this.atomLabels.bind(this.getModalElement("atom-labels"),"checked");const e=this.getModalElement("shapes");this.shape.bind(e,"multival"),this.spaceFilling.bind(this.getModalElement("space-filling"),"checked"),this.bonds.bind(this.getModalElement("bonds"),"checked"),this.atoms.bind(this.getModalElement("atoms"),"checked"),this.rotation.bind(this.getModalElement("rotation"),"checked"),this.unitCell.bind(this.getModalElement("unit-cell"),"checked"),this.supercell[0].bind(this.getModalElement("supercell-a"),"value"),this.supercell[1].bind(this.getModalElement("supercell-b"),"value"),this.supercell[2].bind(this.getModalElement("supercell-c"),"value");const r=this.getModalElement("atom-color-property");r.options.length=0,t.includes("element")||r.options.add(new Option("element","element"));for(const e of t)r.options.add(new Option(e,e));this.color.property.bind(r,"value"),this.color.transform.bind(this.getModalElement("atom-color-transform"),"value"),this.color.min.bind(this.getModalElement("atom-color-min"),"value"),this.color.max.bind(this.getModalElement("atom-color-max"),"value");const n=this.getModalElement("atom-color-palette");n.options.length=0;for(const t in c.s)n.options.add(new Option(t,t));this.color.palette.bind(n,"value"),this.axes.bind(this.getModalElement("axes"),"value"),this.keepOrientation.bind(this.getModalElement("keep-orientation"),"checked"),this.playbackDelay.bind(this.getModalElement("playback-delay"),"value"),this.environments.activated.bind(this.getModalElement("env-activated"),"checked"),this.environments.bgColor.bind(this.getModalElement("env-bg-color"),"value"),this.environments.bgStyle.bind(this.getModalElement("env-bg-style"),"value"),this.environments.cutoff.bind(this.getModalElement("env-cutoff"),"value"),this.environments.center.bind(this.getModalElement("env-center"),"checked")}}},14761:(t,e,r)=>{"use strict";r.d(e,{C1:()=>b,N2:()=>k,Nh:()=>w,T:()=>x,i3:()=>y,iy:()=>v});var n=r(34961),i=r.n(n),o=r(37821);function a(t,e){return{x:t.x+e.x,y:t.y+e.y,z:t.z+e.z}}function s(t,e){return{x:t.x-e.x,y:t.y-e.y,z:t.z-e.z}}function l(t,e){return{x:t.x*e,y:t.y*e,z:t.z*e}}function c(t,e){return t.x*e.x+t.y*e.y+t.z*e.z}function d(t,e){return{x:t.y*e.z-t.z*e.y,y:t.z*e.x-t.x*e.z,z:t.x*e.y-t.y*e.x}}function u(t,e,r){const n=new o.Quaternion(t.x,t.y,t.z,0);return n.multiplyQuaternions(e.clone(),n),n.multiply(e.clone().inverse()),a({x:n.x,y:n.y,z:n.z},r)}function h(t,e){const r=[],n=[];for(let e=0;e1e-6)throw Error(`orientation must be normalized to 1 for "${e}" shapes`);return""}function g(t){return"number"==typeof t&&Number.isInteger(t)&&t>=0}class v extends f{constructor(t){super(t),this.radius=(t.radius||1)*this.scale}static validateParameters(t){return"radius"in t?"orientation"in t?'"orientation" has no effect on a sphere shape':"number"!=typeof t.radius?'"radius" must be a number in "sphere" shape':"":'"radius" is required for "sphere" shapes'}outputTo3Dmol(t,e=20){const r=p([this.radius,this.radius,this.radius],e),n=r.vertices,i=r.indices,o=[],s=[];for(const t of n){const e=a(t,this.position);o.push(e);const r={x:t.x/Math.pow(this.radius,2),y:t.y/Math.pow(this.radius,2),z:t.z/Math.pow(this.radius,2)};s.push(r)}return{vertexArr:o,normalArr:s,faceArr:i,color:t}}}class b extends f{constructor(t){super(t),i()(t.semiaxes,"data.semiaxes"),this.semiaxes=[this.scale*t.semiaxes[0],this.scale*t.semiaxes[1],this.scale*t.semiaxes[2]]}static validateParameters(t){if(!("semiaxes"in t))return'"semiaxes" is required for "ellipsoid" shapes';if(!Array.isArray(t.semiaxes)||3!==t.semiaxes.length)return'"semiaxes" must be an array with 3 elements for "ellipsoid" shapes';const[e,r,n]=t.semiaxes;if("number"!=typeof e||"number"!=typeof r||"number"!=typeof n)return'"semiaxes" elements must be numbers for "ellipsoid" shapes';if("orientation"in t){const e=m(t.orientation,"ellipsoid");if(""!==e)return e}return""}outputTo3Dmol(t,e=20){const r=p(this.semiaxes,e),n=r.vertices,i=r.indices,o=[],a=[];for(const t of n){const e=u(t,this.orientation,this.position);o.push(e);const r=u({x:t.x/Math.pow(this.semiaxes[0],2),y:t.y/Math.pow(this.semiaxes[1],2),z:t.z/Math.pow(this.semiaxes[2],2)},this.orientation,{x:0,y:0,z:0});a.push(r)}return{vertexArr:o,normalArr:a,faceArr:i,color:t}}}class y extends f{constructor(t){super(t),i()(t.vector,"data.vector"),this.vector=[this.scale*t.vector[0],this.scale*t.vector[1],this.scale*t.vector[2]],this.baseRadius=this.scale*(t.baseRadius||.1),this.headRadius=this.scale*(t.headRadius||.15),this.headLength=this.scale*(t.headLength||.2)}static validateParameters(t){if(!("vector"in t))return'"vector" is required for "arrow" shapes';if(!Array.isArray(t.vector)||3!==t.vector.length)return'"vector" must be an array with 3 elements for "vector" shapes';const[e,r,n]=t.vector;return"number"!=typeof e||"number"!=typeof r||"number"!=typeof n?'"vector" elements must be numbers for "vector" shapes':"orientation"in t?'"orientation" cannot be used on "arrow" shapes. define "vector" instead':""}outputTo3Dmol(t,e=20){const r=function(t,e,r,n,i=20){const[o,s,u]=t,h={x:o,y:s,z:u},f=Math.sqrt(o*o+s*s+u*u);n>f&&(n=f);const p={x:h.x*(1-n/f),y:h.y*(1-n/f),z:h.z*(1-n/f)},m=l(h,1/f);let g;g=0!==m.x||0!==m.y?{x:0,y:0,z:1}:{x:0,y:1,z:0};let v=a(g,l(m,-c(g,m)));v=l(v,1/Math.sqrt(c(v,v)));const b=d(v,m),y=[];for(let t=0;t=_&&(r.addCustom(t),t.vertexArr.length=0,Array.isArray(t.normalArr)&&(t.normalArr.length=0),Array.isArray(t.faceArr)&&(t.faceArr.length=0),Array.isArray(t.color)&&(t.color.length=0)),t.faceArr&&e.faceArr&&t.vertexArr){const r=null!==(n=t.vertexArr.length)&&void 0!==n?n:0,i=e.faceArr.map((t=>t+r));t.faceArr.push(...i)}if(t.vertexArr&&e.vertexArr&&(null===(i=t.vertexArr)||void 0===i||i.push(...e.vertexArr)),t.normalArr&&e.normalArr&&(null===(o=t.normalArr)||void 0===o||o.push(...e.normalArr)),e.vertexArr&&Array.isArray(t.color)){const r=e.color&&!Array.isArray(e.color)?e.color:16777215,n=Array(null!==(a=e.vertexArr.length)&&void 0!==a?a:0).fill(r);t.color.push(...n)}}},79352:(t,e,r)=>{"use strict";r.d(e,{MoleculeViewer:()=>v});var n=r(34961),i=r.n(n),o=r(37821);const a={H:.37,He:.32,Li:1.34,Be:.9,B:.82,C:.77,N:.75,O:.73,F:.71,Ne:.69,Na:1.54,Mg:1.3,Al:1.18,Si:1.11,P:1.06,S:1.02,Cl:.99,Ar:.97,K:1.96,Ca:1.74,Sc:1.44,Ti:1.56,V:1.25,Mn:1.39,Fe:1.25,Co:1.26,Ni:1.21,Cu:1.38,Zn:1.31,Ga:1.26,Ge:1.22,Se:1.16,Br:1.14,Kr:1.1,Rb:2.11,Sr:1.92,Y:1.62,Zr:1.48,Nb:1.37,Mo:1.45,Tc:1.56,Ru:1.26,Rh:1.35,Pd:1.31,Ag:1.53,Cd:1.48,In:1.44,Sn:1.41,Sb:1.38,Te:1.35,I:1.33,Xe:1.3,Cs:2.25,Ba:1.98,Lu:1.6,Hf:1.5,Ta:1.38,W:1.46,Re:1.59,Os:1.44,Ir:1.37,Pt:1.28,Au:1.44,Hg:1.49,Tl:1.48,Pb:1.47,Bi:1.46,Rn:1.45};function s(t){return a[t]||1.6}function l(t,e){if("X"===t.elem||"X"===e.elem)return!1;let r=s(t.elem)+s(e.elem);r+=.25,r*=r;let n=t.x-e.x;if(n*=n,n>r)return!1;let i=t.y-e.y;if(i*=i,i>r)return!1;let o=t.z-e.z;if(o*=o,o>r)return!1;const a=n+i+o;return!(isNaN(a)||a<.5||a>r)}function c(t,e){for(let r=0;r-1&&-1===navigator.userAgent.indexOf("CriOS")&&-1===navigator.userAgent.indexOf("FxiOS");function g(){return m?.87:.7}class v{constructor(t,e){const r=(0,u.V6)(t),n=document.createElement("div");r.appendChild(n),n.style.setProperty("height","100%"),this._shadow=n.attachShadow({mode:"open"}),this._root=document.createElement("div"),this._shadow.appendChild(this._root),this._root.style.position="relative",this._root.style.width="100%",this._root.style.height="100%";const a=o.createViewer(this._root,{antialias:!0,defaultcolors:o.elementColors.Jmol,backgroundColor:"0xffffff",backgroundAlpha:0,disableFog:!0,orthographic:!0});if(void 0===a)throw Error("unable to create WebGL canvas");this._viewer=a,this.onselect=()=>{},this._cellInfo=document.createElement("span"),this._cellInfo.classList.add("chsp-cell-info","chsp-hide-if-no-cell","badge","bg-light","text-dark"),this._root.appendChild(this._cellInfo);const s=new CSSStyleSheet,l=new CSSStyleSheet,c=new CSSStyleSheet,d=new CSSStyleSheet;this._styles={noCell:s,noEnvs:l,noShape:c,noProperties:d},this._shadow.adoptedStyleSheets=[...r.getRootNode().adoptedStyleSheets,s,l,c,d],this._options=new f.O(this._root,(t=>this.positionSettingsModal(t)),e),this._options.modal.shadow.adoptedStyleSheets=[...this._options.modal.shadow.adoptedStyleSheets,s,l,c,d],this._colorReset=this._options.getModalElement("atom-color-reset"),this._colorMoreOptions=this._options.getModalElement("atom-color-more-options"),this._colorMoreOptions.disabled=!0,this._connectOptions(),this._trajectoryOptions=this._options.getModalElement("trajectory-settings-group"),this.positionSettingsModal=t=>{const e=this._root.getBoundingClientRect();return{left:e.left+e.width/2-t.width/2,top:e.top+20}},this._root.addEventListener("wheel",(t=>{if(t.isTrusted){t.preventDefault(),t.stopImmediatePropagation();const e=new Event("wheel");Object.assign(e,{ctrlKey:!0,detail:t.detail,wheelDelta:t.wheelDelta,pageX:t.pageX,pageY:t.pageY}),i()(t.target,"event.target"),t.target.dispatchEvent(e)}}),{capture:!0}),window.addEventListener("resize",(()=>this.resize())),window.requestAnimationFrame((()=>{window.dispatchEvent(new Event("resize"))}))}refreshOptions(t,e){const r=this._options.modal.shadow.adoptedStyleSheets;this._options.remove(),this._options=new f.O(this._root,(t=>this.positionSettingsModal(t)),e),this._options.modal.shadow.adoptedStyleSheets=r,this._colorReset=this._options.getModalElement("atom-color-reset"),this._colorMoreOptions=this._options.getModalElement("atom-color-more-options"),this._trajectoryOptions=this._options.getModalElement("trajectory-settings-group"),this._colorReset.disabled=!0,this._colorMoreOptions.disabled=!0,this._connectOptions(),t?this._options.environments.activated.enable():this._options.environments.activated.disable()}remove(){null!==this._root.parentElement&&(this._root.parentElement.innerHTML=""),this._options.remove()}resize(){this._viewer.resize(),this._updateColorBar()}natoms(){return void 0===this._current?void 0:this._current.structure.size}set environments(t){this._environments=t}load(t,e,r={},n){let a,s,l,c,u;if(this.resize(),this._properties=e,void 0!==this._highlighted&&(a=this._defaultCutoff(this._highlighted.center)),this._environments=r.environments,s=void 0===r.keepOrientation?this._options.keepOrientation.value:r.keepOrientation,void 0===r.supercell?[l,c,u]=[this._options.supercell[0].value,this._options.supercell[1].value,this._options.supercell[2].value]:([l,c,u]=r.supercell,this._options.supercell[0].value=l,this._options.supercell[1].value=c,this._options.supercell[2].value=u),void 0===this._initialSupercell&&(this._initialSupercell=[l,c,u],this._resetSupercell.innerHTML=`reset ${l}x${c}x${u} supercell`),void 0===t.cell?this._styles.noCell.replaceSync(".chsp-hide-if-no-cell { display: none; }"):this._styles.noCell.replaceSync(""),this._showSupercellInfo(),void 0!==r.trajectory&&r.trajectory?this._trajectoryOptions.style.display="block":this._trajectoryOptions.style.display="none",this._options.unitCell.value&&void 0!==this._current&&this._viewer.removeUnitCell(this._current.model),this._viewer.removeAllModels(),void 0!==this._current)for(const t of this._current.atomLabels)this._viewer.removeLabel(t);void 0!==this._highlighted&&(this._viewer.removeModel(this._highlighted.model),this._highlighted=void 0),this._current={model:this._viewer.addModel(),structure:t,atomLabels:[]},function(t,e){if(void 0!==e.cell){const r=e.cell,n=new o.Matrix3(r[0],r[3],r[6],r[1],r[4],r[7],r[2],r[5],r[8]);t.setCrystMatrix(n)}const r=[];for(let t=0;t{n&&n()}))}_setEnvironmentInteractions(){if(void 0===this._environments)return;const t=this._environments.filter((t=>void 0!==t)).map((t=>t.center));for(const t of this._viewer.selectedAtoms({}))t.clickable=!1,t.hoverable=!1;i()(void 0!==this._current,"this._current !== undefined"),this._viewer.setClickable({model:this._current.model,index:t},!0,(t=>this._selectAtom(t))),this._setHoverable(t)}highlight(t){let e;void 0!==this._highlighted&&(e=this._defaultCutoff(this._highlighted.center)),this._changeHighlighted(t,e),this._updateStyle();const r=this._options.environments.center.value;void 0!==this._highlighted&&r&&(this._options.keepOrientation.value||this._resetView(),this._centerView()),this._viewer.render()}applySettings(t){this._options.applySettings(t)}saveSettings(){return this._options.saveSettings()}onSettingChange(t){this._options.onSettingChange(t)}exportPNG(){return this._viewer.pngURI()}_setHoverable(t){i()(void 0!==this._current,"this._current !== undefined"),this._viewer.setHoverDuration(0);const e=this.natoms();i()(void 0!==e,"n_atoms !== undefined");const r=new Map;this._viewer.setHoverable({model:this._current.model,index:t},!0,(t=>{if(i()(void 0!==t.index,"atom.index !== undefined"),void 0!==r.get(t.index))return;const e=this._viewer.addModel();e.addAtoms([t]),e.setStyle({},this._centralStyle(.3));const n=e.selectedAtoms({});n[0].clickable=!1,n[0].hoverable=!1,r.set(t.index,e),this._viewer.render()}),(t=>{i()(void 0!==t.index,"atom.index !== undefined");const e=r.get(t.index);void 0!==e&&(this._viewer.removeModel(e),r.delete(t.index),this._viewer.render())}))}_connectOptions(){const t=()=>{this._updateStyle(),this._viewer.render()};this._options.spaceFilling.onchange.push(t),this._options.bonds.onchange.push(t),this._options.atoms.onchange.push(t),this._options.atomLabels.onchange.push((t=>{if(void 0!==this._current)if(t){i()(0===this._current.atomLabels.length,"this._current.atomLabels.length === 0");const t=this._current.structure;for(let e=0;ethis._addAxes(t))),this._options.rotation.onchange.push((t=>{t?this._viewer.spin("vy"):this._viewer.spin(!1)})),this._options.unitCell.onchange.push((t=>{void 0!==this._current&&(t?this._viewer.addUnitCell(this._current.model,{box:{color:"black"},astyle:{hidden:!0},bstyle:{hidden:!0},cstyle:{hidden:!0}}):this._viewer.removeUnitCell(this._current.model),this._viewer.render())})),this._options.shape.onchange.push((()=>{void 0!==this._current&&(this._updateStyle(),this._viewer.render())}));const e=()=>{if(this._showSupercellInfo(),void 0===this._current)return;const t=this._current.model.selectedAtoms({});this._current.model.removeAtoms(t.splice(this._current.structure.size));const e=this._options.supercell[0].value,r=this._options.supercell[1].value,n=this._options.supercell[2].value;if(1===e&&1===r&&1===n||this._viewer.replicateUnitCell(this._options.supercell[0].value,this._options.supercell[1].value,this._options.supercell[2].value,this._current.model),d(this._current.model.selectedAtoms({})),void 0!==this._highlighted){const t=this._defaultCutoff(this._highlighted.center);this._changeHighlighted(this._highlighted.center,t)}this._environmentsEnabled()&&this._setEnvironmentInteractions(),this._updateStyle(),this._viewer.render()};this._options.supercell[0].onchange.push(e),this._options.supercell[1].onchange.push(e),this._options.supercell[2].onchange.push(e),this._options.environments.bgColor.onchange.push(t),this._options.environments.bgStyle.onchange.push(t),this._options.environments.cutoff.onchange.push((()=>{if(void 0!==this._highlighted){const t=this._defaultCutoff(this._highlighted.center);this._changeHighlighted(this._highlighted.center,t)}t()})),this._options.environments.center.onchange.push((t=>{this._options.keepOrientation.value||this._resetView(),t&&this._centerView(),this._viewer.render()})),this._options.environments.activated.onchange.push((e=>{if(this._enableEnvironmentSettings(e),e){i()(void 0!==this._lastHighlighted,"this._lastHighlighted !== undefined"),this._options.environments.cutoff.value=this._lastHighlighted.cutoff;const t=this._lastHighlighted.center,e=this._defaultCutoff(t);this._changeHighlighted(t,e)}else i()(void 0!==this._highlighted,"this._highlighted !== undefined"),this._viewer.removeModel(this._highlighted.model),this._lastHighlighted={center:this._highlighted.center,cutoff:this._options.environments.cutoff.value};t()})),this._options.color.property.onchange.push((()=>{const e=this._options.color.property.value;if("element"!==e){this._options.color.transform.enable(),this._options.color.transform.value="linear",this._options.color.min.enable(),this._options.color.max.enable(),this._colorReset.disabled=!1,this._colorMoreOptions.disabled=!1,this._options.color.palette.enable();const t=this._colorValues(e,"linear");t.some((t=>null===t))&&(0,u.R4)("The selected structure has undefined properties for some atoms, these atoms will be colored in light gray.");const{max:r,min:n}=(0,u.GI)(t);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=r,this._options.color.min.value=n,this._setScaleStep([n,r])}else this._options.color.transform.disable(),this._options.color.min.disable(),this._options.color.max.disable(),this._options.getModalElement("atom-color-extra").classList.contains("show")&&this._colorMoreOptions.click(),this._colorReset.disabled=!0,this._colorMoreOptions.disabled=!0,this._options.color.palette.disable(),this._viewer.setColorByElement({},o.elementColors.Jmol);this._updateColorBar(),t()}));const r=e=>{const r=this._options.color.min.value,n=this._options.color.max.value;if(r>n)return(0,u.R4)("The inserted min and max values in color are such that min > max! The last inserted value was reset."),void("min"===e?this._options.color.min.reset():this._options.color.max.reset());this._setScaleStep([r,n]),this._updateColorBar(),t()};this._options.color.transform.onchange.push((()=>{const e=this._options.color.property.value;i()("element"!==e,"property !== 'element'");const r=this._options.color.transform.value,n=this._colorValues(e,r),{min:o,max:a}=(0,u.GI)(n);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=a,this._options.color.min.value=o,this._setScaleStep([o,a]),this._updateColorBar(),t()})),this._options.color.min.onchange.push((()=>{r("min"),t()})),this._options.color.max.onchange.push((()=>{r("max"),t()})),this._colorReset.addEventListener("click",(()=>{const e=JSON.parse(JSON.stringify(this._properties))[this._options.color.property.value].filter((t=>!isNaN(Number(t)))),[r,n]=[Math.min(...e),Math.max(...e)];this._options.color.min.value=r,this._options.color.max.value=n,this._setScaleStep([r,n]),this._updateColorBar(),t()})),this._options.color.palette.onchange.push((()=>{this._updateColorBar(),t()})),this._resetEnvCutoff=this._options.getModalElement("env-reset"),this._resetEnvCutoff.onclick=()=>{i()(void 0!==this._highlighted,"this._highlighted !== undefined"),this._options.environments.cutoff.value=this._defaultCutoff(this._highlighted.center),t()},this._options.getModalElement("align-x").onclick=()=>this._viewAlong([1,0,0]),this._options.getModalElement("align-y").onclick=()=>this._viewAlong([0,1,0]),this._options.getModalElement("align-z").onclick=()=>this._viewAlong([0,0,1]),this._options.getModalElement("align-a").onclick=()=>{if(void 0===this._current||void 0===this._current.structure.cell)return;const t=this._current.structure.cell,e=[t[0],t[1],t[2]];this._viewAlong(e)},this._options.getModalElement("align-b").onclick=()=>{if(void 0===this._current||void 0===this._current.structure.cell)return;const t=this._current.structure.cell,e=[t[3],t[4],t[5]];this._viewAlong(e)},this._options.getModalElement("align-c").onclick=()=>{if(void 0===this._current||void 0===this._current.structure.cell)return;const t=this._current.structure.cell,e=[t[6],t[7],t[8]];this._viewAlong(e)},this._resetSupercell=this._options.getModalElement("reset-supercell"),this._resetSupercell.onclick=()=>{i()(void 0!==this._initialSupercell,"this._initialSupercell !== undefined"),this._options.supercell[0].value=this._initialSupercell[0],this._options.supercell[1].value=this._initialSupercell[1],this._options.supercell[2].value=this._initialSupercell[2]},this._root.ondblclick=()=>{this._resetView(),this._options.environments.center.value&&this._centerView(),this._viewer.render()}}_selectAtom(t){i()(void 0!==t.serial,"atom.serial !== undefined"),this.onselect(t.serial)}_updateStyle(){void 0!==this._current&&(""!==this._options.shape.value&&this._addShapes(),this._environmentsEnabled()?(i()(void 0!==this._highlighted,"this._highlighted !== undefined"),this._current.model.setStyle({},this._hiddenStyle()),this._current.model.setStyle({index:this._highlighted.center},this._centralStyle(.4),!0),this._highlighted.model.setStyle({},this._mainStyle())):this._current.model.setStyle({},this._mainStyle()))}_addAxes(t){if(void 0!==this._axes&&(this._viewer.removeShape(this._axes[0].arrow),this._viewer.removeLabel(this._axes[0].label),this._viewer.removeShape(this._axes[1].arrow),this._viewer.removeLabel(this._axes[1].label),this._viewer.removeShape(this._axes[2].arrow),this._viewer.removeLabel(this._axes[2].label),this._axes=void 0),"off"===t);else if("xyz"===t)this._axes=[this._addLabeledArrow([2,0,0],"red","X"),this._addLabeledArrow([0,2,0],"green","Y"),this._addLabeledArrow([0,0,2],"blue","Z")];else if("abc"===t){if(void 0===this._current||void 0===this._current.structure.cell)return;const t=this._current.structure.cell,e=[t[0],t[1],t[2]],r=[t[3],t[4],t[5]],n=[t[6],t[7],t[8]];this._axes=[this._addLabeledArrow(e,"red","A"),this._addLabeledArrow(r,"green","B"),this._addLabeledArrow(n,"blue","C")]}this._viewer.render()}_addShapes(){if(void 0===this._current)return;if(""===this._options.shape.value)return;this._viewer.removeAllShapes(),this._options.unitCell.value&&this._viewer.addUnitCell(this._current.model,{box:{color:"black"},astyle:{hidden:!0},bstyle:{hidden:!0},cstyle:{hidden:!0}}),this._addAxes(this._options.axes.value),i()(0===this._current.atomLabels.length,"this._current.atomLabels.length === 0");const t=this._current.structure;i()(!(void 0===t.shapes),"!(structure.shapes === undefined)");const e=this._options.shape.value.split(","),r={vertexArr:[],normalArr:[],faceArr:[],color:[]},n=this._colorFunction(),a={};for(const s of e){if(""===s)continue;i()(s in t.shapes,"shape in structure.shapes");const e=t.shapes[s];let l=this._options.supercell[0].value,c=this._options.supercell[1].value,d=this._options.supercell[2].value,u=this._current.structure.cell;void 0===u&&(u=[1,0,0,0,1,0,0,0,1],(l>1||c>1||d>1)&&(l=1,c=1,d=1));for(let s=0;s0&&this._viewer.addCustom(r),this._viewer.render()}_mainStyle(){const t={};return this._options.atoms.value&&(t.sphere={scale:this._options.spaceFilling.value?1:.22,colorfunc:this._colorFunction()}),this._options.bonds.value&&(t.stick={radius:.15,colorfunc:this._colorFunction()}),t}_colorValues(t,e){i()(void 0!==this._properties,"this._properties !== undefined"),i()(Object.keys(this._properties).includes(t),"Object.keys(this._properties).includes(property)");let r=JSON.parse(JSON.stringify(this._properties[t])),n=t=>t;return"log"===e?n=Math.log10:"sqrt"===e?n=Math.sqrt:"inverse"===e&&(n=t=>1/t),r=r.map((t=>null===t||isNaN(t)?t:n(t))),r}_colorFunction(){if(void 0===this._properties)return;const t=this._options.color.property.value;if("element"===t)return;const e=this._options.color.transform.value,r=this._colorValues(t,e),n=this._options.color.min.value,a=this._options.color.max.value,s=p.s[this._options.color.palette.value],l=[];for(let t=0;t{i()(void 0!==t.serial,"atom.serial !== undefined");const e=r[t.serial];return null===e?14540253:isNaN(e)?2236962:Number.isFinite(n)&&Number.isFinite(a)?c.valueToHex(e):2236962}}_hiddenStyle(){const t={},e=this._options.environments.bgStyle.value;"hide"===e||("licorice"===e||"ball-stick"===e?(t.stick={radius:.149,opacity:g(),hidden:!this._options.bonds.value},"ball-stick"===e&&""===this._options.shape.value&&(t.sphere={scale:this._options.spaceFilling.value?.999:.219,opacity:g()})):(0,u.HB)());const r=this._options.environments.bgColor.value;return"CPK"===r||("grey"===r?(void 0!==t.stick&&(t.stick.color=8421504),void 0!==t.sphere&&(t.sphere.color=8421504)):"property"===r?(void 0!==t.stick&&(t.stick={radius:.149,opacity:g(),hidden:!this._options.bonds.value,colorfunc:this._colorFunction()}),void 0!==t.sphere&&(t.sphere={scale:this._options.spaceFilling.value?.999:.219,opacity:g(),colorfunc:this._colorFunction()})):(0,u.HB)()),t}_centralStyle(t){return{sphere:{scale:t,color:"green",opacity:g()}}}_showSupercellInfo(){const t=this._options.supercell[0].value,e=this._options.supercell[1].value,r=this._options.supercell[2].value;this._cellInfo.innerText=1!==t||1!==e||1!==r?`${t}x${e}x${r} supercell`:""}_environmentsEnabled(){return void 0!==this._highlighted&&!this._resetEnvCutoff.disabled}_enableEnvironmentSettings(t){const e=this._options.getModalElement("env-activated").nextElementSibling;i()(null!==e,"toggle !== null");const r=this._resetEnvCutoff;if(t){if(this._environmentsEnabled())return;r.disabled=!1,e.innerText="Disable",this._options.environments.cutoff.enable(),this._options.environments.bgStyle.enable(),this._options.environments.bgColor.enable()}else{if(!this._environmentsEnabled())return;r.disabled=!0,e.innerText="Enable",this._options.environments.cutoff.disable(),this._options.environments.bgStyle.disable(),this._options.environments.bgColor.disable()}}_defaultCutoff(t){i()(void 0!==this._environments,"this._environments !== undefined");const e=this._environments[t];return i()(void 0!==e,"environment !== undefined"),e.cutoff}_changeHighlighted(t,e){if(void 0!==this._highlighted&&this._viewer.removeModel(this._highlighted.model),void 0===t)this._options.environments.cutoff.value=0,this._highlighted=void 0;else{if(void 0===this._environments)throw Error("can not highlight an atom without having a list of environments");const r=this._environments[t];if(void 0===r)throw Error(`can not highlight atom ${t}: it is not part of the list of environments`);const n=this._options.environments.cutoff.value;void 0!==e&&e!==n||(this._options.environments.cutoff.value=r.cutoff);const i={or:[{index:t},{within:{distance:this._options.environments.cutoff.value,sel:{index:t}}}]};this._highlighted={model:this._viewer.createModelFrom(i),center:t},this._highlighted.model.setStyle({},this._mainStyle())}}_resetView(){this._viewer.zoomTo(),this._viewer.zoom(2),this._viewer.setSlab(-1e3,1e3)}_centerView(){void 0!==this._highlighted&&void 0!==this._current&&this._viewer.center({index:this._highlighted.center,model:this._current.model})}_viewAlong(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]),r=Math.acos(t[2]/e),n=[t[1]/e*Math.sin(r/2),-t[0]/e*Math.sin(r/2),0,Math.cos(r/2)],i=this._viewer.getView();i[4]=n[0],i[5]=n[1],i[6]=n[2],i[7]=n[3],this._viewer.setView(i)}_addLabeledArrow(t,e,r){const n=new o.Vector3(t[0],t[1],t[2]);return{arrow:this._viewer.addArrow({start:new o.Vector3(0,0,0),end:n,radius:.1,color:e,midpos:-1}),label:this._viewer.addLabel(r,{position:n,inFront:!0,fontColor:"black",fontSize:14,showBackground:!1})}}_setScaleStep(t){if(void 0!==t){const e=Math.round((t[1]-t[0])/20*Math.pow(10,10))/Math.pow(10,10),r=this._options.getModalElement("atom-color-min"),n=this._options.getModalElement("atom-color-max");r.step=`${e}`,n.step=`${e}`}}_colorTitle(){let t=this._options.color.property.value;switch(this._options.color.transform.value){case"inverse":t=`(${t})⁻¹`;break;case"log":t=`log10(${t})`;break;case"sqrt":t=`√(${t})`}return t}_addColorBar(){var t,e;const r=this._options.color.palette.value,n=this._colorTitle(),a=null===(t=this._viewer.container)||void 0===t?void 0:t.clientWidth,s=null===(e=this._viewer.container)||void 0===e?void 0:e.clientHeight;i()(void 0!==a&&void 0!==s,"viewerWidth !== undefined && viewerHeight !== undefined");const l=s-80,c=document.createElement("canvas");c.width=20,c.height=l;const d=p.s[r],u=c.getContext("2d");if(!u)throw new Error("Could not get 2D context from canvas");const h=u.createLinearGradient(0,l,0,0);for(let t=0;t0){if(t<1e4&&t>.009){if(Number.isInteger(t))return t.toString();{let e=t.toFixed(3).substring(0,4);return"."===e[3]&&(e=e.substring(0,3)),e}}return t.toExponential(0).replace("+","")}if(t>-1e3&&t<-.09){if(Number.isInteger(t))return t.toString();{let e=t.toFixed(3).substring(0,4);return"."===e[3]&&(e=e.substring(0,3)),e}}return t.toExponential(0).replace("+","")}},91683:(t,e,r)=>{"use strict";r.d(e,{eK:()=>l,GI:()=>m,El:()=>b,HL:()=>f,Nl:()=>u,VT:()=>h,V6:()=>v,o:()=>p,Lz:()=>d,eB:()=>o,R4:()=>s,HB:()=>g});var n=r(34961),i=r.n(n);function o(t,e){const r=t.querySelector(e);if(null===r)throw Error(`no element matching '${e}'`);const n=e=>{const r=t.dragOffset;i()(void 0!==r,"offset !== undefined");const n=e.clientX-r.x,o=e.clientY-r.y;t.style.left=`${n}px`,t.style.top=`${o}px`},o=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",o)};r.addEventListener("mousedown",(e=>{const r=e;t.dragOffset={x:r.clientX-t.offsetLeft,y:r.clientY-t.offsetTop},t.style.left=`${t.offsetLeft}px`,t.style.top=`${t.offsetTop}px`,t.style.width=`${t.offsetWidth}px`,t.style.margin="0",t.style.position="absolute",document.addEventListener("mousemove",n,!1),document.addEventListener("mouseup",o,!1)}),!1)}const a=[t=>console.warn(t)];function s(t){for(const e of a)e(t)}function l(t){a.push(t)}const c=["red","yellow","green","blue","orange","aqua","purple","teal","silver"];function d(t){for(const e of c)if(!t.includes(e))return e;throw Error("required more colors than available")}function u(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}function h(t,e=document){let r;if(r=e instanceof HTMLElement?e.querySelector(`#${t}`):e.getElementById(t),null===r)throw Error(`unable to get element with id ${t}`);return r}function f(t){return{[Symbol.iterator]:function*(){let e=0;for(const r of t)yield[e,r],e++}}}function p(t,e){i()(t.size>=1,"map.size >= 1");const r=t.keys(),n=r.next().value;return void 0!==e&&n===e?(i()(t.size>=2,"map.size >= 2"),r.next().value):n}function m(t){let e=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(const n of t)null!==n&&(n>e&&isFinite(n)&&(e=n),n>>1,t[r]===e)return r;t[r]{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%272%27 fill=%27%23fff%27/%3e%3c/svg%3e"},35782:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%2386b7fe%27/%3e%3c/svg%3e"},54718:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%23fff%27/%3e%3c/svg%3e"},57154:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27rgba%280, 0, 0, 0.25%29%27/%3e%3c/svg%3e"},35372:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27 width=%2712%27 height=%2712%27 fill=%27none%27 stroke=%27%23dc3545%27%3e%3ccircle cx=%276%27 cy=%276%27 r=%274.5%27/%3e%3cpath stroke-linejoin=%27round%27 d=%27M5.8 3.6h.4L6 6.5z%27/%3e%3ccircle cx=%276%27 cy=%278.2%27 r=%27.6%27 fill=%27%23dc3545%27 stroke=%27none%27/%3e%3c/svg%3e"},57249:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23000%27%3e%3cpath d=%27M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z%27/%3e%3c/svg%3e"},88832:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%230c63e4%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},67830:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23212529%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},75932:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z%27/%3e%3c/svg%3e"},11144:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},35531:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3e%3cpath fill=%27none%27 stroke=%27%23343a40%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e"},14274:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27M6 10h8%27/%3e%3c/svg%3e"},45419:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27m6 10 3 3 6-6%27/%3e%3c/svg%3e"},17914:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%280, 0, 0, 0.55%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e"},36366:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%28255, 255, 255, 0.55%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e"},48487:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 8 8%27%3e%3cpath fill=%27%23198754%27 d=%27M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z%27/%3e%3c/svg%3e"},75208:(t,e,r)=>{"use strict";var n=r(97905),i="undefined"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=k(t,360),e=k(e,100),r=k(r,100),0===e)n=i=o=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=a(l,s,t+1/3),i=a(l,s,t),o=a(l,s,t-1/3)}return{r:255*n,g:255*i,b:255*o}}(n.h,a,l),c=!0,d="hsl"),n.hasOwnProperty("a")&&(o=n.a)),o=_(o),{ok:c,format:n.format||d,r:Math.min(255,Math.max(i.r,0)),g:Math.min(255,Math.max(i.g,0)),b:Math.min(255,Math.max(i.b,0)),a:o};var u,h,f}(i);this._originalInput=i,this._r=a.r,this._g=a.g,this._b=a.b,this._a=a.a,this._roundA=Math.round(100*this._a)/100,this._format=o.format||a.format,this._gradientType=o.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=a.ok}function i(t,e,r){t=k(t,255),e=k(e,255),r=k(r,255);var n,i,o=Math.max(t,e,r),a=Math.min(t,e,r),s=(o+a)/2;if(o==a)n=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case t:n=(e-r)/l+(e>1)+720)%360;--e;)i.h=(i.h+o)%360,a.push(n(i));return a}function y(t,e){e=e||6;for(var r=n(t).toHsv(),i=r.h,o=r.s,a=r.v,s=[],l=1/e;e--;)s.push(n({h:i,s:o,v:a})),a=(a+l)%1;return s}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,n=this.toRgb();return t=n.r/255,e=n.g/255,r=n.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=_(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=o(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=o(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),n=Math.round(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=i(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),n=Math.round(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return a(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var o=[M(Math.round(t).toString(16)),M(Math.round(e).toString(16)),M(Math.round(r).toString(16)),M(C(n))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*k(this._r,255))+"%",g:Math.round(100*k(this._g,255))+"%",b:Math.round(100*k(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*k(this._r,255))+"%, "+Math.round(100*k(this._g,255))+"%, "+Math.round(100*k(this._b,255))+"%)":"rgba("+Math.round(100*k(this._r,255))+"%, "+Math.round(100*k(this._g,255))+"%, "+Math.round(100*k(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(w[a(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+s(this._r,this._g,this._b,this._a),r=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var o=n(t);r="#"+s(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return n(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(u,arguments)},brighten:function(){return this._applyModification(h,arguments)},darken:function(){return this._applyModification(f,arguments)},desaturate:function(){return this._applyModification(l,arguments)},saturate:function(){return this._applyModification(c,arguments)},greyscale:function(){return this._applyModification(d,arguments)},spin:function(){return this._applyModification(p,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(b,arguments)},complement:function(){return this._applyCombination(m,arguments)},monochromatic:function(){return this._applyCombination(y,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(g,[3])},tetrad:function(){return this._applyCombination(g,[4])}},n.fromRatio=function(e,r){if("object"==t(e)){var i={};for(var o in e)e.hasOwnProperty(o)&&(i[o]="a"===o?e[o]:S(e[o]));e=i}return n(e,r)},n.equals=function(t,e){return!(!t||!e)&&n(t).toRgbString()==n(e).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},n.mix=function(t,e,r){r=0===r?0:r||50;var i=n(t).toRgb(),o=n(e).toRgb(),a=r/100;return n({r:(o.r-i.r)*a+i.r,g:(o.g-i.g)*a+i.g,b:(o.b-i.b)*a+i.b,a:(o.a-i.a)*a+i.a})},n.readability=function(t,e){var r=n(t),i=n(e);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)},n.isReadable=function(t,e,r){var i,o,a,s,l,c=n.readability(t,e);switch(o=!1,(a=r,"AA"!==(s=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==s&&(s="AA"),"small"!==(l=(a.size||"small").toLowerCase())&&"large"!==l&&(l="small"),i={level:s,size:l}).level+i.size){case"AAsmall":case"AAAlarge":o=c>=4.5;break;case"AAlarge":o=c>=3;break;case"AAAsmall":o=c>=7}return o},n.mostReadable=function(t,e,r){var i,o,a,s,l=null,c=0;o=(r=r||{}).includeFallbackColors,a=r.level,s=r.size;for(var d=0;dc&&(c=i,l=n(e[d]));return n.isReadable(t,l,{level:a,size:s})||!o?l:(r.includeFallbackColors=!1,n.mostReadable(t,["#fff","#000"],r))};var x=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},w=n.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(x);function _(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function k(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function A(t){return Math.min(1,Math.max(0,t))}function T(t){return parseInt(t,16)}function M(t){return 1==t.length?"0"+t:""+t}function S(t){return t<=1&&(t=100*t+"%"),t}function C(t){return Math.round(255*parseFloat(t)).toString(16)}function E(t){return T(t)/255}var L,z,O,D=(z="[\\s|\\(]+("+(L="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+L+")[,|\\s]+("+L+")\\s*\\)?",O="[\\s|\\(]+("+L+")[,|\\s]+("+L+")[,|\\s]+("+L+")[,|\\s]+("+L+")\\s*\\)?",{CSS_UNIT:new RegExp(L),rgb:new RegExp("rgb"+z),rgba:new RegExp("rgba"+O),hsl:new RegExp("hsl"+z),hsla:new RegExp("hsla"+O),hsv:new RegExp("hsv"+z),hsva:new RegExp("hsva"+O),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function I(t){return!!D.CSS_UNIT.exec(t)}return n}()},23648:t=>{"use strict";t.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:t=>{"use strict";t.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:t=>{"use strict";t.exports=JSON.parse('["normal","italic","oblique"]')},99803:t=>{"use strict";t.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:t=>{"use strict";t.exports=JSON.parse('["inherit","initial","unset"]')},94316:t=>{"use strict";t.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={id:t,exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var r in e)__webpack_require__.o(e,r)&&!__webpack_require__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.b=document.baseURI||self.location.href,__webpack_require__.nc=void 0;var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ChemiscopeApp:()=>Bl});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{afterMain:()=>x,afterRead:()=>v,afterWrite:()=>k,applyStyles:()=>L,arrow:()=>J,auto:()=>o,basePlacements:()=>a,beforeMain:()=>b,beforeRead:()=>m,beforeWrite:()=>w,bottom:()=>r,clippingParents:()=>c,computeStyles:()=>et,createPopper:()=>Lt,createPopperBase:()=>Et,createPopperLite:()=>zt,detectOverflow:()=>gt,end:()=>l,eventListeners:()=>nt,flip:()=>vt,hide:()=>xt,left:()=>i,main:()=>y,modifierPhases:()=>A,offset:()=>wt,placements:()=>p,popper:()=>u,popperGenerator:()=>Ct,popperOffsets:()=>_t,preventOverflow:()=>kt,read:()=>g,reference:()=>h,right:()=>n,start:()=>s,top:()=>e,variationPlacements:()=>f,viewport:()=>d,write:()=>_});var e="top",r="bottom",n="right",i="left",o="auto",a=[e,r,n,i],s="start",l="end",c="clippingParents",d="viewport",u="popper",h="reference",f=a.reduce((function(t,e){return t.concat([e+"-"+s,e+"-"+l])}),[]),p=[].concat(a,[o]).reduce((function(t,e){return t.concat([e,e+"-"+s,e+"-"+l])}),[]),m="beforeRead",g="read",v="afterRead",b="beforeMain",y="main",x="afterMain",w="beforeWrite",_="write",k="afterWrite",A=[m,g,v,b,y,x,w,_,k];function T(t){return t?(t.nodeName||"").toLowerCase():null}function M(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function S(t){return t instanceof M(t).Element||t instanceof Element}function C(t){return t instanceof M(t).HTMLElement||t instanceof HTMLElement}function E(t){return"undefined"!=typeof ShadowRoot&&(t instanceof M(t).ShadowRoot||t instanceof ShadowRoot)}const L={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var r=e.styles[t]||{},n=e.attributes[t]||{},i=e.elements[t];C(i)&&T(i)&&(Object.assign(i.style,r),Object.keys(n).forEach((function(t){var e=n[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],i=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:r[t]).reduce((function(t,e){return t[e]="",t}),{});C(n)&&T(n)&&(Object.assign(n.style,o),Object.keys(i).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function z(t){return t.split("-")[0]}var O=Math.max,D=Math.min,I=Math.round;function R(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function F(){return!/^((?!chrome|android).)*safari/i.test(R())}function P(t,e,r){void 0===e&&(e=!1),void 0===r&&(r=!1);var n=t.getBoundingClientRect(),i=1,o=1;e&&C(t)&&(i=t.offsetWidth>0&&I(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&I(n.height)/t.offsetHeight||1);var a=(S(t)?M(t):window).visualViewport,s=!F()&&r,l=(n.left+(s&&a?a.offsetLeft:0))/i,c=(n.top+(s&&a?a.offsetTop:0))/o,d=n.width/i,u=n.height/o;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l,x:l,y:c}}function j(t){var e=P(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}function N(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&E(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function B(t){return M(t).getComputedStyle(t)}function U(t){return["table","td","th"].indexOf(T(t))>=0}function G(t){return((S(t)?t.ownerDocument:t.document)||window.document).documentElement}function V(t){return"html"===T(t)?t:t.assignedSlot||t.parentNode||(E(t)?t.host:null)||G(t)}function H(t){return C(t)&&"fixed"!==B(t).position?t.offsetParent:null}function W(t){for(var e=M(t),r=H(t);r&&U(r)&&"static"===B(r).position;)r=H(r);return r&&("html"===T(r)||"body"===T(r)&&"static"===B(r).position)?e:r||function(t){var e=/firefox/i.test(R());if(/Trident/i.test(R())&&C(t)&&"fixed"===B(t).position)return null;var r=V(t);for(E(r)&&(r=r.host);C(r)&&["html","body"].indexOf(T(r))<0;){var n=B(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(t)||e}function q(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Y(t,e,r){return O(t,D(e,r))}function Z(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function X(t,e){return e.reduce((function(e,r){return e[r]=t,e}),{})}const J={name:"arrow",enabled:!0,phase:"main",fn:function(t){var o,s=t.state,l=t.name,c=t.options,d=s.elements.arrow,u=s.modifiersData.popperOffsets,h=z(s.placement),f=q(h),p=[i,n].indexOf(h)>=0?"height":"width";if(d&&u){var m=function(t,e){return Z("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:X(t,a))}(c.padding,s),g=j(d),v="y"===f?e:i,b="y"===f?r:n,y=s.rects.reference[p]+s.rects.reference[f]-u[f]-s.rects.popper[p],x=u[f]-s.rects.reference[f],w=W(d),_=w?"y"===f?w.clientHeight||0:w.clientWidth||0:0,k=y/2-x/2,A=m[v],T=_-g[p]-m[b],M=_/2-g[p]/2+k,S=Y(A,M,T),C=f;s.modifiersData[l]=((o={})[C]=S,o.centerOffset=S-M,o)}},effect:function(t){var e=t.state,r=t.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&N(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function K(t){return t.split("-")[1]}var Q={top:"auto",right:"auto",bottom:"auto",left:"auto"};function tt(t){var o,a=t.popper,s=t.popperRect,c=t.placement,d=t.variation,u=t.offsets,h=t.position,f=t.gpuAcceleration,p=t.adaptive,m=t.roundOffsets,g=t.isFixed,v=u.x,b=void 0===v?0:v,y=u.y,x=void 0===y?0:y,w="function"==typeof m?m({x:b,y:x}):{x:b,y:x};b=w.x,x=w.y;var _=u.hasOwnProperty("x"),k=u.hasOwnProperty("y"),A=i,T=e,S=window;if(p){var C=W(a),E="clientHeight",L="clientWidth";C===M(a)&&"static"!==B(C=G(a)).position&&"absolute"===h&&(E="scrollHeight",L="scrollWidth"),(c===e||(c===i||c===n)&&d===l)&&(T=r,x-=(g&&C===S&&S.visualViewport?S.visualViewport.height:C[E])-s.height,x*=f?1:-1),c!==i&&(c!==e&&c!==r||d!==l)||(A=n,b-=(g&&C===S&&S.visualViewport?S.visualViewport.width:C[L])-s.width,b*=f?1:-1)}var z,O=Object.assign({position:h},p&&Q),D=!0===m?function(t,e){var r=t.x,n=t.y,i=e.devicePixelRatio||1;return{x:I(r*i)/i||0,y:I(n*i)/i||0}}({x:b,y:x},M(a)):{x:b,y:x};return b=D.x,x=D.y,f?Object.assign({},O,((z={})[T]=k?"0":"",z[A]=_?"0":"",z.transform=(S.devicePixelRatio||1)<=1?"translate("+b+"px, "+x+"px)":"translate3d("+b+"px, "+x+"px, 0)",z)):Object.assign({},O,((o={})[T]=k?x+"px":"",o[A]=_?b+"px":"",o.transform="",o))}const et={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,r=t.options,n=r.gpuAcceleration,i=void 0===n||n,o=r.adaptive,a=void 0===o||o,s=r.roundOffsets,l=void 0===s||s,c={placement:z(e.placement),variation:K(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,tt(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,tt(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var rt={passive:!0};const nt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,r=t.instance,n=t.options,i=n.scroll,o=void 0===i||i,a=n.resize,s=void 0===a||a,l=M(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",r.update,rt)})),s&&l.addEventListener("resize",r.update,rt),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",r.update,rt)})),s&&l.removeEventListener("resize",r.update,rt)}},data:{}};var it={left:"right",right:"left",bottom:"top",top:"bottom"};function ot(t){return t.replace(/left|right|bottom|top/g,(function(t){return it[t]}))}var at={start:"end",end:"start"};function st(t){return t.replace(/start|end/g,(function(t){return at[t]}))}function lt(t){var e=M(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ct(t){return P(G(t)).left+lt(t).scrollLeft}function dt(t){var e=B(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function ut(t){return["html","body","#document"].indexOf(T(t))>=0?t.ownerDocument.body:C(t)&&dt(t)?t:ut(V(t))}function ht(t,e){var r;void 0===e&&(e=[]);var n=ut(t),i=n===(null==(r=t.ownerDocument)?void 0:r.body),o=M(n),a=i?[o].concat(o.visualViewport||[],dt(n)?n:[]):n,s=e.concat(a);return i?s:s.concat(ht(V(a)))}function ft(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function pt(t,e,r){return e===d?ft(function(t,e){var r=M(t),n=G(t),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=F();(c||!c&&"fixed"===e)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+ct(t),y:l}}(t,r)):S(e)?function(t,e){var r=P(t,!1,"fixed"===e);return r.top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r}(e,r):ft(function(t){var e,r=G(t),n=lt(t),i=null==(e=t.ownerDocument)?void 0:e.body,o=O(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=O(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+ct(t),l=-n.scrollTop;return"rtl"===B(i||r).direction&&(s+=O(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(G(t)))}function mt(t){var o,a=t.reference,c=t.element,d=t.placement,u=d?z(d):null,h=d?K(d):null,f=a.x+a.width/2-c.width/2,p=a.y+a.height/2-c.height/2;switch(u){case e:o={x:f,y:a.y-c.height};break;case r:o={x:f,y:a.y+a.height};break;case n:o={x:a.x+a.width,y:p};break;case i:o={x:a.x-c.width,y:p};break;default:o={x:a.x,y:a.y}}var m=u?q(u):null;if(null!=m){var g="y"===m?"height":"width";switch(h){case s:o[m]=o[m]-(a[g]/2-c[g]/2);break;case l:o[m]=o[m]+(a[g]/2-c[g]/2)}}return o}function gt(t,i){void 0===i&&(i={});var o=i,s=o.placement,l=void 0===s?t.placement:s,f=o.strategy,p=void 0===f?t.strategy:f,m=o.boundary,g=void 0===m?c:m,v=o.rootBoundary,b=void 0===v?d:v,y=o.elementContext,x=void 0===y?u:y,w=o.altBoundary,_=void 0!==w&&w,k=o.padding,A=void 0===k?0:k,M=Z("number"!=typeof A?A:X(A,a)),E=x===u?h:u,L=t.rects.popper,z=t.elements[_?E:x],I=function(t,e,r,n){var i="clippingParents"===e?function(t){var e=ht(V(t)),r=["absolute","fixed"].indexOf(B(t).position)>=0&&C(t)?W(t):t;return S(r)?e.filter((function(t){return S(t)&&N(t,r)&&"body"!==T(t)})):[]}(t):[].concat(e),o=[].concat(i,[r]),a=o[0],s=o.reduce((function(e,r){var i=pt(t,r,n);return e.top=O(i.top,e.top),e.right=D(i.right,e.right),e.bottom=D(i.bottom,e.bottom),e.left=O(i.left,e.left),e}),pt(t,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(S(z)?z:z.contextElement||G(t.elements.popper),g,b,p),R=P(t.elements.reference),F=mt({reference:R,element:L,strategy:"absolute",placement:l}),j=ft(Object.assign({},L,F)),U=x===u?j:R,H={top:I.top-U.top+M.top,bottom:U.bottom-I.bottom+M.bottom,left:I.left-U.left+M.left,right:U.right-I.right+M.right},q=t.modifiersData.offset;if(x===u&&q){var Y=q[l];Object.keys(H).forEach((function(t){var i=[n,r].indexOf(t)>=0?1:-1,o=[e,r].indexOf(t)>=0?"y":"x";H[t]+=Y[o]*i}))}return H}const vt={name:"flip",enabled:!0,phase:"main",fn:function(t){var l=t.state,c=t.options,d=t.name;if(!l.modifiersData[d]._skip){for(var u=c.mainAxis,h=void 0===u||u,m=c.altAxis,g=void 0===m||m,v=c.fallbackPlacements,b=c.padding,y=c.boundary,x=c.rootBoundary,w=c.altBoundary,_=c.flipVariations,k=void 0===_||_,A=c.allowedAutoPlacements,T=l.options.placement,M=z(T),S=v||(M!==T&&k?function(t){if(z(t)===o)return[];var e=ot(t);return[st(t),e,st(e)]}(T):[ot(T)]),C=[T].concat(S).reduce((function(t,e){return t.concat(z(e)===o?function(t,e){void 0===e&&(e={});var r=e,n=r.placement,i=r.boundary,o=r.rootBoundary,s=r.padding,l=r.flipVariations,c=r.allowedAutoPlacements,d=void 0===c?p:c,u=K(n),h=u?l?f:f.filter((function(t){return K(t)===u})):a,m=h.filter((function(t){return d.indexOf(t)>=0}));0===m.length&&(m=h);var g=m.reduce((function(e,r){return e[r]=gt(t,{placement:r,boundary:i,rootBoundary:o,padding:s})[z(r)],e}),{});return Object.keys(g).sort((function(t,e){return g[t]-g[e]}))}(l,{placement:e,boundary:y,rootBoundary:x,padding:b,flipVariations:k,allowedAutoPlacements:A}):e)}),[]),E=l.rects.reference,L=l.rects.popper,O=new Map,D=!0,I=C[0],R=0;R=0,B=N?"width":"height",U=gt(l,{placement:F,boundary:y,rootBoundary:x,altBoundary:w,padding:b}),G=N?j?n:i:j?r:e;E[B]>L[B]&&(G=ot(G));var V=ot(G),H=[];if(h&&H.push(U[P]<=0),g&&H.push(U[G]<=0,U[V]<=0),H.every((function(t){return t}))){I=F,D=!1;break}O.set(F,H)}if(D)for(var W=function(t){var e=C.find((function(e){var r=O.get(e);if(r)return r.slice(0,t).every((function(t){return t}))}));if(e)return I=e,"break"},q=k?3:1;q>0&&"break"!==W(q);q--);l.placement!==I&&(l.modifiersData[d]._skip=!0,l.placement=I,l.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,r){return void 0===r&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function yt(t){return[e,n,r,i].some((function(e){return t[e]>=0}))}const xt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,r=t.name,n=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,a=gt(e,{elementContext:"reference"}),s=gt(e,{altBoundary:!0}),l=bt(a,n),c=bt(s,i,o),d=yt(l),u=yt(c);e.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}},wt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var r=t.state,o=t.options,a=t.name,s=o.offset,l=void 0===s?[0,0]:s,c=p.reduce((function(t,o){return t[o]=function(t,r,o){var a=z(t),s=[i,e].indexOf(a)>=0?-1:1,l="function"==typeof o?o(Object.assign({},r,{placement:t})):o,c=l[0],d=l[1];return c=c||0,d=(d||0)*s,[i,n].indexOf(a)>=0?{x:d,y:c}:{x:c,y:d}}(o,r.rects,l),t}),{}),d=c[r.placement],u=d.x,h=d.y;null!=r.modifiersData.popperOffsets&&(r.modifiersData.popperOffsets.x+=u,r.modifiersData.popperOffsets.y+=h),r.modifiersData[a]=c}},_t={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,r=t.name;e.modifiersData[r]=mt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},kt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var o=t.state,a=t.options,l=t.name,c=a.mainAxis,d=void 0===c||c,u=a.altAxis,h=void 0!==u&&u,f=a.boundary,p=a.rootBoundary,m=a.altBoundary,g=a.padding,v=a.tether,b=void 0===v||v,y=a.tetherOffset,x=void 0===y?0:y,w=gt(o,{boundary:f,rootBoundary:p,padding:g,altBoundary:m}),_=z(o.placement),k=K(o.placement),A=!k,T=q(_),M="x"===T?"y":"x",S=o.modifiersData.popperOffsets,C=o.rects.reference,E=o.rects.popper,L="function"==typeof x?x(Object.assign({},o.rects,{placement:o.placement})):x,I="number"==typeof L?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),R=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,F={x:0,y:0};if(S){if(d){var P,N="y"===T?e:i,B="y"===T?r:n,U="y"===T?"height":"width",G=S[T],V=G+w[N],H=G-w[B],Z=b?-E[U]/2:0,X=k===s?C[U]:E[U],$=k===s?-E[U]:-C[U],J=o.elements.arrow,Q=b&&J?j(J):{width:0,height:0},tt=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[N],rt=tt[B],nt=Y(0,C[U],Q[U]),it=A?C[U]/2-Z-nt-et-I.mainAxis:X-nt-et-I.mainAxis,ot=A?-C[U]/2+Z+nt+rt+I.mainAxis:$+nt+rt+I.mainAxis,at=o.elements.arrow&&W(o.elements.arrow),st=at?"y"===T?at.clientTop||0:at.clientLeft||0:0,lt=null!=(P=null==R?void 0:R[T])?P:0,ct=G+ot-lt,dt=Y(b?D(V,G+it-lt-st):V,G,b?O(H,ct):H);S[T]=dt,F[T]=dt-G}if(h){var ut,ht="x"===T?e:i,ft="x"===T?r:n,pt=S[M],mt="y"===M?"height":"width",vt=pt+w[ht],bt=pt-w[ft],yt=-1!==[e,i].indexOf(_),xt=null!=(ut=null==R?void 0:R[M])?ut:0,wt=yt?vt:pt-C[mt]-E[mt]-xt+I.altAxis,_t=yt?pt+C[mt]+E[mt]-xt-I.altAxis:bt,kt=b&&yt?function(t,e,r){var n=Y(t,e,r);return n>r?r:n}(wt,pt,_t):Y(b?wt:vt,pt,b?_t:bt);S[M]=kt,F[M]=kt-pt}o.modifiersData[l]=F}},requiresIfExists:["offset"]};function At(t,e,r){void 0===r&&(r=!1);var n,i,o=C(e),a=C(e)&&function(t){var e=t.getBoundingClientRect(),r=I(e.width)/t.offsetWidth||1,n=I(e.height)/t.offsetHeight||1;return 1!==r||1!==n}(e),s=G(e),l=P(t,a,r),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(o||!o&&!r)&&(("body"!==T(e)||dt(s))&&(c=(n=e)!==M(n)&&C(n)?{scrollLeft:(i=n).scrollLeft,scrollTop:i.scrollTop}:lt(n)),C(e)?((d=P(e,!0)).x+=e.clientLeft,d.y+=e.clientTop):s&&(d.x=ct(s))),{x:l.left+c.scrollLeft-d.x,y:l.top+c.scrollTop-d.y,width:l.width,height:l.height}}function Tt(t){var e=new Map,r=new Set,n=[];function i(t){r.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!r.has(t)){var n=e.get(t);n&&i(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){r.has(t.name)||i(t)})),n}var Mt={placement:"bottom",modifiers:[],strategy:"absolute"};function St(){for(var t=arguments.length,e=new Array(t),r=0;r{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let r=t.getAttribute("href");if(!r||!r.includes("#")&&!r.startsWith("."))return null;r.includes("#")&&!r.startsWith("#")&&(r=`#${r.split("#")[1]}`),e=r&&"#"!==r?r.trim():null}return e},It=t=>{const e=Dt(t);return e&&document.querySelector(e)?e:null},Rt=t=>{const e=Dt(t);return e?document.querySelector(e):null},Ft=t=>{t.dispatchEvent(new Event(Ot))},Pt=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),jt=t=>Pt(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,Nt=t=>{if(!Pt(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),r=t.closest("details:not([open])");if(!r)return e;if(r!==t){const e=t.closest("summary");if(e&&e.parentNode!==r)return!1;if(null===e)return!1}return e},Bt=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),Ut=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?Ut(t.parentNode):null},Gt=()=>{},Vt=t=>{t.offsetHeight},Ht=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Wt=[],qt=()=>"rtl"===document.documentElement.dir,Yt=t=>{var e;e=()=>{const e=Ht();if(e){const r=t.NAME,n=e.fn[r];e.fn[r]=t.jQueryInterface,e.fn[r].Constructor=t,e.fn[r].noConflict=()=>(e.fn[r]=n,t.jQueryInterface)}},"loading"===document.readyState?(Wt.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of Wt)t()})),Wt.push(e)):e()},Zt=t=>{"function"==typeof t&&t()},Xt=(t,e,r=!0)=>{if(!r)return void Zt(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:r}=window.getComputedStyle(t);const n=Number.parseFloat(e),i=Number.parseFloat(r);return n||i?(e=e.split(",")[0],r=r.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(r))):0})(e)+5;let i=!1;const o=({target:r})=>{r===e&&(i=!0,e.removeEventListener(Ot,o),Zt(t))};e.addEventListener(Ot,o),setTimeout((()=>{i||Ft(e)}),n)},$t=(t,e,r,n)=>{const i=t.length;let o=t.indexOf(e);return-1===o?!r&&n?t[i-1]:t[0]:(o+=r?1:-1,n&&(o=(o+i)%i),t[Math.max(0,Math.min(o,i-1))])},Jt=/[^.]*(?=\..*)\.|.*/,Kt=/\..*/,Qt=/::\d+$/,te={};let ee=1;const re={mouseenter:"mouseover",mouseleave:"mouseout"},ne=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function ie(t,e){return e&&`${e}::${ee++}`||t.uidEvent||ee++}function oe(t){const e=ie(t);return t.uidEvent=e,te[e]=te[e]||{},te[e]}function ae(t,e,r=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===r))}function se(t,e,r){const n="string"==typeof e,i=n?r:e||r;let o=ue(t);return ne.has(o)||(o=t),[n,i,o]}function le(t,e,r,n,i){if("string"!=typeof e||!t)return;let[o,a,s]=se(e,r,n);if(e in re){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};a=t(a)}const l=oe(t),c=l[s]||(l[s]={}),d=ae(c,a,o?r:null);if(d)return void(d.oneOff=d.oneOff&&i);const u=ie(a,e.replace(Jt,"")),h=o?function(t,e,r){return function n(i){const o=t.querySelectorAll(e);for(let{target:a}=i;a&&a!==this;a=a.parentNode)for(const s of o)if(s===a)return fe(i,{delegateTarget:a}),n.oneOff&&he.off(t,i.type,e,r),r.apply(a,[i])}}(t,r,a):function(t,e){return function r(n){return fe(n,{delegateTarget:t}),r.oneOff&&he.off(t,n.type,e),e.apply(t,[n])}}(t,a);h.delegationSelector=o?r:null,h.callable=a,h.oneOff=i,h.uidEvent=u,c[u]=h,t.addEventListener(s,h,o)}function ce(t,e,r,n,i){const o=ae(e[r],n,i);o&&(t.removeEventListener(r,o,Boolean(i)),delete e[r][o.uidEvent])}function de(t,e,r,n){const i=e[r]||{};for(const o of Object.keys(i))if(o.includes(n)){const n=i[o];ce(t,e,r,n.callable,n.delegationSelector)}}function ue(t){return t=t.replace(Kt,""),re[t]||t}const he={on(t,e,r,n){le(t,e,r,n,!1)},one(t,e,r,n){le(t,e,r,n,!0)},off(t,e,r,n){if("string"!=typeof e||!t)return;const[i,o,a]=se(e,r,n),s=a!==e,l=oe(t),c=l[a]||{},d=e.startsWith(".");if(void 0===o){if(d)for(const r of Object.keys(l))de(t,l,r,e.slice(1));for(const r of Object.keys(c)){const n=r.replace(Qt,"");if(!s||e.includes(n)){const e=c[r];ce(t,l,a,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;ce(t,l,a,o,i?r:null)}},trigger(t,e,r){if("string"!=typeof e||!t)return null;const n=Ht();let i=null,o=!0,a=!0,s=!1;e!==ue(e)&&n&&(i=n.Event(e,r),n(t).trigger(i),o=!i.isPropagationStopped(),a=!i.isImmediatePropagationStopped(),s=i.isDefaultPrevented());let l=new Event(e,{bubbles:o,cancelable:!0});return l=fe(l,r),s&&l.preventDefault(),a&&t.dispatchEvent(l),l.defaultPrevented&&i&&i.preventDefault(),l}};function fe(t,e){for(const[r,n]of Object.entries(e||{}))try{t[r]=n}catch(e){Object.defineProperty(t,r,{configurable:!0,get:()=>n})}return t}const pe=new Map,me={set(t,e,r){pe.has(t)||pe.set(t,new Map);const n=pe.get(t);n.has(e)||0===n.size?n.set(e,r):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>pe.has(t)&&pe.get(t).get(e)||null,remove(t,e){if(!pe.has(t))return;const r=pe.get(t);r.delete(e),0===r.size&&pe.delete(t)}};function ge(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function ve(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const be={setDataAttribute(t,e,r){t.setAttribute(`data-bs-${ve(e)}`,r)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${ve(e)}`)},getDataAttributes(t){if(!t)return{};const e={},r=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of r){let r=n.replace(/^bs/,"");r=r.charAt(0).toLowerCase()+r.slice(1,r.length),e[r]=ge(t.dataset[n])}return e},getDataAttribute:(t,e)=>ge(t.getAttribute(`data-bs-${ve(e)}`))};class ye{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const r=Pt(e)?be.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof r?r:{},...Pt(e)?be.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const n of Object.keys(e)){const i=e[n],o=t[n],a=Pt(o)?"element":null==(r=o)?`${r}`:Object.prototype.toString.call(r).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(i).test(a))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${a}" but expected type "${i}".`)}var r}}class xe extends ye{constructor(t,e){super(),(t=jt(t))&&(this._element=t,this._config=this._getConfig(e),me.set(this._element,this.constructor.DATA_KEY,this))}dispose(){me.remove(this._element,this.constructor.DATA_KEY),he.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,r=!0){Xt(t,e,r)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return me.get(jt(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.2.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const we=(t,e="hide")=>{const r=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;he.on(document,r,`[data-bs-dismiss="${n}"]`,(function(r){if(["A","AREA"].includes(this.tagName)&&r.preventDefault(),Bt(this))return;const i=Rt(this)||this.closest(`.${n}`);t.getOrCreateInstance(i)[e]()}))},_e=".bs.alert",ke=`close${_e}`,Ae=`closed${_e}`;class Te extends xe{static get NAME(){return"alert"}close(){if(he.trigger(this._element,ke).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),he.trigger(this._element,Ae),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=Te.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}we(Te,"close"),Yt(Te);const Me='[data-bs-toggle="button"]';class Se extends xe{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=Se.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}he.on(document,"click.bs.button.data-api",Me,(t=>{t.preventDefault();const e=t.target.closest(Me);Se.getOrCreateInstance(e).toggle()})),Yt(Se);const Ce={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const r=[];let n=t.parentNode.closest(e);for(;n;)r.push(n),n=n.parentNode.closest(e);return r},prev(t,e){let r=t.previousElementSibling;for(;r;){if(r.matches(e))return[r];r=r.previousElementSibling}return[]},next(t,e){let r=t.nextElementSibling;for(;r;){if(r.matches(e))return[r];r=r.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!Bt(t)&&Nt(t)))}},Ee=".bs.swipe",Le=`touchstart${Ee}`,ze=`touchmove${Ee}`,Oe=`touchend${Ee}`,De=`pointerdown${Ee}`,Ie=`pointerup${Ee}`,Re={endCallback:null,leftCallback:null,rightCallback:null},Fe={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Pe extends ye{constructor(t,e){super(),this._element=t,t&&Pe.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Re}static get DefaultType(){return Fe}static get NAME(){return"swipe"}dispose(){he.off(this._element,Ee)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),Zt(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&Zt(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(he.on(this._element,De,(t=>this._start(t))),he.on(this._element,Ie,(t=>this._end(t))),this._element.classList.add("pointer-event")):(he.on(this._element,Le,(t=>this._start(t))),he.on(this._element,ze,(t=>this._move(t))),he.on(this._element,Oe,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const je=".bs.carousel",Ne=".data-api",Be="ArrowLeft",Ue="ArrowRight",Ge="next",Ve="prev",He="left",We="right",qe=`slide${je}`,Ye=`slid${je}`,Ze=`keydown${je}`,Xe=`mouseenter${je}`,$e=`mouseleave${je}`,Je=`dragstart${je}`,Ke=`load${je}${Ne}`,Qe=`click${je}${Ne}`,tr="carousel",er="active",rr=".active",nr=".carousel-item",ir=rr+nr,or={[Be]:We,[Ue]:He},ar={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},sr={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class lr extends xe{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Ce.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===tr&&this.cycle()}static get Default(){return ar}static get DefaultType(){return sr}static get NAME(){return"carousel"}next(){this._slide(Ge)}nextWhenVisible(){!document.hidden&&Nt(this._element)&&this.next()}prev(){this._slide(Ve)}pause(){this._isSliding&&Ft(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?he.one(this._element,Ye,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void he.one(this._element,Ye,(()=>this.to(t)));const r=this._getItemIndex(this._getActive());if(r===t)return;const n=t>r?Ge:Ve;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&he.on(this._element,Ze,(t=>this._keydown(t))),"hover"===this._config.pause&&(he.on(this._element,Xe,(()=>this.pause())),he.on(this._element,$e,(()=>this._maybeEnableCycle()))),this._config.touch&&Pe.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of Ce.find(".carousel-item img",this._element))he.on(t,Je,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(He)),rightCallback:()=>this._slide(this._directionToOrder(We)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new Pe(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=or[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=Ce.findOne(rr,this._indicatorsElement);e.classList.remove(er),e.removeAttribute("aria-current");const r=Ce.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);r&&(r.classList.add(er),r.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const r=this._getActive(),n=t===Ge,i=e||$t(this._getItems(),r,n,this._config.wrap);if(i===r)return;const o=this._getItemIndex(i),a=e=>he.trigger(this._element,e,{relatedTarget:i,direction:this._orderToDirection(t),from:this._getItemIndex(r),to:o});if(a(qe).defaultPrevented)return;if(!r||!i)return;const s=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=i;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";i.classList.add(c),Vt(i),r.classList.add(l),i.classList.add(l),this._queueCallback((()=>{i.classList.remove(l,c),i.classList.add(er),r.classList.remove(er,c,l),this._isSliding=!1,a(Ye)}),r,this._isAnimated()),s&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Ce.findOne(ir,this._element)}_getItems(){return Ce.find(nr,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return qt()?t===He?Ve:Ge:t===He?Ge:Ve}_orderToDirection(t){return qt()?t===Ve?He:We:t===Ve?We:He}static jQueryInterface(t){return this.each((function(){const e=lr.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}he.on(document,Qe,"[data-bs-slide], [data-bs-slide-to]",(function(t){const e=Rt(this);if(!e||!e.classList.contains(tr))return;t.preventDefault();const r=lr.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(r.to(n),void r._maybeEnableCycle()):"next"===be.getDataAttribute(this,"slide")?(r.next(),void r._maybeEnableCycle()):(r.prev(),void r._maybeEnableCycle())})),he.on(window,Ke,(()=>{const t=Ce.find('[data-bs-ride="carousel"]');for(const e of t)lr.getOrCreateInstance(e)})),Yt(lr);const cr=".bs.collapse",dr=`show${cr}`,ur=`shown${cr}`,hr=`hide${cr}`,fr=`hidden${cr}`,pr=`click${cr}.data-api`,mr="show",gr="collapse",vr="collapsing",br=`:scope .${gr} .${gr}`,yr='[data-bs-toggle="collapse"]',xr={parent:null,toggle:!0},wr={parent:"(null|element)",toggle:"boolean"};class _r extends xe{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const r=Ce.find(yr);for(const t of r){const e=It(t),r=Ce.find(e).filter((t=>t===this._element));null!==e&&r.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return xr}static get DefaultType(){return wr}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>_r.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(he.trigger(this._element,dr).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(gr),this._element.classList.add(vr),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const r=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(vr),this._element.classList.add(gr,mr),this._element.style[e]="",he.trigger(this._element,ur)}),this._element,!0),this._element.style[e]=`${this._element[r]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(he.trigger(this._element,hr).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,Vt(this._element),this._element.classList.add(vr),this._element.classList.remove(gr,mr);for(const t of this._triggerArray){const e=Rt(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(vr),this._element.classList.add(gr),he.trigger(this._element,fr)}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(mr)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=jt(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(yr);for(const e of t){const t=Rt(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=Ce.find(br,this._config.parent);return Ce.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const r of t)r.classList.toggle("collapsed",!e),r.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const r=_r.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===r[t])throw new TypeError(`No method named "${t}"`);r[t]()}}))}}he.on(document,pr,yr,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=It(this),r=Ce.find(e);for(const t of r)_r.getOrCreateInstance(t,{toggle:!1}).toggle()})),Yt(_r);const kr="dropdown",Ar=".bs.dropdown",Tr=".data-api",Mr="ArrowUp",Sr="ArrowDown",Cr=`hide${Ar}`,Er=`hidden${Ar}`,Lr=`show${Ar}`,zr=`shown${Ar}`,Or=`click${Ar}${Tr}`,Dr=`keydown${Ar}${Tr}`,Ir=`keyup${Ar}${Tr}`,Rr="show",Fr='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Pr=`${Fr}.${Rr}`,jr=".dropdown-menu",Nr=qt()?"top-end":"top-start",Br=qt()?"top-start":"top-end",Ur=qt()?"bottom-end":"bottom-start",Gr=qt()?"bottom-start":"bottom-end",Vr=qt()?"left-start":"right-start",Hr=qt()?"right-start":"left-start",Wr={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},qr={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Yr extends xe{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=Ce.next(this._element,jr)[0]||Ce.prev(this._element,jr)[0]||Ce.findOne(jr,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Wr}static get DefaultType(){return qr}static get NAME(){return kr}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Bt(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!he.trigger(this._element,Lr,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))he.on(t,"mouseover",Gt);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Rr),this._element.classList.add(Rr),he.trigger(this._element,zr,t)}}hide(){if(Bt(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!he.trigger(this._element,Cr,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))he.off(t,"mouseover",Gt);this._popper&&this._popper.destroy(),this._menu.classList.remove(Rr),this._element.classList.remove(Rr),this._element.setAttribute("aria-expanded","false"),be.removeDataAttribute(this._menu,"popper"),he.trigger(this._element,Er,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!Pt(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${kr.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===t)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=this._parent:Pt(this._config.reference)?e=jt(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const r=this._getPopperConfig();this._popper=Lt(e,this._menu,r)}_isShown(){return this._menu.classList.contains(Rr)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return Vr;if(t.classList.contains("dropstart"))return Hr;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?Br:Nr:e?Gr:Ur}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(be.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const r=Ce.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>Nt(t)));r.length&&$t(r,e,t===Sr,!r.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=Yr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=Ce.find(Pr);for(const r of e){const e=Yr.getInstance(r);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),i=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!i||"outside"===e._config.autoClose&&i)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),r="Escape"===t.key,n=[Mr,Sr].includes(t.key);if(!n&&!r)return;if(e&&!r)return;t.preventDefault();const i=this.matches(Fr)?this:Ce.prev(this,Fr)[0]||Ce.next(this,Fr)[0]||Ce.findOne(Fr,t.delegateTarget.parentNode),o=Yr.getOrCreateInstance(i);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),i.focus())}}he.on(document,Dr,Fr,Yr.dataApiKeydownHandler),he.on(document,Dr,jr,Yr.dataApiKeydownHandler),he.on(document,Or,Yr.clearMenus),he.on(document,Ir,Yr.clearMenus),he.on(document,Or,Fr,(function(t){t.preventDefault(),Yr.getOrCreateInstance(this).toggle()})),Yt(Yr);const Zr=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Xr=".sticky-top",$r="padding-right",Jr="margin-right";class Kr{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,$r,(e=>e+t)),this._setElementAttributes(Zr,$r,(e=>e+t)),this._setElementAttributes(Xr,Jr,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,$r),this._resetElementAttributes(Zr,$r),this._resetElementAttributes(Xr,Jr)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,r){const n=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const i=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${r(Number.parseFloat(i))}px`)}))}_saveInitialAttribute(t,e){const r=t.style.getPropertyValue(e);r&&be.setDataAttribute(t,e,r)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const r=be.getDataAttribute(t,e);null!==r?(be.removeDataAttribute(t,e),t.style.setProperty(e,r)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(Pt(t))e(t);else for(const r of Ce.find(t,this._element))e(r)}}const Qr="backdrop",tn="show",en=`mousedown.bs.${Qr}`,rn={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},nn={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class on extends ye{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return rn}static get DefaultType(){return nn}static get NAME(){return Qr}show(t){if(!this._config.isVisible)return void Zt(t);this._append();const e=this._getElement();this._config.isAnimated&&Vt(e),e.classList.add(tn),this._emulateAnimation((()=>{Zt(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(tn),this._emulateAnimation((()=>{this.dispose(),Zt(t)}))):Zt(t)}dispose(){this._isAppended&&(he.off(this._element,en),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=jt(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),he.on(t,en,(()=>{Zt(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){Xt(t,this._getElement(),this._config.isAnimated)}}const an=".bs.focustrap",sn=`focusin${an}`,ln=`keydown.tab${an}`,cn="backward",dn={autofocus:!0,trapElement:null},un={autofocus:"boolean",trapElement:"element"};class hn extends ye{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return dn}static get DefaultType(){return un}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),he.off(document,an),he.on(document,sn,(t=>this._handleFocusin(t))),he.on(document,ln,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,he.off(document,an))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const r=Ce.focusableChildren(e);0===r.length?e.focus():this._lastTabNavDirection===cn?r[r.length-1].focus():r[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?cn:"forward")}}const fn=".bs.modal",pn=`hide${fn}`,mn=`hidePrevented${fn}`,gn=`hidden${fn}`,vn=`show${fn}`,bn=`shown${fn}`,yn=`resize${fn}`,xn=`click.dismiss${fn}`,wn=`mousedown.dismiss${fn}`,_n=`keydown.dismiss${fn}`,kn=`click${fn}.data-api`,An="modal-open",Tn="show",Mn="modal-static",Sn={backdrop:!0,focus:!0,keyboard:!0},Cn={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class En extends xe{constructor(t,e){super(t,e),this._dialog=Ce.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Kr,this._addEventListeners()}static get Default(){return Sn}static get DefaultType(){return Cn}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||he.trigger(this._element,vn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(An),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(he.trigger(this._element,pn).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Tn),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const t of[window,this._dialog])he.off(t,fn);this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new on({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new hn({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=Ce.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),Vt(this._element),this._element.classList.add(Tn),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,he.trigger(this._element,bn,{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){he.on(this._element,_n,(t=>{if("Escape"===t.key)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),he.on(window,yn,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),he.on(this._element,wn,(t=>{he.one(this._element,xn,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(An),this._resetAdjustments(),this._scrollBar.reset(),he.trigger(this._element,gn)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(he.trigger(this._element,mn).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Mn)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Mn),this._queueCallback((()=>{this._element.classList.remove(Mn),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),r=e>0;if(r&&!t){const t=qt()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!r&&t){const t=qt()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const r=En.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===r[t])throw new TypeError(`No method named "${t}"`);r[t](e)}}))}}he.on(document,kn,'[data-bs-toggle="modal"]',(function(t){const e=Rt(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),he.one(e,vn,(t=>{t.defaultPrevented||he.one(e,gn,(()=>{Nt(this)&&this.focus()}))}));const r=Ce.findOne(".modal.show");r&&En.getInstance(r).hide(),En.getOrCreateInstance(e).toggle(this)})),we(En),Yt(En);const Ln=".bs.offcanvas",zn=".data-api",On=`load${Ln}${zn}`,Dn="show",In="showing",Rn="hiding",Fn=".offcanvas.show",Pn=`show${Ln}`,jn=`shown${Ln}`,Nn=`hide${Ln}`,Bn=`hidePrevented${Ln}`,Un=`hidden${Ln}`,Gn=`resize${Ln}`,Vn=`click${Ln}${zn}`,Hn=`keydown.dismiss${Ln}`,Wn={backdrop:!0,keyboard:!0,scroll:!1},qn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Yn extends xe{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Wn}static get DefaultType(){return qn}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||he.trigger(this._element,Pn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Kr).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(In),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Dn),this._element.classList.remove(In),he.trigger(this._element,jn,{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&(he.trigger(this._element,Nn).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Rn),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(Dn,Rn),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Kr).reset(),he.trigger(this._element,Un)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new on({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():he.trigger(this._element,Bn)}:null})}_initializeFocusTrap(){return new hn({trapElement:this._element})}_addEventListeners(){he.on(this._element,Hn,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():he.trigger(this._element,Bn))}))}static jQueryInterface(t){return this.each((function(){const e=Yn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}he.on(document,Vn,'[data-bs-toggle="offcanvas"]',(function(t){const e=Rt(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Bt(this))return;he.one(e,Un,(()=>{Nt(this)&&this.focus()}));const r=Ce.findOne(Fn);r&&r!==e&&Yn.getInstance(r).hide(),Yn.getOrCreateInstance(e).toggle(this)})),he.on(window,On,(()=>{for(const t of Ce.find(Fn))Yn.getOrCreateInstance(t).show()})),he.on(window,Gn,(()=>{for(const t of Ce.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Yn.getOrCreateInstance(t).hide()})),we(Yn),Yt(Yn);const Zn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Xn=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,$n=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Jn=(t,e)=>{const r=t.nodeName.toLowerCase();return e.includes(r)?!Zn.has(r)||Boolean(Xn.test(t.nodeValue)||$n.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(r)))},Kn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Qn={allowList:Kn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},ti={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ei={entry:"(string|element|function|null)",selector:"(string|element)"};class ri extends ye{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Qn}static get DefaultType(){return ti}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,r]of Object.entries(this._config.content))this._setContent(t,r,e);const e=t.children[0],r=this._resolvePossibleFunction(this._config.extraClass);return r&&e.classList.add(...r.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,r]of Object.entries(t))super._typeCheckConfig({selector:e,entry:r},ei)}_setContent(t,e,r){const n=Ce.findOne(r,t);n&&((e=this._resolvePossibleFunction(e))?Pt(e)?this._putElementInTemplate(jt(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,r){if(!t.length)return t;if(r&&"function"==typeof r)return r(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),i=[].concat(...n.body.querySelectorAll("*"));for(const t of i){const r=t.nodeName.toLowerCase();if(!Object.keys(e).includes(r)){t.remove();continue}const n=[].concat(...t.attributes),i=[].concat(e["*"]||[],e[r]||[]);for(const e of n)Jn(e,i)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return"function"==typeof t?t(this):t}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const ni=new Set(["sanitize","allowList","sanitizeFn"]),ii="fade",oi="show",ai=".tooltip-inner",si=".modal",li="hide.bs.modal",ci="hover",di="focus",ui={AUTO:"auto",TOP:"top",RIGHT:qt()?"left":"right",BOTTOM:"bottom",LEFT:qt()?"right":"left"},hi={allowList:Kn,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},fi={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class pi extends xe{constructor(e,r){if(void 0===t)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,r),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return hi}static get DefaultType(){return fi}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),he.off(this._element.closest(si),li,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=he.trigger(this._element,this.constructor.eventName("show")),e=(Ut(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const r=this._getTipElement();this._element.setAttribute("aria-describedby",r.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(r),he.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(r),r.classList.add(oi),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))he.on(t,"mouseover",Gt);this._queueCallback((()=>{he.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!he.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(oi),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))he.off(t,"mouseover",Gt);this._activeTrigger.click=!1,this._activeTrigger[di]=!1,this._activeTrigger[ci]=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),he.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(ii,oi),e.classList.add(`bs-${this.constructor.NAME}-auto`);const r=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",r),this._isAnimated()&&e.classList.add(ii),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new ri({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[ai]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(ii)}_isShown(){return this.tip&&this.tip.classList.contains(oi)}_createPopper(t){const e="function"==typeof this._config.placement?this._config.placement.call(this,t,this._element):this._config.placement,r=ui[e.toUpperCase()];return Lt(this._element,t,this._getPopperConfig(r))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)he.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===ci?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),r=e===ci?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");he.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?di:ci]=!0,e._enter()})),he.on(this._element,r,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?di:ci]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},he.on(this._element.closest(si),li,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=be.getDataAttributes(this._element);for(const t of Object.keys(e))ni.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:jt(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=pi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}Yt(pi);const mi=".popover-header",gi=".popover-body",vi={...pi.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},bi={...pi.DefaultType,content:"(null|string|element|function)"};class yi extends pi{static get Default(){return vi}static get DefaultType(){return bi}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[mi]:this._getTitle(),[gi]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=yi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}Yt(yi);const xi=".bs.scrollspy",wi=`activate${xi}`,_i=`click${xi}`,ki=`load${xi}.data-api`,Ai="active",Ti="[href]",Mi=".nav-link",Si=`${Mi}, .nav-item > ${Mi}, .list-group-item`,Ci={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Ei={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Li extends xe{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Ci}static get DefaultType(){return Ei}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=jt(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(he.off(this._config.target,_i),he.on(this._config.target,_i,Ti,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const r=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(r.scrollTo)return void r.scrollTo({top:n,behavior:"smooth"});r.scrollTop=n}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),r=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,i=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(i&&t){if(r(o),!n)return}else i||t||r(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=Ce.find(Ti,this._config.target);for(const e of t){if(!e.hash||Bt(e))continue;const t=Ce.findOne(e.hash,this._element);Nt(t)&&(this._targetLinks.set(e.hash,e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Ai),this._activateParents(t),he.trigger(this._element,wi,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))Ce.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Ai);else for(const e of Ce.parents(t,".nav, .list-group"))for(const t of Ce.prev(e,Si))t.classList.add(Ai)}_clearActiveClass(t){t.classList.remove(Ai);const e=Ce.find(`${Ti}.${Ai}`,t);for(const t of e)t.classList.remove(Ai)}static jQueryInterface(t){return this.each((function(){const e=Li.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}he.on(window,ki,(()=>{for(const t of Ce.find('[data-bs-spy="scroll"]'))Li.getOrCreateInstance(t)})),Yt(Li);const zi=".bs.tab",Oi=`hide${zi}`,Di=`hidden${zi}`,Ii=`show${zi}`,Ri=`shown${zi}`,Fi=`click${zi}`,Pi=`keydown${zi}`,ji=`load${zi}`,Ni="ArrowLeft",Bi="ArrowRight",Ui="ArrowUp",Gi="ArrowDown",Vi="active",Hi="fade",Wi="show",qi=":not(.dropdown-toggle)",Yi='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Zi=`.nav-link${qi}, .list-group-item${qi}, [role="tab"]${qi}, ${Yi}`,Xi=`.${Vi}[data-bs-toggle="tab"], .${Vi}[data-bs-toggle="pill"], .${Vi}[data-bs-toggle="list"]`;class $i extends xe{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),he.on(this._element,Pi,(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),r=e?he.trigger(e,Oi,{relatedTarget:t}):null;he.trigger(t,Ii,{relatedTarget:e}).defaultPrevented||r&&r.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(Vi),this._activate(Rt(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),he.trigger(t,Ri,{relatedTarget:e})):t.classList.add(Wi)}),t,t.classList.contains(Hi)))}_deactivate(t,e){t&&(t.classList.remove(Vi),t.blur(),this._deactivate(Rt(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),he.trigger(t,Di,{relatedTarget:e})):t.classList.remove(Wi)}),t,t.classList.contains(Hi)))}_keydown(t){if(![Ni,Bi,Ui,Gi].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[Bi,Gi].includes(t.key),r=$t(this._getChildren().filter((t=>!Bt(t))),t.target,e,!0);r&&(r.focus({preventScroll:!0}),$i.getOrCreateInstance(r).show())}_getChildren(){return Ce.find(Zi,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),r=this._getOuterElement(t);t.setAttribute("aria-selected",e),r!==t&&this._setAttributeIfNotExists(r,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=Rt(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`#${t.id}`))}_toggleDropDown(t,e){const r=this._getOuterElement(t);if(!r.classList.contains("dropdown"))return;const n=(t,n)=>{const i=Ce.findOne(t,r);i&&i.classList.toggle(n,e)};n(".dropdown-toggle",Vi),n(".dropdown-menu",Wi),r.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,r){t.hasAttribute(e)||t.setAttribute(e,r)}_elemIsActive(t){return t.classList.contains(Vi)}_getInnerElement(t){return t.matches(Zi)?t:Ce.findOne(Zi,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=$i.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}he.on(document,Fi,Yi,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),Bt(this)||$i.getOrCreateInstance(this).show()})),he.on(window,ji,(()=>{for(const t of Ce.find(Xi))$i.getOrCreateInstance(t)})),Yt($i);const Ji=".bs.toast",Ki=`mouseover${Ji}`,Qi=`mouseout${Ji}`,to=`focusin${Ji}`,eo=`focusout${Ji}`,ro=`hide${Ji}`,no=`hidden${Ji}`,io=`show${Ji}`,oo=`shown${Ji}`,ao="hide",so="show",lo="showing",co={animation:"boolean",autohide:"boolean",delay:"number"},uo={animation:!0,autohide:!0,delay:5e3};class ho extends xe{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return uo}static get DefaultType(){return co}static get NAME(){return"toast"}show(){he.trigger(this._element,io).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(ao),Vt(this._element),this._element.classList.add(so,lo),this._queueCallback((()=>{this._element.classList.remove(lo),he.trigger(this._element,oo),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(he.trigger(this._element,ro).defaultPrevented||(this._element.classList.add(lo),this._queueCallback((()=>{this._element.classList.add(ao),this._element.classList.remove(lo,so),he.trigger(this._element,no)}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(so),super.dispose()}isShown(){return this._element.classList.contains(so)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const r=t.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){he.on(this._element,Ki,(t=>this._onInteraction(t,!0))),he.on(this._element,Qi,(t=>this._onInteraction(t,!1))),he.on(this._element,to,(t=>this._onInteraction(t,!0))),he.on(this._element,eo,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=ho.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}we(ho),Yt(ho);var fo=__webpack_require__(85072),po=__webpack_require__.n(fo),mo=__webpack_require__(97825),go=__webpack_require__.n(mo),vo=__webpack_require__(77659),bo=__webpack_require__.n(vo),yo=__webpack_require__(55056),xo=__webpack_require__.n(yo),wo=__webpack_require__(10540),_o=__webpack_require__.n(wo),ko=__webpack_require__(41113),Ao=__webpack_require__.n(ko),To=__webpack_require__(11261),Mo={};Mo.styleTagTransform=Ao(),Mo.setAttributes=xo(),Mo.insert=bo().bind(null,"head"),Mo.domAPI=go(),Mo.insertStyleElement=_o(),po()(To.A,Mo),To.A&&To.A.locals&&To.A.locals;var So=__webpack_require__(91683),Co=__webpack_require__(31945);function Eo(t){let e=t.length;for(;--e>=0;)t[e]=0}const Lo=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),zo=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),Oo=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Do=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Io=new Array(576);Eo(Io);const Ro=new Array(60);Eo(Ro);const Fo=new Array(512);Eo(Fo);const Po=new Array(256);Eo(Po);const jo=new Array(29);Eo(jo);const No=new Array(30);function Bo(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}let Uo,Go,Vo;function Ho(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}Eo(No);const Wo=t=>t<256?Fo[t]:Fo[256+(t>>>7)],qo=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},Yo=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<{Yo(t,r[2*e],r[2*e+1])},Xo=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},$o=(t,e,r)=>{const n=new Array(16);let i,o,a=0;for(i=1;i<=15;i++)a=a+r[i-1]<<1,n[i]=a;for(o=0;o<=e;o++){let e=t[2*o+1];0!==e&&(t[2*o]=Xo(n[e]++,e))}},Jo=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},Ko=t=>{t.bi_valid>8?qo(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},Qo=(t,e,r,n)=>{const i=2*e,o=2*r;return t[i]{const n=t.heap[r];let i=r<<1;for(;i<=t.heap_len&&(i{let n,i,o,a,s=0;if(0!==t.sym_next)do{n=255&t.pending_buf[t.sym_buf+s++],n+=(255&t.pending_buf[t.sym_buf+s++])<<8,i=t.pending_buf[t.sym_buf+s++],0===n?Zo(t,i,e):(o=Po[i],Zo(t,o+256+1,e),a=Lo[o],0!==a&&(i-=jo[o],Yo(t,i,a)),n--,o=Wo(n),Zo(t,o,r),a=zo[o],0!==a&&(n-=No[o],Yo(t,n,a)))}while(s{const r=e.dyn_tree,n=e.stat_desc.static_tree,i=e.stat_desc.has_stree,o=e.stat_desc.elems;let a,s,l,c=-1;for(t.heap_len=0,t.heap_max=573,a=0;a>1;a>=1;a--)ta(t,r,a);l=o;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],ta(t,r,1),s=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=s,r[2*l]=r[2*a]+r[2*s],t.depth[l]=(t.depth[a]>=t.depth[s]?t.depth[a]:t.depth[s])+1,r[2*a+1]=r[2*s+1]=l,t.heap[1]=l++,ta(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,i=e.stat_desc.static_tree,o=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,l=e.stat_desc.max_length;let c,d,u,h,f,p,m=0;for(h=0;h<=15;h++)t.bl_count[h]=0;for(r[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<573;c++)d=t.heap[c],h=r[2*r[2*d+1]+1]+1,h>l&&(h=l,m++),r[2*d+1]=h,d>n||(t.bl_count[h]++,f=0,d>=s&&(f=a[d-s]),p=r[2*d],t.opt_len+=p*(h+f),o&&(t.static_len+=p*(i[2*d+1]+f)));if(0!==m){do{for(h=l-1;0===t.bl_count[h];)h--;t.bl_count[h]--,t.bl_count[h+1]+=2,t.bl_count[l]--,m-=2}while(m>0);for(h=l;0!==h;h--)for(d=t.bl_count[h];0!==d;)u=t.heap[--c],u>n||(r[2*u+1]!==h&&(t.opt_len+=(h-r[2*u+1])*r[2*u],r[2*u+1]=h),d--)}})(t,e),$o(r,c,t.bl_count)},na=(t,e,r)=>{let n,i,o=-1,a=e[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++s{let n,i,o=-1,a=e[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),n=0;n<=r;n++)if(i=a,a=e[2*(n+1)+1],!(++s{Yo(t,0+(n?1:0),3),Ko(t),qo(t,r),qo(t,~r),r&&t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r};var sa={_tr_init:t=>{oa||((()=>{let t,e,r,n,i;const o=new Array(16);for(r=0,n=0;n<28;n++)for(jo[n]=r,t=0;t<1<>=7;n<30;n++)for(No[n]=i<<7,t=0;t<1<{let i,o,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),ra(t,t.l_desc),ra(t,t.d_desc),a=(t=>{let e;for(na(t,t.dyn_ltree,t.l_desc.max_code),na(t,t.dyn_dtree,t.d_desc.max_code),ra(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*Do[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),i=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?aa(t,e,r,n):4===t.strategy||o===i?(Yo(t,2+(n?1:0),3),ea(t,Io,Ro)):(Yo(t,4+(n?1:0),3),((t,e,r,n)=>{let i;for(Yo(t,e-257,5),Yo(t,r-1,5),Yo(t,n-4,4),i=0;i(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=r,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(Po[r]+256+1)]++,t.dyn_dtree[2*Wo(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{Yo(t,2,3),Zo(t,256,Io),(t=>{16===t.bi_valid?(qo(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}},la=(t,e,r,n)=>{let i=65535&t,o=t>>>16&65535,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{i=i+e[n++]|0,o=o+i|0}while(--a);i%=65521,o%=65521}return i|o<<16};const ca=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());var da=(t,e,r,n)=>{const i=ca,o=n+r;t^=-1;for(let r=n;r>>8^i[255&(t^e[r])];return~t},ua={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ha={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:fa,_tr_stored_block:pa,_tr_flush_block:ma,_tr_tally:ga,_tr_align:va}=sa,{Z_NO_FLUSH:ba,Z_PARTIAL_FLUSH:ya,Z_FULL_FLUSH:xa,Z_FINISH:wa,Z_BLOCK:_a,Z_OK:ka,Z_STREAM_END:Aa,Z_STREAM_ERROR:Ta,Z_DATA_ERROR:Ma,Z_BUF_ERROR:Sa,Z_DEFAULT_COMPRESSION:Ca,Z_FILTERED:Ea,Z_HUFFMAN_ONLY:La,Z_RLE:za,Z_FIXED:Oa,Z_DEFAULT_STRATEGY:Da,Z_UNKNOWN:Ia,Z_DEFLATED:Ra}=ha,Fa=258,Pa=262,ja=42,Na=113,Ba=666,Ua=(t,e)=>(t.msg=ua[e],e),Ga=t=>2*t-(t>4?9:0),Va=t=>{let e=t.length;for(;--e>=0;)t[e]=0},Ha=t=>{let e,r,n,i=t.w_size;e=t.hash_size,n=e;do{r=t.head[--n],t.head[n]=r>=i?r-i:0}while(--e);e=i,n=e;do{r=t.prev[--n],t.prev[n]=r>=i?r-i:0}while(--e)};let Wa=(t,e,r)=>(e<{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},Ya=(t,e)=>{ma(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,qa(t.strm)},Za=(t,e)=>{t.pending_buf[t.pending++]=e},Xa=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},$a=(t,e,r,n)=>{let i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),r),1===t.state.wrap?t.adler=la(t.adler,e,i,r):2===t.state.wrap&&(t.adler=da(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)},Ja=(t,e)=>{let r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match;const l=t.strstart>t.w_size-Pa?t.strstart-(t.w_size-Pa):0,c=t.window,d=t.w_mask,u=t.prev,h=t.strstart+Fa;let f=c[o+a-1],p=c[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(r=e,c[r+a]===p&&c[r+a-1]===f&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&oa){if(t.match_start=e,a=n,n>=s)break;f=c[o+a-1],p=c[o+a]}}}while((e=u[e&d])>l&&0!=--i);return a<=t.lookahead?a:t.lookahead},Ka=t=>{const e=t.w_size;let r,n,i;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-Pa)&&(t.window.set(t.window.subarray(e,e+e-n),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),Ha(t),n+=e),0===t.strm.avail_in)break;if(r=$a(t.strm,t.window,t.strstart+t.lookahead,n),t.lookahead+=r,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=Wa(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=Wa(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead{let r,n,i,o=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,a=0,s=t.strm.avail_in;do{if(r=65535,i=t.bi_valid+42>>3,t.strm.avail_outn+t.strm.avail_in&&(r=n+t.strm.avail_in),r>i&&(r=i),r>8,t.pending_buf[t.pending-2]=~r,t.pending_buf[t.pending-1]=~r>>8,qa(t.strm),n&&(n>r&&(n=r),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,r-=n),r&&($a(t.strm,t.strm.output,t.strm.next_out,r),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r)}while(0===a);return s-=t.strm.avail_in,s&&(s>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=s&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-s,t.strm.next_in),t.strstart),t.strstart+=s,t.insert+=s>t.w_size-t.insert?t.w_size-t.insert:s),t.block_start=t.strstart),t.high_wateri&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,i+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),i>t.strm.avail_in&&(i=t.strm.avail_in),i&&($a(t.strm,t.window,t.strstart,i),t.strstart+=i,t.insert+=i>t.w_size-t.insert?t.w_size-t.insert:i),t.high_water>3,i=t.pending_buf_size-i>65535?65535:t.pending_buf_size-i,o=i>t.w_size?t.w_size:i,n=t.strstart-t.block_start,(n>=o||(n||e===wa)&&e!==ba&&0===t.strm.avail_in&&n<=i)&&(r=n>i?i:n,a=e===wa&&0===t.strm.avail_in&&r===n?1:0,pa(t,t.block_start,r,a),t.block_start+=r,qa(t.strm)),a?3:1)},ts=(t,e)=>{let r,n;for(;;){if(t.lookahead=3&&(t.ins_h=Wa(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-Pa&&(t.match_length=Ja(t,r)),t.match_length>=3)if(n=ga(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=Wa(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=Wa(t,t.ins_h,t.window[t.strstart+1]);else n=ga(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Ya(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===wa?(Ya(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Ya(t,!1),0===t.strm.avail_out)?1:2},es=(t,e)=>{let r,n,i;for(;;){if(t.lookahead=3&&(t.ins_h=Wa(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=ga(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=Wa(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Ya(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=ga(t,0,t.window[t.strstart-1]),n&&Ya(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=ga(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===wa?(Ya(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Ya(t,!1),0===t.strm.avail_out)?1:2};function rs(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}const ns=[new rs(0,0,0,0,Qa),new rs(4,4,8,4,ts),new rs(4,5,16,8,ts),new rs(4,6,32,32,ts),new rs(4,4,16,16,es),new rs(8,16,32,32,es),new rs(8,16,128,128,es),new rs(8,32,128,256,es),new rs(32,128,258,1024,es),new rs(32,258,258,4096,es)];function is(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Ra,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Va(this.dyn_ltree),Va(this.dyn_dtree),Va(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Va(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Va(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const os=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==ja&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==Na&&e.status!==Ba?1:0},as=t=>{if(os(t))return Ua(t,Ta);t.total_in=t.total_out=0,t.data_type=Ia;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?ja:Na,t.adler=2===e.wrap?0:1,e.last_flush=-2,fa(e),ka},ss=t=>{const e=as(t);var r;return e===ka&&((r=t.state).window_size=2*r.w_size,Va(r.head),r.max_lazy_match=ns[r.level].max_lazy,r.good_match=ns[r.level].good_length,r.nice_match=ns[r.level].nice_length,r.max_chain_length=ns[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),e},ls=(t,e,r,n,i,o)=>{if(!t)return Ta;let a=1;if(e===Ca&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>9||r!==Ra||n<8||n>15||e<0||e>9||o<0||o>Oa||8===n&&1!==a)return Ua(t,Ta);8===n&&(n=9);const s=new is;return t.state=s,s.strm=t,s.status=ja,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<ls(t,e,Ra,15,8,Da),deflateInit2:ls,deflateReset:ss,deflateResetKeep:as,deflateSetHeader:(t,e)=>os(t)||2!==t.state.wrap?Ta:(t.state.gzhead=e,ka),deflate:(t,e)=>{if(os(t)||e>_a||e<0)return t?Ua(t,Ta):Ta;const r=t.state;if(!t.output||0!==t.avail_in&&!t.input||r.status===Ba&&e!==wa)return Ua(t,0===t.avail_out?Sa:Ta);const n=r.last_flush;if(r.last_flush=e,0!==r.pending){if(qa(t),0===t.avail_out)return r.last_flush=-1,ka}else if(0===t.avail_in&&Ga(e)<=Ga(n)&&e!==wa)return Ua(t,Sa);if(r.status===Ba&&0!==t.avail_in)return Ua(t,Sa);if(r.status===ja&&0===r.wrap&&(r.status=Na),r.status===ja){let e=Ra+(r.w_bits-8<<4)<<8,n=-1;if(n=r.strategy>=La||r.level<2?0:r.level<6?1:6===r.level?2:3,e|=n<<6,0!==r.strstart&&(e|=32),e+=31-e%31,Xa(r,e),0!==r.strstart&&(Xa(r,t.adler>>>16),Xa(r,65535&t.adler)),t.adler=1,r.status=Na,qa(t),0!==r.pending)return r.last_flush=-1,ka}if(57===r.status)if(t.adler=0,Za(r,31),Za(r,139),Za(r,8),r.gzhead)Za(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Za(r,255&r.gzhead.time),Za(r,r.gzhead.time>>8&255),Za(r,r.gzhead.time>>16&255),Za(r,r.gzhead.time>>24&255),Za(r,9===r.level?2:r.strategy>=La||r.level<2?4:0),Za(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Za(r,255&r.gzhead.extra.length),Za(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=da(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(Za(r,0),Za(r,0),Za(r,0),Za(r,0),Za(r,0),Za(r,9===r.level?2:r.strategy>=La||r.level<2?4:0),Za(r,3),r.status=Na,qa(t),0!==r.pending)return r.last_flush=-1,ka;if(69===r.status){if(r.gzhead.extra){let e=r.pending,n=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+n>r.pending_buf_size;){let i=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+i),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>e&&(t.adler=da(t.adler,r.pending_buf,r.pending-e,e)),r.gzindex+=i,qa(t),0!==r.pending)return r.last_flush=-1,ka;e=0,n-=i}let i=new Uint8Array(r.gzhead.extra);r.pending_buf.set(i.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending+=n,r.gzhead.hcrc&&r.pending>e&&(t.adler=da(t.adler,r.pending_buf,r.pending-e,e)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let e,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(t.adler=da(t.adler,r.pending_buf,r.pending-n,n)),qa(t),0!==r.pending)return r.last_flush=-1,ka;n=0}e=r.gzindexn&&(t.adler=da(t.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let e,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(t.adler=da(t.adler,r.pending_buf,r.pending-n,n)),qa(t),0!==r.pending)return r.last_flush=-1,ka;n=0}e=r.gzindexn&&(t.adler=da(t.adler,r.pending_buf,r.pending-n,n))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(qa(t),0!==r.pending))return r.last_flush=-1,ka;Za(r,255&t.adler),Za(r,t.adler>>8&255),t.adler=0}if(r.status=Na,qa(t),0!==r.pending)return r.last_flush=-1,ka}if(0!==t.avail_in||0!==r.lookahead||e!==ba&&r.status!==Ba){let n=0===r.level?Qa(r,e):r.strategy===La?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(Ka(t),0===t.lookahead)){if(e===ba)return 1;break}if(t.match_length=0,r=ga(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(Ya(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===wa?(Ya(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Ya(t,!1),0===t.strm.avail_out)?1:2})(r,e):r.strategy===za?((t,e)=>{let r,n,i,o;const a=t.window;for(;;){if(t.lookahead<=Fa){if(Ka(t),t.lookahead<=Fa&&e===ba)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=t.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=t.strstart+Fa;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=ga(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=ga(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(Ya(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===wa?(Ya(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Ya(t,!1),0===t.strm.avail_out)?1:2})(r,e):ns[r.level].func(r,e);if(3!==n&&4!==n||(r.status=Ba),1===n||3===n)return 0===t.avail_out&&(r.last_flush=-1),ka;if(2===n&&(e===ya?va(r):e!==_a&&(pa(r,0,0,!1),e===xa&&(Va(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),qa(t),0===t.avail_out))return r.last_flush=-1,ka}return e!==wa?ka:r.wrap<=0?Aa:(2===r.wrap?(Za(r,255&t.adler),Za(r,t.adler>>8&255),Za(r,t.adler>>16&255),Za(r,t.adler>>24&255),Za(r,255&t.total_in),Za(r,t.total_in>>8&255),Za(r,t.total_in>>16&255),Za(r,t.total_in>>24&255)):(Xa(r,t.adler>>>16),Xa(r,65535&t.adler)),qa(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?ka:Aa)},deflateEnd:t=>{if(os(t))return Ta;const e=t.state.status;return t.state=null,e===Na?Ua(t,Ma):ka},deflateSetDictionary:(t,e)=>{let r=e.length;if(os(t))return Ta;const n=t.state,i=n.wrap;if(2===i||1===i&&n.status!==ja||n.lookahead)return Ta;if(1===i&&(t.adler=la(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===i&&(Va(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const o=t.avail_in,a=t.next_in,s=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,Ka(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=Wa(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,Ka(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=a,t.input=s,t.avail_in=o,n.wrap=i,ka},deflateInfo:"pako deflate (from Nodeca project)"};const ds=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var us={assign:function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const e in r)ds(r,e)&&(t[e]=r[e])}}return t},flattenChunks:t=>{let e=0;for(let r=0,n=t.length;r=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;fs[254]=fs[254]=1;var ps={string2buf:t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,i,o,a=t.length,s=0;for(i=0;i>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e},buf2string:(t,e)=>{const r=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let n,i;const o=new Array(2*r);for(i=0,n=0;n4)o[i++]=65533,n+=a-1;else{for(e&=2===a?31:3===a?15:7;a>1&&n1?o[i++]=65533:e<65536?o[i++]=e:(e-=65536,o[i++]=55296|e>>10&1023,o[i++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&hs)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let n=0;n{(e=e||t.length)>t.length&&(e=t.length);let r=e-1;for(;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+fs[t[r]]>e?r:e}},ms=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const gs=Object.prototype.toString,{Z_NO_FLUSH:vs,Z_SYNC_FLUSH:bs,Z_FULL_FLUSH:ys,Z_FINISH:xs,Z_OK:ws,Z_STREAM_END:_s,Z_DEFAULT_COMPRESSION:ks,Z_DEFAULT_STRATEGY:As,Z_DEFLATED:Ts}=ha;function Ms(t){this.options=us.assign({level:ks,method:Ts,chunkSize:16384,windowBits:15,memLevel:8,strategy:As},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ms,this.strm.avail_out=0;let r=cs.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==ws)throw new Error(ua[r]);if(e.header&&cs.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?ps.string2buf(e.dictionary):"[object ArrayBuffer]"===gs.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=cs.deflateSetDictionary(this.strm,t),r!==ws)throw new Error(ua[r]);this._dict_set=!0}}function Ss(t,e){const r=new Ms(e);if(r.push(t,!0),r.err)throw r.msg||ua[r.err];return r.result}Ms.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize;let i,o;if(this.ended)return!1;for(o=e===~~e?e:!0===e?xs:vs,"string"==typeof t?r.input=ps.string2buf(t):"[object ArrayBuffer]"===gs.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(o===bs||o===ys)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(i=cs.deflate(r,o),i===_s)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),i=cs.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===ws;if(0!==r.avail_out){if(o>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Ms.prototype.onData=function(t){this.chunks.push(t)},Ms.prototype.onEnd=function(t){t===ws&&(this.result=us.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Cs={Deflate:Ms,deflate:Ss,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Ss(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Ss(t,e)},constants:ha};const Es=16209;var Ls=function(t,e){let r,n,i,o,a,s,l,c,d,u,h,f,p,m,g,v,b,y,x,w,_,k,A,T;const M=t.state;r=t.next_in,A=t.input,n=r+(t.avail_in-5),i=t.next_out,T=t.output,o=i-(e-t.avail_out),a=i+(t.avail_out-257),s=M.dmax,l=M.wsize,c=M.whave,d=M.wnext,u=M.window,h=M.hold,f=M.bits,p=M.lencode,m=M.distcode,g=(1<>>24,h>>>=y,f-=y,y=b>>>16&255,0===y)T[i++]=65535&b;else{if(!(16&y)){if(64&y){if(32&y){M.mode=16191;break t}t.msg="invalid literal/length code",M.mode=Es;break t}b=p[(65535&b)+(h&(1<>>=y,f-=y),f<15&&(h+=A[r++]<>>24,h>>>=y,f-=y,y=b>>>16&255,16&y){if(w=65535&b,y&=15,fs){t.msg="invalid distance too far back",M.mode=Es;break t}if(h>>>=y,f-=y,y=i-o,w>y){if(y=w-y,y>c&&M.sane){t.msg="invalid distance too far back",M.mode=Es;break t}if(_=0,k=u,0===d){if(_+=l-y,y2;)T[i++]=k[_++],T[i++]=k[_++],T[i++]=k[_++],x-=3;x&&(T[i++]=k[_++],x>1&&(T[i++]=k[_++]))}else{_=i-w;do{T[i++]=T[_++],T[i++]=T[_++],T[i++]=T[_++],x-=3}while(x>2);x&&(T[i++]=T[_++],x>1&&(T[i++]=T[_++]))}break}if(64&y){t.msg="invalid distance code",M.mode=Es;break t}b=m[(65535&b)+(h&(1<>3,r-=x,f-=x<<3,h&=(1<{const l=s.bits;let c,d,u,h,f,p,m=0,g=0,v=0,b=0,y=0,x=0,w=0,_=0,k=0,A=0,T=null;const M=new Uint16Array(16),S=new Uint16Array(16);let C,E,L,z=null;for(m=0;m<=15;m++)M[m]=0;for(g=0;g=1&&0===M[b];b--);if(y>b&&(y=b),0===b)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(v=1;v0&&(0===t||1!==b))return-1;for(S[1]=0,m=1;m<15;m++)S[m+1]=S[m]+M[m];for(g=0;g852||2===t&&k>592)return 1;for(;;){C=m-w,a[g]+1=p?(E=z[a[g]-p],L=T[a[g]-p]):(E=96,L=0),c=1<>w)+d]=C<<24|E<<16|L}while(0!==d);for(c=1<>=1;if(0!==c?(A&=c-1,A+=c):A=0,g++,0==--M[m]){if(m===b)break;m=e[r+a[g]]}if(m>y&&(A&h)!==u){for(0===w&&(w=y),f+=v,x=m-w,_=1<852||2===t&&k>592)return 1;u=A&h,i[u]=y<<24|x<<16|f-o}}return 0!==A&&(i[f+A]=m-w<<24|64<<16),s.bits=y,0};const{Z_FINISH:Fs,Z_BLOCK:Ps,Z_TREES:js,Z_OK:Ns,Z_STREAM_END:Bs,Z_NEED_DICT:Us,Z_STREAM_ERROR:Gs,Z_DATA_ERROR:Vs,Z_MEM_ERROR:Hs,Z_BUF_ERROR:Ws,Z_DEFLATED:qs}=ha,Ys=16180,Zs=16190,Xs=16191,$s=16192,Js=16194,Ks=16199,Qs=16200,tl=16206,el=16209,rl=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function nl(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const il=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode16211?1:0},ol=t=>{if(il(t))return Gs;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=Ys,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,Ns},al=t=>{if(il(t))return Gs;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,ol(t)},sl=(t,e)=>{let r;if(il(t))return Gs;const n=t.state;return e<0?(r=0,e=-e):(r=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?Gs:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,al(t))},ll=(t,e)=>{if(!t)return Gs;const r=new nl;t.state=r,r.strm=t,r.window=null,r.mode=Ys;const n=sl(t,e);return n!==Ns&&(t.state=null),n};let cl,dl,ul=!0;const hl=t=>{if(ul){cl=new Int32Array(512),dl=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(Rs(1,t.lens,0,288,cl,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Rs(2,t.lens,0,32,dl,0,t.work,{bits:5}),ul=!1}t.lencode=cl,t.lenbits=9,t.distcode=dl,t.distbits=5},fl=(t,e,r,n)=>{let i;const o=t.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(e.subarray(r-o.wsize,r),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),o.window.set(e.subarray(r-n,r-n+i),o.wnext),(n-=i)?(o.window.set(e.subarray(r-n,r),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whavell(t,15),inflateInit2:ll,inflate:(t,e)=>{let r,n,i,o,a,s,l,c,d,u,h,f,p,m,g,v,b,y,x,w,_,k,A=0;const T=new Uint8Array(4);let M,S;const C=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(il(t)||!t.output||!t.input&&0!==t.avail_in)return Gs;r=t.state,r.mode===Xs&&(r.mode=$s),a=t.next_out,i=t.output,l=t.avail_out,o=t.next_in,n=t.input,s=t.avail_in,c=r.hold,d=r.bits,u=s,h=l,k=Ns;t:for(;;)switch(r.mode){case Ys:if(0===r.wrap){r.mode=$s;break}for(;d<16;){if(0===s)break t;s--,c+=n[o++]<>>8&255,r.check=da(r.check,T,2,0),c=0,d=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=el;break}if((15&c)!==qs){t.msg="unknown compression method",r.mode=el;break}if(c>>>=4,d-=4,_=8+(15&c),0===r.wbits&&(r.wbits=_),_>15||_>r.wbits){t.msg="invalid window size",r.mode=el;break}r.dmax=1<>8&1),512&r.flags&&4&r.wrap&&(T[0]=255&c,T[1]=c>>>8&255,r.check=da(r.check,T,2,0)),c=0,d=0,r.mode=16182;case 16182:for(;d<32;){if(0===s)break t;s--,c+=n[o++]<>>8&255,T[2]=c>>>16&255,T[3]=c>>>24&255,r.check=da(r.check,T,4,0)),c=0,d=0,r.mode=16183;case 16183:for(;d<16;){if(0===s)break t;s--,c+=n[o++]<>8),512&r.flags&&4&r.wrap&&(T[0]=255&c,T[1]=c>>>8&255,r.check=da(r.check,T,2,0)),c=0,d=0,r.mode=16184;case 16184:if(1024&r.flags){for(;d<16;){if(0===s)break t;s--,c+=n[o++]<>>8&255,r.check=da(r.check,T,2,0)),c=0,d=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(f=r.length,f>s&&(f=s),f&&(r.head&&(_=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(o,o+f),_)),512&r.flags&&4&r.wrap&&(r.check=da(r.check,n,f,o)),s-=f,o+=f,r.length-=f),r.length))break t;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===s)break t;f=0;do{_=n[o+f++],r.head&&_&&r.length<65536&&(r.head.name+=String.fromCharCode(_))}while(_&&f>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=Xs;break;case 16189:for(;d<32;){if(0===s)break t;s--,c+=n[o++]<>>=7&d,d-=7&d,r.mode=tl;break}for(;d<3;){if(0===s)break t;s--,c+=n[o++]<>>=1,d-=1,3&c){case 0:r.mode=16193;break;case 1:if(hl(r),r.mode=Ks,e===js){c>>>=2,d-=2;break t}break;case 2:r.mode=16196;break;case 3:t.msg="invalid block type",r.mode=el}c>>>=2,d-=2;break;case 16193:for(c>>>=7&d,d-=7&d;d<32;){if(0===s)break t;s--,c+=n[o++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=el;break}if(r.length=65535&c,c=0,d=0,r.mode=Js,e===js)break t;case Js:r.mode=16195;case 16195:if(f=r.length,f){if(f>s&&(f=s),f>l&&(f=l),0===f)break t;i.set(n.subarray(o,o+f),a),s-=f,o+=f,l-=f,a+=f,r.length-=f;break}r.mode=Xs;break;case 16196:for(;d<14;){if(0===s)break t;s--,c+=n[o++]<>>=5,d-=5,r.ndist=1+(31&c),c>>>=5,d-=5,r.ncode=4+(15&c),c>>>=4,d-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=el;break}r.have=0,r.mode=16197;case 16197:for(;r.have>>=3,d-=3}for(;r.have<19;)r.lens[C[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},k=Rs(0,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,k){t.msg="invalid code lengths set",r.mode=el;break}r.have=0,r.mode=16198;case 16198:for(;r.have>>24,v=A>>>16&255,b=65535&A,!(g<=d);){if(0===s)break t;s--,c+=n[o++]<>>=g,d-=g,r.lens[r.have++]=b;else{if(16===b){for(S=g+2;d>>=g,d-=g,0===r.have){t.msg="invalid bit length repeat",r.mode=el;break}_=r.lens[r.have-1],f=3+(3&c),c>>>=2,d-=2}else if(17===b){for(S=g+3;d>>=g,d-=g,_=0,f=3+(7&c),c>>>=3,d-=3}else{for(S=g+7;d>>=g,d-=g,_=0,f=11+(127&c),c>>>=7,d-=7}if(r.have+f>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=el;break}for(;f--;)r.lens[r.have++]=_}}if(r.mode===el)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=el;break}if(r.lenbits=9,M={bits:r.lenbits},k=Rs(1,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,k){t.msg="invalid literal/lengths set",r.mode=el;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},k=Rs(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,k){t.msg="invalid distances set",r.mode=el;break}if(r.mode=Ks,e===js)break t;case Ks:r.mode=Qs;case Qs:if(s>=6&&l>=258){t.next_out=a,t.avail_out=l,t.next_in=o,t.avail_in=s,r.hold=c,r.bits=d,Ls(t,h),a=t.next_out,i=t.output,l=t.avail_out,o=t.next_in,n=t.input,s=t.avail_in,c=r.hold,d=r.bits,r.mode===Xs&&(r.back=-1);break}for(r.back=0;A=r.lencode[c&(1<>>24,v=A>>>16&255,b=65535&A,!(g<=d);){if(0===s)break t;s--,c+=n[o++]<>y)],g=A>>>24,v=A>>>16&255,b=65535&A,!(y+g<=d);){if(0===s)break t;s--,c+=n[o++]<>>=y,d-=y,r.back+=y}if(c>>>=g,d-=g,r.back+=g,r.length=b,0===v){r.mode=16205;break}if(32&v){r.back=-1,r.mode=Xs;break}if(64&v){t.msg="invalid literal/length code",r.mode=el;break}r.extra=15&v,r.mode=16201;case 16201:if(r.extra){for(S=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;A=r.distcode[c&(1<>>24,v=A>>>16&255,b=65535&A,!(g<=d);){if(0===s)break t;s--,c+=n[o++]<>y)],g=A>>>24,v=A>>>16&255,b=65535&A,!(y+g<=d);){if(0===s)break t;s--,c+=n[o++]<>>=y,d-=y,r.back+=y}if(c>>>=g,d-=g,r.back+=g,64&v){t.msg="invalid distance code",r.mode=el;break}r.offset=b,r.extra=15&v,r.mode=16203;case 16203:if(r.extra){for(S=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=el;break}r.mode=16204;case 16204:if(0===l)break t;if(f=h-l,r.offset>f){if(f=r.offset-f,f>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=el;break}f>r.wnext?(f-=r.wnext,p=r.wsize-f):p=r.wnext-f,f>r.length&&(f=r.length),m=r.window}else m=i,p=a-r.offset,f=r.length;f>l&&(f=l),l-=f,r.length-=f;do{i[a++]=m[p++]}while(--f);0===r.length&&(r.mode=Qs);break;case 16205:if(0===l)break t;i[a++]=r.length,l--,r.mode=Qs;break;case tl:if(r.wrap){for(;d<32;){if(0===s)break t;s--,c|=n[o++]<{if(il(t))return Gs;let e=t.state;return e.window&&(e.window=null),t.state=null,Ns},inflateGetHeader:(t,e)=>{if(il(t))return Gs;const r=t.state;return 2&r.wrap?(r.head=e,e.done=!1,Ns):Gs},inflateSetDictionary:(t,e)=>{const r=e.length;let n,i,o;return il(t)?Gs:(n=t.state,0!==n.wrap&&n.mode!==Zs?Gs:n.mode===Zs&&(i=1,i=la(i,e,r,0),i!==n.check)?Vs:(o=fl(t,e,r,r),o?(n.mode=16210,Hs):(n.havedict=1,Ns)))},inflateInfo:"pako inflate (from Nodeca project)"},ml=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const gl=Object.prototype.toString,{Z_NO_FLUSH:vl,Z_FINISH:bl,Z_OK:yl,Z_STREAM_END:xl,Z_NEED_DICT:wl,Z_STREAM_ERROR:_l,Z_DATA_ERROR:kl,Z_MEM_ERROR:Al}=ha;function Tl(t){this.options=us.assign({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ms,this.strm.avail_out=0;let r=pl.inflateInit2(this.strm,e.windowBits);if(r!==yl)throw new Error(ua[r]);if(this.header=new ml,pl.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=ps.string2buf(e.dictionary):"[object ArrayBuffer]"===gl.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=pl.inflateSetDictionary(this.strm,e.dictionary),r!==yl)))throw new Error(ua[r])}function Ml(t,e){const r=new Tl(e);if(r.push(t),r.err)throw r.msg||ua[r.err];return r.result}Tl.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize,i=this.options.dictionary;let o,a,s;if(this.ended)return!1;for(a=e===~~e?e:!0===e?bl:vl,"[object ArrayBuffer]"===gl.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),o=pl.inflate(r,a),o===wl&&i&&(o=pl.inflateSetDictionary(r,i),o===yl?o=pl.inflate(r,a):o===kl&&(o=wl));r.avail_in>0&&o===xl&&r.state.wrap>0&&0!==t[r.next_in];)pl.inflateReset(r),o=pl.inflate(r,a);switch(o){case _l:case kl:case wl:case Al:return this.onEnd(o),this.ended=!0,!1}if(s=r.avail_out,r.next_out&&(0===r.avail_out||o===xl))if("string"===this.options.to){let t=ps.utf8border(r.output,r.next_out),e=r.next_out-t,i=ps.buf2string(r.output,t);r.next_out=e,r.avail_out=n-e,e&&r.output.set(r.output.subarray(t,t+e),0),this.onData(i)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(o!==yl||0!==s){if(o===xl)return o=pl.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},Tl.prototype.onData=function(t){this.chunks.push(t)},Tl.prototype.onEnd=function(t){t===yl&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=us.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Sl={Inflate:Tl,inflate:Ml,inflateRaw:function(t,e){return(e=e||{}).raw=!0,Ml(t,e)},ungzip:Ml,constants:ha};const{Deflate:Cl,deflate:El,deflateRaw:Ll,gzip:zl}=Cs,{Inflate:Ol,inflate:Dl,inflateRaw:Il,ungzip:Rl}=Sl;var Fl=Dl,Pl=__webpack_require__(745),jl={};jl.styleTagTransform=Ao(),jl.setAttributes=xo(),jl.insert=bo().bind(null,"head"),jl.domAPI=go(),jl.insertStyleElement=_o(),po()(Pl.A,jl),Pl.A&&Pl.A.locals&&Pl.A.locals;var Nl=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function s(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}l((n=n.apply(t,e||[])).next())}))};class Bl{constructor(t){(0,So.VT)("chemiscope-version").innerText=`version ${(0,Co.version)()}`,(0,So.eK)((t=>function(t){const e=(0,So.VT)("warning-display");e.getElementsByTagName("p")[0].innerText=t,e.style.display="block",setTimeout((()=>{e.style.display="none"}),4e3)}(t))),window.addEventListener("resize",Wl),(0,So.VT)(t).innerHTML='
\n
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n \x3c!-- height: 0 below is a hack to force safari to\n respect height: 100% on the children\n https://github.com/philipwalton/flexbugs/issues/197#issuecomment-378908438\n --\x3e\n
\n
\n
\n
\n
\n
\n
',this._setupLoadSaveMenu(),this.hideOnDemandStructures=document.createElement("style"),document.head.appendChild(this.hideOnDemandStructures),this.hideOnDemandStructures.sheet.insertRule(".hide-on-demand-structures {display: none}"),this.hideOnDemandStructures.sheet.disabled=!1}loadExample(t){return Nl(this,void 0,void 0,(function*(){let e={loadStructure:void 0};"Azaphenacenes"==t&&(e.loadStructure=(t,e)=>JSON.parse($.ajax({type:"GET",url:`examples/${e.data}`,async:!1}).responseText)),yield this.fetchAndLoad(`/examples/${t}.json.gz`,e)}))}fetchAndLoad(t){return Nl(this,arguments,void 0,(function*(t,e={}){Ul(),this.dataset=t;const r=yield fetch(this.dataset);if(!r.ok)throw Error(`unable to load file at '${this.dataset}'`);const n=yield r.arrayBuffer();if(0===n.byteLength&&this.dataset.startsWith("https://api.allorigins.win/raw?url=")){let t=decodeURIComponent(this.dataset.substr(35));throw Error(`unable to load file at '${t}'`)}const i=Vl(n);yield this.load(e,i)}))}load(t,e){return Nl(this,void 0,void 0,(function*(){(0,So.VT)("error-display").style.display="none";const r={map:"chemiscope-map",info:"chemiscope-info",meta:"chemiscope-meta",structure:"chemiscope-structure",loadStructure:t.loadStructure};this.hideOnDemandStructures.sheet.disabled=void 0!==t.loadStructure,void 0!==this.visualizer&&this.visualizer.remove(),this.visualizer=yield Co.DefaultVisualizer.load(r,e),this.visualizer.structure.positionSettingsModal=t=>{const e=(0,So.VT)("chemiscope-structure").getBoundingClientRect();let r=e.left-t.width+25;return r<25&&(r=25),{top:e.top,left:r}},this.visualizer.map.positionSettingsModal=t=>{const e=(0,So.VT)("chemiscope-map").getBoundingClientRect();let r;return r=window.innerWidth<1400?window.innerWidth-t.width-10:e.left+e.width+25,{top:e.top,left:r}},Wl(),Gl()}))}_setupLoadSaveMenu(){const t=(0,So.VT)("load-dataset"),e=(0,So.VT)("load-save"),r=(0,So.VT)("close-load-save-modal");t.onchange=()=>{e.classList.remove("fade"),r.click(),Ul();const n=t.files[0];this.dataset=n.name,Hl(n,(r=>{const n=Vl(r);this.load({},n),t.value="",e.classList.add("fade")}))};const n=(0,So.VT)("save-dataset"),i=(0,So.VT)("save-dataset-name"),o=(0,So.VT)("save-dataset-settings"),a=(0,So.VT)("save-dataset-structures");n.onclick=()=>{if(void 0===this.visualizer)return;const t=this.visualizer.dataset(a.checked);var e;o.checked&&(t.settings=this.visualizer.saveSettings()),ql(i.value,(e=t,JSON.stringify(e,((t,e)=>"number"==typeof e&&isNaN(e)?"***NaN***":e)).replace(/"\*\*\*NaN\*\*\*"/g,"NaN"))),r.click()};const s=(0,So.VT)("load-settings");s.onchange=()=>{e.classList.remove("fade"),r.click(),Ul(),Hl(s.files[0],(t=>{void 0!==this.visualizer&&(this.visualizer.applySettings(Vl(t)),s.value="",Gl(),e.classList.add("fade"))}))};const l=(0,So.VT)("save-settings"),c=(0,So.VT)("save-settings-name"),d=(0,So.VT)("save-settings-map"),u=(0,So.VT)("save-settings-structure"),h=(0,So.VT)("save-settings-selected");l.onclick=()=>{if(void 0===this.visualizer)return;const t=this.visualizer.saveSettings();d.checked||delete t.map,u.checked||delete t.structure,h.checked||delete t.pinned,ql(c.value,JSON.stringify(t)),r.click()}}}function Ul(){(0,So.VT)("loading").style.display="block";const t=document.getElementsByTagName("main")[0];t.onclick=()=>{},t.style.opacity="0.3"}function Gl(){(0,So.VT)("loading").style.display="none";const t=document.getElementsByTagName("main")[0];t.onclick=null,t.style.opacity="1"}function Vl(t){const e=new Uint8Array(t.slice(0,2));let r;return r=31==e[0]&&139==e[1]?Fl(new Uint8Array(t),{to:"string"}):new TextDecoder("utf-8").decode(t),function(t){return JSON.parse(t.replace(/\bNaN\b/g,'"***NaN***"'),((t,e)=>"***NaN***"===e?NaN:e))}(r)}function Hl(t,e){const r=new FileReader;r.onload=()=>{if(r.error)throw Error(`could not read ${t.name}: ${r.error}`);r.result&&e(r.result)},r.readAsArrayBuffer(t)}function Wl(){const t=(0,So.VT)("chemiscope-structure").getBoundingClientRect().height,e=document.getElementsByClassName("chsp-info-table");for(let r=0;r{document.body.removeChild(r),URL.revokeObjectURL(r.href)}),2e3)}})(),__webpack_exports__})())); \ No newline at end of file diff --git a/chemiscope.min.js b/chemiscope.min.js index ad17fbd06..9261fae1a 100644 --- a/chemiscope.min.js +++ b/chemiscope.min.js @@ -1,2 +1,2 @@ /*! For license information please see chemiscope.min.js.LICENSE.txt */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Chemiscope=e():t.Chemiscope=e()}(self,(()=>(()=>{var __webpack_modules__={5955:(t,e,r)=>{"use strict";r.d(e,{A:()=>pt});var n=r(78706),i=r.n(n),o=r(72859),a=r.n(o),s=r(21906),l=r.n(s),c=new URL(r(77035),r.b),u=new URL(r(43470),r.b),h=new URL(r(68164),r.b),d=new URL(r(64665),r.b),f=new URL(r(4890),r.b),p=new URL(r(13363),r.b),m=new URL(r(13490),r.b),g=new URL(r(47603),r.b),v=new URL(r(13913),r.b),b=new URL(r(91413),r.b),y=new URL(r(64643),r.b),x=new URL(r(80216),r.b),_=new URL(r(61907),r.b),w=new URL(r(68605),r.b),k=new URL(r(25446),r.b),A=new URL(r(56694),r.b),M=new URL(r(24420),r.b),T=new URL(r(75796),r.b),S=new URL(r(92228),r.b),C=new URL(r(9819),r.b),E=new URL(r(47695),r.b),L=new URL(r(28869),r.b),z=new URL(r(30557),r.b),O=new URL(r(48460),r.b),D=new URL(r(56539),r.b),I=new URL(r(43737),r.b),F=new URL(r(47914),r.b),R=new URL(r(26117),r.b),P=new URL(r(66311),r.b),j=a()(i()),N=l()(c),B=l()(u),U=l()(h),G=l()(d),V=l()(f),H=l()(p),W=l()(m),q=l()(g),Y=l()(v),Z=l()(b),X=l()(y),$=l()(x),J=l()(_),K=l()(w),Q=l()(k),tt=l()(A),et=l()(M),rt=l()(T),nt=l()(S),it=l()(C),ot=l()(E),at=l()(L),st=l()(z),lt=l()(O),ct=l()(D),ut=l()(I),ht=l()(F),dt=l()(R),ft=l()(P);j.push([t.id,`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(${N})}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(${B})}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(${U})}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(${G})}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(${V})}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(${H})}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(${W})}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(${q})}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(${Y})}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(${Z})}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(${X})}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(${q})}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(${$})}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(${J})}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(${K})}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url(${Q})}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url(${tt})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(${et})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(${rt})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(${nt})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(${it})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(${ot})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(${at})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(${st})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(${lt})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(${nt})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(${it})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(${ot})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(${at})}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(${ct})}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(${ut})}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url(${ht});background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url(${ht})}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url(${ht})}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url(${dt});border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(${ft})}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(${dt})}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,""]);const pt=j},5018:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(78706),i=r.n(n),o=r(72859),a=r.n(o)()(i());a.push([t.id,".chsp-meta {\n z-index: 1;\n cursor: pointer;\n}\n\n.chsp-meta .chsp-info-icon {\n float: right;\n margin-top: 5px;\n margin-left: 3px;\n}\n\n.chsp-meta .chsp-info-icon svg {\n display: block;\n width: 14px;\n height: 14px;\n opacity: 0.6;\n}\n\n.chsp-authors-list {\n padding: 0;\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n justify-content: center;\n}\n\n.chsp-authors-list li {\n border: solid #dee2e6 1px;\n padding: 10px;\n list-style-type: none;\n white-space: nowrap;\n}\n\n.chsp-open-map-settings {\n position: absolute;\n top: 3px;\n left: 5px;\n z-index: 10;\n}\n\n.chsp-open-viewer-settings {\n position: absolute;\n top: 5px;\n right: 5px;\n}\n\n.chsp-extra-options-btn {\n margin: auto;\n display: block;\n}\n\n/* Tooltip text */\n.chsp-tooltip {\n visibility: hidden;\n background: #69738a;\n color: white;\n padding: 6px;\n font-size: 12px;\n line-height: 12px;\n white-space: nowrap;\n border-radius: 2px;\n text-align: center;\n display: inline-block;\n width: 9em;\n position: absolute;\n z-index: 100000;\n}\n\n.chsp-tooltip-right {\n top: 0px;\n right: -9.5em;\n}\n\n.chsp-tooltip-below {\n top: 35px;\n left: -3.5em;\n}\n\n.chsp-has-tooltip:hover .chsp-tooltip {\n visibility: visible;\n}\n\n.chsp-pin-marker {\n border-radius: 50%;\n border: solid 1px black;\n --size: 12px;\n width: var(--size);\n height: var(--size);\n z-index: 10;\n}\n\n.chsp-map-pin-marker {\n position: absolute;\n /* ensure the top/right/left/bottom positioning is relative to the center of the div */\n transform: translate(calc(-50% + var(--size)), -50%);\n}\n\n.chsp-pin-marker:hover {\n --size: 20px;\n cursor: pointer;\n}\n\n/* This class is added on top of .chsp-pin-marker for the active pinned structure/environment */\n.chsp-active-pin {\n border-width: 2px;\n --size: 20px;\n}\n\n.chsp-active-pin:hover {\n --size: 22px;\n cursor: default;\n}\n\n.chsp-viewer-button {\n position: absolute;\n padding: 1px;\n margin: 0;\n height: 28px;\n width: 28px;\n z-index: 10;\n}\n\n.chsp-viewer-action-button {\n background-color: white;\n border: none;\n}\n\n.chsp-viewer-action-button:hover {\n background: white;\n}\n\n.chsp-viewer-action-button svg {\n opacity: 0.4;\n transition: opacity 0.15s ease-in-out;\n}\n\n.chsp-viewer-action-button:hover svg {\n opacity: 0.6;\n}\n\n.chsp-structure-viewer-grid {\n display: grid;\n position: relative;\n width: 100%;\n height: 100%;\n grid-column-gap: 2px;\n grid-row-gap: 2px;\n}\n\n.chsp-structure-viewer-cell {\n width: 99%;\n height: 99%;\n left: 0.5%;\n top: 0.5%;\n position: relative;\n border: 1px solid lightgray;\n padding: 1px;\n}\n\n.chsp-structure-viewer-cell-active {\n border-color: gray;\n}\n\n.chsp-map-options {\n display: grid;\n grid-template-columns: 1fr 0.5fr;\n align-items: center;\n justify-content: center;\n align-content: start;\n column-gap: 1em;\n}\n\n.chsp-map-options label {\n min-width: 6em;\n}\n\n.chsp-map-options > :nth-child(n + 3):not(.chsp-map-extra-options) {\n margin-top: 1.3rem;\n}\n\n.chsp-map-extra-options {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: auto 1fr 1fr;\n column-gap: 1em;\n}\n\n.chsp-map-extra-options > * {\n margin: 0.5em 0;\n}\n\n.chsp-map-extra-options label {\n min-width: auto;\n}\n\n.chsp-map-extra-options {\n grid-column: 1 / span 2;\n}\n\n.chsp-map-options .form-check-label {\n width: auto;\n}\n\n.chsp-modal-header {\n cursor: grab;\n}\n\n.chsp-play-button {\n border: 0;\n background: transparent;\n box-sizing: border-box;\n height: 1.2em;\n width: 1.2em;\n margin-left: 0.5ex;\n\n border-color: transparent transparent transparent #202020;\n transition: 100ms all ease;\n cursor: pointer;\n\n border-style: solid;\n border-width: 0.7em 0 0.7em 1em;\n}\n\n.chsp-play-button.chsp-playing {\n border-style: double;\n border-width: 0px 0 0px 1.2em;\n}\n\n.chsp-play-button:hover {\n border-color: transparent transparent transparent #404040;\n}\n\n.chsp-properties-table {\n height: 100%;\n width: 80%;\n margin: auto;\n}\n\n.chsp-properties-table td,\n.chsp-properties-table th {\n width: 50%;\n border-top: none;\n}\n\n.chsp-settings-section-title {\n font-weight: bold;\n}\n\n/* Change Plotly modebar style to match the style of the structure grid buttons */\n\n.chsp-map .modebar-group {\n padding-left: 0 !important;\n}\n\n.chsp-map .modebar-btn {\n cursor: default !important;\n font-family: apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n 'Noto Color Emoji';\n}\n\n.chsp-map .modebar-btn::after {\n opacity: 0.9;\n}\n\n.chsp-map .icon:hover + .modebar-btn::after {\n visibility: visible;\n}\n\n.chsp-map .modebar-btn::before {\n content: none !important;\n}\n\n.chsp-map .modebar-btn .icon {\n transition: opacity 0.15s ease-in-out;\n padding: 3px;\n opacity: 0.3;\n cursor: pointer;\n}\n\n.chsp-map .modebar-group svg.icon {\n width: 2em;\n height: 2em;\n border-radius: 0.2em;\n}\n\n.chsp-map .modebar-group svg.icon:active {\n color: #212529;\n background-color: #dae0e5;\n border-color: #d3d9df;\n box-shadow: 0 0 0 0.2rem rgb(216 217 219 / 50%);\n}\n\n.chsp-map .modebar-btn .icon path {\n transition:\n color 0.15s ease-in-out,\n background-color 0.15s ease-in-out,\n border-color 0.15s ease-in-out,\n box-shadow 0.15s ease-in-out;\n fill: black !important;\n}\n\n.chsp-map .modebar-btn .icon:hover {\n opacity: 0.6;\n}\n\n.chsp-map .modebar-btn.active .icon {\n opacity: 0.6;\n}\n\n.chsp-info-btns {\n display: flex;\n position: relative;\n margin-bottom: 0.5ex;\n margin-top: 0.5ex;\n justify-content: center;\n}\n\n.chsp-info-structure-btn {\n min-width: 8em;\n padding-left: 6px;\n padding-right: 4px;\n font-weight: bold;\n font-size: small;\n background-color: none;\n border-color: #66a5e8;\n border-width: 2px;\n float: left;\n}\n\n.chsp-info-structure-btn:hover {\n background-color: #5b94d0;\n}\n\n.chsp-info-atom-btn {\n margin-left: 1em;\n padding-left: 6px;\n padding-right: 4px;\n min-width: 8em;\n font-weight: bold;\n font-size: small;\n background-color: none;\n border-color: #4cb64c;\n border-width: 2px;\n}\n\n.chsp-info-atom-btn:hover {\n background-color: #44a344;\n}\n\n.chsp-info-btns-svg {\n float: left;\n padding-right: 6px;\n padding-top: 3px;\n}\n\n.chsp-info-btns-svg svg {\n display: block;\n opacity: 0.6;\n}\n\n.chsp-info-number {\n -moz-appearance: textfield;\n appearance: textfield;\n border: none;\n transition: background-color 0.15s;\n background-color: #ebedf0;\n margin-left: 2px;\n margin-right: 3px;\n font-family: inherit;\n width: 4em;\n}\n\n.chsp-info-atom-btn:hover .chsp-info-number {\n background-color: #69b569;\n}\n\n.chsp-info-structure-btn:hover .chsp-info-number {\n background-color: #7ba9d9;\n}\n\n.chsp-info-number::-webkit-outer-spin-button,\n.chsp-info-number::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.chsp-info-tables {\n position: relative;\n width: 100%;\n}\n\n.chsp-info-table {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 10;\n background-color: white;\n /* max-height is set in JavaScript */\n overflow: auto;\n}\n\n.chsp-info-table.collapsing {\n overflow: hidden;\n}\n\n.chsp-info-table table {\n margin: 0;\n}\n\n/* Change the atoms slider thumb color to green, to match structure highlight */\n.chsp-atom-slider::-webkit-slider-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-moz-range-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-ms-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-webkit-slider-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider::-moz-range-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider::-ms-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider:focus::-webkit-slider-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-atom-slider:focus::-moz-range-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-atom-slider:focus::-ms-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-settings-representation {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr;\n grid-row-gap: 1ex;\n}\n\n.chsp-settings-representation label {\n cursor: help;\n}\n\n.chsp-settings-supercell {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr 2fr;\n}\n\n.chsp-supercell-count {\n max-width: 3.5em;\n}\n\n.chsp-settings-camera {\n display: grid;\n gap: 1em;\n grid-template-columns: repeat(7, auto);\n justify-content: center;\n}\n\n.chsp-settings-environments {\n display: grid;\n align-items: center;\n column-gap: 1em;\n grid-template-columns: 1fr 1fr 1fr;\n}\n\n.chsp-settings-extra-options {\n display: grid;\n gap: 1em;\n grid-template-columns: 1fr 1fr 1fr;\n grid-column: 1 / span 3;\n}\n\n.chsp-settings-extra-options > :nth-child(-n + 3) {\n margin-top: 1em;\n}\n\n.chsp-settings-trajectory {\n display: grid;\n grid-template-columns: 12em 12em;\n justify-content: center;\n align-content: center;\n gap: 1em;\n margin-bottom: 1ex;\n}\n\n.chsp-cell-info {\n position: absolute;\n bottom: 5px;\n left: 5px;\n font-size: 0.8em;\n}\n\n.chsp-toggle-plot-btn {\n display: block;\n position: relative;\n margin-top: 3px;\n margin-bottom: 1px;\n}\n\n.chsp-atom-color-property {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: 1fr 1fr;\n column-gap: 1em;\n margin: 0.5em 0;\n}\n\n.chsp-atom-extra-options {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: auto 1fr 1fr;\n column-gap: 1em;\n}\n\n.chsp-atom-extra-options > * {\n margin: 0.5em 0;\n}\n\n.chsp-atom-extra-options label {\n min-width: auto;\n}\n\n.chsp-atom-extra-options {\n grid-column: 1 / span 2;\n}\n\n.chsp-target-toggle {\n padding-left: 5px;\n padding-right: 5px;\n display: flex;\n justify-content: flex-end;\n gap: 5px;\n}\n\n.chsp-target-spinner {\n width: 25px;\n height: 25px;\n margin-left: 5px;\n}\n",""]);const s=a},48654:(t,e,r)=>{"use strict";r.d(e,{A:()=>V});var n=r(78706),i=r.n(n),o=r(72859),a=r.n(o),s=r(21906),l=r.n(s),c=new URL(r(35531),r.b),u=new URL(r(45419),r.b),h=new URL(r(83385),r.b),d=new URL(r(14274),r.b),f=new URL(r(57154),r.b),p=new URL(r(35782),r.b),m=new URL(r(54718),r.b),g=new URL(r(48487),r.b),v=new URL(r(35372),r.b),b=new URL(r(17914),r.b),y=new URL(r(36366),r.b),x=new URL(r(67830),r.b),_=new URL(r(88832),r.b),w=new URL(r(57249),r.b),k=new URL(r(75932),r.b),A=new URL(r(11144),r.b),M=a()(i()),T=l()(c),S=l()(u),C=l()(h),E=l()(d),L=l()(f),z=l()(p),O=l()(m),D=l()(g),I=l()(v),F=l()(b),R=l()(y),P=l()(x),j=l()(_),N=l()(w),B=l()(k),U=l()(A);M.push([t.id,`@charset "UTF-8";/*!\n * Bootstrap v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors\n * Copyright 2011-2022 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-body-color-rgb:33,37,41;--bs-body-bg-rgb:255,255,255;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, 0.175);--bs-border-radius:0.375rem;--bs-border-radius-sm:0.25rem;--bs-border-radius-lg:0.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-2xl:2rem;--bs-border-radius-pill:50rem;--bs-link-color:#0d6efd;--bs-link-hover-color:#0a58ca;--bs-code-color:#d63384;--bs-highlight-bg:#fff3cd}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;border:0;border-top:1px solid;opacity:.25}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.small,small{font-size:.875em}.mark,mark{padding:.1875em;background-color:var(--bs-highlight-bg)}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:var(--bs-link-color);text-decoration:underline}a:hover{color:var(--bs-link-hover-color)}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:var(--bs-code-color);word-wrap:break-word}a>code{color:inherit}kbd{padding:.1875rem .375rem;font-size:.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:.25rem}kbd kbd{padding:0;font-size:1em}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none!important}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}::file-selector-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:calc(1.625rem + 4.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-1{font-size:5rem}}.display-2{font-size:calc(1.575rem + 3.9vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-2{font-size:4.5rem}}.display-3{font-size:calc(1.525rem + 3.3vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-3{font-size:4rem}}.display-4{font-size:calc(1.475rem + 2.7vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-4{font-size:3.5rem}}.display-5{font-size:calc(1.425rem + 2.1vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-5{font-size:3rem}}.display-6{font-size:calc(1.375rem + 1.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-6{font-size:2.5rem}}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:.875em;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote>:last-child{margin-bottom:0}.blockquote-footer{margin-top:-1rem;margin-bottom:1rem;font-size:.875em;color:#6c757d}.blockquote-footer::before{content:"— "}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid var(--bs-border-color);border-radius:.375rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:.875em;color:#6c757d}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{--bs-gutter-x:1.5rem;--bs-gutter-y:0;width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(-1 * var(--bs-gutter-y));margin-right:calc(-.5 * var(--bs-gutter-x));margin-left:calc(-.5 * var(--bs-gutter-x))}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.33333333%}.col-2{flex:0 0 auto;width:16.66666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.33333333%}.col-5{flex:0 0 auto;width:41.66666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.33333333%}.col-8{flex:0 0 auto;width:66.66666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.33333333%}.col-11{flex:0 0 auto;width:91.66666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.33333333%}.col-sm-2{flex:0 0 auto;width:16.66666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.33333333%}.col-sm-5{flex:0 0 auto;width:41.66666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.33333333%}.col-sm-8{flex:0 0 auto;width:66.66666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.33333333%}.col-sm-11{flex:0 0 auto;width:91.66666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.33333333%}.col-md-2{flex:0 0 auto;width:16.66666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.33333333%}.col-md-5{flex:0 0 auto;width:41.66666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.33333333%}.col-md-8{flex:0 0 auto;width:66.66666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.33333333%}.col-md-11{flex:0 0 auto;width:91.66666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.33333333%}.col-lg-2{flex:0 0 auto;width:16.66666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.33333333%}.col-lg-5{flex:0 0 auto;width:41.66666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.33333333%}.col-lg-8{flex:0 0 auto;width:66.66666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.33333333%}.col-lg-11{flex:0 0 auto;width:91.66666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.33333333%}.col-xl-2{flex:0 0 auto;width:16.66666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.33333333%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.33333333%}.col-xl-8{flex:0 0 auto;width:66.66666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.33333333%}.col-xl-11{flex:0 0 auto;width:91.66666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0%}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.33333333%}.col-xxl-2{flex:0 0 auto;width:16.66666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.33333333%}.col-xxl-5{flex:0 0 auto;width:41.66666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.33333333%}.col-xxl-8{flex:0 0 auto;width:66.66666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.33333333%}.col-xxl-11{flex:0 0 auto;width:91.66666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.33333333%}.offset-xxl-2{margin-left:16.66666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.33333333%}.offset-xxl-5{margin-left:41.66666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.33333333%}.offset-xxl-8{margin-left:66.66666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.33333333%}.offset-xxl-11{margin-left:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.table{--bs-table-color:var(--bs-body-color);--bs-table-bg:transparent;--bs-table-border-color:var(--bs-border-color);--bs-table-accent-bg:transparent;--bs-table-striped-color:var(--bs-body-color);--bs-table-striped-bg:rgba(0, 0, 0, 0.05);--bs-table-active-color:var(--bs-body-color);--bs-table-active-bg:rgba(0, 0, 0, 0.1);--bs-table-hover-color:var(--bs-body-color);--bs-table-hover-bg:rgba(0, 0, 0, 0.075);width:100%;margin-bottom:1rem;color:var(--bs-table-color);vertical-align:top;border-color:var(--bs-table-border-color)}.table>:not(caption)>*>*{padding:.5rem .5rem;background-color:var(--bs-table-bg);border-bottom-width:1px;box-shadow:inset 0 0 0 9999px var(--bs-table-accent-bg)}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table-group-divider{border-top:2px solid currentcolor}.caption-top{caption-side:top}.table-sm>:not(caption)>*>*{padding:.25rem .25rem}.table-bordered>:not(caption)>*{border-width:1px 0}.table-bordered>:not(caption)>*>*{border-width:0 1px}.table-borderless>:not(caption)>*>*{border-bottom-width:0}.table-borderless>:not(:first-child){border-top-width:0}.table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-striped-columns>:not(caption)>tr>:nth-child(2n){--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-active{--bs-table-accent-bg:var(--bs-table-active-bg);color:var(--bs-table-active-color)}.table-hover>tbody>tr:hover>*{--bs-table-accent-bg:var(--bs-table-hover-bg);color:var(--bs-table-hover-color)}.table-primary{--bs-table-color:#000;--bs-table-bg:#cfe2ff;--bs-table-border-color:#bacbe6;--bs-table-striped-bg:#c5d7f2;--bs-table-striped-color:#000;--bs-table-active-bg:#bacbe6;--bs-table-active-color:#000;--bs-table-hover-bg:#bfd1ec;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-secondary{--bs-table-color:#000;--bs-table-bg:#e2e3e5;--bs-table-border-color:#cbccce;--bs-table-striped-bg:#d7d8da;--bs-table-striped-color:#000;--bs-table-active-bg:#cbccce;--bs-table-active-color:#000;--bs-table-hover-bg:#d1d2d4;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-success{--bs-table-color:#000;--bs-table-bg:#d1e7dd;--bs-table-border-color:#bcd0c7;--bs-table-striped-bg:#c7dbd2;--bs-table-striped-color:#000;--bs-table-active-bg:#bcd0c7;--bs-table-active-color:#000;--bs-table-hover-bg:#c1d6cc;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-info{--bs-table-color:#000;--bs-table-bg:#cff4fc;--bs-table-border-color:#badce3;--bs-table-striped-bg:#c5e8ef;--bs-table-striped-color:#000;--bs-table-active-bg:#badce3;--bs-table-active-color:#000;--bs-table-hover-bg:#bfe2e9;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-warning{--bs-table-color:#000;--bs-table-bg:#fff3cd;--bs-table-border-color:#e6dbb9;--bs-table-striped-bg:#f2e7c3;--bs-table-striped-color:#000;--bs-table-active-bg:#e6dbb9;--bs-table-active-color:#000;--bs-table-hover-bg:#ece1be;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-danger{--bs-table-color:#000;--bs-table-bg:#f8d7da;--bs-table-border-color:#dfc2c4;--bs-table-striped-bg:#eccccf;--bs-table-striped-color:#000;--bs-table-active-bg:#dfc2c4;--bs-table-active-color:#000;--bs-table-hover-bg:#e5c7ca;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-light{--bs-table-color:#000;--bs-table-bg:#f8f9fa;--bs-table-border-color:#dfe0e1;--bs-table-striped-bg:#ecedee;--bs-table-striped-color:#000;--bs-table-active-bg:#dfe0e1;--bs-table-active-color:#000;--bs-table-hover-bg:#e5e6e7;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-dark{--bs-table-color:#fff;--bs-table-bg:#212529;--bs-table-border-color:#373b3e;--bs-table-striped-bg:#2c3034;--bs-table-striped-color:#fff;--bs-table-active-bg:#373b3e;--bs-table-active-color:#fff;--bs-table-hover-bg:#323539;--bs-table-hover-color:#fff;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media (max-width:575.98px){.table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:767.98px){.table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:991.98px){.table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1199.98px){.table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1399.98px){.table-responsive-xxl{overflow-x:auto;-webkit-overflow-scrolling:touch}}.form-label{margin-bottom:.5rem}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem}.form-text{margin-top:.25rem;font-size:.875em;color:#6c757d}.form-control{display:block;width:100%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.375rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not([readonly]){cursor:pointer}.form-control:focus{color:#212529;background-color:#fff;border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-control::-webkit-date-and-time-value{height:1.5em}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled{background-color:#e9ecef;opacity:1}.form-control::-webkit-file-upload-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control::file-selector-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}.form-control::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#dde0e3}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:#dde0e3}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext:focus{outline:0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{min-height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;border-radius:.25rem}.form-control-sm::-webkit-file-upload-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-sm::file-selector-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-lg{min-height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;border-radius:.5rem}.form-control-lg::-webkit-file-upload-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.form-control-lg::file-selector-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}textarea.form-control{min-height:calc(1.5em + .75rem + 2px)}textarea.form-control-sm{min-height:calc(1.5em + .5rem + 2px)}textarea.form-control-lg{min-height:calc(1.5em + 1rem + 2px)}.form-control-color{width:3rem;height:calc(1.5em + .75rem + 2px);padding:.375rem}.form-control-color:not(:disabled):not([readonly]){cursor:pointer}.form-control-color::-moz-color-swatch{border:0!important;border-radius:.375rem}.form-control-color::-webkit-color-swatch{border-radius:.375rem}.form-control-color.form-control-sm{height:calc(1.5em + .5rem + 2px)}.form-control-color.form-control-lg{height:calc(1.5em + 1rem + 2px)}.form-select{display:block;width:100%;padding:.375rem 2.25rem .375rem .75rem;-moz-padding-start:calc(0.75rem - 3px);font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-image:url(${T});background-repeat:no-repeat;background-position:right .75rem center;background-size:16px 12px;border:1px solid #ced4da;border-radius:.375rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-select{transition:none}}.form-select:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-select[multiple],.form-select[size]:not([size="1"]){padding-right:.75rem;background-image:none}.form-select:disabled{background-color:#e9ecef}.form-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #212529}.form-select-sm{padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem;border-radius:.25rem}.form-select-lg{padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem;border-radius:.5rem}.form-check{display:block;min-height:1.5rem;padding-left:1.5em;margin-bottom:.125rem}.form-check .form-check-input{float:left;margin-left:-1.5em}.form-check-reverse{padding-right:1.5em;padding-left:0;text-align:right}.form-check-reverse .form-check-input{float:right;margin-right:-1.5em;margin-left:0}.form-check-input{width:1em;height:1em;margin-top:.25em;vertical-align:top;background-color:#fff;background-repeat:no-repeat;background-position:center;background-size:contain;border:1px solid rgba(0,0,0,.25);-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;print-color-adjust:exact}.form-check-input[type=checkbox]{border-radius:.25em}.form-check-input[type=radio]{border-radius:50%}.form-check-input:active{filter:brightness(90%)}.form-check-input:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-check-input:checked{background-color:#0d6efd;border-color:#0d6efd}.form-check-input:checked[type=checkbox]{background-image:url(${S})}.form-check-input:checked[type=radio]{background-image:url(${C})}.form-check-input[type=checkbox]:indeterminate{background-color:#0d6efd;border-color:#0d6efd;background-image:url(${E})}.form-check-input:disabled{pointer-events:none;filter:none;opacity:.5}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:default;opacity:.5}.form-switch{padding-left:2.5em}.form-switch .form-check-input{width:2em;margin-left:-2.5em;background-image:url(${L});background-position:left center;border-radius:2em;transition:background-position .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-switch .form-check-input{transition:none}}.form-switch .form-check-input:focus{background-image:url(${z})}.form-switch .form-check-input:checked{background-position:right center;background-image:url(${O})}.form-switch.form-check-reverse{padding-right:2.5em;padding-left:0}.form-switch.form-check-reverse .form-check-input{margin-right:-2.5em;margin-left:0}.form-check-inline{display:inline-block;margin-right:1rem}.btn-check{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.btn-check:disabled+.btn,.btn-check[disabled]+.btn{pointer-events:none;filter:none;opacity:.65}.form-range{width:100%;height:1.5rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.form-range:focus{outline:0}.form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range::-moz-focus-outer{border:0}.form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#0d6efd;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}.form-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#0d6efd;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-moz-range-thumb{-moz-transition:none;transition:none}}.form-range::-moz-range-thumb:active{background-color:#b6d4fe}.form-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range:disabled{pointer-events:none}.form-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.form-range:disabled::-moz-range-thumb{background-color:#adb5bd}.form-floating{position:relative}.form-floating>.form-control,.form-floating>.form-control-plaintext,.form-floating>.form-select{height:calc(3.5rem + 2px);line-height:1.25}.form-floating>label{position:absolute;top:0;left:0;width:100%;height:100%;padding:1rem .75rem;overflow:hidden;text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:1px solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media (prefers-reduced-motion:reduce){.form-floating>label{transition:none}}.form-floating>.form-control,.form-floating>.form-control-plaintext{padding:1rem .75rem}.form-floating>.form-control-plaintext::-moz-placeholder,.form-floating>.form-control::-moz-placeholder{color:transparent}.form-floating>.form-control-plaintext::placeholder,.form-floating>.form-control::placeholder{color:transparent}.form-floating>.form-control-plaintext:not(:-moz-placeholder-shown),.form-floating>.form-control:not(:-moz-placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control-plaintext:focus,.form-floating>.form-control-plaintext:not(:placeholder-shown),.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control-plaintext:-webkit-autofill,.form-floating>.form-control:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-select{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:not(:-moz-placeholder-shown)~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control-plaintext~label,.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:-webkit-autofill~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control-plaintext~label{border-width:1px 0}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-floating,.input-group>.form-select{position:relative;flex:1 1 auto;width:1%;min-width:0}.input-group>.form-control:focus,.input-group>.form-floating:focus-within,.input-group>.form-select:focus{z-index:5}.input-group .btn{position:relative;z-index:2}.input-group .btn:focus{z-index:5}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.375rem}.input-group-lg>.btn,.input-group-lg>.form-control,.input-group-lg>.form-select,.input-group-lg>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;border-radius:.5rem}.input-group-sm>.btn,.input-group-sm>.form-control,.input-group-sm>.form-select,.input-group-sm>.input-group-text{padding:.25rem .5rem;font-size:.875rem;border-radius:.25rem}.input-group-lg>.form-select,.input-group-sm>.form-select{padding-right:3rem}.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3),.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-control,.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-select,.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.dropdown-toggle:nth-last-child(n+4),.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-control,.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-select,.input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.form-floating:not(:first-child)>.form-control,.input-group>.form-floating:not(:first-child)>.form-select{border-top-left-radius:0;border-bottom-left-radius:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#198754}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(25,135,84,.9);border-radius:.375rem}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#198754;padding-right:calc(1.5em + .75rem);background-image:url(${D});background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-valid,.was-validated .form-select:valid{border-color:#198754}.form-select.is-valid:not([multiple]):not([size]),.form-select.is-valid:not([multiple])[size="1"],.was-validated .form-select:valid:not([multiple]):not([size]),.was-validated .form-select:valid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url(${T}),url(${D});background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-valid:focus,.was-validated .form-select:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-control-color.is-valid,.was-validated .form-control-color:valid{width:calc(3rem + calc(1.5em + .75rem))}.form-check-input.is-valid,.was-validated .form-check-input:valid{border-color:#198754}.form-check-input.is-valid:checked,.was-validated .form-check-input:valid:checked{background-color:#198754}.form-check-input.is-valid:focus,.was-validated .form-check-input:valid:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#198754}.form-check-inline .form-check-input~.valid-feedback{margin-left:.5em}.input-group>.form-control:not(:focus).is-valid,.input-group>.form-floating:not(:focus-within).is-valid,.input-group>.form-select:not(:focus).is-valid,.was-validated .input-group>.form-control:not(:focus):valid,.was-validated .input-group>.form-floating:not(:focus-within):valid,.was-validated .input-group>.form-select:not(:focus):valid{z-index:3}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.375rem}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url(${I});background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-invalid,.was-validated .form-select:invalid{border-color:#dc3545}.form-select.is-invalid:not([multiple]):not([size]),.form-select.is-invalid:not([multiple])[size="1"],.was-validated .form-select:invalid:not([multiple]):not([size]),.was-validated .form-select:invalid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url(${T}),url(${I});background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-invalid:focus,.was-validated .form-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-control-color.is-invalid,.was-validated .form-control-color:invalid{width:calc(3rem + calc(1.5em + .75rem))}.form-check-input.is-invalid,.was-validated .form-check-input:invalid{border-color:#dc3545}.form-check-input.is-invalid:checked,.was-validated .form-check-input:invalid:checked{background-color:#dc3545}.form-check-input.is-invalid:focus,.was-validated .form-check-input:invalid:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-inline .form-check-input~.invalid-feedback{margin-left:.5em}.input-group>.form-control:not(:focus).is-invalid,.input-group>.form-floating:not(:focus-within).is-invalid,.input-group>.form-select:not(:focus).is-invalid,.was-validated .input-group>.form-control:not(:focus):invalid,.was-validated .input-group>.form-floating:not(:focus-within):invalid,.was-validated .input-group>.form-select:not(:focus):invalid{z-index:4}.btn{--bs-btn-padding-x:0.75rem;--bs-btn-padding-y:0.375rem;--bs-btn-font-family: ;--bs-btn-font-size:1rem;--bs-btn-font-weight:400;--bs-btn-line-height:1.5;--bs-btn-color:#212529;--bs-btn-bg:transparent;--bs-btn-border-width:1px;--bs-btn-border-color:transparent;--bs-btn-border-radius:0.375rem;--bs-btn-hover-border-color:transparent;--bs-btn-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.15),0 1px 1px rgba(0, 0, 0, 0.075);--bs-btn-disabled-opacity:0.65;--bs-btn-focus-box-shadow:0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5);display:inline-block;padding:var(--bs-btn-padding-y) var(--bs-btn-padding-x);font-family:var(--bs-btn-font-family);font-size:var(--bs-btn-font-size);font-weight:var(--bs-btn-font-weight);line-height:var(--bs-btn-line-height);color:var(--bs-btn-color);text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;border:var(--bs-btn-border-width) solid var(--bs-btn-border-color);border-radius:var(--bs-btn-border-radius);background-color:var(--bs-btn-bg);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color)}.btn-check+.btn:hover{color:var(--bs-btn-color);background-color:var(--bs-btn-bg);border-color:var(--bs-btn-border-color)}.btn:focus-visible{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:focus-visible+.btn{border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:checked+.btn,.btn.active,.btn.show,.btn:first-child:active,:not(.btn-check)+.btn:active{color:var(--bs-btn-active-color);background-color:var(--bs-btn-active-bg);border-color:var(--bs-btn-active-border-color)}.btn-check:checked+.btn:focus-visible,.btn.active:focus-visible,.btn.show:focus-visible,.btn:first-child:active:focus-visible,:not(.btn-check)+.btn:active:focus-visible{box-shadow:var(--bs-btn-focus-box-shadow)}.btn.disabled,.btn:disabled,fieldset:disabled .btn{color:var(--bs-btn-disabled-color);pointer-events:none;background-color:var(--bs-btn-disabled-bg);border-color:var(--bs-btn-disabled-border-color);opacity:var(--bs-btn-disabled-opacity)}.btn-primary{--bs-btn-color:#fff;--bs-btn-bg:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0b5ed7;--bs-btn-hover-border-color:#0a58ca;--bs-btn-focus-shadow-rgb:49,132,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0a58ca;--bs-btn-active-border-color:#0a53be;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#0d6efd;--bs-btn-disabled-border-color:#0d6efd}.btn-secondary{--bs-btn-color:#fff;--bs-btn-bg:#6c757d;--bs-btn-border-color:#6c757d;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#5c636a;--bs-btn-hover-border-color:#565e64;--bs-btn-focus-shadow-rgb:130,138,145;--bs-btn-active-color:#fff;--bs-btn-active-bg:#565e64;--bs-btn-active-border-color:#51585e;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#6c757d;--bs-btn-disabled-border-color:#6c757d}.btn-success{--bs-btn-color:#fff;--bs-btn-bg:#198754;--bs-btn-border-color:#198754;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#157347;--bs-btn-hover-border-color:#146c43;--bs-btn-focus-shadow-rgb:60,153,110;--bs-btn-active-color:#fff;--bs-btn-active-bg:#146c43;--bs-btn-active-border-color:#13653f;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#198754;--bs-btn-disabled-border-color:#198754}.btn-info{--bs-btn-color:#000;--bs-btn-bg:#0dcaf0;--bs-btn-border-color:#0dcaf0;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#31d2f2;--bs-btn-hover-border-color:#25cff2;--bs-btn-focus-shadow-rgb:11,172,204;--bs-btn-active-color:#000;--bs-btn-active-bg:#3dd5f3;--bs-btn-active-border-color:#25cff2;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#0dcaf0;--bs-btn-disabled-border-color:#0dcaf0}.btn-warning{--bs-btn-color:#000;--bs-btn-bg:#ffc107;--bs-btn-border-color:#ffc107;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#ffca2c;--bs-btn-hover-border-color:#ffc720;--bs-btn-focus-shadow-rgb:217,164,6;--bs-btn-active-color:#000;--bs-btn-active-bg:#ffcd39;--bs-btn-active-border-color:#ffc720;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#ffc107;--bs-btn-disabled-border-color:#ffc107}.btn-danger{--bs-btn-color:#fff;--bs-btn-bg:#dc3545;--bs-btn-border-color:#dc3545;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#bb2d3b;--bs-btn-hover-border-color:#b02a37;--bs-btn-focus-shadow-rgb:225,83,97;--bs-btn-active-color:#fff;--bs-btn-active-bg:#b02a37;--bs-btn-active-border-color:#a52834;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#dc3545;--bs-btn-disabled-border-color:#dc3545}.btn-light{--bs-btn-color:#000;--bs-btn-bg:#f8f9fa;--bs-btn-border-color:#f8f9fa;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#d3d4d5;--bs-btn-hover-border-color:#c6c7c8;--bs-btn-focus-shadow-rgb:211,212,213;--bs-btn-active-color:#000;--bs-btn-active-bg:#c6c7c8;--bs-btn-active-border-color:#babbbc;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#f8f9fa;--bs-btn-disabled-border-color:#f8f9fa}.btn-dark{--bs-btn-color:#fff;--bs-btn-bg:#212529;--bs-btn-border-color:#212529;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#424649;--bs-btn-hover-border-color:#373b3e;--bs-btn-focus-shadow-rgb:66,70,73;--bs-btn-active-color:#fff;--bs-btn-active-bg:#4d5154;--bs-btn-active-border-color:#373b3e;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#212529;--bs-btn-disabled-border-color:#212529}.btn-outline-primary{--bs-btn-color:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0d6efd;--bs-btn-hover-border-color:#0d6efd;--bs-btn-focus-shadow-rgb:13,110,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0d6efd;--bs-btn-active-border-color:#0d6efd;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#0d6efd;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#0d6efd;--bs-gradient:none}.btn-outline-secondary{--bs-btn-color:#6c757d;--bs-btn-border-color:#6c757d;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#6c757d;--bs-btn-hover-border-color:#6c757d;--bs-btn-focus-shadow-rgb:108,117,125;--bs-btn-active-color:#fff;--bs-btn-active-bg:#6c757d;--bs-btn-active-border-color:#6c757d;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#6c757d;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#6c757d;--bs-gradient:none}.btn-outline-success{--bs-btn-color:#198754;--bs-btn-border-color:#198754;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#198754;--bs-btn-hover-border-color:#198754;--bs-btn-focus-shadow-rgb:25,135,84;--bs-btn-active-color:#fff;--bs-btn-active-bg:#198754;--bs-btn-active-border-color:#198754;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#198754;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#198754;--bs-gradient:none}.btn-outline-info{--bs-btn-color:#0dcaf0;--bs-btn-border-color:#0dcaf0;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#0dcaf0;--bs-btn-hover-border-color:#0dcaf0;--bs-btn-focus-shadow-rgb:13,202,240;--bs-btn-active-color:#000;--bs-btn-active-bg:#0dcaf0;--bs-btn-active-border-color:#0dcaf0;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#0dcaf0;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#0dcaf0;--bs-gradient:none}.btn-outline-warning{--bs-btn-color:#ffc107;--bs-btn-border-color:#ffc107;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#ffc107;--bs-btn-hover-border-color:#ffc107;--bs-btn-focus-shadow-rgb:255,193,7;--bs-btn-active-color:#000;--bs-btn-active-bg:#ffc107;--bs-btn-active-border-color:#ffc107;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#ffc107;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#ffc107;--bs-gradient:none}.btn-outline-danger{--bs-btn-color:#dc3545;--bs-btn-border-color:#dc3545;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#dc3545;--bs-btn-hover-border-color:#dc3545;--bs-btn-focus-shadow-rgb:220,53,69;--bs-btn-active-color:#fff;--bs-btn-active-bg:#dc3545;--bs-btn-active-border-color:#dc3545;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#dc3545;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#dc3545;--bs-gradient:none}.btn-outline-light{--bs-btn-color:#f8f9fa;--bs-btn-border-color:#f8f9fa;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#f8f9fa;--bs-btn-hover-border-color:#f8f9fa;--bs-btn-focus-shadow-rgb:248,249,250;--bs-btn-active-color:#000;--bs-btn-active-bg:#f8f9fa;--bs-btn-active-border-color:#f8f9fa;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#f8f9fa;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#f8f9fa;--bs-gradient:none}.btn-outline-dark{--bs-btn-color:#212529;--bs-btn-border-color:#212529;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#212529;--bs-btn-hover-border-color:#212529;--bs-btn-focus-shadow-rgb:33,37,41;--bs-btn-active-color:#fff;--bs-btn-active-bg:#212529;--bs-btn-active-border-color:#212529;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#212529;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#212529;--bs-gradient:none}.btn-link{--bs-btn-font-weight:400;--bs-btn-color:var(--bs-link-color);--bs-btn-bg:transparent;--bs-btn-border-color:transparent;--bs-btn-hover-color:var(--bs-link-hover-color);--bs-btn-hover-border-color:transparent;--bs-btn-active-color:var(--bs-link-hover-color);--bs-btn-active-border-color:transparent;--bs-btn-disabled-color:#6c757d;--bs-btn-disabled-border-color:transparent;--bs-btn-box-shadow:none;--bs-btn-focus-shadow-rgb:49,132,253;text-decoration:underline}.btn-link:focus-visible{color:var(--bs-btn-color)}.btn-link:hover{color:var(--bs-btn-hover-color)}.btn-group-lg>.btn,.btn-lg{--bs-btn-padding-y:0.5rem;--bs-btn-padding-x:1rem;--bs-btn-font-size:1.25rem;--bs-btn-border-radius:0.5rem}.btn-group-sm>.btn,.btn-sm{--bs-btn-padding-y:0.25rem;--bs-btn-padding-x:0.5rem;--bs-btn-font-size:0.875rem;--bs-btn-border-radius:0.25rem}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.collapsing.collapse-horizontal{width:0;height:auto;transition:width .35s ease}@media (prefers-reduced-motion:reduce){.collapsing.collapse-horizontal{transition:none}}.dropdown,.dropdown-center,.dropend,.dropstart,.dropup,.dropup-center{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{--bs-dropdown-zindex:1000;--bs-dropdown-min-width:10rem;--bs-dropdown-padding-x:0;--bs-dropdown-padding-y:0.5rem;--bs-dropdown-spacer:0.125rem;--bs-dropdown-font-size:1rem;--bs-dropdown-color:#212529;--bs-dropdown-bg:#fff;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-border-radius:0.375rem;--bs-dropdown-border-width:1px;--bs-dropdown-inner-border-radius:calc(0.375rem - 1px);--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-divider-margin-y:0.5rem;--bs-dropdown-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-dropdown-link-color:#212529;--bs-dropdown-link-hover-color:#1e2125;--bs-dropdown-link-hover-bg:#e9ecef;--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:#adb5bd;--bs-dropdown-item-padding-x:1rem;--bs-dropdown-item-padding-y:0.25rem;--bs-dropdown-header-color:#6c757d;--bs-dropdown-header-padding-x:1rem;--bs-dropdown-header-padding-y:0.5rem;position:absolute;z-index:var(--bs-dropdown-zindex);display:none;min-width:var(--bs-dropdown-min-width);padding:var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x);margin:0;font-size:var(--bs-dropdown-font-size);color:var(--bs-dropdown-color);text-align:left;list-style:none;background-color:var(--bs-dropdown-bg);background-clip:padding-box;border:var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color);border-radius:var(--bs-dropdown-border-radius)}.dropdown-menu[data-bs-popper]{top:100%;left:0;margin-top:var(--bs-dropdown-spacer)}.dropdown-menu-start{--bs-position:start}.dropdown-menu-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-end{--bs-position:end}.dropdown-menu-end[data-bs-popper]{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-start{--bs-position:start}.dropdown-menu-sm-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-sm-end{--bs-position:end}.dropdown-menu-sm-end[data-bs-popper]{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-start{--bs-position:start}.dropdown-menu-md-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-md-end{--bs-position:end}.dropdown-menu-md-end[data-bs-popper]{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-start{--bs-position:start}.dropdown-menu-lg-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-lg-end{--bs-position:end}.dropdown-menu-lg-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-start{--bs-position:start}.dropdown-menu-xl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xl-end{--bs-position:end}.dropdown-menu-xl-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1400px){.dropdown-menu-xxl-start{--bs-position:start}.dropdown-menu-xxl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xxl-end{--bs-position:end}.dropdown-menu-xxl-end[data-bs-popper]{right:0;left:auto}}.dropup .dropdown-menu[data-bs-popper]{top:auto;bottom:100%;margin-top:0;margin-bottom:var(--bs-dropdown-spacer)}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-menu[data-bs-popper]{top:0;right:auto;left:100%;margin-top:0;margin-left:var(--bs-dropdown-spacer)}.dropend .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropend .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-toggle::after{vertical-align:0}.dropstart .dropdown-menu[data-bs-popper]{top:0;right:100%;left:auto;margin-top:0;margin-right:var(--bs-dropdown-spacer)}.dropstart .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropstart .dropdown-toggle::after{display:none}.dropstart .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropstart .dropdown-toggle:empty::after{margin-left:0}.dropstart .dropdown-toggle::before{vertical-align:0}.dropdown-divider{height:0;margin:var(--bs-dropdown-divider-margin-y) 0;overflow:hidden;border-top:1px solid var(--bs-dropdown-divider-bg);opacity:1}.dropdown-item{display:block;width:100%;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);clear:both;font-weight:400;color:var(--bs-dropdown-link-color);text-align:inherit;text-decoration:none;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:var(--bs-dropdown-link-hover-color);background-color:var(--bs-dropdown-link-hover-bg)}.dropdown-item.active,.dropdown-item:active{color:var(--bs-dropdown-link-active-color);text-decoration:none;background-color:var(--bs-dropdown-link-active-bg)}.dropdown-item.disabled,.dropdown-item:disabled{color:var(--bs-dropdown-link-disabled-color);pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x);margin-bottom:0;font-size:.875rem;color:var(--bs-dropdown-header-color);white-space:nowrap}.dropdown-item-text{display:block;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);color:var(--bs-dropdown-link-color)}.dropdown-menu-dark{--bs-dropdown-color:#dee2e6;--bs-dropdown-bg:#343a40;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-box-shadow: ;--bs-dropdown-link-color:#dee2e6;--bs-dropdown-link-hover-color:#fff;--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-link-hover-bg:rgba(255, 255, 255, 0.15);--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:#adb5bd;--bs-dropdown-header-color:#adb5bd}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group-vertical>.btn-check:checked+.btn,.btn-group-vertical>.btn-check:focus+.btn,.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn-check:checked+.btn,.btn-group>.btn-check:focus+.btn,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group{border-radius:.375rem}.btn-group>.btn-group:not(:first-child),.btn-group>:not(.btn-check:first-child)+.btn{margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn.dropdown-toggle-split:first-child,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:nth-child(n+3),.btn-group>:not(.btn-check)+.btn{border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropend .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropstart .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn~.btn{border-top-left-radius:0;border-top-right-radius:0}.nav{--bs-nav-link-padding-x:1rem;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color:var(--bs-link-color);--bs-nav-link-hover-color:var(--bs-link-hover-color);--bs-nav-link-disabled-color:#6c757d;display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);font-size:var(--bs-nav-link-font-size);font-weight:var(--bs-nav-link-font-weight);color:var(--bs-nav-link-color);text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}@media (prefers-reduced-motion:reduce){.nav-link{transition:none}}.nav-link:focus,.nav-link:hover{color:var(--bs-nav-link-hover-color)}.nav-link.disabled{color:var(--bs-nav-link-disabled-color);pointer-events:none;cursor:default}.nav-tabs{--bs-nav-tabs-border-width:1px;--bs-nav-tabs-border-color:#dee2e6;--bs-nav-tabs-border-radius:0.375rem;--bs-nav-tabs-link-hover-border-color:#e9ecef #e9ecef #dee2e6;--bs-nav-tabs-link-active-color:#495057;--bs-nav-tabs-link-active-bg:#fff;--bs-nav-tabs-link-active-border-color:#dee2e6 #dee2e6 #fff;border-bottom:var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color)}.nav-tabs .nav-link{margin-bottom:calc(-1 * var(--bs-nav-tabs-border-width));background:0 0;border:var(--bs-nav-tabs-border-width) solid transparent;border-top-left-radius:var(--bs-nav-tabs-border-radius);border-top-right-radius:var(--bs-nav-tabs-border-radius)}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{isolation:isolate;border-color:var(--bs-nav-tabs-link-hover-border-color)}.nav-tabs .nav-link.disabled,.nav-tabs .nav-link:disabled{color:var(--bs-nav-link-disabled-color);background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}.nav-tabs .dropdown-menu{margin-top:calc(-1 * var(--bs-nav-tabs-border-width));border-top-left-radius:0;border-top-right-radius:0}.nav-pills{--bs-nav-pills-border-radius:0.375rem;--bs-nav-pills-link-active-color:#fff;--bs-nav-pills-link-active-bg:#0d6efd}.nav-pills .nav-link{background:0 0;border:0;border-radius:var(--bs-nav-pills-border-radius)}.nav-pills .nav-link:disabled{color:var(--bs-nav-link-disabled-color);background-color:transparent;border-color:transparent}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:var(--bs-nav-pills-link-active-color);background-color:var(--bs-nav-pills-link-active-bg)}.nav-fill .nav-item,.nav-fill>.nav-link{flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{flex-basis:0;flex-grow:1;text-align:center}.nav-fill .nav-item .nav-link,.nav-justified .nav-item .nav-link{width:100%}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{--bs-navbar-padding-x:0;--bs-navbar-padding-y:0.5rem;--bs-navbar-color:rgba(0, 0, 0, 0.55);--bs-navbar-hover-color:rgba(0, 0, 0, 0.7);--bs-navbar-disabled-color:rgba(0, 0, 0, 0.3);--bs-navbar-active-color:rgba(0, 0, 0, 0.9);--bs-navbar-brand-padding-y:0.3125rem;--bs-navbar-brand-margin-end:1rem;--bs-navbar-brand-font-size:1.25rem;--bs-navbar-brand-color:rgba(0, 0, 0, 0.9);--bs-navbar-brand-hover-color:rgba(0, 0, 0, 0.9);--bs-navbar-nav-link-padding-x:0.5rem;--bs-navbar-toggler-padding-y:0.25rem;--bs-navbar-toggler-padding-x:0.75rem;--bs-navbar-toggler-font-size:1.25rem;--bs-navbar-toggler-icon-bg:url(${F});--bs-navbar-toggler-border-color:rgba(0, 0, 0, 0.1);--bs-navbar-toggler-border-radius:0.375rem;--bs-navbar-toggler-focus-width:0.25rem;--bs-navbar-toggler-transition:box-shadow 0.15s ease-in-out;position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:var(--bs-navbar-padding-y) var(--bs-navbar-padding-x)}.navbar>.container,.navbar>.container-fluid,.navbar>.container-lg,.navbar>.container-md,.navbar>.container-sm,.navbar>.container-xl,.navbar>.container-xxl{display:flex;flex-wrap:inherit;align-items:center;justify-content:space-between}.navbar-brand{padding-top:var(--bs-navbar-brand-padding-y);padding-bottom:var(--bs-navbar-brand-padding-y);margin-right:var(--bs-navbar-brand-margin-end);font-size:var(--bs-navbar-brand-font-size);color:var(--bs-navbar-brand-color);text-decoration:none;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{color:var(--bs-navbar-brand-hover-color)}.navbar-nav{--bs-nav-link-padding-x:0;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color:var(--bs-navbar-color);--bs-nav-link-hover-color:var(--bs-navbar-hover-color);--bs-nav-link-disabled-color:var(--bs-navbar-disabled-color);display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link.active,.navbar-nav .show>.nav-link{color:var(--bs-navbar-active-color)}.navbar-nav .dropdown-menu{position:static}.navbar-text{padding-top:.5rem;padding-bottom:.5rem;color:var(--bs-navbar-color)}.navbar-text a,.navbar-text a:focus,.navbar-text a:hover{color:var(--bs-navbar-active-color)}.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}.navbar-toggler{padding:var(--bs-navbar-toggler-padding-y) var(--bs-navbar-toggler-padding-x);font-size:var(--bs-navbar-toggler-font-size);line-height:1;color:var(--bs-navbar-color);background-color:transparent;border:var(--bs-border-width) solid var(--bs-navbar-toggler-border-color);border-radius:var(--bs-navbar-toggler-border-radius);transition:var(--bs-navbar-toggler-transition)}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-toggler:hover{text-decoration:none}.navbar-toggler:focus{text-decoration:none;outline:0;box-shadow:0 0 0 var(--bs-navbar-toggler-focus-width)}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;background-image:var(--bs-navbar-toggler-icon-bg);background-repeat:no-repeat;background-position:center;background-size:100%}.navbar-nav-scroll{max-height:var(--bs-scroll-height,75vh);overflow-y:auto}@media (min-width:576px){.navbar-expand-sm{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}.navbar-expand-sm .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-sm .offcanvas .offcanvas-header{display:none}.navbar-expand-sm .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}.navbar-expand-md .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-md .offcanvas .offcanvas-header{display:none}.navbar-expand-md .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:992px){.navbar-expand-lg{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}.navbar-expand-lg .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-lg .offcanvas .offcanvas-header{display:none}.navbar-expand-lg .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1200px){.navbar-expand-xl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}.navbar-expand-xl .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-xl .offcanvas .offcanvas-header{display:none}.navbar-expand-xl .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1400px){.navbar-expand-xxl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xxl .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}.navbar-expand-xxl .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-xxl .offcanvas .offcanvas-header{display:none}.navbar-expand-xxl .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}.navbar-expand{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-expand .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand .offcanvas .offcanvas-header{display:none}.navbar-expand .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}.navbar-dark{--bs-navbar-color:rgba(255, 255, 255, 0.55);--bs-navbar-hover-color:rgba(255, 255, 255, 0.75);--bs-navbar-disabled-color:rgba(255, 255, 255, 0.25);--bs-navbar-active-color:#fff;--bs-navbar-brand-color:#fff;--bs-navbar-brand-hover-color:#fff;--bs-navbar-toggler-border-color:rgba(255, 255, 255, 0.1);--bs-navbar-toggler-icon-bg:url(${R})}.card{--bs-card-spacer-y:1rem;--bs-card-spacer-x:1rem;--bs-card-title-spacer-y:0.5rem;--bs-card-border-width:1px;--bs-card-border-color:var(--bs-border-color-translucent);--bs-card-border-radius:0.375rem;--bs-card-box-shadow: ;--bs-card-inner-border-radius:calc(0.375rem - 1px);--bs-card-cap-padding-y:0.5rem;--bs-card-cap-padding-x:1rem;--bs-card-cap-bg:rgba(0, 0, 0, 0.03);--bs-card-cap-color: ;--bs-card-height: ;--bs-card-color: ;--bs-card-bg:#fff;--bs-card-img-overlay-padding:1rem;--bs-card-group-margin:0.75rem;position:relative;display:flex;flex-direction:column;min-width:0;height:var(--bs-card-height);word-wrap:break-word;background-color:var(--bs-card-bg);background-clip:border-box;border:var(--bs-card-border-width) solid var(--bs-card-border-color);border-radius:var(--bs-card-border-radius)}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:var(--bs-card-inner-border-radius);border-top-right-radius:var(--bs-card-inner-border-radius)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:var(--bs-card-inner-border-radius);border-bottom-left-radius:var(--bs-card-inner-border-radius)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{flex:1 1 auto;padding:var(--bs-card-spacer-y) var(--bs-card-spacer-x);color:var(--bs-card-color)}.card-title{margin-bottom:var(--bs-card-title-spacer-y)}.card-subtitle{margin-top:calc(-.5 * var(--bs-card-title-spacer-y));margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link+.card-link{margin-left:var(--bs-card-spacer-x)}.card-header{padding:var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);margin-bottom:0;color:var(--bs-card-cap-color);background-color:var(--bs-card-cap-bg);border-bottom:var(--bs-card-border-width) solid var(--bs-card-border-color)}.card-header:first-child{border-radius:var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0}.card-footer{padding:var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);color:var(--bs-card-cap-color);background-color:var(--bs-card-cap-bg);border-top:var(--bs-card-border-width) solid var(--bs-card-border-color)}.card-footer:last-child{border-radius:0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius)}.card-header-tabs{margin-right:calc(-.5 * var(--bs-card-cap-padding-x));margin-bottom:calc(-1 * var(--bs-card-cap-padding-y));margin-left:calc(-.5 * var(--bs-card-cap-padding-x));border-bottom:0}.card-header-tabs .nav-link.active{background-color:var(--bs-card-bg);border-bottom-color:var(--bs-card-bg)}.card-header-pills{margin-right:calc(-.5 * var(--bs-card-cap-padding-x));margin-left:calc(-.5 * var(--bs-card-cap-padding-x))}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:var(--bs-card-img-overlay-padding);border-radius:var(--bs-card-inner-border-radius)}.card-img,.card-img-bottom,.card-img-top{width:100%}.card-img,.card-img-top{border-top-left-radius:var(--bs-card-inner-border-radius);border-top-right-radius:var(--bs-card-inner-border-radius)}.card-img,.card-img-bottom{border-bottom-right-radius:var(--bs-card-inner-border-radius);border-bottom-left-radius:var(--bs-card-inner-border-radius)}.card-group>.card{margin-bottom:var(--bs-card-group-margin)}@media (min-width:576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.accordion{--bs-accordion-color:#212529;--bs-accordion-bg:#fff;--bs-accordion-transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out,border-radius 0.15s ease;--bs-accordion-border-color:var(--bs-border-color);--bs-accordion-border-width:1px;--bs-accordion-border-radius:0.375rem;--bs-accordion-inner-border-radius:calc(0.375rem - 1px);--bs-accordion-btn-padding-x:1.25rem;--bs-accordion-btn-padding-y:1rem;--bs-accordion-btn-color:#212529;--bs-accordion-btn-bg:var(--bs-accordion-bg);--bs-accordion-btn-icon:url(${P});--bs-accordion-btn-icon-width:1.25rem;--bs-accordion-btn-icon-transform:rotate(-180deg);--bs-accordion-btn-icon-transition:transform 0.2s ease-in-out;--bs-accordion-btn-active-icon:url(${j});--bs-accordion-btn-focus-border-color:#86b7fe;--bs-accordion-btn-focus-box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);--bs-accordion-body-padding-x:1.25rem;--bs-accordion-body-padding-y:1rem;--bs-accordion-active-color:#0c63e4;--bs-accordion-active-bg:#e7f1ff}.accordion-button{position:relative;display:flex;align-items:center;width:100%;padding:var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x);font-size:1rem;color:var(--bs-accordion-btn-color);text-align:left;background-color:var(--bs-accordion-btn-bg);border:0;border-radius:0;overflow-anchor:none;transition:var(--bs-accordion-transition)}@media (prefers-reduced-motion:reduce){.accordion-button{transition:none}}.accordion-button:not(.collapsed){color:var(--bs-accordion-active-color);background-color:var(--bs-accordion-active-bg);box-shadow:inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color)}.accordion-button:not(.collapsed)::after{background-image:var(--bs-accordion-btn-active-icon);transform:var(--bs-accordion-btn-icon-transform)}.accordion-button::after{flex-shrink:0;width:var(--bs-accordion-btn-icon-width);height:var(--bs-accordion-btn-icon-width);margin-left:auto;content:"";background-image:var(--bs-accordion-btn-icon);background-repeat:no-repeat;background-size:var(--bs-accordion-btn-icon-width);transition:var(--bs-accordion-btn-icon-transition)}@media (prefers-reduced-motion:reduce){.accordion-button::after{transition:none}}.accordion-button:hover{z-index:2}.accordion-button:focus{z-index:3;border-color:var(--bs-accordion-btn-focus-border-color);outline:0;box-shadow:var(--bs-accordion-btn-focus-box-shadow)}.accordion-header{margin-bottom:0}.accordion-item{color:var(--bs-accordion-color);background-color:var(--bs-accordion-bg);border:var(--bs-accordion-border-width) solid var(--bs-accordion-border-color)}.accordion-item:first-of-type{border-top-left-radius:var(--bs-accordion-border-radius);border-top-right-radius:var(--bs-accordion-border-radius)}.accordion-item:first-of-type .accordion-button{border-top-left-radius:var(--bs-accordion-inner-border-radius);border-top-right-radius:var(--bs-accordion-inner-border-radius)}.accordion-item:not(:first-of-type){border-top:0}.accordion-item:last-of-type{border-bottom-right-radius:var(--bs-accordion-border-radius);border-bottom-left-radius:var(--bs-accordion-border-radius)}.accordion-item:last-of-type .accordion-button.collapsed{border-bottom-right-radius:var(--bs-accordion-inner-border-radius);border-bottom-left-radius:var(--bs-accordion-inner-border-radius)}.accordion-item:last-of-type .accordion-collapse{border-bottom-right-radius:var(--bs-accordion-border-radius);border-bottom-left-radius:var(--bs-accordion-border-radius)}.accordion-body{padding:var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x)}.accordion-flush .accordion-collapse{border-width:0}.accordion-flush .accordion-item{border-right:0;border-left:0;border-radius:0}.accordion-flush .accordion-item:first-child{border-top:0}.accordion-flush .accordion-item:last-child{border-bottom:0}.accordion-flush .accordion-item .accordion-button,.accordion-flush .accordion-item .accordion-button.collapsed{border-radius:0}.breadcrumb{--bs-breadcrumb-padding-x:0;--bs-breadcrumb-padding-y:0;--bs-breadcrumb-margin-bottom:1rem;--bs-breadcrumb-bg: ;--bs-breadcrumb-border-radius: ;--bs-breadcrumb-divider-color:#6c757d;--bs-breadcrumb-item-padding-x:0.5rem;--bs-breadcrumb-item-active-color:#6c757d;display:flex;flex-wrap:wrap;padding:var(--bs-breadcrumb-padding-y) var(--bs-breadcrumb-padding-x);margin-bottom:var(--bs-breadcrumb-margin-bottom);font-size:var(--bs-breadcrumb-font-size);list-style:none;background-color:var(--bs-breadcrumb-bg);border-radius:var(--bs-breadcrumb-border-radius)}.breadcrumb-item+.breadcrumb-item{padding-left:var(--bs-breadcrumb-item-padding-x)}.breadcrumb-item+.breadcrumb-item::before{float:left;padding-right:var(--bs-breadcrumb-item-padding-x);color:var(--bs-breadcrumb-divider-color);content:var(--bs-breadcrumb-divider, "/")}.breadcrumb-item.active{color:var(--bs-breadcrumb-item-active-color)}.pagination{--bs-pagination-padding-x:0.75rem;--bs-pagination-padding-y:0.375rem;--bs-pagination-font-size:1rem;--bs-pagination-color:var(--bs-link-color);--bs-pagination-bg:#fff;--bs-pagination-border-width:1px;--bs-pagination-border-color:#dee2e6;--bs-pagination-border-radius:0.375rem;--bs-pagination-hover-color:var(--bs-link-hover-color);--bs-pagination-hover-bg:#e9ecef;--bs-pagination-hover-border-color:#dee2e6;--bs-pagination-focus-color:var(--bs-link-hover-color);--bs-pagination-focus-bg:#e9ecef;--bs-pagination-focus-box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);--bs-pagination-active-color:#fff;--bs-pagination-active-bg:#0d6efd;--bs-pagination-active-border-color:#0d6efd;--bs-pagination-disabled-color:#6c757d;--bs-pagination-disabled-bg:#fff;--bs-pagination-disabled-border-color:#dee2e6;display:flex;padding-left:0;list-style:none}.page-link{position:relative;display:block;padding:var(--bs-pagination-padding-y) var(--bs-pagination-padding-x);font-size:var(--bs-pagination-font-size);color:var(--bs-pagination-color);text-decoration:none;background-color:var(--bs-pagination-bg);border:var(--bs-pagination-border-width) solid var(--bs-pagination-border-color);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.page-link{transition:none}}.page-link:hover{z-index:2;color:var(--bs-pagination-hover-color);background-color:var(--bs-pagination-hover-bg);border-color:var(--bs-pagination-hover-border-color)}.page-link:focus{z-index:3;color:var(--bs-pagination-focus-color);background-color:var(--bs-pagination-focus-bg);outline:0;box-shadow:var(--bs-pagination-focus-box-shadow)}.active>.page-link,.page-link.active{z-index:3;color:var(--bs-pagination-active-color);background-color:var(--bs-pagination-active-bg);border-color:var(--bs-pagination-active-border-color)}.disabled>.page-link,.page-link.disabled{color:var(--bs-pagination-disabled-color);pointer-events:none;background-color:var(--bs-pagination-disabled-bg);border-color:var(--bs-pagination-disabled-border-color)}.page-item:not(:first-child) .page-link{margin-left:-1px}.page-item:first-child .page-link{border-top-left-radius:var(--bs-pagination-border-radius);border-bottom-left-radius:var(--bs-pagination-border-radius)}.page-item:last-child .page-link{border-top-right-radius:var(--bs-pagination-border-radius);border-bottom-right-radius:var(--bs-pagination-border-radius)}.pagination-lg{--bs-pagination-padding-x:1.5rem;--bs-pagination-padding-y:0.75rem;--bs-pagination-font-size:1.25rem;--bs-pagination-border-radius:0.5rem}.pagination-sm{--bs-pagination-padding-x:0.5rem;--bs-pagination-padding-y:0.25rem;--bs-pagination-font-size:0.875rem;--bs-pagination-border-radius:0.25rem}.badge{--bs-badge-padding-x:0.65em;--bs-badge-padding-y:0.35em;--bs-badge-font-size:0.75em;--bs-badge-font-weight:700;--bs-badge-color:#fff;--bs-badge-border-radius:0.375rem;display:inline-block;padding:var(--bs-badge-padding-y) var(--bs-badge-padding-x);font-size:var(--bs-badge-font-size);font-weight:var(--bs-badge-font-weight);line-height:1;color:var(--bs-badge-color);text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:var(--bs-badge-border-radius)}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.alert{--bs-alert-bg:transparent;--bs-alert-padding-x:1rem;--bs-alert-padding-y:1rem;--bs-alert-margin-bottom:1rem;--bs-alert-color:inherit;--bs-alert-border-color:transparent;--bs-alert-border:1px solid var(--bs-alert-border-color);--bs-alert-border-radius:0.375rem;position:relative;padding:var(--bs-alert-padding-y) var(--bs-alert-padding-x);margin-bottom:var(--bs-alert-margin-bottom);color:var(--bs-alert-color);background-color:var(--bs-alert-bg);border:var(--bs-alert-border);border-radius:var(--bs-alert-border-radius)}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:3rem}.alert-dismissible .btn-close{position:absolute;top:0;right:0;z-index:2;padding:1.25rem 1rem}.alert-primary{--bs-alert-color:#084298;--bs-alert-bg:#cfe2ff;--bs-alert-border-color:#b6d4fe}.alert-primary .alert-link{color:#06357a}.alert-secondary{--bs-alert-color:#41464b;--bs-alert-bg:#e2e3e5;--bs-alert-border-color:#d3d6d8}.alert-secondary .alert-link{color:#34383c}.alert-success{--bs-alert-color:#0f5132;--bs-alert-bg:#d1e7dd;--bs-alert-border-color:#badbcc}.alert-success .alert-link{color:#0c4128}.alert-info{--bs-alert-color:#055160;--bs-alert-bg:#cff4fc;--bs-alert-border-color:#b6effb}.alert-info .alert-link{color:#04414d}.alert-warning{--bs-alert-color:#664d03;--bs-alert-bg:#fff3cd;--bs-alert-border-color:#ffecb5}.alert-warning .alert-link{color:#523e02}.alert-danger{--bs-alert-color:#842029;--bs-alert-bg:#f8d7da;--bs-alert-border-color:#f5c2c7}.alert-danger .alert-link{color:#6a1a21}.alert-light{--bs-alert-color:#636464;--bs-alert-bg:#fefefe;--bs-alert-border-color:#fdfdfe}.alert-light .alert-link{color:#4f5050}.alert-dark{--bs-alert-color:#141619;--bs-alert-bg:#d3d3d4;--bs-alert-border-color:#bcbebf}.alert-dark .alert-link{color:#101214}@keyframes progress-bar-stripes{0%{background-position-x:1rem}}.progress{--bs-progress-height:1rem;--bs-progress-font-size:0.75rem;--bs-progress-bg:#e9ecef;--bs-progress-border-radius:0.375rem;--bs-progress-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.075);--bs-progress-bar-color:#fff;--bs-progress-bar-bg:#0d6efd;--bs-progress-bar-transition:width 0.6s ease;display:flex;height:var(--bs-progress-height);overflow:hidden;font-size:var(--bs-progress-font-size);background-color:var(--bs-progress-bg);border-radius:var(--bs-progress-border-radius)}.progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:var(--bs-progress-bar-color);text-align:center;white-space:nowrap;background-color:var(--bs-progress-bar-bg);transition:var(--bs-progress-bar-transition)}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:var(--bs-progress-height) var(--bs-progress-height)}.progress-bar-animated{animation:1s linear infinite progress-bar-stripes}@media (prefers-reduced-motion:reduce){.progress-bar-animated{animation:none}}.list-group{--bs-list-group-color:#212529;--bs-list-group-bg:#fff;--bs-list-group-border-color:rgba(0, 0, 0, 0.125);--bs-list-group-border-width:1px;--bs-list-group-border-radius:0.375rem;--bs-list-group-item-padding-x:1rem;--bs-list-group-item-padding-y:0.5rem;--bs-list-group-action-color:#495057;--bs-list-group-action-hover-color:#495057;--bs-list-group-action-hover-bg:#f8f9fa;--bs-list-group-action-active-color:#212529;--bs-list-group-action-active-bg:#e9ecef;--bs-list-group-disabled-color:#6c757d;--bs-list-group-disabled-bg:#fff;--bs-list-group-active-color:#fff;--bs-list-group-active-bg:#0d6efd;--bs-list-group-active-border-color:#0d6efd;display:flex;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:var(--bs-list-group-border-radius)}.list-group-numbered{list-style-type:none;counter-reset:section}.list-group-numbered>.list-group-item::before{content:counters(section, ".") ". ";counter-increment:section}.list-group-item-action{width:100%;color:var(--bs-list-group-action-color);text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:var(--bs-list-group-action-hover-color);text-decoration:none;background-color:var(--bs-list-group-action-hover-bg)}.list-group-item-action:active{color:var(--bs-list-group-action-active-color);background-color:var(--bs-list-group-action-active-bg)}.list-group-item{position:relative;display:block;padding:var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x);color:var(--bs-list-group-color);text-decoration:none;background-color:var(--bs-list-group-bg);border:var(--bs-list-group-border-width) solid var(--bs-list-group-border-color)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:var(--bs-list-group-disabled-color);pointer-events:none;background-color:var(--bs-list-group-disabled-bg)}.list-group-item.active{z-index:2;color:var(--bs-list-group-active-color);background-color:var(--bs-list-group-active-bg);border-color:var(--bs-list-group-active-border-color)}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:calc(-1 * var(--bs-list-group-border-width));border-top-width:var(--bs-list-group-border-width)}.list-group-horizontal{flex-direction:row}.list-group-horizontal>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}@media (min-width:576px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:768px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:992px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:1400px){.list-group-horizontal-xxl{flex-direction:row}.list-group-horizontal-xxl>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-xxl>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-xxl>.list-group-item.active{margin-top:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 var(--bs-list-group-border-width)}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#084298;background-color:#cfe2ff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#084298;background-color:#bacbe6}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#084298;border-color:#084298}.list-group-item-secondary{color:#41464b;background-color:#e2e3e5}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#41464b;background-color:#cbccce}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#41464b;border-color:#41464b}.list-group-item-success{color:#0f5132;background-color:#d1e7dd}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#0f5132;background-color:#bcd0c7}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#0f5132;border-color:#0f5132}.list-group-item-info{color:#055160;background-color:#cff4fc}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#055160;background-color:#badce3}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#055160;border-color:#055160}.list-group-item-warning{color:#664d03;background-color:#fff3cd}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#664d03;background-color:#e6dbb9}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#664d03;border-color:#664d03}.list-group-item-danger{color:#842029;background-color:#f8d7da}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#842029;background-color:#dfc2c4}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#842029;border-color:#842029}.list-group-item-light{color:#636464;background-color:#fefefe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#636464;background-color:#e5e5e5}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#636464;border-color:#636464}.list-group-item-dark{color:#141619;background-color:#d3d3d4}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#141619;background-color:#bebebf}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#141619;border-color:#141619}.btn-close{box-sizing:content-box;width:1em;height:1em;padding:.25em .25em;color:#000;background:transparent url(${N}) center/1em auto no-repeat;border:0;border-radius:.375rem;opacity:.5}.btn-close:hover{color:#000;text-decoration:none;opacity:.75}.btn-close:focus{outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25);opacity:1}.btn-close.disabled,.btn-close:disabled{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:.25}.btn-close-white{filter:invert(1) grayscale(100%) brightness(200%)}.toast{--bs-toast-zindex:1090;--bs-toast-padding-x:0.75rem;--bs-toast-padding-y:0.5rem;--bs-toast-spacing:1.5rem;--bs-toast-max-width:350px;--bs-toast-font-size:0.875rem;--bs-toast-color: ;--bs-toast-bg:rgba(255, 255, 255, 0.85);--bs-toast-border-width:1px;--bs-toast-border-color:var(--bs-border-color-translucent);--bs-toast-border-radius:0.375rem;--bs-toast-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-toast-header-color:#6c757d;--bs-toast-header-bg:rgba(255, 255, 255, 0.85);--bs-toast-header-border-color:rgba(0, 0, 0, 0.05);width:var(--bs-toast-max-width);max-width:100%;font-size:var(--bs-toast-font-size);color:var(--bs-toast-color);pointer-events:auto;background-color:var(--bs-toast-bg);background-clip:padding-box;border:var(--bs-toast-border-width) solid var(--bs-toast-border-color);box-shadow:var(--bs-toast-box-shadow);border-radius:var(--bs-toast-border-radius)}.toast.showing{opacity:0}.toast:not(.show){display:none}.toast-container{--bs-toast-zindex:1090;position:absolute;z-index:var(--bs-toast-zindex);width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:100%;pointer-events:none}.toast-container>:not(:last-child){margin-bottom:var(--bs-toast-spacing)}.toast-header{display:flex;align-items:center;padding:var(--bs-toast-padding-y) var(--bs-toast-padding-x);color:var(--bs-toast-header-color);background-color:var(--bs-toast-header-bg);background-clip:padding-box;border-bottom:var(--bs-toast-border-width) solid var(--bs-toast-header-border-color);border-top-left-radius:calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width));border-top-right-radius:calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width))}.toast-header .btn-close{margin-right:calc(-.5 * var(--bs-toast-padding-x));margin-left:var(--bs-toast-padding-x)}.toast-body{padding:var(--bs-toast-padding-x);word-wrap:break-word}.modal{--bs-modal-zindex:1055;--bs-modal-width:500px;--bs-modal-padding:1rem;--bs-modal-margin:0.5rem;--bs-modal-color: ;--bs-modal-bg:#fff;--bs-modal-border-color:var(--bs-border-color-translucent);--bs-modal-border-width:1px;--bs-modal-border-radius:0.5rem;--bs-modal-box-shadow:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--bs-modal-inner-border-radius:calc(0.5rem - 1px);--bs-modal-header-padding-x:1rem;--bs-modal-header-padding-y:1rem;--bs-modal-header-padding:1rem 1rem;--bs-modal-header-border-color:var(--bs-border-color);--bs-modal-header-border-width:1px;--bs-modal-title-line-height:1.5;--bs-modal-footer-gap:0.5rem;--bs-modal-footer-bg: ;--bs-modal-footer-border-color:var(--bs-border-color);--bs-modal-footer-border-width:1px;position:fixed;top:0;left:0;z-index:var(--bs-modal-zindex);display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}.modal-dialog{position:relative;width:auto;margin:var(--bs-modal-margin);pointer-events:none}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{height:calc(100% - var(--bs-modal-margin) * 2)}.modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - var(--bs-modal-margin) * 2)}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;color:var(--bs-modal-color);pointer-events:auto;background-color:var(--bs-modal-bg);background-clip:padding-box;border:var(--bs-modal-border-width) solid var(--bs-modal-border-color);border-radius:var(--bs-modal-border-radius);outline:0}.modal-backdrop{--bs-backdrop-zindex:1050;--bs-backdrop-bg:#000;--bs-backdrop-opacity:0.5;position:fixed;top:0;left:0;z-index:var(--bs-backdrop-zindex);width:100vw;height:100vh;background-color:var(--bs-backdrop-bg)}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:var(--bs-backdrop-opacity)}.modal-header{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:var(--bs-modal-header-padding);border-bottom:var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color);border-top-left-radius:var(--bs-modal-inner-border-radius);border-top-right-radius:var(--bs-modal-inner-border-radius)}.modal-header .btn-close{padding:calc(var(--bs-modal-header-padding-y) * .5) calc(var(--bs-modal-header-padding-x) * .5);margin:calc(-.5 * var(--bs-modal-header-padding-y)) calc(-.5 * var(--bs-modal-header-padding-x)) calc(-.5 * var(--bs-modal-header-padding-y)) auto}.modal-title{margin-bottom:0;line-height:var(--bs-modal-title-line-height)}.modal-body{position:relative;flex:1 1 auto;padding:var(--bs-modal-padding)}.modal-footer{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * .5);background-color:var(--bs-modal-footer-bg);border-top:var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color);border-bottom-right-radius:var(--bs-modal-inner-border-radius);border-bottom-left-radius:var(--bs-modal-inner-border-radius)}.modal-footer>*{margin:calc(var(--bs-modal-footer-gap) * .5)}@media (min-width:576px){.modal{--bs-modal-margin:1.75rem;--bs-modal-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15)}.modal-dialog{max-width:var(--bs-modal-width);margin-right:auto;margin-left:auto}.modal-sm{--bs-modal-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{--bs-modal-width:800px}}@media (min-width:1200px){.modal-xl{--bs-modal-width:1140px}}.modal-fullscreen{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen .modal-footer,.modal-fullscreen .modal-header{border-radius:0}.modal-fullscreen .modal-body{overflow-y:auto}@media (max-width:575.98px){.modal-fullscreen-sm-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-sm-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-sm-down .modal-footer,.modal-fullscreen-sm-down .modal-header{border-radius:0}.modal-fullscreen-sm-down .modal-body{overflow-y:auto}}@media (max-width:767.98px){.modal-fullscreen-md-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-md-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-md-down .modal-footer,.modal-fullscreen-md-down .modal-header{border-radius:0}.modal-fullscreen-md-down .modal-body{overflow-y:auto}}@media (max-width:991.98px){.modal-fullscreen-lg-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-lg-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-lg-down .modal-footer,.modal-fullscreen-lg-down .modal-header{border-radius:0}.modal-fullscreen-lg-down .modal-body{overflow-y:auto}}@media (max-width:1199.98px){.modal-fullscreen-xl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xl-down .modal-footer,.modal-fullscreen-xl-down .modal-header{border-radius:0}.modal-fullscreen-xl-down .modal-body{overflow-y:auto}}@media (max-width:1399.98px){.modal-fullscreen-xxl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xxl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xxl-down .modal-footer,.modal-fullscreen-xxl-down .modal-header{border-radius:0}.modal-fullscreen-xxl-down .modal-body{overflow-y:auto}}.tooltip{--bs-tooltip-zindex:1080;--bs-tooltip-max-width:200px;--bs-tooltip-padding-x:0.5rem;--bs-tooltip-padding-y:0.25rem;--bs-tooltip-margin: ;--bs-tooltip-font-size:0.875rem;--bs-tooltip-color:#fff;--bs-tooltip-bg:#000;--bs-tooltip-border-radius:0.375rem;--bs-tooltip-opacity:0.9;--bs-tooltip-arrow-width:0.8rem;--bs-tooltip-arrow-height:0.4rem;z-index:var(--bs-tooltip-zindex);display:block;padding:var(--bs-tooltip-arrow-height);margin:var(--bs-tooltip-margin);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-tooltip-font-size);word-wrap:break-word;opacity:0}.tooltip.show{opacity:var(--bs-tooltip-opacity)}.tooltip .tooltip-arrow{display:block;width:var(--bs-tooltip-arrow-width);height:var(--bs-tooltip-arrow-height)}.tooltip .tooltip-arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow,.bs-tooltip-top .tooltip-arrow{bottom:0}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,.bs-tooltip-top .tooltip-arrow::before{top:-1px;border-width:var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0;border-top-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow,.bs-tooltip-end .tooltip-arrow{left:0;width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before,.bs-tooltip-end .tooltip-arrow::before{right:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0;border-right-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow,.bs-tooltip-bottom .tooltip-arrow{top:0}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before,.bs-tooltip-bottom .tooltip-arrow::before{bottom:-1px;border-width:0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height);border-bottom-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow,.bs-tooltip-start .tooltip-arrow{right:0;width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before,.bs-tooltip-start .tooltip-arrow::before{left:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * .5) 0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height);border-left-color:var(--bs-tooltip-bg)}.tooltip-inner{max-width:var(--bs-tooltip-max-width);padding:var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x);color:var(--bs-tooltip-color);text-align:center;background-color:var(--bs-tooltip-bg);border-radius:var(--bs-tooltip-border-radius)}.popover{--bs-popover-zindex:1070;--bs-popover-max-width:276px;--bs-popover-font-size:0.875rem;--bs-popover-bg:#fff;--bs-popover-border-width:1px;--bs-popover-border-color:var(--bs-border-color-translucent);--bs-popover-border-radius:0.5rem;--bs-popover-inner-border-radius:calc(0.5rem - 1px);--bs-popover-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-popover-header-padding-x:1rem;--bs-popover-header-padding-y:0.5rem;--bs-popover-header-font-size:1rem;--bs-popover-header-color: ;--bs-popover-header-bg:#f0f0f0;--bs-popover-body-padding-x:1rem;--bs-popover-body-padding-y:1rem;--bs-popover-body-color:#212529;--bs-popover-arrow-width:1rem;--bs-popover-arrow-height:0.5rem;--bs-popover-arrow-border:var(--bs-popover-border-color);z-index:var(--bs-popover-zindex);display:block;max-width:var(--bs-popover-max-width);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-popover-font-size);word-wrap:break-word;background-color:var(--bs-popover-bg);background-clip:padding-box;border:var(--bs-popover-border-width) solid var(--bs-popover-border-color);border-radius:var(--bs-popover-border-radius)}.popover .popover-arrow{display:block;width:var(--bs-popover-arrow-width);height:var(--bs-popover-arrow-height)}.popover .popover-arrow::after,.popover .popover-arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid;border-width:0}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow,.bs-popover-top>.popover-arrow{bottom:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width))}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::after,.bs-popover-top>.popover-arrow::before{border-width:var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * .5) 0}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::before{bottom:0;border-top-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-top>.popover-arrow::after{bottom:var(--bs-popover-border-width);border-top-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow,.bs-popover-end>.popover-arrow{left:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));width:var(--bs-popover-arrow-height);height:var(--bs-popover-arrow-width)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::after,.bs-popover-end>.popover-arrow::before{border-width:calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * .5) 0}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::before{left:0;border-right-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-end>.popover-arrow::after{left:var(--bs-popover-border-width);border-right-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow,.bs-popover-bottom>.popover-arrow{top:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width))}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::before{border-width:0 calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::before{top:0;border-bottom-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::after{top:var(--bs-popover-border-width);border-bottom-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:var(--bs-popover-arrow-width);margin-left:calc(-.5 * var(--bs-popover-arrow-width));content:"";border-bottom:var(--bs-popover-border-width) solid var(--bs-popover-header-bg)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow,.bs-popover-start>.popover-arrow{right:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));width:var(--bs-popover-arrow-height);height:var(--bs-popover-arrow-width)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::after,.bs-popover-start>.popover-arrow::before{border-width:calc(var(--bs-popover-arrow-width) * .5) 0 calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::before{right:0;border-left-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-start>.popover-arrow::after{right:var(--bs-popover-border-width);border-left-color:var(--bs-popover-bg)}.popover-header{padding:var(--bs-popover-header-padding-y) var(--bs-popover-header-padding-x);margin-bottom:0;font-size:var(--bs-popover-header-font-size);color:var(--bs-popover-header-color);background-color:var(--bs-popover-header-bg);border-bottom:var(--bs-popover-border-width) solid var(--bs-popover-border-color);border-top-left-radius:var(--bs-popover-inner-border-radius);border-top-right-radius:var(--bs-popover-inner-border-radius)}.popover-header:empty{display:none}.popover-body{padding:var(--bs-popover-body-padding-y) var(--bs-popover-body-padding-x);color:var(--bs-popover-body-color)}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-end,.carousel-item-next:not(.carousel-item-start){transform:translateX(100%)}.active.carousel-item-start,.carousel-item-prev:not(.carousel-item-end){transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item-next.carousel-item-start,.carousel-fade .carousel-item-prev.carousel-item-end,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:0 0;border:0;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:2rem;height:2rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}.carousel-control-prev-icon{background-image:url(${B})}.carousel-control-next-icon{background-image:url(${U})}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:2;display:flex;justify-content:center;padding:0;margin-right:15%;margin-bottom:1rem;margin-left:15%;list-style:none}.carousel-indicators [data-bs-target]{box-sizing:content-box;flex:0 1 auto;width:30px;height:3px;padding:0;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border:0;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators [data-bs-target]{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:1.25rem;left:15%;padding-top:1.25rem;padding-bottom:1.25rem;color:#fff;text-align:center}.carousel-dark .carousel-control-next-icon,.carousel-dark .carousel-control-prev-icon{filter:invert(1) grayscale(100)}.carousel-dark .carousel-indicators [data-bs-target]{background-color:#000}.carousel-dark .carousel-caption{color:#000}.spinner-border,.spinner-grow{display:inline-block;width:var(--bs-spinner-width);height:var(--bs-spinner-height);vertical-align:var(--bs-spinner-vertical-align);border-radius:50%;animation:var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name)}@keyframes spinner-border{to{transform:rotate(360deg)}}.spinner-border{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-border-width:0.25em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-border;border:var(--bs-spinner-border-width) solid currentcolor;border-right-color:transparent}.spinner-border-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem;--bs-spinner-border-width:0.2em}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-grow;background-color:currentcolor;opacity:0}.spinner-grow-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{--bs-spinner-animation-speed:1.5s}}.offcanvas,.offcanvas-lg,.offcanvas-md,.offcanvas-sm,.offcanvas-xl,.offcanvas-xxl{--bs-offcanvas-zindex:1045;--bs-offcanvas-width:400px;--bs-offcanvas-height:30vh;--bs-offcanvas-padding-x:1rem;--bs-offcanvas-padding-y:1rem;--bs-offcanvas-color: ;--bs-offcanvas-bg:#fff;--bs-offcanvas-border-width:1px;--bs-offcanvas-border-color:var(--bs-border-color-translucent);--bs-offcanvas-box-shadow:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075)}@media (max-width:575.98px){.offcanvas-sm{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:575.98px) and (prefers-reduced-motion:reduce){.offcanvas-sm{transition:none}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:575.98px){.offcanvas-sm.show:not(.hiding),.offcanvas-sm.showing{transform:none}}@media (max-width:575.98px){.offcanvas-sm.hiding,.offcanvas-sm.show,.offcanvas-sm.showing{visibility:visible}}@media (min-width:576px){.offcanvas-sm{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-sm .offcanvas-header{display:none}.offcanvas-sm .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:767.98px){.offcanvas-md{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:767.98px) and (prefers-reduced-motion:reduce){.offcanvas-md{transition:none}}@media (max-width:767.98px){.offcanvas-md.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:767.98px){.offcanvas-md.show:not(.hiding),.offcanvas-md.showing{transform:none}}@media (max-width:767.98px){.offcanvas-md.hiding,.offcanvas-md.show,.offcanvas-md.showing{visibility:visible}}@media (min-width:768px){.offcanvas-md{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-md .offcanvas-header{display:none}.offcanvas-md .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:991.98px){.offcanvas-lg{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:991.98px) and (prefers-reduced-motion:reduce){.offcanvas-lg{transition:none}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:991.98px){.offcanvas-lg.show:not(.hiding),.offcanvas-lg.showing{transform:none}}@media (max-width:991.98px){.offcanvas-lg.hiding,.offcanvas-lg.show,.offcanvas-lg.showing{visibility:visible}}@media (min-width:992px){.offcanvas-lg{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-lg .offcanvas-header{display:none}.offcanvas-lg .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:1199.98px){.offcanvas-xl{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:1199.98px) and (prefers-reduced-motion:reduce){.offcanvas-xl{transition:none}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:1199.98px){.offcanvas-xl.show:not(.hiding),.offcanvas-xl.showing{transform:none}}@media (max-width:1199.98px){.offcanvas-xl.hiding,.offcanvas-xl.show,.offcanvas-xl.showing{visibility:visible}}@media (min-width:1200px){.offcanvas-xl{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-xl .offcanvas-header{display:none}.offcanvas-xl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:1399.98px){.offcanvas-xxl{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:1399.98px) and (prefers-reduced-motion:reduce){.offcanvas-xxl{transition:none}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:1399.98px){.offcanvas-xxl.show:not(.hiding),.offcanvas-xxl.showing{transform:none}}@media (max-width:1399.98px){.offcanvas-xxl.hiding,.offcanvas-xxl.show,.offcanvas-xxl.showing{visibility:visible}}@media (min-width:1400px){.offcanvas-xxl{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-xxl .offcanvas-header{display:none}.offcanvas-xxl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}.offcanvas{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}@media (prefers-reduced-motion:reduce){.offcanvas{transition:none}}.offcanvas.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}.offcanvas.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}.offcanvas.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}.offcanvas.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}.offcanvas.show:not(.hiding),.offcanvas.showing{transform:none}.offcanvas.hiding,.offcanvas.show,.offcanvas.showing{visibility:visible}.offcanvas-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.offcanvas-backdrop.fade{opacity:0}.offcanvas-backdrop.show{opacity:.5}.offcanvas-header{display:flex;align-items:center;justify-content:space-between;padding:var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x)}.offcanvas-header .btn-close{padding:calc(var(--bs-offcanvas-padding-y) * .5) calc(var(--bs-offcanvas-padding-x) * .5);margin-top:calc(-.5 * var(--bs-offcanvas-padding-y));margin-right:calc(-.5 * var(--bs-offcanvas-padding-x));margin-bottom:calc(-.5 * var(--bs-offcanvas-padding-y))}.offcanvas-title{margin-bottom:0;line-height:1.5}.offcanvas-body{flex-grow:1;padding:var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x);overflow-y:auto}.placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentcolor;opacity:.5}.placeholder.btn::before{display:inline-block;content:""}.placeholder-xs{min-height:.6em}.placeholder-sm{min-height:.8em}.placeholder-lg{min-height:1.2em}.placeholder-glow .placeholder{animation:placeholder-glow 2s ease-in-out infinite}@keyframes placeholder-glow{50%{opacity:.2}}.placeholder-wave{-webkit-mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);-webkit-mask-size:200% 100%;mask-size:200% 100%;animation:placeholder-wave 2s linear infinite}@keyframes placeholder-wave{100%{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}.clearfix::after{display:block;clear:both;content:""}.text-bg-primary{color:#fff!important;background-color:RGBA(13,110,253,var(--bs-bg-opacity,1))!important}.text-bg-secondary{color:#fff!important;background-color:RGBA(108,117,125,var(--bs-bg-opacity,1))!important}.text-bg-success{color:#fff!important;background-color:RGBA(25,135,84,var(--bs-bg-opacity,1))!important}.text-bg-info{color:#000!important;background-color:RGBA(13,202,240,var(--bs-bg-opacity,1))!important}.text-bg-warning{color:#000!important;background-color:RGBA(255,193,7,var(--bs-bg-opacity,1))!important}.text-bg-danger{color:#fff!important;background-color:RGBA(220,53,69,var(--bs-bg-opacity,1))!important}.text-bg-light{color:#000!important;background-color:RGBA(248,249,250,var(--bs-bg-opacity,1))!important}.text-bg-dark{color:#fff!important;background-color:RGBA(33,37,41,var(--bs-bg-opacity,1))!important}.link-primary{color:#0d6efd!important}.link-primary:focus,.link-primary:hover{color:#0a58ca!important}.link-secondary{color:#6c757d!important}.link-secondary:focus,.link-secondary:hover{color:#565e64!important}.link-success{color:#198754!important}.link-success:focus,.link-success:hover{color:#146c43!important}.link-info{color:#0dcaf0!important}.link-info:focus,.link-info:hover{color:#3dd5f3!important}.link-warning{color:#ffc107!important}.link-warning:focus,.link-warning:hover{color:#ffcd39!important}.link-danger{color:#dc3545!important}.link-danger:focus,.link-danger:hover{color:#b02a37!important}.link-light{color:#f8f9fa!important}.link-light:focus,.link-light:hover{color:#f9fafb!important}.link-dark{color:#212529!important}.link-dark:focus,.link-dark:hover{color:#1a1e21!important}.ratio{position:relative;width:100%}.ratio::before{display:block;padding-top:var(--bs-aspect-ratio);content:""}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-1x1{--bs-aspect-ratio:100%}.ratio-4x3{--bs-aspect-ratio:75%}.ratio-16x9{--bs-aspect-ratio:56.25%}.ratio-21x9{--bs-aspect-ratio:42.8571428571%}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}@media (min-width:576px){.sticky-sm-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-sm-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:768px){.sticky-md-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-md-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:992px){.sticky-lg-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-lg-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:1200px){.sticky-xl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-xl-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:1400px){.sticky-xxl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-xxl-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}.hstack{display:flex;flex-direction:row;align-items:center;align-self:stretch}.vstack{display:flex;flex:1 1 auto;flex-direction:column;align-self:stretch}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:""}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vr{display:inline-block;align-self:stretch;width:1px;min-height:1em;background-color:currentcolor;opacity:.25}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.float-start{float:left!important}.float-end{float:right!important}.float-none{float:none!important}.opacity-0{opacity:0!important}.opacity-25{opacity:.25!important}.opacity-50{opacity:.5!important}.opacity-75{opacity:.75!important}.opacity-100{opacity:1!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-visible{overflow:visible!important}.overflow-scroll{overflow:scroll!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.top-0{top:0!important}.top-50{top:50%!important}.top-100{top:100%!important}.bottom-0{bottom:0!important}.bottom-50{bottom:50%!important}.bottom-100{bottom:100%!important}.start-0{left:0!important}.start-50{left:50%!important}.start-100{left:100%!important}.end-0{right:0!important}.end-50{right:50%!important}.end-100{right:100%!important}.translate-middle{transform:translate(-50%,-50%)!important}.translate-middle-x{transform:translateX(-50%)!important}.translate-middle-y{transform:translateY(-50%)!important}.border{border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-0{border:0!important}.border-top{border-top:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-top-0{border-top:0!important}.border-end{border-right:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-end-0{border-right:0!important}.border-bottom{border-bottom:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-bottom-0{border-bottom:0!important}.border-start{border-left:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-start-0{border-left:0!important}.border-primary{--bs-border-opacity:1;border-color:rgba(var(--bs-primary-rgb),var(--bs-border-opacity))!important}.border-secondary{--bs-border-opacity:1;border-color:rgba(var(--bs-secondary-rgb),var(--bs-border-opacity))!important}.border-success{--bs-border-opacity:1;border-color:rgba(var(--bs-success-rgb),var(--bs-border-opacity))!important}.border-info{--bs-border-opacity:1;border-color:rgba(var(--bs-info-rgb),var(--bs-border-opacity))!important}.border-warning{--bs-border-opacity:1;border-color:rgba(var(--bs-warning-rgb),var(--bs-border-opacity))!important}.border-danger{--bs-border-opacity:1;border-color:rgba(var(--bs-danger-rgb),var(--bs-border-opacity))!important}.border-light{--bs-border-opacity:1;border-color:rgba(var(--bs-light-rgb),var(--bs-border-opacity))!important}.border-dark{--bs-border-opacity:1;border-color:rgba(var(--bs-dark-rgb),var(--bs-border-opacity))!important}.border-white{--bs-border-opacity:1;border-color:rgba(var(--bs-white-rgb),var(--bs-border-opacity))!important}.border-1{--bs-border-width:1px}.border-2{--bs-border-width:2px}.border-3{--bs-border-width:3px}.border-4{--bs-border-width:4px}.border-5{--bs-border-width:5px}.border-opacity-10{--bs-border-opacity:0.1}.border-opacity-25{--bs-border-opacity:0.25}.border-opacity-50{--bs-border-opacity:0.5}.border-opacity-75{--bs-border-opacity:0.75}.border-opacity-100{--bs-border-opacity:1}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.mw-100{max-width:100%!important}.vw-100{width:100vw!important}.min-vw-100{min-width:100vw!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mh-100{max-height:100%!important}.vh-100{height:100vh!important}.min-vh-100{min-height:100vh!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-right:0!important;margin-left:0!important}.mx-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-auto{margin-left:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-right:0!important;padding-left:0!important}.px-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-right:0!important}.pe-1{padding-right:.25rem!important}.pe-2{padding-right:.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-left:0!important}.ps-1{padding-left:.25rem!important}.ps-2{padding-left:.5rem!important}.ps-3{padding-left:1rem!important}.ps-4{padding-left:1.5rem!important}.ps-5{padding-left:3rem!important}.gap-0{gap:0!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:1rem!important}.gap-4{gap:1.5rem!important}.gap-5{gap:3rem!important}.font-monospace{font-family:var(--bs-font-monospace)!important}.fs-1{font-size:calc(1.375rem + 1.5vw)!important}.fs-2{font-size:calc(1.325rem + .9vw)!important}.fs-3{font-size:calc(1.3rem + .6vw)!important}.fs-4{font-size:calc(1.275rem + .3vw)!important}.fs-5{font-size:1.25rem!important}.fs-6{font-size:1rem!important}.fst-italic{font-style:italic!important}.fst-normal{font-style:normal!important}.fw-light{font-weight:300!important}.fw-lighter{font-weight:lighter!important}.fw-normal{font-weight:400!important}.fw-bold{font-weight:700!important}.fw-semibold{font-weight:600!important}.fw-bolder{font-weight:bolder!important}.lh-1{line-height:1!important}.lh-sm{line-height:1.25!important}.lh-base{line-height:1.5!important}.lh-lg{line-height:2!important}.text-start{text-align:left!important}.text-end{text-align:right!important}.text-center{text-align:center!important}.text-decoration-none{text-decoration:none!important}.text-decoration-underline{text-decoration:underline!important}.text-decoration-line-through{text-decoration:line-through!important}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-break{word-wrap:break-word!important;word-break:break-word!important}.text-primary{--bs-text-opacity:1;color:rgba(var(--bs-primary-rgb),var(--bs-text-opacity))!important}.text-secondary{--bs-text-opacity:1;color:rgba(var(--bs-secondary-rgb),var(--bs-text-opacity))!important}.text-success{--bs-text-opacity:1;color:rgba(var(--bs-success-rgb),var(--bs-text-opacity))!important}.text-info{--bs-text-opacity:1;color:rgba(var(--bs-info-rgb),var(--bs-text-opacity))!important}.text-warning{--bs-text-opacity:1;color:rgba(var(--bs-warning-rgb),var(--bs-text-opacity))!important}.text-danger{--bs-text-opacity:1;color:rgba(var(--bs-danger-rgb),var(--bs-text-opacity))!important}.text-light{--bs-text-opacity:1;color:rgba(var(--bs-light-rgb),var(--bs-text-opacity))!important}.text-dark{--bs-text-opacity:1;color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}.text-black{--bs-text-opacity:1;color:rgba(var(--bs-black-rgb),var(--bs-text-opacity))!important}.text-white{--bs-text-opacity:1;color:rgba(var(--bs-white-rgb),var(--bs-text-opacity))!important}.text-body{--bs-text-opacity:1;color:rgba(var(--bs-body-color-rgb),var(--bs-text-opacity))!important}.text-muted{--bs-text-opacity:1;color:#6c757d!important}.text-black-50{--bs-text-opacity:1;color:rgba(0,0,0,.5)!important}.text-white-50{--bs-text-opacity:1;color:rgba(255,255,255,.5)!important}.text-reset{--bs-text-opacity:1;color:inherit!important}.text-opacity-25{--bs-text-opacity:0.25}.text-opacity-50{--bs-text-opacity:0.5}.text-opacity-75{--bs-text-opacity:0.75}.text-opacity-100{--bs-text-opacity:1}.bg-primary{--bs-bg-opacity:1;background-color:rgba(var(--bs-primary-rgb),var(--bs-bg-opacity))!important}.bg-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-secondary-rgb),var(--bs-bg-opacity))!important}.bg-success{--bs-bg-opacity:1;background-color:rgba(var(--bs-success-rgb),var(--bs-bg-opacity))!important}.bg-info{--bs-bg-opacity:1;background-color:rgba(var(--bs-info-rgb),var(--bs-bg-opacity))!important}.bg-warning{--bs-bg-opacity:1;background-color:rgba(var(--bs-warning-rgb),var(--bs-bg-opacity))!important}.bg-danger{--bs-bg-opacity:1;background-color:rgba(var(--bs-danger-rgb),var(--bs-bg-opacity))!important}.bg-light{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-rgb),var(--bs-bg-opacity))!important}.bg-dark{--bs-bg-opacity:1;background-color:rgba(var(--bs-dark-rgb),var(--bs-bg-opacity))!important}.bg-black{--bs-bg-opacity:1;background-color:rgba(var(--bs-black-rgb),var(--bs-bg-opacity))!important}.bg-white{--bs-bg-opacity:1;background-color:rgba(var(--bs-white-rgb),var(--bs-bg-opacity))!important}.bg-body{--bs-bg-opacity:1;background-color:rgba(var(--bs-body-bg-rgb),var(--bs-bg-opacity))!important}.bg-transparent{--bs-bg-opacity:1;background-color:transparent!important}.bg-opacity-10{--bs-bg-opacity:0.1}.bg-opacity-25{--bs-bg-opacity:0.25}.bg-opacity-50{--bs-bg-opacity:0.5}.bg-opacity-75{--bs-bg-opacity:0.75}.bg-opacity-100{--bs-bg-opacity:1}.bg-gradient{background-image:var(--bs-gradient)!important}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.pe-none{pointer-events:none!important}.pe-auto{pointer-events:auto!important}.rounded{border-radius:var(--bs-border-radius)!important}.rounded-0{border-radius:0!important}.rounded-1{border-radius:var(--bs-border-radius-sm)!important}.rounded-2{border-radius:var(--bs-border-radius)!important}.rounded-3{border-radius:var(--bs-border-radius-lg)!important}.rounded-4{border-radius:var(--bs-border-radius-xl)!important}.rounded-5{border-radius:var(--bs-border-radius-2xl)!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:var(--bs-border-radius-pill)!important}.rounded-top{border-top-left-radius:var(--bs-border-radius)!important;border-top-right-radius:var(--bs-border-radius)!important}.rounded-end{border-top-right-radius:var(--bs-border-radius)!important;border-bottom-right-radius:var(--bs-border-radius)!important}.rounded-bottom{border-bottom-right-radius:var(--bs-border-radius)!important;border-bottom-left-radius:var(--bs-border-radius)!important}.rounded-start{border-bottom-left-radius:var(--bs-border-radius)!important;border-top-left-radius:var(--bs-border-radius)!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media (min-width:576px){.float-sm-start{float:left!important}.float-sm-end{float:right!important}.float-sm-none{float:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-right:0!important;margin-left:0!important}.mx-sm-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-sm-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-sm-3{margin-right:1rem!important;margin-left:1rem!important}.mx-sm-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-sm-5{margin-right:3rem!important;margin-left:3rem!important}.mx-sm-auto{margin-right:auto!important;margin-left:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-right:0!important}.me-sm-1{margin-right:.25rem!important}.me-sm-2{margin-right:.5rem!important}.me-sm-3{margin-right:1rem!important}.me-sm-4{margin-right:1.5rem!important}.me-sm-5{margin-right:3rem!important}.me-sm-auto{margin-right:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-left:0!important}.ms-sm-1{margin-left:.25rem!important}.ms-sm-2{margin-left:.5rem!important}.ms-sm-3{margin-left:1rem!important}.ms-sm-4{margin-left:1.5rem!important}.ms-sm-5{margin-left:3rem!important}.ms-sm-auto{margin-left:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-right:0!important;padding-left:0!important}.px-sm-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-sm-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-sm-3{padding-right:1rem!important;padding-left:1rem!important}.px-sm-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-sm-5{padding-right:3rem!important;padding-left:3rem!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-right:0!important}.pe-sm-1{padding-right:.25rem!important}.pe-sm-2{padding-right:.5rem!important}.pe-sm-3{padding-right:1rem!important}.pe-sm-4{padding-right:1.5rem!important}.pe-sm-5{padding-right:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-left:0!important}.ps-sm-1{padding-left:.25rem!important}.ps-sm-2{padding-left:.5rem!important}.ps-sm-3{padding-left:1rem!important}.ps-sm-4{padding-left:1.5rem!important}.ps-sm-5{padding-left:3rem!important}.gap-sm-0{gap:0!important}.gap-sm-1{gap:.25rem!important}.gap-sm-2{gap:.5rem!important}.gap-sm-3{gap:1rem!important}.gap-sm-4{gap:1.5rem!important}.gap-sm-5{gap:3rem!important}.text-sm-start{text-align:left!important}.text-sm-end{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.float-md-start{float:left!important}.float-md-end{float:right!important}.float-md-none{float:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-right:0!important;margin-left:0!important}.mx-md-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-md-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-md-3{margin-right:1rem!important;margin-left:1rem!important}.mx-md-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-md-5{margin-right:3rem!important;margin-left:3rem!important}.mx-md-auto{margin-right:auto!important;margin-left:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-right:0!important}.me-md-1{margin-right:.25rem!important}.me-md-2{margin-right:.5rem!important}.me-md-3{margin-right:1rem!important}.me-md-4{margin-right:1.5rem!important}.me-md-5{margin-right:3rem!important}.me-md-auto{margin-right:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-left:0!important}.ms-md-1{margin-left:.25rem!important}.ms-md-2{margin-left:.5rem!important}.ms-md-3{margin-left:1rem!important}.ms-md-4{margin-left:1.5rem!important}.ms-md-5{margin-left:3rem!important}.ms-md-auto{margin-left:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-right:0!important;padding-left:0!important}.px-md-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-md-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-md-3{padding-right:1rem!important;padding-left:1rem!important}.px-md-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-md-5{padding-right:3rem!important;padding-left:3rem!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-right:0!important}.pe-md-1{padding-right:.25rem!important}.pe-md-2{padding-right:.5rem!important}.pe-md-3{padding-right:1rem!important}.pe-md-4{padding-right:1.5rem!important}.pe-md-5{padding-right:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-left:0!important}.ps-md-1{padding-left:.25rem!important}.ps-md-2{padding-left:.5rem!important}.ps-md-3{padding-left:1rem!important}.ps-md-4{padding-left:1.5rem!important}.ps-md-5{padding-left:3rem!important}.gap-md-0{gap:0!important}.gap-md-1{gap:.25rem!important}.gap-md-2{gap:.5rem!important}.gap-md-3{gap:1rem!important}.gap-md-4{gap:1.5rem!important}.gap-md-5{gap:3rem!important}.text-md-start{text-align:left!important}.text-md-end{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.float-lg-start{float:left!important}.float-lg-end{float:right!important}.float-lg-none{float:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-right:0!important;margin-left:0!important}.mx-lg-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-lg-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-lg-3{margin-right:1rem!important;margin-left:1rem!important}.mx-lg-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-lg-5{margin-right:3rem!important;margin-left:3rem!important}.mx-lg-auto{margin-right:auto!important;margin-left:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-right:0!important}.me-lg-1{margin-right:.25rem!important}.me-lg-2{margin-right:.5rem!important}.me-lg-3{margin-right:1rem!important}.me-lg-4{margin-right:1.5rem!important}.me-lg-5{margin-right:3rem!important}.me-lg-auto{margin-right:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-left:0!important}.ms-lg-1{margin-left:.25rem!important}.ms-lg-2{margin-left:.5rem!important}.ms-lg-3{margin-left:1rem!important}.ms-lg-4{margin-left:1.5rem!important}.ms-lg-5{margin-left:3rem!important}.ms-lg-auto{margin-left:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-right:0!important;padding-left:0!important}.px-lg-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-lg-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-lg-3{padding-right:1rem!important;padding-left:1rem!important}.px-lg-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-lg-5{padding-right:3rem!important;padding-left:3rem!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-right:0!important}.pe-lg-1{padding-right:.25rem!important}.pe-lg-2{padding-right:.5rem!important}.pe-lg-3{padding-right:1rem!important}.pe-lg-4{padding-right:1.5rem!important}.pe-lg-5{padding-right:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-left:0!important}.ps-lg-1{padding-left:.25rem!important}.ps-lg-2{padding-left:.5rem!important}.ps-lg-3{padding-left:1rem!important}.ps-lg-4{padding-left:1.5rem!important}.ps-lg-5{padding-left:3rem!important}.gap-lg-0{gap:0!important}.gap-lg-1{gap:.25rem!important}.gap-lg-2{gap:.5rem!important}.gap-lg-3{gap:1rem!important}.gap-lg-4{gap:1.5rem!important}.gap-lg-5{gap:3rem!important}.text-lg-start{text-align:left!important}.text-lg-end{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.float-xl-start{float:left!important}.float-xl-end{float:right!important}.float-xl-none{float:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-right:0!important;margin-left:0!important}.mx-xl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xl-auto{margin-right:auto!important;margin-left:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-right:0!important}.me-xl-1{margin-right:.25rem!important}.me-xl-2{margin-right:.5rem!important}.me-xl-3{margin-right:1rem!important}.me-xl-4{margin-right:1.5rem!important}.me-xl-5{margin-right:3rem!important}.me-xl-auto{margin-right:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-left:0!important}.ms-xl-1{margin-left:.25rem!important}.ms-xl-2{margin-left:.5rem!important}.ms-xl-3{margin-left:1rem!important}.ms-xl-4{margin-left:1.5rem!important}.ms-xl-5{margin-left:3rem!important}.ms-xl-auto{margin-left:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-right:0!important;padding-left:0!important}.px-xl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-right:0!important}.pe-xl-1{padding-right:.25rem!important}.pe-xl-2{padding-right:.5rem!important}.pe-xl-3{padding-right:1rem!important}.pe-xl-4{padding-right:1.5rem!important}.pe-xl-5{padding-right:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-left:0!important}.ps-xl-1{padding-left:.25rem!important}.ps-xl-2{padding-left:.5rem!important}.ps-xl-3{padding-left:1rem!important}.ps-xl-4{padding-left:1.5rem!important}.ps-xl-5{padding-left:3rem!important}.gap-xl-0{gap:0!important}.gap-xl-1{gap:.25rem!important}.gap-xl-2{gap:.5rem!important}.gap-xl-3{gap:1rem!important}.gap-xl-4{gap:1.5rem!important}.gap-xl-5{gap:3rem!important}.text-xl-start{text-align:left!important}.text-xl-end{text-align:right!important}.text-xl-center{text-align:center!important}}@media (min-width:1400px){.float-xxl-start{float:left!important}.float-xxl-end{float:right!important}.float-xxl-none{float:none!important}.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-right:0!important;margin-left:0!important}.mx-xxl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xxl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xxl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xxl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xxl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xxl-auto{margin-right:auto!important;margin-left:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xxl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-right:0!important}.me-xxl-1{margin-right:.25rem!important}.me-xxl-2{margin-right:.5rem!important}.me-xxl-3{margin-right:1rem!important}.me-xxl-4{margin-right:1.5rem!important}.me-xxl-5{margin-right:3rem!important}.me-xxl-auto{margin-right:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-left:0!important}.ms-xxl-1{margin-left:.25rem!important}.ms-xxl-2{margin-left:.5rem!important}.ms-xxl-3{margin-left:1rem!important}.ms-xxl-4{margin-left:1.5rem!important}.ms-xxl-5{margin-left:3rem!important}.ms-xxl-auto{margin-left:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-right:0!important;padding-left:0!important}.px-xxl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xxl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xxl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xxl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xxl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xxl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pe-xxl-0{padding-right:0!important}.pe-xxl-1{padding-right:.25rem!important}.pe-xxl-2{padding-right:.5rem!important}.pe-xxl-3{padding-right:1rem!important}.pe-xxl-4{padding-right:1.5rem!important}.pe-xxl-5{padding-right:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-left:0!important}.ps-xxl-1{padding-left:.25rem!important}.ps-xxl-2{padding-left:.5rem!important}.ps-xxl-3{padding-left:1rem!important}.ps-xxl-4{padding-left:1.5rem!important}.ps-xxl-5{padding-left:3rem!important}.gap-xxl-0{gap:0!important}.gap-xxl-1{gap:.25rem!important}.gap-xxl-2{gap:.5rem!important}.gap-xxl-3{gap:1rem!important}.gap-xxl-4{gap:1.5rem!important}.gap-xxl-5{gap:3rem!important}.text-xxl-start{text-align:left!important}.text-xxl-end{text-align:right!important}.text-xxl-center{text-align:center!important}}@media (min-width:1200px){.fs-1{font-size:2.5rem!important}.fs-2{font-size:2rem!important}.fs-3{font-size:1.75rem!important}.fs-4{font-size:1.5rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}}`,""]);var G=new CSSStyleSheet;G.replaceSync(M.toString());const V=G},62621:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(78706),i=r.n(n),o=r(72859),a=r.n(o)()(i());a.push([t.id,".chsp-meta {\n z-index: 1;\n cursor: pointer;\n}\n\n.chsp-meta .chsp-info-icon {\n float: right;\n margin-top: 5px;\n margin-left: 3px;\n}\n\n.chsp-meta .chsp-info-icon svg {\n display: block;\n width: 14px;\n height: 14px;\n opacity: 0.6;\n}\n\n.chsp-authors-list {\n padding: 0;\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n justify-content: center;\n}\n\n.chsp-authors-list li {\n border: solid #dee2e6 1px;\n padding: 10px;\n list-style-type: none;\n white-space: nowrap;\n}\n\n.chsp-open-map-settings {\n position: absolute;\n top: 3px;\n left: 5px;\n z-index: 10;\n}\n\n.chsp-open-viewer-settings {\n position: absolute;\n top: 5px;\n right: 5px;\n}\n\n.chsp-extra-options-btn {\n margin: auto;\n display: block;\n}\n\n/* Tooltip text */\n.chsp-tooltip {\n visibility: hidden;\n background: #69738a;\n color: white;\n padding: 6px;\n font-size: 12px;\n line-height: 12px;\n white-space: nowrap;\n border-radius: 2px;\n text-align: center;\n display: inline-block;\n width: 9em;\n position: absolute;\n z-index: 100000;\n}\n\n.chsp-tooltip-right {\n top: 0px;\n right: -9.5em;\n}\n\n.chsp-tooltip-below {\n top: 35px;\n left: -3.5em;\n}\n\n.chsp-has-tooltip:hover .chsp-tooltip {\n visibility: visible;\n}\n\n.chsp-pin-marker {\n border-radius: 50%;\n border: solid 1px black;\n --size: 12px;\n width: var(--size);\n height: var(--size);\n z-index: 10;\n}\n\n.chsp-map-pin-marker {\n position: absolute;\n /* ensure the top/right/left/bottom positioning is relative to the center of the div */\n transform: translate(calc(-50% + var(--size)), -50%);\n}\n\n.chsp-pin-marker:hover {\n --size: 20px;\n cursor: pointer;\n}\n\n/* This class is added on top of .chsp-pin-marker for the active pinned structure/environment */\n.chsp-active-pin {\n border-width: 2px;\n --size: 20px;\n}\n\n.chsp-active-pin:hover {\n --size: 22px;\n cursor: default;\n}\n\n.chsp-viewer-button {\n position: absolute;\n padding: 1px;\n margin: 0;\n height: 28px;\n width: 28px;\n z-index: 10;\n}\n\n.chsp-viewer-action-button {\n background-color: white;\n border: none;\n}\n\n.chsp-viewer-action-button:hover {\n background: white;\n}\n\n.chsp-viewer-action-button svg {\n opacity: 0.4;\n transition: opacity 0.15s ease-in-out;\n}\n\n.chsp-viewer-action-button:hover svg {\n opacity: 0.6;\n}\n\n.chsp-structure-viewer-grid {\n display: grid;\n position: relative;\n width: 100%;\n height: 100%;\n grid-column-gap: 2px;\n grid-row-gap: 2px;\n}\n\n.chsp-structure-viewer-cell {\n width: 99%;\n height: 99%;\n left: 0.5%;\n top: 0.5%;\n position: relative;\n border: 1px solid lightgray;\n padding: 1px;\n}\n\n.chsp-structure-viewer-cell-active {\n border-color: gray;\n}\n\n.chsp-map-options {\n display: grid;\n grid-template-columns: 1fr 0.5fr;\n align-items: center;\n justify-content: center;\n align-content: start;\n column-gap: 1em;\n}\n\n.chsp-map-options label {\n min-width: 6em;\n}\n\n.chsp-map-options > :nth-child(n + 3):not(.chsp-map-extra-options) {\n margin-top: 1.3rem;\n}\n\n.chsp-map-extra-options {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: auto 1fr 1fr;\n column-gap: 1em;\n}\n\n.chsp-map-extra-options > * {\n margin: 0.5em 0;\n}\n\n.chsp-map-extra-options label {\n min-width: auto;\n}\n\n.chsp-map-extra-options {\n grid-column: 1 / span 2;\n}\n\n.chsp-map-options .form-check-label {\n width: auto;\n}\n\n.chsp-modal-header {\n cursor: grab;\n}\n\n.chsp-play-button {\n border: 0;\n background: transparent;\n box-sizing: border-box;\n height: 1.2em;\n width: 1.2em;\n margin-left: 0.5ex;\n\n border-color: transparent transparent transparent #202020;\n transition: 100ms all ease;\n cursor: pointer;\n\n border-style: solid;\n border-width: 0.7em 0 0.7em 1em;\n}\n\n.chsp-play-button.chsp-playing {\n border-style: double;\n border-width: 0px 0 0px 1.2em;\n}\n\n.chsp-play-button:hover {\n border-color: transparent transparent transparent #404040;\n}\n\n.chsp-properties-table {\n height: 100%;\n width: 80%;\n margin: auto;\n}\n\n.chsp-properties-table td,\n.chsp-properties-table th {\n width: 50%;\n border-top: none;\n}\n\n.chsp-settings-section-title {\n font-weight: bold;\n}\n\n/* Change Plotly modebar style to match the style of the structure grid buttons */\n\n.chsp-map .modebar-group {\n padding-left: 0 !important;\n}\n\n.chsp-map .modebar-btn {\n cursor: default !important;\n font-family: apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n 'Noto Color Emoji';\n}\n\n.chsp-map .modebar-btn::after {\n opacity: 0.9;\n}\n\n.chsp-map .icon:hover + .modebar-btn::after {\n visibility: visible;\n}\n\n.chsp-map .modebar-btn::before {\n content: none !important;\n}\n\n.chsp-map .modebar-btn .icon {\n transition: opacity 0.15s ease-in-out;\n padding: 3px;\n opacity: 0.3;\n cursor: pointer;\n}\n\n.chsp-map .modebar-group svg.icon {\n width: 2em;\n height: 2em;\n border-radius: 0.2em;\n}\n\n.chsp-map .modebar-group svg.icon:active {\n color: #212529;\n background-color: #dae0e5;\n border-color: #d3d9df;\n box-shadow: 0 0 0 0.2rem rgb(216 217 219 / 50%);\n}\n\n.chsp-map .modebar-btn .icon path {\n transition:\n color 0.15s ease-in-out,\n background-color 0.15s ease-in-out,\n border-color 0.15s ease-in-out,\n box-shadow 0.15s ease-in-out;\n fill: black !important;\n}\n\n.chsp-map .modebar-btn .icon:hover {\n opacity: 0.6;\n}\n\n.chsp-map .modebar-btn.active .icon {\n opacity: 0.6;\n}\n\n.chsp-info-btns {\n display: flex;\n position: relative;\n margin-bottom: 0.5ex;\n margin-top: 0.5ex;\n justify-content: center;\n}\n\n.chsp-info-structure-btn {\n min-width: 8em;\n padding-left: 6px;\n padding-right: 4px;\n font-weight: bold;\n font-size: small;\n background-color: none;\n border-color: #66a5e8;\n border-width: 2px;\n float: left;\n}\n\n.chsp-info-structure-btn:hover {\n background-color: #5b94d0;\n}\n\n.chsp-info-atom-btn {\n margin-left: 1em;\n padding-left: 6px;\n padding-right: 4px;\n min-width: 8em;\n font-weight: bold;\n font-size: small;\n background-color: none;\n border-color: #4cb64c;\n border-width: 2px;\n}\n\n.chsp-info-atom-btn:hover {\n background-color: #44a344;\n}\n\n.chsp-info-btns-svg {\n float: left;\n padding-right: 6px;\n padding-top: 3px;\n}\n\n.chsp-info-btns-svg svg {\n display: block;\n opacity: 0.6;\n}\n\n.chsp-info-number {\n -moz-appearance: textfield;\n appearance: textfield;\n border: none;\n transition: background-color 0.15s;\n background-color: #ebedf0;\n margin-left: 2px;\n margin-right: 3px;\n font-family: inherit;\n width: 4em;\n}\n\n.chsp-info-atom-btn:hover .chsp-info-number {\n background-color: #69b569;\n}\n\n.chsp-info-structure-btn:hover .chsp-info-number {\n background-color: #7ba9d9;\n}\n\n.chsp-info-number::-webkit-outer-spin-button,\n.chsp-info-number::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.chsp-info-tables {\n position: relative;\n width: 100%;\n}\n\n.chsp-info-table {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 10;\n background-color: white;\n /* max-height is set in JavaScript */\n overflow: auto;\n}\n\n.chsp-info-table.collapsing {\n overflow: hidden;\n}\n\n.chsp-info-table table {\n margin: 0;\n}\n\n/* Change the atoms slider thumb color to green, to match structure highlight */\n.chsp-atom-slider::-webkit-slider-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-moz-range-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-ms-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-webkit-slider-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider::-moz-range-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider::-ms-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider:focus::-webkit-slider-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-atom-slider:focus::-moz-range-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-atom-slider:focus::-ms-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-settings-representation {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr;\n grid-row-gap: 1ex;\n}\n\n.chsp-settings-representation label {\n cursor: help;\n}\n\n.chsp-settings-supercell {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr 2fr;\n}\n\n.chsp-supercell-count {\n max-width: 3.5em;\n}\n\n.chsp-settings-camera {\n display: grid;\n gap: 1em;\n grid-template-columns: repeat(7, auto);\n justify-content: center;\n}\n\n.chsp-settings-environments {\n display: grid;\n align-items: center;\n column-gap: 1em;\n grid-template-columns: 1fr 1fr 1fr;\n}\n\n.chsp-settings-extra-options {\n display: grid;\n gap: 1em;\n grid-template-columns: 1fr 1fr 1fr;\n grid-column: 1 / span 3;\n}\n\n.chsp-settings-extra-options > :nth-child(-n + 3) {\n margin-top: 1em;\n}\n\n.chsp-settings-trajectory {\n display: grid;\n grid-template-columns: 12em 12em;\n justify-content: center;\n align-content: center;\n gap: 1em;\n margin-bottom: 1ex;\n}\n\n.chsp-cell-info {\n position: absolute;\n bottom: 5px;\n left: 5px;\n font-size: 0.8em;\n}\n\n.chsp-toggle-plot-btn {\n display: block;\n position: relative;\n margin-top: 3px;\n margin-bottom: 1px;\n}\n\n.chsp-atom-color-property {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: 1fr 1fr;\n column-gap: 1em;\n margin: 0.5em 0;\n}\n\n.chsp-atom-extra-options {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: auto 1fr 1fr;\n column-gap: 1em;\n}\n\n.chsp-atom-extra-options > * {\n margin: 0.5em 0;\n}\n\n.chsp-atom-extra-options label {\n min-width: auto;\n}\n\n.chsp-atom-extra-options {\n grid-column: 1 / span 2;\n}\n\n.chsp-target-toggle {\n padding-left: 5px;\n padding-right: 5px;\n display: flex;\n justify-content: flex-end;\n gap: 5px;\n}\n\n.chsp-target-spinner {\n width: 25px;\n height: 25px;\n margin-left: 5px;\n}\n",""]);var s=new CSSStyleSheet;s.replaceSync(a.toString());const l=s},37821:function(module,__unused_webpack_exports,__webpack_require__){var process=__webpack_require__(39807),factory;factory=()=>(()=>{var __webpack_modules__={"./node_modules/iobuffer/lib-esm/IOBuffer.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{IOBuffer:()=>a});var n=r("./node_modules/iobuffer/lib-esm/text.browser.js");const i=(()=>{const t=new Uint8Array(4);return!((new Uint32Array(t.buffer)[0]=1)&t[0])})(),o={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class a{constructor(t=8192,e={}){let r=!1;"number"==typeof t?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);const n=e.offset?e.offset>>>0:0,i=t.byteLength-n;let o=n;(ArrayBuffer.isView(t)||t instanceof a)&&(t.byteLength!==t.buffer.byteLength&&(o=t.byteOffset+n),t=t.buffer),this.lastWrittenByte=r?i:0,this.buffer=t,this.length=i,this.byteLength=i,this.byteOffset=o,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,o,i),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}back(t=1){return this.offset-=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const t=this._marks.pop();if(void 0===t)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const e=2*(this.offset+t),r=new Uint8Array(e);r.set(new Uint8Array(this.buffer)),this.buffer=r.buffer,this.length=this.byteLength=e,this._data=new DataView(this.buffer)}return this}readBoolean(){return 0!==this.readUint8()}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,e){const r=o[e].BYTES_PER_ELEMENT*t,n=this.byteOffset+this.offset,a=this.buffer.slice(n,n+r);if(this.littleEndian===i&&"uint8"!==e&&"int8"!==e){const t=new Uint8Array(this.buffer.slice(n,n+r));t.reverse();const i=new o[e](t.buffer);return this.offset+=r,i.reverse(),i}const s=new o[e](a);return this.offset+=r,s}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let e="";for(let r=0;rthis.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}},"./node_modules/iobuffer/lib-esm/text-encoding-polyfill.js":function(){"use strict";!function(t){if(t.TextEncoder&&t.TextDecoder)return!1;function e(t="utf-8"){if("utf-8"!==t)throw new RangeError(`Failed to construct 'TextEncoder': The encoding label provided ('${t}') is invalid.`)}function r(t="utf-8",e={fatal:!1}){if("utf-8"!==t)throw new RangeError(`Failed to construct 'TextDecoder': The encoding label provided ('${t}') is invalid.`);if(e.fatal)throw new Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}Object.defineProperty(e.prototype,"encoding",{value:"utf-8"}),e.prototype.encode=function(t,e={stream:!1}){if(e.stream)throw new Error("Failed to encode: the 'stream' option is unsupported.");let r=0;const n=t.length;let i=0,o=Math.max(32,n+(n>>1)+7),a=new Uint8Array(o>>3<<3);for(;r=55296&&e<=56319){if(r=55296&&e<=56319)continue}if(i+4>a.length){o+=8,o*=1+r/t.length*2,o=o>>3<<3;const e=new Uint8Array(o);e.set(a),a=e}if(4294967168&e){if(4294965248&e)if(4294901760&e){if(4292870144&e)continue;a[i++]=e>>18&7|240,a[i++]=e>>12&63|128,a[i++]=e>>6&63|128}else a[i++]=e>>12&15|224,a[i++]=e>>6&63|128;else a[i++]=e>>6&31|192;a[i++]=63&e|128}else a[i++]=e}return a.slice(0,i)},Object.defineProperty(r.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(r.prototype,"fatal",{value:!1}),Object.defineProperty(r.prototype,"ignoreBOM",{value:!1}),r.prototype.decode=function(t,e={stream:!1}){if(e.stream)throw new Error("Failed to decode: the 'stream' option is unsupported.");const r=new Uint8Array(t);let n=0;const i=r.length,o=[];for(;n65535&&(e-=65536,o.push(e>>>10&1023|55296),e=56320|1023&e),o.push(e)}}else o.push(t)}return String.fromCharCode.apply(null,o)},t.TextEncoder=e,t.TextDecoder=r}("undefined"!=typeof window?window:"undefined"!=typeof self?self:this)},"./node_modules/iobuffer/lib-esm/text.browser.js":(t,e,r)=>{"use strict";function n(t,e="utf8"){return new TextDecoder(e).decode(t)}r.r(e),r.d(e,{decode:()=>n,encode:()=>o}),r("./node_modules/iobuffer/lib-esm/text-encoding-polyfill.js");const i=new TextEncoder;function o(t){return i.encode(t)}},"./node_modules/netcdfjs/lib-esm/data.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{nonRecord:()=>i,record:()=>o});var n=r("./node_modules/netcdfjs/lib-esm/types.js");function i(t,e){const r=(0,n.str2num)(e.type),i=e.size/(0,n.num2bytes)(r),o=new Array(i);for(let e=0;e{"use strict";r.r(e),r.d(e,{header:()=>u});var n=r("./node_modules/netcdfjs/lib-esm/types.js"),i=r("./node_modules/netcdfjs/lib-esm/utils.js");const o=0,a=10,s=11,l=12,c=0;function u(t,e){const r={version:e},l={length:t.readUint32()},u=function(t){const e={};let r,n;const s=t.readUint32();let l;if(s===o)return(0,i.notNetcdf)(t.readUint32()!==o,"wrong empty tag for list of dimensions"),[];{(0,i.notNetcdf)(s!==a,"wrong tag for list of dimensions");const e=t.readUint32();l=new Array(e);for(let o=0;o6,`non valid type ${f}`);const p=t.readUint32();let m=t.readUint32();2===r&&((0,i.notNetcdf)(m>0,"offsets larger than 4GB not supported"),m=t.readUint32());let g=!1;void 0!==e&&u[0]===e&&(c+=p,g=!0),l[a]={name:o,dimensions:u,attributes:d,type:(0,n.num2str)(f),size:p,offset:m,record:g}}}return{variables:l,recordStep:c}}(t,l?.id,e);return Array.isArray(d)||(r.variables=d.variables,l.recordStep=d.recordStep),r.recordDimension=l,r}function h(t){const e=t.readUint32();let r;if(e===o)return(0,i.notNetcdf)(t.readUint32()!==o,"wrong empty tag for list of attributes"),[];{(0,i.notNetcdf)(e!==l,"wrong tag for list of attributes");const o=t.readUint32();r=new Array(o);for(let e=0;e6,`non valid type ${a}`);const s=t.readUint32(),l=(0,n.readType)(t,a,s);(0,i.padding)(t),r[e]={name:o,type:(0,n.num2str)(a),value:l}}}return r}},"./node_modules/netcdfjs/lib-esm/index.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{NetCDFReader:()=>n.NetCDFReader});var n=r("./node_modules/netcdfjs/lib-esm/parser.js")},"./node_modules/netcdfjs/lib-esm/parser.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{NetCDFReader:()=>l});var n=r("./node_modules/iobuffer/lib-esm/IOBuffer.js"),i=r("./node_modules/netcdfjs/lib-esm/data.js"),o=r("./node_modules/netcdfjs/lib-esm/header.js"),a=r("./node_modules/netcdfjs/lib-esm/toString.js"),s=r("./node_modules/netcdfjs/lib-esm/utils.js");class l{constructor(t){this.toString=a.toString;const e=new n.IOBuffer(t);e.setBigEndian(),(0,s.notNetcdf)("CDF"!==e.readChars(3),"should start with CDF");const r=e.readByte();(0,s.notNetcdf)(r>2,"unknown version"),this.header=(0,o.header)(e,r),this.buffer=e}get version(){return 1===this.header.version?"classic format":"64-bit offset format"}get recordDimension(){return this.header.recordDimension}get dimensions(){return this.header.dimensions}get globalAttributes(){return this.header.globalAttributes}getAttribute(t){const e=this.globalAttributes.find((e=>e.name===t));return e?e.value:null}getDataVariableAsString(t){const e=this.getDataVariable(t);return e?e.join(""):null}get variables(){return this.header.variables}getDataVariable(t){let e;if(e="string"==typeof t?this.header.variables.find((e=>e.name===t)):t,void 0===e)throw new Error("Not a valid NetCDF v3.x file: variable not found");return this.buffer.seek(e.offset),e.record?(0,i.record)(this.buffer,e,this.header.recordDimension):(0,i.nonRecord)(this.buffer,e)}dataVariableExists(t){return void 0!==this.header.variables.find((e=>e.name===t))}attributeExists(t){return void 0!==this.globalAttributes.find((e=>e.name===t))}}},"./node_modules/netcdfjs/lib-esm/toString.js":(t,e,r)=>{"use strict";function n(){const t=[];t.push("DIMENSIONS");for(const e of this.dimensions)t.push(` ${e.name.padEnd(30)} = size: ${e.size}`);t.push(""),t.push("GLOBAL ATTRIBUTES");for(const e of this.globalAttributes)t.push(` ${e.name.padEnd(30)} = ${e.value}`);const e=JSON.parse(JSON.stringify(this.variables));t.push(""),t.push("VARIABLES:");for(const r of e){r.value=this.getDataVariable(r);let e=JSON.stringify(r.value);e.length>50&&(e=e.substring(0,50)),isNaN(r.value.length)||(e+=` (length: ${r.value.length})`),t.push(` ${r.name.padEnd(30)} = ${e}`)}return t.join("\n")}r.r(e),r.d(e,{toString:()=>n})},"./node_modules/netcdfjs/lib-esm/types.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{num2bytes:()=>o,num2str:()=>i,readType:()=>l,str2num:()=>a});const n={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6};function i(t){switch(Number(t)){case n.BYTE:return"byte";case n.CHAR:return"char";case n.SHORT:return"short";case n.INT:return"int";case n.FLOAT:return"float";case n.DOUBLE:return"double";default:return"undefined"}}function o(t){switch(Number(t)){case n.BYTE:case n.CHAR:return 1;case n.SHORT:return 2;case n.INT:case n.FLOAT:return 4;case n.DOUBLE:return 8;default:return-1}}function a(t){switch(String(t)){case"byte":return n.BYTE;case"char":return n.CHAR;case"short":return n.SHORT;case"int":return n.INT;case"float":return n.FLOAT;case"double":return n.DOUBLE;default:return-1}}function s(t,e){if(1!==t){const r=new Array(t);for(let n=0;n{"use strict";function n(t,e){if(t)throw new TypeError(`Not a valid NetCDF v3.x file: ${e}`)}function i(t){t.offset%4!=0&&t.skip(4-t.offset%4)}function o(t){const e=t.readUint32(),r=t.readChars(e);return i(t),r}r.r(e),r.d(e,{notNetcdf:()=>n,padding:()=>i,readName:()=>o})},"./src/WebGL/shaders/lib/basic/basic.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 viewMatrix;\nuniform float opacity;\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\nvoid main() {\n gl_FragColor = vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}"},"./src/WebGL/shaders/lib/basic/basic.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\n\nattribute vec3 position;\nattribute vec3 color;\n\nvarying vec3 vColor;\n\nvoid main() {\n\n vColor = color;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix * mvPosition;\n\n}"},"./src/WebGL/shaders/lib/instanced/instanced.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 viewMatrix;\nuniform float opacity;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLightFront;\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\n\n #ifndef WIREFRAME\n gl_FragColor.xyz *= vLightFront;\n #endif\n\n gl_FragColor = gl_FragColor * vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n}\n\n\n"},"./src/WebGL/shaders/lib/instanced/instanced.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 offset;\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute float radius;\n\nvarying vec3 vColor;\nvarying vec3 vLightFront;\n\nvoid main() {\n\n vColor = color;\n\n vec3 objectNormal = normal;\n vec3 transformedNormal = normalMatrix * objectNormal;\n vec4 mvPosition = modelViewMatrix * vec4( position * radius + offset, 1.0 );\n\n vLightFront = vec3( 0.0 );\n\n transformedNormal = normalize( transformedNormal );\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n\n vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\n\n gl_Position = projectionMatrix * mvPosition;\n}\n\n"},"./src/WebGL/shaders/lib/lambert/lambert.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 viewMatrix;\nuniform float opacity;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLightFront;\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\n\n #ifndef WIREFRAME\n gl_FragColor.xyz *= vLightFront;\n #endif\n\n gl_FragColor = gl_FragColor * vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n}"},"./src/WebGL/shaders/lib/lambert/lambert.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec3 vColor;\nvarying vec3 vLightFront;\n\nvoid main() {\n\n vColor = color;\n\n vec3 objectNormal = normal;\n vec3 transformedNormal = normalMatrix * objectNormal;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\n vLightFront = vec3( 0.0 );\n\n transformedNormal = normalize( transformedNormal );\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n\n vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\n\n gl_Position = projectionMatrix * mvPosition;\n}"},"./src/WebGL/shaders/lib/lambertdouble/lambertdouble.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 viewMatrix;\nuniform float opacity;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLightFront;\nvarying vec3 vLightBack;\n\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\n\n #ifndef WIREFRAME\n if ( gl_FrontFacing )\n gl_FragColor.xyz *= vLightFront;\n else\n gl_FragColor.xyz *= vLightBack;\n #endif\n\n gl_FragColor = gl_FragColor * vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n}\n\n\n"},"./src/WebGL/shaders/lib/lambertdouble/lambertdouble.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec3 vColor;\nvarying vec3 vLightFront;\nvarying vec3 vLightBack;\n\nvoid main() {\n\n vColor = color;\n\n vec3 objectNormal = normal;\n vec3 transformedNormal = normalMatrix * objectNormal;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\n vLightFront = vec3( 0.0 );\n vLightBack = vec3( 0.0 );\n\n transformedNormal = normalize( transformedNormal );\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n vec3 directionalLightWeightingBack = vec3( max( -dotProduct, 0.0 ) );\n\n vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\n vLightBack += directionalLightColor[ 0 ] * directionalLightWeightingBack;\n\n gl_Position = projectionMatrix * mvPosition;\n}\n\n"},"./src/WebGL/shaders/lib/outline/outline.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform float opacity;\nuniform vec3 outlineColor;\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n gl_FragColor = vec4( outlineColor, 1 );\n}\n\n\n"},"./src/WebGL/shaders/lib/outline/outline.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float outlineWidth;\nuniform float outlinePushback;\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvoid main() {\n\n vec4 norm = modelViewMatrix*vec4(normalize(normal),0.0);\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n mvPosition.xy += norm.xy*outlineWidth;\n gl_Position = projectionMatrix * mvPosition;\n mvPosition.z -= outlinePushback; //go backwards in model space\n vec4 pushpos = projectionMatrix*mvPosition; //project to get z in projection space, I'm probably missing some simple math to do the same thing..\n gl_Position.z = gl_Position.w*pushpos.z/pushpos.w;\n}\n\n"},"./src/WebGL/shaders/lib/screen/screen.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform sampler2D colormap;\nvarying highp vec2 vTexCoords;\nuniform vec2 dimensions;\n//DEFINEFRAGCOLOR\nvoid main (void) {\n gl_FragColor = texture2D(colormap, vTexCoords);\n}\n "},"./src/WebGL/shaders/lib/screen/screen.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="attribute vec2 vertexPosition;\nvarying highp vec2 vTexCoords;\nconst vec2 scale = vec2(0.5, 0.5);\n\nvoid main() {\n vTexCoords = vertexPosition * scale + scale; // scale vertex attribute to [0,1] range\n gl_Position = vec4(vertexPosition, 0.0, 1.0);\n}\n "},"./src/WebGL/shaders/lib/screenaa/screenaa.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform sampler2D colormap;\nvarying highp vec2 vTexCoords;\nuniform vec2 dimensions;\n\n// Basic FXAA implementation based on the code on geeks3d.com \n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#define FXAA_SPAN_MAX 8.0\n\nvec4 applyFXAA(vec2 fragCoord, sampler2D tex)\n{\n vec4 color;\n vec2 inverseVP = vec2(1.0 / dimensions.x, 1.0 / dimensions.y);\n vec3 rgbNW = texture2D(tex, fragCoord + vec2(-1.0, -1.0) * inverseVP).xyz;\n vec3 rgbNE = texture2D(tex, fragCoord + vec2(1.0, -1.0) * inverseVP).xyz;\n vec3 rgbSW = texture2D(tex, fragCoord + vec2(-1.0, 1.0) * inverseVP).xyz;\n vec3 rgbSE = texture2D(tex, fragCoord + vec2(1.0, 1.0) * inverseVP).xyz;\n vec3 rgbM = texture2D(tex, fragCoord * inverseVP).xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n\n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord + dir * -0.5).xyz +\n texture2D(tex, fragCoord + dir * 0.5).xyz);\n\n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, 1.0);\n else\n color = vec4(rgbB, 1.0);\n return color;\n}\n//DEFINEFRAGCOLOR\nvoid main (void) {\n gl_FragColor = applyFXAA(vTexCoords, colormap);\n}\n "},"./src/WebGL/shaders/lib/screenaa/screenaa.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="attribute vec2 vertexPosition;\nvarying highp vec2 vTexCoords;\nconst vec2 scale = vec2(0.5, 0.5);\n\nvoid main() {\n vTexCoords = vertexPosition * scale + scale; // scale vertex attribute to [0,1] range\n gl_Position = vec4(vertexPosition, 0.0, 1.0);\n}\n "},"./src/WebGL/shaders/lib/sphereimposter/sphereimposter.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\nuniform mat4 viewMatrix;\nuniform float opacity;\nuniform mat4 projectionMatrix;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\nuniform float uDepth;\nuniform vec3 directionalLightColor[ 1 ];\n\nvarying vec3 vColor;\nvarying vec2 mapping;\nvarying float rval;\nvarying vec3 vLight;\nvarying vec3 center;\n\n//DEFINEFRAGCOLOR\n\nvoid main() {\n float lensqr = dot(mapping,mapping);\n float rsqr = rval*rval;\n if(lensqr > rsqr)\n discard;\n float z = sqrt(rsqr-lensqr);\n vec3 cameraPos = center+ vec3(mapping.x,mapping.y,z);\n vec4 clipPos = projectionMatrix * vec4(cameraPos, 1.0);\n float ndcDepth = clipPos.z / clipPos.w;\n gl_FragDepthEXT = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n vec3 norm = normalize(vec3(mapping.x,mapping.y,z));\n float dotProduct = dot( norm, vLight );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n vec3 vLight = directionalLightColor[ 0 ] * directionalLightWeighting;\n gl_FragColor = vec4(vLight*vColor, opacity*opacity );\n float fogFactor = smoothstep( fogNear, fogFar, gl_FragDepthEXT/gl_FragCoord.w );\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n\n}\n\n"},"./src/WebGL/shaders/lib/sphereimposter/sphereimposter.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec2 mapping;\nvarying vec3 vColor;\nvarying float rval;\nvarying vec3 vLight;\nvarying vec3 center;\n\nvoid main() {\n\n vColor = color;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n center = mvPosition.xyz;\n vec4 projPosition = projectionMatrix * mvPosition;\n vec4 adjust = projectionMatrix* vec4(normal,0.0); adjust.z = 0.0; adjust.w = 0.0;\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vLight = normalize( lDirection.xyz );\n mapping = normal.xy;\n rval = abs(normal.x);\n gl_Position = projPosition+adjust;\n\n}\n"},"./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform float opacity;\nuniform vec3 outlineColor;\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\nuniform mat4 projectionMatrix;\nvarying vec2 mapping;\nvarying float rval;\nvarying vec3 center;\n\nuniform float outlinePushback;\n\n//DEFINEFRAGCOLOR\n\nvoid main() {\n float lensqr = dot(mapping,mapping);\n float rsqr = rval*rval;\n if(lensqr > rsqr)\n discard;\n float z = sqrt(rsqr-lensqr);\n vec3 cameraPos = center+ vec3(mapping.x,mapping.y,z-outlinePushback);\n vec4 clipPos = projectionMatrix * vec4(cameraPos, 1.0);\n float ndcDepth = clipPos.z / clipPos.w;\n gl_FragDepthEXT = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n gl_FragColor = vec4(outlineColor, 1 );\n}\n\n\n"},"./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float outlineWidth;\nuniform float outlinePushback;\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec2 mapping;\nvarying float rval;\nvarying vec3 center;\n\nvoid main() {\n\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n center = mvPosition.xyz;\n vec4 projPosition = projectionMatrix * mvPosition;\n vec2 norm = normal.xy + vec2(sign(normal.x)*outlineWidth,sign(normal.y)*outlineWidth);\n vec4 adjust = projectionMatrix* vec4(norm,normal.z,0.0); adjust.z = 0.0; adjust.w = 0.0;\n mapping = norm.xy;\n rval = abs(norm.x);\n gl_Position = projPosition+adjust;\n}\n\n"},"./src/WebGL/shaders/lib/sprite/sprite.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform vec3 color;\nuniform sampler2D map;\nuniform float opacity;\n\nuniform int fogType;\nuniform vec3 fogColor;\nuniform float fogDensity;\nuniform float fogNear;\nuniform float fogFar;\nuniform float alphaTest;\n\nvarying vec2 vUV;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n vec4 texture = texture2D(map, vUV);\n\n if (texture.a < alphaTest) discard;\n\n gl_FragColor = vec4(color * texture.xyz, texture.a * opacity);\n\n if (fogType > 0) {\n\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n float fogFactor = 0.0;\n\n if (fogType == 1) {\n fogFactor = smoothstep(fogNear, fogFar, depth);\n }\n\n else {\n const float LOG2 = 1.442695;\n float fogFactor = exp2(- fogDensity * fogDensity * depth * depth * LOG2);\n fogFactor = 1.0 - clamp(fogFactor, 0.0, 1.0);\n }\n\n gl_FragColor = mix(gl_FragColor, vec4(fogColor, gl_FragColor.w), fogFactor);\n\n }\n}\n\n"},"./src/WebGL/shaders/lib/sprite/sprite.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform int useScreenCoordinates;\nuniform vec3 screenPosition;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float rotation;\nuniform vec2 scale;\nuniform vec2 alignment;\nuniform vec2 uvOffset;\nuniform vec2 uvScale;\n\nattribute vec2 position;\nattribute vec2 uv;\n\nvarying vec2 vUV;\n\nvoid main() {\n\n vUV = uvOffset + uv * uvScale;\n\n vec2 alignedPosition = position + alignment;\n\n vec2 rotatedPosition;\n rotatedPosition.x = ( cos(rotation) * alignedPosition.x - sin(rotation) * alignedPosition.y ) * scale.x;\n rotatedPosition.y = ( sin(rotation) * alignedPosition.x + cos(rotation) * alignedPosition.y ) * scale.y;\n\n vec4 finalPosition;\n\n if(useScreenCoordinates != 0) {\n finalPosition = vec4(screenPosition.xy + rotatedPosition, screenPosition.z, 1.0);\n }\n\n else {\n finalPosition = projectionMatrix * modelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0); finalPosition /= finalPosition.w;\n finalPosition.xy += rotatedPosition; \n }\n\n gl_Position = finalPosition;\n\n}\n\n"},"./src/WebGL/shaders/lib/stickimposter/stickimposter.partial.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n=" float dotProduct = dot( norm, vLight );\n vec3 light = vec3( max( dotProduct, 0.0 ) );\n gl_FragColor = vec4(light*color, opacity*opacity );\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}"},"./src/WebGL/shaders/lib/stickimposter/stickimposter.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute float radius;\n\nvarying vec3 vColor;\nvarying vec3 vLight;\nvarying vec3 cposition;\nvarying vec3 p1;\nvarying vec3 p2;\nvarying float r;\n\nvoid main() {\n\n vColor = color; vColor.z = abs(vColor.z); //z indicates which vertex and so would vary\n r = abs(radius);\n vec4 to = modelViewMatrix*vec4(normal, 1.0); //normal is other point of cylinder\n vec4 pt = modelViewMatrix*vec4(position, 1.0);\n vec4 mvPosition = pt;\n p1 = pt.xyz; p2 = to.xyz;\n vec3 norm = to.xyz-pt.xyz;\n float mult = 1.1; //slop to account for perspective of sphere\n if(length(p1) > length(p2)) { //billboard at level of closest point\n mvPosition = to;\n }\n vec3 n = normalize(mvPosition.xyz);\n//intersect with the plane defined by the camera looking at the billboard point\n if(color.z >= 0.0) { //p1\n if(projectionMatrix[3][3] == 0.0) { //perspective\n vec3 pnorm = normalize(p1);\n float t = dot(mvPosition.xyz-p1,n)/dot(pnorm,n);\n mvPosition.xyz = p1+t*pnorm; \n } else { //orthographic\n mvPosition.xyz = p1;\n }\n } else {\n if(projectionMatrix[3][3] == 0.0) { //perspective\n vec3 pnorm = normalize(p2);\n float t = dot(mvPosition.xyz-p2,n)/dot(pnorm,n);\n mvPosition.xyz = p2+t*pnorm;\n } else { //orthographic\n mvPosition.xyz = p2;\n } \n mult *= -1.0;\n }\n vec3 cr = normalize(cross(mvPosition.xyz,norm))*radius;\n vec3 doublecr = normalize(cross(mvPosition.xyz,cr))*radius;\n mvPosition.xyz += mult*(cr + doublecr).xyz;\n cposition = mvPosition.xyz;\n gl_Position = projectionMatrix * mvPosition;\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vLight = normalize( lDirection.xyz )*directionalLightColor[0]; //not really sure this is right, but color is always white so..\n}\n\n"},"./src/WebGL/shaders/lib/stickimposteroutline/stickimposteroutline.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\nuniform vec3 outlineColor;\nuniform float outlineWidth;\nuniform float outlinePushback;\n\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute float radius;\n\nvarying vec3 vColor;\nvarying vec3 vLight;\nvarying vec3 cposition;\nvarying vec3 p1;\nvarying vec3 p2;\nvarying float r;\n\nvoid main() {\n\n vColor = outlineColor;\n float rad = radius+sign(radius)*outlineWidth;\n r = abs(rad);\n vec4 to = modelViewMatrix*vec4(normal, 1.0); //normal is other point of cylinder\n vec4 pt = modelViewMatrix*vec4(position, 1.0);\n//pushback\n to.xyz += normalize(to.xyz)*outlinePushback;\n pt.xyz += normalize(pt.xyz)*outlinePushback;\n\n vec4 mvPosition = pt;\n p1 = pt.xyz; p2 = to.xyz;\n vec3 norm = to.xyz-pt.xyz;\n float mult = 1.1; //slop to account for perspective of sphere\n if(length(p1) > length(p2)) { //billboard at level of closest point\n mvPosition = to;\n }\n vec3 n = normalize(mvPosition.xyz);\n//intersect with the plane defined by the camera looking at the billboard point\n if(color.z >= 0.0) { //p1\n vec3 pnorm = normalize(p1);\n float t = dot(mvPosition.xyz-p1,n)/dot(pnorm,n);\n mvPosition.xyz = p1+t*pnorm;\n } else {\n vec3 pnorm = normalize(p2);\n float t = dot(mvPosition.xyz-p2,n)/dot(pnorm,n);\n mvPosition.xyz = p2+t*pnorm;\n mult *= -1.0;\n }\n vec3 cr = normalize(cross(mvPosition.xyz,norm))*rad;\n vec3 doublecr = normalize(cross(mvPosition.xyz,cr))*rad;\n mvPosition.xy += mult*(cr + doublecr).xy;\n cposition = mvPosition.xyz;\n gl_Position = projectionMatrix * mvPosition;\n vLight = vec3(1.0,1.0,1.0);\n}\n\n"},"./src/WebGL/shaders/lib/volumetric/volumetric.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\nuniform highp sampler3D data;\nuniform highp sampler2D colormap;\nuniform highp sampler2D depthmap;\n\n\nuniform mat4 textmat;\nuniform mat4 projinv;\nuniform mat4 projectionMatrix;\n\nuniform float step;\nuniform float subsamples;\nuniform float maxdepth;\nuniform float transfermin;\nuniform float transfermax;\nin vec4 mvPosition;\nout vec4 color;\nvoid main(void) {\n\n vec4 pos = mvPosition;\n bool seengood = false;\n float i = 0.0;\n color = vec4(1,1,1,0);\n float increment = 1.0/subsamples;\n float maxsteps = (maxdepth*subsamples/step);\n//there's probably a better way to do this..\n//calculate farthest possible point in model coordinates\n vec4 maxpos = vec4(pos.x,pos.y,pos.z-maxdepth,1.0);\n// convert to projection\n maxpos = projectionMatrix*maxpos;\n vec4 startp = projectionMatrix*pos;\n// homogonize\n maxpos /= maxpos.w;\n startp /= startp.w;\n//take x,y from start and z from max\n maxpos = vec4(startp.x,startp.y,maxpos.z,1.0);\n//convert back to model space\n maxpos = projinv*maxpos;\n maxpos /= maxpos.w;\n float incr = step/subsamples;\n//get depth from depthmap\n//startp is apparently [-1,1]\n vec2 tpos = startp.xy/2.0+0.5;\n float depth = texture(depthmap, tpos).r;\n//compute vector between start and end\n vec4 direction = maxpos-pos;\n for( i = 0.0; i <= maxsteps; i++) {\n vec4 pt = (pos+(i/maxsteps)*direction);\n vec4 ppt = projectionMatrix*pt;\n float ptdepth = ppt.z/ppt.w;\n ptdepth = ((gl_DepthRange.diff * ptdepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n if(ptdepth > depth) break;\n pt = textmat*pt;\n// pt /= pt.w;\n if(pt.x >= -0.01 && pt.y >= -0.01 && pt.z >= -0.01 && pt.x <= 1.01 && pt.y <= 1.01 && pt.z <= 1.01) {\n seengood = true;\n } else if(seengood) {\n break;\n }\n if( pt.x < -0.01 || pt.x > 1.01 || pt.y < -0.01 || pt.y > 1.01 || pt.z < -0.01 || pt.z > 1.01 ){\n color.a = 0.0;\n continue;\n }\n else {\n float val = texture(data, pt.zyx).r;\n if(isinf(val)) continue; //masked out\n float cval = (val-transfermin)/(transfermax-transfermin); //scale to texture 0-1 range\n vec4 val_color = texture(colormap, vec2(cval,0.5));\n color.rgb = color.rgb*color.a + (1.0-color.a)*val_color.a*val_color.rgb;\n color.a += (1.0 - color.a) * val_color.a; \n if(color.a > 0.0) color.rgb /= color.a;\n// color = vec4(pt.x, pt.y, pt.z, 1.0);\n }\n// color = vec4(pt.x, pt.y, pt.z, 0.0)\n }\n}\n\n "},"./src/WebGL/shaders/lib/volumetric/volumetric.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\n\nin vec3 position;\nout vec4 mvPosition;\nvoid main() {\n\n mvPosition = modelViewMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix*mvPosition;\n}\n"},"./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform float opacity;\nuniform mat4 projectionMatrix;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLight;\nvarying vec3 vColor;\nvarying vec3 cposition;\nvarying vec3 p1;\nvarying vec3 p2;\nvarying float r;\n\n//DEFINEFRAGCOLOR\n\n//cylinder-ray intersection testing taken from http://mrl.nyu.edu/~dzorin/cg05/lecture12.pdf\n//also useful: http://stackoverflow.com/questions/9595300/cylinder-impostor-in-glsl\n//with a bit more care (caps) this could be a general cylinder imposter (see also outline)\nvoid main() {\n vec3 color = abs(vColor);\n vec3 pos = cposition;\n vec3 p = pos; //ray point\n vec3 v = vec3(0.0,0.0,-1.0); //ray normal - orthographic\n if(projectionMatrix[3][3] == 0.0) v = normalize(pos); //ray normal - perspective\n vec3 pa = p1; //cyl start\n vec3 va = normalize(p2-p1); //cyl norm\n vec3 tmp1 = v-(dot(v,va)*va);\n vec3 deltap = p-pa;\n float A = dot(tmp1,tmp1);\n if(A == 0.0) discard;\n vec3 tmp2 = deltap-(dot(deltap,va)*va);\n float B = 2.0*dot(tmp1, tmp2);\n float C = dot(tmp2,tmp2)-r*r;\n//quadratic equation!\n float det = (B*B) - (4.0*A*C);\n if(det < 0.0) discard;\n float sqrtDet = sqrt(det);\n float posT = (-B+sqrtDet)/(2.0*A);\n float negT = (-B-sqrtDet)/(2.0*A);\n float intersectionT = min(posT,negT);\n vec3 qi = p+v*intersectionT;\n float dotp1 = dot(va,qi-p1);\n float dotp2 = dot(va,qi-p2);\n vec3 norm;\n if( dotp1 < 0.0 || dotp2 > 0.0) { //(p-c)^2 + 2(p-c)vt +v^2+t^2 - r^2 = 0\n vec3 cp;\n if( dotp1 < 0.0) { \n// if(vColor.x < 0.0 ) discard; //color sign bit indicates if we should cap or not\n cp = p1;\n } else {\n// if(vColor.y < 0.0 ) discard;\n cp = p2;\n }\n vec3 diff = p-cp;\n A = dot(v,v);\n B = dot(diff,v)*2.0;\n C = dot(diff,diff)-r*r;\n det = (B*B) - (4.0*C);\n if(det < 0.0) discard;\n sqrtDet = sqrt(det);\n posT = (-B+sqrtDet)/(2.0);\n negT = (-B-sqrtDet)/(2.0);\n float t = min(posT,negT);\n qi = p+v*t; \n norm = normalize(qi-cp); \n } else {\n norm = normalize(qi-(dotp1*va + p1));\n }\n vec4 clipPos = projectionMatrix * vec4(qi, 1.0);\n float ndcDepth = clipPos.z / clipPos.w;\n float depth = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n gl_FragDepthEXT = depth;"},"./src/GLDraw.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{CAP:()=>n,GLDraw:()=>i});var n,i,o=r("./src/WebGL/math/index.ts");!function(t){t[t.NONE=0]="NONE",t[t.FLAT=1]="FLAT",t[t.ROUND=2]="ROUND"}(n||(n={})),function(t){function e(t,e,r){var n,i,o,a,s,l=Math.hypot(t,e);l<1e-4?(i=0,o=1):(i=-t/l,o=e/l),e=-i*t+o*e,(n=Math.hypot(e,r))<1e-4?(a=0,s=1):(a=r/n,s=e/n);var c=new Float32Array(9);return c[0]=o,c[1]=i,c[2]=0,c[3]=-i*s,c[4]=o*s,c[5]=a,c[6]=i*a,c[7]=-o*a,c[8]=s,c}var r=new class{constructor(){this.cache={};let t,e=[],r=Math.pow(2,4),n=2,i=Math.pow(2,n),a=r/i;for(e[0]=new o.Vector3(-1,0,0),e[a]=new o.Vector3(0,0,1),e[2*a]=new o.Vector3(1,0,0),e[3*a]=new o.Vector3(0,0,-1),n=3;n<=4;n++){for(i=Math.pow(2,n-1),a=r/i,t=0;t{"use strict";r.r(e),r.d(e,{GLModel:()=>p});var n=r("./src/WebGL/index.ts"),i=r("./src/WebGL/shapes/index.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/colors.ts"),s=r("./src/GLDraw.ts"),l=r("./src/glcartoon.ts"),c=r("./src/utilities.ts"),u=r("./src/Gradient.ts"),h=r("./src/parsers/index.ts"),d=r("./node_modules/netcdfjs/lib-esm/index.js"),f=r("./src/parsers/utils/assignBonds.ts");class p{static sameObj(t,e){return t&&e?JSON.stringify(t)==JSON.stringify(e):t==e}constructor(t,e){this.atoms=[],this.frames=[],this.box=null,this.atomdfs=null,this.id=0,this.hidden=!1,this.molObj=null,this.renderedMolObj=null,this.lastColors=null,this.modelData={},this.modelDatas=null,this.idMatrix=new o.Matrix4,this.dontDuplicateAtoms=!0,this.defaultColor=a.elementColors.defaultColor,this.defaultStickRadius=.25,this.options=e||{},this.ElementColors=this.options.defaultcolors?this.options.defaultcolors:a.elementColors.defaultColors,this.defaultSphereRadius=this.options.defaultSphereRadius?this.options.defaultSphereRadius:1.5,this.defaultCartoonQuality=this.options.cartoonQuality?this.options.cartoonQuality:10,this.id=t}getRadiusFromStyle(t,e){var r=this.defaultSphereRadius;if(void 0!==e.radius)r=e.radius;else if(p.vdwRadii[t.elem])r=p.vdwRadii[t.elem];else if(t.elem.length>1){let e=t.elem;e=e[0].toUpperCase()+e[1].toLowerCase(),p.vdwRadii[e]&&(r=p.vdwRadii[e])}return void 0!==e.scale&&(r*=e.scale),r}drawAtomCross(t,e){if(t.style.cross){var r=t.style.cross;if(!r.hidden){var i=r.linewidth||p.defaultlineWidth;e[i]||(e[i]=new n.Geometry);var a=e[i].updateGeoGroup(6),s=this.getRadiusFromStyle(t,r),l=[[s,0,0],[-s,0,0],[0,s,0],[0,-s,0],[0,0,s],[0,0,-s]],u=t.clickable||t.hoverable;u&&void 0===t.intersectionShape&&(t.intersectionShape={sphere:[],cylinder:[],line:[]});for(var h=(0,c.getColorFromStyle)(t,r),d=a.vertexArray,f=a.colorArray,m=0;m<6;m++){var g=3*a.vertices;if(a.vertices++,d[g]=t.x+l[m][0],d[g+1]=t.y+l[m][1],d[g+2]=t.z+l[m][2],f[g]=h.r,f[g+1]=h.g,f[g+2]=h.b,u){var v=new o.Vector3(l[m][0],l[m][1],l[m][2]);v.multiplyScalar(.1),v.set(v.x+t.x,v.y+t.y,v.z+t.z),t.intersectionShape.line.push(v)}}}}}getGoodCross(t,e,r,n){for(var i=null,a=-1,s=0,l=t.bonds.length;sa&&(i=h,(a=c)>.1))return i}return i}getSideBondV(t,e,r){var n,i,a,s,l=new o.Vector3(t.x,t.y,t.z),c=new o.Vector3(e.x,e.y,e.z).clone(),u=null;if(c.sub(l),1===t.bonds.length)1===e.bonds.length?(u=c.clone(),Math.abs(u.x)>1e-4?u.y+=1:u.x+=1):(n=(r+1)%e.bonds.length,i=e.bonds[n],(a=this.atoms[i]).index==t.index&&(n=(n+1)%e.bonds.length,i=e.bonds[n],a=this.atoms[i]),(s=new o.Vector3(a.x,a.y,a.z).clone()).sub(l),(u=s.clone()).cross(c));else if((u=this.getGoodCross(t,e,l,c)).lengthSq()<.01){var h=this.getGoodCross(e,t,l,c);null!=h&&(u=h)}return u.lengthSq()<.01&&(u=c.clone(),Math.abs(u.x)>1e-4?u.y+=1:u.x+=1),u.cross(c),u.normalize(),u}addLine(t,e,r,n,i,o){t[r]=n.x,t[r+1]=n.y,t[r+2]=n.z,e[r]=o.r,e[r+1]=o.g,e[r+2]=o.b,t[r+3]=i.x,t[r+4]=i.y,t[r+5]=i.z,e[r+3]=o.r,e[r+4]=o.g,e[r+5]=o.b}drawBondLines(t,e,r){if(t.style.line){var i=t.style.line;if(!i.hidden){var s,l,u,h,d=i.linewidth||p.defaultlineWidth;r[d]||(r[d]=new n.Geometry);for(var f=r[d].updateGeoGroup(6*t.bonds.length),m=f.vertexArray,g=f.colorArray,v=0;v=b.index)){var y=new o.Vector3(t.x,t.y,t.z),x=new o.Vector3(b.x,b.y,b.z),_=y.clone().add(x).multiplyScalar(.5),w=!1,k=t.clickable||t.hoverable,A=b.clickable||b.hoverable;(k||A)&&(k&&(void 0===t.intersectionShape&&(t.intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]}),t.intersectionShape.line.push(y),t.intersectionShape.line.push(_)),A&&(void 0===b.intersectionShape&&(b.intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]}),b.intersectionShape.line.push(_),b.intersectionShape.line.push(x)));var M=(0,c.getColorFromStyle)(t,t.style.line),T=(0,c.getColorFromStyle)(b,b.style.line);if(t.bondStyles&&t.bondStyles[v]){var S=t.bondStyles[v];if(!S.iswire)continue;S.singleBond&&(w=!0),void 0!==S.color1&&(M=a.CC.color(S.color1)),void 0!==S.color2&&(T=a.CC.color(S.color2))}var C,E,L=3*f.vertices;if(t.bondOrder[v]>1&&t.bondOrder[v]<4&&!w){var z=this.getSideBondV(t,b,v),O=x.clone();O.sub(y),2==t.bondOrder[v]?(z.multiplyScalar(.1),(s=y.clone()).add(z),(l=y.clone()).sub(z),(u=s.clone()).add(O),(h=l.clone()).add(O),M==T?(f.vertices+=4,this.addLine(m,g,L,s,u,M),this.addLine(m,g,L+6,l,h,M)):(f.vertices+=8,O.multiplyScalar(.5),(C=s.clone()).add(O),(E=l.clone()).add(O),this.addLine(m,g,L,s,C,M),this.addLine(m,g,L+6,C,u,T),this.addLine(m,g,L+12,l,E,M),this.addLine(m,g,L+18,E,h,T))):3==t.bondOrder[v]&&(z.multiplyScalar(.1),(s=y.clone()).add(z),(l=y.clone()).sub(z),(u=s.clone()).add(O),(h=l.clone()).add(O),M==T?(f.vertices+=6,this.addLine(m,g,L,y,x,M),this.addLine(m,g,L+6,s,u,M),this.addLine(m,g,L+12,l,h,M)):(f.vertices+=12,O.multiplyScalar(.5),(C=s.clone()).add(O),(E=l.clone()).add(O),this.addLine(m,g,L,y,_,M),this.addLine(m,g,L+6,_,x,T),this.addLine(m,g,L+12,s,C,M),this.addLine(m,g,L+18,C,u,T),this.addLine(m,g,L+24,l,E,M),this.addLine(m,g,L+30,E,h,T)))}else M==T?(f.vertices+=2,this.addLine(m,g,L,y,x,M)):(f.vertices+=4,this.addLine(m,g,L,y,_,M),this.addLine(m,g,L+6,_,x,T))}}}}}drawAtomSphere(t,e){if(t.style.sphere){var r=t.style.sphere;if(!r.hidden){var n=(0,c.getColorFromStyle)(t,r),a=this.getRadiusFromStyle(t,r);if((!0===t.clickable||t.hoverable)&&void 0!==t.intersectionShape){var l=new o.Vector3(t.x,t.y,t.z);t.intersectionShape.sphere.push(new i.Sphere(l,a))}s.GLDraw.drawSphere(e,t,a,n)}}}drawAtomClickSphere(t){if(t.style.clicksphere){var e=t.style.clicksphere;if(!e.hidden){var r=this.getRadiusFromStyle(t,e);if((!0===t.clickable||t.hoverable)&&void 0!==t.intersectionShape){var n=new o.Vector3(t.x,t.y,t.z);t.intersectionShape.sphere.push(new i.Sphere(n,r))}}}}drawAtomInstanced(t,e){if(t.style.sphere){var r=t.style.sphere;if(!r.hidden){var n=this.getRadiusFromStyle(t,r),a=(0,c.getColorFromStyle)(t,r),s=e.updateGeoGroup(1),l=s.vertices,u=3*l,h=s.vertexArray,d=s.colorArray,f=s.radiusArray;if(h[u]=t.x,h[u+1]=t.y,h[u+2]=t.z,d[u]=a.r,d[u+1]=a.g,d[u+2]=a.b,f[l]=n,(!0===t.clickable||t.hoverable)&&void 0!==t.intersectionShape){var p=new o.Vector3(t.x,t.y,t.z);t.intersectionShape.sphere.push(new i.Sphere(p,n))}s.vertices+=1}}}drawSphereImposter(t,e,r,n){var i,o=t.updateGeoGroup(4),a=o.vertices,s=3*a,l=o.vertexArray,c=o.colorArray;for(i=0;i<4;i++)l[s+3*i]=e.x,l[s+3*i+1]=e.y,l[s+3*i+2]=e.z;var u=o.normalArray;for(i=0;i<4;i++)c[s+3*i]=n.r,c[s+3*i+1]=n.g,c[s+3*i+2]=n.b;u[s+0]=-r,u[s+1]=r,u[s+2]=0,u[s+3]=-r,u[s+4]=-r,u[s+5]=0,u[s+6]=r,u[s+7]=-r,u[s+8]=0,u[s+9]=r,u[s+10]=r,u[s+11]=0,o.vertices+=4;var h=o.faceArray,d=o.faceidx;h[d+0]=a,h[d+1]=a+1,h[d+2]=a+2,h[d+3]=a+2,h[d+4]=a+3,h[d+5]=a,o.faceidx+=6}drawAtomImposter(t,e){if(t.style.sphere){var r=t.style.sphere;if(!r.hidden){var n=this.getRadiusFromStyle(t,r),a=(0,c.getColorFromStyle)(t,r);if((!0===t.clickable||t.hoverable)&&void 0!==t.intersectionShape){var s=new o.Vector3(t.x,t.y,t.z);t.intersectionShape.sphere.push(new i.Sphere(s,n))}this.drawSphereImposter(e,t,n,a)}}}calculateDashes(t,e,r,n,i){var a=Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)+Math.pow(t.z-e.z,2));r=Math.max(r,0),i=Math.max(i,0)+2*r,(n=Math.max(n,.001))+i>a&&(n=a,i=0);var s,l=Math.floor((a-n)/(n+i))+1;i=(a-l*n)/l;for(var c=new o.Vector3(t.x,t.y,t.z),u=new o.Vector3((e.x-t.x)/(a/i),(e.y-t.y)/(a/i),(e.z-t.z)/(a/i)),h=new o.Vector3((e.x-t.x)/(a/n),(e.y-t.y)/(a/n),(e.z-t.z)/(a/n)),d=[],f=0;f{var e=r.imposter?p.drawStickImposter:s.GLDraw.drawCylinder;return!D&&t>=1?e:(t,r,n,i,o,a=0,s=0,l=.1,c=.25)=>{this.calculateDashes(r,n,i,l,c).forEach((r=>{e(t,r.from,r.to,i,o,a,s)}))}};for(f=0;f3){if(t.bondOrder[f]<1&&(z*=t.bondOrder[f]),!N.capDrawn&&N.bonds.length<4&&(F=2),R!=U?(k=(new o.Vector3).addVectors(G,V).multiplyScalar(.5),j(r,G,k,z,R,I,0,E,L),j(r,k,V,z,U,0,F,E,L)):j(r,G,V,z,R,I,F,E,L),h=t.clickable||t.hoverable,d=N.clickable||N.hoverable,h||d){if(k||(k=(new o.Vector3).addVectors(G,V).multiplyScalar(.5)),h){var H=new i.Cylinder(G,k,z),W=new i.Sphere(G,z);t.intersectionShape.cylinder.push(H),t.intersectionShape.sphere.push(W)}if(d){var q=new i.Cylinder(V,k,z),Y=new i.Sphere(V,z);N.intersectionShape.cylinder.push(q),N.intersectionShape.sphere.push(Y)}}}else if(t.bondOrder[f]>1){var Z=0,X=0;z!=T&&(Z=2,X=2);var $,J,K,Q,tt,et=V.clone(),rt=null;et.sub(G),rt=this.getSideBondV(t,N,f),2==t.bondOrder[f]?($=z*S,rt.multiplyScalar(1.5*$),(J=G.clone()).add(rt),(K=G.clone()).sub(rt),(Q=J.clone()).add(et),(tt=K.clone()).add(et),R!=U?(k=(new o.Vector3).addVectors(J,Q).multiplyScalar(.5),A=(new o.Vector3).addVectors(K,tt).multiplyScalar(.5),j(r,J,k,$,R,Z,0),j(r,k,Q,$,U,0,X),j(r,K,A,$,R,Z,0),j(r,A,tt,$,U,0,X)):(j(r,J,Q,$,R,Z,X),j(r,K,tt,$,R,Z,X)),h=t.clickable||t.hoverable,d=N.clickable||N.hoverable,(h||d)&&(k||(k=(new o.Vector3).addVectors(J,Q).multiplyScalar(.5)),A||(A=(new o.Vector3).addVectors(K,tt).multiplyScalar(.5)),h&&(v=new i.Cylinder(J,k,$),b=new i.Cylinder(K,A,$),t.intersectionShape.cylinder.push(v),t.intersectionShape.cylinder.push(b)),d&&(x=new i.Cylinder(Q,k,$),_=new i.Cylinder(tt,A,$),N.intersectionShape.cylinder.push(x),N.intersectionShape.cylinder.push(_)))):3==t.bondOrder[f]&&($=z*C,rt.cross(et),rt.normalize(),rt.multiplyScalar(3*$),(J=G.clone()).add(rt),(K=G.clone()).sub(rt),(Q=J.clone()).add(et),(tt=K.clone()).add(et),R!=U?(k=(new o.Vector3).addVectors(J,Q).multiplyScalar(.5),A=(new o.Vector3).addVectors(K,tt).multiplyScalar(.5),M=(new o.Vector3).addVectors(G,V).multiplyScalar(.5),j(r,J,k,$,R,Z,0),j(r,k,Q,$,U,0,X),j(r,G,M,$,R,I,0),j(r,M,V,$,U,0,F),j(r,K,A,$,R,Z,0),j(r,A,tt,$,U,0,X)):(j(r,J,Q,$,R,Z,X),j(r,G,V,$,R,I,F),j(r,K,tt,$,R,Z,X)),h=t.clickable||t.hoverable,d=N.clickable||N.hoverable,(h||d)&&(k||(k=(new o.Vector3).addVectors(J,Q).multiplyScalar(.5)),A||(A=(new o.Vector3).addVectors(K,tt).multiplyScalar(.5)),M||(M=(new o.Vector3).addVectors(G,V).multiplyScalar(.5)),h&&(v=new i.Cylinder(J.clone(),k.clone(),$),b=new i.Cylinder(K.clone(),A.clone(),$),y=new i.Cylinder(G.clone(),M.clone(),$),t.intersectionShape.cylinder.push(v),t.intersectionShape.cylinder.push(b),t.intersectionShape.cylinder.push(y)),d&&(x=new i.Cylinder(Q.clone(),k.clone(),$),_=new i.Cylinder(tt.clone(),A.clone(),$),w=new i.Cylinder(V.clone(),M.clone(),$),N.intersectionShape.cylinder.push(x),N.intersectionShape.cylinder.push(_),N.intersectionShape.cylinder.push(w))))}}}var nt=!1,it=0,ot=!1;for(f=0;f0&&(nt=!0):0==it&&(t.bonds.length>0||u.showNonBonded)&&(nt=!0),nt&&(z=T,r.imposter?this.drawSphereImposter(r.sphereGeometry,t,z,R):s.GLDraw.drawSphere(r,t,z,R))}}}createMolObj(t,e){e=e||{};var r,i,o,c,u=new n.Object3D,h=[],d={},f={},p=this.drawAtomSphere,m=null,g=null;e.supportsImposters?(p=this.drawAtomImposter,(m=new n.Geometry(!0)).imposter=!0,(g=new n.Geometry(!0,!0)).imposter=!0,g.sphereGeometry=new n.Geometry(!0),g.sphereGeometry.imposter=!0,g.drawnCaps={}):e.supportsAIA?(p=this.drawAtomInstanced,(m=new n.Geometry(!1,!0,!0)).instanced=!0,g=new n.Geometry(!0)):(m=new n.Geometry(!0),g=new n.Geometry(!0));var v,b={},y=[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(r=0,o=t.length;ry[1]&&(y[1]=x.resi)),h.push(x))}}if(h.length>0&&(0,l.drawCartoon)(u,h,y,this.defaultCartoonQuality),m&&m.vertices>0){m.initTypedArrays();var _=null,w=null;m.imposter?_=new n.SphereImposterMaterial({ambient:0,vertexColors:!0,reflectivity:0}):m.instanced?(w=new n.Geometry(!0),s.GLDraw.drawSphere(w,{x:0,y:0,z:0},1,new a.Color(.5,.5,.5)),w.initTypedArrays(),_=new n.InstancedMaterial({sphereMaterial:new n.MeshLambertMaterial({ambient:0,vertexColors:!0,reflectivity:0}),sphere:w})):_=new n.MeshLambertMaterial({ambient:0,vertexColors:!0,reflectivity:0}),b.sphere<1&&b.sphere>=0&&(_.transparent=!0,_.opacity=b.sphere),w=new n.Mesh(m,_),u.add(w)}if(g.vertices>0){var k=null,A=null,M=g.sphereGeometry;M&&void 0!==M.vertices&&0!=M.vertices||(M=null),g.initTypedArrays(),M&&M.initTypedArrays();var T={ambient:0,vertexColors:!0,reflectivity:0};g.imposter?(k=new n.StickImposterMaterial(T),A=new n.SphereImposterMaterial(T)):(k=new n.MeshLambertMaterial(T),A=new n.MeshLambertMaterial(T),k.wireframe&&(g.setUpWireframe(),M&&M.setUpWireframe())),b.stick<1&&b.stick>=0&&(k.transparent=!0,k.opacity=b.stick,A.transparent=!0,A.opacity=b.stick);var S=new n.Mesh(g,k);if(u.add(S),M){var C=new n.Mesh(M,A);u.add(C)}}for(r in d)if(d.hasOwnProperty(r)){v=r;var E=new n.LineBasicMaterial({linewidth:v,vertexColors:!0});b.line<1&&b.line>=0&&(E.transparent=!0,E.opacity=b.line),d[r].initTypedArrays();var L=new n.Line(d[r],E,n.LineStyle.LinePieces);u.add(L)}for(r in f)if(f.hasOwnProperty(r)){v=r;var z=new n.LineBasicMaterial({linewidth:v,vertexColors:!0});b.cross<1&&b.cross>=0&&(z.transparent=!0,z.opacity=b.cross),f[r].initTypedArrays();var O=new n.Line(f[r],z,n.LineStyle.LinePieces);u.add(O)}if(this.dontDuplicateAtoms&&this.modelData.symmetries&&this.modelData.symmetries.length>0){var D,I=new n.Object3D;for(D=0;Dr?e-n:e}adjustCoordinatesToBox(){if(this.box&&this.atomdfs)for(var t=this.box[0],e=this.box[1],r=this.box[2],n=.9*t,i=.9*e,o=.9*r,a=0;a=r)&&(t=r-1),null!=n.frames.url){var a=n.frames.url;(0,c.getbin)(a+"/traj/frame/"+t+"/"+n.frames.path,void 0,"POST",void 0).then((function(t){for(var e=new Float32Array(t,44),r=0,o=0;o=n&&t<=i)return!0}}return!1}static deepCopyAndCache(t,e){if("object"!=typeof t||null==t)return t;if(t.__cache_created)return t;const r={};for(const n in t){const i=t[n];if(Array.isArray(i)){r[n]=[];for(let t=0;t=n[0][0]&&a<=n[1][0]&&s>=n[0][1]&&s<=n[1][1]&&l>=n[0][2]&&l<=n[1][2]&&(a>=r[0][0]&&a<=r[1][0]&&s>=r[0][1]&&s<=r[1][1]&&l>=r[0][2]&&l<=r[1][2]||o.push(this.atoms[t]))}return o}static getFloat(t){return"number"==typeof t?t:parseFloat(t)}selectedAtoms(t,e){var r=[];t=p.deepCopyAndCache(t||{},this),e||(e=this.atoms);for(var n=e.length,i=0;i0&&r.push(n[t])}}if(t.hasOwnProperty("within")&&t.within.hasOwnProperty("sel")&&t.within.hasOwnProperty("distance")){var s=this.selectedAtoms(t.within.sel,this.atoms),l={};const e=p.getFloat(t.within.distance),n=e*e;for(let t=0;t0&&(l[e]=1)}var c=[];if(t.within.invert)for(let t=0;t0;)if(e=d.pop(),f=e.chain,m=e.resi,void 0===h[e.index]){h[e.index]=!0;for(var g=0;g0&&(this.molObj=null)}else console.log("Callback is not a function")}setHoverable(t,e,r,n){if(e=!!e,r=(0,c.makeFunction)(r),n=(0,c.makeFunction)(n),null!==r)if(null!==n){var i=this.selectedAtoms(t,this.atoms),o=i.length;for(let t=0;t0&&(this.molObj=null)}else console.log("Unhover_callback is not a function");else console.log("Hover_callback is not a function")}enableContextMenu(t,e){var r;e=!!e;var n=this.selectedAtoms(t,this.atoms),i=n.length;for(r=0;r0&&(this.molObj=null)}setColorByElement(t,e){if(null===this.molObj||!p.sameObj(e,this.lastColors)){this.lastColors=e;var r=this.selectedAtoms(t,r);r.length>0&&(this.molObj=null);for(var n=0;n0&&(this.molObj=null),"string"==typeof r&&void 0!==u.Gradient.builtinGradients[r]&&(r=new u.Gradient.builtinGradients[r]),n||(n=r.range()),n||(n=(0,c.getPropertyRange)(a,e)),i=0;i0&&(this.molObj=null);for(let t=0;t=i)continue;let a={b:r,e:i},s=o.bondOrder[t];1!=s&&(a.o=s),e.b.push(a)}}return e}globj(t,e){(null===this.molObj||e.regen)&&(this.molObj=this.createMolObj(this.atoms,e),this.renderedMolObj&&(t.remove(this.renderedMolObj),this.renderedMolObj=null),this.renderedMolObj=this.molObj.clone(),this.hidden&&(this.renderedMolObj.setVisible(!1),this.molObj.setVisible(!1)),t.add(this.renderedMolObj))}exportVRML(){return this.createMolObj(this.atoms,{supportsImposters:!1,supportsAIA:!1}).vrml()}removegl(t){this.renderedMolObj&&(void 0!==this.renderedMolObj.geometry&&this.renderedMolObj.geometry.dispose(),void 0!==this.renderedMolObj.material&&this.renderedMolObj.material.dispose(),t.remove(this.renderedMolObj),this.renderedMolObj=null),this.molObj=null}hide(){this.hidden=!0,this.renderedMolObj&&this.renderedMolObj.setVisible(!1),this.molObj&&this.molObj.setVisible(!1)}show(){this.hidden=!1,this.renderedMolObj&&this.renderedMolObj.setVisible(!0),this.molObj&&this.molObj.setVisible(!0)}addPropertyLabels(t,e,r,n){for(var i=this.selectedAtoms(e,i),o=(0,c.deepCopy)(n),a=0;aMOLECULE/gm)?"mol2":t.match(/^data_/gm)&&t.match(/^loop_/gm)?"cif":t.match(/^HETATM/gm)||t.match(/^ATOM/gm)?"pdb":t.match(/ITEM: TIMESTEP/gm)?"lammpstrj":t.match(/^.*\n.*\n.\s*(\d+)\s+(\d+)/gm)?"sdf":t.match(/^%VERSION\s+VERSION_STAMP/gm)?"prmtop":"xyz",console.log("Best guess: "+e))),(0,h.Parsers[e])(t,r)}}p.defaultAtomStyle={line:{}},p.defaultlineWidth=1,p.vdwRadii={H:1.2,He:1.4,Li:1.82,Be:1.53,B:1.92,C:1.7,N:1.55,O:1.52,F:1.47,Ne:1.54,Na:2.27,Mg:1.73,Al:1.84,Si:2.1,P:1.8,S:1.8,Cl:1.75,Ar:1.88,K:2.75,Ca:2.31,Ni:1.63,Cu:1.4,Zn:1.39,Ga:1.87,Ge:2.11,As:1.85,Se:1.9,Br:1.85,Kr:2.02,Rb:3.03,Sr:2.49,Pd:1.63,Ag:1.72,Cd:1.58,In:1.93,Sn:2.17,Sb:2.06,Te:2.06,I:1.98,Xe:2.16,Cs:3.43,Ba:2.68,Pt:1.75,Au:1.66,Hg:1.55,Tl:1.96,Pb:2.02,Bi:2.07,Po:1.97,At:2.02,Rn:2.2,Fr:3.48,Ra:2.83,U:1.86},p.ignoredKeys=new Set(["props","invert","model","frame","byres","expand","within","and","or","not"])},"./src/GLShape.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{GLShape:()=>d,splitMesh:()=>f});var n=r("./src/WebGL/index.ts"),i=r("./src/WebGL/shapes/index.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/colors.ts"),s=r("./src/ProteinSurface4.ts"),l=r("./src/VolumeData.ts"),c=r("./src/GLDraw.ts"),u=r("./src/glcartoon.ts"),h=r("./src/utilities.ts");class d{static finalizeGeo(t){var e=t.updateGeoGroup(0);e.vertices>0&&e.truncateArrayBuffers(!0,!0)}static updateColor(t,e){var r,n,i;e=e||a.CC.color(e),t.colorsNeedUpdate=!0,e.constructor!==Array&&(r=e.r,n=e.g,i=e.b);for(let o in t.geometryGroups){let a=t.geometryGroups[o],s=a.colorArray;for(let t=0,o=a.vertices;t0?u/t:(t+u)/t}d.multiplyScalar(c);var f=new o.Vector3(n.x,n.y,n.z).add(d),p=d.clone().negate();let m=new o.Vector3(n.x,n.y,n.z);t.intersectionShape.cylinder.push(new i.Cylinder(m,f.clone(),s)),t.intersectionShape.sphere.push(new i.Sphere(m,s));var g=[];g[0]=d.clone(),Math.abs(g[0].x)>1e-4?g[0].y+=1:g[0].x+=1,g[0].cross(d),g[0].normalize(),g[4]=g[0].clone(),g[4].crossVectors(g[0],d),g[4].normalize(),g[8]=g[0].clone().negate(),g[12]=g[4].clone().negate(),g[2]=g[0].clone().add(g[4]).normalize(),g[6]=g[4].clone().add(g[8]).normalize(),g[10]=g[8].clone().add(g[12]).normalize(),g[14]=g[12].clone().add(g[0]).normalize(),g[1]=g[0].clone().add(g[2]).normalize(),g[3]=g[2].clone().add(g[4]).normalize(),g[5]=g[4].clone().add(g[6]).normalize(),g[7]=g[6].clone().add(g[8]).normalize(),g[9]=g[8].clone().add(g[10]).normalize(),g[11]=g[10].clone().add(g[12]).normalize(),g[13]=g[12].clone().add(g[14]).normalize(),g[15]=g[14].clone().add(g[0]).normalize();var v,b,y,x,_,w,k,A,M,T,S,C,E,L,z,O,D,I,F,R,P,j,N=h.vertices,B=h.vertexArray,U=h.faceArray,G=h.normalArray,V=h.lineArray;for(b=0,y=g.length;b0){var Y=B[v-3],Z=B[v-2],X=B[v-1],$=new o.Vector3(Y,Z,X),J=new o.Vector3(a.x,a.y,a.z),K=f.clone(),Q=new o.Vector3(q.x,q.y,q.z);t.intersectionShape.triangle.push(new i.Triangle(Q,J,$)),t.intersectionShape.triangle.push(new i.Triangle($.clone(),K,Q.clone()))}}h.vertices+=48,B[v=3*h.vertices]=n.x,B[v+1]=n.y,B[v+2]=n.z,B[v+3]=f.x,B[v+4]=f.y,B[v+5]=f.z,B[v+6]=a.x,B[v+7]=a.y,B[v+8]=a.z,h.vertices+=3;var tt=h.vertices-3,et=h.vertices-2,rt=h.vertices-1,nt=3*tt,it=3*et,ot=3*rt;for(b=0,y=g.length-1;bs&&(s=u),h>l&&(l=h),d>c&&(c=d)}t.center.set((s+i)/2,(l+o)/2,(c+a)/2),t.radius=t.center.distanceTo({x:s,y:l,z:c}),t.box={min:{x:i,y:o,z:a},max:{x:s,y:l,z:c}}}static addCustomGeo(t,e,r,n,a){var s,l,c,u,h,f,p,m,g,v=e.addGeoGroup(),b=r.vertexArr,y=r.normalArr,x=r.faceArr;v.vertices=b.length,v.faceidx=x.length;var _=v.vertexArray,w=v.colorArray;for(n.constructor!==Array&&(m=n.r,g=n.g,u=n.b),f=0,p=v.vertices;fc?(h.fromCap=0,h.toCap=2):(h.fromCap=2,h.toCap=2),this.addCylinder(h)}}addLine(t){var e,r;e=t.start?new o.Vector3(t.start.x||0,t.start.y||0,t.start.z||0):new o.Vector3(0,0,0),t.end?void 0===(r=new o.Vector3(t.end.x,t.end.y||0,t.end.z||0)).x&&(r.x=3):r=new o.Vector3(3,0,0);var n=this.geo.updateGeoGroup(2),i=n.vertices,a=3*i,s=n.vertexArray;s[a]=e.x,s[a+1]=e.y,s[a+2]=e.z,s[a+3]=r.x,s[a+4]=r.y,s[a+5]=r.z,n.vertices+=2;var l=n.lineArray,c=n.lineidx;l[c]=i,l[c+1]=i+1,n.lineidx+=2;var u=new o.Vector3;this.components.push({centroid:u.addVectors(e,r).multiplyScalar(.5)}),n=this.geo.updateGeoGroup(0),d.updateBoundingFromPoints(this.boundingSphere,this.components,n.vertexArray,n.vertices)}addArrow(t){if(t.start?t.start=new o.Vector3(t.start.x||0,t.start.y||0,t.start.z||0):t.start=new o.Vector3(0,0,0),t.dir instanceof o.Vector3&&"number"==typeof t.length){var e=t.dir.clone().multiplyScalar(t.length).add(t.start);t.end=e}else t.end?(t.end=new o.Vector3(t.end.x,t.end.y||0,t.end.z||0),void 0===t.end.x&&(t.end.x=3)):t.end=new o.Vector3(3,0,0);t.radius=t.radius||.1,t.radiusRatio=t.radiusRatio||1.618034,t.mid=0=0?g[i]-l:l-g[i])>0&&(v[i]|=d.ISDONE);var b=[],y=[];s.MarchingCube.march(v,b,y,{fulltable:!0,voxel:c,unitCube:t.unit,origin:t.origin,matrix:t.matrix,nX:h,nY:f,nZ:p}),!c&&u>0&&s.MarchingCube.laplacianSmooth(u,b,y);var x=[],_=[],w=[];if(e.selectedRegion&&void 0===e.coords&&(e.coords=e.selectedRegion),void 0===e.coords&&void 0!==e.selection&&(n?e.coords=n.selectedAtoms(e.selection):console.log("addIsosurface needs viewer is selection provided.")),void 0!==e.coords){var k=e.coords[0].x,A=e.coords[0].y,M=e.coords[0].z,T=e.coords[0].x,S=e.coords[0].y,C=e.coords[0].z;for(let t=0;tk?k=e.coords[t].x:e.coords[t].xA?A=e.coords[t].y:e.coords[t].yM?M=e.coords[t].z:e.coords[t].zT&&b[t].xS&&b[t].yC&&b[t].z=64e3&&(e.push({vertexArr:[],normalArr:[],faceArr:[]}),t.colorArr&&(e.colorArr=[]),i++)}return e}d.ISDONE=2,d.drawCustom=function(t,e,r){var n=r,i=n.vertexArr,o=n.faceArr;0!==i.length&&0!==o.length||console.warn("Error adding custom shape component: No vertices and/or face indices supplied!");var s=r.color;void 0===s&&(s=t.color),s=a.CC.color(s);for(var l=f(n),c=0,u=l.length;c{"use strict";r.r(e),r.d(e,{GLViewer:()=>m,createStereoViewer:()=>b,createViewer:()=>g,createViewerGrid:()=>v});var n=r("./src/WebGL/index.ts"),i=r("./src/WebGL/math/index.ts"),o=r("./src/colors.ts"),a=r("./src/utilities.ts"),s=r("./src/Gradient.ts"),l=r("./src/GLModel.ts"),c=r("./src/Label.ts"),u=r("./src/GLShape.ts"),h=r("./src/VolumeData.ts"),d=r("./src/ProteinSurface4.ts"),f=r("./src/VolumetricRender.ts"),p=r("./node_modules/upng-js/UPNG.js");class m{getWidth(){let t=this.container,e=t.offsetWidth;if(0==e&&"none"===t.style.display){let r=t.style.position,n=t.style.visibility;t.style.display="block",t.style.visibility="hidden",t.style.position="absolute",e=t.offsetWidth,t.style.display="none",t.style.visibility=n,t.style.position=r}return e}getHeight(){let t=this.container,e=t.offsetHeight;if(0==e&&"none"===t.style.display){let r=t.style.position,n=t.style.visibility;t.style.display="block",t.style.visibility="hidden",t.style.position="absolute",e=t.offsetHeight,t.style.display="none",t.style.visibility=n,t.style.position=r}return e}setupRenderer(){this.renderer=new n.Renderer({antialias:this.config.antialias,preserveDrawingBuffer:!0,premultipliedAlpha:!1,id:this.config.id,row:this.config.row,col:this.config.col,rows:this.config.rows,cols:this.config.cols,canvas:this.config.canvas,containerWidth:this.WIDTH,containerHeight:this.HEIGHT}),this.renderer.domElement.style.width="100%",this.renderer.domElement.style.height="100%",this.renderer.domElement.style.padding="0",this.renderer.domElement.style.position="absolute",this.renderer.domElement.style.top="0px",this.renderer.domElement.style.left="0px",this.renderer.domElement.style.zIndex="0"}initializeScene(){this.scene=new n.Scene,this.scene.fog=new n.Fog(this.bgColor,100,200),this.modelGroup=new n.Object3D,this.rotationGroup=new n.Object3D,this.rotationGroup.useQuaternion=!0,this.rotationGroup.quaternion=new i.Quaternion(0,0,0,1),this.rotationGroup.add(this.modelGroup),this.scene.add(this.rotationGroup);var t=new n.Light(16777215);t.position=new i.Vector3(.2,.2,1).normalize(),t.intensity=1,this.scene.add(t)}initContainer(t){this.container=t,this.WIDTH=this.getWidth(),this.HEIGHT=this.getHeight(),this.ASPECT=this.renderer.getAspect(this.WIDTH,this.HEIGHT),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.container.append(this.renderer.domElement),this.glDOM=this.renderer.domElement,this.nomouse||(this.glDOM.addEventListener("mousedown",this._handleMouseDown.bind(this),{passive:!1}),this.glDOM.addEventListener("touchstart",this._handleMouseDown.bind(this),{passive:!1}),this.glDOM.addEventListener("wheel",this._handleMouseScroll.bind(this),{passive:!1}),this.glDOM.addEventListener("mousemove",this._handleMouseMove.bind(this),{passive:!1}),this.glDOM.addEventListener("touchmove",this._handleMouseMove.bind(this),{passive:!1}),this.glDOM.addEventListener("contextmenu",this._handleContextMenu.bind(this),{passive:!1}))}decAnim(){this.animated--,this.animated<0&&(this.animated=0)}incAnim(){this.animated++}nextSurfID(){var t=0;for(let r in this.surfaces)if(this.surfaces.hasOwnProperty(r)){var e=parseInt(r);isNaN(e)||e>t&&(t=e)}return t+1}setSlabAndFog(){let t=this.camera.position.z-this.rotationGroup.position.z;t<1&&(t=1),this.camera.near=t+this.slabNear,this.camera.near<1&&(this.camera.near=1),this.camera.far=t+this.slabFar,this.camera.near+1>this.camera.far&&(this.camera.far=this.camera.near+1),this.camera.fov=this.fov,this.camera.right=t*Math.tan(Math.PI/180*this.fov),this.camera.left=-this.camera.right,this.camera.top=this.camera.right/this.ASPECT,this.camera.bottom=-this.camera.top,this.camera.updateProjectionMatrix(),this.scene.fog.near=this.camera.near+this.fogStart*(this.camera.far-this.camera.near),this.scene.fog.far=this.camera.far,this.config.disableFog&&(this.scene.fog.near=this.scene.fog.far)}show(t){if(this.renderer.setViewport(),this.scene&&(this.setSlabAndFog(),this.renderer.render(this.scene,this.camera),this.viewChangeCallback&&this.viewChangeCallback(this._viewer.getView()),!t&&this.linkedViewers.length>0))for(var e=this._viewer.getView(),r=0;r0){let e=this.CAMERA_Z-this.config.lowerZoomLimit;t>e&&(t=e)}if(this.config.upperZoomLimit&&this.config.upperZoomLimit>0){let e=this.CAMERA_Z-this.config.upperZoomLimit;tthis.CAMERA_Z-1&&(t=this.CAMERA_Z-1),t}static slerp(t,e,r){if(1==r)return e.clone();if(0==r)return t.clone();let n=t.x*e.x+t.y*e.y+t.z*e.z+t.w*e.w;if(n>.9995){let n=new i.Quaternion(t.x+r*(e.x-t.x),t.y+r*(e.y-t.y),t.z+r*(e.z-t.z),t.w+r*(e.w-t.w));return n.normalize(),n}n<0&&(e=e.clone().multiplyScalar(-1),n=-n),n>1?n=1:n<-1&&(n=-1);var o=Math.acos(n)*r,a=e.clone();a.sub(t.clone().multiplyScalar(n)),a.normalize();var s=Math.cos(o),l=Math.sin(o),c=new i.Quaternion(t.x*s+a.x*l,t.y*s+a.y*l,t.z*s+a.z*l,t.w*s+a.w*l);return c.normalize(),c}constructor(t,e={}){if(this.nomouse=!1,this.glDOM=null,this.models=[],this.surfaces={},this.shapes=[],this.labels=[],this.clickables=[],this.hoverables=[],this.contextMenuEnabledObjects=[],this.current_hover=null,this.hoverDuration=500,this.longTouchDuration=1e3,this.viewer_frame=0,this.viewChangeCallback=null,this.stateChangeCallback=null,this.NEAR=1,this.FAR=800,this.CAMERA_Z=150,this.fov=20,this.linkedViewers=[],this.renderer=null,this.control_all=!1,this.scene=null,this.rotationGroup=null,this.modelGroup=null,this.fogStart=.4,this.slabNear=-50,this.slabFar=50,this.cq=new i.Quaternion(0,0,0,1),this.dq=new i.Quaternion(0,0,0,1),this.animated=0,this.animationTimers=new Set,this.isDragging=!1,this.mouseStartX=0,this.mouseStartY=0,this.touchDistanceStart=0,this.touchHold=!1,this.currentModelPos=0,this.cz=0,this.cslabNear=0,this.cslabFar=0,this.userContextMenuHandler=null,this.config=e,this.callback=this.config.callback,this.defaultcolors=this.config.defaultcolors,this.defaultcolors||(this.defaultcolors=o.elementColors.defaultColors),this.nomouse=this.config.nomouse,this.bgColor=0,this.config.backgroundColor=this.config.backgroundColor||"#ffffff",void 0!==this.config.backgroundColor&&(this.bgColor=o.CC.color(this.config.backgroundColor).getHex()),this.config.backgroundAlpha=null==this.config.backgroundAlpha?1:this.config.backgroundAlpha,this.camerax=0,void 0!==this.config.camerax&&(this.camerax=parseFloat(this.config.camerax)),this._viewer=this,this.container=t,null!=this.config.hoverDuration&&(this.hoverDuration=this.config.hoverDuration),void 0===this.config.antialias&&(this.config.antialias=!0),void 0===this.config.cartoonQuality&&(this.config.cartoonQuality=10),this.WIDTH=this.getWidth(),this.HEIGHT=this.getHeight(),this.setupRenderer(),this.row=null==this.config.row?0:this.config.row,this.col=null==this.config.col?0:this.config.col,this.cols=this.config.cols,this.rows=this.config.rows,this.viewers=this.config.viewers,this.control_all=this.config.control_all,this.ASPECT=this.renderer.getAspect(this.WIDTH,this.HEIGHT),this.camera=new n.Camera(this.fov,this.ASPECT,this.NEAR,this.FAR,this.config.orthographic),this.camera.position=new i.Vector3(this.camerax,0,this.CAMERA_Z),this.lookingAt=new i.Vector3,this.camera.lookAt(this.lookingAt),this.raycaster=new n.Raycaster(new i.Vector3(0,0,0),new i.Vector3(0,0,0)),this.projector=new n.Projector,this.initializeScene(),this.renderer.setClearColorHex(this.bgColor,this.config.backgroundAlpha),this.scene.fog.color=o.CC.color(this.bgColor),document.body.addEventListener("mouseup",this._handleMouseUp.bind(this)),document.body.addEventListener("touchend",this._handleMouseUp.bind(this)),this.initContainer(this.container),this.config.style&&this.setViewStyle(this.config),window.addEventListener("resize",this.resize.bind(this)),void 0!==window.ResizeObserver&&(this.divwatcher=new window.ResizeObserver(this.resize.bind(this)),this.divwatcher.observe(this.container)),void 0!==window.IntersectionObserver){let t=(t,e)=>{t.forEach((t=>{t.isIntersecting&&this.resize()}))};this.intwatcher=new window.IntersectionObserver(t),this.intwatcher.observe(this.container)}try{"function"==typeof this.callback&&this.callback(this)}catch(t){console.log("error with glviewer callback: "+t)}}targetedObjects(t,e,r){var n={x:t,y:e,z:-1};return Array.isArray(r)||(r=this.selectedAtoms(r)),0==r.length?[]:(this.raycaster.setFromCamera(n,this.camera),this.raycaster.intersectObjects(this.modelGroup,r))}modelToScreen(t){let e=!1;Array.isArray(t)||(t=[t],e=!0);let r=this.renderer.getXRatio(),n=this.renderer.getYRatio(),o=this.col,a=this.row,s=o*(this.WIDTH/r),l=(n-a-1)*(this.HEIGHT/n),c=[],u=this.canvasOffset();return t.forEach((t=>{let e=new i.Vector3(t.x,t.y,t.z);e.applyMatrix4(this.modelGroup.matrixWorld),this.projector.projectVector(e,this.camera);let o=this.WIDTH/r*(e.x+1)/2+u.left+s,a=-this.HEIGHT/n*(e.y-1)/2+u.top+l;c.push({x:o,y:a})})),e&&(c=c[0]),c}screenOffsetToModel(t,e,r){var n=t/this.WIDTH,o=e/this.HEIGHT,a=void 0===r?this.rotationGroup.position.z:r,s=this.rotationGroup.quaternion,l=new i.Vector3(0,0,a);return this.projector.projectVector(l,this.camera),l.x+=2*n,l.y-=2*o,this.projector.unprojectVector(l,this.camera),l.z=0,l.applyQuaternion(s),l}screenToModelDistance(t,e){let r=this.canvasOffset(),n=new i.Vector3(e.x,e.y,e.z);n.applyMatrix4(this.modelGroup.matrixWorld);let o=n.clone();this.projector.projectVector(n,this.camera);let a=new i.Vector3(2*(t.x-r.left)/this.WIDTH-1,2*(t.y-r.top)/-this.HEIGHT+1,n.z);return this.projector.unprojectVector(a,this.camera),a.distanceTo(o)}setViewChangeCallback(t){"function"!=typeof t&&null!=t||(this.viewChangeCallback=t)}setStateChangeCallback(t){"function"!=typeof t&&null!=t||(this.stateChangeCallback=t)}getConfig(){return this.config}setConfig(t){this.config=t}getInternalState(){var t={models:[],surfaces:[],shapes:[],labels:[]};for(let e=0;e{e.getCanvas().toBlob((function(e){e.arrayBuffer().then(t)}),"image/png")}))),n+=1,n==t&&(e.viewChangeCallback=i,Promise.all(o).then((t=>{let n=[];for(let e=0;e0&&(this.hoverTimeout=setTimeout((function(){a.handleHoverSelection(o.x,o.y,t)}),this.hoverDuration)),this.isDragging)){t.targetTouches&&(t.targetTouches.length>1||1===t.targetTouches.length&&!this.closeEnoughForClick(t))&&clearTimeout(this.longTouchTimeout);var l=(e-this.mouseStartX)/this.WIDTH,c=(r-this.mouseStartY)/this.HEIGHT;0!=this.touchDistanceStart&&t.targetTouches&&2==t.targetTouches.length?(s=2,c=2*(this.calcTouchDistance(t)-this.touchDistanceStart)/(this.WIDTH+this.HEIGHT)):t.targetTouches&&3==t.targetTouches.length&&(s=1),l*=n,c*=i;var u,h=Math.hypot(l,c);if(3==s||3==this.mouseButton&&t.ctrlKey)this.slabNear=this.cslabNear+100*l,this.slabFar=this.cslabFar-100*c;else if(2==s||3==this.mouseButton||t.shiftKey)(u=.85*(this.CAMERA_Z-this.rotationGroup.position.z))<80&&(u=80),this.rotationGroup.position.z=this.cz+c*u,this.rotationGroup.position.z=this.adjustZoomToLimits(this.rotationGroup.position.z);else if(1==s||2==this.mouseButton||t.ctrlKey){var d=this.screenOffsetToModel(n*(e-this.mouseStartX),i*(r-this.mouseStartY));this.modelGroup.position.addVectors(this.currentModelPos,d)}else if((0===s||1==this.mouseButton)&&0!==h){var f=Math.sin(h*Math.PI)/h;this.dq.x=Math.cos(h*Math.PI),this.dq.y=0,this.dq.z=f*l,this.dq.w=-f*c,this.rotationGroup.quaternion.set(1,0,0,0),this.rotationGroup.quaternion.multiply(this.dq),this.rotationGroup.quaternion.multiply(this.cq)}this.show()}}_handleContextMenu(t){if(t.preventDefault(),this.closeEnoughForClick(t)){var e=this.mouseStartX,r=this.mouseStartY,n=this.canvasOffset();let o=this.mouseXY(e,r),a=o.x,s=o.y,l=this.targetedObjects(a,s,this.contextMenuEnabledObjects);var i=null;l.length&&(i=l[0].clickable),n=this.canvasOffset(),e=this.mouseStartX-n.left,r=this.mouseStartY-n.top,this.userContextMenuHandler&&(this.userContextMenuHandler(i,e,r,l,t),this.isDragging=!1)}}setContainer(t){let e=(0,a.getElement)(t)||this.container;return this.initContainer(e),this}setBackgroundColor(t,e){(void 0===e||e<0||e>1)&&(e=1);var r=o.CC.color(t);return this.scene.fog.color=r,this.bgColor=r.getHex(),this.renderer.setClearColorHex(r.getHex(),e),this.show(),this}setProjection(t){this.camera.ortho="orthographic"===t,this.setSlabAndFog()}setViewStyle(t){if("outline"===t.style){var e={};t.color&&(e.color=o.CC.color(t.color)),t.width&&(e.width=t.width),this.renderer.enableOutline(e)}else this.renderer.disableOutline();return this}updateSize(){this.renderer.setSize(this.WIDTH,this.HEIGHT),this.ASPECT=this.renderer.getAspect(this.WIDTH,this.HEIGHT),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.camera.aspect=this.ASPECT,this.camera.updateProjectionMatrix()}setWidth(t){return this.WIDTH=t||this.WIDTH,this.updateSize(),this}setHeight(t){return this.HEIGHT=t||this.HEIGHT,this.updateSize(),this}resize(){this.WIDTH=this.getWidth(),this.HEIGHT=this.getHeight();let t=!1;if(console.log("resize "+this.container.id),console.log("lost "+this.renderer.isLost()+" w"+this.WIDTH+" h"+this.HEIGHT),this.renderer.isLost()&&this.WIDTH>0&&this.HEIGHT>0){let e=!1,r=this.container.querySelector("canvas");r&&r!=this.renderer.getCanvas()?this.config.canvas=r:(r.remove(),this.config&&null!=this.config.canvas&&(delete this.config.canvas,e=!0)),this.setupRenderer(),this.initContainer(this.container),this.renderer.setClearColorHex(this.bgColor,this.config.backgroundAlpha),t=!0,e&&(this.config.canvas=this.renderer.getCanvas()),console.log("regen "+t+" resetcanvas "+e)}if(0==this.WIDTH||0==this.HEIGHT?this.animated&&this._viewer.pauseAnimate():this.animated&&this._viewer.resumeAnimate(),this.updateSize(),t){let t=this.renderer.supportedExtensions();if(t.regen=!0,this.viewers)for(let e=0,r=this.viewers.length;e=0&&(this.modelGroup.remove(this.labels[r].sprite),(this.viewer_frame<0||this.labels[r].frame==this.viewer_frame)&&this.modelGroup.add(this.labels[r].sprite));for(r in this.surfaces)if(this.surfaces.hasOwnProperty(r)){var a=this.surfaces[r];for(i=0;i1||1==a[i].symmetries.length&&!a[i].symmetries[i].isIdentity()){var c,u=new n.Object3D;for(c=0;c0?this.animateMotion(e,r,this.modelGroup.position,this.adjustZoomToLimits(i),this.rotationGroup.quaternion,this.lookingAt):(this.rotationGroup.position.z=this.adjustZoomToLimits(i),this.show()),this}translate(t,e,r=0,n=!1){var o=t/this.WIDTH,a=e/this.HEIGHT,s=new i.Vector3(0,0,-this.CAMERA_Z);this.projector.projectVector(s,this.camera),s.x-=o,s.y-=a,this.projector.unprojectVector(s,this.camera),s.z=0;var l=this.lookingAt.clone().add(s);return r>0?this.animateMotion(r,n,this.modelGroup.position,this.rotationGroup.position.z,this.rotationGroup.quaternion,l):(this.lookingAt=l,this.camera.lookAt(this.lookingAt),this.show()),this}translateScene(t,e,r=0,n=!1){var i=this.screenOffsetToModel(t,e),o=this.modelGroup.position.clone().add(i);return r>0?this.animateMotion(r,n,this.modelGroup.position,this.rotationGroup.position.z,this.rotationGroup.quaternion,this.lookingAt):(this.modelGroup.position=o,this.show()),this}fitSlab(t){t=t||{};var e=this.getAtomsFromSel(t),r=(0,a.getExtent)(e),n=r[1][0]-r[0][0],i=r[1][1]-r[0][1],o=r[1][2]-r[0][2],s=Math.hypot(n,i,o);return s<5&&(s=5),this.slabNear=-s/1.9,this.slabFar=s/2,this}center(t={},e=0,r=!1){var n,o,s=this.getAtomsFromSel(t),l=(0,a.getExtent)(s);(0,a.isEmptyObject)(t)?(this.shapes.forEach((t=>{if(t&&t.boundingSphere&&t.boundingSphere.center){var e=t.boundingSphere.center,r=t.boundingSphere.radius;r>0?(s.push(new i.Vector3(e.x+r,e.y,e.z)),s.push(new i.Vector3(e.x-r,e.y,e.z)),s.push(new i.Vector3(e.x,e.y+r,e.z)),s.push(new i.Vector3(e.x,e.y-r,e.z)),s.push(new i.Vector3(e.x,e.y,e.z+r)),s.push(new i.Vector3(e.x,e.y,e.z-r))):s.push(e)}})),l=(0,a.getExtent)(s),n=s,o=l):(n=this.getAtomsFromSel({}),o=(0,a.getExtent)(n));var c=new i.Vector3(l[2][0],l[2][1],l[2][2]),u=o[1][0]-o[0][0],h=o[1][1]-o[0][1],d=o[1][2]-o[0][2],f=Math.hypot(u,h,d);f<5&&(f=5),this.slabNear=-f/1.9,this.slabFar=f/2,u=l[1][0]-l[0][0],h=l[1][1]-l[0][1],d=l[1][2]-l[0][2],(f=Math.hypot(u,h,d))<5&&(f=5);for(var p=25,m=0;mp&&(p=g)}f=2*Math.sqrt(p);var v=c.clone().multiplyScalar(-1);return e>0?this.animateMotion(e,r,v,this.rotationGroup.position.z,this.rotationGroup.quaternion,this.lookingAt):(this.modelGroup.position=v,this.show()),this}zoomTo(t={},e=0,r=!1){let n=this.getAtomsFromSel(t),o=(0,a.getExtent)(n),s=o;if((0,a.isEmptyObject)(t)){let t=n&&n.length;if(this.shapes.forEach((t=>{if(t&&t.boundingSphere)if(t.boundingSphere.box){let e=t.boundingSphere.box;n.push(new i.Vector3(e.min.x,e.min.y,e.min.z)),n.push(new i.Vector3(e.max.x,e.max.y,e.max.z))}else if(t.boundingSphere.center){var e=t.boundingSphere.center,r=t.boundingSphere.radius;r>0?(n.push(new i.Vector3(e.x+r,e.y,e.z)),n.push(new i.Vector3(e.x-r,e.y,e.z)),n.push(new i.Vector3(e.x,e.y+r,e.z)),n.push(new i.Vector3(e.x,e.y-r,e.z)),n.push(new i.Vector3(e.x,e.y,e.z+r)),n.push(new i.Vector3(e.x,e.y,e.z-r))):n.push(e)}})),s=(0,a.getExtent)(n),!t)for(let t=0;t<3;t++)o[2][t]=(s[0][t]+s[1][t])/2}else{let t=this.getAtomsFromSel({});s=(0,a.getExtent)(t)}var l=new i.Vector3(o[2][0],o[2][1],o[2][2]),c=s[1][0]-s[0][0],u=s[1][1]-s[0][1],h=s[1][2]-s[0][2],d=Math.hypot(c,u,h);d<5&&(d=5),this.slabNear=-d/1.9,this.slabFar=d/2,0===Object.keys(t).length&&(this.slabNear=Math.min(2*-d,-50),this.slabFar=Math.max(2*d,50));var f=this.config.minimumZoomToDistance||5;c=o[1][0]-o[0][0],u=o[1][1]-o[0][1],h=o[1][2]-o[0][2],(d=Math.hypot(c,u,h))p&&(p=g)}d=2*Math.sqrt(p);var v=l.clone().multiplyScalar(-1),b=-(.5*d/Math.tan(Math.PI/180*this.camera.fov/2)-this.CAMERA_Z);return b=this.adjustZoomToLimits(b),e>0?this.animateMotion(e,r,v,b,this.rotationGroup.quaternion,this.lookingAt):(this.modelGroup.position=v,this.rotationGroup.position.z=b,this.show()),this}setSlab(t,e){this.slabNear=t,this.slabFar=e}getSlab(){return{near:this.slabNear,far:this.slabFar}}addLabel(t,e={},r,n=!1){if(r){var i=(0,a.getExtent)(this.getAtomsFromSel(r));e.position={x:i[2][0],y:i[2][1],z:i[2][2]}}var o=new c.Label(t,e);return o.setContext(),this.modelGroup.add(o.sprite),this.labels.push(o),n||this.show(),o}addResLabels(t,e,r=!1){let n=this.labels.length;return this.applyToModels("addResLabels",t,this,e,r),this.show(),this.labels.slice(n)}addPropertyLabels(t,e,r){return this.applyToModels("addPropertyLabels",t,e,this,r),this.show(),this}removeLabel(t){for(var e=0;e0&&void 0===this.shapes[this.shapes.length-1];)this.shapes.pop();return this}removeAllShapes(){for(var t=0;t-1e-4&&o.x<1.0001&&o.y>-1e-4&&o.y<1.0001&&o.z>-1e-4&&o.z<1.0001)}}for(let o=0;oo){t.start=r,t.end=n,e.addLine(t);break}h.addVectors(r,c),t.start=r,t.end=h,e.addLine(t),r=h.clone(),d+=a,h.addVectors(r,u),r=h.clone(),d+=s}return e.finalize(),e}addCustom(t){t=t||{};var e=new u.GLShape(t);return e.shapePosition=this.shapes.length,e.addCustom(t),this.shapes.push(e),e.finalize(),e}addVolumetricData(t,e,r={}){var n=new h.VolumeData(t,e);return r.hasOwnProperty("transferfn")?this.addVolumetricRender(n,r):this.addIsosurface(n,r)}addIsosurface(t,e={},r){var n=new u.GLShape(e);return n.shapePosition=this.shapes.length,n.addIsosurface(t,e,r,this),this.shapes.push(n),n}addVolumetricRender(t,e){e=e||{};var r=new f.GLVolumetricRender(t,e,this);return r.shapePosition=this.shapes.length,this.shapes.push(r),r}hasVolumetricRender(){return this.renderer.supportsVolumetric()}enableFog(t){t?this.scene.fog=new n.Fog(this.bgColor,100,200):(this.config.disableFog=!0,this.show())}setFrame(t){this.viewer_frame=t;let e=this;return new Promise((function(r){var n=e.models.map((function(r){return r.setFrame(t,e)}));Promise.all(n).then((function(){r()}))}))}getFrame(){return this.viewer_frame}getNumFrames(){var t=0;for(let e=0;et&&(t=this.models[e].getNumFrames());for(let e=0;e=t&&(t=this.shapes[e].frame+1);for(let e=0;e=t&&(t=this.labels[e].frame+1);return t}animate(t){this.incAnim();var e=100,r="forward",n=1/0;(t=t||{}).interval&&(e=t.interval),t.loop&&(r=t.loop),t.reps&&(n=t.reps);var i=this.getNumFrames(),o=this,s=0;t.startFrame&&(s=t.startFrame%i);var l=1;t.step&&(n/=l=t.step);var c,u,h=0,d=i*n,f=new Date,p=function(t){f=new Date,"forward"==t?o.setFrame(s).then((function(){s=(s+l)%i,c()})):"backward"==t?o.setFrame(i-1-s).then((function(){s=(s+l)%i,c()})):o.setFrame(s).then((function(){l*=(s+=l)%(i-1)==0?-1:1,c()}))};return c=function(){if(o.render(),o.getCanvas().isConnected)if(++h>=d||!o.isAnimated())u.cancel(),o.animationTimers.delete(u),o.decAnim();else{var t=e-((new Date).getTime()-f.getTime());t=t>0?t:0,o.animationTimers.delete(u),u=new a.PausableTimer(p,t,r),o.animationTimers.add(u)}else o.stopAnimate()},u=new a.PausableTimer(p,0,r),this.animationTimers.add(u),this}stopAnimate(){return this.animated=0,this.animationTimers.forEach((function(t){t.cancel()})),this.animationTimers=new Set,this}pauseAnimate(){return this.animationTimers.forEach((function(t){t.pause()})),this}resumeAnimate(){return this.animationTimers.forEach((function(t){t.resume()})),this}isAnimated(){return this.animated>0}getModelOpt(t){return t&&!t.defaultcolors?(t.defaultcolors=this.defaultcolors,t.cartoonQuality=t.cartoonQuality||this.config.cartoonQuality):void 0===t&&(t={defaultcolors:this.defaultcolors,cartoonQuality:this.config.cartoonQuality}),t}addModel(t,e="",r){r=this.getModelOpt(r);var n=new l.GLModel(this.models.length,r);return n.addMolData(t,e,r),this.models.push(n),n}addModels(t,e,r){(r=this.getModelOpt(r)).multimodel=!0,r.frames=!0;for(var n=l.GLModel.parseMolData(t,e,r),i=0;i0&&void 0===this.models[this.models.length-1];)this.models.pop();return this}}removeAllModels(){for(var t=0;te[1][0]||n.ye[1][1]||n.ze[1][2]||r.push(n))}return r}static volume(t){return(t[1][0]-t[0][0])*(t[1][1]-t[0][1])*(t[1][2]-t[0][2])}carveUpExtent(t,e,r){let n=[],i={};for(let t=0,r=e.length;tn&&r>i?0:n>r&&n>i?1:2;var o=a(t),l=a(t),c=(t[1][e]-t[0][e])/2+t[0][e];o[1][e]=c,l[0][e]=c;var u=s(o),h=s(l);return u.concat(h)},l=s(t);for(let t=0,i=l.length;t0)for(let t=0,e=h.length;t1||1==w.length&&!w[0].isIdentity()){_=!0;break}}var k=function(t,r,n){var i;b=l?m.shallowCopy(p.getAtomsFromSel(l)):n;var o=(0,a.getExtent)(n,!0);if(e.map&&e.map.prop){var c=e.map.prop;let t=(0,s.getGradient)(e.map.scheme||e.map.gradient||new s.Gradient.RWB),r=t.range();r||(r=(0,a.getPropertyRange)(n,c)),e.colorscheme={prop:c,gradient:t}}for(let t=0,n=r.length;t0){var x=(0,a.getExtent)(b,!0);y.sort((function(t,e){var r=function(t,e){var r=t.extent,n=r[1][0]-r[0][0],i=r[1][1]-r[0][1],o=r[1][2]-r[0][2],a=n-e[2][0];a*=a;var s=i-e[2][1];s*=s;var l=o-e[2][2];return a+s+l*l};return r(t,x)-r(e,x)}))}var _=[];for(let t=0,e=r.length;t0&&(A.push({geo:new n.Geometry(!0),mat:f,done:!1,finished:!1,symmetries:this.models[x].getSymmetries()}),C.push(k(A[A.length-1],T[x],S[x])));M=Promise.all(C)}else A.push({geo:new n.Geometry(!0),mat:f,done:!1,finished:!1,symmetries:[new i.Matrix4]}),M=k(A[A.length-1],v,y);return this.surfaces[h]=A,M.surfid=h,c&&"function"==typeof c?(M.then((function(t){c(t)})),h):M}setSurfaceMaterialStyle(t,e){if((0,a.adjustVolumeStyle)(e),this.surfaces[t]){var r=this.surfaces[t];r.style=e;for(var i=0;i0?this.camera.position.x=r*Math.tan(Math.PI/180*e):this.camera.position.x=-r*Math.tan(Math.PI/180*e),this.camera.lookAt(new i.Vector3(0,0,this.rotationGroup.position.z)),this.camera.position.x}setDefaultCartoonQuality(t){this.config.cartoonQuality=t}}function g(t,e){if(t=(0,a.getElement)(t)){e=e||{};try{return new m(t,e)}catch(t){throw"error creating viewer: "+t}}}function v(t,e={},r={}){if(t=(0,a.getElement)(t)){var n=[],i=document.createElement("canvas");r.rows=e.rows,r.cols=e.cols,r.control_all=null!=e.control_all&&e.control_all,t.appendChild(i);try{for(var o=0;o{"use strict";r.r(e),r.d(e,{CustomLinear:()=>u,Gradient:()=>d,GradientType:()=>i,ROYGB:()=>l,RWB:()=>s,Sinebow:()=>c,builtinGradients:()=>h,getGradient:()=>a,normalizeValue:()=>o});var n=r("./src/colors.ts");class i{}function o(t,e,r){return e>=t?(re&&(r=e),{lo:t,hi:e,val:r}):(r>t&&(r=t),r=2?(this.max=t[1],this.min=t[0]):t&&e&&!Array.isArray(t)&&(this.min=t,this.max=e)}range(){return void 0!==this.min&&void 0!==this.max?[this.min,this.max]:null}valueToHex(t,e){var r,n;if(t=this.mult*t,e?(r=e[0],n=e[1]):(r=this.min,n=this.max),void 0===t)return 16777215;var i=o(r,n,t);r=i.lo;var a,s=n=i.hi;return(t=i.val)<(s=e&&void 0!==e[2]?e[2]:void 0!==this.mid?this.mid:(r+n)/2)?16711680+256*(a=Math.floor(255*Math.sqrt((t-r)/(s-r))))+a:t>s?65536*(a=Math.floor(255*Math.sqrt(1-(t-s)/(n-s))))+256*a+255:16777215}}class l extends i{constructor(t,e){super(),this.gradient="ROYGB",this.mult=1,this.min=t,this.max=e,void 0===e&&Array.isArray(t)&&t.length>=2?(this.max=t[1],this.min=t[0]):t&&e&&!Array.isArray(t)&&(this.min=t,this.max=e)}valueToHex(t,e){var r,n;if(t=this.mult*t,e?(r=e[0],n=e[1]):(r=this.min,n=this.max),void 0===t)return 16777215;var i=o(r,n,t),a=((r=i.lo)+(n=i.hi))/2,s=(r+a)/2,l=(a+n)/2;return(t=i.val)=2&&(this.max=t[1],this.min=t[0]),e=2?(this.max=t[1],this.min=t[0],i=e):(this.min=t,this.max=e,i=r),i)for(let t of i)this.colors.push(n.CC.color(t));else this.colors.push(n.CC.color(0))}range(){return void 0!==this.min&&void 0!==this.max?[this.min,this.max]:null}valueToHex(t,e){var r,i;if(e?(r=e[0],i=e[1]):(r=this.min,i=this.max),void 0===t)return 16777215;var a=o(r,i,t);r=a.lo,i=a.hi,t=a.val;let s=this.colors.length,l=(i-r)/s,c=Math.min(Math.floor((t-r)/l),s-1),u=Math.min(c+1,s-1),h=(t-r-c*l)/l,d=this.colors[c],f=this.colors[u];return new n.Color(d.r+h*(f.r-d.r),d.g+h*(f.g-d.g),d.b+h*(f.b-d.b)).getHex()}}const h={rwb:s,RWB:s,roygb:l,ROYGB:l,sinebow:c,linear:u};class d extends i{valueToHex(t,e){return 0}range(){return null}}d.RWB=s,d.ROYGB=l,d.Sinebow=c,d.CustomLinear=u,d.builtinGradients=h,d.normalizeValue=o,d.getGradient=a},"./src/Label.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Label:()=>l,LabelCount:()=>a});var n=r("./src/WebGL/index.ts"),i=r("./src/Gradient.ts"),o=r("./src/colors.ts");let a=0;function s(t,e,r){var n=r;return void 0!==t&&(t instanceof o.Color?n=t.scaled():void 0!==(n=o.CC.color(t)).scaled&&(n=n.scaled())),void 0!==e&&(n.a=parseFloat(e)),n}class l{constructor(t,e){this.id=a++,this.stylespec=e||{},this.canvas=document.createElement("canvas"),this.canvas.width=134,this.canvas.height=35,this.context=this.canvas.getContext("2d"),this.sprite=new n.Sprite,this.text=t,this.frame=this.stylespec.frame}getStyle(){return this.stylespec}setContext(){var t=this.stylespec,e=void 0!==t.useScreen&&t.useScreen,r=t.showBackground;"0"!==r&&"false"!==r||(r=!1),void 0===r&&(r=!0);var o=t.font?t.font:"sans-serif",a=parseInt(t.fontSize)?parseInt(t.fontSize):18,l=s(t.fontColor,t.fontOpacity,{r:255,g:255,b:255,a:1}),c=t.padding?t.padding:4,u=t.borderThickness?t.borderThickness:0,h=s(t.backgroundColor,t.backgroundOpacity,{r:0,g:0,b:0,a:1}),d=s(t.borderColor,t.borderOpacity,h),f=t.position?t.position:{x:-10,y:1,z:1},p=void 0===t.inFront||t.inFront;"false"!==p&&"0"!==p||(p=!1);var m=t.alignment||n.SpriteAlignment.topLeft;"string"==typeof m&&m in n.SpriteAlignment&&(m=n.SpriteAlignment[m]);var g="";t.bold&&(g="bold "),this.context.font=g+a+"px "+o;var v=this.context.measureText(this.text).width;r||(u=0);var b=v+2.5*u+2*c,y=1.25*a+2*u+2*c;if(t.backgroundImage){var x=t.backgroundImage,_=t.backgroundWidth?t.backgroundWidth:x.width,w=t.backgroundHeight?t.backgroundHeight:x.height;_>b&&(b=_),w>y&&(y=w)}if(this.canvas.width=b,this.canvas.height=y,this.context.clearRect(0,0,this.canvas.width,this.canvas.height),g="",t.bold&&(g="bold "),this.context.font=g+a+"px "+o,this.context.fillStyle="rgba("+h.r+","+h.g+","+h.b+","+h.a+")",this.context.strokeStyle="rgba("+d.r+","+d.g+","+d.b+","+d.a+")",t.backgroundGradient){let e=this.context.createLinearGradient(0,y/2,b,y/2),r=i.Gradient.getGradient(t.backgroundGradient),n=r.range(),o=-1,a=1;n&&(o=n[0],a=n[1]);let l=a-o;for(let t=0;t<1.01;t+=.1){let n=s(r.valueToHex(o+l*t)),i="rgba("+n.r+","+n.g+","+n.b+","+n.a+")";e.addColorStop(t,i)}this.context.fillStyle=e}this.context.lineWidth=u,r&&function(t,e,r,n,i,o,a){t.beginPath(),t.moveTo(e+6,r),t.lineTo(e+n-6,r),t.quadraticCurveTo(e+n,r,e+n,r+6),t.lineTo(e+n,r+i-6),t.quadraticCurveTo(e+n,r+i,e+n-6,r+i),t.lineTo(e+6,r+i),t.quadraticCurveTo(e,r+i,e,r+i-6),t.lineTo(e,r+6),t.quadraticCurveTo(e,r,e+6,r),t.closePath(),t.fill(),a&&t.stroke()}(this.context,u,u,b-2*u,y-2*u,0,u>0),t.backgroundImage&&this.context.drawImage(x,0,0,b,y),this.context.fillStyle="rgba("+l.r+","+l.g+","+l.b+","+l.a+")",this.context.fillText(this.text,u+c,a+u+c,v);var k=new n.Texture(this.canvas);k.needsUpdate=!0,this.sprite.material=new n.SpriteMaterial({map:k,useScreenCoordinates:e,alignment:m,depthTest:!p,screenOffset:t.screenOffset||null}),this.sprite.scale.set(1,1,1),this.sprite.position.set(f.x,f.y,f.z)}dispose(){void 0!==this.sprite.material.map&&this.sprite.material.map.dispose(),void 0!==this.sprite.material&&this.sprite.material.dispose()}}},"./src/ProteinSurface4.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{MarchingCube:()=>l,MarchingCubeInitializer:()=>s,PointGrid:()=>c,ProteinSurface:()=>u,SurfaceType:()=>n,setSyncSurface:()=>a,syncSurface:()=>o});var n,i=r("./src/WebGL/math/index.ts");!function(t){t[t.VDW=1]="VDW",t[t.MS=2]="MS",t[t.SAS=3]="SAS",t[t.SES=4]="SES"}(n||(n={}));var o=!1;function a(t){o=t}(window.navigator.userAgent.indexOf("MSIE ")>=0||window.navigator.userAgent.indexOf("Trident/")>=0)&&(o=!0);class s{constructor(){this.ISDONE=2,this.edgeTable=new Uint32Array([0,0,0,0,0,0,0,2816,0,0,0,1792,0,3328,3584,3840,0,0,0,138,0,21,0,134,0,0,0,652,0,2067,3865,3600,0,0,0,42,0,0,0,294,0,0,21,28,0,3875,1049,3360,0,168,162,170,0,645,2475,2210,0,687,293,172,4010,3747,3497,3232,0,0,0,0,0,69,0,900,0,0,0,1792,138,131,1608,1920,0,81,0,2074,84,85,84,86,0,81,0,3676,330,1105,1881,1616,0,0,0,42,0,69,0,502,0,0,21,3580,138,2035,1273,1520,2816,104,2337,106,840,581,367,102,2816,3695,3429,3180,1898,1635,1385,1120,0,0,0,0,0,0,0,3910,0,0,69,588,42,2083,41,2880,0,0,0,1722,0,2293,4095,3830,0,255,757,764,2538,2291,3065,2800,0,0,81,338,0,3925,1119,3414,84,855,85,340,2130,2899,89,2384,1792,712,194,1162,4036,3781,3535,3270,708,719,197,204,3018,2755,2505,2240,0,0,0,0,168,420,168,1958,162,162,676,2988,170,163,680,928,3328,3096,3328,3642,52,53,1855,1590,2340,2111,2869,2620,298,51,825,560,3584,3584,3090,3482,1668,1941,1183,1430,146,2975,2069,2460,154,915,153,400,3840,3592,3329,3082,1796,1541,1295,1030,2818,2575,2309,2060,778,515,265,0]),this.triTable=[[],[],[],[],[],[],[],[11,9,8],[],[],[],[8,10,9],[],[10,8,11],[9,11,10],[8,10,9,8,11,10],[],[],[],[1,7,3],[],[4,2,0],[],[2,1,7],[],[],[],[2,7,3,2,9,7],[],[1,4,11,1,0,4],[3,8,0,11,9,4,11,10,9],[4,11,9,11,10,9],[],[],[],[5,3,1],[],[],[],[2,5,8,2,1,5],[],[],[2,4,0],[3,2,4],[],[0,9,1,8,10,5,8,11,10],[3,4,0,3,10,4],[5,8,10,8,11,10],[],[3,5,7],[7,1,5],[1,7,3,1,5,7],[],[9,2,0,9,7,2],[0,3,8,1,7,11,1,5,7],[11,1,7,1,5,7],[],[9,1,0,5,3,2,5,7,3],[8,2,5,8,0,2],[2,5,3,5,7,3],[3,9,1,3,8,9,7,11,10,7,10,5],[9,1,0,10,7,11,10,5,7],[3,8,0,7,10,5,7,11,10],[11,5,7,11,10,5],[],[],[],[],[],[0,6,2],[],[7,2,9,7,9,8],[],[],[],[8,10,9],[7,1,3],[7,1,0],[6,9,3,6,10,9],[7,10,8,10,9,8],[],[6,0,4],[],[11,1,4,11,3,1],[2,4,6],[2,0,4,2,4,6],[2,4,6],[1,4,2,4,6,2],[],[6,0,4],[],[2,11,3,6,9,4,6,10,9],[8,6,1,8,1,3],[10,0,6,0,4,6],[8,0,3,9,6,10,9,4,6],[10,4,6,10,9,4],[],[],[],[5,3,1],[],[0,6,2],[],[7,4,8,5,2,1,5,6,2],[],[],[2,4,0],[7,4,8,2,11,3,10,5,6],[7,1,3],[5,6,10,0,9,1,8,7,4],[5,6,10,7,0,3,7,4,0],[10,5,6,4,8,7],[9,11,8],[3,5,6],[0,5,11,0,11,8],[6,3,5,3,1,5],[3,9,6,3,8,9],[9,6,0,6,2,0],[0,3,8,2,5,6,2,1,5],[1,6,2,1,5,6],[9,11,8],[1,0,9,6,10,5,11,3,2],[6,10,5,2,8,0,2,11,8],[3,2,11,10,5,6],[10,5,6,9,3,8,9,1,3],[0,9,1,5,6,10],[8,0,3,10,5,6],[10,5,6],[],[],[],[],[],[],[],[1,10,2,9,11,6,9,8,11],[],[],[6,0,2],[3,6,9,3,2,6],[3,5,1],[0,5,1,0,11,5],[0,3,5],[6,9,11,9,8,11],[],[],[],[4,5,9,7,1,10,7,3,1],[],[11,6,7,2,4,5,2,0,4],[11,6,7,8,0,3,1,10,2,9,4,5],[6,7,11,1,10,2,9,4,5],[],[4,1,0,4,5,1,6,7,3,6,3,2],[9,4,5,0,6,7,0,2,6],[4,5,9,6,3,2,6,7,3],[6,7,11,5,3,8,5,1,3],[6,7,11,4,1,0,4,5,1],[4,5,9,3,8,0,11,6,7],[9,4,5,7,11,6],[],[],[0,6,4],[8,6,4,8,1,6],[],[0,10,2,0,9,10,4,8,11,4,11,6],[10,2,1,6,0,3,6,4,0],[10,2,1,11,4,8,11,6,4],[4,2,6],[1,0,9,2,4,8,2,6,4],[2,4,0,2,6,4],[8,2,4,2,6,4],[11,4,1,11,6,4],[0,9,1,4,11,6,4,8,11],[3,6,0,6,4,0],[8,6,4,8,11,6],[10,8,9],[6,3,9,6,7,3],[6,7,1],[10,7,1,7,3,1],[7,11,6,8,10,2,8,9,10],[11,6,7,10,0,9,10,2,0],[2,1,10,7,11,6,8,0,3],[1,10,2,6,7,11],[7,2,6,7,9,2],[1,0,9,3,6,7,3,2,6],[7,0,6,0,2,6],[2,7,3,2,6,7],[7,11,6,3,9,1,3,8,9],[9,1,0,11,6,7],[0,3,8,11,6,7],[11,6,7],[],[],[],[],[5,3,7],[8,5,2,8,7,5],[5,3,7],[1,10,2,5,8,7,5,9,8],[1,7,5],[1,7,5],[9,2,7,9,7,5],[11,3,2,8,5,9,8,7,5],[1,3,7,1,7,5],[0,7,1,7,5,1],[9,3,5,3,7,5],[9,7,5,9,8,7],[8,10,11],[3,4,10,3,10,11],[8,10,11],[5,9,4,1,11,3,1,10,11],[2,4,5],[5,2,4,2,0,4],[0,3,8,5,9,4,10,2,1],[2,1,10,9,4,5],[2,8,5,2,11,8],[3,2,11,1,4,5,1,0,4],[9,4,5,8,2,11,8,0,2],[11,3,2,9,4,5],[8,5,3,5,1,3],[5,0,4,5,1,0],[3,8,0,4,5,9],[9,4,5],[11,9,10],[11,9,10],[1,11,4,1,10,11],[8,7,4,11,1,10,11,3,1],[2,7,9,2,9,10],[4,8,7,0,10,2,0,9,10],[2,1,10,0,7,4,0,3,7],[10,2,1,8,7,4],[1,7,4],[3,2,11,4,8,7,9,1,0],[11,4,2,4,0,2],[2,11,3,7,4,8],[4,1,7,1,3,7],[1,0,9,8,7,4],[3,4,0,3,7,4],[8,7,4],[8,9,10,8,10,11],[3,9,11,9,10,11],[0,10,8,10,11,8],[10,3,1,10,11,3],[2,8,10,8,9,10],[9,2,0,9,10,2],[8,0,3,1,10,2],[10,2,1],[1,11,9,11,8,9],[11,3,2,0,9,1],[11,0,2,11,8,0],[11,3,2],[8,1,3,8,9,1],[9,1,0],[8,0,3],[]],this.edgeTable2=[0,265,515,778,2060,2309,2575,2822,1030,1295,1541,1804,3082,3331,3593,3840,400,153,915,666,2460,2197,2975,2710,1430,1183,1941,1692,3482,3219,3993,3728,560,825,51,314,2620,2869,2111,2358,1590,1855,1077,1340,3642,3891,3129,3376,928,681,419,170,2988,2725,2479,2214,1958,1711,1445,1196,4010,3747,3497,3232,2240,2505,2755,3018,204,453,719,966,3270,3535,3781,4044,1226,1475,1737,1984,2384,2137,2899,2650,348,85,863,598,3414,3167,3925,3676,1370,1107,1881,1616,2800,3065,2291,2554,764,1013,255,502,3830,4095,3317,3580,1786,2035,1273,1520,2912,2665,2403,2154,876,613,367,102,3942,3695,3429,3180,1898,1635,1385,1120,1120,1385,1635,1898,3180,3429,3695,3942,102,367,613,876,2154,2403,2665,2912,1520,1273,2035,1786,3580,3317,4095,3830,502,255,1013,764,2554,2291,3065,2800,1616,1881,1107,1370,3676,3925,3167,3414,598,863,85,348,2650,2899,2137,2384,1984,1737,1475,1226,4044,3781,3535,3270,966,719,453,204,3018,2755,2505,2240,3232,3497,3747,4010,1196,1445,1711,1958,2214,2479,2725,2988,170,419,681,928,3376,3129,3891,3642,1340,1077,1855,1590,2358,2111,2869,2620,314,51,825,560,3728,3993,3219,3482,1692,1941,1183,1430,2710,2975,2197,2460,666,915,153,400,3840,3593,3331,3082,1804,1541,1295,1030,2822,2575,2309,2060,778,515,265,0],this.triTable2=[[],[8,3,0],[9,0,1],[8,3,1,8,1,9],[11,2,3],[11,2,0,11,0,8],[11,2,3,0,1,9],[2,1,11,1,9,11,11,9,8],[10,1,2],[8,3,0,1,2,10],[9,0,2,9,2,10],[3,2,8,2,10,8,8,10,9],[10,1,3,10,3,11],[1,0,10,0,8,10,10,8,11],[0,3,9,3,11,9,9,11,10],[8,10,9,8,11,10],[8,4,7],[3,0,4,3,4,7],[1,9,0,8,4,7],[9,4,1,4,7,1,1,7,3],[2,3,11,7,8,4],[7,11,4,11,2,4,4,2,0],[3,11,2,4,7,8,9,0,1],[2,7,11,2,1,7,1,4,7,1,9,4],[10,1,2,8,4,7],[2,10,1,0,4,7,0,7,3],[4,7,8,0,2,10,0,10,9],[2,7,3,2,9,7,7,9,4,2,10,9],[8,4,7,11,10,1,11,1,3],[11,4,7,1,4,11,1,11,10,1,0,4],[3,8,0,7,11,4,11,9,4,11,10,9],[7,11,4,4,11,9,11,10,9],[9,5,4],[3,0,8,4,9,5],[5,4,0,5,0,1],[4,8,5,8,3,5,5,3,1],[11,2,3,9,5,4],[9,5,4,8,11,2,8,2,0],[3,11,2,1,5,4,1,4,0],[8,5,4,2,5,8,2,8,11,2,1,5],[2,10,1,9,5,4],[0,8,3,5,4,9,10,1,2],[10,5,2,5,4,2,2,4,0],[3,4,8,3,2,4,2,5,4,2,10,5],[5,4,9,1,3,11,1,11,10],[0,9,1,4,8,5,8,10,5,8,11,10],[3,4,0,3,10,4,4,10,5,3,11,10],[4,8,5,5,8,10,8,11,10],[9,5,7,9,7,8],[0,9,3,9,5,3,3,5,7],[8,0,7,0,1,7,7,1,5],[1,7,3,1,5,7],[11,2,3,8,9,5,8,5,7],[9,2,0,9,7,2,2,7,11,9,5,7],[0,3,8,2,1,11,1,7,11,1,5,7],[2,1,11,11,1,7,1,5,7],[1,2,10,5,7,8,5,8,9],[9,1,0,10,5,2,5,3,2,5,7,3],[5,2,10,8,2,5,8,5,7,8,0,2],[10,5,2,2,5,3,5,7,3],[3,9,1,3,8,9,7,11,10,7,10,5],[9,1,0,10,7,11,10,5,7],[3,8,0,7,10,5,7,11,10],[11,5,7,11,10,5],[11,7,6],[0,8,3,11,7,6],[9,0,1,11,7,6],[7,6,11,3,1,9,3,9,8],[2,3,7,2,7,6],[8,7,0,7,6,0,0,6,2],[1,9,0,3,7,6,3,6,2],[7,6,2,7,2,9,2,1,9,7,9,8],[1,2,10,6,11,7],[2,10,1,7,6,11,8,3,0],[11,7,6,10,9,0,10,0,2],[7,6,11,3,2,8,8,2,10,8,10,9],[6,10,7,10,1,7,7,1,3],[6,10,1,6,1,7,7,1,0,7,0,8],[9,0,3,6,9,3,6,10,9,6,3,7],[6,10,7,7,10,8,10,9,8],[8,4,6,8,6,11],[11,3,6,3,0,6,6,0,4],[0,1,9,4,6,11,4,11,8],[1,9,4,11,1,4,11,3,1,11,4,6],[3,8,2,8,4,2,2,4,6],[2,0,4,2,4,6],[1,9,0,3,8,2,2,8,4,2,4,6],[9,4,1,1,4,2,4,6,2],[10,1,2,11,8,4,11,4,6],[10,1,2,11,3,6,6,3,0,6,0,4],[0,2,10,0,10,9,4,11,8,4,6,11],[2,11,3,6,9,4,6,10,9],[8,4,6,8,6,1,6,10,1,8,1,3],[1,0,10,10,0,6,0,4,6],[8,0,3,9,6,10,9,4,6],[10,4,6,10,9,4],[9,5,4,7,6,11],[4,9,5,3,0,8,11,7,6],[6,11,7,4,0,1,4,1,5],[6,11,7,4,8,5,5,8,3,5,3,1],[4,9,5,6,2,3,6,3,7],[9,5,4,8,7,0,0,7,6,0,6,2],[4,0,1,4,1,5,6,3,7,6,2,3],[7,4,8,5,2,1,5,6,2],[6,11,7,1,2,10,9,5,4],[11,7,6,8,3,0,1,2,10,9,5,4],[11,7,6,10,5,2,2,5,4,2,4,0],[7,4,8,2,11,3,10,5,6],[4,9,5,6,10,7,7,10,1,7,1,3],[5,6,10,0,9,1,8,7,4],[5,6,10,7,0,3,7,4,0],[10,5,6,4,8,7],[5,6,9,6,11,9,9,11,8],[0,9,5,0,5,3,3,5,6,3,6,11],[0,1,5,0,5,11,5,6,11,0,11,8],[11,3,6,6,3,5,3,1,5],[9,5,6,3,9,6,3,8,9,3,6,2],[5,6,9,9,6,0,6,2,0],[0,3,8,2,5,6,2,1,5],[1,6,2,1,5,6],[1,2,10,5,6,9,9,6,11,9,11,8],[1,0,9,6,10,5,11,3,2],[6,10,5,2,8,0,2,11,8],[3,2,11,10,5,6],[10,5,6,9,3,8,9,1,3],[0,9,1,5,6,10],[8,0,3,10,5,6],[10,5,6],[10,6,5],[8,3,0,10,6,5],[0,1,9,5,10,6],[10,6,5,9,8,3,9,3,1],[3,11,2,10,6,5],[6,5,10,2,0,8,2,8,11],[1,9,0,6,5,10,11,2,3],[1,10,2,5,9,6,9,11,6,9,8,11],[1,2,6,1,6,5],[0,8,3,2,6,5,2,5,1],[5,9,6,9,0,6,6,0,2],[9,6,5,3,6,9,3,9,8,3,2,6],[11,6,3,6,5,3,3,5,1],[0,5,1,0,11,5,5,11,6,0,8,11],[0,5,9,0,3,5,3,6,5,3,11,6],[5,9,6,6,9,11,9,8,11],[10,6,5,4,7,8],[5,10,6,7,3,0,7,0,4],[5,10,6,0,1,9,8,4,7],[4,5,9,6,7,10,7,1,10,7,3,1],[7,8,4,2,3,11,10,6,5],[11,6,7,10,2,5,2,4,5,2,0,4],[11,6,7,8,0,3,1,10,2,9,4,5],[6,7,11,1,10,2,9,4,5],[7,8,4,5,1,2,5,2,6],[4,1,0,4,5,1,6,7,3,6,3,2],[9,4,5,8,0,7,0,6,7,0,2,6],[4,5,9,6,3,2,6,7,3],[6,7,11,4,5,8,5,3,8,5,1,3],[6,7,11,4,1,0,4,5,1],[4,5,9,3,8,0,11,6,7],[9,4,5,7,11,6],[10,6,4,10,4,9],[8,3,0,9,10,6,9,6,4],[1,10,0,10,6,0,0,6,4],[8,6,4,8,1,6,6,1,10,8,3,1],[2,3,11,6,4,9,6,9,10],[0,10,2,0,9,10,4,8,11,4,11,6],[10,2,1,11,6,3,6,0,3,6,4,0],[10,2,1,11,4,8,11,6,4],[9,1,4,1,2,4,4,2,6],[1,0,9,3,2,8,2,4,8,2,6,4],[2,4,0,2,6,4],[3,2,8,8,2,4,2,6,4],[1,4,9,11,4,1,11,1,3,11,6,4],[0,9,1,4,11,6,4,8,11],[11,6,3,3,6,0,6,4,0],[8,6,4,8,11,6],[6,7,10,7,8,10,10,8,9],[9,3,0,6,3,9,6,9,10,6,7,3],[6,1,10,6,7,1,7,0,1,7,8,0],[6,7,10,10,7,1,7,3,1],[7,11,6,3,8,2,8,10,2,8,9,10],[11,6,7,10,0,9,10,2,0],[2,1,10,7,11,6,8,0,3],[1,10,2,6,7,11],[7,2,6,7,9,2,2,9,1,7,8,9],[1,0,9,3,6,7,3,2,6],[8,0,7,7,0,6,0,2,6],[2,7,3,2,6,7],[7,11,6,3,9,1,3,8,9],[9,1,0,11,6,7],[0,3,8,11,6,7],[11,6,7],[11,7,5,11,5,10],[3,0,8,7,5,10,7,10,11],[9,0,1,10,11,7,10,7,5],[3,1,9,3,9,8,7,10,11,7,5,10],[10,2,5,2,3,5,5,3,7],[5,10,2,8,5,2,8,7,5,8,2,0],[9,0,1,10,2,5,5,2,3,5,3,7],[1,10,2,5,8,7,5,9,8],[2,11,1,11,7,1,1,7,5],[0,8,3,2,11,1,1,11,7,1,7,5],[9,0,2,9,2,7,2,11,7,9,7,5],[11,3,2,8,5,9,8,7,5],[1,3,7,1,7,5],[8,7,0,0,7,1,7,5,1],[0,3,9,9,3,5,3,7,5],[9,7,5,9,8,7],[4,5,8,5,10,8,8,10,11],[3,0,4,3,4,10,4,5,10,3,10,11],[0,1,9,4,5,8,8,5,10,8,10,11],[5,9,4,1,11,3,1,10,11],[3,8,4,3,4,2,2,4,5,2,5,10],[10,2,5,5,2,4,2,0,4],[0,3,8,5,9,4,10,2,1],[2,1,10,9,4,5],[8,4,5,2,8,5,2,11,8,2,5,1],[3,2,11,1,4,5,1,0,4],[9,4,5,8,2,11,8,0,2],[11,3,2,9,4,5],[4,5,8,8,5,3,5,1,3],[5,0,4,5,1,0],[3,8,0,4,5,9],[9,4,5],[7,4,11,4,9,11,11,9,10],[3,0,8,7,4,11,11,4,9,11,9,10],[11,7,4,1,11,4,1,10,11,1,4,0],[8,7,4,11,1,10,11,3,1],[2,3,7,2,7,9,7,4,9,2,9,10],[4,8,7,0,10,2,0,9,10],[2,1,10,0,7,4,0,3,7],[10,2,1,8,7,4],[2,11,7,2,7,1,1,7,4,1,4,9],[3,2,11,4,8,7,9,1,0],[7,4,11,11,4,2,4,0,2],[2,11,3,7,4,8],[9,1,4,4,1,7,1,3,7],[1,0,9,8,7,4],[3,4,0,3,7,4],[8,7,4],[8,9,10,8,10,11],[0,9,3,3,9,11,9,10,11],[1,10,0,0,10,8,10,11,8],[10,3,1,10,11,3],[3,8,2,2,8,10,8,9,10],[9,2,0,9,10,2],[8,0,3,1,10,2],[10,2,1],[2,11,1,1,11,9,11,8,9],[11,3,2,0,9,1],[11,0,2,11,8,0],[11,3,2],[8,1,3,8,9,1],[9,1,0],[8,0,3],[]]}march(t,e,r,n){let o=!!n.fulltable,a=n.hasOwnProperty("origin")&&n.origin.hasOwnProperty("x")?n.origin:{x:0,y:0,z:0},s=!!n.voxel,l=n.matrix,c=n.nX||0,u=n.nY||0,h=n.nZ||0,d=n.scale||1,f=null;f=n.unitCube?n.unitCube:{x:d,y:d,z:d};let p,m,g=new Int32Array(c*u*h);for(p=0,m=g.length;p>2))+n+((2&e)>>1))*h+i+(1&e)]&this.ISDONE)<=3&&(e.push(e[n]),n=e.length-1,e.push(e[i]),i=e.length-1,e.push(e[o]),o=e.length-1),r.push(n),r.push(i),r.push(o)}}}laplacianSmooth(t,e,r){let n,i,o,a,s,l=new Array(e.length);for(n=0,i=e.length;n1e6&&(this.scaleFactor=this.defaultScaleFactor/2);let n=1/this.scaleFactor*5.5;this.pminx=t[0][0],this.pmaxx=t[1][0],this.pminy=t[0][1],this.pmaxy=t[1][1],this.pminz=t[0][2],this.pmaxz=t[1][2],e?(this.pminx-=this.probeRadius+n,this.pminy-=this.probeRadius+n,this.pminz-=this.probeRadius+n,this.pmaxx+=this.probeRadius+n,this.pmaxy+=this.probeRadius+n,this.pmaxz+=this.probeRadius+n):(this.pminx-=n,this.pminy-=n,this.pminz-=n,this.pmaxx+=n,this.pmaxy+=n,this.pmaxz+=n),this.pminx=Math.floor(this.pminx*this.scaleFactor)/this.scaleFactor,this.pminy=Math.floor(this.pminy*this.scaleFactor)/this.scaleFactor,this.pminz=Math.floor(this.pminz*this.scaleFactor)/this.scaleFactor,this.pmaxx=Math.ceil(this.pmaxx*this.scaleFactor)/this.scaleFactor,this.pmaxy=Math.ceil(this.pmaxy*this.scaleFactor)/this.scaleFactor,this.pmaxz=Math.ceil(this.pmaxz*this.scaleFactor)/this.scaleFactor,this.ptranx=-this.pminx,this.ptrany=-this.pminy,this.ptranz=-this.pminz,this.pLength=Math.ceil(this.scaleFactor*(this.pmaxx-this.pminx))+1,this.pWidth=Math.ceil(this.scaleFactor*(this.pmaxy-this.pminy))+1,this.pHeight=Math.ceil(this.scaleFactor*(this.pmaxz-this.pminz))+1,this.boundingatom(e),this.cutRadius=this.probeRadius*this.scaleFactor,this.vpBits=new Uint8Array(this.pLength*this.pWidth*this.pHeight),this.vpDistance=new Float64Array(this.pLength*this.pWidth*this.pHeight),this.vpAtomID=new Int32Array(this.pLength*this.pWidth*this.pHeight)}boundingatom(t){let e={};for(const r in this.vdwRadii){let n=this.vdwRadii[r];e[r]=t?(n+this.probeRadius)*this.scaleFactor+.5:n*this.scaleFactor+.5;let i=e[r]*e[r];this.widxz[r]=Math.floor(e[r])+1,this.depty[r]=new Int32Array(this.widxz[r]*this.widxz[r]);let o=0;for(let t=0;ti)this.depty[r][o]=-1;else{let t=Math.sqrt(i-n);this.depty[r][o]=Math.floor(t)}o++}}}fillvoxels(t,e){for(let t=0,e=this.vpBits.length;t=this.pLength||c>=this.pWidth||u>=this.pHeight)continue;let d=a*s+c*this.pHeight+u;if(this.vpBits[d]&this.INOUT){let a=e[this.vpAtomID[d]];if(a.serial!=t.serial){let e=r+f-Math.floor(.5+this.scaleFactor*(a.x+this.ptranx)),s=n+o-Math.floor(.5+this.scaleFactor*(a.y+this.ptrany)),l=i+p-Math.floor(.5+this.scaleFactor*(a.z+this.ptranz));f*f+o*o+p*p=this.pLength||c>=this.pWidth||u>=this.pHeight)continue;let d=a*s+c*this.pHeight+u;if(this.vpBits[d]&this.ISDONE){let a=e[this.vpAtomID[d]];if(a.serial!=t.serial){let e=n+f-Math.floor(.5+this.scaleFactor*(a.x+this.ptranx)),s=i+r-Math.floor(.5+this.scaleFactor*(a.y+this.ptrany)),l=o+p-Math.floor(.5+this.scaleFactor*(a.z+this.ptranz));f*f+r*r+p*p-1&&a-1&&l-1&&s=s)||(this.vpBits[t]|=this.ISBOUND))}fastoneshell(t,e){let r,n,i,o,a,s,l,c,u,h=[];if(0===t.length)return h;let d={ix:-1,iy:-1,iz:-1},f=this.pWidth*this.pHeight;for(let p=0,m=t.length;p-1&&d.iy-1&&d.iz-1&&(u=d.ix*f+this.pHeight*d.iy+d.iz,this.vpBits[u]&this.INOUT&&!(this.vpBits[u]&this.ISDONE)?(e.set(d.ix,d.iy,i+this.nb[t][2],c),o=d.ix-c.ix,a=d.iy-c.iy,s=d.iz-c.iz,l=o*o+a*a+s*s,this.vpDistance[u]=l,this.vpBits[u]|=this.ISDONE,this.vpBits[u]|=this.ISBOUND,h.push({ix:d.ix,iy:d.iy,iz:d.iz})):this.vpBits[u]&this.INOUT&&this.vpBits[u]&this.ISDONE&&(o=d.ix-c.ix,a=d.iy-c.iy,s=d.iz-c.iz,l=o*o+a*a+s*s,l-1&&d.iy-1&&d.iz-1&&(u=d.ix*f+this.pHeight*d.iy+d.iz,this.vpBits[u]&this.INOUT&&!(this.vpBits[u]&this.ISDONE)?(e.set(d.ix,d.iy,i+this.nb[t][2],c),o=d.ix-c.ix,a=d.iy-c.iy,s=d.iz-c.iz,l=o*o+a*a+s*s,this.vpDistance[u]=l,this.vpBits[u]|=this.ISDONE,this.vpBits[u]|=this.ISBOUND,h.push({ix:d.ix,iy:d.iy,iz:d.iz})):this.vpBits[u]&this.INOUT&&this.vpBits[u]&this.ISDONE&&(o=d.ix-c.ix,a=d.iy-c.iy,s=d.iz-c.iz,l=o*o+a*a+s*s,l-1&&d.iy-1&&d.iz-1&&(u=d.ix*f+this.pHeight*d.iy+d.iz,this.vpBits[u]&this.INOUT&&!(this.vpBits[u]&this.ISDONE)?(e.set(d.ix,d.iy,i+this.nb[t][2],c),o=d.ix-c.ix,a=d.iy-c.iy,s=d.iz-c.iz,l=o*o+a*a+s*s,this.vpDistance[u]=l,this.vpBits[u]|=this.ISDONE,this.vpBits[u]|=this.ISBOUND,h.push({ix:d.ix,iy:d.iy,iz:d.iz})):this.vpBits[u]&this.INOUT&&this.vpBits[u]&this.ISDONE&&(o=d.ix-c.ix,a=d.iy-c.iy,s=d.iz-c.iz,l=o*o+a*a+s*s,l{"use strict";r.r(e),r.d(e,{VolumeData:()=>l});var n=r("./src/utilities.ts"),i=r("./src/WebGL/math/index.ts"),o=r("./src/parsers/VASP.ts"),a=r("./src/parsers/CUBE.ts"),s=r("./node_modules/pako/dist/pako.esm.mjs");class l{constructor(t,e,r){if(this.unit={x:1,y:1,z:1},this.origin={x:0,y:0,z:0},this.size={x:0,y:0,z:0},this.data=new Float32Array([]),this.matrix=null,this.inversematrix=null,this.isbinary=new Set(["ccp4","CCP4"]),this.getCoordinates=function(t){var e=t/(this.size.y*this.size.z),r=t%(this.size.y*this.size.z),n=t%this.size.z;return e*=this.unit.x,r*=this.unit.y,n*=this.unit.z,{x:e+=this.origin.x,y:r+=this.origin.y,z:n+=this.origin.z}},this.vasp=function(t){var e=t.replace(/^\s+/,"").split(/[\n\r]/),r=(0,o.VASP)(t)[0].length;if(0==r)return console.log("No good formating of CHG or CHGCAR file, not atomic information provided in the file."),void(this.data=[]);var n,a=1.889725992,s=parseFloat(e[1]);n=e[2].replace(/^\s+/,"").split(/\s+/);var l=new i.Vector3(parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2])).multiplyScalar(s*a);n=e[3].replace(/^\s+/,"").split(/\s+/);var c=new i.Vector3(parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2])).multiplyScalar(s*a);n=e[4].replace(/^\s+/,"").split(/\s+/);var u=new i.Vector3(parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2])).multiplyScalar(s*a),h=l.x*(c.y*u.z-u.y*c.z)-c.x*(l.y*u.z-u.y*l.z)+u.x*(l.y*c.z-c.y*l.z),d=1/(h=Math.abs(h)/Math.pow(a,3));e.splice(0,8+r+1);var f=e[0].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),p=Math.abs(parseFloat(f[0])),m=Math.abs(parseFloat(f[1])),g=Math.abs(parseFloat(f[2])),v=this.origin=new i.Vector3(0,0,0);this.size={x:p,y:m,z:g},this.unit=new i.Vector3(l.x,c.y,u.z),l=l.multiplyScalar(1/(a*p)),c=c.multiplyScalar(1/(a*m)),u=u.multiplyScalar(1/(a*g)),0==l.y&&0==l.z&&0==c.x&&0==c.z&&0==u.x&&0==u.y||(this.matrix=new i.Matrix4(l.x,c.x,u.x,0,l.y,c.y,u.y,0,l.z,c.z,u.z,0,0,0,0,1),this.matrix=this.matrix.multiplyMatrices(this.matrix,(new i.Matrix4).makeTranslation(v.x,v.y,v.z)),this.origin=new i.Vector3(0,0,0),this.unit=new i.Vector3(1,1,1)),e.splice(0,1);var b=e.join(" "),y=(b=b.replace(/^\s+/,"")).split(/[\s\r]+/);y.splice(p*m*g+1);for(var x=Float32Array.from(y,parseFloat),_=0;_=this.size.x||e<0||e>=this.size.y||r<0||r>=this.size.z?-1:t*this.size.y*this.size.z+e*this.size.z+r}getVal(t,e,r){let n=this.getIndex(t,e,r);return n<0?0:this.data[n]}cube(t){var e=t.split(/\r?\n/);if(!(e.length<6)){var r=(0,a.CUBE)(t,{}).modelData[0].cryst,n=e[2].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),i=parseFloat(n[0]),o=Math.abs(i);this.origin=r.origin,this.size=r.size,this.unit=r.unit,this.matrix=r.matrix4;var s=6;i<0&&s++;var l=e.splice(o+s).join(" "),c=(l=l.replace(/^\s+/,"")).split(/[\s\r]+/);this.data=Float32Array.from(c,parseFloat)}}ccp4(t){var e={};t=new Int8Array(t);var r=new Int32Array(t.buffer,0,56),n=new Float32Array(t.buffer,0,56),o=new DataView(t.buffer);if(e.MAP=String.fromCharCode(o.getUint8(208),o.getUint8(209),o.getUint8(210),o.getUint8(211)),e.MACHST=[o.getUint8(212),o.getUint8(213)],17===e.MACHST[0]&&17===e.MACHST[1])for(var a=t.byteLength,s=0;s{"use strict";r.r(e),r.d(e,{GLVolumetricRender:()=>l});var n=r("./src/WebGL/shapes/index.ts"),i=r("./src/WebGL/math/index.ts"),o=r("./src/WebGL/index.ts"),a=r("./src/colors.ts"),s=r("./src/GLShape.ts");class l{static interpolateArray(t,e){function r(t,e,r){return t+(e-t)*r}var n=[],i=(t.length-1)/(e-1);n[0]=t[0];for(var o=1;o=0||t.getIndex(u,h,d)>=0)for(let e=s;e=0&&!r[s]&&(e-a.x)*(e-a.x)+(n-a.y)*(n-a.y)+(o-a.z)*(o-a.z){"use strict";r.r(e),r.d(e,{Camera:()=>o});var n=r("./src/WebGL/core/index.ts"),i=r("./src/WebGL/math/index.ts");class o extends n.Object3D{constructor(t=50,e=1,r=.1,n=2e3,o=!1){super(),this.projectionMatrix=new i.Matrix4,this.projectionMatrixInverse=new i.Matrix4,this.matrixWorldInverse=new i.Matrix4,this.fov=t,this.aspect=e,this.near=r,this.far=n;var a=this.position.z;this.right=a*Math.tan(Math.PI/180*t),this.left=-this.right,this.top=this.right/this.aspect,this.bottom=-this.top,this.ortho=!!o,this.updateProjectionMatrix()}lookAt(t){this.matrix.lookAt(this.position,t,this.up),this.rotationAutoUpdate&&(!1===this.useQuaternion&&this.rotation instanceof i.Vector3?this.rotation.setEulerFromRotationMatrix(this.matrix,this.eulerOrder):console.error("Unimplemented math operation."))}updateProjectionMatrix(){this.ortho?this.projectionMatrix.makeOrthographic(this.left,this.right,this.top,this.bottom,this.near,this.far):this.projectionMatrix.makePerspective(this.fov,this.aspect,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)}}},"./src/WebGL/Fog.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Fog:()=>i});var n=r("./src/colors.ts");class i{constructor(t,e=1,r=1e3){this.name="",this.color=new n.Color(t),this.near=e,this.far=r}clone(){return new i(this.color.getHex(),this.near,this.far)}}},"./src/WebGL/Renderer.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Renderer:()=>f});var n=r("./src/WebGL/Camera.ts"),i=r("./src/WebGL/constants/Sides.ts"),o=r("./src/WebGL/constants/TextureConstants.ts"),a=r("./src/WebGL/core/index.ts"),s=r("./src/colors.ts"),l=r("./src/WebGL/materials/index.ts"),c=r("./src/WebGL/math/index.ts"),u=r("./src/WebGL/objects/index.ts"),h=r("./src/WebGL/shaders/index.ts"),d=r("./src/WebGL/SpritePlugin.ts");class f{constructor(t){this.context=null,this.devicePixelRatio=1,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.autoUpdateObjects=!0,this.autoUpdateScene=!0,this.info={memory:{programs:0,geometries:0,textures:0},render:{calls:0,vertices:0,faces:0,points:0}},this._programs=[],this._programs_counter=0,this._webglversion=1,this._currentProgram=null,this._currentMaterialId=-1,this._currentGeometryGroupHash=null,this._currentCamera=null,this._geometryGroupCounter=0,this._oldDoubleSided=-1,this._oldFlipSided=-1,this._oldDepthTest=-1,this._oldDepthWrite=-1,this._oldPolygonOffset=null,this._oldLineWidth=null,this._viewportWidth=0,this._viewportHeight=0,this._currentWidth=0,this._currentHeight=0,this._enabledAttributes={},this._projScreenMatrix=new c.Matrix4,this._vector3=new c.Vector3,this._worldInverse=new c.Matrix4,this._projInverse=new c.Matrix4,this._textureMatrix=new c.Matrix4,this._direction=new c.Vector3,this._lightsNeedUpdate=!0,this._lights={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[],distances:[]},spot:{length:0,colors:[],positions:[],distances:[],directions:[],anglesCos:[],exponents:[]},hemi:{length:0,skyColors:[],groundColors:[],positions:[]}},this.sprites=new d.SpritePlugin,this._screenshader=null,this._vertexattribpos=null,this._screenQuadVBO=null,this._fb=null,this._targetTexture=null,this._depthTexture=null,t=t||{},this.row=t.row,this.col=t.col,this.rows=t.rows,this.cols=t.cols,this._canvas=void 0!==t.canvas?t.canvas:document.createElement("canvas"),this._precision=void 0!==t.precision?t.precision:"highp",this._alpha=void 0===t.alpha||t.alpha,this._premultipliedAlpha=void 0===t.premultipliedAlpha||t.premultipliedAlpha,this._antialias=void 0!==t.antialias&&t.antialias,this._stencil=void 0===t.stencil||t.stencil,this._preserveDrawingBuffer=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,this._clearColor=void 0!==t.clearColor?new s.Color(t.clearColor):new s.Color(0),this._clearAlpha=void 0!==t.clearAlpha?t.clearAlpha:0,this._outlineMaterial=new l.MeshOutlineMaterial(t.outline),this._outlineSphereImposterMaterial=new l.SphereImposterOutlineMaterial(t.outline),this._outlineStickImposterMaterial=new l.StickImposterOutlineMaterial(t.outline),this._outlineEnabled=!!t.outline,this.domElement=this._canvas,this._canvas.id=t.id,0!=t.containerWidth&&0!=t.containerHeight&&(this.initGL(),this.setDefaultGLState(),this.context=this._gl,this.isWebGL1()?this._extInstanced=this._gl.getExtension("ANGLE_instanced_arrays"):this._extInstanced={vertexAttribDivisorANGLE:this._gl.vertexAttribDivisor.bind(this._gl),drawElementsInstancedANGLE:this._gl.drawElementsInstanced.bind(this._gl)},this._extFragDepth=this._gl.getExtension("EXT_frag_depth"),this._extFloatLinear=this._gl.getExtension("OES_texture_float_linear"),this._extColorBufferFloat=this._gl.getExtension("EXT_color_buffer_float"),this.sprites.init(this))}supportedExtensions(){return{supportsAIA:Boolean(this._extInstanced),supportsImposters:Boolean(this._extFragDepth)||!this.isWebGL1(),regen:!1}}getContext(){return this._gl}getCanvas(){return this._canvas}isLost(){return null==this._gl||this._gl.isContextLost()}getPrecision(){return this._precision}setClearColorHex(t,e){this._clearColor.setHex(t),this._clearAlpha=e,this.isLost()||this._gl.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearAlpha)}enableOutline(t){this._outlineMaterial=new l.MeshOutlineMaterial(t),this._outlineSphereImposterMaterial=new l.SphereImposterOutlineMaterial(t),this._outlineStickImposterMaterial=new l.StickImposterOutlineMaterial(t),this._outlineEnabled=!0}disableOutline(){this._outlineEnabled=!1}setViewport(){if(null!=this.rows&&null!=this.cols&&null!=this.row&&null!=this.col){var t=this._canvas.width/this.cols,e=this._canvas.height/this.rows;this._viewportWidth=t,this._viewportHeight=e,this.isLost()||(this._gl.enable(this._gl.SCISSOR_TEST),this._gl.scissor(t*this.col,e*this.row,t,e),this._gl.viewport(t*this.col,e*this.row,t,e))}}setSize(t,e){if(this.devicePixelRatio=void 0!==window.devicePixelRatio?window.devicePixelRatio:1,this._antialias&&this.devicePixelRatio<2&&(this.devicePixelRatio*=2),null!=this.rows&&null!=this.cols&&null!=this.row&&null!=this.col){var r=t/this.cols,n=e/this.rows;this._canvas.width=t*this.devicePixelRatio,this._canvas.height=e*this.devicePixelRatio,this._viewportWidth=r*this.devicePixelRatio,this._viewportHeight=n*this.devicePixelRatio,this._canvas.style.width=t+"px",this._canvas.style.height=e+"px",this.setViewport()}else this._viewportWidth=this._canvas.width=t*this.devicePixelRatio,this._viewportHeight=this._canvas.height=e*this.devicePixelRatio,this._canvas.style.width=t+"px",this._canvas.style.height=e+"px",this.isLost()||this._gl.viewport(0,0,this._gl.drawingBufferWidth,this._gl.drawingBufferHeight);this.initFrameBuffer()}clear(t,e,r){var n=0;(void 0===t||t)&&(n|=this._gl.COLOR_BUFFER_BIT),(void 0===e||e)&&(n|=this._gl.DEPTH_BUFFER_BIT),(void 0===r||r)&&(n|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(n)}clearTarget(t,e,r){this.clear(t,e,r)}setMaterialFaces(t,e){var r=t.side===i.DoubleSide,n=t.side===i.BackSide;t.imposter||(n=e?!n:n),this._oldDoubleSided!==r&&(r?this._gl.disable(this._gl.CULL_FACE):this._gl.enable(this._gl.CULL_FACE),this._oldDoubleSided=r),this._oldFlipSided!==n&&(n?this._gl.frontFace(this._gl.CW):this._gl.frontFace(this._gl.CCW),this._oldFlipSided=n),this._gl.cullFace(this._gl.BACK)}setDepthTest(t){this._oldDepthTest!==t&&(t?this._gl.enable(this._gl.DEPTH_TEST):this._gl.disable(this._gl.DEPTH_TEST),this._oldDepthTest=t)}setDepthWrite(t){this._oldDepthWrite!==t&&(this._gl.depthMask(t),this._oldDepthWrite=t)}setBlending(t){t?(this._gl.enable(this._gl.BLEND),this._gl.blendEquationSeparate(this._gl.FUNC_ADD,this._gl.FUNC_ADD),this._gl.blendFuncSeparate(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA)):this._gl.disable(this._gl.BLEND)}initMaterial(t,e,r,n){var i,o;if(t.addEventListener("dispose",this.onMaterialDispose.bind(this)),o=t.shaderID){var a=h.ShaderLib[o];t.vertexShader=a.vertexShader,t.fragmentShader=a.fragmentShader,t.uniforms=h.ShaderUtils.clone(a.uniforms)}i={wireframe:t.wireframe,fragdepth:t.imposter,volumetric:t.volumetric},t.program=this.buildProgram(t.fragmentShader,t.vertexShader,t.uniforms,i)}renderBuffer(t,e,r,n,i,o){var a,s;if(n.visible&&(a=this.setProgram(t,e,r,n,o,this))){s=a.attributes;var l,c,h=!1,d=n.wireframe?1:0,f=16777215*i.id+2*a.id+d;if(f!==this._currentGeometryGroupHash&&(this._currentGeometryGroupHash=f,h=!0),h&&(this.disableAttributes(),s.position>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglVertexBuffer),this.enableAttribute(s.position),this._gl.vertexAttribPointer(s.position,3,this._gl.FLOAT,!1,0,0)),s.color>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglColorBuffer),this.enableAttribute(s.color),this._gl.vertexAttribPointer(s.color,3,this._gl.FLOAT,!1,0,0)),s.normal>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglNormalBuffer),this.enableAttribute(s.normal),this._gl.vertexAttribPointer(s.normal,3,this._gl.FLOAT,!1,0,0)),s.offset>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglOffsetBuffer),this.enableAttribute(s.offset),this._gl.vertexAttribPointer(s.offset,3,this._gl.FLOAT,!1,0,0)),s.radius>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglRadiusBuffer),this.enableAttribute(s.radius),this._gl.vertexAttribPointer(s.radius,1,this._gl.FLOAT,!1,0,0))),o instanceof u.Mesh){if("instanced"===n.shaderID){var p=n.sphere.geometryGroups[0];h&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglVertexBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,p.vertexArray,this._gl.STATIC_DRAW),this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglNormalBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,p.normalArray,this._gl.STATIC_DRAW),this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,i.__webglFaceBuffer),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,p.faceArray,this._gl.STATIC_DRAW)),l=p.faceidx,this._extInstanced.vertexAttribDivisorANGLE(s.offset,1),this._extInstanced.vertexAttribDivisorANGLE(s.radius,1),this._extInstanced.vertexAttribDivisorANGLE(s.color,1),this._extInstanced.drawElementsInstancedANGLE(this._gl.TRIANGLES,l,this._gl.UNSIGNED_SHORT,0,i.radiusArray.length),this._extInstanced.vertexAttribDivisorANGLE(s.offset,0),this._extInstanced.vertexAttribDivisorANGLE(s.radius,0),this._extInstanced.vertexAttribDivisorANGLE(s.color,0)}else n.wireframe?(c=i.lineidx,this.setLineWidth(n.wireframeLinewidth),h&&this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,i.__webglLineBuffer),this._gl.drawElements(this._gl.LINES,c,this._gl.UNSIGNED_SHORT,0)):(l=i.faceidx,h&&this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,i.__webglFaceBuffer),this._gl.drawElements(this._gl.TRIANGLES,l,this._gl.UNSIGNED_SHORT,0));this.info.render.calls++,this.info.render.vertices+=l,this.info.render.faces+=l/3}else o instanceof u.Line&&(c=i.vertices,this.setLineWidth(n.linewidth),this._gl.drawArrays(this._gl.LINES,0,c),this.info.render.calls++)}}render(t,e,r){if(e instanceof n.Camera!=0){var i,o,a,s,l,c=t.__lights,u=t.fog;if(this._currentMaterialId=-1,this._lightsNeedUpdate=!0,this.autoUpdateScene&&t.updateMatrixWorld(),void 0===e.parent&&e.updateMatrixWorld(),e.matrixWorldInverse.getInverse(e.matrixWorld),this._projScreenMatrix.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),!this.isLost()){this.autoUpdateObjects&&this.initWebGLObjects(t),this.info.render.calls=0,this.info.render.vertices=0,this.info.render.faces=0,this.info.render.points=0,this._currentWidth=this._viewportWidth,this._currentHeight=this._viewportHeight,this.setViewport(),this.setFrameBuffer(),(this.autoClear||r)&&(this._gl.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearAlpha),this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil));var h=!1;for(i=0,o=(l=t.__webglObjects).length;i=0;--r)t[r].object===e&&t.splice(r,1)}removeInstancesDirect(t,e){for(var r=t.length-1;r>=0;--r)t[r]===e&&t.splice(r,1)}unrollBufferMaterial(t){var e=t.object.material;if(e.volumetric)t.opaque=null,t.transparent=null,t.volumetric=e;else if(e.transparent){if(t.opaque=null,t.volumetric=null,t.transparent=e,!e.wireframe){var r=e.clone();r.opacity=0,t.blank=r}}else t.opaque=e,t.transparent=null,t.volumetric=null}setBuffers(t,e){var r=t.vertexArray,n=t.colorArray;if(void 0!==t.__webglOffsetBuffer?(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglOffsetBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,r,e)):(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglVertexBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,r,e)),this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglColorBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,n,e),t.normalArray&&void 0!==t.__webglNormalBuffer){var i=t.normalArray;this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglNormalBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,i,e)}if(t.radiusArray&&void 0!==t.__webglRadiusBuffer&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglRadiusBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,t.radiusArray,e)),t.faceArray&&void 0!==t.__webglFaceBuffer){var o=t.faceArray;this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,t.__webglFaceBuffer),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,o,e)}if(t.lineArray&&void 0!==t.__webglLineBuffer){var a=t.lineArray;this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,t.__webglLineBuffer),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,a,e)}}createMeshBuffers(t){t.radiusArray&&(t.__webglRadiusBuffer=this._gl.createBuffer()),t.useOffset&&(t.__webglOffsetBuffer=this._gl.createBuffer()),t.__webglVertexBuffer=this._gl.createBuffer(),t.__webglNormalBuffer=this._gl.createBuffer(),t.__webglColorBuffer=this._gl.createBuffer(),t.__webglFaceBuffer=this._gl.createBuffer(),t.__webglLineBuffer=this._gl.createBuffer(),this.info.memory.geometries++}createLineBuffers(t){t.__webglVertexBuffer=this._gl.createBuffer(),t.__webglColorBuffer=this._gl.createBuffer(),this.info.memory.geometries++}addBuffer(t,e,r){t.push({buffer:e,object:r,opaque:null,transparent:null})}setupMatrices(t,e){t._modelViewMatrix.multiplyMatrices(e.matrixWorldInverse,t.matrixWorld),t._normalMatrix.getInverse(t._modelViewMatrix),t._normalMatrix.transpose()}filterFallback(t){return this._gl.LINEAR}setTextureParameters(t,e){t==this._gl.TEXTURE_2D?(this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(t,this._gl.TEXTURE_MAG_FILTER,this.filterFallback(e.magFilter)),this._gl.texParameteri(t,this._gl.TEXTURE_MIN_FILTER,this.filterFallback(e.minFilter))):(this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_R,this._gl.CLAMP_TO_EDGE),this._extColorBufferFloat&&this._extFloatLinear?(this._gl.texParameteri(t,this._gl.TEXTURE_MAG_FILTER,this._gl.LINEAR),this._gl.texParameteri(t,this._gl.TEXTURE_MIN_FILTER,this._gl.LINEAR)):(this._gl.texParameteri(t,this._gl.TEXTURE_MAG_FILTER,this._gl.NEAREST),this._gl.texParameteri(t,this._gl.TEXTURE_MIN_FILTER,this._gl.NEAREST)))}paramToGL(t){return t===o.UnsignedByteType?this._gl.UNSIGNED_BYTE:t===o.RGBAFormat?this._gl.RGBA:t===o.NearestFilter?this._gl.NEAREST:0}setupLights(t,e){var r,n,i,o,s,l=this._lights,c=l.directional.colors,u=l.directional.positions,h=0,d=0;for(r=0,n=e.length;r{"use strict";r.r(e),r.d(e,{SpritePlugin:()=>i});var n=r("./src/WebGL/shaders/index.ts");class i{constructor(){this.sprite={vertices:null,faces:null,vertexBuffer:null,elementBuffer:null,program:null,attributes:{},uniforms:null}}init(t){this.gl=t.context,this.renderer=t,this.precision=t.getPrecision(),this.sprite.vertices=new Float32Array(16),this.sprite.faces=new Uint16Array(6);var e=0;this.sprite.vertices[e++]=-1,this.sprite.vertices[e++]=-1,this.sprite.vertices[e++]=0,this.sprite.vertices[e++]=0,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=-1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=0,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=-1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=0,this.sprite.vertices[e++]=1,e=0,this.sprite.faces[e++]=0,this.sprite.faces[e++]=1,this.sprite.faces[e++]=2,this.sprite.faces[e++]=0,this.sprite.faces[e++]=2,this.sprite.faces[e++]=3,this.sprite.vertexBuffer=this.gl.createBuffer(),this.sprite.elementBuffer=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.sprite.vertexBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,this.sprite.vertices,this.gl.STATIC_DRAW),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.sprite.elementBuffer),this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,this.sprite.faces,this.gl.STATIC_DRAW),this.sprite.program=this.createProgram(n.ShaderLib.sprite,this.precision||1),this.sprite.attributes={};const r={};this.sprite.attributes.position=this.gl.getAttribLocation(this.sprite.program,"position"),this.sprite.attributes.uv=this.gl.getAttribLocation(this.sprite.program,"uv"),r.uvOffset=this.gl.getUniformLocation(this.sprite.program,"uvOffset"),r.uvScale=this.gl.getUniformLocation(this.sprite.program,"uvScale"),r.rotation=this.gl.getUniformLocation(this.sprite.program,"rotation"),r.scale=this.gl.getUniformLocation(this.sprite.program,"scale"),r.alignment=this.gl.getUniformLocation(this.sprite.program,"alignment"),r.color=this.gl.getUniformLocation(this.sprite.program,"color"),r.map=this.gl.getUniformLocation(this.sprite.program,"map"),r.opacity=this.gl.getUniformLocation(this.sprite.program,"opacity"),r.useScreenCoordinates=this.gl.getUniformLocation(this.sprite.program,"useScreenCoordinates"),r.screenPosition=this.gl.getUniformLocation(this.sprite.program,"screenPosition"),r.modelViewMatrix=this.gl.getUniformLocation(this.sprite.program,"modelViewMatrix"),r.projectionMatrix=this.gl.getUniformLocation(this.sprite.program,"projectionMatrix"),r.fogType=this.gl.getUniformLocation(this.sprite.program,"fogType"),r.fogDensity=this.gl.getUniformLocation(this.sprite.program,"fogDensity"),r.fogNear=this.gl.getUniformLocation(this.sprite.program,"fogNear"),r.fogFar=this.gl.getUniformLocation(this.sprite.program,"fogFar"),r.fogColor=this.gl.getUniformLocation(this.sprite.program,"fogColor"),r.alphaTest=this.gl.getUniformLocation(this.sprite.program,"alphaTest"),this.sprite.uniforms=r}render(t,e,r,n,i){var a,s,l,c,u,h,d,f,p,m;if(!this.gl)throw new Error("WebGLRenderer not initialized");let g=[];null===(a=null==t?void 0:t.__webglSprites)||void 0===a||a.forEach((t=>{(i&&0==t.material.depthTest||!i&&t.material.depthTest)&&g.push(t)}));let v=g.length;if(!v)return;const b=this.sprite.attributes,y=this.sprite.uniforms;if(!y)throw new Error("Uniforms not defined");var x=.5*r,_=.5*n;this.gl.useProgram(this.sprite.program),this.gl.enableVertexAttribArray(b.position),this.gl.enableVertexAttribArray(b.uv),this.gl.disable(this.gl.CULL_FACE),this.gl.enable(this.gl.BLEND),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.sprite.vertexBuffer),this.gl.vertexAttribPointer(b.position,2,this.gl.FLOAT,!1,16,0),this.gl.vertexAttribPointer(b.uv,2,this.gl.FLOAT,!1,16,8),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.sprite.elementBuffer),this.gl.uniformMatrix4fv(y.projectionMatrix,!1,e.projectionMatrix.elements),this.gl.activeTexture(this.gl.TEXTURE0),this.gl.uniform1i(y.map,0);var w,k=0,A=0,M=t.fog;let T,S,C,E;M?(this.gl.uniform3f(y.fogColor,M.color.r,M.color.g,M.color.b),this.gl.uniform1f(y.fogNear,M.near),this.gl.uniform1f(y.fogFar,M.far),this.gl.uniform1i(y.fogType,1),k=1,A=1):(this.gl.uniform1i(y.fogType,0),k=0,A=0);let L=[];for(w=0;w{"use strict";var n;r.r(e),r.d(e,{Coloring:()=>n}),function(t){t[t.NoColors=0]="NoColors",t[t.FaceColors=1]="FaceColors",t[t.VertexColors=2]="VertexColors"}(n||(n={}))},"./src/WebGL/constants/Shading.ts":(t,e,r)=>{"use strict";var n;r.r(e),r.d(e,{Shading:()=>n}),function(t){t[t.NoShading=0]="NoShading",t[t.FlatShading=1]="FlatShading",t[t.SmoothShading=2]="SmoothShading"}(n||(n={}))},"./src/WebGL/constants/Sides.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BackSide:()=>i,DoubleSide:()=>o,FrontSide:()=>n});const n=0,i=1,o=2},"./src/WebGL/constants/SpriteAlignment.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SpriteAlignment:()=>i});var n=r("./src/WebGL/math/index.ts");const i={topLeft:new n.Vector2(1,-1),topCenter:new n.Vector2(0,-1),topRight:new n.Vector2(-1,-1),centerLeft:new n.Vector2(1,0),center:new n.Vector2(0,0),centerRight:new n.Vector2(-1,0),bottomLeft:new n.Vector2(1,1),bottomCenter:new n.Vector2(0,1),bottomRight:new n.Vector2(-1,1)}},"./src/WebGL/constants/TextureConstants.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ClampToEdgeWrapping:()=>n,FloatType:()=>l,LinearFilter:()=>i,LinearMipMapLinearFilter:()=>a,NearestFilter:()=>o,R32Format:()=>h,RFormat:()=>u,RGBAFormat:()=>c,UnsignedByteType:()=>s});const n=1001,i=1006,o=1007,a=1008,s=1009,l=1010,c=1021,u=1022,h=1023},"./src/WebGL/constants/TextureOperations.ts":(t,e,r)=>{"use strict";var n;r.r(e),r.d(e,{TextureOperations:()=>n}),function(t){t[t.MultiplyOperation=0]="MultiplyOperation",t[t.MixOperation=1]="MixOperation",t[t.AddOperation=2]="AddOperation"}(n||(n={}))},"./src/WebGL/constants/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BackSide:()=>i.BackSide,ClampToEdgeWrapping:()=>s.ClampToEdgeWrapping,Coloring:()=>n.Coloring,DoubleSide:()=>i.DoubleSide,FloatType:()=>s.FloatType,FrontSide:()=>i.FrontSide,LinearFilter:()=>s.LinearFilter,LinearMipMapLinearFilter:()=>s.LinearMipMapLinearFilter,NearestFilter:()=>s.NearestFilter,R32Format:()=>s.R32Format,RFormat:()=>s.RFormat,RGBAFormat:()=>s.RGBAFormat,Shading:()=>o.Shading,SpriteAlignment:()=>a.SpriteAlignment,TextureOperations:()=>l.TextureOperations,UnsignedByteType:()=>s.UnsignedByteType});var n=r("./src/WebGL/constants/Coloring.ts"),i=r("./src/WebGL/constants/Sides.ts"),o=r("./src/WebGL/constants/Shading.ts"),a=r("./src/WebGL/constants/SpriteAlignment.ts"),s=r("./src/WebGL/constants/TextureConstants.ts"),l=r("./src/WebGL/constants/TextureOperations.ts")},"./src/WebGL/core/EventDispatcher.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{EventDispatcher:()=>n});class n{constructor(){this.listeners={}}dispatchEvent(t){var e=this.listeners[t.type];if(void 0!==e){t.target=this;for(var r=0,n=e.length;r{"use strict";r.r(e),r.d(e,{Geometry:()=>l,GeometryGroup:()=>s,GeometryIDCount:()=>c});var n=r("./src/WebGL/materials/LineBasicMaterial.ts"),i=r("./src/WebGL/core/EventDispatcher.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/colors.ts");class s{constructor(t=0){this.vertexArray=null,this.colorArray=null,this.normalArray=null,this.radiusArray=null,this.faceArray=null,this.lineArray=null,this.vertices=0,this.faceidx=0,this.lineidx=0,this.__inittedArrays=!1,this.id=t}setColors(t){var e=this.vertexArray,r=this.colorArray;if(!e)throw new Error("vertex array not initialized");if(!r)throw new Error("color array not initialized");if(e.length==r.length)for(var n=0;n0?this.lineArray=(null==a?void 0:a.subarray(0,this.lineidx))||null:this.lineArray=new Uint16Array(0)):(this.normalArray=new Float32Array(0),this.faceArray=new Uint16Array(0),this.lineArray=new Uint16Array(0)),s&&(this.radiusArray=s.subarray(0,this.vertices)),e&&(this.normalArray&&(this.normalArray=new Float32Array(this.normalArray)),this.faceArray&&(this.faceArray=new Uint16Array(this.faceArray)),this.lineArray&&(this.lineArray=new Uint16Array(this.lineArray)),this.vertexArray&&(this.vertexArray=new Float32Array(this.vertexArray)),this.colorArray&&(this.colorArray=new Float32Array(this.colorArray)),this.radiusArray&&(this.radiusArray=new Float32Array(this.radiusArray))),this.__inittedArrays=!0}}class l extends i.EventDispatcher{constructor(t=!1,e=!1,r=!1){super(),this.name="",this.hasTangents=!1,this.dynamic=!0,this.verticesNeedUpdate=!1,this.elementsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.buffersNeedUpdate=!1,this.imposter=!1,this.instanced=!1,this.geometryGroups=[],this.groups=0,this.id=c++,this.mesh=t,this.radii=e,this.offset=r}updateGeoGroup(t=0){var e,r=this.groups>0?this.geometryGroups[this.groups-1]:null;return(!r||r.vertices+t>((null===(e=null==r?void 0:r.vertexArray)||void 0===e?void 0:e.length)||0)/3)&&(r=this.addGeoGroup()),r}vrml(t,e){for(var r="",n=this.geometryGroups.length,i=0;i{"use strict";r.r(e),r.d(e,{Light:()=>l,Object3D:()=>a,Object3DIDCount:()=>o,Scene:()=>s});var n=r("./src/WebGL/math/index.ts"),i=r("./src/colors.ts");let o=0;class a{constructor(){this.id=o++,this.name="",this.children=[],this.position=new n.Vector3,this.rotation=new n.Vector3,this.matrix=new n.Matrix4,this.matrixWorld=new n.Matrix4,this.quaternion=new n.Quaternion,this.eulerOrder="XYZ",this.up=new n.Vector3(0,1,0),this.scale=new n.Vector3(1,1,1),this.matrixAutoUpdate=!0,this.matrixWorldNeedsUpdate=!0,this.rotationAutoUpdate=!0,this.useQuaternion=!1,this.visible=!0}lookAt(t){this.matrix.lookAt(t,this.position,this.up),this.rotationAutoUpdate&&(!0===this.useQuaternion?console.error("Unimplemented math operation."):this.rotation instanceof n.Vector3&&this.rotation.setEulerFromRotationMatrix(this.matrix,this.eulerOrder))}add(t){if(t!==this){t.parent=this,this.children.push(t);for(var e=this;void 0!==e.parent;)e=e.parent;void 0!==e&&e instanceof s&&e.__addObject(t)}else console.error("Can't add $3Dmol.Object3D to itself")}remove(t){var e=this.children.indexOf(t);if(-1!==e){t.parent=void 0,this.children.splice(e,1);for(var r=this;void 0!==r.parent;)r=r.parent;void 0!==r&&r instanceof s&&r.__removeObject(t)}}vrml(t){t||(t=" ");var e=2*Math.atan2(this.quaternion.lengthxyz(),this.quaternion.w),r=0,n=0,i=0;if(0!=e){let t=Math.sin(e/2);r=this.quaternion.x/t,n=this.quaternion.y/t,i=this.quaternion.z/t}var o=t+"Transform {\n"+t+" center "+this.position.x+" "+this.position.y+" "+this.position.z+"\n"+t+" rotation "+r+" "+n+" "+i+" "+e+"\n"+t+" children [\n";this.geometry&&(o+=this.geometry.vrml(t,this.material));for(var a=0;a{"use strict";r.r(e),r.d(e,{Projector:()=>i});const n=new(r("./src/WebGL/math/index.ts").Matrix4);class i{static unprojectVector(t,e){return e.projectionMatrixInverse.getInverse(e.projectionMatrix),n.multiplyMatrices(e.matrixWorld,e.projectionMatrixInverse),t.applyProjection(n)}static projectVector(t,e){return e.matrixWorldInverse.getInverse(e.matrixWorld),n.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),t.applyProjection(n)}projectVector(t,e){return i.projectVector(t,e)}unprojectVector(t,e){return i.unprojectVector(t,e)}}},"./src/WebGL/core/Raycaster.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Raycaster:()=>s,intersectObject:()=>v});var n=r("./src/WebGL/math/index.ts"),i=r("./src/WebGL/shapes/index.ts");const o=(t,e)=>t.distance-e.distance,a=new n.Matrix4;class s{constructor(t,e,r,i){this.precision=1e-4,this.linePrecision=.2,this.ray=new n.Ray(t,e),this.ray.direction.lengthSq()>0&&this.ray.direction.normalize(),this.near=i||0,this.far=r||1/0}set(t,e){this.ray.set(t,e)}setFromCamera(t,e){e.ortho?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,t.z),e.projectionMatrixInverse.getInverse(e.projectionMatrix),a.multiplyMatrices(e.matrixWorld,e.projectionMatrixInverse),this.ray.direction.applyProjection(a),this.ray.direction.sub(this.ray.origin).normalize())}intersectObjects(t,e){for(var r=[],n=0,i=e.length;nMath.min(Math.max(t,-1),1);var c=new i.Sphere,u=new i.Cylinder,h=new i.Triangle,d=new n.Vector3,f=new n.Vector3,p=new n.Vector3,m=new n.Vector3,g=new n.Vector3;function v(t,e,r,n){if(g.getPositionFromMatrix(t.matrixWorld),void 0===e.intersectionShape)return n;var o,a,s,v,b,y,x,_,w,k,A,M,T,S,C=e.intersectionShape,E=r.linePrecision,L=(E*=t.matrixWorld.getMaxScaleOnAxis())*E;if(void 0!==e.boundingSphere&&e.boundingSphere instanceof i.Sphere&&(c.copy(e.boundingSphere),c.applyMatrix4(t.matrixWorld),!r.ray.isIntersectionSphere(c)))return n;for(o=0,a=C.triangle.length;o=0)continue;if(d.subVectors(h.a,r.ray.origin),(x=s.dot(d)/v)<0)continue;f.copy(r.ray.direction).multiplyScalar(x).add(r.ray.origin),f.sub(h.a),p.copy(h.b).sub(h.a),m.copy(h.c).sub(h.a);var z=p.dot(m),O=p.lengthSq(),D=m.lengthSq();if((M=(O*f.dot(m)-z*f.dot(p))/(O*D-z*z))<0||M>1)continue;if((A=(f.dot(p)-M*z)/O)<0||A>1||A+M>1)continue;n.push({clickable:e,distance:x})}for(o=0,a=C.cylinder.length;ou.lengthSq()||M<0)continue;n.push({clickable:e,distance:x})}}for(o=0,a=C.line.length;o{"use strict";r.r(e),r.d(e,{Texture:()=>s,TextureIdCount:()=>l});var n=r("./src/WebGL/constants/TextureConstants.ts"),i=r("./src/WebGL/math/index.ts"),o=r("./src/WebGL/core/EventDispatcher.ts"),a=r("./src/WebGL/core/UVMapping.ts");class s extends o.EventDispatcher{constructor(t,e){super(),this.id=l++,this.name="",this.image=t,this.mapping=new a.UVMapping,this.wrapS=n.ClampToEdgeWrapping,this.wrapT=n.ClampToEdgeWrapping,this.anisotropy=1,e?(this.format=n.RFormat,this.type=n.FloatType,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.magFilter=n.NearestFilter,this.minFilter=n.NearestFilter):(this.format=n.RGBAFormat,this.type=n.UnsignedByteType,this.offset=new i.Vector2(0,0),this.repeat=new i.Vector2(1,1),this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.magFilter=n.LinearFilter,this.minFilter=n.LinearMipMapLinearFilter),this.needsUpdate=!1,this.onUpdate=null}clone(t=new s){return t.image=this.image,t.mapping=this.mapping,t.wrapS=this.wrapS,t.wrapT=this.wrapT,t.magFilter=this.magFilter,t.minFilter=this.minFilter,t.anisotropy=this.anisotropy,t.format=this.format,t.type=this.type,t.offset.copy(this.offset),t.repeat.copy(this.repeat),t.premultiplyAlpha=this.premultiplyAlpha,t.flipY=this.flipY,t.unpackAlignment=this.unpackAlignment,t}dispose(){this.dispatchEvent({type:"dispose"})}}let l=0},"./src/WebGL/core/UVMapping.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{UVMapping:()=>n});class n{}},"./src/WebGL/core/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{EventDispatcher:()=>n.EventDispatcher,Geometry:()=>i.Geometry,GeometryGroup:()=>i.GeometryGroup,GeometryIDCount:()=>i.GeometryIDCount,Light:()=>o.Light,Object3D:()=>o.Object3D,Object3DIDCount:()=>o.Object3DIDCount,Projector:()=>a.Projector,Raycaster:()=>s.Raycaster,Scene:()=>o.Scene,Texture:()=>l.Texture,TextureIdCount:()=>l.TextureIdCount,UVMapping:()=>c.UVMapping,intersectObject:()=>s.intersectObject});var n=r("./src/WebGL/core/EventDispatcher.ts"),i=r("./src/WebGL/core/Geometry.ts"),o=r("./src/WebGL/core/Object3D.ts"),a=r("./src/WebGL/core/Projector.ts"),s=r("./src/WebGL/core/Raycaster.ts"),l=r("./src/WebGL/core/Texture.ts"),c=r("./src/WebGL/core/UVMapping.ts")},"./src/WebGL/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BackSide:()=>n.BackSide,Camera:()=>u.Camera,ClampToEdgeWrapping:()=>n.ClampToEdgeWrapping,Coloring:()=>n.Coloring,Cylinder:()=>c.Cylinder,DoubleSide:()=>n.DoubleSide,EventDispatcher:()=>i.EventDispatcher,FloatType:()=>n.FloatType,Fog:()=>h.Fog,FrontSide:()=>n.FrontSide,Geometry:()=>i.Geometry,GeometryGroup:()=>i.GeometryGroup,GeometryIDCount:()=>i.GeometryIDCount,ImposterMaterial:()=>o.ImposterMaterial,InstancedMaterial:()=>o.InstancedMaterial,Light:()=>i.Light,Line:()=>s.Line,LineBasicMaterial:()=>o.LineBasicMaterial,LineStyle:()=>s.LineStyle,LinearFilter:()=>n.LinearFilter,LinearMipMapLinearFilter:()=>n.LinearMipMapLinearFilter,Material:()=>o.Material,MaterialIdCount:()=>o.MaterialIdCount,Matrix3:()=>a.Matrix3,Matrix4:()=>a.Matrix4,Mesh:()=>s.Mesh,MeshDoubleLambertMaterial:()=>o.MeshDoubleLambertMaterial,MeshLambertMaterial:()=>o.MeshLambertMaterial,MeshOutlineMaterial:()=>o.MeshOutlineMaterial,NearestFilter:()=>n.NearestFilter,Object3D:()=>i.Object3D,Object3DIDCount:()=>i.Object3DIDCount,Projector:()=>i.Projector,Quaternion:()=>a.Quaternion,R32Format:()=>n.R32Format,RFormat:()=>n.RFormat,RGBAFormat:()=>n.RGBAFormat,Ray:()=>a.Ray,Raycaster:()=>i.Raycaster,Renderer:()=>d.Renderer,Scene:()=>i.Scene,ShaderLib:()=>l.ShaderLib,ShaderUtils:()=>l.ShaderUtils,Shading:()=>n.Shading,Sphere:()=>c.Sphere,SphereImposterMaterial:()=>o.SphereImposterMaterial,SphereImposterOutlineMaterial:()=>o.SphereImposterOutlineMaterial,Sprite:()=>s.Sprite,SpriteAlignment:()=>n.SpriteAlignment,SpriteMaterial:()=>o.SpriteMaterial,SpritePlugin:()=>f.SpritePlugin,StickImposterMaterial:()=>o.StickImposterMaterial,StickImposterOutlineMaterial:()=>o.StickImposterOutlineMaterial,Texture:()=>i.Texture,TextureIdCount:()=>i.TextureIdCount,TextureOperations:()=>n.TextureOperations,Triangle:()=>c.Triangle,UVMapping:()=>i.UVMapping,UnsignedByteType:()=>n.UnsignedByteType,Vector2:()=>a.Vector2,Vector3:()=>a.Vector3,VolumetricMaterial:()=>o.VolumetricMaterial,basic:()=>l.basic,clamp:()=>a.clamp,clone:()=>l.clone,conversionMatrix3:()=>a.conversionMatrix3,degToRad:()=>a.degToRad,instanced:()=>l.instanced,intersectObject:()=>i.intersectObject,lambert:()=>l.lambert,lambertdouble:()=>l.lambertdouble,outline:()=>l.outline,screen:()=>l.screen,screenaa:()=>l.screenaa,sphereimposter:()=>l.sphereimposter,sphereimposteroutline:()=>l.sphereimposteroutline,sprite:()=>l.sprite,stickimposter:()=>l.stickimposter,stickimposteroutline:()=>l.stickimposteroutline,volumetric:()=>l.volumetric});var n=r("./src/WebGL/constants/index.ts"),i=r("./src/WebGL/core/index.ts"),o=r("./src/WebGL/materials/index.ts"),a=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/objects/index.ts"),l=r("./src/WebGL/shaders/index.ts"),c=r("./src/WebGL/shapes/index.ts"),u=r("./src/WebGL/Camera.ts"),h=r("./src/WebGL/Fog.ts"),d=r("./src/WebGL/Renderer.ts"),f=r("./src/WebGL/SpritePlugin.ts")},"./src/WebGL/materials/ImposterMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ImposterMaterial:()=>l});var n=r("./src/WebGL/constants/Coloring.ts"),i=r("./src/WebGL/constants/Shading.ts"),o=r("./src/colors.ts"),a=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/materials/Material.ts");class l extends s.Material{constructor(t){super(),this.color=new o.Color(16777215),this.ambient=new o.Color(1048575),this.emissive=new o.Color(0),this.imposter=!0,this.wrapAround=!1,this.wrapRGB=new a.Vector3(1,1,1),this.map=void 0,this.lightMap=null,this.specularMap=null,this.envMap=null,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.shading=i.Shading.SmoothShading,this.shaderID=null,this.vertexColors=n.Coloring.NoColors,this.skinning=!1,this.setValues(t)}clone(t=new l){return super.clone.call(this,t),t.color.copy(this.color),t.ambient.copy(this.ambient),t.emissive.copy(this.emissive),t.wrapAround=this.wrapAround,t.wrapRGB.copy(this.wrapRGB),t.map=this.map,t.lightMap=this.lightMap,t.specularMap=this.specularMap,t.envMap=this.envMap,t.combine=this.combine,t.reflectivity=this.reflectivity,t.refractionRatio=this.refractionRatio,t.fog=this.fog,t.shading=this.shading,t.shaderID=this.shaderID,t.vertexColors=this.vertexColors,t.skinning=this.skinning,t.morphTargets=this.morphTargets,t.morphNormals=this.morphNormals,t}}},"./src/WebGL/materials/InstancedMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{InstancedMaterial:()=>l});var n=r("./src/WebGL/constants/Coloring.ts"),i=r("./src/WebGL/constants/Shading.ts"),o=r("./src/colors.ts"),a=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/materials/Material.ts");class l extends s.Material{constructor(t){super(),this.color=new o.Color(16777215),this.ambient=new o.Color(1048575),this.emissive=new o.Color(0),this.wrapAround=!1,this.wrapRGB=new a.Vector3(1,1,1),this.map=void 0,this.lightMap=null,this.specularMap=null,this.envMap=null,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.shading=i.Shading.SmoothShading,this.shaderID="instanced",this.vertexColors=n.Coloring.NoColors,this.skinning=!1,this.sphere=null,this.setValues(t)}clone(t=new l){return super.clone.call(this,t),t.color.copy(this.color),t.ambient.copy(this.ambient),t.emissive.copy(this.emissive),t.wrapAround=this.wrapAround,t.wrapRGB.copy(this.wrapRGB),t.map=this.map,t.lightMap=this.lightMap,t.specularMap=this.specularMap,t.envMap=this.envMap,t.combine=this.combine,t.reflectivity=this.reflectivity,t.refractionRatio=this.refractionRatio,t.fog=this.fog,t.shading=this.shading,t.shaderID=this.shaderID,t.vertexColors=this.vertexColors,t.skinning=this.skinning,t.morphTargets=this.morphTargets,t.morphNormals=this.morphNormals,t.sphere=this.sphere,t}}},"./src/WebGL/materials/LineBasicMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{LineBasicMaterial:()=>o});var n=r("./src/colors.ts"),i=r("./src/WebGL/materials/Material.ts");class o extends i.Material{constructor(t){super(),this.color=new n.Color(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.vertexColors=!1,this.fog=!0,this.shaderID="basic",this.setValues(t)}clone(t=new o){return super.clone.call(this,t),t.color.copy(this.color),t}}},"./src/WebGL/materials/Material.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Material:()=>s,MaterialIdCount:()=>l});var n=r("./src/WebGL/constants/Sides.ts"),i=r("./src/WebGL/core/index.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/colors.ts");class s extends i.EventDispatcher{constructor(){super(...arguments),this.id=l++,this.name="",this.side=n.FrontSide,this.opacity=1,this.transparent=!1,this.depthTest=!0,this.depthWrite=!0,this.stencilTest=!0,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.alphaTest=0,this.visible=!0,this.needsUpdate=!0,this.outline=!1,this.wireframe=!1}setValues(t={}){if(void 0!==t)for(var e in t){var r=t[e];if(void 0!==r){if(e in this){var n=this[e];n instanceof a.Color&&r instanceof a.Color?n.copy(r):n instanceof a.Color?n.set(r):n instanceof o.Vector3&&r instanceof o.Vector3?n.copy(r):this[e]=r}}else console.warn("$3Dmol.Material: '"+e+"' parameter is undefined.")}}clone(t=new s){return t.name=this.name,t.side=this.side,t.opacity=this.opacity,t.transparent=this.transparent,t.depthTest=this.depthTest,t.depthWrite=this.depthWrite,t.stencilTest=this.stencilTest,t.polygonOffset=this.polygonOffset,t.polygonOffsetFactor=this.polygonOffsetFactor,t.polygonOffsetUnits=this.polygonOffsetUnits,t.alphaTest=this.alphaTest,t.overdraw=this.overdraw,t.visible=this.visible,t}dispose(){this.dispatchEvent({type:"dispose"})}}let l=0},"./src/WebGL/materials/MeshDoubleLambertMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{MeshDoubleLambertMaterial:()=>o});var n=r("./src/WebGL/constants/Sides.ts"),i=r("./src/WebGL/materials/MeshLambertMaterial.ts");class o extends i.MeshLambertMaterial{constructor(t){super(t),this.shaderID="lambertdouble",this.side=n.DoubleSide,this.outline=!1}clone(t=new o){return super.clone.call(this,t),t}}},"./src/WebGL/materials/MeshLambertMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{MeshLambertMaterial:()=>l});var n=r("./src/WebGL/constants/Coloring.ts"),i=r("./src/WebGL/constants/Shading.ts"),o=r("./src/WebGL/materials/Material.ts"),a=r("./src/colors.ts"),s=r("./src/WebGL/math/index.ts");class l extends o.Material{constructor(t){super(),this.color=new a.Color(16777215),this.ambient=new a.Color(1048575),this.emissive=new a.Color(0),this.wrapAround=!1,this.wrapRGB=new s.Vector3(1,1,1),this.map=void 0,this.lightMap=null,this.specularMap=null,this.envMap=null,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.shading=i.Shading.SmoothShading,this.shaderID="lambert",this.vertexColors=n.Coloring.NoColors,this.skinning=!1,this.setValues(t)}clone(t=new l){return super.clone.call(this,t),t.color.copy(this.color),t.ambient.copy(this.ambient),t.emissive.copy(this.emissive),t.wrapAround=this.wrapAround,t.wrapRGB.copy(this.wrapRGB),t.map=this.map,t.lightMap=this.lightMap,t.specularMap=this.specularMap,t.envMap=this.envMap,t.combine=this.combine,t.reflectivity=this.reflectivity,t.refractionRatio=this.refractionRatio,t.fog=this.fog,t.shading=this.shading,t.shaderID=this.shaderID,t.vertexColors=this.vertexColors,t.skinning=this.skinning,t.morphTargets=this.morphTargets,t.morphNormals=this.morphNormals,t}}},"./src/WebGL/materials/MeshOutlineMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{MeshOutlineMaterial:()=>o});var n=r("./src/colors.ts"),i=r("./src/WebGL/materials/Material.ts");class o extends i.Material{constructor(t){super(),t=t||{},this.fog=!0,this.shaderID="outline",this.wireframe=!1,this.outlineColor=t.color||new n.Color(0,0,0),this.outlineWidth=t.width||.1,this.outlinePushback=t.pushback||1}clone(t=new o){return super.clone.call(this,t),t.fog=this.fog,t.shaderID=this.shaderID,t.wireframe=this.wireframe,t}}},"./src/WebGL/materials/SphereImposterMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SphereImposterMaterial:()=>i});var n=r("./src/WebGL/materials/ImposterMaterial.ts");class i extends n.ImposterMaterial{constructor(t){super(t),this.shaderID="sphereimposter",this.setValues(t)}clone(t=new i){return super.clone.call(this,t),t}}},"./src/WebGL/materials/SphereImposterOutlineMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SphereImposterOutlineMaterial:()=>o});var n=r("./src/colors.ts"),i=r("./src/WebGL/materials/ImposterMaterial.ts");class o extends i.ImposterMaterial{constructor(t){super(t),t=t||{},this.shaderID="sphereimposteroutline",this.outlineColor=t.color||new n.Color(0,0,0),this.outlineWidth=t.width||.1,this.outlinePushback=t.pushback||1,this.setValues(t)}clone(t=new o){return super.clone.call(this,t),t.outlineColor=this.outlineColor,t.outlineWidth=this.outlineWidth,t.outlinePushback=this.outlinePushback,t}}},"./src/WebGL/materials/SpriteMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SpriteMaterial:()=>l});var n=r("./src/WebGL/constants/SpriteAlignment.ts"),i=r("./src/WebGL/core/Texture.ts"),o=r("./src/colors.ts"),a=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/materials/Material.ts");class l extends s.Material{constructor(t){super(),this.color=new o.Color(16777215),this.map=new i.Texture,this.useScreenCoordinates=!0,this.fog=!1,this.uvOffset=new a.Vector2(0,0),this.uvScale=new a.Vector2(1,1),this.depthTest=!this.useScreenCoordinates,this.sizeAttenuation=!this.useScreenCoordinates,this.screenOffset=this.screenOffset,this.scaleByViewPort=!this.sizeAttenuation,this.alignment=n.SpriteAlignment.center.clone(),this.setValues(t),void 0===(t=t||{}).depthTest&&(this.depthTest=!this.useScreenCoordinates),void 0===t.sizeAttenuation&&(this.sizeAttenuation=!this.useScreenCoordinates),void 0===t.scaleByViewPort&&(this.scaleByViewPort=!this.sizeAttenuation)}clone(t=new l){return super.clone.call(this,t),t.color.copy(this.color),t.map=this.map,t.useScreenCoordinates=this.useScreenCoordinates,t.screenOffset=this.screenOffset,t.sizeAttenuation=this.sizeAttenuation,t.scaleByViewport=this.scaleByViewPort,t.alignment.copy(this.alignment),t.uvOffset.copy(this.uvOffset),t}}},"./src/WebGL/materials/StickImposterMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{StickImposterMaterial:()=>i});var n=r("./src/WebGL/materials/ImposterMaterial.ts");class i extends n.ImposterMaterial{constructor(t){super(t),this.shaderID="stickimposter",this.setValues(t)}clone(t=new i){return super.clone.call(this,t),t}}},"./src/WebGL/materials/StickImposterOutlineMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{StickImposterOutlineMaterial:()=>o});var n=r("./src/colors.ts"),i=r("./src/WebGL/materials/ImposterMaterial.ts");class o extends i.ImposterMaterial{constructor(t={}){super(t),this.shaderID="stickimposteroutline",this.outlineColor=new n.Color(0,0,0),this.outlineWidth=.1,this.outlinePushback=1,t.color&&(this.outlineColor=t.color),t.width&&(this.outlineWidth=t.width),t.pushback&&(this.outlinePushback=t.pushback),this.setValues(t)}clone(t=new o){return super.clone.call(this,t),t.outlineColor=this.outlineColor,t.outlineWidth=this.outlineWidth,t.outlinePushback=this.outlinePushback,t}}},"./src/WebGL/materials/VolumetricMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{VolumetricMaterial:()=>a});var n=r("./src/WebGL/constants/Sides.ts"),i=r("./src/colors.ts"),o=r("./src/WebGL/materials/Material.ts");class a extends o.Material{constructor(t){super(),this.transparent=!1,this.volumetric=!0,this.color=new i.Color(16777215),this.transferfn=null,this.map=void 0,this.extent=[],this.maxdepth=100,this.unit=0,this.texmatrix=null,this.transfermin=-1,this.transfermax=1,this.subsamples=5,this.shaderID="volumetric",this.side=n.FrontSide,this.setValues(t)}clone(t=new a){return super.clone.call(this,t),t.transparent=this.transparent,t.volumetric=this.volumetric,t.color=this.color,t.transferfn=this.transferfn,t.map=this.map,t.extent=this.extent,t.maxdepth=this.maxdepth,t.unit=this.unit,t.texmatrix=this.texmatrix,t.transfermin=this.transfermin,t.transfermax=this.transfermax,t.subsamples=this.subsamples,t.shaderID=this.shaderID,t.side=this.side,t}}},"./src/WebGL/materials/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ImposterMaterial:()=>n.ImposterMaterial,InstancedMaterial:()=>i.InstancedMaterial,LineBasicMaterial:()=>o.LineBasicMaterial,Material:()=>a.Material,MaterialIdCount:()=>a.MaterialIdCount,MeshDoubleLambertMaterial:()=>s.MeshDoubleLambertMaterial,MeshLambertMaterial:()=>l.MeshLambertMaterial,MeshOutlineMaterial:()=>c.MeshOutlineMaterial,SphereImposterMaterial:()=>u.SphereImposterMaterial,SphereImposterOutlineMaterial:()=>h.SphereImposterOutlineMaterial,SpriteMaterial:()=>d.SpriteMaterial,StickImposterMaterial:()=>f.StickImposterMaterial,StickImposterOutlineMaterial:()=>p.StickImposterOutlineMaterial,VolumetricMaterial:()=>m.VolumetricMaterial});var n=r("./src/WebGL/materials/ImposterMaterial.ts"),i=r("./src/WebGL/materials/InstancedMaterial.ts"),o=r("./src/WebGL/materials/LineBasicMaterial.ts"),a=r("./src/WebGL/materials/Material.ts"),s=r("./src/WebGL/materials/MeshDoubleLambertMaterial.ts"),l=r("./src/WebGL/materials/MeshLambertMaterial.ts"),c=r("./src/WebGL/materials/MeshOutlineMaterial.ts"),u=r("./src/WebGL/materials/SphereImposterMaterial.ts"),h=r("./src/WebGL/materials/SphereImposterOutlineMaterial.ts"),d=r("./src/WebGL/materials/SpriteMaterial.ts"),f=r("./src/WebGL/materials/StickImposterMaterial.ts"),p=r("./src/WebGL/materials/StickImposterOutlineMaterial.ts"),m=r("./src/WebGL/materials/VolumetricMaterial.ts")},"./src/WebGL/math/Quaternion.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Quaternion:()=>n});class n{constructor(t,e,r,n){this.x=t||0,this.y=e||0,this.z=r||0,this.w=void 0!==n?n:1}set(t,e,r,n){return this.x=t,this.y=e,this.z=r,this.w=n,this}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this}conjugate(){return this.x*=-1,this.y*=-1,this.z*=-1,this}inverse(){return this.conjugate().normalize()}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}lengthxyz(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}normalize(){let t=this.length();return 0===t?(this.x=0,this.y=0,this.z=0,this.w=1):(t=1/t,this.x*=t,this.y*=t,this.z*=t,this.w*=t),this}multiply(t){return this.multiplyQuaternions(this,t)}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}multiplyQuaternions(t,e){const r=t.x,n=t.y,i=t.z,o=t.w,a=e.x,s=e.y,l=e.z,c=e.w;return this.x=r*c+o*a+n*l-i*s,this.y=n*c+o*s+i*a-r*l,this.z=i*c+o*l+r*s-n*a,this.w=o*c-r*a-n*s-i*l,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}clone(){return new n(this.x,this.y,this.z,this.w)}setFromEuler(t){const e=Math.cos(t.x/2),r=Math.cos(t.y/2),n=Math.cos(t.z/2),i=Math.sin(t.x/2),o=Math.sin(t.y/2),a=Math.sin(t.z/2);return this.x=i*r*n+e*o*a,this.y=e*o*n-i*r*a,this.z=e*r*a+i*o*n,this.w=e*r*n-i*o*a,this}}},"./src/WebGL/math/Vector2.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Vector2:()=>n});class n{constructor(t,e){this.x=t||0,this.y=e||0}set(t,e){return this.x=t,this.y=e,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}copy(t){return this.x=t.x,this.y=t.y,this}clone(){return new n(this.x,this.y)}}},"./src/WebGL/math/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Matrix3:()=>l.Matrix3,Matrix4:()=>l.Matrix4,Quaternion:()=>n.Quaternion,Ray:()=>l.Ray,Vector2:()=>i.Vector2,Vector3:()=>l.Vector3,clamp:()=>o.clamp,conversionMatrix3:()=>a.conversionMatrix3,degToRad:()=>s.degToRad});var n=r("./src/WebGL/math/Quaternion.ts"),i=r("./src/WebGL/math/Vector2.ts"),o=r("./src/WebGL/math/utils/clamp.ts"),a=r("./src/WebGL/math/utils/conversionMatrix3.ts"),s=r("./src/WebGL/math/utils/degToRad.ts"),l=r("./src/WebGL/math/math.ts")},"./src/WebGL/math/math.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Matrix3:()=>d,Matrix4:()=>u,Ray:()=>f,Vector3:()=>h});var n,i,o,a,s,l=r("./src/WebGL/math/utils/degToRad.ts"),c=r("./src/WebGL/math/utils/clamp.ts");class u{constructor(t=1,e=0,r=0,n=0,i=0,o=1,a=0,s=0,l=0,c=0,u=1,h=0,d=0,f=0,p=0,m=1){void 0!==t&&"number"!=typeof t?this.elements=new Float32Array(t):(this.elements=new Float32Array(16),this.elements[0]=t,this.elements[4]=e,this.elements[8]=r,this.elements[12]=n,this.elements[1]=i,this.elements[5]=o,this.elements[9]=a,this.elements[13]=s,this.elements[2]=l,this.elements[6]=c,this.elements[10]=u,this.elements[14]=h,this.elements[3]=d,this.elements[7]=f,this.elements[11]=p,this.elements[15]=m)}makeScale(t,e,r){throw new Error("Method not implemented.")}set(t,e,r,n,i,o,a,s,l,c,u,h,d,f,p,m){const g=this.elements;return g[0]=t,g[4]=e,g[8]=r,g[12]=n,g[1]=i,g[5]=o,g[9]=a,g[13]=s,g[2]=l,g[6]=c,g[10]=u,g[14]=h,g[3]=d,g[7]=f,g[11]=p,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}copy(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15]),this}matrix3FromTopLeft(){const t=this.elements;return new d(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10])}setRotationFromEuler(t,e){const r=this.elements,{x:n,y:i,z:o}=t,a=Math.cos(n),s=Math.sin(n),l=Math.cos(i),c=Math.sin(i),u=Math.cos(o),h=Math.sin(o);if(void 0===e||"XYZ"===e){const t=a*u,e=a*h,n=s*u,i=s*h;r[0]=l*u,r[4]=-l*h,r[8]=c,r[1]=e+n*c,r[5]=t-i*c,r[9]=-s*l,r[2]=i-t*c,r[6]=n+e*c,r[10]=a*l}else console.error(`Error with matrix4 setRotationFromEuler. Order: ${e}`);return this}setRotationFromQuaternion(t){const e=this.elements,{x:r,y:n,z:i,w:o}=t,a=r+r,s=n+n,l=i+i,c=r*a,u=r*s,h=r*l,d=n*s,f=n*l,p=i*l,m=o*a,g=o*s,v=o*l;return e[0]=1-(d+p),e[4]=u-v,e[8]=h+g,e[1]=u+v,e[5]=1-(c+p),e[9]=f-m,e[2]=h-g,e[6]=f+m,e[10]=1-(c+d),this}multiplyMatrices(t,e){const r=t.elements,n=e.elements,i=this.elements,o=r[0],a=r[4],s=r[8],l=r[12],c=r[1],u=r[5],h=r[9],d=r[13],f=r[2],p=r[6],m=r[10],g=r[14],v=r[3],b=r[7],y=r[11],x=r[15],_=n[0],w=n[4],k=n[8],A=n[12],M=n[1],T=n[5],S=n[9],C=n[13],E=n[2],L=n[6],z=n[10],O=n[14],D=n[3],I=n[7],F=n[11],R=n[15];return i[0]=o*_+a*M+s*E+l*D,i[4]=o*w+a*T+s*L+l*I,i[8]=o*k+a*S+s*z+l*F,i[12]=o*A+a*C+s*O+l*R,i[1]=c*_+u*M+h*E+d*D,i[5]=c*w+u*T+h*L+d*I,i[9]=c*k+u*S+h*z+d*F,i[13]=c*A+u*C+h*O+d*R,i[2]=f*_+p*M+m*E+g*D,i[6]=f*w+p*T+m*L+g*I,i[10]=f*k+p*S+m*z+g*F,i[14]=f*A+p*C+m*O+g*R,i[3]=v*_+b*M+y*E+x*D,i[7]=v*w+b*T+y*L+x*I,i[11]=v*k+b*S+y*z+x*F,i[15]=v*A+b*C+y*O+x*R,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}makeTranslation(t,e,r){return this.set(1,0,0,t,0,1,0,e,0,0,1,r,0,0,0,1),this}snap(t){t||(t=4);const e=Math.pow(10,4),r=this.elements;for(let t=0;t<16;t++){const n=Math.round(r[t]);n===Math.round(r[t]*e)/e&&(r[t]=n)}return this}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t){const e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this}translate(t){const e=this.elements;return e[12]+=t.x,e[13]+=t.y,e[14]+=t.z,this}getInverse(t,e){const r=this.elements,n=t.elements,i=n[0],o=n[4],a=n[8],s=n[12],l=n[1],c=n[5],u=n[9],h=n[13],d=n[2],f=n[6],p=n[10],m=n[14],g=n[3],v=n[7],b=n[11],y=n[15];r[0]=u*m*v-h*p*v+h*f*b-c*m*b-u*f*y+c*p*y,r[4]=s*p*v-a*m*v-s*f*b+o*m*b+a*f*y-o*p*y,r[8]=a*h*v-s*u*v+s*c*b-o*h*b-a*c*y+o*u*y,r[12]=s*u*f-a*h*f-s*c*p+o*h*p+a*c*m-o*u*m,r[1]=h*p*g-u*m*g-h*d*b+l*m*b+u*d*y-l*p*y,r[5]=a*m*g-s*p*g+s*d*b-i*m*b-a*d*y+i*p*y,r[9]=s*u*g-a*h*g-s*l*b+i*h*b+a*l*y-i*u*y,r[13]=a*h*d-s*u*d+s*l*p-i*h*p-a*l*m+i*u*m,r[2]=c*m*g-h*f*g+h*d*v-l*m*v-c*d*y+l*f*y,r[6]=s*f*g-o*m*g-s*d*v+i*m*v+o*d*y-i*f*y,r[10]=o*h*g-s*c*g+s*l*v-i*h*v-o*l*y+i*c*y,r[14]=s*c*d-o*h*d-s*l*f+i*h*f+o*l*m-i*c*m,r[3]=u*f*g-c*p*g-u*d*v+l*p*v+c*d*b-l*f*b,r[7]=o*p*g-a*f*g+a*d*v-i*p*v-o*d*b+i*f*b,r[11]=a*c*g-o*u*g-a*l*v+i*u*v+o*l*b-i*c*b,r[15]=o*u*d-a*c*d+a*l*f-i*u*f-o*l*p+i*c*p;const x=i*r[0]+l*r[4]+d*r[8]+g*r[12];if(0===x){const t="Matrix4.getInverse(): can't invert matrix, determinant is 0";if(e)throw new Error(t);return console.warn(t),this.identity(),this}return this.multiplyScalar(1/x),this}isReflected(){const t=this.elements,e=t[0],r=t[4],n=t[8],i=t[1],o=t[5],a=t[9],s=t[2],l=t[6],c=t[10];return e*o*c+i*l*n+s*r*a-s*o*n-i*r*c-e*l*a<0}scale(t){const e=this.elements,{x:r}=t,{y:n}=t,{z:i}=t;return e[0]*=r,e[4]*=n,e[8]*=i,e[1]*=r,e[5]*=n,e[9]*=i,e[2]*=r,e[6]*=n,e[10]*=i,e[3]*=r,e[7]*=n,e[11]*=i,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,Math.max(r,n)))}makeFrustum(t,e,r,n,i,o){const a=this.elements,s=2*i/(e-t),l=2*i/(n-r),c=(e+t)/(e-t),u=(n+r)/(n-r),h=-(o+i)/(o-i),d=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=l,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=d,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makePerspective(t,e,r,n){const i=r*Math.tan((0,l.degToRad)(.5*t)),o=-i,a=o*e,s=i*e;return this.makeFrustum(a,s,o,i,r,n)}makeOrthographic(t,e,r,n,i,o){const a=this.elements,s=1/(e-t),l=1/(r-n),c=1/(o-i),u=(e+t)*s,h=(r+n)*l,d=(o+i)*c;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}isEqual(t){const e=t.elements,r=this.elements;return r[0]===e[0]&&r[4]===e[4]&&r[8]===e[8]&&r[12]===e[12]&&r[1]===e[1]&&r[5]===e[5]&&r[9]===e[9]&&r[13]===e[13]&&r[2]===e[2]&&r[6]===e[6]&&r[10]===e[10]&&r[14]===e[14]&&r[3]===e[3]&&r[7]===e[7]&&r[11]===e[11]&&r[15]===e[15]}clone(){const t=this.elements;return new u(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])}isIdentity(){const t=this.elements;return 1===t[0]&&0===t[4]&&0===t[8]&&0===t[12]&&0===t[1]&&1===t[5]&&0===t[9]&&0===t[13]&&0===t[2]&&0===t[6]&&1===t[10]&&0===t[14]&&0===t[3]&&0===t[7]&&0===t[11]&&1===t[15]}isNearlyIdentity(t){return this.clone().snap(t).isIdentity()}getScale(t){const e=this.elements;return t=t||new h,o.set(e[0],e[1],e[2]),a.set(e[4],e[5],e[6]),s.set(e[8],e[9],e[10]),t.x=o.length(),t.y=a.length(),t.z=s.length(),t}lookAt(t,e,r){const n=this.elements;return s.subVectors(t,e).normalize(),0===s.length()&&(s.z=1),o.crossVectors(r,s).normalize(),0===o.length()&&(s.x+=1e-4,o.crossVectors(r,s).normalize()),a.crossVectors(s,o),n[0]=o.x,n[4]=a.x,n[8]=s.x,n[1]=o.y,n[5]=a.y,n[9]=s.y,n[2]=o.z,n[6]=a.z,n[10]=s.z,this}compose(t,e,r){const o=this.elements;return n.identity(),n.setRotationFromQuaternion(e),i.makeScale(r.x,r.y,r.z),this.multiplyMatrices(n,i),o[12]=t.x,o[13]=t.y,o[14]=t.z,this}}n=new u,i=new u;class h{constructor(t,e,r){this.x=t||0,this.y=e||0,this.z=r||0,this.atomid=void 0}set(t,e,r){return this.x=t,this.y=e,this.z=r,this}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}divideScalar(t){return 0!==t?(this.x/=t,this.y/=t,this.z/=t):(this.x=0,this.y=0,this.z=0),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,r=this.y-t.y,n=this.z-t.z;return e*e+r*r+n*n}applyMatrix3(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.elements;return this.x=i[0]*e+i[3]*r+i[6]*n,this.y=i[1]*e+i[4]*r+i[7]*n,this.z=i[2]*e+i[5]*r+i[8]*n,this}applyMatrix4(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.elements;return this.x=i[0]*e+i[4]*r+i[8]*n+i[12],this.y=i[1]*e+i[5]*r+i[9]*n+i[13],this.z=i[2]*e+i[6]*r+i[10]*n+i[14],this}applyProjection(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.elements,o=i[3]*e+i[7]*r+i[11]*n+i[15];return this.x=(i[0]*e+i[4]*r+i[8]*n+i[12])/o,this.y=(i[1]*e+i[5]*r+i[9]*n+i[13])/o,this.z=(i[2]*e+i[6]*r+i[10]*n+i[14])/o,this}applyQuaternion(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.x,o=t.y,a=t.z,s=t.w,l={};l.x=2*(r*a-n*o),l.y=2*(n*i-e*a),l.z=2*(e*o-r*i);const c={};return c.x=l.y*a-l.z*o,c.y=l.z*i-l.x*a,c.z=l.x*o-l.y*i,this.x=e+s*l.x+c.x,this.y=r+s*l.y+c.y,this.z=n+s*l.z+c.z,this}negate(){return this.multiplyScalar(-1)}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}normalize(){return this.divideScalar(this.length())}cross(t){const{x:e}=this,{y:r}=this,{z:n}=this;return this.x=r*t.z-n*t.y,this.y=n*t.x-e*t.z,this.z=e*t.y-r*t.x,this}crossVectors(t,e){return this.x=t.y*e.z-t.z*e.y,this.y=t.z*e.x-t.x*e.z,this.z=t.x*e.y-t.y*e.x,this}equals(t){return this.x==t.x&&this.y==t.y&&this.z==t.z}getPositionFromMatrix(t){return this.x=t.elements[12],this.y=t.elements[13],this.z=t.elements[14],this}setEulerFromRotationMatrix(t,e){const r=t.elements,n=r[0],i=r[4],o=r[8],a=r[5],s=r[9],l=r[6],u=r[10];return void 0===e||"XYZ"===e?(this.y=Math.asin((0,c.clamp)(o,-1,1)),Math.abs(o)<.99999?(this.x=Math.atan2(-s,u),this.z=Math.atan2(-i,n)):(this.x=Math.atan2(l,a),this.z=0)):console.error(`Error with vector's setEulerFromRotationMatrix: Unknown order: ${e}`),this}rotateAboutVector(t,e){t.normalize();const r=Math.cos(e),n=Math.sin(e),i=this.clone().multiplyScalar(r),o=t.clone().cross(this).multiplyScalar(n),a=t.clone().multiplyScalar(t.clone().dot(this)).multiplyScalar(1-r),s=i.add(o).add(a);return this.x=s.x,this.y=s.y,this.z=s.z,this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}transformDirection(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.elements;return this.x=i[0]*e+i[4]*r+i[8]*n,this.y=i[1]*e+i[5]*r+i[9]*n,this.z=i[2]*e+i[6]*r+i[10]*n,this.normalize()}clone(){return new h(this.x,this.y,this.z)}unproject(t){const e=n;return e.multiplyMatrices(t.matrixWorld,e.getInverse(t.projectionMatrix)),this.applyMatrix4(e)}}o=new h,a=new h,s=new h;class d{constructor(t=1,e=0,r=0,n=0,i=1,o=0,a=0,s=0,l=1){this.elements=new Float32Array(9),this.set(t,e,r,n,i,o,a,s,l)}set(t,e,r,n,i,o,a,s,l){const c=this.elements;return c[0]=t,c[3]=e,c[6]=r,c[1]=n,c[4]=i,c[7]=o,c[2]=a,c[5]=s,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=t.elements;this.set(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}getInverse3(t){const e=t.elements,r=this.elements;r[0]=e[4]*e[8]-e[5]*e[7],r[3]=e[6]*e[5]-e[3]*e[8],r[6]=e[3]*e[7]-e[6]*e[4],r[1]=e[7]*e[2]-e[1]*e[8],r[4]=e[0]*e[8]-e[6]*e[2],r[7]=e[1]*e[6]-e[0]*e[7],r[2]=e[1]*e[5]-e[2]*e[4],r[5]=e[2]*e[3]-e[0]*e[5],r[8]=e[0]*e[4]-e[1]*e[3];const n=e[0]*r[0]+e[3]*r[1]+e[6]*r[2];return this.multiplyScalar(1/n),this}getInverse(t,e){const r=t.elements,n=this.elements;n[0]=r[10]*r[5]-r[6]*r[9],n[1]=-r[10]*r[1]+r[2]*r[9],n[2]=r[6]*r[1]-r[2]*r[5],n[3]=-r[10]*r[4]+r[6]*r[8],n[4]=r[10]*r[0]-r[2]*r[8],n[5]=-r[6]*r[0]+r[2]*r[4],n[6]=r[9]*r[4]-r[5]*r[8],n[7]=-r[9]*r[0]+r[1]*r[8],n[8]=r[5]*r[0]-r[1]*r[4];const i=r[0]*n[0]+r[1]*n[3]+r[2]*n[6];if(0===i){const t="Matrix3.getInverse(): can't invert matrix, determinant is 0";if(e)throw new Error(t);return console.warn(t),this.identity(),this}return this.multiplyScalar(1/i),this}getDeterminant(){const t=this.elements;return t[0]*t[4]*t[8]+t[1]*t[5]*t[6]+t[2]*t[3]*t[7]-t[2]*t[4]*t[6]-t[1]*t[3]*t[8]-t[0]*t[5]*t[7]}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}clone(){const t=this.elements;return new d(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8])}getMatrix4(){const t=this.elements;return new u(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0)}}class f{constructor(t,e){this.origin=void 0!==t?t:new h,this.direction=void 0!==e?e:new h}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return(e||new h).copy(this.direction).multiplyScalar(t).add(this.origin)}recast(t){const e=o;return this.origin.copy(this.at(t,e)),this}closestPointToPoint(t,e){const r=e||new h;r.subVectors(t,this.origin);const n=r.dot(this.direction);return r.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(t){const e=o,r=e.subVectors(t,this.origin).dot(this.direction);return e.copy(this.direction).multiplyScalar(r).add(this.origin),e.distanceTo(t)}isIntersectionCylinder(){}isIntersectionSphere(t){return this.distanceToPoint(t.center)<=t.radius}isIntersectionPlane(t){return 0!==t.normal.dot(this.direction)||0===t.distanceToPoint(this.origin)}distanceToPlane(t){const e=t.normal.dot(this.direction);return 0===e?0===t.distanceToPoint(this.origin)?0:void 0:-(this.origin.dot(t.normal)+t.constant)/e}intersectPlane(t,e){const r=this.distanceToPlane(t);if(void 0!==r)return this.at(r,e)}applyMatrix4(t){return this.direction.add(this.origin).applyMatrix4(t),this.origin.applyMatrix4(t),this.direction.sub(this.origin),this}clone(){return(new f).copy(this)}}},"./src/WebGL/math/utils/clamp.ts":(t,e,r)=>{"use strict";function n(t,e,r){return Math.min(Math.max(t,e),r)}r.r(e),r.d(e,{clamp:()=>n})},"./src/WebGL/math/utils/conversionMatrix3.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{conversionMatrix3:()=>i});var n=r("./src/WebGL/math/math.ts");function i(t,e,r,i,o,a){i=i*Math.PI/180,o=o*Math.PI/180,a=a*Math.PI/180;const s=t=>t*t,l=Math.cos(i),c=Math.cos(o),u=Math.cos(a),h=Math.sin(a);return new n.Matrix3(t,e*u,r*c,0,e*h,r*(l-c*u)/h,0,0,r*Math.sqrt(1-s(l)-s(c)-s(u)+2*l*c*u)/h)}},"./src/WebGL/math/utils/degToRad.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{degToRad:()=>i});const n=Math.PI/180;function i(t){return t*n}},"./src/WebGL/objects/Line.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Line:()=>a,LineStyle:()=>n});var n,i=r("./src/WebGL/materials/index.ts"),o=r("./src/WebGL/core/index.ts");!function(t){t[t.LineStrip=0]="LineStrip",t[t.LinePieces=1]="LinePieces"}(n||(n={}));class a extends o.Object3D{constructor(t,e=new i.LineBasicMaterial({color:16777215*Math.random()}),r=n.LineStrip){super(),this.geometry=t,this.material=e,this.type=r}clone(t=new a(this.geometry,this.material,this.type)){return super.clone.call(this,t),t}}},"./src/WebGL/objects/Mesh.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Mesh:()=>i});var n=r("./src/WebGL/core/index.ts");class i extends n.Object3D{constructor(t,e){super(),this.geometry=t,this.material=e}clone(t){return void 0===t&&(t=new i(this.geometry,this.material)),super.clone.call(this,t),t}}},"./src/WebGL/objects/Sprite.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Sprite:()=>o});var n=r("./src/WebGL/materials/index.ts"),i=r("./src/WebGL/core/index.ts");class o extends i.Object3D{constructor(t=new n.SpriteMaterial){super(),this.material=t,this.rotation3d=this.rotation,this.rotation=0}updateMatrix(){this.matrix.setPosition(this.position),this.rotation3d.set(0,0,this.rotation),this.matrix.setRotationFromEuler(this.rotation3d),1===this.scale.x&&1===this.scale.y||this.matrix.scale(this.scale),this.matrixWorldNeedsUpdate=!0}clone(t=new o(this.material)){return i.Object3D.prototype.clone.call(this,t),t}}},"./src/WebGL/objects/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Line:()=>n.Line,LineStyle:()=>n.LineStyle,Mesh:()=>i.Mesh,Sprite:()=>o.Sprite});var n=r("./src/WebGL/objects/Line.ts"),i=r("./src/WebGL/objects/Mesh.ts"),o=r("./src/WebGL/objects/Sprite.ts")},"./src/WebGL/shaders/ShaderType.ts":(t,e,r)=>{"use strict";r.r(e)},"./src/WebGL/shaders/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ShaderLib:()=>n.ShaderLib,ShaderUtils:()=>i.ShaderUtils,basic:()=>n.basic,clone:()=>i.clone,instanced:()=>n.instanced,lambert:()=>n.lambert,lambertdouble:()=>n.lambertdouble,outline:()=>n.outline,screen:()=>n.screen,screenaa:()=>n.screenaa,sphereimposter:()=>n.sphereimposter,sphereimposteroutline:()=>n.sphereimposteroutline,sprite:()=>n.sprite,stickimposter:()=>n.stickimposter,stickimposteroutline:()=>n.stickimposteroutline,volumetric:()=>n.volumetric});var n=r("./src/WebGL/shaders/lib/index.ts"),i=r("./src/WebGL/shaders/utils/index.ts");r("./src/WebGL/shaders/ShaderType.ts")},"./src/WebGL/shaders/lib/basic/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{basic:()=>o});var n=r("./src/WebGL/shaders/lib/basic/uniforms.ts"),i=r("./src/WebGL/shaders/lib/basic/basic.frag");const o={vertexShader:r("./src/WebGL/shaders/lib/basic/basic.vert").default.replace("#define GLSLIFY 1",""),fragmentShader:i.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/basic/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3}}},"./src/WebGL/shaders/lib/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ShaderLib:()=>g,basic:()=>n.basic,instanced:()=>i.instanced,lambert:()=>o.lambert,lambertdouble:()=>a.lambertdouble,outline:()=>s.outline,screen:()=>l.screen,screenaa:()=>c.screenaa,sphereimposter:()=>u.sphereimposter,sphereimposteroutline:()=>h.sphereimposteroutline,sprite:()=>d.sprite,stickimposter:()=>f.stickimposter,stickimposteroutline:()=>p.stickimposteroutline,volumetric:()=>m.volumetric});var n=r("./src/WebGL/shaders/lib/basic/index.ts"),i=r("./src/WebGL/shaders/lib/instanced/index.ts"),o=r("./src/WebGL/shaders/lib/lambert/index.ts"),a=r("./src/WebGL/shaders/lib/lambertdouble/index.ts"),s=r("./src/WebGL/shaders/lib/outline/index.ts"),l=r("./src/WebGL/shaders/lib/screen/index.ts"),c=r("./src/WebGL/shaders/lib/screenaa/index.ts"),u=r("./src/WebGL/shaders/lib/sphereimposter/index.ts"),h=r("./src/WebGL/shaders/lib/sphereimposteroutline/index.ts"),d=r("./src/WebGL/shaders/lib/sprite/index.ts"),f=r("./src/WebGL/shaders/lib/stickimposter/index.ts"),p=r("./src/WebGL/shaders/lib/stickimposteroutline/index.ts"),m=r("./src/WebGL/shaders/lib/volumetric/index.ts");const g={basic:n.basic,instanced:i.instanced,lambert:o.lambert,lambertdouble:a.lambertdouble,outline:s.outline,screen:l.screen,screenaa:c.screenaa,sphereimposter:u.sphereimposter,sphereimposteroutline:h.sphereimposteroutline,sprite:d.sprite,stickimposter:f.stickimposter,stickimposteroutline:p.stickimposteroutline,volumetric:m.volumetric}},"./src/WebGL/shaders/lib/instanced/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{instanced:()=>a});var n=r("./src/WebGL/shaders/lib/instanced/uniforms.ts"),i=r("./src/WebGL/shaders/lib/instanced/instanced.frag"),o=r("./src/WebGL/shaders/lib/instanced/instanced.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/instanced/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/lambert/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{lambert:()=>a});var n=r("./src/WebGL/shaders/lib/lambert/uniforms.ts"),i=r("./src/WebGL/shaders/lib/lambert/lambert.frag"),o=r("./src/WebGL/shaders/lib/lambert/lambert.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/lambert/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/lambertdouble/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{lambertdouble:()=>a});var n=r("./src/WebGL/shaders/lib/lambertdouble/uniforms.ts"),i=r("./src/WebGL/shaders/lib/lambertdouble/lambertdouble.frag"),o=r("./src/WebGL/shaders/lib/lambertdouble/lambertdouble.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/lambertdouble/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/outline/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{outline:()=>a});var n=r("./src/WebGL/shaders/lib/outline/uniforms.ts"),i=r("./src/WebGL/shaders/lib/outline/outline.frag"),o=r("./src/WebGL/shaders/lib/outline/outline.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/outline/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>i});var n=r("./src/colors.ts");const i={opacity:{type:"f",value:1},outlineColor:{type:"c",value:new n.Color(0,0,0)},fogColor:{type:"c",value:new n.Color(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},outlineWidth:{type:"f",value:.1},outlinePushback:{type:"f",value:1}}},"./src/WebGL/shaders/lib/screen/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{screen:()=>a});var n=r("./src/WebGL/shaders/lib/screen/uniforms.ts"),i=r("./src/WebGL/shaders/lib/screen/screen.frag"),o=r("./src/WebGL/shaders/lib/screen/screen.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/screen/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={}},"./src/WebGL/shaders/lib/screenaa/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{screenaa:()=>a});var n=r("./src/WebGL/shaders/lib/screenaa/uniforms.ts"),i=r("./src/WebGL/shaders/lib/screenaa/screenaa.frag"),o=r("./src/WebGL/shaders/lib/screenaa/screenaa.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/screenaa/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={}},"./src/WebGL/shaders/lib/sphereimposter/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{sphereimposter:()=>o});var n=r("./src/WebGL/shaders/lib/sphereimposter/uniforms.ts"),i=r("./src/WebGL/shaders/lib/sphereimposter/sphereimposter.frag");const o={vertexShader:r("./src/WebGL/shaders/lib/sphereimposter/sphereimposter.vert").default.replace("#define GLSLIFY 1",""),fragmentShader:i.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/sphereimposter/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/sphereimposteroutline/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{sphereimposteroutline:()=>a});var n=r("./src/WebGL/shaders/lib/sphereimposteroutline/uniforms.ts"),i=r("./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.frag"),o=r("./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/sphereimposteroutline/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>i});var n=r("./src/colors.ts");const i={opacity:{type:"f",value:1},outlineColor:{type:"c",value:new n.Color(0,0,0)},fogColor:{type:"c",value:new n.Color(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},outlineWidth:{type:"f",value:.1},outlinePushback:{type:"f",value:1}}},"./src/WebGL/shaders/lib/sprite/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{sprite:()=>a});var n=r("./src/WebGL/shaders/lib/sprite/uniforms.ts"),i=r("./src/WebGL/shaders/lib/sprite/sprite.frag"),o=r("./src/WebGL/shaders/lib/sprite/sprite.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/sprite/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={}},"./src/WebGL/shaders/lib/stickimposter/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{stickimposter:()=>s});var n=r("./src/WebGL/shaders/lib/stickimposter/uniforms.ts"),i=r("./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag"),o=r("./src/WebGL/shaders/lib/stickimposter/stickimposter.partial.frag"),a=r("./src/WebGL/shaders/lib/stickimposter/stickimposter.vert");const s={fragmentShader:[i.default,o.default].join("\n").replace("#define GLSLIFY 1",""),vertexShader:a.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/stickimposter/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/stickimposteroutline/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{stickimposteroutline:()=>a});var n=r("./src/WebGL/shaders/lib/stickimposteroutline/uniforms.ts"),i=r("./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag"),o=r("./src/WebGL/shaders/lib/stickimposteroutline/stickimposteroutline.vert");const a={fragmentShader:(i.default+"gl_FragColor = vec4(color,1.0);}").replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/stickimposteroutline/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>i});var n=r("./src/colors.ts");const i={opacity:{type:"f",value:1},fogColor:{type:"c",value:new n.Color(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},outlineColor:{type:"c",value:new n.Color(0,0,0)},outlineWidth:{type:"f",value:.1},outlinePushback:{type:"f",value:1}}},"./src/WebGL/shaders/lib/volumetric/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{volumetric:()=>a});var n=r("./src/WebGL/shaders/lib/volumetric/uniforms.ts"),i=r("./src/WebGL/shaders/lib/volumetric/volumetric.frag"),o=r("./src/WebGL/shaders/lib/volumetric/volumetric.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/volumetric/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},data:{type:"i",value:3},colormap:{type:"i",value:4},depthmap:{type:"i",value:5},step:{type:"f",value:1},maxdepth:{type:"f",value:100},subsamples:{type:"f",value:5},textmat:{type:"mat4",value:[]},projinv:{type:"mat4",value:[]},transfermin:{type:"f",value:-.2},transfermax:{type:"f",value:.2}}},"./src/WebGL/shaders/utils/clone.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{clone:()=>i});var n=r("./src/colors.ts");function i(t){let e={};for(const i in t){e[i]={},e[i].type=t[i].type;var r=t[i].value;r instanceof n.Color?e[i].value=r.clone():"number"==typeof r?e[i].value=r:r instanceof Array?e[i].value=[]:console.error("Error copying shader uniforms from ShaderLib: unknown type for uniform")}return e}},"./src/WebGL/shaders/utils/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ShaderUtils:()=>o,clone:()=>n.clone});var n=r("./src/WebGL/shaders/utils/clone.ts"),i=r("./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag");const o={clone:n.clone,stickimposterFragmentShader:i.default}},"./src/WebGL/shapes/Cylinder.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Cylinder:()=>o});var n=r("./src/WebGL/math/index.ts");let i=new n.Vector3;class o{constructor(t=new n.Vector3,e=new n.Vector3,r=0){this.c1=t,this.c2=e,this.radius=r,this.direction=(new n.Vector3).subVectors(this.c2,this.c1).normalize()}copy(t){return this.c1.copy(t.c1),this.c2.copy(t.c2),this.direction.copy(t.direction),this.radius=t.radius,this}lengthSq(){return i.subVectors(this.c2,this.c1).lengthSq()}applyMatrix4(t){return this.direction.add(this.c1).applyMatrix4(t),this.c1.applyMatrix4(t),this.c2.applyMatrix4(t),this.direction.sub(this.c1).normalize(),this.radius=this.radius*t.getMaxScaleOnAxis(),this}}},"./src/WebGL/shapes/Sphere.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Sphere:()=>i});var n=r("./src/WebGL/math/index.ts");class i{constructor(t={x:0,y:0,z:0},e=0){this.center=new n.Vector3(t.x,t.y,t.z),this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new i).copy(this)}}},"./src/WebGL/shapes/Triangle.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Triangle:()=>o});var n=r("./src/WebGL/math/index.ts");const i=new n.Vector3;class o{constructor(t=new n.Vector3,e=new n.Vector3,r=new n.Vector3){this.a=t,this.b=e,this.c=r}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}applyMatrix4(t){return this.a.applyMatrix4(t),this.b.applyMatrix4(t),this.c.applyMatrix4(t),this}getNormal(){var t=this.a.clone();return t.sub(this.b),i.subVectors(this.c,this.b),t.cross(i),t.normalize(),t}}},"./src/WebGL/shapes/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Cylinder:()=>i.Cylinder,Sphere:()=>n.Sphere,Triangle:()=>o.Triangle});var n=r("./src/WebGL/shapes/Sphere.ts"),i=r("./src/WebGL/shapes/Cylinder.ts"),o=r("./src/WebGL/shapes/Triangle.ts")},"./src/autoload.ts":(__unused_webpack_module,__nested_webpack_exports__,__nested_webpack_require_891473__)=>{"use strict";__nested_webpack_require_891473__.r(__nested_webpack_exports__),__nested_webpack_require_891473__.d(__nested_webpack_exports__,{autoinit:()=>autoinit,autoload:()=>autoload,processing_autoinit:()=>processing_autoinit,viewers:()=>viewers});var _GLViewer__WEBPACK_IMPORTED_MODULE_0__=__nested_webpack_require_891473__("./src/GLViewer.ts"),_ProteinSurface4__WEBPACK_IMPORTED_MODULE_1__=__nested_webpack_require_891473__("./src/ProteinSurface4.ts"),_utilities__WEBPACK_IMPORTED_MODULE_2__=__nested_webpack_require_891473__("./src/utilities.ts"),_colors__WEBPACK_IMPORTED_MODULE_3__=__nested_webpack_require_891473__("./src/colors.ts"),autoinit=!1,processing_autoinit=!1,viewers={};function autoload(viewer,callback){var i,dataname,type;if(null!=document.querySelector(".viewer_3Dmoljs")&&(autoinit=!0),autoinit){processing_autoinit=!0,viewer=null!=viewer?viewer:null;var nviewers=0;document.querySelectorAll(".viewer_3Dmoljs").forEach((viewerdiv=>{var datauri=[],datatypes=[],uri="";"static"==viewerdiv.style.position&&(viewerdiv.style.position="relative");var UI=null;if(type=null,viewerdiv.dataset.pdb)datauri.push("https://files.rcsb.org/view/"+viewerdiv.dataset.pdb+".pdb"),datatypes.push("pdb");else if(viewerdiv.dataset.cid)datatypes.push("sdf"),datauri.push("https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"+viewerdiv.dataset.cid+"/SDF?record_type=3d");else if(viewerdiv.dataset.href||viewerdiv.dataset.url){uri=viewerdiv.dataset.href?viewerdiv.dataset.href:viewerdiv.dataset.url,datauri.push(uri),type=uri.substring(uri.lastIndexOf(".")+1),datatypes.push(type);var molName=uri.substring(uri.lastIndexOf("/")+1,uri.lastIndexOf("."));"/"==molName&&(molName=uri.substring(uri.lastIndexOf("/")+1)),viewerdiv.dataset[datatypes[datatypes.length-1]]=molName}let divdata=viewerdiv.dataset;for(i in divdata)"pdb"===i.substring(0,3)&&"pdb"!==i?(datauri.push("https://files.rcsb.org/view/"+divdata[i]+".pdb"),datatypes.push("pdb")):"href"===i.substring(0,4)&&"href"!==i?(uri=divdata[i],datauri.push(uri),datatypes.push(uri.substring(uri.lastIndexOf(".")+1))):"cid"===i.substring(0,3)&&"cid"!==i&&(datauri.push("https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"+divdata[i]+"/SDF?record_type=3d"),datatypes.push("sdf"));var options={};viewerdiv.dataset.options&&(options=(0,_utilities__WEBPACK_IMPORTED_MODULE_2__.specStringToObject)(viewerdiv.dataset.options));var bgcolor=_colors__WEBPACK_IMPORTED_MODULE_3__.CC.color(viewerdiv.dataset.backgroundcolor),bgalpha=viewerdiv.dataset.backgroundalpha;bgalpha=null==bgalpha?1:parseFloat(bgalpha);var style={line:{}};viewerdiv.dataset.style&&(style=(0,_utilities__WEBPACK_IMPORTED_MODULE_2__.specStringToObject)(viewerdiv.dataset.style));var select={};viewerdiv.dataset.select&&(select=(0,_utilities__WEBPACK_IMPORTED_MODULE_2__.specStringToObject)(viewerdiv.dataset.select));var selectstylelist=[],surfaces=[],labels=[],zoomto={},spin=null,d=viewerdiv.dataset,stylere=/style(.+)/,surfre=/surface(.*)/,reslabre=/labelres(.*)/,keys=[];for(dataname in d)Object.prototype.hasOwnProperty.call(d,dataname)&&keys.push(dataname);for(keys.sort(),i=0;i{UI.loadSurface("VDW",e,r,t)})):t.addSurface(_ProteinSurface4__WEBPACK_IMPORTED_MODULE_1__.SurfaceType.VDW,r,e,e)}for(i=0;ifunction(moldata){uri=datauri[i];var type=viewerdiv.dataset.type||viewerdiv.dataset.datatype||datatypes[i];if(glviewer.addModel(moldata,type,options),UI){var modelName=viewerdiv.dataset[datatypes[i]];UI.setModelTitle(modelName)}if(i+=1,i{"complete"===document.readyState&&autoload()}},"./src/colors.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{CC:()=>i,Color:()=>n,builtinColorSchemes:()=>h,chains:()=>u,elementColors:()=>l,htmlColors:()=>o,residues:()=>c,ssColors:()=>a});class n{constructor(t,e,r){return this.r=0,this.g=0,this.b=0,arguments.length>1&&"number"==typeof t?(this.r=t||0,this.g=e||0,this.b=r||0,this):this.set(t||0)}set(t){return t instanceof n?t.clone():("number"==typeof t?this.setHex(t):"object"==typeof t&&(this.r=(null==t?void 0:t.r)||0,this.g=(null==t?void 0:t.g)||0,this.b=(null==t?void 0:t.b)||0),this)}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this}getHex(){return Math.round(255*this.r)<<16|Math.round(255*this.g)<<8|Math.round(255*this.b)}clone(){return new n(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}scaled(){var t={};return t.r=Math.round(255*this.r),t.g=Math.round(255*this.g),t.b=Math.round(255*this.b),t.a=1,t}}class i{static color(t){if(!t)return i.cache[0];if(t instanceof n)return t;if("number"==typeof t&&void 0!==i.cache[t])return i.cache[t];if(t&&Array.isArray(t))return t.map(i.color);let e=i.getHex(t),r=new n(e);return i.cache[e]=r,r}static getHex(t){var e;if(Array.isArray(t))return t.map(i.getHex);if("string"==typeof t){let r=t;if(!isNaN(parseInt(r)))return parseInt(r);if(r=r.trim(),4==r.length&&"#"==r[0]&&(r="#"+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]),7==r.length&&"#"==r[0])return parseInt(r.substring(1),16);let n=i.rgbRegEx.exec(r);if(n){""!=n[1]&&console.log("WARNING: Opacity value in rgba ignored. Specify separately as opacity attribute.");let t=0;for(let e=2;e<5;e++){t*=256;let r=n[e].endsWith("%")?255*parseFloat(n[e])/100:parseFloat(n[e]);t+=Math.round(r)}return t}return(null===(e=null===window||void 0===window?void 0:window.$3Dmol)||void 0===e?void 0:e.htmlColors[t.toLowerCase()])||0}return t}}i.rgbRegEx=/rgb(a?)\(\s*([^ ,\)\t]+)\s*,\s*([^ ,\)\t]+)\s*,\s*([^ ,\)\t]+)/i,i.cache={0:new n(0)};const o={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,darkgrey:11119017,darkgreen:25600,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,grey:8421504,green:32768,greenyellow:11403055,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,lightgrey:13882323,lightgreen:9498256,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},a={pyMol:{h:16711680,s:16776960,c:65280},Jmol:{h:16711808,s:16762880,c:16777215}},s={H:16777215,He:16761035,HE:16761035,Li:11674146,LI:11674146,B:65280,C:13158600,N:9408511,O:15728640,F:14329120,Na:255,NA:255,Mg:2263842,MG:2263842,Al:8421520,AL:8421520,Si:14329120,SI:14329120,P:16753920,S:16762930,Cl:65280,CL:65280,Ca:8421520,CA:8421520,Ti:8421520,TI:8421520,Cr:8421520,CR:8421520,Mn:8421520,MN:8421520,Fe:16753920,FE:16753920,Ni:10824234,NI:10824234,Cu:10824234,CU:10824234,Zn:10824234,ZN:10824234,Br:10824234,BR:10824234,Ag:8421520,AG:8421520,I:10494192,Ba:16753920,BA:16753920,Au:14329120,AU:14329120},l={defaultColor:16716947,Jmol:{H:16777215,He:14286847,HE:14286847,Li:13402367,LI:13402367,Be:12779264,BE:12779264,B:16758197,C:9474192,N:3166456,O:16715021,F:9494608,Ne:11789301,NE:11789301,Na:11230450,NA:11230450,Mg:9109248,MG:9109248,Al:12560038,AL:12560038,Si:1578e4,SI:1578e4,P:16744448,S:16777008,Cl:2093087,CL:2093087,Ar:8442339,AR:8442339,K:9388244,Ca:4062976,CA:4062976,Sc:15132390,SC:15132390,Ti:12567239,TI:12567239,V:10921643,Cr:9083335,CR:9083335,Mn:10255047,MN:10255047,Fe:14706227,FE:14706227,Co:15765664,CO:15765664,Ni:5296208,NI:5296208,Cu:13140019,CU:13140019,Zn:8224944,ZN:8224944,Ga:12750735,GA:12750735,Ge:6721423,GE:6721423,As:12419299,AS:12419299,Se:16752896,SE:16752896,Br:10889513,BR:10889513,Kr:6076625,KR:6076625,Rb:7351984,RB:7351984,Sr:65280,SR:65280,Y:9764863,Zr:9756896,ZR:9756896,Nb:7586505,NB:7586505,Mo:5551541,MO:5551541,Tc:3907230,TC:3907230,Ru:2396047,RU:2396047,Rh:687500,RH:687500,Pd:27013,PD:27013,Ag:12632256,AG:12632256,Cd:16767375,CD:16767375,In:10909043,IN:10909043,Sn:6717568,SN:6717568,Sb:10380213,SB:10380213,Te:13924864,TE:13924864,I:9699476,Xe:4366e3,XE:4366e3,Cs:5707663,CS:5707663,Ba:51456,BA:51456,La:7394559,LA:7394559,Ce:16777159,CE:16777159,Pr:14286791,PR:14286791,Nd:13107143,ND:13107143,Pm:10747847,PM:10747847,Sm:9437127,SM:9437127,Eu:6422471,EU:6422471,Gd:4587463,GD:4587463,Tb:3211207,TB:3211207,Dy:2097095,DY:2097095,Ho:65436,HO:65436,Er:58997,ER:58997,Tm:54354,TM:54354,Yb:48952,YB:48952,Lu:43812,LU:43812,Hf:5096191,HF:5096191,Ta:5089023,TA:5089023,W:2200790,Re:2522539,RE:2522539,Os:2516630,OS:2516630,Ir:1528967,IR:1528967,Pt:13684960,PT:13684960,Au:16765219,AU:16765219,Hg:12105936,HG:12105936,Tl:10900557,TL:10900557,Pb:5724513,PB:5724513,Bi:10375093,BI:10375093,Po:11230208,PO:11230208,At:7688005,AT:7688005,Rn:4358806,RN:4358806,Fr:4325478,FR:4325478,Ra:32e3,RA:32e3,Ac:7384058,AC:7384058,Th:47871,TH:47871,Pa:41471,PA:41471,U:36863,Np:33023,NP:33023,Pu:27647,PU:27647,Am:5528818,AM:5528818,Cm:7888099,CM:7888099,Bk:9064419,BK:9064419,Cf:10565332,CF:10565332,Es:11739092,ES:11739092,Fm:11739066,FM:11739066,Md:11734438,MD:11734438,No:12389767,NO:12389767,Lr:13041766,LR:13041766,Rf:13369433,RF:13369433,Db:13697103,DB:13697103,Sg:14221381,SG:14221381,Bh:14680120,BH:14680120,Hs:15073326,HS:15073326,Mt:15400998,MT:15400998},rasmol:s,defaultColors:Object.assign({},s),greenCarbon:Object.assign(Object.assign({},s),{C:65280}),cyanCarbon:Object.assign(Object.assign({},s),{C:65535}),magentaCarbon:Object.assign(Object.assign({},s),{C:16711935}),yellowCarbon:Object.assign(Object.assign({},s),{C:16776960}),whiteCarbon:Object.assign(Object.assign({},s),{C:16777215}),orangeCarbon:Object.assign(Object.assign({},s),{C:16753920}),purpleCarbon:Object.assign(Object.assign({},s),{C:8388736}),blueCarbon:Object.assign(Object.assign({},s),{C:255})},c={amino:{ALA:13158600,ARG:1334015,ASN:56540,ASP:15075850,CYS:15132160,GLN:56540,GLU:15075850,GLY:15461355,HIS:8553170,ILE:1016335,LEU:1016335,LYS:1334015,MET:15132160,PHE:3289770,PRO:14456450,SER:16422400,THR:16422400,TRP:11819700,TYR:3289770,VAL:1016335,ASX:16738740,GLX:16738740},shapely:{ALA:9240460,ARG:124,ASN:16743536,ASP:10485826,CYS:16777072,GLN:16731212,GLU:6684672,GLY:16777215,HIS:7368959,ILE:19456,LEU:4546117,LYS:4671416,MET:12099650,PHE:5459026,PRO:5395026,SER:16740418,THR:12078080,TRP:5195264,TYR:9203788,VAL:16747775,ASX:16711935,GLX:16711935},nucleic:{A:10526975,G:16740464,I:8454143,C:16747595,T:10551200,U:16744576}},u={atom:{A:12636415,B:11599792,C:16761032,D:16777088,E:16761087,F:11596016,G:16765040,H:15761536,I:16113331,J:49151,K:13458524,L:6737322,M:10145074,N:15631086,O:52945,P:65407,Q:3978097,R:139,S:12433259,T:25600,U:8388608,V:8421376,W:8388736,X:32896,Y:12092939,Z:11674146},hetatm:{A:9478351,B:8441752,C:13602992,D:13619056,E:13603023,F:8437952,G:13607008,H:12603504,I:12955267,J:42959,K:11881548,L:5682578,M:9090346,N:12481214,O:46753,P:53103,Q:3447649,R:187,S:10854235,T:37888,U:11534336,V:11579392,W:11534512,X:45232,Y:15250963,Z:12726834}},h={ssPyMol:{prop:"ss",map:a.pyMol},ssJmol:{prop:"ss",map:a.Jmol},Jmol:{prop:"elem",map:l.Jmol},amino:{prop:"resn",map:c.amino},shapely:{prop:"resn",map:c.shapely},nucleic:{prop:"resn",map:c.nucleic},chain:{prop:"chain",map:u.atom},rasmol:{prop:"elem",map:l.rasmol},default:{prop:"elem",map:l.defaultColors},greenCarbon:{prop:"elem",map:l.greenCarbon},chainHetatm:{prop:"chain",map:u.hetatm},cyanCarbon:{prop:"elem",map:l.cyanCarbon},magentaCarbon:{prop:"elem",map:l.magentaCarbon},purpleCarbon:{prop:"elem",map:l.purpleCarbon},whiteCarbon:{prop:"elem",map:l.whiteCarbon},orangeCarbon:{prop:"elem",map:l.orangeCarbon},yellowCarbon:{prop:"elem",map:l.yellowCarbon},blueCarbon:{prop:"elem",map:l.blueCarbon}}},"./src/glcartoon.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{drawCartoon:()=>T,subdivide_spline:()=>u});var n=r("./src/WebGL/math/index.ts"),i=r("./src/WebGL/shapes/index.ts"),o=r("./src/WebGL/index.ts"),a=r("./src/Gradient.ts"),s=r("./src/colors.ts"),l=r("./src/GLDraw.ts"),c=r("./src/utilities.ts");function u(t,e){var r,i,o,a,s,l,c,u,h,d=[],f=t;for((f=[]).push(t[0]),r=1,i=t.length-1;r0){var g=[i,i+1,i-1,i-2],v=h.faceidx;p[v]=g[0],p[v+1]=g[1],p[v+2]=g[3],p[v+3]=g[1],p[v+4]=g[2],p[v+5]=g[3],h.faceidx+=6}h.vertices+=2}}function v(t,e,r,n,o,a,l){l&&"default"!==l||(l="rectangle"),"edged"===l?function(t,e,r,n,o){if(!(e.length<2)){var a,l;if(a=e[0],l=e[e.length-1],a=u(a,n),l=u(l,n),!o)return g(t,a,l,r);var c,h,d,f,p,m,v,b,y,x,_,w,k,A,M,T,S,C,E,L,z,O,D=[],I=[[0,2,-6,-8],[-4,-2,6,4],[7,-1,-5,3],[-3,5,1,-7]];for(k=0,A=a.length;k0){var R=void 0!==w&&void 0!==_&&w.serial!==_.serial;for(M=0;M<4;M++){var P=[m+I[M][0],m+I[M][1],m+I[M][2],m+I[M][3]];if(O[b=E.faceidx]=P[0],O[b+1]=P[1],O[b+2]=P[3],O[b+3]=P[1],O[b+4]=P[2],O[b+5]=P[3],E.faceidx+=6,_.clickable||w.clickable||_.hoverable||w.hoverable){var j=D[P[3]].clone(),N=D[P[0]].clone(),B=D[P[2]].clone(),U=D[P[1]].clone();if(j.atom=D[P[3]].atom||null,B.atom=D[P[2]].atom||null,N.atom=D[P[0]].atom||null,U.atom=D[P[1]].atom||null,R){var G=j.clone().add(N).multiplyScalar(.5),V=B.clone().add(U).multiplyScalar(.5),H=j.clone().add(U).multiplyScalar(.5);M%2==0?((w.clickable||w.hoverable)&&(T=new i.Triangle(G,H,j),S=new i.Triangle(V,B,H),C=new i.Triangle(H,B,j),w.intersectionShape.triangle.push(T),w.intersectionShape.triangle.push(S),w.intersectionShape.triangle.push(C)),(_.clickable||_.hoverable)&&(T=new i.Triangle(N,U,H),S=new i.Triangle(U,V,H),C=new i.Triangle(N,H,G),_.intersectionShape.triangle.push(T),_.intersectionShape.triangle.push(S),_.intersectionShape.triangle.push(C))):((_.clickable||_.hoverable)&&(T=new i.Triangle(G,H,j),S=new i.Triangle(V,B,H),C=new i.Triangle(H,B,j),_.intersectionShape.triangle.push(T),_.intersectionShape.triangle.push(S),_.intersectionShape.triangle.push(C)),(w.clickable||w.hoverable)&&(T=new i.Triangle(N,U,H),S=new i.Triangle(U,V,H),C=new i.Triangle(N,H,G),w.intersectionShape.triangle.push(T),w.intersectionShape.triangle.push(S),w.intersectionShape.triangle.push(C)))}else(_.clickable||_.hoverable)&&(T=new i.Triangle(N,U,j),S=new i.Triangle(U,B,j),_.intersectionShape.triangle.push(T),_.intersectionShape.triangle.push(S))}}}E.vertices+=8,w=_}var W=D.length-8;for(L=(E=t.updateGeoGroup(8)).vertexArray,z=E.colorArray,O=E.faceArray,v=3*(m=E.vertices),b=E.faceidx,k=0;k<4;k++){D.push(D[2*k]),D.push(D[W+2*k]);var q=D[2*k],Y=D[W+2*k];L[v+6*k]=q.x,L[v+1+6*k]=q.y,L[v+2+6*k]=q.z,L[v+3+6*k]=Y.x,L[v+4+6*k]=Y.y,L[v+5+6*k]=Y.z,z[v+6*k]=y.r,z[v+1+6*k]=y.g,z[v+2+6*k]=y.b,z[v+3+6*k]=y.r,z[v+4+6*k]=y.g,z[v+5+6*k]=y.b}W+=8,T=[m,m+2,m+6,m+4],S=[m+1,m+5,m+7,m+3],O[b]=T[0],O[b+1]=T[1],O[b+2]=T[3],O[b+3]=T[1],O[b+4]=T[2],O[b+5]=T[3],O[b+6]=S[0],O[b+7]=S[1],O[b+8]=S[3],O[b+9]=S[1],O[b+10]=S[2],O[b+11]=S[3],E.faceidx+=12,E.vertices+=8}}(t,e,r,n,o):"rectangle"!==l&&"oval"!==l&&"parabola"!==l||function(t,e,r,n,o,a,l){var c,h,d,f,p,m,v,b,y,x;if((d=e.length)<2||e[0].length<2)return;for(c=0;c0&&(c-=1,a=!0),E=Math.round(c*(r.length-1)/f),C=s.CC.color(r[E]),y=v,x=b,v=[],b=[],p=[],void 0!==e[0][c].atom&&(S=e[0][c].atom,"oval"===l?m=_:"rectangle"===l?m=w:"parabola"===l&&(m=k)),m||(m=w),h=0;h0&&!a){for(h=0;h<2*d;h++)D=[A+I[h][0],A+I[h][1],A+I[h][2],A+I[h][3]],O[T=F.faceidx]=D[0],O[T+1]=D[1],O[T+2]=D[3],O[T+3]=D[1],O[T+4]=D[2],O[T+5]=D[3],F.faceidx+=6;if(S.clickable||S.hoverable){var j=[];for(h in j.push(new i.Triangle(y[0],v[0],v[d-1])),j.push(new i.Triangle(y[0],v[d-1],y[d-1])),j.push(new i.Triangle(y[d-1],v[d-1],b[d-1])),j.push(new i.Triangle(y[d-1],b[d-1],x[d-1])),j.push(new i.Triangle(b[0],x[0],x[d-1])),j.push(new i.Triangle(b[d-1],b[0],x[d-1])),j.push(new i.Triangle(v[0],y[0],x[0])),j.push(new i.Triangle(b[0],v[0],x[0])),j)S.intersectionShape.triangle.push(j[h])}}F.vertices+=2*d}for(L=F.vertexArray,z=F.colorArray,O=F.faceArray,M=3*(A=F.vertices),T=F.faceidx,c=0;c=0&&r<1&&(a.transparent=!0,a.opacity=r),a.outline=n;var s=new o.Mesh(e,a);t.add(s)}}function _(t,e,r,i,o,a,s,l,c){var u,m,g,v,b,y;if(i&&o&&s){var x=o.sub(i);x.normalize();var _=l[c];for(m=c+1;m0&&v(V,W,H,d,L,0,W.style);var r=[],n=null;if(e){for(z=0;z0&&v(V,W,H,d,L,0,W.style),W=[],z=0;z{"use strict";r.r(e),r.d(e,{CAP:()=>m.CAP,CC:()=>i.CC,Color:()=>i.Color,CustomLinear:()=>n.CustomLinear,Cylinder:()=>c.Cylinder,GLDraw:()=>m.GLDraw,GLModel:()=>v.GLModel,GLShape:()=>p.GLShape,GLViewer:()=>b.GLViewer,GLVolumetricRender:()=>f.GLVolumetricRender,Gradient:()=>n.Gradient,GradientType:()=>n.GradientType,Label:()=>o.Label,LabelCount:()=>o.LabelCount,MarchingCube:()=>h.MarchingCube,MarchingCubeInitializer:()=>h.MarchingCubeInitializer,Matrix3:()=>l.Matrix3,Matrix4:()=>l.Matrix4,Parsers:()=>s.Parsers,PausableTimer:()=>u.PausableTimer,PointGrid:()=>h.PointGrid,ProteinSurface:()=>h.ProteinSurface,Quaternion:()=>l.Quaternion,ROYGB:()=>n.ROYGB,RWB:()=>n.RWB,Ray:()=>l.Ray,Sinebow:()=>n.Sinebow,Sphere:()=>c.Sphere,SurfaceType:()=>h.SurfaceType,Triangle:()=>c.Triangle,Vector2:()=>l.Vector2,Vector3:()=>l.Vector3,VolumeData:()=>d.VolumeData,adjustVolumeStyle:()=>u.adjustVolumeStyle,applyPartialCharges:()=>a.applyPartialCharges,autoinit:()=>y.autoinit,autoload:()=>y.autoload,base64ToArray:()=>u.base64ToArray,bondLength:()=>s.bondLength,builtinColorSchemes:()=>i.builtinColorSchemes,builtinGradients:()=>n.builtinGradients,chains:()=>i.chains,clamp:()=>l.clamp,conversionMatrix3:()=>l.conversionMatrix3,createStereoViewer:()=>b.createStereoViewer,createViewer:()=>b.createViewer,createViewerGrid:()=>b.createViewerGrid,deepCopy:()=>u.deepCopy,degToRad:()=>l.degToRad,download:()=>u.download,drawCartoon:()=>g.drawCartoon,elementColors:()=>i.elementColors,extend:()=>u.extend,get:()=>u.get,getAtomProperty:()=>u.getAtomProperty,getColorFromStyle:()=>u.getColorFromStyle,getElement:()=>u.getElement,getExtent:()=>u.getExtent,getGradient:()=>n.getGradient,getPropertyRange:()=>u.getPropertyRange,getbin:()=>u.getbin,htmlColors:()=>i.htmlColors,inflateString:()=>u.inflateString,isEmptyObject:()=>u.isEmptyObject,isNumeric:()=>u.isNumeric,makeFunction:()=>u.makeFunction,mergeGeos:()=>u.mergeGeos,normalizeValue:()=>n.normalizeValue,partialCharges:()=>a.partialCharges,processing_autoinit:()=>y.processing_autoinit,residues:()=>i.residues,setBondLength:()=>s.setBondLength,setSyncSurface:()=>h.setSyncSurface,specStringToObject:()=>u.specStringToObject,splitMesh:()=>p.splitMesh,ssColors:()=>i.ssColors,subdivide_spline:()=>g.subdivide_spline,syncSurface:()=>h.syncSurface,viewers:()=>y.viewers});var n=r("./src/Gradient.ts"),i=r("./src/colors.ts"),o=r("./src/Label.ts"),a=r("./src/partialCharges.ts"),s=r("./src/parsers/index.ts"),l=r("./src/WebGL/math/index.ts"),c=r("./src/WebGL/shapes/index.ts"),u=r("./src/utilities.ts"),h=r("./src/ProteinSurface4.ts"),d=r("./src/VolumeData.ts"),f=r("./src/VolumetricRender.ts"),p=r("./src/GLShape.ts"),m=r("./src/GLDraw.ts"),g=r("./src/glcartoon.ts"),v=r("./src/GLModel.ts"),b=r("./src/GLViewer.ts"),y=r("./src/autoload.ts");r("./src/specs.ts"),window&&(window.$3Dmol=e)},"./src/parsers/BCIF.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BCIF:()=>p});var n=r("./src/utilities.ts"),i=r("./src/parsers/utils/computeSecondaryStructure.ts"),o=r("./src/parsers/utils/processSymmetries.ts"),a=r("./src/parsers/cifutils/category.ts"),s=r("./src/parsers/utils/assignPDBBonds.ts"),l=r("./src/WebGL/index.ts"),c=r("./src/parsers/utils/isEmpty.ts"),u=r("./src/vendor/mmtf.js");class h{constructor(t){if(this.C={},t){let e=t.getField("comp_id"),r=t.getField("atom_id_1"),n=t.getField("atom_id_2"),i=t.getField("value_order");for(let t=0;t0&&(o.bonds.push(a.index),a.bonds.push(o.index),o.bondOrder.push(s),a.bondOrder.push(s))}}for(let t of e.C){let e=t[0],r=t[1],n=t[2],i=this.geta(e),o=this.geta(r);null!=i&&null!=o&&(i.bonds.push(o.index),o.bonds.push(i.index),i.bondOrder.push(n),o.bondOrder.push(n))}}}function p(t,e){var r=!e.keepH,p=e.altLoc?e.altLoc:"A",m=!e.noComputeSecondaryStructure;const g=!e.doAssembly,v=void 0===e.assignBonds||e.assignBonds;if("string"==typeof t)try{t=(0,n.base64ToArray)(t)}catch(e){t=(new TextEncoder).encode(t)}else t=new Uint8Array(t);var b=u.decodeMsgpack(t);31==b&&(t=(0,n.inflateString)(t,!1),b=u.decodeMsgpack(t));var y=[],x=y.modelData=[],_=b.dataBlocks.length;if(0==_)return y;e.multimodel||(_=1);for(let t=0;t<_;t++){let n=y.length;const i=[];x.push({symmetries:[]}),y.push([]);const o=b.dataBlocks[t],s=Object.create(null);for(const t of o.categories)s[t.name.substr(1)]=(0,a.Category)(t);let u={},m=s.struct_conf;if(m){let t=m.getField("conf_type_id"),e=m.getField("beg_label_asym_id"),r=m.getField("beg_label_seq_id"),n=m.getField("end_label_seq_id");for(let i=0;i1&&("1"==t[1]?r.ssbegin=!0:"2"==t[1]&&(r.ssend=!0))}}}e.multimodel&&t<_-1&&(e.onemol||(y.push([]),x.push({symmetries:[]})))}for(let t=0;t{"use strict";function n(t,e){var r=[[]];"string"==typeof t&&(t=JSON.parse(t));for(var n=t.m,i=n[0].a,o=n[0].b,a=n[0].s,s=void 0!==e&&void 0!==e.parseStyle?e.parseStyle:void 0!==a,l=r[r.length-1].length,c=0;cn})},"./src/parsers/CIF.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{CIF:()=>l});var n=r("./src/parsers/utils/computeSecondaryStructure.ts"),i=r("./src/parsers/utils/processSymmetries.ts"),o=r("./src/WebGL/index.ts"),a=r("./src/parsers/utils/assignPDBBonds.ts");const s=function(t,e,r,n){return new o.Vector3(e,r,n).applyMatrix3(t)};function l(t,e={}){const r=[],l=!e.doAssembly,c=r.modelData=[],u=void 0===e.assignBonds||e.assignBonds;function h(t,e){const r=[];let n=0,i=0;for(;i-1){let e=m.split("");e[t]="_",m=(m=e.join("")).substring(0,t)+"_"+m.substring(t+1)}}f.push(m)}}let g=0;for(;g{"use strict";r.r(e),r.d(e,{CUBE:()=>a});var n=r("./src/WebGL/index.ts"),i=r("./src/parsers/utils/assignBonds.ts"),o=r("./src/parsers/utils/anumToSymbol.ts");function a(t,e){e=e||{};const r=[[]];let a=t.split(/\r?\n/);const s=void 0===e.assignBonds||e.assignBonds;if(a.length<6)return r;let l=a[2].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");const c=Math.abs(parseFloat(l[0]));let u={origin:void 0,size:void 0,unit:void 0,matrix4:void 0,matrix:void 0};const h=u.origin=new n.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3]));l=a[3].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),l=a[3].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");const d=l[0]>0?.529177:1;h.multiplyScalar(d);const f=Math.abs(l[0]),p=new n.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])).multiplyScalar(d);l=a[4].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");const m=Math.abs(l[0]),g=new n.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])).multiplyScalar(d);l=a[5].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");const v=Math.abs(l[0]),b=new n.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])).multiplyScalar(d);if(u.size={x:f,y:m,z:v},u.unit=new n.Vector3(p.x,g.y,b.z),0!=p.y||0!=p.z||0!=g.x||0!=g.z||0!=b.x||0!=b.y){u.matrix4=new n.Matrix4(p.x,g.x,b.x,0,p.y,g.y,b.y,0,p.z,g.z,b.z,0,0,0,0,1);let t=(new n.Matrix4).makeTranslation(h.x,h.y,h.z);u.matrix4=u.matrix4.multiplyMatrices(t,u.matrix4),u.matrix=u.matrix4.matrix3FromTopLeft(),u.origin=new n.Vector3(0,0,0),u.unit=new n.Vector3(1,1,1)}r.modelData=[{cryst:u}],a=a.splice(6,c);for(var y=r[r.length-1].length,x=y+a.length,_=y;_{"use strict";r.r(e),r.d(e,{GRO:()=>o});var n=r("./src/parsers/utils/assignPDBBonds.ts"),i=r("./src/parsers/utils/atomNameToElem.ts");function o(t,e){const r=[],o=t.split(/\r?\n|\r/);for(;o.length>0;){const t=parseInt(o[1]);if(o.length<3||isNaN(t)||t<=0||o.length44&&(a.dx=10*parseFloat(r.slice(44,52)),a.dy=10*parseFloat(r.slice(52,60)),a.dz=10*parseFloat(r.slice(60,68))),e[t]=a}if(o.length<=n+3){const t=o[n++].trim().split(/\s+/);if(3===t.length){for(let e=0;e<3;e++)t[e]=(10*parseFloat(t[e])).toString();r.box=t}}o.splice(0,++n)}for(let t=0;t{"use strict";r.r(e),r.d(e,{LAMMPSTRJ:()=>o});var n=r("./src/parsers/utils/assignBonds.ts");const i={id:"serial",type:"atom",element:"elem",q:"charge",radius:"radius",x:"x",xu:"x",xs:"x",xsu:"x",y:"y",yu:"y",ys:"y",ysu:"y",z:"z",zu:"z",zs:"z",zsu:"z"};function o(t,e){const r=[],o=t.split(/\r?\n|\r/);let a=0,s=0,l=0;for(;l{"use strict";r.r(e),r.d(e,{MMTFparser:()=>h});var n=r("./src/utilities.ts"),i=r("./src/WebGL/index.ts"),o=r("./src/parsers/utils/computeSecondaryStructure.ts"),a=r("./src/parsers/utils/processSymmetries.ts"),s=r("./src/vendor/mmtf.js"),l=function(t){return String.fromCharCode.apply(null,t).replace(/\0/g,"")},c=function(t){return 0==t||2==t||4==t?"h":3==t?"s":"c"};let u=new Set(["D-SACCHARIDE","D-SACCHARIDE 1,4 AND 1,4 LINKING","D-SACCHARIDE 1,4 AND 1,6 LINKING","L-SACCHARIDE","L-SACCHARIDE 1,4 AND 1,4 LINKING","L-SACCHARIDE 1,4 AND 1,6 LINKING","NON-POLYMER","OTHER","PEPTIDE-LIKE","SACCHARIDE"]);function h(t,e){var r=!e.keepH,h=e.altLoc?e.altLoc:"A",d=!!e.noSecondaryStructure,f=!e.noComputeSecondaryStructure,p=!e.doAssembly,m=e.assemblyIndex?e.assemblyIndex:0;t="string"==typeof t?(0,n.base64ToArray)(t):new Uint8Array(t);var g,v,b,y,x,_,w=s.decode(t),k=[[]],A=k.modelData=[],M=0,T=0,S=0,C=w.secStructList,E=w.bFactorList,L=w.altLocList,z=w.occupancyList,O=w.bondAtomList,D=w.bondOrderList,I=w.numModels;if(0==I)return k;e.multimodel||(I=1);var F=[];if(!p&&w.bioAssemblyList&&w.bioAssemblyList.length>0){var R=w.bioAssemblyList[m].transformList;for(g=0,_=R.length;g<_;g++){var P=new i.Matrix4(R[g].matrix);P.transpose(),F.push(P)}}var j=null;if(w.unitCell){var N=w.unitCell;j={a:N[0],b:N[1],c:N[2],alpha:N[3],beta:N[4],gamma:N[5]}}let B=[];w.entityList.forEach((t=>{t.chainIndexList.forEach((e=>{B[e]="polymer"==t.type}))}));var U=0;for(x=0;x=C.length||c(C[et]!=tt))&&(Q=!0)}var rt=w.groupIdList[T],nt=X.groupName;let t=X.chemCompType;var it=S;let e=u.has(t)||!B[M];for(b=0;b<$;++b){var ot=X.elementList[b];if(r&&"H"==ot)S+=1;else{var at="";E&&(at=E[S]);var st="";L&&L[S]&&(st=String.fromCharCode(L[S]));var lt="";if(z&&(lt=z[S]),""==st||st==h||"*"==h){var ct=w.atomIdList[S],ut=X.atomNameList[b],ht=0;X.atomChargeList&&(ht=X.atomChargeList[b]);var dt=w.xCoordList[S],ft=w.yCoordList[S],pt=w.zCoordList[S];H[S]=V.length,V.push({resn:nt,x:dt,y:ft,z:pt,elem:ot,hetflag:e,chain:q,resi:rt,icode:st,rescode:rt+(" "!=st?"^"+st:""),serial:ct,altLoc:st,index:S,atom:ut,bonds:[],ss:c(J),ssbegin:K,ssend:Q,bondOrder:[],properties:{charge:ht,occupancy:lt},b:at}),S+=1}else S+=1}}var mt=X.bondAtomList;for(b=0,y=X.bondOrderList.length;b=S){U=t;break}let i=H[e],o=H[r],a=V[i],s=V[o];a&&s&&(a.bonds.push(o),a.bondOrder.push(n),s.bonds.push(i),s.bondOrder.push(n))}e.multimodel&&(e.onemol||k.push([]))}if(!p)for(let t=0;t{"use strict";r.r(e),r.d(e,{MOL2:()=>i});let n={"C.1":"C",C1:"C","C.2":"C",C2:"C","C.3":"C",C3:"C","C.ar":"C",Car:"C","C.cat":"C",Ccat:"C","H.spc":"H",Hspc:"H","H.t3p":"H",Ht3p:"H","N.1":"N",N1:"N","N.2":"N",N2:"N","N.3":"N",N3:"N","N.4":"N",N4:"N","N.am":"N",Nam:"N","N.ar":"N",Nar:"N","N.p13":"N",Np13:"N","O.2":"O",O2:"O","O.3":"O",O3:"O","O.co2":"O",Oco2:"O","O.spc":"O",Ospc:"O","O.t3p":"O",Ot3p:"O","P.3":"P",P3:"P","S.2":"S",S2:"S","S.3":"S",S3:"S","S.o":"S",So:"S","S.o2":"S",So2:"S"};function i(t,e){var r=[[]],i=!1;void 0!==e.keepH&&(i=!e.keepH);var o=t.search(/@MOLECULE/),a=t.search(/@ATOM/);if(-1==o||-1==a)return r;for(var s=t.substring(o).split(/\r?\n|\r/);s.length>0;){var l=[],c=s[2].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),u=parseInt(c[0]),h=0;c.length>1&&(h=parseInt(c[1]));var d,f=4;for(d=3;dATOM"==s[d]){f=d+1;break}var p=r[r.length-1].length,m=p+u;for(d=p;dBOND"==s[f++]){_=!0;break}if(_&&h)for(d=0;d{"use strict";r.r(e),r.d(e,{PDB:()=>i});var n=r("./src/parsers/utils/getSinglePDB.ts");function i(t,e){e=e||{};var r=[],i={};r.modelData=[];for(var o=t.split(/\r?\n|\r/);o.length>0;){var a=(0,n.getSinglePDB)(o,e,i),s=a[0],l=a[1];if(o=a[2],0!=s.length){if(e.multimodel&&e.onemol&&r.length>0)for(var c=r[0].length,u=0;u{"use strict";r.r(e),r.d(e,{PQR:()=>o});var n=r("./src/parsers/utils/assignPDBBonds.ts"),i=r("./src/parsers/utils/computeSecondaryStructure.ts");function o(t,e){var r=[[]],o=!e.noSecondaryStructure;r.modelData=[{symmetries:[]}];var a,s=[],l=t.split(/\r?\n|\r/);for(let t=0;t1&&e[1].toUpperCase()!=e[1]&&(v=e.substring(0,2)),u="H"==a[0],s[t]=r[r.length-1].length,r[r.length-1].push({resn:n,x:d,y:f,z:p,elem:v,hetflag:u,chain:i,resi:o,serial:t,atom:e,bonds:[],ss:"c",bondOrder:[],properties:{charge:m,partialCharge:m,radius:g},pdbline:a})}else if("CONECT"==c){var b=parseInt(a.substring(6,11)),y=r[r.length-1][s[b]];for(let t=0;t<4;t++){var x=parseInt(a.substring([11,16,21,26][t],[11,16,21,26][t]+5)),_=r[r.length-1][s[x]];void 0!==y&&void 0!==_&&(y.bonds.push(s[x]),y.bondOrder.push(1))}}}for(let t=0;t{"use strict";function n(t){var e,r=[],n=0,i=t.split(/\r?\n|\r/);if(!(i.length>0&&i[0].includes("VERSION")))return[];var o=i.filter((function(t){return t.includes("POINTERS")||t.includes("ATOM_NAME")||t.includes("CHARGE")||t.includes("RADII")||t.includes("BONDS_INC_HYDROGEN")||t.includes("BONDS_WITHOUT_HYDROGEN")})),a=u("POINTERS");if(-1==a)return[];var s=h(a),l=parseInt(i[a+1].slice(0,s[1]));if(isNaN(l)||l<=0)return[];if(-1==(a=u("ATOM_NAME")))return[];var c=(s=h(a))[0];for(let t=0;t0){for(;!i[e].includes("FORMAT");)e++;return e}return-1}function h(t){var e=i[t].match(/\((\d*)\S*/),r=i[t].match(/[a-zA-Z](\d*)\)\s*/);return null==r&&(r=i[t].match(/[a-zA-Z](\d*)\.\d*\)\s*/)),[e[1],r[1]]}return[r]}r.r(e),r.d(e,{PRMTOP:()=>n})},"./src/parsers/SDF.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SDF:()=>o});var n=function(t,e){var r=[[]],n=!1;for(void 0!==e.keepH&&(n=!e.keepH);t.length>0&&!(t.length<4);){var i=parseInt(t[3].substring(0,3));if(isNaN(i)||i<=0)break;var o=parseInt(t[3].substring(3,6)),a=4;if(t.length<4+i+o)break;var s,l,c=[],u=r[r.length-1].length,h=u+i;for(s=u;s0&&!(t.length<8)&&t[4].startsWith("M V30 BEGIN CTAB")&&t[5].startsWith("M V30 COUNTS")&&!(t[5].length<14);){var i=t[5].substring(13).match(/\S+/g);if(i.length<2)break;var o=parseInt(i[0]);if(isNaN(o)||o<=0)break;var a=parseInt(i[1]),s=7;if(t.length<8+o+a)break;var l,c=[],u=r[r.length-1].length,h=u+o;for(l=u;l4){var f={},p=d[1].replace(/ /g,"");f.atom=f.elem=p[0].toUpperCase()+p.substring(1).toLowerCase(),"H"===f.elem&&n||(f.serial=l,c[l]=r[r.length-1].length,f.x=parseFloat(d[2]),f.y=parseFloat(d[3]),f.z=parseFloat(d[4]),f.hetflag=!0,f.bonds=[],f.bondOrder=[],f.properties={},f.index=r[r.length-1].length,r[r.length-1].push(f))}}if("M V30 END ATOM"!==t[s])break;if(s++,0===a||"M V30 BEGIN BOND"!==t[s])break;for(s++,l=0;l3){var g=c[parseInt(m[2])-1+u],v=c[parseInt(m[3])-1+u],b=parseFloat(m[1]);void 0!==g&&void 0!==v&&(r[r.length-1][g].bonds.push(v),r[r.length-1][g].bondOrder.push(b),r[r.length-1][v].bonds.push(g),r[r.length-1][v].bondOrder.push(b))}}if(!e.multimodel)break;for(e.onemol||r.push([]);"$$$$"!==t[s]&&s3&&o[3].length>38&&(r=o[3].substring(34,39)),"V2000"===r?n(o,e):"V3000"===r?i(o,e):[[""]]}},"./src/parsers/VASP.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{VASP:()=>o});var n=r("./src/WebGL/index.ts"),i=r("./src/parsers/utils/assignBonds.ts");function o(t,e={}){var r=[[]],o={};const a=void 0===e.assignBonds||e.assignBonds;var s=t.replace(/^\s+/,"").split(/\r?\n/);if(s.length<3)return r;if(!s[1].match(/\d+/))return console.log("Warning: second line of the vasp structure file must be a number"),r;if(o.length=parseFloat(s[1]),o.length<0)return console.log("Warning: Vasp implementation for negative lattice lengths is not yet available"),r;o.xVec=new Float32Array(s[2].replace(/^\s+/,"").split(/\s+/)),o.yVec=new Float32Array(s[3].replace(/^\s+/,"").split(/\s+/)),o.zVec=new Float32Array(s[4].replace(/^\s+/,"").split(/\s+/));var l=new n.Matrix3(o.xVec[0],o.xVec[1],o.xVec[2],o.yVec[0],o.yVec[1],o.yVec[2],o.zVec[0],o.zVec[1],o.zVec[2]);l.multiplyScalar(o.length),r.modelData=[{symmetries:[],cryst:{matrix:l}}];var c=s[5].replace(/\s+/,"").replace(/\s+$/,"").split(/\s+/),u=new Int16Array(s[6].replace(/^\s+/,"").split(/\s+/)),h=s[7].replace(/\s+/,""),d=!1;if(h.match(/S/)&&(d=!0,h=s[8].replace(/\s+/,"")),h.match(/C/))h="cartesian";else{if(!h.match(/D/))return console.log("Warning: Unknown vasp mode in POSCAR file: mode must be either C(artesian) or D(irect)"),r;h="direct"}if(c.length!=u.length)return console.log("Warning: declaration of atomary species wrong:"),console.log(c),console.log(u),r;d?s.splice(0,9):s.splice(0,8);for(var f=0,p=0,m=c.length;p{"use strict";r.r(e),r.d(e,{XYZ:()=>o});var n=r("./src/WebGL/index.ts"),i=r("./src/parsers/utils/assignBonds.ts");function o(t,e){for(var r=[[]],o=void 0===(e=e||{}).assignBonds||e.assignBonds,a=t.split(/\r?\n|\r/);a.length>0&&!(a.length<3);){var s=parseInt(a[0]);if(isNaN(s)||s<=0)break;if(a.length1){var c=new Float32Array(l[1].split(/\s+/)),u=new n.Matrix3(c[0],c[3],c[6],c[1],c[4],c[7],c[2],c[5],c[8]);r.modelData=[{cryst:{matrix:u}}]}for(var h=2,d=r[r.length-1].length,f=d+s,p=d;p=7&&(g.dx=parseFloat(m[4]),g.dy=parseFloat(m[5]),g.dz=parseFloat(m[6]))}if(!e.multimodel)break;r.push([]),a.splice(0,h)}if(o)for(let t=0;t{"use strict";r.r(e),r.d(e,{Category:()=>i});var n=r("./src/parsers/cifutils/decoder.ts");function i(t){const e=Object.create(null),r=Object.create(null);for(const r of t.columns)e[r.name]=r;return{rowCount:t.rowCount,name:t.name.substring(1),fieldNames:t.columns.map((t=>t.name)),getField(t){const i=e[t];if(i)return r[t]||(r[t]=(0,n.decode)(i.data)),r[t]}}}},"./src/parsers/cifutils/decoder.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{decode:()=>o});var n=r("./src/parsers/cifutils/encoding.ts");const i=13330===new Uint16Array(new Uint8Array([18,52]).buffer)[0];function o(t){let e=t.data;for(let r=t.encoding.length-1;r>=0;r--)e=a(e,t.encoding[r]);return e}function a(t,e){switch(e.kind){case"ByteArray":switch(e.type){case n.Encoding.IntDataType.Uint8:return t;case n.Encoding.IntDataType.Int8:return function(t){return new Int8Array(t.buffer,t.byteOffset)}(t);case n.Encoding.IntDataType.Int16:return function(t){return c(t,2,Int16Array)}(t);case n.Encoding.IntDataType.Uint16:return function(t){return c(t,2,Uint16Array)}(t);case n.Encoding.IntDataType.Int32:return function(t){return c(t,4,Int32Array)}(t);case n.Encoding.IntDataType.Uint32:return function(t){return c(t,4,Uint32Array)}(t);case n.Encoding.FloatDataType.Float32:return function(t){return c(t,4,Float32Array)}(t);case n.Encoding.FloatDataType.Float64:return function(t){return c(t,8,Float64Array)}(t);default:throw new Error("unreachable")}case"FixedPoint":return function(t,e){const r=t.length,n=l(e.srcType,r),i=1/e.factor;for(let e=0;e{"use strict";r.r(e),r.d(e,{Encoding:()=>i,VERSION:()=>n});const n="0.3.0";var i;!function(t){let e,r;!function(t){t[t.Int8=1]="Int8",t[t.Int16=2]="Int16",t[t.Int32=3]="Int32",t[t.Uint8=4]="Uint8",t[t.Uint16=5]="Uint16",t[t.Uint32=6]="Uint32"}(e=t.IntDataType||(t.IntDataType={})),function(t){t[t.Float32=32]="Float32",t[t.Float64=33]="Float64"}(r=t.FloatDataType||(t.FloatDataType={})),t.getDataType=function(e){let r;return r=e instanceof Int8Array?t.IntDataType.Int8:e instanceof Int16Array?t.IntDataType.Int16:e instanceof Int32Array?t.IntDataType.Int32:e instanceof Uint8Array?t.IntDataType.Uint8:e instanceof Uint16Array?t.IntDataType.Uint16:e instanceof Uint32Array?t.IntDataType.Uint32:e instanceof Float32Array?t.FloatDataType.Float32:e instanceof Float64Array?t.FloatDataType.Float64:t.IntDataType.Int32,r},t.isSignedIntegerDataType=function(t){if(t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array)return!0;for(let e=0,r=t.length;e{"use strict";r.r(e),r.d(e,{Parsers:()=>b,bondLength:()=>v.bondLength,setBondLength:()=>v.setBondLength});var n=r("./src/parsers/VASP.ts"),i=r("./src/parsers/CUBE.ts"),o=r("./src/parsers/XYZ.ts"),a=r("./src/parsers/SDF.ts"),s=r("./src/parsers/CDJSON.ts"),l=r("./src/parsers/CIF.ts"),c=r("./src/parsers/MOL2.ts"),u=r("./src/parsers/PDB.ts"),h=r("./src/parsers/PQR.ts"),d=r("./src/parsers/MMTF.ts"),f=r("./src/parsers/PRMTOP.ts"),p=r("./src/parsers/GRO.ts"),m=r("./src/parsers/LAMMPSTRJ.ts"),g=r("./src/parsers/BCIF.ts"),v=r("./src/parsers/utils/bondLength.ts");const b={vasp:n.VASP,VASP:n.VASP,cube:i.CUBE,CUBE:i.CUBE,xyz:o.XYZ,XYZ:o.XYZ,sdf:a.SDF,SDF:a.SDF,json:s.CDJSON,cdjson:s.CDJSON,CDJSON:s.CDJSON,mcif:l.CIF,cif:l.CIF,CIF:l.CIF,mol2:c.MOL2,MOL2:c.MOL2,pdb:u.PDB,PDB:u.PDB,pdbqt:u.PDB,PDBQT:u.PDB,pqr:h.PQR,PQR:h.PQR,mmtf:d.MMTFparser,MMTF:d.MMTFparser,prmtop:f.PRMTOP,PRMTOP:f.PRMTOP,gro:p.GRO,GRO:p.GRO,lammpstrj:m.LAMMPSTRJ,LAMMPSTRJ:m.LAMMPSTRJ,bcif:g.BCIF,BCIF:g.BCIF}},"./src/parsers/utils/anumToSymbol.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{anumToSymbol:()=>n});const n={1:"H",2:"He",3:"Li",4:"Be",5:"B",6:"C",7:"N",8:"O",9:"F",10:"Ne",11:"Na",12:"Mg",13:"Al",14:"Si",15:"P",16:"S",17:"Cl",18:"Ar",19:"K",20:"Ca",21:"Sc",22:"Ti",23:"V",24:"Cr",25:"Mn",26:"Fe",27:"Co",28:"Ni",29:"Cu",30:"Zn",31:"Ga",32:"Ge",33:"As",34:"Se",35:"Br",36:"Kr",37:"Rb",38:"Sr",39:"Y",40:"Zr",41:"Nb",42:"Mo",43:"Tc",44:"Ru",45:"Rh",46:"Pd",47:"Ag",48:"Cd",49:"In",50:"Sn",51:"Sb",52:"Te",53:"I",54:"Xe",55:"Cs",56:"Ba",71:"Lu",72:"Hf",73:"Ta",74:"W",75:"Re",76:"Os",77:"Ir",78:"Pt",79:"Au",80:"Hg",81:"Tl",82:"Pb",83:"Bi",84:"Po",85:"At",86:"Rn",87:"Fr",88:"Ra",104:"Rf",105:"Db",106:"Sg",107:"Bh",108:"Hs",109:"Mt",110:"Ds",111:"Rg",112:"Cn",113:"Nh",114:"Fl",115:"Mc",116:"Lv",117:"Ts",118:"Og",57:"La",58:"Ce",59:"Pr",60:"Nd",61:"Pm",62:"Sm",63:"Eu",64:"Gd",65:"Tb",66:"Dy",67:"Ho",68:"Er",69:"Tm",70:"Yb",89:"Ac",90:"Th",91:"Pa",92:"U",93:"Np",94:"Pu",95:"Am",96:"Cm",97:"Bk",98:"Cf",99:"Es",100:"Fm",101:"Md",102:"No"}},"./src/parsers/utils/areConnected.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{areConnected:()=>o});var n=r("./src/parsers/utils/bondLength.ts");const i=new Set(["Na","K","Ca","Mg","Mn","Sr"]);function o(t,e,r){if(r&&r.unboundCations&&(i.has(t.elem)||i.has(e.elem)))return!1;let o=(0,n.bondLength)(t.elem)+(0,n.bondLength)(e.elem);o+=.25,o*=o;let a=t.x-e.x;if(a*=a,a>o)return!1;let s=t.y-e.y;if(s*=s,s>o)return!1;let l=t.z-e.z;if(l*=l,l>o)return!1;const c=a+s+l;return!(isNaN(c)||c<.5||c>o||t.altLoc!==e.altLoc&&""!==t.altLoc.trim()&&""!==e.altLoc.trim())}},"./src/parsers/utils/assignBackboneHBonds.ts":(t,e,r)=>{"use strict";function n(t,e){const r=e||3.2,n=r*r,i=[];for(let e=0,r=t.length;er)break;if(t.atom==o.atom)continue;const s=Math.abs(t.y-o.y);if(s>r)continue;const l=Math.abs(t.x-o.x);if(l>r)continue;const c=l*l+s*s+e*e;c>n||t.chain==o.chain&&Math.abs(t.resi-o.resi)<4||(cn})},"./src/parsers/utils/assignBonds.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{assignBonds:()=>a});var n=r("./src/parsers/utils/areConnected.ts");const i=[{x:0,y:0,z:1},{x:0,y:1,z:-1},{x:0,y:1,z:0},{x:0,y:1,z:1},{x:1,y:-1,z:-1},{x:1,y:-1,z:0},{x:1,y:-1,z:1},{x:1,y:0,z:-1},{x:1,y:0,z:0},{x:1,y:0,z:1},{x:1,y:1,z:-1},{x:1,y:1,z:0},{x:1,y:1,z:1}],o=4.95;function a(t,e){for(let e=0,r=t.length;e{"use strict";r.r(e),r.d(e,{assignPDBBonds:()=>a});var n=r("./src/parsers/utils/areConnected.ts"),i=r("./src/parsers/utils/assignBonds.ts"),o=r("./src/parsers/utils/standardResidues.ts");function a(t,e){const r=[],a=[];for(let e=0,n=t.length;e1)break;(0,n.areConnected)(i,t,e)&&(-1===i.bonds.indexOf(t.index)&&(i.bonds.push(t.index),i.bondOrder.push(1),t.bonds.push(i.index),t.bondOrder.push(1)),i.resi!==t.resi&&(s=!0))}}}},"./src/parsers/utils/atomNameToElem.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{atomNameToElem:()=>i});var n=r("./src/parsers/utils/bondLength.ts");function i(t,e){let r=t.replace(/ /g,"");return r.length>0&&"H"===r[0]&&"Hg"!==r&&"He"!==r&&"Hf"!==r&&"Hs"!==r&&"Ho"!==r&&(r="H"),r.length>1&&(r=r[0].toUpperCase()+r.substring(1).toLowerCase(),void 0===n.bondTable[r]?r=r[0]:e&&("Ca"===r||"Cd"===r)&&(r="C")),r}},"./src/parsers/utils/bondLength.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{bondLength:()=>i,bondTable:()=>n,setBondLength:()=>o});let n={H:.37,He:.32,Li:1.34,Be:.9,B:.82,C:.77,N:.75,O:.73,F:.71,Ne:.69,Na:1.54,Mg:1.3,Al:1.18,Si:1.11,P:1.06,S:1.02,Cl:.99,Ar:.97,K:1.96,Ca:1.74,Sc:1.44,Ti:1.56,V:1.25,Mn:1.39,Fe:1.25,Co:1.26,Ni:1.21,Cu:1.38,Zn:1.31,Ga:1.26,Ge:1.22,Se:1.16,Br:1.14,Kr:1.1,Rb:2.11,Sr:1.92,Y:1.62,Zr:1.48,Nb:1.37,Mo:1.45,Tc:1.56,Ru:1.26,Rh:1.35,Pd:1.31,Ag:1.53,Cd:1.48,In:1.44,Sn:1.41,Sb:1.38,Te:1.35,I:1.33,Xe:1.3,Cs:2.25,Ba:1.98,Lu:1.6,Hf:1.5,Ta:1.38,W:1.46,Re:1.59,Os:1.44,Ir:1.37,Pt:1.28,Au:1.44,Hg:1.49,Tl:1.48,Pb:1.47,Bi:1.46,Rn:1.45};function i(t){return n[t]||1.6}function o(t,e){e<0&&(e=0),n[t]=e}},"./src/parsers/utils/computeSecondaryStructure.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{computeSecondaryStructure:()=>i});var n=r("./src/parsers/utils/assignBackboneHBonds.ts");function i(t,e){(0,n.assignBackboneHBonds)(t,e);const r={};let i,o,a,s,l,c;for(i=0,o=t.length;i{"use strict";r.r(e),r.d(e,{getSinglePDB:()=>h});var n=r("./src/WebGL/index.ts"),i=r("./src/parsers/utils/atomNameToElem.ts"),o=r("./src/parsers/utils/bondLength.ts"),a=r("./src/parsers/utils/computeSecondaryStructure.ts"),s=r("./src/parsers/utils/isEmpty.ts"),l=r("./src/parsers/utils/processSymmetries.ts"),c=r("./src/parsers/utils/assignPDBBonds.ts"),u=r("./src/parsers/utils/validateBonds.ts");function h(t,e,r){const h=[],d=void 0===e.assignBonds||e.assignBonds,f=!e.keepH,p=!!e.noSecondaryStructure,m=!e.noComputeSecondaryStructure,g=!e.doAssembly,v=e.altLoc?e.altLoc:"A",b={symmetries:[],cryst:void 0};let y,x=[];const _=[];let w;const k={};for(let e=0;e=4?1:r}}else k[o]=1,0!=e.bonds.length&&e.bonds[e.bonds.length-1]===i||(e.bonds.push(i),e.bondOrder.push(1))}}else if("HELIX "===a){s=w.substring(19,20),l=parseInt(w.substring(21,25)),c=parseInt(w.substring(33,37)),s in r||(r[s]={}),r[s][l]="h1";for(let t=l+1;t1&&("1"==t[1]?e.ssbegin=!0:"2"==t[1]&&(e.ssend=!0))}}return[h,b,x]}},"./src/parsers/utils/isEmpty.ts":(t,e,r)=>{"use strict";function n(t){for(const e in t)return!1;return!0}r.r(e),r.d(e,{isEmpty:()=>n})},"./src/parsers/utils/processSymmetries.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{processSymmetries:()=>i});var n=r("./src/WebGL/index.ts");function i(t,e,r,i){const o=!r.duplicateAssemblyAtoms,a=e.length;let s=a,l=-1,c=null,u=null;(r.normalizeAssembly||r.wrapAtoms)&&i&&(c=(0,n.conversionMatrix3)(i.a,i.b,i.c,i.alpha,i.beta,i.gamma),u=new n.Matrix3,u.getInverse3(c));let h=function(t){let e=t.clone().applyMatrix3(u);const r=[e.x,e.y,e.z],i=[0,0,0];for(let t=0;t<3;t++){for(;r[t]<-.001;)r[t]+=1,i[t]+=1;for(;r[t]>1.001;)r[t]-=1,i[t]-=1}const o=new n.Vector3(i[0],i[1],i[2]);return o.applyMatrix3(c),o};if(r.normalizeAssembly&&i)for(let r=0;r.001&&(l=r),t[r].translate(o)}if(o){if(t.length>1)for(let r=0;r=0){const r=new n.Vector3;for(let n=0;n{"use strict";r.r(e),r.d(e,{standardResidues:()=>n});const n=new Set(["ABU","ACD","ALA","ALB","ALI","ARG","AR0","ASN","ASP","ASX","BAS","CYS","CYH","CYX","CSS","CSH","GLN","GLU","GLX","GLY","HIS","HIE","HID","HIP","HYP","ILE","ILU","LEU","LYS","MET","PCA","PGA","PHE","PR0","PRO","PRZ","SER","THR","TRP","TYR","VAL","A","1MA","C","5MC","OMC","G","1MG","2MG","M2G","7MG","OMG","YG","I","T","U","+U","H2U","5MU","PSU","ACE","F0R","H2O","HOH","WAT"])},"./src/parsers/utils/validateBonds.ts":(t,e,r)=>{"use strict";function n(t,e){for(let r=0,n=t.length;rn})},"./src/partialCharges.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{applyPartialCharges:()=>i,partialCharges:()=>n});const n={"ALA:N":-.15,"ALA:CA":.1,"ALA:CB":0,"ALA:C":.6,"ALA:O":-.55,"ARG:N":-.15,"ARG:CA":.1,"ARG:CB":0,"ARG:CG":0,"ARG:CD":.1,"ARG:NE":-.1,"ARG:CZ":.5,"ARG:NH1":.25,"ARG:NH2":.25,"ARG:C":.6,"ARG:O":-.55,"ASN:N":-.15,"ASN:CA":.1,"ASN:CB":0,"ASN:CG":.55,"ASN:OD1":-.55,"ASN:ND2":0,"ASN:C":.6,"ASN:O":-.55,"ASP:N":-.15,"ASP:CA":.1,"ASP:CB":0,"ASP:CG":.14,"ASP:OD1":-.57,"ASP:OD2":-.57,"ASP:C":.6,"ASP:O":-.55,"CYS:N":-.15,"CYS:CA":.1,"CYS:CB":.19,"CYS:SG":-.19,"CYS:C":.6,"CYS:O":-.55,"GLN:N":-.15,"GLN:CA":.1,"GLN:CB":0,"GLN:CG":0,"GLN:CD":.55,"GLN:OE1":-.55,"GLN:NE2":0,"GLN:C":.6,"GLN:O":-.55,"GLU:N":-.15,"GLU:CA":.1,"GLU:CB":0,"GLU:CG":0,"GLU:CD":.14,"GLU:OE1":-.57,"GLU:OE2":-.57,"GLU:C":.6,"GLU:O":-.55,"GLY:N":-.15,"GLY:CA":.1,"GLY:C":.6,"GLY:O":-.55,"HIS:N":-.15,"HIS:CA":.1,"HIS:CB":0,"HIS:CG":.1,"HIS:ND1":-.1,"HIS:CD2":.1,"HIS:NE2":-.4,"HIS:CE1":.3,"HIS:C":.6,"HIS:O":-.55,"ILE:N":-.15,"ILE:CA":.1,"ILE:CB":0,"ILE:CG2":0,"ILE:CG1":0,"ILE:CD":0,"ILE:C":.6,"ILE:O":-.55,"LEU:N":-.15,"LEU:CA":.1,"LEU:CB":0,"LEU:CG":0,"LEU:CD1":0,"LEU:CD2":0,"LEU:C":.6,"LEU:O":-.55,"LYS:N":-.15,"LYS:CA":.1,"LYS:CB":0,"LYS:CG":0,"LYS:CD":0,"LYS:CE":.25,"LYS:NZ":.75,"LYS:C":.6,"LYS:O":-.55,"MET:N":-.15,"MET:CA":.1,"MET:CB":0,"MET:CG":.06,"MET:SD":-.12,"MET:CE":.06,"MET:C":.6,"MET:O":-.55,"PHE:N":-.15,"PHE:CA":.1,"PHE:CB":0,"PHE:CG":0,"PHE:CD1":0,"PHE:CD2":0,"PHE:CE1":0,"PHE:CE2":0,"PHE:CZ":0,"PHE:C":.6,"PHE:O":-.55,"PRO:N":-.25,"PRO:CD":.1,"PRO:CA":.1,"PRO:CB":0,"PRO:CG":0,"PRO:C":.6,"PRO:O":-.55,"SER:N":-.15,"SER:CA":.1,"SER:CB":.25,"SER:OG":-.25,"SER:C":.6,"SER:O":-.55,"THR:N":-.15,"THR:CA":.1,"THR:CB":.25,"THR:OG1":-.25,"THR:CG2":0,"THR:C":.6,"THR:O":-.55,"TRP:N":-.15,"TRP:CA":.1,"TRP:CB":0,"TRP:CG":-.03,"TRP:CD2":.1,"TRP:CE2":-.04,"TRP:CE3":-.03,"TRP:CD1":.06,"TRP:NE1":-.06,"TRP:CZ2":0,"TRP:CZ3":0,"TRP:CH2":0,"TRP:C":.6,"TRP:O":-.55,"TYR:N":-.15,"TYR:CA":.1,"TYR:CB":0,"TYR:CG":0,"TYR:CD1":0,"TYR:CE1":0,"TYR:CD2":0,"TYR:CE2":0,"TYR:CZ":.25,"TYR:OH":-.25,"TYR:C":.6,"TYR:O":-.55,"VAL:N":-.15,"VAL:CA":.1,"VAL:CB":0,"VAL:CG1":0,"VAL:CG2":0,"VAL:C":.6,"VAL:O":-.55};function i(t,e){if((!e||void 0===t.partialCharge)&&t.resn&&t.atom){var r=t.resn+":"+t.atom;t.properties.partialCharge=n[r]}}},"./src/specs.ts":(t,e,r)=>{"use strict";r.r(e)},"./src/utilities.ts":(__unused_webpack_module,__nested_webpack_exports__,__nested_webpack_require_1150143__)=>{"use strict";__nested_webpack_require_1150143__.r(__nested_webpack_exports__),__nested_webpack_require_1150143__.d(__nested_webpack_exports__,{PausableTimer:()=>PausableTimer,adjustVolumeStyle:()=>adjustVolumeStyle,base64ToArray:()=>base64ToArray,deepCopy:()=>deepCopy,download:()=>download,extend:()=>extend,get:()=>get,getAtomProperty:()=>getAtomProperty,getColorFromStyle:()=>getColorFromStyle,getElement:()=>getElement,getExtent:()=>getExtent,getPropertyRange:()=>getPropertyRange,getbin:()=>getbin,inflateString:()=>inflateString,isEmptyObject:()=>isEmptyObject,isNumeric:()=>isNumeric,makeFunction:()=>makeFunction,mergeGeos:()=>mergeGeos,specStringToObject:()=>specStringToObject});var _Gradient__WEBPACK_IMPORTED_MODULE_0__=__nested_webpack_require_1150143__("./src/Gradient.ts"),_VolumeData__WEBPACK_IMPORTED_MODULE_1__=__nested_webpack_require_1150143__("./src/VolumeData.ts"),_colors__WEBPACK_IMPORTED_MODULE_2__=__nested_webpack_require_1150143__("./src/colors.ts"),pako__WEBPACK_IMPORTED_MODULE_3__=__nested_webpack_require_1150143__("./node_modules/pako/dist/pako.esm.mjs");function extend(t,e){for(var r in e)e.hasOwnProperty(r)&&void 0!==e[r]&&(t[r]=e[r]);return t}function deepCopy(t){let e,r,n;if(null==t)return{};if("object"!=typeof t||null===t)return t;for(n in e=Array.isArray(t)?[]:{},t)r=t[n],e[n]=deepCopy(r);return e}function isNumeric(t){var e=typeof t;return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))}function isEmptyObject(t){var e;for(e in t)return!1;return!0}function makeFunction(callback){return callback&&"string"==typeof callback&&(callback=eval("("+callback+")")),callback&&"function"!=typeof callback?null:callback}function adjustVolumeStyle(t){t&&(!t.volformat||t.voldata instanceof _VolumeData__WEBPACK_IMPORTED_MODULE_1__.VolumeData||(t.voldata=new _VolumeData__WEBPACK_IMPORTED_MODULE_1__.VolumeData(t.voldata,t.volformat)),t.volscheme&&(t.volscheme=_Gradient__WEBPACK_IMPORTED_MODULE_0__.Gradient.getGradient(t.volscheme)))}function getExtent(t,e){var r,n,i,o,a,s,l,c,u,h,d=!e;if(r=n=i=9999,o=a=s=-9999,l=c=u=h=0,0===t.length)return[[0,0,0],[0,0,0],[0,0,0]];for(var f=0;fp.x?o:p.x,a=a>p.y?a:p.y,s=s>p.z?s:p.z,p.symmetries&&d))for(var m=0;mp.symmetries[m].x?o:p.symmetries[m].x,a=a>p.symmetries[m].y?a:p.symmetries[m].y,s=s>p.symmetries[m].z?s:p.symmetries[m].z}return[[r,n,i],[o,a,s],[l/h,c/h,u/h]]}function getPropertyRange(t,e){for(var r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,i=0,o=t.length;in&&(n=a))}return isFinite(r)||isFinite(n)?isFinite(r)?isFinite(n)||(n=r):r=n:r=n=0,[r,n]}class PausableTimer{constructor(t,e,r){this.total_time_run=0,this.fn=t,this.arg=r,this.countdown=e,this.start_time=(new Date).getTime(),this.ident=setTimeout(t,e,r)}cancel(){clearTimeout(this.ident)}pause(){clearTimeout(this.ident),this.total_time_run=(new Date).getTime()-this.start_time}resume(){this.ident=setTimeout(this.fn,Math.max(0,this.countdown-this.total_time_run),this.arg)}}function base64ToArray(t){for(var e=window.atob(t),r=e.length,n=new Uint8Array(r),i=0;i=0?parseFloat(t):parseInt(t):"true"===t||"false"!==t&&t},r={};if("all"===(t=t.replace(/%7E/g,"~")))return r;for(var n=t.split(";"),i=0;it.text()));return e?r.then(e):r}function getbin(t,e,r,n){var i;return i="POST"==r?fetch(t,{method:"POST",body:n}).then((t=>checkStatus(t))).then((t=>t.arrayBuffer())):fetch(t).then((t=>checkStatus(t))).then((t=>t.arrayBuffer())),e?i.then(e):i}function download(t,e,r,n){var i="",o="",a="",s=null,l=e.addModel();if(t.indexOf(":")<0&&(t=4==t.length?"pdb:"+t:isNaN(t)?"url:"+t:"cid:"+t),"mmtf:"==t.substring(0,5)&&(console.log("WARNING: MMTF now deprecated. Reverting to bcif."),t="bcif:"+t.slice(5)),"bcif:"===t.substring(0,5))t=t.substring(5).toUpperCase(),a="https://models.rcsb.org/"+t+".bcif.gz",r&&void 0===r.noComputeSecondaryStructure&&(r.noComputeSecondaryStructure=!0),s=new Promise((function(t){getbin(a).then((function(n){l.addMolData(n,"bcif.gz",r),e.zoomTo(),e.render(),t(l)}),(function(){console.log("fetch of "+a+" failed.")}))}));else{if("pdb:"===t.substring(0,4)){if(i="bcif",r&&r.format&&(i=r.format),r&&void 0===r.noComputeSecondaryStructure&&(r.noComputeSecondaryStructure=!0),!(t=t.substring(4).toUpperCase()).match(/^[1-9][A-Za-z0-9]{3}$/))return void alert("Wrong PDB ID");"bcif"==i?a="https://models.rcsb.org/"+t.toUpperCase()+".bcif.gz":(o=r&&r.pdbUri?r.pdbUri:"https://files.rcsb.org/view/",a=o+t+"."+i)}else if("cid:"==t.substring(0,4)){if(i="sdf",!(t=t.substring(4)).match(/^[0-9]+$/))return void alert("Wrong Compound ID");a="https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"+t+"/SDF?record_type=3d"}else"url:"==t.substring(0,4)&&(a=t.substring(4),i=a);var c=function(t){l.addMolData(t,i,r),e.zoomTo(),e.render()};s=new Promise((function(e){"bcif"==i?getbin(a).then((function(t){c(t),e(l)})).catch((function(){o=r&&r.pdbUri?r.pdbUri:"https://files.rcsb.org/view/",a=o+t+".pdb",i="pdb",console.log("falling back to pdb format"),get(a).then((function(t){c(t),e(l)})).catch((function(t){c(""),e(l),console.log("fetch of "+a+" failed: "+t.statusText)}))})):get(a).then((function(t){c(t),e(l)})).catch((function(t){c(""),e(l),console.log("fetch of "+a+" failed: "+t.statusText)}))}))}return n?(s.then((function(t){n(t)})),l):s}function getColorFromStyle(t,e){let r=e.colorscheme;if(void 0!==_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r])r=_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r];else if("string"==typeof r&&r.endsWith("Carbon")){let t=r.substring(0,r.lastIndexOf("Carbon")).toLowerCase();if(void 0!==_colors__WEBPACK_IMPORTED_MODULE_2__.htmlColors[t]){let e=Object.assign({},_colors__WEBPACK_IMPORTED_MODULE_2__.elementColors.defaultColors);e.C=_colors__WEBPACK_IMPORTED_MODULE_2__.htmlColors[t],_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r]={prop:"elem",map:e},r=_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r]}}let n=t.color;if(void 0!==e.color&&"spectrum"!=e.color&&(n=e.color),void 0!==r){let o,a;if(void 0!==_colors__WEBPACK_IMPORTED_MODULE_2__.elementColors[r])r=_colors__WEBPACK_IMPORTED_MODULE_2__.elementColors[r],void 0!==r[t[r.prop]]&&(n=r.map[t[r.prop]]);else if(void 0!==r[t[r.prop]])n=r.map[t[r.prop]];else if(void 0!==r.prop&&void 0!==r.gradient){o=r.prop;var i=r.gradient;i instanceof _Gradient__WEBPACK_IMPORTED_MODULE_0__.GradientType||(i=(0,_Gradient__WEBPACK_IMPORTED_MODULE_0__.getGradient)(r));let e=i.range()||[-1,1];a=getAtomProperty(t,o),null!=a&&(n=i.valueToHex(a,e))}else void 0!==r.prop&&void 0!==r.map?(o=r.prop,a=getAtomProperty(t,o),void 0!==r.map[a]&&(n=r.map[a])):void 0!==e.colorscheme[t.elem]?n=e.colorscheme[t.elem]:console.log("Could not interpret colorscheme "+r)}else void 0!==e.colorfunc&&(n=e.colorfunc(t));return _colors__WEBPACK_IMPORTED_MODULE_2__.CC.color(n)}function getElement(t){let e=t;return"string"==typeof t?e=document.querySelector("#"+t):"object"==typeof t&&t.get&&(e=t.get(0)),e}function inflateString(t,e=!0){let r;return r="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t),(0,pako__WEBPACK_IMPORTED_MODULE_3__.inflate)(r,{to:e?"string":null})}},"./node_modules/upng-js/UPNG.js":(t,e,r)=>{var n;n={},t.exports=n,function(t,e){t.toRGBA8=function(e){var r=e.width,n=e.height;if(null==e.tabs.acTL)return[t.toRGBA8.decodeImage(e.data,r,n,e).buffer];var i=[];null==e.frames[0].data&&(e.frames[0].data=e.data);for(var o,a=new Uint8Array(r*n*4),s=0;s>3)]>>7-(7&p)&1);l[T]=x[S],l[T+1]=x[S+1],l[T+2]=x[S+2],l[T+3]=C>2)]>>6-((3&p)<<1)&3),l[T]=x[S],l[T+1]=x[S+1],l[T+2]=x[S+2],l[T+3]=C>1)]>>4-((1&p)<<2)&15),l[T]=x[S],l[T+1]=x[S+1],l[T+2]=x[S+2],l[T+3]=C>3]>>7-(7&p)&1))==255*g?0:255;c[p]=z<<24|E<<16|E<<8|E}if(2==h)for(p=0;p>2]>>6-((3&p)<<1)&3))==85*g?0:255,c[p]=z<<24|E<<16|E<<8|E;if(4==h)for(p=0;p>1]>>4-((1&p)<<2)&15))==17*g?0:255,c[p]=z<<24|E<<16|E<<8|E;if(8==h)for(p=0;p>3,s=Math.ceil(n*o/8),l=new Uint8Array(i*s),c=0,u=[0,0,4,0,2,0,1],h=[0,4,0,2,0,1,0],d=[8,8,8,4,4,2,2],f=[8,8,4,4,2,2,1],p=0;p<7;){for(var m=d[p],g=f[p],v=0,b=0,y=u[p];y>3])>>7-(7&M)&1,l[k*s+(A>>3)]|=T<<7-(3&A)),2==o&&(T=(T=e[M>>3])>>6-(7&M)&3,l[k*s+(A>>2)]|=T<<6-((3&A)<<1)),4==o&&(T=(T=e[M>>3])>>4-(7&M)&15,l[k*s+(A>>1)]|=T<<4-((1&A)<<2)),o>=8)for(var S=k*s+A*a,C=0;C>3)+C];M+=o,A+=g}w++,k+=m}v*b!=0&&(c+=b*(1+_)),p+=1}return l},t.decode._getBPP=function(t){return[1,null,3,1,2,null,4][t.ctype]*t.depth},t.decode._filterZero=function(e,r,n,i,o){var a=t.decode._getBPP(r),s=Math.ceil(i*a/8),l=t.decode._paeth;a=Math.ceil(a/8);for(var c=0;c>1)&255;if(4==d)for(f=a;f>1)&255;for(f=a;f>1)&255}if(4==d){for(f=0;f>8&255,t[e+1]=255&r},readUint:function(t,e){return 16777216*t[e]+(t[e+1]<<16|t[e+2]<<8|t[e+3])},writeUint:function(t,e,r){t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r},readASCII:function(t,e,r){for(var n="",i=0;i=0&&s>=0?(h=f*e+p<<2,d=(s+f)*i+a+p<<2):(h=(-s+f)*e-a+p<<2,d=f*i+p<<2),0==l)n[d]=t[h],n[d+1]=t[h+1],n[d+2]=t[h+2],n[d+3]=t[h+3];else if(1==l){var m=t[h+3]*(1/255),g=t[h]*m,v=t[h+1]*m,b=t[h+2]*m,y=n[d+3]*(1/255),x=n[d]*y,_=n[d+1]*y,w=n[d+2]*y,k=1-m,A=m+y*k,M=0==A?0:1/A;n[d+3]=255*A,n[d+0]=(g+x*k)*M,n[d+1]=(v+_*k)*M,n[d+2]=(b+w*k)*M}else if(2==l)m=t[h+3],g=t[h],v=t[h+1],b=t[h+2],y=n[d+3],x=n[d],_=n[d+1],w=n[d+2],m==y&&g==x&&v==_&&b==w?(n[d]=0,n[d+1]=0,n[d+2]=0,n[d+3]=0):(n[d]=g,n[d+1]=v,n[d+2]=b,n[d+3]=m);else if(3==l){if(m=t[h+3],g=t[h],v=t[h+1],b=t[h+2],y=n[d+3],x=n[d],_=n[d+1],w=n[d+2],m==y&&g==x&&v==_&&b==w)continue;if(m<220&&y>20)return!1}return!0},t.encode=function(e,r,n,i,o,a){null==i&&(i=0),null==a&&(a=!1);for(var s=new Uint8Array(e[0].byteLength*e.length+100),l=[137,80,78,71,13,10,26,10],c=0;c<8;c++)s[c]=l[c];var u=8,h=t._bin,d=t.crc.crc,f=h.writeUint,p=h.writeUshort,m=h.writeASCII,g=t.encode.compressPNG(e,r,n,i,a);f(s,u,13),m(s,u+=4,"IHDR"),f(s,u+=4,r),f(s,u+=4,n),s[u+=4]=g.depth,s[++u]=g.ctype,s[++u]=0,s[++u]=0,s[++u]=0,f(s,++u,d(s,u-17,17)),f(s,u+=4,1),m(s,u+=4,"sRGB"),s[u+=4]=1,f(s,++u,d(s,u-5,5)),u+=4;var v=e.length>1;if(v&&(f(s,u,8),m(s,u+=4,"acTL"),f(s,u+=4,e.length),f(s,u+=4,0),f(s,u+=4,d(s,u-12,12)),u+=4),3==g.ctype){for(f(s,u,3*(T=g.plte.length)),m(s,u+=4,"PLTE"),u+=4,c=0;c>8&255,w=y>>16&255;s[u+b+0]=x,s[u+b+1]=_,s[u+b+2]=w}if(f(s,u+=3*T,d(s,u-3*T-4,3*T+4)),u+=4,g.gotAlpha){for(f(s,u,T),m(s,u+=4,"tRNS"),u+=4,c=0;c>24&255;f(s,u+=T,d(s,u-T-4,T+4)),u+=4}}for(var k=0,A=0;A=300))break}}var _=!!m&&o,w=v.length;w<=256&&0==a&&(l=w<=2?1:w<=4?2:w<=16?4:8,o&&(l=8),m=!0);var k=[];for(h=0;hN&&(N=G),UB&&(B=U));var V=-1==N?1:(N-P+1)*(B-j+1);V>1)]|=g[M[q+G]]<<4-4*(1&G);else if(2==l)for(G=0;G>2)]|=g[M[q+G]]<<6-2*(3&G);else if(1==l)for(G=0;G>3)]|=g[M[q+G]]<<7-1*(7&G)}A=H,s=3,c=1}else if(0==m&&1==e.length){H=new Uint8Array(C*E*3);var Y=C*E;for(p=0;p5e5)||2!=l&&3!=l&&4!=l){for(var c=0;c>1)+256&255;if(4==a)for(u=o;u>1)&255;for(u=o;u>1)&255}if(4==a){for(u=0;u>>1:r>>>=1;t[e]=r}return t}(),update:function(e,r,n,i){for(var o=0;o>>8;return e},crc:function(e,r,n){return 4294967295^t.crc.update(4294967295,e,r,n)}},t.quantize=function(e,r,n){for(var i=[],o=0,a=0;am&&(m=p[a].est.L,g=a);if(m<.001)break;var v=p[g],b=t.quantize.splitPixels(s,l,v.i0,v.i1,v.est.e,v.est.eMq255),y={i0:v.i0,i1:b,bst:null,est:null,tdst:0,left:null,right:null};y.bst=t.quantize.stats(s,y.i0,y.i1),y.est=t.quantize.estats(y.bst);var x={i0:b,i1:v.i1,bst:null,est:null,tdst:0,left:null,right:null};for(x.bst={R:[],m:[],N:v.bst.N-y.bst.N},a=0;a<16;a++)x.bst.R[a]=v.bst.R[a]-y.bst.R[a];for(a=0;a<4;a++)x.bst.m[a]=v.bst.m[a]-y.bst.m[a];x.est=t.quantize.estats(x.bst),v.left=y,v.right=x,p[g]=y,p.push(x)}p.sort((function(t,e){return e.bst.N-t.bst.N}));for(var _=0;_>2]=L.est.rgba}i[_]=A.buffer}return{bufs:i,plte:p}},t.quantize.getNearest=function(e,r,n,i,o){if(null==e.left)return e.tdst=t.quantize.dist(e.est.q,r,n,i,o),e;var a=t.quantize.planeDst(e.est,r,n,i,o),s=e.left,l=e.right;a>0&&(s=e.right,l=e.left);var c=t.quantize.getNearest(s,r,n,i,o);if(c.tdst<=a*a)return c;var u=t.quantize.getNearest(l,r,n,i,o);return u.tdsta;)i-=4;if(n>=i)break;var l=r[n>>2];r[n>>2]=r[i>>2],r[i>>2]=l,n+=4,i-=4}for(;s(e,n,o)>a;)n-=4;return n+4},t.quantize.vecDot=function(t,e,r){return t[e]*r[0]+t[e+1]*r[1]+t[e+2]*r[2]+t[e+3]*r[3]},t.quantize.stats=function(t,e,r){for(var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],o=r-e>>2,a=e;a>>0}},t.M4={multVec:function(t,e){return[t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3],t[4]*e[0]+t[5]*e[1]+t[6]*e[2]+t[7]*e[3],t[8]*e[0]+t[9]*e[1]+t[10]*e[2]+t[11]*e[3],t[12]*e[0]+t[13]*e[1]+t[14]*e[2]+t[15]*e[3]]},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},sml:function(t,e){return[t*e[0],t*e[1],t*e[2],t*e[3]]}},t.encode.alphaMul=function(t,e){for(var r=new Uint8Array(t.length),n=t.length>>2,i=0;i{"use strict";var n={};(0,r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js").assign)(n,r("./node_modules/upng-js/node_modules/pako/lib/deflate.js"),r("./node_modules/upng-js/node_modules/pako/lib/inflate.js"),r("./node_modules/upng-js/node_modules/pako/lib/zlib/constants.js")),t.exports=n},"./node_modules/upng-js/node_modules/pako/lib/deflate.js":(t,e,r)=>{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/zlib/deflate.js"),i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/utils/strings.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/zlib/zstream.js"),l=Object.prototype.toString;function c(t){if(!(this instanceof c))return new c(t);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==r)throw new Error(a[r]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var u;if(u="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===l.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(r=n.deflateSetDictionary(this.strm,u)))throw new Error(a[r]);this._dict_set=!0}}function u(t,e){var r=new c(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}c.prototype.push=function(t,e){var r,a,s=this.strm,c=this.options.chunkSize;if(this.ended)return!1;a=e===~~e?e:!0===e?4:0,"string"==typeof t?s.input=o.string2buf(t):"[object ArrayBuffer]"===l.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(c),s.next_out=0,s.avail_out=c),1!==(r=n.deflate(s,a))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==r);return 4===a?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==a||(this.onEnd(0),s.avail_out=0,!0)},c.prototype.onData=function(t){this.chunks.push(t)},c.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Deflate=c,e.deflate=u,e.deflateRaw=function(t,e){return(e=e||{}).raw=!0,u(t,e)},e.gzip=function(t,e){return(e=e||{}).gzip=!0,u(t,e)}},"./node_modules/upng-js/node_modules/pako/lib/inflate.js":(t,e,r)=>{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/zlib/inflate.js"),i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/utils/strings.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/constants.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js"),l=r("./node_modules/upng-js/node_modules/pako/lib/zlib/zstream.js"),c=r("./node_modules/upng-js/node_modules/pako/lib/zlib/gzheader.js"),u=Object.prototype.toString;function h(t){if(!(this instanceof h))return new h(t);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,e.windowBits);if(r!==a.Z_OK)throw new Error(s[r]);if(this.header=new c,n.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=o.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=n.inflateSetDictionary(this.strm,e.dictionary))!==a.Z_OK))throw new Error(s[r])}function d(t,e){var r=new h(e);if(r.push(t,!0),r.err)throw r.msg||s[r.err];return r.result}h.prototype.push=function(t,e){var r,s,l,c,h,d=this.strm,f=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;s=e===~~e?e:!0===e?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof t?d.input=o.binstring2buf(t):"[object ArrayBuffer]"===u.call(t)?d.input=new Uint8Array(t):d.input=t,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new i.Buf8(f),d.next_out=0,d.avail_out=f),(r=n.inflate(d,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&p&&(r=n.inflateSetDictionary(this.strm,p)),r===a.Z_BUF_ERROR&&!0===m&&(r=a.Z_OK,m=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&r!==a.Z_STREAM_END&&(0!==d.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(d.output,d.next_out),c=d.next_out-l,h=o.buf2string(d.output,l),d.next_out=c,d.avail_out=f-c,c&&i.arraySet(d.output,d.output,l,c,0),this.onData(h)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(m=!0)}while((d.avail_in>0||0===d.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),d.avail_out=0,!0)},h.prototype.onData=function(t){this.chunks.push(t)},h.prototype.onEnd=function(t){t===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=h,e.inflate=d,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,d(t,e)},e.ungzip=d},"./node_modules/upng-js/node_modules/pako/lib/utils/common.js":(t,e)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(t[i]=r[i])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var o=0;o{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){o=!1}for(var a=new n.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function l(t,e){if(e<65534&&(t.subarray&&o||!t.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var r="",a=0;a>>6,e[a++]=128|63&r):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|63&r):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|63&r);return e},e.buf2binstring=function(t){return l(t,t.length)},e.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r4)c[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r1?c[n++]=65533:i<65536?c[n++]=i:(i-=65536,c[n++]=55296|i>>10&1023,c[n++]=56320|1023&i)}return l(c,n)},e.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+a[t[r]]>e?r:e}},"./node_modules/upng-js/node_modules/pako/lib/zlib/adler32.js":t=>{"use strict";t.exports=function(t,e,r,n){for(var i=65535&t,o=t>>>16&65535,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(i=i+e[n++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16}},"./node_modules/upng-js/node_modules/pako/lib/zlib/constants.js":t=>{"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},"./node_modules/upng-js/node_modules/pako/lib/zlib/crc32.js":t=>{"use strict";var e=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,r,n,i){var o=e,a=i+n;t^=-1;for(var s=i;s>>8^o[255&(t^r[s])];return~t}},"./node_modules/upng-js/node_modules/pako/lib/zlib/deflate.js":(t,e,r)=>{"use strict";var n,i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/zlib/trees.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/adler32.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/zlib/crc32.js"),l=r("./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js"),c=-2,u=258,h=262,d=103,f=113,p=666;function m(t,e){return t.msg=l[e],e}function g(t){return(t<<1)-(t>4?9:0)}function v(t){for(var e=t.length;--e>=0;)t[e]=0}function b(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function y(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,b(t.strm)}function x(t,e){t.pending_buf[t.pending++]=e}function _(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function w(t,e){var r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,l=t.strstart>t.w_size-h?t.strstart-(t.w_size-h):0,c=t.window,d=t.w_mask,f=t.prev,p=t.strstart+u,m=c[o+a-1],g=c[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(c[(r=e)+a]===g&&c[r+a-1]===m&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&oa){if(t.match_start=e,a=n,n>=s)break;m=c[o+a-1],g=c[o+a]}}}while((e=f[e&d])>l&&0!=--i);return a<=t.lookahead?a:t.lookahead}function k(t){var e,r,n,o,l,c,u,d,f,p,m=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=m+(m-h)){i.arraySet(t.window,t.window,m,m,0),t.match_start-=m,t.strstart-=m,t.block_start-=m,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=m?n-m:0}while(--r);e=r=m;do{n=t.prev[--e],t.prev[e]=n>=m?n-m:0}while(--r);o+=m}if(0===t.strm.avail_in)break;if(c=t.strm,u=t.window,d=t.strstart+t.lookahead,f=o,p=void 0,(p=c.avail_in)>f&&(p=f),r=0===p?0:(c.avail_in-=p,i.arraySet(u,c.input,c.next_in,p,d),1===c.state.wrap?c.adler=a(c.adler,u,p,d):2===c.state.wrap&&(c.adler=s(c.adler,u,p,d)),c.next_in+=p,c.total_in+=p,p),t.lookahead+=r,t.lookahead+t.insert>=3)for(l=t.strstart-t.insert,t.ins_h=t.window[l],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<15&&(s=2,n-=16),o<1||o>9||8!==r||n<8||n>15||e<0||e>9||a<0||a>4)return m(t,c);8===n&&(n=9);var l=new S;return t.state=l,l.strm=t,l.wrap=s,l.gzhead=null,l.w_bits=n,l.w_size=1<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(k(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-h&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(y(t,!1),t.strm.avail_out),1)})),new T(4,4,8,4,A),new T(4,5,16,8,A),new T(4,6,32,32,A),new T(4,4,16,16,M),new T(8,16,32,32,M),new T(8,16,128,128,M),new T(8,32,128,256,M),new T(32,128,258,1024,M),new T(32,258,258,4096,M)],e.deflateInit=function(t,e){return L(t,e,8,15,8,0)},e.deflateInit2=L,e.deflateReset=E,e.deflateResetKeep=C,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?c:(t.state.gzhead=e,0):c},e.deflate=function(t,e){var r,i,a,l;if(!t||!t.state||e>5||e<0)return t?m(t,c):c;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||i.status===p&&4!==e)return m(t,0===t.avail_out?-5:c);if(i.strm=t,r=i.last_flush,i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,x(i,31),x(i,139),x(i,8),i.gzhead?(x(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),x(i,255&i.gzhead.time),x(i,i.gzhead.time>>8&255),x(i,i.gzhead.time>>16&255),x(i,i.gzhead.time>>24&255),x(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),x(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(x(i,255&i.gzhead.extra.length),x(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=s(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(x(i,0),x(i,0),x(i,0),x(i,0),x(i,0),x(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),x(i,3),i.status=f);else{var h=8+(i.w_bits-8<<4)<<8;h|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(h|=32),h+=31-h%31,i.status=f,_(i,h),0!==i.strstart&&(_(i,t.adler>>>16),_(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),b(t),a=i.pending,i.pending!==i.pending_buf_size));)x(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),b(t),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),b(t),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.status=d)}else i.status=d;if(i.status===d&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&b(t),i.pending+2<=i.pending_buf_size&&(x(i,255&t.adler),x(i,t.adler>>8&255),t.adler=0,i.status=f)):i.status=f),0!==i.pending){if(b(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&g(e)<=g(r)&&4!==e)return m(t,-5);if(i.status===p&&0!==t.avail_in)return m(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&i.status!==p){var w=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(k(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(y(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,a,s=t.window;;){if(t.lookahead<=u){if(k(t),t.lookahead<=u&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[i=t.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){a=t.strstart+u;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(y(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==w&&4!==w||(i.status=p),1===w||3===w)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===w&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(v(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),b(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(x(i,255&t.adler),x(i,t.adler>>8&255),x(i,t.adler>>16&255),x(i,t.adler>>24&255),x(i,255&t.total_in),x(i,t.total_in>>8&255),x(i,t.total_in>>16&255),x(i,t.total_in>>24&255)):(_(i,t.adler>>>16),_(i,65535&t.adler)),b(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},e.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&e!==d&&e!==f&&e!==p?m(t,c):(t.state=null,e===f?m(t,-3):0):c},e.deflateSetDictionary=function(t,e){var r,n,o,s,l,u,h,d,f=e.length;if(!t||!t.state)return c;if(2===(s=(r=t.state).wrap)||1===s&&42!==r.status||r.lookahead)return c;for(1===s&&(t.adler=a(t.adler,e,f,0)),r.wrap=0,f>=r.w_size&&(0===s&&(v(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new i.Buf8(r.w_size),i.arraySet(d,e,f-r.w_size,r.w_size,0),e=d,f=r.w_size),l=t.avail_in,u=t.next_in,h=t.input,t.avail_in=f,t.next_in=0,t.input=e,k(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h<{"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},"./node_modules/upng-js/node_modules/pako/lib/zlib/inffast.js":t=>{"use strict";t.exports=function(t,e){var r,n,i,o,a,s,l,c,u,h,d,f,p,m,g,v,b,y,x,_,w,k,A,M,T;r=t.state,n=t.next_in,M=t.input,i=n+(t.avail_in-5),o=t.next_out,T=t.output,a=o-(e-t.avail_out),s=o+(t.avail_out-257),l=r.dmax,c=r.wsize,u=r.whave,h=r.wnext,d=r.window,f=r.hold,p=r.bits,m=r.lencode,g=r.distcode,v=(1<>>=x=y>>>24,p-=x,0==(x=y>>>16&255))T[o++]=65535&y;else{if(!(16&x)){if(64&x){if(32&x){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}y=m[(65535&y)+(f&(1<>>=x,p-=x),p<15&&(f+=M[n++]<>>=x=y>>>24,p-=x,16&(x=y>>>16&255)){if(w=65535&y,p<(x&=15)&&(f+=M[n++]<l){t.msg="invalid distance too far back",r.mode=30;break t}if(f>>>=x,p-=x,w>(x=o-a)){if((x=w-x)>u&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(k=0,A=d,0===h){if(k+=c-x,x<_){_-=x;do{T[o++]=d[k++]}while(--x);k=o-w,A=T}}else if(h2;)T[o++]=A[k++],T[o++]=A[k++],T[o++]=A[k++],_-=3;_&&(T[o++]=A[k++],_>1&&(T[o++]=A[k++]))}else{k=o-w;do{T[o++]=T[k++],T[o++]=T[k++],T[o++]=T[k++],_-=3}while(_>2);_&&(T[o++]=T[k++],_>1&&(T[o++]=T[k++]))}break}if(64&x){t.msg="invalid distance code",r.mode=30;break t}y=g[(65535&y)+(f&(1<>3,f&=(1<<(p-=_<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),i=r("./node_modules/upng-js/node_modules/pako/lib/zlib/adler32.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/zlib/crc32.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/inffast.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/zlib/inftrees.js"),l=-2,c=12,u=30;function h(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function d(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):l}function p(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,f(t)):l}function m(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?l:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,p(t))):l}function g(t,e){var r,n;return t?(n=new d,t.state=n,n.window=null,0!==(r=m(t,e))&&(t.state=null),r):l}var v,b,y=!0;function x(t){if(y){var e;for(v=new n.Buf32(512),b=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(s(1,t.lens,0,288,v,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;s(2,t.lens,0,32,b,0,t.work,{bits:5}),y=!1}t.lencode=v,t.lenbits=9,t.distcode=b,t.distbits=5}function _(t,e,r,i){var o,a=t.state;return null===a.window&&(a.wsize=1<=a.wsize?(n.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),n.arraySet(a.window,e,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,e,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=o(r.check,j,2,0),b=0,y=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&b)<<8)+(b>>8))%31){t.msg="incorrect header check",r.mode=u;break}if(8!=(15&b)){t.msg="unknown compression method",r.mode=u;break}if(y-=4,D=8+(15&(b>>>=4)),0===r.wbits)r.wbits=D;else if(D>r.wbits){t.msg="invalid window size",r.mode=u;break}r.dmax=1<>8&1),512&r.flags&&(j[0]=255&b,j[1]=b>>>8&255,r.check=o(r.check,j,2,0)),b=0,y=0,r.mode=3;case 3:for(;y<32;){if(0===g)break t;g--,b+=d[p++]<>>8&255,j[2]=b>>>16&255,j[3]=b>>>24&255,r.check=o(r.check,j,4,0)),b=0,y=0,r.mode=4;case 4:for(;y<16;){if(0===g)break t;g--,b+=d[p++]<>8),512&r.flags&&(j[0]=255&b,j[1]=b>>>8&255,r.check=o(r.check,j,2,0)),b=0,y=0,r.mode=5;case 5:if(1024&r.flags){for(;y<16;){if(0===g)break t;g--,b+=d[p++]<>>8&255,r.check=o(r.check,j,2,0)),b=0,y=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((A=r.length)>g&&(A=g),A&&(r.head&&(D=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,d,p,A,D)),512&r.flags&&(r.check=o(r.check,d,A,p)),g-=A,p+=A,r.length-=A),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===g)break t;A=0;do{D=d[p+A++],r.head&&D&&r.length<65536&&(r.head.name+=String.fromCharCode(D))}while(D&&A>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=c;break;case 10:for(;y<32;){if(0===g)break t;g--,b+=d[p++]<>>=7&y,y-=7&y,r.mode=27;break}for(;y<3;){if(0===g)break t;g--,b+=d[p++]<>>=1)){case 0:r.mode=14;break;case 1:if(x(r),r.mode=20,6===e){b>>>=2,y-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=u}b>>>=2,y-=2;break;case 14:for(b>>>=7&y,y-=7&y;y<32;){if(0===g)break t;g--,b+=d[p++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=u;break}if(r.length=65535&b,b=0,y=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(A=r.length){if(A>g&&(A=g),A>v&&(A=v),0===A)break t;n.arraySet(f,d,p,A,m),g-=A,p+=A,v-=A,m+=A,r.length-=A;break}r.mode=c;break;case 17:for(;y<14;){if(0===g)break t;g--,b+=d[p++]<>>=5,y-=5,r.ndist=1+(31&b),b>>>=5,y-=5,r.ncode=4+(15&b),b>>>=4,y-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=u;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,y-=3}for(;r.have<19;)r.lens[N[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,F={bits:r.lenbits},I=s(0,r.lens,0,19,r.lencode,0,r.work,F),r.lenbits=F.bits,I){t.msg="invalid code lengths set",r.mode=u;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,E=65535&P,!((S=P>>>24)<=y);){if(0===g)break t;g--,b+=d[p++]<>>=S,y-=S,r.lens[r.have++]=E;else{if(16===E){for(R=S+2;y>>=S,y-=S,0===r.have){t.msg="invalid bit length repeat",r.mode=u;break}D=r.lens[r.have-1],A=3+(3&b),b>>>=2,y-=2}else if(17===E){for(R=S+3;y>>=S)),b>>>=3,y-=3}else{for(R=S+7;y>>=S)),b>>>=7,y-=7}if(r.have+A>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=u;break}for(;A--;)r.lens[r.have++]=D}}if(r.mode===u)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=u;break}if(r.lenbits=9,F={bits:r.lenbits},I=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,F),r.lenbits=F.bits,I){t.msg="invalid literal/lengths set",r.mode=u;break}if(r.distbits=6,r.distcode=r.distdyn,F={bits:r.distbits},I=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,F),r.distbits=F.bits,I){t.msg="invalid distances set",r.mode=u;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(g>=6&&v>=258){t.next_out=m,t.avail_out=v,t.next_in=p,t.avail_in=g,r.hold=b,r.bits=y,a(t,k),m=t.next_out,f=t.output,v=t.avail_out,p=t.next_in,d=t.input,g=t.avail_in,b=r.hold,y=r.bits,r.mode===c&&(r.back=-1);break}for(r.back=0;C=(P=r.lencode[b&(1<>>16&255,E=65535&P,!((S=P>>>24)<=y);){if(0===g)break t;g--,b+=d[p++]<>L)])>>>16&255,E=65535&P,!(L+(S=P>>>24)<=y);){if(0===g)break t;g--,b+=d[p++]<>>=L,y-=L,r.back+=L}if(b>>>=S,y-=S,r.back+=S,r.length=E,0===C){r.mode=26;break}if(32&C){r.back=-1,r.mode=c;break}if(64&C){t.msg="invalid literal/length code",r.mode=u;break}r.extra=15&C,r.mode=22;case 22:if(r.extra){for(R=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;C=(P=r.distcode[b&(1<>>16&255,E=65535&P,!((S=P>>>24)<=y);){if(0===g)break t;g--,b+=d[p++]<>L)])>>>16&255,E=65535&P,!(L+(S=P>>>24)<=y);){if(0===g)break t;g--,b+=d[p++]<>>=L,y-=L,r.back+=L}if(b>>>=S,y-=S,r.back+=S,64&C){t.msg="invalid distance code",r.mode=u;break}r.offset=E,r.extra=15&C,r.mode=24;case 24:if(r.extra){for(R=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=u;break}r.mode=25;case 25:if(0===v)break t;if(A=k-v,r.offset>A){if((A=r.offset-A)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=u;break}A>r.wnext?(A-=r.wnext,M=r.wsize-A):M=r.wnext-A,A>r.length&&(A=r.length),T=r.window}else T=f,M=m-r.offset,A=r.length;A>v&&(A=v),v-=A,r.length-=A;do{f[m++]=T[M++]}while(--A);0===r.length&&(r.mode=21);break;case 26:if(0===v)break t;f[m++]=r.length,v--,r.mode=21;break;case 27:if(r.wrap){for(;y<32;){if(0===g)break t;g--,b|=d[p++]<{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(t,e,r,l,c,u,h,d){var f,p,m,g,v,b,y,x,_,w=d.bits,k=0,A=0,M=0,T=0,S=0,C=0,E=0,L=0,z=0,O=0,D=null,I=0,F=new n.Buf16(16),R=new n.Buf16(16),P=null,j=0;for(k=0;k<=15;k++)F[k]=0;for(A=0;A=1&&0===F[T];T--);if(S>T&&(S=T),0===T)return c[u++]=20971520,c[u++]=20971520,d.bits=1,0;for(M=1;M0&&(0===t||1!==T))return-1;for(R[1]=0,k=1;k<15;k++)R[k+1]=R[k]+F[k];for(A=0;A852||2===t&&z>592)return 1;for(;;){y=k-E,h[A]b?(x=P[j+h[A]],_=D[I+h[A]]):(x=96,_=0),f=1<>E)+(p-=f)]=y<<24|x<<16|_}while(0!==p);for(f=1<>=1;if(0!==f?(O&=f-1,O+=f):O=0,A++,0==--F[k]){if(k===T)break;k=e[r+h[A]]}if(k>S&&(O&g)!==m){for(0===E&&(E=S),v+=M,L=1<<(C=k-E);C+E852||2===t&&z>592)return 1;c[m=O&g]=S<<24|C<<16|v-u}}return 0!==O&&(c[v+O]=k-E<<24|64<<16),d.bits=S,0}},"./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js":t=>{"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},"./node_modules/upng-js/node_modules/pako/lib/zlib/trees.js":(t,e,r)=>{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js");function i(t){for(var e=t.length;--e>=0;)t[e]=0}var o=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);i(c);var u=new Array(60);i(u);var h=new Array(512);i(h);var d=new Array(256);i(d);var f=new Array(29);i(f);var p,m,g,v=new Array(30);function b(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function y(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function x(t){return t<256?h[t]:h[256+(t>>>7)]}function _(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function w(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<>>=1,r<<=1}while(--e>0);return r>>>1}function M(t,e,r){var n,i,o=new Array(16),a=0;for(n=1;n<=15;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=A(o[s]++,s))}}function T(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function S(t){t.bi_valid>8?_(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function C(t,e,r,n){var i=2*e,o=2*r;return t[i]>1;r>=1;r--)E(t,o,r);i=l;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],E(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,o[2*i]=o[2*r]+o[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,o[2*r+1]=o[2*n+1]=i,t.heap[1]=i++,E(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,o,a,s,l=e.dyn_tree,c=e.max_code,u=e.stat_desc.static_tree,h=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,p=e.stat_desc.max_length,m=0;for(o=0;o<=15;o++)t.bl_count[o]=0;for(l[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(o=l[2*l[2*(n=t.heap[r])+1]+1]+1)>p&&(o=p,m++),l[2*n+1]=o,n>c||(t.bl_count[o]++,a=0,n>=f&&(a=d[n-f]),s=l[2*n],t.opt_len+=s*(o+a),h&&(t.static_len+=s*(u[2*n+1]+a)));if(0!==m){do{for(o=p-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[p]--,m-=2}while(m>0);for(o=p;0!==o;o--)for(n=t.bl_count[o];0!==n;)(i=t.heap[--r])>c||(l[2*i+1]!==o&&(t.opt_len+=(o-l[2*i+1])*l[2*i],l[2*i+1]=o),n--)}}(t,e),M(o,c,t.bl_count)}function O(t,e,r){var n,i,o=-1,a=e[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++s>=7;n<30;n++)for(v[n]=i<<7,t=0;t<1<0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),z(t,t.l_desc),z(t,t.d_desc),a=function(t){var e;for(O(t,t.dyn_ltree,t.l_desc.max_code),O(t,t.dyn_dtree,t.d_desc.max_code),z(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*l[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?F(t,e,r,n):4===t.strategy||o===i?(w(t,2+(n?1:0),3),L(t,c,u)):(w(t,4+(n?1:0),3),function(t,e,r,n){var i;for(w(t,e-257,5),w(t,r-1,5),w(t,n-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(d[r]+256+1)]++,t.dyn_dtree[2*x(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){w(t,2,3),k(t,256,c),function(t){16===t.bi_valid?(_(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},"./node_modules/upng-js/node_modules/pako/lib/zlib/zstream.js":t=>{"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},"./src/SurfaceWorker.js":()=>{$3Dmol.workerString=function(){self.onmessage=function(t){var e=t.data,r=e.type;if(r<0)self.atomData=e.atoms,self.volume=e.volume,self.ps=new ProteinSurface;else{var n=self.ps;n.initparm(e.expandedExtent,1!=r,self.volume),n.fillvoxels(self.atomData,e.extendedAtoms),n.buildboundary(),4!==r&&2!==r||(n.fastdistancemap(),n.boundingatom(!1),n.fillvoxelswaals(self.atomData,e.extendedAtoms)),n.marchingcube(r);var i=n.getFacesAndVertices(e.atomsToShow);self.postMessage(i)}}}.toString().replace(/(^.*?\{|\}$)/g,""),$3Dmol.workerString+=";\nfunction _classCallCheck() {};",$3Dmol.workerString+=";\n"+$3Dmol.Vector3.toString(),$3Dmol.workerString+=";\n"+$3Dmol.MarchingCubeInitializer.toString()+";\n\n",$3Dmol.workerString+=";\n"+$3Dmol.PointGrid.toString()+";\n",$3Dmol.workerString+=";\nvar ProteinSurface = "+$3Dmol.ProteinSurface.toString()+";\n",$3Dmol.SurfaceWorker=window.URL?window.URL.createObjectURL(new Blob([$3Dmol.workerString],{type:"text/javascript"})):void 0},"./src/exporter.js":t=>{"object"==typeof t.exports&&(t.exports=window.$3Dmol)},"./src/vendor/mmtf.js":function(t,e){!function(t){"use strict";function e(t,e,r){for(var n=(t.byteLength,0),i=r.length;i>n;n++){var o=r.charCodeAt(n);if(128>o)t.setUint8(e++,o>>>0&127);else if(2048>o)t.setUint8(e++,o>>>6&31|192),t.setUint8(e++,o>>>0&63|128);else if(65536>o)t.setUint8(e++,o>>>12&15|224),t.setUint8(e++,o>>>6&63|128),t.setUint8(e++,o>>>0&63|128);else{if(!(1114112>o))throw new Error("bad codepoint "+o);t.setUint8(e++,o>>>18&7|240),t.setUint8(e++,o>>>12&63|128),t.setUint8(e++,o>>>6&63|128),t.setUint8(e++,o>>>0&63|128)}}}function r(t){for(var e=0,r=0,n=t.length;n>r;r++){var i=t.charCodeAt(r);if(128>i)e+=1;else if(2048>i)e+=2;else if(65536>i)e+=3;else{if(!(1114112>i))throw new Error("bad codepoint "+i);e+=4}}return e}function n(t,i,o){var a=typeof t;if("string"===a){if(32>(s=r(t)))return i.setUint8(o,160|s),e(i,o+1,t),1+s;if(256>s)return i.setUint8(o,217),i.setUint8(o+1,s),e(i,o+2,t),2+s;if(65536>s)return i.setUint8(o,218),i.setUint16(o+1,s),e(i,o+3,t),3+s;if(4294967296>s)return i.setUint8(o,219),i.setUint32(o+1,s),e(i,o+5,t),5+s}if(t instanceof Uint8Array){var s=t.byteLength,l=new Uint8Array(i.buffer);if(256>s)return i.setUint8(o,196),i.setUint8(o+1,s),l.set(t,o+2),2+s;if(65536>s)return i.setUint8(o,197),i.setUint16(o+1,s),l.set(t,o+3),3+s;if(4294967296>s)return i.setUint8(o,198),i.setUint32(o+1,s),l.set(t,o+5),5+s}if("number"===a){if(!isFinite(t))throw new Error("Number not finite: "+t);if(Math.floor(t)!==t)return i.setUint8(o,203),i.setFloat64(o+1,t),9;if(t>=0){if(128>t)return i.setUint8(o,t),1;if(256>t)return i.setUint8(o,204),i.setUint8(o+1,t),2;if(65536>t)return i.setUint8(o,205),i.setUint16(o+1,t),3;if(4294967296>t)return i.setUint8(o,206),i.setUint32(o+1,t),5;throw new Error("Number too big 0x"+t.toString(16))}if(t>=-32)return i.setInt8(o,t),1;if(t>=-128)return i.setUint8(o,208),i.setInt8(o+1,t),2;if(t>=-32768)return i.setUint8(o,209),i.setInt16(o+1,t),3;if(t>=-2147483648)return i.setUint8(o,210),i.setInt32(o+1,t),5;throw new Error("Number too small -0x"+(-t).toString(16).substr(1))}if(null===t)return i.setUint8(o,192),1;if("boolean"===a)return i.setUint8(o,t?195:194),1;if("object"===a){var c=0,u=Array.isArray(t);if(u)s=t.length;else{var h=Object.keys(t);s=h.length}if(16>s?(i.setUint8(o,s|(u?144:128)),c=1):65536>s?(i.setUint8(o,u?220:222),i.setUint16(o+1,s),c=3):4294967296>s&&(i.setUint8(o,u?221:223),i.setUint32(o+1,s),c=5),u)for(var d=0;s>d;d++)c+=n(t[d],i,o+c);else for(d=0;s>d;d++){var f=h[d];c+=n(f,i,o+c),c+=n(t[f],i,o+c)}return c}throw new Error("Unknown type "+a)}function i(t){var e=typeof t;if("string"===e){if(32>(n=r(t)))return 1+n;if(256>n)return 2+n;if(65536>n)return 3+n;if(4294967296>n)return 5+n}if(t instanceof Uint8Array){if(256>(n=t.byteLength))return 2+n;if(65536>n)return 3+n;if(4294967296>n)return 5+n}if("number"===e){if(Math.floor(t)!==t)return 9;if(t>=0){if(128>t)return 1;if(256>t)return 2;if(65536>t)return 3;if(4294967296>t)return 5;throw new Error("Number too big 0x"+t.toString(16))}if(t>=-32)return 1;if(t>=-128)return 2;if(t>=-32768)return 3;if(t>=-2147483648)return 5;throw new Error("Number too small -0x"+t.toString(16).substr(1))}if("boolean"===e||null===t)return 1;if("object"===e){var n,o=0;if(Array.isArray(t)){n=t.length;for(var a=0;n>a;a++)o+=i(t[a])}else{var s=Object.keys(t);for(n=s.length,a=0;n>a;a++){var l=s[a];o+=i(l)+i(t[l])}}if(16>n)return 1+o;if(65536>n)return 3+o;if(4294967296>n)return 5+o;throw new Error("Array or object too long 0x"+n.toString(16))}throw new Error("Unknown type "+e)}function o(t){var e=new ArrayBuffer(i(t));return n(t,new DataView(e),0),new Uint8Array(e)}function a(t,e,r){return e?new t(e.buffer,e.byteOffset,e.byteLength/(r||1)):void 0}function s(t){return a(DataView,t)}function l(t){return a(Uint8Array,t)}function c(t){return a(Int8Array,t)}function u(t){return a(Int32Array,t,4)}function h(t,e){var r=t.length/2;e||(e=new Int16Array(r));for(var n=0,i=0;r>n;++n,i+=2)e[n]=t[i]<<8^t[i+1];return e}function d(t,e){var r=t.length/4;e||(e=new Int32Array(r));for(var n=0,i=0;r>n;++n,i+=4)e[n]=t[i]<<24^t[i+1]<<16^t[i+2]<<8^t[i+3];return e}function f(t,e){var r=t.length;e||(e=new Uint8Array(4*r));for(var n=s(e),i=0;r>i;++i)n.setInt32(4*i,t[i]);return l(e)}function p(t,e,r){var n=t.length,i=1/e;r||(r=new Float32Array(n));for(var o=0;n>o;++o)r[o]=t[o]*i;return r}function m(t,e,r){var n=t.length;r||(r=new Int32Array(n));for(var i=0;n>i;++i)r[i]=Math.round(t[i]*e);return r}function g(t,e){var r,n;if(!e){var i=0;for(r=0,n=t.length;n>r;r+=2)i+=t[r+1];e=new t.constructor(i)}var o=0;for(r=0,n=t.length;n>r;r+=2)for(var a=t[r],s=t[r+1],l=0;s>l;++l)e[o]=a,++o;return e}function v(t){if(0===t.length)return new Int32Array;var e,r,n=2;for(e=1,r=t.length;r>e;++e)t[e-1]!==t[e]&&(n+=2);var i=new Int32Array(n),o=0,a=1;for(e=1,r=t.length;r>e;++e)t[e-1]!==t[e]?(i[o]=t[e-1],i[o+1]=a,a=1,o+=2):++a;return i[o]=t[t.length-1],i[o+1]=a,i}function b(t,e){var r=t.length;e||(e=new t.constructor(r)),r&&(e[0]=t[0]);for(var n=1;r>n;++n)e[n]=t[n]+e[n-1];return e}function y(t,e){var r=t.length;e||(e=new t.constructor(r)),e[0]=t[0];for(var n=1;r>n;++n)e[n]=t[n]-t[n-1];return e}function x(t,e){var r,n,i=t instanceof Int8Array?127:32767,o=-i-1,a=t.length;if(!e){var s=0;for(r=0;a>r;++r)t[r]o&&++s;e=new Int32Array(s)}for(r=0,n=0;a>r;){for(var l=0;t[r]===i||t[r]===o;)l+=t[r],++r;l+=t[r],++r,e[n]=l,++n}return e}function _(t,e,r){return p(x(t,u(r)),e,r)}function w(t,e,r){var n=x(t,u(r));return function(t,e,r){return p(b(t,u(r)),e,r)}(n,e,function(t){return a(Float32Array,t,4)}(n))}function k(t,e,r){return function(t,e){var r,n=e?127:32767,i=-n-1,o=t.length,a=0;for(r=0;o>r;++r)0===(c=t[r])?++a:c>0?(a+=Math.ceil(c/n),c%n==0&&(a+=1)):(a+=Math.ceil(c/i),c%i==0&&(a+=1));var s=e?new Int8Array(a):new Int16Array(a),l=0;for(r=0;o>r;++r){var c;if((c=t[r])>=0)for(;c>=n;)s[l]=n,++l,c-=n;else for(;i>=c;)s[l]=i,++l,c-=i;s[l]=c,++l}return s}(function(t,e,r){return y(m(t,e),r)}(t,e),r)}function A(t,e,r,n){var i=new ArrayBuffer(12+n.byteLength),o=new Uint8Array(i),a=new DataView(i);return a.setInt32(0,t),a.setInt32(4,e),r&&o.set(r,8),o.set(n,12),o}function M(t){return A(2,t.length,void 0,l(t))}function T(t){return A(4,t.length,void 0,f(t))}function S(t,e){return A(5,t.length/e,f([e]),l(t))}function C(t){return A(6,t.length,void 0,f(v(t)))}function E(t){return A(8,t.length,void 0,f(function(t){return v(y(t))}(t)))}function L(t,e){return A(9,t.length,f([e]),f(function(t,e){return v(m(t,e))}(t,e)))}function z(t,e){return A(10,t.length,f([e]),function(t,e){var r=t.length;e||(e=new Uint8Array(2*r));for(var n=s(e),i=0;r>i;++i)n.setInt16(2*i,t[i]);return l(e)}(k(t,e)))}function O(t){var e={};return N.forEach((function(r){void 0!==t[r]&&(e[r]=t[r])})),t.bondAtomList&&(e.bondAtomList=T(t.bondAtomList)),t.bondOrderList&&(e.bondOrderList=M(t.bondOrderList)),e.xCoordList=z(t.xCoordList,1e3),e.yCoordList=z(t.yCoordList,1e3),e.zCoordList=z(t.zCoordList,1e3),t.bFactorList&&(e.bFactorList=z(t.bFactorList,100)),t.atomIdList&&(e.atomIdList=E(t.atomIdList)),t.altLocList&&(e.altLocList=C(t.altLocList)),t.occupancyList&&(e.occupancyList=L(t.occupancyList,100)),e.groupIdList=E(t.groupIdList),e.groupTypeList=T(t.groupTypeList),t.secStructList&&(e.secStructList=M(t.secStructList)),t.insCodeList&&(e.insCodeList=C(t.insCodeList)),t.sequenceIndexList&&(e.sequenceIndexList=E(t.sequenceIndexList)),e.chainIdList=S(t.chainIdList,4),t.chainNameList&&(e.chainNameList=S(t.chainNameList,4)),e}function D(t){function e(t){for(var e={},r=0;t>r;r++)e[o()]=o();return e}function r(e){var r=t.subarray(a,a+e);return a+=e,r}function n(e){var r=t.subarray(a,a+e);a+=e;var n=65535;if(e>n){for(var i=[],o=0;or;r++)e[r]=o();return e}function o(){var o,l,c=t[a];if(!(128&c))return a++,c;if(128==(240&c))return a++,e(l=15&c);if(144==(240&c))return a++,i(l=15&c);if(160==(224&c))return a++,n(l=31&c);if(!(224&~c))return o=s.getInt8(a),a++,o;switch(c){case 192:return a++,null;case 194:return a++,!1;case 195:return a++,!0;case 196:return l=s.getUint8(a+1),a+=2,r(l);case 197:return l=s.getUint16(a+1),a+=3,r(l);case 198:return l=s.getUint32(a+1),a+=5,r(l);case 202:return o=s.getFloat32(a+1),a+=5,o;case 203:return o=s.getFloat64(a+1),a+=9,o;case 204:return o=t[a+1],a+=2,o;case 205:return o=s.getUint16(a+1),a+=3,o;case 206:return o=s.getUint32(a+1),a+=5,o;case 208:return o=s.getInt8(a+1),a+=2,o;case 209:return o=s.getInt16(a+1),a+=3,o;case 210:return o=s.getInt32(a+1),a+=5,o;case 217:return l=s.getUint8(a+1),a+=2,n(l);case 218:return l=s.getUint16(a+1),a+=3,n(l);case 219:return l=s.getUint32(a+1),a+=5,n(l);case 220:return l=s.getUint16(a+1),a+=3,i(l);case 221:return l=s.getUint32(a+1),a+=5,i(l);case 222:return l=s.getUint16(a+1),a+=3,e(l);case 223:return l=s.getUint32(a+1),a+=5,e(l)}throw new Error("Unknown type 0x"+c.toString(16))}var a=0,s=new DataView(t.buffer);return o()}function I(t,e,r,n){switch(t){case 1:return function(t,e){var r=t.length;e||(e=new Float32Array(r/4));for(var n=s(e),i=s(t),o=0,a=0,l=r/4;l>o;++o,a+=4)n.setFloat32(a,i.getFloat32(a),!0);return e}(e);case 2:return c(e);case 3:return h(e);case 4:return d(e);case 5:return l(e);case 6:return g(d(e),new Uint8Array(r));case 7:return g(d(e));case 8:return function(t,e){return b(g(t),e)}(d(e));case 9:return function(t,e,r){return p(g(t,u(r)),e,r)}(d(e),d(n)[0]);case 10:return w(h(e),d(n)[0]);case 11:return p(h(e),d(n)[0]);case 12:return _(h(e),d(n)[0]);case 13:return _(c(e),d(n)[0]);case 14:return x(h(e));case 15:return x(c(e))}}function F(t,e){var r=(e=e||{}).ignoreFields,n={};return B.forEach((function(e){var i=!!r&&-1!==r.indexOf(e),o=t[e];i||void 0===o||(o instanceof Uint8Array?n[e]=I.apply(null,function(t){var e=s(t),r=e.getInt32(0),n=e.getInt32(4),i=t.subarray(8,12);return[r,t=t.subarray(12),n,i]}(o)):n[e]=o)})),n}function R(t){return String.fromCharCode.apply(null,t).replace(/\0/g,"")}function P(t,e){return t instanceof ArrayBuffer&&(t=new Uint8Array(t)),F(t instanceof Uint8Array?D(t):t,e)}function j(t,e,r,n){var i=new XMLHttpRequest;i.addEventListener("load",(function(){try{var t=P(i.response);r(t)}catch(t){n(t)}}),!0),i.addEventListener("error",n,!0),i.responseType="arraybuffer",i.open("GET",e+t.toUpperCase()),i.send()}var N=["mmtfVersion","mmtfProducer","unitCell","spaceGroup","structureId","title","depositionDate","releaseDate","experimentalMethods","resolution","rFree","rWork","bioAssemblyList","ncsOperatorList","entityList","groupList","numBonds","numAtoms","numGroups","numChains","numModels","groupsPerChain","chainsPerModel"],B=N.concat(["xCoordList","yCoordList","zCoordList","groupIdList","groupTypeList","chainIdList","bFactorList","atomIdList","altLocList","occupancyList","secStructList","insCodeList","sequenceIndexList","chainNameList","bondAtomList","bondOrderList"]),U="//mmtf.rcsb.org/v1.0/",G=U+"full/",V=U+"reduced/";t.encode=function(t){return o(O(t))},t.decode=P,t.traverse=function(t,e,r){var n,i,o,a,s,l,c=(r=r||{}).firstModelOnly,u=e.onModel,h=e.onChain,d=e.onGroup,f=e.onAtom,p=e.onBond,m=0,g=0,v=0,b=0,y=0,x=-1,_=t.chainNameList,w=t.secStructList,k=t.insCodeList,A=t.sequenceIndexList,M=t.atomIdList,T=t.bFactorList,S=t.altLocList,C=t.occupancyList,E=t.bondAtomList,L=t.bondOrderList;for(n=0,i=t.chainsPerModel.length;i>n&&!(c&&m>0);++n){var z=t.chainsPerModel[m];for(u&&u({chainCount:z,modelIndex:m}),o=0;z>o;++o){var O=t.groupsPerChain[g];if(h){var D=R(t.chainIdList.subarray(4*g,4*g+4)),I=null;_&&(I=R(_.subarray(4*g,4*g+4))),h({groupCount:O,chainIndex:g,modelIndex:m,chainId:D,chainName:I})}for(a=0;O>a;++a){var F=t.groupList[t.groupTypeList[v]],P=F.atomNameList.length;if(d){var j=null;w&&(j=w[v]);var N=null;t.insCodeList&&(N=String.fromCharCode(k[v]));var B=null;A&&(B=A[v]),d({atomCount:P,groupIndex:v,chainIndex:g,modelIndex:m,groupId:t.groupIdList[v],groupType:t.groupTypeList[v],groupName:F.groupName,singleLetterCode:F.singleLetterCode,chemCompType:F.chemCompType,secStruct:j,insCode:N,sequenceIndex:B})}for(s=0;P>s;++s){if(f){var U=null;M&&(U=M[b]);var G=null;T&&(G=T[b]);var V=null;S&&(V=String.fromCharCode(S[b]));var H=null;C&&(H=C[b]),f({atomIndex:b,groupIndex:v,chainIndex:g,modelIndex:m,atomId:U,element:F.elementList[s],atomName:F.atomNameList[s],formalCharge:F.formalChargeList[s],xCoord:t.xCoordList[b],yCoord:t.yCoordList[b],zCoord:t.zCoordList[b],bFactor:G,altLoc:V,occupancy:H})}b+=1}if(p){var W=F.bondAtomList;for(s=0,l=F.bondOrderList.length;l>s;++s)p({atomIndex1:b-P+W[2*s],atomIndex2:b-P+W[2*s+1],bondOrder:F.bondOrderList[s]})}v+=1}g+=1}if(y=x+1,x=b-1,p&&E)for(s=0,l=E.length;l>s;s+=2){var q=E[s],Y=E[s+1];(q>=y&&x>=q||Y>=y&&x>=Y)&&p({atomIndex1:q,atomIndex2:Y,bondOrder:L?L[s/2]:null})}m+=1}},t.fetch=function(t,e,r){j(t,G,e,r)},t.fetchReduced=function(t,e,r){j(t,V,e,r)},t.version="v1.0.1",t.fetchUrl=G,t.fetchReducedUrl=V,t.encodeMsgpack=o,t.encodeMmtf=O,t.decodeMsgpack=D,t.decodeMmtf=F}(e)},"./node_modules/pako/dist/pako.esm.mjs":(t,e,r)=>{"use strict";function n(t){let e=t.length;for(;--e>=0;)t[e]=0}r.r(e),r.d(e,{Deflate:()=>wr,Inflate:()=>Tr,constants:()=>Lr,default:()=>zr,deflate:()=>kr,deflateRaw:()=>Ar,gzip:()=>Mr,inflate:()=>Sr,inflateRaw:()=>Cr,ungzip:()=>Er});const i=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),o=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),s=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=new Array(576);n(l);const c=new Array(60);n(c);const u=new Array(512);n(u);const h=new Array(256);n(h);const d=new Array(29);n(d);const f=new Array(30);function p(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}let m,g,v;function b(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}n(f);const y=t=>t<256?u[t]:u[256+(t>>>7)],x=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},_=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<{_(t,r[2*e],r[2*e+1])},k=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},A=(t,e,r)=>{const n=new Array(16);let i,o,a=0;for(i=1;i<=15;i++)a=a+r[i-1]<<1,n[i]=a;for(o=0;o<=e;o++){let e=t[2*o+1];0!==e&&(t[2*o]=k(n[e]++,e))}},M=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},T=t=>{t.bi_valid>8?x(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=(t,e,r,n)=>{const i=2*e,o=2*r;return t[i]{const n=t.heap[r];let i=r<<1;for(;i<=t.heap_len&&(i{let n,a,s,l,c=0;if(0!==t.sym_next)do{n=255&t.pending_buf[t.sym_buf+c++],n+=(255&t.pending_buf[t.sym_buf+c++])<<8,a=t.pending_buf[t.sym_buf+c++],0===n?w(t,a,e):(s=h[a],w(t,s+256+1,e),l=i[s],0!==l&&(a-=d[s],_(t,a,l)),n--,s=y(n),w(t,s,r),l=o[s],0!==l&&(n-=f[s],_(t,n,l)))}while(c{const r=e.dyn_tree,n=e.stat_desc.static_tree,i=e.stat_desc.has_stree,o=e.stat_desc.elems;let a,s,l,c=-1;for(t.heap_len=0,t.heap_max=573,a=0;a>1;a>=1;a--)C(t,r,a);l=o;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],C(t,r,1),s=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=s,r[2*l]=r[2*a]+r[2*s],t.depth[l]=(t.depth[a]>=t.depth[s]?t.depth[a]:t.depth[s])+1,r[2*a+1]=r[2*s+1]=l,t.heap[1]=l++,C(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,i=e.stat_desc.static_tree,o=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,l=e.stat_desc.max_length;let c,u,h,d,f,p,m=0;for(d=0;d<=15;d++)t.bl_count[d]=0;for(r[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<573;c++)u=t.heap[c],d=r[2*r[2*u+1]+1]+1,d>l&&(d=l,m++),r[2*u+1]=d,u>n||(t.bl_count[d]++,f=0,u>=s&&(f=a[u-s]),p=r[2*u],t.opt_len+=p*(d+f),o&&(t.static_len+=p*(i[2*u+1]+f)));if(0!==m){do{for(d=l-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[l]--,m-=2}while(m>0);for(d=l;0!==d;d--)for(u=t.bl_count[d];0!==u;)h=t.heap[--c],h>n||(r[2*h+1]!==d&&(t.opt_len+=(d-r[2*h+1])*r[2*h],r[2*h+1]=d),u--)}})(t,e),A(r,c,t.bl_count)},z=(t,e,r)=>{let n,i,o=-1,a=e[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++s{let n,i,o=-1,a=e[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),n=0;n<=r;n++)if(i=a,a=e[2*(n+1)+1],!(++s{_(t,0+(n?1:0),3),T(t),x(t,r),x(t,~r),r&&t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r};var F={_tr_init:t=>{D||((()=>{let t,e,r,n,s;const b=new Array(16);for(r=0,n=0;n<28;n++)for(d[n]=r,t=0;t<1<>=7;n<30;n++)for(f[n]=s<<7,t=0;t<1<{let i,o,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),L(t,t.l_desc),L(t,t.d_desc),a=(t=>{let e;for(z(t,t.dyn_ltree,t.l_desc.max_code),z(t,t.dyn_dtree,t.d_desc.max_code),L(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*s[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),i=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?I(t,e,r,n):4===t.strategy||o===i?(_(t,2+(n?1:0),3),E(t,l,c)):(_(t,4+(n?1:0),3),((t,e,r,n)=>{let i;for(_(t,e-257,5),_(t,r-1,5),_(t,n-4,4),i=0;i(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=r,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(h[r]+256+1)]++,t.dyn_dtree[2*y(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{_(t,2,3),w(t,256,l),(t=>{16===t.bi_valid?(x(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}},R=(t,e,r,n)=>{let i=65535&t,o=t>>>16&65535,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{i=i+e[n++]|0,o=o+i|0}while(--a);i%=65521,o%=65521}return i|o<<16};const P=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());var j=(t,e,r,n)=>{const i=P,o=n+r;t^=-1;for(let r=n;r>>8^i[255&(t^e[r])];return~t},N={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},B={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:U,_tr_stored_block:G,_tr_flush_block:V,_tr_tally:H,_tr_align:W}=F,{Z_NO_FLUSH:q,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:Z,Z_FINISH:X,Z_BLOCK:$,Z_OK:J,Z_STREAM_END:K,Z_STREAM_ERROR:Q,Z_DATA_ERROR:tt,Z_BUF_ERROR:et,Z_DEFAULT_COMPRESSION:rt,Z_FILTERED:nt,Z_HUFFMAN_ONLY:it,Z_RLE:ot,Z_FIXED:at,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:lt,Z_DEFLATED:ct}=B,ut=258,ht=262,dt=42,ft=113,pt=666,mt=(t,e)=>(t.msg=N[e],e),gt=t=>2*t-(t>4?9:0),vt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},bt=t=>{let e,r,n,i=t.w_size;e=t.hash_size,n=e;do{r=t.head[--n],t.head[n]=r>=i?r-i:0}while(--e);e=i,n=e;do{r=t.prev[--n],t.prev[n]=r>=i?r-i:0}while(--e)};let yt=(t,e,r)=>(e<{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},_t=(t,e)=>{V(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,xt(t.strm)},wt=(t,e)=>{t.pending_buf[t.pending++]=e},kt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},At=(t,e,r,n)=>{let i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),r),1===t.state.wrap?t.adler=R(t.adler,e,i,r):2===t.state.wrap&&(t.adler=j(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)},Mt=(t,e)=>{let r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match;const l=t.strstart>t.w_size-ht?t.strstart-(t.w_size-ht):0,c=t.window,u=t.w_mask,h=t.prev,d=t.strstart+ut;let f=c[o+a-1],p=c[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(r=e,c[r+a]===p&&c[r+a-1]===f&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&oa){if(t.match_start=e,a=n,n>=s)break;f=c[o+a-1],p=c[o+a]}}}while((e=h[e&u])>l&&0!=--i);return a<=t.lookahead?a:t.lookahead},Tt=t=>{const e=t.w_size;let r,n,i;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-ht)&&(t.window.set(t.window.subarray(e,e+e-n),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),bt(t),n+=e),0===t.strm.avail_in)break;if(r=At(t.strm,t.window,t.strstart+t.lookahead,n),t.lookahead+=r,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=yt(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=yt(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead{let r,n,i,o=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,a=0,s=t.strm.avail_in;do{if(r=65535,i=t.bi_valid+42>>3,t.strm.avail_outn+t.strm.avail_in&&(r=n+t.strm.avail_in),r>i&&(r=i),r>8,t.pending_buf[t.pending-2]=~r,t.pending_buf[t.pending-1]=~r>>8,xt(t.strm),n&&(n>r&&(n=r),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,r-=n),r&&(At(t.strm,t.strm.output,t.strm.next_out,r),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r)}while(0===a);return s-=t.strm.avail_in,s&&(s>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=s&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-s,t.strm.next_in),t.strstart),t.strstart+=s,t.insert+=s>t.w_size-t.insert?t.w_size-t.insert:s),t.block_start=t.strstart),t.high_wateri&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,i+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),i>t.strm.avail_in&&(i=t.strm.avail_in),i&&(At(t.strm,t.window,t.strstart,i),t.strstart+=i,t.insert+=i>t.w_size-t.insert?t.w_size-t.insert:i),t.high_water>3,i=t.pending_buf_size-i>65535?65535:t.pending_buf_size-i,o=i>t.w_size?t.w_size:i,n=t.strstart-t.block_start,(n>=o||(n||e===X)&&e!==q&&0===t.strm.avail_in&&n<=i)&&(r=n>i?i:n,a=e===X&&0===t.strm.avail_in&&r===n?1:0,G(t,t.block_start,r,a),t.block_start+=r,xt(t.strm)),a?3:1)},Ct=(t,e)=>{let r,n;for(;;){if(t.lookahead=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-ht&&(t.match_length=Mt(t,r)),t.match_length>=3)if(n=H(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=yt(t,t.ins_h,t.window[t.strstart+1]);else n=H(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(_t(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===X?(_t(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(_t(t,!1),0===t.strm.avail_out)?1:2},Et=(t,e)=>{let r,n,i;for(;;){if(t.lookahead=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=H(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(_t(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=H(t,0,t.window[t.strstart-1]),n&&_t(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=H(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===X?(_t(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(_t(t,!1),0===t.strm.avail_out)?1:2};function Lt(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}const zt=[new Lt(0,0,0,0,St),new Lt(4,4,8,4,Ct),new Lt(4,5,16,8,Ct),new Lt(4,6,32,32,Ct),new Lt(4,4,16,16,Et),new Lt(8,16,32,32,Et),new Lt(8,16,128,128,Et),new Lt(8,32,128,256,Et),new Lt(32,128,258,1024,Et),new Lt(32,258,258,4096,Et)];function Ot(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ct,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),vt(this.dyn_ltree),vt(this.dyn_dtree),vt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),vt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),vt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Dt=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==dt&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==ft&&e.status!==pt?1:0},It=t=>{if(Dt(t))return mt(t,Q);t.total_in=t.total_out=0,t.data_type=lt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?dt:ft,t.adler=2===e.wrap?0:1,e.last_flush=-2,U(e),J},Ft=t=>{const e=It(t);var r;return e===J&&((r=t.state).window_size=2*r.w_size,vt(r.head),r.max_lazy_match=zt[r.level].max_lazy,r.good_match=zt[r.level].good_length,r.nice_match=zt[r.level].nice_length,r.max_chain_length=zt[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),e},Rt=(t,e,r,n,i,o)=>{if(!t)return Q;let a=1;if(e===rt&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>9||r!==ct||n<8||n>15||e<0||e>9||o<0||o>at||8===n&&1!==a)return mt(t,Q);8===n&&(n=9);const s=new Ot;return t.state=s,s.strm=t,s.status=dt,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<Dt(t)||2!==t.state.wrap?Q:(t.state.gzhead=e,J),Nt=(t,e)=>{if(Dt(t)||e>$||e<0)return t?mt(t,Q):Q;const r=t.state;if(!t.output||0!==t.avail_in&&!t.input||r.status===pt&&e!==X)return mt(t,0===t.avail_out?et:Q);const n=r.last_flush;if(r.last_flush=e,0!==r.pending){if(xt(t),0===t.avail_out)return r.last_flush=-1,J}else if(0===t.avail_in&>(e)<=gt(n)&&e!==X)return mt(t,et);if(r.status===pt&&0!==t.avail_in)return mt(t,et);if(r.status===dt&&0===r.wrap&&(r.status=ft),r.status===dt){let e=ct+(r.w_bits-8<<4)<<8,n=-1;if(n=r.strategy>=it||r.level<2?0:r.level<6?1:6===r.level?2:3,e|=n<<6,0!==r.strstart&&(e|=32),e+=31-e%31,kt(r,e),0!==r.strstart&&(kt(r,t.adler>>>16),kt(r,65535&t.adler)),t.adler=1,r.status=ft,xt(t),0!==r.pending)return r.last_flush=-1,J}if(57===r.status)if(t.adler=0,wt(r,31),wt(r,139),wt(r,8),r.gzhead)wt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),wt(r,255&r.gzhead.time),wt(r,r.gzhead.time>>8&255),wt(r,r.gzhead.time>>16&255),wt(r,r.gzhead.time>>24&255),wt(r,9===r.level?2:r.strategy>=it||r.level<2?4:0),wt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(wt(r,255&r.gzhead.extra.length),wt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=j(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(wt(r,0),wt(r,0),wt(r,0),wt(r,0),wt(r,0),wt(r,9===r.level?2:r.strategy>=it||r.level<2?4:0),wt(r,3),r.status=ft,xt(t),0!==r.pending)return r.last_flush=-1,J;if(69===r.status){if(r.gzhead.extra){let e=r.pending,n=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+n>r.pending_buf_size;){let i=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+i),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>e&&(t.adler=j(t.adler,r.pending_buf,r.pending-e,e)),r.gzindex+=i,xt(t),0!==r.pending)return r.last_flush=-1,J;e=0,n-=i}let i=new Uint8Array(r.gzhead.extra);r.pending_buf.set(i.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending+=n,r.gzhead.hcrc&&r.pending>e&&(t.adler=j(t.adler,r.pending_buf,r.pending-e,e)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let e,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(t.adler=j(t.adler,r.pending_buf,r.pending-n,n)),xt(t),0!==r.pending)return r.last_flush=-1,J;n=0}e=r.gzindexn&&(t.adler=j(t.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let e,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(t.adler=j(t.adler,r.pending_buf,r.pending-n,n)),xt(t),0!==r.pending)return r.last_flush=-1,J;n=0}e=r.gzindexn&&(t.adler=j(t.adler,r.pending_buf,r.pending-n,n))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(xt(t),0!==r.pending))return r.last_flush=-1,J;wt(r,255&t.adler),wt(r,t.adler>>8&255),t.adler=0}if(r.status=ft,xt(t),0!==r.pending)return r.last_flush=-1,J}if(0!==t.avail_in||0!==r.lookahead||e!==q&&r.status!==pt){let n=0===r.level?St(r,e):r.strategy===it?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(Tt(t),0===t.lookahead)){if(e===q)return 1;break}if(t.match_length=0,r=H(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(_t(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(_t(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(_t(t,!1),0===t.strm.avail_out)?1:2})(r,e):r.strategy===ot?((t,e)=>{let r,n,i,o;const a=t.window;for(;;){if(t.lookahead<=ut){if(Tt(t),t.lookahead<=ut&&e===q)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=t.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=t.strstart+ut;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=H(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=H(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(_t(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(_t(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(_t(t,!1),0===t.strm.avail_out)?1:2})(r,e):zt[r.level].func(r,e);if(3!==n&&4!==n||(r.status=pt),1===n||3===n)return 0===t.avail_out&&(r.last_flush=-1),J;if(2===n&&(e===Y?W(r):e!==$&&(G(r,0,0,!1),e===Z&&(vt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),xt(t),0===t.avail_out))return r.last_flush=-1,J}return e!==X?J:r.wrap<=0?K:(2===r.wrap?(wt(r,255&t.adler),wt(r,t.adler>>8&255),wt(r,t.adler>>16&255),wt(r,t.adler>>24&255),wt(r,255&t.total_in),wt(r,t.total_in>>8&255),wt(r,t.total_in>>16&255),wt(r,t.total_in>>24&255)):(kt(r,t.adler>>>16),kt(r,65535&t.adler)),xt(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?J:K)},Bt=t=>{if(Dt(t))return Q;const e=t.state.status;return t.state=null,e===ft?mt(t,tt):J},Ut=(t,e)=>{let r=e.length;if(Dt(t))return Q;const n=t.state,i=n.wrap;if(2===i||1===i&&n.status!==dt||n.lookahead)return Q;if(1===i&&(t.adler=R(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===i&&(vt(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const o=t.avail_in,a=t.next_in,s=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,Tt(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,Tt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=a,t.input=s,t.avail_in=o,n.wrap=i,J};const Gt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Vt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const e in r)Gt(r,e)&&(t[e]=r[e])}}return t},Ht=t=>{let e=0;for(let r=0,n=t.length;r=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;qt[254]=qt[254]=1;var Yt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,i,o,a=t.length,s=0;for(i=0;i>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e},Zt=(t,e)=>{const r=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let n,i;const o=new Array(2*r);for(i=0,n=0;n4)o[i++]=65533,n+=a-1;else{for(e&=2===a?31:3===a?15:7;a>1&&n1?o[i++]=65533:e<65536?o[i++]=e:(e-=65536,o[i++]=55296|e>>10&1023,o[i++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Wt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let n=0;n{(e=e||t.length)>t.length&&(e=t.length);let r=e-1;for(;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+qt[t[r]]>e?r:e},$t=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Jt=Object.prototype.toString,{Z_NO_FLUSH:Kt,Z_SYNC_FLUSH:Qt,Z_FULL_FLUSH:te,Z_FINISH:ee,Z_OK:re,Z_STREAM_END:ne,Z_DEFAULT_COMPRESSION:ie,Z_DEFAULT_STRATEGY:oe,Z_DEFLATED:ae}=B;function se(t){this.options=Vt({level:ie,method:ae,chunkSize:16384,windowBits:15,memLevel:8,strategy:oe},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new $t,this.strm.avail_out=0;let r=Pt(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==re)throw new Error(N[r]);if(e.header&&jt(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Yt(e.dictionary):"[object ArrayBuffer]"===Jt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=Ut(this.strm,t),r!==re)throw new Error(N[r]);this._dict_set=!0}}function le(t,e){const r=new se(e);if(r.push(t,!0),r.err)throw r.msg||N[r.err];return r.result}se.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize;let i,o;if(this.ended)return!1;for(o=e===~~e?e:!0===e?ee:Kt,"string"==typeof t?r.input=Yt(t):"[object ArrayBuffer]"===Jt.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(o===Qt||o===te)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(i=Nt(r,o),i===ne)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),i=Bt(this.strm),this.onEnd(i),this.ended=!0,i===re;if(0!==r.avail_out){if(o>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},se.prototype.onData=function(t){this.chunks.push(t)},se.prototype.onEnd=function(t){t===re&&(this.result=Ht(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var ce={Deflate:se,deflate:le,deflateRaw:function(t,e){return(e=e||{}).raw=!0,le(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,le(t,e)},constants:B};const ue=16209;var he=function(t,e){let r,n,i,o,a,s,l,c,u,h,d,f,p,m,g,v,b,y,x,_,w,k,A,M;const T=t.state;r=t.next_in,A=t.input,n=r+(t.avail_in-5),i=t.next_out,M=t.output,o=i-(e-t.avail_out),a=i+(t.avail_out-257),s=T.dmax,l=T.wsize,c=T.whave,u=T.wnext,h=T.window,d=T.hold,f=T.bits,p=T.lencode,m=T.distcode,g=(1<>>24,d>>>=y,f-=y,y=b>>>16&255,0===y)M[i++]=65535&b;else{if(!(16&y)){if(64&y){if(32&y){T.mode=16191;break t}t.msg="invalid literal/length code",T.mode=ue;break t}b=p[(65535&b)+(d&(1<>>=y,f-=y),f<15&&(d+=A[r++]<>>24,d>>>=y,f-=y,y=b>>>16&255,16&y){if(_=65535&b,y&=15,fs){t.msg="invalid distance too far back",T.mode=ue;break t}if(d>>>=y,f-=y,y=i-o,_>y){if(y=_-y,y>c&&T.sane){t.msg="invalid distance too far back",T.mode=ue;break t}if(w=0,k=h,0===u){if(w+=l-y,y2;)M[i++]=k[w++],M[i++]=k[w++],M[i++]=k[w++],x-=3;x&&(M[i++]=k[w++],x>1&&(M[i++]=k[w++]))}else{w=i-_;do{M[i++]=M[w++],M[i++]=M[w++],M[i++]=M[w++],x-=3}while(x>2);x&&(M[i++]=M[w++],x>1&&(M[i++]=M[w++]))}break}if(64&y){t.msg="invalid distance code",T.mode=ue;break t}b=m[(65535&b)+(d&(1<>3,r-=x,f-=x<<3,d&=(1<{const l=s.bits;let c,u,h,d,f,p,m=0,g=0,v=0,b=0,y=0,x=0,_=0,w=0,k=0,A=0,M=null;const T=new Uint16Array(16),S=new Uint16Array(16);let C,E,L,z=null;for(m=0;m<=15;m++)T[m]=0;for(g=0;g=1&&0===T[b];b--);if(y>b&&(y=b),0===b)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(v=1;v0&&(0===t||1!==b))return-1;for(S[1]=0,m=1;m<15;m++)S[m+1]=S[m]+T[m];for(g=0;g852||2===t&&k>592)return 1;for(;;){C=m-_,a[g]+1=p?(E=z[a[g]-p],L=M[a[g]-p]):(E=96,L=0),c=1<>_)+u]=C<<24|E<<16|L}while(0!==u);for(c=1<>=1;if(0!==c?(A&=c-1,A+=c):A=0,g++,0==--T[m]){if(m===b)break;m=e[r+a[g]]}if(m>y&&(A&d)!==h){for(0===_&&(_=y),f+=v,x=m-_,w=1<852||2===t&&k>592)return 1;h=A&d,i[h]=y<<24|x<<16|f-o}}return 0!==A&&(i[f+A]=m-_<<24|64<<16),s.bits=y,0};const{Z_FINISH:ve,Z_BLOCK:be,Z_TREES:ye,Z_OK:xe,Z_STREAM_END:_e,Z_NEED_DICT:we,Z_STREAM_ERROR:ke,Z_DATA_ERROR:Ae,Z_MEM_ERROR:Me,Z_BUF_ERROR:Te,Z_DEFLATED:Se}=B,Ce=16180,Ee=16190,Le=16191,ze=16192,Oe=16194,De=16199,Ie=16200,Fe=16206,Re=16209,Pe=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function je(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Ne=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode16211?1:0},Be=t=>{if(Ne(t))return ke;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=Ce,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,xe},Ue=t=>{if(Ne(t))return ke;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Be(t)},Ge=(t,e)=>{let r;if(Ne(t))return ke;const n=t.state;return e<0?(r=0,e=-e):(r=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?ke:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,Ue(t))},Ve=(t,e)=>{if(!t)return ke;const r=new je;t.state=r,r.strm=t,r.window=null,r.mode=Ce;const n=Ge(t,e);return n!==xe&&(t.state=null),n};let He,We,qe=!0;const Ye=t=>{if(qe){He=new Int32Array(512),We=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ge(1,t.lens,0,288,He,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ge(2,t.lens,0,32,We,0,t.work,{bits:5}),qe=!1}t.lencode=He,t.lenbits=9,t.distcode=We,t.distbits=5},Ze=(t,e,r,n)=>{let i;const o=t.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(e.subarray(r-o.wsize,r),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),o.window.set(e.subarray(r-n,r-n+i),o.wnext),(n-=i)?(o.window.set(e.subarray(r-n,r),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave{let r,n,i,o,a,s,l,c,u,h,d,f,p,m,g,v,b,y,x,_,w,k,A=0;const M=new Uint8Array(4);let T,S;const C=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ne(t)||!t.output||!t.input&&0!==t.avail_in)return ke;r=t.state,r.mode===Le&&(r.mode=ze),a=t.next_out,i=t.output,l=t.avail_out,o=t.next_in,n=t.input,s=t.avail_in,c=r.hold,u=r.bits,h=s,d=l,k=xe;t:for(;;)switch(r.mode){case Ce:if(0===r.wrap){r.mode=ze;break}for(;u<16;){if(0===s)break t;s--,c+=n[o++]<>>8&255,r.check=j(r.check,M,2,0),c=0,u=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=Re;break}if((15&c)!==Se){t.msg="unknown compression method",r.mode=Re;break}if(c>>>=4,u-=4,w=8+(15&c),0===r.wbits&&(r.wbits=w),w>15||w>r.wbits){t.msg="invalid window size",r.mode=Re;break}r.dmax=1<>8&1),512&r.flags&&4&r.wrap&&(M[0]=255&c,M[1]=c>>>8&255,r.check=j(r.check,M,2,0)),c=0,u=0,r.mode=16182;case 16182:for(;u<32;){if(0===s)break t;s--,c+=n[o++]<>>8&255,M[2]=c>>>16&255,M[3]=c>>>24&255,r.check=j(r.check,M,4,0)),c=0,u=0,r.mode=16183;case 16183:for(;u<16;){if(0===s)break t;s--,c+=n[o++]<>8),512&r.flags&&4&r.wrap&&(M[0]=255&c,M[1]=c>>>8&255,r.check=j(r.check,M,2,0)),c=0,u=0,r.mode=16184;case 16184:if(1024&r.flags){for(;u<16;){if(0===s)break t;s--,c+=n[o++]<>>8&255,r.check=j(r.check,M,2,0)),c=0,u=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(f=r.length,f>s&&(f=s),f&&(r.head&&(w=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(o,o+f),w)),512&r.flags&&4&r.wrap&&(r.check=j(r.check,n,f,o)),s-=f,o+=f,r.length-=f),r.length))break t;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===s)break t;f=0;do{w=n[o+f++],r.head&&w&&r.length<65536&&(r.head.name+=String.fromCharCode(w))}while(w&&f>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=Le;break;case 16189:for(;u<32;){if(0===s)break t;s--,c+=n[o++]<>>=7&u,u-=7&u,r.mode=Fe;break}for(;u<3;){if(0===s)break t;s--,c+=n[o++]<>>=1,u-=1,3&c){case 0:r.mode=16193;break;case 1:if(Ye(r),r.mode=De,e===ye){c>>>=2,u-=2;break t}break;case 2:r.mode=16196;break;case 3:t.msg="invalid block type",r.mode=Re}c>>>=2,u-=2;break;case 16193:for(c>>>=7&u,u-=7&u;u<32;){if(0===s)break t;s--,c+=n[o++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=Re;break}if(r.length=65535&c,c=0,u=0,r.mode=Oe,e===ye)break t;case Oe:r.mode=16195;case 16195:if(f=r.length,f){if(f>s&&(f=s),f>l&&(f=l),0===f)break t;i.set(n.subarray(o,o+f),a),s-=f,o+=f,l-=f,a+=f,r.length-=f;break}r.mode=Le;break;case 16196:for(;u<14;){if(0===s)break t;s--,c+=n[o++]<>>=5,u-=5,r.ndist=1+(31&c),c>>>=5,u-=5,r.ncode=4+(15&c),c>>>=4,u-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=Re;break}r.have=0,r.mode=16197;case 16197:for(;r.have>>=3,u-=3}for(;r.have<19;)r.lens[C[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,T={bits:r.lenbits},k=ge(0,r.lens,0,19,r.lencode,0,r.work,T),r.lenbits=T.bits,k){t.msg="invalid code lengths set",r.mode=Re;break}r.have=0,r.mode=16198;case 16198:for(;r.have>>24,v=A>>>16&255,b=65535&A,!(g<=u);){if(0===s)break t;s--,c+=n[o++]<>>=g,u-=g,r.lens[r.have++]=b;else{if(16===b){for(S=g+2;u>>=g,u-=g,0===r.have){t.msg="invalid bit length repeat",r.mode=Re;break}w=r.lens[r.have-1],f=3+(3&c),c>>>=2,u-=2}else if(17===b){for(S=g+3;u>>=g,u-=g,w=0,f=3+(7&c),c>>>=3,u-=3}else{for(S=g+7;u>>=g,u-=g,w=0,f=11+(127&c),c>>>=7,u-=7}if(r.have+f>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=Re;break}for(;f--;)r.lens[r.have++]=w}}if(r.mode===Re)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=Re;break}if(r.lenbits=9,T={bits:r.lenbits},k=ge(1,r.lens,0,r.nlen,r.lencode,0,r.work,T),r.lenbits=T.bits,k){t.msg="invalid literal/lengths set",r.mode=Re;break}if(r.distbits=6,r.distcode=r.distdyn,T={bits:r.distbits},k=ge(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,T),r.distbits=T.bits,k){t.msg="invalid distances set",r.mode=Re;break}if(r.mode=De,e===ye)break t;case De:r.mode=Ie;case Ie:if(s>=6&&l>=258){t.next_out=a,t.avail_out=l,t.next_in=o,t.avail_in=s,r.hold=c,r.bits=u,he(t,d),a=t.next_out,i=t.output,l=t.avail_out,o=t.next_in,n=t.input,s=t.avail_in,c=r.hold,u=r.bits,r.mode===Le&&(r.back=-1);break}for(r.back=0;A=r.lencode[c&(1<>>24,v=A>>>16&255,b=65535&A,!(g<=u);){if(0===s)break t;s--,c+=n[o++]<>y)],g=A>>>24,v=A>>>16&255,b=65535&A,!(y+g<=u);){if(0===s)break t;s--,c+=n[o++]<>>=y,u-=y,r.back+=y}if(c>>>=g,u-=g,r.back+=g,r.length=b,0===v){r.mode=16205;break}if(32&v){r.back=-1,r.mode=Le;break}if(64&v){t.msg="invalid literal/length code",r.mode=Re;break}r.extra=15&v,r.mode=16201;case 16201:if(r.extra){for(S=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;A=r.distcode[c&(1<>>24,v=A>>>16&255,b=65535&A,!(g<=u);){if(0===s)break t;s--,c+=n[o++]<>y)],g=A>>>24,v=A>>>16&255,b=65535&A,!(y+g<=u);){if(0===s)break t;s--,c+=n[o++]<>>=y,u-=y,r.back+=y}if(c>>>=g,u-=g,r.back+=g,64&v){t.msg="invalid distance code",r.mode=Re;break}r.offset=b,r.extra=15&v,r.mode=16203;case 16203:if(r.extra){for(S=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=Re;break}r.mode=16204;case 16204:if(0===l)break t;if(f=d-l,r.offset>f){if(f=r.offset-f,f>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=Re;break}f>r.wnext?(f-=r.wnext,p=r.wsize-f):p=r.wnext-f,f>r.length&&(f=r.length),m=r.window}else m=i,p=a-r.offset,f=r.length;f>l&&(f=l),l-=f,r.length-=f;do{i[a++]=m[p++]}while(--f);0===r.length&&(r.mode=Ie);break;case 16205:if(0===l)break t;i[a++]=r.length,l--,r.mode=Ie;break;case Fe:if(r.wrap){for(;u<32;){if(0===s)break t;s--,c|=n[o++]<{if(Ne(t))return ke;let e=t.state;return e.window&&(e.window=null),t.state=null,xe},Qe=(t,e)=>{if(Ne(t))return ke;const r=t.state;return 2&r.wrap?(r.head=e,e.done=!1,xe):ke},tr=(t,e)=>{const r=e.length;let n,i,o;return Ne(t)?ke:(n=t.state,0!==n.wrap&&n.mode!==Ee?ke:n.mode===Ee&&(i=1,i=R(i,e,r,0),i!==n.check)?Ae:(o=Ze(t,e,r,r),o?(n.mode=16210,Me):(n.havedict=1,xe)))},er=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const rr=Object.prototype.toString,{Z_NO_FLUSH:nr,Z_FINISH:ir,Z_OK:or,Z_STREAM_END:ar,Z_NEED_DICT:sr,Z_STREAM_ERROR:lr,Z_DATA_ERROR:cr,Z_MEM_ERROR:ur}=B;function hr(t){this.options=Vt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new $t,this.strm.avail_out=0;let r=$e(this.strm,e.windowBits);if(r!==or)throw new Error(N[r]);if(this.header=new er,Qe(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Yt(e.dictionary):"[object ArrayBuffer]"===rr.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=tr(this.strm,e.dictionary),r!==or)))throw new Error(N[r])}function dr(t,e){const r=new hr(e);if(r.push(t),r.err)throw r.msg||N[r.err];return r.result}hr.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize,i=this.options.dictionary;let o,a,s;if(this.ended)return!1;for(a=e===~~e?e:!0===e?ir:nr,"[object ArrayBuffer]"===rr.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),o=Je(r,a),o===sr&&i&&(o=tr(r,i),o===or?o=Je(r,a):o===cr&&(o=sr));r.avail_in>0&&o===ar&&r.state.wrap>0&&0!==t[r.next_in];)Xe(r),o=Je(r,a);switch(o){case lr:case cr:case sr:case ur:return this.onEnd(o),this.ended=!0,!1}if(s=r.avail_out,r.next_out&&(0===r.avail_out||o===ar))if("string"===this.options.to){let t=Xt(r.output,r.next_out),e=r.next_out-t,i=Zt(r.output,t);r.next_out=e,r.avail_out=n-e,e&&r.output.set(r.output.subarray(t,t+e),0),this.onData(i)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(o!==or||0!==s){if(o===ar)return o=Ke(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},hr.prototype.onData=function(t){this.chunks.push(t)},hr.prototype.onEnd=function(t){t===or&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ht(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var fr={Inflate:hr,inflate:dr,inflateRaw:function(t,e){return(e=e||{}).raw=!0,dr(t,e)},ungzip:dr,constants:B};const{Deflate:pr,deflate:mr,deflateRaw:gr,gzip:vr}=ce,{Inflate:br,inflate:yr,inflateRaw:xr,ungzip:_r}=fr;var wr=pr,kr=mr,Ar=gr,Mr=vr,Tr=br,Sr=yr,Cr=xr,Er=_r,Lr=B,zr={Deflate:pr,deflate:mr,deflateRaw:gr,gzip:vr,Inflate:br,inflate:yr,inflateRaw:xr,ungzip:_r,constants:B}}},__webpack_module_cache__={};function __nested_webpack_require_1675243__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__nested_webpack_require_1675243__),r.exports}__nested_webpack_require_1675243__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __nested_webpack_require_1675243__.d(e,{a:e}),e},__nested_webpack_require_1675243__.d=(t,e)=>{for(var r in e)__nested_webpack_require_1675243__.o(e,r)&&!__nested_webpack_require_1675243__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},__nested_webpack_require_1675243__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__nested_webpack_require_1675243__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__nested_webpack_require_1675243__("./src/index.ts"),__nested_webpack_require_1675243__("./src/SurfaceWorker.js");var __nested_webpack_exports__=__nested_webpack_require_1675243__("./src/exporter.js");return __nested_webpack_exports__})(),module.exports=factory()},27941:(t,e,r)=>{var n,i;(function(){var o={version:"3.8.2"},a=[].slice,s=function(t){return a.call(t)},l=self.document;function c(t){return t&&(t.ownerDocument||t.document||t).documentElement}function u(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(l)try{s(l.documentElement.childNodes)[0].nodeType}catch(t){s=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var h=this.Element.prototype,d=h.setAttribute,f=h.setAttributeNS,p=this.CSSStyleDeclaration.prototype,m=p.setProperty;h.setAttribute=function(t,e){d.call(this,t,e+"")},h.setAttributeNS=function(t,e,r){f.call(this,t,e,r+"")},p.setProperty=function(t,e,r){m.call(this,t,e+"",r)}}function g(t,e){return te?1:t>=e?0:NaN}function v(t){return null===t?NaN:+t}function b(t){return!isNaN(t)}function y(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[o],r)<0?n=o+1:i=o}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[o],r)>0?i=o:n=o+1}return n}}}o.ascending=g,o.descending=function(t,e){return et?1:e>=t?0:NaN},o.min=function(t,e){var r,n,i=-1,o=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},o.max=function(t,e){var r,n,i=-1,o=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},o.extent=function(t,e){var r,n,i,o=-1,a=t.length;if(1===arguments.length){for(;++o=n){r=i=n;break}for(;++on&&(r=n),i=n){r=i=n;break}for(;++on&&(r=n),i1)return a/(l-1)},o.deviation=function(){var t=o.variance.apply(this,arguments);return t?Math.sqrt(t):t};var x=y(g);function _(t){return t.length}o.bisectLeft=x.left,o.bisect=o.bisectRight=x.right,o.bisector=function(t){return y(1===t.length?function(e,r){return g(t(e),r)}:t)},o.shuffle=function(t,e,r){(o=arguments.length)<3&&(r=t.length,o<2&&(e=0));for(var n,i,o=r-e;o;)i=Math.random()*o--|0,n=t[o+e],t[o+e]=t[i+e],t[i+e]=n;return t},o.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},o.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e=0;)for(e=(n=t[i]).length;--e>=0;)r[--a]=n[e];return r};var w=Math.abs;function k(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function A(){this._=Object.create(null)}function M(t){return"__proto__"==(t+="")||"\0"===t[0]?"\0"+t:t}function T(t){return"\0"===(t+="")[0]?t.slice(1):t}function S(t){return M(t)in this._}function C(t){return(t=M(t))in this._&&delete this._[t]}function E(){var t=[];for(var e in this._)t.push(T(e));return t}function L(){var t=0;for(var e in this._)++t;return t}function z(){for(var t in this._)return!1;return!0}function O(){this._=Object.create(null)}function D(t){return t}function I(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function F(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=R.length;re;)i.push(n/o);else for(;(n=t+r*++a)=n.length)return e?e.call(r,o):t?o.sort(t):o;for(var l,c,u,h,d=-1,f=o.length,p=n[s++],m=new A;++d=n.length)return t;var r=[],o=i[e++];return t.forEach((function(t,n){r.push({key:t,values:s(n,e)})})),o?r.sort((function(t,e){return o(t.key,e.key)})):r}return r.map=function(t,e){return a(e,t,0)},r.entries=function(t){return s(a(o.map,t,0),0)},r.key=function(t){return n.push(t),r},r.sortKeys=function(t){return i[n.length-1]=t,r},r.sortValues=function(e){return t=e,r},r.rollup=function(t){return e=t,r},r},o.set=function(t){var e=new O;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},o.event=null,o.requote=function(t){return t.replace(V,"\\$&")};var V=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,H={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function W(t){return H(t,X),t}var q=function(t,e){return e.querySelector(t)},Y=function(t,e){return e.querySelectorAll(t)},Z=function(t,e){var r=t.matches||t[F(t,"matchesSelector")];return Z=function(t,e){return r.call(t,e)},Z(t,e)};"function"==typeof Sizzle&&(q=function(t,e){return Sizzle(t,e)[0]||null},Y=Sizzle,Z=Sizzle.matchesSelector),o.selection=function(){return o.select(l.documentElement)};var X=o.selection.prototype=[];function $(t){return"function"==typeof t?t:function(){return q(t,this)}}function J(t){return"function"==typeof t?t:function(){return Y(t,this)}}X.select=function(t){var e,r,n,i,o=[];t=$(t);for(var a=-1,s=this.length;++a=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),Q.hasOwnProperty(r)?{space:Q[r],local:t}:t}},X.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node();return(t=o.ns.qualify(t)).local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(tt(e,t[e]));return this}return this.each(tt(t,e))},X.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=nt(t)).length,i=-1;if(e=r.classList){for(;++i=0;)(r=n[i])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this},X.sort=function(t){t=dt.apply(this,arguments);for(var e=-1,r=this.length;++e0&&(t=t.slice(0,i));var l=vt.get(t);function c(){var e=this[n];e&&(this.removeEventListener(t,e,e.$),delete this[n])}return l&&(t=l,a=yt),i?e?function(){var i=a(e,s(arguments));c.call(this),this.addEventListener(t,this[n]=i,i.$=r),i._=e}:c:e?P:function(){var e,r=new RegExp("^__on([^.]+)"+o.requote(t)+"$");for(var n in this)if(e=n.match(r)){var i=this[n];this.removeEventListener(e[1],i,i.$),delete this[n]}}}o.selection.enter=pt,o.selection.enter.prototype=mt,mt.append=X.append,mt.empty=X.empty,mt.node=X.node,mt.call=X.call,mt.size=X.size,mt.select=function(t){for(var e,r,n,i,o,a=[],s=-1,l=this.length;++s=n&&(n=e+1);!(a=s[n])&&++n1?zt:t<-1?-zt:Math.asin(t)}function Ft(t){return((t=Math.exp(t))+1/t)/2}var Rt=Math.SQRT2;o.interpolateZoom=function(t,e){var r,n,i=t[0],o=t[1],a=t[2],s=e[0],l=e[1],c=e[2],u=s-i,h=l-o,d=u*u+h*h;if(d0&&(t=t.transition().duration(m)),t.call(w.event)}function S(){s&&s.domain(a.range().map((function(t){return(t-d.x)/d.k})).map(a.invert)),h&&h.domain(c.range().map((function(t){return(t-d.y)/d.k})).map(c.invert))}function C(t){g++||t({type:"zoomstart"})}function E(t){S(),t({type:"zoom",scale:d.k,translate:[d.x,d.y]})}function L(t){--g||(t({type:"zoomend"}),e=null)}function z(){var t=this,e=_.of(t,arguments),r=0,n=o.select(u(t)).on(b,(function(){r=1,M(o.mouse(t),i),E(e)})).on(y,(function(){n.on(b,null).on(y,null),a(r),L(e)})),i=k(o.mouse(t)),a=wt(t);Zi.call(t),C(e)}function O(){var t,e=this,r=_.of(e,arguments),n={},a=0,s=".zoom-"+o.event.changedTouches[0].identifier,l="touchmove"+s,c="touchend"+s,u=[],h=o.select(e),f=wt(e);function p(){var r=o.touches(e);return t=d.k,r.forEach((function(t){t.identifier in n&&(n[t.identifier]=k(t))})),r}function m(){var t=o.event.target;o.select(t).on(l,g).on(c,b),u.push(t);for(var r=o.event.changedTouches,s=0,h=r.length;s1){v=f[0];var y=f[1],x=v[0]-y[0],_=v[1]-y[1];a=x*x+_*_}}function g(){var s,l,c,u,h=o.touches(e);Zi.call(e);for(var d=0,f=h.length;d360?t-=360:t<0&&(t+=360),t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)||e<0?0:e>1?1:e,n=2*(r=r<0?0:r>1?1:r)-(i=r<=.5?r*(1+e):r+e-r*e),new ne(o(t+120),o(t),o(t-120))}function Ht(t,e,r){return this instanceof Ht?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof Ht?new Ht(t.h,t.c,t.l):function(t,e,r){return t>0?new Ht(Math.atan2(r,e)*Dt,Math.sqrt(e*e+r*r),t):new Ht(NaN,NaN,t)}(t instanceof Yt?t.l:(t=ue((t=o.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Ht(t,e,r)}Gt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ut(this.h,this.s,this.l/t)},Gt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ut(this.h,this.s,t*this.l)},Gt.rgb=function(){return Vt(this.h,this.s,this.l)},o.hcl=Ht;var Wt=Ht.prototype=new Bt;function qt(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new Yt(r,Math.cos(t*=Ot)*e,Math.sin(t)*e)}function Yt(t,e,r){return this instanceof Yt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof Yt?new Yt(t.l,t.a,t.b):t instanceof Ht?qt(t.h,t.c,t.l):ue((t=ne(t)).r,t.g,t.b):new Yt(t,e,r)}Wt.brighter=function(t){return new Ht(this.h,this.c,Math.min(100,this.l+Zt*(arguments.length?t:1)))},Wt.darker=function(t){return new Ht(this.h,this.c,Math.max(0,this.l-Zt*(arguments.length?t:1)))},Wt.rgb=function(){return qt(this.h,this.c,this.l).rgb()},o.lab=Yt;var Zt=18,Xt=.95047,$t=1,Jt=1.08883,Kt=Yt.prototype=new Bt;function Qt(t,e,r){var n=(t+16)/116,i=n+e/500,o=n-r/200;return new ne(re(3.2404542*(i=te(i)*Xt)-1.5371385*(n=te(n)*$t)-.4985314*(o=te(o)*Jt)),re(-.969266*i+1.8760108*n+.041556*o),re(.0556434*i-.2040259*n+1.0572252*o))}function te(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ee(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function re(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ne(t,e,r){return this instanceof ne?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof ne?new ne(t.r,t.g,t.b):le(""+t,ne,Vt):new ne(t,e,r)}function ie(t){return new ne(t>>16,t>>8&255,255&t)}function oe(t){return ie(t)+""}Kt.brighter=function(t){return new Yt(Math.min(100,this.l+Zt*(arguments.length?t:1)),this.a,this.b)},Kt.darker=function(t){return new Yt(Math.max(0,this.l-Zt*(arguments.length?t:1)),this.a,this.b)},Kt.rgb=function(){return Qt(this.l,this.a,this.b)},o.rgb=ne;var ae=ne.prototype=new Bt;function se(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function le(t,e,r){var n,i,o,a=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(de(i[0]),de(i[1]),de(i[2]))}return(o=fe.get(t))?e(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,l=15&o,l|=l<<4):7===t.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),e(a,s,l))}function ce(t,e,r){var n,i,o=Math.min(t/=255,e/=255,r/=255),a=Math.max(t,e,r),s=a-o,l=(a+o)/2;return s?(i=l<.5?s/(a+o):s/(2-a-o),n=t==a?(e-r)/s+(e0&&l<1?0:n),new Ut(n,i,l)}function ue(t,e,r){var n=ee((.4124564*(t=he(t))+.3575761*(e=he(e))+.1804375*(r=he(r)))/Xt),i=ee((.2126729*t+.7151522*e+.072175*r)/$t);return Yt(116*i-16,500*(n-i),200*(i-ee((.0193339*t+.119192*e+.9503041*r)/Jt)))}function he(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function de(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}ae.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b,i=30;return e||r||n?(e&&e=200&&e<300||304===e){try{t=r.call(i,c)}catch(t){return void a.error.call(i,t)}a.load.call(i,t)}else a.error.call(i,c)}return self.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(t)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=h:c.onreadystatechange=function(){c.readyState>3&&h()},c.onprogress=function(t){var e=o.event;o.event=t;try{a.progress.call(i,c)}finally{o.event=e}},i.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",i)},i.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",i):e},i.responseType=function(t){return arguments.length?(u=t,i):u},i.response=function(t){return r=t,i},["get","post"].forEach((function(t){i[t]=function(){return i.send.apply(i,[t].concat(s(arguments)))}})),i.send=function(r,n,o){if(2===arguments.length&&"function"==typeof n&&(o=n,n=null),c.open(r,t,!0),null==e||"accept"in l||(l.accept=e+",*/*"),c.setRequestHeader)for(var s in l)c.setRequestHeader(s,l[s]);return null!=e&&c.overrideMimeType&&c.overrideMimeType(e),null!=u&&(c.responseType=u),null!=o&&i.on("error",o).on("load",(function(t){o(null,t)})),a.beforesend.call(i,c),c.send(null==n?null:n),i},i.abort=function(){return c.abort(),i},o.rebind(i,a,"on"),null==n?i:i.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(n))}fe.forEach((function(t,e){fe.set(t,ie(e))})),o.functor=pe,o.xhr=me(D),o.dsv=function(t,e){var r=new RegExp('["'+t+"\n]"),n=t.charCodeAt(0);function i(t,r,n){arguments.length<3&&(n=r,r=null);var i=ge(t,e,null==r?o:a(r),n);return i.row=function(t){return arguments.length?i.response(null==(r=t)?o:a(t)):r},i}function o(t){return i.parse(t.responseText)}function a(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return r.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return i.parse=function(t,e){var r;return i.parseRows(t,(function(t,n){if(r)return r(t,n-1);var i=function(e){for(var r={},n=t.length,i=0;i=l)return a;if(i)return i=!1,o;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++24?(isFinite(e)&&(clearTimeout(xe),xe=setTimeout(ke,e)),ye=0):(ye=1,_e(ke))}function Ae(){for(var t=Date.now(),e=ve;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Me(){for(var t,e=ve,r=1/0;e;)e.c?(e.t1&&(e=t[o[a-2]],r=t[o[a-1]],n=t[s],(r[0]-e[0])*(n[1]-e[1])-(r[1]-e[1])*(n[0]-e[0])<=0);)--a;o[a++]=s}return o.slice(0,a)}function Ee(t,e){return t[0]-e[0]||t[1]-e[1]}o.timer=function(){we.apply(this,arguments)},o.timer.flush=function(){Ae(),Me()},o.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)},o.geom={},o.geom.hull=function(t){var e=Te,r=Se;if(arguments.length)return n(t);function n(t){if(t.length<3)return[];var n,i=pe(e),o=pe(r),a=t.length,s=[],l=[];for(n=0;n=0;--n)f.push(t[s[c[n]][2]]);for(n=+h;nTt)s=s.L;else{if(!((i=o-Ye(s,a))>Tt)){n>-Tt?(e=s.P,r=s):i>-Tt?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=Ge(t);if(Re.insert(e,l),e||r){if(e===r)return Ke(e),r=Ge(e.site),Re.insert(l,r),l.edge=r.edge=er(e.site,l.site),Je(e),void Je(r);if(r){Ke(e),Ke(r);var c=e.site,u=c.x,h=c.y,d=t.x-u,f=t.y-h,p=r.site,m=p.x-u,g=p.y-h,v=2*(d*g-f*m),b=d*d+f*f,y=m*m+g*g,x={x:(g*b-f*y)/v+u,y:(d*y-m*b)/v+h};rr(r.edge,c,p,x),l.edge=er(c,t,null,x),r.edge=er(t,p,null,x),Je(e),Je(r)}else l.edge=er(e.site,l.site)}}function qe(t,e){var r=t.site,n=r.x,i=r.y,o=i-e;if(!o)return n;var a=t.P;if(!a)return-1/0;var s=(r=a.site).x,l=r.y,c=l-e;if(!c)return s;var u=s-n,h=1/o-1/c,d=u/c;return h?(-d+Math.sqrt(d*d-2*h*(u*u/(-2*c)-l+c/2+i-o/2)))/h+n:(n+s)/2}function Ye(t,e){var r=t.N;if(r)return qe(r,e);var n=t.site;return n.y===e?n.x:1/0}function Ze(t){this.site=t,this.edges=[]}function Xe(t,e){return e.angle-t.angle}function $e(){or(this),this.x=this.y=this.arc=this.site=this.cy=null}function Je(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,i=t.site,o=r.site;if(n!==o){var a=i.x,s=i.y,l=n.x-a,c=n.y-s,u=o.x-a,h=2*(l*(g=o.y-s)-c*u);if(!(h>=-St)){var d=l*l+c*c,f=u*u+g*g,p=(g*d-c*f)/h,m=(l*f-u*d)/h,g=m+s,v=Be.pop()||new $e;v.arc=t,v.site=i,v.x=p+a,v.y=g+Math.sqrt(p*p+m*m),v.cy=g,t.circle=v;for(var b=null,y=je._;y;)if(v.y=s)return;if(d>p){if(o){if(o.y>=c)return}else o={x:g,y:l};r={x:g,y:c}}else{if(o){if(o.y1)if(d>p){if(o){if(o.y>=c)return}else o={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(o){if(o.y=s)return}else o={x:a,y:n*a+i};r={x:s,y:n*s+i}}else{if(o){if(o.x0)){if(e/=d,d<0){if(e0){if(e>h)return;e>u&&(u=e)}if(e=i-l,d||!(e<0)){if(e/=d,d<0){if(e>h)return;e>u&&(u=e)}else if(d>0){if(e0)){if(e/=f,f<0){if(e0){if(e>h)return;e>u&&(u=e)}if(e=o-c,f||!(e<0)){if(e/=f,f<0){if(e>h)return;e>u&&(u=e)}else if(f>0){if(e0&&(t.a={x:l+u*d,y:c+u*f}),h<1&&(t.b={x:l+h*d,y:c+h*f}),t}}}}}),l=a.length;l--;)(!Qe(e=a[l],t)||!s(e)||w(e.a.x-e.b.x)Tt||w(i-r)>Tt)&&(s.splice(a,0,new nr((v=o.site,b=u,y=w(n-h)Tt?{x:h,y:w(e-h)Tt?{x:w(r-p)Tt?{x:d,y:w(e-d)Tt?{x:w(r-f)=r&&c.x<=i&&c.y>=n&&c.y<=a?[[r,a],[i,a],[i,n],[r,n]]:[]).point=t[s]})),e}function s(t){return t.map((function(t,e){return{x:Math.round(n(t,e)/Tt)*Tt,y:Math.round(i(t,e)/Tt)*Tt,i:e}}))}return a.links=function(t){return cr(s(t)).edges.filter((function(t){return t.l&&t.r})).map((function(e){return{source:t[e.l.i],target:t[e.r.i]}}))},a.triangles=function(t){var e=[];return cr(s(t)).cells.forEach((function(r,n){for(var i,o,a,s,l=r.site,c=r.edges.sort(Xe),u=-1,h=c.length,d=c[h-1].edge,f=d.l===l?d.r:d.l;++uo&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:vr(r,n)})),o=xr.lastIndex;return om&&(m=l.x),l.y>g&&(g=l.y),c.push(l.x),u.push(l.y);else for(h=0;hm&&(m=y),x>g&&(g=x),c.push(y),u.push(x)}var _=m-f,k=g-p;function A(t,e,r,n,i,o,a,s){if(!isNaN(r)&&!isNaN(n))if(t.leaf){var l=t.x,c=t.y;if(null!=l)if(w(l-r)+w(c-n)<.01)M(t,e,r,n,i,o,a,s);else{var u=t.point;t.x=t.y=t.point=null,M(t,u,l,c,i,o,a,s),M(t,e,r,n,i,o,a,s)}else t.x=r,t.y=n,t.point=e}else M(t,e,r,n,i,o,a,s)}function M(t,e,r,n,i,o,a,s){var l=.5*(i+a),c=.5*(o+s),u=r>=l,h=n>=c,d=h<<1|u;t.leaf=!1,u?i=l:a=l,h?o=c:s=c,A(t=t.nodes[d]||(t.nodes[d]={leaf:!0,nodes:[],point:null,x:null,y:null}),e,r,n,i,o,a,s)}_>k?g=p+_:m=f+k;var T={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){A(T,t,+v(t,++h),+b(t,h),f,p,m,g)}};if(T.visit=function(t){pr(t,T,f,p,m,g)},T.find=function(t){return function(t,e,r,n,i,o,a){var s,l=1/0;return function t(c,u,h,d,f){if(!(u>o||h>a||d=_)<<1|e>=x,k=w+4;w=0&&!(r=o.interpolators[n](t,e)););return r}function wr(t,e){var r,n=[],i=[],o=t.length,a=e.length,s=Math.min(t.length,e.length);for(r=0;r=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function zr(t){return 1-Math.cos(t*zt)}function Or(t){return Math.pow(2,10*(t-1))}function Dr(t){return 1-Math.sqrt(1-t*t)}function Ir(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Fr(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function Rr(t){var e,r,n,i=[t.a,t.b],o=[t.c,t.d],a=jr(i),s=Pr(i,o),l=jr(((e=o)[0]+=(n=-s)*(r=i)[0],e[1]+=n*r[1],e))||0;i[0]*o[1]=0?t.slice(0,r):t,i=r>=0?t.slice(r+1):"in";return n=Ar.get(n)||kr,i=Mr.get(i)||D,e=i(n.apply(null,a.call(arguments,1))),function(t){return t<=0?0:t>=1?1:e(t)}},o.interpolateHcl=function(t,e){t=o.hcl(t),e=o.hcl(e);var r=t.h,n=t.c,i=t.l,a=e.h-r,s=e.c-n,l=e.l-i;return isNaN(s)&&(s=0,n=isNaN(n)?e.c:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return qt(r+a*t,n+s*t,i+l*t)+""}},o.interpolateHsl=function(t,e){t=o.hsl(t),e=o.hsl(e);var r=t.h,n=t.s,i=t.l,a=e.h-r,s=e.s-n,l=e.l-i;return isNaN(s)&&(s=0,n=isNaN(n)?e.s:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return Vt(r+a*t,n+s*t,i+l*t)+""}},o.interpolateLab=function(t,e){t=o.lab(t),e=o.lab(e);var r=t.l,n=t.a,i=t.b,a=e.l-r,s=e.a-n,l=e.b-i;return function(t){return Qt(r+a*t,n+s*t,i+l*t)+""}},o.interpolateRound=Fr,o.transform=function(t){var e=l.createElementNS(o.ns.prefix.svg,"g");return(o.transform=function(t){if(null!=t){e.setAttribute("transform",t);var r=e.transform.baseVal.consolidate()}return new Rr(r?r.matrix:Nr)})(t)},Rr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Nr={a:1,b:0,c:0,d:1,e:0,f:0};function Br(t){return t.length?t.pop()+",":""}function Ur(t,e){var r=[],n=[];return t=o.transform(t),e=o.transform(e),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push("translate(",null,",",null,")");n.push({i:i-4,x:vr(t[0],e[0])},{i:i-2,x:vr(t[1],e[1])})}else(e[0]||e[1])&&r.push("translate("+e+")")}(t.translate,e.translate,r,n),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(Br(r)+"rotate(",null,")")-2,x:vr(t,e)})):e&&r.push(Br(r)+"rotate("+e+")")}(t.rotate,e.rotate,r,n),function(t,e,r,n){t!==e?n.push({i:r.push(Br(r)+"skewX(",null,")")-2,x:vr(t,e)}):e&&r.push(Br(r)+"skewX("+e+")")}(t.skew,e.skew,r,n),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(Br(r)+"scale(",null,",",null,")");n.push({i:i-4,x:vr(t[0],e[0])},{i:i-2,x:vr(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(Br(r)+"scale("+e+")")}(t.scale,e.scale,r,n),t=e=null,function(t){for(var e,i=-1,o=n.length;++i0?r=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:r=0})):e>0&&(l.start({type:"start",alpha:r=e}),t=we(s.tick)),s):r},s.start=function(){var t,e,r,o=v.length,l=b.length,u=c[0],p=c[1];for(t=0;t=0;)r.push(i[n])}function rn(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(o=t.children)&&(i=o.length))for(var i,o,a=-1;++a=0;)a.push(u=c[l]),u.parent=o,u.depth=o.depth+1;r&&(o.value=0),o.children=c}else r&&(o.value=+r.call(n,o,o.depth)||0),delete o.children;return rn(i,(function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)})),s}return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(en(t,(function(t){t.children&&(t.value=0)})),rn(t,(function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)}))),t},n},o.layout.partition=function(){var t=o.layout.hierarchy(),e=[1,1];function r(t,e,n,i){var o=t.children;if(t.x=e,t.y=t.depth*i,t.dx=n,t.dy=i,o&&(a=o.length)){var a,s,l,c=-1;for(n=t.value?n/t.value:0;++cs&&(s=n),a.push(n)}for(r=0;ri&&(n=r,i=e);return n}function vn(t){return t.reduce(bn,0)}function bn(t,e){return t+e[1]}function yn(t,e){return xn(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function xn(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,o=[];++r<=e;)o[r]=i*r+n;return o}function _n(t){return[o.min(t),o.max(t)]}function wn(t,e){return t.value-e.value}function kn(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function An(t,e){t._pack_next=e,e._pack_prev=t}function Mn(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function Tn(t){if((e=t.children)&&(l=e.length)){var e,r,n,i,o,a,s,l,c=1/0,u=-1/0,h=1/0,d=-1/0;if(e.forEach(Sn),(r=e[0]).x=-r.r,r.y=0,y(r),l>1&&((n=e[1]).x=n.r,n.y=0,y(n),l>2))for(Ln(r,n,i=e[2]),y(i),kn(r,i),r._pack_prev=i,kn(i,n),n=r._pack_next,o=3;o0)for(a=-1;++a=h[0]&&l<=h[1]&&((s=c[o.bisect(d,l,1,p)-1]).y+=m,s.push(i[a]));return c}return i.value=function(t){return arguments.length?(e=t,i):e},i.range=function(t){return arguments.length?(r=pe(t),i):r},i.bins=function(t){return arguments.length?(n="number"==typeof t?function(e){return xn(e,t)}:pe(t),i):n},i.frequency=function(e){return arguments.length?(t=!!e,i):t},i},o.layout.pack=function(){var t,e=o.layout.hierarchy().sort(wn),r=0,n=[1,1];function i(i,o){var a=e.call(this,i,o),s=a[0],l=n[0],c=n[1],u=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,rn(s,(function(t){t.r=+u(t.value)})),rn(s,Tn),r){var h=r*(t?1:Math.max(2*s.r/l,2*s.r/c))/2;rn(s,(function(t){t.r+=h})),rn(s,Tn),rn(s,(function(t){t.r-=h}))}return En(s,l/2,c/2,t?1:1/Math.max(2*s.r/l,2*s.r/c)),a}return i.size=function(t){return arguments.length?(n=t,i):n},i.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,i):t},i.padding=function(t){return arguments.length?(r=+t,i):r},tn(i,e)},o.layout.tree=function(){var t=o.layout.hierarchy().sort(null).value(null),e=zn,r=[1,1],n=null;function i(i,o){var c=t.call(this,i,o),u=c[0],h=function(t){for(var e,r={A:null,children:[t]},n=[r];null!=(e=n.pop());)for(var i,o=e.children,a=0,s=o.length;af.x&&(f=t),t.depth>p.depth&&(p=t)}));var m=e(d,f)/2-d.x,g=r[0]/(f.x+e(f,d)/2+m),v=r[1]/(p.depth||1);en(u,(function(t){t.x=(t.x+m)*g,t.y=t.depth*v}))}return c}function a(t){var r=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(r.length){!function(t){for(var e,r=0,n=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var o=(r[0].z+r[r.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,r,n){if(r){for(var i,o=t,a=t,s=r,l=o.parent.children[0],c=o.m,u=a.m,h=s.m,d=l.m;s=Dn(s),o=On(o),s&&o;)l=On(l),(a=Dn(a)).a=t,(i=s.z+h-o.z-c+e(s._,o._))>0&&(In(Fn(s,t,n),t,i),c+=i,u+=i),h+=s.m,c+=o.m,d+=l.m,u+=a.m;s&&!Dn(a)&&(a.t=s,a.m+=h-u),o&&!On(l)&&(l.t=o,l.m+=c-d,n=t)}return n}(t,i,t.parent.A||n[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=r[0],t.y=t.depth*r[1]}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(n=null==(r=t)?l:null,i):n?null:r},i.nodeSize=function(t){return arguments.length?(n=null==(r=t)?null:l,i):n?r:null},tn(i,t)},o.layout.cluster=function(){var t=o.layout.hierarchy().sort(null).value(null),e=zn,r=[1,1],n=!1;function i(i,a){var s,l=t.call(this,i,a),c=l[0],u=0;rn(c,(function(t){var r=t.children;r&&r.length?(t.x=function(t){return t.reduce((function(t,e){return t+e.x}),0)/t.length}(r),t.y=function(t){return 1+o.max(t,(function(t){return t.y}))}(r)):(t.x=s?u+=e(t,s):0,t.y=0,s=t)}));var h=Rn(c),d=Pn(c),f=h.x-e(h,d)/2,p=d.x+e(d,h)/2;return rn(c,n?function(t){t.x=(t.x-c.x)*r[0],t.y=(c.y-t.y)*r[1]}:function(t){t.x=(t.x-f)/(p-f)*r[0],t.y=(1-(c.y?t.y/c.y:1))*r[1]}),l}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(n=null==(r=t),i):n?null:r},i.nodeSize=function(t){return arguments.length?(n=null!=(r=t),i):n?r:null},tn(i,t)},o.layout.treemap=function(){var t,e=o.layout.hierarchy(),r=Math.round,n=[1,1],i=null,a=jn,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(t,e){for(var r,n,i=-1,o=t.length;++i0;)s.push(r=c[i-1]),s.area+=r.area,"squarify"!==l||(n=f(s,m))<=d?(c.pop(),d=n):(s.area-=s.pop().area,p(s,m,o,!1),m=Math.min(o.dx,o.dy),s.length=s.area=0,d=1/0);s.length&&(p(s,m,o,!0),s.length=s.area=0),e.forEach(h)}}function d(t){var e=t.children;if(e&&e.length){var r,n=a(t),i=e.slice(),o=[];for(u(i,n.dx*n.dy/t.value),o.area=0;r=i.pop();)o.push(r),o.area+=r.area,null!=r.z&&(p(o,r.z?n.dx:n.dy,n,!i.length),o.length=o.area=0);e.forEach(d)}}function f(t,e){for(var r,n=t.area,i=0,o=1/0,a=-1,s=t.length;++ai&&(i=r));return e*=e,(n*=n)?Math.max(e*i*c/n,n/(e*o*c)):1/0}function p(t,e,n,i){var o,a=-1,s=t.length,l=n.x,c=n.y,u=e?r(t.area/e):0;if(e==n.dx){for((i||u>n.dy)&&(u=n.dy);++an.dx)&&(u=n.dx);++a1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=o.random.normal.apply(o,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=o.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,r=0;r2?qn:Gn,l=n?Vr:Gr;return i=a(t,e,l,r),o=a(e,t,l,_r),s}function s(t){return i(t)}return s.invert=function(t){return o(t)},s.domain=function(e){return arguments.length?(t=e.map(Number),a()):t},s.range=function(t){return arguments.length?(e=t,a()):e},s.rangeRound=function(t){return s.range(t).interpolate(Fr)},s.clamp=function(t){return arguments.length?(n=t,a()):n},s.interpolate=function(t){return arguments.length?(r=t,a()):r},s.ticks=function(e){return Jn(t,e)},s.tickFormat=function(e,r){return d3_scale_linearTickFormat(t,e,r)},s.nice=function(e){return Xn(t,e),a()},s.copy=function(){return Yn(t,e,r,n)},a()}function Zn(t,e){return o.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Xn(t,e){return Vn(t,Hn($n(t,e)[2])),Vn(t,Hn($n(t,e)[2])),t}function $n(t,e){null==e&&(e=10);var r=Bn(t),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),o=e/n*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function Jn(t,e){return o.range.apply(o,$n(t,e))}function Kn(t,e,r,n){function i(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function o(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function a(e){return t(i(e))}return a.invert=function(e){return o(t.invert(e))},a.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((n=e.map(Number)).map(i)),a):n},a.base=function(r){return arguments.length?(e=+r,t.domain(n.map(i)),a):e},a.nice=function(){var e=Vn(n.map(i),r?Math:Qn);return t.domain(e),n=e.map(o),a},a.ticks=function(){var t=Bn(n),a=[],s=t[0],l=t[1],c=Math.floor(i(s)),u=Math.ceil(i(l)),h=e%1?2:e;if(isFinite(u-c)){if(r){for(;c0;d--)a.push(o(c)*d);for(c=0;a[c]l;u--);a=a.slice(c,u)}return a},a.copy=function(){return Kn(t.copy(),e,r,n)},Zn(a,t)}o.scale.linear=function(){return Yn([0,1],[0,1],_r,!1)},o.scale.log=function(){return Kn(o.scale.linear().domain([0,1]),10,!0,[1,10])};var Qn={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function ti(t,e,r){var n=ei(e),i=ei(1/e);function o(e){return t(n(e))}return o.invert=function(e){return i(t.invert(e))},o.domain=function(e){return arguments.length?(t.domain((r=e.map(Number)).map(n)),o):r},o.ticks=function(t){return Jn(r,t)},o.tickFormat=function(t,e){return d3_scale_linearTickFormat(r,t,e)},o.nice=function(t){return o.domain(Xn(r,t))},o.exponent=function(a){return arguments.length?(n=ei(e=a),i=ei(1/e),t.domain(r.map(n)),o):e},o.copy=function(){return ti(t.copy(),e,r)},Zn(o,t)}function ei(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function ri(t,e){var r,n,i;function a(i){return n[((r.get(i)||("range"===e.t?r.set(i,t.push(i)):NaN))-1)%n.length]}function s(e,r){return o.range(t.length).map((function(t){return e+r*t}))}return a.domain=function(n){if(!arguments.length)return t;t=[],r=new A;for(var i,o=-1,s=n.length;++o0?r[n-1]:t[0],nh?0:1;if(c=Lt)return l(c,f)+(s?l(s,1-f):"")+"Z";var p,m,g,v,b,y,x,_,w,k,A,M,T=0,S=0,C=[];if((v=(+a.apply(this,arguments)||0)/2)&&(g=n===di?Math.sqrt(s*s+c*c):+n.apply(this,arguments),f||(S*=-1),c&&(S=It(g/c*Math.sin(v))),s&&(T=It(g/s*Math.sin(v)))),c){b=c*Math.cos(u+S),y=c*Math.sin(u+S),x=c*Math.cos(h-S),_=c*Math.sin(h-S);var E=Math.abs(h-u-2*S)<=Ct?0:1;if(S&&bi(b,y,x,_)===f^E){var L=(u+h)/2;b=c*Math.cos(L),y=c*Math.sin(L),x=_=null}}else b=y=0;if(s){w=s*Math.cos(h-T),k=s*Math.sin(h-T),A=s*Math.cos(u+T),M=s*Math.sin(u+T);var z=Math.abs(u-h+2*T)<=Ct?0:1;if(T&&bi(w,k,A,M)===1-f^z){var O=(u+h)/2;w=s*Math.cos(O),k=s*Math.sin(O),A=M=null}}else w=k=0;if(d>Tt&&(p=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){m=s0?0:1}function yi(t,e,r,n,i){var o=t[0]-e[0],a=t[1]-e[1],s=(i?n:-n)/Math.sqrt(o*o+a*a),l=s*a,c=-s*o,u=t[0]+l,h=t[1]+c,d=e[0]+l,f=e[1]+c,p=(u+d)/2,m=(h+f)/2,g=d-u,v=f-h,b=g*g+v*v,y=r-n,x=u*f-d*h,_=(v<0?-1:1)*Math.sqrt(Math.max(0,y*y*b-x*x)),w=(x*v-g*_)/b,k=(-x*g-v*_)/b,A=(x*v+g*_)/b,M=(-x*g+v*_)/b,T=w-p,S=k-m,C=A-p,E=M-m;return T*T+S*S>C*C+E*E&&(w=A,k=M),[[w-l,k-c],[w*r/y,k*r/y]]}function xi(){return!0}function _i(t){var e=Te,r=Se,n=xi,i=ki,o=i.key,a=.7;function s(o){var s,l=[],c=[],u=-1,h=o.length,d=pe(e),f=pe(r);function p(){l.push("M",i(t(c),a))}for(;++u1&&i.push("H",n[0]),i.join("")},"step-before":Mi,"step-after":Ti,basis:Ei,"basis-open":function(t){if(t.length<4)return ki(t);for(var e,r=[],n=-1,i=t.length,o=[0],a=[0];++n<3;)e=t[n],o.push(e[0]),a.push(e[1]);for(r.push(Li(Di,o)+","+Li(Di,a)),--n;++n9&&(i=3*e/Math.sqrt(i),a[s]=i*r,a[s+1]=i*n);for(s=-1;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}(t))}});function ki(t){return t.length>1?t.join("L"):t+"Z"}function Ai(t){return t.join("L")+"Z"}function Mi(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1){s=e[1],o=t[l],l++,n+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var c=2;cCt)+",1 "+e}function l(t,e,r,n){return"Q 0,0 "+n}return o.radius=function(t){return arguments.length?(r=pe(t),o):r},o.source=function(e){return arguments.length?(t=pe(e),o):t},o.target=function(t){return arguments.length?(e=pe(t),o):e},o.startAngle=function(t){return arguments.length?(n=pe(t),o):n},o.endAngle=function(t){return arguments.length?(i=pe(t),o):i},o},o.svg.diagonal=function(){var t=ji,e=Ni,r=Ui;function n(n,i){var o=t.call(this,n,i),a=e.call(this,n,i),s=(o.y+a.y)/2,l=[o,{x:o.x,y:s},{x:a.x,y:s},a];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(e){return arguments.length?(t=pe(e),n):t},n.target=function(t){return arguments.length?(e=pe(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},o.svg.diagonal.radial=function(){var t=o.svg.diagonal(),e=Ui,r=t.projection;return t.projection=function(t){return arguments.length?r(function(t){return function(){var e=t.apply(this,arguments),r=e[0],n=e[1]-zt;return[r*Math.cos(n),r*Math.sin(n)]}}(e=t)):e},t},o.svg.symbol=function(){var t=Vi,e=Gi;function r(r,n){return(Wi.get(t.call(this,r,n))||Hi)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=pe(e),r):t},r.size=function(t){return arguments.length?(e=pe(t),r):e},r};var Wi=o.map({circle:Hi,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Yi)),r=e*Yi;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/qi),r=e*qi/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/qi),r=e*qi/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});o.svg.symbolTypes=Wi.keys();var qi=Math.sqrt(3),Yi=Math.tan(30*Ot);X.transition=function(t){for(var e,r,n=Ji||++to,i=no(t),o=[],a=Ki||{time:Date.now(),ease:Lr,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--d].call(t,a);if(o>=1)return h.event&&h.event.end.call(t,t.__data__,e),--u.count?delete u[n]:delete t[r],1}h||(o=i.time,a=we((function(t){var e=h.delay;if(a.t=e+o,e<=t)return d(t-e);a.c=d}),0,o),h=u[n]={tween:new A,time:o,timer:a,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++u.count)}Qi.call=X.call,Qi.empty=X.empty,Qi.node=X.node,Qi.size=X.size,o.transition=function(t,e){return t&&t.transition?Ji?t.transition(e):t:o.selection().transition(t)},o.transition.prototype=Qi,Qi.select=function(t){var e,r,n,i=this.id,o=this.namespace,a=[];t=$(t);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",a[1]-a[0])}function m(t){t.select(".extent").attr("y",s[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function g(){var h,g,v=this,b=o.select(o.event.target),y=r.of(v,arguments),x=o.select(v),_=b.datum(),w=!/^(n|s)$/.test(_)&&n,k=!/^(e|w)$/.test(_)&&i,A=b.classed("extent"),M=wt(v),T=o.mouse(v),S=o.select(u(v)).on("keydown.brush",(function(){32==o.event.keyCode&&(A||(h=null,T[0]-=a[1],T[1]-=s[1],A=2),B())})).on("keyup.brush",(function(){32==o.event.keyCode&&2==A&&(T[0]+=a[1],T[1]+=s[1],A=0,B())}));if(o.event.changedTouches?S.on("touchmove.brush",L).on("touchend.brush",O):S.on("mousemove.brush",L).on("mouseup.brush",O),x.interrupt().selectAll("*").interrupt(),A)T[0]=a[0]-T[0],T[1]=s[0]-T[1];else if(_){var C=+/w$/.test(_),E=+/^n/.test(_);g=[a[1-C]-T[0],s[1-E]-T[1]],T[0]=a[C],T[1]=s[E]}else o.event.altKey&&(h=T.slice());function L(){var t=o.mouse(v),e=!1;g&&(t[0]+=g[0],t[1]+=g[1]),A||(o.event.altKey?(h||(h=[(a[0]+a[1])/2,(s[0]+s[1])/2]),T[0]=a[+(t[0]{"use strict";t.exports=r(48777)},48777:(t,e,r)=>{"use strict";var n=r(72478),i=r(90897),o=r(94698),a=r(25359),s=r(9994),l=r(7999),c=r(97e3),u=r(23754),h=r(22366),d=r(54387);function f(t,e){for(var r=e[0],n=e[1],o=1/(e[2]-r),a=1/(e[3]-n),s=new Array(t.length),l=0,c=t.length/2;l>>1;e.dtype||(e.dtype="array"),"string"==typeof e.dtype?p=new(h(e.dtype))(g):e.dtype&&(p=e.dtype,Array.isArray(p)&&(p.length=g));for(var v=0;vr||s>1073741824){for(var d=0;dr+i||T>n+i||S=L||a===s)){var l=b[o];void 0===s&&(s=l.length);for(var c=a;c=g&&h<=w&&d>=v&&d<=k&&z.push(u)}var f=y[o],p=f[4*a+0],m=f[4*a+1],x=f[4*a+2],_=f[4*a+3],A=function(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}(f,a+1),C=.5*i,O=o+1;e(r,n,C,O,p,m||x||_||A),e(r,n+C,C,O,m,x||_||A),e(r+C,n,C,O,x,_||A),e(r+C,n+C,C,O,_,A)}}(0,0,1,0,0,1),z},p;function C(t,e,r){for(var n=1,i=.5,o=.5,a=.5,s=0;s{t.exports=function(t){var e=0,r=0,n=0,i=0;return t.map((function(t){var o=(t=t.slice())[0],a=o.toUpperCase();if(o!=a)switch(t[0]=a,o){case"a":t[6]+=n,t[7]+=i;break;case"v":t[1]+=i;break;case"h":t[1]+=n;break;default:for(var s=1;s{"use strict";t.exports=function(t,e){if(!t||null==t.length)throw Error("Argument should be an array");e=null==e?1:Math.floor(e);for(var r=Array(2*e),n=0;ni&&(i=t[a]),t[a]{"use strict";t.exports=function(t,e,r){if("function"==typeof Array.prototype.findIndex)return t.findIndex(e,r);if("function"!=typeof e)throw new TypeError("predicate must be a function");var n=Object(t),i=n.length;if(0===i)return-1;for(var o=0;o{"use strict";var n=r(25359);t.exports=function(t,e,r){if(!t||null==t.length)throw Error("Argument should be an array");null==e&&(e=1),null==r&&(r=n(t,e));for(var i=0;i{"use strict";var n=r(39807);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){for(var r=0;r1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i{"use strict";var n=r(39807);function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;et.length)&&(r=t.length),t.substring(r-e.length,r)===e}var y="",x="",_="",w="",k={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function A(t){var e=Object.keys(t),r=Object.create(Object.getPrototypeOf(t));return e.forEach((function(e){r[e]=t[e]})),Object.defineProperty(r,"message",{value:t.message}),r}function M(t){return g(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var T=function(t,e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(T,t);var r,i,s,u,h=(r=T,i=d(),function(){var t,e=p(r);if(i){var n=p(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return l(this,t)});function T(t){var e;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,T),"object"!==m(t)||null===t)throw new v("options","Object",t);var r=t.message,i=t.operator,o=t.stackStartFn,a=t.actual,s=t.expected,u=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)e=h.call(this,String(r));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(y="",x="",w="",_=""):(y="",x="",w="",_="")),"object"===m(a)&&null!==a&&"object"===m(s)&&null!==s&&"stack"in a&&a instanceof Error&&"stack"in s&&s instanceof Error&&(a=A(a),s=A(s)),"deepStrictEqual"===i||"strictEqual"===i)e=h.call(this,function(t,e,r){var i="",o="",a=0,s="",l=!1,c=M(t),u=c.split("\n"),h=M(e).split("\n"),d=0,f="";if("strictEqual"===r&&"object"===m(t)&&"object"===m(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===u.length&&1===h.length&&u[0]!==h[0]){var p=u[0].length+h[0].length;if(p<=10){if(!("object"===m(t)&&null!==t||"object"===m(e)&&null!==e||0===t&&0===e))return"".concat(k[r],"\n\n")+"".concat(u[0]," !== ").concat(h[0],"\n")}else if("strictEqualObject"!==r&&p<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;u[0][d]===h[0][d];)d++;d>2&&(f="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var r=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+t.substring(0,r-t.length)}(" ",d),"^"),d=0)}}for(var g=u[u.length-1],v=h[h.length-1];g===v&&(d++<2?s="\n ".concat(g).concat(s):i=g,u.pop(),h.pop(),0!==u.length&&0!==h.length);)g=u[u.length-1],v=h[h.length-1];var A=Math.max(u.length,h.length);if(0===A){var T=c.split("\n");if(T.length>30)for(T[26]="".concat(y,"...").concat(w);T.length>27;)T.pop();return"".concat(k.notIdentical,"\n\n").concat(T.join("\n"),"\n")}d>3&&(s="\n".concat(y,"...").concat(w).concat(s),l=!0),""!==i&&(s="\n ".concat(i).concat(s),i="");var S=0,C=k[r]+"\n".concat(x,"+ actual").concat(w," ").concat(_,"- expected").concat(w),E=" ".concat(y,"...").concat(w," Lines skipped");for(d=0;d1&&d>2&&(L>4?(o+="\n".concat(y,"...").concat(w),l=!0):L>3&&(o+="\n ".concat(h[d-2]),S++),o+="\n ".concat(h[d-1]),S++),a=d,i+="\n".concat(_,"-").concat(w," ").concat(h[d]),S++;else if(h.length1&&d>2&&(L>4?(o+="\n".concat(y,"...").concat(w),l=!0):L>3&&(o+="\n ".concat(u[d-2]),S++),o+="\n ".concat(u[d-1]),S++),a=d,o+="\n".concat(x,"+").concat(w," ").concat(u[d]),S++;else{var z=h[d],O=u[d],D=O!==z&&(!b(O,",")||O.slice(0,-1)!==z);D&&b(z,",")&&z.slice(0,-1)===O&&(D=!1,O+=","),D?(L>1&&d>2&&(L>4?(o+="\n".concat(y,"...").concat(w),l=!0):L>3&&(o+="\n ".concat(u[d-2]),S++),o+="\n ".concat(u[d-1]),S++),a=d,o+="\n".concat(x,"+").concat(w," ").concat(O),i+="\n".concat(_,"-").concat(w," ").concat(z),S+=2):(o+=i,i="",1!==L&&0!==d||(o+="\n ".concat(O),S++))}if(S>20&&d30)for(f[26]="".concat(y,"...").concat(w);f.length>27;)f.pop();e=1===f.length?h.call(this,"".concat(d," ").concat(f[0])):h.call(this,"".concat(d,"\n\n").concat(f.join("\n"),"\n"))}else{var p=M(a),g="",S=k[i];"notDeepEqual"===i||"notEqual"===i?(p="".concat(k[i],"\n\n").concat(p)).length>1024&&(p="".concat(p.slice(0,1021),"...")):(g="".concat(M(s)),p.length>512&&(p="".concat(p.slice(0,509),"...")),g.length>512&&(g="".concat(g.slice(0,509),"...")),"deepEqual"===i||"equal"===i?p="".concat(S,"\n\n").concat(p,"\n\nshould equal\n\n"):g=" ".concat(i," ").concat(g)),e=h.call(this,"".concat(p).concat(g))}return Error.stackTraceLimit=u,e.generatedMessage=!r,Object.defineProperty(c(e),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),e.code="ERR_ASSERTION",e.actual=a,e.expected=s,e.operator=i,Error.captureStackTrace&&Error.captureStackTrace(c(e),o),e.stack,e.name="AssertionError",l(e)}return s=T,(u=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:e,value:function(t,e){return g(this,o(o({},e),{},{customInspect:!1,depth:0}))}}])&&a(s.prototype,u),Object.defineProperty(s,"prototype",{writable:!1}),T}(u(Error),g.custom);t.exports=T},81146:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},o(t)}var a,s,l={};function c(t,e,r){r||(r=Error);var a=function(r){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&i(t,e)}(u,r);var a,s,l,c=(s=u,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=o(s);if(l){var r=o(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(r,n,i){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),o=c.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i)),o.code=t,o}return a=u,Object.defineProperty(a,"prototype",{writable:!1}),a}(r);l[t]=a}function u(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",(function(t,e,i){var o,s,l,c,h;if(void 0===a&&(a=r(34961)),a("string"==typeof t,"'name' must be a string"),"string"==typeof e&&(s="not ",e.substr(0,4)===s)?(o="must not be",e=e.replace(/^not /,"")):o="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-9,r)===e}(t," argument"))l="The ".concat(t," ").concat(o," ").concat(u(e,"type"));else{var d=("number"!=typeof h&&(h=0),h+1>(c=t).length||-1===c.indexOf(".",h)?"argument":"property");l='The "'.concat(t,'" ').concat(d," ").concat(o," ").concat(u(e,"type"))}return l+". Received type ".concat(n(i))}),TypeError),c("ERR_INVALID_ARG_VALUE",(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=r(11276));var i=s.inspect(e);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),c("ERR_INVALID_RETURN_VALUE",(function(t,e,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(t,' to be returned from the "').concat(e,'"')+" function but got ".concat(i,".")}),TypeError),c("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),n=0;n0,"At least one arg needs to be specified");var i="The ",o=e.length;switch(e=e.map((function(t){return'"'.concat(t,'"')})),o){case 1:i+="".concat(e[0]," argument");break;case 2:i+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:i+=e.slice(0,o-1).join(", "),i+=", and ".concat(e[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),t.exports.codes=l},88884:(t,e,r)=>{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r10)return!0;for(var e=0;e57)return!0}return 10===t.length&&t>=Math.pow(2,32)}function D(t){return Object.keys(t).filter(O).concat(u(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}function I(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i{"use strict";r.r(e),r.d(e,{decode:()=>s,encode:()=>a});for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="undefined"==typeof Uint8Array?[]:new Uint8Array(256),o=0;o<64;o++)i[n.charCodeAt(o)]=o;var a=function(t){var e,r=new Uint8Array(t),i=r.length,o="";for(e=0;e>2],o+=n[(3&r[e])<<4|r[e+1]>>4],o+=n[(15&r[e+1])<<2|r[e+2]>>6],o+=n[63&r[e+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},s=function(t){var e,r,n,o,a,s=.75*t.length,l=t.length,c=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var u=new ArrayBuffer(s),h=new Uint8Array(u);for(e=0;e>4,h[c++]=(15&n)<<4|o>>2,h[c++]=(3&o)<<6|63&a;return u}},17507:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=s(t),a=o[0],l=o[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,a,l)),u=0,h=l>0?a-4:a;for(r=0;r>16&255,c[u++]=e>>8&255,c[u++]=255&e;return 2===l&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[u++]=255&e),1===l&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[u++]=e>>8&255,c[u++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,n){for(var i,o,a=[],s=e;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},72478:t=>{"use strict";function e(t,e,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)>=0?(o=a,i=a-1):n=a+1}return o}function r(t,e,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)>0?(o=a,i=a-1):n=a+1}return o}function n(t,e,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)<0?(o=a,n=a+1):i=a-1}return o}function i(t,e,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)<=0?(o=a,n=a+1):i=a-1}return o}function o(t,e,r,n,i){for(;n<=i;){var o=n+i>>>1,a=t[o],s=void 0!==r?r(a,e):a-e;if(0===s)return o;s<=0?n=o+1:i=o-1}return-1}function a(t,e,r,n,i,o){return"function"==typeof r?o(t,e,r,void 0===n?0:0|n,void 0===i?t.length-1:0|i):o(t,e,void 0,void 0===r?0:0|r,void 0===n?t.length-1:0|n)}t.exports={ge:function(t,r,n,i,o){return a(t,r,n,i,o,e)},gt:function(t,e,n,i,o){return a(t,e,n,i,o,r)},lt:function(t,e,r,i,o){return a(t,e,r,i,o,n)},le:function(t,e,r,n,o){return a(t,e,r,n,o,i)},eq:function(t,e,r,n,i){return a(t,e,r,n,i,o)}}},88828:(t,e)=>{"use strict";function r(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},25875:t=>{"use strict";t.exports=function(t,n){n||(n={});var i,o,a,s,l,c,u,h,d,f,p,m=null==n.cutoff?.25:n.cutoff,g=null==n.radius?8:n.radius,v=n.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!n.width||!n.height)throw Error("For raw data width and height should be provided by options");i=n.width,o=n.height,s=t,c=n.stride?n.stride:Math.floor(t.length/i/o)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(u=(h=t).getContext("2d"),i=h.width,o=h.height,s=(d=u.getImageData(0,0,i,o)).data,c=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(u=t,i=(h=t.canvas).width,o=h.height,s=(d=u.getImageData(0,0,i,o)).data,c=4):window.ImageData&&t instanceof window.ImageData&&(d=t,i=t.width,o=t.height,s=d.data,c=4);if(a=Math.max(i,o),window.Uint8ClampedArray&&s instanceof window.Uint8ClampedArray||window.Uint8Array&&s instanceof window.Uint8Array)for(l=s,s=Array(i*o),f=0,p=Math.floor(l.length/c);f{"use strict";const n=r(17507),i=r(23778),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=l,e.IS=50;const a=2147483647;function s(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return c(t,e,r)}function c(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|m(t,e);let n=s(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(X(t,Uint8Array)){const e=new Uint8Array(t);return f(e.buffer,e.byteOffset,e.byteLength)}return d(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(X(t,ArrayBuffer)||t&&X(t.buffer,ArrayBuffer))return f(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(X(t,SharedArrayBuffer)||t&&X(t.buffer,SharedArrayBuffer)))return f(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return l.from(n,e,r);const i=function(t){if(l.isBuffer(t)){const e=0|p(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||$(t.length)?s(0):d(t):"Buffer"===t.type&&Array.isArray(t.data)?d(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return u(t),s(t<0?0:0|p(t))}function d(t){const e=t.length<0?0:0|p(t.length),r=s(e);for(let n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function m(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||X(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(i)return n?-1:q(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return C(this,e,r);case"latin1":case"binary":return E(this,e,r);case"base64":return M(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),$(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=l.from(e,n)),l.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){let o,a=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let n=-1;for(o=r;os&&(r=s-l),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=e.length;let a;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function M(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+a<=r){let r,n,s,l;switch(a){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(l=(31&e)<<6|63&r,l>127&&(o=l));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(l=(15&e)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:r=t[i+1],n=t[i+2],s=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(l=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&s,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(t){const e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nn.length?(l.isBuffer(e)||(e=l.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!l.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;er&&(t+=" ... "),""},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(t,e,r,n,i){if(X(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0);const s=Math.min(o,a),c=this.slice(n,i),u=t.slice(e,r);for(let t=0;t>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return x(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":case"latin1":case"binary":return w(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function C(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;in)&&(r=n);let i="";for(let n=e;nr)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,r,n,i,o){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function I(t,e,r,n,i){G(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function F(t,e,r,n,i){G(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function R(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(t,e,r,n,o){return e=+e,r>>>=0,o||R(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function j(t,e,r,n,o){return e=+e,r>>>=0,o||R(t,0,r,8),i.write(t,e,r,n,52,8),r+8}l.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],i=1,o=0;for(;++o>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readBigUInt64LE=K((function(t){V(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*e)),n},l.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},l.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readBigInt64LE=K((function(t){V(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<>>=0,e||O(t,4,this.length),i.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||D(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,n||D(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigUInt64LE=K((function(t,e=0){return I(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=K((function(t,e=0){return F(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);D(this,t,e,r,n-1,-n)}let i=0,o=1,a=0;for(this[e]=255&t;++i>>=0,!n){const n=Math.pow(2,8*r-1);D(this,t,e,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+r},l.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigInt64LE=K((function(t,e=0){return I(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=K((function(t,e=0){return F(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},l.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},l.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},l.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},l.prototype.copy=function(t,e,r,n){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function G(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new N.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){V(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||H(e,t.length-(r+1))}(n,i,o)}function V(t,e){if("number"!=typeof t)throw new N.ERR_INVALID_ARG_TYPE(e,"number",t)}function H(t,e,r){if(Math.floor(t)!==t)throw V(t,r),new N.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new N.ERR_BUFFER_OUT_OF_BOUNDS;throw new N.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}B("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),B("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),B("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=U(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=U(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function q(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let a=0;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Y(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Z(t,e,r,n){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function X(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function $(t){return t!=t}const J=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function K(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},24310:(t,e,r)=>{"use strict";var n=r(59412),i=r(61398),o=i(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&o(t,".prototype.")>-1?i(r):r}},61398:(t,e,r)=>{"use strict";var n=r(35366),i=r(59412),o=r(86928),a=r(48744),s=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),c=i("%Reflect.apply%",!0)||n.call(l,s),u=r(38232),h=i("%Math.max%");t.exports=function(t){if("function"!=typeof t)throw new a("a function is required");var e=c(n,l,arguments);return o(e,1+h(0,t.length-(arguments.length-1)),!0)};var d=function(){return c(n,s,arguments)};u?u(t.exports,"apply",{value:d}):t.exports.apply=d},90897:t=>{t.exports=function(t,e,r){return er?r:t:te?e:t}},92173:(t,e,r)=>{"use strict";var n=r(90897);function i(t,e){null==e&&(e=!0);var r=t[0],i=t[1],o=t[2],a=t[3];return null==a&&(a=e?1:255),e&&(r*=255,i*=255,o*=255,a*=255),16777216*(r=255&n(r,0,255))+((i=255&n(i,0,255))<<16)+((o=255&n(o,0,255))<<8)+(255&n(a,0,255))}t.exports=i,t.exports.to=i,t.exports.from=function(t,e){var r=(t=+t)>>>24,n=(16711680&t)>>>16,i=(65280&t)>>>8,o=255&t;return!1===e?[r,n,i,o]:[r/255,n/255,i/255,o/255]}},22319:t=>{"use strict";t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},34463:(t,e,r)=>{"use strict";var n=r(31562),i=r(90897),o=r(22366);t.exports=function(t,e){"float"!==e&&e||(e="array"),"uint"===e&&(e="uint8"),"uint_clamped"===e&&(e="uint8_clamped");var r=new(o(e))(4),a="uint8"!==e&&"uint8_clamped"!==e;return t.length&&"string"!=typeof t||((t=n(t))[0]/=255,t[1]/=255,t[2]/=255),function(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||!!(Array.isArray(t)&&(t[0]>1||0===t[0])&&(t[1]>1||0===t[1])&&(t[2]>1||0===t[2])&&(!t[3]||t[3]>1))}(t)?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:255,a&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(a?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:1):(r[0]=i(Math.floor(255*t[0]),0,255),r[1]=i(Math.floor(255*t[1]),0,255),r[2]=i(Math.floor(255*t[2]),0,255),r[3]=null==t[3]?255:i(Math.floor(255*t[3]),0,255)),r)}},31562:(t,e,r)=>{"use strict";var n=r(4026),i=r(31497),o=r(90897);t.exports=function(t){var e,r=n(t);return r.space?((e=Array(3))[0]=o(r.values[0],0,255),e[1]=o(r.values[1],0,255),e[2]=o(r.values[2],0,255),"h"===r.space[0]&&(e=i.rgb(e)),e.push(o(r.alpha,0,1)),e):[]}},31497:(t,e,r)=>{"use strict";var n=r(65837);t.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e,r,n,i,o,a=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[o=255*l,o,o];e=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(n=a+1/3*-(c-1))<0?n++:n>1&&n--,o=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[c]=255*o;return i}},n.hsl=function(t){var e,r,n=t[0]/255,i=t[1]/255,o=t[2]/255,a=Math.min(n,i,o),s=Math.max(n,i,o),l=s-a;return s===a?e=0:n===s?e=(i-o)/l:i===s?e=2+(o-n)/l:o===s&&(e=4+(n-i)/l),(e=Math.min(60*e,360))<0&&(e+=360),r=(a+s)/2,[e,100*(s===a?0:r<=.5?l/(s+a):l/(2-s-a)),100*r]}},65837:t=>{"use strict";t.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},86643:()=>{!function(){"use strict";if("undefined"!=typeof document&&!("adoptedStyleSheets"in document)){var t="ShadyCSS"in window&&!ShadyCSS.nativeShadow,e=document.implementation.createHTMLDocument(""),r=new WeakMap,n="object"==typeof DOMException?Error:DOMException,i=Object.defineProperty,o=Array.prototype.forEach,a=/@import.+?;?$/gm,s=CSSStyleSheet.prototype;s.replace=function(){return Promise.reject(new n("Can't call replace on non-constructed CSSStyleSheets."))},s.replaceSync=function(){throw new n("Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.")};var l=new WeakMap,c=new WeakMap,u=new WeakMap,h=new WeakMap,d=S.prototype;d.replace=function(t){try{return this.replaceSync(t),Promise.resolve(this)}catch(t){return Promise.reject(t)}},d.replaceSync=function(t){if(T(this),"string"==typeof t){var e=this;l.get(e).textContent=function(t){var e=t.replace(a,"");return e!==t&&console.warn("@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418"),e.trim()}(t),h.set(e,[]),c.get(e).forEach((function(t){t.isConnected()&&M(e,A(e,t))}))}},i(d,"cssRules",{configurable:!0,enumerable:!0,get:function(){return T(this),l.get(this).sheet.cssRules}}),i(d,"media",{configurable:!0,enumerable:!0,get:function(){return T(this),l.get(this).sheet.media}}),["addRule","deleteRule","insertRule","removeRule"].forEach((function(t){d[t]=function(){var e=this;T(e);var r=arguments;h.get(e).push({method:t,args:r}),c.get(e).forEach((function(n){if(n.isConnected()){var i=A(e,n).sheet;i[t].apply(i,r)}}));var n=l.get(e).sheet;return n[t].apply(n,r)}})),i(S,Symbol.hasInstance,{configurable:!0,value:w});var f={childList:!0,subtree:!0},p=new WeakMap,m=new WeakMap,g=new WeakMap,v=new WeakMap;if(D.prototype={isConnected:function(){var t=m.get(this);return t instanceof Document?"loading"!==t.readyState:function(t){return"isConnected"in t?t.isConnected:document.contains(t)}(t.host)},connect:function(){var t=z(this);v.get(this).observe(t,f),g.get(this).length>0&&O(this),L(t,(function(t){C(t).connect()}))},disconnect:function(){v.get(this).disconnect()},update:function(t){var e=this,r=m.get(e)===document?"Document":"ShadowRoot";if(!Array.isArray(t))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+r+": Iterator getter is not callable.");if(!t.every(w))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+r+": Failed to convert value to 'CSSStyleSheet'");if(t.some(k))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+r+": Can't adopt non-constructed stylesheets");e.sheets=t;var n,i,o=g.get(e),a=(n=t).filter((function(t,e){return n.indexOf(t)===e}));(i=a,o.filter((function(t){return-1===i.indexOf(t)}))).forEach((function(t){var r;(r=A(t,e)).parentNode.removeChild(r),function(t,e){u.get(t).delete(e),c.set(t,c.get(t).filter((function(t){return t!==e})))}(t,e)})),g.set(e,a),e.isConnected()&&a.length>0&&O(e)}},window.CSSStyleSheet=S,E(Document),"ShadowRoot"in window){E(ShadowRoot);var b=Element.prototype,y=b.attachShadow;b.attachShadow=function(t){var e=y.call(this,t);return"closed"===t.mode&&r.set(this,e),e}}var x=C(document);x.isConnected()?x.connect():document.addEventListener("DOMContentLoaded",x.connect.bind(x))}function _(t){return t.shadowRoot||r.get(t)}function w(t){return"object"==typeof t&&(d.isPrototypeOf(t)||s.isPrototypeOf(t))}function k(t){return"object"==typeof t&&s.isPrototypeOf(t)}function A(t,e){return u.get(t).get(e)}function M(t,e){requestAnimationFrame((function(){e.textContent=l.get(t).textContent,h.get(t).forEach((function(t){return e.sheet[t.method].apply(e.sheet,t.args)}))}))}function T(t){if(!l.has(t))throw new TypeError("Illegal invocation")}function S(){var t=this,r=document.createElement("style");e.body.appendChild(r),l.set(t,r),c.set(t,[]),u.set(t,new WeakMap),h.set(t,[])}function C(t){var e=p.get(t);return e||(e=new D(t),p.set(t,e)),e}function E(t){i(t.prototype,"adoptedStyleSheets",{configurable:!0,enumerable:!0,get:function(){return C(this).sheets},set:function(t){C(this).update(t)}})}function L(t,e){for(var r=document.createNodeIterator(t,NodeFilter.SHOW_ELEMENT,(function(t){return _(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),null,!1),n=void 0;n=r.nextNode();)e(_(n))}function z(t){var e=m.get(t);return e instanceof Document?e.body:e}function O(t){var e=document.createDocumentFragment(),r=g.get(t),n=v.get(t),i=z(t);n.disconnect(),r.forEach((function(r){e.appendChild(A(r,t)||function(t,e){var r=document.createElement("style");return u.get(t).set(e,r),c.get(t).push(e),r}(r,t))})),i.insertBefore(e,null),n.observe(i,f),r.forEach((function(e){M(e,A(e,t))}))}function D(e){var r=this;r.sheets=[],m.set(r,e),g.set(r,[]),v.set(r,new MutationObserver((function(e,n){document?e.forEach((function(e){t||o.call(e.addedNodes,(function(t){t instanceof Element&&L(t,(function(t){C(t).connect()}))})),o.call(e.removedNodes,(function(e){e instanceof Element&&(function(t,e){return e instanceof HTMLStyleElement&&g.get(t).some((function(e){return A(e,t)}))}(r,e)&&O(r),t||L(e,(function(t){C(t).disconnect()})))}))})):n.disconnect()})))}}()},82393:(t,e,r)=>{"use strict";t.exports={parse:r(60062),stringify:r(40288)}},15305:(t,e,r)=>{"use strict";var n=r(23648);t.exports={isSize:function(t){return/^[\d\.]/.test(t)||-1!==t.indexOf("/")||-1!==n.indexOf(t)}}},60062:(t,e,r)=>{"use strict";var n=r(51183),i=r(54324),o=r(94316),a=r(99803),s=r(87486),l=r(2362),c=r(46492),u=r(15305).isSize;t.exports=d;var h=d.cache={};function d(t){if("string"!=typeof t)throw new Error("Font argument must be a string.");if(h[t])return h[t];if(""===t)throw new Error("Cannot parse an empty string.");if(-1!==o.indexOf(t))return h[t]={system:t};for(var e,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},d=c(t,/\s+/);e=d.shift();){if(-1!==i.indexOf(e))return["style","variant","weight","stretch"].forEach((function(t){r[t]=e})),h[t]=r;if(-1===s.indexOf(e))if("normal"!==e&&"small-caps"!==e)if(-1===l.indexOf(e)){if(-1===a.indexOf(e)){if(u(e)){var p=c(e,"/");if(r.size=p[0],null!=p[1]?r.lineHeight=f(p[1]):"/"===d[0]&&(d.shift(),r.lineHeight=f(d.shift())),!d.length)throw new Error("Missing required font-family.");return r.family=c(d.join(" "),/\s*,\s*/).map(n),h[t]=r}throw new Error("Unknown or unsupported font token: "+e)}r.weight=e}else r.stretch=e;else r.variant=e;else r.style=e}throw new Error("Missing required font-size.")}function f(t){var e=parseFloat(t);return e.toString()===t?e:t}},40288:(t,e,r)=>{"use strict";var n=r(9994),i=r(15305).isSize,o=p(r(54324)),a=p(r(94316)),s=p(r(99803)),l=p(r(87486)),c=p(r(2362)),u={normal:1,"small-caps":1},h={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},d="serif";function f(t,e){if(t&&!e[t]&&!o[t])throw Error("Unknown keyword `"+t+"`");return t}function p(t){for(var e={},r=0;r{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",n=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,n,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},21906:t=>{"use strict";t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},78706:t=>{"use strict";t.exports=function(t){return t[1]}},39683:(t,e,r)=>{"use strict";var n,i=r(59738),o=r(10040),a=r(4216),s=r(15498),l=r(54863),c=r(30829),u=Function.prototype.bind,h=Object.defineProperty,d=Object.prototype.hasOwnProperty;n=function(t,e,r){var n,i=o(e)&&a(e.value);return delete(n=s(e)).writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&d.call(this,t)?i:(e.value=u.call(i,r.resolveContext?r.resolveContext(this):this),h(this,t,e),this[t])},n},t.exports=function(t){var e=l(arguments[1]);return i(e.resolveContext)&&a(e.resolveContext),c(t,(function(t,r){return n(r,t,e)}))}},86142:(t,e,r)=>{"use strict";var n=r(59738),i=r(15034),o=r(18021),a=r(54863),s=r(79813);(t.exports=function(t,e){var r,i,l,c,u;return arguments.length<2||"string"!=typeof t?(c=e,e=t,t=null):c=arguments[2],n(t)?(r=s.call(t,"c"),i=s.call(t,"e"),l=s.call(t,"w")):(r=l=!0,i=!1),u={value:e,configurable:r,enumerable:i,writable:l},c?o(a(c),u):u}).gs=function(t,e,r){var l,c,u,h;return"string"!=typeof t?(u=r,r=e,e=t,t=null):u=arguments[3],n(e)?i(e)?n(r)?i(r)||(u=r,r=void 0):r=void 0:(u=e,e=r=void 0):e=void 0,n(t)?(l=s.call(t,"c"),c=s.call(t,"e")):(l=!0,c=!1),h={get:e,set:r,configurable:l,enumerable:c},u?o(a(u),h):h}},31830:(t,e,r)=>{"use strict";function n(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}r.d(e,{GP:()=>d,OE:()=>m});var i,o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a(t){if(!(e=o.exec(t)))throw new Error("invalid format: "+t);var e;return new s({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function s(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function l(t,e){var r=n(t,e);if(!r)return t+"";var i=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}a.prototype=s.prototype,s.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const c={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return l(100*t,e)},r:l,s:function(t,e){var r=n(t,e);if(!r)return t+"";var o=r[0],a=r[1],s=a-(i=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,l=o.length;return s===l?o:s>l?o+new Array(s-l+1).join("0"):s>0?o.slice(0,s)+"."+o.slice(s):"0."+new Array(1-s).join("0")+n(t,Math.max(0,e+s-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function u(t){return t}var h,d,f=Array.prototype.map,p=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function m(t){var e,r,o=void 0===t.grouping||void 0===t.thousands?u:(e=f.call(t.grouping,Number),r=t.thousands+"",function(t,n){for(var i=t.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(t.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[a=(a+1)%e.length];return o.reverse().join(r)}),s=void 0===t.currency?"":t.currency[0]+"",l=void 0===t.currency?"":t.currency[1]+"",h=void 0===t.decimal?".":t.decimal+"",d=void 0===t.numerals?u:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(f.call(t.numerals,String)),m=void 0===t.percent?"%":t.percent+"",g=void 0===t.minus?"-":t.minus+"",v=void 0===t.nan?"NaN":t.nan+"";function b(t){var e=(t=a(t)).fill,r=t.align,n=t.sign,u=t.symbol,f=t.zero,b=t.width,y=t.comma,x=t.precision,_=t.trim,w=t.type;"n"===w?(y=!0,w="g"):c[w]||(void 0===x&&(x=12),_=!0,w="g"),(f||"0"===e&&"="===r)&&(f=!0,e="0",r="=");var k="$"===u?s:"#"===u&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",A="$"===u?l:/[%p]/.test(w)?m:"",M=c[w],T=/[defgprs%]/.test(w);function S(t){var a,s,l,c=k,u=A;if("c"===w)u=M(t)+u,t="";else{var m=(t=+t)<0||1/t<0;if(t=isNaN(t)?v:M(Math.abs(t),x),_&&(t=function(t){t:for(var e,r=t.length,n=1,i=-1;n0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),m&&0==+t&&"+"!==n&&(m=!1),c=(m?"("===n?n:g:"-"===n||"("===n?"":n)+c,u=("s"===w?p[8+i/3]:"")+u+(m&&"("===n?")":""),T)for(a=-1,s=t.length;++a(l=t.charCodeAt(a))||l>57){u=(46===l?h+t.slice(a+1):t.slice(a))+u,t=t.slice(0,a);break}}y&&!f&&(t=o(t,1/0));var S=c.length+t.length+u.length,C=S>1)+c+t+u+C.slice(S);break;default:t=C+c+t+u}return d(t)}return x=void 0===x?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x)),S.toString=function(){return t+""},S}return{format:b,formatPrefix:function(t,e){var r,i=b(((t=a(t)).type="f",t)),o=3*Math.max(-8,Math.min(8,Math.floor((r=e,((r=n(Math.abs(r)))?r[1]:NaN)/3)))),s=Math.pow(10,-o),l=p[8+o/3];return function(t){return i(s*t)+l}}}}h=m({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),d=h.format,h.formatPrefix},79969:(t,e,r)=>{"use strict";r.d(e,{DC:()=>p,de:()=>d,aL:()=>m});var n=r(64772),i=r(79896),o=r(61396),a=r(67848),s=r(28397),l=r(34045);function c(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function u(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function h(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function d(t){var e=t.dateTime,r=t.date,s=t.time,l=t.periods,d=t.days,f=t.shortDays,p=t.months,m=t.shortMonths,v=w(l),b=k(l),y=w(d),x=k(d),_=w(f),et=k(f),_t=w(p),Dt=k(p),It=w(m),Ft=k(m),Rt={a:function(t){return f[t.getDay()]},A:function(t){return d[t.getDay()]},b:function(t){return m[t.getMonth()]},B:function(t){return p[t.getMonth()]},c:null,d:H,e:H,f:X,g:at,G:lt,H:W,I:q,j:Y,L:Z,m:$,M:J,p:function(t){return l[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:zt,s:Ot,S:K,u:Q,U:tt,V:rt,w:nt,W:it,x:null,X:null,y:ot,Y:st,Z:ct,"%":Lt},Pt={a:function(t){return f[t.getUTCDay()]},A:function(t){return d[t.getUTCDay()]},b:function(t){return m[t.getUTCMonth()]},B:function(t){return p[t.getUTCMonth()]},c:null,d:ut,e:ut,f:mt,g:Tt,G:Ct,H:ht,I:dt,j:ft,L:pt,m:gt,M:vt,p:function(t){return l[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:zt,s:Ot,S:bt,u:yt,U:xt,V:wt,w:kt,W:At,x:null,X:null,y:Mt,Y:St,Z:Et,"%":Lt},jt={a:function(t,e,r){var n=_.exec(e.slice(r));return n?(t.w=et[n[0].toLowerCase()],r+n[0].length):-1},A:function(t,e,r){var n=y.exec(e.slice(r));return n?(t.w=x[n[0].toLowerCase()],r+n[0].length):-1},b:function(t,e,r){var n=It.exec(e.slice(r));return n?(t.m=Ft[n[0].toLowerCase()],r+n[0].length):-1},B:function(t,e,r){var n=_t.exec(e.slice(r));return n?(t.m=Dt[n[0].toLowerCase()],r+n[0].length):-1},c:function(t,r,n){return Ut(t,e,r,n)},d:I,e:I,f:B,g:L,G:E,H:R,I:R,j:F,L:N,m:D,M:P,p:function(t,e,r){var n=v.exec(e.slice(r));return n?(t.p=b[n[0].toLowerCase()],r+n[0].length):-1},q:O,Q:G,s:V,S:j,u:M,U:T,V:S,w:A,W:C,x:function(t,e,n){return Ut(t,r,e,n)},X:function(t,e,r){return Ut(t,s,e,r)},y:L,Y:E,Z:z,"%":U};function Nt(t,e){return function(r){var n,i,o,a=[],s=-1,l=0,c=t.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in d||(d.w=1),"Z"in d?(l=(s=u(h(d.y,0,1))).getUTCDay(),s=l>4||0===l?n.rt.ceil(s):(0,n.rt)(s),s=i.A.offset(s,7*(d.V-1)),d.y=s.getUTCFullYear(),d.m=s.getUTCMonth(),d.d=s.getUTCDate()+(d.w+6)%7):(l=(s=c(h(d.y,0,1))).getDay(),s=l>4||0===l?o.By.ceil(s):(0,o.By)(s),s=a.A.offset(s,7*(d.V-1)),d.y=s.getFullYear(),d.m=s.getMonth(),d.d=s.getDate()+(d.w+6)%7)}else("W"in d||"U"in d)&&("w"in d||(d.w="u"in d?d.u%7:"W"in d?1:0),l="Z"in d?u(h(d.y,0,1)).getUTCDay():c(h(d.y,0,1)).getDay(),d.m=0,d.d="W"in d?(d.w+6)%7+7*d.W-(l+5)%7:d.w+7*d.U-(l+6)%7);return"Z"in d?(d.H+=d.Z/100|0,d.M+=d.Z%100,u(d)):c(d)}}function Ut(t,e,r,n){for(var i,o,a=0,s=e.length,l=r.length;a=l)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=jt[i in g?e.charAt(a++):i])||(n=o(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Rt.x=Nt(r,Rt),Rt.X=Nt(s,Rt),Rt.c=Nt(e,Rt),Pt.x=Nt(r,Pt),Pt.X=Nt(s,Pt),Pt.c=Nt(e,Pt),{format:function(t){var e=Nt(t+="",Rt);return e.toString=function(){return t},e},parse:function(t){var e=Bt(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=Nt(t+="",Pt);return e.toString=function(){return t},e},utcParse:function(t){var e=Bt(t+="",!0);return e.toString=function(){return t},e}}}var f,p,m,g={"-":"",_:" ",0:"0"},v=/^\s*\d+/,b=/^%/,y=/[\\^$*+?|[\]().{}]/g;function x(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",o=i.length;return n+(o68?1900:2e3),r+n[0].length):-1}function z(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function O(t,e,r){var n=v.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function D(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function I(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function F(t,e,r){var n=v.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function R(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function P(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function j(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function N(t,e,r){var n=v.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function B(t,e,r){var n=v.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function U(t,e,r){var n=b.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function G(t,e,r){var n=v.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function V(t,e,r){var n=v.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function H(t,e){return x(t.getDate(),e,2)}function W(t,e){return x(t.getHours(),e,2)}function q(t,e){return x(t.getHours()%12||12,e,2)}function Y(t,e){return x(1+a.A.count((0,s.A)(t),t),e,3)}function Z(t,e){return x(t.getMilliseconds(),e,3)}function X(t,e){return Z(t,e)+"000"}function $(t,e){return x(t.getMonth()+1,e,2)}function J(t,e){return x(t.getMinutes(),e,2)}function K(t,e){return x(t.getSeconds(),e,2)}function Q(t){var e=t.getDay();return 0===e?7:e}function tt(t,e){return x(o.fz.count((0,s.A)(t)-1,t),e,2)}function et(t){var e=t.getDay();return e>=4||0===e?(0,o.dt)(t):o.dt.ceil(t)}function rt(t,e){return t=et(t),x(o.dt.count((0,s.A)(t),t)+(4===(0,s.A)(t).getDay()),e,2)}function nt(t){return t.getDay()}function it(t,e){return x(o.By.count((0,s.A)(t)-1,t),e,2)}function ot(t,e){return x(t.getFullYear()%100,e,2)}function at(t,e){return x((t=et(t)).getFullYear()%100,e,2)}function st(t,e){return x(t.getFullYear()%1e4,e,4)}function lt(t,e){var r=t.getDay();return x((t=r>=4||0===r?(0,o.dt)(t):o.dt.ceil(t)).getFullYear()%1e4,e,4)}function ct(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+x(e/60|0,"0",2)+x(e%60,"0",2)}function ut(t,e){return x(t.getUTCDate(),e,2)}function ht(t,e){return x(t.getUTCHours(),e,2)}function dt(t,e){return x(t.getUTCHours()%12||12,e,2)}function ft(t,e){return x(1+i.A.count((0,l.A)(t),t),e,3)}function pt(t,e){return x(t.getUTCMilliseconds(),e,3)}function mt(t,e){return pt(t,e)+"000"}function gt(t,e){return x(t.getUTCMonth()+1,e,2)}function vt(t,e){return x(t.getUTCMinutes(),e,2)}function bt(t,e){return x(t.getUTCSeconds(),e,2)}function yt(t){var e=t.getUTCDay();return 0===e?7:e}function xt(t,e){return x(n.Hl.count((0,l.A)(t)-1,t),e,2)}function _t(t){var e=t.getUTCDay();return e>=4||0===e?(0,n.pT)(t):n.pT.ceil(t)}function wt(t,e){return t=_t(t),x(n.pT.count((0,l.A)(t),t)+(4===(0,l.A)(t).getUTCDay()),e,2)}function kt(t){return t.getUTCDay()}function At(t,e){return x(n.rt.count((0,l.A)(t)-1,t),e,2)}function Mt(t,e){return x(t.getUTCFullYear()%100,e,2)}function Tt(t,e){return x((t=_t(t)).getUTCFullYear()%100,e,2)}function St(t,e){return x(t.getUTCFullYear()%1e4,e,4)}function Ct(t,e){var r=t.getUTCDay();return x((t=r>=4||0===r?(0,n.pT)(t):n.pT.ceil(t)).getUTCFullYear()%1e4,e,4)}function Et(){return"+0000"}function Lt(){return"%"}function zt(t){return+t}function Ot(t){return Math.floor(+t/1e3)}f=d({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"]}),p=f.format,f.parse,m=f.utcFormat,f.utcParse},67848:(t,e,r)=>{"use strict";r.d(e,{A:()=>a,_:()=>s});var n=r(94825),i=r(37968),o=(0,n.A)((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.rR)/i.Nm}),(function(t){return t.getDate()-1}));const a=o;var s=o.range},37968:(t,e,r)=>{"use strict";r.d(e,{Fq:()=>s,JJ:()=>o,Nm:()=>a,Tt:()=>n,rR:()=>i});var n=1e3,i=6e4,o=36e5,a=864e5,s=6048e5},55622:(t,e,r)=>{"use strict";r.r(e),r.d(e,{timeDay:()=>v.A,timeDays:()=>v._,timeFriday:()=>b.Sh,timeFridays:()=>b.tz,timeHour:()=>m,timeHours:()=>g,timeInterval:()=>n.A,timeMillisecond:()=>o,timeMilliseconds:()=>a,timeMinute:()=>d,timeMinutes:()=>f,timeMonday:()=>b.By,timeMondays:()=>b.KP,timeMonth:()=>x,timeMonths:()=>_,timeSaturday:()=>b.kS,timeSaturdays:()=>b.t$,timeSecond:()=>c,timeSeconds:()=>u,timeSunday:()=>b.fz,timeSundays:()=>b.se,timeThursday:()=>b.dt,timeThursdays:()=>b.Q$,timeTuesday:()=>b.eQ,timeTuesdays:()=>b.yW,timeWednesday:()=>b.l3,timeWednesdays:()=>b.gf,timeWeek:()=>b.fz,timeWeeks:()=>b.se,timeYear:()=>w.A,timeYears:()=>w.V,utcDay:()=>E.A,utcDays:()=>E.o,utcFriday:()=>L.a1,utcFridays:()=>L.Zn,utcHour:()=>S,utcHours:()=>C,utcMillisecond:()=>o,utcMilliseconds:()=>a,utcMinute:()=>A,utcMinutes:()=>M,utcMonday:()=>L.rt,utcMondays:()=>L.ON,utcMonth:()=>O,utcMonths:()=>D,utcSaturday:()=>L.c8,utcSaturdays:()=>L.Xo,utcSecond:()=>c,utcSeconds:()=>u,utcSunday:()=>L.Hl,utcSundays:()=>L.aZ,utcThursday:()=>L.pT,utcThursdays:()=>L.wr,utcTuesday:()=>L.sr,utcTuesdays:()=>L.jN,utcWednesday:()=>L.z2,utcWednesdays:()=>L.G6,utcWeek:()=>L.Hl,utcWeeks:()=>L.aZ,utcYear:()=>I.A,utcYears:()=>I.j});var n=r(94825),i=(0,n.A)((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?(0,n.A)((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,r){e.setTime(+e+r*t)}),(function(e,r){return(r-e)/t})):i:null};const o=i;var a=i.range,s=r(37968),l=(0,n.A)((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*s.Tt)}),(function(t,e){return(e-t)/s.Tt}),(function(t){return t.getUTCSeconds()}));const c=l;var u=l.range,h=(0,n.A)((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*s.Tt)}),(function(t,e){t.setTime(+t+e*s.rR)}),(function(t,e){return(e-t)/s.rR}),(function(t){return t.getMinutes()}));const d=h;var f=h.range,p=(0,n.A)((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*s.Tt-t.getMinutes()*s.rR)}),(function(t,e){t.setTime(+t+e*s.JJ)}),(function(t,e){return(e-t)/s.JJ}),(function(t){return t.getHours()}));const m=p;var g=p.range,v=r(67848),b=r(61396),y=(0,n.A)((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));const x=y;var _=y.range,w=r(28397),k=(0,n.A)((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*s.rR)}),(function(t,e){return(e-t)/s.rR}),(function(t){return t.getUTCMinutes()}));const A=k;var M=k.range,T=(0,n.A)((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*s.JJ)}),(function(t,e){return(e-t)/s.JJ}),(function(t){return t.getUTCHours()}));const S=T;var C=T.range,E=r(79896),L=r(64772),z=(0,n.A)((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}));const O=z;var D=z.range,I=r(34045)},94825:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=new Date,i=new Date;function o(t,e,r,a){function s(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return s.floor=function(e){return t(e=new Date(+e)),e},s.ceil=function(r){return t(r=new Date(r-1)),e(r,1),t(r),r},s.round=function(t){var e=s(t),r=s.ceil(t);return t-e0))return a;do{a.push(o=new Date(+r)),e(r,i),t(r)}while(o=e)for(;t(e),!r(e);)e.setTime(e-1)}),(function(t,n){if(t>=t)if(n<0)for(;++n<=0;)for(;e(t,-1),!r(t););else for(;--n>=0;)for(;e(t,1),!r(t););}))},r&&(s.count=function(e,o){return n.setTime(+e),i.setTime(+o),t(n),t(i),Math.floor(r(n,i))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(a?function(e){return a(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}},79896:(t,e,r)=>{"use strict";r.d(e,{A:()=>a,o:()=>s});var n=r(94825),i=r(37968),o=(0,n.A)((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/i.Nm}),(function(t){return t.getUTCDate()-1}));const a=o;var s=o.range},64772:(t,e,r)=>{"use strict";r.d(e,{G6:()=>g,Hl:()=>a,ON:()=>p,Xo:()=>y,Zn:()=>b,a1:()=>h,aZ:()=>f,c8:()=>d,jN:()=>m,pT:()=>u,rt:()=>s,sr:()=>l,wr:()=>v,z2:()=>c});var n=r(94825),i=r(37968);function o(t){return(0,n.A)((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/i.Fq}))}var a=o(0),s=o(1),l=o(2),c=o(3),u=o(4),h=o(5),d=o(6),f=a.range,p=s.range,m=l.range,g=c.range,v=u.range,b=h.range,y=d.range},34045:(t,e,r)=>{"use strict";r.d(e,{A:()=>o,j:()=>a});var n=r(94825),i=(0,n.A)((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?(0,n.A)((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null};const o=i;var a=i.range},61396:(t,e,r)=>{"use strict";r.d(e,{By:()=>s,KP:()=>p,Q$:()=>v,Sh:()=>h,dt:()=>u,eQ:()=>l,fz:()=>a,gf:()=>g,kS:()=>d,l3:()=>c,se:()=>f,t$:()=>y,tz:()=>b,yW:()=>m});var n=r(94825),i=r(37968);function o(t){return(0,n.A)((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.rR)/i.Fq}))}var a=o(0),s=o(1),l=o(2),c=o(3),u=o(4),h=o(5),d=o(6),f=a.range,p=s.range,m=l.range,g=c.range,v=u.range,b=h.range,y=d.range},28397:(t,e,r)=>{"use strict";r.d(e,{A:()=>o,V:()=>a});var n=r(94825),i=(0,n.A)((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?(0,n.A)((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,r){e.setFullYear(e.getFullYear()+r*t)})):null};const o=i;var a=i.range},43362:(t,e,r)=>{"use strict";var n=r(38232),i=r(66367),o=r(48744),a=r(55572);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new o("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],h=!!a&&a(t,e);if(n)n(t,e,{configurable:null===c&&h?h.configurable:!c,enumerable:null===s&&h?h.enumerable:!s,value:r,writable:null===l&&h?h.writable:!l});else{if(!u&&(s||l||c))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},10781:(t,e,r)=>{"use strict";var n=r(99952),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=r(43362),l=r(20419)(),c=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(i=n)||"[object Function]"!==o.call(i)||!n())return;var i;l?s(t,e,r,!0):s(t,e,r)},u=function(t,e){var r=arguments.length>2?arguments[2]:{},o=n(e);i&&(o=a.call(o,Object.getOwnPropertySymbols(e)));for(var s=0;s{"use strict";t.exports=function(){for(var t=0;t{"use strict";t.exports=n;var e=(n.canvas=document.createElement("canvas")).getContext("2d"),r=i([32,126]);function n(t,n){Array.isArray(t)&&(t=t.join(", "));var o,a={},s=16,l=.05;n&&(2===n.length&&"number"==typeof n[0]?o=i(n):Array.isArray(n)?o=n:(n.o?o=i(n.o):n.pairs&&(o=n.pairs),n.fontSize&&(s=n.fontSize),null!=n.threshold&&(l=n.threshold))),o||(o=r),e.font=s+"px "+t;for(var c=0;cs*l){var f=(d-h)/s;a[u]=1e3*f}}return a}function i(t){for(var e=[],r=t[0];r<=t[1];r++)for(var n=String.fromCharCode(r),i=t[0];i{var n=r(97883),i=r(25058),o={M:"moveTo",C:"bezierCurveTo"};t.exports=function(t,e){t.beginPath(),i(n(e)).forEach((function(e){var r=e[0],n=e.slice(1);t[o[r]].apply(t,n)})),t.closePath()}},22366:t=>{t.exports=function(t){switch(t){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},31338:t=>{"use strict";function e(t,r,n){var i=0|t[n];if(i<=0)return[];var o,a=new Array(i);if(n===t.length-1)for(o=0;o0)return function(t,e){var r,n;for(r=new Array(t),n=0;n{"use strict";function e(t,e,n){n=n||2;var o,a,s,l,h,d,p,m=e&&e.length,g=m?e[0]*n:t.length,v=r(t,0,g,n,!0),b=[];if(!v||v.next===v.prev)return b;if(m&&(v=function(t,e,n,i){var o,a,s,l=[];for(o=0,a=e.length;o80*n){o=s=t[0],a=l=t[1];for(var y=n;ys&&(s=h),d>l&&(l=d);p=0!==(p=Math.max(s-o,l-a))?32767/p:0}return i(v,b,n,o,a,p,0),b}function r(t,e,r,n,i){var o,a;if(i===T(t,e,r,n)>0)for(o=e;o=e;o-=n)a=k(o,t[o],t[o+1],a);return a&&v(a,a.next)&&(A(a),a=a.next),a}function n(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!v(n,n.next)&&0!==g(n.prev,n,n.next))n=n.next;else{if(A(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function i(t,e,r,c,u,h,f){if(t){!f&&h&&function(t,e,r,n){var i=t;do{0===i.z&&(i.z=d(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,o,a,s,l,c=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,n=r,s=0,e=0;e0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;r=n}o.nextZ=null,c*=2}while(a>1)}(i)}(t,c,u,h);for(var p,m,g=t;t.prev!==t.next;)if(p=t.prev,m=t.next,h?a(t,c,u,h):o(t))e.push(p.i/r|0),e.push(t.i/r|0),e.push(m.i/r|0),A(t),t=m.next,g=m.next;else if((t=m)===g){f?1===f?i(t=s(n(t),e,r),e,r,c,u,h,2):2===f&&l(t,e,r,c,u,h):i(n(t),e,r,c,u,h,1);break}}}function o(t){var e=t.prev,r=t,n=t.next;if(g(e,r,n)>=0)return!1;for(var i=e.x,o=r.x,a=n.x,s=e.y,l=r.y,c=n.y,u=io?i>a?i:a:o>a?o:a,f=s>l?s>c?s:c:l>c?l:c,m=n.next;m!==e;){if(m.x>=u&&m.x<=d&&m.y>=h&&m.y<=f&&p(i,s,o,l,a,c,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function a(t,e,r,n){var i=t.prev,o=t,a=t.next;if(g(i,o,a)>=0)return!1;for(var s=i.x,l=o.x,c=a.x,u=i.y,h=o.y,f=a.y,m=sl?s>c?s:c:l>c?l:c,y=u>h?u>f?u:f:h>f?h:f,x=d(m,v,e,r,n),_=d(b,y,e,r,n),w=t.prevZ,k=t.nextZ;w&&w.z>=x&&k&&k.z<=_;){if(w.x>=m&&w.x<=b&&w.y>=v&&w.y<=y&&w!==i&&w!==a&&p(s,u,l,h,c,f,w.x,w.y)&&g(w.prev,w,w.next)>=0)return!1;if(w=w.prevZ,k.x>=m&&k.x<=b&&k.y>=v&&k.y<=y&&k!==i&&k!==a&&p(s,u,l,h,c,f,k.x,k.y)&&g(k.prev,k,k.next)>=0)return!1;k=k.nextZ}for(;w&&w.z>=x;){if(w.x>=m&&w.x<=b&&w.y>=v&&w.y<=y&&w!==i&&w!==a&&p(s,u,l,h,c,f,w.x,w.y)&&g(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;k&&k.z<=_;){if(k.x>=m&&k.x<=b&&k.y>=v&&k.y<=y&&k!==i&&k!==a&&p(s,u,l,h,c,f,k.x,k.y)&&g(k.prev,k,k.next)>=0)return!1;k=k.nextZ}return!0}function s(t,e,r){var i=t;do{var o=i.prev,a=i.next.next;!v(o,a)&&b(o,i,i.next,a)&&_(o,a)&&_(a,o)&&(e.push(o.i/r|0),e.push(i.i/r|0),e.push(a.i/r|0),A(i),A(i.next),i=t=a),i=i.next}while(i!==t);return n(i)}function l(t,e,r,o,a,s){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&m(l,c)){var u=w(l,c);return l=n(l,l.next),u=n(u,u.next),i(l,e,r,o,a,s,0),void i(u,e,r,o,a,s,0)}c=c.next}l=l.next}while(l!==t)}function c(t,e){return t.x-e.x}function u(t,e){var r=function(t,e){var r,n=e,i=t.x,o=t.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>a&&(a=s,r=n.x=n.x&&n.x>=u&&i!==n.x&&p(or.x||n.x===r.x&&h(r,n)))&&(r=n,f=l)),n=n.next}while(n!==c);return r}(t,e);if(!r)return e;var i=w(r,t);return n(i,i.next),n(r,r.next)}function h(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function d(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function f(t){var e=t,r=t;do{(e.x=(t-a)*(o-s)&&(t-a)*(n-s)>=(r-a)*(e-s)&&(r-a)*(o-s)>=(i-a)*(n-s)}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&b(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(_(t,e)&&_(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||v(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,r,n){var i=x(g(t,e,r)),o=x(g(t,e,n)),a=x(g(r,n,t)),s=x(g(r,n,e));return i!==o&&a!==s||!(0!==i||!y(t,r,e))||!(0!==o||!y(t,n,e))||!(0!==a||!y(r,t,n))||!(0!==s||!y(r,e,n))}function y(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function x(t){return t>0?1:t<0?-1:0}function _(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function w(t,e){var r=new M(t.i,t.x,t.y),n=new M(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function k(t,e,r,n){var i=new M(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function A(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function M(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function T(t,e,r,n){for(var i=0,o=e,a=r-n;o0&&(n+=t[i-1].length,r.holes.push(n))}return r}},38232:(t,e,r)=>{"use strict";var n=r(59412)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(t){n=!1}t.exports=n},33674:t=>{"use strict";t.exports=EvalError},94234:t=>{"use strict";t.exports=Error},8975:t=>{"use strict";t.exports=RangeError},59299:t=>{"use strict";t.exports=ReferenceError},66367:t=>{"use strict";t.exports=SyntaxError},48744:t=>{"use strict";t.exports=TypeError},63432:t=>{"use strict";t.exports=URIError},18918:(t,e,r)=>{"use strict";var n=r(2033);t.exports=function(){return n(this).length=0,this}},54034:(t,e,r)=>{"use strict";t.exports=r(90329)()?Array.from:r(28741)},90329:t=>{"use strict";t.exports=function(){var t,e,r=Array.from;return"function"==typeof r&&(e=r(t=["raz","dwa"]),Boolean(e&&e!==t&&"dwa"===e[1]))}},28741:(t,e,r)=>{"use strict";var n=r(89791).iterator,i=r(40471),o=r(85875),a=r(60812),s=r(55366),l=r(2033),c=r(93767),u=r(54295),h=Array.isArray,d=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;t.exports=function(t){var e,r,m,g,v,b,y,x,_,w,k=arguments[1],A=arguments[2];if(t=Object(l(t)),c(k)&&s(k),this&&this!==Array&&o(this))e=this;else{if(!k){if(i(t))return 1!==(v=t.length)?Array.apply(null,t):((g=new Array(1))[0]=t[0],g);if(h(t)){for(g=new Array(v=t.length),r=0;r=55296&&b<=56319&&(w+=t[++r]),w=k?d.call(k,A,w,m):w,e?(f.value=w,p(g,m,f)):g[m]=w,++m;v=m}if(void 0===v)for(v=a(t.length),e&&(g=new e(v)),r=0;r{"use strict";var e=Object.prototype.toString,r=e.call(function(){return arguments}());t.exports=function(t){return e.call(t)===r}},85875:t=>{"use strict";var e=Object.prototype.toString,r=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);t.exports=function(t){return"function"==typeof t&&r(e.call(t))}},20450:t=>{"use strict";t.exports=function(){}},55334:(t,e,r)=>{"use strict";t.exports=r(42669)()?Math.sign:r(78209)},42669:t=>{"use strict";t.exports=function(){var t=Math.sign;return"function"==typeof t&&1===t(10)&&-1===t(-20)}},78209:t=>{"use strict";t.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},28371:(t,e,r)=>{"use strict";var n=r(55334),i=Math.abs,o=Math.floor;t.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&&isFinite(t)?n(t)*o(i(t)):t}},60812:(t,e,r)=>{"use strict";var n=r(28371),i=Math.max;t.exports=function(t){return i(0,n(t))}},78826:(t,e,r)=>{"use strict";var n=r(55366),i=r(2033),o=Function.prototype.bind,a=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(r,c){var u,h=arguments[2],d=arguments[3];return r=Object(i(r)),n(c),u=s(r),d&&u.sort("function"==typeof d?o.call(d,r):void 0),"function"!=typeof t&&(t=u[t]),a.call(t,u,(function(t,n){return l.call(r,t)?a.call(c,h,r[t],t,r,n):e}))}}},18021:(t,e,r)=>{"use strict";t.exports=r(99484)()?Object.assign:r(28752)},99484:t=>{"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},28752:(t,e,r)=>{"use strict";var n=r(87984),i=r(2033),o=Math.max;t.exports=function(t,e){var r,a,s,l=o(arguments.length,2);for(t=Object(i(t)),s=function(n){try{t[n]=e[n]}catch(t){r||(r=t)}},a=1;a{"use strict";var n=r(54034),i=r(18021),o=r(2033);t.exports=function(t){var e=Object(o(t)),r=arguments[1],a=Object(arguments[2]);if(e!==t&&!r)return e;var s={};return r?n(r,(function(e){(a.ensure||e in t)&&(s[e]=t[e])})):i(s,t),s}},39095:(t,e,r)=>{"use strict";var n,i,o,a,s=Object.create;r(11314)()||(n=r(786)),t.exports=n?1!==n.level?s:(i={},o={},a={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach((function(t){o[t]="__proto__"!==t?a:{configurable:!0,enumerable:!1,writable:!0,value:void 0}})),Object.defineProperties(i,o),Object.defineProperty(n,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:i}),function(t,e){return s(null===t?i:t,e)}):s},17916:(t,e,r)=>{"use strict";t.exports=r(78826)("forEach")},27375:(t,e,r)=>{"use strict";var n=r(93767),i={function:!0,object:!0};t.exports=function(t){return n(t)&&i[typeof t]||!1}},93767:(t,e,r)=>{"use strict";var n=r(20450)();t.exports=function(t){return t!==n&&null!==t}},87984:(t,e,r)=>{"use strict";t.exports=r(60263)()?Object.keys:r(42351)},60263:t=>{"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},42351:(t,e,r)=>{"use strict";var n=r(93767),i=Object.keys;t.exports=function(t){return i(n(t)?Object(t):t)}},30829:(t,e,r)=>{"use strict";var n=r(55366),i=r(17916),o=Function.prototype.call;t.exports=function(t,e){var r={},a=arguments[2];return n(e),i(t,(function(t,n,i,s){r[n]=o.call(e,a,t,n,i,s)})),r}},54863:(t,e,r)=>{"use strict";var n=r(93767),i=Array.prototype.forEach,o=Object.create;t.exports=function(t){var e=o(null);return i.call(arguments,(function(t){n(t)&&function(t,e){var r;for(r in t)e[r]=t[r]}(Object(t),e)})),e}},83579:(t,e,r)=>{"use strict";t.exports=r(11314)()?Object.setPrototypeOf:r(786)},11314:t=>{"use strict";var e=Object.create,r=Object.getPrototypeOf,n={};t.exports=function(){var t=Object.setPrototypeOf;return"function"==typeof t&&r(t((arguments[0]||e)(null),n))===n}},786:(t,e,r)=>{"use strict";var n,i,o,a,s=r(27375),l=r(2033),c=Object.prototype.isPrototypeOf,u=Object.defineProperty,h={configurable:!0,enumerable:!1,writable:!0,value:void 0};n=function(t,e){if(l(t),null===e||s(e))return t;throw new TypeError("Prototype must be null or an object")},t.exports=(i=function(){var t,e=Object.create(null),r={},n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{(t=n.set).call(e,r)}catch(t){}if(Object.getPrototypeOf(e)===r)return{set:t,level:2}}return e.__proto__=r,Object.getPrototypeOf(e)===r?{level:2}:((e={}).__proto__=r,Object.getPrototypeOf(e)===r&&{level:1})}(),i?(2===i.level?i.set?(a=i.set,o=function(t,e){return a.call(n(t,e),e),t}):o=function(t,e){return n(t,e).__proto__=e,t}:o=function t(e,r){var i;return n(e,r),(i=c.call(t.nullPolyfill,e))&&delete t.nullPolyfill.__proto__,null===r&&(r=t.nullPolyfill),e.__proto__=r,i&&u(t.nullPolyfill,"__proto__",h),e},Object.defineProperty(o,"level",{configurable:!1,enumerable:!1,writable:!1,value:i.level})):null),r(39095)},55366:t=>{"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},66529:(t,e,r)=>{"use strict";var n=r(27375);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not an Object");return t}},2033:(t,e,r)=>{"use strict";var n=r(93767);t.exports=function(t){if(!n(t))throw new TypeError("Cannot use null or undefined");return t}},79813:(t,e,r)=>{"use strict";t.exports=r(82844)()?String.prototype.contains:r(65040)},82844:t=>{"use strict";var e="razdwatrzy";t.exports=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}},65040:t=>{"use strict";var e=String.prototype.indexOf;t.exports=function(t){return e.call(this,t,arguments[1])>-1}},54295:t=>{"use strict";var e=Object.prototype.toString,r=e.call("");t.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||e.call(t)===r)||!1}},36434:t=>{"use strict";var e=Object.create(null),r=Math.random;t.exports=function(){var t;do{t=r().toString(36).slice(2)}while(e[t]);return t}},46136:(t,e,r)=>{"use strict";var n,i=r(83579),o=r(79813),a=r(86142),s=r(89791),l=r(15929),c=Object.defineProperty;n=t.exports=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");l.call(this,t),e=e?o.call(e,"key+value")?"key+value":o.call(e,"key")?"key":"value":"value",c(this,"__kind__",a("",e))},i&&i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:a((function(t){return"value"===this.__kind__?this.__list__[t]:"key+value"===this.__kind__?[t,this.__list__[t]]:t}))}),c(n.prototype,s.toStringTag,a("c","Array Iterator"))},88822:(t,e,r)=>{"use strict";var n=r(40471),i=r(55366),o=r(54295),a=r(28753),s=Array.isArray,l=Function.prototype.call,c=Array.prototype.some;t.exports=function(t,e){var r,u,h,d,f,p,m,g,v=arguments[2];if(s(t)||n(t)?r="array":o(t)?r="string":t=a(t),i(e),h=function(){d=!0},"array"!==r)if("string"!==r)for(u=t.next();!u.done;){if(l.call(e,v,u.value,h),d)return;u=t.next()}else for(p=t.length,f=0;f=55296&&g<=56319&&(m+=t[++f]),l.call(e,v,m,h),!d);++f);else c.call(t,(function(t){return l.call(e,v,t,h),d}))}},28753:(t,e,r)=>{"use strict";var n=r(40471),i=r(54295),o=r(46136),a=r(45408),s=r(86898),l=r(89791).iterator;t.exports=function(t){return"function"==typeof s(t)[l]?t[l]():n(t)?new o(t):i(t)?new a(t):new o(t)}},15929:(t,e,r)=>{"use strict";var n,i=r(18918),o=r(18021),a=r(55366),s=r(2033),l=r(86142),c=r(39683),u=r(89791),h=Object.defineProperty,d=Object.defineProperties;t.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");d(this,{__list__:l("w",s(t)),__context__:l("w",e),__nextIndex__:l("w",0)}),e&&(a(e.on),e.on("_add",this._onAdd),e.on("_delete",this._onDelete),e.on("_clear",this._onClear))},delete n.prototype.constructor,d(n.prototype,o({_next:l((function(){var t;if(this.__list__)return this.__redo__&&void 0!==(t=this.__redo__.shift())?t:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(e,r){e>=t&&(this.__redo__[r]=++e)}),this),this.__redo__.push(t)):h(this,"__redo__",l("c",[t])))})),_onDelete:l((function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(e=this.__redo__.indexOf(t))&&this.__redo__.splice(e,1),this.__redo__.forEach((function(e,r){e>t&&(this.__redo__[r]=--e)}),this)))})),_onClear:l((function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0}))}))),h(n.prototype,u.iterator,l((function(){return this})))},46692:(t,e,r)=>{"use strict";var n=r(40471),i=r(93767),o=r(54295),a=r(89791).iterator,s=Array.isArray;t.exports=function(t){return!(!i(t)||!s(t)&&!o(t)&&!n(t)&&"function"!=typeof t[a])}},45408:(t,e,r)=>{"use strict";var n,i=r(83579),o=r(86142),a=r(89791),s=r(15929),l=Object.defineProperty;n=t.exports=function(t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");t=String(t),s.call(this,t),l(this,"__length__",o("",t.length))},i&&i(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:o((function(){if(this.__list__)return this.__nextIndex__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,a.toStringTag,o("c","String Iterator"))},86898:(t,e,r)=>{"use strict";var n=r(46692);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not iterable");return t}},89791:(t,e,r)=>{"use strict";t.exports=r(87494)()?r(63844).Symbol:r(44164)},87494:(t,e,r)=>{"use strict";var n=r(63844),i={object:!0,symbol:!0};t.exports=function(){var t,e=n.Symbol;if("function"!=typeof e)return!1;t=e("test symbol");try{String(t)}catch(t){return!1}return!!i[typeof e.iterator]&&!!i[typeof e.toPrimitive]&&!!i[typeof e.toStringTag]}},84848:t=>{"use strict";t.exports=function(t){return!!t&&("symbol"==typeof t||!!t.constructor&&"Symbol"===t.constructor.name&&"Symbol"===t[t.constructor.toStringTag])}},78718:(t,e,r)=>{"use strict";var n=r(86142),i=Object.create,o=Object.defineProperty,a=Object.prototype,s=i(null);t.exports=function(t){for(var e,r,i=0;s[t+(i||"")];)++i;return s[t+=i||""]=!0,o(a,e="@@"+t,n.gs(null,(function(t){r||(r=!0,o(this,e,n(t)),r=!1)}))),e}},25052:(t,e,r)=>{"use strict";var n=r(86142),i=r(63844).Symbol;t.exports=function(t){return Object.defineProperties(t,{hasInstance:n("",i&&i.hasInstance||t("hasInstance")),isConcatSpreadable:n("",i&&i.isConcatSpreadable||t("isConcatSpreadable")),iterator:n("",i&&i.iterator||t("iterator")),match:n("",i&&i.match||t("match")),replace:n("",i&&i.replace||t("replace")),search:n("",i&&i.search||t("search")),species:n("",i&&i.species||t("species")),split:n("",i&&i.split||t("split")),toPrimitive:n("",i&&i.toPrimitive||t("toPrimitive")),toStringTag:n("",i&&i.toStringTag||t("toStringTag")),unscopables:n("",i&&i.unscopables||t("unscopables"))})}},68813:(t,e,r)=>{"use strict";var n=r(86142),i=r(85618),o=Object.create(null);t.exports=function(t){return Object.defineProperties(t,{for:n((function(e){return o[e]?o[e]:o[e]=t(String(e))})),keyFor:n((function(t){var e;for(e in i(t),o)if(o[e]===t)return e}))})}},44164:(t,e,r)=>{"use strict";var n,i,o,a=r(86142),s=r(85618),l=r(63844).Symbol,c=r(78718),u=r(25052),h=r(68813),d=Object.create,f=Object.defineProperties,p=Object.defineProperty;if("function"==typeof l)try{String(l()),o=!0}catch(t){}else l=null;i=function(t){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return n(t)},t.exports=n=function t(e){var r;if(this instanceof t)throw new TypeError("Symbol is not a constructor");return o?l(e):(r=d(i.prototype),e=void 0===e?"":String(e),f(r,{__description__:a("",e),__name__:a("",c(e))}))},u(n),h(n),f(i.prototype,{constructor:a(n),toString:a("",(function(){return this.__name__}))}),f(n.prototype,{toString:a((function(){return"Symbol ("+s(this).__description__+")"})),valueOf:a((function(){return s(this)}))}),p(n.prototype,n.toPrimitive,a("",(function(){var t=s(this);return"symbol"==typeof t?t:t.toString()}))),p(n.prototype,n.toStringTag,a("c","Symbol")),p(i.prototype,n.toStringTag,a("c",n.prototype[n.toStringTag])),p(i.prototype,n.toPrimitive,a("c",n.prototype[n.toPrimitive]))},85618:(t,e,r)=>{"use strict";var n=r(84848);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not a symbol");return t}},41456:(t,e,r)=>{"use strict";t.exports=r(39687)()?WeakMap:r(87841)},39687:t=>{"use strict";t.exports=function(){var t,e;if("function"!=typeof WeakMap)return!1;try{t=new WeakMap([[e={},"one"],[{},"two"],[{},"three"]])}catch(t){return!1}return"[object WeakMap]"===String(t)&&"function"==typeof t.set&&t.set({},1)===t&&"function"==typeof t.delete&&"function"==typeof t.has&&"one"===t.get(e)}},99037:t=>{"use strict";t.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)},87841:(t,e,r)=>{"use strict";var n,i=r(93767),o=r(83579),a=r(66529),s=r(2033),l=r(36434),c=r(86142),u=r(28753),h=r(88822),d=r(89791).toStringTag,f=r(99037),p=Array.isArray,m=Object.defineProperty,g=Object.prototype.hasOwnProperty,v=Object.getPrototypeOf;t.exports=n=function(){var t,e=arguments[0];if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");return t=f&&o&&WeakMap!==n?o(new WeakMap,v(this)):this,i(e)&&(p(e)||(e=u(e))),m(t,"__weakMapData__",c("c","$weakMap$"+l())),e?(h(e,(function(e){s(e),t.set(e[0],e[1])})),t):t},f&&(o&&o(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:c(n)})),Object.defineProperties(n.prototype,{delete:c((function(t){return!!g.call(a(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)})),get:c((function(t){if(g.call(a(t),this.__weakMapData__))return t[this.__weakMapData__]})),has:c((function(t){return g.call(a(t),this.__weakMapData__)})),set:c((function(t,e){return m(a(t),this.__weakMapData__,c("c",e)),this})),toString:c((function(){return"[object WeakMap]"}))}),m(n.prototype,d,c("c","WeakMap"))},86626:t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}m(t,e,o,{once:!0}),"error"!==e&&function(t,e){"function"==typeof t.on&&m(t,"error",e,{once:!0})}(t,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function c(t,e,r,n){var i,o,a,c;if(s(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"==typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=l(t))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,c=u,console&&console.warn&&console.warn(c)}return t}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=u.bind(n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[t];if(void 0===l)return!1;if("function"==typeof l)n(l,this,e);else{var c=l.length,u=p(l,c);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):f.call(t,e)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},44232:t=>{var e=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};t.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return e()}try{return __global__||e()}finally{delete Object.prototype.__global__}}()},63844:(t,e,r)=>{"use strict";t.exports=r(25515)()?globalThis:r(44232)},25515:t=>{"use strict";t.exports=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}},7370:(t,e,r)=>{"use strict";var n=r(45219);t.exports=function(t){var e=typeof t;if("string"===e){var r=t;if(0==(t=+t)&&n(r))return!1}else if("number"!==e)return!1;return t-t<1}},97e3:(t,e,r)=>{var n=r(22366);t.exports=function(t,e,r){if(!t)throw new TypeError("must specify data as first parameter");if(r=0|+(r||0),Array.isArray(t)&&t[0]&&"number"==typeof t[0][0]){var i,o,a,s,l=t[0].length,c=t.length*l;e&&"string"!=typeof e||(e=new(n(e||"float32"))(c+r));var u=e.length-r;if(c!==u)throw new Error("source length "+c+" ("+l+"x"+t.length+") does not match destination length "+u);for(i=0,a=r;i{"use strict";var n=r(40288),i=[32,126];t.exports=function(t){var e=(t=t||{}).shape?t.shape:t.canvas?[t.canvas.width,t.canvas.height]:[512,512],r=t.canvas||document.createElement("canvas"),o=t.font,a="number"==typeof t.step?[t.step,t.step]:t.step||[32,32],s=t.chars||i;if(o&&"string"!=typeof o&&(o=n(o)),Array.isArray(s)){if(2===s.length&&"number"==typeof s[0]&&"number"==typeof s[1]){for(var l=[],c=s[0],u=0;c<=s[1];c++)l[u++]=String.fromCharCode(c);s=l}}else s=String(s).split("");e=e.slice(),r.width=e[0],r.height=e[1];var h=r.getContext("2d");h.fillStyle="#000",h.fillRect(0,0,r.width,r.height),h.font=o,h.textAlign="center",h.textBaseline="middle",h.fillStyle="#fff";var d=a[0]/2,f=a[1]/2;for(c=0;ce[0]-a[0]/2&&(d=a[0]/2,f+=a[1]);return r}},45250:t=>{"use strict";function e(t,o){o||(o={}),("string"==typeof t||Array.isArray(t))&&(o.family=t);var a=Array.isArray(o.family)?o.family.join(", "):o.family;if(!a)throw Error("`family` must be defined");var s=o.size||o.fontSize||o.em||48,l=o.weight||o.fontWeight||"",c=(t=[o.style||o.fontStyle||"",l,s].join(" ")+"px "+a,o.origin||"top");if(e.cache[a]&&s<=e.cache[a].em)return r(e.cache[a],c);var u=o.canvas||e.canvas,h=u.getContext("2d"),d={upper:void 0!==o.upper?o.upper:"H",lower:void 0!==o.lower?o.lower:"x",descent:void 0!==o.descent?o.descent:"p",ascent:void 0!==o.ascent?o.ascent:"h",tittle:void 0!==o.tittle?o.tittle:"i",overshoot:void 0!==o.overshoot?o.overshoot:"O"},f=Math.ceil(1.5*s);u.height=f,u.width=.5*f,h.font=t;var p="H",m={top:0};h.clearRect(0,0,f,f),h.textBaseline="top",h.fillStyle="black",h.fillText(p,0,0);var g=n(h.getImageData(0,0,f,f));h.clearRect(0,0,f,f),h.textBaseline="bottom",h.fillText(p,0,f);var v=n(h.getImageData(0,0,f,f));m.lineHeight=m.bottom=f-v+g,h.clearRect(0,0,f,f),h.textBaseline="alphabetic",h.fillText(p,0,f);var b=f-n(h.getImageData(0,0,f,f))-1+g;m.baseline=m.alphabetic=b,h.clearRect(0,0,f,f),h.textBaseline="middle",h.fillText(p,0,.5*f);var y=n(h.getImageData(0,0,f,f));m.median=m.middle=f-y-1+g-.5*f,h.clearRect(0,0,f,f),h.textBaseline="hanging",h.fillText(p,0,.5*f);var x=n(h.getImageData(0,0,f,f));m.hanging=f-x-1+g-.5*f,h.clearRect(0,0,f,f),h.textBaseline="ideographic",h.fillText(p,0,f);var _=n(h.getImageData(0,0,f,f));if(m.ideographic=f-_-1+g,d.upper&&(h.clearRect(0,0,f,f),h.textBaseline="top",h.fillText(d.upper,0,0),m.upper=n(h.getImageData(0,0,f,f)),m.capHeight=m.baseline-m.upper),d.lower&&(h.clearRect(0,0,f,f),h.textBaseline="top",h.fillText(d.lower,0,0),m.lower=n(h.getImageData(0,0,f,f)),m.xHeight=m.baseline-m.lower),d.tittle&&(h.clearRect(0,0,f,f),h.textBaseline="top",h.fillText(d.tittle,0,0),m.tittle=n(h.getImageData(0,0,f,f))),d.ascent&&(h.clearRect(0,0,f,f),h.textBaseline="top",h.fillText(d.ascent,0,0),m.ascent=n(h.getImageData(0,0,f,f))),d.descent&&(h.clearRect(0,0,f,f),h.textBaseline="top",h.fillText(d.descent,0,0),m.descent=i(h.getImageData(0,0,f,f))),d.overshoot){h.clearRect(0,0,f,f),h.textBaseline="top",h.fillText(d.overshoot,0,0);var w=i(h.getImageData(0,0,f,f));m.overshoot=w-b}for(var k in m)m[k]/=s;return m.em=s,e.cache[a]=m,r(m,c)}function r(t,e){var r={};for(var n in"string"==typeof e&&(e=t[e]),t)"em"!==n&&(r[n]=t[n]-e);return r}function n(t){for(var e=t.height,r=t.data,n=3;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}t.exports=e,e.canvas=document.createElement("canvas"),e.cache={}},85573:(t,e,r)=>{"use strict";var n=r(60245),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===i.call(t)?function(t,e,r){for(var n=0,i=t.length;n{"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n{"use strict";var n=r(5438);t.exports=Function.prototype.bind||n},64487:t=>{t.exports=function(t,e){if("string"!=typeof t)throw new TypeError("must specify type string");if(e=e||{},"undefined"==typeof document&&!e.canvas)return null;var r=e.canvas||document.createElement("canvas");"number"==typeof e.width&&(r.width=e.width),"number"==typeof e.height&&(r.height=e.height);var n,i=e;try{var o=[t];0===t.indexOf("webgl")&&o.push("experimental-"+t);for(var a=0;a{"use strict";var n,i=r(94234),o=r(33674),a=r(8975),s=r(59299),l=r(66367),c=r(48744),u=r(63432),h=Function,d=function(t){try{return h('"use strict"; return ('+t+").constructor;")()}catch(t){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(t){f=null}var p=function(){throw new c},m=f?function(){try{return p}catch(t){try{return f(arguments,"callee").get}catch(t){return p}}}():p,g=r(23266)(),v=r(39681)(),b=Object.getPrototypeOf||(v?function(t){return t.__proto__}:null),y={},x="undefined"!=typeof Uint8Array&&b?b(Uint8Array):n,_={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":y,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":l,"%ThrowTypeError%":m,"%TypedArray%":x,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(b)try{null.error}catch(t){var w=b(b(t));_["%Error.prototype%"]=w}var k=function t(e){var r;if("%AsyncFunction%"===e)r=d("async function () {}");else if("%GeneratorFunction%"===e)r=d("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=d("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&b&&(r=b(i.prototype))}return _[e]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},M=r(35366),T=r(19942),S=M.call(Function.call,Array.prototype.concat),C=M.call(Function.apply,Array.prototype.splice),E=M.call(Function.call,String.prototype.replace),L=M.call(Function.call,String.prototype.slice),z=M.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,I=function(t,e){var r,n=t;if(T(A,n)&&(n="%"+(r=A[n])[0]+"%"),T(_,n)){var i=_[n];if(i===y&&(i=k(n)),void 0===i&&!e)throw new c("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new l("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new c('"allowMissing" argument must be a boolean');if(null===z(/^%?[^%]*%?$/,t))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=L(t,0,1),r=L(t,-1);if("%"===e&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new l("invalid intrinsic syntax, expected opening `%`");var n=[];return E(t,O,(function(t,e,r,i){n[n.length]=r?E(i,D,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=I("%"+n+"%",e),o=i.name,a=i.value,s=!1,u=i.alias;u&&(n=u[0],C(r,S([0,1],u)));for(var h=1,d=!0;h=r.length){var v=f(a,p);a=(d=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:a[p]}else d=T(a,p),a=a[p];d&&!s&&(_[o]=a)}}return a}},4813:t=>{t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],f=e[11],p=e[12],m=e[13],g=e[14],v=e[15];return t[0]=s*(d*v-f*g)-h*(l*v-c*g)+m*(l*f-c*d),t[1]=-(n*(d*v-f*g)-h*(i*v-o*g)+m*(i*f-o*d)),t[2]=n*(l*v-c*g)-s*(i*v-o*g)+m*(i*c-o*l),t[3]=-(n*(l*f-c*d)-s*(i*f-o*d)+h*(i*c-o*l)),t[4]=-(a*(d*v-f*g)-u*(l*v-c*g)+p*(l*f-c*d)),t[5]=r*(d*v-f*g)-u*(i*v-o*g)+p*(i*f-o*d),t[6]=-(r*(l*v-c*g)-a*(i*v-o*g)+p*(i*c-o*l)),t[7]=r*(l*f-c*d)-a*(i*f-o*d)+u*(i*c-o*l),t[8]=a*(h*v-f*m)-u*(s*v-c*m)+p*(s*f-c*h),t[9]=-(r*(h*v-f*m)-u*(n*v-o*m)+p*(n*f-o*h)),t[10]=r*(s*v-c*m)-a*(n*v-o*m)+p*(n*c-o*s),t[11]=-(r*(s*f-c*h)-a*(n*f-o*h)+u*(n*c-o*s)),t[12]=-(a*(h*g-d*m)-u*(s*g-l*m)+p*(s*d-l*h)),t[13]=r*(h*g-d*m)-u*(n*g-i*m)+p*(n*d-i*h),t[14]=-(r*(s*g-l*m)-a*(n*g-i*m)+p*(n*l-i*s)),t[15]=r*(s*d-l*h)-a*(n*d-i*h)+u*(n*l-i*s),t}},1903:t=>{t.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},42981:t=>{t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},46864:t=>{t.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},49921:t=>{t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11],f=t[12],p=t[13],m=t[14],g=t[15];return(e*a-r*o)*(h*g-d*m)-(e*s-n*o)*(u*g-d*p)+(e*l-i*o)*(u*m-h*p)+(r*s-n*a)*(c*g-d*f)-(r*l-i*a)*(c*m-h*f)+(n*l-i*s)*(c*p-u*f)}},17399:t=>{t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=r+r,s=n+n,l=i+i,c=r*a,u=n*a,h=n*s,d=i*a,f=i*s,p=i*l,m=o*a,g=o*s,v=o*l;return t[0]=1-h-p,t[1]=u+v,t[2]=d-g,t[3]=0,t[4]=u-v,t[5]=1-c-p,t[6]=f+m,t[7]=0,t[8]=d+g,t[9]=f-m,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},7354:t=>{t.exports=function(t,e,r){var n,i,o,a=r[0],s=r[1],l=r[2],c=Math.sqrt(a*a+s*s+l*l);return Math.abs(c)<1e-6?null:(a*=c=1/c,s*=c,l*=c,n=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=s*a*o+l*n,t[2]=l*a*o-s*n,t[3]=0,t[4]=a*s*o-l*n,t[5]=s*s*o+i,t[6]=l*s*o+a*n,t[7]=0,t[8]=a*l*o+s*n,t[9]=s*l*o-a*n,t[10]=l*l*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}},76743:t=>{t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3],s=n+n,l=i+i,c=o+o,u=n*s,h=n*l,d=n*c,f=i*l,p=i*c,m=o*c,g=a*s,v=a*l,b=a*c;return t[0]=1-(f+m),t[1]=h+b,t[2]=d-v,t[3]=0,t[4]=h-b,t[5]=1-(u+m),t[6]=p+g,t[7]=0,t[8]=d+v,t[9]=p-g,t[10]=1-(u+f),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}},90367:t=>{t.exports=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},68673:t=>{t.exports=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}},80180:t=>{t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},68727:t=>{t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},96402:t=>{t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},29192:t=>{t.exports=function(t,e,r,n,i,o,a){var s=1/(r-e),l=1/(i-n),c=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(r+e)*s,t[9]=(i+n)*l,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t}},87894:t=>{t.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},79538:(t,e,r)=>{t.exports={create:r(46864),clone:r(1903),copy:r(42981),identity:r(87894),transpose:r(45665),invert:r(27608),adjoint:r(4813),determinant:r(49921),multiply:r(66760),translate:r(77656),scale:r(62504),rotate:r(26079),rotateX:r(15567),rotateY:r(52408),rotateZ:r(27089),fromRotation:r(7354),fromRotationTranslation:r(76743),fromScaling:r(90367),fromTranslation:r(68673),fromXRotation:r(80180),fromYRotation:r(68727),fromZRotation:r(96402),fromQuat:r(17399),frustum:r(29192),perspective:r(4772),perspectiveFromFieldOfView:r(11882),ortho:r(74040),lookAt:r(66582),str:r(65213)}},27608:t=>{t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],f=e[11],p=e[12],m=e[13],g=e[14],v=e[15],b=r*s-n*a,y=r*l-i*a,x=r*c-o*a,_=n*l-i*s,w=n*c-o*s,k=i*c-o*l,A=u*m-h*p,M=u*g-d*p,T=u*v-f*p,S=h*g-d*m,C=h*v-f*m,E=d*v-f*g,L=b*E-y*C+x*S+_*T-w*M+k*A;return L?(L=1/L,t[0]=(s*E-l*C+c*S)*L,t[1]=(i*C-n*E-o*S)*L,t[2]=(m*k-g*w+v*_)*L,t[3]=(d*w-h*k-f*_)*L,t[4]=(l*T-a*E-c*M)*L,t[5]=(r*E-i*T+o*M)*L,t[6]=(g*x-p*k-v*y)*L,t[7]=(u*k-d*x+f*y)*L,t[8]=(a*C-s*T+c*A)*L,t[9]=(n*T-r*C-o*A)*L,t[10]=(p*w-m*x+v*b)*L,t[11]=(h*x-u*w-f*b)*L,t[12]=(s*M-a*S-l*A)*L,t[13]=(r*S-n*M+i*A)*L,t[14]=(m*y-p*_-g*b)*L,t[15]=(u*_-h*y+d*b)*L,t):null}},66582:(t,e,r)=>{var n=r(87894);t.exports=function(t,e,r,i){var o,a,s,l,c,u,h,d,f,p,m=e[0],g=e[1],v=e[2],b=i[0],y=i[1],x=i[2],_=r[0],w=r[1],k=r[2];return Math.abs(m-_)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(v-k)<1e-6?n(t):(h=m-_,d=g-w,f=v-k,o=y*(f*=p=1/Math.sqrt(h*h+d*d+f*f))-x*(d*=p),a=x*(h*=p)-b*f,s=b*d-y*h,(p=Math.sqrt(o*o+a*a+s*s))?(o*=p=1/p,a*=p,s*=p):(o=0,a=0,s=0),l=d*s-f*a,c=f*o-h*s,u=h*a-d*o,(p=Math.sqrt(l*l+c*c+u*u))?(l*=p=1/p,c*=p,u*=p):(l=0,c=0,u=0),t[0]=o,t[1]=l,t[2]=h,t[3]=0,t[4]=a,t[5]=c,t[6]=d,t[7]=0,t[8]=s,t[9]=u,t[10]=f,t[11]=0,t[12]=-(o*m+a*g+s*v),t[13]=-(l*m+c*g+u*v),t[14]=-(h*m+d*g+f*v),t[15]=1,t)}},66760:t=>{t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=e[9],f=e[10],p=e[11],m=e[12],g=e[13],v=e[14],b=e[15],y=r[0],x=r[1],_=r[2],w=r[3];return t[0]=y*n+x*s+_*h+w*m,t[1]=y*i+x*l+_*d+w*g,t[2]=y*o+x*c+_*f+w*v,t[3]=y*a+x*u+_*p+w*b,y=r[4],x=r[5],_=r[6],w=r[7],t[4]=y*n+x*s+_*h+w*m,t[5]=y*i+x*l+_*d+w*g,t[6]=y*o+x*c+_*f+w*v,t[7]=y*a+x*u+_*p+w*b,y=r[8],x=r[9],_=r[10],w=r[11],t[8]=y*n+x*s+_*h+w*m,t[9]=y*i+x*l+_*d+w*g,t[10]=y*o+x*c+_*f+w*v,t[11]=y*a+x*u+_*p+w*b,y=r[12],x=r[13],_=r[14],w=r[15],t[12]=y*n+x*s+_*h+w*m,t[13]=y*i+x*l+_*d+w*g,t[14]=y*o+x*c+_*f+w*v,t[15]=y*a+x*u+_*p+w*b,t}},74040:t=>{t.exports=function(t,e,r,n,i,o,a){var s=1/(e-r),l=1/(n-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(a+o)*c,t[15]=1,t}},4772:t=>{t.exports=function(t,e,r,n,i){var o=1/Math.tan(e/2),a=1/(n-i);return t[0]=o/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*a,t[15]=0,t}},11882:t=>{t.exports=function(t,e,r,n){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(a+s),c=2/(i+o);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(a-s)*l*.5,t[9]=(i-o)*c*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t}},26079:t=>{t.exports=function(t,e,r,n){var i,o,a,s,l,c,u,h,d,f,p,m,g,v,b,y,x,_,w,k,A,M,T,S,C=n[0],E=n[1],L=n[2],z=Math.sqrt(C*C+E*E+L*L);return Math.abs(z)<1e-6?null:(C*=z=1/z,E*=z,L*=z,i=Math.sin(r),a=1-(o=Math.cos(r)),s=e[0],l=e[1],c=e[2],u=e[3],h=e[4],d=e[5],f=e[6],p=e[7],m=e[8],g=e[9],v=e[10],b=e[11],y=C*C*a+o,x=E*C*a+L*i,_=L*C*a-E*i,w=C*E*a-L*i,k=E*E*a+o,A=L*E*a+C*i,M=C*L*a+E*i,T=E*L*a-C*i,S=L*L*a+o,t[0]=s*y+h*x+m*_,t[1]=l*y+d*x+g*_,t[2]=c*y+f*x+v*_,t[3]=u*y+p*x+b*_,t[4]=s*w+h*k+m*A,t[5]=l*w+d*k+g*A,t[6]=c*w+f*k+v*A,t[7]=u*w+p*k+b*A,t[8]=s*M+h*T+m*S,t[9]=l*M+d*T+g*S,t[10]=c*M+f*T+v*S,t[11]=u*M+p*T+b*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}},15567:t=>{t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=e[9],h=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*n,t[5]=a*i+u*n,t[6]=s*i+h*n,t[7]=l*i+d*n,t[8]=c*i-o*n,t[9]=u*i-a*n,t[10]=h*i-s*n,t[11]=d*i-l*n,t}},52408:t=>{t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],a=e[1],s=e[2],l=e[3],c=e[8],u=e[9],h=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*n,t[1]=a*i-u*n,t[2]=s*i-h*n,t[3]=l*i-d*n,t[8]=o*n+c*i,t[9]=a*n+u*i,t[10]=s*n+h*i,t[11]=l*n+d*i,t}},27089:t=>{t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],a=e[1],s=e[2],l=e[3],c=e[4],u=e[5],h=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*n,t[1]=a*i+u*n,t[2]=s*i+h*n,t[3]=l*i+d*n,t[4]=c*i-o*n,t[5]=u*i-a*n,t[6]=h*i-s*n,t[7]=d*i-l*n,t}},62504:t=>{t.exports=function(t,e,r){var n=r[0],i=r[1],o=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},65213:t=>{t.exports=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}},77656:t=>{t.exports=function(t,e,r){var n,i,o,a,s,l,c,u,h,d,f,p,m=r[0],g=r[1],v=r[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*v+e[12],t[13]=e[1]*m+e[5]*g+e[9]*v+e[13],t[14]=e[2]*m+e[6]*g+e[10]*v+e[14],t[15]=e[3]*m+e[7]*g+e[11]*v+e[15]):(n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=e[9],f=e[10],p=e[11],t[0]=n,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=h,t[9]=d,t[10]=f,t[11]=p,t[12]=n*m+s*g+h*v+e[12],t[13]=i*m+l*g+d*v+e[13],t[14]=o*m+c*g+f*v+e[14],t[15]=a*m+u*g+p*v+e[15]),t}},45665:t=>{t.exports=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},69499:(t,e,r)=>{"use strict";var n=r(82393),i=r(9994),o=r(83029),a=r(6627),s=r(41456),l=r(34463),c=r(81937),u=r(31888),h=r(94698),d=r(35867),f=r(3202),p=r(70665),m=r(3812),g=r(34597),v=r(45250),b=r(97e3),y=r(88828).nextPow2,x=new s,_=!1;if(document.body){var w=document.body.appendChild(document.createElement("div"));w.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(w).fontStretch&&(_=!0),document.body.removeChild(w)}var k=function(t){!function(t){return"function"==typeof t&&t._gl&&t.prop&&t.texture&&t.buffer}(t)?this.gl=a(t):(t={regl:t},this.gl=t.regl._gl),this.shader=x.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||o({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),x.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(d(t)?t:{})};k.prototype.createShader=function(){var t=this.regl,e=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop("count"),offset:t.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this("sizeBuffer")},width:{offset:0,stride:8,buffer:t.this("sizeBuffer")},char:t.this("charBuffer"),position:t.this("position")},uniforms:{atlasSize:function(t,e){return[e.atlas.width,e.atlas.height]},atlasDim:function(t,e){return[e.atlas.cols,e.atlas.rows]},atlas:function(t,e){return e.atlas.texture},charStep:function(t,e){return e.atlas.step},em:function(t,e){return e.atlas.em},color:t.prop("color"),opacity:t.prop("opacity"),viewport:t.this("viewportArray"),scale:t.this("scale"),align:t.prop("align"),baseline:t.prop("baseline"),translate:t.this("translate"),positionOffset:t.prop("positionOffset")},primitive:"points",viewport:t.this("viewport"),vert:"\n\t\t\tprecision highp float;\n\t\t\tattribute float width, charOffset, char;\n\t\t\tattribute vec2 position;\n\t\t\tuniform float fontSize, charStep, em, align, baseline;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform vec4 color;\n\t\t\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvoid main () {\n\t\t\t\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\n\t\t\t\t\t+ vec2(positionOffset.x, -positionOffset.y)))\n\t\t\t\t\t/ (viewport.zw * scale.xy);\n\n\t\t\t\tvec2 position = (position + translate) * scale;\n\t\t\t\tposition += offset * scale;\n\n\t\t\t\tcharCoord = position * viewport.zw + viewport.xy;\n\n\t\t\t\tgl_Position = vec4(position * 2. - 1., 0, 1);\n\n\t\t\t\tgl_PointSize = charStep;\n\n\t\t\t\tcharId.x = mod(char, atlasDim.x);\n\t\t\t\tcharId.y = floor(char / atlasDim.x);\n\n\t\t\t\tcharWidth = width * em;\n\n\t\t\t\tfontColor = color / 255.;\n\t\t\t}",frag:"\n\t\t\tprecision highp float;\n\t\t\tuniform float fontSize, charStep, opacity;\n\t\t\tuniform vec2 atlasSize;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform sampler2D atlas;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\n\t\t\tfloat lightness(vec4 color) {\n\t\t\t\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\n\t\t\t}\n\n\t\t\tvoid main () {\n\t\t\t\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\n\t\t\t\tfloat halfCharStep = floor(charStep * .5 + .5);\n\n\t\t\t\t// invert y and shift by 1px (FF expecially needs that)\n\t\t\t\tuv.y = charStep - uv.y;\n\n\t\t\t\t// ignore points outside of character bounding box\n\t\t\t\tfloat halfCharWidth = ceil(charWidth * .5);\n\t\t\t\tif (floor(uv.x) > halfCharStep + halfCharWidth ||\n\t\t\t\t\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\n\n\t\t\t\tuv += charId * charStep;\n\t\t\t\tuv = uv / atlasSize;\n\n\t\t\t\tvec4 color = fontColor;\n\t\t\t\tvec4 mask = texture2D(atlas, uv);\n\n\t\t\t\tfloat maskY = lightness(mask);\n\t\t\t\t// float colorY = lightness(color);\n\t\t\t\tcolor.a *= maskY;\n\t\t\t\tcolor.a *= opacity;\n\n\t\t\t\t// color.a += .1;\n\n\t\t\t\t// antialiasing, see yiq color space y-channel formula\n\t\t\t\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n\n\t\t\t\tgl_FragColor = color;\n\t\t\t}"});return{regl:t,draw:e,atlas:{}}},k.prototype.update=function(t){var e=this;if("string"==typeof t)t={text:t};else if(!t)return;null!=(t=i(t,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0)).opacity&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map((function(t){return parseFloat(t)})):this.opacity=parseFloat(t.opacity)),null!=t.viewport&&(this.viewport=h(t.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=t.kerning&&(this.kerning=t.kerning),null!=t.offset&&("number"==typeof t.offset&&(t.offset=[t.offset,0]),this.positionOffset=b(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||t.font||(t.font=k.baseFontSize+"px sans-serif");var r,o=!1,a=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach((function(t,r){if("string"==typeof t)try{t=n.parse(t)}catch(e){t=n.parse(k.baseFontSize+"px "+t)}else{var i=t.style,s=t.weight,l=t.stretch,c=t.variant;t=n.parse(n.stringify(t)),i&&(t.style=i),s&&(t.weight=s),l&&(t.stretch=l),c&&(t.variant=c)}var u=n.stringify({size:k.baseFontSize,family:t.family,stretch:_?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style}),h=f(t.size),d=Math.round(h[0]*p(h[1]));if(d!==e.fontSize[r]&&(a=!0,e.fontSize[r]=d),!(e.font[r]&&u==e.font[r].baseString||(o=!0,e.font[r]=k.fonts[u],e.font[r]))){var m=t.family.join(", "),g=[t.style];t.style!=t.variant&&g.push(t.variant),t.variant!=t.weight&&g.push(t.weight),_&&t.weight!=t.stretch&&g.push(t.stretch),e.font[r]={baseString:u,family:m,weight:t.weight,stretch:t.stretch,style:t.style,variant:t.variant,width:{},kerning:{},metrics:v(m,{origin:"top",fontSize:k.baseFontSize,fontStyle:g.join(" ")})},k.fonts[u]=e.font[r]}})),(o||a)&&this.font.forEach((function(r,i){var o=n.stringify({size:e.fontSize[i],family:r.family,stretch:_?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(e.fontAtlas[i]=e.shader.atlas[o],!e.fontAtlas[i]){var a=r.metrics;e.shader.atlas[o]=e.fontAtlas[i]={fontString:o,step:2*Math.ceil(e.fontSize[i]*a.bottom*.5),em:e.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:e.regl.texture()}}null==t.text&&(t.text=e.text)})),"string"==typeof t.text&&t.position&&t.position.length>2){for(var s=Array(.5*t.position.length),d=0;d2){for(var w=!t.position[0].length,A=u.mallocFloat(2*this.count),M=0,T=0;M1?e.align[r]:e.align[0]:e.align;if("number"==typeof n)return n;switch(n){case"right":case"end":return-t;case"center":case"centre":case"middle":return.5*-t}return 0}))),null==this.baseline&&null==t.baseline&&(t.baseline=0),null!=t.baseline&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(t,r){var n=(e.font[r]||e.font[0]).metrics,i=0;return i+=.5*n.bottom,-1*(i+="number"==typeof t?t-n.baseline:-n[t])}))),null!=t.color)if(t.color||(t.color="transparent"),"string"!=typeof t.color&&isNaN(t.color)){var H;if("number"==typeof t.color[0]&&t.color.length>this.counts.length){var W=t.color.length;H=u.mallocUint8(W);for(var q=(t.color.subarray||t.color.slice).bind(t.color),Y=0;Y4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var $=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array($);for(var J=0;J1?this.counts[J]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[J]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*J,4*J+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[J]:this.opacity,baseline:null!=this.baselineOffset[J]?this.baselineOffset[J]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[J]?this.alignOffset[J]:this.alignOffset[0]:0,atlas:this.fontAtlas[J]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*J,2*J+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},k.prototype.destroy=function(){},k.prototype.kerning=!0,k.prototype.position={constant:new Float32Array(2)},k.prototype.translate=null,k.prototype.scale=null,k.prototype.font=null,k.prototype.text="",k.prototype.positionOffset=[0,0],k.prototype.opacity=1,k.prototype.color=new Uint8Array([0,0,0,255]),k.prototype.alignOffset=[0,0],k.maxAtlasSize=1024,k.atlasCanvas=document.createElement("canvas"),k.atlasContext=k.atlasCanvas.getContext("2d",{alpha:!1}),k.baseFontSize=64,k.fonts={},t.exports=k},6627:(t,e,r)=>{"use strict";var n=r(9994);function i(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*r.g.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*r.g.innerHeight);else{var e=t.container.getBoundingClientRect();t.canvas.width=t.width||e.right-e.left,t.canvas.height=t.height||e.bottom-e.top}}function o(t){return"function"==typeof t.getContext&&"width"in t&&"height"in t}function a(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}t.exports=function(t){var e;if(t?"string"==typeof t&&(t={container:t}):t={},(t=o(t)||"string"==typeof(e=t).nodeName&&"function"==typeof e.appendChild&&"function"==typeof e.getBoundingClientRect?{container:t}:function(t){return"function"==typeof t.drawArrays||"function"==typeof t.drawElements}(t)?{gl:t}:n(t,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0)).pixelRatio||(t.pixelRatio=r.g.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if("string"==typeof t.container){var s=document.querySelector(t.container);if(!s)throw Error("Element "+t.container+" is not found");t.container=s}o(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=a(),t.container.appendChild(t.canvas),i(t))}else if(!t.canvas){if("undefined"==typeof document)throw Error("Not DOM environment. Use headless-gl.");t.container=document.body||document.documentElement,t.canvas=a(),t.container.appendChild(t.canvas),i(t)}return t.gl||["webgl","experimental-webgl","webgl-experimental"].some((function(e){try{t.gl=t.canvas.getContext(e,t.attrs)}catch(t){}return t.gl})),t.gl}},43236:t=>{t.exports=function(t){"string"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n{"use strict";var n=r(59412)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},56885:(t,e,r)=>{"use strict";var n,i=r(41888);n="function"==typeof r.g.matchMedia?!r.g.matchMedia("(hover: none)").matches:i,t.exports=n},17520:(t,e,r)=>{"use strict";var n=r(41888);t.exports=n&&function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){t=!1}return t}()},20419:(t,e,r)=>{"use strict";var n=r(38232),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=i},39681:t=>{"use strict";var e={__proto__:null,foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof r)}},23266:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(93272);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},93272:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},15541:(t,e,r)=>{"use strict";var n=r(93272);t.exports=function(){return n()&&!!Symbol.toStringTag}},19942:(t,e,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(35366);t.exports=o.call(n,i)},23778:(t,e)=>{e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,l=(1<>1,u=-7,h=r?i-1:0,d=r?-1:1,f=t[e+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+t[e+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+t[e+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=c}return(f?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(e*l-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[r+f]=255&s,f+=p,s/=256,i-=8);for(a=a<0;t[r+f]=255&a,f+=p,a/=256,c-=8);t[r+f-p]|=128*m}},9715:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},68007:(t,e,r)=>{"use strict";var n=r(15541)(),i=r(24310)("Object.prototype.toString"),o=function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===i(t)},a=function(t){return!!o(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,t.exports=s?o:a},41888:t=>{t.exports=!0},60245:t=>{"use strict";var e,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,e)}catch(t){t!==r&&(i=null)}else i=null;var o=/^\s*class\b/,a=function(t){try{var e=n.call(t);return o.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},l=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),h=function(){return!1};if("object"==typeof document){var d=document.all;l.call(d)===l.call(document.all)&&(h=function(t){if((u||!t)&&(void 0===t||"object"==typeof t))try{var e=l.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=i?function(t){if(h(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{i(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(h(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return s(t);if(a(t))return!1;var e=l.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},74205:(t,e,r)=>{"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=r(15541)(),l=Object.getPrototypeOf;t.exports=function(t){if("function"!=typeof t)return!1;if(a.test(o.call(t)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(t);if(!l)return!1;if(void 0===n){var e=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(t){}}();n=!!e&&l(e)}return l(t)===n}},47691:t=>{"use strict";t.exports="undefined"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},12431:t=>{"use strict";t.exports=i,t.exports.isMobile=i,t.exports.default=i;const e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(t){t||(t={});let i=t.ua;if(i||"undefined"==typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"==typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!=typeof i)return!1;let o=e.test(i)&&!r.test(i)||!!t.tablet&&n.test(i);return!o&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(o=!0),o}},87266:t=>{"use strict";t.exports=function(t){return t!=t}},74858:(t,e,r)=>{"use strict";var n=r(61398),i=r(10781),o=r(87266),a=r(29419),s=r(50317),l=n(a(),Number);i(l,{getPolyfill:a,implementation:o,shim:s}),t.exports=l},29419:(t,e,r)=>{"use strict";var n=r(87266);t.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},50317:(t,e,r)=>{"use strict";var n=r(10781),i=r(29419);t.exports=function(){var t=i();return n(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},23754:t=>{"use strict";t.exports=function(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}},35867:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r;return"[object Object]"===e.call(t)&&(null===(r=Object.getPrototypeOf(t))||r===Object.getPrototypeOf({}))}},45219:t=>{"use strict";t.exports=function(t){for(var e,r=t.length,n=0;n13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},12611:t=>{"use strict";t.exports=function(t){return"string"==typeof t&&(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}},94179:(t,e,r)=>{"use strict";var n=r(17478);t.exports=function(t){return!!n(t)}},54387:t=>{"use strict";t.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},10024:t=>{var e={left:0,top:0};t.exports=function(t,r,n){r=r||t.currentTarget||t.srcElement,Array.isArray(n)||(n=[0,0]);var i,o=t.clientX||0,a=t.clientY||0,s=(i=r)===window||i===document||i===document.body?e:i.getBoundingClientRect();return n[0]=o-s.left,n[1]=a-s.top,n}},60613:function(t,e,r){var n;!function(i,o){o[i]=o[i]||function(){"use strict";var t,e,r,n=Object.prototype.toString,i="undefined"!=typeof setImmediate?function(t){return setImmediate(t)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(t,e,r,n){return Object.defineProperty(t,e,{value:r,writable:!0,configurable:!1!==n})}}catch(e){t=function(t,e,r){return t[e]=r,t}}function o(t,n){r.add(t,n),e||(e=i(r.drain))}function a(t){var e,r=typeof t;return null==t||"object"!=r&&"function"!=r||(e=t.then),"function"==typeof e&&e}function s(){for(var t=0;t0&&o(s,r))}catch(t){u.call(new d(r),t)}}}function u(t){var e=this;e.triggered||(e.triggered=!0,e.def&&(e=e.def),e.msg=t,e.state=2,e.chain.length>0&&o(s,e))}function h(t,e,r,n){for(var i=0;i{var e=Math.PI,r=s(120);function n(t,e,r,n){return["C",t,e,r,n,r,n]}function i(t,e,r,n,i,o){return["C",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,o/3+2/3*n,i,o]}function o(t,n,i,s,l,c,u,h,d,f){if(f)k=f[0],A=f[1],_=f[2],w=f[3];else{var p=a(t,n,-l);t=p.x,n=p.y;var m=(t-(h=(p=a(h,d,-l)).x))/2,g=(n-(d=p.y))/2,v=m*m/(i*i)+g*g/(s*s);v>1&&(i*=v=Math.sqrt(v),s*=v);var b=i*i,y=s*s,x=(c==u?-1:1)*Math.sqrt(Math.abs((b*y-b*g*g-y*m*m)/(b*g*g+y*m*m)));x==1/0&&(x=1);var _=x*i*g/s+(t+h)/2,w=x*-s*m/i+(n+d)/2,k=Math.asin(((n-w)/s).toFixed(9)),A=Math.asin(((d-w)/s).toFixed(9));(k=t<_?e-k:k)<0&&(k=2*e+k),(A=h<_?e-A:A)<0&&(A=2*e+A),u&&k>A&&(k-=2*e),!u&&A>k&&(A-=2*e)}if(Math.abs(A-k)>r){var M=A,T=h,S=d;A=k+r*(u&&A>k?1:-1);var C=o(h=_+i*Math.cos(A),d=w+s*Math.sin(A),i,s,l,0,u,T,S,[A,M,_,w])}var E=Math.tan((A-k)/4),L=4/3*i*E,z=4/3*s*E,O=[2*t-(t+L*Math.sin(k)),2*n-(n-z*Math.cos(k)),h+L*Math.sin(A),d-z*Math.cos(A),h,d];if(f)return O;C&&(O=O.concat(C));for(var D=0;D7&&(r.push(v.splice(0,7)),v.unshift("C"));break;case"S":var y=f,x=p;"C"!=e&&"S"!=e||(y+=y-a,x+=x-l),v=["C",y,x,v[1],v[2],v[3],v[4]];break;case"T":"Q"==e||"T"==e?(h=2*f-h,d=2*p-d):(h=f,d=p),v=i(f,p,h,d,v[1],v[2]);break;case"Q":h=v[1],d=v[2],v=i(f,p,v[1],v[2],v[3],v[4]);break;case"L":v=n(f,p,v[1],v[2]);break;case"H":v=n(f,p,v[1],p);break;case"V":v=n(f,p,f,v[1]);break;case"Z":v=n(f,p,c,u)}e=b,f=v[v.length-2],p=v[v.length-1],v.length>4?(a=v[v.length-4],l=v[v.length-3]):(a=f,l=p),r.push(v)}return r}},34597:t=>{"use strict";var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,i){for(var o,a,s=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l{"use strict";var e=function(t){return t!=t};t.exports=function(t,r){return 0===t&&0===r?1/t==1/r:t===r||!(!e(t)||!e(r))}},62956:(t,e,r)=>{"use strict";var n=r(10781),i=r(61398),o=r(36560),a=r(43765),s=r(6723),l=i(a(),Object);n(l,{getPolyfill:a,implementation:o,shim:s}),t.exports=l},43765:(t,e,r)=>{"use strict";var n=r(36560);t.exports=function(){return"function"==typeof Object.is?Object.is:n}},6723:(t,e,r)=>{"use strict";var n=r(43765),i=r(10781);t.exports=function(){var t=n();return i(Object,{is:t},{is:function(){return Object.is!==t}}),t}},77908:(t,e,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=r(12724),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],h=function(t){var e=t.constructor;return e&&e.prototype===t},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!d["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{h(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===o.call(t),n=a(t),s=e&&"[object String]"===o.call(t),d=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=c&&r;if(s&&t.length>0&&!i.call(t,0))for(var m=0;m0)for(var g=0;g{"use strict";var n=Array.prototype.slice,i=r(12724),o=Object.keys,a=o?function(t){return o(t)}:r(77908),s=Object.keys;a.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return i(t)?s(n.call(t)):s(t)})}else Object.keys=a;return Object.keys||a},t.exports=a},12724:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},99864:(t,e,r)=>{"use strict";var n=r(99952),i=r(93272)(),o=r(24310),a=Object,s=o("Array.prototype.push"),l=o("Object.prototype.propertyIsEnumerable"),c=i?Object.getOwnPropertySymbols:null;t.exports=function(t,e){if(null==t)throw new TypeError("target must be an object");var r=a(t);if(1===arguments.length)return r;for(var o=1;o{"use strict";var n=r(99864);t.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),r={},n=0;n{"use strict";function e(t,e){if("string"!=typeof t)return[t];var r=[t];"string"==typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var n=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],i=e.escape||"___",o=!!e.flat;n.forEach((function(t){var e=new RegExp(["\\",t[0],"[^\\",t[0],"\\",t[1],"]*\\",t[1]].join("")),n=[];function o(e,o,a){var s=r.push(e.slice(t[0].length,-t[1].length))-1;return n.push(s),i+s+i}r.forEach((function(t,n){for(var i,a=0;t!=i;)if(i=t,t=t.replace(e,o),a++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=t})),n=n.reverse(),r=r.map((function(e){return n.forEach((function(r){e=e.replace(new RegExp("(\\"+i+r+"\\"+i+")","g"),t[0]+"$1"+t[1])})),e}))}));var a=new RegExp("\\"+i+"([0-9]+)\\"+i);return o?r:function t(e,r,n){for(var i,o=[],s=0;i=a.exec(e);){if(s++>1e4)throw Error("Circular references in parenthesis");o.push(e.slice(0,i.index)),o.push(t(r[i[1]],r)),e=e.slice(i.index+i[0].length)}return o.push(e),o}(r[0],r)}function r(t,e){if(e&&e.flat){var r,n=e&&e.escape||"___",i=t[0];if(!i)return"";for(var o=new RegExp("\\"+n+"([0-9]+)\\"+n),a=0;i!=r;){if(a++>1e4)throw Error("Circular references in "+t);r=i,i=i.replace(o,s)}return i}return t.reduce((function t(e,r){return Array.isArray(r)&&(r=r.reduce(t,"")),e+r}),"");function s(e,r){if(null==t[r])throw Error("Reference "+r+"is undefined");return t[r]}}function n(t,n){return Array.isArray(t)?r(t,n):e(t,n)}n.parse=e,n.stringify=r,t.exports=n},94698:(t,e,r)=>{"use strict";var n=r(9994);t.exports=function(t){var e;return arguments.length>1&&(t=arguments),"string"==typeof t?t=t.split(/\s/).map(parseFloat):"number"==typeof t&&(t=[t]),t.length&&"number"==typeof t[0]?e=1===t.length?{width:t[0],height:t[0],x:0,y:0}:2===t.length?{width:t[0],height:t[1],x:0,y:0}:{x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&&(e={x:(t=n(t,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"})).left||0,y:t.top||0},null==t.width?t.right?e.width=t.right-e.x:e.width=0:e.width=t.width,null==t.height?t.bottom?e.height=t.bottom-e.y:e.height=0:e.height=t.height),e}},37974:t=>{t.exports=function(t){var i=[];return t.replace(r,(function(t,r,o){var a=r.toLowerCase();for(o=function(t){var e=t.match(n);return e?e.map(Number):[]}(o),"m"==a&&o.length>2&&(i.push([r].concat(o.splice(0,2))),a="l",r="m"==r?"l":"L");;){if(o.length==e[a])return o.unshift(r),i.push(o);if(o.length{t.exports=function(t,e){e||(e=[0,""]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},9994:t=>{"use strict";t.exports=function(t,e,n){var i,o,a={};if("string"==typeof e&&(e=r(e)),Array.isArray(e)){var s={};for(o=0;o{"use strict";var n=r(12822),i={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var o in i){var a=o.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(a,i[o])}},12028:(t,e,r)=>{"use strict";t.exports=r(7623)},72010:(t,e,r)=>{"use strict";t.exports=r(46443)},94646:(t,e,r)=>{"use strict";t.exports=r(88479)},91208:t=>{"use strict";t.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},77061:(t,e,r)=>{"use strict";var n=r(91208),i=r(75058),o=r(21197),a=r(46121).templatedArray,s=r(53644);function l(t){return["In order for absolute positioning of the arrow to work, *a"+t+"ref* must be exactly the same as *"+t+"ref*, otherwise *a"+t+"ref* will revert to *pixel* (explained next).","For relative positioning, *a"+t+"ref* can be set to *pixel*,","in which case the *a"+t+"* value is specified in pixels","relative to *"+t+"*.","Absolute positioning is useful","for trendline annotations which should continue to indicate","the correct trend when zoomed. Relative positioning is useful","for specifying the text offset for an annotated point."].join(" ")}function c(t,e,r){return["Sets the",t,"component of the arrow tail about the arrow head.","If `a"+t+"ref` is `pixel`, a positive (negative)","component corresponds to an arrow pointing","from",r,"to",e,"("+e,"to",r+").","If `a"+t+"ref` is not `pixel` and is exactly the same as `"+t+"ref`,","this is an absolute value on that axis,","like `"+t+"`, specified in the same coordinates as `"+t+"ref`."].join(" ")}t.exports=a("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not this annotation is visible."].join(" ")},text:{valType:"string",editType:"calc+arraydraw",description:["Sets the text associated with this annotation.","Plotly uses a subset of HTML tags to do things like","newline (
), bold (), italics (),","hyperlinks (). Tags , , , , "," are also supported."].join(" ")},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw",description:["Sets the angle at which the `text` is drawn","with respect to the horizontal."].join(" ")},font:i({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the annotation text font."}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit width for the text box. null (default) lets the","text set the box width. Wider text will be clipped.","There is no automatic wrapping; use
to start a new line."].join(" ")},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit height for the text box. null (default) lets the","text set the box height. Taller text will be clipped."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the annotation (text + arrow)."},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw",description:["Sets the horizontal alignment of the `text` within the box.","Has an effect only if `text` spans two or more lines","(i.e. `text` contains one or more
HTML tags) or if an","explicit width is set to override the text width."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw",description:["Sets the vertical alignment of the `text` within the box.","Has an effect only if an explicit height is set to override","the text height."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:"Sets the background color of the annotation."},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color of the border enclosing the annotation `text`."].join(" ")},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the padding (in px) between the `text`","and the enclosing border."].join(" ")},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the width (in px) of the border enclosing","the annotation `text`."].join(" ")},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not the annotation is drawn with an arrow.","If *true*, `text` is placed near the arrow's tail.","If *false*, `text` lines up with the `x` and `y` provided."].join(" ")},arrowcolor:{valType:"color",editType:"arraydraw",description:"Sets the color of the annotation arrow."},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw",description:"Sets the start annotation arrow head style."},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw",description:"Sets the annotation arrow head position."},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the end annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the start annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw",description:"Sets the width (in px) of annotation arrow line."},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the end arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the start arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},ax:{valType:"any",editType:"calc+arraydraw",description:[c("x","left","right")].join(" ")},ay:{valType:"any",editType:"calc+arraydraw",description:[c("y","top","bottom")].join(" ")},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.x.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",s.axisRefDescription("x","left","right"),l("x")].join(" ")},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.y.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",s.axisRefDescription("y","bottom","top"),l("y")].join(" ")},xref:{valType:"enumerated",values:["paper",o.idRegex.x.toString()],editType:"calc",description:["Sets the annotation's x coordinate axis.",s.axisRefDescription("x","left","right")].join(" ")},x:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's x position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's horizontal position anchor","This anchor binds the `x` position to the *left*, *center*","or *right* of the annotation.","For example, if `x` is set to 1, `xref` to *paper* and","`xanchor` to *right* then the right-most portion of the","annotation lines up with the right-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *center* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow to the","right (positive) or left (negative) by this many pixels."].join(" ")},yref:{valType:"enumerated",values:["paper",o.idRegex.y.toString()],editType:"calc",description:["Sets the annotation's y coordinate axis.",s.axisRefDescription("y","bottom","top")].join(" ")},y:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's y position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the annotation.","For example, if `y` is set to 1, `yref` to *paper* and","`yanchor` to *top* then the top-most portion of the","annotation lines up with the top-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *middle* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow up","(positive) or down (negative) by this many pixels."].join(" ")},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw",description:["Makes this annotation respond to clicks on the plot.","If you click a data point that exactly matches the `x` and `y`","values of this annotation, and it is hidden (visible: false),","it will appear. In *onoff* mode, you must click the same point","again to make it disappear, so if you click multiple points,","you can show multiple annotations. In *onout* mode, a click","anywhere else in the plot (on another data point or not) will","hide this annotation.","If you need to show/hide this annotation in response to different","`x` or `y` values, you can set `xclick` and/or `yclick`. This is","useful for example to label the side of a bar. To label markers","though, `standoff` is preferred over `xclick` and `yclick`."].join(" ")},xclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `x` value","is `xclick` rather than the annotation's `x` value."].join(" ")},yclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `y` value","is `yclick` rather than the annotation's `y` value."].join(" ")},hovertext:{valType:"string",editType:"arraydraw",description:["Sets text to appear when hovering over this annotation.","If omitted or blank, no hover label will appear."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw",description:["Sets the background color of the hover label.","By default uses the annotation's `bgcolor` made opaque,","or white if it was transparent."].join(" ")},bordercolor:{valType:"color",editType:"arraydraw",description:["Sets the border color of the hover label.","By default uses either dark grey or white, for maximum","contrast with `hoverlabel.bgcolor`."].join(" ")},font:i({editType:"arraydraw",description:["Sets the hover label text font.","By default uses the global hover font and size,","with color from `hoverlabel.bordercolor`."].join(" ")}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw",description:["Determines whether the annotation text box captures mouse move","and click events, or allows those events to pass through to data","points in the plot that may be behind the annotation. By default","`captureevents` is *false* unless `hovertext` is provided.","If you use the event `plotly_clickannotation` without `hovertext`","you must explicitly enable `captureevents`."].join(" ")},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc",description:["Obsolete. Set `xref` and `yref` separately instead."].join(" ")}}})},37830:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(8214).draw;function a(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach((function(e){var r=i.getFromId(t,e.xref),n=i.getFromId(t,e.yref),o=i.getRefType(e.xref),a=i.getRefType(e.yref);e._extremes={},"range"===o&&s(e,r),"range"===a&&s(e,n)}))}function s(t,e){var r,n=e._id,o=n.charAt(0),a=t[o],s=t["a"+o],l=t[o+"ref"],c=t["a"+o+"ref"],u=t["_"+o+"padplus"],h=t["_"+o+"padminus"],d={x:1,y:-1}[o]*t[o+"shift"],f=3*t.arrowsize*t.arrowwidth||0,p=f+d,m=f-d,g=3*t.startarrowsize*t.arrowwidth||0,v=g+d,b=g-d;if(c===l){var y=i.findExtremes(e,[e.r2c(a)],{ppadplus:p,ppadminus:m}),x=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(u,v),ppadminus:Math.max(h,b)});r={min:[y.min[0],x.min[0]],max:[y.max[0],x.max[0]]}}else v=s?v+s:v,b=s?b-s:b,r=i.findExtremes(e,[e.r2c(a)],{ppadplus:Math.max(u,p,v),ppadminus:Math.max(h,m,b)});t._extremes[n]=r}t.exports=function(t){var e=t._fullLayout;if(n.filterVisible(e.annotations).length&&t._fullData.length)return n.syncOrAsync([o,a],t)}},74434:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059),o=r(46121).arrayEditor;function a(t,e){var r,n,i,o,a,l,c,u=t._fullLayout.annotations,h=[],d=[],f=[],p=(e||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(t,e){var r,s,l=a(t,e),c=l.on,u=l.off.concat(l.explicitOff),h={},d=t._fullLayout.annotations;if(c.length||u.length){for(r=0;r{"use strict";var n=r(12822),i=r(17499);t.exports=function(t,e,r,o){o("opacity");var a=o("bgcolor"),s=o("bordercolor"),l=i.opacity(s);o("borderpad");var c=o("borderwidth"),u=o("showarrow");if(o("text",u?" ":r._dfltTitle.annotation),o("textangle"),n.coerceFont(o,"font",r.font),o("width"),o("align"),o("height")&&o("valign"),u){var h,d,f=o("arrowside");-1!==f.indexOf("end")&&(h=o("arrowhead"),d=o("arrowsize")),-1!==f.indexOf("start")&&(o("startarrowhead",h),o("startarrowsize",d)),o("arrowcolor",l?e.bordercolor:i.defaultLine),o("arrowwidth",2*(l&&c||1)),o("standoff"),o("startstandoff")}var p=o("hovertext"),m=r.hoverlabel||{};if(p){var g=o("hoverlabel.bgcolor",m.bgcolor||(i.opacity(a)?i.rgb(a):i.defaultLine)),v=o("hoverlabel.bordercolor",m.bordercolor||i.contrast(g)),b=n.extendFlat({},m.font);b.color||(b.color=v),n.coerceFont(o,"hoverlabel.font",b)}o("captureevents",!!p)}},44102:(t,e,r)=>{"use strict";var n=r(7370),i=r(61814);t.exports=function(t,e,r,o){e=e||{};var a="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(a||s)for(var l,c,u=t._fullLayout.annotations,h=e._id.charAt(0),d=0;d{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(35486),s=r(77061);function l(t,e,r){function o(r,i){return n.coerce(t,e,s,r,i)}var l=o("visible"),c=o("clicktoshow");if(l||c){a(t,e,r,o);for(var u=e.showarrow,h=["x","y"],d=[-10,-30],f={_fullLayout:r},p=0;p<2;p++){var m=h[p],g=i.coerceRef(t,e,f,m,"","paper");if("paper"!==g&&i.getFromId(f,g)._annIndices.push(e._index),i.coercePosition(e,f,o,g,m,.5),u){var v="a"+m,b=i.coerceRef(t,e,f,v,"pixel",["pixel","paper"]);"pixel"!==b&&b!==g&&(b=e[v]="pixel");var y="pixel"===b?d[p]:.4;i.coercePosition(e,f,o,b,v,y)}o(m+"anchor"),o(m+"shift")}if(n.noneOrAll(t,e,["x","y"]),u&&n.noneOrAll(t,e,["ax","ay"]),c){var x=o("xclick"),_=o("yclick");e._xclick=void 0===x?e.x:i.cleanPosition(x,f,e.xref),e._yclick=void 0===_?e.y:i.cleanPosition(_,f,e.yref)}}}t.exports=function(t,e){o(t,e,{name:"annotations",handleItemDefaults:l})}},8214:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(51137),a=r(12822),s=a.strTranslate,l=r(75815),c=r(17499),u=r(40666),h=r(70410),d=r(80394),f=r(76292),p=r(19846),m=r(46121).arrayEditor,g=r(65753);function v(t,e){var r=t._fullLayout.annotations[e]||{},n=l.getFromId(t,r.xref),i=l.getFromId(t,r.yref);n&&n.setScale(),i&&i.setScale(),y(t,r,e,!1,n,i)}function b(t,e,r,n,i){var o=i[r],a=i[r+"ref"],s=-1!==r.indexOf("y"),c="domain"===l.getRefType(a),u=s?n.h:n.w;return t?c?o+(s?-e:e)/t._length:t.p2r(t.r2p(o)+e):o+(s?-e:e)/u}function y(t,e,r,o,v,y){var x,_,w=t._fullLayout,k=t._fullLayout._size,A=t._context.edits;o?(x="annotation-"+o,_=o+".annotations"):(x="annotation",_="annotations");var M=m(t.layout,_,e),T=M.modifyBase,S=M.modifyItem,C=M.getUpdateObj;w._infolayer.selectAll("."+x+'[data-index="'+r+'"]').remove();var E="clip"+w._uid+"_ann"+r;if(e._input&&!1!==e.visible){var L={x:{},y:{}},z=+e.textangle||0,O=w._infolayer.append("g").classed(x,!0).attr("data-index",String(r)).style("opacity",e.opacity),D=O.append("g").classed("annotation-text-g",!0),I=A[e.showarrow?"annotationTail":"annotationPosition"],F=e.captureevents||A.annotationText||I,R=D.append("g").style("pointer-events",F?"all":null).call(f,"pointer").on("click",(function(){t._dragging=!1,t.emit("plotly_clickannotation",q(n.event))}));e.hovertext&&R.on("mouseover",(function(){var r=e.hoverlabel,n=r.font,i=this.getBoundingClientRect(),o=t.getBoundingClientRect();h.loneHover({x0:i.left-o.left,x1:i.right-o.left,y:(i.top+i.bottom)/2-o.top,text:e.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontShadow:n.fontShadow,fontLineposition:n.fontLineposition,fontTextcase:n.fontTextcase},{container:w._hoverlayer.node(),outerContainer:w._paper.node(),gd:t})})).on("mouseout",(function(){h.loneUnhover(w._hoverlayer.node())}));var P=e.borderwidth,j=e.borderpad,N=P+j,B=R.append("rect").attr("class","bg").style("stroke-width",P+"px").call(c.stroke,e.bordercolor).call(c.fill,e.bgcolor),U=e.width||e.height,G=w._topclips.selectAll("#"+E).data(U?[0]:[]);G.enter().append("clipPath").classed("annclip",!0).attr("id",E).append("rect"),G.exit().remove();var V=e.font,H=w._meta?a.templateString(e.text,w._meta):e.text,W=R.append("text").classed("annotation-text",!0).text(H);A.annotationText?W.call(d.makeEditable,{delegate:R,gd:t}).call(Y).on("edit",(function(r){e.text=r,this.call(Y),S("text",r),v&&v.autorange&&T(v._name+".autorange",!0),y&&y.autorange&&T(y._name+".autorange",!0),i.call("_guiRelayout",t,C())})):W.call(Y)}else n.selectAll("#"+E).remove();function q(t){var n={index:r,annotation:e._input,fullAnnotation:e,event:t};return o&&(n.subplotId=o),n}function Y(r){return r.call(u.font,V).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),d.convertToTspans(r,t,Z),r}function Z(){var r=W.selectAll("a");1===r.size()&&r.text()===W.text()&&R.insert("a",":first-child").attr({"xlink:xlink:href":r.attr("xlink:href"),"xlink:xlink:show":r.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(B.node());var n=R.select(".annotation-text-math-group"),h=!n.empty(),m=u.bBox((h?n:W).node()),x=m.width,_=m.height,M=e.width||x,F=e.height||_,j=Math.round(M+2*N),V=Math.round(F+2*N);function H(t,e){return"auto"===e&&(e=t<1/3?"left":t>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var Y=!1,Z=["x","y"],X=0;X1)&&(nt===rt?((ft=it.r2fraction(e["a"+et]))<0||ft>1)&&(Y=!0):Y=!0),$=it._offset+it.r2p(e[et]),Q=.5}else{var pt="domain"===dt;"x"===et?(K=e[et],$=pt?it._offset+it._length*K:$=k.l+k.w*K):(K=1-e[et],$=pt?it._offset+it._length*K:$=k.t+k.h*K),Q=e.showarrow?.5:K}if(e.showarrow){ht.head=$;var mt=e["a"+et];if(tt=at*H(.5,e.xanchor)-st*H(.5,e.yanchor),nt===rt){var gt=l.getRefType(nt);"domain"===gt?("y"===et&&(mt=1-mt),ht.tail=it._offset+it._length*mt):"paper"===gt?"y"===et?(mt=1-mt,ht.tail=k.t+k.h*mt):ht.tail=k.l+k.w*mt:ht.tail=it._offset+it.r2p(mt),J=tt}else ht.tail=$+mt,J=tt+mt;ht.text=ht.tail+tt;var vt=w["x"===et?"width":"height"];if("paper"===rt&&(ht.head=a.constrain(ht.head,1,vt-1)),"pixel"===nt){var bt=-Math.max(ht.tail-3,ht.text),yt=Math.min(ht.tail+3,ht.text)-vt;bt>0?(ht.tail+=bt,ht.text+=bt):yt>0&&(ht.tail-=yt,ht.text-=yt)}ht.tail+=ut,ht.head+=ut}else J=tt=lt*H(Q,ct),ht.text=$+tt;ht.text+=ut,tt+=ut,J+=ut,e["_"+et+"padplus"]=lt/2+J,e["_"+et+"padminus"]=lt/2-J,e["_"+et+"size"]=lt,e["_"+et+"shift"]=tt}if(Y)R.remove();else{var xt=0,_t=0;if("left"!==e.align&&(xt=(M-x)*("center"===e.align?.5:1)),"top"!==e.valign&&(_t=(F-_)*("middle"===e.valign?.5:1)),h)n.select("svg").attr({x:N+xt-1,y:N+_t}).call(u.setClipUrl,U?E:null,t);else{var wt=N+_t-m.top,kt=N+xt-m.left;W.call(d.positionText,kt,wt).call(u.setClipUrl,U?E:null,t)}G.select("rect").call(u.setRect,N,N,M,F),B.call(u.setRect,P/2,P/2,j-P,V-P),R.call(u.setTranslate,Math.round(L.x.text-j/2),Math.round(L.y.text-V/2)),D.attr({transform:"rotate("+z+","+L.x.text+","+L.y.text+")"});var At,Mt=function(r,n){O.selectAll(".annotation-arrow-g").remove();var l=L.x.head,h=L.y.head,d=L.x.tail+r,f=L.y.tail+n,m=L.x.text+r,x=L.y.text+n,_=a.rotationXYMatrix(z,m,x),w=a.apply2DTransform(_),M=a.apply2DTransform2(_),E=+B.attr("width"),I=+B.attr("height"),F=m-.5*E,P=F+E,j=x-.5*I,N=j+I,U=[[F,j,F,N],[F,N,P,N],[P,N,P,j],[P,j,F,j]].map(M);if(!U.reduce((function(t,e){return t^!!a.segmentsIntersect(l,h,l+1e6,h+1e6,e[0],e[1],e[2],e[3])}),!1)){U.forEach((function(t){var e=a.segmentsIntersect(d,f,l,h,t[0],t[1],t[2],t[3]);e&&(d=e.x,f=e.y)}));var G=e.arrowwidth,V=e.arrowcolor,H=e.arrowside,W=O.append("g").style({opacity:c.opacity(V)}).classed("annotation-arrow-g",!0),q=W.append("path").attr("d","M"+d+","+f+"L"+l+","+h).style("stroke-width",G+"px").call(c.stroke,c.rgb(V));if(g(q,H,e),A.annotationPosition&&q.node().parentNode&&!o){var Y=l,Z=h;if(e.standoff){var X=Math.sqrt(Math.pow(l-d,2)+Math.pow(h-f,2));Y+=e.standoff*(d-l)/X,Z+=e.standoff*(f-h)/X}var $,J,K=W.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(d-Y)+","+(f-Z),transform:s(Y,Z)}).style("stroke-width",G+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)");p.init({element:K.node(),gd:t,prepFn:function(){var t=u.getTranslate(R);$=t.x,J=t.y,v&&v.autorange&&T(v._name+".autorange",!0),y&&y.autorange&&T(y._name+".autorange",!0)},moveFn:function(t,r){var n=w($,J),i=n[0]+t,o=n[1]+r;R.call(u.setTranslate,i,o),S("x",b(v,t,"x",k,e)),S("y",b(y,r,"y",k,e)),e.axref===e.xref&&S("ax",b(v,t,"ax",k,e)),e.ayref===e.yref&&S("ay",b(y,r,"ay",k,e)),W.attr("transform",s(t,r)),D.attr({transform:"rotate("+z+","+i+","+o+")"})},doneFn:function(){i.call("_guiRelayout",t,C());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};e.showarrow&&Mt(0,0),I&&p.init({element:R.node(),gd:t,prepFn:function(){At=D.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?S("ax",b(v,t,"ax",k,e)):S("ax",e.ax+t),e.ayref===e.yref?S("ay",b(y,r,"ay",k.w,e)):S("ay",e.ay+r),Mt(t,r);else{if(o)return;var i,a;if(v)i=b(v,t,"x",k,e);else{var l=e._xsize/k.w,c=e.x+(e._xshift-e.xshift)/k.w-l/2;i=p.align(c+t/k.w,l,0,1,e.xanchor)}if(y)a=b(y,r,"y",k,e);else{var u=e._ysize/k.h,h=e.y-(e._yshift+e.yshift)/k.h-u/2;a=p.align(h-r/k.h,u,0,1,e.yanchor)}S("x",i),S("y",a),v&&y||(n=p.getCursor(v?.5:i,y?.5:a,e.xanchor,e.yanchor))}D.attr({transform:s(t,r)+At}),f(R,n)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",q(n))},doneFn:function(){f(R),i.call("_guiRelayout",t,C());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}}t.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r{"use strict";var n=r(27941),i=r(17499),o=r(91208),a=r(12822),s=a.strScale,l=a.strRotate,c=a.strTranslate;t.exports=function(t,e,r){var a,u,h,d,f=t.node(),p=o[r.arrowhead||0],m=o[r.startarrowhead||0],g=(r.arrowwidth||1)*(r.arrowsize||1),v=(r.arrowwidth||1)*(r.startarrowsize||1),b=e.indexOf("start")>=0,y=e.indexOf("end")>=0,x=p.backoff*g+r.standoff,_=m.backoff*v+r.startstandoff;if("line"===f.nodeName){a={x:+t.attr("x1"),y:+t.attr("y1")},u={x:+t.attr("x2"),y:+t.attr("y2")};var w=a.x-u.x,k=a.y-u.y;if(d=(h=Math.atan2(k,w))+Math.PI,x&&_&&x+_>Math.sqrt(w*w+k*k))return void I();if(x){if(x*x>w*w+k*k)return void I();var A=x*Math.cos(h),M=x*Math.sin(h);u.x+=A,u.y+=M,t.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+k*k)return void I();var T=_*Math.cos(h),S=_*Math.sin(h);a.x-=T,a.y-=S,t.attr({x1:a.x,y1:a.y})}}else if("path"===f.nodeName){var C=f.getTotalLength(),E="";if(C{"use strict";var n=r(8214),i=r(74434);t.exports={moduleType:"component",name:"annotations",layoutAttributes:r(77061),supplyLayoutDefaults:r(26194),includeBasePlot:r(39859)("annotations"),calcAutorange:r(37830),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:r(44102)}},98368:(t,e,r)=>{"use strict";var n=r(77061),i=r(62309).overrideAll,o=r(46121).templatedArray;t.exports=i(o("annotation",{visible:n.visible,x:{valType:"any",description:["Sets the annotation's x position."].join(" ")},y:{valType:"any",description:["Sets the annotation's y position."].join(" ")},z:{valType:"any",description:["Sets the annotation's z position."].join(" ")},ax:{valType:"number",description:["Sets the x component of the arrow tail about the arrow head (in pixels)."].join(" ")},ay:{valType:"number",description:["Sets the y component of the arrow tail about the arrow head (in pixels)."].join(" ")},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents}),"calc","from-root")},81030:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815);function o(t,e){var r=e.fullSceneLayout.domain,o=e.fullLayout._size,a={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};t._xa={},n.extendFlat(t._xa,a),i.setConvert(t._xa),t._xa._offset=o.l+r.x[0]*o.w,t._xa.l2p=function(){return.5*(1+t._pdata[0]/t._pdata[3])*o.w*(r.x[1]-r.x[0])},t._ya={},n.extendFlat(t._ya,a),i.setConvert(t._ya),t._ya._offset=o.t+(1-r.y[1])*o.h,t._ya.l2p=function(){return.5*(1-t._pdata[1]/t._pdata[3])*o.h*(r.y[1]-r.y[0])}}t.exports=function(t){for(var e=t.fullSceneLayout.annotations,r=0;r{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(35486),s=r(98368);function l(t,e,r,o){function l(r,i){return n.coerce(t,e,s,r,i)}function c(t){var n=t+"axis",o={_fullLayout:{}};return o._fullLayout[n]=r[n],i.coercePosition(e,o,l,t,t,.5)}l("visible")&&(a(t,e,o.fullLayout,l),c("x"),c("y"),c("z"),n.noneOrAll(t,e,["x","y","z"]),e.xref="x",e.yref="y",e.zref="z",l("xanchor"),l("yanchor"),l("xshift"),l("yshift"),e.showarrow&&(e.axref="pixel",e.ayref="pixel",l("ax",-10),l("ay",-30),n.noneOrAll(t,e,["ax","ay"])))}t.exports=function(t,e,r){o(t,e,{name:"annotations",handleItemDefaults:l,fullLayout:r.fullLayout})}},86191:(t,e,r)=>{"use strict";var n=r(8214).drawRaw,i=r(40747),o=["x","y","z"];t.exports=function(t){for(var e=t.fullSceneLayout,r=t.dataScale,a=e.annotations,s=0;s1){c=!0;break}}c?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+s+'"]').remove():(l._pdata=i(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},95997:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822);t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(98368)}}},layoutAttributes:r(98368),handleDefaults:r(76023),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(r)for(var o=r.attrRegex,a=Object.keys(t),s=0;s{"use strict";e.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],e.defaultLine="#444",e.lightLine="#eee",e.background="#fff",e.borderLine="#BEC8D9",e.lightFraction=1e3/11},17499:(t,e,r)=>{"use strict";var n=r(18106),i=r(7370),o=r(98507).isTypedArray,a=t.exports={},s=r(84226);a.defaults=s.defaults;var l=a.defaultLine=s.defaultLine;a.lightLine=s.lightLine;var c=a.background=s.background;function u(t){if(i(t)||"string"!=typeof t)return t;var e=t.trim();if("rgb"!==e.substr(0,3))return t;var r=e.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return t;var n=r[1].trim().split(/\s*[\s,]\s*/),o="a"===e.charAt(3)&&4===n.length;if(!o&&3!==n.length)return t;for(var a=0;a=0))return t;if(3===a)n[a]>1&&(n[a]=1);else if(n[a]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return o?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}a.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},a.rgb=function(t){return a.tinyRGB(n(t))},a.opacity=function(t){return t?n(t).getAlpha():0},a.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},a.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||c).toRgb(),o=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},a={r:o.r*(1-r.a)+r.r*r.a,g:o.g*(1-r.a)+r.g*r.a,b:o.b*(1-r.a)+r.b*r.a};return n(a).toRgbString()},a.interpolate=function(t,e,r){var i=n(t).toRgb(),o=n(e).toRgb(),a={r:r*i.r+(1-r)*o.r,g:r*i.g+(1-r)*o.g,b:r*i.b+(1-r)*o.b};return n(a).toRgbString()},a.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(a.combine(t,c))),(i.isDark()?e?i.lighten(e):c:r?i.darken(r):l).toString()},a.stroke=function(t,e){var r=n(e);t.style({stroke:a.tinyRGB(r),"stroke-opacity":r.getAlpha()})},a.fill=function(t,e){var r=n(e);t.style({fill:a.tinyRGB(r),"fill-opacity":r.getAlpha()})},a.clean=function(t){if(t&&"object"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e{"use strict";var n=r(86130),i=r(75058),o=r(98260).extendFlat,a=r(62309).overrideAll;t.exports=a({orientation:{valType:"enumerated",values:["h","v"],dflt:"v",description:"Sets the orientation of the colorbar."},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",description:["Determines whether this color bar's thickness","(i.e. the measure in the constant color direction)","is set in units of plot *fraction* or in *pixels*.","Use `thickness` to set the value."].join(" ")},thickness:{valType:"number",min:0,dflt:30,description:["Sets the thickness of the color bar","This measure excludes the size of the padding, ticks and labels."].join(" ")},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this color bar's length","(i.e. the measure in the color variation direction)","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the color bar","This measure excludes the padding of both ends.","That is, the color bar length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",description:["Sets the x position with respect to `xref` of the color bar (in plot fraction).","When `xref` is *paper*, defaults to 1.02 when `orientation` is *v* and","0.5 when `orientation` is *h*.","When `xref` is *container*, defaults to *1* when `orientation` is *v* and","0.5 when `orientation` is *h*.","Must be between *0* and *1* if `xref` is *container*","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],description:["Sets this color bar's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the color bar.","Defaults to *left* when `orientation` is *v* and","*center* when `orientation` is *h*."].join(" ")},xpad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the x direction."},y:{valType:"number",description:["Sets the y position with respect to `yref` of the color bar (in plot fraction).","When `yref` is *paper*, defaults to 0.5 when `orientation` is *v* and","1.02 when `orientation` is *h*.","When `yref` is *container*, defaults to 0.5 when `orientation` is *v* and","1 when `orientation` is *h*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets this color bar's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the color bar.","Defaults to *middle* when `orientation` is *v* and","*bottom* when `orientation` is *h*."].join(" ")},ypad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the y direction."},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:"number",min:0,dflt:0,description:["Sets the width (in px) or the border enclosing this color bar."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:"Sets the color of padded area."},tickmode:n.minor.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:o({},n.ticks,{dflt:""}),ticklabeloverflow:o({},n.ticklabeloverflow,{description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","In other cases the default is *hide past div*."].join(" ")}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",description:["Determines where tick labels are drawn relative to the ticks.","Left and right options are used when `orientation` is *h*,","top and bottom when `orientation` is *v*."].join(" ")},ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,showticklabels:n.showticklabels,labelalias:n.labelalias,tickfont:i({description:"Sets the color bar's tick label font"}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,minexponent:n.minexponent,showexponent:n.showexponent,title:{text:{valType:"string",description:["Sets the title of the color bar.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:i({description:["Sets this color bar's title font.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),side:{valType:"enumerated",values:["right","top","bottom"],description:["Determines the location of color bar's title","with respect to the color bar.","Defaults to *top* when `orientation` if *v* and ","defaults to *right* when `orientation` if *h*.","Note that the title's location used to be set","by the now deprecated `titleside` attribute."].join(" ")}},_deprecated:{title:{valType:"string",description:["Deprecated in favor of color bar's `title.text`.","Note that value of color bar's `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:i({description:"Deprecated in favor of color bar's `title.font`."}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top",description:"Deprecated in favor of color bar's `title.side`."}}},"colorbars","from-root")},30733:t=>{"use strict";t.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},81692:(t,e,r)=>{"use strict";var n=r(12822),i=r(46121),o=r(49342),a=r(8736),s=r(84411),l=r(12213),c=r(76699);t.exports=function(t,e,r){var u=i.newContainer(e,"colorbar"),h=t.colorbar||{};function d(t,e){return n.coerce(h,u,c,t,e)}var f=r.margin||{t:0,b:0,l:0,r:0},p=r.width-f.l-f.r,m=r.height-f.t-f.b,g="v"===d("orientation"),v=d("thicknessmode");d("thickness","fraction"===v?30/(g?p:m):30);var b=d("lenmode");d("len","fraction"===b?1:g?m:p);var y,x,_,w="paper"===d("yref"),k="paper"===d("xref"),A="left";g?(_="middle",A=k?"left":"right",y=k?1.02:1,x=.5):(_=w?"bottom":"top",A="center",y=.5,x=w?1.02:1),n.coerce(h,u,{x:{valType:"number",min:k?-2:0,max:k?3:1,dflt:y}},"x"),n.coerce(h,u,{y:{valType:"number",min:w?-2:0,max:w?3:1,dflt:x}},"y"),d("xanchor",A),d("xpad"),d("yanchor",_),d("ypad"),n.noneOrAll(h,u,["x","y"]),d("outlinecolor"),d("outlinewidth"),d("bordercolor"),d("borderwidth"),d("bgcolor");var M=n.coerce(h,u,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:g?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");d("ticklabeloverflow",-1!==M.indexOf("inside")?"hide past domain":"hide past div"),o(h,u,d,"linear");var T=r.font,S={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:T};-1!==M.indexOf("inside")&&(S.bgColor="black"),l(h,u,d,"linear",S),s(h,u,d,"linear",S),a(h,u,d,"linear",S),d("title.text",r._dfltTitle.colorbar);var C=u.showticklabels?u.tickfont:T,E=n.extendFlat({},T,{family:C.family,size:n.bigFont(C.size)});n.coerceFont(d,"title.font",E),d("title.side",g?"top":"right")}},29648:(t,e,r)=>{"use strict";var n=r(27941),i=r(18106),o=r(51137),a=r(25059),s=r(75815),l=r(19846),c=r(12822),u=c.strTranslate,h=r(98260).extendFlat,d=r(76292),f=r(40666),p=r(17499),m=r(6883),g=r(80394),v=r(42226).flipScale,b=r(91200),y=r(52869),x=r(86130),_=r(89701),w=_.LINE_SPACING,k=_.FROM_TL,A=_.FROM_BR,M=r(30733).cn;t.exports={draw:function(t){var e=t._fullLayout._infolayer.selectAll("g."+M.colorbar).data(function(t){var e,r,n,i,o=t._fullLayout,a=t.calcdata,s=[];function l(t){return h(t,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function c(){"function"==typeof i.calc?i.calc(t,n,e):(e._fillgradient=r.reversescale?v(r.colorscale):r.colorscale,e._zrange=[r[i.min],r[i.max]])}for(var u=0;u0?n>=l:n<=l));i++)n>u&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var ft=Math.pow(10,Math.floor(Math.log(dt)/Math.LN10));ut*=ft*c.roundUp(dt/ft,[2,5,10]),(Math.abs(q.start)/q.size+1e-6)%1<2e-6&&(lt.tick0=0)}lt.dtick=ut}lt.domain=a?[at+O/j.h,at+Q-O/j.h]:[at+z/j.w,at+Q-z/j.w],lt.setScale(),t.attr("transform",u(Math.round(j.l),Math.round(j.t)));var pt,mt=t.select("."+M.cbtitleunshift).attr("transform",u(-Math.round(j.l),-Math.round(j.t))),gt=lt.ticklabelposition,vt=lt.title.font.size,bt=t.select("."+M.cbaxis),yt=0,xt=0;function _t(n,i){var o={propContainer:lt,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:P._dfltTitle.colorbar,containerGroup:t.select("."+M.cbtitle)},a="h"===n.charAt(0)?n.substr(1):"h"+n;t.selectAll("."+a+",."+a+"-math-group").remove(),m.draw(r,n,h(o,i||{}))}return c.syncOrAsync([o.previousPromises,function(){var t,e;(a&&ct||!a&&!ct)&&("top"===G&&(t=z+j.l+tt*D,e=O+j.t+et*(1-at-Q)+3+.75*vt),"bottom"===G&&(t=z+j.l+tt*D,e=O+j.t+et*(1-at)-3-.25*vt),"right"===G&&(e=O+j.t+et*I+3+.75*vt,t=z+j.l+tt*at),_t(lt._id+"title",{attributes:{x:t,y:e,"text-anchor":a?"start":"middle"}}))},function(){if(!a&&!ct||a&&ct){var o,l=t.select("."+M.cbtitle),h=l.select("text"),d=[-T/2,T/2],p=l.select(".h"+lt._id+"title-math-group").node(),m=15.6;if(h.node()&&(m=parseInt(h.node().style.fontSize,10)*w),p?(o=f.bBox(p),xt=o.width,(yt=o.height)>m&&(d[1]-=(yt-m)/2)):h.node()&&!h.classed(M.jsPlaceholder)&&(o=f.bBox(h.node()),xt=o.width,yt=o.height),a){if(yt){if(yt+=5,"top"===G)lt.domain[1]-=yt/j.h,d[1]*=-1;else{lt.domain[0]+=yt/j.h;var v=g.lineCount(h);d[1]+=(1-v)*m}l.attr("transform",u(d[0],d[1])),lt.setScale()}}else xt&&("right"===G&&(lt.domain[0]+=(xt+vt/2)/j.w),l.attr("transform",u(d[0],d[1])),lt.setScale())}t.selectAll("."+M.cbfills+",."+M.cblines).attr("transform",a?u(0,Math.round(j.h*(1-lt.domain[1]))):u(Math.round(j.w*lt.domain[0]),0)),bt.attr("transform",a?u(0,Math.round(-j.t)):u(Math.round(-j.l),0));var b=t.select("."+M.cbfills).selectAll("rect."+M.cbfill).attr("style","").data(Z);b.enter().append("rect").classed(M.cbfill,!0).attr("style",""),b.exit().remove();var y=V.map(lt.c2p).map(Math.round).sort((function(t,e){return t-e}));b.each((function(t,o){var s=[0===o?V[0]:(Z[o]+Z[o-1])/2,o===Z.length-1?V[1]:(Z[o]+Z[o+1])/2].map(lt.c2p).map(Math.round);a&&(s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,y[0],y[1]));var l=n.select(this).attr(a?"x":"y",rt).attr(a?"y":"x",n.min(s)).attr(a?"width":"height",Math.max($,2)).attr(a?"height":"width",Math.max(n.max(s)-n.min(s),2));if(e._fillgradient)f.gradient(l,r,e._id,a?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var u=W(t).replace("e-","");l.attr("fill",i(u).toHexString())}}));var x=t.select("."+M.cblines).selectAll("path."+M.cbline).data(B.color&&B.width?X:[]);x.enter().append("path").classed(M.cbline,!0),x.exit().remove(),x.each((function(t){var e=rt,r=Math.round(lt.c2p(t))+B.width/2%1;n.select(this).attr("d","M"+(a?e+","+r:r+","+e)+(a?"h":"v")+$).call(f.lineGroupStyle,B.width,H(t),B.dash)})),bt.selectAll("g."+lt._id+"tick,path").remove();var _=rt+$+(T||0)/2-("outside"===e.ticks?1:0),k=s.calcTicks(lt),A=s.getTickSigns(lt)[2];return s.drawTicks(r,lt,{vals:"inside"===lt.ticks?s.clipEnds(lt,k):k,layer:bt,path:s.makeTickPath(lt,_,A),transFn:s.makeTransTickFn(lt)}),s.drawLabels(r,lt,{vals:k,layer:bt,transFn:s.makeTransTickLabelFn(lt),labelFns:s.makeLabelFns(lt,_)})},function(){if(a&&!ct||!a&&ct){var t,i,o=lt.position||0,s=lt._offset+lt._length/2;if("right"===G)i=s,t=j.l+tt*o+10+vt*(lt.showticklabels?1:.5);else if(t=s,"bottom"===G&&(i=j.t+et*o+10+(-1===gt.indexOf("inside")?lt.tickfont.size:0)+("intside"!==lt.ticks&&e.ticklen||0)),"top"===G){var l=U.text.split("
").length;i=j.t+et*o+10-$-w*vt*l}_t((a?"h":"v")+lt._id+"title",{avoid:{selection:n.select(r).selectAll("g."+lt._id+"tick"),side:G,offsetTop:a?0:j.t,offsetLeft:a?j.l:0,maxShift:a?P.width:P.height},attributes:{x:t,y:i,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}},o.previousPromises,function(){var n,s=$+T/2;-1===gt.indexOf("inside")&&(n=f.bBox(bt.node()),s+=a?n.width:n.height),pt=mt.select("text");var c=0,h=a&&"top"===G,m=!a&&"right"===G,g=0;if(pt.node()&&!pt.classed(M.jsPlaceholder)){var b,y=mt.select(".h"+lt._id+"title-math-group").node();y&&(a&&ct||!a&&!ct)?(c=(n=f.bBox(y)).width,b=n.height):(c=(n=f.bBox(mt.node())).right-j.l-(a?rt:st),b=n.bottom-j.t-(a?st:rt),a||"top"!==G||(s+=n.height,g=n.height)),m&&(pt.attr("transform",u(c/2+vt/2,0)),c*=2),s=Math.max(s,a?c:b)}var x=2*(a?z:O)+s+S+T/2,w=0;!a&&U.text&&"bottom"===L&&I<=0&&(x+=w=x/2,g+=w),P._hColorbarMoveTitle=w,P._hColorbarMoveCBTitle=g;var N=S+T,B=(a?rt:st)-N/2-(a?z:0),V=(a?st:rt)-(a?K:O+g-w);t.select("."+M.cbbg).attr("x",B).attr("y",V).attr(a?"width":"height",Math.max(x-w,2)).attr(a?"height":"width",Math.max(K+N,2)).call(p.fill,C).call(p.stroke,e.bordercolor).style("stroke-width",S);var H=m?Math.max(c-10,0):0;t.selectAll("."+M.cboutline).attr("x",(a?rt:st+z)+H).attr("y",(a?st+O-K:rt)+(h?yt:0)).attr(a?"width":"height",Math.max($,2)).attr(a?"height":"width",Math.max(K-(a?2*O+yt:2*z+H),2)).call(p.stroke,e.outlinecolor).style({fill:"none","stroke-width":T});var W=a?nt*x:0,q=a?0:(1-it)*x-g;if(W=R?j.l-W:-W,q=F?j.t-q:-q,t.attr("transform",u(W,q)),!a&&(S||i(C).getAlpha()&&!i.equals(P.paper_bgcolor,C))){var Y=bt.selectAll("text"),Z=Y[0].length,X=t.select("."+M.cbbg).node(),J=f.bBox(X),Q=f.getTranslate(t);Y.each((function(t,e){var r=Z-1;if(0===e||e===r){var n,i=f.bBox(this),o=f.getTranslate(this);if(e===r){var a=i.right+o.x;(n=J.right+Q.x+st-S-2+D-a)>0&&(n=0)}else if(0===e){var s=i.left+o.x;(n=J.left+Q.x+st+S+2-s)<0&&(n=0)}n&&(Z<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var tt={},et=k[E],ot=A[E],at=k[L],ut=A[L],ht=x-$;a?("pixels"===d?(tt.y=I,tt.t=K*at,tt.b=K*ut):(tt.t=tt.b=0,tt.yt=I+l*at,tt.yb=I-l*ut),"pixels"===_?(tt.x=D,tt.l=x*et,tt.r=x*ot):(tt.l=ht*et,tt.r=ht*ot,tt.xl=D-v*et,tt.xr=D+v*ot)):("pixels"===d?(tt.x=D,tt.l=K*et,tt.r=K*ot):(tt.l=tt.r=0,tt.xl=D+l*et,tt.xr=D-l*ot),"pixels"===_?(tt.y=1-I,tt.t=x*at,tt.b=x*ut):(tt.t=ht*at,tt.b=ht*ut,tt.yt=I-v*at,tt.yb=I+v*ut));var dt=e.y<.5?"b":"t",ft=e.x<.5?"l":"r";r._fullLayout._reservedMargin[e._id]={};var xt={r:P.width-B-W,l:B+tt.r,b:P.height-V-q,t:V+tt.b};R&&F?o.autoMargin(r,e._id,tt):R?r._fullLayout._reservedMargin[e._id][dt]=xt[dt]:F||a?r._fullLayout._reservedMargin[e._id][ft]=xt[ft]:r._fullLayout._reservedMargin[e._id][dt]=xt[dt]}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,o,s="v"===e.orientation,c=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr("transform"),d(t)},moveFn:function(r,a){t.attr("transform",n+u(r,a)),i=l.align((s?e._uFrac:e._vFrac)+r/c.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),o=l.align((s?e._vFrac:1-e._uFrac)-a/c.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var h=l.getCursor(i,o,e.xanchor,e.yanchor);d(t,h)},doneFn:function(){if(d(t),void 0!==i&&void 0!==o){var n={};n[e._propPrefix+"x"]=i,n[e._propPrefix+"y"]=o,void 0!==e._traceIndex?a.call("_guiRestyle",r,n,e._traceIndex):a.call("_guiRelayout",r,n)}}})}(r,e,t)})),e.exit().each((function(e){o.autoMargin(t,e._id)})).remove(),e.order()}}},52467:(t,e,r)=>{"use strict";var n=r(12822);t.exports=function(t){return n.isPlainObject(t.colorbar)}},10552:(t,e,r)=>{"use strict";t.exports={moduleType:"component",name:"colorbar",attributes:r(76699),supplyDefaults:r(81692),draw:r(29648).draw,hasColorbar:r(52467)}},89322:(t,e,r)=>{"use strict";var n=r(76699),i=r(46233).counter,o=r(54747),a=r(78920).scales,s=o(a);function l(t){return"`"+t+"`"}t.exports=function(t,e){t=t||"";var r,o,c=(e=e||{}).cLetter||"c",u="onlyIfNumerical"in e?e.onlyIfNumerical:Boolean(t),h="noScale"in e?e.noScale:"marker.line"===t,d="showScaleDflt"in e?e.showScaleDflt:"z"===c,f="string"==typeof e.colorscaleDflt?a[e.colorscaleDflt]:null,p=e.editTypeOverride||"",m=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,o=e.colorAttr):o="in "+l(m+(r={z:"z",c:"color"}[c]));var g=u?" Has an effect only if "+o+" is set to a numerical array.":"",v=c+"auto",b=c+"min",y=c+"max",x=c+"mid",_=l(m+v),w=l(m+b),k=l(m+y),A=w+" and "+k,M={};M[b]=M[y]=void 0;var T={};T[v]=!1;var S={};return"color"===r&&(S.color={valType:"color",arrayOk:!0,editType:p||"style",description:["Sets the",t,"color.","It accepts either a specific color","or an array of numbers that are mapped to the colorscale","relative to the max and min values of the array or relative to",A,"if set."].join(" ")},e.anim&&(S.color.anim=!0)),S[v]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:M,description:["Determines whether or not the color domain is computed","with respect to the input data (here "+o+") or the bounds set in",A+g,"Defaults to `false` when",A,"are set by the user."].join(" ")},S[b]={valType:"number",dflt:null,editType:p||"plot",impliedEdits:T,description:["Sets the lower bound of the color domain."+g,"Value should have the same units as",o,"and if set,",k,"must be set as well."].join(" ")},S[y]={valType:"number",dflt:null,editType:p||"plot",impliedEdits:T,description:["Sets the upper bound of the color domain."+g,"Value should have the same units as",o,"and if set,",w,"must be set as well."].join(" ")},S[x]={valType:"number",dflt:null,editType:"calc",impliedEdits:M,description:["Sets the mid-point of the color domain by scaling",w,"and/or",k,"to be equidistant to this point."+g,"Value should have the same units as",o+".","Has no effect when",_,"is `false`."].join(" ")},S.colorscale={valType:"colorscale",editType:"calc",dflt:f,impliedEdits:{autocolorscale:!1},description:["Sets the colorscale."+g,"The colorscale must be an array containing","arrays mapping a normalized value to an","rgb, rgba, hex, hsl, hsv, or named color string.","At minimum, a mapping for the lowest (0) and highest (1)","values are required. For example,","`[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`.","To control the bounds of the colorscale in color space,","use",A+".","Alternatively, `colorscale` may be a palette name string","of the following list: "+s+"."].join(" ")},S.autocolorscale={valType:"boolean",dflt:!1!==e.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0},description:["Determines whether the colorscale is a default palette (`autocolorscale: true`)","or the palette determined by",l(m+"colorscale")+"."+g,"In case `colorscale` is unspecified or `autocolorscale` is true, the default","palette will be chosen according to whether numbers in the `color` array are","all positive, all negative or mixed."].join(" ")},S.reversescale={valType:"boolean",dflt:!1,editType:"plot",description:["Reverses the color mapping if true."+g,"If true,",w,"will correspond to the last color","in the array and",k,"will correspond to the first color."].join(" ")},h||(S.showscale={valType:"boolean",dflt:d,editType:"calc",description:["Determines whether or not a colorbar is displayed for this trace."+g].join(" ")},S.colorbar=n),e.noColorAxis||(S.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc",description:["Sets a reference to a shared color axis.","References to these shared color axes are *coloraxis*, *coloraxis2*, *coloraxis3*, etc.","Settings for these shared color axes are set in the layout, under","`layout.coloraxis`, `layout.coloraxis2`, etc.","Note that multiple color scales can be linked to the same color axis."].join(" ")}),S}},62182:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822),o=r(42226).extractOpts;t.exports=function(t,e,r){var a,s=t._fullLayout,l=r.vals,c=r.containerStr,u=c?i.nestedProperty(e,c).get():e,h=o(u),d=!1!==h.auto,f=h.min,p=h.max,m=h.mid,g=function(){return i.aggNums(Math.min,null,l)},v=function(){return i.aggNums(Math.max,null,l)};void 0===f?f=g():d&&(f=u._colorAx&&n(f)?Math.min(f,g()):g()),void 0===p?p=v():d&&(p=u._colorAx&&n(p)?Math.max(p,v()):v()),d&&void 0!==m&&(p-m>m-f?f=m-(p-m):p-m=0?s.colorscale.sequential:s.colorscale.sequentialminus,h._sync("colorscale",a))}},51774:(t,e,r)=>{"use strict";var n=r(12822),i=r(42226).hasColorscale,o=r(42226).extractOpts;t.exports=function(t,e){function r(t,e){var r=t["_"+e];void 0!==r&&(t[e]=r)}function a(t,i){var a=i.container?n.nestedProperty(t,i.container).get():t;if(a)if(a.coloraxis)a._colorAx=e[a.coloraxis];else{var s=o(a),l=s.auto;(l||void 0===s.min)&&r(a,i.min),(l||void 0===s.max)&&r(a,i.max),s.autocolorscale&&r(a,"colorscale")}}for(var s=0;s{"use strict";var n=r(7370),i=r(12822),o=r(52467),a=r(81692),s=r(78920).isValid,l=r(25059).traceIs;function c(t,e){var r=e.slice(0,e.length-1);return e?i.nestedProperty(t,r).get()||{}:t}t.exports=function t(e,r,u,h,d){var f=d.prefix,p=d.cLetter,m="_module"in r,g=c(e,f),v=c(r,f),b=c(r._template||{},f)||{},y=function(){return delete e.coloraxis,delete r.coloraxis,t(e,r,u,h,d)};if(m){var x=u._colorAxes||{},_=h(f+"coloraxis");if(_){var w=l(r,"contour")&&i.nestedProperty(r,"contours.coloring").get()||"heatmap",k=x[_];return void(k?(k[2].push(y),k[0]!==w&&(k[0]=!1,i.warn(["Ignoring coloraxis:",_,"setting","as it is linked to incompatible colorscales."].join(" ")))):x[_]=[w,r,[y]])}}var A=g[p+"min"],M=g[p+"max"],T=n(A)&&n(M)&&A{"use strict";var n=r(27941),i=r(18106),o=r(7370),a=r(12822),s=r(17499),l=r(78920).isValid,c=["showscale","autocolorscale","colorscale","reversescale","colorbar"],u=["min","max","mid","auto"];function h(t){var e,r,n,i=t._colorAx,o=i||t,a={};for(r=0;r=0;n--,i++){var o=t[n];r[i]=[1-o[0],o[1]]}return r}function p(t,e){e=e||{};for(var r=t.domain,a=t.range,l=a.length,c=new Array(l),u=0;u{"use strict";var n=r(78920),i=r(42226);t.exports={moduleType:"component",name:"colorscale",attributes:r(89322),layoutAttributes:r(92425),supplyLayoutDefaults:r(28558),handleDefaults:r(94461),crossTraceDefaults:r(51774),calc:r(62182),scales:n.scales,defaultScale:n.defaultScale,getScale:n.get,isValidScale:n.isValid,hasColorscale:i.hasColorscale,extractOpts:i.extractOpts,extractScale:i.extractScale,flipScale:i.flipScale,makeColorScaleFunc:i.makeColorScaleFunc,makeColorScaleFuncFromTrace:i.makeColorScaleFuncFromTrace}},92425:(t,e,r)=>{"use strict";var n=r(98260).extendFlat,i=r(89322),o=r(78920).scales,a="Note that `autocolorscale` must be true for this attribute to work.";t.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:o.Reds,editType:"calc",description:["Sets the default sequential colorscale for positive values.",a].join(" ")},sequentialminus:{valType:"colorscale",dflt:o.Blues,editType:"calc",description:["Sets the default sequential colorscale for negative values.",a].join(" ")},diverging:{valType:"colorscale",dflt:o.RdBu,editType:"calc",description:["Sets the default diverging colorscale.",a].join(" ")}},coloraxis:n({_isSubplotObj:!0,editType:"calc",description:[""].join(" ")},i("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},28558:(t,e,r)=>{"use strict";var n=r(12822),i=r(46121),o=r(92425),a=r(94461);t.exports=function(t,e){function r(r,i){return n.coerce(t,e,o,r,i)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var s,l,c=e._colorAxes;function u(t,e){return n.coerce(s,l,o.coloraxis,t,e)}for(var h in c){var d=c[h];if(d[0])s=t[h]||{},(l=i.newContainer(e,h,"coloraxis"))._name=h,a(s,l,e,u,{prefix:"",cLetter:"c"});else{for(var f=0;f{"use strict";var n=r(18106),i={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},o=i.RdBu;function a(t){var e=0;if(!Array.isArray(t)||t.length<2)return!1;if(!t[0]||!t[t.length-1])return!1;if(0!=+t[0][0]||1!=+t[t.length-1][0])return!1;for(var r=0;r{"use strict";t.exports=function(t,e,r,n,i){var o=(t-r)/(n-r),a=o+e/(n-r),s=(o+a)/2;return"left"===i||"bottom"===i?o:"center"===i||"middle"===i?s:"right"===i||"top"===i?a:o<2/3-s?o:a>4/3-s?a:s}},29182:(t,e,r)=>{"use strict";var n=r(12822),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(t,e,r,o){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===o?0:"middle"===o?1:"top"===o?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},14295:(t,e)=>{"use strict";e.selectMode=function(t){return"lasso"===t||"select"===t},e.drawMode=function(t){return"drawclosedpath"===t||"drawopenpath"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},e.openMode=function(t){return"drawline"===t||"drawopenpath"===t},e.rectMode=function(t){return"select"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},e.freeMode=function(t){return"lasso"===t||"drawclosedpath"===t||"drawopenpath"===t},e.selectingOrDrawing=function(t){return e.freeMode(t)||e.rectMode(t)}},19846:(t,e,r)=>{"use strict";var n=r(10024),i=r(56885),o=r(17520),a=r(12822).removeElement,s=r(21197),l=t.exports={};l.align=r(45035),l.getCursor=r(29182);var c=r(99573);function u(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function h(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(t){var e,r,n,c,d,f,p,m,g=t.gd,v=1,b=g._context.doubleClickDelay,y=t.element;g._mouseDownTime||(g._mouseDownTime=0),y.style.pointerEvents="all",y.onmousedown=_,o?(y._ontouchstart&&y.removeEventListener("touchstart",y._ontouchstart),y._ontouchstart=_,y.addEventListener("touchstart",_,{passive:!1})):y.ontouchstart=_;var x=t.clampFn||function(t,e,r){return Math.abs(t)b&&(v=Math.max(v-1,1)),g._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(v,f),!m){var r;try{r=new MouseEvent("click",e)}catch(t){var n=h(e);(r=document.createEvent("MouseEvents")).initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,n[0],n[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}p.dispatchEvent(r)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},l.coverSlip=u},99573:(t,e,r)=>{"use strict";var n=r(16677),i=r(76324),o=r(16822).getGraphDiv,a=r(99259),s=t.exports={};s.wrapped=function(t,e,r){(t=o(t))._fullLayout&&i.clear(t._fullLayout._uid+a.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&!t._dragged&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&i&&t.emit("plotly_unhover",{event:e,points:i}))}},68057:(t,e)=>{"use strict";e.T={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style",description:["Sets the dash style of lines. Set to a dash type string","(*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*)","or a dash length list in px (eg *5px,10px,2px,2px*)."].join(" ")},e.k={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style",description:["Sets the shape of the pattern fill.","By default, no pattern is used for filling the area."].join(" ")},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style",description:["Determines whether `marker.color` should be used","as a default to `bgcolor` or a `fgcolor`."].join(" ")},bgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of background pattern fill.","Defaults to a `marker.color` background when `fillmode` is *overlay*.","Otherwise, defaults to a transparent background."].join(" ")},fgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of foreground pattern fill.","Defaults to a `marker.color` background when `fillmode` is *replace*.","Otherwise, defaults to dark grey or white","to increase contrast with the `bgcolor`."].join(" ")},fgopacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the foreground pattern fill.","Defaults to a 0.5 when `fillmode` is *overlay*.","Otherwise, defaults to 1."].join(" ")},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style",description:["Sets the size of unit squares of the pattern fill in pixels,","which corresponds to the interval of repetition of the pattern."].join(" ")},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style",description:["Sets the solidity of the pattern fill.","Solidity is roughly the fraction of the area filled by the pattern.","Solidity of 0 shows only the background color without pattern","and solidty of 1 shows only the foreground color without pattern."].join(" ")},editType:"style",description:["Sets the pattern within the marker."].join(" ")}},40666:(t,e,r)=>{"use strict";var n=r(27941),i=r(12822),o=i.numberFormat,a=r(7370),s=r(18106),l=r(25059),c=r(17499),u=r(80755),h=i.strTranslate,d=r(80394),f=r(25853),p=r(89701).LINE_SPACING,m=r(11891).DESELECTDIM,g=r(677),v=r(43710),b=r(66811).appendArrayPointValue,y=t.exports={};function x(t){return"none"===t?void 0:t}y.font=function(t,e){var r=e.variant,n=e.style,i=e.weight,o=e.color,a=e.size,s=e.family,l=e.shadow,u=e.lineposition,h=e.textcase;s&&t.style("font-family",s),a+1&&t.style("font-size",a+"px"),o&&t.call(c.fill,o),i&&t.style("font-weight",i),n&&t.style("font-style",n),r&&t.style("font-variant",r),h&&t.style("text-transform",x(function(t){return _[t]}(h))),l&&t.style("text-shadow","auto"===l?d.makeTextShadow(c.contrast(o)):x(l)),u&&t.style("text-decoration-line",x(function(t){return t.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}(u)))};var _={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function w(t,e,r,n){var i=e.fillpattern,o=e.fillgradient,a=i&&y.getPatternAttr(i.shape,0,"");if(a){var s=y.getPatternAttr(i.bgcolor,0,null),l=y.getPatternAttr(i.fgcolor,0,null),u=i.fgopacity,h=y.getPatternAttr(i.size,0,8),d=y.getPatternAttr(i.solidity,0,.3),f=e.uid;y.pattern(t,"point",r,f,a,h,d,void 0,i.fillmode,s,l,u)}else if(o&&"none"!==o.type){var p,m,g=o.type,v="scatterfill-"+e.uid;n&&(v="legendfill-"+e.uid),n||void 0===o.start&&void 0===o.stop?("horizontal"===g&&(g+="reversed"),t.call(y.gradient,r,v,g,o.colorscale,"fill")):("horizontal"===g?(p={x:o.start,y:0},m={x:o.stop,y:0}):"vertical"===g&&(p={x:0,y:o.start},m={x:0,y:o.stop}),p.x=e._xA.c2p(void 0===p.x?e._extremes.x.min[0].val:p.x,!0),p.y=e._yA.c2p(void 0===p.y?e._extremes.y.min[0].val:p.y,!0),m.x=e._xA.c2p(void 0===m.x?e._extremes.x.max[0].val:m.x,!0),m.y=e._yA.c2p(void 0===m.y?e._extremes.y.max[0].val:m.y,!0),t.call(C,r,v,"linear",o.colorscale,"fill",p,m,!0,!1))}else e.fillcolor&&t.call(c.fill,e.fillcolor)}y.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},y.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},y.setRect=function(t,e,r,n,i){t.call(y.setPosition,e,r).call(y.setSize,n,i)},y.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),o=n.c2p(t.y);return!!(a(i)&&a(o)&&e.node())&&("text"===e.node().nodeName?e.attr("x",i).attr("y",o):e.attr("transform",h(i,o)),!0)},y.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);y.translatePoint(t,i,e,r)}))},y.hideOutsideRangePoint=function(t,e,r,n,i,o){e.attr("display",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,o)?null:"none")},y.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,i=e.yaxis;t.each((function(e){var o=e[0].trace,a=o.xcalendar,s=o.ycalendar,c=l.traceIs(o,"bar-like")?".bartext":".point,.textpoint";t.selectAll(c).each((function(t){y.hideOutsideRangePoint(t,n.select(this),r,i,a,s)}))}))}},y.crispRound=function(t,e,r){return e&&a(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},y.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var o=(((t||[])[0]||{}).trace||{}).line||{},a=r||o.width||0,s=i||o.dash||"";c.stroke(e,n||o.color),y.dashLine(e,s,a)},y.lineGroupStyle=function(t,e,r,i){t.style("fill","none").each((function(t){var o=(((t||[])[0]||{}).trace||{}).line||{},a=e||o.width||0,s=i||o.dash||"";n.select(this).call(c.stroke,r||o.color).call(y.dashLine,s,a)}))},y.dashLine=function(t,e,r){r=+r||0,e=y.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},y.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},y.singleFillStyle=function(t,e){var r=n.select(t.node());w(t,((r.data()[0]||[])[0]||{}).trace||{},e,!1)},y.fillGroupStyle=function(t,e,r){t.style("stroke-width",0).each((function(t){var i=n.select(this);t[0].trace&&w(i,t[0].trace,e,r)}))};var k=r(68735);y.symbolNames=[],y.symbolFuncs=[],y.symbolBackOffs=[],y.symbolNeedLines={},y.symbolNoDot={},y.symbolNoFill={},y.symbolList=[],Object.keys(k).forEach((function(t){var e=k[t],r=e.n;y.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),y.symbolNames[r]=t,y.symbolFuncs[r]=e.f,y.symbolBackOffs[r]=e.backoff||0,e.needLine&&(y.symbolNeedLines[r]=!0),e.noDot?y.symbolNoDot[r]=!0:y.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(y.symbolNoFill[r]=!0)}));var A=y.symbolNames.length;function M(t,e,r,n){var i=t%100;return y.symbolFuncs[i](e,r,n)+(t>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}y.symbolNumber=function(t){if(a(t))t=+t;else if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=y.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=A||t>=400?0:Math.floor(Math.max(t,0))};var T=o("~f"),S={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function C(t,e,r,o,a,l,u,h,d,f){var p,m=a.length;"linear"===o?p={node:"linearGradient",attrs:{x1:u.x,y1:u.y,x2:h.x,y2:h.y,gradientUnits:d?"userSpaceOnUse":"objectBoundingBox"},reversed:f}:"radial"===o&&(p={node:"radialGradient",reversed:f});for(var g=new Array(m),v=0;v=0&&void 0===t.i&&(t.i=a.i),e.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(t):void 0===t.mo?s.opacity:t.mo),n.ms2mrc){var u;u="various"===t.ms||"various"===s.size?3:n.ms2mrc(t.ms),t.mrc=u,n.selectedSizeFn&&(u=t.mrc=n.selectedSizeFn(t));var h=y.symbolNumber(t.mx||s.symbol)||0;t.om=h%200>=100;var d=nt(t,r),f=q(t,r);e.attr("d",M(h,u,d,f))}var p,m,g,v=!1;if(t.so)g=l.outlierwidth,m=l.outliercolor,p=s.outliercolor;else{var b=(l||{}).width;g=(t.mlw+1||b+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,m="mlc"in t?t.mlcc=n.lineScale(t.mlc):i.isArrayOrTypedArray(l.color)?c.defaultLine:l.color,i.isArrayOrTypedArray(s.color)&&(p=c.defaultLine,v=!0),p="mc"in t?t.mcc=n.markerScale(t.mc):s.color||s.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(p=n.selectedColorFn(t))}if(t.om)e.call(c.stroke,p).style({"stroke-width":(g||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:g)+"px");var x=s.gradient,_=t.mgt;_?v=!0:_=x&&x.type,i.isArrayOrTypedArray(_)&&(_=_[0],S[_]||(_=0));var w=s.pattern,k=w&&y.getPatternAttr(w.shape,t.i,"");if(_&&"none"!==_){var A=t.mgc;A?v=!0:A=x.color;var T=r.uid;v&&(T+="-"+t.i),y.gradient(e,o,T,_,[[0,A],[1,p]],"fill")}else if(k){var C=!1,E=w.fgcolor;!E&&a&&a.color&&(E=a.color,C=!0);var L=y.getPatternAttr(E,t.i,a&&a.color||null),z=y.getPatternAttr(w.bgcolor,t.i,null),O=w.fgopacity,D=y.getPatternAttr(w.size,t.i,8),I=y.getPatternAttr(w.solidity,t.i,.3);C=C||t.mcc||i.isArrayOrTypedArray(w.shape)||i.isArrayOrTypedArray(w.bgcolor)||i.isArrayOrTypedArray(w.fgcolor)||i.isArrayOrTypedArray(w.size)||i.isArrayOrTypedArray(w.solidity);var F=r.uid;C&&(F+="-"+t.i),y.pattern(e,"point",o,F,k,D,I,t.mcc,w.fillmode,z,L,O)}else i.isArrayOrTypedArray(p)?c.fill(e,p[t.i]):c.fill(e,p);g&&c.stroke(e,m)}},y.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=y.tryColorscale(r,""),e.lineScale=y.tryColorscale(r,"line"),l.traceIs(t,"symbols")&&(e.ms2mrc=g.isBubble(t)?v(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,y.makeSelectedPointStyleFns(t)),e},y.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},o=t.marker||{},a=r.marker||{},s=n.marker||{},c=o.opacity,u=a.opacity,h=s.opacity,d=void 0!==u,f=void 0!==h;(i.isArrayOrTypedArray(c)||d||f)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?o.opacity:t.mo;return t.selected?d?u:e:f?h:m*e});var p=o.color,g=a.color,v=s.color;(g||v)&&(e.selectedColorFn=function(t){var e=t.mcc||p;return t.selected?g||e:v||e});var b=o.size,y=a.size,x=s.size,_=void 0!==y,w=void 0!==x;return l.traceIs(t,"symbols")&&(_||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||b/2;return t.selected?_?y/2:e:w?x/2:e}),e},y.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},o=r.textfont||{},a=n.textfont||{},s=i.color,l=o.color,u=a.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:u||(l?e:c.addOpacity(e,m))},e},y.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=y.makeSelectedPointStyleFns(e),i=e.marker||{},o=[];r.selectedOpacityFn&&o.push((function(t,e){t.style("opacity",r.selectedOpacityFn(e))})),r.selectedColorFn&&o.push((function(t,e){c.fill(t,r.selectedColorFn(e))})),r.selectedSizeFn&&o.push((function(t,n){var o=n.mx||i.symbol||0,a=r.selectedSizeFn(n);t.attr("d",M(y.symbolNumber(o),a,nt(n,e),q(n,e))),n.mrc2=a})),o.length&&t.each((function(t){for(var e=n.select(this),r=0;r0?r:0}function I(t,e,r){return r&&(t=B(t)),e?R(t[1]):F(t[0])}function F(t){var e=n.round(t,2);return E=e,e}function R(t){var e=n.round(t,2);return L=e,e}function P(t,e,r,n){var i=t[0]-e[0],o=t[1]-e[1],a=r[0]-e[0],s=r[1]-e[1],l=Math.pow(i*i+o*o,.25),c=Math.pow(a*a+s*s,.25),u=(c*c*i-l*l*a)*n,h=(c*c*o-l*l*s)*n,d=3*c*(l+c),f=3*l*(l+c);return[[F(e[0]+(d&&u/d)),R(e[1]+(d&&h/d))],[F(e[0]-(f&&u/f)),R(e[1]-(f&&h/f))]]}y.textPointStyle=function(t,e,r){if(t.size()){var o;if(e.selectedpoints){var a=y.makeSelectedTextStyleFns(e);o=a.selectedTextColorFn}var s=e.texttemplate,l=r._fullLayout;t.each((function(t){var a=n.select(this),c=s?i.extractOption(t,e,"txt","texttemplate"):i.extractOption(t,e,"tx","text");if(c||0===c){if(s){var u=e._module.formatLabels,h=u?u(t,e,l):{},f={};b(f,e,t.i);var p=e._meta||{};c=i.texttemplateString(c,h,l._d3locale,f,t,p)}var m=t.tp||e.textposition,g=D(t,e),v=o?o(t):t.tc||e.textfont.color;a.call(y.font,{family:t.tf||e.textfont.family,weight:t.tw||e.textfont.weight,style:t.ty||e.textfont.style,variant:t.tv||e.textfont.variant,textcase:t.tC||e.textfont.textcase,lineposition:t.tE||e.textfont.lineposition,shadow:t.tS||e.textfont.shadow,size:g,color:v}).text(c).call(d.convertToTspans,r).call(O,m,g,t.mrc)}else a.remove()}))}},y.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=y.makeSelectedTextStyleFns(e);t.each((function(t){var i=n.select(this),o=r.selectedTextColorFn(t),a=t.tp||e.textposition,s=D(t,e);c.fill(i,o);var u=l.traceIs(e,"bar-like");O(i,a,s,t.mrc2||t.mrc,u)}))}},y.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],i=[];for(r=1;r=c||w>=h&&w<=c)&&(k<=d&&k>=u||k>=d&&k<=u)&&(t=[w,k])}return t}y.steps=function(t){var e=j[t]||N;return function(t){for(var r="M"+F(t[0][0])+","+R(t[0][1]),n=t.length,i=1;i=1e4&&(y.savedBBoxes={},U=0),r&&(y.savedBBoxes[r]=g),U++,i.extendFlat({},g)},y.setClipUrl=function(t,e,r){t.attr("clip-path",V(e,r))},y.getTranslate=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||0,y:+e[1]||0}},y.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",o=t[n]("transform")||"";return e=e||0,r=r||0,o=o.replace(/(\btranslate\(.*?\);?)/,"").trim(),o=(o+=h(e,r)).trim(),t[i]("transform",o),o},y.getScale=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||1,y:+e[1]||1}},y.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",o=t[n]("transform")||"";return e=e||1,r=r||1,o=o.replace(/(\bscale\(.*?\);?)/,"").trim(),o=(o+="scale("+e+","+r+")").trim(),t[i]("transform",o),o};var H=/\s*sc.*/;y.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":"scale("+e+","+r+")";t.each((function(){var t=(this.getAttribute("transform")||"").replace(H,"");t=(t+=n).trim(),this.setAttribute("transform",t)}))}};var W=/translate\([^)]*\)\s*$/;function q(t,e){var r;return t&&(r=t.mf),void 0===r&&(r=e.marker&&e.marker.standoff||0),e._geo||e._xA?r:-r}y.setTextPointsScale=function(t,e,r){t&&t.each((function(){var t,i=n.select(this),o=i.select("text");if(o.node()){var a=parseFloat(o.attr("x")||0),s=parseFloat(o.attr("y")||0),l=(i.attr("transform")||"").match(W);t=1===e&&1===r?[]:[h(a,s),"scale("+e+","+r+")",h(-a,-s)],l&&t.push(l),i.attr("transform",t.join(""))}}))},y.getMarkerStandoff=q;var Y,Z,X,$,J,K,Q=Math.atan2,tt=Math.cos,et=Math.sin;function rt(t,e){var r=e[0],n=e[1];return[r*tt(t)-n*et(t),r*et(t)+n*tt(t)]}function nt(t,e){var r,n,o=t.ma;void 0===o&&((o=e.marker.angle)&&!i.isArrayOrTypedArray(o)||(o=0));var s=e.marker.angleref;if("previous"===s||"north"===s){if(e._geo){var l=e._geo.project(t.lonlat);r=l[0],n=l[1]}else{var c=e._xA,u=e._yA;if(!c||!u)return 90;r=c.c2p(t.x),n=u.c2p(t.y)}if(e._geo){var h,d=t.lonlat[0],f=t.lonlat[1],p=e._geo.project([d,f+1e-5]),m=e._geo.project([d+1e-5,f]),g=Q(m[1]-n,m[0]-r),v=Q(p[1]-n,p[0]-r);if("north"===s)h=o/180*Math.PI;else if("previous"===s){var b=d/180*Math.PI,y=f/180*Math.PI,x=Y/180*Math.PI,_=Z/180*Math.PI,w=x-b,k=tt(_)*et(w),A=et(_)*tt(y)-tt(_)*et(y)*tt(w);h=-Q(k,A)-Math.PI,Y=d,Z=f}var M=rt(g,[tt(h),0]),T=rt(v,[et(h),0]);o=Q(M[1]+T[1],M[0]+T[0])/Math.PI*180,"previous"!==s||K===e.uid&&t.i===J+1||(o=null)}if("previous"===s&&!e._geo)if(K===e.uid&&t.i===J+1&&a(r)&&a(n)){var S=r-X,C=n-$,E=e.line&&e.line.shape||"",L=E.slice(E.length-1);"h"===L&&(C=0),"v"===L&&(S=0),o+=Q(C,S)/Math.PI*180+90}else o=null}return X=r,$=n,J=t.i,K=e.uid,o}y.getMarkerAngle=nt},68735:(t,e,r)=>{"use strict";var n,i,o,a,s=r(37974),l=r(27941).round,c="M0,0Z",u=Math.sqrt(2),h=Math.sqrt(3),d=Math.PI,f=Math.cos,p=Math.sin;function m(t){return null===t}function g(t,e,r){if(!(t&&t%360!=0||e))return r;if(o===t&&a===e&&n===r)return i;function l(t,r){var n=f(t),i=p(t),o=r[0],a=r[1]+(e||0);return[o*n-a*i,o*i+a*n]}o=t,a=e,n=r;for(var c=t/180*d,u=0,h=0,m=s(r),g="",v=0;v{"use strict";t.exports={visible:{valType:"boolean",editType:"calc",description:["Determines whether or not this set of error bars is visible."].join(" ")},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc",description:["Determines the rule used to generate the error bars.","If *constant`, the bar lengths are of a constant value.","Set this constant in `value`.","If *percent*, the bar lengths correspond to a percentage of","underlying data. Set this percentage in `value`.","If *sqrt*, the bar lengths correspond to the square of the","underlying data.","If *data*, the bar lengths are set with data set `array`."].join(" ")},symmetric:{valType:"boolean",editType:"calc",description:["Determines whether or not the error bars have the same length","in both direction","(top/bottom for vertical bars, left/right for horizontal bars."].join(" ")},array:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar.","Values are plotted relative to the underlying data."].join(" ")},arrayminus:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar in the","bottom (left) direction for vertical (horizontal) bars","Values are plotted relative to the underlying data."].join(" ")},value:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars."].join(" ")},valueminus:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars in the","bottom (left) direction for vertical (horizontal) bars"].join(" ")},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style",description:"Sets the stoke color of the error bars."},thickness:{valType:"number",min:0,dflt:2,editType:"style",description:"Sets the thickness (in px) of the error bars."},width:{valType:"number",min:0,editType:"plot",description:["Sets the width (in px) of the cross-bar at both ends","of the error bars."].join(" ")},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style",description:["Obsolete.","Use the alpha channel in error bar `color` to set the opacity."].join(" ")}}}},8295:(t,e,r)=>{"use strict";var n=r(7370),i=r(25059),o=r(75815),a=r(12822),s=r(27512);function l(t,e,r,i){var l=e["error_"+i]||{},c=[];if(l.visible&&-1!==["linear","log"].indexOf(r.type)){for(var u=s(l),h=0;h{"use strict";function e(t,e){return"percent"===t?function(t){return Math.abs(t*e/100)}:"constant"===t?function(){return Math.abs(e)}:"sqrt"===t?function(t){return Math.sqrt(Math.abs(t))}:void 0}t.exports=function(t){var r=t.type,n=t.symmetric;if("data"===r){var i=t.array||[];if(n)return function(t,e){var r=+i[e];return[r,r]};var o=t.arrayminus||[];return function(t,e){var r=+i[e],n=+o[e];return isNaN(r)&&isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var a=e(r,t.value),s=e(r,t.valueminus);return n||void 0===t.valueminus?function(t){var e=a(t);return[e,e]}:function(t){return[s(t),a(t)]}}},69440:(t,e,r)=>{"use strict";var n=r(7370),i=r(25059),o=r(12822),a=r(46121),s=r(96647);t.exports=function(t,e,r,l){var c="error_"+l.axis,u=a.newContainer(e,c),h=t[c]||{};function d(t,e){return o.coerce(h,u,s,t,e)}if(!1!==d("visible",void 0!==h.array||void 0!==h.value||"sqrt"===h.type)){var f=d("type","array"in h?"data":"percent"),p=!0;"sqrt"!==f&&(p=d("symmetric",!(("data"===f?"arrayminus":"valueminus")in h))),"data"===f?(d("array"),d("traceref"),p||(d("arrayminus"),d("tracerefminus"))):"percent"!==f&&"constant"!==f||(d("value"),p||d("valueminus"));var m="copy_"+l.inherit+"style";l.inherit&&(e["error_"+l.inherit]||{}).visible&&d(m,!(h.color||n(h.thickness)||n(h.width))),l.inherit&&u[m]||(d("color",r),d("thickness"),d("width",i.traceIs(e,"gl3d")?0:4))}}},90156:(t,e,r)=>{"use strict";var n=r(12822),i=r(62309).overrideAll,o=r(96647),a={error_x:n.extendFlat({},o),error_y:n.extendFlat({},o)};delete a.error_x.copy_zstyle,delete a.error_y.copy_zstyle,delete a.error_y.copy_ystyle;var s={error_x:n.extendFlat({},o),error_y:n.extendFlat({},o),error_z:n.extendFlat({},o)};delete s.error_x.copy_ystyle,delete s.error_y.copy_ystyle,delete s.error_z.copy_ystyle,delete s.error_z.copy_zstyle,t.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:a,bar:a,histogram:a,scatter3d:i(s,"calc","nested"),scattergl:i(a,"calc","nested")}},supplyDefaults:r(69440),calc:r(8295),makeComputeError:r(27512),plot:r(42961),style:r(83821),hoverInfo:function(t,e,r){(e.error_y||{}).visible&&(r.yerr=t.yh-t.y,e.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(e.error_x||{}).visible&&(r.xerr=t.xh-t.x,e.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}},42961:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=r(40666),a=r(677);t.exports=function(t,e,r,s){var l=r.xaxis,c=r.yaxis,u=s&&s.duration>0,h=t._context.staticPlot;e.each((function(e){var d,f=e[0].trace,p=f.error_x||{},m=f.error_y||{};f.ids&&(d=function(t){return t.id});var g=a.hasMarkers(f)&&f.marker.maxdisplayed>0;m.visible||p.visible||(e=[]);var v=n.select(this).selectAll("g.errorbar").data(e,d);if(v.exit().remove(),e.length){p.visible||v.selectAll("path.xerror").remove(),m.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var b=v.enter().append("g").classed("errorbar",!0);u&&b.style("opacity",0).transition().duration(s.duration).style("opacity",1),o.setClipUrl(v,r.layerClipId,t),v.each((function(t){var e=n.select(this),r=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};return void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0))),void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0))),n}(t,l,c);if(!g||t.vis){var o,a=e.select("path.yerror");if(m.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var d=m.width;o="M"+(r.x-d)+","+r.yh+"h"+2*d+"m-"+d+",0V"+r.ys,r.noYS||(o+="m-"+d+",0h"+2*d),a.size()?u&&(a=a.transition().duration(s.duration).ease(s.easing)):a=e.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("yerror",!0),a.attr("d",o)}else a.remove();var f=e.select("path.xerror");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var v=(p.copy_ystyle?m:p).width;o="M"+r.xh+","+(r.y-v)+"v"+2*v+"m0,-"+v+"H"+r.xs,r.noXS||(o+="m0,-"+v+"v"+2*v),f.size()?u&&(f=f.transition().duration(s.duration).ease(s.easing)):f=e.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("xerror",!0),f.attr("d",o)}else f.remove()}}))}}))}},83821:(t,e,r)=>{"use strict";var n=r(27941),i=r(17499);t.exports=function(t){t.each((function(t){var e=t[0].trace,r=e.error_y||{},o=e.error_x||{},a=n.select(this);a.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),o.copy_ystyle&&(o=r),a.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(i.stroke,o.color)}))}},60713:(t,e,r)=>{"use strict";var n=r(75058),i=r(53572).hoverlabel,o=r(98260).extendFlat;t.exports={hoverlabel:{bgcolor:o({},i.bgcolor,{arrayOk:!0,description:"Sets the background color of the hover labels for this trace"}),bordercolor:o({},i.bordercolor,{arrayOk:!0,description:"Sets the border color of the hover labels for this trace."}),font:n({arrayOk:!0,editType:"none",description:"Sets the font used in hover labels."}),align:o({},i.align,{arrayOk:!0}),namelength:o({},i.namelength,{arrayOk:!0}),editType:"none"}}},56173:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059);function o(t,e,r,i){i=i||n.identity,Array.isArray(t)&&(e[0][r]=i(t))}t.exports=function(t){var e=t.calcdata,r=t._fullLayout;function a(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},r)}}for(var s=0;s{"use strict";var n=r(25059),i=r(87408).hover;t.exports=function(t,e,r){var o=n.getComponentMethod("annotations","onClick")(t,t._hoverdata);function a(){t.emit("plotly_click",{points:t._hoverdata,event:e})}void 0!==r&&i(t,e,r,!0),t._hoverdata&&e&&e.target&&(o&&o.then?o.then(a):a(),e.stopImmediatePropagation&&e.stopImmediatePropagation())}},99259:t=>{"use strict";t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},55470:(t,e,r)=>{"use strict";var n=r(12822),i=r(60713),o=r(33369);t.exports=function(t,e,r,a){var s=n.extendFlat({},a.hoverlabel);e.hovertemplate&&(s.namelength=-1),o(t,e,(function(r,o){return n.coerce(t,e,i,r,o)}),s)}},66811:(t,e,r)=>{"use strict";var n=r(12822);e.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},e.isTraceInSubplots=function(t,r){if("splom"===t.type){for(var n=t.xaxes||[],i=t.yaxes||[],o=0;o=0&&r.index{"use strict";var n=r(27941),i=r(7370),o=r(18106),a=r(12822),s=a.pushUnique,l=a.strTranslate,c=a.strRotate,u=r(16677),h=r(80394),d=r(27517),f=r(40666),p=r(17499),m=r(19846),g=r(75815),v=r(21197).zindexSeparator,b=r(25059),y=r(66811),x=r(99259),_=r(64083),w=r(67739),k=x.YANGLE,A=Math.PI*k/180,M=1/Math.sin(A),T=Math.cos(A),S=Math.sin(A),C=x.HOVERARROWSIZE,E=x.HOVERTEXTPAD,L={box:!0,ohlc:!0,violin:!0,candlestick:!0},z={scatter:!0,scattergl:!0,splom:!0};function O(t,e){return t.distance-e.distance}function D(t){return[t.trace.index,t.index,t.x0,t.y0,t.name,t.attr,t.xa?t.xa._id:"",t.ya?t.ya._id:""].join(",")}e.hover=function(t,e,r,o){t=a.getGraphDiv(t);var l=e.target;a.throttle(t._fullLayout._uid+x.HOVERID,x.HOVERMINTIME,(function(){!function(t,e,r,o,l){r||(r="xy"),"string"==typeof r&&(r=r.split(v)[0]);var c,h,f,x=Array.isArray(r)?r:[r],_=t._fullLayout,w=_.hoversubplots,k=_._plots||[],A=k[r],T=_._has("cartesian"),S=e.hovermode||_.hovermode,E="x"===(S||"").charAt(0),I="y"===(S||"").charAt(0);if(T&&(E||I)&&"axis"===w)for(var R=x.length,G=0;G$[0]._length||_t<0||_t>J[0]._length)return m.unhoverRaw(t,e)}else xt="xpx"in e?e.xpx:$[0]._length/2,_t="ypx"in e?e.ypx:J[0]._length/2;if(e.pointerX=xt+$[0]._offset,e.pointerY=_t+J[0]._offset,nt="xval"in e?y.flat(x,e.xval):y.p2c($,xt),it="yval"in e?y.flat(x,e.yval):y.p2c(J,_t),!i(nt[0])||!i(it[0]))return a.warn("Fx.hover failed",e,t),m.unhoverRaw(t,e)}var Mt=1/0;function Tt(r,n){for(at=0;atmt&&(gt.splice(0,mt),Mt=gt[0].distance),T&&0!==rt&&0===gt.length){pt.distance=rt,pt.index=!1;var u=lt._module.hoverPoints(pt,dt,ft,"closest",{hoverLayer:_._hoverlayer});if(u&&(u=u.filter((function(t){return t.spikeDistance<=rt}))),u&&u.length){var h,d=u.filter((function(t){return t.xa.showspikes&&"hovered data"!==t.xa.spikesnap}));if(d.length){var f=d[0];i(f.x0)&&i(f.y0)&&(h=Ct(f),(!bt.vLinePoint||bt.vLinePoint.spikeDistance>h.spikeDistance)&&(bt.vLinePoint=h))}var m=u.filter((function(t){return t.ya.showspikes&&"hovered data"!==t.ya.spikesnap}));if(m.length){var g=m[0];i(g.x0)&&i(g.y0)&&(h=Ct(g),(!bt.hLinePoint||bt.hLinePoint.spikeDistance>h.spikeDistance)&&(bt.hLinePoint=h))}}}}}function St(t,e,r){for(var n,i=null,o=1/0,a=0;a0&&Math.abs(t.distance)Nt-1;Bt--)Ht(gt[Bt]);gt=Ut,Ot()}var Wt=t._hoverdata,qt=[],Yt=H(t),Zt=W(t);for(ot=0;ot1||gt.length>1)||"closest"===S&&yt&>.length>1,se=p.combine(_.plot_bgcolor||p.background,_.paper_bgcolor),le=F(gt,{gd:t,hovermode:S,rotateLabels:ae,bgColor:se,container:_._hoverlayer,outerContainer:_._paper.node(),commonLabelOpts:_.hoverlabel,hoverdistance:_.hoverdistance}),ce=le.hoverLabels;if(y.isUnifiedHover(S)||(function(t,e,r,n){var i,o,a,s,l,c,u,h=e?"xa":"ya",d=e?"ya":"xa",f=0,p=1,m=t.size(),g=new Array(m),v=0,b=n.minX,y=n.maxX,x=n.minY,_=n.maxY,w=function(t){return t*r._invScaleX},k=function(t){return t*r._invScaleY};function A(t){var e=t[0],r=t[t.length-1];if(o=e.pmin-e.pos-e.dp+e.size,a=r.pos+r.dp+r.size-e.pmax,o>.01){for(l=t.length-1;l>=0;l--)t[l].dp+=o;i=!1}if(!(a<.01)){if(o<-.01){for(l=t.length-1;l>=0;l--)t[l].dp-=a;i=!1}if(i){var n=0;for(s=0;se.pmax&&n++;for(s=t.length-1;s>=0&&!(n<=0);s--)(c=t[s]).pos>e.pmax-1&&(c.del=!0,n--);for(s=0;s=0;l--)t[l].dp-=a;for(s=t.length-1;s>=0&&!(n<=0);s--)(c=t[s]).pos+c.dp+c.size>e.pmax&&(c.del=!0,n--)}}}for(t.each((function(t){var n=t[h],i=t[d],o="x"===n._id.charAt(0),a=n.range;0===v&&a&&a[0]>a[1]!==o&&(p=-1);var s=0,l=o?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var c,u,f=P(t,e),m=t.anchor,A="end"===m?-1:1;if("middle"===m)u=(c=t.crossPos+(o?k(f.y-t.by/2):w(t.bx/2+t.tx2width/2)))+(o?k(t.by):w(t.bx));else if(o)u=(c=t.crossPos+k(C+f.y)-k(t.by/2-C))+k(t.by);else{var T=w(A*C+f.x),S=T+w(A*t.bx);c=t.crossPos+Math.min(T,S),u=t.crossPos+Math.max(T,S)}o?void 0!==x&&void 0!==_&&Math.min(u,_)-Math.max(c,x)>1&&("left"===i.side?(s=i._mainLinePosition,l=r.width):l=i._mainLinePosition):void 0!==b&&void 0!==y&&Math.min(u,y)-Math.max(c,b)>1&&("top"===i.side?(s=i._mainLinePosition,l=r.height):l=i._mainLinePosition)}g[v++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(o?M:1)/2,pmin:s,pmax:l}]})),g.sort((function(t,e){return t[0].posref-e[0].posref||p*(e[0].traceIndex-t[0].traceIndex)}));!i&&f<=m;){for(f++,i=!0,s=0;s.01){for(l=S.length-1;l>=0;l--)S[l].dp+=o;for(T.push.apply(T,S),g.splice(s+1,1),u=0,l=T.length-1;l>=0;l--)u+=T[l].dp;for(a=u/T.length,l=T.length-1;l>=0;l--)T[l].dp-=a;i=!1}else s++}g.forEach(A)}for(s=g.length-1;s>=0;s--){var z=g[s];for(l=z.length-1;l>=0;l--){var O=z[l],D=O.datum;D.offset=O.dp,D.del=O.del}}}(ce,ae,_,le.commonLabelBoundingBox),j(ce,ae,_._invScaleX,_._invScaleY)),l&&l.tagName){var ue=b.getComponentMethod("annotations","hasClickToShow")(t,qt);d(n.select(l),ue?"pointer":"")}l&&!o&&function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],o=t._hoverdata[n];if(i.curveNumber!==o.curveNumber||String(i.pointNumber)!==String(o.pointNumber)||String(i.pointNumbers)!==String(o.pointNumbers))return!0}return!1}(t,0,Wt)&&(Wt&&t.emit("plotly_unhover",{event:e,points:Wt}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:$,yaxes:J,xvals:nt,yvals:it}))}(t,e,r,o,l)}))},e.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=e.gd,o=H(i),a=W(i),s=!1,l=F(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,c=t.eventData;if(c){var u=Math.min(r,n),h=Math.max(r,n),d=Math.min(s,l),f=Math.max(s,l),m=t.trace;if(b.traceIs(m,"gl3d")){var g=i._fullLayout[m.scene]._scene.container,v=g.offsetLeft,y=g.offsetTop;u+=v,h+=v,d+=y,f+=y}c.bbox={x0:u+a,x1:h+a,y0:d+o,y1:f+o},e.inOut_bbox&&e.inOut_bbox.push(c.bbox)}else c=!1;return{color:t.color||p.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontVariant:t.fontVariant,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:"closest",rotateLabels:s,bgColor:e.bgColor||p.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}).hoverLabels,c=0,u=0;return l.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5([\s\S]*)<\/extra>/;function F(t,e){var r=e.gd,i=r._fullLayout,o=e.hovermode,s=e.rotateLabels,u=e.bgColor,d=e.container,m=e.outerContainer,g=e.commonLabelOpts||{};if(0===t.length)return[[]];var v=e.fontFamily||x.HOVERFONT,A=e.fontSize||x.HOVERFONTSIZE,M=e.fontWeight||i.font.weight,T=e.fontStyle||i.font.style,S=e.fontVariant||i.font.variant,L=e.fontTextcase||i.font.textcase,z=e.fontLineposition||i.font.lineposition,O=e.fontShadow||i.font.shadow,I=t[0],F=I.xa,P=I.ya,j=o.charAt(0),N=j+"Label",B=I[N];if(void 0===B&&"multicategory"===F.type)for(var U=0;Ui.width-k&&(D=i.width-k),e.attr("d","M"+(y-D)+",0L"+(y-D+C)+","+w+C+"H"+k+"v"+w+(2*E+_.height)+"H"+-k+"V"+w+C+"H"+(y-D-C)+"Z"),y=D,Q.minX=y-k,Q.maxX=y+k,"top"===F.side?(Q.minY=x-(2*E+_.height),Q.maxY=x-E):(Q.minY=x+E,Q.maxY=x+(2*E+_.height))}else{var R,j,N;"right"===P.side?(R="start",j=1,N="",y=F._offset+F._length):(R="end",j=-1,N="-",y=F._offset),x=P._offset+(I.y0+I.y1)/2,s.attr("text-anchor",R),e.attr("d","M0,0L"+N+C+","+C+"V"+(E+_.height/2)+"h"+N+(2*E+_.width)+"V-"+(E+_.height/2)+"H"+N+C+"V-"+C+"Z"),Q.minY=x-(E+_.height/2),Q.maxY=x+(E+_.height/2),"right"===P.side?(Q.minX=y+C,Q.maxX=y+C+(2*E+_.width)):(Q.minX=y-C-(2*E+_.width),Q.maxX=y-C);var U,G=_.height/2,H=V-_.top-G,W="clip"+i._uid+"commonlabel"+P._id;if(y<_.width+2*E+C){U="M-"+(C+E)+"-"+G+"h-"+(_.width-E)+"V"+G+"h"+(_.width-E)+"Z";var Y=_.width-y+E;h.positionText(s,Y,H),"end"===R&&s.selectAll("tspan").each((function(){var t=n.select(this),e=f.tester.append("text").text(t.text()).call(f.font,b),i=q(r,e.node());Math.round(i.width)=0?pt:mt+bt=0?mt:Tt+bt=0?dt:ft+yt=0?ft:St+yt=0,"top"!==t.idealAlign&&J||!K?J?(N+=G/2,t.anchor="start"):t.anchor="middle":(N-=G/2,t.anchor="end"),t.crossPos=N;else{if(t.pos=N,J=j+U/2+Q<=H,K=j-U/2-Q>=0,"left"!==t.idealAlign&&J||!K)if(J)j+=U/2,t.anchor="start";else{t.anchor="middle";var tt=Q/2,et=j+tt-H,rt=j-tt;et>0&&(j-=et),rt<0&&(j+=-rt)}else j-=U/2,t.anchor="end";t.crossPos=j}w.attr("text-anchor",t.anchor),I&&D.attr("text-anchor",t.anchor),e.attr("transform",l(j,N)+(s?c(k):""))})),{hoverLabels:Ct,commonLabelBoundingBox:Q}}function R(t,e,r,n,i,o){var s="",l="";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=a.templateString(t.name,t.trace._meta)),s=G(t.name,t.nameLength));var c=r.charAt(0),u="x"===c?"y":"x";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(l+="y: "+t.yLabel+"
"),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&"choroplethmap"!==t.trace.type&&(l+=(l?"z: ":"")+t.zLabel)):e&&t[c+"Label"]===i?l=t[u+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&"scattercarpet"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?"
":"")+t.text),void 0!==t.extraText&&(l+=(l?"
":"")+t.extraText),o&&""===l&&!t.hovertemplate&&(""===s&&o.remove(),l=s);var h=t.hovertemplate||!1;if(h){var d=t.hovertemplateLabels||t;t[c+"Label"]!==i&&(d[c+"other"]=d[c+"Val"],d[c+"otherLabel"]=d[c+"Label"]),l=(l=a.hovertemplateString(h,d,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(I,(function(e,r){return s=G(r,t.nameLength),""}))}return[l,s]}function P(t,e){var r=0,n=t.offset;return e&&(n*=-S,r=t.offset*T),{x:r,y:n}}function j(t,e,r,i){var o=function(t){return t*r},a=function(t){return t*i};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i,s,l,c,u=r.select("text.nums"),d=t.anchor,p="end"===d?-1:1,m=(c=(l=(s={start:1,end:-1,middle:0}[(i=t).anchor])*(C+E))+s*(i.txwidth+E),"middle"===i.anchor&&(l-=i.tx2width/2,c+=i.txwidth/2+E),{alignShift:s,textShiftX:l,text2ShiftX:c}),g=P(t,e),v=g.x,b=g.y,y="middle"===d;r.select("path").attr("d",y?"M-"+o(t.bx/2+t.tx2width/2)+","+a(b-t.by/2)+"h"+o(t.bx)+"v"+a(t.by)+"h-"+o(t.bx)+"Z":"M0,0L"+o(p*C+v)+","+a(C+b)+"v"+a(t.by/2-C)+"h"+o(p*t.bx)+"v-"+a(t.by)+"H"+o(p*C+v)+"V"+a(b-C)+"Z");var x=v+m.textShiftX,_=b+t.ty0-t.by/2+E,w=t.textAlign||"auto";"auto"!==w&&("left"===w&&"start"!==d?(u.attr("text-anchor","start"),x=y?-t.bx/2-t.tx2width/2+E:-t.bx-E):"right"===w&&"end"!==d&&(u.attr("text-anchor","end"),x=y?t.bx/2-t.tx2width/2-E:t.bx+E)),u.call(h.positionText,o(x),a(_)),t.tx2width&&(r.select("text.name").call(h.positionText,o(m.text2ShiftX+m.alignShift*E+v),a(b+t.ty0-t.by/2+E)),r.select("rect").call(f.setRect,o(m.text2ShiftX+(m.alignShift-1)*t.tx2width/2+v),a(b-t.by/2-1),o(t.tx2width),a(t.by+2)))}))}function N(t,e){var r=t.index,n=t.trace||{},o=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var c=Array.isArray(r)?function(t,e){var i=a.castOption(o,r,t);return l(i)?i:a.extractOption({},n,"",e)}:function(t,e){return a.extractOption(s,n,t,e)};function u(e,r,n){var i=c(r,n);l(i)&&(t[e]=i)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("fontWeight","htw","hoverlabel.font.weight"),u("fontStyle","hty","hoverlabel.font.style"),u("fontVariant","htv","hoverlabel.font.variant"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),t.posref="y"===e||"closest"===e&&"h"===n.orientation?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=a.constrain(t.x0,0,t.xa._length),t.x1=a.constrain(t.x1,0,t.xa._length),t.y0=a.constrain(t.y0,0,t.ya._length),t.y1=a.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel="xLabel"in t?t.xLabel:g.hoverLabelText(t.xa,t.xLabelVal,n.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel="yLabel"in t?t.yLabel:g.hoverLabelText(t.ya,t.yLabelVal,n.yhoverformat),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var h=g.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+h+" / -"+g.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" ± "+h,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var d=g.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+d+" / -"+g.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" ± "+d,"y"===e&&(t.distance+=1)}var f=t.hoverinfo||t.trace.hoverinfo;return f&&"all"!==f&&(-1===(f=Array.isArray(f)?f:f.split("+")).indexOf("x")&&(t.xLabel=void 0),-1===f.indexOf("y")&&(t.yLabel=void 0),-1===f.indexOf("z")&&(t.zLabel=void 0),-1===f.indexOf("text")&&(t.text=void 0),-1===f.indexOf("name")&&(t.name=void 0)),t}function B(t,e,r){var n,i,a=r.container,s=r.fullLayout,l=s._size,c=r.event,u=!!e.hLinePoint,h=!!e.vLinePoint;if(a.selectAll(".spikeline").remove(),h||u){var d=p.combine(s.plot_bgcolor,s.paper_bgcolor);if(u){var m,v,b=e.hLinePoint;n=b&&b.xa,"cursor"===(i=b&&b.ya).spikesnap?(m=c.pointerX,v=c.pointerY):(m=n._offset+b.x,v=i._offset+b.y);var y,x,_=o.readability(b.color,d)<1.5?p.contrast(d):b.color,w=i.spikemode,k=i.spikethickness,A=i.spikecolor||_,M=g.getPxPosition(t,i);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(y=M,x=m),-1!==w.indexOf("across")){var T=i._counterDomainMin,S=i._counterDomainMax;"free"===i.anchor&&(T=Math.min(T,i.position),S=Math.max(S,i.position)),y=l.l+T*l.w,x=l.l+S*l.w}a.insert("line",":first-child").attr({x1:y,x2:x,y1:v,y2:v,"stroke-width":k,stroke:A,"stroke-dasharray":f.dashStyle(i.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:y,x2:x,y1:v,y2:v,"stroke-width":k+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:M+("right"!==i.side?k:-k),cy:v,r:k,fill:A}).classed("spikeline",!0)}if(h){var C,E,L=e.vLinePoint;n=L&&L.xa,i=L&&L.ya,"cursor"===n.spikesnap?(C=c.pointerX,E=c.pointerY):(C=n._offset+L.x,E=i._offset+L.y);var z,O,D=o.readability(L.color,d)<1.5?p.contrast(d):L.color,I=n.spikemode,F=n.spikethickness,R=n.spikecolor||D,P=g.getPxPosition(t,n);if(-1!==I.indexOf("toaxis")||-1!==I.indexOf("across")){if(-1!==I.indexOf("toaxis")&&(z=P,O=E),-1!==I.indexOf("across")){var j=n._counterDomainMin,N=n._counterDomainMax;"free"===n.anchor&&(j=Math.min(j,n.position),N=Math.max(N,n.position)),z=l.t+(1-N)*l.h,O=l.t+(1-j)*l.h}a.insert("line",":first-child").attr({x1:C,x2:C,y1:z,y2:O,"stroke-width":F,stroke:R,"stroke-dasharray":f.dashStyle(n.spikedash,F)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:C,x2:C,y1:z,y2:O,"stroke-width":F+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==I.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:C,cy:P-("top"!==n.side?F:-F),r:F,fill:R}).classed("spikeline",!0)}}}function U(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function G(t,e){return h.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function V(t,e,r){var n=e[t+"a"],i=e[t+"Val"],o=e.cd[0];if("category"===n.type||"multicategory"===n.type)i=n._categoriesMap[i];else if("date"===n.type){var a=e.trace[t+"periodalignment"];if(a){var s=e.cd[e.index],l=s[t+"Start"];void 0===l&&(l=s[t]);var c=s[t+"End"];void 0===c&&(c=s[t]);var u=c-l;"end"===a?i+=u:"middle"===a&&(i+=u/2)}i=n.d2c(i)}return o&&o.t&&o.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(i+=o.t.dPos)),i}function H(t){return t.offsetTop+t.clientTop}function W(t){return t.offsetLeft+t.clientLeft}function q(t,e){var r=t._fullLayout,n=e.getBoundingClientRect(),i=n.left,o=n.top,s=i+n.width,l=o+n.height,c=a.apply3DTransform(r._invTransform)(i,o),u=a.apply3DTransform(r._invTransform)(s,l),h=c[0],d=c[1],f=u[0],p=u[1];return{x:h,y:d,width:f-h,height:p-d,top:Math.min(d,p),left:Math.min(h,f),right:Math.max(h,f),bottom:Math.max(d,p)}}},33369:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(66811).isUnifiedHover;t.exports=function(t,e,r,a){a=a||{};var s=e.legend;function l(t){a.font[t]||(a.font[t]=s?e.legend.font[t]:e.font[t])}e&&o(e.hovermode)&&(a.font||(a.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),s?(a.bgcolor||(a.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),a.bordercolor||(a.bordercolor=e.legend.bordercolor)):a.bgcolor||(a.bgcolor=e.paper_bgcolor)),r("hoverlabel.bgcolor",a.bgcolor),r("hoverlabel.bordercolor",a.bordercolor),r("hoverlabel.namelength",a.namelength),n.coerceFont(r,"hoverlabel.font",a.font),r("hoverlabel.align",a.align)}},85400:(t,e,r)=>{"use strict";var n=r(12822),i=r(53572);t.exports=function(t,e){function r(r,o){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,o)}return r("clickmode"),r("hoversubplots"),r("hovermode")}},70410:(t,e,r)=>{"use strict";var n=r(27941),i=r(12822),o=r(19846),a=r(66811),s=r(53572),l=r(87408);t.exports={moduleType:"component",name:"fx",constants:r(99259),schema:{layout:s},attributes:r(60713),layoutAttributes:s,supplyLayoutGlobalDefaults:r(26271),supplyDefaults:r(55470),supplyLayoutDefaults:r(3315),calc:r(56173),getDistanceFunction:a.getDistanceFunction,getClosest:a.getClosest,inbox:a.inbox,quadrature:a.quadrature,appendArrayPointValue:a.appendArrayPointValue,castHoverOption:function(t,e,r){return i.castOption(t,e,"hoverlabel."+r)},castHoverinfo:function(t,e,r){return i.castOption(t,r,"hoverinfo",(function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)}))},hover:l.hover,unhover:o.unhover,loneHover:l.loneHover,loneUnhover:function(t){var e=i.isD3Selection(t)?t:n.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()},click:r(43006)}},53572:(t,e,r)=>{"use strict";var n=r(99259),i=r(75058),o=i({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});o.family.dflt=n.HOVERFONT,o.size.dflt=n.HOVERFONTSIZE,t.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"],description:["Determines the mode of single click interactions.","*event* is the default value and emits the `plotly_click`","event. In addition this mode emits the `plotly_selected` event","in drag modes *lasso* and *select*, but with no event data attached","(kept for compatibility reasons).","The *select* flag enables selecting single","data points via click. This mode also supports persistent selections,","meaning that pressing Shift while clicking, adds to / subtracts from an","existing selection. *select* with `hovermode`: *x* can be confusing, consider","explicitly setting `hovermode`: *closest* when using this feature.","Selection events are sent accordingly as long as *event* flag is set as well.","When the *event* flag is missing, `plotly_click` and `plotly_selected`","events are not fired."].join(" ")},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar",description:["Determines the mode of drag interactions.","*select* and *lasso* apply only to scatter traces with","markers or text. *orbit* and *turntable* apply only to","3D scenes."].join(" ")},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions.","If *closest*, a single hoverlabel will appear","for the *closest* point within the `hoverdistance`.","If *x* (or *y*), multiple hoverlabels will appear for multiple points","at the *closest* x- (or y-) coordinate within the `hoverdistance`,","with the caveat that no more than one hoverlabel will appear per trace.","If *x unified* (or *y unified*), a single hoverlabel will appear","multiple points at the closest x- (or y-) coordinate within the `hoverdistance`","with the caveat that no more than one hoverlabel will appear per trace.","In this mode, spikelines are enabled by default perpendicular to the specified axis.","If false, hover interactions are disabled."].join(" ")},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none",description:["Determines expansion of hover effects to other subplots","If *single* just the axis pair of the primary point is included without overlaying subplots.","If *overlaying* all subplots using the main axis and occupying the same space are included.","If *axis*, also include stacked subplots using the same axis","when `hovermode` is set to *x*, *x unified*, *y* or *y unified*."].join(" ")},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none",description:["Sets the default distance (in pixels) to look for data","to add hover labels (-1 means no cutoff, 0 means no looking for data).","This is only a real distance for hovering on point-like objects,","like scatter points. For area-like objects (bars, scatter fills, etc)","hovering is on inside the area and off outside, but these objects","will not supersede hover on point-like objects in case of conflict."].join(" ")},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none",description:["Sets the default distance (in pixels) to look for data to draw","spikelines to (-1 means no cutoff, 0 means no looking for data).","As with hoverdistance, distance does not apply to area-like objects.","In addition, some objects can be hovered on but will not generate","spikelines, such as scatter fills."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"none",description:["Sets the background color of all hover labels on graph"].join(" ")},bordercolor:{valType:"color",editType:"none",description:["Sets the border color of all hover labels on graph."].join(" ")},font:o,grouptitlefont:i({editType:"none",description:["Sets the font for group titles in hover (unified modes).","Defaults to `hoverlabel.font`."].join(" ")}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none",description:["Sets the horizontal alignment of the text content within hover label box.","Has an effect only if the hover label text spans more two or more lines"].join(" ")},namelength:{valType:"integer",min:-1,dflt:15,editType:"none",description:["Sets the default length (in number of characters) of the trace name in","the hover labels for all traces. -1 shows the whole name","regardless of length. 0-3 shows the first 0-3 characters, and","an integer >3 will show the whole name if it is less than that","many characters, but if it is longer, will truncate to","`namelength - 3` characters and add an ellipsis."].join(" ")},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",description:["When `dragmode` is set to *select*, this limits the selection of the drag to","horizontal, vertical or diagonal. *h* only allows horizontal selection,","*v* only vertical, *d* only diagonal and *any* sets no limit."].join(" "),editType:"none"}}},3315:(t,e,r)=>{"use strict";var n=r(12822),i=r(53572),o=r(85400),a=r(33369);t.exports=function(t,e){function r(r,o){return n.coerce(t,e,i,r,o)}o(t,e)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var s=e._has("mapbox"),l=e._has("map"),c=e._has("geo"),u=e._basePlotModules.length;"zoom"===e.dragmode&&((s||l||c)&&1===u||(s||l)&&c&&2===u)&&(e.dragmode="pan"),a(t,e,r),n.coerceFont(r,"hoverlabel.grouptitlefont",e.hoverlabel.font)}},26271:(t,e,r)=>{"use strict";var n=r(12822),i=r(33369),o=r(53572);t.exports=function(t,e){i(t,e,(function(r,i){return n.coerce(t,e,o,r,i)}))}},4664:(t,e,r)=>{"use strict";var n=r(12822),i=r(46233).counter,o=r(40365).u,a=r(21197).idRegex,s=r(46121),l={rows:{valType:"integer",min:1,editType:"plot",description:["The number of rows in the grid. If you provide a 2D `subplots`","array or a `yaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot",description:["Is the first row the top or the bottom? Note that columns","are always enumerated from left to right."].join(" ")},columns:{valType:"integer",min:1,editType:"plot",description:["The number of columns in the grid. If you provide a 2D `subplots`","array, the length of its longest row is used as the default.","If you give an `xaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[i("xy").toString(),""],editType:"plot"},editType:"plot",description:["Used for freeform grids, where some axes may be shared across subplots","but others are not. Each entry should be a cartesian subplot id, like","*xy* or *x3y2*, or ** to leave that cell empty. You may reuse x axes","within the same column, and y axes within the same row.","Non-cartesian subplots and traces that support `domain` can place themselves","in this grid separately using the `gridcell` attribute."].join(" ")},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[a.x.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an x axis id like *x*, *x2*, etc., or ** to","not put an x axis in that column. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `yaxes` is present,","will generate consecutive IDs."].join(" ")},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[a.y.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an y axis id like *y*, *y2*, etc., or ** to","not put a y axis in that row. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `xaxes` is present,","will generate consecutive IDs."].join(" ")},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot",description:["If no `subplots`, `xaxes`, or `yaxes` are given but we do have `rows` and `columns`,","we can generate defaults using consecutive axis IDs, in two ways:","*coupled* gives one x axis per column and one y axis per row.","*independent* uses a new xy pair for each cell, left-to-right across each row","then iterating rows according to `roworder`."].join(" ")},xgap:{valType:"number",min:0,max:1,editType:"plot",description:["Horizontal space between grid cells, expressed as a fraction","of the total width available to one cell. Defaults to 0.1","for coupled-axes grids and 0.2 for independent grids."].join(" ")},ygap:{valType:"number",min:0,max:1,editType:"plot",description:["Vertical space between grid cells, expressed as a fraction","of the total height available to one cell. Defaults to 0.1","for coupled-axes grids and 0.3 for independent grids."].join(" ")},domain:o({name:"grid",editType:"plot",noGridCell:!0},{description:["The first and last cells end exactly at the domain","edges, with no grout around the edges."].join(" ")}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot",description:["Sets where the x axis labels and titles go. *bottom* means","the very bottom of the grid. *bottom plot* is the lowest plot","that each x axis is used in. *top* and *top plot* are similar."].join(" ")},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot",description:["Sets where the y axis labels and titles go. *left* means","the very left edge of the grid. *left plot* is the leftmost plot","that each y axis is used in. *right* and *right plot* are similar."].join(" ")},editType:"plot"};function c(t,e,r){var n=e[r+"axes"],i=Object.keys((t._splomAxes||{})[r]||{});return Array.isArray(n)?n:i.length?i:void 0}function u(t,e,r,n,i,o){var a=e(t+"gap",r),s=e("domain."+t);e(t+"side",n);for(var l=new Array(i),c=s[0],u=(s[1]-c)/(i-a),h=u*(1-a),d=0;d1){d||f||p||"independent"===A("pattern")&&(d=!0),g._hasSubplotGrid=d;var y,x,_="top to bottom"===A("roworder"),w=d?.2:.1,k=d?.3:.1;m&&e._splomGridDflt&&(y=e._splomGridDflt.xside,x=e._splomGridDflt.yside),g._domains={x:u("x",A,w,y,b),y:u("y",A,k,x,v,_)}}else delete e.grid}function A(t,e){return n.coerce(r,g,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,i,o,a,s,l,u,d=t.grid||{},f=e._subplots,p=r._hasSubplotGrid,m=r.rows,g=r.columns,v="independent"===r.pattern,b=r._axisMap={};if(p){var y=d.subplots||[];l=r.subplots=new Array(m);var x=1;for(n=0;n{"use strict";var n=r(21197),i=r(46121).templatedArray,o=r(53644);t.exports=i("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw",description:["Determines whether or not this image is visible."].join(" ")},source:{valType:"string",editType:"arraydraw",description:["Specifies the URL of the image to be used.","The URL must be accessible from the domain where the","plot code is run, and can be either relative or absolute."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw",description:["Specifies whether images are drawn below or above traces.","When `xref` and `yref` are both set to `paper`,","image is drawn below the entire plot area."].join(" ")},sizex:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size horizontally.","The image will be sized based on the `position` value.","When `xref` is set to `paper`, units are sized relative","to the plot width.","When `xref` ends with ` domain`, units are sized relative","to the axis width."].join(" ")},sizey:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size vertically.","The image will be sized based on the `position` value.","When `yref` is set to `paper`, units are sized relative","to the plot height.","When `yref` ends with ` domain`, units are sized relative","to the axis height."].join(" ")},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw",description:["Specifies which dimension of the image to constrain."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the image."},x:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's x position.","When `xref` is set to `paper`, units are sized relative","to the plot height.","See `xref` for more info"].join(" ")},y:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's y position.","When `yref` is set to `paper`, units are sized relative","to the plot height.","See `yref` for more info"].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw",description:"Sets the anchor for the x position"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw",description:"Sets the anchor for the y position."},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's x coordinate axis.",o.axisRefDescription("x","left","right")].join(" ")},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's y coordinate axis.",o.axisRefDescription("y","bottom","top")].join(" ")},editType:"arraydraw"})},22470:(t,e,r)=>{"use strict";var n=r(7370),i=r(61814);t.exports=function(t,e,r,o){e=e||{};var a="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(a||s)for(var l,c,u=t._fullLayout.images,h=e._id.charAt(0),d=0;d{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(3653);function s(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}var s=o("source");if(!o("visible",!!s))return e;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var l={_fullLayout:r},c=["x","y"],u=0;u<2;u++){var h=c[u],d=i.coerceRef(t,e,l,h,"paper",void 0);"paper"!==d&&i.getFromId(l,d)._imgIndices.push(e._index),i.coercePosition(e,l,o,d,h,0)}return e}t.exports=function(t,e){o(t,e,{name:"images",handleItemDefaults:s})}},87030:(t,e,r)=>{"use strict";var n=r(27941),i=r(40666),o=r(75815),a=r(99246),s=r(25853);t.exports=function(t){var e,r,l=t._fullLayout,c=[],u={},h=[];for(r=0;r{"use strict";t.exports={moduleType:"component",name:"images",layoutAttributes:r(3653),supplyLayoutDefaults:r(96658),includeBasePlot:r(39859)("images"),draw:r(87030),convertCoords:r(22470)}},15524:(t,e,r)=>{"use strict";var n=r(75058),i=r(84226);t.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend",description:["Determines whether or not this legend is visible."].join(" ")},bgcolor:{valType:"color",editType:"legend",description:["Sets the legend background color.","Defaults to `layout.paper_bgcolor`."].join(" ")},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"legend",description:"Sets the color of the border enclosing the legend."},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend",description:"Sets the width (in px) of the border enclosing the legend."},font:n({editType:"legend",description:"Sets the font used to text the legend items."}),grouptitlefont:n({editType:"legend",description:["Sets the font for group titles in legend.","Defaults to `legend.font` with its size increased about 10%."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend",description:"Sets the orientation of the legend."},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend",description:["Determines the order at which the legend items are displayed.","If *normal*, the items are displayed top-to-bottom in the same","order as the input data.","If *reversed*, the items are displayed in the opposite order","as *normal*.","If *grouped*, the items are displayed in groups","(when a trace `legendgroup` is provided).","if *grouped+reversed*, the items are displayed in the opposite order","as *grouped*."].join(" ")},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend",description:["Sets the amount of vertical space (in px) between legend groups."].join(" ")},entrywidth:{valType:"number",min:0,editType:"legend",description:["Sets the width (in px or fraction) of the legend.","Use 0 to size the entry based on the text width,","when `entrywidthmode` is set to *pixels*."].join(" ")},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend",description:"Determines what entrywidth means."},indentation:{valType:"number",min:-15,dflt:0,editType:"legend",description:"Sets the indentation (in px) of the legend entries."},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend",description:["Determines if the legend items symbols scale with their corresponding *trace* attributes","or remain *constant* independent of the symbol size on the graph."].join(" ")},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend",description:"Sets the width (in px) of the legend item symbols (the part other than the title.text)."},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend",description:["Determines the behavior on legend item click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item click interactions."].join(" ")},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend",description:["Determines the behavior on legend item double-click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item double-click interactions."].join(" ")},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend",description:["Determines the behavior on legend group item click.","*toggleitem* toggles the visibility of the individual item clicked on the graph.","*togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph."].join(" ")},x:{valType:"number",editType:"legend",description:["Sets the x position with respect to `xref` (in normalized coordinates) of the legend.","When `xref` is *paper*, defaults to *1.02* for vertical legends and","defaults to *0* for horizontal legends.","When `xref` is *container*, defaults to *1* for vertical legends and","defaults to *0* for horizontal legends.","Must be between *0* and *1* if `xref` is *container*.","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend",description:["Sets the legend's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the legend.","Value *auto* anchors legends to the right for `x` values greater than or equal to 2/3,","anchors legends to the left for `x` values less than or equal to 1/3 and","anchors legends with respect to their center otherwise."].join(" ")},y:{valType:"number",editType:"legend",description:["Sets the y position with respect to `yref` (in normalized coordinates) of the legend.","When `yref` is *paper*, defaults to *1* for vertical legends,","defaults to *-0.1* for horizontal legends on graphs w/o range sliders and","defaults to *1.1* for horizontal legends on graph with one or multiple range sliders.","When `yref` is *container*, defaults to *1*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend",description:["Sets the legend's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the legend.","Value *auto* anchors legends at their bottom for `y` values less than or equal to 1/3,","anchors legends to at their top for `y` values greater than or equal to 2/3 and","anchors legends with respect to their middle otherwise."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of legend-driven changes in trace and pie label","visibility. Defaults to `layout.uirevision`."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend",description:["Sets the vertical alignment of the symbols with respect to their associated text."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"legend",description:["Sets the title of the legend."].join(" ")},font:n({editType:"legend",description:["Sets this legend's title font.","Defaults to `legend.font` with its size increased about 20%."].join(" ")}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend",description:["Determines the location of legend's title","with respect to the legend items.","Defaulted to *top* with `orientation` is *h*.","Defaulted to *left* with `orientation` is *v*.","The *top left* options could be used to expand","top center and top right are for horizontal alignment","legend area in both x and y sides."].join(" ")},editType:"legend"},editType:"legend"}},4496:t=>{"use strict";t.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},64083:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822),o=r(46121),a=r(3520),s=r(15524),l=r(13195),c=r(18804);function u(t,e,r,u){var h=e[t]||{},d=o.newContainer(r,t);function f(t,e){return i.coerce(h,d,s,t,e)}var p=i.coerceFont(f,"font",r.font);if(f("bgcolor",r.paper_bgcolor),f("bordercolor"),f("visible")){for(var m,g=function(t,e){var r=m._input,n=m;return i.coerce(r,n,a,t,e)},v=r.font||{},b=i.coerceFont(f,"grouptitlefont",v,{overrideDflt:{size:Math.round(1.1*v.size)}}),y=0,x=!1,_="normal",w=(r.shapes||[]).filter((function(t){return t.showlegend})),k=u.concat(w).filter((function(e){return t===(e.legend||"legend")})),A=0;A("legend"===t?1:0));if(!1===T&&(r[t]=void 0),(!1!==T||h.uirevision)&&(f("uirevision",r.uirevision),!1!==T)){f("borderwidth");var S,C,E,L="h"===f("orientation"),z="paper"===f("yref"),O="paper"===f("xref"),D="left";if(L?(S=0,n.getComponentMethod("rangeslider","isVisible")(e.xaxis)?z?(C=1.1,E="bottom"):(C=1,E="top"):z?(C=-.1,E="top"):(C=0,E="bottom")):(C=1,E="auto",O?S=1.02:(S=1,D="right")),i.coerce(h,d,{x:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:S}},"x"),i.coerce(h,d,{y:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:C}},"y"),f("traceorder",_),c.isGrouped(r[t])&&f("tracegroupgap"),f("entrywidth"),f("entrywidthmode"),f("indentation"),f("itemsizing"),f("itemwidth"),f("itemclick"),f("itemdoubleclick"),f("groupclick"),f("xanchor",D),f("yanchor",E),f("valign"),i.noneOrAll(h,d,["x","y"]),f("title.text")){f("title.side",L?"left":"top");var I=i.extendFlat({},p,{size:i.bigFont(p.size)});i.coerceFont(f,"title.font",I)}}}}t.exports=function(t,e,r){var n,o=r.slice(),a=e.shapes;if(a)for(n=0;n{"use strict";var n=r(27941),i=r(12822),o=r(51137),a=r(25059),s=r(16677),l=r(19846),c=r(40666),u=r(17499),h=r(80394),d=r(52656),f=r(4496),p=r(89701),m=p.LINE_SPACING,g=p.FROM_TL,v=p.FROM_BR,b=r(71988),y=r(26972),x=r(18804),_=/^legend[0-9]*$/;function w(t,e){var r,s,d=e||{},p=t._fullLayout,_=z(d),w=d._inHover;if(w?(s=d.layer,r="hover"):(s=p._infolayer,r=_),s){var T;if(r+=p._uid,t._legendMouseDownTime||(t._legendMouseDownTime=0),w){if(!d.entries)return;T=b(d.entries,d)}else{for(var O=(t.calcdata||[]).slice(),D=p.shapes,I=0;I1)}var P=p.hiddenlabels||[];if(!(w||p.showlegend&&T.length))return s.selectAll("."+_).remove(),p._topdefs.select("#"+r).remove(),o.autoMargin(t,_);var j=i.ensureSingle(s,"g",_,(function(t){w||t.attr("pointer-events","all")})),N=i.ensureSingleById(p._topdefs,"clipPath",r,(function(t){t.append("rect")})),B=i.ensureSingle(j,"rect","bg",(function(t){t.attr("shape-rendering","crispEdges")}));B.call(u.stroke,d.bordercolor).call(u.fill,d.bgcolor).style("stroke-width",d.borderwidth+"px");var U,G=i.ensureSingle(j,"g","scrollbox"),V=d.title;d._titleWidth=0,d._titleHeight=0,V.text?((U=i.ensureSingle(G,"text",_+"titletext")).attr("text-anchor","start").call(c.font,V.font).text(V.text),C(U,G,t,d,1)):G.selectAll("."+_+"titletext").remove();var H=i.ensureSingle(j,"rect","scrollbar",(function(t){t.attr(f.scrollBarEnterAttrs).call(u.fill,f.scrollBarColor)})),W=G.selectAll("g.groups").data(T);W.enter().append("g").attr("class","groups"),W.exit().remove();var q=W.selectAll("g.traces").data(i.identity);q.enter().append("g").attr("class","traces"),q.exit().remove(),q.style("opacity",(function(t){var e=t[0].trace;return a.traceIs(e,"pie-like")?-1!==P.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1})).each((function(){n.select(this).call(M,t,d)})).call(y,t,d).each((function(){w||n.select(this).call(S,t,_)})),i.syncOrAsync([o.previousPromises,function(){return function(t,e,r,i){var o=t._fullLayout,a=z(i);i||(i=o[a]);var s=o._size,l=x.isVertical(i),u=x.isGrouped(i),h="fraction"===i.entrywidthmode,d=i.borderwidth,p=2*d,m=f.itemGap,g=i.indentation+i.itemwidth+2*m,v=2*(d+m),b=L(i),y=i.y<0||0===i.y&&"top"===b,_=i.y>1||1===i.y&&"bottom"===b,w=i.tracegroupgap,A={};i._maxHeight=Math.max(y||_?o.height/2:s.h,30);var M=0;i._width=0,i._height=0;var T=function(t){var e=0,r=0,n=t.title.side;return n&&(-1!==n.indexOf("left")&&(e=t._titleWidth),-1!==n.indexOf("top")&&(r=t._titleHeight)),[e,r]}(i);if(l)r.each((function(t){var e=t[0].height;c.setTranslate(this,d+T[0],d+T[1]+i._height+e/2+m),i._height+=e,i._width=Math.max(i._width,t[0].width)})),M=g+i._width,i._width+=m+g+p,i._height+=v,u&&(e.each((function(t,e){c.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var S=E(i),C=i.x<0||0===i.x&&"right"===S,O=i.x>1||1===i.x&&"left"===S,D=_||y,I=o.width/2;i._maxWidth=Math.max(C?D&&"left"===S?s.l+s.w:I:O?D&&"right"===S?s.r+s.w:I:s.w,2*g);var F=0,R=0;r.each((function(t){var e=k(t,i,g);F=Math.max(F,e),R+=e})),M=null;var P=0;if(u){var j=0,N=0,B=0;e.each((function(){var t=0,e=0;n.select(this).selectAll("g.traces").each((function(r){var n=k(r,i,g),o=r[0].height;c.setTranslate(this,T[0],T[1]+d+m+o/2+e),e+=o,t=Math.max(t,n),A[r[0].trace.legendgroup]=t}));var r=t+m;N>0&&r+d+N>i._maxWidth?(P=Math.max(P,N),N=0,B+=j+w,j=e):j=Math.max(j,e),c.setTranslate(this,N,B),N+=r})),i._width=Math.max(P,N)+d,i._height=B+j+v}else{var U=r.size(),G=R+p+(U-1)*m=i._maxWidth&&(P=Math.max(P,q),H=0,W+=V,i._height+=V,V=0),c.setTranslate(this,T[0]+d+H,T[1]+d+W+e/2+m),q=H+r+m,H+=n,V=Math.max(V,e)})),G?(i._width=H+p,i._height=V+v):(i._width=Math.max(P,q)+p,i._height+=V+v)}}i._width=Math.ceil(Math.max(i._width+T[0],i._titleWidth+2*(d+f.titlePad))),i._height=Math.ceil(Math.max(i._height+T[1],i._titleHeight+2*(d+f.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var Y=t._context.edits,Z=Y.legendText||Y.legendPosition;r.each((function(t){var e=n.select(this).select("."+a+"toggle"),r=t[0].height,o=t[0].trace.legendgroup,s=k(t,i,g);u&&""!==o&&(s=A[o]);var d=Z?g:M||s;l||h||(d+=m/2),c.setRect(e,0,-r/2,d,r)}))}(t,W,q,d)},function(){var e,u,b,y,x=p._size,k=d.borderwidth,M="paper"===d.xref,T="paper"===d.yref;if(V.text&&function(t,e,r){if("top center"===e.title.side||"top right"===e.title.side){var n=e.title.font.size*m,i=0,o=t.node(),a=c.bBox(o).width;"top center"===e.title.side?i=.5*(e._width-2*r-2*f.titlePad-a):"top right"===e.title.side&&(i=e._width-2*r-2*f.titlePad-a),h.positionText(t,r+f.titlePad+i,r+n)}}(U,d,k),!w){var S,C;S=M?x.l+x.w*d.x-g[E(d)]*d._width:p.width*d.x-g[E(d)]*d._width,C=T?x.t+x.h*(1-d.y)-g[L(d)]*d._effHeight:p.height*(1-d.y)-g[L(d)]*d._effHeight;var z=function(t,e,r,n){var i=t._fullLayout,a=i[e],s=E(a),l=L(a),c="paper"===a.xref,u="paper"===a.yref;t._fullLayout._reservedMargin[e]={};var h=a.y<.5?"b":"t",d=a.x<.5?"l":"r",f={r:i.width-r,l:r+a._width,b:i.height-n,t:n+a._effHeight};if(c&&u)return o.autoMargin(t,e,{x:a.x,y:a.y,l:a._width*g[s],r:a._width*v[s],b:a._effHeight*v[l],t:a._effHeight*g[l]});c?t._fullLayout._reservedMargin[e][h]=f[h]:u||"v"===a.orientation?t._fullLayout._reservedMargin[e][d]=f[d]:t._fullLayout._reservedMargin[e][h]=f[h]}(t,_,S,C);if(z)return;if(p.margin.autoexpand){var O=S,D=C;S=M?i.constrain(S,0,p.width-d._width):O,C=T?i.constrain(C,0,p.height-d._effHeight):D,S!==O&&i.log("Constrain "+_+".x to make legend fit inside graph"),C!==D&&i.log("Constrain "+_+".y to make legend fit inside graph")}c.setTranslate(j,S,C)}if(H.on(".drag",null),j.on("wheel",null),w||d._height<=d._maxHeight||t._context.staticPlot){var I=d._effHeight;w&&(I=d._height),B.attr({width:d._width-k,height:I-k,x:k/2,y:k/2}),c.setTranslate(G,0,0),N.select("rect").attr({width:d._width-2*k,height:I-2*k,x:k,y:k}),c.setClipUrl(G,r,t),c.setRect(H,0,0,0,0),delete d._scrollY}else{var F,R,P,W=Math.max(f.scrollBarMinHeight,d._effHeight*d._effHeight/d._height),q=d._effHeight-W-2*f.scrollBarMargin,Y=d._height-d._effHeight,Z=q/Y,X=Math.min(d._scrollY||0,Y);B.attr({width:d._width-2*k+f.scrollBarWidth+f.scrollBarMargin,height:d._effHeight-k,x:k/2,y:k/2}),N.select("rect").attr({width:d._width-2*k+f.scrollBarWidth+f.scrollBarMargin,height:d._effHeight-2*k,x:k,y:k+X}),c.setClipUrl(G,r,t),K(X,W,Z),j.on("wheel",(function(){K(X=i.constrain(d._scrollY+n.event.deltaY/q*Y,0,Y),W,Z),0!==X&&X!==Y&&n.event.preventDefault()}));var $=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;F="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,P=X})).on("drag",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(R="touchmove"===t.type?t.changedTouches[0].clientY:t.clientY,X=function(t,e,r){var n=(r-e)/Z+t;return i.constrain(n,0,Y)}(P,F,R),K(X,W,Z))}));H.call($);var J=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(F=t.changedTouches[0].clientY,P=X)})).on("drag",(function(){var t=n.event.sourceEvent;"touchmove"===t.type&&(R=t.changedTouches[0].clientY,X=function(t,e,r){var n=(e-r)/Z+t;return i.constrain(n,0,Y)}(P,F,R),K(X,W,Z))}));G.call(J)}function K(e,r,n){d._scrollY=t._fullLayout[_]._scrollY=e,c.setTranslate(G,0,-e),c.setRect(H,d._width,f.scrollBarMargin+e*n,f.scrollBarWidth,r),N.select("rect").attr("y",k+e)}t._context.edits.legendPosition&&(j.classed("cursor-move",!0),l.init({element:j.node(),gd:t,prepFn:function(t){if(t.target!==H.node()){var e=c.getTranslate(j);b=e.x,y=e.y}},moveFn:function(t,r){if(void 0!==b&&void 0!==y){var n=b+t,i=y+r;c.setTranslate(j,n,i),e=l.align(n,d._width,x.l,x.l+x.w,d.xanchor),u=l.align(i+d._height,-d._height,x.t+x.h,x.t,d.yanchor)}},doneFn:function(){if(void 0!==e&&void 0!==u){var r={};r[_+".x"]=e,r[_+".y"]=u,a.call("_guiRelayout",t,r)}},clickFn:function(e,r){var n=s.selectAll("g.traces").filter((function(){var t=this.getBoundingClientRect();return r.clientX>=t.left&&r.clientX<=t.right&&r.clientY>=t.top&&r.clientY<=t.bottom}));n.size()>0&&A(t,j,n,e,r)}}))}],t)}}function k(t,e,r){var n=t[0],i=n.width,o=e.entrywidthmode,a=n.trace.legendwidth||e.entrywidth;return"fraction"===o?e._maxWidth*a:r+(a||i)}function A(t,e,r,n,i){var o=r.data()[0][0].trace,l={event:i,node:r.node(),curveNumber:o.index,expandedIndex:o._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};o._group&&(l.group=o._group),a.traceIs(o,"pie-like")&&(l.label=r.datum()[0].label);var c=s.triggerHandler(t,"plotly_legendclick",l);if(1===n){if(!1===c)return;e._clickTimeout=setTimeout((function(){t._fullLayout&&d(r,t,n)}),t._context.doubleClickDelay)}else 2===n&&(e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,"plotly_legenddoubleclick",l)&&!1!==c&&d(r,t,n))}function M(t,e,r){var n,o,s=z(r),l=t.data()[0][0],u=l.trace,d=a.traceIs(u,"pie-like"),p=!r._inHover&&e._context.edits.legendText&&!d,m=r._maxNameLength;l.groupTitle?(n=l.groupTitle.text,o=l.groupTitle.font):(o=r.font,r.entries?n=l.text:(n=d?l.label:u.name,u._meta&&(n=i.templateString(n,u._meta))));var g=i.ensureSingle(t,"text",s+"text");g.attr("text-anchor","start").call(c.font,o).text(p?T(n,m):n);var v=r.indentation+r.itemwidth+2*f.itemGap;h.positionText(g,v,0),p?g.call(h.makeEditable,{gd:e,text:n}).call(C,t,e,r).on("edit",(function(n){this.text(T(n,m)).call(C,t,e,r);var o=l.trace._fullInput||{},s={};if(a.hasTransform(o,"groupby")){var c=a.getTransformIndices(o,"groupby"),h=c[c.length-1],d=i.keyedContainer(o,"transforms["+h+"].styles","target","value.name");d.set(l.trace._group,n),s=d.constructUpdate()}else s.name=n;return o._isShape?a.call("_guiRelayout",e,"shapes["+u.index+"].name",s.name):a.call("_guiRestyle",e,s,u.index)})):C(g,t,e,r)}function T(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;for(var n=r-(t=t||"").length;n>0;n--)t+=" ";return t}function S(t,e,r){var o,a=e._context.doubleClickDelay,s=1,l=i.ensureSingle(t,"rect",r+"toggle",(function(t){e._context.staticPlot||t.style("cursor","pointer").attr("pointer-events","all"),t.call(u.fill,"rgba(0,0,0,0)")}));e._context.staticPlot||(l.on("mousedown",(function(){(o=(new Date).getTime())-e._legendMouseDownTimea&&(s=Math.max(s-1,1)),A(e,i,t,s,n.event)}})))}function C(t,e,r,n,i){n._inHover&&t.attr("data-notex",!0),h.convertToTspans(t,r,(function(){!function(t,e,r,n){var i=t.data()[0][0];if(r._inHover||!i||i.trace.showlegend){var o=t.select("g[class*=math-group]"),a=o.node(),s=z(r);r||(r=e._fullLayout[s]);var l,u,d=r.borderwidth,p=(1===n?r.title.font:i.groupTitle?i.groupTitle.font:r.font).size*m;if(a){var g=c.bBox(a);l=g.height,u=g.width,1===n?c.setTranslate(o,d,d+.75*l):c.setTranslate(o,0,.25*l)}else{var v="."+s+(1===n?"title":"")+"text",b=t.select(v),y=h.lineCount(b),x=b.node();if(l=p*y,u=x?c.bBox(x).width:0,1===n)"left"===r.title.side&&(u+=2*f.itemGap),h.positionText(b,d+f.titlePad,d+p);else{var _=2*f.itemGap+r.indentation+r.itemwidth;i.groupTitle&&(_=f.itemGap,u-=r.indentation+r.itemwidth),h.positionText(b,_,-p*((y-1)/2-.3))}}1===n?(r._titleWidth=u,r._titleHeight=l):(i.lineHeight=p,i.height=Math.max(l,16)+3,i.width=u)}else t.remove()}(e,r,n,i)}))}function E(t){return i.isRightAnchor(t)?"right":i.isCenterAnchor(t)?"center":"left"}function L(t){return i.isBottomAnchor(t)?"bottom":i.isMiddleAnchor(t)?"middle":"top"}function z(t){return t._id||"legend"}t.exports=function(t,e){if(e)w(t,e);else{var r=t._fullLayout,i=r._legends;r._infolayer.selectAll('[class^="legend"]').each((function(){var t=n.select(this),e=t.attr("class").split(" ")[0];e.match(_)&&-1===i.indexOf(e)&&t.remove()}));for(var o=0;o{"use strict";var n=r(25059),i=r(18804);t.exports=function(t,e,r){var o,a,s=e._inHover,l=i.isGrouped(e),c=i.isReversed(e),u={},h=[],d=!1,f={},p=0,m=0;function g(t,n,o){if(!1!==e.visible&&(!r||t===e._id))if(""!==n&&i.isGrouped(e))-1===h.indexOf(n)?(h.push(n),d=!0,u[n]=[o]):u[n].push(o);else{var a="~~i"+p;h.push(a),u[a]=[o],p++}}for(o=0;oS&&(T=S)}A[o][0]._groupMinRank=T,A[o][0]._preGroupSort=o}var C=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(A.forEach((function(t,e){t[0]._preGroupSort=e})),A.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),o=0;o{"use strict";var n=r(25059),i=r(12822),o=i.pushUnique,a=!0;t.exports=function(t,e,r){var s=e._fullLayout;if(!e._dragged&&!e._editing){var l,c=s.legend.itemclick,u=s.legend.itemdoubleclick,h=s.legend.groupclick;if(1===r&&"toggle"===c&&"toggleothers"===u&&a&&e.data&&e._context.showTips?(i.notifier(i._(e,"Double-click on legend to isolate one trace"),"long"),a=!1):a=!1,1===r?l=c:2===r&&(l=u),l){var d="togglegroup"===h,f=s.hiddenlabels?s.hiddenlabels.slice():[],p=t.data()[0][0];if(!p.groupTitle||!p.noClick){var m=e._fullData,g=(s.shapes||[]).filter((function(t){return t.showlegend})),v=m.concat(g),b=p.trace;b._isShape&&(b=b._fullInput);var y,x,_,w,k,A=b.legendgroup,M={},T=[],S=[],C=[],E=(s.shapes||[]).map((function(t){return t._input})),L=!1,z=b.legend,O=b._fullInput;if(O&&O._isShape||!n.traceIs(b,"pie-like")){var D,I=A&&A.length,F=[];if(I)for(y=0;y{"use strict";e.isGrouped=function(t){return-1!==(t.traceorder||"").indexOf("grouped")},e.isVertical=function(t){return"h"!==t.orientation},e.isReversed=function(t){return-1!==(t.traceorder||"").indexOf("reversed")}},97833:(t,e,r)=>{"use strict";t.exports={moduleType:"component",name:"legend",layoutAttributes:r(15524),supplyLayoutDefaults:r(64083),draw:r(67739),style:r(26972)}},26972:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=o.strTranslate,s=r(40666),l=r(17499),c=r(42226).extractOpts,u=r(677),h=r(62970),d=r(17269).castOption,f=r(4496);function p(t,e){return(e?"radial":"horizontal")+(t?"":"reversed")}function m(t){var e=t[0].trace,r=e.contours,n=u.hasLines(e),i=u.hasMarkers(e),o=e.visible&&e.fill&&"none"!==e.fill,a=!1,s=!1;if(r){var l=r.coloring;"lines"===l?a=!0:n="none"===l||"heatmap"===l||r.showlines,"constraint"===r.type?o="="!==r._operation:"fill"!==l&&"heatmap"!==l||(s=!0)}return{showMarker:i,showLine:n,showFill:o,showGradientLine:a,showGradientFill:s,anyLine:n||a,anyFill:o||s}}function g(t,e,r){return t&&o.isArrayOrTypedArray(t)?e:t>r?r:t}t.exports=function(t,e,r){var v=e._fullLayout;r||(r=v.legend);var b="constant"===r.itemsizing,y=r.itemwidth,x=(y+2*f.itemGap)/2,_=a(x,0),w=function(t,e,r,n){var i;if(t+1)i=t;else{if(!(e&&e.width>0))return 0;i=e.width}return b?n:Math.min(i,r)};function k(t,o,a){var u=t[0].trace,h=u.marker||{},d=h.line||{},f=h.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",p=a?u.visible&&u.type===a:i.traceIs(u,"bar"),m=n.select(o).select("g.legendpoints").selectAll("path.legend"+a).data(p?[t]:[]);m.enter().append("path").classed("legend"+a,!0).attr("d",f).attr("transform",_),m.exit().remove(),m.each((function(t){var i=n.select(this),o=t[0],a=w(o.mlw,h.line,5,2);i.style("stroke-width",a+"px");var f=o.mcc;if(!r._inHover&&"mc"in o){var p=c(h),m=p.mid;void 0===m&&(m=(p.max+p.min)/2),f=s.tryColorscale(h,"")(m)}var v=f||o.mc||h.color,b=h.pattern,y=b&&s.getPatternAttr(b.shape,0,"");if(y){var x=s.getPatternAttr(b.bgcolor,0,null),_=s.getPatternAttr(b.fgcolor,0,null),k=b.fgopacity,A=g(b.size,8,10),M=g(b.solidity,.5,1),T="legend-"+u.uid;i.call(s.pattern,"legend",e,T,y,A,M,f,b.fillmode,x,_,k)}else i.call(l.fill,v);a&&l.stroke(i,o.mlc||d.color)}))}function A(t,r,a){var s=t[0],l=s.trace,c=a?l.visible&&l.type===a:i.traceIs(l,a),u=n.select(r).select("g.legendpoints").selectAll("path.legend"+a).data(c?[t]:[]);if(u.enter().append("path").classed("legend"+a,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),u.exit().remove(),u.size()){var f=l.marker||{},p=w(d(f.line.width,s.pts),f.line,5,2),m="pieLike",g=o.minExtend(l,{marker:{line:{width:p}}},m),v=o.minExtend(s,{trace:g},m);h(u,v,g,e)}}t.each((function(t){var e=n.select(this),i=o.ensureSingle(e,"g","layers");i.style("opacity",t[0].trace.opacity);var s=r.indentation,l=r.valign,c=t[0].lineHeight,u=t[0].height;if("middle"===l&&0===s||!c||!u)i.attr("transform",null);else{var h={top:1,bottom:-1}[l]*(.5*(c-u+3))||0,d=r.indentation;i.attr("transform",a(d,h))}i.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var f=i.selectAll("g.legendsymbols").data([t]);f.enter().append("g").classed("legendsymbols",!0),f.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)})).each((function(t){var r,i=t[0].trace,a=[];if(i.visible)switch(i.type){case"histogram2d":case"heatmap":a=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":a=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":case"densitymap":a=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":a=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],r=!1;break;case"streamtube":a=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],r=!1;break;case"surface":a=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],r=!0;break;case"mesh3d":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var u=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(a);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),u.exit().remove(),u.each((function(t,a){var u,h=n.select(this),d=c(i),f=d.colorscale,m=d.reversescale;if(f){if(!r){var g=f.length;u=0===a?f[m?g-1:0][1]:1===a?f[m?0:g-1][1]:f[Math.floor((g-1)/2)][1]}}else{var v=i.vertexcolor||i.facecolor||i.color;u=o.isArrayOrTypedArray(v)?v[a]||v[0]:v}h.attr("d",t[0]),u?h.call(l.fill,u):h.call((function(t){if(t.size()){var n="legendfill-"+i.uid;s.gradient(t,e,n,p(m,"radial"===r),f,"fill")}}))}))})).each((function(t){var e=t[0].trace,r="waterfall"===e.type;if(t[0]._distinct&&r){var i=t[0].trace[t[0].dir].marker;return t[0].mc=i.color,t[0].mlw=i.line.width,t[0].mlc=i.line.color,k(t,this,"waterfall")}var o=[];e.visible&&r&&(o=t[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var a=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(o);a.enter().append("path").classed("legendwaterfall",!0).attr("transform",_).style("stroke-miterlimit",1),a.exit().remove(),a.each((function(t){var r=n.select(this),i=e[t[0]].marker,o=w(void 0,i.line,5,2);r.attr("d",t[1]).style("stroke-width",o+"px").call(l.fill,i.color),o&&r.call(l.stroke,i.line.color)}))})).each((function(t){k(t,this,"funnel")})).each((function(t){k(t,this)})).each((function(t){var r=t[0].trace,a=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&i.traceIs(r,"box-violin")?[t]:[]);a.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),a.exit().remove(),a.each((function(){var t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);t.style("stroke-width",i+"px").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var c=o.minExtend(r,{marker:{size:b?12:o.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});a.call(s.pointStyle,c,e)}}))})).each((function(t){A(t,this,"funnelarea")})).each((function(t){A(t,this,"pie")})).each((function(t){var r,i,a=m(t),l=a.showFill,h=a.showLine,d=a.showGradientLine,f=a.showGradientFill,g=a.anyFill,v=a.anyLine,b=t[0],x=b.trace,_=c(x),k=_.colorscale,A=_.reversescale,M=u.hasMarkers(x)||!g?"M5,0":v?"M5,-2":"M5,-3",T=n.select(this),S=T.select(".legendfill").selectAll("path").data(l||f?[t]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",M+"h"+y+"v6h-"+y+"z").call((function(t){if(t.size())if(l)s.fillGroupStyle(t,e,!0);else{var r="legendfill-"+x.uid;s.gradient(t,e,r,p(A),k,"fill")}})),h||d){var C=w(void 0,x.line,10,5);i=o.minExtend(x,{line:{width:C}}),r=[o.minExtend(b,{trace:i})]}var E=T.select(".legendlines").selectAll("path").data(h||d?[r]:[]);E.enter().append("path").classed("js-line",!0),E.exit().remove(),E.attr("d",M+(d?"l"+y+",0.0001":"h"+y)).call(h?s.lineGroupStyle:function(t){if(t.size()){var r="legendline-"+x.uid;s.lineGroupStyle(t),s.gradient(t,e,r,p(A),k,"stroke")}})})).each((function(t){var r,i,a=m(t),l=a.anyFill,c=a.anyLine,h=a.showLine,d=a.showMarker,f=t[0],p=f.trace,g=!d&&!c&&!l&&u.hasText(p);function v(t,e,r,n){var i=o.nestedProperty(p,t).get(),a=o.isArrayOrTypedArray(i)&&e?e(i):i;if(b&&a&&void 0!==n&&(a=n),r){if(ar[1])return r[1]}return a}function y(t){return f._distinct&&f.index&&t[f.index]?t[f.index]:t[0]}if(d||g||h){var x={},w={};if(d){x.mc=v("marker.color",y),x.mx=v("marker.symbol",y),x.mo=v("marker.opacity",o.mean,[.2,1]),x.mlc=v("marker.line.color",y),x.mlw=v("marker.line.width",o.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var k=v("marker.size",o.mean,[2,16],12);x.ms=k,w.marker.size=k}h&&(w.line={width:v("line.width",y,[0,10],5)}),g&&(x.tx="Aa",x.tp=v("textposition",y),x.ts=10,x.tc=v("textfont.color",y),x.tf=v("textfont.family",y),x.tw=v("textfont.weight",y),x.ty=v("textfont.style",y),x.tv=v("textfont.variant",y),x.tC=v("textfont.textcase",y),x.tE=v("textfont.lineposition",y),x.tS=v("textfont.shadow",y)),r=[o.minExtend(f,x)],(i=o.minExtend(p,w)).selectedpoints=null,i.texttemplate=null}var A=n.select(this).select("g.legendpoints"),M=A.selectAll("path.scatterpts").data(d?r:[]);M.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),M.exit().remove(),M.call(s.pointStyle,i,e),d&&(r[0].mrc=3);var T=A.selectAll("g.pointtext").data(g?r:[]);T.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),T.exit().remove(),T.selectAll("text").call(s.textPointStyle,i,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(e.visible&&"candlestick"===e.type?[t,t]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(t,e){return e?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),o=e[r?"increasing":"decreasing"],a=w(void 0,o.line,5,2);i.style("stroke-width",a+"px").call(l.fill,o.fillcolor),a&&l.stroke(i,o.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(e.visible&&"ohlc"===e.type?[t,t]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(t,e){return e?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),o=e[r?"increasing":"decreasing"],a=w(void 0,o.line,5,2);i.style("fill","none").call(s.dashLine,o.line.dash,a),a&&l.stroke(i,o.line.color)}))}))}},62799:(t,e,r)=>{"use strict";var n=r(7113);t.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.","This may include *"+n.backButtons.join("*, *")+"*."].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.","This may include *"+n.foreButtons.join("*, *")+"*."].join(" ")}}},47685:(t,e,r)=>{"use strict";var n=r(25059),i=r(51137),o=r(99246),a=r(50917),s=r(71422).eraseActiveShape,l=r(12822),c=l._,u=t.exports={};function h(t,e){var r,i,a=e.currentTarget,s=a.getAttribute("data-attr"),l=a.getAttribute("data-val")||!0,c=t._fullLayout,u={},h=o.list(t,null,!0),d=c._cartesianSpikesEnabled;if("zoom"===s){var f,p="in"===l?.5:2,m=(1+p)/2,g=(1-p)/2;for(i=0;i{"use strict";var n=r(47685),i=Object.keys(n),o=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],a=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(o),s=[];i.forEach((function(t){!function(t){if(-1===a.indexOf(t._cat||t.name)){var e=t.name,r=(t._cat||t.name).toLowerCase();-1===s.indexOf(e)&&s.push(e),-1===s.indexOf(r)&&s.push(r)}}(n[t])})),s.sort(),t.exports={DRAW_MODES:o,backButtons:a,foreButtons:s}},90120:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(46121),a=r(62799);t.exports=function(t,e){var r=t.modebar||{},s=o.newContainer(e,"modebar");function l(t,e){return n.coerce(r,s,a,t,e)}l("orientation"),l("bgcolor",i.addOpacity(e.paper_bgcolor,.5));var c=i.contrast(i.rgb(e.modebar.bgcolor));l("color",i.addOpacity(c,.3)),l("activecolor",i.addOpacity(c,.7)),l("uirevision",e.uirevision),l("add"),l("remove")}},45828:(t,e,r)=>{"use strict";t.exports={moduleType:"component",name:"modebar",layoutAttributes:r(62799),supplyLayoutDefaults:r(90120),manage:r(83493)}},83493:(t,e,r)=>{"use strict";var n=r(99246),i=r(677),o=r(25059),a=r(66811).isUnifiedHover,s=r(27756),l=r(47685),c=r(7113).DRAW_MODES,u=r(12822).extendDeep;t.exports=function(t){var e=t._fullLayout,r=t._context,h=e._modeBar;if(r.displayModeBar||r.watermark){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var d,f=r.modeBarButtons;d=Array.isArray(f)&&f.length?function(t){for(var e=u([],t),r=0;r1?(D=["toggleHover"],I=["resetViews"]):v?(O=["zoomInGeo","zoomOutGeo"],D=["hoverClosestGeo"],I=["resetGeo"]):g?(D=["hoverClosest3d"],I=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(O=["zoomInMapbox","zoomOutMapbox"],D=["toggleHover"],I=["resetViewMapbox"]):k?(O=["zoomInMap","zoomOutMap"],D=["toggleHover"],I=["resetViewMap"]):x?D=["hoverClosestGl2d"]:b?D=["hoverClosestPie"]:T?(D=["hoverClosestCartesian","hoverCompareCartesian"],I=["resetViewSankey"]):D=["toggleHover"],m&&D.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(function(t){for(var e=0;e{"use strict";var n=r(27941),i=r(7370),o=r(12822),a=r(50917),s=r(88566).version,l=new DOMParser;function c(t){this.container=t.container,this.element=document.createElement("div"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var u=c.prototype;u.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i="modebar-"+n._uid;this.element.setAttribute("id",i),this._uid=i,this.element.className="modebar","hover"===r.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===n.modebar.orientation&&(this.element.className+=" vertical",e=e.reverse());var a=n.modebar,s="hover"===r.displayModeBar?".js-plotly-plot .plotly:hover ":"";o.deleteRelatedStyleRule(i),o.addRelatedStyleRule(i,s+"#"+i+" .modebar-group","background-color: "+a.bgcolor),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+a.color),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+a.activecolor),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn.active .icon path","fill: "+a.activecolor);var l=!this.hasButtons(e),c=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(l||c||u)&&(this.removeAllButtons(),this.updateButtons(e),r.watermark||r.displaylogo)){var h=this.getLogo();r.watermark&&(h.className=h.className+" watermark"),"v"===n.modebar.orientation?this.element.insertBefore(h,this.element.childNodes[0]):this.element.appendChild(h),this.hasLogo=!0}this.updateActiveButton()},u.updateButtons=function(t){var e=this;this.buttons=t,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach((function(t){var r=e.createGroup();t.forEach((function(t){var n=t.name;if(!n)throw new Error("must provide button 'name' in button config");if(-1!==e.buttonsNames.indexOf(n))throw new Error("button name '"+n+"' is taken");e.buttonsNames.push(n);var i=e.createButton(t);e.buttonElements.push(i),r.appendChild(i)})),e.element.appendChild(r)}))},u.createGroup=function(){var t=document.createElement("div");return t.className="modebar-group",t},u.createButton=function(t){var e=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var i=t.title;void 0===i?i=t.name:"function"==typeof i&&(i=i(this.graphInfo)),(i||0===i)&&r.setAttribute("data-title",i),void 0!==t.attr&&r.setAttribute("data-attr",t.attr);var o=t.val;if(void 0!==o&&("function"==typeof o&&(o=o(this.graphInfo)),r.setAttribute("data-val",o)),"function"!=typeof t.click)throw new Error("must provide button 'click' function in button config");r.addEventListener("click",(function(r){t.click(e.graphInfo,r),e.updateActiveButton(r.currentTarget)})),r.setAttribute("data-toggle",t.toggle||!1),t.toggle&&n.select(r).classed("active",!0);var s=t.icon;return"function"==typeof s?r.appendChild(s()):r.appendChild(this.createIcon(s||a.question)),r.setAttribute("data-gravity",t.gravity||"n"),r},u.createIcon=function(t){var e,r=i(t.height)?Number(t.height):t.ascent-t.descent,n="http://www.w3.org/2000/svg";if(t.path){(e=document.createElementNS(n,"svg")).setAttribute("viewBox",[0,0,t.width,r].join(" ")),e.setAttribute("class","icon");var o=document.createElementNS(n,"path");o.setAttribute("d",t.path),t.transform?o.setAttribute("transform",t.transform):void 0!==t.ascent&&o.setAttribute("transform","matrix(1 0 0 -1 0 "+t.ascent+")"),e.appendChild(o)}return t.svg&&(e=l.parseFromString(t.svg,"application/xml").childNodes[0]),e.setAttribute("height","1em"),e.setAttribute("width","1em"),e},u.updateActiveButton=function(t){var e=this.graphInfo._fullLayout,r=void 0!==t?t.getAttribute("data-attr"):null;this.buttonElements.forEach((function(t){var i=t.getAttribute("data-val")||!0,a=t.getAttribute("data-attr"),s="true"===t.getAttribute("data-toggle"),l=n.select(t);if(s)a===r&&l.classed("active",!l.classed("active"));else{var c=null===a?a:o.nestedProperty(e,a).get();l.classed("active",c===i)}}))},u.hasButtons=function(t){var e=this.buttons;if(!e)return!1;if(t.length!==e.length)return!1;for(var r=0;r{"use strict";var n=r(75058),i=r(84226),o=(0,r(46121).templatedArray)("button",{visible:{valType:"boolean",dflt:!0,editType:"plot",description:"Determines whether or not this button is visible."},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot",description:["The unit of measurement that the `count` value will set the range by."].join(" ")},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot",description:["Sets the range update mode.","If *backward*, the range update shifts the start of range","back *count* times *step* milliseconds.","If *todate*, the range update shifts the start of range","back to the first timestamp from *count* times","*step* milliseconds back.","For example, with `step` set to *year* and `count` set to *1*","the range update shifts the start of the range back to","January 01 of the current year.","Month and year *todate* are currently available only","for the built-in (Gregorian) calendar."].join(" ")},count:{valType:"number",min:0,dflt:1,editType:"plot",description:["Sets the number of steps to take to update the range.","Use with `step` to specify the update interval."].join(" ")},label:{valType:"string",editType:"plot",description:"Sets the text label to appear on the button."},editType:"plot",description:["Sets the specifications for each buttons.","By default, a range selector comes with no buttons."].join(" ")});t.exports={visible:{valType:"boolean",editType:"plot",description:["Determines whether or not this range selector is visible.","Note that range selectors are only available for x axes of","`type` set to or auto-typed to *date*."].join(" ")},buttons:o,x:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the x position (in normalized coordinates) of the range selector."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot",description:["Sets the range selector's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the y position (in normalized coordinates) of the range selector."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot",description:["Sets the range selector's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},font:n({editType:"plot",description:"Sets the font of the range selector button text."}),bgcolor:{valType:"color",dflt:i.lightLine,editType:"plot",description:"Sets the background color of the range selector buttons."},activecolor:{valType:"color",editType:"plot",description:"Sets the background color of the active range selector button."},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"plot",description:"Sets the color of the border enclosing the range selector."},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot",description:"Sets the width (in px) of the border enclosing the range selector."},editType:"plot"}},12057:t=>{"use strict";t.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},4088:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(46121),a=r(35677),s=r(76927),l=r(12057);function c(t,e,r,i){var o=i.calendar;function a(r,i){return n.coerce(t,e,s.buttons,r,i)}if(a("visible")){var l=a("step");"all"!==l&&(!o||"gregorian"===o||"month"!==l&&"year"!==l?a("stepmode"):e.stepmode="backward",a("count")),a("label")}}t.exports=function(t,e,r,u,h){var d=t.rangeselector||{},f=o.newContainer(e,"rangeselector");function p(t,e){return n.coerce(d,f,s,t,e)}if(p("visible",a(d,f,{name:"buttons",handleItemDefaults:c,calendar:h}).length>0)){var m=function(t,e,r){for(var n=r.filter((function(r){return e[r].anchor===t._id})),i=0,o=0;o{"use strict";var n=r(27941),i=r(25059),o=r(51137),a=r(17499),s=r(40666),l=r(12822),c=l.strTranslate,u=r(80394),h=r(99246),d=r(89701),f=d.LINE_SPACING,p=d.FROM_TL,m=d.FROM_BR,g=r(12057),v=r(98822);function b(t){return t._id}function y(t,e,r){var n=l.ensureSingle(t,"rect","selector-rect",(function(t){t.attr("shape-rendering","crispEdges")}));n.attr({rx:g.rx,ry:g.ry}),n.call(a.stroke,e.bordercolor).call(a.fill,function(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}(e,r)).style("stroke-width",e.borderwidth+"px")}function x(t,e,r,n){var i,o;l.ensureSingle(t,"text","selector-text",(function(t){t.attr("text-anchor","middle")})).call(s.font,e.font).text((i=r,o=n._fullLayout._meta,i.label?o?l.templateString(i.label,o):i.label:"all"===i.step?"all":i.count+i.step.charAt(0))).call((function(t){u.convertToTspans(t,n)}))}t.exports=function(t){var e=t._fullLayout._infolayer.selectAll(".rangeselector").data(function(t){for(var e=h.list(t,"x",!0),r=[],n=0;n{"use strict";var n=r(55622),i=r(12822).titleCase;t.exports=function(t,e){var r=t._name,o={};if("all"===e.step)o[r+".autorange"]=!0;else{var a=function(t,e){var r,o=t.range,a=new Date(t.r2l(o[1])),s=e.step,l=n["utc"+i(s)],c=e.count;switch(e.stepmode){case"backward":r=t.l2r(+l.offset(a,-c));break;case"todate":var u=l.offset(a,-c);r=t.l2r(+l.ceil(u))}return[r,o[1]]}(t,e);o[r+".range[0]"]=a[0],o[r+".range[1]"]=a[1]}return o}},36404:(t,e,r)=>{"use strict";t.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:r(76927)}}},layoutAttributes:r(76927),handleDefaults:r(4088),draw:r(58204)}},40959:(t,e,r)=>{"use strict";var n=r(84226);t.exports={bgcolor:{valType:"color",dflt:n.background,editType:"plot",description:"Sets the background color of the range slider."},bordercolor:{valType:"color",dflt:n.defaultLine,editType:"plot",description:"Sets the border color of the range slider."},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot",description:"Sets the border width of the range slider."},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range slider range is","computed in relation to the input data.","If `range` is provided, then `autorange` is set to *false*."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1},description:["Sets the range of the range slider.","If not set, defaults to the full xaxis range.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot",description:["The height of the range slider as a fraction of the","total plot area height."].join(" ")},visible:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the range slider will be visible.","If visible, perpendicular axes will be set to `fixedrange`"].join(" ")},editType:"calc"}},99224:(t,e,r)=>{"use strict";var n=r(99246).list,i=r(19496).getAutoRange,o=r(92601);t.exports=function(t){for(var e=n(t,"x",!0),r=0;r{"use strict";t.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},4504:(t,e,r)=>{"use strict";var n=r(12822),i=r(46121),o=r(99246),a=r(40959),s=r(73290);t.exports=function(t,e,r){var l=t[r],c=e[r];if(l.rangeslider||e._requestRangeslider[c._id]){n.isPlainObject(l.rangeslider)||(l.rangeslider={});var u,h,d=l.rangeslider,f=i.newContainer(c,"rangeslider");if(_("visible")){_("bgcolor",e.plot_bgcolor),_("bordercolor"),_("borderwidth"),_("thickness"),_("autorange",!c.isValidRange(d.range)),_("range");var p=e._subplots;if(p)for(var m=p.cartesian.filter((function(t){return t.substr(0,t.indexOf("y"))===o.name2id(r)})).map((function(t){return t.substr(t.indexOf("y"),t.length)})),g=n.simpleMap(m,o.id2name),v=0;v{"use strict";var n=r(27941),i=r(25059),o=r(51137),a=r(12822),s=a.strTranslate,l=r(40666),c=r(17499),u=r(6883),h=r(29592),d=r(99246),f=r(19846),p=r(76292),m=r(92601);function g(t){return"number"==typeof t.clientX?t.clientX:t.touches&&t.touches.length>0?t.touches[0].clientX:0}function v(t,e,r,n){var i=a.ensureSingle(t,"rect",m.bgClassName,(function(t){t.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),o=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,u=-n._offsetShift,h=l.crispRound(e,n.borderwidth);i.attr({width:n._width+o,height:n._height+o,transform:s(u,u),"stroke-width":h}).call(c.stroke,n.bordercolor).call(c.fill,n.bgcolor)}function b(t,e,r,n){var i=e._fullLayout;a.ensureSingleById(i._topdefs,"clipPath",n._clipId,(function(t){t.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function y(t,e,r,i){var s,c=e.calcdata,u=t.selectAll("g."+m.rangePlotClassName).data(r._subplotsWith,a.identity);u.enter().append("g").attr("class",(function(t){return m.rangePlotClassName+" "+t})).call(l.setClipUrl,i._clipId,e),u.order(),u.exit().remove(),u.each((function(t,a){var l=n.select(this),u=0===a,f=d.getFromId(e,t,"y"),p=f._name,m=i[p],g={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:i.range.slice(),calendar:r.calendar},width:i._width,height:i._height,margin:{t:0,b:0,l:0,r:0}},_context:e._context};r.rangebreaks&&(g.layout.xaxis.rangebreaks=r.rangebreaks),g.layout[p]={type:f.type,domain:[0,1],range:"match"!==m.rangemode?m.range.slice():f.range.slice(),calendar:f.calendar},f.rangebreaks&&(g.layout[p].rangebreaks=f.rangebreaks),o.supplyDefaults(g);var v=g._fullLayout.xaxis,b=g._fullLayout[p];v.clearCalc(),v.setScale(),b.clearCalc(),b.setScale();var y={id:t,plotgroup:l,xaxis:v,yaxis:b,isRangePlot:!0};u?s=y:(y.mainplot="xy",y.mainplotinfo=s),h.rangePlot(e,y,function(t,e){for(var r=[],n=0;n=n.max)e=j[r+1];else if(t=n.pmax)e=j[r+1];else if(tr._length||b+_<0)return;u=v+_,f=b+_;break;case l:if(x="col-resize",v+_>r._length)return;u=v+_,f=b;break;case c:if(x="col-resize",b+_<0)return;u=v,f=b+_;break;default:x="ew-resize",u=m,f=m+_}if(f{"use strict";var n=r(99246),i=r(80394),o=r(92601),a=r(89701).LINE_SPACING,s=o.name;function l(t){var e=t&&t[s];return e&&e.visible}e.isVisible=l,e.makeData=function(t){var e=n.list({_fullLayout:t},"x",!0),r=t.margin,i=[];if(!t._has("gl2d"))for(var o=0;o{"use strict";var n=r(12822),i=r(40959),o=r(73290),a=r(93729);t.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},i,{yaxis:o})}}},layoutAttributes:r(40959),handleDefaults:r(4504),calcAutorange:r(99224),draw:r(19260),isVisible:a.isVisible,makeData:a.makeData,autoMarginOpts:a.autoMarginOpts}},73290:t=>{"use strict";t.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc",description:["Determines whether or not the range of this axis in","the rangeslider use the same value than in the main plot","when zooming in/out.","If *auto*, the autorange will be used.","If *fixed*, the `range` is used.","If *match*, the current range of the corresponding y-axis on the main subplot is used."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Sets the range of this axis for the rangeslider."].join(" ")},editType:"calc"}},65586:(t,e,r)=>{"use strict";var n=r(77061),i=r(98387).line,o=r(68057).T,a=r(98260).extendFlat,s=r(62309).overrideAll,l=r(46121).templatedArray,c=r(53644);t.exports=s(l("selection",{type:{valType:"enumerated",values:["rect","path"],description:["Specifies the selection type to be drawn.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`) and (`x0`,`y1`).","If *path*, draw a custom SVG path using `path`."].join(" ")},xref:a({},n.xref,{description:["Sets the selection's x coordinate axis.",c.axisRefDescription("x","left","right")].join(" ")}),yref:a({},n.yref,{description:["Sets the selection's x coordinate axis.",c.axisRefDescription("y","bottom","top")].join(" ")}),x0:{valType:"any",description:"Sets the selection's starting x position."},x1:{valType:"any",description:"Sets the selection's end x position."},y0:{valType:"any",description:"Sets the selection's starting y position."},y1:{valType:"any",description:"Sets the selection's end y position."},path:{valType:"string",editType:"arraydraw",description:["For `type` *path* - a valid SVG path similar to `shapes.path` in data coordinates.","Allowed segments are: M, L and Z."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw",description:"Sets the opacity of the selection."},line:{color:i.color,width:a({},i.width,{min:1,dflt:1}),dash:a({},o,{dflt:"dot"})}}),"arraydraw","from-root")},76814:t=>{"use strict";t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},8037:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(65586),s=r(23223);function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}var l=o("path"),c="path"!==o("type",l?"path":"rect");c&&delete e.path,o("opacity"),o("line.color"),o("line.width"),o("line.dash");for(var u=["x","y"],h=0;h<2;h++){var d,f,p,m=u[h],g={_fullLayout:r},v=i.coerceRef(t,e,g,m);if((d=i.getFromId(g,v))._selectionIndices.push(e._index),p=s.rangeToShapePosition(d),f=s.shapePositionToRange(d),c){var b=m+"0",y=m+"1",x=t[b],_=t[y];t[b]=f(t[b],!0),t[y]=f(t[y],!0),i.coercePosition(e,g,o,v,b),i.coercePosition(e,g,o,v,y);var w=e[b],k=e[y];void 0!==w&&void 0!==k&&(e[b]=p(w),e[y]=p(k),t[b]=x,t[y]=_)}}c&&n.noneOrAll(t,e,["x0","x1","y0","y1"])}t.exports=function(t,e){o(t,e,{name:"selections",handleItemDefaults:l});for(var r=e.selections,n=0;n{"use strict";var n=r(59952).readPaths,i=r(49244),o=r(8867).clearOutlineControllers,a=r(17499),s=r(40666),l=r(46121).arrayEditor,c=r(23223),u=c.getPathString;function h(t){var e=t._fullLayout;for(var r in o(t),e._selectionLayer.selectAll("path").remove(),e._plots){var n=e._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var i=0;i=0;A--){var M=r.append("path").attr(g).style("opacity",A?.1:v).call(a.stroke,y).call(a.fill,b).call(s.dashLine,A?"solid":_,A?4+x:x);if(p(M,t,o),w){var T=l(t.layout,"selections",o);M.style({cursor:"move"});var S={element:M.node(),plotinfo:f,gd:t,editHelpers:T,isActiveSelection:!0},C=n(c,t);i(C,M,S)}else M.style("pointer-events",A?"all":"none");k[A]=M}var E=k[0];k[1].node().addEventListener("click",(function(){return function(t,e){if(d(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeSelectionIndex)return void m(t);t._fullLayout._activeSelectionIndex=r,t._fullLayout._deactivateSelection=m,h(t)}}}(t,E)}))}(t._fullLayout._selectionLayer)}function p(t,e,r){var n=r.xref+r.yref;s.setClipUrl(t,"clip"+e._fullLayout._uid+n,e)}function m(t){d(t)&&t._fullLayout._activeSelectionIndex>=0&&(o(t),delete t._fullLayout._activeSelectionIndex,h(t))}t.exports={draw:h,drawOne:f,activateLastSelection:function(t){if(d(t)){var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=m,h(t)}}}},21422:(t,e,r)=>{"use strict";var n=r(68057).T,i=r(98260).extendFlat;t.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none",description:["Describes how a new selection is created.","If `immediate`, a new selection is created after first mouse up.","If `gradual`, a new selection is not created after first mouse.","By adding to and subtracting from the initial selection,","this option allows declaring extra outlines of the selection."].join(" ")},line:{color:{valType:"color",editType:"none",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:1,dflt:1,editType:"none",description:"Sets the line width (in px)."},dash:i({},n,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none",description:"Sets the color filling the active selection' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none",description:"Sets the opacity of the active selection."},editType:"none"}}},80857:t=>{"use strict";t.exports=function(t,e,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},63750:(t,e,r)=>{"use strict";var n=r(14295).selectMode,i=r(8867).clearOutline,o=r(59952),a=o.readPaths,s=o.writePaths,l=o.fixDatesForPaths;t.exports=function(t,e){if(t.length){var r=t[0][0];if(r){var o=r.getAttribute("d"),c=e.gd,u=c._fullLayout.newselection,h=e.plotinfo,d=h.xaxis,f=h.yaxis,p=e.isActiveSelection,m=e.dragmode,g=(c.layout||{}).selections||[];if(!n(m)&&void 0!==p){var v=c._fullLayout._activeSelectionIndex;if(v{"use strict";var n=r(12822).strTranslate;function i(t,e){switch(t.type){case"log":return t.p2d(e);case"date":return t.p2r(e,0,t.calendar);default:return t.p2r(e)}}t.exports={p2r:i,r2p:function(t,e){switch(t.type){case"log":return t.d2p(e);case"date":return t.r2p(e,0,t.calendar);default:return t.r2p(e)}},axValue:function(t){var e="y"===t._id.charAt(0)?1:0;return function(r){return i(t,r[e])}},getTransform:function(t){return n(t.xaxis._offset,t.yaxis._offset)}}},70059:(t,e,r)=>{"use strict";var n=r(70445),i=r(80191);t.exports={moduleType:"component",name:"selections",layoutAttributes:r(65586),supplyLayoutDefaults:r(8037),supplyDrawNewSelectionDefaults:r(80857),includeBasePlot:r(39859)("selections"),draw:n.draw,drawOne:n.drawOne,reselect:i.reselect,prepSelect:i.prepSelect,clearOutline:i.clearOutline,clearSelectionsCache:i.clearSelectionsCache,selectOnClick:i.selectOnClick}},80191:(t,e,r)=>{"use strict";var n=r(48439),i=r(53824),o=r(25059),a=r(40666).dashStyle,s=r(17499),l=r(70410),c=r(66811).makeEventData,u=r(14295),h=u.freeMode,d=u.rectMode,f=u.drawMode,p=u.openMode,m=u.selectMode,g=r(23223),v=r(6583),b=r(49244),y=r(8867).clearOutline,x=r(59952),_=x.handleEllipse,w=x.readPaths,k=r(81941).newShapes,A=r(63750),M=r(70445).activateLastSelection,T=r(12822),S=T.sorterAsc,C=r(92620),E=r(76324),L=r(99246).getFromId,z=r(86748),O=r(39004).redrawReglTraces,D=r(76814),I=D.MINSELECT,F=C.filter,R=C.tester,P=r(38554),j=P.p2r,N=P.axValue,B=P.getTransform;function U(t){return void 0!==t.subplot}function G(t,e,r,n,i,o,a){var s,l,c,u,h,d,f,m,g,v=e._hoverdata,y=e._fullLayout.clickmode.indexOf("event")>-1,x=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(v)){q(t,e,o);var _=function(t,e){var r,n,i=t[0],o=-1,a=[];for(n=0;n0?function(t,e){var r,n,i,o=[];for(i=0;i0&&o.push(r);if(1===o.length&&o[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(i=0;i1)return!1;if((n+=e.selectedpoints.length)>1)return!1}return 1===n}(s)&&(d=J(_))){for(a&&a.remove(),g=0;g=0})(i)&&i._fullLayout._deactivateShape(i),function(t){return t._fullLayout._activeSelectionIndex>=0}(i)&&i._fullLayout._deactivateSelection(i);var a=i._fullLayout._zoomlayer,s=f(r),l=m(r);if(s||l){var c,u,h=a.selectAll(".select-outline-"+n.id);h&&i._fullLayout._outlining&&(s&&(c=k(h,t)),c&&o.call("_guiRelayout",i,{shapes:c}),l&&!U(t)&&(u=A(h,t)),u&&(i._fullLayout._noEmitSelectedAtStart=!0,o.call("_guiRelayout",i,{selections:u}).then((function(){e&&M(i)}))),i._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=t.selectionDefs=[],n.selection.mergedPolygons=t.mergedPolygons=[]}function Z(t){return t._id}function X(t,e,r,n){if(!t.calcdata)return[];var i,o,a,s=[],l=e.map(Z),c=r.map(Z);for(a=0;a0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function K(t,e,r){var n,i;for(n=0;n-1&&e;if(!o&&e){var et=at(t,!0);if(et.length){var nt=et[0].xref,ft=et[0].yref;if(nt&&ft){var pt=ct(et);ut([L(t,nt,"x"),L(t,ft,"y")])(Q,pt)}}t._fullLayout._noEmitSelectedAtStart?t._fullLayout._noEmitSelectedAtStart=!1:tt&&ht(t,Q),d._reselect=!1}if(!o&&d._deselect){var mt=d._deselect;(function(t,e,r){for(var n=0;n=0)A._fullLayout._deactivateShape(A);else if(!y){var r=M.clickmode;E.done(Tt).then((function(){if(E.clear(Tt),2===t){for(xt.remove(),J=0;J-1&&G(e,A,n.xaxes,n.yaxes,n.subplot,n,xt),"event"===r&&ht(A,void 0);l.click(A,e,z.id)})).catch(T.error)}},n.doneFn=function(){At.remove(),E.done(Tt).then((function(){E.clear(Tt),!S&&$&&n.selectionDefs&&($.subtract=yt,n.selectionDefs.push($),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,Z)),(S||y)&&Y(n,S),n.doneFnCompleted&&n.doneFnCompleted(St),x&&ht(A,ot)})).catch(T.error)}},clearOutline:y,clearSelectionsCache:Y,selectOnClick:G}},39677:(t,e,r)=>{"use strict";var n=r(77061),i=r(75058),o=r(98387).line,a=r(68057).T,s=r(98260).extendFlat,l=r(46121).templatedArray,c=r(53644),u=r(3520),h=r(24131).LF,d=r(12086);t.exports=l("shape",{visible:s({},u.visible,{editType:"calc+arraydraw",description:["Determines whether or not this shape is visible.","If *legendonly*, the shape is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether or not this","shape is shown in the legend."].join(" ")},legend:s({},u.legend,{editType:"calc+arraydraw",description:["Sets the reference to a legend to show this shape in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")}),legendgroup:s({},u.legendgroup,{editType:"calc+arraydraw",description:["Sets the legend group for this shape.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")}),legendgrouptitle:{text:s({},u.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:i({editType:"calc+arraydraw",description:["Sets this legend group's title font."].join(" ")}),editType:"calc+arraydraw"},legendrank:s({},u.legendrank,{editType:"calc+arraydraw",description:["Sets the legend rank for this shape.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items.","When having unranked or equal rank items shapes would be displayed after traces","i.e. according to their order in data and layout."].join(" ")}),legendwidth:s({},u.legendwidth,{editType:"calc+arraydraw",description:"Sets the width (in px or fraction) of the legend for this shape."}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw",description:["Specifies the shape type to be drawn.","If *line*, a line is drawn from (`x0`,`y0`) to (`x1`,`y1`)","with respect to the axes' sizing mode.","If *circle*, a circle is drawn from","((`x0`+`x1`)/2, (`y0`+`y1`)/2))","with radius","(|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|)","with respect to the axes' sizing mode.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`)","with respect to the axes' sizing mode.","If *path*, draw a custom SVG path using `path`.","with respect to the axes' sizing mode."].join(" ")},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw",description:["Specifies whether shapes are drawn below gridlines (*below*),","between gridlines and traces (*between*) or above traces (*above*)."].join(" ")},xref:s({},n.xref,{description:["Sets the shape's x coordinate axis.",c.axisRefDescription("x","left","right")].join(" ")}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the x axis.","If set to *scaled*, `x0`, `x1` and x coordinates within `path` refer to","data values on the x axis or a fraction of the plot area's width","(`xref` set to *paper*).","If set to *pixel*, `xanchor` specifies the x position in terms","of data or plot fraction but `x0`, `x1` and x coordinates within `path`","are pixels relative to `xanchor`. This way, the shape can have","a fixed width while maintaining a position relative to data or","plot fraction."].join(" ")},xanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `xsizemode` set to *pixel*.","Specifies the anchor point on the x axis to which `x0`, `x1`","and x coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `xsizemode` not set to *pixel*."].join(" ")},x0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting x position.","See `type` and `xsizemode` for more info."].join(" ")},x1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end x position.","See `type` and `xsizemode` for more info."].join(" ")},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc",description:["Shifts `x0` away from the center of the category when `xref` is a *category* or","*multicategory* axis. -0.5 corresponds to the start of the category and 0.5","corresponds to the end of the category."].join(" ")},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc",description:["Shifts `x1` away from the center of the category when `xref` is a *category* or","*multicategory* axis. -0.5 corresponds to the start of the category and 0.5","corresponds to the end of the category."].join(" ")},yref:s({},n.yref,{description:["Sets the shape's y coordinate axis.",c.axisRefDescription("y","bottom","top")].join(" ")}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the y axis.","If set to *scaled*, `y0`, `y1` and y coordinates within `path` refer to","data values on the y axis or a fraction of the plot area's height","(`yref` set to *paper*).","If set to *pixel*, `yanchor` specifies the y position in terms","of data or plot fraction but `y0`, `y1` and y coordinates within `path`","are pixels relative to `yanchor`. This way, the shape can have","a fixed height while maintaining a position relative to data or","plot fraction."].join(" ")},yanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `ysizemode` set to *pixel*.","Specifies the anchor point on the y axis to which `y0`, `y1`","and y coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `ysizemode` not set to *pixel*."].join(" ")},y0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting y position.","See `type` and `ysizemode` for more info."].join(" ")},y1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end y position.","See `type` and `ysizemode` for more info."].join(" ")},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc",description:["Shifts `y0` away from the center of the category when `yref` is a *category* or","*multicategory* axis. -0.5 corresponds to the start of the category and 0.5","corresponds to the end of the category."].join(" ")},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc",description:["Shifts `y1` away from the center of the category when `yref` is a *category* or","*multicategory* axis. -0.5 corresponds to the start of the category and 0.5","corresponds to the end of the category."].join(" ")},path:{valType:"string",editType:"calc+arraydraw",description:["For `type` *path* - a valid SVG path with the pixel values","replaced by data values in `xsizemode`/`ysizemode` being *scaled*","and taken unmodified as pixels relative to `xanchor` and `yanchor`","in case of *pixel* size mode.","There are a few restrictions / quirks","only absolute instructions, not relative. So the allowed segments","are: M, L, H, V, Q, C, T, S, and Z","arcs (A) are not allowed because radius rx and ry are relative.","In the future we could consider supporting relative commands,","but we would have to decide on how to handle date and log axes.","Note that even as is, Q and C Bezier paths that are smooth on","linear axes may not be smooth on log, and vice versa.",'no chained "polybezier" commands - specify the segment type for',"each one.","On category axes, values are numbers scaled to the serial numbers","of categories because using the categories themselves there would","be no way to describe fractional positions","On data axes: because space and T are both normal components of path","strings, we can't use either to separate date from time parts.","Therefore we'll use underscore for this purpose:","2015-02-21_13:45:56.789"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the shape."},line:{color:s({},o.color,{editType:"arraydraw"}),width:s({},o.width,{editType:"calc+arraydraw"}),dash:s({},a,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color filling the shape's interior. Only applies to closed shapes."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw",description:["Determines which regions of complex paths constitute the interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether the shape could be activated for edit or not.","Has no effect when the older editable shapes mode is enabled via","`config.editable` or `config.edits.shapePosition`."].join(" ")},label:{text:{valType:"string",dflt:"",editType:"arraydraw",description:["Sets the text to display with shape.","It is also used for legend item if `name` is not provided."].join(" ")},texttemplate:h({},{keys:Object.keys(d)}),font:i({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the shape label text font."}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw",description:["Sets the position of the label text relative to the shape.","Supported values for rectangles, circles and paths are","*top left*, *top center*, *top right*, *middle left*,","*middle center*, *middle right*, *bottom left*, *bottom center*,","and *bottom right*.","Supported values for lines are *start*, *middle*, and *end*.","Default: *middle center* for rectangles, circles, and paths; *middle* for lines."].join(" ")},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw",description:["Sets the angle at which the label text is drawn","with respect to the horizontal. For lines, angle *auto*","is the same angle as the line. For all other shapes,","angle *auto* is horizontal."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the label's horizontal position anchor","This anchor binds the specified `textposition` to the *left*, *center*","or *right* of the label text.","For example, if `textposition` is set to *top right* and","`xanchor` to *right* then the right-most portion of the","label text lines up with the right-most edge of the","shape."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw",description:["Sets the label's vertical position anchor","This anchor binds the specified `textposition` to the *top*, *middle*","or *bottom* of the label text.","For example, if `textposition` is set to *top right* and","`yanchor` to *top* then the top-most portion of the","label text lines up with the top-most edge of the","shape."].join(" ")},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw",description:"Sets padding (in px) between edge of label and edge of shape."},editType:"arraydraw"},editType:"arraydraw"})},37358:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(6583),a=r(23223);function s(t){return c(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function l(t){return c(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function c(t,e,r,i,s,l){var c=t/2,u=l;if("pixel"===e){var h=s?a.extractPathCoords(s,l?o.paramIsY:o.paramIsX):[r,i],d=n.aggNums(Math.max,null,h),f=n.aggNums(Math.min,null,h),p=f<0?Math.abs(f)+c:c,m=d>0?d+c:c;return{ppad:c,ppadplus:u?p:m,ppadminus:u?m:p}}return{ppad:c}}function u(t,e,r){var n,i,s="x"===t._id.charAt(0)?"x":"y",l="category"===t.type||"multicategory"===t.type,c=0,u=0,h=l?t.r2c:t.d2c;if("scaled"===e[s+"sizemode"]?(n=e[s+"0"],i=e[s+"1"],l&&(c=e[s+"0shift"],u=e[s+"1shift"])):(n=e[s+"anchor"],i=e[s+"anchor"]),void 0!==n)return[h(n)+c,h(i)+u];if(e.path){var d,f,p,m,g=1/0,v=-1/0,b=e.path.match(o.segmentRE);for("date"===t.type&&(h=a.decodeDate(h)),d=0;dv&&(v=m)));return v>=g?[g,v]:void 0}}t.exports=function(t){var e=t._fullLayout,r=n.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var a=0;a{"use strict";t.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},12138:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(39677),s=r(23223);function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}if(e._isShape=!0,o("visible")){o("showlegend")&&(o("legend"),o("legendwidth"),o("legendgroup"),o("legendgrouptitle.text"),n.coerceFont(o,"legendgrouptitle.font"),o("legendrank"));var l=o("path"),c=o("type",l?"path":"rect"),u="path"!==c;u&&delete e.path,o("editable"),o("layer"),o("opacity"),o("fillcolor"),o("fillrule"),o("line.width")&&(o("line.color"),o("line.dash"));for(var h=o("xsizemode"),d=o("ysizemode"),f=["x","y"],p=0;p<2;p++){var m,g,v,b=f[p],y=b+"anchor",x="x"===b?h:d,_={_fullLayout:r},w=i.coerceRef(t,e,_,b,void 0,"paper");if("range"===i.getRefType(w)?((m=i.getFromId(_,w))._shapeIndices.push(e._index),v=s.rangeToShapePosition(m),g=s.shapePositionToRange(m),"category"!==m.type&&"multicategory"!==m.type||(o(b+"0shift"),o(b+"1shift"))):g=v=n.identity,u){var k=b+"0",A=b+"1",M=t[k],T=t[A];t[k]=g(t[k],!0),t[A]=g(t[A],!0),"pixel"===x?(o(k,0),o(A,10)):(i.coercePosition(e,_,o,w,k,.25),i.coercePosition(e,_,o,w,A,.75)),e[k]=v(e[k]),e[A]=v(e[A]),t[k]=M,t[A]=T}if("pixel"===x){var S=t[y];t[y]=g(t[y],!0),i.coercePosition(e,_,o,w,y,.25),e[y]=v(e[y]),t[y]=S}}u&&n.noneOrAll(t,e,["x0","x1","y0","y1"]);var C,E,L="line"===c;if(u&&(C=o("label.texttemplate")),C||(E=o("label.text")),E||C){o("label.textangle");var z=o("label.textposition",L?"middle":"middle center");o("label.xanchor"),o("label.yanchor",function(t,e){return t?"bottom":-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle"}(L,z)),o("label.padding"),n.coerceFont(o,"label.font",r.font)}}}t.exports=function(t,e){o(t,e,{name:"shapes",handleItemDefaults:l})}},64620:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(80394),a=r(40666),s=r(59952).readPaths,l=r(23223),c=l.getPathString,u=r(12086),h=r(89701).FROM_TL;t.exports=function(t,e,r,d){if(d.selectAll(".shape-label").remove(),r.label.text||r.label.texttemplate){var f;if(r.label.texttemplate){var p={};if("path"!==r.type){var m=i.getFromId(t,r.xref),g=i.getFromId(t,r.yref);for(var v in u){var b=u[v](r,m,g);void 0!==b&&(p[v]=b)}}f=n.texttemplateStringForShapes(r.label.texttemplate,{},t._fullLayout._d3locale,p)}else f=r.label.text;var y,x,_,w,k={"data-index":e},A=r.label.font,M=d.append("g").attr(k).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(f);if(r.path){var T=c(t,r),S=s(T,t);y=1/0,_=1/0,x=-1/0,w=-1/0;for(var C=0;C=t?e-n:n-e,-180/Math.PI*Math.atan2(i,o)}(y,_,x,w):0),M.call((function(e){return e.call(a.font,A).attr({}),o.convertToTspans(e,t),e}));var W=function(t,e,r,n,i,o,a){var s,l,c,u,d=i.label.textposition,f=i.label.textangle,p=i.label.padding,m=i.type,g=Math.PI/180*o,v=Math.sin(g),b=Math.cos(g),y=i.label.xanchor,x=i.label.yanchor;if("line"===m){"start"===d?(s=t,l=e):"end"===d?(s=r,l=n):(s=(t+r)/2,l=(e+n)/2),"auto"===y&&(y="start"===d?"auto"===f?r>t?"left":rt?"right":rt?"right":rt?"left":r{"use strict";var n=r(12822).strTranslate,i=r(19846),o=r(14295),a=o.drawMode,s=o.selectMode,l=r(25059),c=r(17499),u=r(81436),h=u.i000,d=u.i090,f=u.i180,p=u.i270,m=r(8867).clearOutlineControllers,g=r(59952),v=g.pointsOnRectangle,b=g.pointsOnEllipse,y=g.writePaths,x=r(81941).newShapes,_=r(81941).createShapeObj,w=r(63750),k=r(64620);function A(t,e){var r,n,i,o=t[e][1],a=t[e][2],s=t.length;return n=t[r=(e+1)%s][1],i=t[r][2],n===o&&i===a&&(n=t[r=(e+2)%s][1],i=t[r][2]),[r,n,i]}t.exports=function t(e,r,o,u){u||(u=0);var g=o.gd;function M(){t(e,r,o,u++),(b(e[0])||o.hasText)&&T({redrawing:!0})}function T(t){var e={};void 0!==o.isActiveShape&&(o.isActiveShape=!1,e=x(r,o)),void 0!==o.isActiveSelection&&(o.isActiveSelection=!1,e=w(r,o),g._fullLayout._reselect=!0),Object.keys(e).length&&l.call((t||{}).redrawing?"relayout":"_guiRelayout",g,e)}var S,C,E,L,z,O=g._fullLayout._zoomlayer,D=o.dragmode,I=a(D),F=s(D);if((I||F)&&(g._fullLayout._outlining=!0),m(g),r.attr("d",y(e)),u||!o.isActiveShape&&!o.isActiveSelection||(z=function(t,e){for(var r=0;r1&&(2!==t.length||"Z"!==t[1][0])&&(0===L&&(t[0][0]="M"),e[E]=t,M(),T())}}()}}function G(t,r){!function(t,r){if(e.length)for(var n=0;n{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=r(75815),s=r(59952).readPaths,l=r(49244),c=r(64620),u=r(8867).clearOutlineControllers,h=r(17499),d=r(40666),f=r(46121).arrayEditor,p=r(19846),m=r(76292),g=r(6583),v=r(23223),b=v.getPathString;function y(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove(),e._shapeUpperLayer.selectAll("text").remove(),e._shapeLowerLayer.selectAll("text").remove(),e._plots){var n=e._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var i=0;i_?(T=f,L="y0",S=_,z="y1"):(T=_,L="y1",S=f,z="y0"),rt(n),ot(l,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l="";"paper"===n||o.autorange||(l+=n),"paper"===i||s.autorange||(l+=i),d.setClipUrl(t,l?"clip"+r._fullLayout._uid+l:null,r)}(e,r,t),et.moveFn="move"===F?nt:it,et.altKey=n.altKey)},doneFn:function(){x(t)||(m(e),at(l),k(e,t,r),i.call("_guiRelayout",t,u.getUpdateObj()))},clickFn:function(){x(t)||at(l)}};function rt(r){if(x(t))F=null;else if(j)F="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=et.element.getBoundingClientRect(),i=n.right-n.left,o=n.bottom-n.top,a=r.clientX-n.left,s=r.clientY-n.top,l=!N&&i>10&&o>10&&!r.shiftKey?p.getCursor(a/i,1-s/o):"move";m(e,l),F=l.split("-")[0]}}function nt(n,i){if("path"===r.type){var o=function(t){return t},a=o,u=o;R?B("xanchor",r.xanchor=K(w+n)):(a=function(t){return K($(t)+n)},G&&"date"===G.type&&(a=v.encodeDate(a))),P?B("yanchor",r.yanchor=Q(M+i)):(u=function(t){return Q(J(t)+i)},H&&"date"===H.type&&(u=v.encodeDate(u))),B("path",r.path=A(I,a,u))}else R?B("xanchor",r.xanchor=K(w+n)):(B("x0",r.x0=K(h+n)),B("x1",r.x1=K(y+n))),P?B("yanchor",r.yanchor=Q(M+i)):(B("y0",r.y0=Q(f+i)),B("y1",r.y1=Q(_+i)));e.attr("d",b(t,r)),ot(l,r),c(t,s,r,U)}function it(n,i){if(N){var o=function(t){return t},a=o,u=o;R?B("xanchor",r.xanchor=K(w+n)):(a=function(t){return K($(t)+n)},G&&"date"===G.type&&(a=v.encodeDate(a))),P?B("yanchor",r.yanchor=Q(M+i)):(u=function(t){return Q(J(t)+i)},H&&"date"===H.type&&(u=v.encodeDate(u))),B("path",r.path=A(I,a,u))}else if(j){if("resize-over-start-point"===F){var d=h+n,p=P?f-i:f+i;B("x0",r.x0=R?d:K(d)),B("y0",r.y0=P?p:Q(p))}else if("resize-over-end-point"===F){var m=y+n,g=P?_-i:_+i;B("x1",r.x1=R?m:K(m)),B("y1",r.y1=P?g:Q(g))}}else{var x=function(t){return-1!==F.indexOf(t)},k=x("n"),V=x("s"),W=x("w"),q=x("e"),Y=k?T+i:T,Z=V?S+i:S,X=W?C+n:C,tt=q?E+n:E;P&&(k&&(Y=T-i),V&&(Z=S-i)),(!P&&Z-Y>10||P&&Y-Z>10)&&(B(L,r[L]=P?Y:Q(Y)),B(z,r[z]=P?Z:Q(Z))),tt-X>10&&(B(O,r[O]=R?X:K(X)),B(D,r[D]=R?tt:K(tt)))}e.attr("d",b(t,r)),ot(l,r),c(t,s,r,U)}function ot(t,e){(R||P)&&function(){var r="path"!==e.type,n=t.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var i=$(R?e.xanchor:o.midRange(r?[e.x0,e.x1]:v.extractPathCoords(e.path,g.paramIsX))),a=J(P?e.yanchor:o.midRange(r?[e.y0,e.y1]:v.extractPathCoords(e.path,g.paramIsY)));if(i=v.roundPositionForSharpStrokeRendering(i,1),a=v.roundPositionForSharpStrokeRendering(a,1),R&&P){var s="M"+(i-1-1)+","+(a-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(R){var l="M"+(i-1-1)+","+(a-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var c="M"+(i-9-1)+","+(a-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function at(t){t.selectAll(".visual-cue").remove()}p.init(et),tt.node().onmousemove=rt}(t,P,u,e,r,F):!0===u.editable&&P.style("pointer-events",D||h.opacity(E)*C<=.5?"stroke":"all");P.node().addEventListener("click",(function(){return function(t,e){if(_(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void M(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=M,y(t)}}}(t,P)}))}u._input&&!0===u.visible&&("above"===u.layer?T(t._fullLayout._shapeUpperLayer):"paper"===u.xref||"paper"===u.yref?T(t._fullLayout._shapeLowerLayer):"between"===u.layer?T(w.shapelayerBetween):w._hadPlotinfo?T((w.mainplotinfo||w).shapelayer):T(t._fullLayout._shapeLowerLayer))}function k(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");d.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function A(t,e,r){return t.replace(g.segmentRE,(function(t){var n=0,i=t.charAt(0),o=g.paramIsX[i],a=g.paramIsY[i],s=g.numParams[i];return i+t.substr(1).replace(g.paramRE,(function(t){return n>=s||(o[n]?t=e(t):a[n]&&(t=r(t)),n++),t}))}))}function M(t){_(t)&&t._fullLayout._activeShapeIndex>=0&&(u(t),delete t._fullLayout._activeShapeIndex,y(t))}t.exports={draw:y,drawOne:w,eraseActiveShape:function(t){if(_(t)){u(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e{"use strict";var n=r(62309).overrideAll,i=r(3520),o=r(75058),a=r(68057).T,s=r(98260).extendFlat,l=r(24131).LF,c=r(12086);t.exports=n({newshape:{visible:s({},i.visible,{description:["Determines whether or not new shape is visible.","If *legendonly*, the shape is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")}),showlegend:{valType:"boolean",dflt:!1,description:["Determines whether or not new","shape is shown in the legend."].join(" ")},legend:s({},i.legend,{description:["Sets the reference to a legend to show new shape in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")}),legendgroup:s({},i.legendgroup,{description:["Sets the legend group for new shape.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")}),legendgrouptitle:{text:s({},i.legendgrouptitle.text,{}),font:o({description:["Sets this legend group's title font."].join(" ")})},legendrank:s({},i.legendrank,{description:["Sets the legend rank for new shape.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items."].join(" ")}),legendwidth:s({},i.legendwidth,{description:"Sets the width (in px or fraction) of the legend for new shape."}),line:{color:{valType:"color",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:0,dflt:4,description:"Sets the line width (in px)."},dash:s({},a,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:["Sets the color filling new shapes' interior.","Please note that if using a fillcolor with alpha greater than half,","drag inside the active shape starts moving the shape underneath,","otherwise a new shape could be started over."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",description:["Determines the path's interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:"Sets the opacity of new shapes."},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",description:["Specifies whether new shapes are drawn below gridlines (*below*),","between gridlines and traces (*between*) or above traces (*above*)."].join(" ")},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",description:["When `dragmode` is set to *drawrect*, *drawline* or *drawcircle*","this limits the drag to be horizontal, vertical or diagonal.","Using *diagonal* there is no limit e.g. in drawing lines in any direction.","*ortho* limits the draw to be either horizontal or vertical.","*horizontal* allows horizontal extend.","*vertical* allows vertical extend."].join(" ")},name:s({},i.name,{description:["Sets new shape name.","The name appears as the legend item."].join(" ")}),label:{text:{valType:"string",dflt:"",description:["Sets the text to display with the new shape.","It is also used for legend item if `name` is not provided."].join(" ")},texttemplate:l({newshape:!0},{keys:Object.keys(c)}),font:o({description:"Sets the new shape label text font."}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],description:["Sets the position of the label text relative to the new shape.","Supported values for rectangles, circles and paths are","*top left*, *top center*, *top right*, *middle left*,","*middle center*, *middle right*, *bottom left*, *bottom center*,","and *bottom right*.","Supported values for lines are *start*, *middle*, and *end*.","Default: *middle center* for rectangles, circles, and paths; *middle* for lines."].join(" ")},textangle:{valType:"angle",dflt:"auto",description:["Sets the angle at which the label text is drawn","with respect to the horizontal. For lines, angle *auto*","is the same angle as the line. For all other shapes,","angle *auto* is horizontal."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",description:["Sets the label's horizontal position anchor","This anchor binds the specified `textposition` to the *left*, *center*","or *right* of the label text.","For example, if `textposition` is set to *top right* and","`xanchor` to *right* then the right-most portion of the","label text lines up with the right-most edge of the","new shape."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets the label's vertical position anchor","This anchor binds the specified `textposition` to the *top*, *middle*","or *bottom* of the label text.","For example, if `textposition` is set to *top right* and","`yanchor` to *top* then the top-most portion of the","label text lines up with the top-most edge of the","new shape."].join(" ")},padding:{valType:"number",dflt:3,min:0,description:"Sets padding (in px) between edge of label and edge of new shape."}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,description:"Sets the opacity of the active shape."}}},"none","from-root")},81436:t=>{"use strict";t.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},24815:(t,e,r)=>{"use strict";var n=r(17499),i=r(12822);t.exports=function(t,e,r){if(r("newshape.visible"),r("newshape.name"),r("newshape.showlegend"),r("newshape.legend"),r("newshape.legendwidth"),r("newshape.legendgroup"),r("newshape.legendgrouptitle.text"),i.coerceFont(r,"newshape.legendgrouptitle.font"),r("newshape.legendrank"),r("newshape.drawdirection"),r("newshape.layer"),r("newshape.fillcolor"),r("newshape.fillrule"),r("newshape.opacity"),r("newshape.line.width")){var o=(t||{}).plot_bgcolor||"#FFF";r("newshape.line.color",n.contrast(o)),r("newshape.line.dash")}var a="drawline"===t.dragmode,s=r("newshape.label.text"),l=r("newshape.label.texttemplate");if(s||l){r("newshape.label.textangle");var c=r("newshape.label.textposition",a?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",function(t,e){return t?"bottom":-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle"}(a,c)),r("newshape.label.padding"),i.coerceFont(r,"newshape.label.font",e.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}},59952:(t,e,r)=>{"use strict";var n=r(37974),i=r(81436),o=i.CIRCLE_SIDES,a=i.SQRT2,s=r(38554),l=s.p2r,c=s.r2p,u=[0,3,4,5,6,1,2],h=[0,3,4,1,2];function d(t,e){return Math.abs(t-e)<=1e-6}function f(t,e){var r=e[1]-t[1],n=e[2]-t[2];return Math.sqrt(r*r+n*n)}e.writePaths=function(t){var e=t.length;if(!e)return"M0,0Z";for(var r="",n=0;n0&&l{"use strict";var n=r(14295),i=n.drawMode,o=n.openMode,a=r(81436),s=a.i000,l=a.i090,c=a.i180,u=a.i270,h=a.cos45,d=a.sin45,f=r(38554),p=f.p2r,m=f.r2p,g=r(8867).clearOutline,v=r(59952),b=v.readPaths,y=v.writePaths,x=v.ellipseOver,_=v.fixDatesForPaths;function w(t,e,r){var n,i=t[0][0],a=e.gd,f=i.getAttribute("d"),g=a._fullLayout.newshape,v=e.plotinfo,w=e.isActiveShape,k=v.xaxis,A=v.yaxis,M=!!v.domain||!v.xaxis,T=!!v.domain||!v.yaxis,S=o(r),C=b(f,a,v,w),E={editable:!0,visible:g.visible,name:g.name,showlegend:g.showlegend,legend:g.legend,legendwidth:g.legendwidth,legendgroup:g.legendgroup,legendgrouptitle:{text:g.legendgrouptitle.text,font:g.legendgrouptitle.font},legendrank:g.legendrank,label:g.label,xref:M?"paper":k._id,yref:T?"paper":A._id,layer:g.layer,opacity:g.opacity,line:{color:g.line.color,width:g.line.width,dash:g.line.dash}};if(S||(E.fillcolor=g.fillcolor,E.fillrule=g.fillrule),1===C.length&&(n=C[0]),n&&5===n.length&&"drawrect"===r)E.type="rect",E.x0=n[0][1],E.y0=n[0][2],E.x1=n[2][1],E.y1=n[2][2];else if(n&&"drawline"===r)E.type="line",E.x0=n[0][1],E.y0=n[0][2],E.x1=n[1][1],E.y1=n[1][2];else if(n&&"drawcircle"===r){E.type="circle";var L=n[s][1],z=n[l][1],O=n[c][1],D=n[u][1],I=n[s][2],F=n[l][2],R=n[c][2],P=n[u][2],j=v.xaxis&&("date"===v.xaxis.type||"log"===v.xaxis.type),N=v.yaxis&&("date"===v.yaxis.type||"log"===v.yaxis.type);j&&(L=m(v.xaxis,L),z=m(v.xaxis,z),O=m(v.xaxis,O),D=m(v.xaxis,D)),N&&(I=m(v.yaxis,I),F=m(v.yaxis,F),R=m(v.yaxis,R),P=m(v.yaxis,P));var B=(z+D)/2,U=(I+R)/2,G=x({x0:B,y0:U,x1:B+(D-z+O-L)/2*h,y1:U+(P-F+R-I)/2*d});j&&(G.x0=p(v.xaxis,G.x0),G.x1=p(v.xaxis,G.x1)),N&&(G.y0=p(v.yaxis,G.y0),G.y1=p(v.yaxis,G.y1)),E.x0=G.x0,E.y0=G.y0,E.x1=G.x1,E.y1=G.y1}else E.type="path",k&&A&&_(C,k,A),E.path=y(C),n=null;return E}t.exports={newShapes:function(t,e){if(t.length&&t[0][0]){var r=e.gd,n=e.isActiveShape,o=e.dragmode,a=(r.layout||{}).shapes||[];if(!i(o)&&void 0!==n){var s=r._fullLayout._activeShapeIndex;if(s{"use strict";t.exports={clearOutlineControllers:function(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".outline-controllers").remove()},clearOutline:function(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".select-outline").remove(),t._fullLayout._outlining=!1}}},23223:(t,e,r)=>{"use strict";var n=r(6583),i=r(12822),o=r(75815);function a(t,e){var r=0;return(e=e||0)&&t&&("category"===t.type||"multicategory"===t.type)&&(r=(t.r2p(1)-t.r2p(0))*e),r}e.rangeToShapePosition=function(t){return"log"===t.type?t.r2d:function(t){return t}},e.shapePositionToRange=function(t){return"log"===t.type?t.d2r:function(t){return t}},e.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},e.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},e.extractPathCoords=function(t,e,r){var o=[];return t.match(n.segmentRE).forEach((function(t){var a=e[t.charAt(0)].drawn;if(void 0!==a){var s=t.substr(1).match(n.paramRE);if(s&&!(s.lengthf&&(t="X"),t}));return o>f&&(p=p.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+t)),u+p}))}(r,l,u);if("pixel"===r.xsizemode){var M=l(r.xanchor);h=M+r.x0+_,d=M+r.x1+w}else h=l(r.x0)+_,d=l(r.x1)+w;if("pixel"===r.ysizemode){var T=u(r.yanchor);f=T-r.y0+k,p=T-r.y1+A}else f=u(r.y0)+k,p=u(r.y1)+A;if("line"===m)return"M"+h+","+f+"L"+d+","+p;if("rect"===m)return"M"+h+","+f+"H"+d+"V"+p+"H"+h+"Z";var S=(h+d)/2,C=(f+p)/2,E=Math.abs(S-h),L=Math.abs(C-f),z="A"+E+","+L,O=S+E+","+C;return"M"+O+z+" 0 1,1 "+S+","+(C-L)+z+" 0 0,1 "+O+"Z"}},60166:(t,e,r)=>{"use strict";var n=r(71422);t.exports={moduleType:"component",name:"shapes",layoutAttributes:r(39677),supplyLayoutDefaults:r(12138),supplyDrawNewShapeDefaults:r(24815),includeBasePlot:r(39859)("shapes"),calcAutorange:r(37358),draw:n.draw,drawOne:n.drawOne}},12086:t=>{"use strict";function e(t,e){return e?e.d2l(t):t}function r(t,e){return e?e.l2d(t):t}function n(t){return t.x0shift||0}function i(t){return t.x1shift||0}function o(t){return t.y0shift||0}function a(t){return t.y1shift||0}function s(t,r){return e(t.x1,r)+i(t)-e(t.x0,r)-n(t)}function l(t,r,n){return e(t.y1,n)+a(t)-e(t.y0,n)-o(t)}t.exports={x0:function(t){return t.x0},x1:function(t){return t.x1},y0:function(t){return t.y0},y1:function(t){return t.y1},slope:function(t,e,r){return"line"!==t.type?void 0:l(t,0,r)/s(t,e)},dx:s,dy:l,width:function(t,e){return Math.abs(s(t,e))},height:function(t,e,r){return Math.abs(l(t,0,r))},length:function(t,e,r){return"line"!==t.type?void 0:Math.sqrt(Math.pow(s(t,e),2)+Math.pow(l(t,0,r),2))},xcenter:function(t,o){return r((e(t.x1,o)+i(t)+e(t.x0,o)+n(t))/2,o)},ycenter:function(t,n,i){return r((e(t.y1,i)+a(t)+e(t.y0,i)+o(t))/2,i)}}},8421:(t,e,r)=>{"use strict";var n=r(75058),i=r(85538),o=r(98260).extendDeepAll,a=r(62309).overrideAll,s=r(46367),l=r(46121).templatedArray,c=r(92911),u=l("step",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not this step is included in the slider."].join(" ")},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called when the slider value is changed.","If the `skip` method is used, the API slider will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","slider events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on slide."].join(" ")},label:{valType:"string",description:"Sets the text label to appear on the slider"},value:{valType:"string",description:["Sets the value of the slider step, used to refer to the step programatically.","Defaults to the slider label if not provided."].join(" ")},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_sliderchange` method and executing the API command manually without losing","the benefit of the slider automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}});t.exports=a(l("slider",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not the slider is visible."].join(" ")},active:{valType:"number",min:0,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this slider length","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the slider","This measure excludes the padding of both ends.","That is, the slider's length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the x position (in normalized coordinates) of the slider."},pad:o(i({editType:"arraydraw"}),{description:"Set the padding of the slider component along each side."},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",description:["Sets the slider's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the y position (in normalized coordinates) of the slider."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the slider's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},transition:{duration:{valType:"number",min:0,dflt:150,description:"Sets the duration of the slider transition"},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out",description:"Sets the easing function of the slider transition"}},currentvalue:{visible:{valType:"boolean",dflt:!0,description:["Shows the currently-selected value above the slider."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",description:["The alignment of the value readout relative to the length of the slider."].join(" ")},offset:{valType:"number",dflt:10,description:["The amount of space, in pixels, between the current value label","and the slider."].join(" ")},prefix:{valType:"string",description:"When currentvalue.visible is true, this sets the prefix of the label."},suffix:{valType:"string",description:"When currentvalue.visible is true, this sets the suffix of the label."},font:n({description:"Sets the font of the current value label text."})},font:n({description:"Sets the font of the slider step labels."}),activebgcolor:{valType:"color",dflt:c.gripBgActiveColor,description:["Sets the background color of the slider grip","while dragging."].join(" ")},bgcolor:{valType:"color",dflt:c.railBgColor,description:"Sets the background color of the slider."},bordercolor:{valType:"color",dflt:c.railBorderColor,description:"Sets the color of the border enclosing the slider."},borderwidth:{valType:"number",min:0,dflt:c.railBorderWidth,description:"Sets the width (in px) of the border enclosing the slider."},ticklen:{valType:"number",min:0,dflt:c.tickLength,description:"Sets the length in pixels of step tick marks"},tickcolor:{valType:"color",dflt:c.tickColor,description:"Sets the color of the border enclosing the slider."},tickwidth:{valType:"number",min:0,dflt:1,description:"Sets the tick width (in px)."},minorticklen:{valType:"number",min:0,dflt:c.minorTickLength,description:"Sets the length in pixels of minor step tick marks"}}),"arraydraw","from-root")},92911:t=>{"use strict";t.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},60626:(t,e,r)=>{"use strict";var n=r(12822),i=r(35677),o=r(8421),a=r(92911).name,s=o.steps;function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}for(var s=i(t,e,{name:"steps",handleItemDefaults:c}),l=0,u=0;u{"use strict";var n=r(27941),i=r(51137),o=r(17499),a=r(40666),s=r(12822),l=s.strTranslate,c=r(80394),u=r(46121).arrayEditor,h=r(92911),d=r(89701),f=d.LINE_SPACING,p=d.FROM_TL,m=d.FROM_BR;function g(t){return h.autoMarginIdRoot+t._index}function v(t){return t._index}function b(t,e){var r=a.tester.selectAll("g."+h.labelGroupClass).data(e._visibleSteps);r.enter().append("g").classed(h.labelGroupClass,!0);var o=0,l=0;r.each((function(t){var r=_(n.select(this),{step:t},e).node();if(r){var i=a.bBox(r);l=Math.max(l,i.height),o=Math.max(o,i.width)}})),r.remove();var u=e._dims={};u.inputAreaWidth=Math.max(h.railWidth,h.gripHeight);var d=t._fullLayout._size;u.lx=d.l+d.w*e.x,u.ly=d.t+d.h*(1-e.y),"fraction"===e.lenmode?u.outerLength=Math.round(d.w*e.len):u.outerLength=e.len,u.inputAreaStart=0,u.inputAreaLength=Math.round(u.outerLength-e.pad.l-e.pad.r);var f=(u.inputAreaLength-2*h.stepInset)/(e._stepCount-1),v=o+h.labelPadding;if(u.labelStride=Math.max(1,Math.ceil(v/f)),u.labelHeight=l,u.currentValueMaxWidth=0,u.currentValueHeight=0,u.currentValueTotalHeight=0,u.currentValueMaxLines=1,e.currentvalue.visible){var b=a.tester.append("g");r.each((function(t){var r=y(b,e,t.label),n=r.node()&&a.bBox(r.node())||{width:0,height:0},i=c.lineCount(r);u.currentValueMaxWidth=Math.max(u.currentValueMaxWidth,Math.ceil(n.width)),u.currentValueHeight=Math.max(u.currentValueHeight,Math.ceil(n.height)),u.currentValueMaxLines=Math.max(u.currentValueMaxLines,i)})),u.currentValueTotalHeight=u.currentValueHeight+e.currentvalue.offset,b.remove()}u.height=u.currentValueTotalHeight+h.tickOffset+e.ticklen+h.labelOffset+u.labelHeight+e.pad.t+e.pad.b;var x="left";s.isRightAnchor(e)&&(u.lx-=u.outerLength,x="right"),s.isCenterAnchor(e)&&(u.lx-=u.outerLength/2,x="center");var w="top";s.isBottomAnchor(e)&&(u.ly-=u.height,w="bottom"),s.isMiddleAnchor(e)&&(u.ly-=u.height/2,w="middle"),u.outerLength=Math.ceil(u.outerLength),u.height=Math.ceil(u.height),u.lx=Math.round(u.lx),u.ly=Math.round(u.ly);var k={y:e.y,b:u.height*m[w],t:u.height*p[w]};"fraction"===e.lenmode?(k.l=0,k.xl=e.x-e.len*p[x],k.r=0,k.xr=e.x+e.len*m[x]):(k.x=e.x,k.l=u.outerLength*p[x],k.r=u.outerLength*m[x]),i.autoMargin(t,g(e),k)}function y(t,e,r){if(e.currentvalue.visible){var n,i,o=e._dims;switch(e.currentvalue.xanchor){case"right":n=o.inputAreaLength-h.currentValueInset-o.currentValueMaxWidth,i="left";break;case"center":n=.5*o.inputAreaLength,i="middle";break;default:n=h.currentValueInset,i="left"}var l=s.ensureSingle(t,"text",h.labelClass,(function(t){t.attr({"text-anchor":i,"data-notex":1})})),u=e.currentvalue.prefix?e.currentvalue.prefix:"";if("string"==typeof r)u+=r;else{var d=e.steps[e.active].label,p=e._gd._fullLayout._meta;p&&(d=s.templateString(d,p)),u+=d}e.currentvalue.suffix&&(u+=e.currentvalue.suffix),l.call(a.font,e.currentvalue.font).text(u).call(c.convertToTspans,e._gd);var m=c.lineCount(l),g=(o.currentValueMaxLines+1-m)*e.currentvalue.font.size*f;return c.positionText(l,n,g),l}}function x(t,e,r){s.ensureSingle(t,"rect",h.gripRectClass,(function(n){n.call(M,e,t,r).style("pointer-events","all")})).attr({width:h.gripWidth,height:h.gripHeight,rx:h.gripRadius,ry:h.gripRadius}).call(o.stroke,r.bordercolor).call(o.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function _(t,e,r){var n=s.ensureSingle(t,"text",h.labelClass,(function(t){t.attr({"text-anchor":"middle","data-notex":1})})),i=e.step.label,o=r._gd._fullLayout._meta;return o&&(i=s.templateString(i,o)),n.call(a.font,r.font).text(i).call(c.convertToTspans,r._gd),n}function w(t,e){var r=s.ensureSingle(t,"g",h.labelsClass),i=e._dims,o=r.selectAll("g."+h.labelGroupClass).data(i.labelSteps);o.enter().append("g").classed(h.labelGroupClass,!0),o.exit().remove(),o.each((function(t){var r=n.select(this);r.call(_,t,e),a.setTranslate(r,C(e,t.fraction),h.tickOffset+e.ticklen+e.font.size*f+h.labelOffset+i.currentValueTotalHeight)}))}function k(t,e,r,n,i){var o=Math.round(n*(r._stepCount-1)),a=r._visibleSteps[o]._index;a!==r.active&&A(t,e,r,a,!0,i)}function A(t,e,r,n,o,a){var s=r.active;r.active=n,u(t.layout,h.name,r).applyUpdate("active",n);var l=r.steps[r.active];e.call(S,r,a),e.call(y,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:o,previousActive:s}),l&&l.method&&o&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=o,e._nextMethod.doTransition=a):(e._nextMethod={step:l,doCallback:o,doTransition:a},e._nextMethodRaf=window.requestAnimationFrame((function(){var r=e._nextMethod.step;r.method&&(r.execute&&i.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)}))))}function M(t,e,r){if(!e._context.staticPlot){var i=r.node(),a=n.select(e);t.on("mousedown",l),t.on("touchstart",l)}function s(){return r.data()[0]}function l(){var t=s();e.emit("plotly_sliderstart",{slider:t});var l=r.select("."+h.gripRectClass);n.event.stopPropagation(),n.event.preventDefault(),l.call(o.fill,t.activebgcolor);var c=E(t,n.mouse(i)[0]);function u(){var t=s(),o=E(t,n.mouse(i)[0]);k(e,r,t,o,!1)}function d(){var t=s();t._dragging=!1,l.call(o.fill,t.bgcolor),a.on("mouseup",null),a.on("mousemove",null),a.on("touchend",null),a.on("touchmove",null),e.emit("plotly_sliderend",{slider:t,step:t.steps[t.active]})}k(e,r,t,c,!0),t._dragging=!0,a.on("mousemove",u),a.on("touchmove",u),a.on("mouseup",d),a.on("touchend",d)}}function T(t,e){var r=t.selectAll("rect."+h.tickRectClass).data(e._visibleSteps),i=e._dims;r.enter().append("rect").classed(h.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each((function(t,r){var s=r%i.labelStride==0,l=n.select(this);l.attr({height:s?e.ticklen:e.minorticklen}).call(o.fill,e.tickcolor),a.setTranslate(l,C(e,r/(e._stepCount-1))-.5*e.tickwidth,(s?h.tickOffset:h.minorTickOffset)+i.currentValueTotalHeight)}))}function S(t,e,r){for(var n=t.select("rect."+h.gripRectClass),i=0,o=0;o0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform",l(a-.5*h.gripWidth,e._dims.currentValueTotalHeight))}}function C(t,e){var r=t._dims;return r.inputAreaStart+h.stepInset+(r.inputAreaLength-2*h.stepInset)*Math.min(1,Math.max(0,e))}function E(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-h.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*h.stepInset-2*r.inputAreaStart)))}function L(t,e,r){var n=r._dims,i=s.ensureSingle(t,"rect",h.railTouchRectClass,(function(n){n.call(M,e,t,r).style("pointer-events","all")}));i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,h.tickOffset+r.ticklen+n.labelHeight)}).call(o.fill,r.bgcolor).attr("opacity",0),a.setTranslate(i,0,n.currentValueTotalHeight)}function z(t,e){var r=e._dims,n=r.inputAreaLength-2*h.railInset,i=s.ensureSingle(t,"rect",h.railRectClass);i.attr({width:n,height:h.railWidth,rx:h.railRadius,ry:h.railRadius,"shape-rendering":"crispEdges"}).call(o.stroke,e.bordercolor).call(o.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),a.setTranslate(i,h.railInset,.5*(r.inputAreaWidth-h.railWidth)+r.currentValueTotalHeight)}t.exports=function(t){var e=t._context.staticPlot,r=t._fullLayout,o=function(t,e){for(var r=t[h.name],n=[],i=0;i0?[0]:[]);function l(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,g(e))}if(s.enter().append("g").classed(h.containerClassName,!0).style("cursor",e?null:"ew-resize"),s.exit().each((function(){n.select(this).selectAll("g."+h.groupClassName).each(l)})).remove(),0!==o.length){var c=s.selectAll("g."+h.groupClassName).data(o,v);c.enter().append("g").classed(h.groupClassName,!0),c.exit().each(l).remove();for(var u=0;u{"use strict";var n=r(92911);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(8421),supplyLayoutDefaults:r(60626),draw:r(23350)}},6883:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=r(51137),a=r(25059),s=r(12822),l=s.strTranslate,c=r(40666),u=r(17499),h=r(80394),d=r(11891),f=r(89701).OPPOSITE_SIDE,p=/ [XY][0-9]* /;t.exports={draw:function(t,e,r){var m,g=t._fullLayout,v=r.propContainer,b=r.propName,y=r.placeholder,x=r.traceIndex,_=r.avoid||{},w=r.attributes,k=r.transform,A=r.containerGroup,M=1,T=v.title,S=(T&&T.text?T.text:"").trim(),C=!1,E=T&&T.font?T.font:{},L=E.family,z=E.size,O=E.color,D=E.weight,I=E.style,F=E.variant,R=E.textcase,P=E.lineposition,j=E.shadow,N=!!r.subtitlePropName,B=r.subtitlePlaceholder,U=(v.title||{}).subtitle||{text:"",font:{}},G=U.text.trim(),V=!1,H=1,W=U.font,q=W.family,Y=W.size,Z=W.color,X=W.weight,$=W.style,J=W.variant,K=W.textcase,Q=W.lineposition,tt=W.shadow;"title.text"===b?m="titleText":-1!==b.indexOf("axis")?m="axisTitleText":b.indexOf(!0)&&(m="colorbarTitleText");var et=t._context.edits[m];function rt(t,e){return void 0!==t&&void 0!==e&&t.replace(p," % ")===e.replace(p," % ")}""===S?M=0:rt(S,y)&&(et||(S=""),M=.2,C=!0),N&&(""===G?H=0:rt(G,B)&&(et||(G=""),H=.2,V=!0)),r._meta?S=s.templateString(S,r._meta):g._meta&&(S=s.templateString(S,g._meta));var nt,it=S||G||et;A||(A=s.ensureSingle(g._infolayer,"g","g-"+e),nt=g._hColorbarMoveTitle);var ot=A.selectAll("text."+e).data(it?[0]:[]);ot.enter().append("text"),ot.text(S).attr("class",e),ot.exit().remove();var at=null,st=e+"-subtitle",lt=G||et;if(N&<&&((at=A.selectAll("text."+st).data(lt?[0]:[])).enter().append("text"),at.text(G).attr("class",st),at.exit().remove()),!it)return A;function ct(t,e){s.syncOrAsync([ut,ht],{title:t,subtitle:e})}function ut(r){var i,a=r.title,d=r.subtitle;if(!k&&nt&&(k={}),k?(i="",k.rotate&&(i+="rotate("+[k.rotate,w.x,w.y]+")"),(k.offset||nt)&&(i+=l(0,(k.offset||0)-(nt||0)))):i=null,a.attr("transform",i),a.style("opacity",M*u.opacity(O)).call(c.font,{color:u.rgb(O),size:n.round(z,2),family:L,weight:D,style:I,variant:F,textcase:R,shadow:j,lineposition:P}).attr(w).call(h.convertToTspans,t,(function(t){if(t){var e=n.select(t.node().parentNode).select("."+st);if(!e.empty()){var r=t.node().getBBox();if(r.height){var i=r.y+r.height+1.6*Y;e.attr("y",i)}}}})),d){var f=A.select("."+e+"-math-group"),p=a.node().getBBox(),m=f.node()?f.node().getBBox():void 0,g=m?m.y+m.height+1.6*Y:p.y+p.height+1.6*Y,v=s.extendFlat({},w,{y:g});d.attr("transform",i),d.style("opacity",H*u.opacity(Z)).call(c.font,{color:u.rgb(Z),size:n.round(Y,2),family:q,weight:X,style:$,variant:J,textcase:K,shadow:tt,lineposition:Q}).attr(v).call(h.convertToTspans,t)}return o.previousPromises(t)}function ht(e){var r=e.title,o=n.select(r.node().parentNode);if(_&&_.selection&&_.side&&S){o.attr("transform",null);var a=f[_.side],u="left"===_.side||"top"===_.side?-1:1,h=i(_.pad)?_.pad:2,d=c.bBox(o.node()),p={t:0,b:0,l:0,r:0},m=t._fullLayout._reservedMargin;for(var b in m)for(var y in m[b]){var x=m[b][y];p[y]=Math.max(p[y],x)}var w={left:p.l,top:p.t,right:g.width-p.r,bottom:g.height-p.b},k=_.maxShift||u*(w[_.side]-d[_.side]),A=0;if(k<0)A=k;else{var M=_.offsetLeft||0,T=_.offsetTop||0;d.left-=M,d.right-=M,d.top-=T,d.bottom-=T,_.selection.each((function(){var t=c.bBox(this);s.bBoxIntersect(d,t,h)&&(A=Math.max(A,u*(t[_.side]-d[a])+h))})),A=Math.min(k,A),v._titleScoot=Math.abs(A)}if(A>0||k<0){var C={left:[-A,0],right:[A,0],top:[0,-A],bottom:[0,A]}[_.side];o.attr("transform",l(C[0],C[1]))}}}function dt(t,e){t.text(e).on("mouseover.opacity",(function(){n.select(this).transition().duration(d.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(d.HIDE_PLACEHOLDER).style("opacity",0)}))}if(ot.call(ct,at),et&&(S?ot.on(".opacity",null):(dt(ot,y),C=!0),ot.call(h.makeEditable,{gd:t}).on("edit",(function(e){void 0!==x?a.call("_guiRestyle",t,b,e,x):a.call("_guiRelayout",t,b,e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(ct)})).on("input",(function(t){this.text(t||" ").call(h.positionText,w.x,w.y)})),N)){if(N&&!S){var ft=ot.node().getBBox(),pt=ft.y+ft.height+1.6*Y;at.attr("y",pt)}G?at.on(".opacity",null):(dt(at,B),V=!0),at.call(h.makeEditable,{gd:t}).on("edit",(function(e){a.call("_guiRelayout",t,"title.subtitle.text",e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(ct)})).on("input",(function(t){this.text(t||" ").call(h.positionText,at.attr("x"),at.attr("y"))}))}return ot.classed("js-placeholder",C),at&&at.classed("js-placeholder",V),A},SUBTITLE_PADDING_EM:1.6,SUBTITLE_PADDING_MATHJAX_EM:1.6}},40658:(t,e,r)=>{"use strict";var n=r(75058),i=r(84226),o=r(98260).extendFlat,a=r(62309).overrideAll,s=r(85538),l=r(46121).templatedArray,c=l("button",{visible:{valType:"boolean",description:"Determines whether or not this button is visible."},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called on click.","If the `skip` method is used, the API updatemenu will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","updatemenu events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on click."].join(" ")},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets a 2nd set of `args`,","these arguments values are passed to the Plotly","method set in `method` when clicking this button while in the active state.","Use this to create toggle buttons."].join(" ")},label:{valType:"string",dflt:"",description:"Sets the text label to appear on the button."},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_buttonclicked` method and executing the API command manually without losing","the benefit of the updatemenu automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}});t.exports=a(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean",description:["Determines whether or not the update menu is visible."].join(" ")},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown",description:["Determines whether the buttons are accessible via a dropdown menu","or whether the buttons are stacked horizontally or vertically"].join(" ")},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down",description:["Determines the direction in which the buttons are laid out, whether","in a dropdown menu or a row/column of buttons. For `left` and `up`,","the buttons will still appear in left-to-right or top-to-bottom order","respectively."].join(" ")},active:{valType:"integer",min:-1,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},showactive:{valType:"boolean",dflt:!0,description:"Highlights active dropdown item or active button if true."},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05,description:"Sets the x position (in normalized coordinates) of the update menu."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right",description:["Sets the update menu's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:1,description:"Sets the y position (in normalized coordinates) of the update menu."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the update menu's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},pad:o(s({editType:"arraydraw"}),{description:"Sets the padding around the buttons or dropdown menu."}),font:n({description:"Sets the font of the update menu button text."}),bgcolor:{valType:"color",description:"Sets the background color of the update menu buttons."},bordercolor:{valType:"color",dflt:i.borderLine,description:"Sets the color of the border enclosing the update menu."},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw",description:"Sets the width (in px) of the border enclosing the update menu."}}),"arraydraw","from-root")},13518:t=>{"use strict";t.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},42757:(t,e,r)=>{"use strict";var n=r(12822),i=r(35677),o=r(40658),a=r(13518).name,s=o.buttons;function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}a("visible",i(t,e,{name:"buttons",handleItemDefaults:c}).length>0)&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),n.noneOrAll(t,e,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),n.coerceFont(a,"font",r.font),a("bgcolor",r.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function c(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}t.exports=function(t,e){i(t,e,{name:a,handleItemDefaults:l})}},86925:(t,e,r)=>{"use strict";var n=r(27941),i=r(51137),o=r(17499),a=r(40666),s=r(12822),l=r(80394),c=r(46121).arrayEditor,u=r(89701).LINE_SPACING,h=r(13518),d=r(90633);function f(t){return t._index}function p(t,e){return+t.attr(h.menuIndexAttrName)===e._index}function m(t,e,r,n,i,o,a,s){e.active=a,c(t.layout,h.name,e).applyUpdate("active",a),"buttons"===e.type?v(t,n,null,null,e):"dropdown"===e.type&&(i.attr(h.menuIndexAttrName,"-1"),g(t,n,i,o,e),s||v(t,n,i,o,e))}function g(t,e,r,n,i){var o=s.ensureSingle(e,"g",h.headerClassName,(function(t){t.style("pointer-events","all")})),l=i._dims,c=i.active,u=i.buttons[c]||h.blankHeaderOpts,d={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},f={width:l.headerWidth,height:l.headerHeight};o.call(b,i,u,t).call(T,i,d,f),s.ensureSingle(e,"text",h.headerArrowClassName,(function(t){t.attr("text-anchor","end").call(a.font,i.font).text(h.arrowSymbol[i.direction])})).attr({x:l.headerWidth-h.arrowOffsetX+i.pad.l,y:l.headerHeight/2+h.textOffsetY+i.pad.t}),o.on("click",(function(){r.call(S,String(p(r,i)?-1:i._index)),v(t,e,r,n,i)})),o.on("mouseover",(function(){o.call(w)})),o.on("mouseout",(function(){o.call(k,i)})),a.setTranslate(e,l.lx,l.ly)}function v(t,e,r,o,a){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(h.menuIndexAttrName)}(r)&&"buttons"!==a.type?[]:a.buttons,c="dropdown"===a.type?h.dropdownButtonClassName:h.buttonClassName,u=r.selectAll("g."+c).data(s.filterVisible(l)),d=u.enter().append("g").classed(c,!0),f=u.exit();"dropdown"===a.type?(d.attr("opacity","0").transition().attr("opacity","1"),f.transition().attr("opacity","0").remove()):f.remove();var p=0,g=0,v=a._dims,y=-1!==["up","down"].indexOf(a.direction);"dropdown"===a.type&&(y?g=v.headerHeight+h.gapButtonHeader:p=v.headerWidth+h.gapButtonHeader),"dropdown"===a.type&&"up"===a.direction&&(g=-h.gapButtonHeader+h.gapButton-v.openHeight),"dropdown"===a.type&&"left"===a.direction&&(p=-h.gapButtonHeader+h.gapButton-v.openWidth);var x={x:v.lx+p+a.pad.l,y:v.ly+g+a.pad.t,yPad:h.gapButton,xPad:h.gapButton,index:0},A={l:x.x+a.borderwidth,t:x.y+a.borderwidth};u.each((function(s,l){var c=n.select(this);c.call(b,a,s,t).call(T,a,x),c.on("click",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&a.active===l?(m(t,a,0,e,r,o,-1),i.executeAPICommand(t,s.method,s.args2)):(m(t,a,0,e,r,o,l),i.executeAPICommand(t,s.method,s.args))),t.emit("plotly_buttonclicked",{menu:a,button:s,active:a.active}))})),c.on("mouseover",(function(){c.call(w)})),c.on("mouseout",(function(){c.call(k,a),u.call(_,a)}))})),u.call(_,a),y?(A.w=Math.max(v.openWidth,v.headerWidth),A.h=x.y-A.t):(A.w=x.x-A.l,A.h=Math.max(v.openHeight,v.headerHeight)),A.direction=a.direction,o&&(u.size()?function(t,e,r,n,i,o){var a,s,l,c=i.direction,u="up"===c||"down"===c,d=i._dims,f=i.active;if(u)for(s=0,l=0;l0?[0]:[]);if(a.enter().append("g").classed(h.containerClassName,!0).style("cursor","pointer"),a.exit().each((function(){n.select(this).selectAll("g."+h.headerGroupClassName).each(o)})).remove(),0!==r.length){var l=a.selectAll("g."+h.headerGroupClassName).data(r,f);l.enter().append("g").classed(h.headerGroupClassName,!0);for(var c=s.ensureSingle(a,"g",h.dropdownButtonGroupClassName,(function(t){t.style("pointer-events","all")})),u=0;u{"use strict";var n=r(13518);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(40658),supplyLayoutDefaults:r(42757),draw:r(86925)}},90633:(t,e,r)=>{"use strict";t.exports=s;var n=r(27941),i=r(17499),o=r(40666),a=r(12822);function s(t,e,r){this.gd=t,this.container=e,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}s.barWidth=2,s.barLength=20,s.barRadius=2,s.barPad=1,s.barColor="#808BA4",s.prototype.enable=function(t,e,r){var a=this.gd._fullLayout,l=a.width,c=a.height;this.position=t;var u,h,d,f,p=this.position.l,m=this.position.w,g=this.position.t,v=this.position.h,b=this.position.direction,y="down"===b,x="left"===b,_="up"===b,w=m,k=v;y||x||"right"===b||_||(this.position.direction="down",y=!0),y||_?(h=(u=p)+w,y?(d=g,k=(f=Math.min(d+k,c))-d):k=(f=g+k)-(d=Math.max(f-k,0))):(f=(d=g)+k,x?w=(h=p+w)-(u=Math.max(h-w,0)):(u=p,w=(h=Math.min(u+w,l))-u)),this._box={l:u,t:d,w,h:k};var A=m>w,M=s.barLength+2*s.barPad,T=s.barWidth+2*s.barPad,S=p,C=g+v;C+T>c&&(C=c-T);var E=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);E.exit().on(".drag",null).remove(),E.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),A?(this.hbar=E.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:C,width:M,height:T}),this._hbarXMin=S+M/2,this._hbarTranslateMax=w-M):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=v>k,z=s.barWidth+2*s.barPad,O=s.barLength+2*s.barPad,D=p+m,I=g;D+z>l&&(D=l-z);var F=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);F.exit().on(".drag",null).remove(),F.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),L?(this.vbar=F.attr({rx:s.barRadius,ry:s.barRadius,x:D,y:I,width:z,height:O}),this._vbarYMin=I+O/2,this._vbarTranslateMax=k-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,P=u-.5,j=L?h+z+.5:h+.5,N=d-.5,B=A?f+T+.5:f+.5,U=a._topdefs.selectAll("#"+R).data(A||L?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",R).append("rect"),A||L?(this._clipRect=U.select("rect").attr({x:Math.floor(P),y:Math.floor(N),width:Math.ceil(j)-Math.floor(P),height:Math.ceil(B)-Math.floor(N)}),this.container.call(o.setClipUrl,R,this.gd),this.bg.attr({x:p,y:g,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),A||L){var G=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(G);var V=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(V),L&&this.vbar.on(".drag",null).call(V)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,i=r+this._hbarTranslateMax;t=(a.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var o=e+this._vbarYMin,s=o+this._vbarTranslateMax;e=(a.constrain(n.event.y,o,s)-o)/(s-o)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=a.constrain(t||0,0,r),e=a.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(o.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(o.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(o.setTranslate,t,e+s*this._vbarTranslateMax)}}},89701:t=>{"use strict";t.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},53644:t=>{"use strict";t.exports={axisRefDescription:function(t,e,r){return["If set to a",t,"axis id (e.g. *"+t+"* or","*"+t+"2*), the `"+t+"` position refers to a",t,"coordinate. If set to *paper*, the `"+t+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+r+"). If set to a",t,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",e,"of the domain of that axis: e.g.,","*"+t+"2 domain* refers to the domain of the second",t," axis and a",t,"position of 0.5 refers to the","point between the",e,"and the",r,"of the domain of the","second",t,"axis."].join(" ")}}},77201:t=>{"use strict";t.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},55697:t=>{"use strict";t.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},24134:t=>{"use strict";t.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},11891:t=>{"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},32994:t=>{"use strict";t.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},25853:(t,e)=>{"use strict";e.xmlns="http://www.w3.org/2000/xmlns/",e.svg="http://www.w3.org/2000/svg",e.xlink="http://www.w3.org/1999/xlink",e.svgAttrs={xmlns:e.svg,"xmlns:xlink":e.xlink}},7623:(t,e,r)=>{"use strict";e.version=r(88566).version,r(60613),r(1146);for(var n=r(25059),i=e.register=n.register,o=r(41103),a=Object.keys(o),s=0;s{"use strict";t.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:["",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},66379:(t,e)=>{"use strict";e.isLeftAnchor=function(t){return"left"===t.xanchor||"auto"===t.xanchor&&t.x<=1/3},e.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},e.isRightAnchor=function(t){return"right"===t.xanchor||"auto"===t.xanchor&&t.x>=2/3},e.isTopAnchor=function(t){return"top"===t.yanchor||"auto"===t.yanchor&&t.y>=2/3},e.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3},e.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3}},59804:(t,e,r)=>{"use strict";var n=r(31918),i=n.mod,o=n.modHalf,a=Math.PI,s=2*a;function l(t){return Math.abs(t[1]-t[0])>s-1e-14}function c(t,e){return o(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0](n=i(n,s))&&(n+=s);var o=i(t,s),a=o+s;return o>=r&&o<=n||a>=r&&a<=n}function h(t,e,r,n,i,o,c){i=i||0,o=o||0;var u,h,d,f,p,m=l([r,n]);function g(t,e){return[t*Math.cos(e)+i,o-t*Math.sin(e)]}m?(u=0,h=a,d=s):r=i&&t<=o);var i,o},pathArc:function(t,e,r,n,i){return h(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return h(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,o){return h(t,e,r,n,i,o,1)}}},98507:(t,e,r)=>{"use strict";var n=r(44514).decode,i=r(12517),o=Array.isArray,a=ArrayBuffer,s=DataView;function l(t){return a.isView(t)&&!(t instanceof s)}function c(t){return o(t)||l(t)}e.isTypedArray=l,e.isArrayOrTypedArray=c,e.isArray1D=function(t){return!c(t[0])},e.ensureArray=function(t,e){return o(t)||(t=[]),t.length=e,t};var u={u1c:"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,i1:"undefined"==typeof Int8Array?void 0:Int8Array,u1:"undefined"==typeof Uint8Array?void 0:Uint8Array,i2:"undefined"==typeof Int16Array?void 0:Int16Array,u2:"undefined"==typeof Uint16Array?void 0:Uint16Array,i4:"undefined"==typeof Int32Array?void 0:Int32Array,u4:"undefined"==typeof Uint32Array?void 0:Uint32Array,f4:"undefined"==typeof Float32Array?void 0:Float32Array,f8:"undefined"==typeof Float64Array?void 0:Float64Array};function h(t){return t.constructor===ArrayBuffer}function d(t,e,r){if(c(t)){if(c(t[0])){for(var n=r,i=0;i{"use strict";var n=r(7370),i=r(32994).BADNUM,o=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;t.exports=function(t){return"string"==typeof t&&(t=t.replace(o,"")),n(t)?Number(t):i}},86748:t=>{"use strict";t.exports=function(t){var e=t._fullLayout;e._glcanvas&&e._glcanvas.size()&&e._glcanvas.each((function(t){t.regl&&t.regl.clear({color:!0,depth:!0})}))}},11704:t=>{"use strict";t.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}},5365:(t,e,r)=>{"use strict";var n=r(7370),i=r(18106),o=r(98260).extendFlat,a=r(3520),s=r(78920),l=r(17499),c=r(11891).DESELECTDIM,u=r(91355),h=r(46233).counter,d=r(31918).modHalf,f=r(98507).isArrayOrTypedArray,p=r(98507).isTypedArraySpec,m=r(98507).decodeTypedArraySpec;function g(t,r){var n=e.valObjectMeta[r.valType];if(r.arrayOk&&f(t))return!0;if(n.validateFunction)return n.validateFunction(t,r);var i={},o=i,a={set:function(t){o=t}};return n.coerceFunction(t,a,i,r),o!==i}e.valObjectMeta={data_array:{description:["An {array} of data.","The value must represent an {array} or it will be ignored,","but this array can be provided in several forms:","(1) a regular {array} object","(2) a typed array (e.g. Float32Array)","(3) an object with keys dtype, bdata, and optionally shape.","In this 3rd form, dtype is one of","*f8*, *f4*.","*i4*, *u4*,","*i2*, *u2*,","*i1*, *u1* or *u1c* for Uint8ClampedArray.","In addition to shorthand `dtype` above one could also use the following forms:","*float64*, *float32*,","*int32*, *uint32*,","*int16*, *uint16*,","*int8*, *uint8* or *uint8c* for Uint8ClampedArray.","`bdata` is either a base64-encoded string or the ArrayBuffer of","an integer or float typed array.","For either multi-dimensional arrays you must also","provide its dimensions separated by comma via `shape`.","For example using `dtype`: *f4* and `shape`: *5,100* you can","declare a 2-D array that has 5 rows and 100 columns","containing float32 values i.e. 4 bits per value.","`shape` is optional for one dimensional arrays."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(t,e,r){e.set(f(t)?t:p(t)?m(t):r)}},enumerated:{description:["Enumerated value type. The available values are listed","in `values`."].join(" "),requiredOpts:["values"],otherOpts:["dflt","coerceNumber","arrayOk"],coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),-1===n.values.indexOf(t)?e.set(r):e.set(t)},validateFunction:function(t,e){e.coerceNumber&&(t=+t);for(var r=e.values,n=0;ni.max?e.set(r):e.set(+t)}},integer:{description:["An integer or an integer inside a string.","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk","extras"],coerceFunction:function(t,e,r,i){-1===(i.extras||[]).indexOf(t)?(p(t)&&(t=m(t)),t%1||!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)):e.set(t)}},string:{description:["A string value.","Numbers are converted to strings except for attributes with","`strict` set to true."].join(" "),requiredOpts:[],otherOpts:["dflt","noBlank","strict","arrayOk","values"],coerceFunction:function(t,e,r,n){if("string"!=typeof t){var i="number"==typeof t;!0!==n.strict&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{description:["A string describing color.","Supported formats:","- hex (e.g. '#d3d3d3')","- rgb (e.g. 'rgb(255, 0, 0)')","- rgba (e.g. 'rgb(255, 0, 0, 0.5)')","- hsl (e.g. 'hsl(0, 100%, 50%)')","- hsv (e.g. 'hsv(0, 100%, 100%)')","- named colors (full list: http://www.w3.org/TR/css3-color/#svg-color)"].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(t,e,r){p(t)&&(t=m(t)),i(t).isValid()?e.set(t):e.set(r)}},colorlist:{description:["A list of colors.","Must be an {array} containing valid colors."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every((function(t){return i(t).isValid()}))?e.set(t):e.set(r)}},colorscale:{description:["A Plotly colorscale either picked by a name:","(any of",Object.keys(s.scales).join(", "),")","customized as an {array} of 2-element {arrays} where","the first element is the normalized color level value","(starting at *0* and ending at *1*),","and the second item is a valid color string."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(t,e,r){e.set(s.get(t,r))}},angle:{description:["A number (in degree) between -180 and 180."].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(t,e,r){p(t)&&(t=m(t)),"auto"===t?e.set("auto"):n(t)?e.set(d(+t,360)):e.set(r)}},subplotid:{description:["An id string of a subplot type (given by dflt), optionally","followed by an integer >1. e.g. if dflt='geo', we can have","'geo', 'geo2', 'geo3', ..."].join(" "),requiredOpts:["dflt"],otherOpts:["regex"],coerceFunction:function(t,e,r,n){var i=n.regex||h(r);"string"==typeof t&&i.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||"string"==typeof t&&!!h(r).test(t)}},flaglist:{description:["A string representing a combination of flags","(order does not matter here).","Combine any of the available `flags` with *+*.","(e.g. ('lines+markers')).","Values in `extras` cannot be combined."].join(" "),requiredOpts:["flags"],otherOpts:["dflt","extras","arrayOk"],coerceFunction:function(t,e,r,n){if(-1===(n.extras||[]).indexOf(t))if("string"==typeof t){for(var i=t.split("+"),o=0;o{"use strict";var n,i,o=r(79969).DC,a=r(7370),s=r(64347),l=r(31918).mod,c=r(32994),u=c.BADNUM,h=c.ONEDAY,d=c.ONEHOUR,f=c.ONEMIN,p=c.ONESEC,m=c.EPOCHJD,g=r(25059),v=r(79969).aL,b=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,y=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,x=(new Date).getFullYear()-70;function _(t){return t&&g.componentsRegistry.calendars&&"string"==typeof t&&"gregorian"!==t}function w(t,e){return String(t+Math.pow(10,e)).substr(1)}e.dateTick0=function(t,r){var n=function(t,e){return _(t)?e?g.getComponentMethod("calendars","CANONICAL_SUNDAY")[t]:g.getComponentMethod("calendars","CANONICAL_TICK")[t]:e?"2000-01-02":"2000-01-01"}(t,!!r);if(r<2)return n;var i=e.dateTime2ms(n,t);return i+=h*(r-1),e.ms2DateTime(i,0,t)},e.dfltRange=function(t){return _(t)?g.getComponentMethod("calendars","DFLTRANGE")[t]:["2000-01-01","2001-01-01"]},e.isJSDate=function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.getTime},e.dateTime2ms=function(t,r){if(e.isJSDate(t)){var o=t.getTimezoneOffset()*f,a=(t.getUTCMinutes()-t.getMinutes())*f+(t.getUTCSeconds()-t.getSeconds())*p+(t.getUTCMilliseconds()-t.getMilliseconds());if(a){var s=3*f;o=o-s/2+l(a-o+s/2,s)}return(t=Number(t)-o)>=n&&t<=i?t:u}if("string"!=typeof t&&"number"!=typeof t)return u;t=String(t);var c=_(r),v=t.charAt(0);!c||"G"!==v&&"g"!==v||(t=t.substr(1),r="");var w=c&&"chinese"===r.substr(0,7),k=t.match(w?y:b);if(!k)return u;var A=k[1],M=k[3]||"1",T=Number(k[5]||1),S=Number(k[7]||0),C=Number(k[9]||0),E=Number(k[11]||0);if(c){if(2===A.length)return u;var L;A=Number(A);try{var z=g.getComponentMethod("calendars","getCal")(r);if(w){var O="i"===M.charAt(M.length-1);M=parseInt(M,10),L=z.newDate(A,z.toMonthIndex(A,M,O),T)}else L=z.newDate(A,Number(M),T)}catch(t){return u}return L?(L.toJD()-m)*h+S*d+C*f+E*p:u}A=2===A.length?(Number(A)+2e3-x)%100+x:Number(A),M-=1;var D=new Date(Date.UTC(2e3,M,T,S,C));return D.setUTCFullYear(A),D.getUTCMonth()!==M||D.getUTCDate()!==T?u:D.getTime()+E*p},n=e.MIN_MS=e.dateTime2ms("-9999"),i=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(t,r){return e.dateTime2ms(t,r)!==u};var k=90*h,A=3*d,M=5*f;function T(t,e,r,n,i){if((e||r||n||i)&&(t+=" "+w(e,2)+":"+w(r,2),(n||i)&&(t+=":"+w(n,2),i))){for(var o=4;i%10==0;)o-=1,i/=10;t+="."+w(i,o)}return t}e.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=n&&t<=i))return u;e||(e=0);var o,a,s,c,b,y,x=Math.floor(10*l(t+.05,1)),w=Math.round(t-x/10);if(_(r)){var S=Math.floor(w/h)+m,C=Math.floor(l(t,h));try{o=g.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(t){o=v("G%Y-%m-%d")(new Date(w))}if("-"===o.charAt(0))for(;o.length<11;)o="-0"+o.substr(1);else for(;o.length<10;)o="0"+o;a=e=n+h&&t<=i-h))return u;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return T(o("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},e.cleanDate=function(t,r,n){if(t===u)return r;if(e.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(_(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",t),r;if(!(t=e.ms2DateTimeLocal(+t))&&void 0!==r)return r}else if(!e.isDateTime(t,n))return s.error("unrecognized date",t),r;return t};var S=/%\d?f/g,C=/%h/g,E={1:"1",2:"1",3:"2",4:"2"};function L(t,e,r,n){t=t.replace(S,(function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(e+.05));if(t=t.replace(C,(function(){return E[r("%q")(i)]})),_(n))try{t=g.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(i)}var z=[59,59.9,59.99,59.999,59.9999];e.formatDate=function(t,e,r,n,i,o){if(i=_(i)&&i,!e)if("y"===r)e=o.year;else if("m"===r)e=o.month;else{if("d"!==r)return function(t,e){var r=l(t+.05,h),n=w(Math.floor(r/d),2)+":"+w(l(Math.floor(r/f),60),2);if("M"!==e){a(e)||(e=0);var i=(100+Math.min(l(t/p,60),z[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(t,r)+"\n"+L(o.dayMonthYear,t,n,i);e=o.dayMonth+"\n"+o.year}return L(e,t,n,i)};var O=3*h;e.incrementMonth=function(t,e,r){r=_(r)&&r;var n=l(t,h);if(t=Math.round(t-n),r)try{var i=Math.round(t/h)+m,o=g.getComponentMethod("calendars","getCal")(r),a=o.fromJD(i);return e%12?o.add(a,e,"m"):o.add(a,e/12,"y"),(a.toJD()-m)*h+n}catch(e){s.error("invalid ms "+t+" in calendar "+r)}var c=new Date(t+O);return c.setUTCMonth(c.getUTCMonth()+e)+n-O},e.findExactDates=function(t,e){for(var r,n,i=0,o=0,s=0,l=0,c=_(e)&&g.getComponentMethod("calendars","getCal")(e),u=0;u{"use strict";var n=r(27941),i=r(64347),o=r(75717),a=r(79538);function s(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function l(t,e,r){var n="plotly.js-style-"+t,o=document.getElementById(n);o||((o=document.createElement("style")).setAttribute("id",n),o.appendChild(document.createTextNode("")),document.head.appendChild(o));var a=o.sheet;a.insertRule?a.insertRule(e+"{"+r+"}",0):a.addRule?a.addRule(e,r,0):i.warn("addStyleRule failed")}function c(t){var e=window.getComputedStyle(t,null),r=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform");return"none"===r?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map((function(t){return+t}))}function u(t){for(var e=[];h(t);)e.push(t),t=t.parentNode,"function"==typeof ShadowRoot&&t instanceof ShadowRoot&&(t=t.host);return e}function h(t){return t&&(t instanceof Element||t instanceof HTMLElement)}t.exports={getGraphDiv:function(t){var e;if("string"==typeof t){if(null===(e=document.getElementById(t)))throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null==t)throw new Error("DOM element provided is null or undefined");return t},isPlotDiv:function(t){var e=n.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")},removeElement:s,addStyleRule:function(t,e){l("global",t,e)},addRelatedStyleRule:l,deleteRelatedStyleRule:function(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&s(r)},getFullTransformMatrix:function(t){var e=u(t),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.forEach((function(t){var e=c(t);if(e){var n=o.convertCssMatrix(e);r=a.multiply(r,r,n)}})),r},getElementTransformMatrix:c,getElementAndAncestors:u,equalDomRects:function(t,e){return t&&e&&t.top===e.top&&t.left===e.left&&t.right===e.right&&t.bottom===e.bottom}}},16677:(t,e,r)=>{"use strict";var n=r(86626).EventEmitter,i={init:function(t){if(t._ev instanceof n)return t;var e=new n,r=new n;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(n,i){"undefined"!=typeof jQuery&&jQuery(t).trigger(n,i),e.emit(n,i),r.emit(n,i)},t},triggerHandler:function(t,e,r){var n,i;"undefined"!=typeof jQuery&&(n=jQuery(t).triggerHandler(e,r));var o=t._ev;if(!o)return n;var a,s=o._events[e];if(!s)return n;function l(t){return t.listener?(o.removeListener(e,t.listener),t.fired?void 0:(t.fired=!0,t.listener.apply(o,[r]))):t.apply(o,[r])}for(s=Array.isArray(s)?s:[s],a=0;a{"use strict";var n=r(12517),i=Array.isArray;function o(t,e,r,a){var s,l,c,u,h,d,f,p=t[0],m=t.length;if(2===m&&i(p)&&i(t[1])&&0===p.length){if(f=function(t,e){var r,n;for(r=0;r{"use strict";t.exports=function(t){for(var e={},r=[],n=0,i=0;i{"use strict";function e(t){return!0===t.visible}function r(t){var e=t[0].trace;return!0===e.visible&&0!==e._length}t.exports=function(t){for(var n,i=(n=t,Array.isArray(n)&&Array.isArray(n[0])&&n[0][0]&&n[0][0].trace?r:e),o=[],a=0;a{"use strict";var n,i,o,a=r(31918).mod;function s(t,e,r,n,i,o,a,s){var l=r-t,c=i-t,u=a-i,h=n-e,d=o-e,f=s-o,p=l*f-u*h;if(0===p)return null;var m=(c*f-u*d)/p,g=(c*h-l*d)/p;return g<0||g>1||m<0||m>1?null:{x:t+l*m,y:e+h*m}}function l(t,e,r,n,i){var o=n*t+i*e;if(o<0)return n*n+i*i;if(o>r){var a=n-t,s=i-e;return a*a+s*s}var l=n*e-i*t;return l*l/r}e.segmentsIntersect=s,e.segmentDistance=function(t,e,r,n,i,o,a,c){if(s(t,e,r,n,i,o,a,c))return 0;var u=r-t,h=n-e,d=a-i,f=c-o,p=u*u+h*h,m=d*d+f*f,g=Math.min(l(u,h,p,i-t,o-e),l(u,h,p,a-t,c-e),l(d,f,m,t-i,e-o),l(d,f,m,r-i,n-o));return Math.sqrt(g)},e.getTextLocation=function(t,e,r,s){if(t===i&&s===o||(n={},i=t,o=s),n[r])return n[r];var l=t.getPointAtLength(a(r-s/2,e)),c=t.getPointAtLength(a(r+s/2,e)),u=Math.atan((c.y-l.y)/(c.x-l.x)),h=t.getPointAtLength(a(r,e)),d={x:(4*h.x+l.x+c.x)/6,y:(4*h.y+l.y+c.y)/6,theta:u};return n[r]=d,d},e.clearLocationCache=function(){i=null},e.getVisibleSegment=function(t,e,r){var n,i,o=e.left,a=e.right,s=e.top,l=e.bottom,c=0,u=t.getTotalLength(),h=u;function d(e){var r=t.getPointAtLength(e);0===e?n=r:e===u&&(i=r);var c=r.xa?r.x-a:0,h=r.yl?r.y-l:0;return Math.sqrt(c*c+h*h)}for(var f=d(c);f;){if((c+=f+r)>h)return;f=d(c)}for(f=d(h);f;){if(c>(h-=f+r))return;f=d(h)}return{min:c,max:h,len:h-c,total:u,isClosed:0===c&&h===u&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},e.findPointOnPath=function(t,e,r,n){for(var i,o,a,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,h=0,d=0,f=s;h0?f=i:d=i,h++}return o}},25069:(t,e,r)=>{"use strict";var n=r(7370),i=r(18106),o=r(34463),a=r(80755),s=r(84226).defaultLine,l=r(98507).isArrayOrTypedArray,c=o(s);function u(t,e){var r=t;return r[3]*=e,r}function h(t){if(n(t))return c;var e=o(t);return e.length?e:c}function d(t){return n(t)?t:1}t.exports={formatColor:function(t,e,r){var n=t.color;n&&n._inputArray&&(n=n._inputArray);var i,s,f,p,m,g=l(n),v=l(e),b=a.extractOpts(t),y=[];if(i=void 0!==b.colorscale?a.makeColorScaleFuncFromTrace(t):h,s=g?function(t,e){return void 0===t[e]?c:o(i(t[e]))}:h,f=v?function(t,e){return void 0===t[e]?1:d(t[e])}:d,g||v)for(var x=0;x{"use strict";t.exports=function(t){return t}},98803:t=>{"use strict";t.exports=function(t,e){if(!e)return t;var r=1/Math.abs(e),n=r>1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var o=String(e).length;if(i>=String(t).length+o){var a=parseFloat(n).toPrecision(12);-1===a.indexOf("e+")&&(n=+a)}}return n}},12822:(t,e,r)=>{"use strict";var n=r(27941),i=r(79969).aL,o=r(31830).GP,a=r(7370),s=r(32994),l=s.FP_SAFE,c=-l,u=s.BADNUM,h=t.exports={};h.adjustFormat=function(t){return!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t)?t:"0.f"===t?"~f":/^\d%/.test(t)?"~%":/^\ds/.test(t)?"~s":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?"~"+t:t};var d={};h.warnBadFormat=function(t){var e=String(t);d[e]||(d[e]=1,h.warn('encountered bad format: "'+e+'"'))},h.noFormat=function(t){return String(t)},h.numberFormat=function(t){var e;try{e=o(h.adjustFormat(t))}catch(e){return h.warnBadFormat(t),h.noFormat}return e},h.nestedProperty=r(91355),h.keyedContainer=r(68588),h.relativeAttr=r(21904),h.isPlainObject=r(12517),h.toLogRange=r(61814),h.relinkPrivateKeys=r(45905);var f=r(98507);h.isArrayBuffer=f.isArrayBuffer,h.isTypedArray=f.isTypedArray,h.isArrayOrTypedArray=f.isArrayOrTypedArray,h.isArray1D=f.isArray1D,h.ensureArray=f.ensureArray,h.concat=f.concat,h.maxRowLength=f.maxRowLength,h.minRowLength=f.minRowLength;var p=r(31918);h.mod=p.mod,h.modHalf=p.modHalf;var m=r(5365);h.valObjectMeta=m.valObjectMeta,h.coerce=m.coerce,h.coerce2=m.coerce2,h.coerceFont=m.coerceFont,h.coercePattern=m.coercePattern,h.coerceHoverinfo=m.coerceHoverinfo,h.coerceSelectionMarkerOpacity=m.coerceSelectionMarkerOpacity,h.validate=m.validate;var g=r(41095);h.dateTime2ms=g.dateTime2ms,h.isDateTime=g.isDateTime,h.ms2DateTime=g.ms2DateTime,h.ms2DateTimeLocal=g.ms2DateTimeLocal,h.cleanDate=g.cleanDate,h.isJSDate=g.isJSDate,h.formatDate=g.formatDate,h.incrementMonth=g.incrementMonth,h.dateTick0=g.dateTick0,h.dfltRange=g.dfltRange,h.findExactDates=g.findExactDates,h.MIN_MS=g.MIN_MS,h.MAX_MS=g.MAX_MS;var v=r(45380);h.findBin=v.findBin,h.sorterAsc=v.sorterAsc,h.sorterDes=v.sorterDes,h.distinctVals=v.distinctVals,h.roundUp=v.roundUp,h.sort=v.sort,h.findIndexOfMin=v.findIndexOfMin,h.sortObjectKeys=r(54747);var b=r(6749);h.aggNums=b.aggNums,h.len=b.len,h.mean=b.mean,h.geometricMean=b.geometricMean,h.median=b.median,h.midRange=b.midRange,h.variance=b.variance,h.stdev=b.stdev,h.interp=b.interp;var y=r(75717);h.init2dArray=y.init2dArray,h.transposeRagged=y.transposeRagged,h.dot=y.dot,h.translationMatrix=y.translationMatrix,h.rotationMatrix=y.rotationMatrix,h.rotationXYMatrix=y.rotationXYMatrix,h.apply3DTransform=y.apply3DTransform,h.apply2DTransform=y.apply2DTransform,h.apply2DTransform2=y.apply2DTransform2,h.convertCssMatrix=y.convertCssMatrix,h.inverseTransformMatrix=y.inverseTransformMatrix;var x=r(59804);h.deg2rad=x.deg2rad,h.rad2deg=x.rad2deg,h.angleDelta=x.angleDelta,h.angleDist=x.angleDist,h.isFullCircle=x.isFullCircle,h.isAngleInsideSector=x.isAngleInsideSector,h.isPtInsideSector=x.isPtInsideSector,h.pathArc=x.pathArc,h.pathSector=x.pathSector,h.pathAnnulus=x.pathAnnulus;var _=r(66379);h.isLeftAnchor=_.isLeftAnchor,h.isCenterAnchor=_.isCenterAnchor,h.isRightAnchor=_.isRightAnchor,h.isTopAnchor=_.isTopAnchor,h.isMiddleAnchor=_.isMiddleAnchor,h.isBottomAnchor=_.isBottomAnchor;var w=r(8994);h.segmentsIntersect=w.segmentsIntersect,h.segmentDistance=w.segmentDistance,h.getTextLocation=w.getTextLocation,h.clearLocationCache=w.clearLocationCache,h.getVisibleSegment=w.getVisibleSegment,h.findPointOnPath=w.findPointOnPath;var k=r(98260);h.extendFlat=k.extendFlat,h.extendDeep=k.extendDeep,h.extendDeepAll=k.extendDeepAll,h.extendDeepNoArrays=k.extendDeepNoArrays;var A=r(64347);h.log=A.log,h.warn=A.warn,h.error=A.error;var M=r(46233);h.counterRegex=M.counter;var T=r(76324);h.throttle=T.throttle,h.throttleDone=T.done,h.clearThrottle=T.clear;var S=r(16822);function C(t){var e={};for(var r in t)for(var n=t[r],i=0;il||t=e)&&a(t)&&t>=0&&t%1==0},h.noop=r(51648),h.identity=r(75250),h.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},h.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},h.simpleMap=function(t,e,r,n,i){for(var o=t.length,a=new Array(o),s=0;s=Math.pow(2,r)?i>10?(h.warn("randstr failed uniqueness"),l):t(e,r,n,(i||0)+1):l},h.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},h.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,o,a=t.length,s=2*a,l=2*e-1,c=new Array(l),u=new Array(a);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=a&&(i=s-1-i),o+=t[i]*c[n];u[r]=o}return u},h.syncOrAsync=function(t,e,r){var n;function i(){return h.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},h.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},h.noneOrAll=function(t,e,r){if(t){var n,i=!1,o=!0;for(n=0;n0?e:0}))},h.fillArray=function(t,e,r,n){if(n=n||h.identity,h.isArrayOrTypedArray(t))for(var i=0;i1?i+a[1]:"";if(o&&(a.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+o+"$2");return s+l},h.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var F=/^\w*$/;h.templateString=function(t,e){var r={};return t.replace(h.TEMPLATE_STRING_REGEX,(function(t,n){var i;return F.test(n)?i=e[n]:(r[n]=r[n]||h.nestedProperty(e,n).get,i=r[n]()),h.isValidTextValue(i)?i:""}))};var R={max:10,count:0,name:"hovertemplate"};h.hovertemplateString=function(){return U.apply(R,arguments)};var P={max:10,count:0,name:"texttemplate"};h.texttemplateString=function(){return U.apply(P,arguments)};var j=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,N={max:10,count:0,name:"texttemplate",parseMultDiv:!0};h.texttemplateStringForShapes=function(){return U.apply(N,arguments)};var B=/^[:|\|]/;function U(t,e,r){var n=this,o=arguments;e||(e={});var a={};return t.replace(h.TEMPLATE_STRING_REGEX,(function(t,s,l){var c="_xother"===s||"_yother"===s,u="_xother_"===s||"_yother_"===s,d="xother_"===s||"yother_"===s,f="xother"===s||"yother"===s||c||d||u,p=s;(c||u)&&(p=p.substring(1)),(d||u)&&(p=p.substring(0,p.length-1));var m,g,v,b=null,y=null;if(n.parseMultDiv){var x=function(t){var e=t.match(j);return e?{key:e[1],op:e[2],number:Number(e[3])}:{key:t,op:null,number:null}}(p);p=x.key,b=x.op,y=x.number}if(f){if(void 0===(m=e[p]))return""}else for(v=3;v=48&&a<=57,c=s>=48&&s<=57;if(l&&(n=10*n+a-48),c&&(i=10*i+s-48),!l||!c){if(n!==i)return n-i;if(a!==s)return a-s}}return i-n};var G=2e9;h.seedPseudoRandom=function(){G=2e9},h.pseudoRandom=function(){var t=G;return G=(69069*G+1)%4294967296,Math.abs(G-t)<429496729?h.pseudoRandom():G/4294967296},h.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=h.extractOption(t,e,"htx","hovertext");if(h.isValidTextValue(i))return n(i);var o=h.extractOption(t,e,"tx","text");return h.isValidTextValue(o)?n(o):void 0},h.isValidTextValue=function(t){return t||0===t},h.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+"%",n=0;n1&&(c=1):c=0,h.strTranslate(i-c*(r+a),o-c*(n+s))+h.strScale(c)+(l?"rotate("+l+(e?"":" "+r+" "+n)+")":"")},h.setTransormAndDisplay=function(t,e){t.attr("transform",h.getTextTransform(e)),t.style("display",e.scale?null:"none")},h.ensureUniformFontSize=function(t,e){var r=h.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},h.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)},h.bigFont=function(t){return Math.round(1.2*t)};var V=h.getFirefoxVersion(),H=null!==V&&V<86;h.getPositionFromD3Event=function(){return H?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},12517:t=>{"use strict";t.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}},68588:(t,e,r)=>{"use strict";var n=r(91355),i=/^\w*$/;t.exports=function(t,e,r,o){var a,s,l;r=r||"name",o=o||"value";var c={};e&&e.length?(l=n(t,e),s=l.get()):s=t,e=e||"";var u={};if(s)for(a=0;a2)return c[e]=2|c[e],d.set(t,null);if(h){for(a=e;a{"use strict";var n=r(25059);t.exports=function(t,e){for(var r=t._context.locale,i=0;i<2;i++){for(var o=t._context.locales,a=0;a<2;a++){var s=(o[r]||{}).dictionary;if(s){var l=s[e];if(l)return l}o=n.localeRegistry}var c=r.split("-")[0];if(c===r)break;r=c}return e}},64347:(t,e,r)=>{"use strict";var n=r(58389).dfltConfig,i=r(39382),o=t.exports={};o.log=function(){var t;if(n.logging>1){var e=["LOG:"];for(t=0;t1){var r=[];for(t=0;t"),"long")}},o.warn=function(){var t;if(n.logging>0){var e=["WARN:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}},o.error=function(){var t;if(n.logging>0){var e=["ERROR:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}}},51915:(t,e,r)=>{"use strict";var n=r(27941);t.exports=function(t,e,r){var i=t.selectAll("g."+r.replace(/\s/g,".")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",r),i.order();var o=t.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(t){t[0][o]=n.select(this)})),i}},75717:(t,e,r)=>{"use strict";var n=r(79538);e.init2dArray=function(t,e){for(var r=new Array(t),n=0;n{"use strict";t.exports={mod:function(t,e){var r=t%e;return r<0?r+e:r},modHalf:function(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}}},91355:(t,e,r)=>{"use strict";var n=r(7370),i=r(98507).isArrayOrTypedArray;function o(t,e){return function(){var r,n,a,s,l,c=t;for(s=0;s{"use strict";t.exports=function(){}},39382:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=[];t.exports=function(t,e){if(-1===o.indexOf(t)){o.push(t);var r=1e3;i(e)?r=e:"long"===e&&(r=3e3);var a=n.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0),a.selectAll(".notifier-note").data(o).enter().append("div").classed("notifier-note",!0).style("opacity",0).each((function(t){var i=n.select(this);i.append("button").classed("notifier-close",!0).html("×").on("click",(function(){i.transition().call(s)}));for(var o=i.append("p"),a=t.split(//g),l=0;l{"use strict";var n=r(76292),i="data-savedcursor";t.exports=function(t,e){var r=t.attr(i);if(e){if(!r){for(var o=(t.attr("class")||"").split(" "),a=0;a{"use strict";var n=r(75717).dot,i=r(32994).BADNUM,o=t.exports={};o.tester=function(t){var e,r=t.slice(),n=r[0][0],o=n,a=r[0][1],s=a;for(r[r.length-1][0]===r[0][0]&&r[r.length-1][1]===r[0][1]||r.push(r[0]),e=1;eo||c===i||cs||e&&l(t))}:function(t,e){var l=t[0],c=t[1];if(l===i||lo||c===i||cs)return!1;var u,h,d,f,p,m=r.length,g=r[0][0],v=r[0][1],b=0;for(u=1;uMath.max(h,g)||c>Math.max(d,v)))if(cu||Math.abs(n(a,d))>i)return!0;return!1},o.filter=function(t,e){var r=[t[0]],n=0,i=0;function a(a){t.push(a);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c1&&a(t.pop()),{addPt:a,raw:t,filtered:r}}},41246:(t,e,r)=>{"use strict";var n=r(91203),i=r(83029);t.exports=function(t,e,o){var a=t._fullLayout,s=!0;return a._glcanvas.each((function(n){if(n.regl)n.regl.preloadCachedCode(o);else if(!n.pick||a._has("parcoords")){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.g.devicePixelRatio,extensions:e||[],cachedCode:o||{}})}catch(t){s=!1}n.regl||(s=!1),s&&this.addEventListener("webglcontextlost",(function(e){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:e,layer:n.key})}),!1)}})),s||n({container:a._glcontainer.node()}),s}},31406:(t,e,r)=>{"use strict";var n=r(7370),i=r(12431);t.exports=function(t){var e;if("string"!=typeof(e=t&&t.hasOwnProperty("userAgent")?t.userAgent:function(){var t;return"undefined"!=typeof navigator&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),t}()))return!0;var r=i({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!r)for(var o=e.split(" "),a=1;a-1;s--){var l=o[s];if("Version/"===l.substr(0,8)){var c=l.substr(8).split(".")[0];if(n(c)&&(c=+c),c>=13)return!0}}return r}},65280:t=>{"use strict";t.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;n{"use strict";var n=r(12822),i=r(58389).dfltConfig,o={add:function(t,e,r,n,o){var a,s;t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},s=t.undoQueue.index,t.autoplay?t.undoQueue.inSequence||(t.autoplay=!1):(!t.undoQueue.sequence||t.undoQueue.beginSequence?(a={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(s,t.undoQueue.queue.length-s,a),t.undoQueue.index+=1):a=t.undoQueue.queue[s-1],t.undoQueue.beginSequence=!1,a&&(a.undo.calls.unshift(e),a.undo.args.unshift(r),a.redo.calls.push(n),a.redo.args.push(o)),t.undoQueue.queue.length>i.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r{"use strict";e.counter=function(t,e,r,n){var i=(e||"")+(r?"":"$"),o=!1===n?"":"^";return"xy"===t?new RegExp(o+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(o+t+"([2-9]|[1-9][0-9]+)?"+i)}},21904:t=>{"use strict";var e=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,r=/^[^\.\[\]]+$/;t.exports=function(t,n){for(;n;){var i=t.match(e);if(i)t=i[1];else{if(!t.match(r))throw new Error("bad relativeAttr call:"+[t,n]);t=""}if("^"!==n.charAt(0))break;n=n.slice(1)}return t&&"["!==n.charAt(0)?t+"."+n:t+n}},45905:(t,e,r)=>{"use strict";var n=r(98507).isArrayOrTypedArray,i=r(12517);t.exports=function t(e,r){for(var o in r){var a=r[o],s=e[o];if(s!==a)if("_"===o.charAt(0)||"function"==typeof a){if(o in e)continue;e[o]=a}else if(n(a)&&n(s)&&i(a[0])){if("customdata"===o||"ids"===o)continue;for(var l=Math.min(a.length,s.length),c=0;c{"use strict";var n=r(7370),i=r(64347),o=r(75250),a=r(32994).BADNUM,s=1e-9;function l(t,e){return te}function h(t,e){return t>=e}e.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-s)-1:Math.floor((t-e.start)/e.size+s);var o,a,d=0,f=e.length,p=0,m=f>1?(e[f-1]-e[0])/(f-1):1;for(a=m>=0?r?l:c:r?h:u,t+=m*s*(r?-1:1)*(m>=0?1:-1);d90&&i.log("Long binary search..."),d-1},e.sorterAsc=function(t,e){return t-e},e.sorterDes=function(t,e){return e-t},e.distinctVals=function(t){var r,n=t.slice();for(n.sort(e.sorterAsc),r=n.length-1;r>-1&&n[r]===a;r--);for(var i,o=n[r]-n[0]||1,s=o/(r||1)/1e4,l=[],c=0;c<=r;c++){var u=n[c],h=u-i;void 0===i?(l.push(u),i=u):h>s&&(o=Math.min(o,h),l.push(u),i=u)}return{vals:l,minDiff:o}},e.roundUp=function(t,e,r){for(var n,i=0,o=e.length-1,a=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;i0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},e.findIndexOfMin=function(t,e){e=e||o;for(var r,n=1/0,i=0;i{"use strict";t.exports=function(t,e){(t.attr("class")||"").split(" ").forEach((function(e){0===e.indexOf("cursor-")&&t.classed(e,!1)})),e&&t.classed("cursor-"+e,!0)}},91203:(t,e,r)=>{"use strict";var n=r(17499),i=function(){};t.exports=function(t){for(var e in t)"function"==typeof t[e]&&(t[e]=i);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var r=document.createElement("div");r.className="no-webgl",r.style.cursor="pointer",r.style.fontSize="24px",r.style.color=n.defaults[0],r.style.position="absolute",r.style.left=r.style.top="0px",r.style.width=r.style.height="100%",r.style["background-color"]=n.lightLine,r.style["z-index"]=30;var o=document.createElement("p");return o.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",o.style.position="relative",o.style.top="50%",o.style.left="50%",o.style.height="30%",o.style.width="50%",o.style.margin="-15% 0 0 -25%",r.appendChild(o),t.container.appendChild(r),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}},54747:t=>{"use strict";t.exports=function(t){return Object.keys(t).sort()}},6749:(t,e,r)=>{"use strict";var n=r(7370),i=r(98507).isArrayOrTypedArray;e.aggNums=function(t,r,o,a){var s,l;if((!a||a>o.length)&&(a=o.length),n(r)||(r=!1),i(o[0])){for(l=new Array(a),s=0;st.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},17235:(t,e,r)=>{"use strict";var n=r(34463);t.exports=function(t){return t?n(t):[0,0,0,1]}},80394:(t,e,r)=>{"use strict";var n=r(27941),i=r(12822),o=i.strTranslate,a=r(25853),s=r(89701).LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;e.convertToTspans=function(t,r,g){var S=t.text(),C=!t.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!=typeof MathJax&&S.match(l),z=n.select(t.node().parentNode);if(!z.empty()){var O=t.attr("class")?t.attr("class").split(" ")[0]:"text";return O+="-math",z.selectAll("svg."+O).remove(),z.selectAll("g."+O+"-group").remove(),t.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),C?(r&&r._promises||[]).push(new Promise((function(e){t.style("display","none");var r=parseInt(t.node().style.fontSize,10),a={fontSize:r};!function(t,e,r){var o,a,s,l,d=parseInt((MathJax.version||"").split(".")[0]);if(2===d||3===d){var f=function(){var r="math-output-"+i.randstr({},64),o=(l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":e.fontSize+"px"}).text(t.replace(c,"\\lt ").replace(u,"\\gt "))).node();return 2===d?MathJax.Hub.Typeset(o):MathJax.typeset([o])},p=function(){var e=l.select(2===d?".MathJax_SVG":".MathJax"),o=!e.empty()&&l.select("svg").node();if(o){var a,s=o.getBoundingClientRect();a=2===d?n.select("body").select("#MathJax_SVG_glyphs"):e.select("defs"),r(e,a,s)}else i.log("There was an error in the tex syntax.",t),r();l.remove()};2===d?MathJax.Hub.Queue((function(){return a=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:h},displayAlign:"left"})}),(function(){if("SVG"!==(o=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),f,p,(function(){if("SVG"!==o)return MathJax.Hub.setRenderer(o)}),(function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(a)})):3===d&&(a=i.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=h,"svg"!==(o=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){f(),p(),"svg"!==o&&(MathJax.config.startup.output=o),MathJax.config=a})))}else i.warn("No MathJax version:",MathJax.version)}(C[2],a,(function(n,i,a){z.selectAll("svg."+O).remove(),z.selectAll("g."+O+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node())return D(),void e();var l=z.append("g").classed(O+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var c=a.width,u=a.height;s.attr({class:O,height:u,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var h=t.node().style.fill||"black",d=s.select("g");d.attr({fill:h,stroke:h});var f=d.node().getBoundingClientRect(),p=f.width,m=f.height;(p>c||m>u)&&(s.style("overflow","hidden"),p=(f=s.node().getBoundingClientRect()).width,m=f.height);var v=+t.attr("x"),b=+t.attr("y"),y=-(r||t.node().getBoundingClientRect().height)/4;if("y"===O[0])l.attr({transform:"rotate("+[-90,v,b]+")"+o(-p/2,y-m/2)});else if("l"===O[0])b=y-m/2;else if("a"===O[0]&&0!==O.indexOf("atitle"))v=0,b=y;else{var x=t.attr("text-anchor");v-=p*("middle"===x?.5:"end"===x?1:0),b=b+y-m/2}s.attr({x:v,y:b}),g&&g.call(t,l),e(l)}))}))):D(),t}function D(){z.empty()||(O=t.attr("class")+"-math",z.select("svg."+O).remove()),t.text("").style("white-space","pre");var r=function(t,e){e=e.replace(v," ");var r,o=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(a.svg,"tspan");n.select(e).attr({class:"line",dy:c*s+"em"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var o=1;o doesnt match end tag <"+t+">. Pretending it did match.",e),r=l[l.length-1].node}else i.log("Ignoring unexpected end tag .",e)}x.test(e)?u():(r=t,l=[{node:t}]);for(var C=e.split(b),z=0;z|>|>)/g,h=[["$","$"],["\\(","\\)"]],d={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},f={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},m="​",g=["http:","https:","mailto:","",void 0,":"],v=e.NEWLINES=/(\r\n?|\n)/g,b=/(<[^<>]*>)/,y=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=//i;e.BR_TAG_ALL=//gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,w=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,k=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,A=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function M(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&E(n)}var T=/(^|;)\s*color:/;e.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:["br"],i=t.split(b),o=[],a="",s=0,l=0;l3?o.push(c.substr(0,f-3)+"..."):o.push(c.substr(0,f));break}a=""}}return o.join("")};var S={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},C=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(t){return t.replace(C,(function(t,e){return("#"===e.charAt(0)?function(t){if(!(t>1114111)){var e=String.fromCodePoint;if(e)return e(t);var r=String.fromCharCode;return t<=65535?r(t):r(55232+(t>>10),t%1024+56320)}}("x"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):S[e])||t}))}function L(t){var e=encodeURI(decodeURI(t)),r=document.createElement("a"),n=document.createElement("a");r.href=t,n.href=e;var i=r.protocol,o=n.protocol;return-1!==g.indexOf(i)&&-1!==g.indexOf(o)?e:""}function z(t,e,r){var n,o,a,s=r.horizontalAlign,l=r.verticalAlign||"top",c=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return o="bottom"===l?function(){return c.bottom-n.height}:"middle"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},a="right"===s?function(){return c.right-n.width}:"center"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var t=a()-u.left,e=o()-u.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+"px",left:t+"px","z-index":1e3}),this}}e.convertEntities=E,e.sanitizeHTML=function(t){t=t.replace(v," ");for(var e=document.createElement("p"),r=e,i=[],o=t.split(b),a=0;a{"use strict";var r={};function n(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}e.throttle=function(t,e,i){var o=r[t],a=Date.now();if(!o){for(var s in r)r[s].tso.ts+e?l():o.timer=setTimeout((function(){l(),o.timer=null}),e)},e.done=function(t){var e=r[t];return e&&e.timer?new Promise((function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}})):Promise.resolve()},e.clear=function(t){if(t)n(r[t]),delete r[t];else for(var i in r)e.clear(i)}},61814:(t,e,r)=>{"use strict";var n=r(7370);t.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},10701:t=>{"use strict";t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6048:t=>{"use strict";t.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{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"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},81776:(t,e,r)=>{"use strict";var n=r(25059);t.exports=function(t){for(var e,r,i=n.layoutArrayContainers,o=n.layoutArrayRegexes,a=t.split("[")[0],s=0;s{"use strict";var n=r(98260).extendFlat,i=r(12517),o={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"],description:["trace attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*clearAxisTypes* resets the types of the axes this trace is on, because new data could","cause the automatic axis type detection to change. Log type will not be cleared, as that","is never automatically chosen so must have been user-specified.","*plot* (re)plots but without first clearing `gd.calcdata`.","*style* only calls `module.style` (or module.editStyle) for all trace modules and redraws the legend.","*markerSize* is like *style*, but propagate axis-range changes due to scatter `marker.size`","*colorbars* only redraws colorbars."].join(" ")},a={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"],description:["layout attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*plot* (re)plots but without first clearing `gd.calcdata`.","*legend* only redraws the legend.","*ticks* only redraws axis ticks, labels, and gridlines.","*axrange* minimal sequence when updating axis ranges.","*layoutstyle* reapplies global and SVG cartesian axis styles.","*modebar* just updates the modebar.","*camera* just updates the camera settings for gl3d scenes.","*arraydraw* allows component arrays to invoke the redraw routines just for the","component(s) that changed.","*colorbars* only redraws colorbars."].join(" ")},s=o.flags.slice().concat(["fullReplot"]),l=a.flags.slice().concat("layoutReplot");function c(t){for(var e={},r=0;r{"use strict";var n=r(7370),i=r(17399),o=r(25059),a=r(12822),s=r(51137),l=r(99246),c=r(17499),u=l.cleanId,h=l.getFromTrace,d=o.traceIs;function f(t,e){var r=t[e],n=e.charAt(0);r&&"paper"!==r&&(t[e]=u(r,n,!0))}function p(t){function e(e,r){var n=t[e],i=t.title&&t.title[r];n&&!i&&(t.title||(t.title={}),t.title[r]=t[e],delete t[e])}t&&("string"!=typeof t.title&&"number"!=typeof t.title||(t.title={text:t.title}),e("titlefont","font"),e("titleposition","position"),e("titleside","side"),e("titleoffset","offset"))}function m(t){if(!a.isPlainObject(t))return!1;var e=t.name;return delete t.name,delete t.showlegend,("string"==typeof e||"number"==typeof e)&&String(e)}function g(t,e,r,n){if(r&&!n)return t;if(n&&!r)return e;if(!t.trim())return e;if(!e.trim())return t;var i,o=Math.min(t.length,e.length);for(i=0;i0&&a.log("Clearing previous rejected promises from queue."),t._promises=[]},e.cleanLayout=function(t){var r,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var o=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,h=(s.subplotsRegistry.ternary||{}).attrRegex,d=(s.subplotsRegistry.gl3d||{}).attrRegex,m=Object.keys(t);for(r=0;r3?(D.x=1.02,D.xanchor="left"):D.x<-2&&(D.x=-.02,D.xanchor="right"),D.y>3?(D.y=1.02,D.yanchor="bottom"):D.y<-2&&(D.y=-.02,D.yanchor="top")),p(t),"rotate"===t.dragmode&&(t.dragmode="orbit"),c.clean(t),t.template&&t.template.layout&&e.cleanLayout(t.template.layout),t},e.cleanData=function(t){for(var r=0;r0)return t.substr(0,e)}e.hasParent=function(t,e){for(var r=x(e);r;){if(r in t)return!0;r=x(r)}return!1};var _=["x","y","z"];e.clearAxisTypes=function(t,e,r){for(var n=0;n{"use strict";var n=r(57755);e._doPlot=n._doPlot,e.newPlot=n.newPlot,e.restyle=n.restyle,e.relayout=n.relayout,e.redraw=n.redraw,e.update=n.update,e._guiRestyle=n._guiRestyle,e._guiRelayout=n._guiRelayout,e._guiUpdate=n._guiUpdate,e._storeDirectGUIEdit=n._storeDirectGUIEdit,e.react=n.react,e.extendTraces=n.extendTraces,e.prependTraces=n.prependTraces,e.addTraces=n.addTraces,e.deleteTraces=n.deleteTraces,e.moveTraces=n.moveTraces,e.purge=n.purge,e.addFrames=n.addFrames,e.deleteFrames=n.deleteFrames,e.animate=n.animate,e.setPlotConfig=n.setPlotConfig;var i=r(16822).getGraphDiv,o=r(71422).eraseActiveShape;e.deleteActiveShape=function(t){return o(i(t))},e.toImage=r(42704),e.validate=r(56205),e.downloadImage=r(56787);var a=r(89170);e.makeTemplate=a.makeTemplate,e.validateTemplate=a.validateTemplate},50305:(t,e,r)=>{"use strict";var n=r(12517),i=r(51648),o=r(64347),a=r(45380).sorterAsc,s=r(25059);e.containerArrayMatch=r(81776);var l=e.isAddVal=function(t){return"add"===t||n(t)},c=e.isRemoveVal=function(t){return null===t||"remove"===t};e.applyContainerArrayChanges=function(t,e,r,n,u){var h=e.astr,d=s.getComponentMethod(h,"supplyLayoutDefaults"),f=s.getComponentMethod(h,"draw"),p=s.getComponentMethod(h,"drawOne"),m=n.replot||n.recalc||d===i||f===i,g=t.layout,v=t._fullLayout;if(r[""]){Object.keys(r).length>1&&o.warn("Full array edits are incompatible with other edits",h);var b=r[""][""];if(c(b))e.set(null);else{if(!Array.isArray(b))return o.warn("Unrecognized full array edit value",h,b),!0;e.set(b)}return!m&&(d(g,v),f(t),!0)}var y,x,_,w,k,A,M,T,S=Object.keys(r).map(Number).sort(a),C=e.get(),E=C||[],L=u(v,h).get(),z=[],O=-1,D=E.length;for(y=0;yE.length-(M?0:1))o.warn("index out of range",h,_);else if(void 0!==A)k.length>1&&o.warn("Insertion & removal are incompatible with edits to the same index.",h,_),c(A)?z.push(_):M?("add"===A&&(A={}),E.splice(_,0,A),L&&L.splice(_,0,{})):o.warn("Unrecognized full object edit value",h,_,A),-1===O&&(O=_);else for(x=0;x=0;y--)E.splice(z[y],1),L&&L.splice(z[y],1);if(E.length?C||e.set(E):e.set(null),m)return!1;if(d(g,v),p!==i){var I;if(-1===O)I=S;else{for(D=Math.max(E.length,D),I=[],y=0;y=O);y++)I.push(_);for(y=O;y{"use strict";var n=r(27941),i=r(7370),o=r(56885),a=r(12822),s=a.nestedProperty,l=r(16677),c=r(79385),u=r(25059),h=r(35852),d=r(51137),f=r(75815),p=r(46458),m=r(86130),g=r(40666),v=r(17499),b=r(30977).initInteractions,y=r(25853),x=r(70059).clearOutline,_=r(58389).dfltConfig,w=r(50305),k=r(32862),A=r(39004),M=r(62309),T=r(21197).AX_NAME_PATTERN,S=0;function C(t){var e=t._fullLayout;e._redrawFromAutoMarginCount?e._redrawFromAutoMarginCount--:t.emit("plotly_afterplot")}function E(t,e){try{t._fullLayout._paper.style("background",e)}catch(t){a.error(t)}}function L(t,e){E(t,v.combine(e,"white"))}function z(t,e){if(!t._context){t._context=a.extendDeep({},_);var r=n.select("base");t._context._baseUrl=r.size()&&r.attr("href")?window.location.href.split("#")[0]:""}var i,s,l,c=t._context;if(e){for(s=Object.keys(e),i=0;i=t.data.length||i<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function I(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),D(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&D(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function F(t,e,r,n,o){!function(t,e,r,n){var i=a.isPlainObject(n);if(!Array.isArray(t.data))throw new Error("gd.data must be an array");if(!a.isPlainObject(e))throw new Error("update must be a key:value object");if(void 0===r)throw new Error("indices must be an integer or array of integers");for(var o in D(t,r,"indices"),e){if(!Array.isArray(e[o])||e[o].length!==r.length)throw new Error("attribute "+o+" must be an array of length equal to indices array length");if(i&&(!(o in n)||!Array.isArray(n[o])||n[o].length!==e[o].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(t,e,r,n);for(var l=function(t,e,r,n){var o,l,c,u,h,d=a.isPlainObject(n),f=[];for(var p in Array.isArray(r)||(r=[r]),r=O(r,t.data.length-1),e)for(var m=0;m-1&&-1===r.indexOf("grouptitlefont")?l(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?l(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?l(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&l(r,r.replace("titleoffset","title.offset")):l(r,r.replace("title","title.text"));function l(e,r){t[r]=t[e],delete t[e]}}function V(t,e,r){t=a.getGraphDiv(t),k.clearPromiseQueue(t);var n={};if("string"==typeof e)n[e]=r;else{if(!a.isPlainObject(e))return a.warn("Relayout fail.",e,r),Promise.reject();n=a.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=X(t,n),o=i.flags;o.calc&&(t.calcdata=void 0);var s=[d.previousPromises];o.layoutReplot?s.push(A.layoutReplot):Object.keys(n).length&&(H(t,o,i)||d.supplyDefaults(t),o.legend&&s.push(A.doLegend),o.layoutstyle&&s.push(A.layoutStyles),o.axrange&&W(s,i.rangesAltered),o.ticks&&s.push(A.doTicksRelayout),o.modebar&&s.push(A.doModeBar),o.camera&&s.push(A.doCamera),o.colorbars&&s.push(A.doColorBars),s.push(C)),s.push(d.rehover,d.redrag,d.reselect),c.add(t,V,[t,i.undoit],V,[t,i.redoit]);var l=a.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit("plotly_relayout",i.eventData),t}))}function H(t,e,r){var n,i,o=t._fullLayout;if(!e.axrange)return!1;for(var s in e)if("axrange"!==s&&e[s])return!1;var l=function(t,e){return a.coerce(n,i,m,t,e)},c={};for(var u in r.rangesAltered){var h=f.id2name(u);if(n=t.layout[h],i=o[h],p(n,i,l,c),i._matchGroup)for(var d in i._matchGroup)if(d!==u){var g=o[f.id2name(d)];g.autorange=i.autorange,g.range=i.range.slice(),g._input.range=i.range.slice()}}return!0}function W(t,e){var r=e?function(t){var r=[];for(var n in e){var i=f.getFromId(t,n);if(r.push(n),-1!==(i.ticklabelposition||"").indexOf("inside")&&i._anchorAxis&&r.push(i._anchorAxis._id),i._matchGroup)for(var o in i._matchGroup)e[o]||r.push(o)}return f.draw(t,r,{skipTitle:!0})}:function(t){return f.draw(t,"redraw")};t.push(x,A.doAutoRangeAndConstraints,r,A.drawData,A.finalDraw)}var q=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Y=/^[xyz]axis[0-9]*\.autorange$/,Z=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function X(t,e){var r,n,i,o=t.layout,l=t._fullLayout,c=l._guiEditing,d=N(l._preGUI,c),p=Object.keys(e),m=f.list(t),g=a.extendDeepAll({},e),v={};for(G(e),p=Object.keys(e),n=0;n0&&"string"!=typeof D.parts[F];)F--;var R=D.parts[F],P=D.parts[F-1]+"."+R,B=D.parts.slice(0,F).join("."),U=s(t.layout,B).get(),V=s(l,B).get(),H=D.get();if(void 0!==I){A[O]=I,S[O]="reverse"===R?I:j(H);var W=h.getLayoutValObject(l,D.parts);if(W&&W.impliedEdits&&null!==I)for(var X in W.impliedEdits)C(a.relativeAttr(O,X),W.impliedEdits[X]);if(-1!==["width","height"].indexOf(O))if(I){C("autosize",null);var J="height"===O?"width":"height";C(J,l[J])}else l[O]=t._initialAutoSize[O];else if("autosize"===O)C("width",I?null:l.width),C("height",I?null:l.height);else if(P.match(q))z(P),s(l,B+"._inputRange").set(null);else if(P.match(Y)){z(P),s(l,B+"._inputRange").set(null);var K=s(l,B).get();K._inputDomain&&(K._input.domain=K._inputDomain.slice())}else P.match(Z)&&s(l,B+"._inputDomain").set(null);if("type"===R){E=U;var Q="linear"===V.type&&"log"===I,tt="log"===V.type&&"linear"===I;if(Q||tt){if(E&&E.range)if(V.autorange)Q&&(E.range=E.range[1]>E.range[0]?[1,2]:[2,1]);else{var et=E.range[0],rt=E.range[1];Q?(et<=0&&rt<=0&&C(B+".autorange",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),C(B+".range[0]",Math.log(et)/Math.LN10),C(B+".range[1]",Math.log(rt)/Math.LN10)):(C(B+".range[0]",Math.pow(10,et)),C(B+".range[1]",Math.pow(10,rt)))}else C(B+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[D.parts[0]]&&"radialaxis"===D.parts[1]&&delete l[D.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(t,V,I,C),u.getComponentMethod("images","convertCoords")(t,V,I,C)}else C(B+".autorange",!0),C(B+".range",null);s(l,B+"._inputRange").set(null)}else if(R.match(T)){var nt=s(l,O).get(),it=(I||{}).type;it&&"-"!==it||(it="linear"),u.getComponentMethod("annotations","convertCoords")(t,nt,it,C),u.getComponentMethod("images","convertCoords")(t,nt,it,C)}var ot=w.containerArrayMatch(O);if(ot){r=ot.array,n=ot.index;var at=ot.property,st=W||{editType:"calc"};""!==n&&""===at&&(w.isAddVal(I)?S[O]=null:w.isRemoveVal(I)?S[O]=(s(o,r).get()||[])[n]:a.warn("unrecognized full object value",e)),M.update(_,st),v[r]||(v[r]={});var lt=v[r][n];lt||(lt=v[r][n]={}),lt[at]=I,delete e[O]}else"reverse"===R?(U.range?U.range.reverse():(C(B+".autorange",!0),U.range=[1,0]),V.autorange?_.calc=!0:_.plot=!0):("dragmode"===O&&(!1===I&&!1!==H||!1!==I&&!1===H)||l._has("scatter-like")&&l._has("regl")&&"dragmode"===O&&("lasso"===I||"select"===I)&&"lasso"!==H&&"select"!==H||l._has("gl2d")?_.plot=!0:W?M.update(_,W):_.calc=!0,D.set(I))}}for(r in v)w.applyContainerArrayChanges(t,d(o,r),v[r],_,d)||(_.plot=!0);for(var ct in L){var ut=(E=f.getFromId(t,ct))&&E._constraintGroup;if(ut)for(var ht in _.calc=!0,ut)L[ht]||(f.getFromId(t,ht)._constraintShrinkable=!0)}($(t)||e.height||e.width)&&(_.plot=!0);var dt=l.shapes;for(n=0;n1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function nt(t,e){for(var r=0;r=i.length?i[0]:i[t]:i}function l(t){return Array.isArray(o)?t>=o.length?o[0]:o[t]:o}function c(t,e){var r=0;return function(){if(t&&++r===e)return t()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(o,u){function h(){t.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&function(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,d.transition(t,e.frame.data,e.frame.layout,k.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then((function(){e.onComplete&&e.onComplete()})),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}()};e()}var f,p,m=0;function g(t){return Array.isArray(i)?m>=i.length?t.transitionOpts=i[m]:t.transitionOpts=i[0]:t.transitionOpts=i,m++,t}var v=[],b=null==e,y=Array.isArray(e);if(b||y||!a.isPlainObject(e)){if(b||-1!==["string","number"].indexOf(typeof e))for(f=0;f0&&ww)&&A.push(p);v=A}}v.length>0?function(e){if(0!==e.length){for(var i=0;i=0;n--)if(a.isPlainObject(e[n])){var m=e[n].name,g=(u[m]||p[m]||{}).name,v=e[n].name,b=u[g]||p[g];g&&v&&"number"==typeof v&&b&&S<5&&(S++,a.warn('addFrames: overwriting frame "'+(u[g]||p[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===S&&a.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),p[m]={name:m},f.push({frame:d.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:h+n})}f.sort((function(t,e){return t.index>e.index?-1:t.index=0;n--){if("number"==typeof(i=f[n].frame).name&&a.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;u[i.name="frame "+t._transitionData._counter++];);if(u[i.name]){for(o=0;o=0;r--)n=e[r],o.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:i[n]});var l=d.modifyFrames,u=d.modifyFrames,h=[t,s],f=[t,o];return c&&c.add(t,l,h,u,f),d.modifyFrames(t,o)},e.addTraces=function t(r,n,i){r=a.getGraphDiv(r);var o,s,l=[],u=e.deleteTraces,h=t,d=[r,l],f=[r,n];for(function(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r{"use strict";var e={staticPlot:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are interactive or not.","If *false*, no interactivity, for export or image generation."].join(" ")},typesetMath:{valType:"boolean",dflt:!0,description:["Determines whether math should be typeset or not,","when MathJax (either v2 or v3) is present on the page."].join(" ")},plotlyServerURL:{valType:"string",dflt:"",description:["When set it determines base URL for","the 'Edit in Chart Studio' `showEditInChartStudio`/`showSendToCloud` mode bar button","and the showLink/sendData on-graph link.","To enable sending your data to Chart Studio Cloud, you need to","set both `plotlyServerURL` to 'https://chart-studio.plotly.com' and","also set `showSendToCloud` to true."].join(" ")},editable:{valType:"boolean",dflt:!1,description:["Determines whether the graph is editable or not.","Sets all pieces of `edits`","unless a separate `edits` config item overrides individual parts."].join(" ")},edits:{annotationPosition:{valType:"boolean",dflt:!1,description:["Determines if the main anchor of the annotation is editable.","The main anchor corresponds to the","text (if no arrow) or the arrow (which drags the whole thing leaving","the arrow length & direction unchanged)."].join(" ")},annotationTail:{valType:"boolean",dflt:!1,description:["Has only an effect for annotations with arrows.","Enables changing the length and direction of the arrow."].join(" ")},annotationText:{valType:"boolean",dflt:!1,description:"Enables editing annotation text."},axisTitleText:{valType:"boolean",dflt:!1,description:"Enables editing axis title text."},colorbarPosition:{valType:"boolean",dflt:!1,description:"Enables moving colorbars."},colorbarTitleText:{valType:"boolean",dflt:!1,description:"Enables editing colorbar title text."},legendPosition:{valType:"boolean",dflt:!1,description:"Enables moving the legend."},legendText:{valType:"boolean",dflt:!1,description:"Enables editing the trace name fields from the legend"},shapePosition:{valType:"boolean",dflt:!1,description:"Enables moving shapes."},titleText:{valType:"boolean",dflt:!1,description:"Enables editing the global layout title."}},editSelection:{valType:"boolean",dflt:!0,description:"Enables moving selections."},autosizable:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are plotted with respect to","layout.autosize:true and infer its container size."].join(" ")},responsive:{valType:"boolean",dflt:!1,description:["Determines whether to change the layout size when window is resized.","In v3, this option will be removed and will always be true."].join(" ")},fillFrame:{valType:"boolean",dflt:!1,description:["When `layout.autosize` is turned on, determines whether the graph","fills the container (the default) or the screen (if set to *true*)."].join(" ")},frameMargins:{valType:"number",dflt:0,min:0,max:.5,description:["When `layout.autosize` is turned on, set the frame margins","in fraction of the graph size."].join(" ")},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox","map"],extras:[!0,!1],dflt:"gl3d+geo+map",description:["Determines whether mouse wheel or two-finger scroll zooms is enable.","Turned on by default for gl3d, geo, mapbox and map subplots","(as these subplot types do not have zoombox via pan),","but turned off by default for cartesian subplots.","Set `scrollZoom` to *false* to disable scrolling for all subplots."].join(" ")},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize",description:["Sets the double click interaction mode.","Has an effect only in cartesian plots.","If *false*, double click is disable.","If *reset*, double click resets the axis ranges to their initial values.","If *autosize*, double click set the axis ranges to their autorange values.","If *reset+autosize*, the odd double clicks resets the axis ranges","to their initial values and even double clicks set the axis ranges","to their autorange values."].join(" ")},doubleClickDelay:{valType:"number",dflt:300,min:0,description:["Sets the delay for registering a double-click in ms.","This is the time interval (in ms) between first mousedown and","2nd mouseup to constitute a double-click.","This setting propagates to all on-subplot double clicks","(except for geo, mapbox and map) and on-legend double clicks."].join(" ")},showAxisDragHandles:{valType:"boolean",dflt:!0,description:["Set to *false* to omit cartesian axis pan/zoom drag handles."].join(" ")},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0,description:["Set to *false* to omit direct range entry at the pan/zoom drag points,","note that `showAxisDragHandles` must be enabled to have an effect."].join(" ")},showTips:{valType:"boolean",dflt:!0,description:["Determines whether or not tips are shown while interacting","with the resulting graphs."].join(" ")},showLink:{valType:"boolean",dflt:!1,description:["Determines whether a link to Chart Studio Cloud is displayed","at the bottom right corner of resulting graphs.","Use with `sendData` and `linkText`."].join(" ")},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0,description:["Sets the text appearing in the `showLink` link."].join(" ")},sendData:{valType:"boolean",dflt:!0,description:["If *showLink* is true, does it contain data","just link to a Chart Studio Cloud file?"].join(" ")},showSources:{valType:"any",dflt:!1,description:["Adds a source-displaying function to show sources on","the resulting graphs."].join(" ")},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover",description:["Determines the mode bar display mode.","If *true*, the mode bar is always visible.","If *false*, the mode bar is always hidden.","If *hover*, the mode bar is visible while the mouse cursor","is on the graph container."].join(" ")},showSendToCloud:{valType:"boolean",dflt:!1,description:['Should we include a ModeBar button, labeled "Edit in Chart Studio",',"that sends this chart to chart-studio.plotly.com (formerly plot.ly) or another plotly server","as specified by `plotlyServerURL` for editing, export, etc? Prior to version 1.43.0","this button was included by default, now it is opt-in using this flag.","Note that this button can (depending on `plotlyServerURL` being set) send your data","to an external server. However that server does not persist your data",'until you arrive at the Chart Studio and explicitly click "Save".'].join(" ")},showEditInChartStudio:{valType:"boolean",dflt:!1,description:["Same as `showSendToCloud`, but use a pencil icon instead of a floppy-disk.","Note that if both `showSendToCloud` and `showEditInChartStudio` are turned,","only `showEditInChartStudio` will be honored."].join(" ")},modeBarButtonsToRemove:{valType:"any",dflt:[],description:["Remove mode bar buttons by name.","See ./components/modebar/buttons.js for the list of names."].join(" ")},modeBarButtonsToAdd:{valType:"any",dflt:[],description:["Add mode bar button using config objects","See ./components/modebar/buttons.js for list of arguments.","To enable predefined modebar buttons e.g. shape drawing, hover and spikelines,","simply provide their string name(s). This could include:","*v1hovermode*, *hoverclosest*, *hovercompare*, *togglehover*, *togglespikelines*,","*drawline*, *drawopenpath*, *drawclosedpath*, *drawcircle*, *drawrect* and *eraseshape*.","Please note that these predefined buttons will only be shown if they are compatible","with all trace types used in a graph."].join(" ")},modeBarButtons:{valType:"any",dflt:!1,description:["Define fully custom mode bar buttons as nested array,","where the outer arrays represents button groups, and","the inner arrays have buttons config objects or names of default buttons","See ./components/modebar/buttons.js for more info."].join(" ")},toImageButtonOptions:{valType:"any",dflt:{},description:["Statically override options for toImage modebar button","allowed keys are format, filename, width, height, scale","see ../components/modebar/buttons.js"].join(" ")},displaylogo:{valType:"boolean",dflt:!0,description:["Determines whether or not the plotly logo is displayed","on the end of the mode bar."].join(" ")},watermark:{valType:"boolean",dflt:!1,description:"watermark the images with the company's logo"},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4,description:["Set the pixel ratio during WebGL image export.","This config option was formerly named `plot3dPixelRatio`","which is now deprecated."].join(" ")},setBackground:{valType:"any",dflt:"transparent",description:["Set function to add the background color (i.e. `layout.paper_color`)","to a different container.","This function take the graph div as first argument and the current background","color as second argument.","Alternatively, set to string *opaque* to ensure there is white behind it."].join(" ")},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/",description:["Set the URL to topojson used in geo charts.","By default, the topojson files are fetched from cdn.plot.ly.","For example, set this option to:","/dist/topojson/","to render geographical feature using the topojson files","that ship with the plotly.js module."].join(" ")},mapboxAccessToken:{valType:"string",dflt:null,description:["Mapbox access token (required to plot mapbox trace types)","If using an Mapbox Atlas server, set this option to ''","so that plotly.js won't attempt to authenticate to the public Mapbox server."].join(" ")},logging:{valType:"integer",min:0,max:2,dflt:1,description:["Turn all console logging on or off (errors will be thrown)","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0,description:["Set on-graph logging (notifier) level","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no on-graph logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},queueLength:{valType:"integer",min:0,dflt:0,description:"Sets the length of the undo/redo queue."},globalTransforms:{valType:"any",dflt:[],description:["Set global transform to be applied to all traces with no","specification needed"].join(" ")},locale:{valType:"string",dflt:"en-US",description:["Which localization should we use?","Should be a string like 'en' or 'en-US'."].join(" ")},locales:{valType:"any",dflt:{},description:["Localization definitions","Locales can be provided either here (specific to one chart) or globally","by registering them as modules.","Should be an object of objects {locale: {dictionary: {...}, format: {...}}}","{"," da: {"," dictionary: {'Reset axes': 'Nulstil aksler', ...},"," format: {months: [...], shortMonths: [...]}"," },"," ...","}","All parts are optional. When looking for translation or format fields, we","look first for an exact match in a config locale, then in a registered","module. If those fail, we strip off any regionalization ('en-US' -> 'en')","and try each (config, registry) again. The final fallback for translation","is untranslated (which is US English) and for formats is the base English","(the only consequence being the last fallback date format %x is DD/MM/YYYY","instead of MM/DD/YYYY). Currently `grouping` and `currency` are ignored","for our automatic number formatting, but can be used in custom formats."].join(" ")}},r={};!function t(e,r){for(var n in e){var i=e[n];i.valType?r[n]=i.dflt:(r[n]||(r[n]={}),t(i,r[n]))}}(e,r),t.exports={configAttributes:e,dfltConfig:r}},35852:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822),o=r(3520),a=r(13195),s=r(53874),l=r(46367),c=r(58389).configAttributes,u=r(62309),h=i.extendDeepAll,d=i.isPlainObject,f=i.isArrayOrTypedArray,p=i.nestedProperty,m=i.valObjectMeta,g="_isSubplotObj",v="_isLinkedToArray",b="_deprecated",y=[g,v,"_arrayAttrRegexps",b];function x(t,e,r){if(!t)return!1;if(t._isLinkedToArray)if(_(e[r]))r++;else if(r=o.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var a=e[r];if(!_(a))return!1;t=o[i][a]}else t=o[i]}else t=o}}return t}function _(t){return t===Math.round(t)&&t>=0}function w(){var t,e,r={};for(t in h(r,a),n.subplotsRegistry)if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else{var u=t._module;if(u||(u=(n.modules[t.type||o.type.dflt]||{})._module),!u)return!1;if(!(i=(r=u.attributes)&&r[a])){var h=u.basePlotModule;h&&h.attributes&&(i=h.attributes[a])}i||(i=o[a])}return x(i,e,s)},e.getLayoutValObject=function(t,e){var r=function(t,e){var r,i,o,s,l=t._basePlotModules;if(l){var c;for(r=0;r{"use strict";var n=r(12822),i=r(3520),o="templateitemname",a={name:{valType:"string",editType:"none",description:["When used in a template, named items are created in the output figure","in addition to any items the figure already has in this array.","You can modify these items in the output figure by making your own","item with `templateitemname` matching this `name`","alongside your modifications (including `visible: false` or","`enabled: false` to hide it).","Has no effect outside of a template."].join(" ")}};function s(t){return t&&"string"==typeof t}function l(t){var e=t.length-1;return"s"!==t.charAt(e)&&n.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}a[o]={valType:"string",editType:"calc",description:["Used to refer to a named item in this array in the template. Named","items from the template will be created even without a matching item","in the input figure, but you can modify one by making an item with","`templateitemname` matching its `name`, alongside your modifications","(including `visible: false` or `enabled: false` to hide it).","If there is no template or no matching item, this item will be","hidden unless you explicitly show it with `visible: true`."].join(" ")},e.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=a.name,e[o]=a[o],e},e.traceTemplater=function(t){var e,r,o={};for(e in t)r=t[e],Array.isArray(r)&&r.length&&(o[e]=0);return{newTrace:function(a){var s={type:e=n.coerce(a,{},i,"type"),_template:null};if(e in o){r=t[e];var l=o[e]%r.length;o[e]++,s._template=r[l]}return s}}},e.newContainer=function(t,e,r){var i=t._template,o=i&&(i[e]||r&&i[r]);return n.isPlainObject(o)||(o=null),t[e]={_template:o}},e.arrayTemplater=function(t,e,r){var n=t._template,i=n&&n[l(e)],a=n&&n[e];Array.isArray(a)&&a.length||(a=[]);var c={};return{newItem:function(t){var e={name:t.name,_input:t},n=e[o]=t[o];if(!s(n))return e._template=i,e;for(var l=0;l=i&&(r._input||{})._templateitemname;s&&(a=i);var l,c=e+"["+a+"]";function u(){l={},s&&(l[c]={},l[c][o]=s)}function h(t,e){s?n.nestedProperty(l[c],t).set(e):l[c+"."+t]=e}function d(){var t=l;return u(),t}return u(),{modifyBase:function(t,e){l[t]=e},modifyItem:h,getUpdateObj:d,applyUpdate:function(e,r){e&&h(e,r);var i=d();for(var o in i)n.nestedProperty(t,o).set(i[o])}}}},39004:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(51137),a=r(12822),s=r(80394),l=r(86748),c=r(17499),u=r(40666),h=r(6883),d=r(45828),f=r(75815),p=r(89701),m=r(69352),g=m.enforce,v=m.clean,b=r(19496).doAutoRange,y="start",x=r(21197).zindexSeparator;function _(t,e,r){for(var n=0;n=t[1]||i[1]<=t[0])&&o[0]e[0])return!0}return!1}function w(t){var r,i,s,l,h,m,g=t._fullLayout,v=g._size,b=v.p,y=f.list(t,"",!0);if(g._paperdiv.style({width:t._context.responsive&&g.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":g.width+"px",height:t._context.responsive&&g.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(u.setSize,g.width,g.height),t._context.setBackground(t,g.paper_bgcolor),e.drawMainTitle(t),d.manage(t),!g._has("cartesian"))return o.previousPromises(t);function w(t,e,r){var n=t._lw/2;return"x"===t._id.charAt(0)?e?"top"===r?e._offset-b-n:e._offset+e._length+b+n:v.t+v.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+b+n:e._offset-b-n:v.l+v.w*(t.position||0)+n%1}for(r=0;r.5?"t":"b",a=t._fullLayout.margin[o],s=0;return"paper"===e.yref?s=r+e.pad.t+e.pad.b:"container"===e.yref&&(s=function(t,e,r,n,i){var o=0;return"middle"===r&&(o+=i/2),"t"===t?("top"===r&&(o+=i),o+=n-e*n):("bottom"===r&&(o+=i),o+=e*n),o}(o,n,i,t._fullLayout.height,r)+e.pad.t+e.pad.b),s>a?s:0}(t,e,m);if(g>0){!function(t,e,r,n){var i="title.automargin",s=t._fullLayout.title,l=s.y>.5?"t":"b",c={x:s.x,y:s.y,t:0,b:0},u={};"paper"===s.yref&&function(t,e,r,n,i){var o="paper"===e.yref?t._fullLayout._size.h:t._fullLayout.height,s=a.isTopAnchor(e)?n:n-i,l="b"===r?o-s:s;return!(a.isTopAnchor(e)&&"t"===r||a.isBottomAnchor(e)&&"b"===r)&&l{"use strict";var n=r(12822),i=n.isPlainObject,o=r(35852),a=r(51137),s=r(3520),l=r(46121),c=r(58389).dfltConfig;function u(t,e){t=n.extendDeep({},t);var r,o,a=Object.keys(t).sort();function s(e,r,n){if(i(r)&&i(e))u(e,r);else if(Array.isArray(r)&&Array.isArray(e)){var a=l.arrayTemplater({_template:t},n);for(o=0;ok?u.push({code:"unused",traceType:b,templateCount:w,dataCount:k}):k>w&&u.push({code:"reused",traceType:b,templateCount:w,dataCount:k})}}else u.push({code:"data"});if(function t(e,r){for(var n in e)if("_"!==n.charAt(0)){var o=e[n],a=m(e,n,r);i(o)?(Array.isArray(e)&&!1===o._template&&o.templateitemname&&u.push({code:"missing",path:a,templateitemname:o.templateitemname}),t(o,a)):Array.isArray(o)&&g(o)&&t(o,a)}}({data:f,layout:d},""),u.length)return u.map(v)}},42704:(t,e,r)=>{"use strict";var n=r(7370),i=r(57755),o=r(51137),a=r(12822),s=r(13078),l=r(48402),c=r(40241),u=r(88566).version,h={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png",description:"Sets the format of exported image."},width:{valType:"number",min:1,description:["Sets the exported image width.","Defaults to the value found in `layout.width`","If set to *null*, the exported image width will match the current graph width."].join(" ")},height:{valType:"number",min:1,description:["Sets the exported image height.","Defaults to the value found in `layout.height`","If set to *null*, the exported image height will match the current graph height."].join(" ")},scale:{valType:"number",min:0,dflt:1,description:["Sets a scaling for the generated image.","If set, all features of a graphs (e.g. text, line width)","are scaled, unlike simply setting","a bigger *width* and *height*."].join(" ")},setBackground:{valType:"any",dflt:!1,description:["Sets the image background mode.","By default, the image background is determined by `layout.paper_bgcolor`,","the *transparent* mode.","One might consider setting `setBackground` to *opaque*","when exporting a *jpeg* image as JPEGs do not support opacity."].join(" ")},imageDataOnly:{valType:"boolean",dflt:!1,description:["Determines whether or not the return value is prefixed by","the image format's corresponding 'data:image;' spec."].join(" ")}};t.exports=function(t,e){var r,d,f,p;function m(t){return!(t in e)||a.validate(e[t],h[t])}if(e=e||{},a.isPlainObject(t)?(r=t.data||[],d=t.layout||{},f=t.config||{},p={}):(t=a.getGraphDiv(t),r=a.extendDeep([],t.data),d=a.extendDeep({},t.layout),f=t._context,p=t._fullLayout||{}),!m("width")&&null!==e.width||!m("height")&&null!==e.height)throw new Error("Height and width should be pixel values.");if(!m("format"))throw new Error("Export format is not "+a.join2(h.format.values,", "," or ")+".");var g={};function v(t,r){return a.coerce(e,g,h,t,r)}var b=v("format"),y=v("width"),x=v("height"),_=v("scale"),w=v("setBackground"),k=v("imageDataOnly"),A=document.createElement("div");A.style.position="absolute",A.style.left="-5000px",document.body.appendChild(A);var M=a.extendFlat({},d);y?M.width=y:null===e.width&&n(p.width)&&(M.width=p.width),x?M.height=x:null===e.height&&n(p.height)&&(M.height=p.height);var T=a.extendFlat({},f,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(A);function C(){return new Promise((function(t){setTimeout(t,s.getDelay(A._fullLayout))}))}function E(){return new Promise((function(t,e){var r=l(A,b,_),n=A._fullLayout.width,h=A._fullLayout.height;function d(){i.purge(A),document.body.removeChild(A)}if("full-json"===b){var f=o.graphJson(A,!1,"keepdata","object",!0,!0);return f.version=u,f=JSON.stringify(f),d(),t(k?f:s.encodeJSON(f))}if(d(),"svg"===b)return t(k?r:s.encodeSVG(r));var p=document.createElement("canvas");p.id=a.randstr(),c({format:b,width:n,height:h,scale:_,canvas:p,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.newPlot(A,r,M,T).then(S).then(C).then(E).then((function(e){t(function(t){return k?t.replace(s.IMAGE_URL_PREFIX,""):t}(e))})).catch((function(t){e(t)}))}))}},56205:(t,e,r)=>{"use strict";var n=r(12822),i=r(51137),o=r(35852),a=r(58389).dfltConfig,s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function u(t,e,r,i,o,a){a=a||[];for(var h=Object.keys(t),d=0;dy.length&&i.push(f("unused",o,v.concat(y.length)));var M,T,S,C,E,L=y.length,z=Array.isArray(A);if(z&&(L=Math.min(L,A.length)),2===x.dimensions)for(T=0;Ty[T].length&&i.push(f("unused",o,v.concat(T,y[T].length)));var O=y[T].length;for(M=0;M<(z?Math.min(O,A[T].length):O);M++)S=z?A[T][M]:A,C=b[T][M],E=y[T][M],n.validate(C,S)?E!==C&&E!==+C&&i.push(f("dynamic",o,v.concat(T,M),C,E)):i.push(f("value",o,v.concat(T,M),C))}else i.push(f("array",o,v.concat(T),b[T]));else for(T=0;T1&&d.push(f("object","layout"))),i.supplyDefaults(p);for(var m=p._fullData,g=r.length,v=0;v{"use strict";t.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"],description:["Describes how a new animate call interacts with currently-running","animations. If `immediate`, current animations are interrupted and","the new animation is started. If `next`, the current frame is allowed","to complete, after which the new animation is started. If `afterall`","all existing frames are animated to completion before the new animation","is started."].join(" ")},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward",description:["The direction in which to play the frames triggered by the animation call"].join(" ")},fromcurrent:{valType:"boolean",dflt:!1,description:["Play frames starting at the current frame instead of the beginning."].join(" ")},frame:{duration:{valType:"number",min:0,dflt:500,description:["The duration in milliseconds of each frame. If greater than the frame","duration, it will be limited to the frame duration."].join(" ")},redraw:{valType:"boolean",dflt:!0,description:["Redraw the plot at completion of the transition. This is desirable","for transitions that include properties that cannot be transitioned,","but may significantly slow down updates that do not require a full","redraw of the plot"].join(" ")}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none",description:["The duration of the transition, in milliseconds. If equal to zero,","updates are synchronous."].join(" ")},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none",description:"The easing function used for the transition"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none",description:["Determines whether the figure's layout or traces smoothly transitions","during updates that make both traces and layout change."].join(" ")}}}},35677:(t,e,r)=>{"use strict";var n=r(12822),i=r(46121);t.exports=function(t,e,r){var o,a,s=r.name,l=r.inclusionAttr||"visible",c=e[s],u=n.isArrayOrTypedArray(t[s])?t[s]:[],h=e[s]=[],d=i.arrayTemplater(e,s,l);for(o=0;o{"use strict";var n=r(75058),i=r(60713);t.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc",description:["Determines whether or not this trace is visible.","If *legendonly*, the trace is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")},showlegend:{valType:"boolean",dflt:!0,editType:"style",description:["Determines whether or not an item corresponding to this","trace is shown in the legend."].join(" ")},legend:{valType:"subplotid",dflt:"legend",editType:"style",description:["Sets the reference to a legend to show this trace in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")},legendgroup:{valType:"string",dflt:"",editType:"style",description:["Sets the legend group for this trace.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style",description:["Sets the title of the legend group."].join(" ")},font:n({editType:"style",description:["Sets this legend group's title font."].join(" ")}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style",description:["Sets the legend rank for this trace.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items.","When having unranked or equal rank items shapes would be displayed after traces","i.e. according to their order in data and layout."].join(" ")},legendwidth:{valType:"number",min:0,editType:"style",description:"Sets the width (in px or fraction) of the legend for this trace."},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style",description:"Sets the opacity of the trace."},name:{valType:"string",editType:"style",description:["Sets the trace name.","The trace name appears as the legend item and on hover."].join(" ")},uid:{valType:"string",editType:"plot",anim:!0,description:["Assign an id to this trace,","Use this to provide object constancy between traces during animations","and transitions."].join(" ")},ids:{valType:"data_array",editType:"calc",anim:!0,description:["Assigns id labels to each datum.","These ids for object constancy of data points during animation.","Should be an array of strings, not numbers or any other type."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data each datum.","This may be useful when listening to hover, click and selection events.","Note that, *scatter* traces also appends customdata items in the markers","DOM elements"].join(" ")},meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information associated with this trace","that can be used in various text attributes.","Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text`","`rangeselector`, `updatemenues` and `sliders` `label` text","all support `meta`.","To access the trace `meta` values in an attribute in the same trace, simply use","`%{meta[i]}` where `i` is the index or key of the `meta`","item in question.","To access trace `meta` in layout attributes, use","`%{data[n[.meta[i]}` where `i` is the index or key of the `meta`","and `n` is the trace index."].join(" ")},selectedpoints:{valType:"any",editType:"calc",description:["Array containing integer indices of selected points.","Has an effect only for traces that support selections.","Note that an empty array means an empty selection where the `unselected`","are turned on for all points, whereas, any other non-array values means no","selection all where the `selected` and `unselected` styles have no effect."].join(" ")},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none",description:["Determines which trace information appear on hover.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:i.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc",description:["The stream id number links a data trace on a plot with a stream.","See https://chart-studio.plotly.com/settings for more details."].join(" ")},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc",description:["Sets the maximum number of points to keep on the plots from an","incoming stream.","If `maxpoints` is set to *50*, only the newest 50 points will","be displayed on the plot."].join(" ")},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc",description:["WARNING: All transforms are deprecated and may be removed from the API in next major version.","An array of operations that manipulate the trace data,","for example filtering or sorting the data arrays."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of some user-driven changes to the trace:","`constraintrange` in `parcoords` traces, as well as some","`editable: true` modifications such as `name` and `colorbar.title`.","Defaults to `layout.uirevision`.","Note that other user-driven trace attribute changes are controlled","by `layout` attributes:","`trace.visible` is controlled by `layout.legend.uirevision`,","`selectedpoints` is controlled by `layout.selectionrevision`,","and `colorbar.(x|y)` (accessible with `config: {editable: true}`)","is controlled by `layout.editrevision`.","Trace changes are tracked by `uid`, which only falls back on trace","index if no `uid` is provided. So if your app can add/remove traces","before the end of the `data` array, such that the same trace has a","different index, you can still preserve user-driven changes if you","give each trace a `uid` that stays with it as it moves."].join(" ")}}},15389:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822),o=i.dateTime2ms,a=i.incrementMonth,s=r(32994).ONEAVGMONTH;t.exports=function(t,e,r,i){if("date"!==e.type)return{vals:i};var l=t[r+"periodalignment"];if(!l)return{vals:i};var c,u=t[r+"period"];if(n(u)){if((u=+u)<=0)return{vals:i}}else if("string"==typeof u&&"M"===u.charAt(0)){var h=+u.substring(1);if(!(h>0&&Math.round(h)===h))return{vals:i};c=h}for(var d=e.calendar,f="start"===l,p="end"===l,m=t[r+"period0"],g=o(m,d)||0,v=[],b=[],y=[],x=i.length,_=0;_M;)A=a(A,-c,d);for(;A<=M;)A=a(A,c,d);k=a(A,-c,d)}else{for(A=g+(w=Math.round((M-g)/u))*u;A>M;)A-=u;for(;A<=M;)A+=u;k=A-u}v[_]=f?k:p?A:(k+A)/2,b[_]=k,y[_]=A}return{vals:v,starts:b,ends:y}}},36187:t=>{"use strict";t.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's x coordinates and","a 2D cartesian x axis.","If *x* (the default value), the x coordinates refer to","`layout.xaxis`.","If *x2*, the x coordinates refer to `layout.xaxis2`, and so on."].join(" ")},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's y coordinates and","a 2D cartesian y axis.","If *y* (the default value), the y coordinates refer to","`layout.yaxis`.","If *y2*, the y coordinates refer to `layout.yaxis2`, and so on."].join(" ")}}},19496:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=r(12822),a=r(32994).FP_SAFE,s=r(25059),l=r(40666),c=r(99246),u=c.getFromId,h=c.isLinked;function d(t,e){var r,n,i=[],a=t._fullLayout,s=p(a,e,0),l=p(a,e,1),c=g(t,e),u=c.min,h=c.max;if(0===u.length||0===h.length)return o.simpleMap(e.range,e.r2l);var d=u[0].val,m=h[0].val;for(r=1;r0&&((M=L-s(x)-l(_))>z?T/M>O&&(w=x,k=_,O=T/M):T/L>O&&(w={val:x.val,nopad:1},k={val:_.val,nopad:1},O=T/L));if(d===m){var D=d-1,I=d+1;if(C)if(0===d)i=[0,1];else{var F=(d>0?h:u).reduce((function(t,e){return Math.max(t,l(e))}),0),R=d/(1-Math.min(.5,F/L));i=d>0?[0,R]:[R,0]}else i=E?[Math.max(0,D),Math.max(1,I)]:[D,I]}else C?(w.val>=0&&(w={val:0,nopad:1}),k.val<=0&&(k={val:0,nopad:1})):E&&(w.val-O*s(w)<0&&(w={val:0,nopad:1}),k.val<=0&&(k={val:1,nopad:1})),O=(k.val-w.val-f(e,x.val,_.val))/(L-s(w)-l(k)),i=[w.val-O*s(w),k.val+O*l(k)];return i=A(i,e),e.limitRange&&e.limitRange(),b&&i.reverse(),o.simpleMap(i,e.l2r||Number)}function f(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),o=0;o0?r.ppadplus:r.ppadminus)||r.ppad||0),S=M((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),C=M(r.vpadplus||r.vpad),E=M(r.vpadminus||r.vpad);if(!k){if(d=1/0,f=-1/0,w)for(n=0;n0&&(d=o),o>f&&o-a&&(d=o),o>f&&o=O;n--)z(n);return{min:p,max:m,opts:r}},concatExtremes:g};var m=3;function g(t,e,r){var n,i,o,a=e._id,s=t._fullData,l=t._fullLayout,c=[],h=[];function d(t,e){for(n=0;n=r&&(c.extrapad||!a)){s=!1;break}i(e,c.val)&&c.pad<=r&&(a||!c.extrapad)&&(t.splice(l,1),l--)}if(s){var u=o&&0===e;t.push({val:e,pad:u?0:r,extrapad:!u&&a})}}function x(t){return i(t)&&Math.abs(t)=e}function k(t,e,r){return void 0===e||void 0===r||(e=t.d2l(e))=c&&(a=c,r=c),s<=c&&(s=c,n=c)}}return r=function(t,e){var r=e.autorangeoptions;return r&&void 0!==r.minallowed&&k(e,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&k(e,r.clipmin,r.clipmax)?Math.max(t,e.d2l(r.clipmin)):t}(r,e),n=function(t,e){var r=e.autorangeoptions;return r&&void 0!==r.maxallowed&&k(e,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&k(e,r.clipmin,r.clipmax)?Math.min(t,e.d2l(r.clipmax)):t}(n,e),[r,n]}},49826:t=>{"use strict";t.exports=function(t,e,r){var n,i;if(r){var o="reversed"===e||"min reversed"===e||"max reversed"===e;n=r[o?1:0],i=r[o?0:1]}var a=t("autorangeoptions.minallowed",null===i?n:void 0),s=t("autorangeoptions.maxallowed",null===n?i:void 0);void 0===a&&t("autorangeoptions.clipmin"),void 0===s&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}},75815:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=r(51137),a=r(25059),s=r(12822),l=s.strTranslate,c=r(80394),u=r(6883),h=r(17499),d=r(40666),f=r(86130),p=r(84696),m=r(32994),g=m.ONEMAXYEAR,v=m.ONEAVGYEAR,b=m.ONEMINYEAR,y=m.ONEMAXQUARTER,x=m.ONEAVGQUARTER,_=m.ONEMINQUARTER,w=m.ONEMAXMONTH,k=m.ONEAVGMONTH,A=m.ONEMINMONTH,M=m.ONEWEEK,T=m.ONEDAY,S=T/2,C=m.ONEHOUR,E=m.ONEMIN,L=m.ONESEC,z=m.ONEMILLI,O=m.ONEMICROSEC,D=m.MINUS_SIGN,I=m.BADNUM,F={K:"zeroline"},R={K:"gridline",L:"path"},P={K:"minor-gridline",L:"path"},j={K:"tick",L:"path"},N={K:"tick",L:"text"},B={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},U=r(89701),G=U.MID_SHIFT,V=U.CAP_SHIFT,H=U.LINE_SPACING,W=U.OPPOSITE_SIDE,q=t.exports={};q.setConvert=r(30632);var Y=r(17821),Z=r(99246),X=Z.idSort,$=Z.isLinked;q.id2name=Z.id2name,q.name2id=Z.name2id,q.cleanId=Z.cleanId,q.list=Z.list,q.listIds=Z.listIds,q.getFromId=Z.getFromId,q.getFromTrace=Z.getFromTrace;var J=r(19496);function K(t){var e=1e-4*(t[1]-t[0]);return[t[0]-e,t[1]+e]}q.getAutoRange=J.getAutoRange,q.findExtremes=J.findExtremes,q.coerceRef=function(t,e,r,n,i,o){var a=n.charAt(n.length-1),l=r._fullLayout._subplots[a+"axis"],c=n+"ref",u={};return i||(i=l[0]||("string"==typeof o?o:o[0])),o||(o=i),l=l.concat(l.map((function(t){return t+" domain"}))),u[c]={valType:"enumerated",values:l.concat(o?"string"==typeof o?[o]:o:[]),dflt:i},s.coerce(t,e,u,c)},q.getRefType=function(t){return void 0===t?t:"paper"===t?"paper":"pixel"===t?"pixel":/( domain)$/.test(t)?"domain":"range"},q.coercePosition=function(t,e,r,n,i,o){var a,l;if("range"!==q.getRefType(n))a=s.ensureNumber,l=r(i,o);else{var c=q.getFromId(e,n);l=r(i,o=c.fraction2r(o)),a=c.cleanPos}t[i]=a(l)},q.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:q.getFromId(e,r).cleanPos)(t)},q.redrawComponents=function(t,e){e=e||q.listIds(t);var r=t._fullLayout;function n(n,i,o,s){for(var l=a.getComponentMethod(n,i),c={},u=0;un&&d2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},q.saveRangeInitial=function(t,e){for(var r=q.list(t,"",!0),n=!1,i=0;i.3*d||u(n)||u(o))){var f=r.dtick/2;t+=t+f.8){var a=Number(r.substr(1));o.exactYears>.8&&a%12==0?t=q.tickIncrement(t,"M6","reverse")+1.5*T:o.exactMonths>.8?t=q.tickIncrement(t,"M1","reverse")+15.5*T:t-=S;var l=q.tickIncrement(t,r);if(l<=n)return l}return t}(b,t,v,c,o)),g=b;g<=u;)g=q.tickIncrement(g,v,!1,o);return{start:e.c2r(b,0,o),end:e.c2r(g,0,o),size:v,_dataSpan:u-c}},q.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var n,o=e.dtick&&i(e._tmin);if(o){var a=q.tickIncrement(e._tmin,e.dtick,!0);n=[e._tmin,.99*a+.01*e._tmin]}else{var l=s.simpleMap(e.range,e.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(t.range=s.simpleMap(n,e.l2r),t._isMinor=!0,q.prepTicks(t,r),o){var c=i(e.dtick),u=i(t.dtick),h=c?e.dtick:+e.dtick.substring(1),d=u?t.dtick:+t.dtick.substring(1);c&&u?rt(h,d)?h===2*M&&d===2*T&&(t.dtick=M):h===2*M&&d===3*T?t.dtick=M:h!==M||(e._input.minor||{}).nticks?nt(h/d,2.5)?t.dtick=h/2:t.dtick=h:t.dtick=T:"M"===String(e.dtick).charAt(0)?u?t.dtick="M1":rt(h,d)?h>=12&&2===d&&(t.dtick="M3"):t.dtick=e.dtick:"L"===String(t.dtick).charAt(0)?"L"===String(e.dtick).charAt(0)?rt(h,d)||(t.dtick=nt(h/d,2.5)?e.dtick/2:e.dtick):t.dtick="D1":"D2"===t.dtick&&+e.dtick>1&&(t.dtick=1)}t.range=e.range}void 0===e.minor._tick0Init&&(t.tick0=e.tick0)},q.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if("auto"===t.tickmode||!t.dtick){var n,o=t.nticks;o||("category"===t.type||"multicategory"===t.type?(n=t.tickfont?s.bigFont(t.tickfont.size||12):15,o=t._length/n):(n="y"===t._id.charAt(0)?40:80,o=s.constrain(t._length/n,4,9)+1),"radialaxis"===t._name&&(o*=2)),t.minor&&"array"!==t.minor.tickmode||"array"===t.tickmode&&(o*=100),t._roughDTick=Math.abs(r[1]-r[0])/o,q.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}"period"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||"M"!==t.dtick.charAt(0))}var n=r(),o=q.getTickFormat(t);if(o){var a=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(o)||(/%[HI]/.test(o)?(e=C,a&&!n&&t.dtickt.range[1],f=!t.ticklabelindex||s.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],p=s.simpleMap(t.range,t.r2l,void 0,void 0,e),m=p[1]=(G?0:1);V--){var H=!V;V?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var W=V?t:s.extendFlat({},t,t.minor);if(H?q.prepMinorTicks(W,t,e):q.prepTicks(W,e),"array"!==W.tickmode)if("sync"!==W.tickmode){var Y=K(p),Z=Y[0],X=Y[1],$=i(W.dtick),J="log"===l&&!($||"L"===W.dtick.charAt(0)),Q=q.tickFirst(W,e);if(V){if(t._tmin=Q,Q=X:nt<=X;nt=q.tickIncrement(nt,it,m,c)){if(V&&tt++,W.rangebreaks&&!m){if(nt=F)break}if(N.length>R||nt===rt)break;rt=nt;var ot={value:nt};V?(J&&nt!==(0|nt)&&(ot.simpleLabel=!0),u>1&&tt%u&&(ot.skipLabel=!0),N.push(ot)):(ot.minor=!0,B.push(ot))}}else N=[],P=at(t);else V?(N=[],P=st(t,!H)):(B=[],j=st(t,!H))}!B||B.length<2?f=!1:(r=(B[1].value-B[0].value)*(d?-1:1),n=t.tickformat,(/%f/.test(n)?r>=O:/%L/.test(n)?r>=z:/%[SX]/.test(n)?r>=L:/%M/.test(n)?r>=E:/%[HI]/.test(n)?r>=C:/%p/.test(n)?r>=S:/%[Aadejuwx]/.test(n)?r>=T:/%[UVW]/.test(n)?r>=M:/%[Bbm]/.test(n)?r>=A:/%[q]/.test(n)?r>=_:!/%[Yy]/.test(n)||r>=b)||(f=!1));if(f){var lt=N.concat(B);h&&N.length&&(lt=lt.slice(1)),(lt=lt.sort((function(t,e){return t.value-e.value})).filter((function(t,e,r){return 0===e||t.value!==r[e-1].value}))).map((function(t,e){return void 0!==t.minor||t.skipLabel?null:e})).filter((function(t){return null!==t})).forEach((function(t){f.map((function(e){var r=t+e;r>=0&&r0?(o=n-1,a=n):(o=n,a=n);var s,l=t[o].value,c=t[a].value,u=Math.abs(c-l),h=r||u,d=0;h>=b?d=u>=b&&u<=g?u:v:r===x&&h>=_?d=u>=_&&u<=y?u:x:h>=A?d=u>=A&&u<=w?u:k:r===M&&h>=M?d=M:h>=T?d=T:r===S&&h>=S?d=S:r===C&&h>=C&&(d=C),d>=u&&(d=u,s=!0);var f=i+d;if(e.rangebreaks&&d>0){for(var p=0,m=0;m<84;m++){var E=(m+.5)/84;e.maskBreaks(i*(1-E)+E*f)!==I&&p++}(d*=p/84)||(t[n].drop=!0),s&&u>M&&(d=u)}(d>0||0===n)&&(t[n].periodX=i+d/2)}}(U,t,t._definedDelta),t.rangebreaks){var gt="y"===t._id.charAt(0),vt=1;"auto"===t.tickmode&&(vt=t.tickfont?t.tickfont.size:12);var bt=NaN;for(o=N.length-1;o>-1;o--)if(N[o].drop)N.splice(o,1);else{N[o].value=Rt(N[o].value,t);var yt=t.c2p(N[o].value);(gt?bt>yt-vt:btF||nF&&(r.periodX=F),n10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=T&&o<=10||e>=15*T)t._tickround="d";else if(e>=E&&o<=16||e>=C)t._tickround="M";else if(e>=L&&o<=19||e>=E)t._tickround="S";else{var a=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(o,a)-20,t._tickround<0&&(t._tickround=4)}}else if(i(e)||"L"===e.charAt(0)){var s=t.range.map(t.r2d||Number);i(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01),u=void 0===t.minexponent?3:t.minexponent;Math.abs(c)>u&&(yt(t.exponentformat)&&!xt(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function vt(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontTextcase:n.textcase,fontLineposition:n.lineposition,fontShadow:n.shadow,fontColor:n.color}}q.autoTicks=function(t,e,r){var n;function o(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar,0);var a=2*e;if(a>v)e/=v,n=o(10),t.dtick="M"+12*mt(e,n,lt);else if(a>k)e/=k,t.dtick="M"+mt(e,1,ct);else if(a>T){if(t.dtick=mt(e,T,t._hasDayOfWeekBreaks?[1,2,7,14]:ht),!r){var l=q.getTickFormat(t),c="period"===t.ticklabelmode;c&&(t._rawTick0=t.tick0),/%[uVW]/.test(l)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),c&&(t._dowTick0=t.tick0)}}else a>C?t.dtick=mt(e,C,ct):a>E?t.dtick=mt(e,E,ut):a>L?t.dtick=mt(e,L,ut):(n=o(10),t.dtick=mt(e,n,lt))}else if("log"===t.type){t.tick0=0;var u=s.simpleMap(t.range,t.r2l);if(t._isMinor&&(e*=1.5),e>.7)t.dtick=Math.ceil(e);else if(Math.abs(u[1]-u[0])<1){var h=1.5*Math.abs((u[1]-u[0])/e);e=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/h,n=o(10),t.dtick="L"+mt(e,n,lt)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type||"multicategory"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):Ft(t)?(t.tick0=0,n=1,t.dtick=mt(e,n,pt)):(t.tick0=0,n=o(10),t.dtick=mt(e,n,lt));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&"string"!=typeof t.dtick){var d=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(d)}},q.tickIncrement=function(t,e,r,o){var a=r?-1:1;if(i(e))return s.increment(t,a*e);var l=e.charAt(0),c=a*Number(e.substr(1));if("M"===l)return s.incrementMonth(t,c,o);if("L"===l)return Math.log(Math.pow(10,t)+c)/Math.LN10;if("D"===l){var u="D2"===e?ft:dt,h=t+.01*a,d=s.roundUp(s.mod(h,1),u,r);return Math.floor(h)+Math.log(n.round(Math.pow(10,d),1))/Math.LN10}throw"unrecognized dtick "+String(e)},q.tickFirst=function(t,e){var r=t.r2l||Number,o=s.simpleMap(t.range,r,void 0,void 0,e),a=o[1]=0&&r<=t._length?e:null};if(l&&s.isArrayOrTypedArray(t.ticktext)){var f=s.simpleMap(t.range,t.r2l),p=(Math.abs(f[1]-f[0])-(t._lBreaks||0))/1e4;for(o=0;o ")}else t._prevDateHead=l,c+="
"+l;e.text=c}(t,a,r,c):"log"===u?function(t,e,r,n,o){var a=t.dtick,l=e.x,c=t.tickformat,u="string"==typeof a&&a.charAt(0);if("never"===o&&(o=""),n&&"L"!==u&&(a="L3",u="L"),c||"L"===u)e.text=_t(Math.pow(10,l),t,o,n);else if(i(a)||"D"===u&&s.mod(l+.01,1)<.1){var h=Math.round(l),d=Math.abs(h),f=t.exponentformat;"power"===f||yt(f)&&xt(h)?(e.text=0===h?1:1===h?"10":"10"+(h>1?"":D)+d+"",e.fontSize*=1.25):("e"===f||"E"===f)&&d>2?e.text="1"+f+(h>0?"+":D)+d:(e.text=_t(Math.pow(10,l),t,"","fakehover"),"D1"===a&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(a);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if("D1"===t.dtick){var p=String(e.text).charAt(0);"0"!==p&&"1"!==p||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,a,0,c,g):"category"===u?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}(t,a):"multicategory"===u?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],o=void 0===i[1]?"":String(i[1]),a=void 0===i[0]?"":String(i[0]);r?e.text=a+" - "+o:(e.text=o,e.text2=a)}(t,a,r):Ft(t)?function(t,e,r,n,i){if("radians"!==t.thetaunit||r)e.text=_t(e.x,t,i,n);else{var o=e.x/180;if(0===o)e.text="0";else{var a=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){for(var r=1;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,i=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(o);if(a[1]>=100)e.text=_t(s.deg2rad(e.x),t,i,n);else{var l=e.x<0;1===a[1]?1===a[0]?e.text="π":e.text=a[0]+"π":e.text=["",a[0],"","⁄","",a[1],"","π"].join(""),l&&(e.text=D+e.text)}}}}(t,a,r,c,g):function(t,e,r,n,i){"never"===i?i="":"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=_t(e.x,t,i,n)}(t,a,0,c,g),n||(t.tickprefix&&!m(t.showtickprefix)&&(a.text=t.tickprefix+a.text),t.ticksuffix&&!m(t.showticksuffix)&&(a.text+=t.ticksuffix)),t.labelalias&&t.labelalias.hasOwnProperty(a.text)){var v=t.labelalias[a.text];"string"==typeof v&&(a.text=v)}return("boundaries"===t.tickson||t.showdividers)&&(a.xbnd=[d(a.x-.5),d(a.x+t.dtick-.5)]),a},q.hoverLabelText=function(t,e,r){r&&(t=s.extendFlat({},t,{hoverformat:r}));var n=s.isArrayOrTypedArray(e)?e[0]:e,i=s.isArrayOrTypedArray(e)?e[1]:void 0;if(void 0!==i&&i!==n)return q.hoverLabelText(t,n,r)+" - "+q.hoverLabelText(t,i,r);var o="log"===t.type&&n<=0,a=q.tickText(t,t.c2l(o?-n:n),"hover").text;return o?0===n?"0":D+a:a};var bt=["f","p","n","μ","m","","k","M","G","T"];function yt(t){return"SI"===t||"B"===t}function xt(t){return t>14||t<-15}function _t(t,e,r,n){var o=t<0,a=e._tickround,l=r||e.exponentformat||"B",c=e._tickexponent,u=q.getTickFormat(e),h=e.separatethousands;if(n){var d={exponentformat:l,minexponent:e.minexponent,dtick:"none"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};gt(d),a=(Number(d._tickround)||0)+4,c=d._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,D);var f,p=Math.pow(10,-a)/2;if("none"===l&&(c=0),(t=Math.abs(t))"+f+"
":"B"===l&&9===c?t+="B":yt(l)&&(t+=bt[c/3+5])),o?D+t:t}function wt(t,e){if(t){var r=Object.keys(B).reduce((function(t,r){return-1!==e.indexOf(r)&&B[r].forEach((function(e){t[e]=1})),t}),{});Object.keys(t).forEach((function(e){r[e]||(1===e.length?t[e]=0:delete t[e])}))}}function kt(t,e){for(var r=[],n={},i=0;i1&&r=i.min&&t=0,o=u(t,e[1])<=0;return(r||i)&&(n||o)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":for(e=0;e=a(i)))){r=n;break}break;case"log":for(e=0;e=0&&i.unshift(i.splice(n,1).shift())}}));var a={false:{left:0,right:0}};return s.syncOrAsync(i.map((function(e){return function(){if(e){var n=q.getFromId(t,e);r||(r={}),r.axShifts=a,r.overlayingShiftedAx=o;var i=q.drawOne(t,n,r);return n._shiftPusher&&Nt(n,n._fullDepth||0,a,!0),n._r=n.range.slice(),n._rl=s.simpleMap(n._r,n.r2l),i}}})))},q.drawOne=function(t,e,r){var n,i,l,f=(r=r||{}).axShifts||{},p=r.overlayingShiftedAx||[];e.setScale();var m=t._fullLayout,g=e._id,v=g.charAt(0),b=q.counterLetter(g),y=m._plots[e._mainSubplot];if(y){if(e._shiftPusher=e.autoshift||-1!==p.indexOf(e._id)||-1!==p.indexOf(e.overlaying),e._shiftPusher&"free"===e.anchor){var x=e.linewidth/2||0;"inside"===e.ticks&&(x+=e.ticklen),Nt(e,x,f,!0),Nt(e,e.shift||0,f,!1)}!0===r.skipTitle&&void 0!==e._shift||(e._shift=function(t,e){return t.autoshift?e[t.overlaying][t.side]:t.shift||0}(e,f));var _=y[v+"axislayer"],w=e._mainLinePosition,k=w+=e._shift,A=e._mainMirrorPosition,M=e._vals=q.calcTicks(e),T=[e.mirror,k,A].join("_");for(n=0;n0?r.bottom-u:0,h))));var d=0,f=0;if(e._shiftPusher&&(d=Math.max(h,r.height>0?"l"===l?u-r.left:r.right-u:0),e.title.text!==m._dfltTitle[v]&&(f=(e._titleStandoff||0)+(e._titleScoot||0),"l"===l&&(f+=Tt(e))),e._fullDepth=Math.max(d,f)),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1],g="number"==typeof e._shift?e._shift:0;if("x"===v){if("b"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?u-r.top:0,h),p.reverse()),r.width>0){var y=r.right-(e._offset+e._length);y>0&&(n.xr=1,n.r=y);var x=e._offset-r.left;x>0&&(n.xl=0,n.l=x)}}else if("l"===l?(e._depth=Math.max(r.height>0?u-r.left:0,h),n[l]=e._depth-g):(e._depth=Math.max(r.height>0?r.right-u:0,h),n[l]=e._depth+g,p.reverse()),r.height>0){var _=r.bottom-(e._offset+e._length);_>0&&(n.yb=0,n.b=_);var w=e._offset-r.top;w>0&&(n.yt=1,n.t=w)}n[b]="free"===e.anchor?e.position:e._anchorAxis.domain[p[0]],e.title.text!==m._dfltTitle[v]&&(n[l]+=Tt(e)+(e.title.standoff||0)),e.mirror&&"free"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[c]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[c]+=h),!0===e.mirror||"ticks"===e.mirror?i[b]=e._anchorAxis.domain[p[1]]:"all"!==e.mirror&&"allticks"!==e.mirror||(i[b]=[e._counterDomainMin,e._counterDomainMax][p[1]]))}ht&&(s=a.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),"string"==typeof e.automargin&&(wt(n,e.automargin),wt(i,e.automargin)),o.autoMargin(t,Et(e),n),o.autoMargin(t,Lt(e),i),o.autoMargin(t,zt(e),s)})),s.syncOrAsync(ct)}}function dt(t){var r=g+(t||"tick");return S[r]||(S[r]=function(t,e,r){var n,i,o,a;if(t._selections[e].size())n=1/0,i=-1/0,o=1/0,a=-1/0,t._selections[e].each((function(){var t=Ct(this),e=d.bBox(t.node().parentNode);n=Math.min(n,e.top),i=Math.max(i,e.bottom),o=Math.min(o,e.left),a=Math.max(a,e.right)}));else{var s=q.makeLabelFns(t,r);n=i=s.yFn({dx:0,dy:0,fontSize:0}),o=a=s.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:i,left:o,right:a,height:i-n,width:a-o}}(e,r,k)),S[r]}},q.getTickSigns=function(t,e){var r=t._id.charAt(0),n={x:"top",y:"right"}[r],i=t.side===n?1:-1,o=[-1,1,i,-i];return"inside"!==(e?(t.minor||{}).ticks:t.ticks)==("x"===r)&&(o=o.map((function(t){return-t}))),t.side&&o.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),o},q.makeTransTickFn=function(t){return"x"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},q.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||"",r=function(t){return-1!==e.indexOf(t)},n=r("top"),i=r("left"),o=r("right"),a=r("bottom"),s=r("inside"),l=a||i||n||o;if(!l&&!s)return[0,0];var c=t.side,u=l?(t.tickwidth||0)/2:0,h=3,d=t.tickfont?t.tickfont.size:12;return(a||n)&&(u+=d*V,h+=(t.linewidth||0)/2),(i||o)&&(u+=(t.linewidth||0)/2,h+=3),s&&"top"===c&&(h-=d*(1-V)),(i||n)&&(u=-u),"bottom"!==c&&"right"!==c||(h=-h),[l?u:0,s?h:0]}(t),r=t.ticklabelshift||0,n=t.ticklabelstandoff||0,i=e[0],o=e[1],a=t.range[0]>t.range[1],s=t.ticklabelposition&&-1!==t.ticklabelposition.indexOf("inside"),c=!s;if(r&&(r*=a?-1:1),n){var u=t.side;n*=s&&("top"===u||"left"===u)||c&&("bottom"===u||"right"===u)?1:-1}return"x"===t._id.charAt(0)?function(e){return l(i+t._offset+t.l2p(At(e))+r,o+n)}:function(e){return l(o+n,i+t._offset+t.l2p(At(e))+r)}},q.makeTickPath=function(t,e,r,n){n||(n={});var i=n.minor;if(i&&!t.minor)return"";var o=void 0!==n.len?n.len:i?t.minor.ticklen:t.ticklen,a=t._id.charAt(0),s=(t.linewidth||1)/2;return"x"===a?"M0,"+(e+s*r)+"v"+o*r:"M"+(e+s*r)+",0h"+o*r},q.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||"",o=function(t){return-1!==n.indexOf(t)},a=o("top"),l=o("left"),c=o("right"),u=o("bottom")||l||a||c,h=o("inside"),d="inside"===n&&"inside"===t.ticks||!h&&"outside"===t.ticks&&"boundaries"!==t.tickson,f=0,p=0,m=d?t.ticklen:0;if(h?m*=-1:u&&(m=0),d&&(f+=m,r)){var g=s.deg2rad(r);f=m*Math.cos(g)+1,p=m*Math.sin(g)}t.showticklabels&&(d||t.showline)&&(f+=.2*t.tickfont.size);var v,b,y,x,_,w={labelStandoff:f+=(t.linewidth||1)/2*(h?-1:1),labelShift:p},k=0,A=t.side,M=t._id.charAt(0),T=t.tickangle;if("x"===M)x=(_=!h&&"bottom"===A||h&&"top"===A)?1:-1,h&&(x*=-1),v=p*x,b=e+f*x,y=_?1:-.2,90===Math.abs(T)&&(h?y+=G:y=-90===T&&"bottom"===A?V:90===T&&"top"===A?G:.5,k=G/2*(T/90)),w.xFn=function(t){return t.dx+v+k*t.fontSize},w.yFn=function(t){return t.dy+b+t.fontSize*y},w.anchorFn=function(t,e){if(u){if(l)return"end";if(c)return"start"}return i(e)&&0!==e&&180!==e?e*x<0!==h?"end":"start":"middle"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side!==h?-n:0};else if("y"===M){if(x=(_=!h&&"left"===A||h&&"right"===A)?1:-1,h&&(x*=-1),v=f,b=p*x,y=0,h||90!==Math.abs(T)||(y=-90===T&&"left"===A||90===T&&"right"===A?V:.5),h){var S=i(T)?+T:0;if(0!==S){var C=s.deg2rad(S);k=Math.abs(Math.sin(C))*V*x,y=0}}w.xFn=function(t){return t.dx+e-(v+t.fontSize*y)*x+k*t.fontSize},w.yFn=function(t){return t.dy+b+t.fontSize*G},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?"middle":_?"end":"start"},w.heightFn=function(e,r,n){return"right"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},q.drawTicks=function(t,e,r){r=r||{};var i=e._id+"tick",o=[].concat(e.minor&&e.minor.ticks?r.vals.filter((function(t){return t.minor&&!t.noTick})):[]).concat(e.ticks?r.vals.filter((function(t){return!t.minor&&!t.noTick})):[]),a=r.layer.selectAll("path."+i).data(o,Mt);a.exit().remove(),a.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(t){return h.stroke(n.select(this),t.minor?e.minor.tickcolor:e.tickcolor)})).style("stroke-width",(function(r){return d.crispRound(t,r.minor?e.minor.tickwidth:e.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),jt(e,[j]),a.attr("transform",r.transFn)},q.drawGrid=function(t,e,r){if(r=r||{},"sync"!==e.tickmode){var i=e._id+"grid",o=e.minor&&e.minor.showgrid,a=o?r.vals.filter((function(t){return t.minor})):[],s=e.showgrid?r.vals.filter((function(t){return!t.minor})):[],l=r.counterAxis;if(l&&q.shouldShowZeroLine(t,e,l))for(var c="array"===e.tickmode,u=0;u=0;v--){var b=v?m:g;if(b){var y=b.selectAll("path."+i).data(v?s:a,Mt);y.exit().remove(),y.enter().append("path").classed(i,1).classed("crisp",!1!==r.crisp),y.attr("transform",r.transFn).attr("d",r.path).each((function(t){return h.stroke(n.select(this),t.minor?e.minor.gridcolor:e.gridcolor||"#ddd")})).style("stroke-dasharray",(function(t){return d.dashStyle(t.minor?e.minor.griddash:e.griddash,t.minor?e.minor.gridwidth:e.gridwidth)})).style("stroke-width",(function(t){return(t.minor?p:e._gw)+"px"})).style("display",null),"function"==typeof r.path&&y.attr("d",r.path)}}jt(e,[R,P])}},q.drawZeroLine=function(t,e,r){r=r||r;var n=e._id+"zl",i=q.shouldShowZeroLine(t,e,r.counterAxis),o=r.layer.selectAll("path."+n).data(i?[{x:0,id:e._id}]:[]);o.exit().remove(),o.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(t,e){return X(t.id,e.id)}))})),o.attr("transform",r.transFn).attr("d",r.path).call(h.stroke,e.zerolinecolor||h.defaultLine).style("stroke-width",d.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),jt(e,[F])},q.drawLabels=function(t,e,r){r=r||{};var o=t._fullLayout,a=e._id,u=r.cls||a+"tick",h=r.vals.filter((function(t){return t.text})),f=r.labelFns,p=r.secondary?0:e.tickangle,m=(e._prevTickAngles||{})[u],g=r.layer.selectAll("g."+u).data(e.showticklabels?h:[],Mt),v=[];function b(t,o){t.each((function(t){var a=n.select(this),s=a.select(".text-math-group"),u=f.anchorFn(t,o),h=r.transFn.call(a.node(),t)+(i(o)&&0!=+o?" rotate("+o+","+f.xFn(t)+","+(f.yFn(t)-t.fontSize/2)+")":""),p=c.lineCount(a),m=H*t.fontSize,g=f.heightFn(t,i(o)?+o:0,(p-1)*m);if(g&&(h+=l(0,g)),s.empty()){var v=a.select("text");v.attr({transform:h,"text-anchor":u}),v.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var b=d.bBox(s.node()).width*{end:-.5,start:.5}[u];s.attr("transform",h+l(b,0))}}))}g.enter().append("g").classed(u,1).append("text").attr("text-anchor","middle").each((function(e){var r=n.select(this),i=t._promises.length;r.call(c.positionText,f.xFn(e),f.yFn(e)).call(d.font,{family:e.font,size:e.fontSize,color:e.fontColor,weight:e.fontWeight,style:e.fontStyle,variant:e.fontVariant,textcase:e.fontTextcase,lineposition:e.fontLineposition,shadow:e.fontShadow}).text(e.text).call(c.convertToTspans,t),t._promises[i]?v.push(t._promises.pop().then((function(){b(r,p)}))):b(r,p)})),jt(e,[N]),g.exit().remove(),r.repositionOnUpdate&&g.each((function(t){n.select(this).select("text").call(c.positionText,f.xFn(t),f.yFn(t))})),e._adjustTickLabelsOverflow=function(){var r=e.ticklabeloverflow;if(r&&"allow"!==r){var i=-1!==r.indexOf("hide"),a="x"===e._id.charAt(0),l=0,c=a?t._fullLayout.width:t._fullLayout.height;if(-1!==r.indexOf("domain")){var u=s.simpleMap(e.range,e.r2l);l=e.l2p(u[0])+e._offset,c=e.l2p(u[1])+e._offset}var h=Math.min(l,c),f=Math.max(l,c),p=e.side,m=1/0,v=-1/0;for(var b in g.each((function(t){var r=n.select(this);if(r.select(".text-math-group").empty()){var o=d.bBox(r.node()),s=0;a?(o.right>f||o.leftf||o.top+(e.tickangle?0:t.fontSize/4)e["_visibleLabelMin_"+r._id]?l.style("display","none"):"tick"!==t.K||i||l.style("display",null)}))}))}))}))},b(g,m+1?m:p);var y=null;e._selections&&(e._selections[u]=g);var x=[function(){return v.length&&Promise.all(v)}];e.automargin&&o._redrawFromAutoMarginCount&&90===m?(y=m,x.push((function(){b(g,m)}))):x.push((function(){if(b(g,p),h.length&&e.autotickangles&&("log"!==e.type||"D"!==String(e.dtick).charAt(0))){y=e.autotickangles[0];var t,n=0,i=[],o=1;g.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),a=Ct(this),s=d.bBox(a.node());o=Math.max(o,c.lineCount(a)),i.push({top:0,bottom:10,height:10,left:r-s.width/2,right:r+s.width/2+2,width:s.width+2})}));var a=("boundaries"===e.tickson||e.showdividers)&&!r.secondary,l=h.length,u=Math.abs((h[l-1].x-h[0].x)*e._m)/(l-1),f=a?u/2:u,m=a?e.ticklen:1.25*n*o,v=f/Math.sqrt(Math.pow(f,2)+Math.pow(m,2)),x=e.autotickangles.map((function(t){return t*Math.PI/180})),_=x.find((function(t){return Math.abs(Math.cos(t))<=v}));void 0===_&&(_=x.reduce((function(t,e){return Math.abs(Math.cos(t))B*I&&(z=I,C[S]=E[S]=O[S])}var U=Math.abs(z-L);U-A>0?A*=1+A/(U-=A):A=0,"y"!==e._id.charAt(0)&&(A=-A),C[T]=w.p2r(w.r2p(E[T])+M*A),"min"===w.autorange||"max reversed"===w.autorange?(C[0]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0):"max"!==w.autorange&&"min reversed"!==w.autorange||(C[1]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0),o._insideTickLabelsUpdaterange[w._name+".range"]=C}var G=s.syncOrAsync(x);return G&&G.then&&t._promises.push(G),G},q.getPxPosition=function(t,e){var r,n=t._fullLayout._size,i=e._id.charAt(0),o=e.side;return"free"!==e.anchor?r=e._anchorAxis:"x"===i?r={_offset:n.t+(1-(e.position||0))*n.h,_length:0}:"y"===i&&(r={_offset:n.l+(e.position||0)*n.w+e._shift,_length:0}),"top"===o||"left"===o?r._offset:"bottom"===o||"right"===o?r._offset+r._length:void 0},q.shouldShowZeroLine=function(t,e,r){var n=s.simpleMap(e.range,e.r2l);return n[0]*n[1]<=0&&e.zeroline&&("linear"===e.type||"-"===e.type)&&!(e.rangebreaks&&e.maskBreaks(0)===I)&&(St(e,0)||!function(t,e,r,n){var i=r._mainAxis;if(i){var o=t._fullLayout,a=e._id.charAt(0),s=q.counterLetter(e._id),l=e._offset+(Math.abs(n[0])1)for(n=1;n{"use strict";var n=r(7370),i=r(12822),o=r(32994).BADNUM,a=i.isArrayOrTypedArray,s=i.isDateTime,l=i.cleanNumber,c=Math.round;function u(t,e){return e?n(t):"number"==typeof t}function h(t){return Math.max(1,(t-1)/1e3)}t.exports=function(t,e,r){var i=t,d=r.noMultiCategory;if(a(i)&&!i.length)return"-";if(!d&&function(t){return a(t[0])&&a(t[1])}(i))return"multicategory";if(d&&Array.isArray(i[0])){for(var f=[],p=0;p2*a}(i,e))return"date";var g="strict"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=h(r),i=0,a=0,s={},u=0;u2*i}(i,g)?"category":function(t,e){for(var r=t.length,n=0;n{"use strict";var n=r(7370),i=r(25059),o=r(12822),a=r(46121),s=r(35677),l=r(86130),c=r(49342),u=r(8736),h=r(84411),d=r(12213),f=r(33322),p=r(65412),m=r(46458),g=r(30632),v=r(21197).WEEKDAY_PATTERN,b=r(21197).HOUR_PATTERN;function y(t,e,r){function i(r,n){return o.coerce(t,e,l.rangebreaks,r,n)}if(i("enabled")){var a=i("bounds");if(a&&a.length>=2){var s,c,u="";if(2===a.length)for(s=0;s<2;s++)if(c=_(a[s])){u=v;break}var h=i("pattern",u);if(h===v)for(s=0;s<2;s++)(c=_(a[s]))&&(e.bounds[s]=a[s]=c-1);if(h)for(s=0;s<2;s++)switch(c=a[s],h){case v:if(!n(c))return void(e.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(e.enabled=!1);e.bounds[s]=a[s]=c;break;case b:if(!n(c))return void(e.enabled=!1);if((c=+c)<0||c>24)return void(e.enabled=!1);e.bounds[s]=a[s]=c}if(!1===r.autorange){var d=r.range;if(d[0]d[1])return void(e.enabled=!1)}else if(a[0]>d[0]&&a[1]{"use strict";var n=r(77201),i=n.FORMAT_LINK,o=n.DATE_FORMAT_LINK;function a(t,e){return["Sets the "+t+" formatting rule"+(e?"for `"+e+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+i+"."].join(" ")}function s(t,e){return a(t,e)+[" And for dates see: "+o+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}t.exports={axisHoverFormat:function(t,e){return{valType:"string",dflt:"",editType:"none",description:(e?a:s)("hover text",t)+["By default the values are formatted using "+(e?"generic number format":"`"+t+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:a,descriptionWithDates:s}},99246:(t,e,r)=>{"use strict";var n=r(25059),i=r(21197);function o(t,e){if(e&&e.length)for(var r=0;rn?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},e.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(" ")[0]},e.isLinked=function(t,e){return o(e,t._axisMatchGroups)||o(e,t._axisConstraintGroups)}},33322:(t,e,r)=>{"use strict";var n=r(98507).isTypedArraySpec;t.exports=function(t,e,r,i){if("category"===e.type){var o,a=t.categoryarray,s=Array.isArray(a)&&a.length>0||n(a);s&&(o="array");var l,c=r("categoryorder",o);"array"===c&&(l=r("categoryarray")),s||"array"!==c||(c=e.categoryorder="trace"),"trace"===c?e._initialCategories=[]:"array"===c?e._initialCategories=l.slice():(l=function(t,e){var r,n,i,o=e.dataAttr||t._id.charAt(0),a={};if(e.axData)r=e.axData;else for(r=[],n=0;n{"use strict";var n=r(7370),i=r(12822),o=r(32994),a=o.ONEDAY,s=o.ONEWEEK;e.dtick=function(t,e){var r="log"===e,i="date"===e,o="category"===e,s=i?a:1;if(!t)return s;if(n(t))return(t=Number(t))<=0?s:o?Math.max(1,Math.round(t)):i?Math.max(.1,t):t;if("string"!=typeof t||!i&&!r)return s;var l=t.charAt(0),c=t.substr(1);return(c=n(c)?Number(c):0)<=0||!(i&&"M"===l&&c===Math.round(c)||r&&"L"===l||r&&"D"===l&&(1===c||2===c))?s:t},e.tick0=function(t,e,r,o){return"date"===e?i.cleanDate(t,i.dateTick0(r,o%s==0?1:0)):"D1"!==o&&"D2"!==o?n(t)?Number(t):0:void 0}},21197:(t,e,r)=>{"use strict";var n=r(46233).counter;t.exports={idRegex:{x:n("x","( domain)?"),y:n("y","( domain)?")},attrRegex:n("[xy]axis"),xAxisMatch:n("xaxis"),yAxisMatch:n("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}},69352:(t,e,r)=>{"use strict";var n=r(12822),i=r(19496),o=r(99246).id2name,a=r(86130),s=r(92578),l=r(30632),c=r(32994).ALMOST_EQUAL,u=r(89701).FROM_BL;function h(t,e,r){var i=r.axIds,s=r.layoutOut,l=r.hasImage,c=s._axisConstraintGroups,u=s._axisMatchGroups,h=e._id,m=h.charAt(0),g=((s._splomAxes||{})[m]||{})[h]||{},v=e._id,b="x"===v.charAt(0);function y(r,i){return n.coerce(t,e,a,r,i)}e._matchGroup=null,e._constraintGroup=null,y("constrain",l?"domain":"range"),n.coerce(t,e,{constraintoward:{valType:"enumerated",values:b?["left","center","right"]:["bottom","middle","top"],dflt:b?"center":"middle"}},"constraintoward");var x,_,w=e.type,k=[];for(x=0;xn?i.substr(n):o.substr(r))+a:i+o+t*e:a}function g(t,e){for(var r=e._size,n=r.h/r.w,i={},o=Object.keys(t),a=0;ac*y)||k)for(r=0;rD&&Pz&&(z=P);d/=(z-L)/(2*O),L=l.l2r(L),z=l.l2r(z),l.range=l._input.range=S{"use strict";var n=r(27941),i=r(12822),o=i.numberFormat,a=r(18106),s=r(17520),l=r(25059),c=i.strTranslate,u=r(80394),h=r(17499),d=r(40666),f=r(70410),p=r(75815),m=r(76292),g=r(19846),v=r(14295),b=v.selectingOrDrawing,y=v.freeMode,x=r(89701).FROM_TL,_=r(86748),w=r(39004).redrawReglTraces,k=r(51137),A=r(99246).getFromId,M=r(70059).prepSelect,T=r(70059).clearOutline,S=r(70059).selectOnClick,C=r(92578),E=r(21197),L=E.MINDRAG,z=E.MINZOOM,O=!0;function D(t,e,r,n){var o=i.ensureSingle(t.draglayer,e,r,(function(e){e.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",t.id)}));return o.call(m,n),o.node()}function I(t,e,r,i,o,a,s){var l=D(t,"rect",e,r);return n.select(l).call(d.setRect,i,o,a,s),l}function F(t,e){for(var r=0;r=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function N(t,e,r,n,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",c(r,n)).attr("d",i+"Z")}function B(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:h.background,stroke:h.defaultLine,"stroke-width":1,opacity:0}).attr("transform",c(e,r)).attr("d","M0,0Z")}function U(t,e,r,n,i,o){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),G(t,e,i,o)}function G(t,e,r,n){r||(t.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function V(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function H(t){O&&t.data&&t._context.showTips&&(i.notifier(i._(t,"Double-click to zoom back out"),"long"),O=!1)}function W(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,z)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function q(t,e,r,n,o){for(var a,s,l,c,u=!1,h={},d={},f=(o||{}).xaHash,p=(o||{}).yaHash,m=0;m=0)i._fullLayout._deactivateShape(i);else{var a=i._fullLayout.clickmode;if(V(i),2!==t||vt||Ht(),gt)a.indexOf("select")>-1&&S(r,i,$,J,e.id,zt),a.indexOf("event")>-1&&f.click(i,r,e.id);else if(1===t&&vt){var s=m?D:O,c="s"===m||"w"===v?0:1,h=s._name+".range["+c+"]",d=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return"date"===t.type?n:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,o("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,o("."+String(r)+"g")(n))}(s,c),p="left",g="middle";if(s.fixedrange)return;m?(g="n"===m?"top":"bottom","right"===s.side&&(p="right")):"e"===v&&(p="right"),i._context.showAxisRangeEntryBoxes&&n.select(xt).call(u.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(d),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:p,verticalAlign:g}).on("edit",(function(t){var e=s.d2r(t);void 0!==e&&l.call("_guiRelayout",i,h,e)}))}}}function It(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(tt,ft*e+_t)),i=Math.max(0,Math.min(et,pt*r+wt)),o=Math.abs(n-_t),a=Math.abs(i-wt);function s(){St="",kt.r=kt.l,kt.t=kt.b,Et.attr("d","M0,0Z")}if(kt.l=Math.min(_t,n),kt.r=Math.max(_t,n),kt.t=Math.min(wt,i),kt.b=Math.max(wt,i),rt.isSubplotConstrained)o>z||a>z?(St="xy",o/tt>a/et?(a=o*et/tt,wt>i?kt.t=wt-a:kt.b=wt+a):(o=a*tt/et,_t>n?kt.l=_t-o:kt.r=_t+o),Et.attr("d",W(kt))):s();else if(nt.isSubplotConstrained)if(o>z||a>z){St="xy";var l=Math.min(kt.l/tt,(et-kt.b)/et),c=Math.max(kt.r/tt,(et-kt.t)/et);kt.l=l*tt,kt.r=c*tt,kt.b=(1-l)*et,kt.t=(1-c)*et,Et.attr("d",W(kt))}else s();else!ot||a0){var u;if(nt.isSubplotConstrained||!it&&1===ot.length){for(u=0;u<$.length;u++)$[u].range=$[u]._r.slice(),C($[u],1-r/et);a=(e=r*tt/et)/2}if(nt.isSubplotConstrained||!ot&&1===it.length){for(u=0;u1&&(void 0!==o.maxallowed&&st===(o.range[0]1&&(void 0!==a.maxallowed&<===(a.range[0]{"use strict";var n=r(27941),i=r(70410),o=r(19846),a=r(76292),s=r(45731).makeDragBox,l=r(21197).DRAGGERSIZE;e.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot)n.select(t).selectAll(".drag").remove();else if(r._has("cartesian")||r._has("splom")){Object.keys(r._plots||{}).sort((function(t,e){if((r._plots[t].mainplot&&!0)===(r._plots[e].mainplot&&!0)){var n=t.split("y"),i=e.split("y");return n[0]===i[0]?Number(n[1]||1)-Number(i[1]||1):Number(n[0]||1)-Number(i[0]||1)}return r._plots[t].mainplot?1:-1})).forEach((function(e){var n=r._plots[e],a=n.xaxis,c=n.yaxis;if(!n.mainplot){var u=s(t,n,a._offset,c._offset,a._length,c._length,"ns","ew");u.onmousemove=function(r){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===e&&t._fullLayout._plots[e]&&i.hover(t,r,e)},i.hover(t,r,e),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=e},u.onmouseout=function(e){t._dragging||(t._fullLayout._hoversubplot=null,o.unhover(t,e))},t._context.showAxisDragHandles&&(s(t,n,a._offset-l,c._offset-l,l,l,"n","w"),s(t,n,a._offset+a._length,c._offset-l,l,l,"n","e"),s(t,n,a._offset-l,c._offset+c._length,l,l,"s","w"),s(t,n,a._offset+a._length,c._offset+c._length,l,l,"s","e"))}if(t._context.showAxisDragHandles){if(e===a._mainSubplot){var h=a._mainLinePosition;"top"===a.side&&(h-=l),s(t,n,a._offset+.1*a._length,h,.8*a._length,l,"","ew"),s(t,n,a._offset,h,.1*a._length,l,"","w"),s(t,n,a._offset+.9*a._length,h,.1*a._length,l,"","e")}if(e===c._mainSubplot){var d=c._mainLinePosition;"right"!==c.side&&(d-=l),s(t,n,d,c._offset+.1*c._length,l,.8*c._length,"ns",""),s(t,n,d,c._offset+.9*c._length,l,.1*c._length,"s",""),s(t,n,d,c._offset,l,.1*c._length,"n","")}}}));var a=r._hoverlayer.node();a.onmousemove=function(e){e.target=t._fullLayout._lasthover,i.hover(t,e,r._hoversubplot)},a.onclick=function(e){e.target=t._fullLayout._lasthover,i.click(t,e)},a.onmousedown=function(e){t._fullLayout._lasthover.onmousedown(e)},e.updateFx(t)}},e.updateFx=function(t){var e=t._fullLayout,r="pan"===e.dragmode?"move":"crosshair";a(e._draggers,r)}},39859:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822),o=r(99246);t.exports=function(t){return function(e,r){var a=e[t];if(Array.isArray(a))for(var s=n.subplotsRegistry.cartesian,l=s.idRegex,c=r._subplots,u=c.xaxis,h=c.yaxis,d=c.cartesian,f=r._has("cartesian")||r._has("gl2d"),p=0;p{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=r(51137),s=r(40666),l=r(47388).eV,c=r(99246),u=r(21197),h=r(25853),d=o.ensureSingle;function f(t,e,r){return o.ensureSingle(t,e,r,(function(t){t.datum(r)}))}var p=u.zindexSeparator;function m(t,e,r,o,a){for(var c,h,d,f=u.traceLayerClasses,p=t._fullLayout,m=p._zindices,g=p._modules,v=[],b=[],y=0;y1)if(l)e.xlines=d(n,"path","xlines-above"),e.ylines=d(n,"path","ylines-above"),e.xaxislayer=d(n,"g","xaxislayer-above"),e.yaxislayer=d(n,"g","yaxislayer-above");else{if(!o){var h=d(n,"g","layer-subplot");e.shapelayer=d(h,"g","shapelayer"),e.imagelayer=d(h,"g","imagelayer"),e.minorGridlayer=d(n,"g","minor-gridlayer"),e.gridlayer=d(n,"g","gridlayer"),e.zerolinelayer=d(n,"g","zerolinelayer");var m=d(n,"g","layer-between");e.shapelayerBetween=d(m,"g","shapelayer"),e.imagelayerBetween=d(m,"g","imagelayer"),d(n,"path","xlines-below"),d(n,"path","ylines-below"),e.overlinesBelow=d(n,"g","overlines-below"),d(n,"g","xaxislayer-below"),d(n,"g","yaxislayer-below"),e.overaxesBelow=d(n,"g","overaxes-below")}e.overplot=d(n,"g","overplot"),e.plot=d(e.overplot,"g",i),o||(e.xlines=d(n,"path","xlines-above"),e.ylines=d(n,"path","ylines-above"),e.overlinesAbove=d(n,"g","overlines-above"),d(n,"g","xaxislayer-above"),d(n,"g","yaxislayer-above"),e.overaxesAbove=d(n,"g","overaxes-above"),e.xlines=n.select(".xlines-"+a),e.ylines=n.select(".ylines-"+s),e.xaxislayer=n.select(".xaxislayer-"+a),e.yaxislayer=n.select(".yaxislayer-"+s))}else{var g=e.mainplotinfo,v=g.plotgroup,b=i+"-x",y=i+"-y";e.minorGridlayer=g.minorGridlayer,e.gridlayer=g.gridlayer,e.zerolinelayer=g.zerolinelayer,d(g.overlinesBelow,"path",b),d(g.overlinesBelow,"path",y),d(g.overaxesBelow,"g",b),d(g.overaxesBelow,"g",y),e.plot=d(g.overplot,"g",i),d(g.overlinesAbove,"path",b),d(g.overlinesAbove,"path",y),d(g.overaxesAbove,"g",b),d(g.overaxesAbove,"g",y),e.xlines=v.select(".overlines-"+a).select("."+b),e.ylines=v.select(".overlines-"+s).select("."+y),e.xaxislayer=v.select(".overaxes-"+a).select("."+b),e.yaxislayer=v.select(".overaxes-"+s).select("."+y)}o||(l||(f(e.minorGridlayer,"g",e.xaxis._id),f(e.minorGridlayer,"g",e.yaxis._id),e.minorGridlayer.selectAll("g").map((function(t){return t[0]})).sort(c.idSort),f(e.gridlayer,"g",e.xaxis._id),f(e.gridlayer,"g",e.yaxis._id),e.gridlayer.selectAll("g").map((function(t){return t[0]})).sort(c.idSort)),e.xlines.style("fill","none").classed("crisp",!0),e.ylines.style("fill","none").classed("crisp",!0))}function v(t,e){if(t){var r={};for(var i in t.each((function(t){var i=t[0];n.select(this).remove(),b(i,e),r[i]=!0})),e._plots)for(var o=e._plots[i].overlays||[],a=0;a0){var g=f.id;if(-1!==g.indexOf(p))continue;g+=p+(u+1),f=o.extendFlat({},f,{id:g,plot:a._cartesianlayer.selectAll(".subplot").select("."+g)})}for(var v,b=[],y=0;y1&&(w+=p+_),x.push(n+w),r=0;r{"use strict";var n=r(75058),i=r(84226),o=r(68057).T,a=r(98260).extendFlat,s=r(46121).templatedArray,l=r(60393).descriptionWithDates,c=r(32994).ONEDAY,u=r(21197),h=u.HOUR_PATTERN,d=u.WEEKDAY_PATTERN,f={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0},description:["Sets the tick mode for this axis.","If *auto*, the number of ticks is set via `nticks`.","If *linear*, the placement of the ticks is determined by","a starting position `tick0` and a tick step `dtick`","(*linear* is the default value if `tick0` and `dtick` are provided).","If *array*, the placement of the ticks is set via `tickvals`","and the tick text is `ticktext`.","(*array* is the default value if `tickvals` is provided)."].join(" ")},p=a({},f,{values:f.values.slice().concat(["sync"]),description:[f.description,"If *sync*, the number of ticks will sync with the overlayed axis","set by `overlaying` property."].join(" ")});function m(t){return{valType:"integer",min:0,dflt:t?5:0,editType:"ticks",description:["Specifies the maximum number of ticks for the particular axis.","The actual number of ticks will be chosen automatically to be","less than or equal to `nticks`.","Has an effect only if `tickmode` is set to *auto*."].join(" ")}}var g={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the placement of the first tick on this axis.","Use with `dtick`.","If the axis `type` is *log*, then you must take the log of your starting tick","(e.g. to set the starting tick to 100, set the `tick0` to 2)","except when `dtick`=*L* (see `dtick` for more info).","If the axis `type` is *date*, it should be a date string, like date data.","If the axis `type` is *category*, it should be a number, using the scale where","each category is assigned a serial number from zero in the order it appears."].join(" ")},v={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the step in-between ticks on this axis. Use with `tick0`.","Must be a positive number, or special strings available to *log* and *date* axes.","If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n","is the tick number. For example,","to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1.","To set tick marks at 1, 100, 10000, ... set dtick to 2.","To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433.","*log* has several special values; *L*, where `f` is a positive number,","gives ticks linearly spaced in value (but not position).","For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc.","To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5).","`tick0` is ignored for *D1* and *D2*.","If the axis `type` is *date*, then you must convert the time to milliseconds.","For example, to set the interval between ticks to one day,","set `dtick` to 86400000.0.","*date* also has special values *M* gives ticks spaced by a number of months.","`n` must be a positive integer.","To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*.","To set ticks every 4 years, set `dtick` to *M48*"].join(" ")},b={valType:"data_array",editType:"ticks",description:["Sets the values at which ticks on this axis appear.","Only has an effect if `tickmode` is set to *array*.","Used with `ticktext`."].join(" ")},y={valType:"enumerated",values:["outside","inside",""],editType:"ticks",description:["Determines whether ticks are drawn or not.","If **, this axis' ticks are not drawn.","If *outside* (*inside*), this axis' are drawn outside (inside)","the axis lines."].join(" ")};function x(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick length (in px)."};return t||(e.dflt=5),e}function _(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick width (in px)."};return t||(e.dflt=1),e}var w={valType:"color",dflt:i.defaultLine,editType:"ticks",description:"Sets the tick color."},k={valType:"color",dflt:i.lightLine,editType:"ticks",description:"Sets the color of the grid lines."};function A(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the width (in px) of the grid lines."};return t||(e.dflt=1),e}var M=a({},o,{editType:"ticks"}),T={valType:"boolean",editType:"ticks",description:["Determines whether or not grid lines are drawn.","If *true*, the grid lines are drawn at every tick mark."].join(" ")};t.exports={visible:{valType:"boolean",editType:"plot",description:["A single toggle to hide the axis while preserving interaction like dragging.","Default is true when a cheater plot is present on the axis, otherwise","false"].join(" ")},color:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:["Sets default for all colors associated with this axis","all at once: line, font, tick, and grid colors.","Grid color is lightened by blending this with the plot background","Individual pieces can override this."].join(" ")},title:{text:{valType:"string",editType:"ticks",description:["Sets the title of this axis.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:n({editType:"ticks",description:["Sets this axis' title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),standoff:{valType:"number",min:0,editType:"ticks",description:["Sets the standoff distance (in px) between the axis labels and the title text","The default value is a function of the axis tick labels, the title `font.size`","and the axis `linewidth`.","Note that the axis title position is always constrained within the margins,","so the actual standoff distance is always less than the set or default value.","By setting `standoff` and turning on `automargin`, plotly.js will push the","margins to fit the axis title at given standoff distance."].join(" ")},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0,description:["Sets the axis type.","By default, plotly attempts to determined the axis type","by looking into the data of the traces that referenced","the axis in question."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","Defaults to layout.autotypenumbers."].join(" ")},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range of this axis is","computed in relation to the input data.","See `rangemode` for more info.","If `range` is provided and it has a value for both the","lower and upper bound, `autorange` is set to *false*.","Using *min* applies autorange only to set the minimum.","Using *max* applies autorange only to set the maximum.","Using *min reversed* applies autorange only to set the minimum on a reversed axis.","Using *max reversed* applies autorange only to set the maximum on a reversed axis.","Using *reversed* applies autorange on both ends and reverses the axis direction."].join(" ")},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange minimum."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange maximum."].join(" ")},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange minimum if it goes beyond this value.","Has no effect when `autorangeoptions.minallowed` is provided."].join(" ")},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange maximum if it goes beyond this value.","Has no effect when `autorangeoptions.maxallowed` is provided."].join(" ")},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Ensure this value is included in autorange."].join(" ")},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot",description:["If *normal*, the range is computed in relation to the extrema","of the input data.","If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data.","Applies only to linear axes."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0,description:["Sets the range of this axis.","If the axis `type` is *log*, then you must take the log of your","desired range (e.g. to set the range from 1 to 100,","set the range from 0 to 2).","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears.","Leaving either or both elements `null` impacts the default `autorange`."].join(" ")},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the minimum range of this axis."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the maximum range of this axis."].join(" ")},fixedrange:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not this axis is zoom-able.","If true, then zoom is disabled."].join(" ")},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Could be used to set the desired inside range of this axis","(excluding the labels) when `ticklabelposition` of","the anchored axis has *inside*.","Not implemented for axes with `type` *log*.","This would be ignored when `range` is provided."].join(" ")},scaleanchor:{valType:"enumerated",values:[u.idRegex.x.toString(),u.idRegex.y.toString(),!1],editType:"plot",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","changes together with the range of the corresponding axis","such that the scale of pixels per unit is in a constant ratio.","Both axes are still zoomable, but when you zoom one, the other will","zoom the same amount, keeping a fixed midpoint.","`constrain` and `constraintoward` determine how we enforce the constraint.","You can chain these, ie `yaxis: {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}`","but you can only link axes of the same `type`.","The linked axis can have the opposite letter (to constrain the aspect ratio)","or the same letter (to match scales across subplots).","Loops (`yaxis: {scaleanchor: *x*}, xaxis: {scaleanchor: *y*}` or longer) are redundant","and the last constraint encountered will be ignored to avoid possible","inconsistent constraints via `scaleratio`.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Setting `false` allows to remove a default constraint (occasionally,","you may need to prevent a default `scaleanchor` constraint from",'being applied, eg. when having an image trace `yaxis: {scaleanchor: "x"}`',"is set automatically in order for pixels to be rendered as squares,","setting `yaxis: {scaleanchor: false}` allows to remove the constraint)."].join(" ")},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot",description:["If this axis is linked to another by `scaleanchor`, this determines the pixel","to unit scale ratio. For example, if this value is 10, then every unit on","this axis spans 10 times the number of pixels as a unit on the linked axis.","Use this for example to create an elevation profile where the vertical scale","is exaggerated a fixed amount with respect to the horizontal."].join(" ")},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines how that happens:","by increasing the *range*, or by decreasing the *domain*.","Default is *domain* for axes containing image traces, *range* otherwise."].join(" ")},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines which direction we push","the originally specified plot area. Options are *left*, *center* (default),","and *right* for x axes, and *top*, *middle* (default), and *bottom* for y axes."].join(" ")},matches:{valType:"enumerated",values:[u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"calc",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","will match the range of the corresponding axis in data-coordinates space.","Moreover, matching axes share auto-range values, category lists and","histogram auto-bins.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Moreover, note that matching axes must have the same `type`."].join(" ")},rangebreaks:s("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this axis rangebreak is enabled or disabled.","Please note that `rangebreaks` only work for *date* axis type."].join(" ")},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc",description:["Sets the lower and upper bounds of this axis rangebreak.","Can be used with `pattern`."].join(" ")},pattern:{valType:"enumerated",values:[d,h,""],editType:"calc",description:["Determines a pattern on the time line that generates breaks.","If *"+d+"* - days of the week in English e.g. 'Sunday' or `sun`","(matching is case-insensitive and considers only the first three characters),","as well as Sunday-based integers between 0 and 6.","If *"+h+"* - hour (24-hour clock) as decimal numbers between 0 and 24.","for more info.","Examples:","- { pattern: '"+d+"', bounds: [6, 1] }"," or simply { bounds: ['sat', 'mon'] }"," breaks from Saturday to Monday (i.e. skips the weekends).","- { pattern: '"+h+"', bounds: [17, 8] }"," breaks from 5pm to 8am (i.e. skips non-work hours)."].join(" ")},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"},description:["Sets the coordinate values corresponding to the rangebreaks.","An alternative to `bounds`.","Use `dvalue` to set the size of the values along the axis."].join(" ")},dvalue:{valType:"number",editType:"calc",min:0,dflt:c,description:["Sets the size of each `values` item.","The default is one day in milliseconds."].join(" ")},editType:"calc"}),tickmode:p,nticks:m(),tick0:g,dtick:v,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks",description:["Sets the spacing between tick labels as compared to the spacing between ticks.","A value of 1 (default) means each tick gets a label.","A value of 2 means shows every 2nd label.","A larger value n means only every nth tick is labeled.","`tick0` determines which labels are shown.","Not implemented for axes with `type` *log* or *multicategory*, or when `tickmode` is *array*."].join(" ")},tickvals:b,ticktext:{valType:"data_array",editType:"ticks",description:["Sets the text displayed at the ticks position via `tickvals`.","Only has an effect if `tickmode` is set to *array*.","Used with `tickvals`."].join(" ")},ticks:y,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks",description:["Determines where ticks and grid lines are drawn with respect to their","corresponding tick labels.","Only has an effect for axes of `type` *category* or *multicategory*.","When set to *boundaries*, ticks and grid lines are drawn half a category","to the left/bottom of labels."].join(" ")},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks",description:["Determines where tick labels are drawn with respect to their","corresponding ticks and grid lines.","Only has an effect for axes of `type` *date*","When set to *period*, tick labels are drawn in the middle of the period","between ticks."].join(" ")},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc",description:["Determines where tick labels are drawn with respect to the axis","Please note that","top or bottom has no effect on x axes or when `ticklabelmode` is set to *period*.","Similarly","left or right has no effect on y axes or when `ticklabelmode` is set to *period*.","Has no effect on *multicategory* axes or when `tickson` is set to *boundaries*.","When used on axes linked by `matches` or `scaleanchor`,","no extra padding for inside labels would be added by autorange,","so that the scales could match."].join(" ")},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc",description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","Otherwise on *category* and *multicategory* axes the default is *allow*.","In other cases the default is *hide past div*."].join(" ")},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks",description:["Shifts the tick labels by the specified number of pixels in parallel to the axis.","Positive values move the labels in the positive direction of the axis."].join(" ")},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks",description:["Sets the standoff distance (in px) between the axis tick labels and their default position.","A positive `ticklabelstandoff` moves the labels farther away from the plot area","if `ticklabelposition` is *outside*, and deeper into the plot area if","`ticklabelposition` is *inside*. A negative `ticklabelstandoff` works in the opposite","direction, moving outside ticks towards the plot area and inside ticks towards","the outside. If the negative value is large enough, inside ticks can even end up","outside and vice versa."].join(" ")},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc",description:["Only for axes with `type` *date* or *linear*.","Instead of drawing the major tick label, draw the label for the minor tick","that is n positions away from the major tick. E.g. to always draw the label for the","minor tick before each major tick, choose `ticklabelindex` -1. This is useful for date","axes with `ticklabelmode` *period* if you want to label the period that ends with each","major tick instead of the period that begins there."].join(" ")},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle",description:["Determines if the axis lines or/and ticks are mirrored to","the opposite side of the plotting area.","If *true*, the axis lines are mirrored.","If *ticks*, the axis lines and ticks are mirrored.","If *false*, mirroring is disable.","If *all*, axis lines are mirrored on all shared-axes subplots.","If *allticks*, axis lines and ticks are mirrored","on all shared-axes subplots."].join(" ")},ticklen:x(),tickwidth:_(),tickcolor:w,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks",description:"Determines whether or not the tick labels are drawn."},labelalias:{valType:"any",dflt:!1,editType:"ticks",description:["Replacement text for specific tick or hover labels.","For example using {US: 'USA', CA: 'Canada'} changes US to USA","and CA to Canada. The labels we would have shown must match","the keys exactly, after adding any tickprefix or ticksuffix.","For negative numbers the minus sign symbol used (U+2212) is wider than the regular ascii dash.","That means you need to use −1 instead of -1.","labelalias can be used with any axis type, and both keys (if needed)","and values (if desired) can include html-like tags or MathJax."].join(" ")},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks",description:["Determines whether long tick labels automatically grow the figure","margins."].join(" ")},showspikes:{valType:"boolean",dflt:!1,editType:"modebar",description:["Determines whether or not spikes (aka droplines) are drawn for this axis.","Note: This only takes affect when hovermode = closest"].join(" ")},spikecolor:{valType:"color",dflt:null,editType:"none",description:"Sets the spike color. If undefined, will use the series color"},spikethickness:{valType:"number",dflt:3,editType:"none",description:"Sets the width (in px) of the zero line."},spikedash:a({},o,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none",description:["Determines the drawing mode for the spike line","If *toaxis*, the line is drawn from the data point to the axis the ","series is plotted on.","If *across*, the line is drawn across the entire plot area, and","supercedes *toaxis*.","If *marker*, then a marker dot is drawn on the axis the series is","plotted on"].join(" ")},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none",description:"Determines whether spikelines are stuck to the cursor or to the closest datapoints."},tickfont:n({editType:"ticks",description:"Sets the tick font."}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks",description:["Sets the angle of the tick labels with respect to the horizontal.","For example, a `tickangle` of -90 draws the tick labels","vertically."].join(" ")},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks",description:["When `tickangle` is set to *auto*, it will be set to the first","angle in this array that is large enough to prevent label","overlap."].join(" ")},tickprefix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label prefix."},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all tick labels are displayed with a prefix.","If *first*, only the first tick is displayed with a prefix.","If *last*, only the last tick is displayed with a suffix.","If *none*, tick prefixes are hidden."].join(" ")},ticksuffix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label suffix."},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:"Same as `showtickprefix` but for tick suffixes."},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all exponents are shown besides their significands.","If *first*, only the exponent of the first tick is shown.","If *last*, only the exponent of the last tick is shown.","If *none*, no exponents appear."].join(" ")},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks",description:["Determines a formatting rule for the tick exponents.","For example, consider the number 1,000,000,000.","If *none*, it appears as 1,000,000,000.","If *e*, 1e+9.","If *E*, 1E+9.","If *power*, 1x10^9 (with 9 in a super script).","If *SI*, 1G.","If *B*, 1B."].join(" ")},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks",description:["Hide SI prefix for 10^n if |n| is below this number.","This only has an effect when `tickformat` is *SI* or *B*."].join(" ")},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks",description:['If "true", even 4-digit integers are separated'].join(" ")},tickformat:{valType:"string",dflt:"",editType:"ticks",description:l("tick label")},tickformatstops:s("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not this stop is used.","If `false`, this stop is ignored even within its `dtickrange`."].join(" ")},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks",description:["range [*min*, *max*], where *min*, *max* - dtick values","which describe some zoom level, it is possible to omit *min*","or *max* value by passing *null*"].join(" ")},value:{valType:"string",dflt:"",editType:"ticks",description:["string - dtickformat for described zoom level, the same as *tickformat*"].join(" ")},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:l("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle",description:["Determines whether or not a line bounding this axis is drawn."].join(" ")},linecolor:{valType:"color",dflt:i.defaultLine,editType:"layoutstyle",description:"Sets the axis line color."},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle",description:"Sets the width (in px) of the axis line."},showgrid:T,gridcolor:k,gridwidth:A(),griddash:M,zeroline:{valType:"boolean",editType:"ticks",description:["Determines whether or not a line is drawn at along the 0 value","of this axis.","If *true*, the zero line is drawn on top of the grid lines."].join(" ")},zerolinecolor:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:"Sets the line color of the zero line."},zerolinewidth:{valType:"number",dflt:1,editType:"ticks",description:"Sets the width (in px) of the zero line."},showdividers:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not a dividers are drawn","between the category levels of this axis.","Only has an effect on *multicategory* axes."].join(" ")},dividercolor:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:["Sets the color of the dividers","Only has an effect on *multicategory* axes."].join(" ")},dividerwidth:{valType:"number",dflt:1,editType:"ticks",description:["Sets the width (in px) of the dividers","Only has an effect on *multicategory* axes."].join(" ")},anchor:{valType:"enumerated",values:["free",u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"plot",description:["If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to","the corresponding opposite-letter axis.","If set to *free*, this axis' position is determined by `position`."].join(" ")},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot",description:["Determines whether a x (y) axis is positioned","at the *bottom* (*left*) or *top* (*right*)","of the plotting area."].join(" ")},overlaying:{valType:"enumerated",values:["free",u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"plot",description:["If set a same-letter axis id, this axis is overlaid on top of","the corresponding same-letter axis, with traces and axes visible for both","axes.","If *false*, this axis does not overlay any same-letter axes.","In this case, for axes with overlapping domains only the highest-numbered","axis will be visible."].join(" ")},minor:{tickmode:f,nticks:m("minor"),tick0:g,dtick:v,tickvals:b,ticks:y,ticklen:x("minor"),tickwidth:_("minor"),tickcolor:w,gridcolor:k,gridwidth:A("minor"),griddash:M,showgrid:T,editType:"ticks"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot",description:["Sets the layer on which this axis is displayed.","If *above traces*, this axis is displayed above all the subplot's traces","If *below traces*, this axis is displayed below all the subplot's traces,","but above the grid lines.","Useful when used together with scatter-like traces with `cliponaxis`","set to *false* to show markers and/or text nodes above this axis."].join(" ")},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot",description:["Sets the domain of this axis (in plot fraction)."].join(" ")},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot",description:["Sets the position of this axis in the plotting space","(in normalized coordinates).","Only has an effect if `anchor` is set to *free*."].join(" ")},autoshift:{valType:"boolean",dflt:!1,editType:"plot",description:["Automatically reposition the axis to avoid","overlap with other axes with the same `overlaying` value.","This repositioning will account for any `shift` amount applied to other","axes on the same side with `autoshift` is set to true.","Only has an effect if `anchor` is set to *free*."].join(" ")},shift:{valType:"number",editType:"plot",description:["Moves the axis a given number of pixels from where it would have been otherwise.","Accepts both positive and negative values, which will shift the axis either right","or left, respectively.","If `autoshift` is set to true, then this defaults to a padding of -3 if `side` is set to *left*.","and defaults to +3 if `side` is set to *right*. Defaults to 0 if `autoshift` is set to false.","Only has an effect if `anchor` is set to *free*."].join(" ")},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc",description:["Specifies the ordering logic for the case of categorical variables.","By default, plotly uses *trace*, which specifies the order that is present in the data supplied.","Set `categoryorder` to *category ascending* or *category descending* if order should be determined by","the alphanumerical order of the category names.","Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category","is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to","the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.","Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the","numerical order of the values.","Similarly, the order can be determined by the min, max, sum, mean, geometric mean or median of all the values."].join(" ")},categoryarray:{valType:"data_array",editType:"calc",description:["Sets the order in which categories on this axis appear.","Only has an effect if `categoryorder` is set to *array*.","Used with `categoryorder`."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `range`,","`autorange`, and `title` if in `editable: true` configuration.","Defaults to `layout.uirevision`."].join(" ")},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks",description:["Obsolete.","Set `tickmode` to *auto* for old `autotick` *true* behavior.","Set `tickmode` to *linear* for `autotick` *false*."].join(" ")},title:{valType:"string",editType:"ticks",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the axis' title, please use `title.text` now."].join(" ")},titlefont:n({editType:"ticks",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}}},36741:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(66811).isUnifiedHover,a=r(85400),s=r(46121),l=r(13195),c=r(86130),u=r(25119),h=r(91200),d=r(69352),f=r(52869),p=r(99246),m=p.id2name,g=p.name2id,v=r(21197).AX_ID_PATTERN,b=r(25059),y=b.traceIs,x=b.getComponentMethod;function _(t,e,r){Array.isArray(t[e])?t[e].push(r):t[e]=[r]}t.exports=function(t,e,r){var b,w,k=e.autotypenumbers,A={},M={},T={},S={},C={},E={},L={},z={},O={},D={};for(b=0;b{"use strict";var n=r(18106).mix,i=r(84226),o=r(12822);t.exports=function(t,e,r,a){var s=(a=a||{}).dfltColor;function l(r,n){return o.coerce2(t,e,a.attributes,r,n)}var c=l("linecolor",s),u=l("linewidth");r("showline",a.showLine||!!c||!!u)||(delete e.linecolor,delete e.linewidth);var h=l("gridcolor",n(s,a.bgColor,a.blend||i.lightFraction).toRgbString()),d=l("gridwidth"),f=l("griddash");if(r("showgrid",a.showGrid||!!h||!!d||!!f)||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),a.hasMinor){var p=l("minor.gridcolor",n(e.gridcolor,a.bgColor,67).toRgbString()),m=l("minor.gridwidth",e.gridwidth||1),g=l("minor.griddash",e.griddash||"solid");r("minor.showgrid",!!p||!!m||!!g)||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!a.noZeroLine){var v=l("zerolinecolor",s),b=l("zerolinewidth");r("zeroline",a.showGrid||!!v||!!b)||(delete e.zerolinecolor,delete e.zerolinewidth)}}},52869:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822);t.exports=function(t,e,r,o){var a,s,l,c,u,h,d=o.counterAxes||[],f=o.overlayableAxes||[],p=o.letter,m=o.grid,g=o.overlayingDomain;m&&(s=m._domains[p][m._axisMap[e._id]],a=m._anchors[e._id],s&&(l=m[p+"side"].split(" ")[0],c=m.domain[p]["right"===l||"top"===l?1:0])),s=s||[0,1],a=a||(n(t.position)?"free":d[0]||"free"),l=l||("x"===p?"bottom":"left"),c=c||0,u=0,h=!1;var v=i.coerce(t,e,{anchor:{valType:"enumerated",values:["free"].concat(d),dflt:a}},"anchor"),b=i.coerce(t,e,{side:{valType:"enumerated",values:"x"===p?["bottom","top"]:["left","right"],dflt:l}},"side");"free"===v&&("y"===p&&(r("autoshift")&&(c="left"===b?g[0]:g[1],h=!e.automargin||e.automargin,u="left"===b?-3:3),r("shift",u)),r("position",c)),r("automargin",h);var y=!1;if(f.length&&(y=i.coerce(t,e,{overlaying:{valType:"enumerated",values:[!1].concat(f),dflt:!1}},"overlaying")),!y){var x=r("domain",s);x[0]>x[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s),"sync"===e.tickmode&&(e.tickmode="auto")}return r("layer"),e}},12213:(t,e,r)=>{"use strict";var n=r(95768);t.exports=function(t,e,r,i,o){o||(o={});var a=o.tickSuffixDflt,s=n(t);r("tickprefix")&&r("showtickprefix",s),r("ticksuffix",a)&&r("showticksuffix",s)}},46458:(t,e,r)=>{"use strict";var n=r(49826);t.exports=function(t,e,r,i){var o=e._template||{},a=e.type||o.type||"-";r("minallowed"),r("maxallowed");var s,l=r("range");l||i.noInsiderange||"log"===a||(!(s=r("insiderange"))||null!==s[0]&&null!==s[1]||(e.insiderange=!1,s=void 0),s&&(l=r("range",s)));var c,u=e.getAutorangeDflt(l,i),h=r("autorange",u);!l||(null!==l[0]||null!==l[1])&&(null!==l[0]&&null!==l[1]||"reversed"!==h&&!0!==h)&&(null===l[0]||"min"!==h&&"max reversed"!==h)&&(null===l[1]||"max"!==h&&"min reversed"!==h)||(l=void 0,delete e.range,e.autorange=!0,c=!0),c||(h=r("autorange",u=e.getAutorangeDflt(l,i))),h&&(n(r,h,l),"linear"!==a&&"-"!==a||r("rangemode")),e.cleanRange()}},92578:(t,e,r)=>{"use strict";var n=r(89701).FROM_BL;t.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||"center"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],o=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(o+(i[0]-o)*e),t.l2r(o+(i[1]-o)*e)],t.setScale()}},30632:(t,e,r)=>{"use strict";var n=r(27941),i=r(79969).aL,o=r(12822),a=o.numberFormat,s=r(7370),l=o.cleanNumber,c=o.ms2DateTime,u=o.dateTime2ms,h=o.ensureNumber,d=o.isArrayOrTypedArray,f=r(32994),p=f.FP_SAFE,m=f.BADNUM,g=f.LOG_CLIP,v=f.ONEWEEK,b=f.ONEDAY,y=f.ONEHOUR,x=f.ONEMIN,_=f.ONESEC,w=r(99246),k=r(21197),A=k.HOUR_PATTERN,M=k.WEEKDAY_PATTERN;function T(t){return Math.pow(10,t)}function S(t){return null!=t}t.exports=function(t,e){e=e||{};var r=t._id||"x",f=r.charAt(0);function C(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-2*g*Math.abs(n-i))}return m}function E(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var a=u(e,n||t.calendar);if(a===m){if(!s(e))return m;e=+e;var l=Math.floor(10*o.mod(e+.05,1)),c=Math.round(e-l/10);a=u(new Date(c))+l/10}return a}function L(e,r,n){return c(e,r,n||t.calendar)}function z(e){return t._categories[Math.round(e)]}function O(e){if(S(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push("number"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return m}function D(e){if(t._categoriesMap)return t._categoriesMap[e]}function I(t){var e=D(t);return void 0!==e?e:s(t)?+t:void 0}function F(t){return s(t)?+t:D(t)}function R(t,e,r){return n.round(r+e*t,2)}function P(t,e,r){return(t-r)/e}var j=function(e){return s(e)?R(e,t._m,t._b):m},N=function(e){return P(e,t._m,t._b)};if(t.rangebreaks){var B="y"===f;j=function(e){if(!s(e))return m;var r=t._rangebreaks.length;if(!r)return R(e,t._m,t._b);var n=B;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,o=i*e,a=0,l=0;lu)){a=o<(c+u)/2?l:l+1;break}a=l+1}var h=t._B[a]||0;return isFinite(h)?R(e,t._m2,h):0},N=function(e){var r=t._rangebreaks.length;if(!r)return P(e,t._m,t._b);for(var n=0,i=0;it._rangebreaks[i].pmax&&(n=i+1);return P(e,t._m2,t._B[n])}}t.c2l="log"===t.type?C:h,t.l2c="log"===t.type?T:h,t.l2p=j,t.p2l=N,t.c2p="log"===t.type?function(t,e){return j(C(t,e))}:j,t.p2c="log"===t.type?function(t){return T(N(t))}:N,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=h,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=N,t.cleanPos=h):"log"===t.type?(t.d2r=t.d2l=function(t,e){return C(l(t),e)},t.r2d=t.r2c=function(t){return T(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=h,t.c2r=C,t.l2d=T,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return T(N(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=N,t.cleanPos=h):"date"===t.type?(t.d2r=t.r2d=o.identity,t.d2c=t.r2c=t.d2l=t.r2l=E,t.c2d=t.c2r=t.l2d=t.l2r=L,t.d2p=t.r2p=function(e,r,n){return t.l2p(E(e,0,n))},t.p2d=t.p2r=function(t,e,r){return L(N(t),e,r)},t.cleanPos=function(e){return o.cleanDate(e,m,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=O,t.r2d=t.c2d=t.l2d=z,t.d2r=t.d2l_noadd=I,t.r2c=function(e){var r=F(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=h,t.r2l=F,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return z(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:h(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=z,t.d2r=t.d2l_noadd=I,t.r2c=function(e){var r=I(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=D,t.l2r=t.c2r=h,t.r2l=I,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return z(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return Array.isArray(t)||"string"==typeof t&&""!==t?t:h(t)},t.setupMultiCategory=function(n){var i,a,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var c in l)if(c!==r){var u=e[w.id2name(c)];s=s.concat(u._traceIndices)}var h=[[0,{}],[0,{}]],p=[];for(i=0;il[1]&&(i[s?0:1]=n),i[0]===i[1]){var c=t.l2r(r),u=t.l2r(n);if(void 0!==r){var h=c+1;void 0!==n&&(h=Math.min(h,u)),i[s?1:0]=h}if(void 0!==n){var d=u+1;void 0!==r&&(d=Math.max(d,c)),i[s?0:1]=d}}}},t.cleanRange=function(e,r){t._cleanRange(e,r),t.limitRange(e)},t._cleanRange=function(e,r){r||(r={}),e||(e="range");var n,i,a=o.nestedProperty(t,e).get();if(i=(i="date"===t.type?o.dfltRange(t.calendar):"y"===f?k.DFLTRANGEY:"realaxis"===t._name?[0,1]:r.dfltRange||k.DFLTRANGEX).slice(),"tozero"!==t.rangemode&&"nonnegative"!==t.rangemode||(i[0]=0),a&&2===a.length){var l=null===a[0],c=null===a[1];for("date"!==t.type||t.autorange||(a[0]=o.cleanDate(a[0],m,t.calendar),a[1]=o.cleanDate(a[1],m,t.calendar)),n=0;n<2;n++)if("date"===t.type){if(!o.isDateTime(a[n],t.calendar)){t[e]=i;break}if(t.r2l(a[0])===t.r2l(a[1])){var u=o.constrain(t.r2l(a[0]),o.MIN_MS+1e3,o.MAX_MS-1e3);a[0]=t.l2r(u-1e3),a[1]=t.l2r(u+1e3);break}}else{if(!s(a[n])){if(l||c||!s(a[1-n])){t[e]=i;break}a[n]=a[1-n]*(n?10:.1)}if(a[n]<-p?a[n]=-p:a[n]>p&&(a[n]=p),a[0]===a[1]){var h=Math.max(1,Math.abs(1e-6*a[0]));a[0]-=h,a[1]+=h}}}else o.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=w.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var o=r&&t._r?"_r":"range",a=t.calendar;t.cleanRange(o);var s,l,c=t.r2l(t[o][0],a),u=t.r2l(t[o][1],a),h="y"===f;if(h?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks&&(t._rangebreaks=t.locateBreaks(Math.min(c,u),Math.max(c,u)),t._rangebreaks.length)){for(s=0;su&&(d=!d),d&&t._rangebreaks.reverse();var p=d?-1:1;for(t._m2=p*t._length/(Math.abs(u-c)-t._lBreaks),t._B.push(-t._m2*(h?u:c)),s=0;si&&(i+=7,ai&&(i+=24,a=n&&a=n&&e=s.min&&(ts.max&&(s.max=n),i=!1)}i&&c.push({min:t,max:n})}};for(n=0;n{"use strict";t.exports=function(t){var e=["showexponent","showtickprefix","showticksuffix"].filter((function(e){return void 0!==t[e]}));if(e.every((function(r){return t[r]===t[e[0]]}))||1===e.length)return t[e[0]]}},84411:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499).contrast,o=r(86130),a=r(95768),s=r(35677);function l(t,e){function r(r,i){return n.coerce(t,e,o.tickformatstops,r,i)}r("enabled")&&(r("dtickrange"),r("value"))}t.exports=function(t,e,r,c,u){u||(u={});var h=r("labelalias");n.isPlainObject(h)||delete e.labelalias;var d=a(t);if(r("showticklabels")){u.noTicklabelshift||r("ticklabelshift"),u.noTicklabelstandoff||r("ticklabelstandoff");var f=u.font||{},p=e.color,m=-1!==(e.ticklabelposition||"").indexOf("inside")?i(u.bgColor):p&&p!==o.color.dflt?p:f.color;if(n.coerceFont(r,"tickfont",f,{overrideDflt:{color:m}}),u.noTicklabelstep||"multicategory"===c||"log"===c||r("ticklabelstep"),!u.noAng){var g=r("tickangle");u.noAutotickangles||"auto"!==g||r("autotickangles")}if("category"!==c){var v=r("tickformat");s(t,e,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:l}),e.tickformatstops.length||delete e.tickformatstops,u.noExp||v||"date"===c||(r("showexponent",d),r("exponentformat"),r("minexponent"),r("separatethousands"))}}}},8736:(t,e,r)=>{"use strict";var n=r(12822),i=r(86130);t.exports=function(t,e,r,o){var a=o.isMinor,s=a?t.minor||{}:t,l=a?e.minor:e,c=a?i.minor:i,u=a?"minor.":"",h=n.coerce2(s,l,c,"ticklen",a?.6*(e.ticklen||5):void 0),d=n.coerce2(s,l,c,"tickwidth",a?e.tickwidth||1:void 0),f=n.coerce2(s,l,c,"tickcolor",(a?e.tickcolor:void 0)||l.color);r(u+"ticks",!a&&o.outerTicks||h||d||f?"outside":"")||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}},49342:(t,e,r)=>{"use strict";var n=r(84696),i=r(12822).isArrayOrTypedArray,o=r(98507).isTypedArraySpec,a=r(98507).decodeTypedArraySpec;t.exports=function(t,e,r,s,l){l||(l={});var c=l.isMinor,u=c?t.minor||{}:t,h=c?e.minor:e,d=c?"minor.":"";function f(t){var e=u[t];return o(e)&&(e=a(e)),void 0!==e?e:(h._template||{})[t]}var p=f("tick0"),m=f("dtick"),g=f("tickvals"),v=r(d+"tickmode",i(g)?"array":m?"linear":"auto");if("auto"===v||"sync"===v)r(d+"nticks");else if("linear"===v){var b=h.dtick=n.dtick(m,s);h.tick0=n.tick0(p,s,e.calendar,b)}else"multicategory"!==s&&(void 0===r(d+"tickvals")?h.tickmode="auto":c||r("ticktext"))}},88313:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=r(40666),s=r(75815);t.exports=function(t,e,r,l){var c=t._fullLayout;if(0!==e.length){var u,h,d,f;l&&(u=l());var p=n.ease(r.easing);return t._transitionData._interruptCallbacks.push((function(){return window.cancelAnimationFrame(f),f=null,function(){for(var r={},n=0;nr.duration?(function(){for(var r={},n=0;n rect").call(a.setTranslate,0,0).call(a.setScale,1,1),t.plot.call(a.setTranslate,e._offset,r._offset).call(a.setScale,1,1);var n=t.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(a.setPointGroupScale,1,1),n.selectAll(".textpoint").call(a.setTextPointsScale,1,1),n.call(a.hideOutsideRangePoints,t)}function g(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,c=i._length,u=l._length,h=!!e.xr1,d=!!e.yr1,f=[];if(h){var p=o.simpleMap(e.xr0,i.r2l),m=o.simpleMap(e.xr1,i.r2l),g=p[1]-p[0],v=m[1]-m[0];f[0]=(p[0]*(1-r)+r*m[0]-p[0])/(p[1]-p[0])*c,f[2]=c*(1-r+r*v/g),i.range[0]=i.l2r(p[0]*(1-r)+r*m[0]),i.range[1]=i.l2r(p[1]*(1-r)+r*m[1])}else f[0]=0,f[2]=c;if(d){var b=o.simpleMap(e.yr0,l.r2l),y=o.simpleMap(e.yr1,l.r2l),x=b[1]-b[0],_=y[1]-y[0];f[1]=(b[1]*(1-r)+r*y[1]-b[1])/(b[0]-b[1])*u,f[3]=u*(1-r+r*_/x),l.range[0]=i.l2r(b[0]*(1-r)+r*y[0]),l.range[1]=l.l2r(b[1]*(1-r)+r*y[1])}else f[1]=0,f[3]=u;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var w=h?c/f[2]:1,k=d?u/f[3]:1,A=h?f[0]:0,M=d?f[1]:0,T=h?f[0]/f[2]*c:0,S=d?f[1]/f[3]*u:0,C=i._offset-T,E=l._offset-S;n.clipRect.call(a.setTranslate,A,M).call(a.setScale,1/w,1/k),n.plot.call(a.setTranslate,C,E).call(a.setScale,w,k),a.setPointGroupScale(n.zoomScalePts,1/w,1/k),a.setTextPointsScale(n.zoomScaleTxt,1/w,1/k)}s.redrawComponents(t)}},25119:(t,e,r)=>{"use strict";var n=r(25059).traceIs,i=r(17821);function o(t){return{v:"x",h:"y"}[t.orientation||"v"]}function a(t,e){var r=o(t),i=n(t,"box-violin"),a=n(t._fullInput||{},"candlestick");return i&&!a&&e===r&&void 0===t[r]&&void 0===t[r+"0"]}t.exports=function(t,e,r,s){r("autotypenumbers",s.autotypenumbersDflt),"-"===r("type",(s.splomStash||{}).type)&&(function(t,e){if("-"===t.type){var r,s=t._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var c=function(t,e,r){for(var n=0;n0&&(i["_"+r+"axes"]||{})[e])return i;if((i[r+"axis"]||r)===e){if(a(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}(e,s,l);if(c)if("histogram"!==c.type||l!=={v:"y",h:"x"}[c.orientation||"v"]){var u=l+"calendar",h=c[u],d={noMultiCategory:!n(c,"cartesian")||n(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&l==={h:"x",v:"y"}[c.orientation||"v"]&&(d.noMultiCategory=!0),d.autotypenumbers=t.autotypenumbers,a(c,l)){var f=o(c),p=[];for(r=0;r{"use strict";var n=r(25059),i=r(12822);function o(t,e,r){var n,o,a,s=!1;if("data"===e.type)n=t._fullData[null!==e.traces?e.traces[0]:0];else{if("layout"!==e.type)return!1;n=t._fullLayout}return o=i.nestedProperty(n,e.prop).get(),(a=r[e.type]=r[e.type]||{}).hasOwnProperty(e.prop)&&a[e.prop]!==o&&(s=!0),a[e.prop]=o,{changed:s,value:o}}function a(t,e){var r=[],n=e[0],o={};if("string"==typeof n)o[n]=e[1];else{if(!i.isPlainObject(n))return r;o=n}return l(o,(function(t,e,n){r.push({type:"layout",prop:t,value:n})}),"",0),r}function s(t,e){var r,n,o,a,s=[];if(n=e[0],o=e[1],r=e[2],a={},"string"==typeof n)a[n]=o;else{if(!i.isPlainObject(n))return s;a=n,void 0===r&&(r=o)}return void 0===r&&(r=null),l(a,(function(e,n,i){var o,a;if(Array.isArray(i)){a=i.slice();var l=Math.min(a.length,t.data.length);r&&(l=Math.min(l,r.length)),o=[];for(var c=0;c0?".":"")+o;i.isPlainObject(a)?l(a,e,s,n+1):e(s,o,a)}}))}e.manageCommandObserver=function(t,r,n,a){var s={},l=!0;r&&r._commandObserver&&(s=r._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=e.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(r&&r._commandObserver){if(c)return s;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,s}if(c){o(t,c,s.cache),s.check=function(){if(l){var e=o(t,c,s.cache);return e.changed&&a&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(a({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;h{"use strict";var n=r(98260).extendFlat;e.u=function(t,e){e=e||{};var r={valType:"info_array",editType:(t=t||{}).editType,items:[{valType:"number",min:0,max:1,editType:t.editType},{valType:"number",min:0,max:1,editType:t.editType}],dflt:[0,1]},i=t.name?t.name+" ":"",o=t.trace?"trace ":"subplot ",a=e.description?" "+e.description:"",s={x:n({},r,{description:["Sets the horizontal domain of this ",i,o,"(in plot fraction).",a].join("")}),y:n({},r,{description:["Sets the vertical domain of this ",i,o,"(in plot fraction).",a].join("")}),editType:t.editType};return t.noGridCell||(s.row={valType:"integer",min:0,dflt:0,editType:t.editType,description:["If there is a layout grid, use the domain ","for this row in the grid for this ",i,o,".",a].join("")},s.column={valType:"integer",min:0,dflt:0,editType:t.editType,description:["If there is a layout grid, use the domain ","for this column in the grid for this ",i,o,".",a].join("")}),s},e.N=function(t,e,r,n){var i=n&&n.x||[0,1],o=n&&n.y||[0,1],a=e.grid;if(a){var s=r("domain.column");void 0!==s&&(s{"use strict";t.exports=function(t){var e=t.variantValues,r=t.editType,n=t.colorEditType;void 0===n&&(n=r);var i={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal",description:["Sets the weight (or boldness) of the font."].join(" ")};t.noNumericWeightValues&&(i.valType="enumerated",i.values=i.extras,i.extras=void 0,i.min=void 0,i.max=void 0);var o={family:{valType:"string",noBlank:!0,strict:!0,editType:r,description:["HTML font family - the typeface that will be applied by the web browser.","The web browser will only be able to apply a font if it is available on the system","which it operates. Provide multiple font families, separated by commas, to indicate","the preference in which to apply fonts if they aren't available on the system.","The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server,","where only a select number of","fonts are installed and supported.","These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*,","*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,","*PT Sans Narrow*, *Raleway*, *Times New Roman*."].join(" ")},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:i,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal",description:["Sets whether a font should be styled with a normal or italic face from its family."].join(" ")},variant:t.noFontVariant?void 0:{editType:r,valType:"enumerated",values:e||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal",description:["Sets the variant of the font."].join(" ")},textcase:t.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal",description:["Sets capitalization of text.","It can be used to make text appear in all-uppercase or all-lowercase,","or with each word capitalized."].join(" ")},lineposition:t.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none",description:["Sets the kind of decoration line(s) with text,","such as an *under*, *over* or *through*","as well as combinations e.g. *under+over*, etc."].join(" ")},shadow:t.noFontShadow?void 0:{editType:r,valType:"string",dflt:t.autoShadowDflt?"auto":"none",description:["Sets the shape and color of the shadow behind text.","*auto* places minimal shadow and applies contrast text font color.","See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options."].join(" ")},editType:r,description:""+(t.description||"")};return t.autoSize&&(o.size.dflt="auto"),t.autoColor&&(o.color.dflt="auto"),t.arrayOk&&(o.family.arrayOk=!0,o.weight.arrayOk=!0,o.style.arrayOk=!0,t.noFontVariant||(o.variant.arrayOk=!0),t.noFontTextcase||(o.textcase.arrayOk=!0),t.noFontLineposition||(o.lineposition.arrayOk=!0),t.noFontShadow||(o.shadow.arrayOk=!0),o.size.arrayOk=!0,o.color.arrayOk=!0),o}},53874:t=>{"use strict";t.exports={_isLinkedToArray:"frames_entry",group:{valType:"string",description:["An identifier that specifies the group to which the frame belongs,","used by animate to select a subset of frames."].join(" ")},name:{valType:"string",description:"A label by which to identify the frame"},traces:{valType:"any",description:["A list of trace indices that identify the respective traces in the","data attribute"].join(" ")},baseframe:{valType:"string",description:["The name of the frame into which this frame's properties are merged","before applying. This is used to unify properties and avoid needing","to specify the same values for the same properties in multiple frames."].join(" ")},data:{valType:"any",description:["A list of traces this frame modifies. The format is identical to the","normal trace definition."].join(" ")},layout:{valType:"any",description:["Layout properties which this frame modifies. The format is identical","to the normal layout definition."].join(" ")}}},47388:(t,e,r)=>{"use strict";var n=r(25059),i=r(21197).SUBPLOT_PATTERN;e.eV=function(t,e,r){var i,o=[],a=[];if(!(i="string"==typeof e?n.getModule(e).plot:"function"==typeof e?e:e.plot))return[o,t];for(var s=r,l=0;l{"use strict";var n=r(62309).overrideAll,i=r(53572),o=r(85833),a=r(47388).KO,s=r(12822),l=r(25853),c="gl3d",u="scene";e.name=c,e.attr=u,e.idRoot=u,e.idRegex=e.attrRegex=s.counterRegex("scene"),e.attributes=r(816),e.layoutAttributes=r(41019),e.baseLayoutAttrOverrides=n({hoverlabel:i.hoverlabel},"plot","nested"),e.supplyLayoutDefaults=r(13351),e.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots[c],i=0;i{"use strict";t.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's 3D coordinate system and","a 3D scene.","If *scene* (the default value), the (x,y,z) coordinates refer to","`layout.scene`.","If *scene2*, the (x,y,z) coordinates refer to `layout.scene2`,","and so on."].join(" ")}}},82854:(t,e,r)=>{"use strict";var n=r(17499),i=r(86130),o=r(98260).extendFlat,a=r(62309).overrideAll;t.exports=a({visible:i.visible,showspikes:{valType:"boolean",dflt:!0,description:["Sets whether or not spikes starting from","data points to this axis' wall are shown on hover."].join(" ")},spikesides:{valType:"boolean",dflt:!0,description:["Sets whether or not spikes extending from the","projection data points to this axis' wall boundaries","are shown on hover."].join(" ")},spikethickness:{valType:"number",min:0,dflt:2,description:"Sets the thickness (in px) of the spikes."},spikecolor:{valType:"color",dflt:n.defaultLine,description:"Sets the color of the spikes."},showbackground:{valType:"boolean",dflt:!1,description:["Sets whether or not this axis' wall","has a background color."].join(" ")},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)",description:"Sets the background color of this axis' wall."},showaxeslabels:{valType:"boolean",dflt:!0,description:"Sets whether or not this axis is labeled"},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:{text:i.title.text,font:i.title.font},type:o({},i.type,{values:["-","linear","log","date","category"]}),autotypenumbers:i.autotypenumbers,autorange:i.autorange,autorangeoptions:{minallowed:i.autorangeoptions.minallowed,maxallowed:i.autorangeoptions.maxallowed,clipmin:i.autorangeoptions.clipmin,clipmax:i.autorangeoptions.clipmax,include:i.autorangeoptions.include,editType:"plot"},rangemode:i.rangemode,minallowed:i.minallowed,maxallowed:i.maxallowed,range:o({},i.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:i.minor.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,mirror:i.mirror,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,labelalias:i.labelalias,tickfont:i.tickfont,tickangle:i.tickangle,tickprefix:i.tickprefix,showtickprefix:i.showtickprefix,ticksuffix:i.ticksuffix,showticksuffix:i.showticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:i.showline,linecolor:i.linecolor,linewidth:i.linewidth,showgrid:i.showgrid,gridcolor:o({},i.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:i.gridwidth,zeroline:i.zeroline,zerolinecolor:i.zerolinecolor,zerolinewidth:i.zerolinewidth,_deprecated:{title:i._deprecated.title,titlefont:i._deprecated.titlefont}},"plot","from-root")},20049:(t,e,r)=>{"use strict";var n=r(18106).mix,i=r(12822),o=r(46121),a=r(82854),s=r(25119),l=r(91200),c=["xaxis","yaxis","zaxis"],u=13600/187;t.exports=function(t,e,r){var h,d;function f(t,e){return i.coerce(h,d,a,t,e)}for(var p=0;p{"use strict";var n=r(17235),i=r(12822),o=["xaxis","yaxis","zaxis"];function a(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}a.prototype.merge=function(t,e){for(var r=this,a=0;a<3;++a){var s=e[o[a]];s.visible?(r.labels[a]=t._meta?i.templateString(s.title.text,t._meta):s.title.text,"font"in s.title&&(s.title.font.color&&(r.labelColor[a]=n(s.title.font.color)),s.title.font.family&&(r.labelFont[a]=s.title.font.family),s.title.font.size&&(r.labelSize[a]=s.title.font.size),s.title.font.weight&&(r.labelFontWeight[a]=s.title.font.weight),s.title.font.style&&(r.labelFontStyle[a]=s.title.font.style),s.title.font.variant&&(r.labelFontVariant[a]=s.title.font.variant)),"showline"in s&&(r.lineEnable[a]=s.showline),"linecolor"in s&&(r.lineColor[a]=n(s.linecolor)),"linewidth"in s&&(r.lineWidth[a]=s.linewidth),"showgrid"in s&&(r.gridEnable[a]=s.showgrid),"gridcolor"in s&&(r.gridColor[a]=n(s.gridcolor)),"gridwidth"in s&&(r.gridWidth[a]=s.gridwidth),"log"===s.type?r.zeroEnable[a]=!1:"zeroline"in s&&(r.zeroEnable[a]=s.zeroline),"zerolinecolor"in s&&(r.zeroLineColor[a]=n(s.zerolinecolor)),"zerolinewidth"in s&&(r.zeroLineWidth[a]=s.zerolinewidth),"ticks"in s&&s.ticks?r.lineTickEnable[a]=!0:r.lineTickEnable[a]=!1,"ticklen"in s&&(r.lineTickLength[a]=r._defaultLineTickLength[a]=s.ticklen),"tickcolor"in s&&(r.lineTickColor[a]=n(s.tickcolor)),"tickwidth"in s&&(r.lineTickWidth[a]=s.tickwidth),"tickangle"in s&&(r.tickAngle[a]="auto"===s.tickangle?-3600:Math.PI*-s.tickangle/180),"showticklabels"in s&&(r.tickEnable[a]=s.showticklabels),"tickfont"in s&&(s.tickfont.color&&(r.tickColor[a]=n(s.tickfont.color)),s.tickfont.family&&(r.tickFont[a]=s.tickfont.family),s.tickfont.size&&(r.tickSize[a]=s.tickfont.size),s.tickfont.weight&&(r.tickFontWeight[a]=s.tickfont.weight),s.tickfont.style&&(r.tickFontStyle[a]=s.tickfont.style),s.tickfont.variant&&(r.tickFontVariant[a]=s.tickfont.variant)),"mirror"in s?-1!==["ticks","all","allticks"].indexOf(s.mirror)?(r.lineTickMirror[a]=!0,r.lineMirror[a]=!0):!0===s.mirror?(r.lineTickMirror[a]=!1,r.lineMirror[a]=!0):(r.lineTickMirror[a]=!1,r.lineMirror[a]=!1):r.lineMirror[a]=!1,"showbackground"in s&&!1!==s.showbackground?(r.backgroundEnable[a]=!0,r.backgroundColor[a]=n(s.backgroundcolor)):r.backgroundEnable[a]=!1):(r.tickEnable[a]=!1,r.labelEnable[a]=!1,r.lineEnable[a]=!1,r.lineTickEnable[a]=!1,r.gridEnable[a]=!1,r.zeroEnable[a]=!1,r.backgroundEnable[a]=!1)}},t.exports=function(t,e){var r=new a;return r.merge(t,e),r}},13351:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(25059),a=r(84313),s=r(20049),l=r(41019),c=r(47388).KO,u="gl3d";function h(t,e,r,n){for(var a=r("bgcolor"),l=i.combine(a,n.paper_bgcolor),h=["up","center","eye"],d=0;d.999&&(g="turntable"):g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",n.getDfltFromLayout("hovermode"))}t.exports=function(t,e,r){var i=e._basePlotModules.length>1;a(t,e,r,{type:u,attributes:l,handleDefaults:h,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},41019:(t,e,r)=>{"use strict";var n=r(82854),i=r(40365).u,o=r(98260).extendFlat,a=r(12822).counterRegex;function s(t,e,r){return{x:{valType:"number",dflt:t,editType:"camera"},y:{valType:"number",dflt:e,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}t.exports={_arrayAttrRegexps:[a("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:o(s(0,0,1),{description:["Sets the (x,y,z) components of the 'up' camera vector.","This vector determines the up direction of this scene","with respect to the page.","The default is *{x: 0, y: 0, z: 1}* which means that","the z axis points up."].join(" ")}),center:o(s(0,0,0),{description:["Sets the (x,y,z) components of the 'center' camera vector","This vector determines the translation (x,y,z) space","about the center of this scene.","By default, there is no such translation."].join(" ")}),eye:o(s(1.25,1.25,1.25),{description:["Sets the (x,y,z) components of the 'eye' camera vector.","This vector determines the view point about the origin","of this scene."].join(" ")}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc",description:["Sets the projection type. The projection type could be","either *perspective* or *orthographic*. The default is","*perspective*."].join(" ")},editType:"calc"},editType:"camera"},domain:i({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0},description:["If *cube*, this scene's axes are drawn as a cube,","regardless of the axes' ranges.","If *data*, this scene's axes are drawn","in proportion with the axes' ranges.","If *manual*, this scene's axes are drawn","in proportion with the input of *aspectratio*","(the default behavior if *aspectratio* is provided).","If *auto*, this scene's axes are drawn","using the results of *data* except when one axis","is more than four times the size of the two others,","where in that case the results of *cube* are used."].join(" ")},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"},description:["Sets this scene's axis aspectratio."].join(" ")},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot",description:["Determines the mode of drag interactions for this scene."].join(" ")},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions for this scene."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in camera attributes.","Defaults to `layout.uirevision`."].join(" ")},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera",description:"Obsolete. Use `camera` instead."}}}},63306:(t,e,r)=>{"use strict";var n=r(17235),i=["xaxis","yaxis","zaxis"];function o(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}o.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[i[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=n(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},t.exports=function(t){var e=new o;return e.merge(t),e}},1285:(t,e,r)=>{"use strict";t.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[o[c]];if(u._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/t.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=r[c].lo/t.dataScale[c],u.range[1]=r[c].hi/t.dataScale[c],u._m=1/(t.dataScale[c]*r[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var h=u.tickmode;if("auto"===u.tickmode){u.tickmode="linear";var d=u.nticks||i.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/d)}for(var f=n.calcTicks(u,{msUTC:!0}),p=0;p/g," "));l[c]=f,u.tickmode=h}}for(e.ticks=l,c=0;c<3;++c)for(a[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]),p=0;p<2;++p)e.bounds[p][c]=t.glplot.bounds[p][c];t.contourLevels=function(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),o=0;o{"use strict";function e(t,e){var r,n,i=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)i[n]+=t[4*r+n]*e[r];return i}t.exports=function(t,r){return e(t.projection,e(t.view,e(t.model,[r[0],r[1],r[2],1])))}},85833:(t,e,r)=>{"use strict";var n,i,o=r(31845).gl_plot3d,a=o.createCamera,s=o.createScene,l=r(62945),c=r(17520),u=r(25059),h=r(12822),d=h.preserveDrawingBuffer(),f=r(75815),p=r(70410),m=r(17235),g=r(91203),v=r(40747),b=r(82678),y=r(63306),x=r(1285),_=r(19496).applyAutorangeOptions,w=!1;function k(t,e){var r=document.createElement("div"),n=t.container;this.graphDiv=t.graphDiv;var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.style.position="absolute",i.style.top=i.style.left="0px",i.style.width=i.style.height="100%",i.style["z-index"]=20,i.style["pointer-events"]="none",r.appendChild(i),this.svgContainer=i,r.id=t.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=e,this.id=t.id||"scene",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=b(e,e[this.id]),this.spikeOptions=y(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=this.pixelRatio||t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=u.getComponentMethod("annotations3d","convert"),this.drawAnnotations=u.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var A=k.prototype;A.prepareOptions=function(){var t=this,e={canvas:t.canvas,gl:t.gl,glOptions:{preserveDrawingBuffer:d,premultipliedAlpha:!0,antialias:!0},container:t.container,axes:t.axesOptions,spikes:t.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:t.camera,pixelRatio:t.pixelRatio};if(t.staticMode){if(!(i||(n=document.createElement("canvas"),i=l({canvas:n,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error("error creating static canvas/context for image server");e.gl=i,e.canvas=n}return e};var M=!0;A.tryCreatePlot=function(){var t=this,e=t.prepareOptions(),r=!0;try{t.glplot=s(e)}catch(n){if(t.staticMode||!M||d)r=!1;else{h.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{d=e.glOptions.preserveDrawingBuffer=!0,t.glplot=s(e)}catch(t){d=e.glOptions.preserveDrawingBuffer=!1,r=!1}}}return M=!1,r},A.initializeGLCamera=function(){var t=this,e=t.fullSceneLayout.camera,r="orthographic"===e.projection.type;t.camera=a(t.container,{center:[e.center.x,e.center.y,e.center.z],eye:[e.eye.x,e.eye.y,e.eye.z],up:[e.up.x,e.up.y,e.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})},A.initializeGLPlot=function(){var t=this;if(t.initializeGLCamera(),!t.tryCreatePlot())return g(t);t.traces={},t.make4thDimension();var e=t.graphDiv,r=e.layout,n=function(){var e={};return t.isCameraChanged(r)&&(e[t.id+".camera"]=t.getCamera()),t.isAspectChanged(r)&&(e[t.id+".aspectratio"]=t.glplot.getAspectratio(),"manual"!==r[t.id].aspectmode&&(t.fullSceneLayout.aspectmode=r[t.id].aspectmode=e[t.id+".aspectmode"]="manual")),e},i=function(t){if(!1!==t.fullSceneLayout.dragmode){var e=n();t.saveLayout(r),t.graphDiv.emit("plotly_relayout",e)}};return t.glplot.canvas&&(t.glplot.canvas.addEventListener("mouseup",(function(){i(t)})),t.glplot.canvas.addEventListener("touchstart",(function(){w=!0})),t.glplot.canvas.addEventListener("wheel",(function(r){if(e._context._scrollZoom.gl3d){if(t.camera._ortho){var n=r.deltaX>r.deltaY?1.1:1/1.1,o=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*o.x,y:n*o.y,z:n*o.z})}i(t)}}),!!c&&{passive:!1}),t.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit("plotly_relayouting",e)}})),t.staticMode||t.glplot.canvas.addEventListener("webglcontextlost",(function(r){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},A.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var o=r._fullLayout._invScaleX,a=r._fullLayout._invScaleY,s=i.width*o,l=i.height*a;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),x(e),e.glplot.axes.update(e.axesOptions);for(var c=Object.keys(e.traces),u=null,d=e.glplot.selection,m=0;m")):"isosurface"===t.type||"volume"===t.type?(A.valueLabel=f.hoverLabelText(e._mockAxis,e._mockAxis.d2l(d.traceCoordinate[3]),t.valuehoverformat),C.push("value: "+A.valueLabel),d.textLabel&&C.push(d.textLabel),y=C.join("
")):y=d.textLabel;var E={x:d.traceCoordinate[0],y:d.traceCoordinate[1],z:d.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:k};p.appendArrayPointValue(E,_,k),t._module.eventData&&(E=_._module.eventData(E,d,_,{},k));var L={points:[E]};if(e.fullSceneLayout.hovermode){var z=[];p.loneHover({trace:_,x:(.5+.5*b[0]/b[3])*s,y:(.5-.5*b[1]/b[3])*l,xLabel:A.xLabel,yLabel:A.yLabel,zLabel:A.zLabel,text:y,name:u.name,color:p.castHoverOption(_,k,"bgcolor")||u.color,borderColor:p.castHoverOption(_,k,"bordercolor"),fontFamily:p.castHoverOption(_,k,"font.family"),fontSize:p.castHoverOption(_,k,"font.size"),fontColor:p.castHoverOption(_,k,"font.color"),nameLength:p.castHoverOption(_,k,"namelength"),textAlign:p.castHoverOption(_,k,"align"),hovertemplate:h.castOption(_,k,"hovertemplate"),hovertemplateLabels:h.extendFlat({},E,A),eventData:[E]},{container:n,gd:r,inOut_bbox:z}),E.bbox=z[0]}d.distance<5&&(d.buttons||w)?r.emit("plotly_click",L):r.emit("plotly_hover",L),this.oldEventData=L}else p.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},A.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):h.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(e)};var T=["xaxis","yaxis","zaxis"];function S(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var o=T[i],a=o.charAt(0),s=n[o],l=e[a],c=e[a+"calendar"],u=e["_"+a+"length"];if(h.isArrayOrTypedArray(l))for(var d,f=0;f<(u||l.length);f++)if(h.isArrayOrTypedArray(l[f]))for(var p=0;pv[1][a])v[0][a]=-1,v[1][a]=1;else{var O=v[1][a]-v[0][a];v[0][a]-=O/32,v[1][a]+=O/32}if(x=[v[0][a],v[1][a]],x=_(x,l),v[0][a]=x[0],v[1][a]=x[1],l.isReversed()){var D=v[0][a];v[0][a]=v[1][a],v[1][a]=D}}else x=l.range,v[0][a]=l.r2l(x[0]),v[1][a]=l.r2l(x[1]);v[0][a]===v[1][a]&&(v[0][a]-=1,v[1][a]+=1),b[a]=v[1][a]-v[0][a],l.range=[v[0][a],v[1][a]],l.limitRange(),n.glplot.setBounds(a,{min:l.range[0]*f[a],max:l.range[1]*f[a]})}var I=u.aspectmode;if("cube"===I)g=[1,1,1];else if("manual"===I){var F=u.aspectratio;g=[F.x,F.y,F.z]}else{if("auto"!==I&&"data"!==I)throw new Error("scene.js aspectRatio was not one of the enumerated types");var R=[1,1,1];for(a=0;a<3;++a){var P=y[c=(l=u[T[a]]).type];R[a]=Math.pow(P.acc,1/P.count)/f[a]}g="data"===I||Math.max.apply(null,R)/Math.min.apply(null,R)<=4?R:[1,1,1]}u.aspectratio.x=h.aspectratio.x=g[0],u.aspectratio.y=h.aspectratio.y=g[1],u.aspectratio.z=h.aspectratio.z=g[2],n.glplot.setAspectratio(u.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:u.aspectratio.x,y:u.aspectratio.y,z:u.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=u.aspectmode);var j=u.domain||null,N=e._size||null;if(j&&N){var B=n.container.style;B.position="absolute",B.left=N.l+j.x[0]*N.w+"px",B.top=N.t+(1-j.y[1])*N.h+"px",B.width=N.w*(j.x[1]-j.x[0])+"px",B.height=N.h*(j.y[1]-j.y[0])+"px"}n.glplot.redraw()}},A.destroy=function(){var t=this;t.glplot&&(t.camera.mouseListener.enabled=!1,t.container.removeEventListener("wheel",t.camera.wheelListener),t.camera=null,t.glplot.dispose(),t.container.parentNode.removeChild(t.container),t.glplot=null)},A.getCamera=function(){var t,e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),{up:{x:(t=e.camera).up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]},projection:{type:!0===t._ortho?"orthographic":"perspective"}}},A.setViewport=function(t){var e,r=this,n=t.camera;r.camera.lookAt.apply(this,[[(e=n).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]),r.glplot.setAspectratio(t.aspectratio),"orthographic"===n.projection.type!==r.camera._ortho&&(r.glplot.redraw(),r.glplot.clearRGBA(),r.glplot.dispose(),r.initializeGLPlot())},A.isCameraChanged=function(t){var e=this.getCamera(),r=h.nestedProperty(t,this.id+".camera").get();function n(t,e,r,n){var i=["up","center","eye"],o=["x","y","z"];return e[i[r]]&&t[i[r]][o[n]]===e[i[r]][o[n]]}var i=!1;if(void 0===r)i=!0;else{for(var o=0;o<3;o++)for(var a=0;a<3;a++)if(!n(e,r,o,a)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},A.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=h.nestedProperty(t,this.id+".aspectratio").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},A.saveLayout=function(t){var e,r,n,i,o,a,s=this,l=s.fullLayout,c=s.isCameraChanged(t),d=s.isAspectChanged(t),f=c||d;if(f){var p={};c&&(e=s.getCamera(),n=(r=h.nestedProperty(t,s.id+".camera")).get(),p[s.id+".camera"]=n),d&&(i=s.glplot.getAspectratio(),a=(o=h.nestedProperty(t,s.id+".aspectratio")).get(),p[s.id+".aspectratio"]=a),u.call("_storeDirectGUIEdit",t,l._preGUI,p),c&&(r.set(e),h.nestedProperty(l,s.id+".camera").set(e)),d&&(o.set(i),h.nestedProperty(l,s.id+".aspectratio").set(i),s.glplot.redraw())}return f},A.updateFx=function(t,e){var r=this,n=r.camera;if(n)if("orbit"===t)n.mode="orbit",n.keyBindingMode="rotate";else if("turntable"===t){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,o=i._fullLayout,a=r.fullSceneLayout.camera,s=a.up.x,l=a.up.y,c=a.up.z;if(c/Math.sqrt(s*s+l*l+c*c)<.999){var d=r.id+".camera.up",f={x:0,y:0,z:1},p={};p[d]=f;var m=i.layout;u.call("_storeDirectGUIEdit",m,o._preGUI,p),a.up=f,h.nestedProperty(m,d).set(f)}}else n.keyBindingMode=t;r.fullSceneLayout.hovermode=e},A.toImage=function(t){var e=this;t||(t="png"),e.staticMode&&e.container.appendChild(n),e.glplot.redraw();var r=e.glplot.gl,i=r.drawingBufferWidth,o=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var a=new Uint8Array(i*o*4);r.readPixels(0,0,i,o,r.RGBA,r.UNSIGNED_BYTE,a),function(t,e,r){for(var n=0,i=r-1;n0)for(var s=255/a,l=0;l<3;++l)t[o+l]=Math.min(s*t[o+l],255)}}(a,i,o);var s=document.createElement("canvas");s.width=i,s.height=o;var l,c=s.getContext("2d",{willReadFrequently:!0}),u=c.createImageData(i,o);switch(u.data.set(a),c.putImageData(u,0,0),t){case"jpeg":l=s.toDataURL("image/jpeg");break;case"webp":l=s.toDataURL("image/webp");break;default:l=s.toDataURL("image/png")}return e.staticMode&&e.container.removeChild(n),l},A.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[T[t]];f.setConvert(e,this.fullLayout),e.setScale=h.noop}},A.make4thDimension=function(){var t=this,e=t.graphDiv._fullLayout;t._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},f.setConvert(t._mockAxis,e)},t.exports=k},13195:(t,e,r)=>{"use strict";var n=r(75058),i=r(46367),o=r(84226),a=r(18360),s=r(21422),l=r(85538),c=r(98260).extendFlat,u=n({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});u.family.dflt='"Open Sans", verdana, arial, sans-serif',u.size.dflt=12,u.color.dflt=o.defaultLine,t.exports={font:u,title:{text:{valType:"string",editType:"layoutstyle",description:["Sets the plot's title.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:n({editType:"layoutstyle",description:["Sets the title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),subtitle:{text:{valType:"string",editType:"layoutstyle",description:"Sets the plot's subtitle."},font:n({editType:"layoutstyle",description:"Sets the subtitle font."}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle",description:["Sets the x position with respect to `xref` in normalized","coordinates from *0* (left) to *1* (right)."].join(" ")},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle",description:["Sets the y position with respect to `yref` in normalized","coordinates from *0* (bottom) to *1* (top).","*auto* places the baseline of the title onto the","vertical center of the top margin."].join(" ")},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle",description:["Sets the title's horizontal alignment with respect to its x position.","*left* means that the title starts at x,","*right* means that the title ends at x","and *center* means that the title's center is at x.","*auto* divides `xref` by three and calculates the `xanchor`","value automatically based on the value of `x`."].join(" ")},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle",description:["Sets the title's vertical alignment with respect to its y position.","*top* means that the title's cap line is at y,","*bottom* means that the title's baseline is at y","and *middle* means that the title's midline is at y.","*auto* divides `yref` by three and calculates the `yanchor`","value automatically based on the value of `y`."].join(" ")},pad:c(l({editType:"layoutstyle"}),{description:["Sets the padding of the title.","Each padding value only applies when the corresponding","`xanchor`/`yanchor` value is set accordingly. E.g. for left","padding to take effect, `xanchor` must be set to *left*.","The same rule applies if `xanchor`/`yanchor` is determined automatically.","Padding is muted if the respective anchor value is *middle*/*center*."].join(" ")}),automargin:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether the title can automatically push the figure margins.","If `yref='paper'` then the margin will expand to ensure that the title doesn’t","overlap with the edges of the container. If `yref='container'` then the margins","will ensure that the title doesn’t overlap with the plot area, tick labels,","and axis titles. If `automargin=true` and the margins need to be expanded,","then y will be set to a default 1 and yanchor will be set to an appropriate","default to ensure that minimal margin space is needed. Note that when `yref='paper'`,","only 1 or 0 are allowed y values. Invalid values will be reset to the default 1."].join(" ")},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot",description:["Determines how the font size for various text","elements are uniformed between each trace type.","If the computed text sizes were smaller than","the minimum size defined by `uniformtext.minsize`","using *hide* option hides the text; and","using *show* option shows the text without further downscaling.","Please note that if the size defined by `minsize` is greater than","the font size defined by trace, then the `minsize` is used."].join(" ")},minsize:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the minimum text size between traces of the same type."].join(" ")},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none",description:["Determines whether or not a layout width or height","that has been left undefined by the user","is initialized on each relayout.","Note that, regardless of this attribute,","an undefined layout width or height","is always initialized on the first call to plot."].join(" ")},width:{valType:"number",min:10,dflt:700,editType:"plot",description:["Sets the plot's width (in px)."].join(" ")},height:{valType:"number",min:10,dflt:450,editType:"plot",description:["Sets the plot's height (in px)."].join(" ")},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum width of the plot with margin.automargin applied (in px)"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum height of the plot with margin.automargin applied (in px)"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the left margin (in px)."},r:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the right margin (in px)."},t:{valType:"number",min:0,dflt:100,editType:"plot",description:"Sets the top margin (in px)."},b:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the bottom margin (in px)."},pad:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the amount of padding (in px)","between the plotting area and the axis lines"].join(" ")},autoexpand:{valType:"boolean",dflt:!0,editType:"plot",description:["Turns on/off margin expansion computations.","Legends, colorbars, updatemenus, sliders, axis rangeselector and rangeslider","are allowed to push the margins by defaults."].join(" ")},editType:"plot"},computed:{valType:"any",editType:"none",description:["Placeholder for exporting automargin-impacting values namely","`margin.t`, `margin.b`, `margin.l` and `margin.r` in *full-json* mode."].join(" ")},paper_bgcolor:{valType:"color",dflt:o.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:o.background,editType:"layoutstyle",description:["Sets the background color of the plotting area in-between x and y axes."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","This is the default value; however it could be overridden for individual axes."].join(" ")},separators:{valType:"string",editType:"plot",description:["Sets the decimal and thousand separators.","For example, *. * puts a '.' before decimals and a space","between thousands. In English locales, dflt is *.,* but","other locales may alter this default."].join(" ")},hidesources:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether or not a text link citing the data source is","placed at the bottom-right cored of the figure.","Has only an effect only on graphs that have been generated via","forked graphs from the Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise)."].join(" ")},showlegend:{valType:"boolean",editType:"legend",description:["Determines whether or not a legend is drawn.","Default is `true` if there is a trace to show and any of these:","a) Two or more traces would by default be shown in the legend.","b) One pie trace is shown in the legend.","c) One trace is explicitly given with `showlegend: true`."].join(" ")},colorway:{valType:"colorlist",dflt:o.defaults,editType:"calc",description:"Sets the default trace colors."},datarevision:{valType:"any",editType:"calc",description:["If provided, a changed value tells `Plotly.react` that","one or more data arrays has changed. This way you can modify","arrays in-place rather than making a complete new copy for an","incremental change.","If NOT provided, `Plotly.react` assumes that data arrays are","being treated as immutable, thus any data array with a","different identity from its predecessor contains new data."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Used to allow user interactions with the plot to persist after","`Plotly.react` calls that are unaware of these interactions.","If `uirevision` is omitted, or if it is given and it changed from","the previous `Plotly.react` call, the exact new figure is used.","If `uirevision` is truthy and did NOT change, any attribute","that has been affected by user interactions and did not receive a","different value in the new figure will keep the interaction value.","`layout.uirevision` attribute serves as the default for","`uirevision` attributes in various sub-containers. For finer","control you can set these sub-attributes directly. For example,","if your app separately controls the data on the x and y axes you","might set `xaxis.uirevision=*time*` and `yaxis.uirevision=*cost*`.","Then if only the y data is changed, you can update","`yaxis.uirevision=*quantity*` and the y axis range will reset but","the x axis range will retain any user-driven zoom."].join(" ")},editrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in `editable: true`","configuration, other than trace names and axis titles.","Defaults to `layout.uirevision`."].join(" ")},selectionrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in selected points","from all traces."].join(" ")},template:{valType:"any",editType:"calc",description:["Default attributes to be applied to the plot. Templates can be","created from existing plots using `Plotly.makeTemplate`, or","created manually. They should be objects with format:","`{layout: layoutTemplate, data: {[type]: [traceTemplate, ...]}, ...}`","`layoutTemplate` and `traceTemplate` are objects matching the","attribute structure of `layout` and a data trace. ","Trace templates are applied cyclically to traces of each type.","Container arrays (eg `annotations`) have special handling:","An object ending in `defaults` (eg `annotationdefaults`) is applied","to each array item. But if an item has a `templateitemname` key","we look in the template array for an item with matching `name` and","apply that instead. If no matching `name` is found we mark the item","invisible. Any named template item not referenced is appended to","the end of the array, so you can use this for a watermark annotation","or a logo image, for example. To omit one of these items on the plot,","make an item with matching `templateitemname` and `visible: false`."].join(" ")},newshape:a.newshape,activeshape:a.activeshape,newselection:s.newselection,activeselection:s.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information that can be used in various `text` attributes.","Attributes such as the graph, axis and colorbar `title.text`, annotation `text`","`trace.name` in legend items, `rangeselector`, `updatemenus` and `sliders` `label` text","all support `meta`. One can access `meta` fields using template strings:","`%{meta[i]}` where `i` is the index of the `meta`","item in question.","`meta` can also be an object for example `{key: value}` which can be accessed","%{meta[key]}."].join(" ")},transition:c({},i.transition,{description:["Sets transition options used during Plotly.react updates."].join(" "),editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the contents of the title, please use `title.text` now."].join(" ")},titlefont:n({editType:"layoutstyle",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}}},85538:t=>{"use strict";t.exports=function(t){var e=t.editType;return{t:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) along the top of the component."},r:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) on the right side of the component."},b:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) along the bottom of the component."},l:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) on the left side of the component."},editType:e}}},51137:(t,e,r)=>{"use strict";var n=r(27941),i=r(79969).de,o=r(31830).OE,a=r(7370),s=r(44514),l=r(25059),c=r(35852),u=r(46121),h=r(12822),d=r(17499),f=r(32994).BADNUM,p=r(99246),m=r(8867).clearOutline,g=r(49114),v=r(46367),b=r(53874),y=r(47388).eV,x=h.relinkPrivateKeys,_=h._,w=t.exports={};h.extendFlat(w,l),w.attributes=r(3520),w.attributes.type.values=w.allTypes,w.fontAttrs=r(75058),w.layoutAttributes=r(13195);var k=w.transformsRegistry,A=r(74036);w.executeAPICommand=A.executeAPICommand,w.computeAPICommandBindings=A.computeAPICommandBindings,w.manageCommandObserver=A.manageCommandObserver,w.hasSimpleAPICommandBindings=A.hasSimpleAPICommandBindings,w.redrawText=function(t){return t=h.getGraphDiv(t),new Promise((function(e){setTimeout((function(){t._fullLayout&&(l.getComponentMethod("annotations","draw")(t),l.getComponentMethod("legend","draw")(t),l.getComponentMethod("colorbar","draw")(t),e(w.previousPromises(t)))}),300)}))},w.resize=function(t){var e;t=h.getGraphDiv(t);var r=new Promise((function(r,n){t&&!h.isHidden(t)||n(new Error("Resize must be passed a displayed plot div element.")),t._redrawTimer&&clearTimeout(t._redrawTimer),t._resolveResize&&(e=t._resolveResize),t._resolveResize=r,t._redrawTimer=setTimeout((function(){if(!t.layout||t.layout.width&&t.layout.height||h.isHidden(t))r(t);else{delete t.layout.width,delete t.layout.height;var e=t.changed;t.autoplay=!0,l.call("relayout",t,{autosize:!0}).then((function(){t.changed=e,t._resolveResize===r&&(delete t._resolveResize,r(t))}))}}),100)}));return e&&e(r),r},w.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then((function(){t._promises=[]}))},w.addLinks=function(t){if(t._context.showLink||t._context.showSources){var e=t._fullLayout,r=h.ensureSingle(e._paper,"text","js-plot-link-container",(function(t){t.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:d.defaultLine,"pointer-events":"all"}).each((function(){var t=n.select(this);t.append("tspan").classed("js-link-to-tool",!0),t.append("tspan").classed("js-link-spacer",!0),t.append("tspan").classed("js-sourcelinks",!0)}))})),i=r.node(),o={y:e._paper.attr("height")-9};document.body.contains(i)&&i.getComputedTextLength()>=e.width-20?(o["text-anchor"]="start",o.x=5):(o["text-anchor"]="end",o.x=e._paper.attr("width")-7),r.attr(o);var a=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",(function(){w.sendDataToCloud(t)}));else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}(t,a),s.text(a.text()&&l.text()?" - ":"")}},w.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit("plotly_beforeexport");var r=n.select(t).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=w.graphJson(t,!1,"keepdata"),i.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var M=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],T=["year","month","dayMonth","dayMonthYear"];function S(t,e){var r=t._context.locale;r||(r="en-US");var n=!1,i={};function o(t){for(var r=!0,o=0;o1&&I.length>1){for(l.getComponentMethod("grid","sizeDefaults")(c,s),a=0;a15&&I.length>15&&0===s.shapes.length&&0===s.images.length,w.linkSubplots(d,s,u,n),w.cleanPlot(d,s,u,n);var N=!(!n._has||!n._has("gl2d")),B=!(!s._has||!s._has("gl2d")),U=!(!n._has||!n._has("cartesian"))||N,G=!(!s._has||!s._has("cartesian"))||B;U&&!G?n._bgLayer.remove():G&&!U&&(s._shouldCreateBgLayer=!0),n._zoomlayer&&!t._dragging&&m({_fullLayout:n}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i0){var u=1-2*s;n=Math.round(u*n),i=Math.round(u*i)}}var d=w.layoutAttributes.width.min,f=w.layoutAttributes.height.min;n1,m=!e.height&&Math.abs(r.height-i)>1;(m||p)&&(p&&(r.width=n),m&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(t,e,r,n){var i,o,a,s=l.componentsRegistry,c=e._basePlotModules,u=l.subplotsRegistry.cartesian;for(i in s)(a=s[i]).includeBasePlot&&a.includeBasePlot(t,e);for(var d in c.length||c.push(u),e._has("cartesian")&&(l.getComponentMethod("grid","contentDefaults")(t,e),u.finalizeSubplots(t,e)),e._subplots)e._subplots[d].sort(h.subplotSort);for(o=0;o1&&(r.l/=v,r.r/=v)}if(f){var b=(r.t+r.b)/f;b>1&&(r.t/=b,r.b/=b)}var y=void 0!==r.xl?r.xl:r.x,x=void 0!==r.xr?r.xr:r.x,_=void 0!==r.yt?r.yt:r.y,k=void 0!==r.yb?r.yb:r.y;p[e]={l:{val:y,size:r.l+g},r:{val:x,size:r.r+g},b:{val:k,size:r.b+g},t:{val:_,size:r.t+g}},m[e]=1}else delete p[e],delete m[e];if(!n._replotting)return w.doAutoMargin(t)}},w.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),O(e);var i=e._size,o=e.margin,s={t:0,b:0,l:0,r:0},c=h.extendFlat({},i),u=o.l,d=o.r,f=o.t,m=o.b,g=e._pushmargin,v=e._pushmarginIds,b=e.minreducedwidth,y=e.minreducedheight;if(!1!==o.autoexpand){for(var x in g)v[x]||delete g[x];var _=t._fullLayout._reservedMargin;for(var k in _)for(var A in _[k]){var M=_[k][A];s[A]=Math.max(s[A],M)}for(var T in g.base={l:{val:0,size:u},r:{val:1,size:d},t:{val:1,size:f},b:{val:0,size:m}},s){var S=0;for(var C in g)"base"!==C&&a(g[C][T].size)&&(S=g[C][T].size>S?g[C][T].size:S);var E=Math.max(0,o[T]-S);s[T]=Math.max(0,s[T]-E)}for(var L in g){var z=g[L].l||{},D=g[L].b||{},I=z.val,F=z.size,R=D.val,P=D.size,j=r-s.r-s.l,N=n-s.t-s.b;for(var B in g){if(a(F)&&g[B].r){var U=g[B].r.val,G=g[B].r.size;if(U>I){var V=(F*U+(G-j)*I)/(U-I),H=(G*(1-I)+(F-j)*(1-U))/(U-I);V+H>u+d&&(u=V,d=H)}}if(a(P)&&g[B].t){var W=g[B].t.val,q=g[B].t.size;if(W>R){var Y=(P*W+(q-N)*R)/(W-R),Z=(q*(1-R)+(P-N)*(1-W))/(W-R);Y+Z>m+f&&(m=Y,f=Z)}}}}}var X=h.constrain(r-o.l-o.r,2,b),$=h.constrain(n-o.t-o.b,2,y),J=Math.max(0,r-X),K=Math.max(0,n-$);if(J){var Q=(u+d)/J;Q>1&&(u/=Q,d/=Q)}if(K){var tt=(m+f)/K;tt>1&&(m/=tt,f/=tt)}if(i.l=Math.round(u)+s.l,i.r=Math.round(d)+s.r,i.t=Math.round(f)+s.t,i.b=Math.round(m)+s.b,i.p=Math.round(o.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&(w.didMarginChange(c,i)||function(t){if("_redrawFromAutoMarginCount"in t._fullLayout)return!1;var e=p.list(t,"",!0);for(var r in e)if(e[r].autoshift||e[r].shift)return!0;return!1}(t))){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var et=3*(1+Object.keys(v).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return l.call("redraw",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit("plotly_transitioninterrupted",[])}));var o=0,a=0;function s(){return o++,function(){var e;a++,n||a!==o||(e=i,t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return l.call("redraw",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])})).then(e)))}}r.runFn(s),setTimeout(s())}))}],o=h.syncOrAsync(i,t);return o&&o.then||(o=Promise.resolve()),o.then((function(){return t}))}w.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},w.graphJson=function(t,e,r,n,i,o){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&w.supplyDefaults(t);var a=i?t._fullData:t.data,l=i?t._fullLayout:t.layout,c=(t._transitionData||{})._frames;function u(t,e){if("function"==typeof t)return e?"_function_":null;if(h.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(o){if(-1===["_","["].indexOf(o.charAt(0)))if("function"!=typeof t[o]){if("keepdata"===r){if("src"===o.substr(o.length-3))return}else if("keepstream"===r){if("string"==typeof(n=t[o+"src"])&&n.indexOf(":")>0&&!h.isPlainObject(t.stream))return}else if("keepall"!==r&&"string"==typeof(n=t[o+"src"])&&n.indexOf(":")>0)return;i[o]=u(t[o],e)}else e&&(i[o]="_function")})),i}var o=Array.isArray(t),a=h.isTypedArray(t);if((o||a)&&t.dtype&&t.shape){var l=t.bdata;return u({dtype:t.dtype,shape:t.shape,bdata:h.isArrayBuffer(l)?s.encode(l):l},e)}return o?t.map((function(t){return u(t,e)})):a?h.simpleMap(t,h.identity):h.isJSDate(t)?h.ms2DateTimeLocal(+t):t}var d={data:(a||[]).map((function(t){var r=u(t);return e&&delete r.fit,r}))};if(!e&&(d.layout=u(l),i)){var f=l._size;d.layout.computed={margin:{b:f.b,l:f.l,r:f.r,t:f.t}}}return c&&(d.frames=u(c)),o&&(d.config=u(t._context,!0)),"object"===n?d:JSON.stringify(d)},w.modifyFrames=function(t,e){var r,n,i,o=t._transitionData._frames,a=t._transitionData._frameHash;for(r=0;r=0;o--)if(l[o].enabled){r._indexToPoints=l[o]._indexToPoints;break}n&&n.calc&&(a=n.calc(t,r))}Array.isArray(a)&&a[0]||(a=[{x:f,y:f}]),a[0].t||(a[0].t={}),a[0].trace=r,d[e]=a}}for(R(a,s,u),i=0;i{"use strict";var n=r(12822),i=r(46121),o=r(40365).N;t.exports=function(t,e,r,a){var s,l,c=a.type,u=a.attributes,h=a.handleDefaults,d=a.partition||"x",f=e._subplots[c],p=f.length,m=p&&f[0].replace(/\d+$/,"");function g(t,e){return n.coerce(s,l,u,t,e)}for(var v=0;v{"use strict";var n=r(77201),i=n.FORMAT_LINK,o=n.DATE_FORMAT_LINK;function a(t){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(t&&t.supportOther?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),'Numbers are formatted using d3-format\'s syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".',i,"for details on the formatting syntax.",'Dates are formatted using d3-time-format\'s syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".',o,"for details on the date formatting syntax."].join(" ")}function s(t){var e=t.description?" "+t.description:"",r=t.keys||[];if(r.length>0){for(var n=[],i=0;i` is displayed in the secondary box, for example "{fullData.name}".',"To hide the secondary box completely, use an empty tag ``."].join(" ")};return!1!==t.arrayOk&&(n.arrayOk=!0),n},e.ay=function(t,e){t=t||{};var r=s(e=e||{}),n={valType:"string",dflt:"",editType:t.editType||"calc",description:["Template string used for rendering the information text that appear on points.","Note that this will override `textinfo`.",a(),"Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",r].join(" ")};return!1!==t.arrayOk&&(n.arrayOk=!0),n},e.LF=function(t,e){e=e||{};var r=(t=t||{}).newshape?"new ":"",n=s(e);return{valType:"string",dflt:"",editType:t.editType||"arraydraw",description:["Template string used for rendering the "+r+"shape's label.","Note that this will override `text`.",["Variables are inserted using %{variable},",'for example "x0: %{x0}".','Numbers are formatted using d3-format\'s syntax %{variable:d3-format}, for example "Price: %{x0:$.2f}". See',i,"for details on the formatting syntax.",'Dates are formatted using d3-time-format\'s syntax %{variable|d3-time-format}, for example "Day: %{x0|%m %b %Y}". See',o,"for details on the date formatting syntax.","A single multiplication or division operation may be applied to numeric variables, and combined with",'d3 number formatting, for example "Length in cm: %{x0*2.54}", "%{slope*60:.1f} meters per second."',"For log axes, variable values are given in log units.","For date axes, x/y coordinate variables and center variables use datetimes, while all other variable values use values in ms."].join(" "),n].join(" ")}}},25059:(t,e,r)=>{"use strict";var n=r(64347),i=r(51648),o=r(65280),a=r(12517),s=r(16822).addStyleRule,l=r(98260),c=r(3520),u=r(13195),h=l.extendFlat,d=l.extendDeepAll;function f(t){var i=t.name,o=t.categories,a=t.meta;if(e.modules[i])n.log("Type "+i+" already registered");else{e.subplotsRegistry[t.basePlotModule.name]||function(t){var r=t.name;if(e.subplotsRegistry[r])n.log("Plot type "+r+" already registered.");else for(var i in v(t),e.subplotsRegistry[r]=t,e.componentsRegistry)x(i,t.name)}(t.basePlotModule);for(var l={},c=0;c{"use strict";var n=r(25059),i=r(12822),o=i.extendFlat,a=i.extendDeep;function s(t){var e;switch(t){case"themes__thumb":e={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":e={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:e={}}return e}t.exports=function(t,e){var r,i,l=t.data,c=t.layout,u=a([],l),h=a({},c,s(e.tileClass)),d=t._context||{};if(e.width&&(h.width=e.width),e.height&&(h.height=e.height),"thumbnail"===e.tileClass||"themes__thumb"===e.tileClass){h.annotations=[];var f=Object.keys(h);for(r=0;r-1&&(h[f[r]].title={text:""});for(r=0;r{"use strict";var n=r(12822),i=r(42704),o=r(11148),a=r(13078);t.exports=function(t,e){var r;return n.isPlainObject(t)||(r=n.getGraphDiv(t)),(e=e||{}).format=e.format||"png",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise((function(s,l){r&&r._snapshotInProgress&&l(new Error("Snapshotting already in progress.")),n.isIE()&&"svg"!==e.format&&l(new Error(a.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var c=i(t,e),u=e.filename||t.fn||"newplot";u+="."+e.format.replace("-","."),c.then((function(t){return r&&(r._snapshotInProgress=!1),o(t,u,e.format)})).then((function(t){s(t)})).catch((function(t){r&&(r._snapshotInProgress=!1),l(t)}))}))}},11148:(t,e,r)=>{"use strict";var n=r(12822),i=r(13078);t.exports=function(t,e,r){var o=document.createElement("a"),a="download"in o;return new Promise((function(s,l){var c,u;if(n.isIE())return c=i.createBlob(t,"svg"),window.navigator.msSaveBlob(c,e),c=null,s(e);if(a)return c=i.createBlob(t,r),u=i.createObjectURL(c),o.href=u,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),i.revokeObjectURL(u),c=null,s(e);if(n.isSafari()){var h="svg"===r?",":";base64,";return i.octetStream(h+encodeURIComponent(t)),s(e)}l(new Error("download error"))}))}},13078:(t,e,r)=>{"use strict";var n=r(25059);e.getDelay=function(t){return t._has&&(t._has("gl3d")||t._has("gl2d")||t._has("mapbox")||t._has("map"))?500:0},e.getRedrawFunc=function(t){return function(){n.getComponentMethod("colorbar","draw")(t)}},e.encodeSVG=function(t){return"data:image/svg+xml,"+encodeURIComponent(t)},e.encodeJSON=function(t){return"data:application/json,"+encodeURIComponent(t)};var i=window.URL||window.webkitURL;e.createObjectURL=function(t){return i.createObjectURL(t)},e.revokeObjectURL=function(t){return i.revokeObjectURL(t)},e.createBlob=function(t,e){if("svg"===e)return new window.Blob([t],{type:"image/svg+xml;charset=utf-8"});if("full-json"===e)return new window.Blob([t],{type:"application/json;charset=utf-8"});var r=function(t){for(var e=t.length,r=new ArrayBuffer(e),n=new Uint8Array(r),i=0;i{"use strict";var n=r(13078),i={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:r(5041),toSVG:r(48402),svgToImg:r(40241),toImage:r(91117),downloadImage:r(56787)};t.exports=i},40241:(t,e,r)=>{"use strict";var n=r(12822),i=r(86626).EventEmitter,o=r(13078);t.exports=function(t){var e=t.emitter||new i,r=new Promise((function(i,a){var s=window.Image,l=t.svg,c=t.format||"png";if(n.isIE()&&"svg"!==c){var u=new Error(o.MSG_IE_BAD_FORMAT);return a(u),t.promise?r:e.emit("error",u)}var h,d,f=t.canvas,p=t.scale||1,m=t.width||300,g=t.height||150,v=p*m,b=p*g,y=f.getContext("2d",{willReadFrequently:!0}),x=new s;"svg"===c||n.isSafari()?d=o.encodeSVG(l):(h=o.createBlob(l,"svg"),d=o.createObjectURL(h)),f.width=v,f.height=b,x.onload=function(){var r;switch(h=null,o.revokeObjectURL(d),"svg"!==c&&y.drawImage(x,0,0,v,b),c){case"jpeg":r=f.toDataURL("image/jpeg");break;case"png":r=f.toDataURL("image/png");break;case"webp":r=f.toDataURL("image/webp");break;case"svg":r=d;break;default:var n="Image format is not jpeg, png, svg or webp.";if(a(new Error(n)),!t.promise)return e.emit("error",n)}i(r),t.promise||e.emit("success",r)},x.onerror=function(r){if(h=null,o.revokeObjectURL(d),a(r),!t.promise)return e.emit("error",r)},x.src=d}));return t.promise?r:e}},91117:(t,e,r)=>{"use strict";var n=r(86626).EventEmitter,i=r(25059),o=r(12822),a=r(13078),s=r(5041),l=r(48402),c=r(40241);t.exports=function(t,e){var r=new n,u=s(t,{format:"png"}),h=u.gd;h.style.position="absolute",h.style.left="-5000px",document.body.appendChild(h);var d=a.getRedrawFunc(h);return i.call("_doPlot",h,u.data,u.layout,u.config).then(d).then((function(){var t=a.getDelay(h._fullLayout);setTimeout((function(){var t=l(h),n=document.createElement("canvas");n.id=o.randstr(),(r=c({format:e.format,width:h._fullLayout.width,height:h._fullLayout.height,canvas:n,emitter:r,svg:t})).clean=function(){h&&document.body.removeChild(h)}}),t)})).catch((function(t){r.emit("error",t)})),r}},48402:(t,e,r)=>{"use strict";var n=r(27941),i=r(12822),o=r(40666),a=r(17499),s=r(25853),l=/"/g,c="TOBESTRIPPED",u=new RegExp('("'+c+")|("+c+'")',"g");t.exports=function(t,e,r){var h,d=t._fullLayout,f=d._paper,p=d._toppaper,m=d.width,g=d.height;f.insert("rect",":first-child").call(o.setRect,0,0,m,g).call(a.fill,d.paper_bgcolor);var v=d._basePlotModules||[];for(h=0;h")?"":e.html(t).text()}));return e.remove(),r}(w)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(u,"'"),i.isIE()&&(w=(w=(w=w.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),w}},77881:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822).isArrayOrTypedArray,o=r(32994).BADNUM,a=r(25059),s=r(75815),l=r(69352).getAxisGroup,c=r(53481);function u(t,e,r,a,u){if(a.length){var x,_,w,k;switch(function(t,e){var r,o;for(r=0;rh+c||!n(u))}for(var f=0;f{"use strict";t.exports=i;var n=r(12822).distinctVals;function i(t,e){this.traces=t,this.sepNegVal=e.sepNegVal,this.overlapNoMerge=e.overlapNoMerge;for(var r=1/0,i=e.posAxis._id.charAt(0),o=[],a=0;a{"use strict";var n=r(40666),i=r(17499);t.exports=function(t,e,r,o){var a=r.marker.pattern;a&&a.shape?n.pointStyle(t,r,o,e):i.fill(t,e.color)}},17269:(t,e,r)=>{"use strict";var n=r(12822);function i(t){return-1!==t.indexOf("e")?t.replace(/[.]?0+e/,"e"):-1!==t.indexOf(".")?t.replace(/[.]?0+$/,""):t}e.formatPiePercent=function(t,e){var r=i((100*t).toPrecision(3));return n.numSeparate(r,e)+"%"},e.formatPieValue=function(t,e){var r=i(t.toPrecision(10));return n.numSeparate(r,e)},e.getFirstFilled=function(t,e){if(n.isArrayOrTypedArray(t))for(var r=0;r{"use strict";var n=r(17499),i=r(17269).castOption,o=r(44380);t.exports=function(t,e,r,a){var s=r.marker.line,l=i(s.color,e.pts)||n.defaultLine,c=i(s.width,e.pts)||0;t.call(o,e,r,a).style("stroke-width",c).call(n.stroke,l)}},55508:(t,e,r)=>{"use strict";var n=r(12822);t.exports=function(t,e){for(var r=0;r{"use strict";var n=r(60393).axisHoverFormat,i=r(24131).ay,o=r(24131).rb,a=r(89322),s=r(75058),l=r(68057).T,c=r(68057).k,u=r(40666),h=r(32565),d=r(98260).extendFlat,f=r(43591);function p(t){return{valType:"any",dflt:0,editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the period positioning in milliseconds or *M* on the "+t+" axis.","Special values in the form of *M* could be used to declare","the number of months. In this case `n` must be a positive integer."].join(" ")}}function m(t){return{valType:"any",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the base for period positioning in milliseconds or date string on the "+t+" axis.","When `"+t+"period` is round number of weeks,","the `"+t+"period0` by default would be on a Sunday i.e. 2000-01-02,","otherwise it would be at 2000-01-01."].join(" ")}}function g(t){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the alignment of data points on the "+t+" axis."].join(" ")}}t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the x coordinates."},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `x`.","Builds a linear space of x coordinates.","Use with `dx`","where `x0` is the starting coordinate and `dx` the step."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the x coordinate step.","See `x0` for more info."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the y coordinates."},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `y`.","Builds a linear space of y coordinates.","Use with `dy`","where `y0` is the starting coordinate and `dy` the step."].join(" ")},dy:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the y coordinate step.","See `y0` for more info."].join(" ")},xperiod:p("x"),yperiod:p("y"),xperiod0:m("x0"),yperiod0:m("y0"),xperiodalignment:g("x"),yperiodalignment:g("y"),xhoverformat:n("x"),yhoverformat:n("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","offsetgroup where bars of the same position coordinate will line up."].join(" ")},alignmentgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","alignmentgroup. This controls whether bars compute their positional","range dependently or independently."].join(" ")},stackgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several scatter traces (on the same subplot) to the same","stackgroup in order to add their y values (or their x values if","`orientation` is *h*). If blank or omitted this trace will not be","stacked. Stacking also turns `fill` on by default, using *tonexty*","(*tonextx*) if `orientation` is *h* (*v*) and sets the default","`mode` to *lines* irrespective of point count.","You can only stack on a numeric (linear or log) axis.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},orientation:{valType:"enumerated",values:["v","h"],editType:"calc",description:["Only relevant in the following cases:","1. when `scattermode` is set to *group*.","2. when `stackgroup` is used, and only the first","`orientation` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`. Sets the","stacking direction. With *v* (*h*), the y (x) values of subsequent","traces are added. Also affects the default value of `fill`."].join(" ")},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`groupnorm` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Sets the normalization for the sum of this `stackgroup`.","With *fraction*, the value of each trace at each location is","divided by the sum of all trace values at that location.","*percent* is the same but multiplied by 100 to show percentages.","If there are multiple subplots, or multiple `stackgroup`s on one","subplot, each will be normalized within its own set."].join(" ")},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`stackgaps` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Determines how we handle locations at which other traces in this","group have data but this one does not.","With *infer zero* we insert a zero at these locations.","With *interpolate* we linearly interpolate between existing","values, and extrapolate a constant beyond the existing values."].join(" ")},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},texttemplate:i({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc",description:["Determines the drawing mode for this scatter trace.","If the provided `mode` includes *text* then the `text` elements","appear at the coordinates. Otherwise, the `text` elements","appear on hover.","If there are less than "+h.PTS_LINESONLY+" points","and the trace is not stacked","then the default is *lines+markers*. Otherwise, *lines*."].join(" ")},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style",description:["Do the hover effects highlight individual points (markers or","line points) or do they highlight filled regions?","If the fill is *toself* or *tonext* and there are no markers","or text, then the default is *fills*, otherwise it is *points*."].join(" ")},hovertemplate:o({},{keys:h.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0,description:"Sets the line color."},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0,description:"Sets the line width (in px)."},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","With *spline* the lines are drawn using spline interpolation.","The other available values correspond to step-wise line shapes."].join(" ")},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot",description:["Has an effect only if `shape` is set to *spline*","Sets the amount of smoothing.","*0* corresponds to no smoothing (equivalent to a *linear* shape)."].join(" ")},dash:d({},l,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot",description:["Sets the line back off from the end point of the nth line segment (in px).","This option is useful e.g. to avoid overlap with arrowhead markers.","With *auto* the lines would trim before markers if `marker.angleref` is set to *previous*."].join(" ")},simplify:{valType:"boolean",dflt:!0,editType:"plot",description:["Simplifies lines by removing nearly-collinear points. When transitioning","lines, it may be desirable to disable this so that the number of points","along the resulting SVG path is unaffected."].join(" ")},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the provided data arrays are connected."].join(" ")},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines whether or not markers and text nodes","are clipped about the subplot axes.","To show markers and text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc",description:["Sets the area to fill with a solid color.","Defaults to *none* unless this trace is stacked, then it gets","*tonexty* (*tonextx*) if `orientation` is *v* (*h*)","Use with `fillcolor` if not *none*.","*tozerox* and *tozeroy* fill to x=0 and y=0 respectively.","*tonextx* and *tonexty* fill between the endpoints of this","trace and the endpoints of the trace before it, connecting those","endpoints with straight lines (to make a stacked area graph);","if there is no trace before it, they behave like *tozerox* and","*tozeroy*.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},fillcolor:f(!0),fillgradient:d({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc",description:["Sets the type/orientation of the color gradient for the fill.","Defaults to *none*."].join(" ")},start:{valType:"number",editType:"calc",description:["Sets the gradient start value.","It is given as the absolute position on the axis determined by","the orientiation. E.g., if orientation is *horizontal*, the","gradient will be horizontal and start from the x-position","given by start. If omitted, the gradient starts at the lowest","value of the trace along the respective axis.","Ignored if orientation is *radial*."].join(" ")},stop:{valType:"number",editType:"calc",description:["Sets the gradient end value.","It is given as the absolute position on the axis determined by","the orientiation. E.g., if orientation is *horizontal*, the","gradient will be horizontal and end at the x-position","given by end. If omitted, the gradient ends at the highest","value of the trace along the respective axis.","Ignored if orientation is *radial*."].join(" ")},colorscale:{valType:"colorscale",editType:"style",description:["Sets the fill gradient colors as a color scale.","The color scale is interpreted as a gradient","applied in the direction specified by *orientation*,","from the lowest to the highest value of the scatter","plot along that axis, or from the center to the most","distant point from it, if orientation is *radial*."].join(" ")},editType:"calc",description:["Sets a fill gradient.","If not specified, the fillcolor is used instead."].join(" ")}),fillpattern:c,marker:d({symbol:{valType:"enumerated",values:u.symbolList,dflt:"circle",arrayOk:!0,editType:"style",description:["Sets the marker symbol type.","Adding 100 is equivalent to appending *-open* to a symbol name.","Adding 200 is equivalent to appending *-dot* to a symbol name.","Adding 300 is equivalent to appending *-open-dot*","or *dot-open* to a symbol name."].join(" ")},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0,description:"Sets the marker opacity."},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1,description:["Sets the marker angle in respect to `angleref`."].join(" ")},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1,description:["Sets the reference for marker angle.","With *previous*, angle 0 points along the line from the previous point to this one.","With *up*, angle 0 points toward the top of the screen."].join(" ")},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0,description:["Moves the marker away from the data point in the direction of `angle` (in px).","This can be useful for example if you have another marker at this","location and you want to point an arrowhead marker at it."].join(" ")},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0,description:"Sets the marker size (in px)."},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets a maximum number of points to be drawn on the graph.","*0* corresponds to no limit."].join(" ")},sizeref:{valType:"number",dflt:1,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the scale factor used to determine the rendered size of","marker points. Use with `sizemin` and `sizemode`."].join(" ")},sizemin:{valType:"number",min:0,dflt:0,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the minimum size (in px) of the rendered marker points."].join(" ")},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the rule for which the data in `size` is converted","to pixels."].join(" ")},line:d({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0,description:"Sets the width (in px) of the lines bounding the marker points."},editType:"calc"},a("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc",description:["Sets the type of gradient used to fill the markers"].join(" ")},color:{valType:"color",arrayOk:!0,editType:"calc",description:["Sets the final color of the gradient fill:","the center color for radial, the right for horizontal,","or the bottom for vertical."].join(" ")},editType:"calc"},editType:"calc"},a("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of selected points."},color:{valType:"color",editType:"style",description:"Sets the marker color of selected points."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of selected points."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of selected points."},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of unselected points, applied only when a selection exists."},color:{valType:"color",editType:"style",description:"Sets the marker color of unselected points, applied only when a selection exists."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of unselected points, applied only when a selection exists."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of unselected points, applied only when a selection exists."},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc",description:["Sets the positions of the `text` elements","with respects to the (x,y) coordinates."].join(" ")},textfont:s({editType:"calc",colorEditType:"style",arrayOk:!0,description:"Sets the text font."}),zorder:{valType:"integer",dflt:0,editType:"plot",description:["Sets the layer on which this trace is displayed, relative to","other SVG traces on the same subplot. SVG traces with higher `zorder`","appear in front of those with lower `zorder`."].join(" ")}}},93459:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822),o=r(75815),a=r(15389),s=r(32994).BADNUM,l=r(677),c=r(45065),u=r(55508),h=r(58146);function d(t,e,r,n,i,a,s){var c=e._length,u=t._fullLayout,h=r._id,d=n._id,f=u._firstScatter[m(e)]===e.uid,p=(g(e,u,r,n)||{}).orientation,v=e.fill;r._minDtick=0,n._minDtick=0;var b={padded:!0},y={padded:!0};s&&(b.ppad=y.ppad=s);var x=c<2||i[0]!==i[c-1]||a[0]!==a[c-1];x&&("tozerox"===v||"tonextx"===v&&(f||"h"===p))?b.tozero=!0:(e.error_y||{}).visible||"tonexty"!==v&&"tozeroy"!==v&&(l.hasMarkers(e)||l.hasText(e))||(b.padded=!1,b.ppad=0),x&&("tozeroy"===v||"tonexty"===v&&(f||"v"===p))?y.tozero=!0:"tonextx"!==v&&"tozerox"!==v||(y.padded=!1),h&&(e._extremes[h]=o.findExtremes(r,i,b)),d&&(e._extremes[d]=o.findExtremes(n,a,y))}function f(t,e){if(l.hasMarkers(t)){var r,n=t.marker,a=1.6*(t.marker.sizeref||1);if(r="area"===t.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/a),3)}:function(t){return Math.max((t||0)/a,3)},i.isArrayOrTypedArray(n.size)){var s={type:"linear"};o.setConvert(s);for(var c=s.makeCalcdata(t.marker,"size"),u=new Array(e),h=0;hl&&L[v].gap;)v--;for(y=L[v].s,m=L.length-1;m>v;m--)L[m].s=y;for(;l{"use strict";var n=r(12822);t.exports=function(t,e){n.isArrayOrTypedArray(e.selectedpoints)&&n.tagSelected(t,e)}},45065:(t,e,r)=>{"use strict";var n=r(42226).hasColorscale,i=r(62182),o=r(677);t.exports=function(t,e){o.hasLines(e)&&n(e,"line")&&i(t,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),o.hasMarkers(e)&&(n(e,"marker")&&i(t,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),n(e,"marker.line")&&i(t,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}},32565:t=>{"use strict";t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},30888:(t,e,r)=>{"use strict";var n=r(93459),i=r(77881).setGroupPositions;function o(t,e,r,n,i,o,a){i[n]=!0;var s={i:null,gap:!0,s:0};if(s[a]=r,t.splice(e,0,s),e&&r===t[e-1][a]){var l=t[e-1];s.s=l.s,s.i=l.i,s.gap=l.gap}else o&&(s.s=function(t,e,r,n){var i=t[e-1],o=t[e+1];return o?i?i.s+(o.s-i.s)*(r-i[n])/(o[n]-i[n]):o.s:i.s}(t,e,r,a));e||(t[0].t=t[1].t,t[0].trace=t[1].trace,delete t[1].t,delete t[1].trace)}t.exports=function(t,e){"group"===t._fullLayout.scattermode&&function(t,e){for(var r=e.xaxis,n=e.yaxis,o=t._fullLayout,a=t._fullData,s=t.calcdata,l=[],c=[],u=0;uS[h]&&h{"use strict";var n=r(12822),i=r(28104),o=r(98387);t.exports=function(t,e){var r,a,s;function l(t){return n.coerce(a._input,a,o,t)}if("group"===e.scattermode)for(s=0;s=0;h--){var d=t[h];if("scatter"===d.type&&d.xaxis===c.xaxis&&d.yaxis===c.yaxis){d.opacity=void 0;break}}}}}},28724:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059),o=r(98387),a=r(32565),s=r(677),l=r(56666),c=r(45952),u=r(82349),h=r(86277),d=r(51725),f=r(32335),p=r(46574),m=r(12261),g=r(12822).coercePattern;t.exports=function(t,e,r,v){function b(r,i){return n.coerce(t,e,o,r,i)}var y=l(t,e,v,b);if(y||(e.visible=!1),e.visible){c(t,e,v,b),b("xhoverformat"),b("yhoverformat"),b("zorder");var x=u(t,e,v,b);"group"===v.scattermode&&void 0===e.orientation&&b("orientation","v");var _=!x&&y{"use strict";t.exports=function(t){return{valType:"color",editType:"style",anim:!0,description:["Sets the fill color.","Defaults to a half-transparent variant of the line color,","marker color, or marker line color, whichever is available."+(t?" If fillgradient is specified, fillcolor is ignored except for setting the background color of the hover label, if any.":"")].join(" ")}}},12261:(t,e,r)=>{"use strict";var n=r(17499),i=r(12822).isArrayOrTypedArray;t.exports=function(t,e,r,o,a){a||(a={});var s,l=!1;if(e.marker){var c=e.marker.color,u=(e.marker.line||{}).color;c&&!i(c)?l=c:u&&!i(u)&&(l=u)}if(a.moduleHasFillgradient&&"none"!==o("fillgradient.type")){o("fillgradient.start"),o("fillgradient.stop");var h=o("fillgradient.colorscale");h&&(s=function(t){for(var e=n.interpolate(t[0][1],t[1][1],.5),r=2;r{"use strict";var n=r(75815);t.exports=function(t,e,r){var i={},o={_fullLayout:r},a=n.getFromTrace(o,e,"x"),s=n.getFromTrace(o,e,"y"),l=t.orig_x;void 0===l&&(l=t.x);var c=t.orig_y;return void 0===c&&(c=t.y),i.xLabel=n.tickText(a,a.c2l(l),!0).text,i.yLabel=n.tickText(s,s.c2l(c),!0).text,i}},90566:(t,e,r)=>{"use strict";var n=r(17499),i=r(677);t.exports=function(t,e){var r,o;if("lines"===t.mode)return(r=t.line.color)&&n.opacity(r)?r:t.fillcolor;if("none"===t.mode)return t.fill?t.fillcolor:"";var a=e.mcc||(t.marker||{}).color,s=e.mlcc||((t.marker||{}).line||{}).color;return(o=a&&n.opacity(a)?a:s&&n.opacity(s)&&(e.mlw||((t.marker||{}).line||{}).width)?s:"")?n.opacity(o)<.3?n.addOpacity(o,.3):o:(r=(t.line||{}).color)&&n.opacity(r)&&i.hasLines(t)&&t.line.width?r:t.fillcolor}},28104:(t,e,r)=>{"use strict";var n=r(69352).getAxisGroup;t.exports=function(t,e,r,i){var o=e.orientation,a=e[{v:"x",h:"y"}[o]+"axis"],s=n(r,a)+o,l=r._alignmentOpts||{},c=i("alignmentgroup"),u=l[s];u||(u=l[s]={});var h=u[c];h?h.traces.push(e):h=u[c]={traces:[e],alignmentIndex:Object.keys(u).length,offsetGroups:{}};var d=i("offsetgroup"),f=h.offsetGroups,p=f[d];d&&(p||(p=f[d]={offsetIndex:Object.keys(f).length}),e._offsetIndex=p.offsetIndex)}},2686:(t,e,r)=>{"use strict";var n=r(12822),i=r(70410),o=r(25059),a=r(90566),s=r(17499),l=n.fillText;t.exports=function(t,e,r,c){var u=t.cd,h=u[0].trace,d=t.xa,f=t.ya,p=d.c2p(e),m=f.c2p(r),g=[p,m],v=h.hoveron||"",b=-1!==h.mode.indexOf("markers")?3:.5,y=!!h.xperiodalignment,x=!!h.yperiodalignment;if(-1!==v.indexOf("points")){var _=function(t){var e=Math.max(b,t.mrc||0),r=d.c2p(t.x)-p,n=f.c2p(t.y)-m;return Math.max(Math.sqrt(r*r+n*n)-e,1-b/e)},w=i.getDistanceFunction(c,(function(t){if(y){var e=d.c2p(t.xStart),r=d.c2p(t.xEnd);return p>=Math.min(e,r)&&p<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,o=Math.abs(d.c2p(t.x)-p);return o=Math.min(e,r)&&m<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,o=Math.abs(f.c2p(t.y)-m);return or!=(c=i[n][1])>=r&&(a=i[n-1][0],s=i[n][0],c-l&&(o=a+(s-a)*(r-l)/(c-l),h=Math.min(h,o),p=Math.max(p,o)));return{x0:h=Math.max(h,0),x1:p=Math.min(p,d._length),y0:r,y1:r}}(h._polygons);null===O&&(O={x0:g[0],x1:g[0],y0:g[1],y1:g[1]});var D=s.defaultLine;return s.opacity(h.fillcolor)?D=h.fillcolor:s.opacity((h.line||{}).color)&&(D=h.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:O.x0,x1:O.x1,y0:O.y0,y1:O.y1,color:D,hovertemplate:!1}),delete t.index,h.text&&!n.isArrayOrTypedArray(h.text)?t.text=String(h.text):t.text=h.name,[t]}}},56384:(t,e,r)=>{"use strict";var n=r(677);t.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:r(98387),layoutAttributes:r(49114),supplyDefaults:r(28724),crossTraceDefaults:r(30415),supplyLayoutDefaults:r(25229),calc:r(93459).calc,crossTraceCalc:r(30888),arraysToCalcdata:r(55508),plot:r(54461),colorbar:r(89927),formatLabels:r(23315),style:r(21905).style,styleOnSelect:r(21905).styleOnSelect,hoverPoints:r(2686),selectPoints:r(96414),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:r(29592),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{description:["The scatter trace type encompasses line charts, scatter charts, text charts, and bubble charts.","The data visualized as scatter point or lines is set in `x` and `y`.","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}}},49114:t=>{"use strict";t.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc",description:["Determines how scatter points at the same location coordinate","are displayed on the graph.","With *group*, the scatter points are plotted next to one another","centered around the shared location.","With *overlay*, the scatter points are plotted over one another,","you might need to reduce *opacity* to see multiple scatter points."].join(" ")},scattergap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between scatter points of","adjacent location coordinates.","Defaults to `bargap`."].join(" ")}}},25229:(t,e,r)=>{"use strict";var n=r(12822),i=r(49114);t.exports=function(t,e){var r,o="group"===e.barmode;"group"===e.scattermode&&(r=o?e.bargap:.2,n.coerce(t,e,i,"scattergap",r))}},51725:(t,e,r)=>{"use strict";var n=r(12822).isArrayOrTypedArray,i=r(42226).hasColorscale,o=r(94461);t.exports=function(t,e,r,a,s,l){l||(l={});var c=(t.marker||{}).color;c&&c._inputArray&&(c=c._inputArray),s("line.color",r),i(t,"line")?o(t,e,a,s,{prefix:"line.",cLetter:"c"}):s("line.color",!n(c)&&c||r),s("line.width"),l.noDash||s("line.dash"),l.backoff&&s("line.backoff")}},22980:(t,e,r)=>{"use strict";var n=r(40666),i=r(32994),o=i.BADNUM,a=i.LOG_CLIP,s=a+.5,l=a-.5,c=r(12822),u=c.segmentsIntersect,h=c.constrain,d=r(32565);t.exports=function(t,e){var r,i,a,f,p,m,g,v,b,y,x,_,w,k,A,M,T,S,C=e.trace||{},E=e.xaxis,L=e.yaxis,z="log"===E.type,O="log"===L.type,D=E._length,I=L._length,F=e.backoff,R=C.marker,P=e.connectGaps,j=e.baseTolerance,N=e.shape,B="linear"===N,U=C.fill&&"none"!==C.fill,G=[],V=d.minTolerance,H=t.length,W=new Array(H),q=0;function Y(r){var n=t[r];if(!n)return!1;var i=e.linearized?E.l2p(n.x):E.c2p(n.x),a=e.linearized?L.l2p(n.y):L.c2p(n.y);if(i===o){if(z&&(i=E.c2p(n.x,!0)),i===o)return!1;O&&a===o&&(i*=Math.abs(E._m*I*(E._m>0?s:l)/(L._m*D*(L._m>0?s:l)))),i*=1e3}if(a===o){if(O&&(a=L.c2p(n.y,!0)),a===o)return!1;a*=1e3}return[i,a]}function Z(t,e,r,n){var i=r-t,o=n-e,a=.5-t,s=.5-e,l=i*i+o*o,c=i*a+o*s;if(c>0&&cat||t[1]lt)return[h(t[0],ot,at),h(t[1],st,lt)]}function ht(t,e){return t[0]===e[0]&&(t[0]===ot||t[0]===at)||t[1]===e[1]&&(t[1]===st||t[1]===lt)||void 0}function dt(t,e,r){return function(n,i){var o=ut(n),a=ut(i),s=[];if(o&&a&&ht(o,a))return s;o&&s.push(o),a&&s.push(a);var l=2*c.constrain((n[t]+i[t])/2,e,r)-((o||n)[t]+(a||i)[t]);return l&&((o&&a?l>0==o[t]>a[t]?o:a:o||a)[t]+=l),s}}function ft(t){var e=t[0],r=t[1],n=e===W[q-1][0],i=r===W[q-1][1];if(!n||!i)if(q>1){var o=e===W[q-2][0],a=r===W[q-2][1];n&&(e===ot||e===at)&&o?a?q--:W[q-1]=t:i&&(r===st||r===lt)&&a?o?q--:W[q-1]=t:W[q++]=t}else W[q++]=t}function pt(t){W[q-1][0]!==t[0]&&W[q-1][1]!==t[1]&&ft([Q,tt]),ft(t),et=null,Q=tt=0}"linear"===N||"spline"===N?nt=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var o=ct[i],a=u(t[0],t[1],e[0],e[1],o[0],o[1],o[2],o[3]);a&&(!n||Math.abs(a.x-r[0][0])>1||Math.abs(a.y-r[0][1])>1)&&(a=[a.x,a.y],n&&$(a,t)<$(r[0],t)?r.unshift(a):r.push(a),n++)}return r}:"hv"===N||"vh"===N?nt=function(t,e){var r=[],n=ut(t),i=ut(e);return n&&i&&ht(n,i)||(n&&r.push(n),i&&r.push(i)),r}:"hvh"===N?nt=dt(0,ot,at):"vhv"===N&&(nt=dt(1,st,lt));var mt=c.isArrayOrTypedArray(R);function gt(e){if(e&&F&&(e.i=r,e.d=t,e.trace=C,e.marker=mt?R[e.i]:R,e.backoff=F),T=e[0]/D,S=e[1]/I,J=e[0]at?at:0,K=e[1]lt?lt:0,J||K){if(q)if(et){var n=nt(et,e);n.length>1&&(pt(n[0]),W[q++]=n[1])}else rt=nt(W[q-1],e)[0],W[q++]=rt;else W[q++]=[J||e[0],K||e[1]];var i=W[q-1];J&&K&&(i[0]!==J||i[1]!==K)?(et&&(Q!==J&&tt!==K?ft(Q&&tt?(o=et,s=(a=e)[0]-o[0],l=(a[1]-o[1])/s,(o[1]*a[0]-a[1]*o[0])/s>0?[l>0?ot:at,lt]:[l>0?at:ot,st]):[Q||J,tt||K]):Q&&tt&&ft([Q,tt])),ft([J,K])):Q-J&&tt-K&&ft([J||Q,K||tt]),et=e,Q=J,tt=K}else et&&pt(nt(et,e)[0]),W[q++]=e;var o,a,s,l}for(r=0;rX(m,vt))break;a=m,(w=b[0]*v[0]+b[1]*v[1])>x?(x=w,f=m,g=!1):w<_&&(_=w,p=m,g=!0)}if(g?(gt(f),a!==p&>(p)):(p!==i&>(p),a!==f&>(f)),gt(a),r>=t.length||!m)break;gt(m),i=m}}else gt(f)}et&&ft([Q||et[0],tt||et[1]]),G.push(W.slice(0,q))}var bt=N.slice(N.length-1);if(F&&"h"!==bt&&"v"!==bt){for(var yt=!1,xt=-1,_t=[],wt=0;wt{"use strict";t.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},57931:t=>{"use strict";var e={tonextx:1,tonexty:1,tonext:1};t.exports=function(t,r,n){var i,o,a,s,l,c={},u=!1,h=-1,d=0,f=-1;for(o=0;o=0?l=f:(l=f=d,d++),l{"use strict";var n=r(7370);t.exports=function(t,e){e||(e=2);var r=t.marker,i=r.sizeref||1,o=r.sizemin||0,a="area"===r.sizemode?function(t){return Math.sqrt(t/i)}:function(t){return t/i};return function(t){var r=a(t/e);return n(r)&&r>0?Math.max(r,o):0}}},89927:t=>{"use strict";t.exports={container:"marker",min:"cmin",max:"cmax"}},86277:(t,e,r)=>{"use strict";var n=r(17499),i=r(42226).hasColorscale,o=r(94461),a=r(677);t.exports=function(t,e,r,s,l,c){var u=a.isBubble(t),h=(t.line||{}).color;c=c||{},h&&(r=h),l("marker.symbol"),l("marker.opacity",u?.7:1),l("marker.size"),c.noAngle||(l("marker.angle"),c.noAngleRef||l("marker.angleref"),c.noStandOff||l("marker.standoff")),l("marker.color",r),i(t,"marker")&&o(t,e,s,l,{prefix:"marker.",cLetter:"c"}),c.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),c.noLine||(l("marker.line.color",h&&!Array.isArray(h)&&e.marker.color!==h?h:u?n.background:n.defaultLine),i(t,"marker.line")&&o(t,e,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",u?1:0)),u&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),c.gradient&&"none"!==l("marker.gradient.type")&&l("marker.gradient.color")}},45952:(t,e,r)=>{"use strict";var n=r(12822).dateTick0,i=r(32994).ONEWEEK;function o(t,e){return n(e,t%i==0?1:0)}t.exports=function(t,e,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var a=n("xperiod");a&&(n("xperiod0",o(a,e.xcalendar)),n("xperiodalignment"))}if(i.y){var s=n("yperiod");s&&(n("yperiod0",o(s,e.ycalendar)),n("yperiodalignment"))}}},54461:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=o.ensureSingle,s=o.identity,l=r(40666),c=r(677),u=r(22980),h=r(57931),d=r(92620).tester;function f(t,e,r,h,f,p,m){var g,v=t._context.staticPlot;!function(t,e,r,i,a){var s=r.xaxis,l=r.yaxis,u=n.extent(o.simpleMap(s.range,s.r2c)),h=n.extent(o.simpleMap(l.range,l.r2c)),d=i[0].trace;if(c.hasMarkers(d)){var f=d.marker.maxdisplayed;if(0!==f){var p=i.filter((function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=h[0]&&t.y<=h[1]})),m=Math.ceil(p.length/f),g=0;a.forEach((function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return b?t.transition():t}var x=r.xaxis,_=r.yaxis,w=h[0].trace,k=w.line,A=n.select(p),M=a(A,"g","errorbars"),T=a(A,"g","lines"),S=a(A,"g","points"),C=a(A,"g","text");if(i.getComponentMethod("errorbars","plot")(t,M,r,m),!0===w.visible){var E,L;y(A).style("opacity",w.opacity);var z,O,D=w.fill.charAt(w.fill.length-1);"x"!==D&&"y"!==D&&(D=""),"y"===D?(z=1,O=_.c2p(0,!0)):"x"===D&&(z=0,O=x.c2p(0,!0)),h[0][r.isRangePlot?"nodeRangePlot3":"node3"]=A;var I,F,R="",P=[],j=w._prevtrace,N=null,B=null;j&&(R=j._prevRevpath||"",L=j._nextFill,P=j._ownPolygons,N=j._fillsegments,B=j._fillElement);var U,G,V,H,W,q,Y="",Z="",X=[];w._polygons=[];var $=[],J=[],K=o.noop;if(E=w._ownFill,c.hasLines(w)||"none"!==w.fill){L&&L.datum(h),-1!==["hv","vh","hvh","vhv"].indexOf(k.shape)?(U=l.steps(k.shape),G=l.steps(k.shape.split("").reverse().join(""))):U=G="spline"===k.shape?function(t){var e=t[t.length-1];return t.length>1&&t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),k.smoothing):l.smoothopen(t,k.smoothing)}:function(t){return"M"+t.join("L")},V=function(t){return G(t.reverse())},J=u(h,{xaxis:x,yaxis:_,trace:w,connectGaps:w.connectgaps,baseTolerance:Math.max(k.width||1,3)/4,shape:k.shape,backoff:k.backoff,simplify:k.simplify,fill:w.fill}),$=new Array(J.length);var Q=0;for(g=0;g0,g=h(t,e,r);(u=i.selectAll("g.trace").data(g,(function(t){return t[0].trace.uid}))).enter().append("g").attr("class",(function(t){return"trace scatter trace"+t[0].trace.uid})).style("stroke-miterlimit",2),u.order(),function(t,e,r){e.each((function(e){var i=a(n.select(this),"g","fills");l.setClipUrl(i,r.layerClipId,t);var o=e[0].trace,c=[];o._ownfill&&c.push("_ownFill"),o._nexttrace&&c.push("_nextFill");var u=i.selectAll("g").data(c,s);u.enter().append("g"),u.exit().each((function(t){o[t]=null})).remove(),u.order().each((function(t){o[t]=a(n.select(this),"path","js-fill")}))}))}(t,u,e),m?(c&&(d=c()),n.transition().duration(o.duration).ease(o.easing).each("end",(function(){d&&d()})).each("interrupt",(function(){d&&d()})).each((function(){i.selectAll("g.trace").each((function(r,n){f(t,n,e,r,g,this,o)}))}))):u.each((function(r,n){f(t,n,e,r,g,this,o)})),p&&u.exit().remove(),i.selectAll("path:not([d])").remove()}},96414:(t,e,r)=>{"use strict";var n=r(677);t.exports=function(t,e){var r,i,o,a,s=t.cd,l=t.xaxis,c=t.yaxis,u=[],h=s[0].trace;if(!n.hasMarkers(h)&&!n.hasText(h))return[];if(!1===e)for(r=0;r{"use strict";var e=["orientation","groupnorm","stackgaps"];t.exports=function(t,r,n,i){var o=n._scatterStackOpts,a=i("stackgroup");if(a){var s=r.xaxis+r.yaxis,l=o[s];l||(l=o[s]={});var c=l[a],u=!1;c?c.traces.push(r):(c=l[a]={traceIndices:[],traces:[r]},u=!0);for(var h={orientation:r.x&&!r.y?"h":"v"},d=0;d{"use strict";var n=r(27941),i=r(40666),o=r(25059);function a(t,e,r){i.pointStyle(t.selectAll("path.point"),e,r)}function s(t,e,r){i.textPointStyle(t.selectAll("text"),e,r)}t.exports={style:function(t){var e=n.select(t).selectAll("g.trace.scatter");e.style("opacity",(function(t){return t[0].trace.opacity})),e.selectAll("g.points").each((function(e){a(n.select(this),e.trace||e[0].trace,t)})),e.selectAll("g.text").each((function(e){s(n.select(this),e.trace||e[0].trace,t)})),e.selectAll("g.trace path.js-line").call(i.lineGroupStyle),e.selectAll("g.trace path.js-fill").call(i.fillGroupStyle,t,!1),o.getComponentMethod("errorbars","style")(e)},stylePoints:a,styleText:s,styleOnSelect:function(t,e,r){var n=e[0].trace;n.selectedpoints?(i.selectedPointStyle(r.selectAll("path.point"),n),i.selectedTextStyle(r.selectAll("text"),n)):(a(r,n,t),s(r,n,t))}}},677:(t,e,r)=>{"use strict";var n=r(12822),i=r(98507).isTypedArraySpec;t.exports={hasLines:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf("lines")},hasMarkers:function(t){return t.visible&&(t.mode&&-1!==t.mode.indexOf("markers")||"splom"===t.type)},hasText:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf("text")},isBubble:function(t){var e=t.marker;return n.isPlainObject(e)&&(n.isArrayOrTypedArray(e.size)||i(e.size))}}},46574:(t,e,r)=>{"use strict";var n=r(12822);t.exports=function(t,e,r,i,o){o=o||{},i("textposition"),n.coerceFont(i,"textfont",o.font||r.font,o),o.noSelect||(i("selected.textfont.color"),i("unselected.textfont.color"))}},56666:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059);t.exports=function(t,e,r,o){var a,s=o("x"),l=o("y");if(i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],r),s){var c=n.minRowLength(s);l?a=Math.min(c,n.minRowLength(l)):(a=c,o("y0"),o("dy"))}else{if(!l)return 0;a=n.minRowLength(l),o("x0"),o("dx")}return e._length=a,a}},42674:(t,e,r)=>{"use strict";var n=r(98387),i=r(75058),o=r(89322),a=r(60393).axisHoverFormat,s=r(24131).rb,l=r(24131).ay,c=r(3520),u=r(55697),h=r(24134),d=r(98260).extendFlat,f=r(62309).overrideAll,p=r(54747),m=n.line,g=n.marker,v=g.line,b=d({width:m.width,dash:{valType:"enumerated",values:p(u),dflt:"solid",description:"Sets the dash style of the lines."}},o("line"));function y(t){return{show:{valType:"boolean",dflt:!1,description:["Sets whether or not projections are shown along the",t,"axis."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:"Sets the projection color."},scale:{valType:"number",min:0,max:10,dflt:2/3,description:["Sets the scale factor determining the size of the","projection marker points."].join(" ")}}}var x=t.exports=f({x:n.x,y:n.y,z:{valType:"data_array",description:"Sets the z coordinates."},text:d({},n.text,{description:["Sets text elements associated with each (x,y,z) triplet.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y,z) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")}),texttemplate:l({},{}),hovertext:d({},n.hovertext,{description:["Sets text elements associated with each (x,y,z) triplet.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y,z) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),hovertemplate:s(),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),mode:d({},n.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1,description:["If *-1*, the scatter points are not fill with a surface","If *0*, *1*, *2*, the scatter points are filled with","a Delaunay surface about the x, y, z respectively."].join(" ")},surfacecolor:{valType:"color",description:"Sets the surface fill color."},projection:{x:y("x"),y:y("y"),z:y("z")},connectgaps:n.connectgaps,line:b,marker:d({symbol:{valType:"enumerated",values:p(h),dflt:"circle",arrayOk:!0,description:"Sets the marker symbol type."},size:d({},g.size,{dflt:8}),sizeref:g.sizeref,sizemin:g.sizemin,sizemode:g.sizemode,opacity:d({},g.opacity,{arrayOk:!1,description:["Sets the marker opacity.","Note that the marker opacity for scatter3d traces","must be a scalar value for performance reasons.","To set a blending opacity value","(i.e. which is not transparent), set *marker.color*","to an rgba color and use its alpha channel."].join(" ")}),colorbar:g.colorbar,line:d({width:d({},v.width,{arrayOk:!1})},o("marker.line"))},o("marker")),textposition:d({},n.textposition,{dflt:"top center"}),textfont:i({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"],description:"Sets the text font."}),opacity:c.opacity,hoverinfo:d({},c.hoverinfo)},"calc","nested");x.x.editType=x.y.editType=x.z.editType="calc+clearAxisTypes"},34670:(t,e,r)=>{"use strict";var n=r(55508),i=r(45065);t.exports=function(t,e){var r=[{x:!1,y:!1,trace:e,t:{}}];return n(r,e),i(t,e),r}},35650:(t,e,r)=>{"use strict";var n=r(25059);function i(t,e,r,i){if(!e||!e.visible)return null;for(var o=n.getComponentMethod("errorbars","makeComputeError")(e),a=new Array(t.length),s=0;s0){var d=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=d),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,d)}}else a[s]=[-l[0]*r,l[1]*r]}return a}t.exports=function(t,e,r){var n=[i(t.x,t.error_x,e[0],r.xaxis),i(t.y,t.error_y,e[1],r.yaxis),i(t.z,t.error_z,e[2],r.zaxis)],o=function(t){for(var e=0;e{"use strict";var n=r(31845).gl_line3d,i=r(31845).gl_scatter3d,o=r(31845).gl_error3d,a=r(31845).gl_mesh3d,s=r(31845).delaunay_triangulate,l=r(12822),c=r(17235),u=r(25069).formatColor,h=r(43710),d=r(55697),f=r(24134),p=r(75815),m=r(66811).appendArrayPointValue,g=r(35650);function v(t,e){this.scene=t,this.uid=e,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var b=v.prototype;function y(t){return null==t?0:t.indexOf("left")>-1?-1:t.indexOf("right")>-1?1:0}function x(t){return null==t?0:t.indexOf("top")>-1?-1:t.indexOf("bottom")>-1?1:0}function _(t,e){return e(4*t)}function w(t){return f[t]}function k(t,e,r,n,i){var o=null;if(l.isArrayOrTypedArray(t)){o=[];for(var a=0;a=0){var C=function(t,e,r){var n,i=(r+1)%3,o=(r+2)%3,a=[],l=[];for(n=0;n{"use strict";var n=r(25059),i=r(12822),o=r(677),a=r(86277),s=r(51725),l=r(46574),c=r(42674);t.exports=function(t,e,r,u){function h(r,n){return i.coerce(t,e,c,r,n)}var d=function(t,e,r,i){var o=0,a=r("x"),s=r("y"),l=r("z");return n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],i),a&&s&&l&&(o=Math.min(a.length,s.length,l.length),e._length=e._xlength=e._ylength=e._zlength=o),o}(t,e,h,u);if(d){h("text"),h("hovertext"),h("hovertemplate"),h("xhoverformat"),h("yhoverformat"),h("zhoverformat"),h("mode"),o.hasMarkers(e)&&a(t,e,r,u,h,{noSelect:!0,noAngle:!0}),o.hasLines(e)&&(h("connectgaps"),s(t,e,r,u,h)),o.hasText(e)&&(h("texttemplate"),l(t,e,u,h,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var f=(e.line||{}).color,p=(e.marker||{}).color;h("surfaceaxis")>=0&&h("surfacecolor",f||p);for(var m=["x","y","z"],g=0;g<3;++g){var v="projection."+m[g];h(v+".show")&&(h(v+".opacity"),h(v+".scale"))}var b=n.getComponentMethod("errorbars","supplyDefaults");b(t,e,f||p||r,{axis:"z"}),b(t,e,f||p||r,{axis:"y",inherit:"z"}),b(t,e,f||p||r,{axis:"x",inherit:"z"})}else e.visible=!1}},46443:(t,e,r)=>{"use strict";t.exports={plot:r(37031),attributes:r(42674),markerSymbols:r(24134),supplyDefaults:r(49957),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:r(34670),moduleType:"trace",name:"scatter3d",basePlotModule:r(98030),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{hrName:"scatter_3d",description:["The data visualized as scatter point or lines in 3D dimension","is set in `x`, `y`, `z`.","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","Projections are achieved via `projection`.","Surface fills are achieved via `surfaceaxis`."].join(" ")}}},77982:(t,e,r)=>{"use strict";var n=r(3520),i=r(75058),o=r(43591),a=r(98387),s=r(60393).axisHoverFormat,l=r(89322),c=r(54747),u=r(98260).extendFlat,h=r(62309).overrideAll,d=r(49538).DASHES,f=a.line,p=a.marker,m=p.line,g=t.exports=h({x:a.x,x0:a.x0,dx:a.dx,y:a.y,y0:a.y0,dy:a.dy,xperiod:a.xperiod,yperiod:a.yperiod,xperiod0:a.xperiod0,yperiod0:a.yperiod0,xperiodalignment:a.xperiodalignment,yperiodalignment:a.yperiodalignment,xhoverformat:s("x"),yhoverformat:s("y"),text:a.text,hovertext:a.hovertext,textposition:a.textposition,textfont:i({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,noNumericWeightValues:!0,variantValues:["normal","small-caps"],description:"Sets the text font."}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],description:["Determines the drawing mode for this scatter trace."].join(" ")},line:{color:f.color,width:f.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","The values correspond to step-wise line shapes."].join(" ")},dash:{valType:"enumerated",values:c(d),dflt:"solid",description:"Sets the style of the lines."}},marker:u({},l("marker"),{symbol:p.symbol,angle:p.angle,size:p.size,sizeref:p.sizeref,sizemin:p.sizemin,sizemode:p.sizemode,opacity:p.opacity,colorbar:p.colorbar,line:u({},l("marker.line"),{width:m.width})}),connectgaps:a.connectgaps,fill:u({},a.fill,{dflt:"none"}),fillcolor:o(),selected:{marker:a.selected.marker,textfont:a.selected.textfont},unselected:{marker:a.unselected.marker,textfont:a.unselected.textfont},opacity:n.opacity},"calc","nested");g.x.editType=g.y.editType=g.x0.editType=g.y0.editType="calc+clearAxisTypes",g.hovertemplate=a.hovertemplate,g.texttemplate=a.texttemplate},78737:(t,e,r)=>{"use strict";var n=r(88625);t.exports={moduleType:"trace",name:"scattergl",basePlotModule:r(29592),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:r(77982),supplyDefaults:r(51465),crossTraceDefaults:r(30415),colorbar:r(89927),formatLabels:r(18948),calc:r(54874),hoverPoints:n.hoverPoints,selectPoints:r(76787),meta:{hrName:"scatter_gl",description:["The data visualized as scatter point or lines is set in `x` and `y`","using the WebGL plotting engine.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to a numerical arrays."].join(" ")}}},54874:(t,e,r)=>{"use strict";var n=r(4832),i=r(12822),o=r(99246),a=r(19496).findExtremes,s=r(15389),l=r(93459),c=l.calcMarkerSize,u=l.calcAxisExpansion,h=l.setFirstScatter,d=r(45065),f=r(77064),p=r(7111),m=r(32994).BADNUM,g=r(49538).TOO_MANY_POINTS;function v(t,e,r){var n=t._extremes[e._id],i=a(e,r._bnds,{padded:!0});n.min=n.min.concat(i.min),n.max=n.max.concat(i.max)}t.exports=function(t,e){var r,a=t._fullLayout,l=e._xA=o.getFromId(t,e.xaxis,"x"),b=e._yA=o.getFromId(t,e.yaxis,"y"),y=a._plots[e.xaxis+e.yaxis],x=e._length,_=x>=g,w=2*x,k={},A=l.makeCalcdata(e,"x"),M=b.makeCalcdata(e,"y"),T=s(e,l,"x",A),S=s(e,b,"y",M),C=T.vals,E=S.vals;e._x=C,e._y=E,e.xperiodalignment&&(e._origX=A,e._xStarts=T.starts,e._xEnds=T.ends),e.yperiodalignment&&(e._origY=M,e._yStarts=S.starts,e._yEnds=S.ends);var L=new Array(w),z=new Array(x);for(r=0;r1&&i.extendFlat(s.line,f.linePositions(t,r,n)),s.errorX||s.errorY){var l=f.errorBarPositions(t,r,n,o,a);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}return s.text&&(i.extendFlat(s.text,{positions:n},f.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},f.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},f.textPosition(t,r,s.text,s.markerUnsel))),s}(t,0,e,L,C,E),I=p(t,y);return h(a,e),_?D.marker&&(O=D.marker.sizeAvg||Math.max(D.marker.size,3)):O=c(e,x),u(t,e,l,b,C,E,O),D.errorX&&v(e,l,D.errorX),D.errorY&&v(e,b,D.errorY),D.fill&&!I.fill2d&&(I.fill2d=!0),D.marker&&!I.scatter2d&&(I.scatter2d=!0),D.line&&!I.line2d&&(I.line2d=!0),!D.errorX&&!D.errorY||I.error2d||(I.error2d=!0),D.text&&!I.glText&&(I.glText=!0),D.marker&&(D.marker.snap=x),I.lineOptions.push(D.line),I.errorXOptions.push(D.errorX),I.errorYOptions.push(D.errorY),I.fillOptions.push(D.fill),I.markerOptions.push(D.marker),I.markerSelectedOptions.push(D.markerSel),I.markerUnselectedOptions.push(D.markerUnsel),I.textOptions.push(D.text),I.textSelectedOptions.push(D.textSel),I.textUnselectedOptions.push(D.textUnsel),I.selectBatch.push([]),I.unselectBatch.push([]),k._scene=I,k.index=I.count,k.x=C,k.y=E,k.positions=L,I.count++,[{x:!1,y:!1,t:k,trace:e}]}},49538:t=>{"use strict";t.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},77064:(t,e,r)=>{"use strict";var n=r(7370),i=r(77622),o=r(34463),a=r(25059),s=r(12822),l=s.isArrayOrTypedArray,c=r(40666),u=r(99246),h=r(25069).formatColor,d=r(677),f=r(43710),p=r(91886),m=r(49538),g=r(11891).DESELECTDIM,v={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},b=r(66811).appendArrayPointValue;function y(t,e){var r,i=t._fullLayout,o=e._length,a=e.textfont,c=e.textposition,u=l(c)?c:[c],h=a.color,d=a.size,f=a.family,p=a.weight,m=a.style,g=a.variant,v={},y=t._context.plotGlPixelRatio,_=e.texttemplate;if(_){v.text=[];var w=i._d3locale,k=Array.isArray(_),A=k?Math.min(_.length,o):o,M=k?function(t){return _[t]}:function(){return _};for(r=0;r500?"bold":"normal":t}function _(t,e){var r,n,i=e._length,a=e.marker,s={},c=l(a.symbol),u=l(a.angle),d=l(a.color),m=l(a.line.color),g=l(a.opacity),v=l(a.size),b=l(a.line.width);if(c||(n=p.isOpenSymbol(a.symbol)),c||d||m||g||u){s.symbols=new Array(i),s.angles=new Array(i),s.colors=new Array(i),s.borderColors=new Array(i);var y=a.symbol,x=a.angle,_=h(a,a.opacity,i),w=h(a.line,a.opacity,i);if(!l(w[0])){var k=w;for(w=Array(i),r=0;rm.TOO_MANY_POINTS||d.hasMarkers(e)?"rect":"round";if(c&&e.connectgaps){var h=n[0],f=n[1];for(i=0;i1?c[i]:c[0]:c,m=l(u)?u.length>1?u[i]:u[0]:u,g=v[p],b=v[m],y=h?h/.8+1:0,x=-b*y-.5*b;a.offset[i]=[g*y/f,x/f]}}return a}}},51465:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059),o=r(91886),a=r(77982),s=r(32565),l=r(677),c=r(56666),u=r(45952),h=r(86277),d=r(51725),f=r(12261),p=r(46574);t.exports=function(t,e,r,m){function g(r,i){return n.coerce(t,e,a,r,i)}var v=!!t.marker&&o.isOpenSymbol(t.marker.symbol),b=l.isBubble(t),y=c(t,e,m,g);if(y){u(t,e,m,g),g("xhoverformat"),g("yhoverformat");var x=y{"use strict";var n=r(12822),i=r(17499),o=r(11891).DESELECTDIM;t.exports={styleTextSelection:function(t){var e,r,a=t[0],s=a.trace,l=a.t,c=l._scene,u=l.index,h=c.selectBatch[u],d=c.unselectBatch[u],f=c.textOptions[u],p=c.textSelectedOptions[u]||{},m=c.textUnselectedOptions[u]||{},g=n.extendFlat({},f);if(h.length||d.length){var v=p.color,b=m.color,y=f.color,x=n.isArrayOrTypedArray(y);for(g.color=new Array(s._length),e=0;e{"use strict";var n=r(23315);t.exports=function(t,e,r){var i=t.i;return"x"in t||(t.x=e._x[i]),"y"in t||(t.y=e._y[i]),n(t,e,r)}},91886:(t,e,r)=>{"use strict";var n=r(49538);e.isOpenSymbol=function(t){return"string"==typeof t?n.OPEN_RE.test(t):t%200>100},e.isDotSymbol=function(t){return"string"==typeof t?n.DOT_RE.test(t):t>200}},88625:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822),o=r(90566);function a(t,e,r,a){var s=t.xa,l=t.ya,c=t.distance,u=t.dxy,h=t.index,d={pointNumber:h,x:e[h],y:r[h]};d.tx=i.isArrayOrTypedArray(a.text)?a.text[h]:a.text,d.htx=Array.isArray(a.hovertext)?a.hovertext[h]:a.hovertext,d.data=Array.isArray(a.customdata)?a.customdata[h]:a.customdata,d.tp=Array.isArray(a.textposition)?a.textposition[h]:a.textposition;var f=a.textfont;f&&(d.ts=i.isArrayOrTypedArray(f.size)?f.size[h]:f.size,d.tc=i.isArrayOrTypedArray(f.color)?f.color[h]:f.color,d.tf=Array.isArray(f.family)?f.family[h]:f.family,d.tw=Array.isArray(f.weight)?f.weight[h]:f.weight,d.ty=Array.isArray(f.style)?f.style[h]:f.style,d.tv=Array.isArray(f.variant)?f.variant[h]:f.variant);var p=a.marker;p&&(d.ms=i.isArrayOrTypedArray(p.size)?p.size[h]:p.size,d.mo=i.isArrayOrTypedArray(p.opacity)?p.opacity[h]:p.opacity,d.mx=i.isArrayOrTypedArray(p.symbol)?p.symbol[h]:p.symbol,d.ma=i.isArrayOrTypedArray(p.angle)?p.angle[h]:p.angle,d.mc=i.isArrayOrTypedArray(p.color)?p.color[h]:p.color);var m=p&&p.line;m&&(d.mlc=Array.isArray(m.color)?m.color[h]:m.color,d.mlw=i.isArrayOrTypedArray(m.width)?m.width[h]:m.width);var g=p&&p.gradient;g&&"none"!==g.type&&(d.mgt=Array.isArray(g.type)?g.type[h]:g.type,d.mgc=Array.isArray(g.color)?g.color[h]:g.color);var v=s.c2p(d.x,!0),b=l.c2p(d.y,!0),y=d.mrc||1,x=a.hoverlabel;x&&(d.hbg=Array.isArray(x.bgcolor)?x.bgcolor[h]:x.bgcolor,d.hbc=Array.isArray(x.bordercolor)?x.bordercolor[h]:x.bordercolor,d.hts=i.isArrayOrTypedArray(x.font.size)?x.font.size[h]:x.font.size,d.htc=Array.isArray(x.font.color)?x.font.color[h]:x.font.color,d.htf=Array.isArray(x.font.family)?x.font.family[h]:x.font.family,d.hnl=i.isArrayOrTypedArray(x.namelength)?x.namelength[h]:x.namelength);var _=a.hoverinfo;_&&(d.hi=Array.isArray(_)?_[h]:_);var w=a.hovertemplate;w&&(d.ht=Array.isArray(w)?w[h]:w);var k={};k[t.index]=d;var A=a._origX,M=a._origY,T=i.extendFlat({},t,{color:o(a,d),x0:v-y,x1:v+y,xLabelVal:A?A[h]:d.x,y0:b-y,y1:b+y,yLabelVal:M?M[h]:d.y,cd:k,distance:c,spikeDistance:u,hovertemplate:d.ht});return d.htx?T.text=d.htx:d.tx?T.text=d.tx:a.text&&(T.text=a.text),i.fillText(d,a,T),n.getComponentMethod("errorbars","hoverInfo")(d,a,T),T}t.exports={hoverPoints:function(t,e,r,n){var i,o,s,l,c,u,h,d,f,p,m=t.cd,g=m[0].t,v=m[0].trace,b=t.xa,y=t.ya,x=g.x,_=g.y,w=b.c2p(e),k=y.c2p(r),A=t.distance;if(g.tree){var M=b.p2c(w-A),T=b.p2c(w+A),S=y.p2c(k-A),C=y.p2c(k+A);i="x"===n?g.tree.range(Math.min(M,T),Math.min(y._rl[0],y._rl[1]),Math.max(M,T),Math.max(y._rl[0],y._rl[1])):g.tree.range(Math.min(M,T),Math.min(S,C),Math.max(M,T),Math.max(S,C))}else i=g.ids;var E=A;if("x"===n){var L=!!v.xperiodalignment,z=!!v.yperiodalignment;for(u=0;u=Math.min(O,D)&&w<=Math.max(O,D)?0:1/0}if(h=Math.min(I,F)&&k<=Math.max(I,F)?0:1/0}p=Math.sqrt(h*h+d*d),s=i[u]}}}else for(u=i.length-1;u>-1;u--)l=x[o=i[u]],c=_[o],h=b.c2p(l)-w,d=y.c2p(c)-k,(f=Math.sqrt(h*h+d*d)){"use strict";var n=r(78737);n.plot=r(96360),t.exports=n},96360:(t,e,r)=>{"use strict";var n=r(51645),i=r(98331),o=r(86373),a=r(69499),s=r(12822),l=r(14295).selectMode,c=r(41246),u=r(677),h=r(57931),d=r(4673).styleTextSelection,f={};function p(t,e,r,n){var i=t._size,o=t.width*n,a=t.height*n,s=i.l*n,l=i.b*n,c=i.r*n,u=i.t*n,h=i.w*n,d=i.h*n;return[s+e.domain[0]*h,l+r.domain[0]*d,o-c-(1-e.domain[1])*h,a-u-(1-r.domain[1])*d]}(t.exports=function(t,e,r){if(r.length){var m,g,v=t._fullLayout,b=e._scene,y=e.xaxis,x=e.yaxis;if(b)if(c(t,["ANGLE_instanced_arrays","OES_element_index_uint"],f)){var _=b.count,w=v._glcanvas.data()[0].regl;if(h(t,e,r),b.dirty){if(!b.line2d&&!b.error2d||b.scatter2d||b.fill2d||b.glText||w.clear({}),!0===b.error2d&&(b.error2d=o(w)),!0===b.line2d&&(b.line2d=i(w)),!0===b.scatter2d&&(b.scatter2d=n(w)),!0===b.fill2d&&(b.fill2d=i(w)),!0===b.glText)for(b.glText=new Array(_),m=0;m<_;m++)b.glText[m]=new a(w);if(b.glText){if(_>b.glText.length){var k=_-b.glText.length;for(m=0;mr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t})),b.line2d.update(b.lineOptions)),b.error2d){var M=(b.errorXOptions||[]).concat(b.errorYOptions||[]);b.error2d.update(M)}b.scatter2d&&b.scatter2d.update(b.markerOptions),b.fillOrder=s.repeat(null,_),b.fill2d&&(b.fillOptions=b.fillOptions.map((function(t,e){var n=r[e];if(t&&n&&n[0]&&n[0].trace){var i,o,a=n[0],s=a.trace,l=a.t,c=b.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(b.fillOrder[e]=u);var h,d,f=[],p=c&&c.positions||l.positions;if("tozeroy"===s.fill){for(h=0;hh&&isNaN(p[d+1]);)d-=2;0!==p[h+1]&&(f=[p[h],0]),f=f.concat(p.slice(h,d+2)),0!==p[d+1]&&(f=f.concat([p[d],0]))}else if("tozerox"===s.fill){for(h=0;hh&&isNaN(p[d]);)d-=2;0!==p[h]&&(f=[0,p[h+1]]),f=f.concat(p.slice(h,d+2)),0!==p[d]&&(f=f.concat([0,p[d+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(f=[],i=0,t.splitNull=!0,o=0;o-1;for(m=0;m<_;m++){var E=r[m][0],L=E.trace,z=E.t,O=z.index,D=L._length,I=z.x,F=z.y;if(L.selectedpoints||S||C){if(S||(S=!0),L.selectedpoints){var R=b.selectBatch[O]=s.selIndices2selPoints(L),P={};for(g=0;g{"use strict";var n=r(12822);t.exports=function(t,e){var r=e._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},o={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return e._scene||((r=e._scene={}).init=function(){n.extendFlat(r,o,i)},r.init(),r.update=function(t){var e=n.repeat(t,r.count);if(r.fill2d&&r.fill2d.update(e),r.scatter2d&&r.scatter2d.update(e),r.line2d&&r.line2d.update(e),r.error2d&&r.error2d.update(e.concat(e)),r.select2d&&r.select2d.update(e),r.glText)for(var i=0;i{"use strict";var n=r(677),i=r(4673).styleTextSelection;t.exports=function(t,e){var r=t.cd,o=t.xaxis,a=t.yaxis,s=[],l=r[0].trace,c=r[0].t,u=l._length,h=c.x,d=c.y,f=c._scene,p=c.index;if(!f)return s;var m=n.hasText(l),g=n.hasMarkers(l),v=!g&&!m;if(!0!==l.visible||v)return s;var b=[],y=[];if(!1!==e&&!e.degenerate)for(var x=0;x{"use strict";e.version="2.35.2"},31845:(t,e,r)=>{var n=r(39807);!function(){var e={1964:function(t,e,r){t.exports={alpha_shape:r(3502),convex_hull:r(7352),delaunay_triangulate:r(7642),gl_cone3d:r(6405),gl_error3d:r(9165),gl_heatmap2d:r(2510),gl_line3d:r(5714),gl_mesh3d:r(7201),gl_plot2d:r(1850),gl_plot3d:r(4100),gl_pointcloud2d:r(4696),gl_scatter3d:r(8418),gl_select_box:r(3161),gl_spikes2d:r(4098),gl_streamtube3d:r(7815),gl_surface3d:r(9499),ndarray:r(9618),ndarray_linear_interpolate:r(4317)}},4793:function(t,e,r){"use strict";function n(t,e){for(var r=0;rd)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,p.prototype),e}function p(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return v(t)}return m(t,e,r)}function m(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!p.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|_(t,e),n=f(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(et(t,Uint8Array)){var e=new Uint8Array(t);return y(e.buffer,e.byteOffset,e.byteLength)}return b(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(t));if(et(t,ArrayBuffer)||t&&et(t.buffer,ArrayBuffer))return y(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(et(t,SharedArrayBuffer)||t&&et(t.buffer,SharedArrayBuffer)))return y(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return p.from(n,e,r);var i=function(t){if(p.isBuffer(t)){var e=0|x(t.length),r=f(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||rt(t.length)?f(0):b(t):"Buffer"===t.type&&Array.isArray(t.data)?b(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return p.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(t))}function g(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function v(t){return g(t),f(t<0?0:0|x(t))}function b(t){for(var e=t.length<0?0:0|x(t.length),r=f(e),n=0;n=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return 0|t}function _(t,e){if(p.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||et(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+l(t));var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Q(t).length;default:if(i)return n?-1:K(t).length;e=(""+e).toLowerCase(),i=!0}}function w(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return O(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return F(this,e,r);case"base64":return z(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function k(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function A(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),rt(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=p.from(e,n)),p.isBuffer(e))return 0===e.length?-1:M(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):M(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function M(t,e,r,n,i){var o,a=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var u=-1;for(o=r;os&&(r=s-l),o=r;o>=0;o--){for(var h=!0,d=0;di&&(n=i):n=i;var o,a=e.length;for(n>a/2&&(n=a/2),o=0;o>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function z(t,e,r){return 0===e&&r===t.length?c.fromByteArray(t):c.fromByteArray(t.slice(e,r))}function O(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:o>223?3:o>191?2:1;if(i+s<=r){var l=void 0,c=void 0,u=void 0,h=void 0;switch(s){case 1:o<128&&(a=o);break;case 2:128==(192&(l=t[i+1]))&&(h=(31&o)<<6|63&l)>127&&(a=h);break;case 3:l=t[i+1],c=t[i+2],128==(192&l)&&128==(192&c)&&(h=(15&o)<<12|(63&l)<<6|63&c)>2047&&(h<55296||h>57343)&&(a=h);break;case 4:l=t[i+1],c=t[i+2],u=t[i+3],128==(192&l)&&128==(192&c)&&128==(192&u)&&(h=(15&o)<<18|(63&l)<<12|(63&c)<<6|63&u)>65535&&h<1114112&&(a=h)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return function(t){var e=t.length;if(e<=D)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn.length?(p.isBuffer(o)||(o=p.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else{if(!p.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},p.byteLength=_,p.prototype._isBuffer=!0,p.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;er&&(t+=" ... "),""},h&&(p.prototype[h]=p.prototype.inspect),p.prototype.compare=function(t,e,r,n,i){if(et(t,Uint8Array)&&(t=p.from(t,t.offset,t.byteLength)),!p.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+l(t));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),c=this.slice(n,i),u=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return T(this,t,e,r);case"utf8":case"utf-8":return S(this,t,e,r);case"ascii":case"latin1":case"binary":return C(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function N(t,e,r,n,i,o){if(!p.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function B(t,e,r,n,i){Z(e,n,i,t,r,7);var o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;var a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function U(t,e,r,n,i){Z(e,n,i,t,r,7);var o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;var a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function G(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function V(t,e,r,n,i){return e=+e,r>>>=0,i||G(t,0,r,4),u.write(t,e,r,n,23,4),r+4}function H(t,e,r,n,i){return e=+e,r>>>=0,i||G(t,0,r,8),u.write(t,e,r,n,52,8),r+8}p.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||j(t,e,this.length);for(var n=this[t],i=1,o=0;++o>>=0,e>>>=0,r||j(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},p.prototype.readUint8=p.prototype.readUInt8=function(t,e){return t>>>=0,e||j(t,1,this.length),this[t]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(t,e){return t>>>=0,e||j(t,2,this.length),this[t]|this[t+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(t,e){return t>>>=0,e||j(t,2,this.length),this[t]<<8|this[t+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(t,e){return t>>>=0,e||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(t,e){return t>>>=0,e||j(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},p.prototype.readBigUInt64LE=it((function(t){X(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);var n=e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24),i=this[++t]+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+r*Math.pow(2,24);return BigInt(n)+(BigInt(i)<>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);var n=e*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t],i=this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+r;return(BigInt(n)<>>=0,e>>>=0,r||j(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},p.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||j(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},p.prototype.readInt8=function(t,e){return t>>>=0,e||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},p.prototype.readInt16LE=function(t,e){t>>>=0,e||j(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},p.prototype.readInt16BE=function(t,e){t>>>=0,e||j(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},p.prototype.readInt32LE=function(t,e){return t>>>=0,e||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},p.prototype.readInt32BE=function(t,e){return t>>>=0,e||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},p.prototype.readBigInt64LE=it((function(t){X(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);var n=this[t+4]+this[t+5]*Math.pow(2,8)+this[t+6]*Math.pow(2,16)+(r<<24);return(BigInt(n)<>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);var n=(e<<24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t];return(BigInt(n)<>>=0,e||j(t,4,this.length),u.read(this,t,!0,23,4)},p.prototype.readFloatBE=function(t,e){return t>>>=0,e||j(t,4,this.length),u.read(this,t,!1,23,4)},p.prototype.readDoubleLE=function(t,e){return t>>>=0,e||j(t,8,this.length),u.read(this,t,!0,52,8)},p.prototype.readDoubleBE=function(t,e){return t>>>=0,e||j(t,8,this.length),u.read(this,t,!1,52,8)},p.prototype.writeUintLE=p.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||N(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,n||N(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},p.prototype.writeUint8=p.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,1,255,0),this[e]=255&t,e+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},p.prototype.writeBigUInt64LE=it((function(t){return B(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeBigUInt64BE=it((function(t){return U(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);N(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>>=0,!n){var i=Math.pow(2,8*r-1);N(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a|0)-s&255;return e+r},p.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},p.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},p.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},p.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},p.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},p.prototype.writeBigInt64LE=it((function(t){return B(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeBigInt64BE=it((function(t){return U(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeFloatLE=function(t,e,r){return V(this,t,e,!0,r)},p.prototype.writeFloatBE=function(t,e,r){return V(this,t,e,!1,r)},p.prototype.writeDoubleLE=function(t,e,r){return H(this,t,e,!0,r)},p.prototype.writeDoubleBE=function(t,e,r){return H(this,t,e,!1,r)},p.prototype.copy=function(t,e,r,n){if(!p.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o=n+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function Z(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(o+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(o+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(o+1)-1).concat(s):">= ".concat(e).concat(s," and <= ").concat(r).concat(s),new W.ERR_OUT_OF_RANGE("value",a,t)}!function(t,e,r){X(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||$(e,t.length-(r+1))}(n,i,o)}function X(t,e){if("number"!=typeof t)throw new W.ERR_INVALID_ARG_TYPE(e,"number",t)}function $(t,e,r){if(Math.floor(t)!==t)throw X(t,r),new W.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new W.ERR_BUFFER_OUT_OF_BOUNDS;throw new W.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(e),t)}q("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),q("ERR_INVALID_ARG_TYPE",(function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(l(e))}),TypeError),q("ERR_OUT_OF_RANGE",(function(t,e,r){var n='The value of "'.concat(t,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>Math.pow(2,32)?i=Y(String(r)):"bigint"==typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=Y(i)),i+="n"),n+" It must be ".concat(e,". Received ").concat(i)}),RangeError);var J=/[^+/0-9A-Za-z-_]/g;function K(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Q(t){return c.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(J,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function tt(t,e,r,n){var i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function et(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function rt(t){return t!=t}var nt=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}();function it(t){return"undefined"==typeof BigInt?ot:t}function ot(){throw new Error("BigInt not supported")}},9216:function(t){"use strict";t.exports=i,t.exports.isMobile=i,t.exports.default=i;var e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(t){t||(t={});var i=t.ua;if(i||"undefined"==typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"==typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!=typeof i)return!1;var o=e.test(i)&&!r.test(i)||!!t.tablet&&n.test(i);return!o&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(o=!0),o}},6296:function(t,e,r){"use strict";t.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],c=t.mode||"turntable",u=n(),h=i(),d=o();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),d.setDistanceLimits(l[0],l[1]),d.lookAt(0,e,r,s),new a({turntable:u,orbit:h,matrix:d},c)};var n=r(7261),i=r(9977),o=r(4192);function a(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map((function(e){return t[e]})),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=a.prototype;s.flush=function(t){for(var e=this._controllerList,r=0;r0?a-4:a;for(r=0;r>16&255,c[u++]=e>>8&255,c[u++]=255&e;return 2===l&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[u++]=255&e),1===l&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[u++]=e>>8&255,c[u++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,n){for(var i,o,a=[],s=e;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},3865:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},1318:function(t){"use strict";t.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},8697:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},7842:function(t,e,r){"use strict";var n=r(6330),i=r(1533),o=r(2651),a=r(4387),s=r(869),l=r(8697);t.exports=function t(e,r){if(n(e))return r?l(e,t(r)):[e[0].clone(),e[1].clone()];var c,u,h=0;if(i(e))c=e.clone();else if("string"==typeof e)c=a(e);else{if(0===e)return[o(0),o(1)];if(e===Math.floor(e))c=o(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),h-=256;c=o(e)}}if(n(r))c.mul(r[1]),u=r[0].clone();else if(i(r))u=r.clone();else if("string"==typeof r)u=a(r);else if(r)if(r===Math.floor(r))u=o(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),h+=256;u=o(r)}else u=o(1);return h>0?c=c.ushln(h):h<0&&(u=u.ushln(-h)),s(c,u)}},6330:function(t,e,r){"use strict";var n=r(1533);t.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},5716:function(t,e,r){"use strict";var n=r(6859);t.exports=function(t){return t.cmp(new n(0))}},1369:function(t,e,r){"use strict";var n=r(5716);t.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var o=0;o20?52:r+32}},1533:function(t,e,r){"use strict";r(6859),t.exports=function(t){return t&&"object"==typeof t&&Boolean(t.words)}},2651:function(t,e,r){"use strict";var n=r(6859),i=r(2361);t.exports=function(t){var e=i.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},869:function(t,e,r){"use strict";var n=r(2651),i=r(5716);t.exports=function(t,e){var r=i(t),o=i(e);if(0===r)return[n(0),n(1)];if(0===o)return[n(0),n(0)];o<0&&(t=t.neg(),e=e.neg());var a=t.gcd(e);return a.cmpn(1)?[t.div(a),e.div(a)]:[t,e]}},4387:function(t,e,r){"use strict";var n=r(6859);t.exports=function(t){return new n(t)}},6504:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},7721:function(t,e,r){"use strict";var n=r(5716);t.exports=function(t){return n(t[0])*n(t[1])}},5572:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},946:function(t,e,r){"use strict";var n=r(1369),i=r(4025);t.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var o=e.abs().divmod(r.abs()),a=o.div,s=n(a),l=o.mod,c=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=i(s)+4;return c*(s+(d=n(l.ushln(u).divRound(r)))*Math.pow(2,-u))}var h=r.bitLength()-l.bitLength()+53,d=n(l.ushln(h).divRound(r));return h<1023?c*d*Math.pow(2,-h):c*(d*=Math.pow(2,-1023))*Math.pow(2,1023-h)}},2478:function(t){"use strict";function e(t,e,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)>=0?(o=a,i=a-1):n=a+1}return o}function r(t,e,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)>0?(o=a,i=a-1):n=a+1}return o}function n(t,e,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)<0?(o=a,n=a+1):i=a-1}return o}function i(t,e,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)<=0?(o=a,n=a+1):i=a-1}return o}function o(t,e,r,n,i){for(;n<=i;){var o=n+i>>>1,a=t[o],s=void 0!==r?r(a,e):a-e;if(0===s)return o;s<=0?n=o+1:i=o-1}return-1}function a(t,e,r,n,i,o){return"function"==typeof r?o(t,e,r,void 0===n?0:0|n,void 0===i?t.length-1:0|i):o(t,e,void 0,void 0===r?0:0|r,void 0===n?t.length-1:0|n)}t.exports={ge:function(t,r,n,i,o){return a(t,r,n,i,o,e)},gt:function(t,e,n,i,o){return a(t,e,n,i,o,r)},lt:function(t,e,r,i,o){return a(t,e,r,i,o,n)},le:function(t,e,r,n,o){return a(t,e,r,n,o,i)},eq:function(t,e,r,n,i){return a(t,e,r,n,i,o)}}},8828:function(t,e){"use strict";function r(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},6859:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(7790).Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=l(t,e,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,l=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,l=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,h=67108863&l,d=Math.min(c,e.length-1),f=Math.max(0,c-t.length+1);f<=d;f++){var p=c-f|0;u+=(a=(i=0|t.words[p])*(o=0|e.words[f])+h)/67108864|0,h=67108863&a}r.words[c]=0|h,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?u[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=h[t],f=d[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(t);r=(p=p.idivn(f)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,l="le"===e,c=new t(o),u=this.clone();if(l){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,f=0|a[1],p=8191&f,m=f>>>13,g=0|a[2],v=8191&g,b=g>>>13,y=0|a[3],x=8191&y,_=y>>>13,w=0|a[4],k=8191&w,A=w>>>13,M=0|a[5],T=8191&M,S=M>>>13,C=0|a[6],E=8191&C,L=C>>>13,z=0|a[7],O=8191&z,D=z>>>13,I=0|a[8],F=8191&I,R=I>>>13,P=0|a[9],j=8191&P,N=P>>>13,B=0|s[0],U=8191&B,G=B>>>13,V=0|s[1],H=8191&V,W=V>>>13,q=0|s[2],Y=8191&q,Z=q>>>13,X=0|s[3],$=8191&X,J=X>>>13,K=0|s[4],Q=8191&K,tt=K>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,ut=0|s[8],ht=8191&ut,dt=ut>>>13,ft=0|s[9],pt=8191&ft,mt=ft>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(c+(n=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,G))+Math.imul(d,U)|0))<<13)|0;c=((o=Math.imul(d,G))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,G))+Math.imul(m,U)|0,o=Math.imul(m,G);var vt=(c+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(d,H)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=(i=Math.imul(v,G))+Math.imul(b,U)|0,o=Math.imul(b,G),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var bt=(c+(n=n+Math.imul(h,Y)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(d,Y)|0))<<13)|0;c=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(x,U),i=(i=Math.imul(x,G))+Math.imul(_,U)|0,o=Math.imul(_,G),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var yt=(c+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,J)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(k,U),i=(i=Math.imul(k,G))+Math.imul(A,U)|0,o=Math.imul(A,G),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,J)|0;var xt=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(d,Q)|0))<<13)|0;c=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,G))+Math.imul(S,U)|0,o=Math.imul(S,G),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(d,rt)|0))<<13)|0;c=((o=o+Math.imul(d,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(E,U),i=(i=Math.imul(E,G))+Math.imul(L,U)|0,o=Math.imul(L,G),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(S,H)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var wt=(c+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(d,ot)|0))<<13)|0;c=((o=o+Math.imul(d,at)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,G))+Math.imul(D,U)|0,o=Math.imul(D,G),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,W)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var kt=(c+(n=n+Math.imul(h,lt)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(d,lt)|0))<<13)|0;c=((o=o+Math.imul(d,ct)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(F,U),i=(i=Math.imul(F,G))+Math.imul(R,U)|0,o=Math.imul(R,G),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(D,H)|0,o=o+Math.imul(D,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,J)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var At=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,dt)|0)+Math.imul(d,ht)|0))<<13)|0;c=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(j,U),i=(i=Math.imul(j,G))+Math.imul(N,U)|0,o=Math.imul(N,G),n=n+Math.imul(F,H)|0,i=(i=i+Math.imul(F,W)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,dt)|0;var Mt=(c+(n=n+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,mt)|0)+Math.imul(d,pt)|0))<<13)|0;c=((o=o+Math.imul(d,mt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,W))+Math.imul(N,H)|0,o=Math.imul(N,W),n=n+Math.imul(F,Y)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(v,ht)|0,i=(i=i+Math.imul(v,dt)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,dt)|0;var Tt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(j,Y),i=(i=Math.imul(j,Z))+Math.imul(N,Y)|0,o=Math.imul(N,Z),n=n+Math.imul(F,$)|0,i=(i=i+Math.imul(F,J)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,ct)|0,n=n+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,dt)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,dt)|0;var St=(c+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,$),i=(i=Math.imul(j,J))+Math.imul(N,$)|0,o=Math.imul(N,J),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(D,rt)|0,o=o+Math.imul(D,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,n=n+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,ct)|0,n=n+Math.imul(k,ht)|0,i=(i=i+Math.imul(k,dt)|0)+Math.imul(A,ht)|0,o=o+Math.imul(A,dt)|0;var Ct=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(j,Q),i=(i=Math.imul(j,tt))+Math.imul(N,Q)|0,o=Math.imul(N,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0,n=n+Math.imul(T,ht)|0,i=(i=i+Math.imul(T,dt)|0)+Math.imul(S,ht)|0,o=o+Math.imul(S,dt)|0;var Et=(c+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(A,pt)|0))<<13)|0;c=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(j,rt),i=(i=Math.imul(j,nt))+Math.imul(N,rt)|0,o=Math.imul(N,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,ct)|0,n=n+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,dt)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,dt)|0;var Lt=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(j,ot),i=(i=Math.imul(j,at))+Math.imul(N,ot)|0,o=Math.imul(N,at),n=n+Math.imul(F,lt)|0,i=(i=i+Math.imul(F,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,dt)|0)+Math.imul(D,ht)|0,o=o+Math.imul(D,dt)|0;var zt=(c+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(L,pt)|0))<<13)|0;c=((o=o+Math.imul(L,mt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,n=Math.imul(j,lt),i=(i=Math.imul(j,ct))+Math.imul(N,lt)|0,o=Math.imul(N,ct),n=n+Math.imul(F,ht)|0,i=(i=i+Math.imul(F,dt)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,dt)|0;var Ot=(c+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(D,pt)|0))<<13)|0;c=((o=o+Math.imul(D,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(j,ht),i=(i=Math.imul(j,dt))+Math.imul(N,ht)|0,o=Math.imul(N,dt);var Dt=(c+(n=n+Math.imul(F,pt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var It=(c+(n=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,mt))+Math.imul(N,pt)|0))<<13)|0;return c=((o=Math.imul(N,mt))+(i>>>13)|0)+(It>>>26)|0,It&=67108863,l[0]=gt,l[1]=vt,l[2]=bt,l[3]=yt,l[4]=xt,l[5]=_t,l[6]=wt,l[7]=kt,l[8]=At,l[9]=Mt,l[10]=Tt,l[11]=St,l[12]=Ct,l[13]=Et,l[14]=Lt,l[15]=zt,l[16]=Ot,l[17]=Dt,l[18]=It,0!==c&&(l[19]=c,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?f(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==u||c>=i);c--){var h=0|this.words[c];this.words[c]=u<<26-o|h>>>o,u=h&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==e){(s=new o(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var d=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,h);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=d)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):this.negative&t.negative?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),l=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),h=e.clone();!e.isZero();){for(var d=0,f=1;!(e.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(h)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(l)):(r.isub(e),s.isub(i),l.isub(a))}return{a:s,b:l,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),l=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;!(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var h=0,d=1;!(r.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(y,b),y.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new x;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return v[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(!(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,i),d=this.pow(t,i.addn(1).iushrn(1)),f=this.pow(t,i),p=a;0!==f.cmp(s);){for(var m=f,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var c=e.words[n],u=l-1;u>=0;u--){var h=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4==++s||0===n&&0===u)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}l=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,k),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},6204:function(t){"use strict";t.exports=function(t){var e,r,n,i=t.length,o=0;for(e=0;e>>1;if(!(u<=0)){var h,d=i.mallocDouble(2*u*s),f=i.mallocInt32(s);if((s=l(t,u,d,f))>0){if(1===u&&n)o.init(s),h=o.sweepComplete(u,r,0,s,d,f,0,s,d,f);else{var p=i.mallocDouble(2*u*c),m=i.mallocInt32(c);(c=l(e,u,p,m))>0&&(o.init(s+c),h=1===u?o.sweepBipartite(u,r,0,s,d,f,0,c,p,m):a(u,r,n,s,d,f,c,p,m),i.free(p),i.free(m))}i.free(d),i.free(f)}return h}}}function u(t,e){n.push([t,e])}},2455:function(t,e){"use strict";function r(t){return t?function(t,e,r,n,i,o,a,s,l,c,u){return i-n>l-s?function(t,e,r,n,i,o,a,s,l,c,u){for(var h=2*t,d=n,f=h*n;dc-l?n?function(t,e,r,n,i,o,a,s,l,c,u){for(var h=2*t,d=n,f=h*n;d0;){var I=(O-=1)*x,F=w[I],R=w[I+1],P=w[I+2],j=w[I+3],N=w[I+4],B=w[I+5],U=O*_,G=k[U],V=k[U+1],H=1&B,W=!!(16&B),q=u,Y=S,Z=E,X=L;if(H&&(q=E,Y=L,Z=u,X=S),!(2&B&&R>=(P=g(t,F,R,P,q,Y,V))||4&B&&(R=v(t,F,R,P,q,Y,G))>=P)){var $=P-R,J=N-j;if(W){if(t*$*($+J)=p0)&&!(p1>=hi)"),m=u("lo===p0"),g=u("lo>>1,d=2*t,f=h,p=s[d*h+e];c=y?(f=b,p=y):v>=_?(f=g,p=v):(f=x,p=_):y>=_?(f=b,p=y):_>=v?(f=g,p=v):(f=x,p=_);for(var w=d*(u-1),k=d*f,A=0;Ar&&i[h+e]>c;--u,h-=a){for(var d=h,f=h+a,p=0;pd;++d,l+=s)if(i[l+h]===a)if(u===d)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var m=o[d];o[d]=o[u],o[u++]=m}return u},"lod;++d,l+=s)if(i[l+h]f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var m=o[d];o[d]=o[u],o[u++]=m}return u},"lo<=p0":function(t,e,r,n,i,o,a){for(var s=2*t,l=s*r,c=l,u=r,h=t+e,d=r;n>d;++d,l+=s)if(i[l+h]<=a)if(u===d)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var m=o[d];o[d]=o[u],o[u++]=m}return u},"hi<=p0":function(t,e,r,n,i,o,a){for(var s=2*t,l=s*r,c=l,u=r,h=t+e,d=r;n>d;++d,l+=s)if(i[l+h]<=a)if(u===d)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var m=o[d];o[d]=o[u],o[u++]=m}return u},"lof;++f,l+=s){var p=i[l+h],m=i[l+d];if(pg;++g){var v=i[l+g];i[l+g]=i[c],i[c++]=v}var b=o[f];o[f]=o[u],o[u++]=b}}return u},"lo<=p0&&p0<=hi":function(t,e,r,n,i,o,a){for(var s=2*t,l=s*r,c=l,u=r,h=e,d=t+e,f=r;n>f;++f,l+=s){var p=i[l+h],m=i[l+d];if(p<=a&&a<=m)if(u===f)u+=1,c+=s;else{for(var g=0;s>g;++g){var v=i[l+g];i[l+g]=i[c],i[c++]=v}var b=o[f];o[f]=o[u],o[u++]=b}}return u},"!(lo>=p0)&&!(p1>=hi)":function(t,e,r,n,i,o,a,s){for(var l=2*t,c=l*r,u=c,h=r,d=e,f=t+e,p=r;n>p;++p,c+=l){var m=i[c+d],g=i[c+f];if(!(m>=a||s>=g))if(h===p)h+=1,u+=l;else{for(var v=0;l>v;++v){var b=i[c+v];i[c+v]=i[u],i[u++]=b}var y=o[p];o[p]=o[h],o[h++]=y}}return h}}},1811:function(t){"use strict";t.exports=function(t,n){n<=4*e?r(0,n-1,t):c(0,n-1,t)};var e=32;function r(t,e,r){for(var n=2*(t+1),i=t+1;i<=e;++i){for(var o=r[n++],a=r[n++],s=i,l=n-2;s-- >t;){var c=r[l-2],u=r[l-1];if(cr[e+1])}function l(t,e,r,n){var i=n[t*=2];return i>1,g=m-d,v=m+d,b=f,y=g,x=m,_=v,w=p,k=t+1,A=u-1,M=0;s(b,y,h)&&(M=b,b=y,y=M),s(_,w,h)&&(M=_,_=w,w=M),s(b,x,h)&&(M=b,b=x,x=M),s(y,x,h)&&(M=y,y=x,x=M),s(b,_,h)&&(M=b,b=_,_=M),s(x,_,h)&&(M=x,x=_,_=M),s(y,w,h)&&(M=y,y=w,w=M),s(y,x,h)&&(M=y,y=x,x=M),s(_,w,h)&&(M=_,_=w,w=M);for(var T=h[2*y],S=h[2*y+1],C=h[2*_],E=h[2*_+1],L=2*b,z=2*x,O=2*w,D=2*f,I=2*m,F=2*p,R=0;R<2;++R){var P=h[L+R],j=h[z+R],N=h[O+R];h[D+R]=P,h[I+R]=j,h[F+R]=N}i(g,t,h),i(v,u,h);for(var B=k;B<=A;++B)if(l(B,T,S,h))B!==k&&n(B,k,h),++k;else if(!l(B,C,E,h))for(;;){if(l(A,C,E,h)){l(A,T,S,h)?(o(B,k,A,h),++k,--A):(n(B,A,h),--A);break}if(--A>>1;o(p,S);var C=0,E=0;for(k=0;k=a)m(u,h,E--,L=L-a|0);else if(L>=0)m(l,c,C--,L);else if(L<=-a){L=-L-a|0;for(var z=0;z>>1;o(p,C);var E=0,L=0,z=0;for(A=0;A>1==p[2*A+3]>>1&&(D=2,A+=1),O<0){for(var I=-(O>>1)-1,F=0;F>1)-1,0===D?m(l,c,E--,I):1===D?m(u,h,L--,I):2===D&&m(d,f,z--,I)}},scanBipartite:function(t,e,r,n,i,s,u,h,d,f,v,b){var y=0,x=2*t,_=e,w=e+t,k=1,A=1;n?A=a:k=a;for(var M=i;M>>1;o(p,E);var L=0;for(M=0;M=a?(O=!n,T-=a):(O=!!n,T-=1),O)g(l,c,L++,T);else{var D=b[T],I=x*T,F=v[I+e+1],R=v[I+e+1+t];t:for(var P=0;P>>1;o(p,k);var A=0;for(y=0;y=a)l[A++]=x-a;else{var T=f[x-=1],S=g*x,C=d[S+e+1],E=d[S+e+1+t];t:for(var L=0;L=0;--L)if(l[L]===x){for(I=L+1;I0;){for(var f=r.pop(),p=(u=-1,h=-1,l=a[s=r.pop()],1);p=0||(e.flip(s,f),i(t,e,r,u,s,h),i(t,e,r,s,h,u),i(t,e,r,h,f,u),i(t,e,r,f,u,h))}}},5023:function(t,e,r){"use strict";var n,i=r(2478);function o(t,e,r,n,i,o,a){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=o,this.boundary=a}function a(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}t.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,i=0;i0||l.length>0;){for(;s.length>0;){var f=s.pop();if(c[f]!==-i){c[f]=i,u[f];for(var p=0;p<3;++p){var m=d[3*f+p];m>=0&&0===c[m]&&(h[3*f+p]?l.push(m):(s.push(m),c[m]=i))}}}var g=l;l=s,s=g,l.length=0,i=-i}var v=function(t,e,r){for(var n=0,i=0;i1&&i(r[d[f-2]],r[d[f-1]],o)>0;)t.push([d[f-1],d[f-2],a]),f-=1;d.length=f,d.push(a);var p=h.upperIds;for(f=p.length;f>1&&i(r[p[f-2]],r[p[f-1]],o)<0;)t.push([p[f-2],p[f-1],a]),f-=1;p.length=f,p.push(a)}}function u(t,e){var r;return(r=t.a[0]p[0]&&i.push(new a(p,f,2,l),new a(f,p,1,l))}i.sort(s);for(var m=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),g=[new o([m,1],[m,0],-1,[],[],[],[])],v=[],b=(l=0,i.length);l=0}}(),o.removeTriangle=function(t,e,r){var n=this.stars;a(n[t],e,r),a(n[e],r,t),a(n[r],t,e)},o.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},o.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;ne[2]?1:0)}function v(t,e,r){if(0!==t.length){if(e)for(var n=0;n=0;--o){var y=e[u=(S=n[o])[0]],x=y[0],_=y[1],w=t[x],k=t[_];if((w[0]-k[0]||w[1]-k[1])<0){var A=x;x=_,_=A}y[0]=x;var M,T=y[1]=S[1];for(i&&(M=y[2]);o>0&&n[o-1][0]===u;){var S,C=(S=n[--o])[1];i?e.push([T,C,M]):e.push([T,C]),T=C}i?e.push([T,_,M]):e.push([T,_])}return d}(t,e,d,m,r),b=p(t,g);return v(e,b,r),!!b||d.length>0||m.length>0}},3637:function(t,e,r){"use strict";t.exports=function(t,e,r,n){var o=s(e,t),h=s(n,r),d=u(o,h);if(0===a(d))return null;var f=u(h,s(t,r)),p=i(f,d),m=c(o,p);return l(t,m)};var n=r(6504),i=r(8697),o=r(5572),a=r(7721),s=r(544),l=r(2653),c=r(8987);function u(t,e){return o(n(t[0],e[1]),n(t[1],e[0]))}},3642:function(t){t.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},6729:function(t,e,r){"use strict";var n=r(3642),i=r(395);function o(t){return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function a(t){for(var e,r="#",n=0;n<3;++n)r+=("00"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function s(t){return"rgba("+t.join(",")+")"}t.exports=function(t){var e,r,l,c,u,h,d,f,p,m;if(t||(t={}),f=(t.nshades||72)-1,d=t.format||"hex",(h=t.colormap)||(h="jet"),"string"==typeof h){if(h=h.toLowerCase(),!n[h])throw Error(h+" not a supported colorscale");u=n[h]}else{if(!Array.isArray(h))throw Error("unsupported colormap option",h);u=h.slice()}if(u.length>f+1)throw new Error(h+" map requires nshades to be at least size "+u.length);p=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1],e=u.map((function(t){return Math.round(t.index*f)})),p[0]=Math.min(Math.max(p[0],0),1),p[1]=Math.min(Math.max(p[1],0),1);var g=u.map((function(t,e){var r=u[e].index,n=u[e].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1||(n[3]=p[0]+(p[1]-p[0])*r),n})),v=[];for(m=0;m0||l(t,e,o)?-1:1:0===s?c>0||l(t,e,r)?1:-1:i(c-s)}var h=n(t,e,r);return h>0?a>0&&n(t,e,o)>0?1:-1:h<0?a>0||n(t,e,o)>0?1:-1:n(t,e,o)>0||l(t,e,r)?1:-1};var n=r(3250),i=r(8572),o=r(9362),a=r(5382),s=r(8210);function l(t,e,r){var n=o(t[0],-e[0]),i=o(t[1],-e[1]),l=o(r[0],-e[0]),c=o(r[1],-e[1]),u=s(a(n,l),a(i,c));return u[u.length-1]>=0}},8572:function(t){"use strict";t.exports=function(t){return t<0?-1:t>0?1:0}},8507:function(t){t.exports=function(t,n){var i=t.length,o=t.length-n.length;if(o)return o;switch(i){case 0:return 0;case 1:return t[0]-n[0];case 2:return t[0]+t[1]-n[0]-n[1]||e(t[0],t[1])-e(n[0],n[1]);case 3:var a=t[0]+t[1],s=n[0]+n[1];if(o=a+t[2]-(s+n[2]))return o;var l=e(t[0],t[1]),c=e(n[0],n[1]);return e(l,t[2])-e(c,n[2])||e(l+t[2],a)-e(c+n[2],s);case 4:var u=t[0],h=t[1],d=t[2],f=t[3],p=n[0],m=n[1],g=n[2],v=n[3];return u+h+d+f-(p+m+g+v)||e(u,h,d,f)-e(p,m,g,v,p)||e(u+h,u+d,u+f,h+d,h+f,d+f)-e(p+m,p+g,p+v,m+g,m+v,g+v)||e(u+h+d,u+h+f,u+d+f,h+d+f)-e(p+m+g,p+m+v,p+g+v,m+g+v);default:for(var b=t.slice().sort(r),y=n.slice().sort(r),x=0;xt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}},4750:function(t,e,r){"use strict";t.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var i=new Array(r),o=e[r-1],a=0;a=e[l]&&(s+=1);o[a]=s}}return t}(n(o,!0),r)}};var n=r(8954),i=r(3952)},4769:function(t){"use strict";t.exports=function(t,e,r,n,i,o){var a=i-1,s=i*i,l=a*a,c=(1+2*i)*l,u=i*l,h=s*(3-2*i),d=s*a;if(t.length){o||(o=new Array(t.length));for(var f=t.length-1;f>=0;--f)o[f]=c*t[f]+u*e[f]+h*r[f]+d*n[f];return o}return c*t+u*e+h*r+d*n},t.exports.derivative=function(t,e,r,n,i,o){var a=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(t.length){o||(o=new Array(t.length));for(var u=t.length-1;u>=0;--u)o[u]=a*t[u]+s*e[u]+l*r[u]+c*n[u];return o}return a*t+s*e+l*r[u]+c*n}},7642:function(t,e,r){"use strict";var n=r(8954),i=r(1682);function o(t,e){this.point=t,this.index=e}function a(t,e){for(var r=t.point,n=e.point,i=r.length,o=0;o=2)return!1;t[r]=n}return!0})):_.filter((function(t){for(var e=0;e<=s;++e){var r=v[t[e]];if(r<0)return!1;t[e]=r}return!0})),1&s)for(u=0;u<_.length;++u)d=(x=_[u])[0],x[0]=x[1],x[1]=d;return _}},2361:function(t){var e=!1;if("undefined"!=typeof Float64Array){var r=new Float64Array(1),n=new Uint32Array(r.buffer);r[0]=1,e=!0,1072693248===n[1]?(t.exports=function(t){return r[0]=t,[n[0],n[1]]},t.exports.pack=function(t,e){return n[0]=t,n[1]=e,r[0]},t.exports.lo=function(t){return r[0]=t,n[0]},t.exports.hi=function(t){return r[0]=t,n[1]}):1072693248===n[0]?(t.exports=function(t){return r[0]=t,[n[1],n[0]]},t.exports.pack=function(t,e){return n[1]=t,n[0]=e,r[0]},t.exports.lo=function(t){return r[0]=t,n[1]},t.exports.hi=function(t){return r[0]=t,n[0]}):e=!1}if(!e){var i=new Buffer(8);t.exports=function(t){return i.writeDoubleLE(t,0,!0),[i.readUInt32LE(0,!0),i.readUInt32LE(4,!0)]},t.exports.pack=function(t,e){return i.writeUInt32LE(t,0,!0),i.writeUInt32LE(e,4,!0),i.readDoubleLE(0,!0)},t.exports.lo=function(t){return i.writeDoubleLE(t,0,!0),i.readUInt32LE(0,!0)},t.exports.hi=function(t){return i.writeDoubleLE(t,0,!0),i.readUInt32LE(4,!0)}}t.exports.sign=function(e){return t.exports.hi(e)>>>31},t.exports.exponent=function(e){return(t.exports.hi(e)<<1>>>21)-1023},t.exports.fraction=function(e){var r=t.exports.lo(e),n=t.exports.hi(e),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},t.exports.denormalized=function(e){return!(2146435072&t.exports.hi(e))}},1338:function(t){"use strict";function e(t,r,n){var i=0|t[n];if(i<=0)return[];var o,a=new Array(i);if(n===t.length-1)for(o=0;o0)return function(t,e){var r,n;for(r=new Array(t),n=0;n=r-1){d=l.length-1;var p=t-e[r-1];for(f=0;f=r-1)for(var u=s.length-1,h=(e[r-1],0);h=0;--r)if(t[--e])return!1;return!0},s.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t0;--h)n.push(o(l[h-1],c[h-1],arguments[h])),i.push(0)}},s.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t1e-6?1/s:0;this._time.push(t);for(var d=r;d>0;--d){var f=o(c[d-1],u[d-1],arguments[d]);n.push(f),i.push((f-n[a++])*h)}}},s.set=function(t){var e=this.dimension;if(!(t0;--l)r.push(o(a[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var n=this._state,i=this._velocity,a=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=t-e,h=u>1e-6?1/u:0;this._time.push(t);for(var d=r;d>0;--d){var f=arguments[d];n.push(o(l[d-1],c[d-1],n[a++]+f)),i.push(f*h)}}},s.idle=function(t){var e=this.lastT();if(!(t=0;--h)n.push(o(l[h],c[h],n[a]+u*i[a])),i.push(0),a+=1}}},3840:function(t){"use strict";function e(t,e,r,n,i,o){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=o}function r(t){return new e(t._color,t.key,t.value,t.left,t.right,t._count)}function n(t,r){return new e(t,r.key,r.value,r.left,r.right,r._count)}function i(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function o(t,e){this._compare=t,this.root=e}t.exports=function(t){return new o(t||f,null)};var a=o.prototype;function s(t,e){var r;return e.left&&(r=s(t,e.left))?r:(r=t(e.key,e.value))||(e.right?s(t,e.right):void 0)}function l(t,e,r,n){if(e(t,n.key)<=0){var i;if(n.left&&(i=l(t,e,r,n.left)))return i;if(i=r(n.key,n.value))return i}if(n.right)return l(t,e,r,n.right)}function c(t,e,r,n,i){var o,a=r(t,i.key),s=r(e,i.key);if(a<=0){if(i.left&&(o=c(t,e,r,n,i.left)))return o;if(s>0&&(o=n(i.key,i.value)))return o}if(s>0&&i.right)return c(t,e,r,n,i.right)}function u(t,e){this.tree=t,this._stack=e}Object.defineProperty(a,"keys",{get:function(){var t=[];return this.forEach((function(e,r){t.push(e)})),t}}),Object.defineProperty(a,"values",{get:function(){var t=[];return this.forEach((function(e,r){t.push(r)})),t}}),Object.defineProperty(a,"length",{get:function(){return this.root?this.root._count:0}}),a.insert=function(t,r){for(var a=this._compare,s=this.root,l=[],c=[];s;){var u=a(t,s.key);l.push(s),c.push(u),s=u<=0?s.left:s.right}l.push(new e(0,t,r,null,null,1));for(var h=l.length-2;h>=0;--h)s=l[h],c[h]<=0?l[h]=new e(s._color,s.key,s.value,l[h+1],s.right,s._count+1):l[h]=new e(s._color,s.key,s.value,s.left,l[h+1],s._count+1);for(h=l.length-1;h>1;--h){var d=l[h-1];if(s=l[h],1===d._color||1===s._color)break;var f=l[h-2];if(f.left===d)if(d.left===s){if(!(p=f.right)||0!==p._color){f._color=0,f.left=d.right,d._color=1,d.right=f,l[h-2]=d,l[h-1]=s,i(f),i(d),h>=3&&((m=l[h-3]).left===f?m.left=d:m.right=d);break}d._color=1,f.right=n(1,p),f._color=0,h-=1}else{if(!(p=f.right)||0!==p._color){d.right=s.left,f._color=0,f.left=s.right,s._color=1,s.left=d,s.right=f,l[h-2]=s,l[h-1]=d,i(f),i(d),i(s),h>=3&&((m=l[h-3]).left===f?m.left=s:m.right=s);break}d._color=1,f.right=n(1,p),f._color=0,h-=1}else if(d.right===s){if(!(p=f.left)||0!==p._color){f._color=0,f.right=d.left,d._color=1,d.left=f,l[h-2]=d,l[h-1]=s,i(f),i(d),h>=3&&((m=l[h-3]).right===f?m.right=d:m.left=d);break}d._color=1,f.left=n(1,p),f._color=0,h-=1}else{var p;if(!(p=f.left)||0!==p._color){var m;d.left=s.right,f._color=0,f.right=s.left,s._color=1,s.right=d,s.left=f,l[h-2]=s,l[h-1]=d,i(f),i(d),i(s),h>=3&&((m=l[h-3]).right===f?m.right=s:m.left=s);break}d._color=1,f.left=n(1,p),f._color=0,h-=1}}return l[0]._color=1,new o(a,l[0])},a.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return s(t,this.root);case 2:return l(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return c(e,r,this._compare,t,this.root)}},Object.defineProperty(a,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new u(this,t)}}),Object.defineProperty(a,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new u(this,t)}}),a.at=function(t){if(t<0)return new u(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t=e.right._count)break;e=e.right}return new u(this,[])},a.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var o=e(t,r.key);n.push(r),o<=0&&(i=n.length),r=o<=0?r.left:r.right}return n.length=i,new u(this,n)},a.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var o=e(t,r.key);n.push(r),o<0&&(i=n.length),r=o<0?r.left:r.right}return n.length=i,new u(this,n)},a.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var o=e(t,r.key);n.push(r),o>0&&(i=n.length),r=o<=0?r.left:r.right}return n.length=i,new u(this,n)},a.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var o=e(t,r.key);n.push(r),o>=0&&(i=n.length),r=o<0?r.left:r.right}return n.length=i,new u(this,n)},a.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new u(this,n);r=i<=0?r.left:r.right}return new u(this,[])},a.remove=function(t){var e=this.find(t);return e?e.remove():this},a.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var h=u.prototype;function d(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function f(t,e){return te?1:0}Object.defineProperty(h,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(h,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),h.clone=function(){return new u(this.tree,this._stack.slice())},h.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var a=new Array(t.length),s=t[t.length-1];a[a.length-1]=new e(s._color,s.key,s.value,s.left,s.right,s._count);for(var l=t.length-2;l>=0;--l)(s=t[l]).left===t[l+1]?a[l]=new e(s._color,s.key,s.value,a[l+1],s.right,s._count):a[l]=new e(s._color,s.key,s.value,s.left,a[l+1],s._count);if((s=a[a.length-1]).left&&s.right){var c=a.length;for(s=s.left;s.right;)a.push(s),s=s.right;var u=a[c-1];for(a.push(new e(s._color,u.key,u.value,s.left,s.right,s._count)),a[c-1].key=s.key,a[c-1].value=s.value,l=a.length-2;l>=c;--l)s=a[l],a[l]=new e(s._color,s.key,s.value,s.left,a[l+1],s._count);a[c-1].left=a[c]}if(0===(s=a[a.length-1])._color){var h=a[a.length-2];for(h.left===s?h.left=null:h.right===s&&(h.right=null),a.pop(),l=0;l=0;--l){if(e=t[l],0===l)return void(e._color=1);if((o=t[l-1]).left===e){if((a=o.right).right&&0===a.right._color)return s=(a=o.right=r(a)).right=r(a.right),o.right=a.left,a.left=o,a.right=s,a._color=o._color,e._color=1,o._color=1,s._color=1,i(o),i(a),l>1&&((c=t[l-2]).left===o?c.left=a:c.right=a),void(t[l-1]=a);if(a.left&&0===a.left._color)return s=(a=o.right=r(a)).left=r(a.left),o.right=s.left,a.left=s.right,s.left=o,s.right=a,s._color=o._color,o._color=1,a._color=1,e._color=1,i(o),i(a),i(s),l>1&&((c=t[l-2]).left===o?c.left=s:c.right=s),void(t[l-1]=s);if(1===a._color){if(0===o._color)return o._color=1,void(o.right=n(0,a));o.right=n(0,a);continue}a=r(a),o.right=a.left,a.left=o,a._color=o._color,o._color=0,i(o),i(a),l>1&&((c=t[l-2]).left===o?c.left=a:c.right=a),t[l-1]=a,t[l]=o,l+11&&((c=t[l-2]).right===o?c.right=a:c.left=a),void(t[l-1]=a);if(a.right&&0===a.right._color)return s=(a=o.left=r(a)).right=r(a.right),o.left=s.right,a.right=s.left,s.right=o,s.left=a,s._color=o._color,o._color=1,a._color=1,e._color=1,i(o),i(a),i(s),l>1&&((c=t[l-2]).right===o?c.right=s:c.left=s),void(t[l-1]=s);if(1===a._color){if(0===o._color)return o._color=1,void(o.left=n(0,a));o.left=n(0,a);continue}var c;a=r(a),o.left=a.right,a.right=o,a._color=o._color,o._color=0,i(o),i(a),l>1&&((c=t[l-2]).right===o?c.right=a:c.left=a),t[l-1]=a,t[l]=o,l+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(h,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(h,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),h.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(h,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),h.update=function(t){var r=this._stack;if(0===r.length)throw new Error("Can't update empty node!");var n=new Array(r.length),i=r[r.length-1];n[n.length-1]=new e(i._color,i.key,t,i.left,i.right,i._count);for(var a=r.length-2;a>=0;--a)(i=r[a]).left===r[a+1]?n[a]=new e(i._color,i.key,i.value,n[a+1],i.right,i._count):n[a]=new e(i._color,i.key,i.value,i.left,n[a+1],i._count);return new o(this.tree._compare,n[0])},h.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(h,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},3837:function(t,e,r){"use strict";t.exports=function(t,e){var r=new f(t);return r.update(e),r};var n=r(4935),i=r(501),o=r(5304),a=r(6429),s=r(6444),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),c=ArrayBuffer,u=DataView;function h(t){return Array.isArray(t)||function(t){return c.isView(t)&&!(t instanceof u)}(t)}function d(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function f(t){this.gl=t,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=o(t)}var p=f.prototype;function m(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}p.update=function(t){function e(e,r,n){if(n in t){var i,o=t[n],a=this[n];(e?h(o)&&h(o[0]):h(o))?this[n]=i=[r(o[0]),r(o[1]),r(o[2])]:this[n]=i=[r(o),r(o),r(o)];for(var s=0;s<3;++s)if(i[s]!==a[s])return!0}return!1}t=t||{};var r,o=e.bind(this,!1,Number),a=e.bind(this,!1,Boolean),l=e.bind(this,!1,String),c=e.bind(this,!0,(function(t){if(h(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]})),u=!1,d=!1;if("bounds"in t)for(var f=t.bounds,p=0;p<2;++p)for(var m=0;m<3;++m)f[p][m]!==this.bounds[p][m]&&(d=!0),this.bounds[p][m]=f[p][m];if("ticks"in t)for(r=t.ticks,u=!0,this.autoTicks=!1,p=0;p<3;++p)this.tickSpacing[p]=0;else o("tickSpacing")&&(this.autoTicks=!0,d=!0);if(this._firstInit&&("ticks"in t||"tickSpacing"in t||(this.autoTicks=!0),d=!0,u=!0,this._firstInit=!1),d&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),u=!0),u){for(p=0;p<3;++p)r[p].sort((function(t,e){return t.x-e.x}));s.equal(r,this.ticks)?u=!1:this.ticks=r}a("tickEnable"),l("tickFont")&&(u=!0),l("tickFontStyle")&&(u=!0),l("tickFontWeight")&&(u=!0),l("tickFontVariant")&&(u=!0),o("tickSize"),o("tickAngle"),o("tickPad"),c("tickColor");var g=l("labels");l("labelFont")&&(g=!0),l("labelFontStyle")&&(g=!0),l("labelFontWeight")&&(g=!0),l("labelFontVariant")&&(g=!0),a("labelEnable"),o("labelSize"),o("labelPad"),c("labelColor"),a("lineEnable"),a("lineMirror"),o("lineWidth"),c("lineColor"),a("lineTickEnable"),a("lineTickMirror"),o("lineTickLength"),o("lineTickWidth"),c("lineTickColor"),a("gridEnable"),o("gridWidth"),c("gridColor"),a("zeroEnable"),c("zeroLineColor"),o("zeroLineWidth"),a("backgroundEnable"),c("backgroundColor");var v=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],b=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(g||u)&&this._text.update(this.bounds,this.labels,v,this.ticks,b):this._text=n(this.gl,this.bounds,this.labels,v,this.ticks,b),this._lines&&u&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var g=[new m,new m,new m];function v(t,e,r,n,i){for(var o=t.primalOffset,a=t.primalMinor,s=t.mirrorOffset,l=t.mirrorMinor,c=n[e],u=0;u<3;++u)if(e!==u){var h=o,d=s,f=a,p=l;c&1<0?(f[u]=-1,p[u]=0):(f[u]=0,p[u]=1)}}var b=[0,0,0],y={model:l,view:l,projection:l,_ortho:!1};p.isOpaque=function(){return!0},p.isTransparent=function(){return!1},p.drawTransparent=function(t){};var x=[0,0,0],_=[0,0,0],w=[0,0,0];p.draw=function(t){t=t||y;for(var e=this.gl,r=t.model||l,n=t.view||l,i=t.projection||l,o=this.bounds,s=t._ortho||!1,c=a(r,n,i,o,s),u=c.cubeEdges,h=c.axis,f=n[12],p=n[13],m=n[14],k=n[15],A=(s?2:1)*this.pixelRatio*(i[3]*f+i[7]*p+i[11]*m+i[15]*k)/e.drawingBufferHeight,M=0;M<3;++M)this.lastCubeProps.cubeEdges[M]=u[M],this.lastCubeProps.axis[M]=h[M];var T=g;for(M=0;M<3;++M)v(g[M],M,this.bounds,u,h);e=this.gl;var S,C,E,L=b;for(M=0;M<3;++M)this.backgroundEnable[M]?L[M]=h[M]:L[M]=0;for(this._background.draw(r,n,i,o,L,this.backgroundColor),this._lines.bind(r,n,i,this),M=0;M<3;++M){var z=[0,0,0];h[M]>0?z[M]=o[1][M]:z[M]=o[0][M];for(var O=0;O<2;++O){var D=(M+1+O)%3,I=(M+1+(1^O))%3;this.gridEnable[D]&&this._lines.drawGrid(D,I,this.bounds,z,this.gridColor[D],this.gridWidth[D]*this.pixelRatio)}for(O=0;O<2;++O)D=(M+1+O)%3,I=(M+1+(1^O))%3,this.zeroEnable[I]&&Math.min(o[0][I],o[1][I])<=0&&Math.max(o[0][I],o[1][I])>=0&&this._lines.drawZero(D,I,this.bounds,z,this.zeroLineColor[I],this.zeroLineWidth[I]*this.pixelRatio)}for(M=0;M<3;++M){this.lineEnable[M]&&this._lines.drawAxisLine(M,this.bounds,T[M].primalOffset,this.lineColor[M],this.lineWidth[M]*this.pixelRatio),this.lineMirror[M]&&this._lines.drawAxisLine(M,this.bounds,T[M].mirrorOffset,this.lineColor[M],this.lineWidth[M]*this.pixelRatio);var F=d(x,T[M].primalMinor),R=d(_,T[M].mirrorMinor),P=this.lineTickLength;for(O=0;O<3;++O){var j=A/r[5*O];F[O]*=P[O]*j,R[O]*=P[O]*j}this.lineTickEnable[M]&&this._lines.drawAxisTicks(M,T[M].primalOffset,F,this.lineTickColor[M],this.lineTickWidth[M]*this.pixelRatio),this.lineTickMirror[M]&&this._lines.drawAxisTicks(M,T[M].mirrorOffset,R,this.lineTickColor[M],this.lineTickWidth[M]*this.pixelRatio)}function N(t){(E=[0,0,0])[t]=1}function B(t,e,r){var n=(t+1)%3,i=(t+2)%3,o=e[n],a=e[i],s=r[n],l=r[i];o>0&&l>0||o>0&&l<0||o<0&&l>0||o<0&&l<0?N(n):(a>0&&s>0||a>0&&s<0||a<0&&s>0||a<0&&s<0)&&N(i)}for(this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio),M=0;M<3;++M){var U=T[M].primalMinor,G=T[M].mirrorMinor,V=d(w,T[M].primalOffset);for(O=0;O<3;++O)this.lineTickEnable[M]&&(V[O]+=A*U[O]*Math.max(this.lineTickLength[O],0)/r[5*O]);var H=[0,0,0];if(H[M]=1,this.tickEnable[M]){for(-3600===this.tickAngle[M]?(this.tickAngle[M]=0,this.tickAlign[M]="auto"):this.tickAlign[M]=-1,C=1,"auto"===(S=[this.tickAlign[M],.5,C])[0]?S[0]=0:S[0]=parseInt(""+S[0]),E=[0,0,0],B(M,U,G),O=0;O<3;++O)V[O]+=A*U[O]*this.tickPad[O]/r[5*O];this._text.drawTicks(M,this.tickSize[M],this.tickAngle[M],V,this.tickColor[M],H,E,S)}if(this.labelEnable[M]){for(C=0,E=[0,0,0],this.labels[M].length>4&&(N(M),C=1),"auto"===(S=[this.labelAlign[M],.5,C])[0]?S[0]=0:S[0]=parseInt(""+S[0]),O=0;O<3;++O)V[O]+=A*U[O]*this.labelPad[O]/r[5*O];V[M]+=.5*(o[0][M]+o[1][M]),this._text.drawLabel(M,this.labelSize[M],this.labelAngle[M],V,this.labelColor[M],[0,0,0],E,S)}}this._text.unbind()},p.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},5304:function(t,e,r){"use strict";t.exports=function(t){for(var e=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,h=[0,0,0],d=[0,0,0],f=-1;f<=1;f+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),h[l]=f,d[l]=f;for(var p=-1;p<=1;p+=2){h[c]=p;for(var m=-1;m<=1;m+=2)h[u]=m,e.push(h[0],h[1],h[2],d[0],d[1],d[2]),s+=1}var g=c;c=u,u=g}var v=n(t,new Float32Array(e)),b=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),y=i(t,[{buffer:v,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:t.FLOAT,size:3,offset:12,stride:24}],b),x=o(t);return x.attributes.position.location=0,x.attributes.normal.location=1,new a(t,v,y,x)};var n=r(2762),i=r(8116),o=r(1879).bg;function a(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}var s=a.prototype;s.draw=function(t,e,r,n,i,o){for(var a=!1,s=0;s<3;++s)a=a||i[s];if(a){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:o},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},6429:function(t,e,r){"use strict";t.exports=function(t,e,r,o,f){i(s,e,t),i(s,r,s);for(var b=0,y=0;y<2;++y){u[2]=o[y][2];for(var x=0;x<2;++x){u[1]=o[x][1];for(var _=0;_<2;++_)u[0]=o[_][0],d(l[b],u,s),b+=1}}var w=-1;for(y=0;y<8;++y){for(var k=l[y][3],A=0;A<3;++A)c[y][A]=l[y][A]/k;f&&(c[y][2]*=-1),k<0&&(w<0||c[y][2]C&&(w|=1<C&&(w|=1<c[y][1])&&(R=y);var P=-1;for(y=0;y<3;++y)(N=R^1<c[j][0]&&(j=N))}var B=m;B[0]=B[1]=B[2]=0,B[n.log2(P^R)]=R&P,B[n.log2(R^j)]=R&j;var U=7^j;U===w||U===F?(U=7^P,B[n.log2(j^U)]=U&j):B[n.log2(P^U)]=U&P;var G=g,V=w;for(M=0;M<3;++M)G[M]=V&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}\n"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);e.Q=function(t){return i(t,s,l,null,[{name:"position",type:"vec3"}])};var c=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * (view * (model * vec4(nPosition, 1.0)));\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}\n"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);e.bg=function(t){return i(t,c,u,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(t,e,r){"use strict";t.exports=function(t,e,r,n,a,l){var c=i(t),h=o(t,[{buffer:c,size:3}]),d=s(t);d.attributes.position.location=0;var f=new u(t,d,c,h);return f.update(e,r,n,a,l),f};var i=r(2762),o=r(8116),a=r(4359),s=r(1879).Q,l=window||n.global||{},c=l.__TEXT_CACHE||{};function u(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}l.__TEXT_CACHE={};var h=u.prototype,d=[0,0];h.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,d[0]=this.gl.drawingBufferWidth,d[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=d},h.unbind=function(){this.vao.unbind()},h.update=function(t,e,r,n,i){var o=[];function s(t,e,r,n,i,s){var l=[r.style,r.weight,r.variant,r.family].join("_"),u=c[l];u||(u=c[l]={});var h=u[e];h||(h=u[e]=function(t,e){try{return a(t,e)}catch(e){return console.warn('error vectorizing text:"'+t+'" error:',e),{cells:[],positions:[]}}}(e,{triangles:!0,font:r.family,fontStyle:r.style,fontWeight:r.weight,fontVariant:r.variant,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var d=(n||12)/12,f=h.positions,p=h.cells,m=0,g=p.length;m=0;--b){var y=f[v[b]];o.push(d*y[0],-d*y[1],t)}}for(var l=[0,0,0],u=[0,0,0],h=[0,0,0],d=[0,0,0],f={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},p=0;p<3;++p){h[p]=o.length/3|0,s(.5*(t[0][p]+t[1][p]),e[p],r[p],12,1.25,f),d[p]=(o.length/3|0)-h[p],l[p]=o.length/3|0;for(var m=0;m=0&&(i=r.length-n-1);var o=Math.pow(10,i),a=Math.round(t*e*o),s=a+"";if(s.indexOf("e")>=0)return s;var l=a/o,c=a%o;a<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=""+l;if(a<0&&(u="-"+u),i){for(var h=""+c;h.length=t[0][i];--a)o.push({x:a*e[i],text:r(e[i],a)});n.push(o)}return n},e.equal=function(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,o,i),r}function u(t,e){for(var r=n.malloc(t.length,e),i=t.length,o=0;o=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,t.data,e):this.length=c(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var s=n.malloc(t.size,r),l=o(s,t.shape);i.assign(l,t),this.length=c(this.gl,this.type,this.length,this.usage,e<0?s:s.subarray(0,t.size),e),n.free(s)}}else if(Array.isArray(t)){var h;h=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(t,"uint16"):u(t,"float32"),this.length=c(this.gl,this.type,this.length,this.usage,e<0?h:h.subarray(0,t.length),e),n.free(h)}else if("object"==typeof t&&"number"==typeof t.length)this.length=c(this.gl,this.type,this.length,this.usage,t,e);else{if("number"!=typeof t&&void 0!==t)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(t|=0)<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},t.exports=function(t,e,r,n){if(r=r||t.ARRAY_BUFFER,n=n||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(n!==t.DYNAMIC_DRAW&&n!==t.STATIC_DRAW&&n!==t.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var i=t.createBuffer(),o=new s(t,r,i,0,n);return o.update(e),o}},6405:function(t,e,r){"use strict";var n=r(2931);t.exports=function(t,e){var r=t.positions,i=t.vectors,o={positions:[],vertexIntensity:[],vertexIntensityBounds:t.vertexIntensityBounds,vectors:[],cells:[],coneOffset:t.coneOffset,colormap:t.colormap};if(0===t.positions.length)return e&&(e[0]=[0,0,0],e[1]=[0,0,0]),o;for(var a=0,s=1/0,l=-1/0,c=1/0,u=-1/0,h=1/0,d=-1/0,f=null,p=null,m=[],g=1/0,v=!1,b="raw"===t.coneSizemode,y=0;ya&&(a=n.length(_)),y&&!b){var w=2*n.distance(f,x)/(n.length(p)+n.length(_));w?(g=Math.min(g,w),v=!1):v=!0}v||(f=x,p=_),m.push(_)}var k=[s,c,h],A=[l,u,d];e&&(e[0]=k,e[1]=A),0===a&&(a=1);var M=1/a;isFinite(g)||(g=1),o.vectorScale=g;var T=t.coneSize||(b?1:.5);t.absoluteConeSize&&(T=t.absoluteConeSize*M),o.coneScale=T,y=0;for(var S=0;y=1},f.isTransparent=function(){return this.opacity<1},f.pickSlots=1,f.setPickBase=function(t){this.pickId=t},f.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,"lightPosition"in t&&(this.lightPosition=t.lightPosition),"opacity"in t&&(this.opacity=t.opacity),"ambient"in t&&(this.ambientLight=t.ambient),"diffuse"in t&&(this.diffuseLight=t.diffuse),"specular"in t&&(this.specularLight=t.specular),"roughness"in t&&(this.roughness=t.roughness),"fresnel"in t&&(this.fresnel=t.fresnel),void 0!==t.tubeScale&&(this.tubeScale=t.tubeScale),void 0!==t.vectorScale&&(this.vectorScale=t.vectorScale),void 0!==t.coneScale&&(this.coneScale=t.coneScale),void 0!==t.coneOffset&&(this.coneOffset=t.coneOffset),t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=u({colormap:t,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],o=0;o<3;++o)r[4*n+o]=i[o];r[4*n+3]=255*i[3]}return c(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions,i=t.vectors;if(n&&r&&i){var o=[],a=[],s=[],l=[],h=[];this.cells=r,this.positions=n,this.vectors=i;var d=t.meshColor||[1,1,1,1],f=t.vertexIntensity,p=1/0,m=-1/0;if(f)if(t.vertexIntensityBounds)p=+t.vertexIntensityBounds[0],m=+t.vertexIntensityBounds[1];else for(var g=0;g0){var m=this.triShader;m.bind(),m.uniforms=c,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},f.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||h,n=t.view||h,i=t.projection||h,o=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],a=0;a<3;++a)o[0][a]=Math.max(o[0][a],this.clipBounds[0][a]),o[1][a]=Math.min(o[1][a],this.clipBounds[1][a]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:o,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},f.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3),i={position:n,dataCoordinate:n,index:Math.floor(r[1]/48)};return"cone"===this.traceType?i.index=Math.floor(r[1]/48):"streamtube"===this.traceType&&(i.intensity=this.intensity[r[1]],i.velocity=this.vectors[r[1]].slice(0,3),i.divergence=this.vectors[r[1]][3],i.index=e),i},f.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()},t.exports=function(t,e,r){var s=r.shaders;1===arguments.length&&(t=(e=t).gl);var l=function(t,e){var r=n(t,e.meshShader.vertex,e.meshShader.fragment,null,e.meshShader.attributes);return r.attributes.position.location=0,r.attributes.color.location=2,r.attributes.uv.location=3,r.attributes.vector.location=4,r}(t,s),u=function(t,e){var r=n(t,e.pickShader.vertex,e.pickShader.fragment,null,e.pickShader.attributes);return r.attributes.position.location=0,r.attributes.id.location=1,r.attributes.vector.location=4,r}(t,s),h=a(t,c(new Uint8Array([255,255,255,255]),[1,1,4]));h.generateMipmap(),h.minFilter=t.LINEAR_MIPMAP_LINEAR,h.magFilter=t.LINEAR;var f=i(t),p=i(t),m=i(t),g=i(t),v=i(t),b=new d(t,h,l,u,f,p,v,m,g,o(t,[{buffer:f,type:t.FLOAT,size:4},{buffer:v,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:m,type:t.FLOAT,size:4},{buffer:g,type:t.FLOAT,size:2},{buffer:p,type:t.FLOAT,size:4}]),r.traceType||"cone");return b.update(e),b}},614:function(t,e,r){var n=r(3236),i=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, coneScale, coneOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),o=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),a=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float vectorScale, coneScale, coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * (view * conePosition);\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);e.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(t){t.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(t,e,r){var n=r(737);t.exports=function(t){return n[t]}},9165:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl,r=n(e),a=i(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),l=o(e);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(e,r,a,l);return c.update(t),c};var n=r(2762),i=r(8116),o=r(3436),a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function c(t,e){for(var r=0;r<3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||a,i=r.projection=t.projection||a;r.model=t.model||a,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var o=n[12],s=n[13],l=n[14],c=n[15],u=(t._ortho?2:1)*this.pixelRatio*(i[3]*o+i[7]*s+i[11]*l+i[15]*c)/e.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)e.lineWidth(this.lineWidth[h]*this.pixelRatio),r.capSize=this.capSize[h]*u,this.lineCount[h]&&e.drawArrays(e.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var u=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var o=[0,0,0];o[(n+e)%3]=i,r.push(o)}t[e]=r}return t}();function h(t,e,r,n){for(var i=u[n],o=0;o0&&((f=u.slice())[s]+=p[1][s],i.push(u[0],u[1],u[2],m[0],m[1],m[2],m[3],0,0,0,f[0],f[1],f[2],m[0],m[1],m[2],m[3],0,0,0),c(this.bounds,f),a+=2+h(i,f,m,s))}this.lineCount[s]=a-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},3436:function(t,e,r){"use strict";var n=r(3236),i=r(9405),o=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * (view * worldPosition);\n fragColor = color;\n fragPosition = position;\n}"]),a=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);t.exports=function(t){return i(t,o,a,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(t,e,r){"use strict";var n=r(7766);t.exports=function(t,e,r,n){i||(i=t.FRAMEBUFFER_UNSUPPORTED,o=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,a=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=t.getExtension("WEBGL_draw_buffers");if(!l&&c&&function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),o=0;ou||r<0||r>u)throw new Error("gl-fbo: Parameters are too large for FBO");var h=1;if("color"in(n=n||{})){if((h=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(h>1){if(!c)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(h>t.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+h+" draw buffers")}}var d=t.UNSIGNED_BYTE,f=t.getExtension("OES_texture_float");if(n.float&&h>0){if(!f)throw new Error("gl-fbo: Context does not support floating point textures");d=t.FLOAT}else n.preferFloat&&h>0&&f&&(d=t.FLOAT);var m=!0;"depth"in n&&(m=!!n.depth);var g=!1;return"stencil"in n&&(g=!!n.stencil),new p(t,e,r,d,h,m,g,c)};var i,o,a,s,l=null;function c(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function u(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function h(t){switch(t){case i:throw new Error("gl-fbo: Framebuffer unsupported");case o:throw new Error("gl-fbo: Framebuffer incomplete attachment");case a:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function d(t,e,r,i,o,a){if(!i)return null;var s=n(t,e,r,o,i);return s.magFilter=t.NEAREST,s.minFilter=t.NEAREST,s.mipSamples=1,s.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,a,t.TEXTURE_2D,s.handle,0),s}function f(t,e,r,n,i){var o=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,o),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,i,t.RENDERBUFFER,o),o}function p(t,e,r,n,i,o,a,s){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var p=0;p1&&s.drawBuffersWEBGL(l[a]);var b=r.getExtension("WEBGL_depth_texture");b?p?t.depth=d(r,i,o,b.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m&&(t.depth=d(r,i,o,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):m&&p?t._depth_rb=f(r,i,o,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m?t._depth_rb=f(r,i,o,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):p&&(t._depth_rb=f(r,i,o,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var y=r.checkFramebufferStatus(r.FRAMEBUFFER);if(y!==r.FRAMEBUFFER_COMPLETE){for(t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null),v=0;vi||r<0||r>i)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var o=c(n),a=0;a>8*f&255;this.pickOffset=r,i.bind();var p=i.uniforms;p.viewTransform=t,p.pickOffset=e,p.shape=this.shape;var m=i.attributes;return this.positionBuffer.bind(),m.position.pointer(),this.weightBuffer.bind(),m.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),m.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,a),r+this.shape[0]*this.shape[1]}}}(),h.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var o=r-n,a=this.xData,s=this.yData;return{object:this,pointId:o,dataCoord:[a[o%this.shape[0]],s[o/this.shape[0]|0]]}},h.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||i(e[0]),a=t.y||i(e[1]),s=t.z||new Float32Array(e[0]*e[1]),l=!1!==t.zsmooth;this.xData=r,this.yData=a;var c,u,h,f,p=t.colorLevels||[0],m=t.colorValues||[0,0,0,1],g=p.length,v=this.bounds;l?(c=v[0]=r[0],u=v[1]=a[0],h=v[2]=r[r.length-1],f=v[3]=a[a.length-1]):(c=v[0]=r[0]+(r[1]-r[0])/2,u=v[1]=a[0]+(a[1]-a[0])/2,h=v[2]=r[r.length-1]+(r[r.length-1]-r[r.length-2])/2,f=v[3]=a[a.length-1]+(a[a.length-1]-a[a.length-2])/2);var b=1/(h-c),y=1/(f-u),x=e[0],_=e[1];this.shape=[x,_];var w=(l?(x-1)*(_-1):x*_)*(d.length>>>1);this.numVertices=w;for(var k=o.mallocUint8(4*w),A=o.mallocFloat32(2*w),M=o.mallocUint8(2*w),T=o.mallocUint32(w),S=0,C=l?x-1:x,E=l?_-1:_,L=0;L max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\n// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl\nvec4 packFloat(float v) {\n float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n float e = floor(log2(av));\n float m = av * pow(2.0, -e) - 1.0;\n\n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n\n //Unpack exponent\n float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0;\n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];e.createShader=function(t){return i(t,o,a,null,l)},e.createPickShader=function(t){return i(t,o,s,null,l)}},5714:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl||t.scene&&t.scene.gl,r=h(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var a=d(e);a.attributes.position.location=0,a.attributes.nextPosition.location=1,a.attributes.arcLength.location=2,a.attributes.lineWidth.location=3,a.attributes.color.location=4;for(var s=n(e),l=i(e,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),u=c(new Array(1024),[256,1,4]),f=0;f<1024;++f)u.data[f]=255;var p=o(e,u);p.wrap=e.REPEAT;var m=new v(e,r,a,s,l,p);return m.update(t),m};var n=r(2762),i=r(8116),o=r(7766),a=new Uint8Array(4),s=new Float32Array(a.buffer),l=r(2478),c=r(9618),u=r(7319),h=u.createShader,d=u.createPickShader,f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function m(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function g(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function v(t,e,r,n,i,o){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=o,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var b=v.prototype;b.isTransparent=function(){return this.hasAlpha},b.isOpaque=function(){return!this.hasAlpha},b.pickSlots=1,b.setPickBase=function(t){this.pickId=t},b.drawTransparent=b.draw=function(t){if(this.vertexCount){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||f,view:t.view||f,projection:t.projection||f,clipBounds:m(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},b.drawPick=function(t){if(this.vertexCount){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||f,view:t.view||f,projection:t.projection||f,pickId:this.pickId,clipBounds:m(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},b.update=function(t){var e,r;this.dirty=!0;var n=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),this.hasAlpha=!1,"opacity"in t&&(this.opacity=+t.opacity,this.opacity<1&&(this.hasAlpha=!0));var i=[],o=[],a=[],s=0,u=0,h=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],d=t.position||t.positions;if(d){var f=t.color||t.colors||[0,0,0,1],m=t.lineWidth||1,g=!1;t:for(e=1;e0){for(var w=0;w<24;++w)i.push(i[i.length-12]);u+=2,g=!0}continue t}h[0][r]=Math.min(h[0][r],x[r],_[r]),h[1][r]=Math.max(h[1][r],x[r],_[r])}Array.isArray(f[0])?(v=f.length>e-1?f[e-1]:f.length>0?f[f.length-1]:[0,0,0,1],b=f.length>e?f[e]:f.length>0?f[f.length-1]:[0,0,0,1]):v=b=f,3===v.length&&(v=[v[0],v[1],v[2],1]),3===b.length&&(b=[b[0],b[1],b[2],1]),!this.hasAlpha&&v[3]<1&&(this.hasAlpha=!0),y=Array.isArray(m)?m.length>e-1?m[e-1]:m.length>0?m[m.length-1]:[0,0,0,1]:m;var k=s;if(s+=p(x,_),g){for(r=0;r<2;++r)i.push(x[0],x[1],x[2],_[0],_[1],_[2],k,y,v[0],v[1],v[2],v[3]);u+=2,g=!1}i.push(x[0],x[1],x[2],_[0],_[1],_[2],k,y,v[0],v[1],v[2],v[3],x[0],x[1],x[2],_[0],_[1],_[2],k,-y,v[0],v[1],v[2],v[3],_[0],_[1],_[2],x[0],x[1],x[2],s,-y,b[0],b[1],b[2],b[3],_[0],_[1],_[2],x[0],x[1],x[2],s,y,b[0],b[1],b[2],b[3]),u+=4}}if(this.buffer.update(i),o.push(s),a.push(d[d.length-1].slice()),this.bounds=h,this.vertexCount=u,this.points=a,this.arcLength=o,"dashes"in t){var A=t.dashes.slice();for(A.unshift(0),e=1;e1.0001)return null;v+=g[h]}return Math.abs(v-1)>.001?null:[d,s(t,g),g]}},840:function(t,e,r){var n=r(3236),i=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvec4 project(vec3 p) {\n return projection * (view * (model * vec4(p, 1.0)));\n}\n\nvoid main() {\n gl_Position = project(position);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * vec4(position , 1.0);\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n f_color = color;\n f_data = position;\n f_uv = uv;\n}\n"]),o=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),a=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n f_id = id;\n f_position = position;\n}"]),h=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),f=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);e.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:u,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:d,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:f,fragment:p,attributes:[{name:"position",type:"vec3"}]}},7201:function(t,e,r){"use strict";var n=r(9405),i=r(2762),o=r(8116),a=r(7766),s=r(8406),l=r(6760),c=r(7608),u=r(9618),h=r(6729),d=r(7765),f=r(1888),p=r(840),m=r(7626),g=p.meshShader,v=p.wireShader,b=p.pointShader,y=p.pickShader,x=p.pointPickShader,_=p.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(t,e,r,n,i,o,a,s,l,c,u,h,d,f,p,m,g,v,b,y,x,_,k,A,M,T,S){this.gl=t,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=o,this.pointPickShader=a,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=d,this.triangleUVs=h,this.triangleIds=c,this.triangleVAO=f,this.triangleCount=0,this.lineWidth=1,this.edgePositions=p,this.edgeColors=g,this.edgeUVs=v,this.edgeIds=m,this.edgeVAO=b,this.edgeCount=0,this.pointPositions=y,this.pointColors=_,this.pointUVs=k,this.pointSizes=A,this.pointIds=x,this.pointVAO=M,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=T,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var A=k.prototype;function M(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}function T(t){var e=n(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function S(t){var e=n(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function C(t){var e=n(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function E(t){var e=n(t,_.vertex,_.fragment);return e.attributes.position.location=0,e}A.isOpaque=function(){return!this.hasAlpha},A.isTransparent=function(){return this.hasAlpha},A.pickSlots=1,A.setPickBase=function(t){this.pickId=t},A.highlight=function(t){if(t&&this.contourEnable){for(var e=d(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,o=r.length,a=f.mallocFloat32(6*o),s=0,l=0;l0&&((h=this.triShader).bind(),h.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((h=this.lineShader).bind(),h.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((h=this.pointShader).bind(),h.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((h=this.contourShader).bind(),h.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},A.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,o=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],a=0;a<3;++a)o[0][a]=Math.max(o[0][a],this.clipBounds[0][a]),o[1][a]=Math.min(o[1][a],this.clipBounds[1][a]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:o,pickId:this.pickId/255};(s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},A.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),o=0;oi[A]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=g[t],r.uniforms.angle=v[t],o.drawArrays(o.TRIANGLES,i[A],i[M]-i[A]))),b[t]&&k&&(u[1^t]-=T*f*y[t],r.uniforms.dataAxis=h,r.uniforms.screenOffset=u,r.uniforms.color=x[t],r.uniforms.angle=_[t],o.drawArrays(o.TRIANGLES,w,k)),u[1^t]=T*s[2+(1^t)]-1,p[t+2]&&(u[1^t]+=T*f*m[t+2],Ai[A]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=g[t+2],r.uniforms.angle=v[t+2],o.drawArrays(o.TRIANGLES,i[A],i[M]-i[A]))),b[t+2]&&k&&(u[1^t]+=T*f*y[t+2],r.uniforms.dataAxis=h,r.uniforms.screenOffset=u,r.uniforms.color=x[t+2],r.uniforms.angle=_[t+2],o.drawArrays(o.TRIANGLES,w,k))}),m.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,o=r.screenBox,a=r.titleCenter,s=r.titleAngle,l=r.titleColor,c=r.pixelRatio;if(this.titleCount){for(var u=0;u<2;++u)e[u]=2*(a[u]*c-o[u])/(o[2+u]-o[u])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),m.bind=(d=[0,0],f=[0,0],p=[0,0],function(){var t=this.plot,e=this.shader,r=t._tickBounds,n=t.dataBox,i=t.screenBox,o=t.viewBox;e.bind();for(var a=0;a<2;++a){var s=r[a],l=r[a+2]-s,c=.5*(n[a+2]+n[a]),u=n[a+2]-n[a],h=o[a],m=o[a+2]-h,g=i[a],v=i[a+2]-g;f[a]=2*l/u*m/v,d[a]=2*(s-c)/u*m/v}p[1]=2*t.pixelRatio/(i[3]-i[1]),p[0]=p[1]*(i[3]-i[1])/(i[2]-i[0]),e.uniforms.dataScale=f,e.uniforms.dataShift=d,e.uniforms.textScale=p,this.vbo.bind(),e.attributes.textCoordinate.pointer()}),m.update=function(t){var e,r,n,i,a,s=[],l=t.ticks,c=t.bounds;for(a=0;a<2;++a){var u=[Math.floor(s.length/3)],h=[-1/0],d=l[a];for(e=0;e=0){var m=e[p]-n[p]*(e[p+2]-e[p])/(n[p+2]-n[p]);0===p?a.drawLine(m,e[1],m,e[3],f[p],d[p]):a.drawLine(e[0],m,e[2],m,f[p],d[p])}}for(p=0;p=0;--t)this.objects[t].dispose();for(this.objects.length=0,t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},c.removeObject=function(t){for(var e=this.objects,r=0;rMath.abs(e))c.rotate(o,0,0,-t*r*Math.PI*p.rotateSpeed/window.innerWidth);else if(!p._ortho){var a=-p.zoomSpeed*i*e/window.innerHeight*(o-c.lastT())/20;c.pan(o,0,0,h*(Math.exp(a)-1))}}}),!0)},p.enableMouseListeners(),p};var n=r(3025),i=r(6296),o=r(351),a=r(8512),s=r(24),l=r(7520)},799:function(t,e,r){var n=r(3236),i=r(9405),o=n(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),a=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);t.exports=function(t){return i(t,o,a,null,[{name:"position",type:"vec2"}])}},4100:function(t,e,r){"use strict";var n=r(4437),i=r(3837),o=r(5445),a=r(4449),s=r(3589),l=r(2260),c=r(7169),u=r(351),h=r(4772),d=r(4040),f=r(799),p=r(9216)({tablet:!0,featureDetect:!0});function m(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function g(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e<0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}return e>0?(r=Math.round(Math.pow(10,e)),Math.ceil(t/r)*r):Math.ceil(t)}function v(t){return"boolean"!=typeof t||t}t.exports={createScene:function(t){(t=t||{}).camera=t.camera||{};var e=t.canvas;e||(e=document.createElement("canvas"),t.container?t.container.appendChild(e):document.body.appendChild(e));var r=t.gl;if(r||(t.glOptions&&(p=!!t.glOptions.preserveDrawingBuffer),r=function(t,e){var r=null;try{(r=t.getContext("webgl",e))||(r=t.getContext("experimental-webgl",e))}catch(t){return null}return r}(e,t.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:p})),!r)throw new Error("webgl not supported");var b=t.bounds||[[-10,-10,-10],[10,10,10]],y=new m,x=l(r,r.drawingBufferWidth,r.drawingBufferHeight,{preferFloat:!p}),_=f(r),w=t.cameraObject&&!0===t.cameraObject._ortho||t.camera.projection&&"orthographic"===t.camera.projection.type||!1,k={eye:t.camera.eye||[2,0,0],center:t.camera.center||[0,0,0],up:t.camera.up||[0,1,0],zoomMin:t.camera.zoomMax||.1,zoomMax:t.camera.zoomMin||100,mode:t.camera.mode||"turntable",_ortho:w},A=t.axes||{},M=i(r,A);M.enable=!A.disable;var T=t.spikes||{},S=a(r,T),C=[],E=[],L=[],z=[],O=!0,D=!0,I={view:null,projection:new Array(16),model:new Array(16),_ortho:!1},F=(D=!0,[r.drawingBufferWidth,r.drawingBufferHeight]),R=t.cameraObject||n(e,k),P={gl:r,contextLost:!1,pixelRatio:t.pixelRatio||1,canvas:e,selection:y,camera:R,axes:M,axesPixels:null,spikes:S,bounds:b,objects:C,shape:F,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:v(t.autoResize),autoBounds:v(t.autoBounds),autoScale:!!t.autoScale,autoCenter:v(t.autoCenter),clipToBounds:v(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:I,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(t){this.aspect[0]=t.x,this.aspect[1]=t.y,this.aspect[2]=t.z,D=!0},setBounds:function(t,e){this.bounds[0][t]=e.min,this.bounds[1][t]=e.max},setClearColor:function(t){this.clearColor=t},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},j=[r.drawingBufferWidth/P.pixelRatio|0,r.drawingBufferHeight/P.pixelRatio|0];function N(){if(!P._stopped&&P.autoResize){var t=e.parentNode,r=1,n=1;t&&t!==document.body?(r=t.clientWidth,n=t.clientHeight):(r=window.innerWidth,n=window.innerHeight);var i=0|Math.ceil(r*P.pixelRatio),o=0|Math.ceil(n*P.pixelRatio);if(i!==e.width||o!==e.height){e.width=i,e.height=o;var a=e.style;a.position=a.position||"absolute",a.left="0px",a.top="0px",a.width=r+"px",a.height=n+"px",O=!0}}}function B(){for(var t=C.length,e=z.length,n=0;n0&&0===L[e-1];)L.pop(),z.pop().dispose()}function U(){if(P.contextLost)return!0;r.isContextLost()&&(P.contextLost=!0,P.mouseListener.enabled=!1,P.selection.object=null,P.oncontextloss&&P.oncontextloss())}P.autoResize&&N(),window.addEventListener("resize",N),P.update=function(t){P._stopped||(t=t||{},O=!0,D=!0)},P.add=function(t){P._stopped||(t.axes=M,C.push(t),E.push(-1),O=!0,D=!0,B())},P.remove=function(t){if(!P._stopped){var e=C.indexOf(t);e<0||(C.splice(e,1),E.pop(),O=!0,D=!0,B())}},P.dispose=function(){if(!P._stopped&&(P._stopped=!0,window.removeEventListener("resize",N),e.removeEventListener("webglcontextlost",U),P.mouseListener.enabled=!1,!P.contextLost)){M.dispose(),S.dispose();for(var t=0;ty.distance)continue;for(var c=0;c 1.0) {\n discard;\n }\n baseColor = mix(borderColor, color, step(radius, centerFraction));\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n }\n}\n"]),e.pickVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n"]),e.pickFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n"])},4696:function(t,e,r){"use strict";var n=r(9405),i=r(2762),o=r(1888),a=r(6640);function s(t,e,r,n,i){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}t.exports=function(t,e){var r=t.gl,o=new s(t,i(r),i(r),n(r,a.pointVertex,a.pointFragment),n(r,a.pickVertex,a.pickFragment));return o.update(e),t.addObject(o),o};var l,c,u=s.prototype;u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},u.update=function(t){var e;function r(e,r){return e in t?t[e]:r}t=t||{},this.sizeMin=r("sizeMin",.5),this.sizeMax=r("sizeMax",20),this.color=r("color",[1,0,0,1]).slice(),this.areaRatio=r("areaRatio",1),this.borderColor=r("borderColor",[0,0,0,1]).slice(),this.blend=r("blend",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,a=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,s=t.positions,l=i?s:o.mallocFloat32(s.length),c=a?t.idToIndex:o.mallocInt32(n);if(i||l.set(s),!a)for(l.set(s),e=0;e>>1;for(r=0;r=e[0]&&o<=e[2]&&a>=e[1]&&a<=e[3]&&n++}return n}(this.points,i),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/o,l[4]=2/a,l[6]=-2*i[0]/o-1,l[7]=-2*i[1]/a-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=u<5,r.uniforms.pointSize=u,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),e&&(c[0]=255&t,c[1]=t>>8&255,c[2]=t>>16&255,c[3]=t>>24&255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=c,this.pickOffset=t);var h=n.getParameter(n.BLEND),d=n.getParameter(n.DITHER);return h&&!this.blend&&n.disable(n.BLEND),d&&n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),h&&!this.blend&&n.enable(n.BLEND),d&&n.enable(n.DITHER),t+this.pointCount}),u.draw=u.unifiedDraw,u.drawPick=u.unifiedDraw,u.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var o=r-n,a=this.points;return{object:this,pointId:o,dataCoord:[a[2*o],a[2*o+1]]}}},783:function(t){t.exports=function(t,e,r,n){var i,o,a,s,l,c=e[0],u=e[1],h=e[2],d=e[3],f=r[0],p=r[1],m=r[2],g=r[3];return(o=c*f+u*p+h*m+d*g)<0&&(o=-o,f=-f,p=-p,m=-m,g=-g),1-o>1e-6?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-n)*i)/a,l=Math.sin(n*i)/a):(s=1-n,l=n),t[0]=s*c+l*f,t[1]=s*u+l*p,t[2]=s*h+l*m,t[3]=s*d+l*g,t}},5964:function(t){"use strict";t.exports=function(t){return t||0===t?t.toString():""}},9366:function(t,e,r){"use strict";var n=r(4359);t.exports=function(t,e,r){var o=[e.style,e.weight,e.variant,e.family].join("_"),a=i[o];if(a||(a=i[o]={}),t in a)return a[t];var s={textAlign:"center",textBaseline:"middle",lineHeight:1,font:e.family,fontStyle:e.style,fontWeight:e.weight,fontVariant:e.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},l=n(t,s);s.triangles=!1;var c,u,h=n(t,s);if(r&&1!==r){for(c=0;c max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),a=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * (view * (model * vec4(position, 1)));\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * (view * (model * vec4(dataPosition, 1)));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),c=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),u=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],h={vertex:o,fragment:l,attributes:u},d={vertex:a,fragment:l,attributes:u},f={vertex:s,fragment:l,attributes:u},p={vertex:o,fragment:c,attributes:u},m={vertex:a,fragment:c,attributes:u},g={vertex:s,fragment:c,attributes:u};function v(t,e){var r=n(t,e),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}e.createPerspective=function(t){return v(t,h)},e.createOrtho=function(t){return v(t,d)},e.createProject=function(t){return v(t,f)},e.createPickPerspective=function(t){return v(t,p)},e.createPickOrtho=function(t){return v(t,m)},e.createPickProject=function(t){return v(t,g)}},8418:function(t,e,r){"use strict";var n=r(5219),i=r(2762),o=r(8116),a=r(1888),s=r(6760),l=r(1283),c=r(9366),u=r(5964),h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],d=ArrayBuffer,f=DataView;function p(t){return Array.isArray(t)||function(t){return d.isView(t)&&!(t instanceof f)}(t)}function m(t,e){var r=t[0],n=t[1],i=t[2],o=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*i+e[12]*o,t[1]=e[1]*r+e[5]*n+e[9]*i+e[13]*o,t[2]=e[2]*r+e[6]*n+e[10]*i+e[14]*o,t[3]=e[3]*r+e[7]*n+e[11]*i+e[15]*o,t}function g(t,e,r,n){return m(n,n),m(n,n),m(n,n)}function v(t,e){this.index=t,this.dataCoordinate=this.position=e}function b(t){return!0===t||t>1?1:t}function y(t,e,r,n,i,o,a,s,l,c,u,h){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=o,this.glyphBuffer=a,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=h,this.points=[],this._selectResult=new v(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}t.exports=function(t){var e=t.gl,r=l.createPerspective(e),n=l.createOrtho(e),a=l.createProject(e),s=l.createPickPerspective(e),c=l.createPickOrtho(e),u=l.createPickProject(e),h=i(e),d=i(e),f=i(e),p=i(e),m=new y(e,r,n,a,h,d,f,p,o(e,[{buffer:h,size:3,type:e.FLOAT},{buffer:d,size:4,type:e.FLOAT},{buffer:f,size:2,type:e.FLOAT},{buffer:p,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),s,c,u);return m.update(t),m};var x=y.prototype;x.pickSlots=1,x.setPickBase=function(t){this.pickId=t},x.isTransparent=function(){if(this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectHasAlpha)return!0;return!1},x.isOpaque=function(){if(!this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&!this.projectHasAlpha)return!0;return!1};var _=[0,0],w=[0,0,0],k=[0,0,0],A=[0,0,0,1],M=[0,0,0,1],T=h.slice(),S=[0,0,0],C=[[0,0,0],[0,0,0]];function E(t){return t[0]=t[1]=t[2]=0,t}function L(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function z(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}var O=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function D(t,e,r,n,i,o,a){var l=r.gl;if((o===r.projectHasAlpha||a)&&function(t,e,r,n){var i,o=e.axesProject,a=e.gl,l=t.uniforms,c=r.model||h,u=r.view||h,d=r.projection||h,f=e.axesBounds,p=function(t){for(var e=C,r=0;r<2;++r)for(var n=0;n<3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);i=e.axes&&e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],_[0]=2/a.drawingBufferWidth,_[1]=2/a.drawingBufferHeight,t.bind(),l.view=u,l.projection=d,l.screenSize=_,l.highlightId=e.highlightId,l.highlightScale=e.highlightScale,l.clipBounds=p,l.pickGroup=e.pickId/255,l.pixelRatio=n;for(var m=0;m<3;++m)if(o[m]){l.scale=e.projectScale[m],l.opacity=e.projectOpacity[m];for(var v=T,b=0;b<16;++b)v[b]=0;for(b=0;b<4;++b)v[5*b]=1;v[5*m]=0,i[m]<0?v[12+m]=f[0][m]:v[12+m]=f[1][m],s(v,c,v),l.model=v;var y=(m+1)%3,x=(m+2)%3,O=E(w),D=E(k);O[y]=1,D[x]=1;var I=g(0,0,0,L(A,O)),F=g(0,0,0,L(M,D));if(Math.abs(I[1])>Math.abs(F[1])){var R=I;I=F,F=R,R=O,O=D,D=R;var P=y;y=x,x=P}I[0]<0&&(O[y]=-1),F[1]>0&&(D[x]=-1);var j=0,N=0;for(b=0;b<4;++b)j+=Math.pow(c[4*y+b],2),N+=Math.pow(c[4*x+b],2);O[y]/=Math.sqrt(j),D[x]/=Math.sqrt(N),l.axes[0]=O,l.axes[1]=D,l.fragClipBounds[0]=z(S,p[0],m,-1e8),l.fragClipBounds[1]=z(S,p[1],m,1e8),e.vao.bind(),e.vao.draw(a.TRIANGLES,e.vertexCount),e.lineWidth>0&&(a.lineWidth(e.lineWidth*n),e.vao.draw(a.LINES,e.lineVertexCount,e.vertexCount)),e.vao.unbind()}}(e,r,n,i),o===r.hasAlpha||a){t.bind();var c=t.uniforms;c.model=n.model||h,c.view=n.view||h,c.projection=n.projection||h,_[0]=2/l.drawingBufferWidth,_[1]=2/l.drawingBufferHeight,c.screenSize=_,c.highlightId=r.highlightId,c.highlightScale=r.highlightScale,c.fragClipBounds=O,c.clipBounds=r.axes.bounds,c.opacity=r.opacity,c.pickGroup=r.pickId/255,c.pixelRatio=i,r.vao.bind(),r.vao.draw(l.TRIANGLES,r.vertexCount),r.lineWidth>0&&(l.lineWidth(r.lineWidth*i),r.vao.draw(l.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function I(t,e,r,i){var o;o=p(t)?e=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},x.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},x.update=function(t){if("perspective"in(t=t||{})&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t)if(p(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if("projectScale"in t)if(p(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in t){p(t.projectOpacity)?this.projectOpacity=t.projectOpacity.slice():(r=+t.projectOpacity,this.projectOpacity=[r,r,r]);for(var n=0;n<3;++n)this.projectOpacity[n]=b(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in t&&(this.opacity=b(t.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,o,s=t.position,l={family:t.font||"normal",style:t.fontStyle||"normal",weight:t.fontWeight||"normal",variant:t.fontVariant||"normal"},c=t.alignment||[0,0];if(2===c.length)i=c[0],o=c[1];else for(i=[],o=[],n=0;n0){var D=0,F=x,R=[0,0,0,1],P=[0,0,0,1],j=p(f)&&p(f[0]),N=p(v)&&p(v[0]);t:for(n=0;n0?1-S[0][0]:Y<0?1+S[1][0]:1,Z*=Z>0?1-S[0][1]:Z<0?1+S[1][1]:1],$=M.cells||[],J=M.positions||[];for(A=0;A<$.length;++A)for(var K=$[A],Q=0;Q<3;++Q){for(var tt=0;tt<3;++tt)E[3*D+tt]=k[tt];for(tt=0;tt<4;++tt)L[4*D+tt]=R[tt];O[D]=y;var et=J[K[Q]];z[2*D]=V*(W*et[0]-q*et[1]+X[0]),z[2*D+1]=V*(q*et[0]+W*et[1]+X[1]),D+=1}for($=T.edges,J=T.positions,A=0;A<$.length;++A)for(K=$[A],Q=0;Q<2;++Q){for(tt=0;tt<3;++tt)E[3*F+tt]=k[tt];for(tt=0;tt<4;++tt)L[4*F+tt]=P[tt];O[F]=y,et=J[K[Q]],z[2*F]=V*(W*et[0]-q*et[1]+X[0]),z[2*F+1]=V*(q*et[0]+W*et[1]+X[1]),F+=1}}}this.bounds=[u,h],this.points=s,this.pointCount=s.length,this.vertexCount=x,this.lineVertexCount=_,this.pointBuffer.update(E),this.colorBuffer.update(L),this.glyphBuffer.update(z),this.idBuffer.update(O),a.free(E),a.free(L),a.free(z),a.free(O)},x.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()}},4298:function(t,e,r){"use strict";var n=r(3236);e.boxVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 vertex;\n\nuniform vec2 cornerA, cornerB;\n\nvoid main() {\n gl_Position = vec4(mix(cornerA, cornerB, vertex), 0, 1);\n}\n"]),e.boxFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n gl_FragColor = color;\n}\n"])},3161:function(t,e,r){"use strict";var n=r(9405),i=r(2762),o=r(4298);function a(t,e,r){this.plot=t,this.boxBuffer=e,this.boxShader=r,this.enabled=!0,this.selectBox=[1/0,1/0,-1/0,-1/0],this.borderColor=[0,0,0,1],this.innerFill=!1,this.innerColor=[0,0,0,.25],this.outerFill=!0,this.outerColor=[0,0,0,.5],this.borderWidth=10}t.exports=function(t,e){var r=t.gl,s=new a(t,i(r,[0,0,0,1,1,0,1,1]),n(r,o.boxVertex,o.boxFragment));return s.update(e),t.addOverlay(s),s};var s=a.prototype;s.draw=function(){if(this.enabled){var t=this.plot,e=this.selectBox,r=this.borderWidth,n=(this.innerFill,this.innerColor),i=(this.outerFill,this.outerColor),o=this.borderColor,a=t.box,s=t.screenBox,l=t.dataBox,c=t.viewBox,u=t.pixelRatio,h=(e[0]-l[0])*(c[2]-c[0])/(l[2]-l[0])+c[0],d=(e[1]-l[1])*(c[3]-c[1])/(l[3]-l[1])+c[1],f=(e[2]-l[0])*(c[2]-c[0])/(l[2]-l[0])+c[0],p=(e[3]-l[1])*(c[3]-c[1])/(l[3]-l[1])+c[1];if(h=Math.max(h,c[0]),d=Math.max(d,c[1]),f=Math.min(f,c[2]),p=Math.min(p,c[3]),!(f0){var v=r*u;a.drawBox(h-v,d-v,f+v,d+v,o),a.drawBox(h-v,p-v,f+v,p+v,o),a.drawBox(h-v,d-v,h+v,p+v,o),a.drawBox(f-v,d-v,f+v,p+v,o)}}}},s.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},3589:function(t,e,r){"use strict";t.exports=function(t,e){var r=e[0],o=e[1];return new l(t,n(t,r,o,{}),i.mallocUint8(r*o*4))};var n=r(2260),i=r(1888),o=r(9618),a=r(8828).nextPow2;function s(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function l(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}var c=l.prototype;Object.defineProperty(c,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(t){if(this.gl){this.fbo.shape=t;var e=this.fbo.shape[0],r=this.fbo.shape[1];if(r*e*4>this.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(a(r*e*4)),o=0;or)for(t=r;te)for(t=e;t=0){for(var k=0|w.type.charAt(w.type.length-1),A=new Array(k),M=0;M=0;)T+=1;_[b]=T}var S=new Array(r.length);function C(){d.program=a.program(f,d._vref,d._fref,x,_);for(var t=0;t=0){if((p=d.charCodeAt(d.length-1)-48)<2||p>4)throw new n("","Invalid data type for attribute "+h+": "+d);s(t,e,f[0],i,p,o,h)}else{if(!(d.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+h+": "+d);var p;if((p=d.charCodeAt(d.length-1)-48)<2||p>4)throw new n("","Invalid data type for attribute "+h+": "+d);l(t,e,f,i,p,o,h)}}}return o};var n=r(8866);function i(t,e,r,n,i,o){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=o}var o=i.prototype;o.pointer=function(t,e,r,n){var i=this,o=i._gl,a=i._locations[i._index];o.vertexAttribPointer(a,i._dimension,t||o.FLOAT,!!e,r||0,n||0),o.enableVertexAttribArray(a)},o.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(o,"location",{get:function(){return this._locations[this._index]},set:function(t){return t!==this._locations[this._index]&&(this._locations[this._index]=0|t,this._wrapper.program=null),0|t}});var a=[function(t,e,r){return void 0===r.length?t.vertexAttrib1f(e,r):t.vertexAttrib1fv(e,r)},function(t,e,r,n){return void 0===r.length?t.vertexAttrib2f(e,r,n):t.vertexAttrib2fv(e,r)},function(t,e,r,n,i){return void 0===r.length?t.vertexAttrib3f(e,r,n,i):t.vertexAttrib3fv(e,r)},function(t,e,r,n,i,o){return void 0===r.length?t.vertexAttrib4f(e,r,n,i,o):t.vertexAttrib4fv(e,r)}];function s(t,e,r,n,o,s,l){var c=a[o],u=new i(t,e,r,n,o,c);Object.defineProperty(s,l,{set:function(e){return t.disableVertexAttribArray(n[r]),c(t,n[r],e),e},get:function(){return u},enumerable:!0})}function l(t,e,r,n,i,o,a){for(var l=new Array(i),c=new Array(i),u=0;u4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+b);t["uniformMatrix"+v+"fv"](s[h],!1,d);break}throw new i("","Unknown uniform data type for "+name+": "+b)}if((v=b.charCodeAt(b.length-1)-48)<2||v>4)throw new i("","Invalid data type");switch(b.charAt(0)){case"b":case"i":t["uniform"+v+"iv"](s[h],d);break;case"v":t["uniform"+v+"fv"](s[h],d);break;default:throw new i("","Unrecognized data type for vector "+name+": "+b)}}}}}}function c(t,e){if("object"!=typeof e)return[[t,e]];var r=[];for(var n in e){var i=e[n],o=t;parseInt(n)+""===n?o+="["+n+"]":o+="."+n,"object"==typeof i?r.push.apply(r,c(o,i)):r.push([o,i])}return r}function u(t,e,n){if("object"==typeof n){var c=h(n);Object.defineProperty(t,e,{get:o(c),set:l(n),enumerable:!0,configurable:!1})}else s[n]?Object.defineProperty(t,e,{get:(u=n,function(t,e,r){return t.getUniform(e.program,r[u])}),set:l(n),enumerable:!0,configurable:!1}):t[e]=function(t){switch(t){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var e=t.indexOf("vec");if(0<=e&&e<=1&&t.length===4+e){if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new i("","Invalid data type");return"b"===t.charAt(0)?a(r,!1):a(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r;if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+t);return a(r*r,0)}throw new i("","Unknown uniform data type for "+name+": "+t)}}(r[n].type);var u}function h(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r1){s[0]in o||(o[s[0]]=[]),o=o[s[0]];for(var l=1;l1)for(var l=0;l 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, tubeScale;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),o=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),a=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * (view * tubePosition);\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);e.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},e.pickShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(t,e,r){"use strict";var n=r(2931),i=r(9970),o=["xyz","xzy","yxz","yzx","zxy","zyx"],a=function(t,e){var r,n=t.length;for(r=0;re)return r-1}return r},s=function(t,e,r){return tr?r:t},l=function(t){var e=1/0;t.sort((function(t,e){return t-e}));for(var r=t.length,n=1;nh-1||b>d-1||y>f-1)return n.create();var x,_,w,k,A,M,T=o[0][p],S=o[0][v],C=o[1][m],E=o[1][b],L=o[2][g],z=(l-T)/(S-T),O=(c-C)/(E-C),D=(u-L)/(o[2][y]-L);switch(isFinite(z)||(z=.5),isFinite(O)||(O=.5),isFinite(D)||(D=.5),r.reversedX&&(p=h-1-p,v=h-1-v),r.reversedY&&(m=d-1-m,b=d-1-b),r.reversedZ&&(g=f-1-g,y=f-1-y),r.filled){case 5:A=g,M=y,w=m*f,k=b*f,x=p*f*d,_=v*f*d;break;case 4:A=g,M=y,x=p*f,_=v*f,w=m*f*h,k=b*f*h;break;case 3:w=m,k=b,A=g*d,M=y*d,x=p*d*f,_=v*d*f;break;case 2:w=m,k=b,x=p*d,_=v*d,A=g*d*h,M=y*d*h;break;case 1:x=p,_=v,A=g*h,M=y*h,w=m*h*f,k=b*h*f;break;default:x=p,_=v,w=m*h,k=b*h,A=g*h*d,M=y*h*d}var I=i[x+w+A],F=i[x+w+M],R=i[x+k+A],P=i[x+k+M],j=i[_+w+A],N=i[_+w+M],B=i[_+k+A],U=i[_+k+M],G=n.create(),V=n.create(),H=n.create(),W=n.create();n.lerp(G,I,j,z),n.lerp(V,F,N,z),n.lerp(H,R,B,z),n.lerp(W,P,U,z);var q=n.create(),Y=n.create();n.lerp(q,G,H,O),n.lerp(Y,V,W,O);var Z=n.create();return n.lerp(Z,q,Y,D),Z}(e,t,f)},m=t.getDivergence||function(t,e){var r=n.create(),i=1e-4;n.add(r,t,[i,0,0]);var o=p(r);n.subtract(o,o,e),n.scale(o,o,1/i),n.add(r,t,[0,i,0]);var a=p(r);n.subtract(a,a,e),n.scale(a,a,1/i),n.add(r,t,[0,0,i]);var s=p(r);return n.subtract(s,s,e),n.scale(s,s,1/i),n.add(r,o,a),n.add(r,r,s),r},g=[],v=e[0][0],b=e[0][1],y=e[0][2],x=e[1][0],_=e[1][1],w=e[1][2],k=function(t){var e=t[0],r=t[1],n=t[2];return!(ex||r_||nw)},A=10*n.distance(e[0],e[1])/c,M=A*A,T=1,S=0,C=r.length;C>1&&(T=function(t){for(var e=[],r=[],n=[],i={},o={},a={},s=t.length,c=0;cS&&(S=P),F.push(P),g.push({points:z,velocities:O,divergences:F});for(var j=0;j<100*c&&z.lengthM&&n.scale(N,N,A/Math.sqrt(B)),n.add(N,N,L),D=p(N),n.squaredDistance(I,N)-M>-1e-4*M&&(z.push(N),I=N,O.push(D),R=m(N,D),P=n.length(R),isFinite(P)&&P>S&&(S=P),F.push(P)),L=N}}var U=function(t,e,r,o){for(var a=0,s=0;s0)for(k=0;k<8;k++){var A=(k+1)%8;c.push(d[k],f[k],f[A],f[A],d[A],d[k]),h.push(b,v,v,v,b,b),p.push(m,g,g,g,m,m);var M=c.length;u.push([M-6,M-5,M-4],[M-3,M-2,M-1])}var T=d;d=f,f=T;var S=b;b=v,v=S;var C=m;m=g,g=C}return{positions:c,cells:u,vectors:h,vertexIntensity:p}}(t,r,o,a)})),h=[],d=[],f=[],p=[];for(s=0;s max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (\n kill > 0.0 ||\n vColor.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n ) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color — in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));\n vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0);\n\n vec4 clipPosition = projection * (view * worldPosition);\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);e.createShader=function(t){var e=n(t,o,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},e.createPickShader=function(t){var e=n(t,o,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},e.createContourShader=function(t){var e=n(t,s,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},e.createPickContourShader=function(t){var e=n(t,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},9499:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl,r=b(e),n=x(e),s=y(e),l=_(e),c=i(e),u=o(e,[{buffer:c,size:4,stride:w,offset:0},{buffer:c,size:3,stride:w,offset:16},{buffer:c,size:3,stride:w,offset:28}]),h=i(e),d=o(e,[{buffer:h,size:4,stride:20,offset:0},{buffer:h,size:1,stride:20,offset:16}]),f=i(e),p=o(e,[{buffer:f,size:2,type:e.FLOAT}]),m=a(e,1,S,e.RGBA,e.UNSIGNED_BYTE);m.minFilter=e.LINEAR,m.magFilter=e.LINEAR;var g=new C(e,[0,0],[[0,0,0],[0,0,0]],r,n,c,u,m,s,l,h,d,f,p,[0,0,0]),v={levels:[[],[],[]]};for(var k in t)v[k]=t[k];return v.colormap=v.colormap||"jet",g.update(v),g};var n=r(8828),i=r(2762),o=r(8116),a=r(7766),s=r(1888),l=r(6729),c=r(5298),u=r(9994),h=r(9618),d=r(3711),f=r(6760),p=r(7608),m=r(2478),g=r(6199),v=r(990),b=v.createShader,y=v.createContourShader,x=v.createPickShader,_=v.createPickContourShader,w=40,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],A=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],M=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function T(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}!function(){for(var t=0;t<3;++t){var e=M[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();var S=256;function C(t,e,r,n,i,o,a,l,c,u,d,f,p,m,g){this.gl=t,this.shape=e,this.bounds=r,this.objectOffset=g,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=o,this._vao=a,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=d,this._contourVAO=f,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new T([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=p,this._dynamicVAO=m,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[h(s.mallocFloat(1024),[0,0]),h(s.mallocFloat(1024),[0,0]),h(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var E=C.prototype;E.genColormap=function(t,e){var r=!1,n=u([l({colormap:t,nshades:S,format:"rgba"}).map((function(t,n){var i=e?function(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}(n/255,e):t[3];return i<1&&(r=!0),[t[0],t[1],t[2],255*i]}))]);return c.divseq(n,255),this.hasAlphaScale=r,n},E.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},E.isOpaque=function(){return!this.isTransparent()},E.pickSlots=1,E.setPickBase=function(t){this.pickId=t};var L=[0,0,0],z={showSurface:!1,showContour:!1,projections:[k.slice(),k.slice(),k.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function O(t,e){var r,n,i,o=e.axes&&e.axes.lastCubeProps.axis||L,a=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(a=a||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=z.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(o[r]>0)][r],f(l,t.model,l);var c=z.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)c[i][n]=t.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return z.showSurface=a,z.showContour=s,z}var D={model:k,view:k,projection:k,inverseModel:k.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},I=k.slice(),F=[1,0,0,0,1,0,0,0,1];function R(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=D;n.model=t.model||k,n.view=t.view||k,n.projection=t.projection||k,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.objectOffset=this.objectOffset,n.contourColor=this.contourColor[0],n.inverseModel=p(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var o=n.clipBounds[i],a=0;a<3;++a)o[a]=Math.min(Math.max(this.clipBounds[i][a],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=F,n.vertexColor=this.vertexColor;var s=I;for(f(s,n.view,n.model),f(s,n.projection,s),p(s,s),i=0;i<3;++i)n.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i<3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i<3;++i){var c=s[12+i];for(a=0;a<3;++a)c+=s[4*a+i]*this.lightPosition[a];n.lightPosition[i]=c/l}var u=O(n,this);if(u.showSurface){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=u.projections[i],this._shader.uniforms.clipBounds=u.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour){var h=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,h.bind(),h.uniforms=n;var d=this._contourVAO;for(d.bind(),i=0;i<3;++i)for(h.uniforms.permutation=M[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),a=0;a>4)/16)/255,i=Math.floor(n),o=n-i,a=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(a),l=a-s;i+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var h=u?o:1-o,d=0;d<2;++d)for(var f=i+u,p=s+d,g=h*(d?l:1-l),v=0;v<3;++v)c[v]+=this._field[v].get(f,p)*g;for(var b=this._pickResult.level,y=0;y<3;++y)if(b[y]=m.le(this.contourLevels[y],c[y]),b[y]<0)this.contourLevels[y].length>0&&(b[y]=0);else if(b[y]Math.abs(_-c[y])&&(b[y]+=1)}for(r.index[0]=o<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=a/e[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},E.padField=function(t,e){var r=e.shape.slice(),n=t.shape.slice();c.assign(t.lo(1,1).hi(r[0],r[1]),e),c.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),c.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),c.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),c.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))},E.update=function(t){t=t||{},this.objectOffset=t.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in t&&(this.contourWidth=j(t.contourWidth,Number)),"showContour"in t&&(this.showContour=j(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=j(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=B(t.contourColor)),"contourProject"in t&&(this.contourProject=j(t.contourProject,(function(t){return j(t,Boolean)}))),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=B(t.dynamicColor)),"dynamicTint"in t&&(this.dynamicTint=j(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=j(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"opacityscale"in t&&(this.opacityscale=t.opacityscale),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0),"colormap"in t&&this._colorMap.setPixels(this.genColormap(t.colormap,this.opacityscale));var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var i=(e.shape[0]+2)*(e.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=h(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),this.padField(this._field[2],e),this.shape=e.shape.slice();for(var o=this.shape,a=0;a<2;++a)this._field[2].size>this._field[a].data.length&&(s.freeFloat(this._field[a].data),this._field[a].data=s.mallocFloat(this._field[2].size)),this._field[a]=h(this._field[a].data,[o[0]+2,o[1]+2]);if(t.coords){var l=t.coords;if(!Array.isArray(l)||3!==l.length)throw new Error("gl-surface: invalid coordinates for x/y");for(a=0;a<2;++a){var c=l[a];for(v=0;v<2;++v)if(c.shape[v]!==o[v])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[a],c)}}else if(t.ticks){var u=t.ticks;if(!Array.isArray(u)||2!==u.length)throw new Error("gl-surface: invalid ticks");for(a=0;a<2;++a){var f=u[a];if((Array.isArray(f)||f.length)&&(f=h(f)),f.shape[0]!==o[a])throw new Error("gl-surface: invalid tick length");var p=h(f.data,o);p.stride[a]=f.stride[0],p.stride[1^a]=0,this.padField(this._field[a],p)}}else{for(a=0;a<2;++a){var m=[0,0];m[a]=1,this._field[a]=h(this._field[a].data,[o[0]+2,o[1]+2],m,0)}this._field[0].set(0,0,0);for(var v=0;v0){for(var yt=0;yt<5;++yt)K.pop();U-=1}continue t}K.push(nt[0],nt[1],at[0],at[1],nt[2]),U+=1}}rt.push(U)}this._contourOffsets[Q]=et,this._contourCounts[Q]=rt}var xt=s.mallocFloat(K.length);for(a=0;as||a[1]<0||a[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=p(a,e.stride.slice()),c=0;"float32"===r?c=t.FLOAT:"float64"===r?(c=t.FLOAT,l=!1,r="float32"):"uint8"===r?c=t.UNSIGNED_BYTE:(c=t.UNSIGNED_BYTE,l=!1,r="uint8");var h,f,g=0;if(2===a.length)g=t.LUMINANCE,a=[a[0],a[1],1],e=n(e.data,a,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==a.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===a[2])g=t.ALPHA;else if(2===a[2])g=t.LUMINANCE_ALPHA;else if(3===a[2])g=t.RGB;else{if(4!==a[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=t.RGBA}}c!==t.FLOAT||t.getExtension("OES_texture_float")||(c=t.UNSIGNED_BYTE,l=!1);var v=e.size;if(l)h=0===e.offset&&e.data.length===v?e.data:e.data.subarray(e.offset,e.offset+v);else{var b=[a[2],a[2]*a[0],1];f=o.malloc(v,r);var y=n(f,a,b,0);"float32"!==r&&"float64"!==r||c!==t.UNSIGNED_BYTE?i.assign(y,e):u(y,e),h=f.subarray(0,v)}var x=m(t);return t.texImage2D(t.TEXTURE_2D,0,g,a[0],a[1],0,g,c,h),l||o.free(f),new d(t,x,a[0],a[1],g,c)}(t,e)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var a=null,s=null,l=null;function c(t){return"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&t instanceof ImageData}var u=function(t,e){i.muls(t,e,255)};function h(t,e,r){var n=t.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(e<0||e>i||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function d(t,e,r,n,i,o){this.gl=t,this.handle=e,this.format=i,this.type=o,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var a=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return a._wrapS},set:function(t){return a.wrapS=t}},{get:function(){return a._wrapT},set:function(t){return a.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return a._shape[0]},set:function(t){return a.width=t}},{get:function(){return a._shape[1]},set:function(t){return a.height=t}}]),this._shapeVector=l}var f=d.prototype;function p(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function m(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function g(t,e,r,n,i){var o=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>o||r<0||r>o)throw new Error("gl-texture2d: Invalid texture shape");if(i===t.FLOAT&&!t.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var a=m(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new d(t,a,e,r,n,i)}Object.defineProperties(f,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&a.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&a.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(l.indexOf(t[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return h(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return h(this,t|=0,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,h(this,this._shape[0],t),t}}}),f.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},f.dispose=function(){this.gl.deleteTexture(this.handle)},f.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},f.setPixels=function(t,e,r,a){var s=this.gl;this.bind(),Array.isArray(e)?(a=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),a=a||0;var l=c(t)?t:t.raw;if(l)this._mipLevels.indexOf(a)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(a)):s.texSubImage2D(s.TEXTURE_2D,a,e,r,this.format,this.type,l);else{if(!(t.shape&&t.stride&&t.data))throw new Error("gl-texture2d: Unsupported data type");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>a||r+t.shape[0]>this._shape[0]>>>a||e<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(t,e,r,a,s,l,c,h){var d=h.dtype,f=h.shape.slice();if(f.length<2||f.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var m=0,g=0,v=p(f,h.stride.slice());if("float32"===d?m=t.FLOAT:"float64"===d?(m=t.FLOAT,v=!1,d="float32"):"uint8"===d?m=t.UNSIGNED_BYTE:(m=t.UNSIGNED_BYTE,v=!1,d="uint8"),2===f.length)g=t.LUMINANCE,f=[f[0],f[1],1],h=n(h.data,f,[h.stride[0],h.stride[1],1],h.offset);else{if(3!==f.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===f[2])g=t.ALPHA;else if(2===f[2])g=t.LUMINANCE_ALPHA;else if(3===f[2])g=t.RGB;else{if(4!==f[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=t.RGBA}f[2]}if(g!==t.LUMINANCE&&g!==t.ALPHA||s!==t.LUMINANCE&&s!==t.ALPHA||(g=s),g!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var b=h.size,y=c.indexOf(a)<0;if(y&&c.push(a),m===l&&v)0===h.offset&&h.data.length===b?y?t.texImage2D(t.TEXTURE_2D,a,s,f[0],f[1],0,s,l,h.data):t.texSubImage2D(t.TEXTURE_2D,a,e,r,f[0],f[1],s,l,h.data):y?t.texImage2D(t.TEXTURE_2D,a,s,f[0],f[1],0,s,l,h.data.subarray(h.offset,h.offset+b)):t.texSubImage2D(t.TEXTURE_2D,a,e,r,f[0],f[1],s,l,h.data.subarray(h.offset,h.offset+b));else{var x;x=l===t.FLOAT?o.mallocFloat32(b):o.mallocUint8(b);var _=n(x,f,[f[2],f[2]*f[0],1]);m===t.FLOAT&&l===t.UNSIGNED_BYTE?u(_,h):i.assign(_,h),y?t.texImage2D(t.TEXTURE_2D,a,s,f[0],f[1],0,s,l,x.subarray(0,b)):t.texSubImage2D(t.TEXTURE_2D,a,e,r,f[0],f[1],s,l,x.subarray(0,b)),l===t.FLOAT?o.freeFloat32(x):o.freeUint8(x)}}(s,e,r,a,this.format,this.type,this._mipLevels,t)}}},1433:function(t){"use strict";t.exports=function(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(s)};var n=r(2825),i=r(3536),o=r(244)},9226:function(t){t.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},3126:function(t){t.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},3990:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},1091:function(t){t.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},5911:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[0],s=r[1],l=r[2];return t[0]=i*l-o*s,t[1]=o*a-n*l,t[2]=n*s-i*a,t}},5455:function(t,e,r){t.exports=r(7056)},7056:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}},4008:function(t,e,r){t.exports=r(6690)},6690:function(t){t.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}},244:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},2613:function(t){t.exports=1e-6},9922:function(t,e,r){t.exports=function(t,e){var r=t[0],i=t[1],o=t[2],a=e[0],s=e[1],l=e[2];return Math.abs(r-a)<=n*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=n*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-l)<=n*Math.max(1,Math.abs(o),Math.abs(l))};var n=r(2613)},9265:function(t){t.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},2681:function(t){t.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},5137:function(t,e,r){t.exports=function(t,e,r,i,o,a){var s,l;for(e||(e=3),r||(r=0),l=i?Math.min(i*e+r,t.length):t.length,s=r;s0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}},7636:function(t){t.exports=function(t,e){e=e||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*e,t}},6894:function(t){t.exports=function(t,e,r,n){var i=r[1],o=r[2],a=e[1]-i,s=e[2]-o,l=Math.sin(n),c=Math.cos(n);return t[0]=e[0],t[1]=i+a*c-s*l,t[2]=o+a*l+s*c,t}},109:function(t){t.exports=function(t,e,r,n){var i=r[0],o=r[2],a=e[0]-i,s=e[2]-o,l=Math.sin(n),c=Math.cos(n);return t[0]=i+s*l+a*c,t[1]=e[1],t[2]=o+s*c-a*l,t}},8692:function(t){t.exports=function(t,e,r,n){var i=r[0],o=r[1],a=e[0]-i,s=e[1]-o,l=Math.sin(n),c=Math.cos(n);return t[0]=i+a*c-s*l,t[1]=o+a*l+s*c,t[2]=e[2],t}},2447:function(t){t.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},6621:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}},8489:function(t){t.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}},1463:function(t){t.exports=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}},6141:function(t,e,r){t.exports=r(2953)},5486:function(t,e,r){t.exports=r(3066)},2953:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return r*r+n*n+i*i}},3066:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}},2229:function(t,e,r){t.exports=r(6843)},6843:function(t){t.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}},492:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2];return t[0]=n*r[0]+i*r[3]+o*r[6],t[1]=n*r[1]+i*r[4]+o*r[7],t[2]=n*r[2]+i*r[5]+o*r[8],t}},5673:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[3]*n+r[7]*i+r[11]*o+r[15];return a=a||1,t[0]=(r[0]*n+r[4]*i+r[8]*o+r[12])/a,t[1]=(r[1]*n+r[5]*i+r[9]*o+r[13])/a,t[2]=(r[2]*n+r[6]*i+r[10]*o+r[14])/a,t}},264:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*o-l*i,h=c*i+l*n-a*o,d=c*o+a*i-s*n,f=-a*n-s*i-l*o;return t[0]=u*c+f*-a+h*-l-d*-s,t[1]=h*c+f*-s+d*-a-u*-l,t[2]=d*c+f*-l+u*-s-h*-a,t}},4361:function(t){t.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}},2335:function(t){t.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},2933:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},7536:function(t){t.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},4691:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+o*o)}},1373:function(t){t.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}},3750:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},3390:function(t){t.exports=function(t,e,r,n){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=n,i}},9970:function(t,e,r){t.exports={create:r(7536),clone:r(2335),fromValues:r(3390),copy:r(2933),set:r(4578),add:r(4361),subtract:r(6860),multiply:r(3576),divide:r(1373),min:r(2334),max:r(160),scale:r(9288),scaleAndAdd:r(4844),distance:r(4691),squaredDistance:r(7960),length:r(6808),squaredLength:r(483),negate:r(1498),inverse:r(4494),normalize:r(5177),dot:r(3750),lerp:r(2573),random:r(9131),transformMat4:r(5352),transformQuat:r(4041)}},4494:function(t){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},6808:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)}},2573:function(t){t.exports=function(t,e,r,n){var i=e[0],o=e[1],a=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=o+n*(r[1]-o),t[2]=a+n*(r[2]-a),t[3]=s+n*(r[3]-s),t}},160:function(t){t.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}},2334:function(t){t.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}},3576:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}},1498:function(t){t.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},5177:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=r*r+n*n+i*i+o*o;return a>0&&(a=1/Math.sqrt(a),t[0]=r*a,t[1]=n*a,t[2]=i*a,t[3]=o*a),t}},9131:function(t,e,r){var n=r(5177),i=r(9288);t.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),n(t,t),i(t,t,e),t}},9288:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}},4844:function(t){t.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}},4578:function(t){t.exports=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}},7960:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return r*r+n*n+i*i+o*o}},483:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}},6860:function(t){t.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}},5352:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*a,t[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*a,t[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*a,t[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*a,t}},4041:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*o-l*i,h=c*i+l*n-a*o,d=c*o+a*i-s*n,f=-a*n-s*i-l*o;return t[0]=u*c+f*-a+h*-l-d*-s,t[1]=h*c+f*-s+d*-a-u*-l,t[2]=d*c+f*-l+u*-s-h*-a,t[3]=e[3],t}},1848:function(t,e,r){var n=r(4905),i=r(6468);t.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r0)continue;r=t.slice(0,1).join("")}return N(r),z+=r.length,(S=S.slice(r.length)).length}}function q(){return/[^a-fA-F0-9]/.test(e)?(N(S.join("")),T=l,A):(S.push(e),r=e,A+1)}function Y(){return"."===e||/[eE]/.test(e)?(S.push(e),T=m,r=e,A+1):"x"===e&&1===S.length&&"0"===S[0]?(T=_,S.push(e),r=e,A+1):/[^\d]/.test(e)?(N(S.join("")),T=l,A):(S.push(e),r=e,A+1)}function Z(){return"f"===e&&(S.push(e),r=e,A+=1),/[eE]/.test(e)?(S.push(e),r=e,A+1):("-"!==e&&"+"!==e||!/[eE]/.test(r))&&/[^\d]/.test(e)?(N(S.join("")),T=l,A):(S.push(e),r=e,A+1)}function X(){if(/[^\d\w_]/.test(e)){var t=S.join("");return T=j[t]?b:P[t]?v:g,N(S.join("")),T=l,A}return S.push(e),r=e,A+1}};var n=r(620),i=r(7827),o=r(6852),a=r(7932),s=r(3508),l=999,c=9999,u=0,h=1,d=2,f=3,p=4,m=5,g=6,v=7,b=8,y=9,x=10,_=11,w=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3508:function(t,e,r){var n=r(6852);n=n.slice().filter((function(t){return!/^(gl\_|texture)/.test(t)})),t.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(t){t.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(t,e,r){var n=r(620);t.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(t){t.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(t){t.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(t,e,r){var n=r(5874);t.exports=function(t,e){var r=n(e),i=[];return(i=i.concat(r(t))).concat(r(null))}},3236:function(t){t.exports=function(t){"string"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n>1,u=-7,h=r?i-1:0,d=r?-1:1,f=t[e+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+t[e+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+t[e+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=c}return(f?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(e*l-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[r+f]=255&s,f+=p,s/=256,i-=8);for(a=a<0;t[r+f]=255&a,f+=p,a/=256,c-=8);t[r+f-p]|=128*m}},8954:function(t,e,r){"use strict";t.exports=function(t,e){var r=t.length;if(0===r)throw new Error("Must have at least d+1 points");var i=t[0].length;if(r<=i)throw new Error("Must input at least d+1 points");var a=t.slice(0,i+1),s=n.apply(void 0,a);if(0===s)throw new Error("Input not in general position");for(var l=new Array(i+1),u=0;u<=i;++u)l[u]=u;s<0&&(l[0]=1,l[1]=0);var h=new o(l,new Array(i+1),!1),d=h.adjacent,f=new Array(i+2);for(u=0;u<=i;++u){for(var p=l.slice(),m=0;m<=i;++m)m===u&&(p[m]=-1);var g=p[0];p[0]=p[1],p[1]=g;var v=new o(p,new Array(i+1),!0);d[u]=v,f[u]=v}for(f[i+1]=h,u=0;u<=i;++u){p=d[u].vertices;var b=d[u].adjacent;for(m=0;m<=i;++m){var y=p[m];if(y<0)b[m]=h;else for(var x=0;x<=i;++x)d[x].vertices.indexOf(y)<0&&(b[m]=d[x])}}var _=new c(i,a,f),w=!!e;for(u=i+1;u0;)for(var s=(t=a.pop()).adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var u=c.vertices,h=0;h<=r;++h){var d=u[h];i[h]=d<0?e:o[d]}var f=this.orient();if(f>0)return c;c.lastVisited=-n,0===f&&a.push(c)}}return null},u.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,o=this.tuple,a=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[a];t:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=n;++u)o[u]=i[l[u]];for(s.lastVisited=r,u=0;u<=n;++u){var h=c[u];if(!(h.lastVisited>=r)){var d=o[u];o[u]=t;var f=this.orient();if(o[u]=d,f<0){s=h;continue t}h.boundary?h.lastVisited=-r:h.lastVisited=r}}return}return s},u.addPeaks=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,h=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,c.push(e);for(var d=[];h.length>0;){var f=(e=h.pop()).vertices,p=e.adjacent,m=f.indexOf(r);if(!(m<0))for(var g=0;g<=n;++g)if(g!==m){var v=p[g];if(v.boundary&&!(v.lastVisited>=r)){var b=v.vertices;if(v.lastVisited!==-r){for(var y=0,x=0;x<=n;++x)b[x]<0?(y=x,l[x]=t):l[x]=i[b[x]];if(this.orient()>0){b[y]=r,v.boundary=!1,c.push(v),h.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var _=v.adjacent,w=f.slice(),k=p.slice(),A=new o(w,k,!0);u.push(A);var M=_.indexOf(e);if(!(M<0))for(_[M]=A,k[m]=v,w[g]=-1,k[g]=e,p[g]=A,A.flip(),x=0;x<=n;++x){var T=w[x];if(!(T<0||T===r)){for(var S=new Array(n-1),C=0,E=0;E<=n;++E){var L=w[E];L<0||E===x||(S[C++]=L)}d.push(new a(S,A,x))}}}}}for(d.sort(s),g=0;g+1=0?a[l++]=s[u]:c=1&u;if(c===(1&t)){var h=a[0];a[0]=a[1],a[1]=h}e.push(a)}}return e}},3352:function(t,e,r){"use strict";var n=r(2478);function i(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}t.exports=function(t){return t&&0!==t.length?new v(g(t)):new v(null)};var o=i.prototype;function a(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function s(t,e){var r=g(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function l(t,e){var r=t.intervals([]);r.push(e),s(t,r)}function c(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?0:(r.splice(n,1),s(t,r),1)}function u(t,e,r){for(var n=0;n=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function d(t,e){for(var r=0;r>1],o=[],a=[],s=[];for(r=0;r3*(e+1)?l(this,t):this.left.insert(t):this.left=g([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?l(this,t):this.right.insert(t):this.right=g([t]);else{var r=n.ge(this.leftPoints,t,p),i=n.ge(this.rightPoints,t,m);this.leftPoints.splice(r,0,t),this.rightPoints.splice(i,0,t)}},o.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1)?c(this,t):2===(s=this.left.remove(t))?(this.left=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?c(this,t):2===(s=this.right.remove(t))?(this.right=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(1===this.count)return this.leftPoints[0]===t?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var r=this,i=this.left;i.right;)r=i,i=i.right;if(r===this)i.right=this.right;else{var o=this.left,s=this.right;r.count-=i.count,r.right=i.left,i.left=o,i.right=s}a(this,i),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?a(this,this.left):a(this,this.right);return 1}for(o=n.ge(this.leftPoints,t,p);othis.mid?this.right&&(r=this.right.queryPoint(t,e))?r:h(this.rightPoints,t,e):d(this.leftPoints,e);var r},o.queryInterval=function(t,e,r){var n;return tthis.mid&&this.right&&(n=this.right.queryInterval(t,e,r))?n:ethis.mid?h(this.rightPoints,t,r):d(this.leftPoints,r)};var b=v.prototype;b.insert=function(t){this.root?this.root.insert(t):this.root=new i(t[0],null,null,[t],[t])},b.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),0!==e}return!1},b.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},b.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(b,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},7762:function(t){"use strict";t.exports=function(t){for(var e=new Array(t),r=0;r13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},395:function(t){t.exports=function(t,e,r){return t*(1-r)+e*r}},2652:function(t,e,r){var n=r(4335),i=r(6864),o=r(1903),a=r(9921),s=r(7608),l=r(5665),c={length:r(1387),normalize:r(3536),dot:r(244),cross:r(5911)},u=i(),h=i(),d=[0,0,0,0],f=[[0,0,0],[0,0,0],[0,0,0]],p=[0,0,0];function m(t,e,r,n,i){t[0]=e[0]*n+r[0]*i,t[1]=e[1]*n+r[1]*i,t[2]=e[2]*n+r[2]*i}t.exports=function(t,e,r,i,g,v){if(e||(e=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),g||(g=[0,0,0,1]),v||(v=[0,0,0,1]),!n(u,t))return!1;if(o(h,u),h[3]=0,h[7]=0,h[11]=0,h[15]=1,Math.abs(a(h)<1e-8))return!1;var b,y,x,_,w,k,A,M=u[3],T=u[7],S=u[11],C=u[12],E=u[13],L=u[14],z=u[15];if(0!==M||0!==T||0!==S){if(d[0]=M,d[1]=T,d[2]=S,d[3]=z,!s(h,h))return!1;l(h,h),b=g,x=h,_=(y=d)[0],w=y[1],k=y[2],A=y[3],b[0]=x[0]*_+x[4]*w+x[8]*k+x[12]*A,b[1]=x[1]*_+x[5]*w+x[9]*k+x[13]*A,b[2]=x[2]*_+x[6]*w+x[10]*k+x[14]*A,b[3]=x[3]*_+x[7]*w+x[11]*k+x[15]*A}else g[0]=g[1]=g[2]=0,g[3]=1;if(e[0]=C,e[1]=E,e[2]=L,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(f,u),r[0]=c.length(f[0]),c.normalize(f[0],f[0]),i[0]=c.dot(f[0],f[1]),m(f[1],f[1],f[0],1,-i[0]),r[1]=c.length(f[1]),c.normalize(f[1],f[1]),i[0]/=r[1],i[1]=c.dot(f[0],f[2]),m(f[2],f[2],f[0],1,-i[1]),i[2]=c.dot(f[1],f[2]),m(f[2],f[2],f[1],1,-i[2]),r[2]=c.length(f[2]),c.normalize(f[2],f[2]),i[1]/=r[2],i[2]/=r[2],c.cross(p,f[1],f[2]),c.dot(f[0],p)<0)for(var O=0;O<3;O++)r[O]*=-1,f[O][0]*=-1,f[O][1]*=-1,f[O][2]*=-1;return v[0]=.5*Math.sqrt(Math.max(1+f[0][0]-f[1][1]-f[2][2],0)),v[1]=.5*Math.sqrt(Math.max(1-f[0][0]+f[1][1]-f[2][2],0)),v[2]=.5*Math.sqrt(Math.max(1-f[0][0]-f[1][1]+f[2][2],0)),v[3]=.5*Math.sqrt(Math.max(1+f[0][0]+f[1][1]+f[2][2],0)),f[2][1]>f[1][2]&&(v[0]=-v[0]),f[0][2]>f[2][0]&&(v[1]=-v[1]),f[1][0]>f[0][1]&&(v[2]=-v[2]),!0}},4335:function(t){t.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},7442:function(t,e,r){var n=r(6658),i=r(7182),o=r(2652),a=r(9921),s=r(8648),l=h(),c=h(),u=h();function h(){return{translate:d(),scale:d(1),skew:d(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function d(t){return[t||0,t||0,t||0]}t.exports=function(t,e,r,h){if(0===a(e)||0===a(r))return!1;var d=o(e,l.translate,l.scale,l.skew,l.perspective,l.quaternion),f=o(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!d||!f||(n(u.translate,l.translate,c.translate,h),n(u.skew,l.skew,c.skew,h),n(u.scale,l.scale,c.scale,h),n(u.perspective,l.perspective,c.perspective,h),s(u.quaternion,l.quaternion,c.quaternion,h),i(t,u.translate,u.scale,u.skew,u.perspective,u.quaternion),0))}},7182:function(t,e,r){var n={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)},i=(n.create(),n.create());t.exports=function(t,e,r,o,a,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=a[0],t[7]=a[1],t[11]=a[2],t[15]=a[3],n.identity(i),0!==o[2]&&(i[9]=o[2],n.multiply(t,t,i)),0!==o[1]&&(i[9]=0,i[8]=o[1],n.multiply(t,t,i)),0!==o[0]&&(i[8]=0,i[4]=o[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},4192:function(t,e,r){"use strict";var n=r(2478),i=r(7442),o=r(7608),a=r(5567),s=r(2408),l=r(7089),c=r(6582),u=r(7656),h=(r(2504),r(3536)),d=[0,0,0];function f(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}t.exports=function(t){return new f((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var p=f.prototype;p.recalcMatrix=function(t){var e=this._time,r=n.le(e,t),a=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===e.length-1)for(var l=16*r,c=0;c<16;++c)a[c]=s[l++];else{var u=e[r+1]-e[r],d=(l=16*r,this.prevMatrix),f=!0;for(c=0;c<16;++c)d[c]=s[l++];var p=this.nextMatrix;for(c=0;c<16;++c)p[c]=s[l++],f=f&&d[c]===p[c];if(u<1e-6||f)for(c=0;c<16;++c)a[c]=d[c];else i(a,d,p,(t-e[r])/u)}var m=this.computedUp;m[0]=a[1],m[1]=a[5],m[2]=a[9],h(m,m);var g=this.computedInverse;o(g,a);var v=this.computedEye,b=g[15];v[0]=g[12]/b,v[1]=g[13]/b,v[2]=g[14]/b;var y=this.computedCenter,x=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)y[c]=v[c]-a[2+4*c]*x}},p.idle=function(t){if(!(t1&&n(t[a[u-2]],t[a[u-1]],c)<=0;)u-=1,a.pop();for(a.push(l),u=s.length;u>1&&n(t[s[u-2]],t[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}r=new Array(s.length+a.length-2);for(var h=0,d=(i=0,a.length);i0;--f)r[h++]=s[f];return r};var n=r(3250)[3]},351:function(t,e,r){"use strict";t.exports=function(t,e){e||(e=t,t=window);var r=0,i=0,o=0,a={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==a.alt,a.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==a.shift,a.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==a.control,a.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==a.meta,a.meta=!!t.metaKey),e}function c(t,s){var c=n.x(s),u=n.y(s);"buttons"in s&&(t=0|s.buttons),(t!==r||c!==i||u!==o||l(s))&&(r=0|t,i=c||0,o=u||0,e&&e(r,i,o,a))}function u(t){c(0,t)}function h(){(r||i||o||a.shift||a.alt||a.meta||a.control)&&(i=o=0,r=0,a.shift=a.alt=a.control=a.meta=!1,e&&e(0,0,0,a))}function d(t){l(t)&&e&&e(r,i,o,a)}function f(t){0===n.buttons(t)?c(0,t):c(r,t)}function p(t){c(r|n.buttons(t),t)}function m(t){c(r&~n.buttons(t),t)}function g(){s||(s=!0,t.addEventListener("mousemove",f),t.addEventListener("mousedown",p),t.addEventListener("mouseup",m),t.addEventListener("mouseleave",u),t.addEventListener("mouseenter",u),t.addEventListener("mouseout",u),t.addEventListener("mouseover",u),t.addEventListener("blur",h),t.addEventListener("keyup",d),t.addEventListener("keydown",d),t.addEventListener("keypress",d),t!==window&&(window.addEventListener("blur",h),window.addEventListener("keyup",d),window.addEventListener("keydown",d),window.addEventListener("keypress",d)))}g();var v={element:t};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(e){e?g():s&&(s=!1,t.removeEventListener("mousemove",f),t.removeEventListener("mousedown",p),t.removeEventListener("mouseup",m),t.removeEventListener("mouseleave",u),t.removeEventListener("mouseenter",u),t.removeEventListener("mouseout",u),t.removeEventListener("mouseover",u),t.removeEventListener("blur",h),t.removeEventListener("keyup",d),t.removeEventListener("keydown",d),t.removeEventListener("keypress",d),t!==window&&(window.removeEventListener("blur",h),window.removeEventListener("keyup",d),window.removeEventListener("keydown",d),window.removeEventListener("keypress",d)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return o},enumerable:!0},mods:{get:function(){return a},enumerable:!0}}),v};var n=r(4687)},24:function(t){var e={left:0,top:0};t.exports=function(t,r,n){r=r||t.currentTarget||t.srcElement,Array.isArray(n)||(n=[0,0]);var i,o=t.clientX||0,a=t.clientY||0,s=(i=r)===window||i===document||i===document.body?e:i.getBoundingClientRect();return n[0]=o-s.left,n[1]=a-s.top,n}},4687:function(t,e){"use strict";function r(t){return t.target||t.srcElement||window}e.buttons=function(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1< 0"),"function"!=typeof t.vertex&&e("Must specify vertex creation function"),"function"!=typeof t.cell&&e("Must specify cell creation function"),"function"!=typeof t.phase&&e("Must specify phase function");for(var a=t.getters||[],s=new Array(o),l=0;l=0?s[l]=!0:s[l]=!1;return function(t,e,r,o,a,s){var l=[s,a].join(",");return(0,i[l])(t,e,r,n.mallocUint32,n.freeUint32)}(t.vertex,t.cell,t.phase,0,r,s)};var i={"false,0,1":function(t,e,r,n,i){return function(o,a,s,l){var c,u=0|o.shape[0],h=0|o.shape[1],d=o.data,f=0|o.offset,p=0|o.stride[0],m=0|o.stride[1],g=f,v=0|-p,b=0,y=0|-m,x=0,_=-p-m|0,w=0,k=0|p,A=m-p*u|0,M=0,T=0,S=0,C=2*u|0,E=n(C),L=n(C),z=0,O=0,D=-1,I=-1,F=0,R=0|-u,P=0|u,j=0,N=-u-1|0,B=u-1|0,U=0,G=0,V=0;for(M=0;M0){if(T=1,E[z++]=r(d[g],a,s,l),g+=k,u>0)for(M=1,c=d[g],O=E[z]=r(c,a,s,l),F=E[z+D],j=E[z+R],U=E[z+N],O===F&&O===j&&O===U||(b=d[g+v],x=d[g+y],w=d[g+_],t(M,T,c,b,x,w,O,F,j,U,a,s,l),G=L[z]=S++),z+=1,g+=k,M=2;M0)for(M=1,c=d[g],O=E[z]=r(c,a,s,l),F=E[z+D],j=E[z+R],U=E[z+N],O===F&&O===j&&O===U||(b=d[g+v],x=d[g+y],w=d[g+_],t(M,T,c,b,x,w,O,F,j,U,a,s,l),G=L[z]=S++,U!==j&&e(L[z+R],G,x,w,j,U,a,s,l)),z+=1,g+=k,M=2;M0){if(M=1,E[z++]=r(d[g],a,s,l),g+=k,h>0)for(T=1,c=d[g],O=E[z]=r(c,a,s,l),j=E[z+R],F=E[z+D],U=E[z+N],O===j&&O===F&&O===U||(b=d[g+v],x=d[g+y],w=d[g+_],t(M,T,c,b,x,w,O,j,F,U,a,s,l),G=L[z]=S++),z+=1,g+=k,T=2;T0)for(T=1,c=d[g],O=E[z]=r(c,a,s,l),j=E[z+R],F=E[z+D],U=E[z+N],O===j&&O===F&&O===U||(b=d[g+v],x=d[g+y],w=d[g+_],t(M,T,c,b,x,w,O,j,F,U,a,s,l),G=L[z]=S++,U!==j&&e(L[z+R],G,w,b,U,j,a,s,l)),z+=1,g+=k,T=2;T2&&o[1]>2&&n(i.pick(-1,-1).lo(1,1).hi(o[0]-2,o[1]-2),t.pick(-1,-1,0).lo(1,1).hi(o[0]-2,o[1]-2),t.pick(-1,-1,1).lo(1,1).hi(o[0]-2,o[1]-2)),o[1]>2&&(r(i.pick(0,-1).lo(1).hi(o[1]-2),t.pick(0,-1,1).lo(1).hi(o[1]-2)),e(t.pick(0,-1,0).lo(1).hi(o[1]-2))),o[1]>2&&(r(i.pick(o[0]-1,-1).lo(1).hi(o[1]-2),t.pick(o[0]-1,-1,1).lo(1).hi(o[1]-2)),e(t.pick(o[0]-1,-1,0).lo(1).hi(o[1]-2))),o[0]>2&&(r(i.pick(-1,0).lo(1).hi(o[0]-2),t.pick(-1,0,0).lo(1).hi(o[0]-2)),e(t.pick(-1,0,1).lo(1).hi(o[0]-2))),o[0]>2&&(r(i.pick(-1,o[1]-1).lo(1).hi(o[0]-2),t.pick(-1,o[1]-1,0).lo(1).hi(o[0]-2)),e(t.pick(-1,o[1]-1,1).lo(1).hi(o[0]-2))),t.set(0,0,0,0),t.set(0,0,1,0),t.set(o[0]-1,0,0,0),t.set(o[0]-1,0,1,0),t.set(0,o[1]-1,0,0),t.set(0,o[1]-1,1,0),t.set(o[0]-1,o[1]-1,0,0),t.set(o[0]-1,o[1]-1,1,0),t}}t.exports=function(t,e,r){return Array.isArray(r)||(r=n(e.dimension,"string"==typeof r?r:"clamp")),0===e.size?t:0===e.dimension?(t.set(0),t):function(t){var e=t.join();if(o=u[e])return o;for(var r=t.length,n=[h,d],i=1;i<=r;++i)n.push(f(i));var o=p.apply(void 0,n);return u[e]=o,o}(r)(t,e)}},4317:function(t){"use strict";function e(t,e){var r=Math.floor(e),n=e-r,i=0<=r&&r0;){y<64?(l=y,y=0):(l=64,y-=64);for(var x=0|t[1];x>0;){x<64?(c=x,x=0):(c=64,x-=64),n=v+y*h+x*d,a=b+y*p+x*m;var _=0,w=0,k=0,A=f,M=h-u*f,T=d-l*h,S=g,C=p-u*g,E=m-l*p;for(k=0;k0;){m<64?(l=m,m=0):(l=64,m-=64);for(var g=0|t[0];g>0;){g<64?(s=g,g=0):(s=64,g-=64),n=f+m*u+g*c,a=p+m*d+g*h;var v=0,b=0,y=u,x=c-l*u,_=d,w=h-l*d;for(b=0;b0;){b<64?(c=b,b=0):(c=64,b-=64);for(var y=0|t[0];y>0;){y<64?(s=y,y=0):(s=64,y-=64);for(var x=0|t[1];x>0;){x<64?(l=x,x=0):(l=64,x-=64),n=g+b*d+y*u+x*h,a=v+b*m+y*f+x*p;var _=0,w=0,k=0,A=d,M=u-c*d,T=h-s*u,S=m,C=f-c*m,E=p-s*f;for(k=0;kr;){v=0,b=m-a;e:for(g=0;gx)break e;b+=h,v+=d}for(v=m,b=m-a,g=0;g>1,H=V-B,W=V+B,q=U,Y=H,Z=V,X=W,$=G,J=i+1,K=o-1,Q=!0,tt=0,et=0,rt=0,nt=h,it=e(nt),ot=e(nt);M=l*q,T=l*Y,N=s;t:for(A=0;A0){g=q,q=Y,Y=g;break t}if(rt<0)break t;N+=f}M=l*X,T=l*$,N=s;t:for(A=0;A0){g=X,X=$,$=g;break t}if(rt<0)break t;N+=f}M=l*q,T=l*Z,N=s;t:for(A=0;A0){g=q,q=Z,Z=g;break t}if(rt<0)break t;N+=f}M=l*Y,T=l*Z,N=s;t:for(A=0;A0){g=Y,Y=Z,Z=g;break t}if(rt<0)break t;N+=f}M=l*q,T=l*X,N=s;t:for(A=0;A0){g=q,q=X,X=g;break t}if(rt<0)break t;N+=f}M=l*Z,T=l*X,N=s;t:for(A=0;A0){g=Z,Z=X,X=g;break t}if(rt<0)break t;N+=f}M=l*Y,T=l*$,N=s;t:for(A=0;A0){g=Y,Y=$,$=g;break t}if(rt<0)break t;N+=f}M=l*Y,T=l*Z,N=s;t:for(A=0;A0){g=Y,Y=Z,Z=g;break t}if(rt<0)break t;N+=f}M=l*X,T=l*$,N=s;t:for(A=0;A0){g=X,X=$,$=g;break t}if(rt<0)break t;N+=f}for(M=l*q,T=l*Y,S=l*Z,C=l*X,E=l*$,L=l*U,z=l*V,O=l*G,j=0,N=s,A=0;A0)){if(rt<0){for(M=l*x,T=l*J,S=l*K,N=s,A=0;A0)for(;;){for(_=s+K*l,j=0,A=0;A0)){for(_=s+K*l,j=0,A=0;AG){t:for(;;){for(_=s+J*l,j=0,N=s,A=0;A1&&n?s(r,n[0],n[1]):s(r)}(t,e,l);return n(l,c)}},446:function(t,e,r){"use strict";var n=r(7640),i={};t.exports=function(t){var e=t.order,r=t.dtype,o=[e,r].join(":"),a=i[o];return a||(i[o]=a=n(e,r)),a(t),t}},9618:function(t,e,r){var n=r(7163),i="undefined"!=typeof Float64Array;function o(t,e){return t[0]-e[0]}function a(){var t,e=this.stride,r=new Array(e.length);for(t=0;t=0&&(e+=o*(r=0|t),i-=r),new n(this.data,i,o,e)},i.step=function(t){var e=this.shape[0],r=this.stride[0],i=this.offset,o=0,a=Math.ceil;return"number"==typeof t&&((o=0|t)<0?(i+=r*(e-1),e=a(-e/o)):e=a(e/o),r*=o),new n(this.data,e,r,i)},i.transpose=function(t){t=void 0===t?0:0|t;var e=this.shape,r=this.stride;return new n(this.data,e[t],r[t],this.offset)},i.pick=function(t){var r=[],n=[],i=this.offset;return"number"==typeof t&&t>=0?i=i+this.stride[0]*t|0:(r.push(this.shape[0]),n.push(this.stride[0])),(0,e[r.length+1])(this.data,r,n,i)},function(t,e,r,i){return new n(t,e[0],r[0],i)}},2:function(t,e,r){function n(t,e,r,n,i,o){this.data=t,this.shape=[e,r],this.stride=[n,i],this.offset=0|o}var i=n.prototype;return i.dtype=t,i.dimension=2,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(i,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),i.set=function(e,r,n){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r,n):this.data[this.offset+this.stride[0]*e+this.stride[1]*r]=n},i.get=function(e,r){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r):this.data[this.offset+this.stride[0]*e+this.stride[1]*r]},i.index=function(t,e){return this.offset+this.stride[0]*t+this.stride[1]*e},i.hi=function(t,e){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,this.stride[0],this.stride[1],this.offset)},i.lo=function(t,e){var r=this.offset,i=0,o=this.shape[0],a=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"==typeof t&&t>=0&&(r+=s*(i=0|t),o-=i),"number"==typeof e&&e>=0&&(r+=l*(i=0|e),a-=i),new n(this.data,o,a,s,l,r)},i.step=function(t,e){var r=this.shape[0],i=this.shape[1],o=this.stride[0],a=this.stride[1],s=this.offset,l=0,c=Math.ceil;return"number"==typeof t&&((l=0|t)<0?(s+=o*(r-1),r=c(-r/l)):r=c(r/l),o*=l),"number"==typeof e&&((l=0|e)<0?(s+=a*(i-1),i=c(-i/l)):i=c(i/l),a*=l),new n(this.data,r,i,o,a,s)},i.transpose=function(t,e){t=void 0===t?0:0|t,e=void 0===e?1:0|e;var r=this.shape,i=this.stride;return new n(this.data,r[t],r[e],i[t],i[e],this.offset)},i.pick=function(t,r){var n=[],i=[],o=this.offset;return"number"==typeof t&&t>=0?o=o+this.stride[0]*t|0:(n.push(this.shape[0]),i.push(this.stride[0])),"number"==typeof r&&r>=0?o=o+this.stride[1]*r|0:(n.push(this.shape[1]),i.push(this.stride[1])),(0,e[n.length+1])(this.data,n,i,o)},function(t,e,r,i){return new n(t,e[0],e[1],r[0],r[1],i)}},3:function(t,e,r){function n(t,e,r,n,i,o,a,s){this.data=t,this.shape=[e,r,n],this.stride=[i,o,a],this.offset=0|s}var i=n.prototype;return i.dtype=t,i.dimension=3,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(i,"order",{get:function(){var t=Math.abs(this.stride[0]),e=Math.abs(this.stride[1]),r=Math.abs(this.stride[2]);return t>e?e>r?[2,1,0]:t>r?[1,2,0]:[1,0,2]:t>r?[2,0,1]:r>e?[0,1,2]:[0,2,1]}}),i.set=function(e,r,n,i){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n,i):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n]=i},i.get=function(e,r,n){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n]},i.index=function(t,e,r){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r},i.hi=function(t,e,r){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,this.stride[0],this.stride[1],this.stride[2],this.offset)},i.lo=function(t,e,r){var i=this.offset,o=0,a=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.stride[0],u=this.stride[1],h=this.stride[2];return"number"==typeof t&&t>=0&&(i+=c*(o=0|t),a-=o),"number"==typeof e&&e>=0&&(i+=u*(o=0|e),s-=o),"number"==typeof r&&r>=0&&(i+=h*(o=0|r),l-=o),new n(this.data,a,s,l,c,u,h,i)},i.step=function(t,e,r){var i=this.shape[0],o=this.shape[1],a=this.shape[2],s=this.stride[0],l=this.stride[1],c=this.stride[2],u=this.offset,h=0,d=Math.ceil;return"number"==typeof t&&((h=0|t)<0?(u+=s*(i-1),i=d(-i/h)):i=d(i/h),s*=h),"number"==typeof e&&((h=0|e)<0?(u+=l*(o-1),o=d(-o/h)):o=d(o/h),l*=h),"number"==typeof r&&((h=0|r)<0?(u+=c*(a-1),a=d(-a/h)):a=d(a/h),c*=h),new n(this.data,i,o,a,s,l,c,u)},i.transpose=function(t,e,r){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r;var i=this.shape,o=this.stride;return new n(this.data,i[t],i[e],i[r],o[t],o[e],o[r],this.offset)},i.pick=function(t,r,n){var i=[],o=[],a=this.offset;return"number"==typeof t&&t>=0?a=a+this.stride[0]*t|0:(i.push(this.shape[0]),o.push(this.stride[0])),"number"==typeof r&&r>=0?a=a+this.stride[1]*r|0:(i.push(this.shape[1]),o.push(this.stride[1])),"number"==typeof n&&n>=0?a=a+this.stride[2]*n|0:(i.push(this.shape[2]),o.push(this.stride[2])),(0,e[i.length+1])(this.data,i,o,a)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],r[0],r[1],r[2],i)}},4:function(t,e,r){function n(t,e,r,n,i,o,a,s,l,c){this.data=t,this.shape=[e,r,n,i],this.stride=[o,a,s,l],this.offset=0|c}var i=n.prototype;return i.dtype=t,i.dimension=4,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(e,r,n,i,o){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i,o):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]=o},i.get=function(e,r,n,i){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]},i.index=function(t,e,r,n){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r+this.stride[3]*n},i.hi=function(t,e,r,i){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},i.lo=function(t,e,r,i){var o=this.offset,a=0,s=this.shape[0],l=this.shape[1],c=this.shape[2],u=this.shape[3],h=this.stride[0],d=this.stride[1],f=this.stride[2],p=this.stride[3];return"number"==typeof t&&t>=0&&(o+=h*(a=0|t),s-=a),"number"==typeof e&&e>=0&&(o+=d*(a=0|e),l-=a),"number"==typeof r&&r>=0&&(o+=f*(a=0|r),c-=a),"number"==typeof i&&i>=0&&(o+=p*(a=0|i),u-=a),new n(this.data,s,l,c,u,h,d,f,p,o)},i.step=function(t,e,r,i){var o=this.shape[0],a=this.shape[1],s=this.shape[2],l=this.shape[3],c=this.stride[0],u=this.stride[1],h=this.stride[2],d=this.stride[3],f=this.offset,p=0,m=Math.ceil;return"number"==typeof t&&((p=0|t)<0?(f+=c*(o-1),o=m(-o/p)):o=m(o/p),c*=p),"number"==typeof e&&((p=0|e)<0?(f+=u*(a-1),a=m(-a/p)):a=m(a/p),u*=p),"number"==typeof r&&((p=0|r)<0?(f+=h*(s-1),s=m(-s/p)):s=m(s/p),h*=p),"number"==typeof i&&((p=0|i)<0?(f+=d*(l-1),l=m(-l/p)):l=m(l/p),d*=p),new n(this.data,o,a,s,l,c,u,h,d,f)},i.transpose=function(t,e,r,i){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r,i=void 0===i?3:0|i;var o=this.shape,a=this.stride;return new n(this.data,o[t],o[e],o[r],o[i],a[t],a[e],a[r],a[i],this.offset)},i.pick=function(t,r,n,i){var o=[],a=[],s=this.offset;return"number"==typeof t&&t>=0?s=s+this.stride[0]*t|0:(o.push(this.shape[0]),a.push(this.stride[0])),"number"==typeof r&&r>=0?s=s+this.stride[1]*r|0:(o.push(this.shape[1]),a.push(this.stride[1])),"number"==typeof n&&n>=0?s=s+this.stride[2]*n|0:(o.push(this.shape[2]),a.push(this.stride[2])),"number"==typeof i&&i>=0?s=s+this.stride[3]*i|0:(o.push(this.shape[3]),a.push(this.stride[3])),(0,e[o.length+1])(this.data,o,a,s)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],e[3],r[0],r[1],r[2],r[3],i)}},5:function(t,e,r){function n(t,e,r,n,i,o,a,s,l,c,u,h){this.data=t,this.shape=[e,r,n,i,o],this.stride=[a,s,l,c,u],this.offset=0|h}var i=n.prototype;return i.dtype=t,i.dimension=5,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(e,r,n,i,o,a){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o,a):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o]=a},i.get=function(e,r,n,i,o){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o]},i.index=function(t,e,r,n,i){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r+this.stride[3]*n+this.stride[4]*i},i.hi=function(t,e,r,i,o){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,"number"!=typeof o||o<0?this.shape[4]:0|o,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},i.lo=function(t,e,r,i,o){var a=this.offset,s=0,l=this.shape[0],c=this.shape[1],u=this.shape[2],h=this.shape[3],d=this.shape[4],f=this.stride[0],p=this.stride[1],m=this.stride[2],g=this.stride[3],v=this.stride[4];return"number"==typeof t&&t>=0&&(a+=f*(s=0|t),l-=s),"number"==typeof e&&e>=0&&(a+=p*(s=0|e),c-=s),"number"==typeof r&&r>=0&&(a+=m*(s=0|r),u-=s),"number"==typeof i&&i>=0&&(a+=g*(s=0|i),h-=s),"number"==typeof o&&o>=0&&(a+=v*(s=0|o),d-=s),new n(this.data,l,c,u,h,d,f,p,m,g,v,a)},i.step=function(t,e,r,i,o){var a=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.shape[3],u=this.shape[4],h=this.stride[0],d=this.stride[1],f=this.stride[2],p=this.stride[3],m=this.stride[4],g=this.offset,v=0,b=Math.ceil;return"number"==typeof t&&((v=0|t)<0?(g+=h*(a-1),a=b(-a/v)):a=b(a/v),h*=v),"number"==typeof e&&((v=0|e)<0?(g+=d*(s-1),s=b(-s/v)):s=b(s/v),d*=v),"number"==typeof r&&((v=0|r)<0?(g+=f*(l-1),l=b(-l/v)):l=b(l/v),f*=v),"number"==typeof i&&((v=0|i)<0?(g+=p*(c-1),c=b(-c/v)):c=b(c/v),p*=v),"number"==typeof o&&((v=0|o)<0?(g+=m*(u-1),u=b(-u/v)):u=b(u/v),m*=v),new n(this.data,a,s,l,c,u,h,d,f,p,m,g)},i.transpose=function(t,e,r,i,o){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r,i=void 0===i?3:0|i,o=void 0===o?4:0|o;var a=this.shape,s=this.stride;return new n(this.data,a[t],a[e],a[r],a[i],a[o],s[t],s[e],s[r],s[i],s[o],this.offset)},i.pick=function(t,r,n,i,o){var a=[],s=[],l=this.offset;return"number"==typeof t&&t>=0?l=l+this.stride[0]*t|0:(a.push(this.shape[0]),s.push(this.stride[0])),"number"==typeof r&&r>=0?l=l+this.stride[1]*r|0:(a.push(this.shape[1]),s.push(this.stride[1])),"number"==typeof n&&n>=0?l=l+this.stride[2]*n|0:(a.push(this.shape[2]),s.push(this.stride[2])),"number"==typeof i&&i>=0?l=l+this.stride[3]*i|0:(a.push(this.shape[3]),s.push(this.stride[3])),"number"==typeof o&&o>=0?l=l+this.stride[4]*o|0:(a.push(this.shape[4]),s.push(this.stride[4])),(0,e[a.length+1])(this.data,a,s,l)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],e[3],e[4],r[0],r[1],r[2],r[3],r[4],i)}}};function l(t,e){var r=-1===e?"T":String(e),n=s[r];return-1===e?n(t):0===e?n(t,c[t][0]):n(t,c[t],a)}var c={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};t.exports=function(t,e,r,o){if(void 0===t)return(0,c.array[0])([]);"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var a=e.length;if(void 0===r){r=new Array(a);for(var s=a-1,u=1;s>=0;--s)r[s]=u,u*=e[s]}if(void 0===o)for(o=0,s=0;s>>0;t.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e<0?-i:i;var r=n.hi(t),a=n.lo(t);return e>t==t>0?a===o?(r+=1,a=0):a+=1:0===a?(a=o,r-=1):a-=1,n.pack(a,r)}},8406:function(t,e){e.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),o=void 0===r?1e-6:r,a=0;ao){var x=i[c],_=1/Math.sqrt(g*b);for(y=0;y<3;++y){var w=(y+1)%3,k=(y+2)%3;x[y]+=_*(v[w]*m[k]-v[k]*m[w])}}}for(a=0;ao)for(_=1/Math.sqrt(A),y=0;y<3;++y)x[y]*=_;else for(y=0;y<3;++y)x[y]=0}return i},e.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),o=void 0===r?1e-6:r,a=0;ao?1/Math.sqrt(f):0,c=0;c<3;++c)d[c]*=f;i[a]=d}return i}},4081:function(t){"use strict";t.exports=function(t,e,r,n,i,o,a,s,l,c){var u=e+o+c;if(h>0){var h=Math.sqrt(u+1);t[0]=.5*(a-l)/h,t[1]=.5*(s-n)/h,t[2]=.5*(r-o)/h,t[3]=.5*h}else{var d=Math.max(e,o,c);h=Math.sqrt(2*d-u+1),e>=d?(t[0]=.5*h,t[1]=.5*(i+r)/h,t[2]=.5*(s+n)/h,t[3]=.5*(a-l)/h):o>=d?(t[0]=.5*(r+i)/h,t[1]=.5*h,t[2]=.5*(l+a)/h,t[3]=.5*(s-n)/h):(t[0]=.5*(n+s)/h,t[1]=.5*(a+l)/h,t[2]=.5*h,t[3]=.5*(r-i)/h)}return t}},9977:function(t,e,r){"use strict";t.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),u(r=[].slice.call(r,0,4),r);var i=new h(r,e,Math.log(n));return i.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&i.lookAt(0,t.eye,t.center,t.up),i};var n=r(9215),i=r(6582),o=r(7399),a=r(7608),s=r(4081);function l(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function c(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function u(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=c(r,n,i,o);a>1e-6?(t[0]=r/a,t[1]=n/a,t[2]=i/a,t[3]=o/a):(t[0]=t[1]=t[2]=0,t[3]=1)}function h(t,e,r){this.radius=n([r]),this.center=n(e),this.rotation=n(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var d=h.prototype;d.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},d.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;u(e,e);var r=this.computedMatrix;o(r,e);var n=this.computedCenter,i=this.computedEye,a=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],a[0]=r[1],a[1]=r[5],a[2]=r[9];for(var l=0;l<3;++l){for(var c=0,h=0;h<3;++h)c+=r[l+4*h]*i[h];r[12+l]=-c}},d.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r},d.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},d.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},d.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,o=i[1],a=i[5],s=i[9],c=l(o,a,s);o/=c,a/=c,s/=c;var u=i[0],h=i[4],d=i[8],f=u*o+h*a+d*s,p=l(u-=o*f,h-=a*f,d-=s*f);u/=p,h/=p,d/=p;var m=i[2],g=i[6],v=i[10],b=m*o+g*a+v*s,y=m*u+g*h+v*d,x=l(m-=b*o+y*u,g-=b*a+y*h,v-=b*s+y*d);m/=x,g/=x,v/=x;var _=u*e+o*r,w=h*e+a*r,k=d*e+s*r;this.center.move(t,_,w,k);var A=Math.exp(this.computedRadius[0]);A=Math.max(1e-4,A+n),this.radius.set(t,Math.log(A))},d.rotate=function(t,e,r,n){this.recalcMatrix(t),e=e||0,r=r||0;var i=this.computedMatrix,o=i[0],a=i[4],s=i[8],u=i[1],h=i[5],d=i[9],f=i[2],p=i[6],m=i[10],g=e*o+r*u,v=e*a+r*h,b=e*s+r*d,y=-(p*b-m*v),x=-(m*g-f*b),_=-(f*v-p*g),w=Math.sqrt(Math.max(0,1-Math.pow(y,2)-Math.pow(x,2)-Math.pow(_,2))),k=c(y,x,_,w);k>1e-6?(y/=k,x/=k,_/=k,w/=k):(y=x=_=0,w=1);var A=this.computedRotation,M=A[0],T=A[1],S=A[2],C=A[3],E=M*w+C*y+T*_-S*x,L=T*w+C*x+S*y-M*_,z=S*w+C*_+M*x-T*y,O=C*w-M*y-T*x-S*_;if(n){y=f,x=p,_=m;var D=Math.sin(n)/l(y,x,_);y*=D,x*=D,_*=D,O=O*(w=Math.cos(e))-(E=E*w+O*y+L*_-z*x)*y-(L=L*w+O*x+z*y-E*_)*x-(z=z*w+O*_+E*x-L*y)*_}var I=c(E,L,z,O);I>1e-6?(E/=I,L/=I,z/=I,O/=I):(E=L=z=0,O=1),this.rotation.set(t,E,L,z,O)},d.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var o=this.computedMatrix;i(o,e,r,n);var a=this.computedRotation;s(a,o[0],o[1],o[2],o[4],o[5],o[6],o[8],o[9],o[10]),u(a,a),this.rotation.set(t,a[0],a[1],a[2],a[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-e[c],2);this.radius.set(t,.5*Math.log(Math.max(l,1e-6))),this.center.set(t,r[0],r[1],r[2])},d.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},d.setMatrix=function(t,e){var r=this.computedRotation;s(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),u(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;a(n,e);var i=n[15];if(Math.abs(i)>1e-6){var o=n[12]/i,l=n[13]/i,c=n[14]/i;this.recalcMatrix(t);var h=Math.exp(this.computedRadius[0]);this.center.set(t,o-n[2]*h,l-n[6]*h,c-n[10]*h),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},d.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},d.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},d.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},d.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},d.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},1371:function(t,e,r){"use strict";var n=r(3233);t.exports=function(t,e,r){return n(r=void 0!==r?r+"":" ",e)+t}},3202:function(t){t.exports=function(t,e){e||(e=[0,""]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},3088:function(t,e,r){"use strict";t.exports=function(t,e){for(var r=0|e.length,i=t.length,o=[new Array(r),new Array(r)],a=0;a0){a=o[u][r][0],l=u;break}s=a[1^l];for(var h=0;h<2;++h)for(var d=o[h][r],f=0;f0&&(a=p,s=m,l=h)}return i||a&&c(a,l),s}function h(t,r){var i=o[r][t][0],a=[t];c(i,r);for(var s=i[1^r];;){for(;s!==t;)a.push(s),s=u(a[a.length-2],s,!1);if(o[0][t].length+o[1][t].length===0)break;var l=a[a.length-1],h=t,d=a[1],f=u(l,h,!0);if(n(e[l],e[h],e[d],e[f])<0)break;a.push(t),s=u(l,h)}return a}function d(t,e){return e[1]===e[e.length-1]}for(a=0;a0;){o[0][a].length;var m=h(a,f);d(0,m)?p.push.apply(p,m):(p.length>0&&l.push(p),p=m)}p.length>0&&l.push(p)}return l};var n=r(3140)},5609:function(t,e,r){"use strict";t.exports=function(t,e){for(var r=n(t,e.length),i=new Array(e.length),o=new Array(e.length),a=[],s=0;s0;){i[f=a.pop()]=!1;var c=r[f];for(s=0;s0}))).length,g=new Array(m),v=new Array(m);for(f=0;f0;){var j=R.pop(),N=C[j];l(N,(function(t,e){return t-e}));var B,U=N.length,G=P[j];for(0===G&&(B=[V=p[j]]),f=0;f=0||(P[H]=1^G,R.push(H),0===G&&(F(V=p[H])||(V.reverse(),B.push(V))))}0===G&&r.push(B)}return r};var n=r(3134),i=r(3088),o=r(5085),a=r(5250),s=r(8210),l=r(1682),c=r(5609);function u(t,e){for(var r=new Array(t),n=0;n0&&e[i]===r[0]))return 1;o=t[i-1]}for(var s=1;o;){var l=o.key,c=n(r,l[0],l[1]);if(l[0][0]0))return 0;s=-1,o=o.right}else if(c>0)o=o.left;else{if(!(c<0))return 0;s=1,o=o.right}}return s}}(v.slabs,v.coordinates);return 0===o.length?b:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(l(o),b)};var n=r(3250)[3],i=r(4209),o=r(3352),a=r(2478);function s(){return!0}function l(t){for(var e={},r=0;r=c?(A=1,b=c+2*d+p):b=d*(A=-d/c)+p):(A=0,f>=0?(M=0,b=p):-f>=h?(M=1,b=h+2*f+p):b=f*(M=-f/h)+p);else if(M<0)M=0,d>=0?(A=0,b=p):-d>=c?(A=1,b=c+2*d+p):b=d*(A=-d/c)+p;else{var T=1/k;b=(A*=T)*(c*A+u*(M*=T)+2*d)+M*(u*A+h*M+2*f)+p}else A<0?(x=h+f)>(y=u+d)?(_=x-y)>=(w=c-2*u+h)?(A=1,M=0,b=c+2*d+p):b=(A=_/w)*(c*A+u*(M=1-A)+2*d)+M*(u*A+h*M+2*f)+p:(A=0,x<=0?(M=1,b=h+2*f+p):f>=0?(M=0,b=p):b=f*(M=-f/h)+p):M<0?(x=c+d)>(y=u+f)?(_=x-y)>=(w=c-2*u+h)?(M=1,A=0,b=h+2*f+p):b=(A=1-(M=_/w))*(c*A+u*M+2*d)+M*(u*A+h*M+2*f)+p:(M=0,x<=0?(A=1,b=c+2*d+p):d>=0?(A=0,b=p):b=d*(A=-d/c)+p):(_=h+f-u-d)<=0?(A=0,M=1,b=h+2*f+p):_>=(w=c-2*u+h)?(A=1,M=0,b=c+2*d+p):b=(A=_/w)*(c*A+u*(M=1-A)+2*d)+M*(u*A+h*M+2*f)+p;var S=1-A-M;for(l=0;l0){var c=t[r-1];if(0===n(s,c)&&o(c)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},3233:function(t){"use strict";var e,r="";t.exports=function(t,n){if("string"!=typeof t)throw new TypeError("expected a string");if(1===n)return t;if(2===n)return t+t;var i=t.length*n;if(e!==t||void 0===e)e=t,r="";else if(r.length>=i)return r.substr(0,i);for(;i>r.length&&n>1;)1&n&&(r+=t),n>>=1,t+=t;return r=(r+=t).substr(0,i)}},3025:function(t,e,r){t.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(t){"use strict";t.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,i=e-2;i>=0;--i){var o=r;(l=(s=t[i])-((r=o+s)-o))&&(t[--n]=r,r=l)}var a=0;for(i=n;i0){if(o<=0)return a;n=i+o}else{if(!(i<0))return a;if(o>=0)return a;n=-(i+o)}var s=33306690738754716e-32*n;return a>=s||a<=-s?a:h(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],o=e[0]-n[0],a=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],c=r[1]-n[1],u=t[2]-n[2],h=e[2]-n[2],f=r[2]-n[2],p=o*c,m=a*l,g=a*s,v=i*c,b=i*l,y=o*s,x=u*(p-m)+h*(g-v)+f*(b-y),_=7771561172376103e-31*((Math.abs(p)+Math.abs(m))*Math.abs(u)+(Math.abs(g)+Math.abs(v))*Math.abs(h)+(Math.abs(b)+Math.abs(y))*Math.abs(f));return x>_||-x>_?x:d(t,e,r,n)}];function p(t){var e=f[t.length];return e||(e=f[t.length]=u(t.length)),e.apply(void 0,t)}function m(t,e,r,n,i,o,a){return function(e,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return n(e,r);case 3:return i(e,r,s);case 4:return o(e,r,s,l);case 5:return a(e,r,s,l,c)}for(var u=new Array(arguments.length),h=0;h0&&a>0||o<0&&a<0)return!1;var s=n(r,t,e),l=n(i,t,e);return!(s>0&&l>0||s<0&&l<0)&&(0!==o||0!==a||0!==s||0!==l||function(t,e,r,n){for(var i=0;i<2;++i){var o=t[i],a=e[i],s=Math.min(o,a),l=Math.max(o,a),c=r[i],u=n[i],h=Math.min(c,u);if(Math.max(c,u)=n?(i=h,(l+=1)=n?(i=h,(l+=1)>1,c=e[2*l+1];if(c===o)return l;o>1,c=e[2*l+1];if(c===o)return l;o>1,c=e[2*l+1];if(c===o)return l;o0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},2014:function(t,e,r){"use strict";var n=r(3105),i=r(4623);function o(t,e){var r=t.length,n=t.length-e.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return(s=t[0]+t[1]-e[0]-e[1])||i(t[0],t[1])-i(e[0],e[1]);case 3:var o=t[0]+t[1],a=e[0]+e[1];if(s=o+t[2]-(a+e[2]))return s;var s,l=i(t[0],t[1]),c=i(e[0],e[1]);return(s=i(l,t[2])-i(c,e[2]))||i(l+t[2],o)-i(c+e[2],a);default:var u=t.slice(0);u.sort();var h=e.slice(0);h.sort();for(var d=0;d>1,s=o(t[a],e);s<=0?(0===s&&(i=a),r=a+1):s>0&&(n=a-1)}return i}function u(t,e){for(var r=new Array(t.length),i=0,a=r.length;i=t.length||0!==o(t[g],s)););}return r}function h(t,e){if(e<0)return[];for(var r=[],i=(1<>>u&1&&c.push(i[u]);e.push(c)}return s(e)},e.skeleton=h,e.boundary=function(t){for(var e=[],r=0,n=t.length;r>1:(t>>1)-1}function y(t){for(var e=v(t);;){var r=e,n=2*t+1,i=2*(t+1),o=t;if(n0;){var r=b(t);if(!(r>=0&&e0){var t=A[0];return g(0,T-1),T-=1,y(0),t}return-1}function w(t,e){var r=A[t];return c[r]===e?t:(c[r]=-1/0,x(t),_(),c[r]=e,x((T+=1)-1))}function k(t){if(!u[t]){u[t]=!0;var e=s[t],r=l[t];s[r]>=0&&(s[r]=e),l[e]>=0&&(l[e]=r),M[e]>=0&&w(M[e],m(e)),M[r]>=0&&w(M[r],m(r))}}var A=[],M=new Array(o);for(h=0;h>1;h>=0;--h)y(h);for(;;){var S=_();if(S<0||c[S]>r)break;k(S)}var C=[];for(h=0;h=0&&r>=0&&e!==r){var n=M[e],i=M[r];n!==i&&L.push([n,i])}})),i.unique(i.normalize(L)),{positions:C,edges:L}};var n=r(3250),i=r(2014)},1303:function(t,e,r){"use strict";t.exports=function(t,e){var r,o,a,s;if(e[0][0]e[1][0]))return i(e,t);r=e[1],o=e[0]}if(t[0][0]t[1][0]))return-i(t,e);a=t[1],s=t[0]}var l=n(r,o,s),c=n(r,o,a);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=n(s,a,o),c=n(s,a,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return o[0]-s[0]};var n=r(3250);function i(t,e){var r,i,o,a;if(e[0][0]e[1][0])){var s=Math.min(t[0][1],t[1][1]),l=Math.max(t[0][1],t[1][1]),c=Math.min(e[0][1],e[1][1]),u=Math.max(e[0][1],e[1][1]);return lu?s-u:l-u}r=e[1],i=e[0]}t[0][1]0)if(e[0]!==a[1][0])r=t,t=t.right;else{if(l=c(t.right,e))return l;t=t.left}else{if(e[0]!==a[1][0])return t;var l;if(l=c(t.right,e))return l;t=t.left}}return r}function u(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function h(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}s.prototype.castUp=function(t){var e=n.le(this.coordinates,t[0]);if(e<0)return-1;this.slabs[e];var r=c(this.slabs[e],t),i=-1;if(r&&(i=r.value),this.coordinates[e]===t[0]){var s=null;if(r&&(s=r.key),e>0){var u=c(this.slabs[e-1],t);u&&(s?a(u.key,s)>0&&(s=u.key,i=u.value):(i=u.value,s=u.key))}var h=this.horizontal[e];if(h.length>0){var d=n.ge(h,t[1],l);if(d=h.length)return i;f=h[d]}}if(f.start)if(s){var p=o(s[0],s[1],[t[0],f.y]);s[0][0]>s[1][0]&&(p=-p),p>0&&(i=f.index)}else i=f.index;else f.y!==t[1]&&(i=f.index)}}}return i}},5202:function(t,e,r){"use strict";var n=r(1944),i=r(8210);function o(t,e){var r=i(n(t,e),[e[e.length-1]]);return r[r.length-1]}function a(t,e,r,n){var i=-e/(n-e);i<0?i=0:i>1&&(i=1);for(var o=1-i,a=t.length,s=new Array(a),l=0;l0||i>0&&u<0){var h=a(s,u,l,i);r.push(h),n.push(h.slice())}u<0?n.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=u}return{positive:r,negative:n}},t.exports.positive=function(t,e){for(var r=[],n=o(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(a(i,c,s,n)),c>=0&&r.push(s.slice()),n=c}return r},t.exports.negative=function(t,e){for(var r=[],n=o(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(a(i,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},3387:function(t,e,r){var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return function(t,e){var r,n,a,s,l,c,u,h,d,f=1,p=t.length,m="";for(n=0;n=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?m+=r:(!i.number.test(s.type)||h&&!s.sign?d="":(d=h?"+":"-",r=r.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(d+r).length,l=s.width&&u>0?c.repeat(u):"",m+=s.align?d+r+l:"0"===c?d+l+r:l+d+r)}return m}(function(t){if(s[t])return s[t];for(var e,r=t,n=[],o=0;r;){if(null!==(e=i.text.exec(r)))n.push(e[0]);else if(null!==(e=i.modulo.exec(r)))n.push("%");else{if(null===(e=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var a=[],l=e[2],c=[];if(null===(c=i.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=i.key_access.exec(l)))a.push(c[1]);else{if(null===(c=i.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}e[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}r=r.substring(e[0].length)}return s[t]=n}(t),arguments)}function a(t,e){return o.apply(null,[t].concat(e||[]))}var s=Object.create(null);e.sprintf=o,e.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(n=function(){return{sprintf:o,vsprintf:a}}.call(e,r,e,t))||(t.exports=n))}()},3711:function(t,e,r){"use strict";t.exports=function(t,e){if(t.dimension<=0)return{positions:[],cells:[]};if(1===t.dimension)return function(t,e){for(var r=i(t,e),n=r.length,o=new Array(n),a=new Array(n),s=0;sn|0},vertex:function(t,e,r,n,i,o,a,s,l,c,u,h,d){var f=(0|a)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==f&&15!==f)switch(f){case 0:case 15:u.push([t-.5,e-.5]);break;case 1:u.push([t-.25-.25*(n+r-2*d)/(r-n),e-.25-.25*(i+r-2*d)/(r-i)]);break;case 2:u.push([t-.75-.25*(-n-r+2*d)/(n-r),e-.25-.25*(o+n-2*d)/(n-o)]);break;case 3:u.push([t-.5,e-.5-.5*(i+r+o+n-4*d)/(r-i+n-o)]);break;case 4:u.push([t-.25-.25*(o+i-2*d)/(i-o),e-.75-.25*(-i-r+2*d)/(i-r)]);break;case 5:u.push([t-.5-.5*(n+r+o+i-4*d)/(r-n+i-o),e-.5]);break;case 6:u.push([t-.5-.25*(-n-r+o+i)/(n-r+i-o),e-.5-.25*(-i-r+o+n)/(i-r+n-o)]);break;case 7:u.push([t-.75-.25*(o+i-2*d)/(i-o),e-.75-.25*(o+n-2*d)/(n-o)]);break;case 8:u.push([t-.75-.25*(-o-i+2*d)/(o-i),e-.75-.25*(-o-n+2*d)/(o-n)]);break;case 9:u.push([t-.5-.25*(n+r+-o-i)/(r-n+o-i),e-.5-.25*(i+r+-o-n)/(r-i+o-n)]);break;case 10:u.push([t-.5-.5*(-n-r-o-i+4*d)/(n-r+o-i),e-.5]);break;case 11:u.push([t-.25-.25*(-o-i+2*d)/(o-i),e-.75-.25*(i+r-2*d)/(r-i)]);break;case 12:u.push([t-.5,e-.5-.5*(-i-r-o-n+4*d)/(i-r+o-n)]);break;case 13:u.push([t-.75-.25*(n+r-2*d)/(r-n),e-.25-.25*(-o-n+2*d)/(o-n)]);break;case 14:u.push([t-.25-.25*(-n-r+2*d)/(n-r),e-.25-.25*(-i-r+2*d)/(i-r)])}},cell:function(t,e,r,n,i,o,a,s,l){i?s.push([t,e]):s.push([e,t])}});return function(t,e){var r=[],i=[];return n(t,r,i,e),{positions:r,cells:i}}}},a={}},529:function(t,e,r){"use strict";t.exports=function t(e,r,n){var o=(n=n||{}).fontStyle||"normal",s=n.fontWeight||"normal",l=n.fontVariant||"normal",c=[o,s,l,e].join("_"),u=a[c];u||(u=a[c]={" ":{data:new Float32Array(0),shape:.2}});var h=u[r];if(!h)if(r.length<=1||!/\d/.test(r))h=u[r]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),i=0,o=0,a=0;a0&&(m+=.02);var v=new Float32Array(p),b=0,y=-.5*m;for(g=0;gMath.max(r,n)?i[2]=1:r>Math.max(e,n)?i[0]=1:i[1]=1;for(var o=0,a=0,l=0;l<3;++l)o+=t[l]*t[l],a+=i[l]*t[l];for(l=0;l<3;++l)i[l]-=a/o*t[l];return s(i,i),i}function d(t,e,r,i,o,a,s,l){this.center=n(r),this.up=n(i),this.right=n(o),this.radius=n([a]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var f=d.prototype;f.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},f.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},f.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,n=0,i=0,o=0;o<3;++o)i+=e[o]*r[o],n+=e[o]*e[o];var l=Math.sqrt(n),u=0;for(o=0;o<3;++o)r[o]-=e[o]*i/n,u+=r[o]*r[o],e[o]/=l;var h=Math.sqrt(u);for(o=0;o<3;++o)r[o]/=h;var d=this.computedToward;a(d,e,r),s(d,d);var f=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(p),v=Math.sin(p),b=Math.cos(m),y=Math.sin(m),x=this.computedCenter,_=g*b,w=v*b,k=y,A=-g*y,M=-v*y,T=b,S=this.computedEye,C=this.computedMatrix;for(o=0;o<3;++o){var E=_*r[o]+w*d[o]+k*e[o];C[4*o+1]=A*r[o]+M*d[o]+T*e[o],C[4*o+2]=E,C[4*o+3]=0}var L=C[1],z=C[5],O=C[9],D=C[2],I=C[6],F=C[10],R=z*F-O*I,P=O*D-L*F,j=L*I-z*D,N=c(R,P,j);for(R/=N,P/=N,j/=N,C[0]=R,C[4]=P,C[8]=j,o=0;o<3;++o)S[o]=x[o]+C[2+4*o]*f;for(o=0;o<3;++o){u=0;for(var B=0;B<3;++B)u+=C[o+4*B]*S[B];C[12+o]=-u}C[15]=1},f.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var p=[0,0,0];f.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;p[0]=i[2],p[1]=i[6],p[2]=i[10];for(var a=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)i[4*c]=a[c],i[4*c+1]=s[c],i[4*c+2]=l[c];for(o(i,i,n,p),c=0;c<3;++c)a[c]=i[4*c],s[c]=i[4*c+1];this.up.set(t,a[0],a[1],a[2]),this.right.set(t,s[0],s[1],s[2])}},f.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,o=(Math.exp(this.computedRadius[0]),i[1]),a=i[5],s=i[9],l=c(o,a,s);o/=l,a/=l,s/=l;var u=i[0],h=i[4],d=i[8],f=u*o+h*a+d*s,p=c(u-=o*f,h-=a*f,d-=s*f),m=(u/=p)*e+o*r,g=(h/=p)*e+a*r,v=(d/=p)*e+s*r;this.center.move(t,m,g,v);var b=Math.exp(this.computedRadius[0]);b=Math.max(1e-4,b+n),this.radius.set(t,Math.log(b))},f.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},f.setMatrix=function(t,e,r,n){var o=1;"number"==typeof r&&(o=0|r),(o<0||o>3)&&(o=1);var a=(o+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[o],l=e[o+4],h=e[o+8];if(n){var d=Math.abs(s),f=Math.abs(l),p=Math.abs(h),m=Math.max(d,f,p);d===m?(s=s<0?-1:1,l=h=0):p===m?(h=h<0?-1:1,s=l=0):(l=l<0?-1:1,s=h=0)}else{var g=c(s,l,h);s/=g,l/=g,h/=g}var v,b,y=e[a],x=e[a+4],_=e[a+8],w=y*s+x*l+_*h,k=c(y-=s*w,x-=l*w,_-=h*w),A=l*(_/=k)-h*(x/=k),M=h*(y/=k)-s*_,T=s*x-l*y,S=c(A,M,T);if(A/=S,M/=S,T/=S,this.center.jump(t,H,W,q),this.radius.idle(t),this.up.jump(t,s,l,h),this.right.jump(t,y,x,_),2===o){var C=e[1],E=e[5],L=e[9],z=C*y+E*x+L*_,O=C*A+E*M+L*T;v=R<0?-Math.PI/2:Math.PI/2,b=Math.atan2(O,z)}else{var D=e[2],I=e[6],F=e[10],R=D*s+I*l+F*h,P=D*y+I*x+F*_,j=D*A+I*M+F*T;v=Math.asin(u(R)),b=Math.atan2(j,P)}this.angle.jump(t,b,v),this.recalcMatrix(t);var N=e[2],B=e[6],U=e[10],G=this.computedMatrix;i(G,e);var V=G[15],H=G[12]/V,W=G[13]/V,q=G[14]/V,Y=Math.exp(this.computedRadius[0]);this.center.jump(t,H-N*Y,W-B*Y,q-U*Y)},f.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},f.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},f.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},f.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},f.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],o=n[1],a=n[2],s=c(i,o,a);if(!(s<1e-6)){i/=s,o/=s,a/=s;var l=e[0]-r[0],h=e[1]-r[1],d=e[2]-r[2],f=c(l,h,d);if(!(f<1e-6)){l/=f,h/=f,d/=f;var p=this.computedRight,m=p[0],g=p[1],v=p[2],b=i*m+o*g+a*v,y=c(m-=b*i,g-=b*o,v-=b*a);if(!(y<.01&&(y=c(m=o*d-a*h,g=a*l-i*d,v=i*h-o*l))<1e-6)){m/=y,g/=y,v/=y,this.up.set(t,i,o,a),this.right.set(t,m,g,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(f));var x=o*v-a*g,_=a*m-i*v,w=i*g-o*m,k=c(x,_,w),A=i*l+o*h+a*d,M=m*l+g*h+v*d,T=(x/=k)*l+(_/=k)*h+(w/=k)*d,S=Math.asin(u(A)),C=Math.atan2(T,M),E=this.angle._state,L=E[E.length-1],z=E[E.length-2];L%=2*Math.PI;var O=Math.abs(L+2*Math.PI-C),D=Math.abs(L-C),I=Math.abs(L-2*Math.PI-C);O0?r.pop():new ArrayBuffer(t)}function p(t){return new Uint8Array(f(t),0,t)}function m(t){return new Uint16Array(f(2*t),0,t)}function g(t){return new Uint32Array(f(4*t),0,t)}function v(t){return new Int8Array(f(t),0,t)}function b(t){return new Int16Array(f(2*t),0,t)}function y(t){return new Int32Array(f(4*t),0,t)}function x(t){return new Float32Array(f(4*t),0,t)}function _(t){return new Float64Array(f(8*t),0,t)}function w(t){return a?new Uint8ClampedArray(f(t),0,t):p(t)}function k(t){return s?new BigUint64Array(f(8*t),0,t):null}function A(t){return l?new BigInt64Array(f(8*t),0,t):null}function M(t){return new DataView(f(t),0,t)}function T(t){t=n.nextPow2(t);var e=n.log2(t),r=h[e];return r.length>0?r.pop():new o(t)}e.free=function(t){if(o.isBuffer(t))h[n.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|n.log2(e);u[r].push(t)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(t){d(t.buffer)},e.freeArrayBuffer=d,e.freeBuffer=function(t){h[n.log2(t.length)].push(t)},e.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return f(t);switch(e){case"uint8":return p(t);case"uint16":return m(t);case"uint32":return g(t);case"int8":return v(t);case"int16":return b(t);case"int32":return y(t);case"float":case"float32":return x(t);case"double":case"float64":return _(t);case"uint8_clamped":return w(t);case"bigint64":return A(t);case"biguint64":return k(t);case"buffer":return T(t);case"data":case"dataview":return M(t);default:return null}return null},e.mallocArrayBuffer=f,e.mallocUint8=p,e.mallocUint16=m,e.mallocUint32=g,e.mallocInt8=v,e.mallocInt16=b,e.mallocInt32=y,e.mallocFloat32=e.mallocFloat=x,e.mallocFloat64=e.mallocDouble=_,e.mallocUint8Clamped=w,e.mallocBigUint64=k,e.mallocBigInt64=A,e.mallocDataView=M,e.mallocBuffer=T,e.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,h[t].length=0}},1755:function(t){"use strict";function e(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e0&&(o=n.size),n.lineSpacing&&n.lineSpacing>0&&(a=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts)),r.font=[n.fontStyle,n.fontVariant,n.fontWeight,o+"px",n.font].filter((function(t){return t})).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",w(function(t,e,r,n,o,a){r=r.replace(/\n/g,""),r=!0===a.breaklines?r.replace(/\/g,"\n"):r.replace(/\/g," ");var s="",l=[];for(k=0;k-1?parseInt(t[1+i]):0,l=o>-1?parseInt(r[1+o]):0;s!==l&&(n=n.replace(P(),"?px "),T*=Math.pow(.75,l-s),n=n.replace("?px ",P())),M+=.25*E*(l-s)}if(!0===a.superscripts){var c=t.indexOf(p),h=r.indexOf(p),f=c>-1?parseInt(t[1+c]):0,m=h>-1?parseInt(r[1+h]):0;f!==m&&(n=n.replace(P(),"?px "),T*=Math.pow(.75,m-f),n=n.replace("?px ",P())),M-=.25*E*(m-f)}if(!0===a.bolds){var g=t.indexOf(u)>-1,b=r.indexOf(u)>-1;!g&&b&&(n=y?n.replace("italic ","italic bold "):"bold "+n),g&&!b&&(n=n.replace("bold ",""))}if(!0===a.italics){var y=t.indexOf(d)>-1,x=r.indexOf(d)>-1;!y&&x&&(n="italic "+n),y&&!x&&(n=n.replace("italic ",""))}e.font=n}for(w=0;w",o="",a=i.length,s=o.length,l=e[0]===p||e[0]===v,c=0,u=-s;c>-1&&-1!==(c=r.indexOf(i,c))&&-1!==(u=r.indexOf(o,c+a))&&!(u<=c);){for(var h=c;h=u)n[h]=null,r=r.substr(0,h)+" "+r.substr(h+1);else if(null!==n[h]){var d=n[h].indexOf(e[0]);-1===d?n[h]+=e:l&&(n[h]=n[h].substr(0,d+1)+(1+parseInt(n[h][d+1]))+n[h].substr(d+2))}var f=c+a,m=r.substr(f,u-f).indexOf(i);c=-1!==m?m:u+s}return n}function x(t,e){var r=n(t,128);return e?o(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function _(t,e,r,n){var i=x(t,n),o=function(t,e,r){for(var n=e.textAlign||"start",i=e.textBaseline||"alphabetic",o=[1<<30,1<<30],a=[0,0],s=t.length,l=0;l=0?e[o]:i}))},has___:{value:y((function(e){var n=b(e);return n?r in n:t.indexOf(e)>=0}))},set___:{value:y((function(n,i){var o,a=b(n);return a?a[r]=i:(o=t.indexOf(n))>=0?e[o]=i:(o=t.length,e[o]=i,t[o]=n),this}))},delete___:{value:y((function(n){var i,o,a=b(n);return a?r in a&&delete a[r]:!((i=t.indexOf(n))<0||(o=t.length-1,t[i]=void 0,e[i]=e[o],t[i]=t[o],t.length=o,e.length=o,0))}))}})};m.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof r?function(){function n(){this instanceof m||x();var t,n=new r,i=void 0,o=!1;return t=e?function(t,e){return n.set(t,e),n.has(t)||(i||(i=new m),i.set(t,e)),this}:function(t,e){if(o)try{n.set(t,e)}catch(r){i||(i=new m),i.set___(t,e)}else n.set(t,e);return this},Object.create(m.prototype,{get___:{value:y((function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)}))},has___:{value:y((function(t){return n.has(t)||!!i&&i.has___(t)}))},set___:{value:y(t)},delete___:{value:y((function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e}))},permitHostObjects___:{value:y((function(t){if(t!==g)throw new Error("bogus call to permitHostObjects___");o=!0}))}})}e&&"undefined"!=typeof Proxy&&(Proxy=void 0),n.prototype=m.prototype,t.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),t.exports=m)}function g(t){t.permitHostObjects___&&t.permitHostObjects___(g)}function v(t){return!(t.substr(0,8)==l&&"___"===t.substr(t.length-3))}function b(t){if(t!==Object(t))throw new TypeError("Not an object: "+t);var e=t[c];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return a(t,c,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function y(t){return t.prototype=null,Object.freeze(t)}function x(){f||"undefined"==typeof console||(f=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},236:function(t,e,r){var n=r(8284);t.exports=function(){var t={};return function(e){if(("object"!=typeof e||null===e)&&"function"!=typeof e)throw new Error("Weakmap-shim: Key must be object");var r=e.valueOf(t);return r&&r.identity===t?r:n(e,t)}}},8284:function(t){t.exports=function(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}},606:function(t,e,r){var n=r(236);t.exports=function(){var t=n();return{get:function(e,r){var n=t(e);return n.hasOwnProperty("value")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return"value"in t(e)},delete:function(e){return delete t(e).value}}}},3349:function(t){"use strict";t.exports=function(t){var e={};return function(r,n,i){var o=r.dtype,a=r.order,s=[o,a.join()].join(),l=e[s];return l||(e[s]=l=t([o,a])),l(r.shape.slice(0),r.data,r.stride,0|r.offset,n,i)}}(function(){return function(t,e,r,n,i,o){var a=t[0],s=r[0],l=[0],c=s;n|=0;var u=0,h=s;for(u=0;u=0!=f>=0&&i.push(l[0]+.5+.5*(d+f)/(d-f)),n+=h,++l[0]}}}.bind(void 0,{funcName:"zeroCrossings"}))},781:function(t,e,r){"use strict";t.exports=function(t,e){var r=[];return e=+e||0,n(t.hi(t.shape[0]-1),r,e),r};var n=r(3349)},7790:function(){}},r={};function i(t){var n=r[t];if(void 0!==n)return n.exports;var o=r[t]={id:t,loaded:!1,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t};var o=i(1964);t.exports=o}()},53824:t=>{t.exports=function(t,e,r,n){var i=t[0],o=t[1],a=!1;void 0===r&&(r=0),void 0===n&&(n=e.length);for(var s=n-r,l=0,c=s-1;lo!=f>o&&i<(d-u)*(o-h)/(f-h)+u&&(a=!a)}return a}},48439:(t,e,r)=>{var n,i=r(89528),o=r(45505),a=r(25645),s=r(31997),l=r(94638),c=r(52148),u=!1,h=o();function d(t,e,r){var i=n.segments(t),o=n.segments(e),a=r(n.combine(i,o));return n.polygon(a)}n={buildLog:function(t){return!0===t?u=i():!1===t&&(u=!1),!1!==u&&u.list},epsilon:function(t){return h.epsilon(t)},segments:function(t){var e=a(!0,h,u);return t.regions.forEach(e.addRegion),{segments:e.calculate(t.inverted),inverted:t.inverted}},combine:function(t,e){return{combined:a(!1,h,u).calculate(t.segments,t.inverted,e.segments,e.inverted),inverted1:t.inverted,inverted2:e.inverted}},selectUnion:function(t){return{segments:l.union(t.combined,u),inverted:t.inverted1||t.inverted2}},selectIntersect:function(t){return{segments:l.intersect(t.combined,u),inverted:t.inverted1&&t.inverted2}},selectDifference:function(t){return{segments:l.difference(t.combined,u),inverted:t.inverted1&&!t.inverted2}},selectDifferenceRev:function(t){return{segments:l.differenceRev(t.combined,u),inverted:!t.inverted1&&t.inverted2}},selectXor:function(t){return{segments:l.xor(t.combined,u),inverted:t.inverted1!==t.inverted2}},polygon:function(t){return{regions:s(t.segments,h,u),inverted:t.inverted}},polygonFromGeoJSON:function(t){return c.toPolygon(n,t)},polygonToGeoJSON:function(t){return c.fromPolygon(n,h,t)},union:function(t,e){return d(t,e,n.selectUnion)},intersect:function(t,e){return d(t,e,n.selectIntersect)},difference:function(t,e){return d(t,e,n.selectDifference)},differenceRev:function(t,e){return d(t,e,n.selectDifferenceRev)},xor:function(t,e){return d(t,e,n.selectXor)}},"object"==typeof window&&(window.PolyBool=n),t.exports=n},89528:t=>{t.exports=function(){var t,e=0,r=!1;function n(e,r){return t.list.push({type:e,data:r?JSON.parse(JSON.stringify(r)):void 0}),t}return t={list:[],segmentId:function(){return e++},checkIntersection:function(t,e){return n("check",{seg1:t,seg2:e})},segmentChop:function(t,e){return n("div_seg",{seg:t,pt:e}),n("chop",{seg:t,pt:e})},statusRemove:function(t){return n("pop_seg",{seg:t})},segmentUpdate:function(t){return n("seg_update",{seg:t})},segmentNew:function(t,e){return n("new_seg",{seg:t,primary:e})},segmentRemove:function(t){return n("rem_seg",{seg:t})},tempStatus:function(t,e,r){return n("temp_status",{seg:t,above:e,below:r})},rewind:function(t){return n("rewind",{seg:t})},status:function(t,e,r){return n("status",{seg:t,above:e,below:r})},vert:function(e){return e===r?t:(r=e,n("vert",{x:e}))},log:function(t){return"string"!=typeof t&&(t=JSON.stringify(t,!1," ")),n("log",{txt:t})},reset:function(){return n("reset")},selected:function(t){return n("selected",{segs:t})},chainStart:function(t){return n("chain_start",{seg:t})},chainRemoveHead:function(t,e){return n("chain_rem_head",{index:t,pt:e})},chainRemoveTail:function(t,e){return n("chain_rem_tail",{index:t,pt:e})},chainNew:function(t,e){return n("chain_new",{pt1:t,pt2:e})},chainMatch:function(t){return n("chain_match",{index:t})},chainClose:function(t){return n("chain_close",{index:t})},chainAddHead:function(t,e){return n("chain_add_head",{index:t,pt:e})},chainAddTail:function(t,e){return n("chain_add_tail",{index:t,pt:e})},chainConnect:function(t,e){return n("chain_con",{index1:t,index2:e})},chainReverse:function(t){return n("chain_rev",{index:t})},chainJoin:function(t,e){return n("chain_join",{index1:t,index2:e})},done:function(){return n("done")}}}},45505:t=>{t.exports=function(t){"number"!=typeof t&&(t=1e-10);var e={epsilon:function(e){return"number"==typeof e&&(t=e),t},pointAboveOrOnLine:function(e,r,n){var i=r[0],o=r[1],a=n[0],s=n[1],l=e[0];return(a-i)*(e[1]-o)-(s-o)*(l-i)>=-t},pointBetween:function(e,r,n){var i=e[1]-r[1],o=n[0]-r[0],a=e[0]-r[0],s=n[1]-r[1],l=a*o+i*s;return!(l-t)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])t!=a-i>t&&(o-c)*(i-u)/(a-u)+c-n>t&&(s=!s),o=c,a=u}return s}};return e}},52148:t=>{var e={toPolygon:function(t,e){function r(e){if(e.length<=0)return t.segments({inverted:!1,regions:[]});function r(e){var r=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[r]})}for(var n=r(e[0]),i=1;i{var n=r(68871);t.exports=function(t,e,r){function i(t,e,n){return{id:r?r.segmentId():-1,start:t,end:e,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var o=n.create();function a(t,r){o.insertBefore(t,(function(n){return i=t.isStart,o=t.pt,a=r,s=n.isStart,l=n.pt,c=n.other.pt,(0!==(u=e.pointsCompare(o,l))?u:e.pointsSame(a,c)?0:i!==s?i?1:-1:e.pointAboveOrOnLine(a,s?l:c,s?c:l)?1:-1)<0;var i,o,a,s,l,c,u}))}function s(t,e){var r=function(t,e){var r=n.node({isStart:!0,pt:t.start,seg:t,primary:e,other:null,status:null});return a(r,t.end),r}(t,e);return function(t,e,r){var i=n.node({isStart:!1,pt:e.end,seg:e,primary:r,other:t,status:null});t.other=i,a(i,t.pt)}(r,t,e),r}function l(t,e){var n=i(e,t.seg.end,t.seg);return function(t,e){r&&r.segmentChop(t.seg,e),t.other.remove(),t.seg.end=e,t.other.pt=e,a(t.other,t.pt)}(t,e),s(n,t.primary)}function c(i,a){var s=n.create();function c(t){return s.findTransition((function(r){var n,i,o,a,s,l;return n=t,i=r.ev,o=n.seg.start,a=n.seg.end,s=i.seg.start,l=i.seg.end,(e.pointsCollinear(o,s,l)?e.pointsCollinear(a,s,l)||e.pointAboveOrOnLine(a,s,l)?1:-1:e.pointAboveOrOnLine(o,s,l)?1:-1)>0}))}function u(t,n){var i=t.seg,o=n.seg,a=i.start,s=i.end,c=o.start,u=o.end;r&&r.checkIntersection(i,o);var h=e.linesIntersect(a,s,c,u);if(!1===h){if(!e.pointsCollinear(a,s,c))return!1;if(e.pointsSame(a,u)||e.pointsSame(s,c))return!1;var d=e.pointsSame(a,c),f=e.pointsSame(s,u);if(d&&f)return n;var p=!d&&e.pointBetween(a,c,u),m=!f&&e.pointBetween(s,c,u);if(d)return m?l(n,s):l(t,u),n;p&&(f||(m?l(n,s):l(t,u)),l(n,a))}else 0===h.alongA&&(-1===h.alongB?l(t,c):0===h.alongB?l(t,h.pt):1===h.alongB&&l(t,u)),0===h.alongB&&(-1===h.alongA?l(n,a):0===h.alongA?l(n,h.pt):1===h.alongA&&l(n,s));return!1}for(var h=[];!o.isEmpty();){var d=o.getHead();if(r&&r.vert(d.pt[0]),d.isStart){r&&r.segmentNew(d.seg,d.primary);var f=c(d),p=f.before?f.before.ev:null,m=f.after?f.after.ev:null;function g(){if(p){var t=u(d,p);if(t)return t}return!!m&&u(d,m)}r&&r.tempStatus(d.seg,!!p&&p.seg,!!m&&m.seg);var v,b,y=g();if(y)t?(b=null===d.seg.myFill.below||d.seg.myFill.above!==d.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above):y.seg.otherFill=d.seg.myFill,r&&r.segmentUpdate(y.seg),d.other.remove(),d.remove();if(o.getHead()!==d){r&&r.rewind(d.seg);continue}t?(b=null===d.seg.myFill.below||d.seg.myFill.above!==d.seg.myFill.below,d.seg.myFill.below=m?m.seg.myFill.above:i,d.seg.myFill.above=b?!d.seg.myFill.below:d.seg.myFill.below):null===d.seg.otherFill&&(v=m?d.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:d.primary?a:i,d.seg.otherFill={above:v,below:v}),r&&r.status(d.seg,!!p&&p.seg,!!m&&m.seg),d.other.status=f.insert(n.node({ev:d}))}else{var x=d.status;if(null===x)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(x.prev)&&s.exists(x.next)&&u(x.prev.ev,x.next.ev),r&&r.statusRemove(x.ev.seg),x.remove(),!d.primary){var _=d.seg.myFill;d.seg.myFill=d.seg.otherFill,d.seg.otherFill=_}h.push(d.seg)}o.getHead().remove()}return r&&r.done(),h}return t?{addRegion:function(t){for(var n,i,o,a=t[t.length-1],l=0;l{t.exports={create:function(){var t={root:{root:!0,next:null},exists:function(e){return null!==e&&e!==t.root},isEmpty:function(){return null===t.root.next},getHead:function(){return t.root.next},insertBefore:function(e,r){for(var n=t.root,i=t.root.next;null!==i;){if(r(i))return e.prev=i.prev,e.next=i,i.prev.next=e,void(i.prev=e);n=i,i=i.next}n.next=e,e.prev=n,e.next=null},findTransition:function(e){for(var r=t.root,n=t.root.next;null!==n&&!e(n);)r=n,n=n.next;return{before:r===t.root?null:r,after:n,insert:function(t){return t.prev=r,t.next=n,r.next=t,null!==n&&(n.prev=t),t}}}};return t},node:function(t){return t.prev=null,t.next=null,t.remove=function(){t.prev.next=t.next,t.next&&(t.next.prev=t.prev),t.prev=null,t.next=null},t}}},31997:t=>{t.exports=function(t,e,r){var n=[],i=[];return t.forEach((function(t){var o=t.start,a=t.end;if(e.pointsSame(o,a))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{r&&r.chainStart(t);for(var s={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},c=s,u=0;u{function e(t,e,r){var n=[];return t.forEach((function(t){var i=(t.myFill.above?8:0)+(t.myFill.below?4:0)+(t.otherFill&&t.otherFill.above?2:0)+(t.otherFill&&t.otherFill.below?1:0);0!==e[i]&&n.push({id:r?r.segmentId():-1,start:t.start,end:t.end,myFill:{above:1===e[i],below:2===e[i]},otherFill:null})})),r&&r.selected(n),n}var r={union:function(t,r){return e(t,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(t,r){return e(t,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(t,r){return e(t,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(t,r){return e(t,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(t,r){return e(t,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};t.exports=r},97905:t=>{"use strict";t.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},39807:t=>{var e,r,n=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var s,l=[],c=!1,u=-1;function h(){c&&s&&(c=!1,s.length?l=s.concat(l):u=-1,l.length&&d())}function d(){if(!c){var t=a(h);c=!0;for(var e=l.length;e;){for(s=l,l=[];++u1)for(var r=1;r{"use strict";var n=r(25359),i=r(34463),o=r(6313),a=r(9994),s=r(34597),l=r(97e3),c=r(91101),u=c.float32,h=c.fract32;t.exports=function(t,e){if("function"==typeof t?(e||(e={}),e.regl=t):e=t,e.length&&(e.positions=e),!(t=e.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var r,c,f,p,m,g,v=t._gl,b={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},y=[];return p=t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),c=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),f=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),m=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=t.buffer({usage:"static",type:"float",data:d}),k(e),r=t({vert:"\n\t\tprecision highp float;\n\n\t\tattribute vec2 position, positionFract;\n\t\tattribute vec4 error;\n\t\tattribute vec4 color;\n\n\t\tattribute vec2 direction, lineOffset, capOffset;\n\n\t\tuniform vec4 viewport;\n\t\tuniform float lineWidth, capSize;\n\t\tuniform vec2 scale, scaleFract, translate, translateFract;\n\n\t\tvarying vec4 fragColor;\n\n\t\tvoid main() {\n\t\t\tfragColor = color / 255.;\n\n\t\t\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\n\n\t\t\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\n\n\t\t\tvec2 position = position + dxy;\n\n\t\t\tvec2 pos = (position + translate) * scale\n\t\t\t\t+ (positionFract + translateFract) * scale\n\t\t\t\t+ (position + translate) * scaleFract\n\t\t\t\t+ (positionFract + translateFract) * scaleFract;\n\n\t\t\tpos += pixelOffset / viewport.zw;\n\n\t\t\tgl_Position = vec4(pos * 2. - 1., 0, 1);\n\t\t}\n\t\t",frag:"\n\t\tprecision highp float;\n\n\t\tvarying vec4 fragColor;\n\n\t\tuniform float opacity;\n\n\t\tvoid main() {\n\t\t\tgl_FragColor = fragColor;\n\t\t\tgl_FragColor.a *= opacity;\n\t\t}\n\t\t",uniforms:{range:t.prop("range"),lineWidth:t.prop("lineWidth"),capSize:t.prop("capSize"),opacity:t.prop("opacity"),scale:t.prop("scale"),translate:t.prop("translate"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{color:{buffer:p,offset:function(t,e){return 4*e.offset},divisor:1},position:{buffer:c,offset:function(t,e){return 8*e.offset},divisor:1},positionFract:{buffer:f,offset:function(t,e){return 8*e.offset},divisor:1},error:{buffer:m,offset:function(t,e){return 16*e.offset},divisor:1},direction:{buffer:g,stride:24,offset:0},lineOffset:{buffer:g,stride:24,offset:8},capOffset:{buffer:g,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:t.prop("viewport")},viewport:t.prop("viewport"),stencil:!1,instances:t.prop("count"),count:d.length}),s(x,{update:k,draw:_,destroy:A,regl:t,gl:v,canvas:v.canvas,groups:y}),x;function x(t){t?k(t):null===t&&A(),_()}function _(e){if("number"==typeof e)return w(e);e&&!Array.isArray(e)&&(e=[e]),t._refresh(),y.forEach((function(t,r){t&&(e&&(e[r]?t.draw=!0:t.draw=!1),t.draw?w(r):t.draw=!0)}))}function w(t){"number"==typeof t&&(t=y[t]),null!=t&&t&&t.count&&t.color&&t.opacity&&t.positions&&t.positions.length>1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function k(t){if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(x.groups=y=t.map((function(t,c){var u=y[c];return t?("function"==typeof t?t={after:t}:"number"==typeof t[0]&&(t={positions:t}),t=a(t,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),u||(y[c]=u={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},b,t)),o(u,t,[{lineWidth:function(t){return.5*+t},capSize:function(t){return.5*+t},opacity:parseFloat,errors:function(t){return t=l(t),r+=t.length,t},positions:function(t,r){return t=l(t,"float64"),r.count=Math.floor(t.length/2),r.bounds=n(t,2),r.offset=e,e+=r.count,t}},{color:function(t,e){var r=e.count;if(t||(t="transparent"),!Array.isArray(t)||"number"==typeof t[0]){var n=t;t=Array(r);for(var o=0;o{"use strict";var n=r(34463),i=r(25359),o=r(34597),a=r(9994),s=r(97e3),l=r(31587),c=r(2433),u=r(91101),h=u.float32,d=u.fract32,f=r(41456),p=r(94698),m=r(72268);function g(t,e){if(!(this instanceof g))return new g(t,e);if("function"==typeof t?(e||(e={}),e.regl=t):e=t,e.length&&(e.positions=e),!(t=e.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=t._gl,this.regl=t,this.passes=[],this.shaders=g.shaders.has(t)?g.shaders.get(t):g.shaders.set(t,g.createShaders(t)).get(t),this.update(e)}t.exports=g,g.dashMult=2,g.maxPatternLength=256,g.precisionThreshold=3e6,g.maxPoints=1e4,g.maxLines=2048,g.shaders=new f,g.createShaders=function(t){var e,r=t.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),n={primitive:"triangle strip",instances:t.prop("count"),count:4,offset:0,uniforms:{miterMode:function(t,e){return"round"===e.join?2:1},miterLimit:t.prop("miterLimit"),scale:t.prop("scale"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),translate:t.prop("translate"),thickness:t.prop("thickness"),dashTexture:t.prop("dashTexture"),opacity:t.prop("opacity"),pixelRatio:t.context("pixelRatio"),id:t.prop("id"),dashLength:t.prop("dashLength"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]},depth:t.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:function(t,e){return!e.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:t.prop("viewport")},viewport:t.prop("viewport")},i=t(o({vert:"\nprecision highp float;\n\nattribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;\nattribute vec4 color;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {\n\t// the order is important\n\treturn position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n}\n\nvoid main() {\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineOffset = lineTop * 2. - 1.;\n\n\tvec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);\n\ttangent = normalize(diff * scale * viewport.zw);\n\tvec2 normal = vec2(-tangent.y, tangent.x);\n\n\tvec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart\n\t\t+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd\n\n\t\t+ thickness * normal * .5 * lineOffset / viewport.zw;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n}\n",frag:"\nprecision highp float;\n\nuniform float dashLength, pixelRatio, thickness, opacity, id;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvoid main() {\n\tfloat alpha = 1.;\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n",attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},n));try{e=t(o({cull:{enable:!0,face:"back"},vert:"\nprecision highp float;\n\nattribute vec2 aCoord, bCoord, nextCoord, prevCoord;\nattribute vec4 aColor, bColor;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, translate;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\nuniform float miterLimit, miterMode;\n\nvarying vec4 fragColor;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 tangent;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nconst float REVERSE_THRESHOLD = -.875;\nconst float MIN_DIFF = 1e-6;\n\n// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead\n// TODO: precalculate dot products, normalize things beforehead etc.\n// TODO: refactor to rectangular algorithm\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nbool isNaN( float val ){\n return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n}\n\nvoid main() {\n\tvec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;\n\n vec2 adjustedScale;\n adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;\n adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;\n\n vec2 scaleRatio = adjustedScale * viewport.zw;\n\tvec2 normalWidth = thickness / scaleRatio;\n\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineBot = 1. - lineTop;\n\n\tfragColor = (lineStart * aColor + lineEnd * bColor) / 255.;\n\n\tif (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;\n\n\tif (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);\n\tif (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);\n\n\n\tvec2 prevDiff = aCoord - prevCoord;\n\tvec2 currDiff = bCoord - aCoord;\n\tvec2 nextDiff = nextCoord - bCoord;\n\n\tvec2 prevTangent = normalize(prevDiff * scaleRatio);\n\tvec2 currTangent = normalize(currDiff * scaleRatio);\n\tvec2 nextTangent = normalize(nextDiff * scaleRatio);\n\n\tvec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);\n\tvec2 currNormal = vec2(-currTangent.y, currTangent.x);\n\tvec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);\n\n\tvec2 startJoinDirection = normalize(prevTangent - currTangent);\n\tvec2 endJoinDirection = normalize(currTangent - nextTangent);\n\n\t// collapsed/unidirectional segment cases\n\t// FIXME: there should be more elegant solution\n\tvec2 prevTanDiff = abs(prevTangent - currTangent);\n\tvec2 nextTanDiff = abs(nextTangent - currTangent);\n\tif (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {\n\t\tstartJoinDirection = currNormal;\n\t}\n\tif (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {\n\t\tendJoinDirection = currNormal;\n\t}\n\tif (aCoord == bCoord) {\n\t\tendJoinDirection = startJoinDirection;\n\t\tcurrNormal = prevNormal;\n\t\tcurrTangent = prevTangent;\n\t}\n\n\ttangent = currTangent;\n\n\t//calculate join shifts relative to normals\n\tfloat startJoinShift = dot(currNormal, startJoinDirection);\n\tfloat endJoinShift = dot(currNormal, endJoinDirection);\n\n\tfloat startMiterRatio = abs(1. / startJoinShift);\n\tfloat endMiterRatio = abs(1. / endJoinShift);\n\n\tvec2 startJoin = startJoinDirection * startMiterRatio;\n\tvec2 endJoin = endJoinDirection * endMiterRatio;\n\n\tvec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;\n\tstartTopJoin = sign(startJoinShift) * startJoin * .5;\n\tstartBotJoin = -startTopJoin;\n\n\tendTopJoin = sign(endJoinShift) * endJoin * .5;\n\tendBotJoin = -endTopJoin;\n\n\tvec2 aTopCoord = aCoord + normalWidth * startTopJoin;\n\tvec2 bTopCoord = bCoord + normalWidth * endTopJoin;\n\tvec2 aBotCoord = aCoord + normalWidth * startBotJoin;\n\tvec2 bBotCoord = bCoord + normalWidth * endBotJoin;\n\n\t//miter anti-clipping\n\tfloat baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));\n\tfloat abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));\n\n\t//prevent close to reverse direction switch\n\tbool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) < length(normalWidth * currNormal);\n\tbool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) < length(normalWidth * currNormal);\n\n\tif (prevReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);\n\t\taBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\taTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n",frag:"\nprecision highp float;\n\nuniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n",attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch(t){e=i}return{fill:t({primitive:"triangle",elements:function(t,e){return e.triangles},offset:0,vert:"\nprecision highp float;\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n",frag:"\nprecision highp float;\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n",uniforms:{scale:t.prop("scale"),color:t.prop("fill"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),translate:t.prop("translate"),opacity:t.prop("opacity"),pixelRatio:t.context("pixelRatio"),id:t.prop("id"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{position:{buffer:t.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:i,miter:e}},g.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},g.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];e.length&&(t=this).update.apply(t,e),this.draw()},g.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length?e:this.passes).forEach((function(e,r){var n;if(e&&Array.isArray(e))return(n=t).draw.apply(n,e);"number"==typeof e&&(e=t.passes[e]),e&&e.count>1&&e.opacity&&(t.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&t.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>g.precisionThreshold||e.scale[1]*e.viewport.height>g.precisionThreshold||"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=g.maxPoints)?t.shaders.rect(e):t.shaders.miter(e)))})),this},g.prototype.update=function(t){var e=this;if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var r=this.regl,u=this.gl;if(t.forEach((function(t,f){var v=e.passes[f];if(void 0!==t)if(null!==t){if("number"==typeof t[0]&&(t={positions:t}),t=a(t,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),v||(e.passes[f]=v={id:f,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:r.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},t=o({},g.defaults,t)),null!=t.thickness&&(v.thickness=parseFloat(t.thickness)),null!=t.opacity&&(v.opacity=parseFloat(t.opacity)),null!=t.miterLimit&&(v.miterLimit=parseFloat(t.miterLimit)),null!=t.overlay&&(v.overlay=!!t.overlay,f=F}));(O=O.slice(0,R)).push(F)}for(var P=function(t){var e=A.slice(2*I,2*O[t]).concat(F?A.slice(2*F):[]),r=(v.hole||[]).map((function(e){return e-F+(O[t]-I)})),n=l(e,r);n=n.map((function(e){return e+I+(e+I{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r 1.0 + delta) {\n\t\tdiscard;\n\t}\n\n\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n\tfloat borderRadius = fragBorderRadius;\n\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n\tcolor.a *= alpha * opacity;\n\tgl_FragColor = color;\n}\n"]),l.vert=h(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\n// `invariant` effectively turns off optimizations for the position.\n// We need this because -fast-math on M1 Macs is re-ordering\n// floating point operations in a way that causes floating point\n// precision limits to put points in the wrong locations.\ninvariant gl_Position;\n\nuniform bool constPointSize;\nuniform float pixelRatio;\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\nuniform sampler2D paletteTexture;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(paletteTexture,\n vec2(\n (id.x + .5) / paletteSize.x,\n (id.y + .5) / paletteSize.y\n )\n );\n}\n\nvoid main() {\n // ignore inactive points\n if (isActive == 0.) return;\n\n vec2 position = vec2(x, y);\n vec2 positionFract = vec2(xFract, yFract);\n\n vec4 color = getColor(colorId);\n vec4 borderColor = getColor(borderColorId);\n\n float size = size * maxSize / 255.;\n float borderSize = borderSize * maxSize / 255.;\n\n gl_PointSize = (size + borderSize) * pointSizeScale;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0., 1.);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),m&&(l.frag=l.frag.replace("smoothstep","smoothStep"),s.frag=s.frag.replace("smoothstep","smoothStep")),this.drawCircle=t(l)}y.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},y.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},y.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;nn)?e.tree=c(t,{bounds:h}):n&&n.length&&(e.tree=n),e.tree){var d={primitive:"points",usage:"static",data:e.tree,type:"uint32"};e.elements?e.elements(d):e.elements=a.elements(d)}var f=g.float32(t);return i({data:f,usage:"dynamic"}),o({data:g.fract32(t,f),usage:"dynamic"}),l({data:new Uint8Array(u),type:"uint8",usage:"stream"}),t}},{marker:function(e,r,n){var i=r.activation;if(i.forEach((function(t){return t&&t.destroy&&t.destroy()})),i.length=0,e&&"number"!=typeof e[0]){for(var o=[],s=0,l=Math.min(e.length,r.count);s=0)return o;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)e=t;else{e=new Uint8Array(t.length);for(var a=0,s=t.length;a4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},y.prototype.updatePalette=function(t){if(!this.tooManyColors){var e=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*t.length/e);if(n>1)for(var i=.25*(t=t.slice()).length%e;i>>=e))<<3,(e|=r=(15<(t>>>=r))<<2)|(r=(3<(t>>>=r))<<1)|t>>>r>>1}function l(){function t(t){t:{for(var e=16;268435456>=e;e*=16)if(t<=e){t=e;break t}t=0}return 0<(e=r[s(t)>>2]).length?e.pop():new ArrayBuffer(t)}function e(t){r[s(t.byteLength)>>2].push(t)}var r=a(8,(function(){return[]}));return{alloc:t,free:e,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(t){e(t.buffer)}}}function c(t){return!!t&&"object"==typeof t&&Array.isArray(t.shape)&&Array.isArray(t.stride)&&"number"==typeof t.offset&&t.shape.length===t.stride.length&&(Array.isArray(t.data)||K(t.data))}function u(t,e,r,n,i,o){for(var a=0;a(i=s)&&(i=n.buffer.byteLength,5123===h?i>>=1:5125===h&&(i>>=2)),n.vertCount=i,i=a,0>a&&(i=4,1===(a=n.buffer.dimension)&&(i=0),2===a&&(i=1),3===a&&(i=4)),n.primType=i}function a(t){n.elementsCount--,delete s[t.id],t.buffer.destroy(),t.buffer=null}var s={},l=0,u={uint8:5121,uint16:5123};e.oes_element_index_uint&&(u.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var h=[];return{create:function(t,e){function s(t){if(t)if("number"==typeof t)l(t),h.primType=4,h.vertCount=0|t,h.type=5121;else{var e=null,r=35044,n=-1,i=-1,a=0,d=0;Array.isArray(t)||K(t)||c(t)?e=t:("data"in t&&(e=t.data),"usage"in t&&(r=nt[t.usage]),"primitive"in t&&(n=st[t.primitive]),"count"in t&&(i=0|t.count),"type"in t&&(d=u[t.type]),"length"in t?a=0|t.length:(a=i,5123===d||5122===d?a*=2:5125!==d&&5124!==d||(a*=4))),o(h,e,r,n,i,a,d)}else l(),h.primType=4,h.vertCount=0,h.type=5121;return s}var l=r.create(null,34963,!0),h=new i(l._buffer);return n.elementsCount++,s(t),s._reglType="elements",s._elements=h,s.subdata=function(t,e){return l.subdata(t,e),s},s.destroy=function(){a(h)},s},createStream:function(t){var e=h.pop();return e||(e=new i(r.create(null,34963,!0,!1)._buffer)),o(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){h.push(t)},getElements:function(t){return"function"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){Q(s).forEach(a)}}}function v(t){for(var e=$.allocType(5123,t.length),r=0;r>>31<<15,i=(o<<1>>>24)-127,o=o>>13&1023;e[r]=-24>i?n:-14>i?n+(o+1024>>-14-i):15>=i,r.height>>=i,f(r,n[i]),t.mipmask|=1<e;++e)t.images[e]=null;return t}function L(t){for(var e=t.images,r=0;re){for(var r=0;r=--this.refCount&&P(this)}}),a.profile&&(o.getTotalTextureSize=function(){var t=0;return Object.keys(ct).forEach((function(e){t+=ct[e].stats.size})),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;z.call(r);var o=E();return"number"==typeof t?T(o,0|t,"number"==typeof e?0|e:0|t):t?(O(r,t),S(o,t)):T(o,1,1),r.genMipmaps&&(o.mipmask=(o.width<<1)-1),i.mipmask=o.mipmask,l(i,o),i.internalformat=o.internalformat,n.width=o.width,n.height=o.height,F(i),C(o,3553),D(r,3553),R(),L(o),a.profile&&(i.stats.size=M(i.internalformat,i.type,o.width,o.height,r.genMipmaps,!1)),n.format=X[i.internalformat],n.type=J[i.type],n.mag=rt[r.magFilter],n.min=nt[r.minFilter],n.wrapS=it[r.wrapS],n.wrapT=it[r.wrapT],n}var i=new I(3553);return ct[i.id]=i,o.textureCount++,n(e,r),n.subimage=function(t,e,r,o){e|=0,r|=0,o|=0;var a=m();return l(a,i),a.width=0,a.height=0,f(a,t),a.width=a.width||(i.width>>o)-e,a.height=a.height||(i.height>>o)-r,F(i),p(a,3553,e,r,o),R(),g(a),n},n.resize=function(e,r){var o=0|e,s=0|r||o;if(o===i.width&&s===i.height)return n;n.width=i.width=o,n.height=i.height=s,F(i);for(var l=0;i.mipmask>>l;++l){var c=o>>l,u=s>>l;if(!c||!u)break;t.texImage2D(3553,l,i.format,c,u,0,i.format,i.type,null)}return R(),a.profile&&(i.stats.size=M(i.internalformat,i.type,o,s,!1,!1)),n},n._reglType="texture2d",n._texture=i,a.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,n,i,s,c){function h(t,e,r,n,i,o){var s,c=d.texInfo;for(z.call(c),s=0;6>s;++s)v[s]=E();if("number"!=typeof t&&t){if("object"==typeof t)if(e)S(v[0],t),S(v[1],e),S(v[2],r),S(v[3],n),S(v[4],i),S(v[5],o);else if(O(c,t),u(d,t),"faces"in t)for(t=t.faces,s=0;6>s;++s)l(v[s],d),S(v[s],t[s]);else for(s=0;6>s;++s)S(v[s],t)}else for(t=0|t||1,s=0;6>s;++s)T(v[s],t,t);for(l(d,v[0]),d.mipmask=c.genMipmaps?(v[0].width<<1)-1:v[0].mipmask,d.internalformat=v[0].internalformat,h.width=v[0].width,h.height=v[0].height,F(d),s=0;6>s;++s)C(v[s],34069+s);for(D(c,34067),R(),a.profile&&(d.stats.size=M(d.internalformat,d.type,h.width,h.height,c.genMipmaps,!0)),h.format=X[d.internalformat],h.type=J[d.type],h.mag=rt[c.magFilter],h.min=nt[c.minFilter],h.wrapS=it[c.wrapS],h.wrapT=it[c.wrapT],s=0;6>s;++s)L(v[s]);return h}var d=new I(34067);ct[d.id]=d,o.cubeCount++;var v=Array(6);return h(e,r,n,i,s,c),h.subimage=function(t,e,r,n,i){r|=0,n|=0,i|=0;var o=m();return l(o,d),o.width=0,o.height=0,f(o,e),o.width=o.width||(d.width>>i)-r,o.height=o.height||(d.height>>i)-n,F(d),p(o,34069+t,r,n,i),R(),g(o),h},h.resize=function(e){if((e|=0)!==d.width){h.width=d.width=e,h.height=d.height=e,F(d);for(var r=0;6>r;++r)for(var n=0;d.mipmask>>n;++n)t.texImage2D(34069+r,n,d.format,e>>n,e>>n,0,d.format,d.type,null);return R(),a.profile&&(d.stats.size=M(d.internalformat,d.type,h.width,h.height,!1,!0)),h}},h._reglType="textureCube",h._texture=d,a.profile&&(h.stats=d.stats),h.destroy=function(){d.decRef()},h},clear:function(){for(var e=0;er;++r)if(e.mipmask&1<>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;6>n;++n)t.texImage2D(34069+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);D(e.texInfo,e.target)}))},refresh:function(){for(var e=0;ei;++i){for(c=0;ct;++t)r[t].resize(n);return e.width=e.height=n,e},_reglType:"framebufferCube",destroy:function(){r.forEach((function(t){t.destroy()}))}})},clear:function(){Q(A).forEach(g)},restore:function(){y.cur=null,y.next=null,y.dirty=!0,Q(A).forEach((function(e){e.framebuffer=t.createFramebuffer(),v(e)}))}})}function C(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function E(t,e,r,n,i,o,a){function s(){this.id=++h,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var t=e.oes_vertex_array_object;this.vao=t?t.createVertexArrayOES():null,d[this.id]=this,this.buffers=[]}var l=r.maxAttributes,u=Array(l);for(r=0;r=d.byteLength?l.subdata(d):(l.destroy(),r.buffers[s]=null)),r.buffers[s]||(l=r.buffers[s]=i.create(u,34962,!1,!0)),h.buffer=i.getBuffer(l),h.size=0|h.buffer.dimension,h.normalized=!1,h.type=h.buffer.dtype,h.offset=0,h.stride=0,h.divisor=0,h.state=1,t[s]=1):i.getBuffer(u)?(h.buffer=i.getBuffer(u),h.size=0|h.buffer.dimension,h.normalized=!1,h.type=h.buffer.dtype,h.offset=0,h.stride=0,h.divisor=0,h.state=1):i.getBuffer(u.buffer)?(h.buffer=i.getBuffer(u.buffer),h.size=0|(+u.size||h.buffer.dimension),h.normalized=!!u.normalized||!1,h.type="type"in u?rt[u.type]:h.buffer.dtype,h.offset=0|(u.offset||0),h.stride=0|(u.stride||0),h.divisor=0|(u.divisor||0),h.state=1):"x"in u&&(h.x=+u.x||0,h.y=+u.y||0,h.z=+u.z||0,h.w=+u.w||0,h.state=2)}for(l=0;lt&&(t=e.stats.uniformsCount)})),t},r.getMaxAttributesCount=function(){var t=0;return d.forEach((function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)})),t}),{clear:function(){var e=t.deleteShader.bind(t);Q(c).forEach(e),c={},Q(u).forEach(e),u={},d.forEach((function(e){t.deleteProgram(e.program)})),d.length=0,h={},r.shaderCount=0},program:function(e,n,i,o){var a=h[n];a||(a=h[n]={});var f=a[e];if(f&&(f.refCount++,!o))return f;var p=new s(n,e);return r.shaderCount++,l(p,i,o),f||(a[e]=p),d.push(p),W(p,{destroy:function(){if(p.refCount--,0>=p.refCount){t.deleteProgram(p.program);var e=d.indexOf(p);d.splice(e,1),r.shaderCount--}0>=a[p.vertId].refCount&&(t.deleteShader(u[p.vertId]),delete u[p.vertId],delete h[p.fragId][p.vertId]),Object.keys(h[p.fragId]).length||(t.deleteShader(c[p.fragId]),delete c[p.fragId],delete h[p.fragId])}})},restore:function(){c={},u={};for(var t=0;t>>e|t<<32-e}function D(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function I(t){return Array.prototype.slice.call(t)}function F(t){return I(t).join("")}function R(t){function e(){var t=[],e=[];return W((function(){t.push.apply(t,I(arguments))}),{def:function(){var r="v"+i++;return e.push(r),0>>4&15)+"0123456789abcdef".charAt(15&e);return r}(function(t){for(var e=Array(t.length>>2),r=0;r>5]|=(255&t.charCodeAt(r/8))<<24-r%32;var n,i,o,a,s,l,c,u,h,d,f,p=8*t.length;for(t=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],r=Array(64),e[p>>5]|=128<<24-p%32,e[15+(p+64>>9<<4)]=p,u=0;uh;h++){var m;16>h?r[h]=e[h+u]:(d=h,f=D(f=O(f=r[h-2],17)^O(f,19)^f>>>10,r[h-7]),m=O(m=r[h-15],7)^O(m,18)^m>>>3,r[d]=D(D(f,m),r[h-16])),d=D(D(D(D(c,d=O(d=a,6)^O(d,11)^O(d,25)),a&s^~a&l),Tt[h]),r[h]),f=D(c=O(c=p,2)^O(c,13)^O(c,22),p&n^p&i^n&i),c=l,l=s,s=a,a=D(o,d),o=i,i=n,n=p,p=D(d,f)}t[0]=D(p,t[0]),t[1]=D(n,t[1]),t[2]=D(i,t[2]),t[3]=D(o,t[3]),t[4]=D(a,t[4]),t[5]=D(s,t[5]),t[6]=D(l,t[6]),t[7]=D(c,t[7])}for(e="",r=0;r<32*t.length;r+=8)e+=String.fromCharCode(t[r>>5]>>>24-r%32&255);return e}(function(t){for(var e,r,n="",i=-1;++i=e&&56320<=r&&57343>=r&&(e=65536+((1023&e)<<10)+(1023&r),i++),127>=e?n+=String.fromCharCode(e):2047>=e?n+=String.fromCharCode(192|e>>>6&31,128|63&e):65535>=e?n+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):2097151>=e&&(n+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return n}(r))),n[e])?n[e].apply(null,a):(r=Function.apply(null,o.concat(r)),n&&(n[e]=r),r.apply(null,a))}}}function P(t){return Array.isArray(t)||K(t)||c(t)}function j(t){return t.sort((function(t,e){return"viewport"===t?-1:"viewport"===e?1:t"+e+"?"+i+".constant["+e+"]:0;"})).join(""),"}}else{","if(",s,"(",i,".buffer)){",u,"=",o,".createStream(",34962,",",i,".buffer);","}else{",u,"=",o,".getBuffer(",i,".buffer);","}",h,'="type" in ',i,"?",a.glTypes,"[",i,".type]:",u,".dtype;",l.normalized,"=!!",i,".normalized;"),n("size"),n("offset"),n("stride"),n("divisor"),r("}}"),r.exit("if(",l.isStream,"){",o,".destroyStream(",u,");","}"),l}))})),a}function T(t,e,n,i,o){function s(t){var e=c[t];e&&(d[t]=e)}var l=function(t,e){if("string"==typeof(r=t.static).frag&&"string"==typeof r.vert){if(0>1)",s],");")}function e(){r(l,".drawArraysInstancedANGLE(",[p,m,g,s],");")}f&&"null"!==f?b?t():(r("if(",f,"){"),t(),r("}else{"),e(),r("}")):e()}function a(){function t(){r(u+".drawElements("+[p,g,v,m+"<<(("+v+"-5121)>>1)"]+");")}function e(){r(u+".drawArrays("+[p,m,g]+");")}f&&"null"!==f?b?t():(r("if(",f,"){"),t(),r("}else{"),e(),r("}")):e()}var s,l,c=t.shared,u=c.gl,h=c.draw,d=n.draw,f=function(){var i=d.elements,o=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(o=r),i=i.append(t,o),d.elementsActive&&o("if("+i+")"+u+".bindBuffer(34963,"+i+".buffer.buffer);")):(i=o.def(),o(i,"=",h,".","elements",";","if(",i,"){",u,".bindBuffer(",34963,",",i,".buffer.buffer);}","else if(",c.vao,".currentVAO){",i,"=",t.shared.elements+".getElements("+c.vao,".currentVAO.elements);",et?"":"if("+i+")"+u+".bindBuffer(34963,"+i+".buffer.buffer);","}")),i}(),p=i("primitive"),m=i("offset"),g=function(){var i=d.count,o=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(o=r),i=i.append(t,o)):i=o.def(h,".","count"),i}();if("number"==typeof g){if(0===g)return}else r("if(",g,"){"),r.exit("}");Q&&(s=i("instances"),l=t.instancing);var v=f+".type",b=d.elements&&B(d.elements)&&!d.vaoActive;Q&&("number"!=typeof s||0<=s)?"string"==typeof s?(r("if(",s,">0){"),o(),r("}else if(",s,"<0){"),a(),r("}")):o():a()}function V(t,e,r,n,i){return i=(e=_()).proc("body",i),Q&&(e.instancing=i.def(e.shared.extensions,".angle_instanced_arrays")),t(e,i,r,n),e.compile().body}function H(t,e,r,n){z(t,e),r.useVAO?r.drawVAO?e(t.shared.vao,".setVAO(",r.drawVAO.append(t,e),");"):e(t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"):(e(t.shared.vao,".setVAO(null);"),D(t,e,r,n.attributes,(function(){return!0}))),I(t,e,r,n.uniforms,(function(){return!0}),!1),F(t,e,e,r)}function q(t,e,r,n){function i(){return!0}t.batchId="a1",z(t,e),D(t,e,r,n.attributes,i),I(t,e,r,n.uniforms,i,!1),F(t,e,e,r)}function Z(t,e,r,n){function i(t){return t.contextDep&&a||t.propDep}function o(t){return!i(t)}z(t,e);var a=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var c=t.scope(),u=t.scope();e(c.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",u,"}",c.exit),r.needsContext&&S(t,u,r.context),r.needsFramebuffer&&C(t,u,r.framebuffer),L(t,u,r.state,i),r.profile&&i(r.profile)&&O(t,u,r,!1,!0),n?(r.useVAO?r.drawVAO?i(r.drawVAO)?u(t.shared.vao,".setVAO(",r.drawVAO.append(t,u),");"):c(t.shared.vao,".setVAO(",r.drawVAO.append(t,c),");"):c(t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"):(c(t.shared.vao,".setVAO(null);"),D(t,c,r,n.attributes,o),D(t,u,r,n.attributes,i)),I(t,c,r,n.uniforms,o,!1),I(t,u,r,n.uniforms,i,!0),F(t,c,u,r)):(e=t.global.def("{}"),n=r.shader.progVar.append(t,u),l=u.def(n,".id"),c=u.def(e,"[",l,"]"),u(t.shared.gl,".useProgram(",n,".program);","if(!",c,"){",c,"=",e,"[",l,"]=",t.link((function(e){return V(q,t,r,e,2)})),"(",n,");}",c,".call(this,a0[",s,"],",s,");"))}function X(t,r){function n(e){var n=r.shader[e];n&&(n=n.append(t,i),isNaN(n)?i.set(o.shader,"."+e,n):i.set(o.shader,"."+e,t.link(n,{stable:!0})))}var i=t.proc("scope",3);t.batchId="a2";var o=t.shared,a=o.current;if(S(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),j(Object.keys(r.state)).forEach((function(e){var n=r.state[e],a=n.append(t,i);b(a)?a.forEach((function(r,n){isNaN(r)?i.set(t.next[e],"["+n+"]",r):i.set(t.next[e],"["+n+"]",t.link(r,{stable:!0}))})):B(n)?i.set(o.next,"."+e,t.link(a,{stable:!0})):i.set(o.next,"."+e,a)})),O(t,i,r,!0,!0),["elements","offset","count","instances","primitive"].forEach((function(e){var n=r.draw[e];n&&(n=n.append(t,i),isNaN(n)?i.set(o.draw,"."+e,n):i.set(o.draw,"."+e,t.link(n),{stable:!0}))})),Object.keys(r.uniforms).forEach((function(n){var a=r.uniforms[n].append(t,i);Array.isArray(a)&&(a="["+a.map((function(e){return isNaN(e)?e:t.link(e,{stable:!0})}))+"]"),i.set(o.uniforms,"["+t.link(e.id(n),{stable:!0})+"]",a)})),Object.keys(r.attributes).forEach((function(e){var n=r.attributes[e].append(t,i),o=t.scopeAttrib(e);Object.keys(new J).forEach((function(t){i.set(o,"."+t,n[t])}))})),r.scopeVAO){var s=r.scopeVAO.append(t,i);isNaN(s)?i.set(o.vao,".targetVAO",s):i.set(o.vao,".targetVAO",t.link(s,{stable:!0}))}n("vert"),n("frag"),0=--this.refCount&&a(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(u).forEach((function(e){t+=u[e].stats.size})),t}),{create:function(e,r){function a(e,r){var n=0,o=0,u=32854;if("object"==typeof e&&e?("shape"in e?(n=0|(o=e.shape)[0],o=0|o[1]):("radius"in e&&(n=o=0|e.radius),"width"in e&&(n=0|e.width),"height"in e&&(o=0|e.height)),"format"in e&&(u=s[e.format])):"number"==typeof e?(n=0|e,o="number"==typeof r?0|r:n):e||(n=o=1),n!==c.width||o!==c.height||u!==c.format)return a.width=c.width=n,a.height=c.height=o,c.format=u,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,u,n,o),i.profile&&(c.stats.size=wt[c.format]*c.width*c.height),a.format=l[c.format],a}var c=new o(t.createRenderbuffer());return u[c.id]=c,n.renderbufferCount++,a(e,r),a.resize=function(e,r){var n=0|e,o=0|r||n;return n===c.width&&o===c.height||(a.width=c.width=n,a.height=c.height=o,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,c.format,n,o),i.profile&&(c.stats.size=wt[c.format]*c.width*c.height)),a},a._reglType="renderbuffer",a._renderbuffer=c,i.profile&&(a.stats=c.stats),a.destroy=function(){c.decRef()},a},clear:function(){Q(u).forEach(a)},restore:function(){Q(u).forEach((function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)})),t.bindRenderbuffer(36161,null)}}},At=[];At[6408]=4,At[6407]=3;var Mt=[];Mt[5121]=1,Mt[5126]=4,Mt[36193]=2;var Tt=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],St=["x","y","z","w"],Ct="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Et={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Lt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},zt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ot={cw:2304,ccw:2305},Dt=new N(!1,!1,!1,(function(){}));return function(t){function e(){if(0===$.length)k&&k.update(),et=null;else{et=Z.next(e),h();for(var t=$.length-1;0<=t;--t){var r=$[t];r&&r(O,null,0)}p.flush(),k&&k.update()}}function r(){!et&&0<$.length&&(et=Z.next(e))}function n(){et&&(Z.cancel(e),et=null)}function i(t){t.preventDefault(),n(),K.forEach((function(t){t()}))}function a(t){p.getError(),b.restore(),P.restore(),I.restore(),j.restore(),N.restore(),B.restore(),R.restore(),k&&k.restore(),U.procs.refresh(),r(),Q.forEach((function(t){t()}))}function s(t){function e(t,e){var r={},n={};return Object.keys(t).forEach((function(i){var o=t[i];if(Y.isDynamic(o))n[i]=Y.unbox(o,i);else{if(e&&Array.isArray(o))for(var a=0;a=$.length&&n()}}}}function u(){var t=G.viewport,e=G.scissor_box;t[0]=t[1]=e[0]=e[1]=0,O.viewportWidth=O.framebufferWidth=O.drawingBufferWidth=t[2]=e[2]=p.drawingBufferWidth,O.viewportHeight=O.framebufferHeight=O.drawingBufferHeight=t[3]=e[3]=p.drawingBufferHeight}function h(){O.tick+=1,O.time=f(),u(),U.procs.poll()}function d(){j.refresh(),u(),U.procs.refresh(),k&&k.update()}function f(){return(X()-A)/1e3}if(!(t=o(t)))return null;var p=t.gl,v=p.getContextAttributes();p.isContextLost();var b=function(t,e){function r(e){var r;e=e.toLowerCase();try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},i=0;ie;++e)rt(W({framebuffer:t.framebuffer.faces[e]},t),l);else rt(t,l);else l(0,t)},prop:Y.define.bind(null,1),context:Y.define.bind(null,2),this:Y.define.bind(null,3),draw:s({}),buffer:function(t){return I.create(t,34962,!1,!1)},elements:function(t){return F.create(t,!1)},texture:j.create2D,cube:j.createCube,renderbuffer:N.create,framebuffer:B.create,framebufferCube:B.createCube,vao:R.createVAO,attributes:v,frame:c,on:function(t,e){var r;switch(t){case"frame":return c(e);case"lost":r=K;break;case"restore":r=Q;break;case"destroy":r=tt}return r.push(e),{cancel:function(){for(var t=0;t{"use strict";var n=r(59412),i=r(43362),o=r(20419)(),a=r(55572),s=r(48744),l=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new s("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||l(e)!==e)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in t&&a){var u=a(t,"length");u&&!u.configurable&&(n=!1),u&&!u.writable&&(c=!1)}return(n||c||!r)&&(o?i(t,"length",e,!0,!0):i(t,"length",e)),t}},46492:(t,e,r)=>{"use strict";var n=r(2214);t.exports=function(t,e,r){if(null==t)throw Error("First argument should be a string");if(null==e)throw Error("Separator should be a string or a RegExp");r?("string"==typeof r||Array.isArray(r))&&(r={ignore:r}):r={},null==r.escape&&(r.escape=!0),null==r.ignore?r.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:("string"==typeof r.ignore&&(r.ignore=[r.ignore]),r.ignore=r.ignore.map((function(t){return 1===t.length&&(t+=t),t})));var i=n.parse(t,{flat:!0,brackets:r.ignore}),o=i[0].split(e);if(r.escape){for(var a=[],s=0;s{"use strict";var n=r(37974),i=r(97883),o=r(25058),a=r(12611);t.exports=function(t){if(Array.isArray(t)&&1===t.length&&"string"==typeof t[0]&&(t=t[0]),"string"==typeof t){if(!a(t))throw Error("String is not an SVG path.");t=n(t)}if(!Array.isArray(t))throw Error("Argument should be a string or an array of path segments.");if(t=i(t),!(t=o(t)).length)return[0,0,0,0];for(var e=[1/0,1/0,-1/0,-1/0],r=0,s=t.length;re[2]&&(e[2]=l[c+0]),l[c+1]>e[3]&&(e[3]=l[c+1]);return e}},77622:(t,e,r)=>{"use strict";var n,i=r(75798),o=r(37974),a=r(61085),s=r(12611),l=r(25875),c=document.createElement("canvas"),u=c.getContext("2d");t.exports=function(t,e){if(!s(t))throw Error("Argument should be valid svg path string");var r,h;e||(e={}),e.shape?(r=e.shape[0],h=e.shape[1]):(r=c.width=e.w||e.width||200,h=c.height=e.h||e.height||200);var d=Math.min(r,h),f=e.stroke||0,p=e.viewbox||e.viewBox||i(t),m=[r/(p[2]-p[0]),h/(p[3]-p[1])],g=Math.min(m[0]||0,m[1]||0)/2;if(u.fillStyle="black",u.fillRect(0,0,r,h),u.fillStyle="white",f&&("number"!=typeof f&&(f=1),u.strokeStyle=f>0?"white":"black",u.lineWidth=Math.abs(f)),u.translate(.5*r,.5*h),u.scale(g,g),function(){if(null!=n)return n;var t=document.createElement("canvas").getContext("2d");if(t.canvas.width=t.canvas.height=1,!window.Path2D)return n=!1;var e=new Path2D("M0,0h1v1h-1v-1Z");t.fillStyle="black",t.fill(e);var r=t.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var v=new Path2D(t);u.fill(v),f&&u.stroke(v)}else{var b=o(t);a(u,b),u.fill(),f&&u.stroke()}return u.setTransform(1,0,0,1,0,0),l(u,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*d})}},91101:t=>{"use strict";t.exports=r,t.exports.float32=t.exports.float=r,t.exports.fract32=t.exports.fract=function(t,e){if(t.length){if(t instanceof Float32Array)return new Float32Array(t.length);e instanceof Float32Array||(e=r(t));for(var n=0,i=e.length;n{"use strict";var n=r(3202);t.exports=a;var i=96;function o(t,e){var r=n(getComputedStyle(t).getPropertyValue(e));return r[0]*a(r[1],t)}function a(t,e){switch(e=e||document.body,t=(t||"px").trim().toLowerCase(),e!==window&&e!==document||(e=document.body),t){case"%":return e.clientHeight/100;case"ch":case"ex":return function(t,e){var r=document.createElement("div");r.style["font-size"]="128"+t,e.appendChild(r);var n=o(r,"font-size")/128;return e.removeChild(r),n}(t,e);case"em":return o(e,"font-size");case"rem":return o(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return i;case"cm":return i/2.54;case"mm":return i/25.4;case"pt":return i/72;case"pc":return i/6}return 1}},98479:(t,e,r)=>{"use strict";var n=r(38251);t.exports=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(t){return!1}return!n(t)}},55351:(t,e,r)=>{"use strict";var n=r(36181),i=r(50406);t.exports=function(t,e,r){r&&r.errorMessage&&(t=n(r.errorMessage));var o=t.indexOf("%v"),a=o>-1?i(e):null;if(r&&r.name){var s,l,c,u,h=t.indexOf("%n");if(h>-1)return o>-1?(h>o?(s=a,c=o,l=r.name,u=h):(s=r.name,c=h,l=a,u=o),t.slice(0,c)+s+t.slice(c+2,u)+l+t.slice(u+2)):t.slice(0,h)+r.name+t.slice(h+2)}return o>-1?t.slice(0,o)+a+t.slice(o+2):t}},81114:(t,e,r)=>{"use strict";var n=r(59738),i=r(55351);t.exports=function(t,e,r){if(r&&!n(t)){if("default"in r)return r.default;if(r.isOptional)return null}var o=new(r&&r.Error||TypeError)(i(e,t,r));throw r&&r.errorCode&&(o.code=r.errorCode),o}},74165:t=>{"use strict";t.exports=function(t){try{return t.toString()}catch(e){try{return String(t)}catch(t){return null}}}},50406:(t,e,r)=>{"use strict";var n=r(74165),i=/[\n\r\u2028\u2029]/g;t.exports=function(t){var e=n(t);return null===e?"":(e.length>100&&(e=e.slice(0,99)+"…"),e=e.replace(i,(function(t){switch(t){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})))}},10818:(t,e,r)=>{"use strict";var n=r(59738),i={object:!0,function:!0,undefined:!0};t.exports=function(t){return!!n(t)&&hasOwnProperty.call(i,typeof t)}},4216:(t,e,r)=>{"use strict";var n=r(81114),i=r(15034);t.exports=function(t){if(i(t))return t;var e=arguments[1],r=e&&e.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return n(t,r,e)}},15034:(t,e,r)=>{"use strict";var n=r(98479),i=/^\s*class[\s{/}]/,o=Function.prototype.toString;t.exports=function(t){return!!n(t)&&!i.test(o.call(t))}},38251:(t,e,r)=>{"use strict";var n=r(10818);t.exports=function(t){if(!n(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}}},36181:(t,e,r)=>{"use strict";var n=r(59738),i=r(10818),o=Object.prototype.toString;t.exports=function(t){if(!n(t))return null;if(i(t)){var e=t.toString;if("function"!=typeof e)return null;if(e===o)return null}try{return""+t}catch(t){return null}}},10040:(t,e,r)=>{"use strict";var n=r(81114),i=r(59738);t.exports=function(t){if(i(t))return t;var e=arguments[1],r=e&&e.name?"Expected a value for %n, received %v":"Cannot use %v";return n(t,r,e)}},59738:t=>{"use strict";t.exports=function(t){return null!=t}},31888:(t,e,r)=>{"use strict";var n=r(88828),i=r(31338),o=r(65500).hp;r.g.__TYPEDARRAY_POOL||(r.g.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var a="undefined"!=typeof Uint8ClampedArray,s="undefined"!=typeof BigUint64Array,l="undefined"!=typeof BigInt64Array,c=r.g.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=i([32,0])),c.BIGUINT64||(c.BIGUINT64=i([32,0])),c.BIGINT64||(c.BIGINT64=i([32,0])),c.BUFFER||(c.BUFFER=i([32,0]));var u=c.DATA,h=c.BUFFER;function d(t){if(t){var e=t.length||t.byteLength,r=n.log2(e);u[r].push(t)}}function f(t){t=n.nextPow2(t);var e=n.log2(t),r=u[e];return r.length>0?r.pop():new ArrayBuffer(t)}function p(t){return new Uint8Array(f(t),0,t)}function m(t){return new Uint16Array(f(2*t),0,t)}function g(t){return new Uint32Array(f(4*t),0,t)}function v(t){return new Int8Array(f(t),0,t)}function b(t){return new Int16Array(f(2*t),0,t)}function y(t){return new Int32Array(f(4*t),0,t)}function x(t){return new Float32Array(f(4*t),0,t)}function _(t){return new Float64Array(f(8*t),0,t)}function w(t){return a?new Uint8ClampedArray(f(t),0,t):p(t)}function k(t){return s?new BigUint64Array(f(8*t),0,t):null}function A(t){return l?new BigInt64Array(f(8*t),0,t):null}function M(t){return new DataView(f(t),0,t)}function T(t){t=n.nextPow2(t);var e=n.log2(t),r=h[e];return r.length>0?r.pop():new o(t)}e.free=function(t){if(o.isBuffer(t))h[n.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|n.log2(e);u[r].push(t)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(t){d(t.buffer)},e.freeArrayBuffer=d,e.freeBuffer=function(t){h[n.log2(t.length)].push(t)},e.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return f(t);switch(e){case"uint8":return p(t);case"uint16":return m(t);case"uint32":return g(t);case"int8":return v(t);case"int16":return b(t);case"int32":return y(t);case"float":case"float32":return x(t);case"double":case"float64":return _(t);case"uint8_clamped":return w(t);case"bigint64":return A(t);case"biguint64":return k(t);case"buffer":return T(t);case"data":case"dataview":return M(t);default:return null}return null},e.mallocArrayBuffer=f,e.mallocUint8=p,e.mallocUint16=m,e.mallocUint32=g,e.mallocInt8=v,e.mallocInt16=b,e.mallocInt32=y,e.mallocFloat32=e.mallocFloat=x,e.mallocFloat64=e.mallocDouble=_,e.mallocUint8Clamped=w,e.mallocBigUint64=k,e.mallocBigInt64=A,e.mallocDataView=M,e.mallocBuffer=T,e.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,h[t].length=0}},51183:t=>{var e=/[\'\"]/;t.exports=function(t){return t?(e.test(t.charAt(0))&&(t=t.substr(1)),e.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}},6313:t=>{"use strict";t.exports=function(t,e,r){Array.isArray(r)||(r=[].slice.call(arguments,2));for(var n=0,i=r.length;n{t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},41071:(t,e,r)=>{"use strict";var n=r(68007),i=r(74205),o=r(17478),a=r(94179);function s(t){return t.call.bind(t)}var l="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,u=s(Object.prototype.toString),h=s(Number.prototype.valueOf),d=s(String.prototype.valueOf),f=s(Boolean.prototype.valueOf);if(l)var p=s(BigInt.prototype.valueOf);if(c)var m=s(Symbol.prototype.valueOf);function g(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function v(t){return"[object Map]"===u(t)}function b(t){return"[object Set]"===u(t)}function y(t){return"[object WeakMap]"===u(t)}function x(t){return"[object WeakSet]"===u(t)}function _(t){return"[object ArrayBuffer]"===u(t)}function w(t){return"undefined"!=typeof ArrayBuffer&&(_.working?_(t):t instanceof ArrayBuffer)}function k(t){return"[object DataView]"===u(t)}function A(t){return"undefined"!=typeof DataView&&(k.working?k(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=i,e.isTypedArray=a,e.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},e.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):a(t)||A(t)},e.isUint8Array=function(t){return"Uint8Array"===o(t)},e.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===o(t)},e.isUint16Array=function(t){return"Uint16Array"===o(t)},e.isUint32Array=function(t){return"Uint32Array"===o(t)},e.isInt8Array=function(t){return"Int8Array"===o(t)},e.isInt16Array=function(t){return"Int16Array"===o(t)},e.isInt32Array=function(t){return"Int32Array"===o(t)},e.isFloat32Array=function(t){return"Float32Array"===o(t)},e.isFloat64Array=function(t){return"Float64Array"===o(t)},e.isBigInt64Array=function(t){return"BigInt64Array"===o(t)},e.isBigUint64Array=function(t){return"BigUint64Array"===o(t)},v.working="undefined"!=typeof Map&&v(new Map),e.isMap=function(t){return"undefined"!=typeof Map&&(v.working?v(t):t instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),e.isSet=function(t){return"undefined"!=typeof Set&&(b.working?b(t):t instanceof Set)},y.working="undefined"!=typeof WeakMap&&y(new WeakMap),e.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(y.working?y(t):t instanceof WeakMap)},x.working="undefined"!=typeof WeakSet&&x(new WeakSet),e.isWeakSet=function(t){return x(t)},_.working="undefined"!=typeof ArrayBuffer&&_(new ArrayBuffer),e.isArrayBuffer=w,k.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&k(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=A;var M="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function T(t){return"[object SharedArrayBuffer]"===u(t)}function S(t){return void 0!==M&&(void 0===T.working&&(T.working=T(new M)),T.working?T(t):t instanceof M)}function C(t){return g(t,h)}function E(t){return g(t,d)}function L(t){return g(t,f)}function z(t){return l&&g(t,p)}function O(t){return c&&g(t,m)}e.isSharedArrayBuffer=S,e.isAsyncFunction=function(t){return"[object AsyncFunction]"===u(t)},e.isMapIterator=function(t){return"[object Map Iterator]"===u(t)},e.isSetIterator=function(t){return"[object Set Iterator]"===u(t)},e.isGeneratorObject=function(t){return"[object Generator]"===u(t)},e.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===u(t)},e.isNumberObject=C,e.isStringObject=E,e.isBooleanObject=L,e.isBigIntObject=z,e.isSymbolObject=O,e.isBoxedPrimitive=function(t){return C(t)||E(t)||L(t)||z(t)||O(t)},e.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(w(t)||S(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))},11276:(t,e,r)=>{var n=r(39807),i=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&e._extend(n,r),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),d(n,t,n.depth)}function u(t,e){var r=c.styles[e];return r?"["+c.colors[r][0]+"m"+t+"["+c.colors[r][1]+"m":t}function h(t,e){return t}function d(t,r,n){if(t.customInspect&&r&&M(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=d(t,i,n)),i}var o=function(t,e){if(x(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):v(e)?t.stylize("null","null"):void 0}(t,r);if(o)return o;var a=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),A(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(r);if(0===a.length){if(M(r)){var l=r.name?": "+r.name:"";return t.stylize("[Function"+l+"]","special")}if(_(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return t.stylize(Date.prototype.toString.call(r),"date");if(A(r))return f(r)}var c,u="",h=!1,w=["{","}"];return m(r)&&(h=!0,w=["[","]"]),M(r)&&(u=" [Function"+(r.name?": "+r.name:"")+"]"),_(r)&&(u=" "+RegExp.prototype.toString.call(r)),k(r)&&(u=" "+Date.prototype.toUTCString.call(r)),A(r)&&(u=" "+f(r)),0!==a.length||h&&0!=r.length?n<0?_(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=h?function(t,e,r,n,i){for(var o=[],a=0,s=e.length;a60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(c,u,w)):w[0]+u+w[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,n,i,o){var a,s,l;if((l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),E(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(l.value)<0?(s=v(r)?d(t,l.value,null):d(t,l.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").slice(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function m(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function v(t){return null===t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function x(t){return void 0===t}function _(t){return w(t)&&"[object RegExp]"===T(t)}function w(t){return"object"==typeof t&&null!==t}function k(t){return w(t)&&"[object Date]"===T(t)}function A(t){return w(t)&&("[object Error]"===T(t)||t instanceof Error)}function M(t){return"function"==typeof t}function T(t){return Object.prototype.toString.call(t)}function S(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!a[t])if(s.test(t)){var r=n.pid;a[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else a[t]=function(){};return a[t]},e.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(41071),e.isArray=m,e.isBoolean=g,e.isNull=v,e.isNullOrUndefined=function(t){return null==t},e.isNumber=b,e.isString=y,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=x,e.isRegExp=_,e.types.isRegExp=_,e.isObject=w,e.isDate=k,e.types.isDate=k,e.isError=A,e.types.isNativeError=A,e.isFunction=M,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(26900);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function E(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log("%s - %s",(r=[S((t=new Date).getHours()),S(t.getMinutes()),S(t.getSeconds())].join(":"),[t.getDate(),C[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(9715),e._extend=function(t,e){if(!e||!w(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var L="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function z(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(L&&t[L]){var e;if("function"!=typeof(e=t[L]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,L,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o{var n=r(64487);t.exports=function(t){return n("webgl",t)}},17478:(t,e,r)=>{"use strict";var n=r(85573),i=r(75208),o=r(61398),a=r(24310),s=r(55572),l=a("Object.prototype.toString"),c=r(15541)(),u="undefined"==typeof globalThis?r.g:globalThis,h=i(),d=a("String.prototype.slice"),f=Object.getPrototypeOf,p=a("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r-1?e:"Object"===e&&function(t){var e=!1;return n(m,(function(r,n){if(!e)try{r(t),e=d(n,1)}catch(t){}})),e}(t)}return s?function(t){var e=!1;return n(m,(function(r,n){if(!e)try{"$"+r(t)===n&&(e=d(n,1))}catch(t){}})),e}(t):null}},32688:(t,e,r)=>{"use strict";const n=r(12028);n.register([r(94646),r(72010)]),t.exports=n},90170:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n='\n'},96144:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>v});var n=r(85072),i=r.n(n),o=r(97825),a=r.n(o),s=r(77659),l=r.n(s),c=r(55056),u=r.n(c),h=r(10540),d=r.n(h),f=r(41113),p=r.n(f),m=r(5955),g={};g.styleTagTransform=p(),g.setAttributes=u(),g.insert=l().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=d(),i()(m.A,g);const v=m.A&&m.A.locals?m.A.locals:void 0},85072:t=>{"use strict";var e=[];function r(t){for(var r=-1,n=0;n{"use strict";var e={};t.exports=function(t,r){var n=function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},10540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},55056:(t,e,r)=>{"use strict";t.exports=function(t){var e=r.nc;e&&t.setAttribute("nonce",e)}},97825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(r){!function(t,e,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var i=void 0!==r.layer;i&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,i&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,r)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},41113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},88862:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(34961),i=r.n(n);class o{constructor(t,e){this._element=t,this._parent=null,this._visible=!1,this._horizontal=this._element.classList.contains("horizontal"),this._property=this._horizontal?"width":"height";const r=this._element.dataset.bsParent;r&&(this._parent=e.querySelector(r),i()(this._parent,"this._parent")),this._element.addEventListener("transitionend",(t=>{t.target===t.currentTarget&&t.propertyName===this._property&&(this._element.classList.replace("collapsing","collapse"),this._visible&&(this._element.classList.add("show"),this._element.style.removeProperty(this._property)))}))}hide(){if(this._visible){const t=this._element.getBoundingClientRect()[this._property];this._element.style.setProperty(this._property,`${t}px`),this._element.classList.replace("collapse","collapsing"),this._element.classList.remove("show"),this._element.offsetHeight,this._element.style.removeProperty(this._property),this._visible=!1,this._parent&&u.get(this._parent)===this&&u.set(this._parent,null)}}show(){var t;if(!this._visible){this._parent&&(null===(t=u.get(this._parent))||void 0===t||t.hide(),u.set(this._parent,this));const e=this._horizontal?"scrollWidth":"scrollHeight";this._element.classList.replace("collapse","collapsing"),this._element.style.setProperty(this._property,"0");const r=this._element[e];this._element.style.setProperty(this._property,`${r}px`),this._visible=!0}}toggle(t=!this._visible){t?this.show():this.hide()}addTrigger(t){t.addEventListener("click",(t=>{t.preventDefault(),this.toggle()}))}static initialize(t=document.body){for(const e of t.querySelectorAll("[data-bs-toggle]"))if(e instanceof HTMLElement&&"bsTarget"in e.dataset){const r=t.querySelector(e.dataset.bsTarget);r&&s(r,t).addTrigger(e)}}}const a=new WeakMap,s=(l=a,c=(t,e)=>new o(t,e),(t,...e)=>{l.has(t)||l.set(t,c(t,...e));const r=l.get(t);return i()(r,"value"),r});var l,c;const u=new WeakMap},17136:(t,e,r)=>{"use strict";function n(t){return t.map((t=>[t[0],`rgb(${t[1][0]}, ${t[1][1]}, ${t[1][2]})`]))}r.d(e,{s:()=>i});const i={inferno:n([[0,[0,0,3]],[.0159,[1,1,9]],[.0317,[3,2,18]],[.0476,[6,4,27]],[.0635,[10,7,35]],[.0794,[15,9,45]],[.0952,[20,11,54]],[.1111,[26,11,64]],[.127,[32,12,74]],[.1429,[39,11,82]],[.1587,[46,10,90]],[.1746,[53,9,96]],[.1905,[60,9,101]],[.2063,[67,10,104]],[.2222,[74,11,106]],[.2381,[80,13,108]],[.254,[88,16,109]],[.2698,[95,18,110]],[.2857,[101,21,110]],[.3016,[107,23,110]],[.3175,[114,25,109]],[.3333,[120,28,109]],[.3492,[126,30,108]],[.3651,[133,32,106]],[.381,[139,34,105]],[.3968,[145,37,103]],[.4127,[152,39,101]],[.4286,[158,41,99]],[.4444,[164,44,96]],[.4603,[171,46,93]],[.4762,[177,49,90]],[.4921,[183,52,86]],[.5079,[190,56,82]],[.5238,[196,60,78]],[.5397,[201,63,74]],[.5556,[207,68,70]],[.5714,[212,72,65]],[.5873,[217,77,61]],[.6032,[221,82,56]],[.619,[226,87,51]],[.6349,[230,92,46]],[.6508,[233,98,42]],[.6667,[237,104,37]],[.6825,[240,111,31]],[.6984,[242,117,26]],[.7143,[245,124,21]],[.7302,[247,131,16]],[.746,[248,138,11]],[.7619,[250,147,6]],[.7778,[251,155,6]],[.7937,[251,162,8]],[.8095,[251,170,14]],[.8254,[251,177,22]],[.8413,[251,185,30]],[.8571,[250,193,40]],[.873,[248,201,49]],[.8889,[247,209,60]],[.9048,[245,217,72]],[.9206,[243,224,86]],[.9365,[241,232,100]],[.9524,[241,238,116]],[.9683,[242,244,133]],[.9841,[246,250,149]],[1,[252,254,164]]]),magma:n([[0,[0,0,3]],[.0159,[1,1,9]],[.0317,[3,3,17]],[.0476,[6,5,25]],[.0635,[10,7,34]],[.0794,[14,10,42]],[.0952,[18,13,51]],[.1111,[23,15,60]],[.127,[28,16,70]],[.1429,[34,17,80]],[.1587,[40,17,89]],[.1746,[47,16,98]],[.1905,[53,15,106]],[.2063,[60,15,113]],[.2222,[67,15,117]],[.2381,[74,16,121]],[.254,[82,18,124]],[.2698,[88,21,126]],[.2857,[94,23,127]],[.3016,[101,26,128]],[.3175,[107,28,128]],[.3333,[113,31,129]],[.3492,[119,33,129]],[.3651,[126,36,129]],[.381,[132,38,129]],[.3968,[138,40,129]],[.4127,[145,42,128]],[.4286,[151,44,127]],[.4444,[158,46,126]],[.4603,[164,48,125]],[.4762,[171,51,124]],[.4921,[177,53,122]],[.5079,[185,55,120]],[.5238,[192,58,117]],[.5397,[198,60,115]],[.5556,[205,63,112]],[.5714,[211,66,109]],[.5873,[217,70,106]],[.6032,[222,74,103]],[.619,[228,78,100]],[.6349,[232,84,97]],[.6508,[237,89,95]],[.6667,[240,96,93]],[.6825,[243,103,91]],[.6984,[246,110,91]],[.7143,[248,117,92]],[.7302,[249,125,93]],[.746,[251,132,96]],[.7619,[252,142,99]],[.7778,[253,149,103]],[.7937,[253,157,107]],[.8095,[253,164,112]],[.8254,[254,172,117]],[.8413,[254,179,123]],[.8571,[254,187,128]],[.873,[254,194,134]],[.8889,[254,201,141]],[.9048,[253,209,147]],[.9206,[253,216,154]],[.9365,[253,223,161]],[.9524,[252,230,168]],[.9683,[252,238,176]],[.9841,[252,245,183]],[1,[251,252,191]]]),plasma:n([[0,[12,7,134]],[.0159,[24,6,139]],[.0317,[33,5,143]],[.0476,[41,5,147]],[.0635,[49,4,150]],[.0794,[56,4,153]],[.0952,[63,3,156]],[.1111,[69,3,158]],[.127,[76,2,161]],[.1429,[82,1,163]],[.1587,[89,1,164]],[.1746,[95,0,166]],[.1905,[101,0,167]],[.2063,[108,0,168]],[.2222,[114,0,168]],[.2381,[120,1,168]],[.254,[127,3,167]],[.2698,[133,6,166]],[.2857,[139,9,164]],[.3016,[144,14,163]],[.3175,[150,18,160]],[.3333,[155,23,158]],[.3492,[160,27,155]],[.3651,[165,31,151]],[.381,[170,36,148]],[.3968,[175,40,144]],[.4127,[180,45,141]],[.4286,[184,50,137]],[.4444,[188,54,133]],[.4603,[192,59,129]],[.4762,[196,63,126]],[.4921,[200,68,122]],[.5079,[205,73,117]],[.5238,[209,78,114]],[.5397,[212,82,110]],[.5556,[215,87,107]],[.5714,[219,91,103]],[.5873,[222,96,100]],[.6032,[225,101,96]],[.619,[228,106,93]],[.6349,[231,110,90]],[.6508,[234,115,86]],[.6667,[236,120,83]],[.6825,[239,125,79]],[.6984,[241,130,76]],[.7143,[243,135,72]],[.7302,[245,141,69]],[.746,[247,146,65]],[.7619,[249,153,61]],[.7778,[250,159,58]],[.7937,[251,164,54]],[.8095,[252,170,51]],[.8254,[253,176,48]],[.8413,[253,182,45]],[.8571,[253,188,42]],[.873,[253,195,40]],[.8889,[252,201,38]],[.9048,[251,208,36]],[.9206,[250,214,36]],[.9365,[248,221,36]],[.9524,[246,228,37]],[.9683,[244,234,38]],[.9841,[242,241,38]],[1,[239,248,33]]]),viridis:n([[0,[68,1,84]],[.0159,[69,6,90]],[.0317,[70,12,95]],[.0476,[71,18,101]],[.0635,[71,24,106]],[.0794,[72,29,111]],[.0952,[72,34,115]],[.1111,[71,39,119]],[.127,[71,44,123]],[.1429,[70,49,126]],[.1587,[69,54,129]],[.1746,[67,59,131]],[.1905,[66,64,133]],[.2063,[64,68,135]],[.2222,[62,73,137]],[.2381,[60,77,138]],[.254,[58,83,139]],[.2698,[56,87,140]],[.2857,[54,91,140]],[.3016,[52,95,141]],[.3175,[50,99,141]],[.3333,[48,103,141]],[.3492,[46,107,142]],[.3651,[45,111,142]],[.381,[43,115,142]],[.3968,[42,119,142]],[.4127,[40,122,142]],[.4286,[39,126,142]],[.4444,[37,130,142]],[.4603,[36,134,141]],[.4762,[34,137,141]],[.4921,[33,141,140]],[.5079,[31,146,140]],[.5238,[31,150,139]],[.5397,[30,153,138]],[.5556,[30,157,136]],[.5714,[31,161,135]],[.5873,[32,165,133]],[.6032,[35,168,131]],[.619,[38,172,129]],[.6349,[42,176,126]],[.6508,[47,179,123]],[.6667,[53,183,120]],[.6825,[59,186,117]],[.6984,[66,190,113]],[.7143,[73,193,109]],[.7302,[81,196,104]],[.746,[89,199,100]],[.7619,[100,203,93]],[.7778,[109,206,88]],[.7937,[119,208,82]],[.8095,[129,211,76]],[.8254,[139,213,70]],[.8413,[149,215,63]],[.8571,[159,217,56]],[.873,[170,219,50]],[.8889,[181,221,43]],[.9048,[191,223,36]],[.9206,[202,224,30]],[.9365,[212,225,26]],[.9524,[223,227,24]],[.9683,[233,228,25]],[.9841,[243,229,30]],[1,[253,231,36]]]),cividis:n([[0,[0,34,77]],[.0159,[0,37,84]],[.0317,[0,40,91]],[.0476,[0,42,98]],[.0635,[0,45,105]],[.0794,[0,48,112]],[.0952,[4,50,112]],[.1111,[17,53,111]],[.127,[26,56,111]],[.1429,[33,59,110]],[.1587,[39,61,109]],[.1746,[44,64,109]],[.1905,[49,67,108]],[.2063,[54,70,108]],[.2222,[58,72,107]],[.2381,[63,75,107]],[.254,[68,79,107]],[.2698,[72,81,107]],[.2857,[76,84,108]],[.3016,[79,87,108]],[.3175,[83,90,108]],[.3333,[87,93,109]],[.3492,[90,95,109]],[.3651,[94,98,110]],[.381,[97,101,111]],[.3968,[101,104,112]],[.4127,[104,107,113]],[.4286,[108,109,114]],[.4444,[111,112,115]],[.4603,[115,115,116]],[.4762,[118,118,118]],[.4921,[121,121,119]],[.5079,[126,125,120]],[.5238,[130,128,120]],[.5397,[133,131,120]],[.5556,[137,134,120]],[.5714,[141,137,120]],[.5873,[145,140,119]],[.6032,[149,143,119]],[.619,[153,146,118]],[.6349,[157,149,117]],[.6508,[161,152,116]],[.6667,[165,155,115]],[.6825,[169,158,114]],[.6984,[173,162,113]],[.7143,[177,165,112]],[.7302,[181,168,110]],[.746,[185,171,109]],[.7619,[190,176,106]],[.7778,[195,179,104]],[.7937,[199,182,102]],[.8095,[203,186,100]],[.8254,[207,189,97]],[.8413,[212,193,94]],[.8571,[216,196,91]],[.873,[220,200,88]],[.8889,[225,204,84]],[.9048,[229,207,80]],[.9206,[234,211,76]],[.9365,[238,215,71]],[.9524,[243,218,66]],[.9683,[248,222,59]],[.9841,[253,226,52]],[1,[253,231,55]]]),seismic:n([[0,[0,0,77]],[.0159,[0,0,88]],[.0317,[0,0,99]],[.0476,[0,0,111]],[.0635,[0,0,122]],[.0794,[0,0,133]],[.0952,[0,0,144]],[.1111,[0,0,156]],[.127,[0,0,167]],[.1429,[0,0,178]],[.1587,[0,0,189]],[.1746,[0,0,200]],[.1905,[0,0,212]],[.2063,[0,0,223]],[.2222,[0,0,234]],[.2381,[0,0,245]],[.254,[5,5,255]],[.2698,[21,21,255]],[.2857,[37,37,255]],[.3016,[53,53,255]],[.3175,[69,69,255]],[.3333,[85,85,255]],[.3492,[101,101,255]],[.3651,[117,117,255]],[.381,[134,134,255]],[.3968,[150,150,255]],[.4127,[166,166,255]],[.4286,[182,182,255]],[.4444,[198,198,255]],[.4603,[214,214,255]],[.4762,[230,230,255]],[.4921,[246,246,255]],[.5079,[255,246,246]],[.5238,[255,230,230]],[.5397,[255,214,214]],[.5556,[255,198,198]],[.5714,[255,182,182]],[.5873,[255,166,166]],[.6032,[255,150,150]],[.619,[255,134,134]],[.6349,[255,117,117]],[.6508,[255,101,101]],[.6667,[255,85,85]],[.6825,[255,69,69]],[.6984,[255,53,53]],[.7143,[255,37,37]],[.7302,[255,21,21]],[.746,[255,5,5]],[.7619,[248,0,0]],[.7778,[240,0,0]],[.7937,[232,0,0]],[.8095,[224,0,0]],[.8254,[216,0,0]],[.8413,[208,0,0]],[.8571,[200,0,0]],[.873,[192,0,0]],[.8889,[184,0,0]],[.9048,[176,0,0]],[.9206,[168,0,0]],[.9365,[160,0,0]],[.9524,[152,0,0]],[.9683,[144,0,0]],[.9841,[136,0,0]],[1,[128,0,0]]]),brg:n([[0,[0,0,255]],[.0159,[8,0,248]],[.0317,[16,0,240]],[.0476,[24,0,232]],[.0635,[32,0,224]],[.0794,[40,0,216]],[.0952,[48,0,208]],[.1111,[56,0,200]],[.127,[64,0,192]],[.1429,[72,0,184]],[.1587,[80,0,176]],[.1746,[88,0,168]],[.1905,[96,0,160]],[.2063,[104,0,152]],[.2222,[112,0,144]],[.2381,[120,0,136]],[.254,[131,0,125]],[.2698,[139,0,117]],[.2857,[147,0,109]],[.3016,[155,0,101]],[.3175,[163,0,93]],[.3333,[171,0,85]],[.3492,[179,0,77]],[.3651,[187,0,69]],[.381,[195,0,61]],[.3968,[203,0,53]],[.4127,[211,0,45]],[.4286,[219,0,37]],[.4444,[227,0,29]],[.4603,[235,0,21]],[.4762,[243,0,13]],[.4921,[251,0,5]],[.5079,[251,5,0]],[.5238,[243,13,0]],[.5397,[235,21,0]],[.5556,[227,29,0]],[.5714,[219,37,0]],[.5873,[211,45,0]],[.6032,[203,53,0]],[.619,[195,61,0]],[.6349,[187,69,0]],[.6508,[179,77,0]],[.6667,[171,85,0]],[.6825,[163,93,0]],[.6984,[155,101,0]],[.7143,[147,109,0]],[.7302,[139,117,0]],[.746,[131,125,0]],[.7619,[120,136,0]],[.7778,[112,144,0]],[.7937,[104,152,0]],[.8095,[96,160,0]],[.8254,[88,168,0]],[.8413,[80,176,0]],[.8571,[72,184,0]],[.873,[64,192,0]],[.8889,[56,200,0]],[.9048,[48,208,0]],[.9206,[40,216,0]],[.9365,[32,224,0]],[.9524,[24,232,0]],[.9683,[16,240,0]],[.9841,[8,248,0]],[1,[0,255,0]]]),bwr:n([[0,[0,0,255]],[.01587,[8,8,255]],[.03175,[16,16,255]],[.04762,[24,24,255]],[.06349,[32,32,255]],[.07937,[40,40,255]],[.09524,[48,48,255]],[.1111,[56,56,255]],[.127,[64,64,255]],[.1429,[72,72,255]],[.1587,[80,80,255]],[.1746,[89,89,255]],[.1905,[97,97,255]],[.2063,[105,105,255]],[.2222,[113,113,255]],[.2381,[121,121,255]],[.254,[129,129,255]],[.2698,[137,137,255]],[.2857,[145,145,255]],[.3016,[153,153,255]],[.3175,[161,161,255]],[.3333,[170,170,255]],[.3492,[178,178,255]],[.3651,[186,186,255]],[.381,[194,194,255]],[.3968,[202,202,255]],[.4127,[210,210,255]],[.4286,[218,218,255]],[.4444,[226,226,255]],[.4603,[234,234,255]],[.4762,[242,242,255]],[.4921,[250,250,255]],[.5079,[255,250,250]],[.5238,[254,242,242]],[.5397,[255,234,234]],[.5556,[255,226,226]],[.5714,[255,218,218]],[.5873,[254,210,210]],[.6032,[255,202,202]],[.619,[255,194,194]],[.6349,[255,186,186]],[.6508,[254,178,178]],[.6667,[255,170,170]],[.6825,[255,161,161]],[.6984,[255,153,153]],[.7143,[254,145,145]],[.7302,[255,137,137]],[.746,[255,129,129]],[.7619,[255,121,121]],[.7778,[255,113,113]],[.7937,[255,105,105]],[.8095,[255,97,97]],[.8254,[255,89,89]],[.8413,[255,80,80]],[.8571,[255,72,72]],[.873,[255,64,64]],[.8889,[255,56,56]],[.9048,[255,48,48]],[.9206,[255,40,40]],[.9365,[255,32,32]],[.9524,[255,24,24]],[.9683,[255,16,16]],[.9841,[255,8,8]],[1,[255,0,0]]]),rwg:n([[0,[200,0,0]],[.01587,[201,8,8]],[.03175,[203,16,16]],[.04762,[205,24,24]],[.06349,[206,32,32]],[.07937,[208,40,40]],[.09524,[210,48,48]],[.1111,[212,56,56]],[.127,[213,64,64]],[.1429,[215,72,72]],[.1587,[217,80,80]],[.1746,[219,89,89]],[.1905,[220,97,97]],[.2063,[222,105,105]],[.2222,[224,113,113]],[.2381,[226,121,121]],[.254,[227,129,129]],[.2698,[229,137,137]],[.2857,[231,145,145]],[.3016,[233,153,153]],[.3175,[234,161,161]],[.3333,[236,170,170]],[.3492,[238,178,178]],[.3651,[240,186,186]],[.381,[241,194,194]],[.3968,[243,202,202]],[.4127,[245,210,210]],[.4286,[247,218,218]],[.4444,[248,226,226]],[.4603,[250,234,234]],[.4762,[252,242,242]],[.4921,[254,250,250]],[.5079,[250,252,250]],[.5238,[242,248,242]],[.5397,[234,244,234]],[.5556,[226,240,226]],[.5714,[218,236,218]],[.5873,[210,232,210]],[.6032,[202,228,202]],[.619,[194,224,194]],[.6349,[186,220,186]],[.6508,[178,216,178]],[.6667,[170,212,170]],[.6825,[161,208,161]],[.6984,[153,204,153]],[.7143,[145,200,145]],[.7302,[137,196,137]],[.746,[129,192,129]],[.7619,[121,188,121]],[.7778,[113,184,113]],[.7937,[105,180,105]],[.8095,[97,176,97]],[.8254,[89,172,89]],[.8413,[80,168,80]],[.8571,[72,164,72]],[.873,[64,160,64]],[.8889,[56,156,56]],[.9048,[48,152,48]],[.9206,[40,148,40]],[.9365,[32,144,32]],[.9524,[24,140,24]],[.9683,[16,136,16]],[.9841,[8,132,8]],[1,[0,128,0]]]),"twilight (periodic)":n([[0,[225,216,226]],[.0159,[221,217,224]],[.0317,[214,214,220]],[.0476,[205,210,216]],[.0635,[194,205,211]],[.0794,[182,199,207]],[.0952,[170,193,203]],[.1111,[158,187,200]],[.127,[147,180,198]],[.1429,[137,172,196]],[.1587,[128,165,195]],[.1746,[119,156,193]],[.1905,[112,149,192]],[.2063,[107,141,191]],[.2222,[102,132,189]],[.2381,[99,124,187]],[.254,[97,115,185]],[.2698,[96,106,183]],[.2857,[95,97,180]],[.3016,[94,87,176]],[.3175,[94,78,171]],[.3333,[93,67,164]],[.3492,[92,57,157]],[.3651,[90,48,149]],[.381,[88,39,139]],[.3968,[84,31,127]],[.4127,[79,25,114]],[.4286,[73,21,100]],[.4444,[66,18,87]],[.4603,[59,17,75]],[.4762,[54,16,65]],[.4921,[50,17,58]],[.5079,[49,18,55]],[.5238,[55,17,56]],[.5397,[62,17,60]],[.5556,[70,18,64]],[.5714,[80,20,68]],[.5873,[90,22,72]],[.6032,[101,25,75]],[.619,[111,28,78]],[.6349,[122,32,79]],[.6508,[131,37,80]],[.6667,[141,44,80]],[.6825,[150,50,79]],[.6984,[157,58,79]],[.7143,[164,66,79]],[.7302,[170,75,80]],[.746,[176,84,81]],[.7619,[181,93,83]],[.7778,[186,102,87]],[.7937,[190,112,91]],[.8095,[193,121,96]],[.8254,[196,131,104]],[.8413,[199,142,113]],[.8571,[201,152,123]],[.873,[203,162,135]],[.8889,[206,171,148]],[.9048,[209,180,161]],[.9206,[212,189,175]],[.9365,[216,197,188]],[.9524,[219,205,201]],[.9683,[222,211,212]],[.9841,[224,215,220]],[1,[225,216,225]]]),"twilight dark (periodic)":n([[0,[47,19,55]],[.0159,[51,17,61]],[.0317,[56,16,70]],[.0476,[62,17,81]],[.0635,[69,19,93]],[.0794,[76,22,107]],[.0952,[82,27,120]],[.1111,[86,34,133]],[.127,[89,43,144]],[.1429,[91,52,153]],[.1587,[93,62,161]],[.1746,[93,73,168]],[.1905,[94,83,173]],[.2063,[94,92,178]],[.2222,[95,101,181]],[.2381,[96,110,184]],[.254,[98,119,186]],[.2698,[101,128,188]],[.2857,[104,136,190]],[.3016,[109,145,191]],[.3175,[115,153,193]],[.3333,[124,161,194]],[.3492,[132,169,195]],[.3651,[142,176,197]],[.381,[152,183,199]],[.3968,[164,190,202]],[.4127,[176,196,205]],[.4286,[188,202,209]],[.4444,[199,208,214]],[.4603,[210,213,218]],[.4762,[217,216,222]],[.4921,[223,217,225]],[.5079,[225,216,223]],[.5238,[223,213,216]],[.5397,[221,208,207]],[.5556,[217,201,195]],[.5714,[214,193,181]],[.5873,[210,185,168]],[.6032,[207,176,154]],[.619,[204,167,141]],[.6349,[202,157,129]],[.6508,[200,147,118]],[.6667,[197,136,108]],[.6825,[195,126,100]],[.6984,[192,116,93]],[.7143,[188,107,89]],[.7302,[184,97,85]],[.746,[179,88,82]],[.7619,[173,79,80]],[.7778,[167,70,79]],[.7937,[161,62,79]],[.8095,[154,54,79]],[.8254,[146,47,79]],[.8413,[136,40,80]],[.8571,[127,34,80]],[.873,[117,30,79]],[.8889,[106,26,77]],[.9048,[95,23,74]],[.9206,[85,21,70]],[.9365,[75,19,66]],[.9524,[66,17,61]],[.9683,[58,17,58]],[.9841,[52,17,55]],[1,[47,20,54]]]),"hsv (periodic)":n([[0,[165,38,38]],[.0159,[172,57,45]],[.0317,[179,76,52]],[.0476,[187,94,59]],[.0635,[194,113,66]],[.0794,[201,132,73]],[.0952,[208,151,80]],[.1111,[215,170,87]],[.127,[222,189,94]],[.1429,[229,208,102]],[.1587,[236,227,109]],[.1746,[237,239,113]],[.1905,[223,237,110]],[.2063,[208,234,106]],[.2222,[193,230,103]],[.2381,[177,227,99]],[.254,[158,222,95]],[.2698,[143,219,91]],[.2857,[127,215,88]],[.3016,[112,212,84]],[.3175,[97,208,81]],[.3333,[81,205,77]],[.3492,[77,204,85]],[.3651,[78,205,98]],[.381,[79,207,111]],[.3968,[80,208,124]],[.4127,[82,209,137]],[.4286,[83,210,150]],[.4444,[84,211,163]],[.4603,[85,213,176]],[.4762,[86,214,189]],[.4921,[87,215,202]],[.5079,[88,214,215]],[.5238,[81,195,208]],[.5397,[74,176,201]],[.5556,[67,157,194]],[.5714,[60,138,187]],[.5873,[52,120,180]],[.6032,[45,101,173]],[.619,[38,82,166]],[.6349,[31,63,159]],[.6508,[24,44,152]],[.6667,[17,25,145]],[.6825,[17,14,141]],[.6984,[33,17,144]],[.7143,[48,20,148]],[.7302,[63,24,152]],[.746,[79,28,155]],[.7619,[98,32,160]],[.7778,[113,36,163]],[.7937,[129,39,167]],[.8095,[144,43,170]],[.8254,[159,46,174]],[.8413,[173,49,176]],[.8571,[177,50,168]],[.873,[176,48,155]],[.8889,[175,47,142]],[.9048,[174,46,129]],[.9206,[172,45,116]],[.9365,[171,44,103]],[.9524,[170,42,90]],[.9683,[169,41,77]],[.9841,[168,40,64]],[1,[166,39,51]]])}},50112:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});class n{constructor(t){this._element=t,this._activeElement=null,this._open=!1;const e=document.createElement("div");document.body.appendChild(e),this.shadow=e.attachShadow({mode:"open"}),this.shadow.appendChild(this._element),this._backdrop=document.createElement("div"),this._backdrop.classList.add("modal-backdrop","fade"),this._element.addEventListener("click",(t=>{t.target===t.currentTarget&&this.close()}));for(const t of this._element.querySelectorAll('[data-bs-dismiss="modal"]'))t.addEventListener("click",(()=>{this.close()}));document.addEventListener("keydown",(t=>{"Escape"===t.key&&(t.preventDefault(),this.close())})),this._element.addEventListener("transitionend",(t=>{t.target!==t.currentTarget||this._open||this._element.style.setProperty("display","none")})),this._backdrop.addEventListener("transitionend",(()=>{this._open||(this._backdrop.remove(),this._activeElement&&this._activeElement instanceof HTMLElement&&this._activeElement.focus(),this._activeElement=null)}))}close(){this._backdrop.classList.remove("show"),this._element.classList.remove("show"),this._open=!1}open(){this._element.getRootNode().appendChild(this._backdrop),this._element.style.setProperty("display","block"),this._element.offsetHeight,this._backdrop.classList.add("show"),this._element.classList.add("show"),this._activeElement=i(),this._activeElement&&this._activeElement instanceof HTMLElement&&this._activeElement.blur(),this._open=!0}toggle(t=!this.open){t?this.open():this.close()}remove(){this.shadow.host.remove()}}function i(t=document){const e=t.activeElement;return(null==e?void 0:e.shadowRoot)?i(e.shadowRoot):e}},45127:(t,e,r)=>{"use strict";r.d(e,{Je:()=>s,W2:()=>l,qP:()=>a});var n=r(34961),i=r.n(n),o=r(91683);function a(t,e=""){return r=>{if(!t.includes(r))throw Error(`invalid property '${r}' for ${e}, are you sure the settings correspond to the current dataset?`)}}class s{constructor(t,e){this.type=t,this._value=e,this._previous_value=e,this._boundList=[],this.validate=()=>{},this.onchange=[],Object.preventExtensions(this)}get value(){return this._value}set value(t){this._update(t.toString(),"JS")}changed(t){for(const t of this._boundList)if("multival"===t.attribute){const e=this._value.split(","),r=t.element;for(const t of r.options)t.selected=e.includes(t.value)}else t.element[t.attribute]=this._value;for(const e of this.onchange)e(this._value,t)}reset(){this.value=this._previous_value}bind(t,e){let r;if("string"==typeof t&&(t=(0,o.VT)(t)),"multival"===e){r=t=>{i()(null!==t.target,"event.target !== null");const e=t.target,r=Array.from(e.options).filter((t=>t.selected)).map((t=>t.value));this._update(r.toString(),"DOM")};const e=this._value.split(",");for(const r of t.options)r.selected=e.includes(r.value)}else r=t=>{i()(null!==t.target,"event.target !== null"),this._update(t.target[e].toString(),"DOM")},t[e]=this._value;t.addEventListener("change",r),this._boundList.push({element:t,attribute:e,listener:r})}disable(){for(const t of this._boundList){const e=t.element;"disabled"in e&&(e.disabled=!0)}}enable(){for(const t of this._boundList){const e=t.element;"disabled"in e&&(e.disabled=!1)}}unbindAll(){for(const t of this._boundList)t.element.removeEventListener("change",t.listener);this._boundList=[]}_update(t,e){const r=function(t,e){if("string"===t)return e;if("int"===t)return parseInt(e,10);if("number"===t)return parseFloat(e);if("boolean"===t){if("false"===e)return!1;if("true"===e)return!0;throw Error(`invalid value for boolean: ${e}`)}throw Error(`unknown type '${t}' passed to parse`)}(this.type,t);this._value!==r&&(this.validate(r),this._previous_value=this.value,this._value=r,this.changed(e))}}class l{saveSettings(){const t={};return this.foreachOption(((e,r)=>{i()(e.length>=1,"keys.length >= 1");const n=r.value;if(void 0!==n||null!==n||!Number.isNaN(n)){let r=t;for(const t of e.slice(0,e.length-1))t in r||(r[t]={}),r=r[t];r[e[e.length-1]]=n}})),t}applySettings(t){const e=JSON.parse(JSON.stringify(t));this.foreachOption(((t,r)=>{i()(t.length>=1,"keys.length >= 1");let n,a=e;for(const e of t.slice(0,t.length-1)){if(!(e in a))return;n=a,a=a[e]}const s=t[t.length-1];if(s in a){const e=a[s];if(null==e||Number.isNaN(e))return void(0,o.R4)(`ignored setting '${s}' with invalid value '${e}'`);r.value=e,delete a[s],void 0!==n&&0===Object.keys(a).length&&(i()(t.length>=2,"keys.length >= 2"),delete n[t[t.length-2]])}})),0!==Object.keys(e).length&&(0,o.R4)(`ignored unknown settings '${JSON.stringify(e)}'`)}onSettingChange(t){this.foreachOption(((e,r)=>{r.onchange.push((r=>t(e,r)))}))}foreachOption(t){c(this,t,[])}}function c(t,e,r=[]){if(r.length>10)throw Error("setting object is too deep");for(const n in t){if(n.startsWith("_"))continue;const i=r.concat([n]),o=t[n];o instanceof s?e(i,o):"object"==typeof o&&null!==o&&c(o,e,i)}}},59838:(t,e,r)=>{"use strict";r.d(e,{O:()=>h});var n=r(34961),i=r.n(n),o=r(88862),a=r(50112),s=r(45127),l=r(91683),c=r(17136),u=r(90170);class h extends s.W2{constructor(t,e,r=[]){super(),this.bonds=new s.Je("boolean",!0),this.atoms=new s.Je("boolean",!0),this.spaceFilling=new s.Je("boolean",!1),this.atomLabels=new s.Je("boolean",!1),this.shape=new s.Je("string",""),this.unitCell=new s.Je("boolean",!1),this.rotation=new s.Je("boolean",!1),this.supercell=[new s.Je("int",1),new s.Je("int",1),new s.Je("int",1)];const n=t=>{if(!(Number.isInteger(t)&&t>0))throw Error("supercell count should be a positive integer")};this.supercell[0].validate=n,this.supercell[1].validate=n,this.supercell[2].validate=n,this.axes=new s.Je("string","off"),this.axes.validate=(0,s.qP)(["off","abc","xyz"],"axes"),this.keepOrientation=new s.Je("boolean",!1),this.playbackDelay=new s.Je("number",700),this.environments={activated:new s.Je("boolean",!0),bgColor:new s.Je("string","grey"),bgStyle:new s.Je("string","ball-stick"),center:new s.Je("boolean",!1),cutoff:new s.Je("number",4)},this.color={property:new s.Je("string","element"),min:new s.Je("number",0),max:new s.Je("number",0),transform:new s.Je("string","linear"),palette:new s.Je("string","bwr")},r.includes("element")?this.color.property.validate=(0,s.qP)(r,"color"):this.color.property.validate=(0,s.qP)(r.concat(["element"]),"color"),this.color.transform.validate=(0,s.qP)(["linear","log","sqrt","inverse"],"transform"),this.color.palette.validate=(0,s.qP)(Object.keys(c.s),"palette"),this.environments.bgColor.validate=(0,s.qP)(["grey","CPK","property"],"background atoms coloring"),this.environments.bgStyle.validate=(0,s.qP)(["ball-stick","licorice","hide"],"background atoms style"),this.environments.cutoff.validate=t=>{if(t<0)throw Error("cutoff should be a positive number")},this._positionSettingsModal=e;const{openModal:i,modal:o}=this._createSettingsHTML();this._modal=o,this._modal.shadow.adoptedStyleSheets=t.getRootNode().adoptedStyleSheets,this._openModal=i,t.appendChild(this._openModal),this._bind(r)}getModalElement(t){return(0,l.VT)(t,this._modal.shadow)}get modal(){return this._modal}remove(){this._modal.remove(),this._openModal.remove()}applySettings(t){"packedCell"in t&&(!1!==t.packedCell&&(0,l.R4)("packedCell option has been removed, but it is set to true in the settings"),delete t.packedCell),super.applySettings(t)}_createSettingsHTML(){const t=document.createElement("template");t.innerHTML=`\n
${u.A}
\n `;const e=t.content.firstChild;t.innerHTML='\n';const r=t.content.querySelector(".modal");i()(null!==r&&r instanceof HTMLElement,"modalElement !== null && modalElement instanceof HTMLElement");const n=r.querySelector(".modal-dialog");i()(null!==n&&n instanceof HTMLElement,"modalDialog !== null && modalDialog instanceof HTMLElement"),e.addEventListener("click",(()=>{if(null===n.getAttribute("data-initial-modal-positions-set")){n.setAttribute("data-initial-modal-positions-set","true"),n.parentNode.style.display="block";const{top:t,left:e}=this._positionSettingsModal(n.getBoundingClientRect());n.style.width=n.offsetWidth/1.5+"px",n.style.minWidth="500px",n.style.margin="0",n.style.position="fixed",n.style.top=`${t}px`,n.style.left=`${e}px`}s.open()})),(0,l.eB)(n,".modal-header"),r.addEventListener("keydown",(t=>t.stopPropagation()));const s=new a.A(r);return o.A.initialize(r),{modal:s,openModal:e}}_bind(t){this.atomLabels.bind(this.getModalElement("atom-labels"),"checked");const e=this.getModalElement("shapes");this.shape.bind(e,"multival"),this.spaceFilling.bind(this.getModalElement("space-filling"),"checked"),this.bonds.bind(this.getModalElement("bonds"),"checked"),this.atoms.bind(this.getModalElement("atoms"),"checked"),this.rotation.bind(this.getModalElement("rotation"),"checked"),this.unitCell.bind(this.getModalElement("unit-cell"),"checked"),this.supercell[0].bind(this.getModalElement("supercell-a"),"value"),this.supercell[1].bind(this.getModalElement("supercell-b"),"value"),this.supercell[2].bind(this.getModalElement("supercell-c"),"value");const r=this.getModalElement("atom-color-property");r.options.length=0,t.includes("element")||r.options.add(new Option("element","element"));for(const e of t)r.options.add(new Option(e,e));this.color.property.bind(r,"value"),this.color.transform.bind(this.getModalElement("atom-color-transform"),"value"),this.color.min.bind(this.getModalElement("atom-color-min"),"value"),this.color.max.bind(this.getModalElement("atom-color-max"),"value");const n=this.getModalElement("atom-color-palette");n.options.length=0;for(const t in c.s)n.options.add(new Option(t,t));this.color.palette.bind(n,"value"),this.axes.bind(this.getModalElement("axes"),"value"),this.keepOrientation.bind(this.getModalElement("keep-orientation"),"checked"),this.playbackDelay.bind(this.getModalElement("playback-delay"),"value"),this.environments.activated.bind(this.getModalElement("env-activated"),"checked"),this.environments.bgColor.bind(this.getModalElement("env-bg-color"),"value"),this.environments.bgStyle.bind(this.getModalElement("env-bg-style"),"value"),this.environments.cutoff.bind(this.getModalElement("env-cutoff"),"value"),this.environments.center.bind(this.getModalElement("env-center"),"checked")}}},14761:(t,e,r)=>{"use strict";r.d(e,{C1:()=>b,N2:()=>k,Nh:()=>_,T:()=>x,i3:()=>y,iy:()=>v});var n=r(34961),i=r.n(n),o=r(37821);function a(t,e){return{x:t.x+e.x,y:t.y+e.y,z:t.z+e.z}}function s(t,e){return{x:t.x-e.x,y:t.y-e.y,z:t.z-e.z}}function l(t,e){return{x:t.x*e,y:t.y*e,z:t.z*e}}function c(t,e){return t.x*e.x+t.y*e.y+t.z*e.z}function u(t,e){return{x:t.y*e.z-t.z*e.y,y:t.z*e.x-t.x*e.z,z:t.x*e.y-t.y*e.x}}function h(t,e,r){const n=new o.Quaternion(t.x,t.y,t.z,0);return n.multiplyQuaternions(e.clone(),n),n.multiply(e.clone().inverse()),a({x:n.x,y:n.y,z:n.z},r)}function d(t,e){const r=[],n=[];for(let e=0;e1e-6)throw Error(`orientation must be normalized to 1 for "${e}" shapes`);return""}function g(t){return"number"==typeof t&&Number.isInteger(t)&&t>=0}class v extends f{constructor(t){super(t),this.radius=(t.radius||1)*this.scale}static validateParameters(t){return"radius"in t?"orientation"in t?'"orientation" has no effect on a sphere shape':"number"!=typeof t.radius?'"radius" must be a number in "sphere" shape':"":'"radius" is required for "sphere" shapes'}outputTo3Dmol(t,e=20){const r=p([this.radius,this.radius,this.radius],e),n=r.vertices,i=r.indices,o=[],s=[];for(const t of n){const e=a(t,this.position);o.push(e);const r={x:t.x/Math.pow(this.radius,2),y:t.y/Math.pow(this.radius,2),z:t.z/Math.pow(this.radius,2)};s.push(r)}return{vertexArr:o,normalArr:s,faceArr:i,color:t}}}class b extends f{constructor(t){super(t),i()(t.semiaxes,"data.semiaxes"),this.semiaxes=[this.scale*t.semiaxes[0],this.scale*t.semiaxes[1],this.scale*t.semiaxes[2]]}static validateParameters(t){if(!("semiaxes"in t))return'"semiaxes" is required for "ellipsoid" shapes';if(!Array.isArray(t.semiaxes)||3!==t.semiaxes.length)return'"semiaxes" must be an array with 3 elements for "ellipsoid" shapes';const[e,r,n]=t.semiaxes;if("number"!=typeof e||"number"!=typeof r||"number"!=typeof n)return'"semiaxes" elements must be numbers for "ellipsoid" shapes';if("orientation"in t){const e=m(t.orientation,"ellipsoid");if(""!==e)return e}return""}outputTo3Dmol(t,e=20){const r=p(this.semiaxes,e),n=r.vertices,i=r.indices,o=[],a=[];for(const t of n){const e=h(t,this.orientation,this.position);o.push(e);const r=h({x:t.x/Math.pow(this.semiaxes[0],2),y:t.y/Math.pow(this.semiaxes[1],2),z:t.z/Math.pow(this.semiaxes[2],2)},this.orientation,{x:0,y:0,z:0});a.push(r)}return{vertexArr:o,normalArr:a,faceArr:i,color:t}}}class y extends f{constructor(t){super(t),i()(t.vector,"data.vector"),this.vector=[this.scale*t.vector[0],this.scale*t.vector[1],this.scale*t.vector[2]],this.baseRadius=this.scale*(t.baseRadius||.1),this.headRadius=this.scale*(t.headRadius||.15),this.headLength=this.scale*(t.headLength||.2)}static validateParameters(t){if(!("vector"in t))return'"vector" is required for "arrow" shapes';if(!Array.isArray(t.vector)||3!==t.vector.length)return'"vector" must be an array with 3 elements for "vector" shapes';const[e,r,n]=t.vector;return"number"!=typeof e||"number"!=typeof r||"number"!=typeof n?'"vector" elements must be numbers for "vector" shapes':"orientation"in t?'"orientation" cannot be used on "arrow" shapes. define "vector" instead':""}outputTo3Dmol(t,e=20){const r=function(t,e,r,n,i=20){const[o,s,h]=t,d={x:o,y:s,z:h},f=Math.sqrt(o*o+s*s+h*h);n>f&&(n=f);const p={x:d.x*(1-n/f),y:d.y*(1-n/f),z:d.z*(1-n/f)},m=l(d,1/f);let g;g=0!==m.x||0!==m.y?{x:0,y:0,z:1}:{x:0,y:1,z:0};let v=a(g,l(m,-c(g,m)));v=l(v,1/Math.sqrt(c(v,v)));const b=u(v,m),y=[];for(let t=0;t=w&&(r.addCustom(t),t.vertexArr.length=0,Array.isArray(t.normalArr)&&(t.normalArr.length=0),Array.isArray(t.faceArr)&&(t.faceArr.length=0),Array.isArray(t.color)&&(t.color.length=0)),t.faceArr&&e.faceArr&&t.vertexArr){const r=null!==(n=t.vertexArr.length)&&void 0!==n?n:0,i=e.faceArr.map((t=>t+r));t.faceArr.push(...i)}if(t.vertexArr&&e.vertexArr&&(null===(i=t.vertexArr)||void 0===i||i.push(...e.vertexArr)),t.normalArr&&e.normalArr&&(null===(o=t.normalArr)||void 0===o||o.push(...e.normalArr)),e.vertexArr&&Array.isArray(t.color)){const r=e.color&&!Array.isArray(e.color)?e.color:16777215,n=Array(null!==(a=e.vertexArr.length)&&void 0!==a?a:0).fill(r);t.color.push(...n)}}},79352:(t,e,r)=>{"use strict";r.d(e,{MoleculeViewer:()=>v});var n=r(34961),i=r.n(n),o=r(37821);const a={H:.37,He:.32,Li:1.34,Be:.9,B:.82,C:.77,N:.75,O:.73,F:.71,Ne:.69,Na:1.54,Mg:1.3,Al:1.18,Si:1.11,P:1.06,S:1.02,Cl:.99,Ar:.97,K:1.96,Ca:1.74,Sc:1.44,Ti:1.56,V:1.25,Mn:1.39,Fe:1.25,Co:1.26,Ni:1.21,Cu:1.38,Zn:1.31,Ga:1.26,Ge:1.22,Se:1.16,Br:1.14,Kr:1.1,Rb:2.11,Sr:1.92,Y:1.62,Zr:1.48,Nb:1.37,Mo:1.45,Tc:1.56,Ru:1.26,Rh:1.35,Pd:1.31,Ag:1.53,Cd:1.48,In:1.44,Sn:1.41,Sb:1.38,Te:1.35,I:1.33,Xe:1.3,Cs:2.25,Ba:1.98,Lu:1.6,Hf:1.5,Ta:1.38,W:1.46,Re:1.59,Os:1.44,Ir:1.37,Pt:1.28,Au:1.44,Hg:1.49,Tl:1.48,Pb:1.47,Bi:1.46,Rn:1.45};function s(t){return a[t]||1.6}function l(t,e){if("X"===t.elem||"X"===e.elem)return!1;let r=s(t.elem)+s(e.elem);r+=.25,r*=r;let n=t.x-e.x;if(n*=n,n>r)return!1;let i=t.y-e.y;if(i*=i,i>r)return!1;let o=t.z-e.z;if(o*=o,o>r)return!1;const a=n+i+o;return!(isNaN(a)||a<.5||a>r)}function c(t,e){for(let r=0;r-1&&-1===navigator.userAgent.indexOf("CriOS")&&-1===navigator.userAgent.indexOf("FxiOS");function g(){return m?.87:.7}class v{constructor(t,e){const r=(0,h.V6)(t),n=document.createElement("div");r.appendChild(n),n.style.setProperty("height","100%"),this._shadow=n.attachShadow({mode:"open"}),this._root=document.createElement("div"),this._shadow.appendChild(this._root),this._root.style.position="relative",this._root.style.width="100%",this._root.style.height="100%";const a=o.createViewer(this._root,{antialias:!0,defaultcolors:o.elementColors.Jmol,backgroundColor:"0xffffff",backgroundAlpha:0,disableFog:!0,orthographic:!0});if(void 0===a)throw Error("unable to create WebGL canvas");this._viewer=a,this.onselect=()=>{},this._cellInfo=document.createElement("span"),this._cellInfo.classList.add("chsp-cell-info","chsp-hide-if-no-cell","badge","bg-light","text-dark"),this._root.appendChild(this._cellInfo);const s=new CSSStyleSheet,l=new CSSStyleSheet,c=new CSSStyleSheet,u=new CSSStyleSheet;this._styles={noCell:s,noEnvs:l,noShape:c,noProperties:u},this._shadow.adoptedStyleSheets=[...r.getRootNode().adoptedStyleSheets,s,l,c,u],this._options=new f.O(this._root,(t=>this.positionSettingsModal(t)),e),this._options.modal.shadow.adoptedStyleSheets=[...this._options.modal.shadow.adoptedStyleSheets,s,l,c,u],this._colorReset=this._options.getModalElement("atom-color-reset"),this._colorMoreOptions=this._options.getModalElement("atom-color-more-options"),this._colorMoreOptions.disabled=!0,this._connectOptions(),this._trajectoryOptions=this._options.getModalElement("trajectory-settings-group"),this.positionSettingsModal=t=>{const e=this._root.getBoundingClientRect();return{left:e.left+e.width/2-t.width/2,top:e.top+20}},this._root.addEventListener("wheel",(t=>{if(t.isTrusted){t.preventDefault(),t.stopImmediatePropagation();const e=new Event("wheel");Object.assign(e,{ctrlKey:!0,detail:t.detail,wheelDelta:t.wheelDelta,pageX:t.pageX,pageY:t.pageY}),i()(t.target,"event.target"),t.target.dispatchEvent(e)}}),{capture:!0}),window.addEventListener("resize",(()=>this.resize())),window.requestAnimationFrame((()=>{window.dispatchEvent(new Event("resize"))}))}refreshOptions(t,e){const r=this._options.modal.shadow.adoptedStyleSheets;this._options.remove(),this._options=new f.O(this._root,(t=>this.positionSettingsModal(t)),e),this._options.modal.shadow.adoptedStyleSheets=r,this._colorReset=this._options.getModalElement("atom-color-reset"),this._colorMoreOptions=this._options.getModalElement("atom-color-more-options"),this._trajectoryOptions=this._options.getModalElement("trajectory-settings-group"),this._colorReset.disabled=!0,this._colorMoreOptions.disabled=!0,this._connectOptions(),t?this._options.environments.activated.enable():this._options.environments.activated.disable()}remove(){null!==this._root.parentElement&&(this._root.parentElement.innerHTML=""),this._options.remove()}resize(){this._viewer.resize(),this._updateColorBar()}natoms(){return void 0===this._current?void 0:this._current.structure.size}set environments(t){this._environments=t}load(t,e,r={},n){let a,s,l,c,h;if(this.resize(),this._properties=e,void 0!==this._highlighted&&(a=this._defaultCutoff(this._highlighted.center)),this._environments=r.environments,s=void 0===r.keepOrientation?this._options.keepOrientation.value:r.keepOrientation,void 0===r.supercell?[l,c,h]=[this._options.supercell[0].value,this._options.supercell[1].value,this._options.supercell[2].value]:([l,c,h]=r.supercell,this._options.supercell[0].value=l,this._options.supercell[1].value=c,this._options.supercell[2].value=h),void 0===this._initialSupercell&&(this._initialSupercell=[l,c,h],this._resetSupercell.innerHTML=`reset ${l}x${c}x${h} supercell`),void 0===t.cell?this._styles.noCell.replaceSync(".chsp-hide-if-no-cell { display: none; }"):this._styles.noCell.replaceSync(""),this._showSupercellInfo(),void 0!==r.trajectory&&r.trajectory?this._trajectoryOptions.style.display="block":this._trajectoryOptions.style.display="none",this._options.unitCell.value&&void 0!==this._current&&this._viewer.removeUnitCell(this._current.model),this._viewer.removeAllModels(),void 0!==this._current)for(const t of this._current.atomLabels)this._viewer.removeLabel(t);void 0!==this._highlighted&&(this._viewer.removeModel(this._highlighted.model),this._highlighted=void 0),this._current={model:this._viewer.addModel(),structure:t,atomLabels:[]},function(t,e){if(void 0!==e.cell){const r=e.cell,n=new o.Matrix3(r[0],r[3],r[6],r[1],r[4],r[7],r[2],r[5],r[8]);t.setCrystMatrix(n)}const r=[];for(let t=0;t{n&&n()}))}_setEnvironmentInteractions(){if(void 0===this._environments)return;const t=this._environments.filter((t=>void 0!==t)).map((t=>t.center));for(const t of this._viewer.selectedAtoms({}))t.clickable=!1,t.hoverable=!1;i()(void 0!==this._current,"this._current !== undefined"),this._viewer.setClickable({model:this._current.model,index:t},!0,(t=>this._selectAtom(t))),this._setHoverable(t)}highlight(t){let e;void 0!==this._highlighted&&(e=this._defaultCutoff(this._highlighted.center)),this._changeHighlighted(t,e),this._updateStyle();const r=this._options.environments.center.value;void 0!==this._highlighted&&r&&(this._options.keepOrientation.value||this._resetView(),this._centerView()),this._viewer.render()}applySettings(t){this._options.applySettings(t)}saveSettings(){return this._options.saveSettings()}onSettingChange(t){this._options.onSettingChange(t)}exportPNG(){return this._viewer.pngURI()}_setHoverable(t){i()(void 0!==this._current,"this._current !== undefined"),this._viewer.setHoverDuration(0);const e=this.natoms();i()(void 0!==e,"n_atoms !== undefined");const r=new Map;this._viewer.setHoverable({model:this._current.model,index:t},!0,(t=>{if(i()(void 0!==t.index,"atom.index !== undefined"),void 0!==r.get(t.index))return;const e=this._viewer.addModel();e.addAtoms([t]),e.setStyle({},this._centralStyle(.3));const n=e.selectedAtoms({});n[0].clickable=!1,n[0].hoverable=!1,r.set(t.index,e),this._viewer.render()}),(t=>{i()(void 0!==t.index,"atom.index !== undefined");const e=r.get(t.index);void 0!==e&&(this._viewer.removeModel(e),r.delete(t.index),this._viewer.render())}))}_connectOptions(){const t=()=>{this._updateStyle(),this._viewer.render()};this._options.spaceFilling.onchange.push(t),this._options.bonds.onchange.push(t),this._options.atoms.onchange.push(t),this._options.atomLabels.onchange.push((t=>{if(void 0!==this._current)if(t){i()(0===this._current.atomLabels.length,"this._current.atomLabels.length === 0");const t=this._current.structure;for(let e=0;ethis._addAxes(t))),this._options.rotation.onchange.push((t=>{t?this._viewer.spin("vy"):this._viewer.spin(!1)})),this._options.unitCell.onchange.push((t=>{void 0!==this._current&&(t?this._viewer.addUnitCell(this._current.model,{box:{color:"black"},astyle:{hidden:!0},bstyle:{hidden:!0},cstyle:{hidden:!0}}):this._viewer.removeUnitCell(this._current.model),this._viewer.render())})),this._options.shape.onchange.push((()=>{void 0!==this._current&&(this._updateStyle(),this._viewer.render())}));const e=()=>{if(this._showSupercellInfo(),void 0===this._current)return;const t=this._current.model.selectedAtoms({});this._current.model.removeAtoms(t.splice(this._current.structure.size));const e=this._options.supercell[0].value,r=this._options.supercell[1].value,n=this._options.supercell[2].value;if(1===e&&1===r&&1===n||this._viewer.replicateUnitCell(this._options.supercell[0].value,this._options.supercell[1].value,this._options.supercell[2].value,this._current.model),u(this._current.model.selectedAtoms({})),void 0!==this._highlighted){const t=this._defaultCutoff(this._highlighted.center);this._changeHighlighted(this._highlighted.center,t)}this._environmentsEnabled()&&this._setEnvironmentInteractions(),this._updateStyle(),this._viewer.render()};this._options.supercell[0].onchange.push(e),this._options.supercell[1].onchange.push(e),this._options.supercell[2].onchange.push(e),this._options.environments.bgColor.onchange.push(t),this._options.environments.bgStyle.onchange.push(t),this._options.environments.cutoff.onchange.push((()=>{if(void 0!==this._highlighted){const t=this._defaultCutoff(this._highlighted.center);this._changeHighlighted(this._highlighted.center,t)}t()})),this._options.environments.center.onchange.push((t=>{this._options.keepOrientation.value||this._resetView(),t&&this._centerView(),this._viewer.render()})),this._options.environments.activated.onchange.push((e=>{if(this._enableEnvironmentSettings(e),e){i()(void 0!==this._lastHighlighted,"this._lastHighlighted !== undefined"),this._options.environments.cutoff.value=this._lastHighlighted.cutoff;const t=this._lastHighlighted.center,e=this._defaultCutoff(t);this._changeHighlighted(t,e)}else i()(void 0!==this._highlighted,"this._highlighted !== undefined"),this._viewer.removeModel(this._highlighted.model),this._lastHighlighted={center:this._highlighted.center,cutoff:this._options.environments.cutoff.value};t()})),this._options.color.property.onchange.push((()=>{const e=this._options.color.property.value;if("element"!==e){this._options.color.transform.enable(),this._options.color.transform.value="linear",this._options.color.min.enable(),this._options.color.max.enable(),this._colorReset.disabled=!1,this._colorMoreOptions.disabled=!1,this._options.color.palette.enable();const t=this._colorValues(e,"linear");t.some((t=>null===t))&&(0,h.R4)("The selected structure has undefined properties for some atoms, these atoms will be colored in light gray.");const{max:r,min:n}=(0,h.GI)(t);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=r,this._options.color.min.value=n,this._setScaleStep([n,r])}else this._options.color.transform.disable(),this._options.color.min.disable(),this._options.color.max.disable(),this._options.getModalElement("atom-color-extra").classList.contains("show")&&this._colorMoreOptions.click(),this._colorReset.disabled=!0,this._colorMoreOptions.disabled=!0,this._options.color.palette.disable(),this._viewer.setColorByElement({},o.elementColors.Jmol);this._updateColorBar(),t()}));const r=e=>{const r=this._options.color.min.value,n=this._options.color.max.value;if(r>n)return(0,h.R4)("The inserted min and max values in color are such that min > max! The last inserted value was reset."),void("min"===e?this._options.color.min.reset():this._options.color.max.reset());this._setScaleStep([r,n]),this._updateColorBar(),t()};this._options.color.transform.onchange.push((()=>{const e=this._options.color.property.value;i()("element"!==e,"property !== 'element'");const r=this._options.color.transform.value,n=this._colorValues(e,r),{min:o,max:a}=(0,h.GI)(n);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=a,this._options.color.min.value=o,this._setScaleStep([o,a]),this._updateColorBar(),t()})),this._options.color.min.onchange.push((()=>{r("min"),t()})),this._options.color.max.onchange.push((()=>{r("max"),t()})),this._colorReset.addEventListener("click",(()=>{const e=JSON.parse(JSON.stringify(this._properties))[this._options.color.property.value].filter((t=>!isNaN(Number(t)))),[r,n]=[Math.min(...e),Math.max(...e)];this._options.color.min.value=r,this._options.color.max.value=n,this._setScaleStep([r,n]),this._updateColorBar(),t()})),this._options.color.palette.onchange.push((()=>{this._updateColorBar(),t()})),this._resetEnvCutoff=this._options.getModalElement("env-reset"),this._resetEnvCutoff.onclick=()=>{i()(void 0!==this._highlighted,"this._highlighted !== undefined"),this._options.environments.cutoff.value=this._defaultCutoff(this._highlighted.center),t()},this._options.getModalElement("align-x").onclick=()=>this._viewAlong([1,0,0]),this._options.getModalElement("align-y").onclick=()=>this._viewAlong([0,1,0]),this._options.getModalElement("align-z").onclick=()=>this._viewAlong([0,0,1]),this._options.getModalElement("align-a").onclick=()=>{if(void 0===this._current||void 0===this._current.structure.cell)return;const t=this._current.structure.cell,e=[t[0],t[1],t[2]];this._viewAlong(e)},this._options.getModalElement("align-b").onclick=()=>{if(void 0===this._current||void 0===this._current.structure.cell)return;const t=this._current.structure.cell,e=[t[3],t[4],t[5]];this._viewAlong(e)},this._options.getModalElement("align-c").onclick=()=>{if(void 0===this._current||void 0===this._current.structure.cell)return;const t=this._current.structure.cell,e=[t[6],t[7],t[8]];this._viewAlong(e)},this._resetSupercell=this._options.getModalElement("reset-supercell"),this._resetSupercell.onclick=()=>{i()(void 0!==this._initialSupercell,"this._initialSupercell !== undefined"),this._options.supercell[0].value=this._initialSupercell[0],this._options.supercell[1].value=this._initialSupercell[1],this._options.supercell[2].value=this._initialSupercell[2]},this._root.ondblclick=()=>{this._resetView(),this._options.environments.center.value&&this._centerView(),this._viewer.render()}}_selectAtom(t){i()(void 0!==t.serial,"atom.serial !== undefined"),this.onselect(t.serial)}_updateStyle(){void 0!==this._current&&(""!==this._options.shape.value&&this._addShapes(),this._environmentsEnabled()?(i()(void 0!==this._highlighted,"this._highlighted !== undefined"),this._current.model.setStyle({},this._hiddenStyle()),this._current.model.setStyle({index:this._highlighted.center},this._centralStyle(.4),!0),this._highlighted.model.setStyle({},this._mainStyle())):this._current.model.setStyle({},this._mainStyle()))}_addAxes(t){if(void 0!==this._axes&&(this._viewer.removeShape(this._axes[0].arrow),this._viewer.removeLabel(this._axes[0].label),this._viewer.removeShape(this._axes[1].arrow),this._viewer.removeLabel(this._axes[1].label),this._viewer.removeShape(this._axes[2].arrow),this._viewer.removeLabel(this._axes[2].label),this._axes=void 0),"off"===t);else if("xyz"===t)this._axes=[this._addLabeledArrow([2,0,0],"red","X"),this._addLabeledArrow([0,2,0],"green","Y"),this._addLabeledArrow([0,0,2],"blue","Z")];else if("abc"===t){if(void 0===this._current||void 0===this._current.structure.cell)return;const t=this._current.structure.cell,e=[t[0],t[1],t[2]],r=[t[3],t[4],t[5]],n=[t[6],t[7],t[8]];this._axes=[this._addLabeledArrow(e,"red","A"),this._addLabeledArrow(r,"green","B"),this._addLabeledArrow(n,"blue","C")]}this._viewer.render()}_addShapes(){if(void 0===this._current)return;if(""===this._options.shape.value)return;this._viewer.removeAllShapes(),this._options.unitCell.value&&this._viewer.addUnitCell(this._current.model,{box:{color:"black"},astyle:{hidden:!0},bstyle:{hidden:!0},cstyle:{hidden:!0}}),this._addAxes(this._options.axes.value),i()(0===this._current.atomLabels.length,"this._current.atomLabels.length === 0");const t=this._current.structure;i()(!(void 0===t.shapes),"!(structure.shapes === undefined)");const e=this._options.shape.value.split(","),r={vertexArr:[],normalArr:[],faceArr:[],color:[]},n=this._colorFunction(),a={};for(const s of e){if(""===s)continue;i()(s in t.shapes,"shape in structure.shapes");const e=t.shapes[s];let l=this._options.supercell[0].value,c=this._options.supercell[1].value,u=this._options.supercell[2].value,h=this._current.structure.cell;void 0===h&&(h=[1,0,0,0,1,0,0,0,1],(l>1||c>1||u>1)&&(l=1,c=1,u=1));for(let s=0;s0&&this._viewer.addCustom(r),this._viewer.render()}_mainStyle(){const t={};return this._options.atoms.value&&(t.sphere={scale:this._options.spaceFilling.value?1:.22,colorfunc:this._colorFunction()}),this._options.bonds.value&&(t.stick={radius:.15,colorfunc:this._colorFunction()}),t}_colorValues(t,e){i()(void 0!==this._properties,"this._properties !== undefined"),i()(Object.keys(this._properties).includes(t),"Object.keys(this._properties).includes(property)");let r=JSON.parse(JSON.stringify(this._properties[t])),n=t=>t;return"log"===e?n=Math.log10:"sqrt"===e?n=Math.sqrt:"inverse"===e&&(n=t=>1/t),r=r.map((t=>null===t||isNaN(t)?t:n(t))),r}_colorFunction(){if(void 0===this._properties)return;const t=this._options.color.property.value;if("element"===t)return;const e=this._options.color.transform.value,r=this._colorValues(t,e),n=this._options.color.min.value,a=this._options.color.max.value,s=p.s[this._options.color.palette.value],l=[];for(let t=0;t{i()(void 0!==t.serial,"atom.serial !== undefined");const e=r[t.serial];return null===e?14540253:isNaN(e)?2236962:Number.isFinite(n)&&Number.isFinite(a)?c.valueToHex(e):2236962}}_hiddenStyle(){const t={},e=this._options.environments.bgStyle.value;"hide"===e||("licorice"===e||"ball-stick"===e?(t.stick={radius:.149,opacity:g(),hidden:!this._options.bonds.value},"ball-stick"===e&&""===this._options.shape.value&&(t.sphere={scale:this._options.spaceFilling.value?.999:.219,opacity:g()})):(0,h.HB)());const r=this._options.environments.bgColor.value;return"CPK"===r||("grey"===r?(void 0!==t.stick&&(t.stick.color=8421504),void 0!==t.sphere&&(t.sphere.color=8421504)):"property"===r?(void 0!==t.stick&&(t.stick={radius:.149,opacity:g(),hidden:!this._options.bonds.value,colorfunc:this._colorFunction()}),void 0!==t.sphere&&(t.sphere={scale:this._options.spaceFilling.value?.999:.219,opacity:g(),colorfunc:this._colorFunction()})):(0,h.HB)()),t}_centralStyle(t){return{sphere:{scale:t,color:"green",opacity:g()}}}_showSupercellInfo(){const t=this._options.supercell[0].value,e=this._options.supercell[1].value,r=this._options.supercell[2].value;this._cellInfo.innerText=1!==t||1!==e||1!==r?`${t}x${e}x${r} supercell`:""}_environmentsEnabled(){return void 0!==this._highlighted&&!this._resetEnvCutoff.disabled}_enableEnvironmentSettings(t){const e=this._options.getModalElement("env-activated").nextElementSibling;i()(null!==e,"toggle !== null");const r=this._resetEnvCutoff;if(t){if(this._environmentsEnabled())return;r.disabled=!1,e.innerText="Disable",this._options.environments.cutoff.enable(),this._options.environments.bgStyle.enable(),this._options.environments.bgColor.enable()}else{if(!this._environmentsEnabled())return;r.disabled=!0,e.innerText="Enable",this._options.environments.cutoff.disable(),this._options.environments.bgStyle.disable(),this._options.environments.bgColor.disable()}}_defaultCutoff(t){i()(void 0!==this._environments,"this._environments !== undefined");const e=this._environments[t];return i()(void 0!==e,"environment !== undefined"),e.cutoff}_changeHighlighted(t,e){if(void 0!==this._highlighted&&this._viewer.removeModel(this._highlighted.model),void 0===t)this._options.environments.cutoff.value=0,this._highlighted=void 0;else{if(void 0===this._environments)throw Error("can not highlight an atom without having a list of environments");const r=this._environments[t];if(void 0===r)throw Error(`can not highlight atom ${t}: it is not part of the list of environments`);const n=this._options.environments.cutoff.value;void 0!==e&&e!==n||(this._options.environments.cutoff.value=r.cutoff);const i={or:[{index:t},{within:{distance:this._options.environments.cutoff.value,sel:{index:t}}}]};this._highlighted={model:this._viewer.createModelFrom(i),center:t},this._highlighted.model.setStyle({},this._mainStyle())}}_resetView(){this._viewer.zoomTo(),this._viewer.zoom(2),this._viewer.setSlab(-1e3,1e3)}_centerView(){void 0!==this._highlighted&&void 0!==this._current&&this._viewer.center({index:this._highlighted.center,model:this._current.model})}_viewAlong(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]),r=Math.acos(t[2]/e),n=[t[1]/e*Math.sin(r/2),-t[0]/e*Math.sin(r/2),0,Math.cos(r/2)],i=this._viewer.getView();i[4]=n[0],i[5]=n[1],i[6]=n[2],i[7]=n[3],this._viewer.setView(i)}_addLabeledArrow(t,e,r){const n=new o.Vector3(t[0],t[1],t[2]);return{arrow:this._viewer.addArrow({start:new o.Vector3(0,0,0),end:n,radius:.1,color:e,midpos:-1}),label:this._viewer.addLabel(r,{position:n,inFront:!0,fontColor:"black",fontSize:14,showBackground:!1})}}_setScaleStep(t){if(void 0!==t){const e=Math.round((t[1]-t[0])/20*Math.pow(10,10))/Math.pow(10,10),r=this._options.getModalElement("atom-color-min"),n=this._options.getModalElement("atom-color-max");r.step=`${e}`,n.step=`${e}`}}_colorTitle(){let t=this._options.color.property.value;switch(this._options.color.transform.value){case"inverse":t=`(${t})⁻¹`;break;case"log":t=`log10(${t})`;break;case"sqrt":t=`√(${t})`}return t}_addColorBar(){var t,e;const r=this._options.color.palette.value,n=this._colorTitle(),a=null===(t=this._viewer.container)||void 0===t?void 0:t.clientWidth,s=null===(e=this._viewer.container)||void 0===e?void 0:e.clientHeight;i()(void 0!==a&&void 0!==s,"viewerWidth !== undefined && viewerHeight !== undefined");const l=s-80,c=document.createElement("canvas");c.width=20,c.height=l;const u=p.s[r],h=c.getContext("2d");if(!h)throw new Error("Could not get 2D context from canvas");const d=h.createLinearGradient(0,l,0,0);for(let t=0;t0){if(t<1e4&&t>.009){if(Number.isInteger(t))return t.toString();{let e=t.toFixed(3).substring(0,4);return"."===e[3]&&(e=e.substring(0,3)),e}}return t.toExponential(0).replace("+","")}if(t>-1e3&&t<-.09){if(Number.isInteger(t))return t.toString();{let e=t.toFixed(3).substring(0,4);return"."===e[3]&&(e=e.substring(0,3)),e}}return t.toExponential(0).replace("+","")}},91683:(t,e,r)=>{"use strict";r.d(e,{eK:()=>l,GI:()=>m,El:()=>b,HL:()=>f,Nl:()=>h,VT:()=>d,V6:()=>v,o:()=>p,Lz:()=>u,eB:()=>o,R4:()=>s,HB:()=>g});var n=r(34961),i=r.n(n);function o(t,e){const r=t.querySelector(e);if(null===r)throw Error(`no element matching '${e}'`);const n=e=>{const r=t.dragOffset;i()(void 0!==r,"offset !== undefined");const n=e.clientX-r.x,o=e.clientY-r.y;t.style.left=`${n}px`,t.style.top=`${o}px`},o=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",o)};r.addEventListener("mousedown",(e=>{const r=e;t.dragOffset={x:r.clientX-t.offsetLeft,y:r.clientY-t.offsetTop},t.style.left=`${t.offsetLeft}px`,t.style.top=`${t.offsetTop}px`,t.style.width=`${t.offsetWidth}px`,t.style.margin="0",t.style.position="absolute",document.addEventListener("mousemove",n,!1),document.addEventListener("mouseup",o,!1)}),!1)}const a=[t=>console.warn(t)];function s(t){for(const e of a)e(t)}function l(t){a.push(t)}const c=["red","yellow","green","blue","orange","aqua","purple","teal","silver"];function u(t){for(const e of c)if(!t.includes(e))return e;throw Error("required more colors than available")}function h(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}function d(t,e=document){let r;if(r=e instanceof HTMLElement?e.querySelector(`#${t}`):e.getElementById(t),null===r)throw Error(`unable to get element with id ${t}`);return r}function f(t){return{[Symbol.iterator]:function*(){let e=0;for(const r of t)yield[e,r],e++}}}function p(t,e){i()(t.size>=1,"map.size >= 1");const r=t.keys(),n=r.next().value;return void 0!==e&&n===e?(i()(t.size>=2,"map.size >= 2"),r.next().value):n}function m(t){let e=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(const n of t)null!==n&&(n>e&&isFinite(n)&&(e=n),n>>1,t[r]===e)return r;t[r]{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%272%27 fill=%27%23fff%27/%3e%3c/svg%3e"},35782:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%2386b7fe%27/%3e%3c/svg%3e"},54718:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%23fff%27/%3e%3c/svg%3e"},57154:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27rgba%280, 0, 0, 0.25%29%27/%3e%3c/svg%3e"},35372:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27 width=%2712%27 height=%2712%27 fill=%27none%27 stroke=%27%23dc3545%27%3e%3ccircle cx=%276%27 cy=%276%27 r=%274.5%27/%3e%3cpath stroke-linejoin=%27round%27 d=%27M5.8 3.6h.4L6 6.5z%27/%3e%3ccircle cx=%276%27 cy=%278.2%27 r=%27.6%27 fill=%27%23dc3545%27 stroke=%27none%27/%3e%3c/svg%3e"},57249:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23000%27%3e%3cpath d=%27M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z%27/%3e%3c/svg%3e"},88832:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%230c63e4%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},67830:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23212529%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},75932:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z%27/%3e%3c/svg%3e"},11144:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},35531:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3e%3cpath fill=%27none%27 stroke=%27%23343a40%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e"},14274:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27M6 10h8%27/%3e%3c/svg%3e"},45419:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27m6 10 3 3 6-6%27/%3e%3c/svg%3e"},17914:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%280, 0, 0, 0.55%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e"},36366:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%28255, 255, 255, 0.55%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e"},48487:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 8 8%27%3e%3cpath fill=%27%23198754%27 d=%27M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z%27/%3e%3c/svg%3e"},25446:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2722%27 height=%2722%27 fill=%27%23333%27 viewBox=%270 0 22 22%27%3E%3Cpath d=%27m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0%27/%3E%3C/svg%3E"},56694:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2722%27 height=%2722%27 fill=%27%2333b5e5%27 viewBox=%270 0 22 22%27%3E%3Cpath d=%27m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0%27/%3E%3C/svg%3E"},26117:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 fill-rule=%27evenodd%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0%27/%3E%3C/svg%3E"},66311:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 fill=%27%23fff%27 fill-rule=%27evenodd%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0%27/%3E%3C/svg%3E"},24420:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},77035:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z%27/%3E%3C/svg%3E"},43470:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5%27/%3E%3C/svg%3E"},13490:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z%27/%3E%3C/svg%3E"},80216:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27m10.5 14 4-8 4 8z%27/%3E%3Cpath fill=%27%23ccc%27 d=%27m10.5 16 4 8 4-8z%27/%3E%3C/svg%3E"},47695:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%2333b5e5%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3C/svg%3E"},92228:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%2333b5e5%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},43737:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23666%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3Cpath fill=%27red%27 d=%27m14 5 1 1-9 9-1-1z%27/%3E%3C/svg%3E"},48460:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23999%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3Cpath fill=%27red%27 d=%27m14 5 1 1-9 9-1-1z%27/%3E%3C/svg%3E"},75796:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23aaa%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3Cpath fill=%27red%27 d=%27m14 5 1 1-9 9-1-1z%27/%3E%3C/svg%3E"},28869:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23e54e33%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3C/svg%3E"},9819:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23e58978%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},30557:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},68164:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z%27/%3E%3C/svg%3E"},64665:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5%27/%3E%3C/svg%3E"},91413:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z%27/%3E%3C/svg%3E"},13913:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z%27/%3E%3C/svg%3E"},61907:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27m10.5 14 4-8 4 8z%27/%3E%3Cpath fill=%27%23ccc%27 d=%27m10.5 16 4 8 4-8z%27/%3E%3C/svg%3E"},56539:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},4890:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z%27/%3E%3C/svg%3E"},13363:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5%27/%3E%3C/svg%3E"},47603:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z%27/%3E%3C/svg%3E"},64643:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z%27/%3E%3C/svg%3E"},68605:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27m10.5 14 4-8 4 8z%27/%3E%3Cpath fill=%27%23ccc%27 d=%27m10.5 16 4 8 4-8z%27/%3E%3C/svg%3E"},47914:t=>{"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2788%27 height=%2723%27 fill=%27none%27%3E%3Cpath fill=%27%23000%27 fill-opacity=%27.4%27 fill-rule=%27evenodd%27 d=%27M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%27/%3E%3Cpath fill=%27%23fff%27 d=%27m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z%27/%3E%3Cpath fill=%27%23e1e3e9%27 d=%27M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z%27/%3E%3Cpath d=%27M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z%27 style=%27fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001%27/%3E%3Cg style=%27stroke-width:1.12603545%27%3E%3Cpath d=%27M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668%27 style=%27color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto%27 transform=%27translate%2815.553 2.85%29scale%28.88807%29%27/%3E%3Cpath d=%27M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3%27 style=%27clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4%27 transform=%27translate%2815.553 2.85%29scale%28.88807%29%27/%3E%3Cpath d=%27M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%27 style=%27clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4%27 transform=%27translate%2815.553 2.85%29scale%28.88807%29%27/%3E%3C/g%3E%3C/svg%3E"},75208:(t,e,r)=>{"use strict";var n=r(97905),i="undefined"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=k(t,360),e=k(e,100),r=k(r,100),0===e)n=i=o=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=a(l,s,t+1/3),i=a(l,s,t),o=a(l,s,t-1/3)}return{r:255*n,g:255*i,b:255*o}}(n.h,a,l),c=!0,u="hsl"),n.hasOwnProperty("a")&&(o=n.a)),o=w(o),{ok:c,format:n.format||u,r:Math.min(255,Math.max(i.r,0)),g:Math.min(255,Math.max(i.g,0)),b:Math.min(255,Math.max(i.b,0)),a:o};var h,d,f}(i);this._originalInput=i,this._r=a.r,this._g=a.g,this._b=a.b,this._a=a.a,this._roundA=Math.round(100*this._a)/100,this._format=o.format||a.format,this._gradientType=o.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=a.ok}function i(t,e,r){t=k(t,255),e=k(e,255),r=k(r,255);var n,i,o=Math.max(t,e,r),a=Math.min(t,e,r),s=(o+a)/2;if(o==a)n=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case t:n=(e-r)/l+(e>1)+720)%360;--e;)i.h=(i.h+o)%360,a.push(n(i));return a}function y(t,e){e=e||6;for(var r=n(t).toHsv(),i=r.h,o=r.s,a=r.v,s=[],l=1/e;e--;)s.push(n({h:i,s:o,v:a})),a=(a+l)%1;return s}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,n=this.toRgb();return t=n.r/255,e=n.g/255,r=n.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=w(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=o(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=o(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),n=Math.round(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=i(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),n=Math.round(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return a(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var o=[T(Math.round(t).toString(16)),T(Math.round(e).toString(16)),T(Math.round(r).toString(16)),T(C(n))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*k(this._r,255))+"%",g:Math.round(100*k(this._g,255))+"%",b:Math.round(100*k(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*k(this._r,255))+"%, "+Math.round(100*k(this._g,255))+"%, "+Math.round(100*k(this._b,255))+"%)":"rgba("+Math.round(100*k(this._r,255))+"%, "+Math.round(100*k(this._g,255))+"%, "+Math.round(100*k(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(_[a(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+s(this._r,this._g,this._b,this._a),r=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var o=n(t);r="#"+s(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return n(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(h,arguments)},brighten:function(){return this._applyModification(d,arguments)},darken:function(){return this._applyModification(f,arguments)},desaturate:function(){return this._applyModification(l,arguments)},saturate:function(){return this._applyModification(c,arguments)},greyscale:function(){return this._applyModification(u,arguments)},spin:function(){return this._applyModification(p,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(b,arguments)},complement:function(){return this._applyCombination(m,arguments)},monochromatic:function(){return this._applyCombination(y,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(g,[3])},tetrad:function(){return this._applyCombination(g,[4])}},n.fromRatio=function(e,r){if("object"==t(e)){var i={};for(var o in e)e.hasOwnProperty(o)&&(i[o]="a"===o?e[o]:S(e[o]));e=i}return n(e,r)},n.equals=function(t,e){return!(!t||!e)&&n(t).toRgbString()==n(e).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},n.mix=function(t,e,r){r=0===r?0:r||50;var i=n(t).toRgb(),o=n(e).toRgb(),a=r/100;return n({r:(o.r-i.r)*a+i.r,g:(o.g-i.g)*a+i.g,b:(o.b-i.b)*a+i.b,a:(o.a-i.a)*a+i.a})},n.readability=function(t,e){var r=n(t),i=n(e);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)},n.isReadable=function(t,e,r){var i,o,a,s,l,c=n.readability(t,e);switch(o=!1,(a=r,"AA"!==(s=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==s&&(s="AA"),"small"!==(l=(a.size||"small").toLowerCase())&&"large"!==l&&(l="small"),i={level:s,size:l}).level+i.size){case"AAsmall":case"AAAlarge":o=c>=4.5;break;case"AAlarge":o=c>=3;break;case"AAAsmall":o=c>=7}return o},n.mostReadable=function(t,e,r){var i,o,a,s,l=null,c=0;o=(r=r||{}).includeFallbackColors,a=r.level,s=r.size;for(var u=0;uc&&(c=i,l=n(e[u]));return n.isReadable(t,l,{level:a,size:s})||!o?l:(r.includeFallbackColors=!1,n.mostReadable(t,["#fff","#000"],r))};var x=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},_=n.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(x);function w(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function k(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function A(t){return Math.min(1,Math.max(0,t))}function M(t){return parseInt(t,16)}function T(t){return 1==t.length?"0"+t:""+t}function S(t){return t<=1&&(t=100*t+"%"),t}function C(t){return Math.round(255*parseFloat(t)).toString(16)}function E(t){return M(t)/255}var L,z,O,D=(z="[\\s|\\(]+("+(L="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+L+")[,|\\s]+("+L+")\\s*\\)?",O="[\\s|\\(]+("+L+")[,|\\s]+("+L+")[,|\\s]+("+L+")[,|\\s]+("+L+")\\s*\\)?",{CSS_UNIT:new RegExp(L),rgb:new RegExp("rgb"+z),rgba:new RegExp("rgba"+O),hsl:new RegExp("hsl"+z),hsla:new RegExp("hsla"+O),hsv:new RegExp("hsv"+z),hsva:new RegExp("hsva"+O),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function I(t){return!!D.CSS_UNIT.exec(t)}return n}()},4026:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>i});var n=r(22319);const i=function(t){var e,r,i=[],a=1;if("number"==typeof t)return{space:"rgb",values:[t>>>16,(65280&t)>>>8,255&t],alpha:1};if("number"==typeof t)return{space:"rgb",values:[t>>>16,(65280&t)>>>8,255&t],alpha:1};if(t=String(t).toLowerCase(),n[t])i=n[t].slice(),r="rgb";else if("transparent"===t)a=0,r="rgb",i=[0,0,0];else if("#"===t[0]){var s=t.slice(1),l=s.length;a=1,l<=4?(i=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===l&&(a=parseInt(s[3]+s[3],16)/255)):(i=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===l&&(a=parseInt(s[6]+s[7],16)/255)),i[0]||(i[0]=0),i[1]||(i[1]=0),i[2]||(i[2]=0),r="rgb"}else if(e=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(t)){var c=e[1],u="cmyk"===(r=c.replace(/a$/,""))?4:"gray"===r?1:3;i=e[2].trim().split(/\s*[,\/]\s*|\s+/),"color"===r&&(r=i.shift()),a=(i=i.map((function(t,e){if("%"===t[t.length-1])return t=parseFloat(t)/100,3===e?t:"rgb"===r?255*t:"h"===r[0]?100*t:"l"!==r[0]||e?"lab"===r?125*t:"lch"===r?e<2?150*t:360*t:"o"!==r[0]||e?"oklab"===r?.4*t:"oklch"===r?e<2?.4*t:360*t:t:t:100*t;if("h"===r[e]||2===e&&"h"===r[r.length-1]){if(void 0!==o[t])return o[t];if(t.endsWith("deg"))return parseFloat(t);if(t.endsWith("turn"))return 360*parseFloat(t);if(t.endsWith("grad"))return 360*parseFloat(t)/400;if(t.endsWith("rad"))return 180*parseFloat(t)/Math.PI}return"none"===t?0:parseFloat(t)}))).length>u?i.pop():1}else/[0-9](?:\s|\/|,)/.test(t)&&(i=t.match(/([0-9]+)/g).map((function(t){return parseFloat(t)})),r=t.match(/([a-z])/gi)?.join("")?.toLowerCase()||"rgb");return{space:r,values:i,alpha:a}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},23648:t=>{"use strict";t.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:t=>{"use strict";t.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:t=>{"use strict";t.exports=JSON.parse('["normal","italic","oblique"]')},99803:t=>{"use strict";t.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:t=>{"use strict";t.exports=JSON.parse('["inherit","initial","unset"]')},94316:t=>{"use strict";t.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={id:t,exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var r in e)__webpack_require__.o(e,r)&&!__webpack_require__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.b=document.baseURI||self.location.href,__webpack_require__.nc=void 0;var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DefaultVisualizer:()=>Sn,EnvironmentIndexer:()=>a,EnvironmentInfo:()=>x,MapVisualizer:()=>En,MetadataPanel:()=>Zr,MoleculeViewer:()=>on.MoleculeViewer,PropertiesMap:()=>P,StructureOptions:()=>cn.O,StructureVisualizer:()=>Cn,ViewersGrid:()=>sn,addWarningHandler:()=>s.eK,version:()=>Ln});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{decode:()=>U,encode:()=>H,format:()=>W,parse:()=>it});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{Any:()=>st,Cc:()=>lt,Cf:()=>ct,P:()=>ot,S:()=>at,Z:()=>ut});var r={};__webpack_require__.r(r),__webpack_require__.d(r,{arrayReplaceAt:()=>Rt,assign:()=>Ft,escapeHtml:()=>Zt,escapeRE:()=>$t,fromCodePoint:()=>jt,has:()=>It,isMdAsciiPunct:()=>te,isPunctChar:()=>Qt,isSpace:()=>Jt,isString:()=>Ot,isValidEntityCode:()=>Pt,isWhiteSpace:()=>Kt,lib:()=>re,normalizeReference:()=>ee,unescapeAll:()=>Vt,unescapeMd:()=>Gt});var n={};__webpack_require__.r(n),__webpack_require__.d(n,{parseLinkDestination:()=>ie,parseLinkLabel:()=>ne,parseLinkTitle:()=>oe}),__webpack_require__(86643);var i=__webpack_require__(34961),o=__webpack_require__.n(i);class a{constructor(t,e){if(this._structures=t,this._environments=e,this._activeStructures=[],this._activeAtoms=Array.from({length:this._structures.length}).map((()=>[])),void 0!==this._environments){for(const t of this._environments)this._activeAtoms[t.structure].push(t.center);for(let t=0;t0){this._activeStructures.push(t);for(let r=0;rt-e));for(let t=0;tt-e))}fromEnvironment(t,e){if("structure"===e)return{environment:t,structure:t};o()(void 0!==this._environments,"this._environments !== undefined"),o()(t\n
\n \n `;const n=r.content.firstChild;t.appendChild(n),this._valid=[],this._slider=n.querySelector("input"),this._play=n.querySelector(".chsp-play-button"),this._play.onclick=()=>{this._play.classList.toggle("chsp-playing"),this.startPlayback((()=>this._play.classList.contains("chsp-playing")))},this._slider.onchange=()=>this.onchange(),this.onchange=()=>{},this.startPlayback=()=>{}}reset(t){this._valid=t,this._slider.value="0",this._slider.max=""+(this._valid.length-1)}update(t){const e=(0,s.El)(this._valid,t);o()(-1!==e,"position !== -1"),this._slider.value=e.toString()}value(){return this._valid[parseInt(this._slider.value,10)]}}function p(t,e,r,n,i,o){const a={xref:"paper",yref:"paper",xaxis:{title:i,titlefont:{size:12},showgrid:!1,zeroline:!1,showline:!0,nticks:5},yaxis:{title:o,titlefont:{size:12},showgrid:!1,showline:!0,zeroline:!1,nticks:4},showlegend:!1,x:.2,legend:{y:.5},margin:{l:n/6,r:0,b:n/6,t:0,pad:0},width:n,height:n/1.35,tracetoggle:!1},s=[{x:t,y:e,type:"scatter",mode:"lines"}];c().newPlot(r,s,a,{displayModeBar:!1,responsive:!0,staticPlot:!1})}class m{constructor(t,e,r,n,i){const o=document.createElement("template");o.innerHTML=`
\n
\n \n \n \n
\n
`;const a=o.content.firstChild;t.appendChild(a),this._root=t,this._header=a.querySelector("th"),this._target=e,this._properties=[];const s=a.querySelector("tbody");for(const t in n){const e=document.createElement("tr"),r=document.createElement("td"),o=n[t].units;let a=t;void 0!==o&&(a+=`/${o}`);const l=n[t].description;if(void 0!==l){r.innerHTML='';const t=r.firstChild;t.innerText=a,t.setAttribute("title",l)}else r.innerText=a;e.appendChild(r);const c=document.createElement("td");e.appendChild(c),s.appendChild(e);const u=n[t].parameters;if(void 0===u)this._properties.push({cell:c,values:n[t].values});else if(i&&"string"==typeof u[0]){let e=u[0];const o=i[u[0]].units;void 0!==o&&(e+=`/${o}`);const s=document.createElement("div");s.style.display="block",s.style.width="100%",c.appendChild(s),this._properties.push({cell:c,values:n[t].values,parameter:i[u[0]].values,xlabel:e,ylabel:a});const l=document.createElement("button");l.classList.add("btn","btn-secondary","btn-sm","chsp-toggle-plot-btn"),l.textContent="Show/Hide",l.onclick=()=>{"block"===s.style.display?s.style.display="none":s.style.display="block"},r.appendChild(l)}}this.show({environment:0,structure:0,atom:0})}show(t){let e,r;"structure"===this._target?(e=t.structure+1,r=t.structure):(o()("atom"===this._target,"this._target === 'atom'"),o()(void 0!==t.atom,"indexes.atom !== undefined"),e=t.atom+1,r=t.environment),this._header.innerText=`Properties for ${this._target} ${e}`;for(const t of this._properties)if(Array.isArray(t.values[r])){const e=this._root.offsetWidth/1.5;o()(null!==t.cell.firstElementChild,"s.cell.firstElementChild !== null"),p(t.parameter,t.values[r],t.cell.firstElementChild,e,t.xlabel,t.ylabel)}else t.cell.innerText=t.values[r].toString()}}const g='\n\n \n \n \n \n \n\n\x3c!--Icon taken from www.icons8.com and edited in Inkscape--\x3e\n';var v=__webpack_require__(48654),b=__webpack_require__(62621);function y(t,e){const r={};for(const n in t)Object.hasOwnProperty.call(t,n)&&e(t[n])&&(r[n]=t[n]);return r}class x{constructor(t,e,r,n,i){this.onchange=()=>{},this.playbackDelay=700;const o=(0,s.V6)(t),a=document.createElement("div");o.appendChild(a),this._shadow=a.attachShadow({mode:"open"}),this._shadow.adoptedStyleSheets=[v.A,b.A,u],this._root=document.createElement("div"),this._shadow.appendChild(this._root),this._indexer=r,this._target=n,this._properties=e,this._parameters=i,this._structure={number:document.createElement("input"),slider:new f(document.createElement("div"),"structure"),table:new m(document.createElement("div"),"structure","structure",e,i)},this._renderTargetPart()}switchTarget(t){this._target=t,this._renderTargetPart()}show(t){const e=this._indexes().structure;if(this._structure.number.value=`${t.structure+1}`,this._structure.slider.update(t.structure),this._structure.table.show(t),t.structure!==e&&void 0!==this._atom){const e=this._indexer.activeAtoms(t.structure);this._atom.number.value=`${e[0]+1}`,this._atom.slider.reset(e)}if(void 0!==t.atom)if(void 0===this._atom){if(0!==t.atom)throw Error("Invalid state: got an atomic number to update, but I am displaying only structures")}else this._atom.number.value=`${t.atom+1}`,this._atom.slider.update(t.atom),this._atom.table.show(t)}remove(){this._shadow.host.remove()}_renderTargetPart(){this._root.innerHTML=this._getMainHTMLStructure();const t=y(this._properties,(t=>"structure"===t.target));if(this._structure=this._createStructure(t,this._parameters),"atom"===this._target){const t=y(this._properties,(t=>"atom"===t.target));this._atom=this._createAtom(t,this._parameters)}else this._atom=void 0;d.A.initialize(this._root)}_getMainHTMLStructure(){const t="atom"===this._target?`\n `:"
";return`\n
\n
\n \n ${t}\n
`}_createStructure(t,e){const r=new f(this._root,"structure");r.reset(this._indexer.activeStructures()),r.startPlayback=t=>{setTimeout((()=>{if(t()){const e=this._findNextValidIndex(this._indexes().structure,this._indexer.structuresCount(),(t=>this._indexer.fromStructure(t,this._target)));void 0!==e&&(this.show(this._indexer.fromStructure(e,this._target)),this.onchange(this._indexes()),r.startPlayback(t))}}),this.playbackDelay)},r.onchange=()=>{const t=this._structure.slider.value();if(void 0!==this._atom){const e=this._indexer.activeAtoms(t);if(0===e.length)return void(0,s.R4)(`Cannot change to structure ${t+1}, which does not contain any active atoms`);this._atom.number.value=`${e[0]+1}`,this._atom.number.max=`${e.length}`,this._atom.slider.reset(e)}const e=this._indexes();o()(void 0!==e,"indexes !== undefined"),this._structure.table.show(e),this._structure.number.value=`${e.structure+1}`,void 0!==this._atom&&this._atom.table.show(e),this.onchange(e)};const n=this._root.children[0];o()("div"===n.tagName.toLowerCase(),"tableRoot.tagName.toLowerCase() === 'div'");const i=new m(n,"structure","structure",t,e),a=this._createNumberInput(".chsp-info-structure-btn .chsp-info-number",this._indexer.structuresCount().toString(),(t=>{if(isNaN(t)||t<0||t>=parseInt(a.max,10))a.value=`${this._structure.slider.value()+1}`;else if(-1===(0,s.El)(this._indexer.activeStructures(),t))a.value=`${this._structure.slider.value()+1}`;else{if(this._structure.slider.update(t),void 0!==this._atom){const e=this._indexer.activeAtoms(t);this._atom.number.value=`${e[0]+1}`,this._atom.number.max=`${e.length}`,this._atom.slider.reset(e)}const e=this._indexes();this._structure.table.show(e),void 0!==this._atom&&this._atom.table.show(e),this.onchange(e)}}));return{number:a,slider:r,table:i}}_createAtom(t,e){const r=new f(this._root,"atom");r.reset(this._indexer.activeAtoms(this._structure.slider.value())),r.startPlayback=t=>{setTimeout((()=>{if(t()){const e=this._indexes();o()(void 0!==e.atom,"current.atom !== undefined");const n=this._findNextValidIndex(e.atom,this._indexer.atomsCount(e.structure),(t=>this._indexer.fromStructureAtom(this._target,e.structure,t)));void 0!==n&&(this.show(this._indexer.fromStructureAtom(this._target,e.structure,n)),this.onchange(this._indexes()),r.startPlayback(t))}}),this.playbackDelay)},r.onchange=()=>{o()(void 0!==this._atom,"this._atom !== undefined");const t=this._indexes();if(void 0!==t)o()(void 0!==t.atom,"indexes.atom !== undefined"),this._atom.table.show(t),this._atom.number.value=`${t.atom+1}`,this.onchange(t);else{const t=this._structure.slider.value(),e=this._atom.slider.value();(0,s.R4)(`Environment for atom ${e} in structure ${t} is not part of this dataset`)}};const n=this._root.children[0];o()("div"===n.tagName.toLowerCase(),"tableRoot.tagName.toLowerCase() === 'div'");const i=new m(n,"atom","atom",t,e),a=this._createNumberInput(".chsp-info-atom-btn .chsp-info-number",this._indexer.atomsCount(this._structure.slider.value()).toString(),(t=>{o()(void 0!==this._atom,"this._atom !== undefined");const e=this._indexer.activeAtoms(this._structure.slider.value());if(isNaN(t)||t<0||t>=parseInt(a.max,10))a.value=`${this._atom.slider.value()+1}`;else if(-1===(0,s.El)(e,t))a.value=`${this._atom.slider.value()+1}`;else{this._atom.slider.update(t);const e=this._indexes();this._atom.table.show(e),this.onchange(e)}}));return{number:a,slider:r,table:i}}_findNextValidIndex(t,e,r){let n=0;for(;n<=e;){if(void 0!==r(t=(t+1)%e))return t;n++}}_createNumberInput(t,e,r){const n=this._root.querySelector(t);return n.max=e,n.onchange=()=>r(parseInt(n.value,10)-1),n.onclick=t=>t.stopPropagation(),n}_indexes(){const t=this._structure.slider.value();let e;if(void 0!==this._atom){const r=this._atom.slider.value();e=this._indexer.fromStructureAtom(this._target,t,r)}else o()("atom"!==this._target,"this._target !== 'atom'"),e=this._indexer.fromStructureAtom(this._target,t);return o()(void 0!==e,"indexes !== undefined"),e}}class _{constructor(){this._values=[]}get(t){let e=this._values.findIndex((e=>e===t));return-1===e&&(e=this._values.length,this._values.push(t)),e}string(t){if(t>=this._values.length)throw Error("requested unknown string from interner");return this._values[t]}strings(){return this._values}}function w(t,e){const r=typeof e.values[0];if("number"===r)return{values:e.values,units:e.units};if("string"===r){const r=new _,n=[];for(const i of e.values){const e=r.get(i);if(n.push(e),e>20)throw Error(`the '${t}' property contains more than 50 different values, it can not be interpreted as categories`)}return{string:r,values:n,units:e.units}}if(!Array.isArray(e.values[0]))throw Error(`unexpected property type '${r}'`)}function k(t,e){let r,n;for(const i in e)if(void 0!==r){if(e[i].values.length!==r)throw Error(`${t} property '${i}' do not have the same size as the first property '${n}': expected ${r}, got ${e[i].values.length}`)}else r=e[i].values.length,n=i}class A{constructor(t){this.structure={},this.atom={},this.maxSymbols=-1;for(const e in t){let r;try{r=w(e,t[e])}catch(t){(0,s.R4)(`warning: ${t.message}`);continue}void 0!==r&&(this[t[e].target][e]=r,void 0!==r.string&&(this.maxSymbols=Math.max(this.maxSymbols,r.string.strings().length)))}k("structure",this.structure),k("atom",this.atom)}}class M{constructor(t,e,r,n=!0){const i=document.createElement("div");i.classList.add("chsp-pin-marker","chsp-map-pin-marker"),i.id=`chsp-selected-${t}`,i.style.backgroundColor=e,this.marker=i,this.toggleVisible(n),this.color=e,this.current=r}update(t){isFinite(t.x)&&isFinite(t.y)?(this.marker.style.top=`${t.y}px`,this.marker.style.right=`${t.x}px`):this.toggleVisible(!1)}select(t){return this.current!==t.environment&&(this.current=t.environment,!0)}activate(){this.marker.classList.toggle("chsp-active-pin",!0)}deactivate(){this.marker.classList.toggle("chsp-active-pin",!1)}remove(){o()(null!==this.marker.parentNode,"this.marker.parentNode !== null"),this.marker.parentNode.removeChild(this.marker)}toggleVisible(t){this.marker.style.display=t?"block":"none"}}var T=__webpack_require__(50112),S=__webpack_require__(45127),C=__webpack_require__(17136),E=__webpack_require__(90170);const L=["circle","square","diamond","cross","x"];function z(t){return L[t%L.length]}class O extends S.W2{constructor(t){o()(t.length>0,"validProperties.length > 0"),super(),this.max=new S.Je("number",NaN),this.min=new S.Je("number",NaN),this.property=new S.Je("string",t[0]),this.scale=new S.Je("string","linear"),this.property.validate=(0,S.qP)(t,"axis"),this.scale.validate=(0,S.qP)(["linear","log"],"axis scale")}disable(){this.max.disable(),this.min.disable(),this.scale.disable()}enable(){this.max.enable(),this.min.enable(),this.scale.enable()}}class D extends S.W2{constructor(t,e,r,n={}){super();const i=Object.keys(e);if(i.length<2)throw new Error("Cannot show a map because the dataset contains fewer than two properties.");this.x=new O(i),this.y=new O(i),this.z=new O(i.concat([""])),this.symbol=new S.Je("string","");const o=[""];for(const t in e)void 0!==e[t].string&&o.push(t);this.symbol.validate=(0,S.qP)(o,"symbol"),this.palette=new S.Je("string","inferno"),this.palette.validate=(0,S.qP)(Object.keys(C.s),"palette"),this.color={mode:new S.Je("string","linear"),property:new S.Je("string",""),min:new S.Je("number",NaN),max:new S.Je("number",NaN)},this.color.property.validate=(0,S.qP)(i.concat([""]),"color"),this.color.mode.validate=(0,S.qP)(["linear","log","sqrt","inverse"],"mode"),this.size={factor:new S.Je("number",50),mode:new S.Je("string","linear"),property:new S.Je("string","")},this.size.property.validate=(0,S.qP)(i.concat([""]),"size"),this.size.factor.validate=t=>{if(t<1||t>100)throw Error(`size factor must be between 0 and 100, got ${t}`)},this.size.mode.validate=(0,S.qP)(["linear","log","sqrt","inverse","flip-linear","proportional"],"mode"),this.markerOutline=new S.Je("boolean",!0),this.joinPoints=new S.Je("boolean",!1),this.x.property.value=i[0],this.y.property.value=i[1],this.z.property.value="",i.length>2?this.color.property.value=i[2]:this.color.property.value="",this._positionSettingsModal=r;const{openModal:a,modal:s}=this._createSettingsHTML();this._modal=s,this._openModal=a,t.appendChild(this._openModal),this._bind(e),this.applySettings(n)}getModalElement(t){return(0,s.VT)(t,this._modal.shadow)}applySettings(t){if("size"in t){const e=t.size;"mode"in e&&"constant"===e.mode&&(delete e.mode,e.property="")}if("color"in t){const e=t.color;"scale"in e&&(e.mode=e.scale,delete e.scale)}super.applySettings(t)}remove(){this._modal.remove(),this._openModal.remove()}is3D(){return""!==this.z.property.value}hasColors(){return""!==this.color.property.value}hovertemplate(){if(this.hasColors()){let t=this.color.property.value;switch(this.color.mode.value){case"inverse":t=`(${t})-1`;break;case"log":t=`log(${t})`;break;case"sqrt":t=`sqrt(${t})`}return t+": %{marker.color:.2f}"}return"%{x:.2f}, %{y:.2f}"}calculateColors(t){let e=this.color.mode.value;const{min:r,max:n}=(0,s.GI)(t);return n===r&&(e="fixed"),t.map((t=>{let r=.5;switch(e){case"inverse":r=1/t;break;case"log":r=Math.log10(t);break;case"sqrt":r=Math.sqrt(t);break;case"linear":r=1*t;break;default:r=.5}return isNaN(r)?"#aaaaaa":r}))}calculateSizes(t){const e=(t=>{const e=Math.log(1/6),r=(Math.log(6)-e)/99;return Math.exp(e+r*(t-1))})(this.size.factor.value);let r=this.size.mode.value;const{min:n,max:i}=(0,s.GI)(t),o=this.is3D()?800:300,a=n>0?n:1e-6*(i-n),l=t.map((t=>{let s=.3;switch(i===n?r="fixed":s=(t-n)/(i-n),r){case"proportional":s=t/Math.abs(i);break;case"inverse":s=a/t;break;case"log":s=Math.log(t/a)/Math.log(i/a);break;case"sqrt":s=Math.sqrt(t/Math.abs(i));break;case"linear":s*=1;break;case"flip-linear":s=1-s;break;default:s=.3-.1}return s+=.1,o*s*e}));return l.some((t=>isNaN(t)||t<0))?((0,s.R4)(`After applying the selected scaling mode ${r}, some point sizesevaluated to invalid values. These points will be displayed at the minimum size.`),l.map((t=>isNaN(t)?.1*o*e:t))):l}getSymbols(t){o()(void 0!==t.string,"property.string !== undefined");const e=t.string.strings().length;return this.is3D()?(e>L.length&&(0,s.R4)(`${e} symbols are required, but we only have ${L.length}. Some symbols will be repeated`),t.values.map(z)):t.values}_createSettingsHTML(){const t=document.createElement("template");t.innerHTML=`\n
${E.A}
\n `;const e=t.content.firstChild;t.innerHTML='\n';const r=t.content.querySelector(".modal");o()(null!==r&&r instanceof HTMLElement,"modalElement !== null && modalElement instanceof HTMLElement");const n=r.querySelector(".modal-dialog");o()(null!==n&&n instanceof HTMLElement,"modalDialog !== null && modalDialog instanceof HTMLElement"),(0,s.eB)(n,".modal-header");const i=new T.A(r);return i.shadow.adoptedStyleSheets=[v.A,b.A],d.A.initialize(r),e.addEventListener("click",(()=>{if(null===n.getAttribute("data-initial-modal-positions-set")){n.setAttribute("data-initial-modal-positions-set","true"),n.parentNode.style.display="block",n.style.width=n.offsetWidth/1.5+"px",n.style.minWidth="500px",n.style.margin="0",n.style.position="fixed";const{top:t,left:e}=this._positionSettingsModal(n.getBoundingClientRect());n.style.top=`${t}px`,n.style.left=`${e}px`}i.open()})),r.addEventListener("keydown",(t=>{t.stopPropagation()})),{openModal:e,modal:i}}_bind(t){const e=this.getModalElement("map-x-property");e.options.length=0;for(const r in t)e.options.add(new Option(r,r));this.x.property.bind(e,"value"),this.x.min.bind(this.getModalElement("map-x-min"),"value"),this.x.max.bind(this.getModalElement("map-x-max"),"value"),this.x.scale.bind(this.getModalElement("map-x-scale"),"value");const r=this.getModalElement("map-y-property");r.options.length=0;for(const e in t)r.options.add(new Option(e,e));this.y.property.bind(r,"value"),this.y.min.bind(this.getModalElement("map-y-min"),"value"),this.y.max.bind(this.getModalElement("map-y-max"),"value"),this.y.scale.bind(this.getModalElement("map-y-scale"),"value");const n=this.getModalElement("map-z-property");n.options.length=0,n.options.add(new Option("none",""));for(const e in t)n.options.add(new Option(e,e));this.z.property.bind(n,"value"),this.z.min.bind(this.getModalElement("map-z-min"),"value"),this.z.max.bind(this.getModalElement("map-z-max"),"value"),this.z.scale.bind(this.getModalElement("map-z-scale"),"value");const i=this.getModalElement("map-color-property");i.options.length=0,i.options.add(new Option("fixed",""));for(const e in t)i.options.add(new Option(e,e));this.color.property.bind(i,"value"),this.color.mode.bind(this.getModalElement("map-color-transform"),"value"),this.color.min.bind(this.getModalElement("map-color-min"),"value"),this.color.max.bind(this.getModalElement("map-color-max"),"value");const o=this.getModalElement("map-color-palette");o.length=0;for(const t in C.s)o.options.add(new Option(t,t));this.palette.bind(o,"value");const a=this.getModalElement("map-symbol-property");a.options.length=0,a.options.add(new Option("fixed",""));for(const e in t)void 0!==t[e].string&&a.options.add(new Option(e,e));this.symbol.bind(a,"value");const s=this.getModalElement("map-size-property");s.options.length=0,s.options.add(new Option("fixed",""));for(const e in t)s.options.add(new Option(e,e));this.size.property.bind(s,"value"),this.size.factor.bind(this.getModalElement("map-size-factor"),"value"),this.size.mode.bind(this.getModalElement("map-size-transform"),"value"),this.markerOutline.bind(this.getModalElement("map-marker-outline"),"checked"),this.joinPoints.bind(this.getModalElement("map-join-points"),"checked")}colorScale(){return C.s[this.palette.value]}setLogLabel(t,e){const r=this.getModalElement(`map-${e}-min-label`),n=this.getModalElement(`map-${e}-max-label`);"log"===t.scale.value?(r.innerHTML="min: 10^",n.innerHTML="max: 10^"):(r.innerHTML="min:",n.innerHTML="max:")}}const I='\n\n \n \n\n\x3c!--Icon taken from www.uxwing.com and edited in Inkscape--\x3e\n\n';const F={coloraxis:{cmax:0,cmin:0,colorbar:{len:1,thickness:20,title:{text:"",side:"right",font:{size:15}},y:0,yanchor:"bottom"},colorscale:[],showscale:!0},hovermode:"closest",legend:{itemclick:!1,itemdoubleclick:!1,tracegroupgap:5,y:1,yanchor:"top"},margin:{b:50,l:50,r:50,t:50},scene:{camera:{projection:{type:"orthographic"}},xaxis:{showspikes:!1,title:""},yaxis:{showspikes:!1,title:""},zaxis:{showspikes:!1,title:""}},showlegend:!0,xaxis:{range:void 0,title:"",type:"linear",zeroline:!1},yaxis:{range:void 0,title:"",type:"linear",zeroline:!1},zaxis:{range:void 0,title:"",type:"linear",zeroline:!1}},R={displayModeBar:!0,displaylogo:!1,responsive:!0,scrollZoom:!0,modeBarButtonsToRemove:["hoverClosestCartesian","hoverCompareCartesian","toggleSpikelines","autoScale2d","zoomIn2d","zoomOut2d","select2d","lasso2d","hoverClosest3d","tableRotation","resetCameraLastSave3d","toImage"],modeBarButtonsToAdd:[[{name:"Download PNG",icon:{width:400,height:447,path:j(I)},click:function(t){c().downloadImage(t,{filename:"chemiscope-map",format:"png",width:Math.max(t._fullLayout.width,600),height:Math.max(t._fullLayout.width,600)}).catch((t=>setTimeout((()=>{throw t}))))}}],[{name:"Download SVG",icon:{width:400,height:447,path:j('\n\n \n \n \n\x3c!--Icon taken from www.uxwing.com and edited in Inkscape--\x3e\n\n')},click:function(t){c().downloadImage(t,{filename:"chemiscope-map",format:"svg",width:Math.max(t._fullLayout.width,600),height:Math.max(t._fullLayout.height,600)}).catch((t=>setTimeout((()=>{throw t}))))}}]]};class P{constructor(t,e,r,n,i){this._getAxisRange=(t,e,r)=>{const n=!isNaN(t),i=!isNaN(e);if(n&&i){if(t<=e)return[t,e];(0,s.R4)(`The inserted min and max values in ${r} are such that min > max!The default values will be used.`)}return[n?t:void 0,i?e:void 0]},this._indexer=r,this._target=n,this.onselect=()=>{},this.activeChanged=()=>{},this._selected=new Map;const o=(0,s.V6)(t),a=document.createElement("div");a.style.setProperty("height","100%"),o.appendChild(a),this._shadow=a.attachShadow({mode:"open"}),this._root=document.createElement("div"),this._root.style.setProperty("height","100%"),this._shadow.appendChild(this._root),""===this._root.style.position&&(this._root.style.position="relative"),this._plot=document.createElement("div"),this._plot.style.width="100%",this._plot.style.height="100%",this._root.appendChild(this._plot),this._data=new A(i);const l=this._getCurrentProperties();var c;this._options=new D(this._root,l,(t=>this.positionSettingsModal(t)),e),this._colorReset=this._options.getModalElement("map-color-reset"),this._connectSettings(),this.positionSettingsModal=t=>{const e=this._root.getBoundingClientRect();return{left:e.left+e.width/2-t.width/2,top:e.top+20}},this._createPlot(),this._shadow.adoptedStyleSheets=[v.A,b.A,u,(c=this._plot,h(c._fullLayout._modeBar._uid))]}switchTarget(t){return e=this,r=void 0,i=function*(){if(t!==this._target){if(this._target=t,this._handleMarkers(),void 0!==this._active){const t=this._selected.get(this._active);void 0!==t&&this.onselect(this._indexer.fromEnvironment(t.current,this._target))}this._setupMapOptions(),this._connectSettings(),yield this._react(this._getTraces(),this._getLayout())}},new((n=void 0)||(n=Promise))((function(t,o){function a(t){try{l(i.next(t))}catch(t){o(t)}}function s(t){try{l(i.throw(t))}catch(t){o(t)}}function l(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,s)}l((i=i.apply(e,r||[])).next())}));var e,r,n,i}_handleMarkers(){var t;for(const[e,r]of this._selected.entries()){if("structure"===this._target)r.current=this._indexer.fromEnvironment(r.current,"atom").structure;else{const e=null===(t=this._indexer.fromStructure(r.current,"atom"))||void 0===t?void 0:t.environment;o()(void 0!==e,"environment !== undefined"),r.current=e}this._selected.set(e,r)}}remove(){var t;this._shadow.host.remove(),this._options.remove(),null===(t=document.getElementById("js-plotly-tester"))||void 0===t||t.remove(),this._plotFix.disable()}select(t){if(void 0===this._active)throw Error("tries to update selected environment, but there is no active marker");if(void 0===t.environment){const e=this._indexer.fromStructureAtom(this._target,t.structure,t.atom);if(void 0===e){const e=void 0===t.atom?"":` / atom ${t.atom}`;throw Error(`can not find the environnement for structure ${t.structure}`+e)}t=e}const e=this._selected.get(this._active);o()(void 0!==e,"data !== undefined"),e.select(t)&&this._updateMarkers()}setActive(t){if(void 0!==this._active){const t=this._selected.get(this._active);o()(void 0!==t,"oldData !== undefined"),t.deactivate()}this._active=t;const e=this._selected.get(this._active);o()(void 0!==e,"data !== undefined"),e.activate(),this._is3D()&&this._restyle({"marker.size":this._sizes(1)},1)}addMarker(t,e,r){o()(!this._selected.has(t),"!this._selected.has(guid)");const n=new M(t,e,r.environment);this._root.appendChild(n.marker),n.marker.onclick=()=>{this.setActive(t),this.activeChanged(t,this._indexer.fromEnvironment(n.current,this._target))},this._selected.set(t,n),this._updateMarkers([n]),this.setActive(t)}removeMarker(t){this._active===t&&(1===this._selected.size?this._active=void 0:this.setActive((0,s.o)(this._selected,t)));const e=this._selected.get(t);o()(void 0!==e,"data !== undefined"),e.remove(),this._selected.delete(t),this._updateMarkers()}applySettings(t){this._options.applySettings(t)}saveSettings(){return this._options.saveSettings()}onSettingChange(t){this._options.onSettingChange(t)}_getTraces(){const t=this._is3D()?"scatter3d":"scattergl",e=[{name:"",type:t,x:this._coordinates(this._options.x,0)[0],y:this._coordinates(this._options.y,0)[0],z:this._coordinates(this._options.z,0)[0],hovertemplate:this._options.hovertemplate(),marker:{color:this._colors(0)[0],coloraxis:"coloraxis",line:{color:"black",width:this._options.markerOutline.value?.5:0},opacity:1,size:this._sizes(0)[0],sizemode:"area",symbol:this._symbols(0)[0]},line:{color:"black",width:.5,dash:"solid"},mode:this._options.joinPoints.value?"lines+markers":"markers",showlegend:!1},{name:"selected",type:t,x:[],y:[],z:[],hoverinfo:"none",marker:{color:[],line:{color:[],width:2},opacity:1,size:[],sizemode:"area"},mode:"markers",showlegend:!1}],r=this._legendNames().slice(2),n=this._showlegend().slice(2);o()(r.length===n.length,"legendNames.length === showlegend.length");const i=r.length;this._data.maxSymbols>0&&(r.length=this._data.maxSymbols,r.fill("",i),n.length=this._data.maxSymbols,n.fill(!1,i));for(let i=0;i{t&&Object.keys(t).length>1&&(this._options.remove(),this._options=new D(this._root,this._getCurrentProperties(),(t=>this.positionSettingsModal(t)),{}))};"atom"!==this._target?t(this._data.structure):t(this._data.atom)}_getCurrentProperties(){const t=this._data[this._target],e=Object.keys(t);if(e.length<2){if("structure"===this._target&&!this._indexer.hasEnvironments()&&Object.keys(this._data.atom).length>=2)throw Error("could not find enough structure properties to display, but there are atom properties. Please provide the environment list to display them");let t="we need at least two properties to plot in the map";throw 0===e.length?t+=", we have none":t+=`, we have only one: '${e[0]}'`,Error(t)}return t}_restyle(t,e){c().restyle(this._plot,t,e).catch((t=>setTimeout((()=>{throw t}))))}_relayout(t){c().relayout(this._plot,t).catch((t=>setTimeout((()=>{throw t}))))}_react(t,e){return new Promise(((r,n)=>{c().react(this._plot,t,e).then((()=>{r()})).catch((t=>{setTimeout((()=>{n(t)}))}))}))}_connectSettings(){const t=t=>{"log"===t.scale.value&&(0,s.GI)(this._coordinates(t,0)[0]).min<0&&t.min.value<=0&&(0,s.R4)("This property contains negative values. Note that taking the log will discard them.")};this._options.x.property.onchange.push((()=>{t(this._options.x);const e=this._coordinates(this._options.x);this._restyle({x:e},[0,1]),this._relayout({"scene.xaxis.title":this._title(this._options.x.property.value),"xaxis.title":this._title(this._options.x.property.value)}),this._is3D()?this._relayout({"scene.xaxis.autorange":!0}):this._relayout({"xaxis.autorange":!0}),this._setScaleStep(this._getBounds().x,"x")})),this._options.x.scale.onchange.push((()=>{t(this._options.x),this._options.setLogLabel(this._options.x,"x"),this._is3D()?this._relayout({"scene.xaxis.type":this._options.x.scale.value}):this._relayout({"xaxis.type":this._options.x.scale.value})}));const e=(e,r,n)=>(i,o)=>{if("JS"===o)return;const a=r.min.value,l=r.max.value;if(a>l)return(0,s.R4)(`The inserted min and max values in ${e} are such that min > max! The last inserted value was reset.`),void("min"===n?r.min.reset():r.max.reset());t(r),this._is3D()?this._relayout({[`scene.${e}.range`]:[a,l]}):this._relayout({[`${e}.range`]:[a,l]})};if(this._options.x.min.onchange.push(e("xaxis",this._options.x,"min")),this._options.x.max.onchange.push(e("xaxis",this._options.x,"max")),this._options.y.property.onchange.push((()=>{t(this._options.y);const e=this._coordinates(this._options.y);this._restyle({y:e},[0,1]),this._relayout({"scene.yaxis.title":this._title(this._options.y.property.value),"yaxis.title":this._title(this._options.y.property.value)}),this._is3D()?this._relayout({"scene.yaxis.autorange":!0}):this._relayout({"yaxis.autorange":!0}),this._setScaleStep(this._getBounds().y,"y")})),this._options.y.scale.onchange.push((()=>{t(this._options.y),this._options.setLogLabel(this._options.y,"y"),this._is3D()?this._relayout({"scene.yaxis.type":this._options.y.scale.value}):this._relayout({"yaxis.type":this._options.y.scale.value})})),this._options.y.min.onchange.push(e("yaxis",this._options.y,"min")),this._options.y.max.onchange.push(e("yaxis",this._options.y,"max")),""===this._options.z.property.value?this._options.z.disable():this._options.z.enable(),this._options.z.property.onchange.push((()=>{t(this._options.z);const e="scatter3d"===this._plot._fullData[0].type;if(""===this._options.z.property.value)return void(e&&this._switch2D());e||this._switch3D();const r=this._coordinates(this._options.z);this._restyle({z:r},[0,1]),this._relayout({"scene.zaxis.title":this._title(this._options.z.property.value),"scene.zaxis.autorange":!0}),this._is3D()&&this._setScaleStep(this._getBounds().z,"z")})),this._options.z.scale.onchange.push((()=>{t(this._options.z),this._options.setLogLabel(this._options.z,"z"),""!==this._options.z.property.value&&this._relayout({"scene.zaxis.type":this._options.z.scale.value})})),this._options.z.min.onchange.push(e("zaxis",this._options.z,"min")),this._options.z.max.onchange.push(e("zaxis",this._options.z,"max")),this._options.hasColors()){const t=(t,e)=>{const[r,n]=this._getAxisRange(t,e,"map.color"),i=void 0!==r,o=void 0!==n,a=()=>{const t=this._colors(0)[0];return(0,s.GI)(t)};if(i||o){const{min:r,max:n}=a();return{min:i?t:r,max:o?e:n}}return a()},{min:e,max:r}=t(this._options.color.min.value,this._options.color.max.value);this._options.color.min.value=e,this._options.color.max.value=r,this._setScaleStep([e,r],"color")}else this._options.color.min.value=0,this._options.color.max.value=0;this._options.color.property.onchange.push((()=>{if(this._options.hasColors()){this._options.color.mode.enable(),this._options.color.min.enable(),this._options.color.max.enable(),this._colorReset.disabled=!1;const t=this._colors(0)[0];if(n(t,"property")){const{min:e,max:r}=(0,s.GI)(t);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=r,this._options.color.min.value=e,this._setScaleStep([e,r],"color"),this._relayout({"coloraxis.colorbar.title.text":this._colorTitle(),"coloraxis.showscale":!0})}}else this._options.color.mode.disable(),this._options.color.min.disable(),this._options.color.max.disable(),this._colorReset.disabled=!0,this._options.color.min.value=0,this._options.color.max.value=0,this._relayout({"coloraxis.colorbar.title.text":void 0,"coloraxis.showscale":!1});this._restyle({hovertemplate:this._options.hovertemplate(),"marker.color":this._colors(0)},[0])}));const r=t=>{const e=this._options.color.min.value,r=this._options.color.max.value;if(e>r)return(0,s.R4)("The inserted min and max values in color are such that min > max! The last inserted value was reset."),void("min"===t?this._options.color.min.reset():this._options.color.max.reset());this._relayout({"coloraxis.cmax":r,"coloraxis.cmin":e,"coloraxis.colorscale":this._options.colorScale()})},n=(t,e)=>{const r=this._options.color.mode.value;let n="";"log"===r||"sqrt"===r?n="<= 0":"inverse"===r&&(n="== 0");const i=t.every((t=>isNaN(t))),o=t.some((t=>isNaN(t)));return i?((0,s.R4)(`The selected property contains only values ${n}. To display this property, select an appropriate color scale. The ${e} will be set to its last value.`),"property"===e?this._options.color.property.reset():this._options.color.mode.reset(),!1):!o||((0,s.R4)(`The selected property contains some values ${n}. These values will be colored in grey.`),!0)};this._options.color.mode.onchange.push((()=>{const t=this._colors(0)[0];if(n(t,"color scale")){const{min:e,max:r}=(0,s.GI)(t);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=r,this._options.color.min.value=e,this._setScaleStep([e,r],"color"),this._relayout({"coloraxis.colorbar.title.text":this._colorTitle(),"coloraxis.showscale":!0}),this._restyle({hovertemplate:this._options.hovertemplate(),"marker.color":this._colors(0)},[0])}})),this._options.color.min.onchange.push((()=>{r("min")})),this._options.color.max.onchange.push((()=>{r("max")})),this._colorReset.onclick=()=>{const t=this._colors(0)[0],{min:e,max:r}=(0,s.GI)(t);this._options.color.min.value=e,this._options.color.max.value=r,this._relayout({"coloraxis.cmax":r,"coloraxis.cmin":e,"coloraxis.colorscale":this._options.colorScale()})},this._options.color.property.enable(),this._options.hasColors()?(this._options.color.mode.enable(),this._options.color.min.enable(),this._options.color.max.enable(),this._colorReset.disabled=!1):(this._options.color.min.disable(),this._options.color.max.disable(),this._colorReset.disabled=!0),this._options.palette.onchange.push((()=>{this._relayout({"coloraxis.colorscale":this._options.colorScale()})})),this._options.symbol.onchange.push((()=>{this._restyle({"marker.symbol":this._symbols()},[0,1]),this._restyle({name:this._legendNames(),showlegend:this._showlegend()}),this._relayout({"coloraxis.colorbar.len":this._colorbarLen()})})),""===this._options.size.property.value?this._options.size.mode.disable():this._options.size.mode.enable(),this._options.size.property.onchange.push((()=>{""!==this._options.size.property.value?this._options.size.mode.enable():this._options.size.mode.disable(),this._restyle({"marker.size":this._sizes(0)},0)})),this._options.size.factor.onchange.push((()=>{this._restyle({"marker.size":this._sizes(0)},0)})),this._options.size.mode.onchange.push((()=>{this._restyle({"marker.size":this._sizes(0)},0)})),this._options.markerOutline.onchange.push((()=>{const t=this._options.markerOutline.value?.5:0;this._restyle({"marker.line.width":t},[0])})),this._options.joinPoints.onchange.push((()=>{const t=this._options.joinPoints.value?"lines+markers":"markers";this._restyle({mode:t},[0])}))}_createPlot(){this._plot.innerHTML="";const t=this._getTraces(),e=this._getLayout();c().newPlot(this._plot,t,e,R).then((()=>{window.requestAnimationFrame((()=>{window.dispatchEvent(new Event("resize"))}))})).catch((t=>setTimeout((()=>{throw t})))),this._plot.classList.add("chsp-map"),this._plotFix=function(t){let e=null;const r=t=>{t.isTrusted&&t.target&&(t.preventDefault(),t.stopPropagation(),e={data:t instanceof MouseEvent?{buttons:t.buttons,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey}:{buttons:1,clientX:t.touches[0].clientX,clientY:t.touches[0].clientY,ctrlKey:t.ctrlKey},target:t.target})},n=t=>{if(e&&t.target){t.preventDefault(),t.stopImmediatePropagation();const r=new Event("mousedown",{composed:!0});Object.assign(r,Object.assign(Object.assign({},e.data),{clientX:e.data.clientX-50,clientY:e.data.clientY-50}));const n=e.target;e=null,n.dispatchEvent(r);const i=new Event("mouseup",{bubbles:!0,composed:!0});t.target.dispatchEvent(i)}},i=t=>{if(e){t.preventDefault(),t.stopImmediatePropagation();const r=t instanceof MouseEvent?t:t.changedTouches[0];if(Math.abs(r.clientX-e.data.clientX)>5||Math.abs(r.clientY-e.data.clientY)>5){const t=new Event("mousedown",{composed:!0});Object.assign(t,e.data);const r=e.target;e=null,r.dispatchEvent(t)}}};let o=!1;const a=()=>{o=!0,t.addEventListener("mousedown",r,{capture:!0}),document.addEventListener("mouseup",n),document.addEventListener("mousemove",i),t.addEventListener("touchstart",r,{capture:!0}),document.addEventListener("touchmove",i,{passive:!1}),document.addEventListener("touchend",n,{passive:!1})},s=()=>{o=!1,t.removeEventListener("mousedown",r,{capture:!0}),document.removeEventListener("mouseup",n),document.removeEventListener("mousemove",i),t.removeEventListener("touchstart",r,{capture:!0}),document.removeEventListener("touchmove",i),document.removeEventListener("touchend",n)};return t.on("plotly_restyle",(([t])=>{"type"in t&&(o&&"scatter3d"===t.type&&s(),o||"scattergl"!==t.type||a())})),"scattergl"===t._fullData[0].type&&a(),{disable:s,enable:a}}(this._plot),this._plot.on("plotly_click",(t=>{if(t.event&&2===t.event.detail)return;let e=t.points[0].pointNumber;if(this._is3D()&&"selected"===t.points[0].data.name)for(const[r,[n,i]]of(0,s.HL)(this._selected.entries()))if(t.points[0].pointNumber===r){e=i.current,this._active!==n&&(this.setActive(n),this.activeChanged(n,this._indexer.fromEnvironment(i.current,this._target)));break}const r=this._indexer.fromEnvironment(e,this._target);this.select(r),this.onselect(r)})),this._plot.on("plotly_afterplot",(()=>this._afterplot())),this._updateMarkers();const r=this._getBounds();this._setScaleStep(r.x,"x"),this._setScaleStep(r.y,"y"),void 0!==r.z&&this._setScaleStep(r.z,"z"),this._plot.addEventListener("wheel",(()=>{}))}_getLayout(){const t=JSON.parse(JSON.stringify(F));return t.xaxis.title=this._title(this._options.x.property.value),t.yaxis.title=this._title(this._options.y.property.value),t.xaxis.type=this._options.x.scale.value,t.yaxis.type=this._options.y.scale.value,t.scene.xaxis.title=this._title(this._options.x.property.value),t.scene.yaxis.title=this._title(this._options.y.property.value),t.scene.zaxis.title=this._title(this._options.z.property.value),t.coloraxis.colorscale=this._options.colorScale(),t.coloraxis.cmin=this._options.color.min.value,t.coloraxis.cmax=this._options.color.max.value,t.coloraxis.colorbar.title.text=this._colorTitle(),t.coloraxis.colorbar.len=this._colorbarLen(),t.coloraxis.showscale=this._options.hasColors(),t.xaxis.range=this._getAxisRange(this._options.x.min.value,this._options.x.max.value,"map.x"),t.yaxis.range=this._getAxisRange(this._options.y.min.value,this._options.y.max.value,"map.y"),t.zaxis.range=this._getAxisRange(this._options.z.min.value,this._options.z.max.value,"map.z"),t}_property(t){const e=this._data[this._target][t];if(void 0===e)throw Error(`unknown property '${t}' requested in map`);return e}_coordinates(t,e){if(""===t.property.value)return this._selectTrace(void 0,void 0,e);const r=this._property(t.property.value).values,n=[];for(const t of this._selected.values())this._is3D()?n.push(r[t.current]):n.push(NaN);return this._selectTrace(r,n,e)}_title(t){let e=t;if(""!==t){const r=this._property(t).units;void 0!==r&&(e=t+` / ${r}`)}return e}_colorTitle(){let t=this._title(this._options.color.property.value);switch(this._options.color.mode.value){case"inverse":t=`(${t})-1`;break;case"log":t=`log10(${t})`;break;case"sqrt":t=`√(${t})`}return t}_colors(t){let e;e=this._options.hasColors()?this._property(this._options.color.property.value).values:new Array(this._property(this._options.x.property.value).values.length).fill(.5);const r=this._options.calculateColors(e),n=[];for(const t of this._selected.values())n.push(t.color);return this._selectTrace(r,n,t)}_sizes(t){let e;e=""!==this._options.size.property.value?this._property(this._options.size.property.value).values:new Array(this._property(this._options.x.property.value).values.length).fill(1);const r=this._options.calculateSizes(e),n=[];if(this._is3D())for(const t of this._selected.keys())t===this._active?n.push(1e3):n.push(500);return this._selectTrace(r,n,t)}_symbols(t){if(""===this._options.symbol.value)return this._selectTrace("circle","circle",t);const e=this._property(this._options.symbol.value),r=this._options.getSymbols(e),n=[];for(const t of this._selected.values())n.push(r[t.current]);return this._selectTrace(r,n,t)}_showlegend(){const t=[!1,!1];if(""!==this._options.symbol.value){for(let e=0;e{t.min.value=isNaN(t.min.value)?e:t.min.value,t.max.value=isNaN(t.max.value)?r:t.max.value};e(this._options.x,t.x),e(this._options.y,t.y),void 0!==t.z&&e(this._options.z,t.z),this._is3D()||this._updateMarkers()}_updateMarkers(t){if(void 0===t&&(t=Array.from(this._selected.values())),this._is3D())t.forEach((t=>t.toggleVisible(!1))),this._restyle({"marker.color":this._colors(1),"marker.size":this._sizes(1),"marker.symbol":this._symbols(1),x:this._coordinates(this._options.x,1),y:this._coordinates(this._options.y,1),z:this._coordinates(this._options.z,1)},1);else{const e=this._coordinates(this._options.x,0)[0],r=this._coordinates(this._options.y,0)[0],n=this._plot.getBoundingClientRect().width;for(const i of t){let t=e[i.current],o=r[i.current];"log"===this._options.x.scale.value&&(t=Math.log10(t)),"log"===this._options.y.scale.value&&(o=Math.log10(o)),t=n-this._pixelCoordinate(t,"x"),o=this._pixelCoordinate(o,"y");const a=this._getBounds(),s=n-this._pixelCoordinate(a.x[1],"x"),l=n-this._pixelCoordinate(a.x[0],"x"),c=this._pixelCoordinate(a.y[1],"y"),u=this._pixelCoordinate(a.y[0],"y"),h=(t,e,r)=>t+10>e&&t-10=55296&&t<=57343?"���":String.fromCharCode(t),n+=6;continue}}if(240==(248&o)&&n+91114111?e+="����":(t-=65536,e+=String.fromCharCode(55296+(t>>10),56320+(1023&t))),n+=9;continue}}e+="�"}}return e}))}B.defaultChars=";/?:@&=+$,#",B.componentChars="";const U=B,G={};function V(t,e,r){"string"!=typeof e&&(r=e,e=V.defaultChars),void 0===r&&(r=!0);const n=function(t){let e=G[t];if(e)return e;e=G[t]=[];for(let t=0;t<128;t++){const r=String.fromCharCode(t);/^[0-9a-z]$/i.test(r)?e.push(r):e.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2))}for(let r=0;r=55296&&a<=57343){if(a>=55296&&a<=56319&&e+1=56320&&r<=57343){i+=encodeURIComponent(t[e]+t[e+1]),e++;continue}}i+="%EF%BF%BD"}else i+=encodeURIComponent(t[e])}return i}V.defaultChars=";/?:@&=+$,-_.!~*'()#",V.componentChars="-_.!~*'()";const H=V;function W(t){let e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&-1!==t.hostname.indexOf(":")?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",e+=t.search||"",e+=t.hash||"",e}function q(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const Y=/^([a-z0-9.+-]+:)/i,Z=/:[0-9]*$/,X=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,$=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),J=["'"].concat($),K=["%","/","?",";","#"].concat(J),Q=["/","?","#"],tt=/^[+a-z0-9A-Z_-]{0,63}$/,et=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,rt={javascript:!0,"javascript:":!0},nt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};q.prototype.parse=function(t,e){let r,n,i,o=t;if(o=o.trim(),!e&&1===t.split("#").length){const t=X.exec(o);if(t)return this.pathname=t[1],t[2]&&(this.search=t[2]),this}let a=Y.exec(o);if(a&&(a=a[0],r=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(e||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i="//"===o.substr(0,2),!i||a&&rt[a]||(o=o.substr(2),this.slashes=!0)),!rt[a]&&(i||a&&!nt[a])){let t,e,r=-1;for(let t=0;t127?n+="x":n+=r[t];if(!n.match(tt)){const n=t.slice(0,e),i=t.slice(e+1),a=r.match(et);a&&(n.push(a[1]),i.unshift(a[2])),i.length&&(o=i.join(".")+o),this.hostname=n.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),a&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=o.indexOf("#");-1!==s&&(this.hash=o.substr(s),o=o.slice(0,s));const l=o.indexOf("?");return-1!==l&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),nt[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this},q.prototype.parseHost=function(t){let e=Z.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};const it=function(t,e){if(t&&t instanceof q)return t;const r=new q;return r.parse(t,e),r},ot=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,at=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,st=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,lt=/[\0-\x1F\x7F-\x9F]/,ct=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,ut=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,ht=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((t=>t.charCodeAt(0)))),dt=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((t=>t.charCodeAt(0))));var ft;const pt=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),mt=null!==(ft=String.fromCodePoint)&&void 0!==ft?ft:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t),e};var gt,vt,bt,yt,xt;function _t(t){return t>=gt.ZERO&&t<=gt.NINE}!function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"}(gt||(gt={})),function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"}(vt||(vt={})),function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"}(bt||(bt={})),(xt=yt||(yt={}))[xt.Legacy=0]="Legacy",xt[xt.Strict=1]="Strict",xt[xt.Attribute=2]="Attribute";class wt{constructor(t,e,r){this.decodeTree=t,this.emitCodePoint=e,this.errors=r,this.state=bt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=yt.Strict}startEntity(t){this.decodeMode=t,this.state=bt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,e){switch(this.state){case bt.EntityStart:return t.charCodeAt(e)===gt.NUM?(this.state=bt.NumericStart,this.consumed+=1,this.stateNumericStart(t,e+1)):(this.state=bt.NamedEntity,this.stateNamedEntity(t,e));case bt.NumericStart:return this.stateNumericStart(t,e);case bt.NumericDecimal:return this.stateNumericDecimal(t,e);case bt.NumericHex:return this.stateNumericHex(t,e);case bt.NamedEntity:return this.stateNamedEntity(t,e)}}stateNumericStart(t,e){return e>=t.length?-1:(32|t.charCodeAt(e))===gt.LOWER_X?(this.state=bt.NumericHex,this.consumed+=1,this.stateNumericHex(t,e+1)):(this.state=bt.NumericDecimal,this.stateNumericDecimal(t,e))}addToNumericResult(t,e,r,n){if(e!==r){const i=r-e;this.result=this.result*Math.pow(n,i)+parseInt(t.substr(e,i),n),this.consumed+=i}}stateNumericHex(t,e){const r=e;for(;e=gt.UPPER_A&&n<=gt.UPPER_F||n>=gt.LOWER_A&&n<=gt.LOWER_F)))return this.addToNumericResult(t,r,e,16),this.emitNumericEntity(i,3);e+=1}var n;return this.addToNumericResult(t,r,e,16),-1}stateNumericDecimal(t,e){const r=e;for(;e=55296&&t<=57343||t>1114111?65533:null!==(e=pt.get(t))&&void 0!==e?e:t}(this.result),this.consumed),this.errors&&(t!==gt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,e){const{decodeTree:r}=this;let n=r[this.treeIndex],i=(n&vt.VALUE_LENGTH)>>14;for(;e=gt.UPPER_A&&t<=gt.UPPER_Z||t>=gt.LOWER_A&&t<=gt.LOWER_Z||_t(t)}(o)))?0:this.emitNotTerminatedNamedEntity();if(n=r[this.treeIndex],i=(n&vt.VALUE_LENGTH)>>14,0!==i){if(a===gt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==yt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}var o;return-1}emitNotTerminatedNamedEntity(){var t;const{result:e,decodeTree:r}=this,n=(r[e]&vt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,n,this.consumed),null===(t=this.errors)||void 0===t||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,e,r){const{decodeTree:n}=this;return this.emitCodePoint(1===e?n[t]&~vt.VALUE_LENGTH:n[t+1],r),3===e&&this.emitCodePoint(n[t+2],r),r}end(){var t;switch(this.state){case bt.NamedEntity:return 0===this.result||this.decodeMode===yt.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case bt.NumericDecimal:return this.emitNumericEntity(0,2);case bt.NumericHex:return this.emitNumericEntity(0,3);case bt.NumericStart:return null===(t=this.errors)||void 0===t||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case bt.EntityStart:return 0}}}function kt(t){let e="";const r=new wt(t,(t=>e+=mt(t)));return function(t,n){let i=0,o=0;for(;(o=t.indexOf("&",o))>=0;){e+=t.slice(i,o),r.startEntity(n);const a=r.write(t,o+1);if(a<0){i=o+r.end();break}i=o+a,o=0===a?i+1:i}const a=e+t.slice(i);return e="",a}}function At(t,e,r,n){const i=(e&vt.BRANCH_LENGTH)>>7,o=e&vt.JUMP_TABLE;if(0===i)return 0!==o&&n===o?r:-1;if(o){const e=n-o;return e<0||e>=i?-1:t[r+e]-1}let a=r,s=a+i-1;for(;a<=s;){const e=a+s>>>1,r=t[e];if(rn))return t[e+i];s=e-1}}return-1}const Mt=kt(ht);function Tt(t,e=yt.Legacy){return Mt(t,e)}function St(t){for(let e=1;e'"]/g,Ct),Et(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),Et(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),function(t){t[t.XML=0]="XML",t[t.HTML=1]="HTML"}(Lt||(Lt={})),function(t){t[t.UTF8=0]="UTF8",t[t.ASCII=1]="ASCII",t[t.Extensive=2]="Extensive",t[t.Attribute=3]="Attribute",t[t.Text=4]="Text"}(zt||(zt={}));const Dt=Object.prototype.hasOwnProperty;function It(t,e){return Dt.call(t,e)}function Ft(t){return Array.prototype.slice.call(arguments,1).forEach((function(e){if(e){if("object"!=typeof e)throw new TypeError(e+"must be object");Object.keys(e).forEach((function(r){t[r]=e[r]}))}})),t}function Rt(t,e,r){return[].concat(t.slice(0,e),r,t.slice(e+1))}function Pt(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||!(65535&~t&&65534!=(65535&t))||t>=0&&t<=8||11===t||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function jt(t){if(t>65535){const e=55296+((t-=65536)>>10),r=56320+(1023&t);return String.fromCharCode(e,r)}return String.fromCharCode(t)}const Nt=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Bt=new RegExp(Nt.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),Ut=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Gt(t){return t.indexOf("\\")<0?t:t.replace(Nt,"$1")}function Vt(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(Bt,(function(t,e,r){return e||function(t,e){if(35===e.charCodeAt(0)&&Ut.test(e)){const r="x"===e[1].toLowerCase()?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return Pt(r)?jt(r):t}const r=Tt(t);return r!==t?r:t}(t,r)}))}const Ht=/[&<>"]/,Wt=/[&<>"]/g,qt={"&":"&","<":"<",">":">",'"':"""};function Yt(t){return qt[t]}function Zt(t){return Ht.test(t)?t.replace(Wt,Yt):t}const Xt=/[.?*+^$[\]\\(){}|-]/g;function $t(t){return t.replace(Xt,"\\$&")}function Jt(t){switch(t){case 9:case 32:return!0}return!1}function Kt(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Qt(t){return ot.test(t)||at.test(t)}function te(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function ee(t){return t=t.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}const re={mdurl:t,ucmicro:e};function ne(t,e,r){let n,i,o,a;const s=t.posMax,l=t.pos;for(t.pos=e+1,n=1;t.pos32))return o;if(41===n){if(0===a)break;a--}i++}return e===i||0!==a||(o.str=Vt(t.slice(e,i)),o.pos=i,o.ok=!0),o}function oe(t,e,r,n){let i,o=e;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)a.str=n.str,a.marker=n.marker;else{if(o>=r)return a;let n=t.charCodeAt(o);if(34!==n&&39!==n&&40!==n)return a;e++,o++,40===n&&(n=41),a.marker=n}for(;o"+Zt(o.content)+""},ae.code_block=function(t,e,r,n,i){const o=t[e];return""+Zt(t[e].content)+"\n"},ae.fence=function(t,e,r,n,i){const o=t[e],a=o.info?Vt(o.info).trim():"";let s,l="",c="";if(a){const t=a.split(/(\s+)/g);l=t[0],c=t.slice(2).join("")}if(s=r.highlight&&r.highlight(o.content,l,c)||Zt(o.content),0===s.indexOf("${s}\n`}return`
${s}
\n`},ae.image=function(t,e,r,n,i){const o=t[e];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,r,n),i.renderToken(t,e,r)},ae.hardbreak=function(t,e,r){return r.xhtmlOut?"
\n":"
\n"},ae.softbreak=function(t,e,r){return r.breaks?r.xhtmlOut?"
\n":"
\n":"\n"},ae.text=function(t,e){return Zt(t[e].content)},ae.html_block=function(t,e){return t[e].content},ae.html_inline=function(t,e){return t[e].content},se.prototype.renderAttrs=function(t){let e,r,n;if(!t.attrs)return"";for(n="",e=0,r=t.attrs.length;e\n":">",i},se.prototype.renderInline=function(t,e,r){let n="";const i=this.rules;for(let o=0,a=t.length;o=0&&(r=this.attrs[e][1]),r},he.prototype.attrJoin=function(t,e){const r=this.attrIndex(t);r<0?this.attrPush([t,e]):this.attrs[r][1]=this.attrs[r][1]+" "+e};const de=he;function fe(t,e,r){this.src=t,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=e}fe.prototype.Token=de;const pe=fe,me=/\r\n?|\n/g,ge=/\0/g;function ve(t){return/^<\/a\s*>/i.test(t)}const be=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,ye=/\((c|tm|r)\)/i,xe=/\((c|tm|r)\)/gi,_e={c:"©",r:"®",tm:"™"};function we(t,e){return _e[e.toLowerCase()]}function ke(t){let e=0;for(let r=t.length-1;r>=0;r--){const n=t[r];"text"!==n.type||e||(n.content=n.content.replace(xe,we)),"link_open"===n.type&&"auto"===n.info&&e--,"link_close"===n.type&&"auto"===n.info&&e++}}function Ae(t){let e=0;for(let r=t.length-1;r>=0;r--){const n=t[r];"text"!==n.type||e||be.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===n.type&&"auto"===n.info&&e--,"link_close"===n.type&&"auto"===n.info&&e++}}const Me=/['"]/,Te=/['"]/g;function Se(t,e,r){return t.slice(0,e)+r+t.slice(e+1)}function Ce(t,e){let r;const n=[];for(let i=0;i=0&&!(n[r].level<=a);r--);if(n.length=r+1,"text"!==o.type)continue;let s=o.content,l=0,c=s.length;t:for(;l=0)p=s.charCodeAt(u.index-1);else for(r=i-1;r>=0&&"softbreak"!==t[r].type&&"hardbreak"!==t[r].type;r--)if(t[r].content){p=t[r].content.charCodeAt(t[r].content.length-1);break}let m=32;if(l=48&&p<=57&&(d=h=!1),h&&d&&(h=g,d=v),h||d){if(d)for(r=n.length-1;r>=0;r--){let h=n[r];if(n[r].level=0;a--){const s=i[a];if("link_close"!==s.type){if("html_inline"===s.type&&(r=s.content,/^\s]/i.test(r)&&o>0&&o--,ve(s.content)&&o++),!(o>0)&&"text"===s.type&&t.md.linkify.test(s.content)){const r=s.content;let o=t.md.linkify.match(r);const l=[];let c=s.level,u=0;o.length>0&&0===o[0].index&&a>0&&"text_special"===i[a-1].type&&(o=o.slice(1));for(let e=0;eu){const e=new t.Token("text","",0);e.content=r.slice(u,s),e.level=c,l.push(e)}const h=new t.Token("link_open","a",1);h.attrs=[["href",i]],h.level=c++,h.markup="linkify",h.info="auto",l.push(h);const d=new t.Token("text","",0);d.content=a,d.level=c,l.push(d);const f=new t.Token("link_close","a",-1);f.level=--c,f.markup="linkify",f.info="auto",l.push(f),u=o[e].lastIndex}if(u=0;e--)"inline"===t.tokens[e].type&&(ye.test(t.tokens[e].content)&&ke(t.tokens[e].children),be.test(t.tokens[e].content)&&Ae(t.tokens[e].children))}],["smartquotes",function(t){if(t.md.options.typographer)for(let e=t.tokens.length-1;e>=0;e--)"inline"===t.tokens[e].type&&Me.test(t.tokens[e].content)&&Ce(t.tokens[e].children,t)}],["text_join",function(t){let e,r;const n=t.tokens,i=n.length;for(let t=0;t0&&this.level++,this.tokens.push(n),n},Oe.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},Oe.prototype.skipEmptyLines=function(t){for(let e=this.lineMax;te;)if(!Jt(this.src.charCodeAt(--t)))return t+1;return t},Oe.prototype.skipChars=function(t,e){for(let r=this.src.length;tr;)if(e!==this.src.charCodeAt(--t))return t+1;return t},Oe.prototype.getLines=function(t,e,r,n){if(t>=e)return"";const i=new Array(e-t);for(let o=0,a=t;ar?new Array(t-r+1).join(" ")+this.src.slice(c,l):this.src.slice(c,l)}return i.join("")},Oe.prototype.Token=de;const De=Oe;function Ie(t,e){const r=t.bMarks[e]+t.tShift[e],n=t.eMarks[e];return t.src.slice(r,n)}function Fe(t){const e=[],r=t.length;let n=0,i=t.charCodeAt(n),o=!1,a=0,s="";for(;n=n)return-1;let o=t.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=n)return-1;if(o=t.src.charCodeAt(i++),!(o>=48&&o<=57)){if(41===o||46===o)break;return-1}if(i-r>=10)return-1}return i`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",Ne="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Be=new RegExp("^(?:"+je+"|"+Ne+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|]*>|)"),Ue=new RegExp("^(?:"+je+"|"+Ne+")"),Ge=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(Ue.source+"\\s*$"),/^$/,!1]],Ve=[["table",function(t,e,r,n){if(e+2>r)return!1;let i=e+1;if(t.sCount[i]=4)return!1;let o=t.bMarks[i]+t.tShift[i];if(o>=t.eMarks[i])return!1;const a=t.src.charCodeAt(o++);if(124!==a&&45!==a&&58!==a)return!1;if(o>=t.eMarks[i])return!1;const s=t.src.charCodeAt(o++);if(124!==s&&45!==s&&58!==s&&!Jt(s))return!1;if(45===a&&Jt(s))return!1;for(;o=4)return!1;c=Fe(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop();const h=c.length;if(0===h||h!==u.length)return!1;if(n)return!0;const d=t.parentType;t.parentType="table";const f=t.md.block.ruler.getRules("blockquote"),p=[e,0];t.push("table_open","table",1).map=p,t.push("thead_open","thead",1).map=[e,e+1],t.push("tr_open","tr",1).map=[e,e+1];for(let e=0;e=4)break;if(c=Fe(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop(),g+=h-c.length,g>65536)break;i===e+2&&(t.push("tbody_open","tbody",1).map=m=[e+2,0]),t.push("tr_open","tr",1).map=[i,i+1];for(let e=0;e=4))break;n++,i=n}t.line=i;const o=t.push("code_block","code",0);return o.content=t.getLines(e,i,4+t.blkIndent,!1)+"\n",o.map=[e,t.line],!0}],["fence",function(t,e,r,n){let i=t.bMarks[e]+t.tShift[e],o=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(i+3>o)return!1;const a=t.src.charCodeAt(i);if(126!==a&&96!==a)return!1;let s=i;i=t.skipChars(i,a);let l=i-s;if(l<3)return!1;const c=t.src.slice(s,i),u=t.src.slice(i,o);if(96===a&&u.indexOf(String.fromCharCode(a))>=0)return!1;if(n)return!0;let h=e,d=!1;for(;!(h++,h>=r||(i=s=t.bMarks[h]+t.tShift[h],o=t.eMarks[h],i=4||(i=t.skipChars(i,a),i-s=4)return!1;if(62!==t.src.charCodeAt(i))return!1;if(n)return!0;const s=[],l=[],c=[],u=[],h=t.md.block.ruler.getRules("blockquote"),d=t.parentType;t.parentType="blockquote";let f,p=!1;for(f=e;f=o)break;if(62===t.src.charCodeAt(i++)&&!e){let e,r,n=t.sCount[f]+1;32===t.src.charCodeAt(i)?(i++,n++,r=!1,e=!0):9===t.src.charCodeAt(i)?(e=!0,(t.bsCount[f]+n)%4==3?(i++,n++,r=!1):r=!0):e=!1;let a=n;for(s.push(t.bMarks[f]),t.bMarks[f]=i;i=o,l.push(t.bsCount[f]),t.bsCount[f]=t.sCount[f]+1+(e?1:0),c.push(t.sCount[f]),t.sCount[f]=a-n,u.push(t.tShift[f]),t.tShift[f]=i-t.bMarks[f];continue}if(p)break;let n=!1;for(let e=0,i=h.length;e";const v=[e,0];g.map=v,t.md.block.tokenize(t,e,f),t.push("blockquote_close","blockquote",-1).markup=">",t.lineMax=a,t.parentType=d,v[1]=t.line;for(let r=0;r=4)return!1;let o=t.bMarks[e]+t.tShift[e];const a=t.src.charCodeAt(o++);if(42!==a&&45!==a&&95!==a)return!1;let s=1;for(;o=4)return!1;if(t.listIndent>=0&&t.sCount[l]-t.listIndent>=4&&t.sCount[l]=t.blkIndent&&(f=!0),(d=Pe(t,l))>=0){if(u=!0,a=t.bMarks[l]+t.tShift[l],h=Number(t.src.slice(a,d-1)),f&&1!==h)return!1}else{if(!((d=Re(t,l))>=0))return!1;u=!1}if(f&&t.skipSpaces(d)>=t.eMarks[l])return!1;if(n)return!0;const p=t.src.charCodeAt(d-1),m=t.tokens.length;u?(s=t.push("ordered_list_open","ol",1),1!==h&&(s.attrs=[["start",h]])):s=t.push("bullet_list_open","ul",1);const g=[l,0];s.map=g,s.markup=String.fromCharCode(p);let v=!1;const b=t.md.block.ruler.getRules("list"),y=t.parentType;for(t.parentType="list";l=i?1:n-e,f>4&&(f=1);const m=e+f;s=t.push("list_item_open","li",1),s.markup=String.fromCharCode(p);const g=[l,0];s.map=g,u&&(s.info=t.src.slice(a,d-1));const y=t.tight,x=t.tShift[l],_=t.sCount[l],w=t.listIndent;if(t.listIndent=t.blkIndent,t.blkIndent=m,t.tight=!0,t.tShift[l]=h-t.bMarks[l],t.sCount[l]=n,h>=i&&t.isEmpty(l+1)?t.line=Math.min(t.line+2,r):t.md.block.tokenize(t,l,r,!0),t.tight&&!v||(c=!1),v=t.line-l>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=w,t.tShift[l]=x,t.sCount[l]=_,t.tight=y,s=t.push("list_item_close","li",-1),s.markup=String.fromCharCode(p),l=t.line,g[1]=l,l>=r)break;if(t.sCount[l]=4)break;let k=!1;for(let e=0,n=b.length;e=4)return!1;if(91!==t.src.charCodeAt(i))return!1;function s(e){const r=t.lineMax;if(e>=r||t.isEmpty(e))return null;let n=!1;if(t.sCount[e]-t.blkIndent>3&&(n=!0),t.sCount[e]<0&&(n=!0),!n){const n=t.md.block.ruler.getRules("reference"),i=t.parentType;t.parentType="reference";let o=!1;for(let i=0,a=n.length;i=4)return!1;if(!t.md.options.html)return!1;if(60!==t.src.charCodeAt(i))return!1;let a=t.src.slice(i,o),s=0;for(;s=4)return!1;let a=t.src.charCodeAt(i);if(35!==a||i>=o)return!1;let s=1;for(a=t.src.charCodeAt(++i);35===a&&i6||ii&&Jt(t.src.charCodeAt(l-1))&&(o=l),t.line=e+1;const c=t.push("heading_open","h"+String(s),1);c.markup="########".slice(0,s),c.map=[e,t.line];const u=t.push("inline","",0);return u.content=t.src.slice(i,o).trim(),u.map=[e,t.line],u.children=[],t.push("heading_close","h"+String(s),-1).markup="########".slice(0,s),!0},["paragraph","reference","blockquote"]],["lheading",function(t,e,r){const n=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;const i=t.parentType;t.parentType="paragraph";let o,a=0,s=e+1;for(;s3)continue;if(t.sCount[s]>=t.blkIndent){let e=t.bMarks[s]+t.tShift[s];const r=t.eMarks[s];if(e=r))){a=61===o?1:2;break}}if(t.sCount[s]<0)continue;let e=!1;for(let i=0,o=n.length;i3)continue;if(t.sCount[o]<0)continue;let e=!1;for(let i=0,a=n.length;i=r))&&!(t.sCount[a]=o){t.line=r;break}const e=t.line;let l=!1;for(let o=0;o=t.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");t.tight=!s,t.isEmpty(t.line-1)&&(s=!0),a=t.line,a0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(i),n},qe.prototype.scanDelims=function(t,e){const r=this.posMax,n=this.src.charCodeAt(t),i=t>0?this.src.charCodeAt(t-1):32;let o=t;for(;o?@[]^_`{|}~-".split("").forEach((function(t){$e[t.charCodeAt(0)]=1}));const Ke={tokenize:function(t,e){const r=t.pos,n=t.src.charCodeAt(r);if(e)return!1;if(126!==n)return!1;const i=t.scanDelims(t.pos,!0);let o=i.length;const a=String.fromCharCode(n);if(o<2)return!1;let s;o%2&&(s=t.push("text","",0),s.content=a,o--);for(let e=0;e=0;r--){const n=e[r];if(95!==n.marker&&42!==n.marker)continue;if(-1===n.end)continue;const i=e[n.end],o=r>0&&e[r-1].end===n.end+1&&e[r-1].marker===n.marker&&e[r-1].token===n.token-1&&e[n.end+1].token===i.token+1,a=String.fromCharCode(n.marker),s=t.tokens[n.token];s.type=o?"strong_open":"em_open",s.tag=o?"strong":"em",s.nesting=1,s.markup=o?a+a:a,s.content="";const l=t.tokens[i.token];l.type=o?"strong_close":"em_close",l.tag=o?"strong":"em",l.nesting=-1,l.markup=o?a+a:a,l.content="",o&&(t.tokens[e[r-1].token].content="",t.tokens[e[n.end+1].token].content="",r--)}}const tr={tokenize:function(t,e){const r=t.pos,n=t.src.charCodeAt(r);if(e)return!1;if(95!==n&&42!==n)return!1;const i=t.scanDelims(t.pos,42===n);for(let e=0;e\x00-\x20]*)$/,nr=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,ir=/^&([a-z][a-z0-9]{1,31});/i;function or(t){const e={},r=t.length;if(!r)return;let n=0,i=-2;const o=[];for(let a=0;as;l-=o[l]+1){const e=t[l];if(e.marker===r.marker&&e.open&&e.end<0){let n=!1;if((e.close||r.open)&&(e.length+r.length)%3==0&&(e.length%3==0&&r.length%3==0||(n=!0)),!n){const n=l>0&&!t[l-1].open?o[l-1]+1:0;o[a]=a-l+n,o[l]=n,r.open=!1,e.end=a,e.close=!1,c=-1,i=-2;break}}}-1!==c&&(e[r.marker][(r.open?3:0)+(r.length||0)%3]=c)}}const ar=[["text",function(t,e){let r=t.pos;for(;r0)return!1;const r=t.pos;if(r+3>t.posMax)return!1;if(58!==t.src.charCodeAt(r))return!1;if(47!==t.src.charCodeAt(r+1))return!1;if(47!==t.src.charCodeAt(r+2))return!1;const n=t.pending.match(Xe);if(!n)return!1;const i=n[1],o=t.md.linkify.matchAtStart(t.src.slice(r-i.length));if(!o)return!1;let a=o.url;if(a.length<=i.length)return!1;a=a.replace(/\*+$/,"");const s=t.md.normalizeLink(a);if(!t.md.validateLink(s))return!1;if(!e){t.pending=t.pending.slice(0,-i.length);const e=t.push("link_open","a",1);e.attrs=[["href",s]],e.markup="linkify",e.info="auto",t.push("text","",0).content=t.md.normalizeLinkText(a);const r=t.push("link_close","a",-1);r.markup="linkify",r.info="auto"}return t.pos+=a.length-i.length,!0}],["newline",function(t,e){let r=t.pos;if(10!==t.src.charCodeAt(r))return!1;const n=t.pending.length-1,i=t.posMax;if(!e)if(n>=0&&32===t.pending.charCodeAt(n))if(n>=1&&32===t.pending.charCodeAt(n-1)){let e=n-1;for(;e>=1&&32===t.pending.charCodeAt(e-1);)e--;t.pending=t.pending.slice(0,e),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(r++;r=n)return!1;let i=t.src.charCodeAt(r);if(10===i){for(e||t.push("hardbreak","br",0),r++;r=55296&&i<=56319&&r+1=56320&&e<=57343&&(o+=t.src[r+1],r++)}const a="\\"+o;if(!e){const e=t.push("text_special","",0);i<256&&0!==$e[i]?e.content=o:e.content=a,e.markup=a,e.info="escape"}return t.pos=r+1,!0}],["backticks",function(t,e){let r=t.pos;if(96!==t.src.charCodeAt(r))return!1;const n=r;r++;const i=t.posMax;for(;r=h)return!1;if(l=p,i=t.md.helpers.parseLinkDestination(t.src,p,t.posMax),i.ok){for(a=t.md.normalizeLink(i.str),t.md.validateLink(a)?p=i.pos:a="",l=p;p=h||41!==t.src.charCodeAt(p))&&(c=!0),p++}if(c){if(void 0===t.env.references)return!1;if(p=0?n=t.src.slice(l,p++):p=f+1):p=f+1,n||(n=t.src.slice(d,f)),o=t.env.references[ee(n)],!o)return t.pos=u,!1;a=o.href,s=o.title}if(!e){t.pos=d,t.posMax=f;const e=[["href",a]];t.push("link_open","a",1).attrs=e,s&&e.push(["title",s]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)}return t.pos=p,t.posMax=h,!0}],["image",function(t,e){let r,n,i,o,a,s,l,c,u="";const h=t.pos,d=t.posMax;if(33!==t.src.charCodeAt(t.pos))return!1;if(91!==t.src.charCodeAt(t.pos+1))return!1;const f=t.pos+2,p=t.md.helpers.parseLinkLabel(t,t.pos+1,!1);if(p<0)return!1;if(o=p+1,o=d)return!1;for(c=o,s=t.md.helpers.parseLinkDestination(t.src,o,t.posMax),s.ok&&(u=t.md.normalizeLink(s.str),t.md.validateLink(u)?o=s.pos:u=""),c=o;o=d||41!==t.src.charCodeAt(o))return t.pos=h,!1;o++}else{if(void 0===t.env.references)return!1;if(o=0?i=t.src.slice(c,o++):o=p+1):o=p+1,i||(i=t.src.slice(f,p)),a=t.env.references[ee(i)],!a)return t.pos=h,!1;u=a.href,l=a.title}if(!e){n=t.src.slice(f,p);const e=[];t.md.inline.parse(n,t.md,t.env,e);const r=t.push("image","img",0),i=[["src",u],["alt",""]];r.attrs=i,r.children=e,r.content=n,l&&i.push(["title",l])}return t.pos=o,t.posMax=d,!0}],["autolink",function(t,e){let r=t.pos;if(60!==t.src.charCodeAt(r))return!1;const n=t.pos,i=t.posMax;for(;;){if(++r>=i)return!1;const e=t.src.charCodeAt(r);if(60===e)return!1;if(62===e)break}const o=t.src.slice(n+1,r);if(rr.test(o)){const r=t.md.normalizeLink(o);if(!t.md.validateLink(r))return!1;if(!e){const e=t.push("link_open","a",1);e.attrs=[["href",r]],e.markup="autolink",e.info="auto",t.push("text","",0).content=t.md.normalizeLinkText(o);const n=t.push("link_close","a",-1);n.markup="autolink",n.info="auto"}return t.pos+=o.length+2,!0}if(er.test(o)){const r=t.md.normalizeLink("mailto:"+o);if(!t.md.validateLink(r))return!1;if(!e){const e=t.push("link_open","a",1);e.attrs=[["href",r]],e.markup="autolink",e.info="auto",t.push("text","",0).content=t.md.normalizeLinkText(o);const n=t.push("link_close","a",-1);n.markup="autolink",n.info="auto"}return t.pos+=o.length+2,!0}return!1}],["html_inline",function(t,e){if(!t.md.options.html)return!1;const r=t.posMax,n=t.pos;if(60!==t.src.charCodeAt(n)||n+2>=r)return!1;const i=t.src.charCodeAt(n+1);if(33!==i&&63!==i&&47!==i&&!function(t){const e=32|t;return e>=97&&e<=122}(i))return!1;const o=t.src.slice(n).match(Be);if(!o)return!1;if(!e){const e=t.push("html_inline","",0);e.content=o[0],a=e.content,/^\s]/i.test(a)&&t.linkLevel++,function(t){return/^<\/a\s*>/i.test(t)}(e.content)&&t.linkLevel--}var a;return t.pos+=o[0].length,!0}],["entity",function(t,e){const r=t.pos,n=t.posMax;if(38!==t.src.charCodeAt(r))return!1;if(r+1>=n)return!1;if(35===t.src.charCodeAt(r+1)){const n=t.src.slice(r).match(nr);if(n){if(!e){const e="x"===n[1][0].toLowerCase()?parseInt(n[1].slice(1),16):parseInt(n[1],10),r=t.push("text_special","",0);r.content=Pt(e)?jt(e):jt(65533),r.markup=n[0],r.info="entity"}return t.pos+=n[0].length,!0}}else{const n=t.src.slice(r).match(ir);if(n){const r=Tt(n[0]);if(r!==n[0]){if(!e){const e=t.push("text_special","",0);e.content=r,e.markup=n[0],e.info="entity"}return t.pos+=n[0].length,!0}}}return!1}]],sr=[["balance_pairs",function(t){const e=t.tokens_meta,r=t.tokens_meta.length;or(t.delimiters);for(let t=0;t0&&n++,"text"===i[e].type&&e+1=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;a||t.pos++,o[e]=t.pos},lr.prototype.tokenize=function(t){const e=this.ruler.getRules(""),r=e.length,n=t.posMax,i=t.md.options.maxNesting;for(;t.pos=t.pos)throw new Error("inline rule didn't increment state.pos");break}if(a){if(t.pos>=n)break}else t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()},lr.prototype.parse=function(t,e,r,n){const i=new this.State(t,e,r,n);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let t=0;t=3&&":"===t[e-3]||e>=3&&"/"===t[e-3]?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,r){const n=t.slice(e);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},gr="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function vr(t){const e=t.re=function(t){const e={};t=t||{},e.src_Any=st.source,e.src_Cc=lt.source,e.src_Z=ut.source,e.src_P=ot.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");return e.src_pseudo_letter="(?:(?![><|]|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|[><|]|"+e.src_ZPCc+")(?!"+(t["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy='(^|[><|]|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}(t.__opts__),r=t.__tlds__.slice();function n(t){return t.replace("%TLDS%",e.src_tlds)}t.onCompile(),t.__tlds_replaced__||r.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),r.push(e.src_xn),e.src_tlds=r.join("|"),e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");const i=[];function o(t,e){throw new Error('(LinkifyIt) Invalid schema "'+t+'": '+e)}t.__compiled__={},Object.keys(t.__schemas__).forEach((function(e){const r=t.__schemas__[e];if(null===r)return;const n={validate:null,link:null};if(t.__compiled__[e]=n,"[object Object]"===hr(r))return"[object RegExp]"!==hr(r.validate)?dr(r.validate)?n.validate=r.validate:o(e,r):n.validate=function(t){return function(e,r){const n=e.slice(r);return t.test(n)?n.match(t)[0].length:0}}(r.validate),void(dr(r.normalize)?n.normalize=r.normalize:r.normalize?o(e,r):n.normalize=function(t,e){e.normalize(t)});!function(t){return"[object String]"===hr(t)}(r)?o(e,r):i.push(e)})),i.forEach((function(e){t.__compiled__[t.__schemas__[e]]&&(t.__compiled__[e].validate=t.__compiled__[t.__schemas__[e]].validate,t.__compiled__[e].normalize=t.__compiled__[t.__schemas__[e]].normalize)})),t.__compiled__[""]={validate:null,normalize:function(t,e){e.normalize(t)}};const a=Object.keys(t.__compiled__).filter((function(e){return e.length>0&&t.__compiled__[e]})).map(fr).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+a+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+a+")","ig"),t.re.schema_at_start=RegExp("^"+t.re.schema_search.source,"i"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),function(t){t.__index__=-1,t.__text_cache__=""}(t)}function br(t,e){const r=t.__index__,n=t.__last_index__,i=t.__text_cache__.slice(r,n);this.schema=t.__schema__.toLowerCase(),this.index=r+e,this.lastIndex=n+e,this.raw=i,this.text=i,this.url=i}function yr(t,e){const r=new br(t,e);return t.__compiled__[r.schema].normalize(r,t),r}function xr(t,e){if(!(this instanceof xr))return new xr(t,e);var r;e||(r=t,Object.keys(r||{}).reduce((function(t,e){return t||pr.hasOwnProperty(e)}),!1)&&(e=t,t={})),this.__opts__=ur({},pr,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=ur({},mr,t),this.__compiled__={},this.__tlds__=gr,this.__tlds_replaced__=!1,this.re={},vr(this)}xr.prototype.add=function(t,e){return this.__schemas__[t]=e,vr(this),this},xr.prototype.set=function(t){return this.__opts__=ur(this.__opts__,t),this},xr.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let e,r,n,i,o,a,s,l,c;if(this.re.schema_test.test(t))for(s=this.re.schema_search,s.lastIndex=0;null!==(e=s.exec(t));)if(i=this.testSchemaAt(t,e[2],s.lastIndex),i){this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&null!==(n=t.match(this.re.email_fuzzy))&&(o=n.index+n[1].length,a=n.index+n[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a))),this.__index__>=0},xr.prototype.pretest=function(t){return this.re.pretest.test(t)},xr.prototype.testSchemaAt=function(t,e,r){return this.__compiled__[e.toLowerCase()]?this.__compiled__[e.toLowerCase()].validate(t,r,this):0},xr.prototype.match=function(t){const e=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(e.push(yr(this,r)),r=this.__last_index__);let n=r?t.slice(r):t;for(;this.test(n);)e.push(yr(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return e.length?e:null},xr.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const e=this.re.schema_at_start.exec(t);if(!e)return null;const r=this.testSchemaAt(t,e[2],e[0].length);return r?(this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+r,yr(this,0)):null},xr.prototype.tlds=function(t,e){return t=Array.isArray(t)?t:[t],e?(this.__tlds__=this.__tlds__.concat(t).sort().filter((function(t,e,r){return t!==r[e-1]})).reverse(),vr(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,vr(this),this)},xr.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),"mailto:"!==t.schema||/^mailto:/i.test(t.url)||(t.url="mailto:"+t.url)},xr.prototype.onCompile=function(){};const _r=xr,wr=2147483647,kr=36,Ar=/^xn--/,Mr=/[^\0-\x7F]/,Tr=/[\x2E\u3002\uFF0E\uFF61]/g,Sr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Cr=Math.floor,Er=String.fromCharCode;function Lr(t){throw new RangeError(Sr[t])}function zr(t,e){const r=t.split("@");let n="";r.length>1&&(n=r[0]+"@",t=r[1]);const i=function(t,e){const r=[];let n=t.length;for(;n--;)r[n]=e(t[n]);return r}((t=t.replace(Tr,".")).split("."),e).join(".");return n+i}function Or(t){const e=[];let r=0;const n=t.length;for(;r=55296&&i<=56319&&r>1,t+=Cr(t/e);t>455;n+=kr)t=Cr(t/35);return Cr(n+36*t/(t+38))},Fr=function(t){const e=[],r=t.length;let n=0,i=128,o=72,a=t.lastIndexOf("-");a<0&&(a=0);for(let r=0;r=128&&Lr("not-basic"),e.push(t.charCodeAt(r));for(let l=a>0?a+1:0;l=r&&Lr("invalid-input");const a=(s=t.charCodeAt(l++))>=48&&s<58?s-48+26:s>=65&&s<91?s-65:s>=97&&s<123?s-97:kr;a>=kr&&Lr("invalid-input"),a>Cr((wr-n)/e)&&Lr("overflow"),n+=a*e;const c=i<=o?1:i>=o+26?26:i-o;if(aCr(wr/u)&&Lr("overflow"),e*=u}const c=e.length+1;o=Ir(n-a,c,0==a),Cr(n/c)>wr-i&&Lr("overflow"),i+=Cr(n/c),n%=c,e.splice(n++,0,i)}var s;return String.fromCodePoint(...e)},Rr=function(t){const e=[],r=(t=Or(t)).length;let n=128,i=0,o=72;for(const r of t)r<128&&e.push(Er(r));const a=e.length;let s=a;for(a&&e.push("-");s=n&&eCr((wr-i)/l)&&Lr("overflow"),i+=(r-n)*l,n=r;for(const r of t)if(rwr&&Lr("overflow"),r===n){let t=i;for(let r=kr;;r+=kr){const n=r<=o?1:r>=o+26?26:r-o;if(t=0))try{e.hostname=Pr(e.hostname)}catch(t){}return H(W(e))}function Wr(t){const e=it(t,!0);if(e.hostname&&(!e.protocol||Vr.indexOf(e.protocol)>=0))try{e.hostname=jr(e.hostname)}catch(t){}return U(W(e),U.defaultChars+"%")}function qr(t,e){if(!(this instanceof qr))return new qr(t,e);e||Ot(t)||(e=t||{},t="default"),this.inline=new cr,this.block=new We,this.core=new ze,this.renderer=new le,this.linkify=new _r,this.validateLink=Gr,this.normalizeLink=Hr,this.normalizeLinkText=Wr,this.utils=r,this.helpers=Ft({},n),this.options={},this.configure(t),e&&this.set(e)}qr.prototype.set=function(t){return Ft(this.options,t),this},qr.prototype.configure=function(t){const e=this;if(Ot(t)){const e=t;if(!(t=Nr[e]))throw new Error('Wrong `markdown-it` preset "'+e+'", check name')}if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach((function(r){t.components[r].rules&&e[r].ruler.enableOnly(t.components[r].rules),t.components[r].rules2&&e[r].ruler2.enableOnly(t.components[r].rules2)})),this},qr.prototype.enable=function(t,e){let r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){r=r.concat(this[e].ruler.enable(t,!0))}),this),r=r.concat(this.inline.ruler2.enable(t,!0));const n=t.filter((function(t){return r.indexOf(t)<0}));if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},qr.prototype.disable=function(t,e){let r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){r=r.concat(this[e].ruler.disable(t,!0))}),this),r=r.concat(this.inline.ruler2.disable(t,!0));const n=t.filter((function(t){return r.indexOf(t)<0}));if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},qr.prototype.use=function(t){const e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},qr.prototype.parse=function(t,e){if("string"!=typeof t)throw new Error("Input data should be a String");const r=new this.core.State(t,this,e);return this.core.process(r),r.tokens},qr.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},qr.prototype.parseInline=function(t,e){const r=new this.core.State(t,this,e);return r.inlineMode=!0,this.core.process(r),r.tokens},qr.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};const Yr=qr;class Zr{constructor(t,e){e.name=e.name.replace(//g,">");const r=(0,s.V6)(t),n=document.createElement("div");n.style.setProperty("height","100%"),r.appendChild(n),this._shadow=n.attachShadow({mode:"open"}),this._shadow.adoptedStyleSheets=[v.A,b.A],this._name=document.createElement("div"),this._shadow.appendChild(this._name),this._name.innerHTML=`
\n ${e.name} \n
${g}
\n
`;const i=document.createElement("template");i.innerHTML=function(t){const e=Yr({html:!1,linkify:!0,typographer:!0});let r="No description for this dataset.";void 0!==t.description&&(r=t.description);let n="No authors for this dataset.";if(void 0!==t.authors){n='
    ';for(const r of t.authors)n+=`
  • ${e.render(r).slice(3,-5)}
  • `;n+="
"}let i="No references for this dataset.";if(void 0!==t.references){i="
    ";for(const r of t.references)i+=`
  • ${e.render(r)}
  • `;i+="
"}return``}(e);const o=i.content.firstChild;this._modal=new T.A(o),this._modal.shadow.adoptedStyleSheets=[v.A,b.A],this._name.onclick=()=>this._modal.open(),o.addEventListener("keydown",(t=>{t.stopPropagation()}))}remove(){this._modal.remove(),this._shadow.host.remove()}}var Xr=__webpack_require__(14761);function $r(t){if("object"!=typeof t||null===t)throw Error("the dataset must be a JavaScript object");if(!("meta"in t))throw Error('missing "meta" key in the dataset');if("object"!=typeof t.meta||null===t.meta)throw Error('"meta" must be an object in the dataset');if(function(t){if(o()(null!==t,"o !== null"),!("name"in t))throw Error('missing "meta.name" key in the dataset');if("string"!=typeof t.name)throw Error('"meta.name" must be a string in the dataset');if("description"in t&&"string"!=typeof t.description)throw Error('"meta.description" should be a string in the dataset');if("authors"in t){if(!Array.isArray(t.authors))throw Error('"meta.authors" must be an array in the dataset');for(const e of t.authors)if("string"!=typeof e)throw Error('"meta.authors" must be an array of strings in the dataset')}if("references"in t){if(!Array.isArray(t.references))throw Error('"meta.references" must be an array in the dataset');for(const e of t.references)if("string"!=typeof e)throw Error('"meta.references" must be an array of strings in the dataset')}}(t.meta),!("structures"in t))throw Error('missing "structures" key in the dataset');if(!Array.isArray(t.structures))throw Error('"structures" must be an array in the dataset');const[e,r]=function(t){let e=0;for(let r=0;r=e.length)throw Error(`out of bounds 'structure' for environment ${r}: index is ${n.structure}, we have ${e.length} structures`);if(!("center"in n)||"number"!=typeof n.center)throw Error(`missing 'center' for environment ${r}`);const i=e[n.structure].size;if(!tn(n.center)||n.center>=i)throw Error(`out of bounds 'center' for environment ${r}: index is ${n.center}, we have ${i} atoms in structure ${n.structure}`);if(!("cutoff"in n)||"number"!=typeof n.cutoff)throw Error(`missing 'cutoff' for environment ${r}`)}}(t.environments,t.structures)}if("shapes"in t){const r=function(t,e,r){if("object"!=typeof t||null===t)return"'shapes' must be an object";for(const[n,i]of Object.entries(t)){const t=i;if(!("kind"in t))return`missing "kind" in shape ${n}`;if("string"!=typeof t.kind)return`shapes 'kind' must be a string for shape ${n}`;if(!("parameters"in t))return`missing "parameters" in shape ${n}`;const o=t.parameters;if("structure"in o){const t=o.structure;if(!Array.isArray(t))return`'structure' parameters should be an array in shape ${n}`;if(t.length!==e)return`'structure' parameters in shape ${n} contain ${t.length} entries, but there are ${e} structures.`}if("atom"in o){const t=o.atom;if(!Array.isArray(t))return`'atom' parameters should be an array in shape ${n}`;if(t.length!==r)return`'atom' parameters in shape ${n} contain ${t.length} entries, but there are ${r} environments.`}}return""}(t.shapes,e,n);if(""!==r)throw Error("Error checking shape definitions: "+r);const i=function(t,e){let r=0;for(let n=0;n0&&a.values.length!==s)throw Error(`wrong size for 'properties['${i}'].values': expected ${s}, got ${a.values.length}`);const l=typeof a.values[0];if("string"!==l&&"number"!==l&&!en(a.values))throw Error(`'properties['${i}'].values' should contain string or number or an array of numbers`);for(const t of a.values)if(typeof t!==l)throw Error(`'properties['${i}'].values' should be of a single type`);if(en(a.values)){if(!n)throw Error(`'parameters' should be provided for multidimensional properties '${i}'`);const t=a.parameters;if(!nn(t))throw Error(`'properties['${i}'].parameters' should be an array of strings`);if(1!==t.length)throw Error(`'properties['${i}'].parameters' should contain a single parameter`);for(const e of t)if(!(e in n))throw Error(`parameter '${e}' of 'properties['${i}']' does not appear in the list provided parameters`);const e=a.values[0];for(const r of t){const t=n[r].values;if(e.length!==t.length)throw Error(`'properties['${i}'].values' and 'parameters['${r}'].values' should have the same length`)}if(!rn(a.values))throw Error(`'properties['${i}].values' should contain arrays of the same length`)}if("description"in a&&"string"!=typeof a.description)throw Error(`'properties['${i}'].description' should contain a string`);if("units"in a&&"string"!=typeof a.units)throw Error(`'properties['${i}'].units' should contain a string`)}}(t.properties,e,n,t.parameters)}function Jr(t){var e;const r=null===(e=t.settings)||void 0===e?void 0:e.target;if(void 0!==r){if("atom"===r&&void 0===t.environments)throw new Error('To use "atom" target, a list of environments should be provided');return r}const n=Object.values(t.properties).filter((t=>"atom"===t.target));return void 0!==t.environments&&n.length>0?"atom":"structure"}function Kr(t,e){return"sphere"===t?Xr.iy.validateParameters(e):"ellipsoid"===t?Xr.C1.validateParameters(e):"arrow"===t?Xr.i3.validateParameters(e):"cylinder"===t?Xr.T.validateParameters(e):"custom"===t?Xr.Nh.validateParameters(e):""}function Qr(t){if("object"!=typeof t||null===t)throw Error("the structure must be a JavaScript object");if(!("size"in t)||"number"!=typeof t.size||!tn(t.size))return'missing "size"';for(const e of["names","x","y","z"]){if(!(e in t))return`missing "${e}"`;const r=t[e];if(!Array.isArray(r))return`"${e}" must be an array`;if(t.size>0&&r.length!==t.size)return`wrong size for "${e}", expected ${t.size}, got ${r.length}`}return!("cell"in t)||Array.isArray(t.cell)&&9===t.cell.length?"":'"cell" must be an array of size 9'}function tn(t){return Number.isInteger(t)&&t>=0}function en(t){let e=!0;for(const r of t)e=Array.isArray(r)&&e;return e}function rn(t){const e=t[0];let r=!0;for(const n of t)r=n.length===e.length&&r;return r}function nn(t){if(Array.isArray(t)){let e=!0;for(const r of t)e="string"==typeof r&&e;return e}return!1}var on=__webpack_require__(79352),an=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function s(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}l((n=n.apply(t,e||[])).next())}))};class sn{constructor(t,e,r,n,i,o,a=9){if(this._target=n,this._structures=r,void 0===i)this._properties={};else{const t=y(i,(t=>Object.values(t.values).every((t=>"number"==typeof t)))),e=y(t,(t=>"atom"===t.target));this._properties=Object.fromEntries(Object.entries(e).map((([t,e])=>[t,e.values])))}if(this._resolvedStructures=new Array(r.length),this._indexer=e,this._calculatedEnvironments=function(t,e){if(void 0===e)return;const r=Array.from({length:t.length}).map(((e,r)=>Array.from({length:t[r].size})));for(let t=0;t{if(""!==Qr(e))throw Error(`got custom data for this structure, but no custom loadStructure callback\nthe object was ${JSON.stringify(e)}`);return e},this._cellsData=new Map,this.onselect=()=>{},this.onremove=()=>{},this.oncreate=()=>{},this.activeChanged=()=>{},this.delayChanged=()=>{},this._onSettingChangeCallbacks=[],a>9)throw Error("chemiscope only supports up to 9 structure viewers in the grid");this._maxViewers=a;const l=(0,s.V6)(t),c=document.createElement("div");c.style.setProperty("height","100%"),l.appendChild(c),this._shadow=c.attachShadow({mode:"open"}),this._shadow.adoptedStyleSheets=[v.A,b.A],this._root=document.createElement("div"),this._root.id="grid-root",this._root.className="chsp-structure-viewer-grid",this._shadow.appendChild(this._root),this._setupGrid(1),this._active=(0,s.o)(this._cellsData),this.setActive(this._active)}_getById(t){return(0,s.VT)(t,this._shadow)}get active(){return this._active}pinned(){const t=[];for(const e of this._cellsData.values())t.push(e.current);return t}show(t){this._showInViewer(this.active,t).catch((t=>{throw t}))}addViewer(){const t=this._setupGrid(this._cellsData.size+1);if(0===t.length)return{guid:void 0,color:""};o()(1===t.length,"newGUIDs.length === 1");const e=t[0],r=this._cellsData.get(e);o()(void 0!==r,"newData !== undefined");for(const t of this._onSettingChangeCallbacks)r.viewer.onSettingChange(((r,n)=>{let i=0;for(const t of this._cellsData.keys()){if(e===t)break;i+=1}r.unshift(i.toString()),t(r,n)}));return{guid:e,color:r.color}}removeViewer(t){o()(this._cellsData.size>1,"this._cellsData.size > 1"),this._active===t&&this.setActive((0,s.o)(this._cellsData,t));const e=this._cellsData.get(t);o()(void 0!==e,"data !== undefined"),e.viewer.remove(),this._getById(`gi-${t}`).remove(),this._cellsData.delete(t)}remove(){for(const t of this._cellsData.values())t.viewer.remove();this._shadow.host.remove()}setActive(t){const e=(t,e)=>{const r=this._getById(`chsp-activate-${t}`);r.classList.toggle("chsp-active-pin",e),o()(null!==r.parentElement,"button.parentElement !== null");const n=r.parentElement.querySelector(".chsp-tooltip");o()(null!==n,"tooltip !== null"),n.innerHTML=e?"Active viewer":"Choose as active",this._getById(`gi-${t}`).classList.toggle("chsp-structure-viewer-cell-active",e)},r=this._cellsData.get(this._active);o()(void 0!==r,"current !== undefined"),e(this._active,!1),this._active=t;const n=this._cellsData.get(this._active);o()(void 0!==n,"newData !== undefined"),n.viewer._options.playbackDelay.onchange.push((t=>{this.delayChanged(t)})),this.delayChanged(n.viewer._options.playbackDelay.value),e(this._active,!0)}set positionSettingsModal(t){this._positionSettingsModal=t;for(const e of this._cellsData.values())e.viewer.positionSettingsModal=t}applySettings(t){if(0!==t.length){o()(t.length===this._cellsData.size,"settings.length === this._cellsData.size");for(const[e,r]of(0,s.HL)(this._cellsData.values()))r.viewer.applySettings(t[e])}}saveSettings(){const t=[];for(const e of this._cellsData.values())t.push(e.viewer.saveSettings());return t}onSettingChange(t){for(const e of this._cellsData.keys()){const r=this._cellsData.get(e);o()(void 0!==r,"data !== undefined"),r.viewer.onSettingChange(((r,n)=>{(r=JSON.parse(JSON.stringify(r))).unshift(this._getCurrentPositionInGrid(e).toString()),t(r,n)}))}this._onSettingChangeCallbacks.push(t)}switchTarget(t){return an(this,void 0,void 0,(function*(){this._target=t,this._updateEnvironments("atom"===this._target);const e=Array.from(this._cellsData.entries()).map((([t,e])=>this._refreshCell(t,e,"atom"===this._target)));yield Promise.all(e)}))}_updateEnvironments(t){if(this._environments=t?this._calculatedEnvironments:void 0,t){o()(void 0!==this._environments,"this._environments !== undefined");for(const t of this._cellsData.values())t.viewer.environments=this._environments[t.current.structure]}}_refreshCell(t,e,r){return an(this,void 0,void 0,(function*(){e.current.atom=r?this._indexer.fromEnvironment(e.current.environment,this._target).atom:void 0,this._cellsData.set(t,e);const n=this._properties?Object.keys(this._properties):[];e.viewer.refreshOptions(r,n),yield this._loadViewer(e.viewer,e.current.structure,e.current.atom)}))}_duplicate(t){return an(this,void 0,void 0,(function*(){const e=this._cellsData.get(t);o()(void 0!==e,"data !== undefined");const r=this.addViewer().guid;if(void 0===r)return;const n=this._cellsData.get(r);return o()(void 0!==n,"newData !== undefined"),yield this._showInViewer(r,e.current),n.viewer.applySettings(e.viewer.saveSettings()),this.setActive(r),n}))}_structure(t){if(void 0===this._resolvedStructures[t]){const e=this.loadStructure(t,this._structures[t]),r=Qr(e);if(""!==r)throw Error(`got invalid object as structure: ${r}\n the object was ${JSON.stringify(e)}`);this._resolvedStructures[t]=e}return this._resolvedStructures[t]}_propertiesForStructure(t){const e={};if(void 0!==this._environments){const r=this._environments[t];for(const t in this._properties){const n=this._properties[t];e[t]=[];for(const i of r)void 0!==i?e[t].push(n[i.index]):e[t].push(void 0)}return e}}_showInViewer(t,e){return an(this,void 0,void 0,(function*(){const r=this._cellsData.get(t);o()(void 0!==r,"data !== undefined");const n=r.viewer;r.current.structure!==e.structure&&(yield this._loadViewer(n,e.structure,e.atom),r.current=e),n.highlight("atom"===this._target?e.atom:void 0),r.current=e}))}_loadViewer(t,e,r){return new Promise((n=>{const i={trajectory:!0};void 0!==this._environments&&(i.environments=this._environments[e],"atom"===this._target&&(i.highlight=r)),t.load(this._structure(e),this._propertiesForStructure(e),i,(()=>{n()}))}))}_getNextColor(){const t=[];for(const e of this._cellsData.values())t.push(e.color);return(0,s.Lz)(t)}_setupCell(t,e,r){const n=`gi-${t}`;let i=this._root.querySelector(`#${n}`),a="";if(null===i){i=document.createElement("div"),i.id=n,i.classList.add("chsp-structure-viewer-cell","grid-item"),i.style.gridColumn=`${e}`,i.style.gridRow=`${r}`,a=this._getNextColor();const l=document.createElement("template");l.innerHTML=`\n
\n WILL BE FILLED LATER\n `;const c=l.content.firstChild;c.onclick=()=>{this.setActive(t);const e=this._cellsData.get(this._active);o()(void 0!==e,"data !== undefined"),this.activeChanged(t,e.current)},i.appendChild(c),l.innerHTML='\n \n\n Remove viewer\n ';const u=l.content.firstChild;u.onclick=()=>{1!==this._cellsData.size?(this.onremove(t),this.removeViewer(t),this._setupGrid(this._cellsData.size)):(0,s.R4)("can not remove the last viewer from the grid")},i.appendChild(u),l.innerHTML='\n \n\n Duplicate viewer\n ';const h=l.content.firstChild;h.onclick=()=>an(this,void 0,void 0,(function*(){const e=yield this._duplicate(t);void 0!==e&&this.oncreate(this.active,e.color,e.current)})),i.appendChild(h),l.innerHTML=`\n ${I}\n Download PNG\n `;const d=l.content.firstChild;return d.onclick=()=>{const e=this._cellsData.get(t);o()(void 0!==e,"data !== undefined");const r=e.viewer,n=e.current.structure;if(void 0!==e.current.atom){const t=e.current.atom;ln(r.exportPNG(),`chemiscope-structure-${n+1}-atom-${t+1}.png`)}else ln(r.exportPNG(),`chemiscope-structure-${n+1}.png`)},i.appendChild(d),this._root.appendChild(i),a}return i.style.gridColumn=`${e}`,i.style.gridRow=`${r}`,""}_setupGrid(t){const e=[];if(t<1)return(0,s.R4)("Cannot delete last molecular viewer."),e;if(t>this._maxViewers)return(0,s.R4)(`Viewer grid cannot contain more than ${this._maxViewers} viewers.`),e;const r=this.bestGridArrangement(t);if(this._cellsData.size>t){(0,s.R4)(`Eliminating last ${this._cellsData.size-t} viewers.`);let e=0;for(const r of this._cellsData.keys())e>=t&&this.removeViewer(r),e+=1}let n=1,i=1;const a=this._cellsData.keys();for(let l=0;l=this._cellsData.size?(0,s.Nl)():a.next().value;let c=this._setupCell(t,i,n);if(""===c&&(c=this._getNextColor()),i++,i>r.columns&&(n++,i=1),!this._cellsData.has(t)){const r=this._properties?Object.keys(this._properties):[],n=new on.MoleculeViewer(this._getById(`gi-${t}`),r);n.onselect=e=>{if("atom"!==this._target||this._active!==t)return;const r=this._cellsData.get(this._active);o()(void 0!==r,"data !== undefined");const i=n.natoms();o()(void 0!==i,"natoms !== undefined");const a=this._indexer.fromStructureAtom(this._target,r.current.structure,e%i);void 0!==a&&(n.highlight(e),this.onselect(a))};const i={atom:void 0,structure:-1,environment:-1};this._cellsData.set(t,{color:c,current:i,viewer:n}),void 0!==this._positionSettingsModal&&(n.positionSettingsModal=this._positionSettingsModal),e.push(t)}}for(const t of this._cellsData.values())t.viewer.resize();return e}bestGridArrangement(t){switch(t){case 1:case 2:return{rows:t,columns:1};case 3:case 4:return{rows:2,columns:2};case 5:case 6:return{rows:3,columns:2};case 8:case 7:case 9:return{rows:3,columns:3};default:throw Error("reached unreachable code: too many viewer in the grid")}}_getCurrentPositionInGrid(t){let e=0;for(const r of this._cellsData.keys()){if(t===r)break;e+=1}return e}}function ln(t,e){const r=document.createElement("a");r.download=e,r.href=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),r.remove()}var cn=__webpack_require__(59838);class un{constructor(t,e){this._containerElement=(0,s.V6)(t);const r=document.createElement("div");this._containerElement.appendChild(r),this._shadow=r.attachShadow({mode:"open"}),this._shadow.adoptedStyleSheets=[v.A,b.A],this._toggleContainer=this._createToggleElement("atom"===e),this._shadow.appendChild(this._toggleContainer),this._containerElement.style.setProperty("height",`calc(100% - ${this._toggleContainer.offsetHeight}px)`),this.onchange=()=>{}}_createToggleElement(t){const e=document.createElement("div");return e.innerHTML=`\n
\n \x3c!-- Spinner --\x3e\n \n\n \x3c!-- Buttons --\x3e\n
\n \n \n
\n
\n `,e.querySelector("#structure-btn").onclick=()=>this._select("structure"),e.querySelector("#atom-btn").onclick=()=>this._select("atom"),e.firstElementChild}_select(t){const e="atom"===t;this._toggleContainer.querySelector("#structure-btn").classList.toggle("active",!e),this._toggleContainer.querySelector("#atom-btn").classList.toggle("active",e),this.onchange(t)}loader(t){this._toggleContainer.querySelector("#chsp-target-spinner").style.display=t?"inline-block":"none",this._toggleContainer.querySelectorAll(".btn-outline-secondary").forEach((e=>{t?e.setAttribute("disabled","true"):e.removeAttribute("disabled")}))}remove(){this._shadow.host.remove(),this._containerElement.style.setProperty("height","100%")}}var hn=__webpack_require__(85072),dn=__webpack_require__.n(hn),fn=__webpack_require__(97825),pn=__webpack_require__.n(fn),mn=__webpack_require__(77659),gn=__webpack_require__.n(mn),vn=__webpack_require__(55056),bn=__webpack_require__.n(vn),yn=__webpack_require__(10540),xn=__webpack_require__.n(yn),_n=__webpack_require__(41113),wn=__webpack_require__.n(_n),kn=__webpack_require__(5018),An={};An.styleTagTransform=wn(),An.setAttributes=bn(),An.insert=gn().bind(null,"head"),An.domAPI=pn(),An.insertStyleElement=xn(),dn()(kn.A,An),kn.A&&kn.A.locals&&kn.A.locals;function Mn(t,e){if("object"!=typeof t||null===t)throw Error("the configuration must be a JavaScript object");for(const r of e)if(!(r in t)||!("string"==typeof t[r]||t[r]instanceof HTMLElement))throw Error(`missing "${r}" key in chemiscope configuration`);if("settings"in t){if("object"!=typeof t.settings||null===t.settings)throw Error('"settings" must be an object in chemiscope configuration');Tn(t.settings)}if("loadStructure"in t&&void 0!==t.loadStructure&&!((r=t.loadStructure)&&r.constructor&&r.call&&r.apply))throw Error('"loadStructure" should be a function in chemiscope config');var r;if("maxStructureViewers"in t&&"number"!=typeof t.maxStructureViewers)throw Error('"maxStructureViewers" should be a number in chemiscope config')}function Tn(t){const e=(t,e)=>{if("object"!=typeof e||null===e)throw Error(`"settings.${t}" must be an object`)},r=(t,e)=>{if(!(Array.isArray(e)&&e.length>0))throw Error(`"settings.${t}" must be an array containing at least one element`)};for(const n in t)if("map"===n)e(n,t.map);else if("structure"===n){r(n,t.structure);for(const r of t.structure)e("structure entry",r)}else if("pinned"===n){r(n,t.pinned);for(const e of t.pinned)if(!(Number.isInteger(e)&&e>=0))throw Error('"settings.pinned" must be an array of number')}else{if("target"!==n)throw Error(`invalid key "${n}" in settings`);if(!["atom","structure"].includes(t.target))throw Error('"settings.target" should be either "atom" or "structure"')}}class Sn{static load(t,e){return new Promise((r=>{r(new Sn(t,e))}))}constructor(t,e){var r;this._target="structure",Mn(t,["meta","map","info","structure"]),$r(e),this._dataset=e,this._pinned=[],this._target=Jr(e),this._indexer=new a(e.structures,e.environments),this.meta=new Zr(t.meta,e.meta),this.structure=new sn(t.structure,this._indexer,e.structures,this._target,e.properties,e.environments,t.maxStructureViewers),void 0!==t.loadStructure&&(this.structure.loadStructure=t.loadStructure),this.structure.activeChanged=(t,e)=>{this.map.setActive(t),this.info.show(e)},this.structure.onselect=t=>{this.map.select(t),this.info.show(t)},this.structure.onremove=t=>{this.map.removeMarker(t);const e=this._pinned.indexOf(t);o()(e>-1,"index > -1"),this._pinned.splice(e,1)},this.structure.oncreate=(t,e,r)=>{this.map.addMarker(t,e,r),this.info.show(r),this._pinned.push(t)},this.map=new P(t.map,zn(e.settings),this._indexer,this._target,e.properties),this.map.onselect=t=>{this.info.show(t),this.structure.show(t)},this.map.activeChanged=(t,e)=>{this.info.show(e),this.structure.setActive(t)};const n="atom"===this._target?"structure":"atom",i=Object.values(e.properties).filter((t=>t.target===n));void 0!==e.environments&&i.length>1&&(this._toggle=new un(t.map,this._target),this._toggle.onchange=t=>this._switchTarget(t)),this.info=new x(t.info,e.properties,this._indexer,this._target,e.parameters),this.info.onchange=t=>{this.map.select(t),this.structure.show(t)},this.structure.delayChanged=t=>{this.info.playbackDelay=t};let l={environment:0,structure:0,atom:0};if(void 0!==e.environments&&(l=this._indexer.fromEnvironment(0,this._target)),e.settings&&e.settings.pinned){if(!Array.isArray(e.settings.pinned)||"number"!=typeof e.settings.pinned[0])throw Error("settings.pinned must be an array of numbers");l=this._indexer.fromEnvironment(e.settings.pinned[0],this._target)}const c=this.structure.active;this.map.addMarker(c,(0,s.Lz)([]),l),this._pinned.push(c),this.structure.show(l),this.info.show(l),void 0!==e.settings&&(delete e.settings.map,this.applySettings(e.settings)),void 0!==this._toggle&&(null===(r=e.settings)||void 0===r?void 0:r.target)&&this._switchTarget(this._target,!0)}_switchTarget(t,e=!1){(e||this._target!==t)&&(o()(void 0!==this._toggle,"this._toggle !== undefined"),this._toggle.loader(!0),this._target=t,setTimeout((()=>{return t=this,e=void 0,n=function*(){var t;try{this.info.switchTarget(this._target),yield this.map.switchTarget(this._target),yield this.structure.switchTarget(this._target)}finally{null===(t=this._toggle)||void 0===t||t.loader(!1)}},new((r=void 0)||(r=Promise))((function(i,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function s(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}l((n=n.apply(t,e||[])).next())}));var t,e,r,n}),0))}remove(){var t;this.map.remove(),this.meta.remove(),this.info.remove(),this.structure.remove(),null===(t=this._toggle)||void 0===t||t.remove()}saveSettings(){return{target:this._target,map:this.map.saveSettings(),pinned:this.structure.pinned().map((t=>"atom"===this._target?t.environment:t.structure)),structure:this.structure.saveSettings()}}applySettings(t){if(Tn(t),void 0!==t.map&&this.map.applySettings(t.map),void 0!==t.pinned){if(!Array.isArray(t.pinned))throw Error("settings.pinned must be an array");for(const t of this._pinned.slice(1))this.map.removeMarker(t),this.structure.removeViewer(t);if(this._pinned=[this._pinned[0]],o()(t.pinned.length>0,"settings.pinned.length > 0"),"number"!=typeof t.pinned[0])throw Error("settings.pinned must be an array of numbers");const e=this._indexer.fromEnvironment(t.pinned[0],this._target);this.map.select(e),this.info.show(e),this.structure.show(e);for(const e of t.pinned.slice(1)){if("number"!=typeof e)throw Error("settings.pinned must be an array of numbers");const{guid:t,color:r}=this.structure.addViewer();if(void 0===t)throw Error("too many environments in 'pinned' setting");const n=this._indexer.fromEnvironment(e,this._target);this.map.addMarker(t,r,n),this.map.setActive(t),this._pinned.push(t),this.info.show(n),this.structure.setActive(t),this.structure.show(n)}}void 0!==t.structure&&this.structure.applySettings(t.structure)}onSettingChange(t){this.map.onSettingChange(((e,r)=>{(e=JSON.parse(JSON.stringify(e))).unshift("map"),t(e,r)})),this.structure.onSettingChange(((e,r)=>{(e=JSON.parse(JSON.stringify(e))).unshift("structure"),t(e,r)}))}dataset(t=!1){const e=JSON.parse(JSON.stringify(this._dataset,((t,e)=>"number"==typeof e&&isNaN(e)?"***NaN***":e)),((t,e)=>"***NaN***"===e?NaN:e));if(t){e.structures=[];for(let t=0;t{r(new Cn(t,e))}))}constructor(t,e){Mn(t,["meta","info","structure"]),$r(e),this._target=Jr(e),this._indexer=new a(e.structures,e.environments),this.meta=new Zr(t.meta,e.meta),this.structure=new sn(t.structure,this._indexer,e.structures,this._target,e.properties,e.environments,1),void 0!==t.loadStructure&&(this.structure.loadStructure=t.loadStructure),this.structure.activeChanged=(t,e)=>{this.info.show(e)},this.structure.onselect=t=>{this.info.show(t)},this.structure.oncreate=(t,e,r)=>{this.info.show(r)},this.info=new x(t.info,e.properties,this._indexer,this._target),this.info.onchange=t=>{this.structure.show(t)},this.structure.delayChanged=t=>{this.info.playbackDelay=t};let r={environment:0,structure:0,atom:0};if(void 0!==e.environments&&(r=this._indexer.fromEnvironment(0,this._target)),e.settings&&e.settings.pinned){if(!Array.isArray(e.settings.pinned)||"number"!=typeof e.settings.pinned[0])throw Error("settings.pinned must be an array of numbers");r=this._indexer.fromEnvironment(e.settings.pinned[0],this._target)}this.structure.show(r),this.info.show(r),void 0!==e.settings&&this.applySettings(e.settings)}remove(){this.meta.remove(),this.info.remove(),this.structure.remove()}applySettings(t){Tn(t),void 0!==t.structure&&this.structure.applySettings(t.structure)}saveSettings(){return{target:this._target,pinned:this.structure.pinned().map((t=>t.environment)),structure:this.structure.saveSettings()}}onSettingChange(t){this.structure.onSettingChange(((e,r)=>{(e=JSON.parse(JSON.stringify(e))).unshift("structure"),t(e,r)}))}}class En{static load(t,e){return new Promise((r=>{r(new En(t,e))}))}constructor(t,e){let r;this._target="structure",Mn(t,["meta","map","info"]),$r(e);for(const t in e.properties){const n=e.properties[t];"atom"===n.target?(0,s.R4)("unsupported per-atom property in a map-only viewer"):(o()("structure"===n.target,"property.target === 'structure'"),r=n.values.length)}this._indexer=new a(new Array(r).fill({size:1,data:0})),this.meta=new Zr(t.meta,e.meta),this.map=new P(t.map,zn(e.settings),this._indexer,this._target,e.properties),this.map.onselect=t=>{this.info.show(t)},this.map.activeChanged=(t,e)=>{this.info.show(e)},this.info=new x(t.info,e.properties,this._indexer,this._target),this.info.onchange=t=>{this.map.select(t)};let n={environment:0,structure:0,atom:0};if(void 0!==e.environments&&(n=this._indexer.fromEnvironment(0,this._target)),e.settings&&e.settings.pinned){if(!Array.isArray(e.settings.pinned)||"number"!=typeof e.settings.pinned[0])throw Error("settings.pinned must be an array of numbers");n=this._indexer.fromEnvironment(e.settings.pinned[0],this._target)}this.map.addMarker("map-0","red",n),this.info.show(n)}remove(){this.meta.remove(),this.info.remove(),this.map.remove()}saveSettings(){return{target:this._target,map:this.map.saveSettings()}}applySettings(t){Tn(t),void 0!==t.map&&this.map.applySettings(zn(t))}onSettingChange(t){this.map.onSettingChange(((e,r)=>{(e=JSON.parse(JSON.stringify(e))).unshift("map"),t(e,r)}))}}function Ln(){return"v0.7.3-16-g6e2dd25"}function zn(t){if(void 0===t)return{};if("map"in t){const e=t.map;if("object"==typeof e){if(null===e)throw Error("invalid settings for map, should not be null");return e}throw Error(`invalid type '${typeof e}' for map, should be an object`)}return{}}})(),__webpack_exports__})())); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Chemiscope=e():t.Chemiscope=e()}(self,(()=>(()=>{var __webpack_modules__={5018:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(78706),i=r.n(n),o=r(72859),a=r.n(o)()(i());a.push([t.id,".chsp-meta {\n z-index: 1;\n cursor: pointer;\n}\n\n.chsp-meta .chsp-info-icon {\n float: right;\n margin-top: 5px;\n margin-left: 3px;\n}\n\n.chsp-meta .chsp-info-icon svg {\n display: block;\n width: 14px;\n height: 14px;\n opacity: 0.6;\n}\n\n.chsp-authors-list {\n padding: 0;\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n justify-content: center;\n}\n\n.chsp-authors-list li {\n border: solid #dee2e6 1px;\n padding: 10px;\n list-style-type: none;\n white-space: nowrap;\n}\n\n.chsp-open-map-settings {\n position: absolute;\n top: 3px;\n left: 5px;\n z-index: 10;\n}\n\n.chsp-open-viewer-settings {\n position: absolute;\n top: 5px;\n right: 5px;\n}\n\n.chsp-extra-options-btn {\n margin: auto;\n display: block;\n}\n\n/* Tooltip text */\n.chsp-tooltip {\n visibility: hidden;\n background: #69738a;\n color: white;\n padding: 6px;\n font-size: 12px;\n line-height: 12px;\n white-space: nowrap;\n border-radius: 2px;\n text-align: center;\n display: inline-block;\n width: 9em;\n position: absolute;\n z-index: 100000;\n}\n\n.chsp-tooltip-right {\n top: 0px;\n right: -9.5em;\n}\n\n.chsp-tooltip-below {\n top: 35px;\n left: -3.5em;\n}\n\n.chsp-has-tooltip:hover .chsp-tooltip {\n visibility: visible;\n}\n\n.chsp-pin-marker {\n border-radius: 50%;\n border: solid 1px black;\n --size: 12px;\n width: var(--size);\n height: var(--size);\n z-index: 10;\n}\n\n.chsp-map-pin-marker {\n position: absolute;\n /* ensure the top/right/left/bottom positioning is relative to the center of the div */\n transform: translate(calc(-50% + var(--size)), -50%);\n}\n\n.chsp-pin-marker:hover {\n --size: 20px;\n cursor: pointer;\n}\n\n/* This class is added on top of .chsp-pin-marker for the active pinned structure/environment */\n.chsp-active-pin {\n border-width: 2px;\n --size: 20px;\n}\n\n.chsp-active-pin:hover {\n --size: 22px;\n cursor: default;\n}\n\n.chsp-viewer-button {\n position: absolute;\n padding: 1px;\n margin: 0;\n height: 28px;\n width: 28px;\n z-index: 10;\n}\n\n.chsp-viewer-action-button {\n background-color: white;\n border: none;\n}\n\n.chsp-viewer-action-button:hover {\n background: white;\n}\n\n.chsp-viewer-action-button svg {\n opacity: 0.4;\n transition: opacity 0.15s ease-in-out;\n}\n\n.chsp-viewer-action-button:hover svg {\n opacity: 0.6;\n}\n\n.chsp-structure-viewer-grid {\n display: grid;\n position: relative;\n width: 100%;\n height: 100%;\n grid-column-gap: 2px;\n grid-row-gap: 2px;\n}\n\n.chsp-structure-viewer-cell {\n width: 99%;\n height: 99%;\n left: 0.5%;\n top: 0.5%;\n position: relative;\n border: 1px solid lightgray;\n padding: 1px;\n}\n\n.chsp-structure-viewer-cell-active {\n border-color: gray;\n}\n\n.chsp-map-options {\n display: grid;\n grid-template-columns: 1fr 0.5fr;\n align-items: center;\n justify-content: center;\n align-content: start;\n column-gap: 1em;\n}\n\n.chsp-map-options label {\n min-width: 6em;\n}\n\n.chsp-map-options > :nth-child(n + 3):not(.chsp-map-extra-options) {\n margin-top: 1.3rem;\n}\n\n.chsp-map-extra-options {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: auto 1fr 1fr;\n column-gap: 1em;\n}\n\n.chsp-map-extra-options > * {\n margin: 0.5em 0;\n}\n\n.chsp-map-extra-options label {\n min-width: auto;\n}\n\n.chsp-map-extra-options {\n grid-column: 1 / span 2;\n}\n\n.chsp-map-options .form-check-label {\n width: auto;\n}\n\n.chsp-modal-header {\n cursor: grab;\n}\n\n.chsp-play-button {\n border: 0;\n background: transparent;\n box-sizing: border-box;\n height: 1.2em;\n width: 1.2em;\n margin-left: 0.5ex;\n\n border-color: transparent transparent transparent #202020;\n transition: 100ms all ease;\n cursor: pointer;\n\n border-style: solid;\n border-width: 0.7em 0 0.7em 1em;\n}\n\n.chsp-play-button.chsp-playing {\n border-style: double;\n border-width: 0px 0 0px 1.2em;\n}\n\n.chsp-play-button:hover {\n border-color: transparent transparent transparent #404040;\n}\n\n.chsp-properties-table {\n height: 100%;\n width: 80%;\n margin: auto;\n}\n\n.chsp-properties-table td,\n.chsp-properties-table th {\n width: 50%;\n border-top: none;\n}\n\n.chsp-settings-section-title {\n font-weight: bold;\n}\n\n/* Change Plotly modebar style to match the style of the structure grid buttons */\n\n.chsp-map .modebar-group {\n padding-left: 0 !important;\n}\n\n.chsp-map .modebar-btn {\n cursor: default !important;\n font-family: apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n 'Noto Color Emoji';\n}\n\n.chsp-map .modebar-btn::after {\n opacity: 0.9;\n}\n\n.chsp-map .icon:hover + .modebar-btn::after {\n visibility: visible;\n}\n\n.chsp-map .modebar-btn::before {\n content: none !important;\n}\n\n.chsp-map .modebar-btn .icon {\n transition: opacity 0.15s ease-in-out;\n padding: 3px;\n opacity: 0.3;\n cursor: pointer;\n}\n\n.chsp-map .modebar-group svg.icon {\n width: 2em;\n height: 2em;\n border-radius: 0.2em;\n}\n\n.chsp-map .modebar-group svg.icon:active {\n color: #212529;\n background-color: #dae0e5;\n border-color: #d3d9df;\n box-shadow: 0 0 0 0.2rem rgb(216 217 219 / 50%);\n}\n\n.chsp-map .modebar-btn .icon path {\n transition:\n color 0.15s ease-in-out,\n background-color 0.15s ease-in-out,\n border-color 0.15s ease-in-out,\n box-shadow 0.15s ease-in-out;\n fill: black !important;\n}\n\n.chsp-map .modebar-btn .icon:hover {\n opacity: 0.6;\n}\n\n.chsp-map .modebar-btn.active .icon {\n opacity: 0.6;\n}\n\n.chsp-info-btns {\n display: flex;\n position: relative;\n margin-bottom: 0.5ex;\n margin-top: 0.5ex;\n justify-content: center;\n}\n\n.chsp-info-structure-btn {\n min-width: 8em;\n padding-left: 6px;\n padding-right: 4px;\n font-weight: bold;\n font-size: small;\n background-color: none;\n border-color: #66a5e8;\n border-width: 2px;\n float: left;\n}\n\n.chsp-info-structure-btn:hover {\n background-color: #5b94d0;\n}\n\n.chsp-info-atom-btn {\n margin-left: 1em;\n padding-left: 6px;\n padding-right: 4px;\n min-width: 8em;\n font-weight: bold;\n font-size: small;\n background-color: none;\n border-color: #4cb64c;\n border-width: 2px;\n}\n\n.chsp-info-atom-btn:hover {\n background-color: #44a344;\n}\n\n.chsp-info-btns-svg {\n float: left;\n padding-right: 6px;\n padding-top: 3px;\n}\n\n.chsp-info-btns-svg svg {\n display: block;\n opacity: 0.6;\n}\n\n.chsp-info-number {\n -moz-appearance: textfield;\n appearance: textfield;\n border: none;\n transition: background-color 0.15s;\n background-color: #ebedf0;\n margin-left: 2px;\n margin-right: 3px;\n font-family: inherit;\n width: 4em;\n}\n\n.chsp-info-atom-btn:hover .chsp-info-number {\n background-color: #69b569;\n}\n\n.chsp-info-structure-btn:hover .chsp-info-number {\n background-color: #7ba9d9;\n}\n\n.chsp-info-number::-webkit-outer-spin-button,\n.chsp-info-number::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.chsp-info-tables {\n position: relative;\n width: 100%;\n}\n\n.chsp-info-table {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 10;\n background-color: white;\n /* max-height is set in JavaScript */\n overflow: auto;\n}\n\n.chsp-info-table.collapsing {\n overflow: hidden;\n}\n\n.chsp-info-table table {\n margin: 0;\n}\n\n/* Change the atoms slider thumb color to green, to match structure highlight */\n.chsp-atom-slider::-webkit-slider-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-moz-range-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-ms-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-webkit-slider-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider::-moz-range-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider::-ms-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider:focus::-webkit-slider-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-atom-slider:focus::-moz-range-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-atom-slider:focus::-ms-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-settings-representation {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr;\n grid-row-gap: 1ex;\n}\n\n.chsp-settings-representation label {\n cursor: help;\n}\n\n.chsp-settings-supercell {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr 2fr;\n}\n\n.chsp-supercell-count {\n max-width: 3.5em;\n}\n\n.chsp-settings-camera {\n display: grid;\n gap: 1em;\n grid-template-columns: repeat(7, auto);\n justify-content: center;\n}\n\n.chsp-settings-environments {\n display: grid;\n align-items: center;\n column-gap: 1em;\n grid-template-columns: 1fr 1fr 1fr;\n}\n\n.chsp-settings-extra-options {\n display: grid;\n gap: 1em;\n grid-template-columns: 1fr 1fr 1fr;\n grid-column: 1 / span 3;\n}\n\n.chsp-settings-extra-options > :nth-child(-n + 3) {\n margin-top: 1em;\n}\n\n.chsp-settings-trajectory {\n display: grid;\n grid-template-columns: 12em 12em;\n justify-content: center;\n align-content: center;\n gap: 1em;\n margin-bottom: 1ex;\n}\n\n.chsp-cell-info {\n position: absolute;\n bottom: 5px;\n left: 5px;\n font-size: 0.8em;\n}\n\n.chsp-toggle-plot-btn {\n display: block;\n position: relative;\n margin-top: 3px;\n margin-bottom: 1px;\n}\n\n.chsp-atom-color-property {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: 1fr 1fr;\n column-gap: 1em;\n margin: 0.5em 0;\n}\n\n.chsp-atom-extra-options {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: auto 1fr 1fr;\n column-gap: 1em;\n}\n\n.chsp-atom-extra-options > * {\n margin: 0.5em 0;\n}\n\n.chsp-atom-extra-options label {\n min-width: auto;\n}\n\n.chsp-atom-extra-options {\n grid-column: 1 / span 2;\n}\n\n.chsp-target-toggle {\n padding-left: 5px;\n padding-right: 5px;\n display: flex;\n justify-content: flex-end;\n gap: 5px;\n}\n\n.chsp-target-spinner {\n width: 25px;\n height: 25px;\n margin-left: 5px;\n}\n",""]);const s=a},48654:(t,e,r)=>{"use strict";r.d(e,{A:()=>V});var n=r(78706),i=r.n(n),o=r(72859),a=r.n(o),s=r(21906),l=r.n(s),c=new URL(r(35531),r.b),u=new URL(r(45419),r.b),h=new URL(r(83385),r.b),d=new URL(r(14274),r.b),f=new URL(r(57154),r.b),p=new URL(r(35782),r.b),m=new URL(r(54718),r.b),g=new URL(r(48487),r.b),v=new URL(r(35372),r.b),b=new URL(r(17914),r.b),y=new URL(r(36366),r.b),x=new URL(r(67830),r.b),_=new URL(r(88832),r.b),w=new URL(r(57249),r.b),k=new URL(r(75932),r.b),A=new URL(r(11144),r.b),M=a()(i()),T=l()(c),S=l()(u),C=l()(h),E=l()(d),L=l()(f),z=l()(p),O=l()(m),D=l()(g),I=l()(v),R=l()(b),F=l()(y),P=l()(x),N=l()(_),j=l()(w),B=l()(k),U=l()(A);M.push([t.id,`@charset "UTF-8";/*!\n * Bootstrap v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors\n * Copyright 2011-2022 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-body-color-rgb:33,37,41;--bs-body-bg-rgb:255,255,255;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, 0.175);--bs-border-radius:0.375rem;--bs-border-radius-sm:0.25rem;--bs-border-radius-lg:0.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-2xl:2rem;--bs-border-radius-pill:50rem;--bs-link-color:#0d6efd;--bs-link-hover-color:#0a58ca;--bs-code-color:#d63384;--bs-highlight-bg:#fff3cd}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;border:0;border-top:1px solid;opacity:.25}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.small,small{font-size:.875em}.mark,mark{padding:.1875em;background-color:var(--bs-highlight-bg)}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:var(--bs-link-color);text-decoration:underline}a:hover{color:var(--bs-link-hover-color)}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:var(--bs-code-color);word-wrap:break-word}a>code{color:inherit}kbd{padding:.1875rem .375rem;font-size:.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:.25rem}kbd kbd{padding:0;font-size:1em}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none!important}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}::file-selector-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:calc(1.625rem + 4.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-1{font-size:5rem}}.display-2{font-size:calc(1.575rem + 3.9vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-2{font-size:4.5rem}}.display-3{font-size:calc(1.525rem + 3.3vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-3{font-size:4rem}}.display-4{font-size:calc(1.475rem + 2.7vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-4{font-size:3.5rem}}.display-5{font-size:calc(1.425rem + 2.1vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-5{font-size:3rem}}.display-6{font-size:calc(1.375rem + 1.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-6{font-size:2.5rem}}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:.875em;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote>:last-child{margin-bottom:0}.blockquote-footer{margin-top:-1rem;margin-bottom:1rem;font-size:.875em;color:#6c757d}.blockquote-footer::before{content:"— "}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid var(--bs-border-color);border-radius:.375rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:.875em;color:#6c757d}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{--bs-gutter-x:1.5rem;--bs-gutter-y:0;width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(-1 * var(--bs-gutter-y));margin-right:calc(-.5 * var(--bs-gutter-x));margin-left:calc(-.5 * var(--bs-gutter-x))}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.33333333%}.col-2{flex:0 0 auto;width:16.66666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.33333333%}.col-5{flex:0 0 auto;width:41.66666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.33333333%}.col-8{flex:0 0 auto;width:66.66666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.33333333%}.col-11{flex:0 0 auto;width:91.66666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.33333333%}.col-sm-2{flex:0 0 auto;width:16.66666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.33333333%}.col-sm-5{flex:0 0 auto;width:41.66666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.33333333%}.col-sm-8{flex:0 0 auto;width:66.66666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.33333333%}.col-sm-11{flex:0 0 auto;width:91.66666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.33333333%}.col-md-2{flex:0 0 auto;width:16.66666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.33333333%}.col-md-5{flex:0 0 auto;width:41.66666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.33333333%}.col-md-8{flex:0 0 auto;width:66.66666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.33333333%}.col-md-11{flex:0 0 auto;width:91.66666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.33333333%}.col-lg-2{flex:0 0 auto;width:16.66666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.33333333%}.col-lg-5{flex:0 0 auto;width:41.66666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.33333333%}.col-lg-8{flex:0 0 auto;width:66.66666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.33333333%}.col-lg-11{flex:0 0 auto;width:91.66666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.33333333%}.col-xl-2{flex:0 0 auto;width:16.66666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.33333333%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.33333333%}.col-xl-8{flex:0 0 auto;width:66.66666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.33333333%}.col-xl-11{flex:0 0 auto;width:91.66666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0%}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.33333333%}.col-xxl-2{flex:0 0 auto;width:16.66666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.33333333%}.col-xxl-5{flex:0 0 auto;width:41.66666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.33333333%}.col-xxl-8{flex:0 0 auto;width:66.66666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.33333333%}.col-xxl-11{flex:0 0 auto;width:91.66666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.33333333%}.offset-xxl-2{margin-left:16.66666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.33333333%}.offset-xxl-5{margin-left:41.66666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.33333333%}.offset-xxl-8{margin-left:66.66666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.33333333%}.offset-xxl-11{margin-left:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.table{--bs-table-color:var(--bs-body-color);--bs-table-bg:transparent;--bs-table-border-color:var(--bs-border-color);--bs-table-accent-bg:transparent;--bs-table-striped-color:var(--bs-body-color);--bs-table-striped-bg:rgba(0, 0, 0, 0.05);--bs-table-active-color:var(--bs-body-color);--bs-table-active-bg:rgba(0, 0, 0, 0.1);--bs-table-hover-color:var(--bs-body-color);--bs-table-hover-bg:rgba(0, 0, 0, 0.075);width:100%;margin-bottom:1rem;color:var(--bs-table-color);vertical-align:top;border-color:var(--bs-table-border-color)}.table>:not(caption)>*>*{padding:.5rem .5rem;background-color:var(--bs-table-bg);border-bottom-width:1px;box-shadow:inset 0 0 0 9999px var(--bs-table-accent-bg)}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table-group-divider{border-top:2px solid currentcolor}.caption-top{caption-side:top}.table-sm>:not(caption)>*>*{padding:.25rem .25rem}.table-bordered>:not(caption)>*{border-width:1px 0}.table-bordered>:not(caption)>*>*{border-width:0 1px}.table-borderless>:not(caption)>*>*{border-bottom-width:0}.table-borderless>:not(:first-child){border-top-width:0}.table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-striped-columns>:not(caption)>tr>:nth-child(2n){--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-active{--bs-table-accent-bg:var(--bs-table-active-bg);color:var(--bs-table-active-color)}.table-hover>tbody>tr:hover>*{--bs-table-accent-bg:var(--bs-table-hover-bg);color:var(--bs-table-hover-color)}.table-primary{--bs-table-color:#000;--bs-table-bg:#cfe2ff;--bs-table-border-color:#bacbe6;--bs-table-striped-bg:#c5d7f2;--bs-table-striped-color:#000;--bs-table-active-bg:#bacbe6;--bs-table-active-color:#000;--bs-table-hover-bg:#bfd1ec;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-secondary{--bs-table-color:#000;--bs-table-bg:#e2e3e5;--bs-table-border-color:#cbccce;--bs-table-striped-bg:#d7d8da;--bs-table-striped-color:#000;--bs-table-active-bg:#cbccce;--bs-table-active-color:#000;--bs-table-hover-bg:#d1d2d4;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-success{--bs-table-color:#000;--bs-table-bg:#d1e7dd;--bs-table-border-color:#bcd0c7;--bs-table-striped-bg:#c7dbd2;--bs-table-striped-color:#000;--bs-table-active-bg:#bcd0c7;--bs-table-active-color:#000;--bs-table-hover-bg:#c1d6cc;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-info{--bs-table-color:#000;--bs-table-bg:#cff4fc;--bs-table-border-color:#badce3;--bs-table-striped-bg:#c5e8ef;--bs-table-striped-color:#000;--bs-table-active-bg:#badce3;--bs-table-active-color:#000;--bs-table-hover-bg:#bfe2e9;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-warning{--bs-table-color:#000;--bs-table-bg:#fff3cd;--bs-table-border-color:#e6dbb9;--bs-table-striped-bg:#f2e7c3;--bs-table-striped-color:#000;--bs-table-active-bg:#e6dbb9;--bs-table-active-color:#000;--bs-table-hover-bg:#ece1be;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-danger{--bs-table-color:#000;--bs-table-bg:#f8d7da;--bs-table-border-color:#dfc2c4;--bs-table-striped-bg:#eccccf;--bs-table-striped-color:#000;--bs-table-active-bg:#dfc2c4;--bs-table-active-color:#000;--bs-table-hover-bg:#e5c7ca;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-light{--bs-table-color:#000;--bs-table-bg:#f8f9fa;--bs-table-border-color:#dfe0e1;--bs-table-striped-bg:#ecedee;--bs-table-striped-color:#000;--bs-table-active-bg:#dfe0e1;--bs-table-active-color:#000;--bs-table-hover-bg:#e5e6e7;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-dark{--bs-table-color:#fff;--bs-table-bg:#212529;--bs-table-border-color:#373b3e;--bs-table-striped-bg:#2c3034;--bs-table-striped-color:#fff;--bs-table-active-bg:#373b3e;--bs-table-active-color:#fff;--bs-table-hover-bg:#323539;--bs-table-hover-color:#fff;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media (max-width:575.98px){.table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:767.98px){.table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:991.98px){.table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1199.98px){.table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1399.98px){.table-responsive-xxl{overflow-x:auto;-webkit-overflow-scrolling:touch}}.form-label{margin-bottom:.5rem}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem}.form-text{margin-top:.25rem;font-size:.875em;color:#6c757d}.form-control{display:block;width:100%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.375rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not([readonly]){cursor:pointer}.form-control:focus{color:#212529;background-color:#fff;border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-control::-webkit-date-and-time-value{height:1.5em}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled{background-color:#e9ecef;opacity:1}.form-control::-webkit-file-upload-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control::file-selector-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}.form-control::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#dde0e3}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:#dde0e3}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext:focus{outline:0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{min-height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;border-radius:.25rem}.form-control-sm::-webkit-file-upload-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-sm::file-selector-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-lg{min-height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;border-radius:.5rem}.form-control-lg::-webkit-file-upload-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.form-control-lg::file-selector-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}textarea.form-control{min-height:calc(1.5em + .75rem + 2px)}textarea.form-control-sm{min-height:calc(1.5em + .5rem + 2px)}textarea.form-control-lg{min-height:calc(1.5em + 1rem + 2px)}.form-control-color{width:3rem;height:calc(1.5em + .75rem + 2px);padding:.375rem}.form-control-color:not(:disabled):not([readonly]){cursor:pointer}.form-control-color::-moz-color-swatch{border:0!important;border-radius:.375rem}.form-control-color::-webkit-color-swatch{border-radius:.375rem}.form-control-color.form-control-sm{height:calc(1.5em + .5rem + 2px)}.form-control-color.form-control-lg{height:calc(1.5em + 1rem + 2px)}.form-select{display:block;width:100%;padding:.375rem 2.25rem .375rem .75rem;-moz-padding-start:calc(0.75rem - 3px);font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-image:url(${T});background-repeat:no-repeat;background-position:right .75rem center;background-size:16px 12px;border:1px solid #ced4da;border-radius:.375rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-select{transition:none}}.form-select:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-select[multiple],.form-select[size]:not([size="1"]){padding-right:.75rem;background-image:none}.form-select:disabled{background-color:#e9ecef}.form-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #212529}.form-select-sm{padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem;border-radius:.25rem}.form-select-lg{padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem;border-radius:.5rem}.form-check{display:block;min-height:1.5rem;padding-left:1.5em;margin-bottom:.125rem}.form-check .form-check-input{float:left;margin-left:-1.5em}.form-check-reverse{padding-right:1.5em;padding-left:0;text-align:right}.form-check-reverse .form-check-input{float:right;margin-right:-1.5em;margin-left:0}.form-check-input{width:1em;height:1em;margin-top:.25em;vertical-align:top;background-color:#fff;background-repeat:no-repeat;background-position:center;background-size:contain;border:1px solid rgba(0,0,0,.25);-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;print-color-adjust:exact}.form-check-input[type=checkbox]{border-radius:.25em}.form-check-input[type=radio]{border-radius:50%}.form-check-input:active{filter:brightness(90%)}.form-check-input:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-check-input:checked{background-color:#0d6efd;border-color:#0d6efd}.form-check-input:checked[type=checkbox]{background-image:url(${S})}.form-check-input:checked[type=radio]{background-image:url(${C})}.form-check-input[type=checkbox]:indeterminate{background-color:#0d6efd;border-color:#0d6efd;background-image:url(${E})}.form-check-input:disabled{pointer-events:none;filter:none;opacity:.5}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:default;opacity:.5}.form-switch{padding-left:2.5em}.form-switch .form-check-input{width:2em;margin-left:-2.5em;background-image:url(${L});background-position:left center;border-radius:2em;transition:background-position .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-switch .form-check-input{transition:none}}.form-switch .form-check-input:focus{background-image:url(${z})}.form-switch .form-check-input:checked{background-position:right center;background-image:url(${O})}.form-switch.form-check-reverse{padding-right:2.5em;padding-left:0}.form-switch.form-check-reverse .form-check-input{margin-right:-2.5em;margin-left:0}.form-check-inline{display:inline-block;margin-right:1rem}.btn-check{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.btn-check:disabled+.btn,.btn-check[disabled]+.btn{pointer-events:none;filter:none;opacity:.65}.form-range{width:100%;height:1.5rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.form-range:focus{outline:0}.form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range::-moz-focus-outer{border:0}.form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#0d6efd;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}.form-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#0d6efd;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-moz-range-thumb{-moz-transition:none;transition:none}}.form-range::-moz-range-thumb:active{background-color:#b6d4fe}.form-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range:disabled{pointer-events:none}.form-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.form-range:disabled::-moz-range-thumb{background-color:#adb5bd}.form-floating{position:relative}.form-floating>.form-control,.form-floating>.form-control-plaintext,.form-floating>.form-select{height:calc(3.5rem + 2px);line-height:1.25}.form-floating>label{position:absolute;top:0;left:0;width:100%;height:100%;padding:1rem .75rem;overflow:hidden;text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:1px solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media (prefers-reduced-motion:reduce){.form-floating>label{transition:none}}.form-floating>.form-control,.form-floating>.form-control-plaintext{padding:1rem .75rem}.form-floating>.form-control-plaintext::-moz-placeholder,.form-floating>.form-control::-moz-placeholder{color:transparent}.form-floating>.form-control-plaintext::placeholder,.form-floating>.form-control::placeholder{color:transparent}.form-floating>.form-control-plaintext:not(:-moz-placeholder-shown),.form-floating>.form-control:not(:-moz-placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control-plaintext:focus,.form-floating>.form-control-plaintext:not(:placeholder-shown),.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control-plaintext:-webkit-autofill,.form-floating>.form-control:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-select{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:not(:-moz-placeholder-shown)~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control-plaintext~label,.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:-webkit-autofill~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control-plaintext~label{border-width:1px 0}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-floating,.input-group>.form-select{position:relative;flex:1 1 auto;width:1%;min-width:0}.input-group>.form-control:focus,.input-group>.form-floating:focus-within,.input-group>.form-select:focus{z-index:5}.input-group .btn{position:relative;z-index:2}.input-group .btn:focus{z-index:5}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.375rem}.input-group-lg>.btn,.input-group-lg>.form-control,.input-group-lg>.form-select,.input-group-lg>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;border-radius:.5rem}.input-group-sm>.btn,.input-group-sm>.form-control,.input-group-sm>.form-select,.input-group-sm>.input-group-text{padding:.25rem .5rem;font-size:.875rem;border-radius:.25rem}.input-group-lg>.form-select,.input-group-sm>.form-select{padding-right:3rem}.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3),.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-control,.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-select,.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.dropdown-toggle:nth-last-child(n+4),.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-control,.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-select,.input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.form-floating:not(:first-child)>.form-control,.input-group>.form-floating:not(:first-child)>.form-select{border-top-left-radius:0;border-bottom-left-radius:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#198754}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(25,135,84,.9);border-radius:.375rem}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#198754;padding-right:calc(1.5em + .75rem);background-image:url(${D});background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-valid,.was-validated .form-select:valid{border-color:#198754}.form-select.is-valid:not([multiple]):not([size]),.form-select.is-valid:not([multiple])[size="1"],.was-validated .form-select:valid:not([multiple]):not([size]),.was-validated .form-select:valid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url(${T}),url(${D});background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-valid:focus,.was-validated .form-select:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-control-color.is-valid,.was-validated .form-control-color:valid{width:calc(3rem + calc(1.5em + .75rem))}.form-check-input.is-valid,.was-validated .form-check-input:valid{border-color:#198754}.form-check-input.is-valid:checked,.was-validated .form-check-input:valid:checked{background-color:#198754}.form-check-input.is-valid:focus,.was-validated .form-check-input:valid:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#198754}.form-check-inline .form-check-input~.valid-feedback{margin-left:.5em}.input-group>.form-control:not(:focus).is-valid,.input-group>.form-floating:not(:focus-within).is-valid,.input-group>.form-select:not(:focus).is-valid,.was-validated .input-group>.form-control:not(:focus):valid,.was-validated .input-group>.form-floating:not(:focus-within):valid,.was-validated .input-group>.form-select:not(:focus):valid{z-index:3}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.375rem}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url(${I});background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-invalid,.was-validated .form-select:invalid{border-color:#dc3545}.form-select.is-invalid:not([multiple]):not([size]),.form-select.is-invalid:not([multiple])[size="1"],.was-validated .form-select:invalid:not([multiple]):not([size]),.was-validated .form-select:invalid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url(${T}),url(${I});background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-invalid:focus,.was-validated .form-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-control-color.is-invalid,.was-validated .form-control-color:invalid{width:calc(3rem + calc(1.5em + .75rem))}.form-check-input.is-invalid,.was-validated .form-check-input:invalid{border-color:#dc3545}.form-check-input.is-invalid:checked,.was-validated .form-check-input:invalid:checked{background-color:#dc3545}.form-check-input.is-invalid:focus,.was-validated .form-check-input:invalid:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-inline .form-check-input~.invalid-feedback{margin-left:.5em}.input-group>.form-control:not(:focus).is-invalid,.input-group>.form-floating:not(:focus-within).is-invalid,.input-group>.form-select:not(:focus).is-invalid,.was-validated .input-group>.form-control:not(:focus):invalid,.was-validated .input-group>.form-floating:not(:focus-within):invalid,.was-validated .input-group>.form-select:not(:focus):invalid{z-index:4}.btn{--bs-btn-padding-x:0.75rem;--bs-btn-padding-y:0.375rem;--bs-btn-font-family: ;--bs-btn-font-size:1rem;--bs-btn-font-weight:400;--bs-btn-line-height:1.5;--bs-btn-color:#212529;--bs-btn-bg:transparent;--bs-btn-border-width:1px;--bs-btn-border-color:transparent;--bs-btn-border-radius:0.375rem;--bs-btn-hover-border-color:transparent;--bs-btn-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.15),0 1px 1px rgba(0, 0, 0, 0.075);--bs-btn-disabled-opacity:0.65;--bs-btn-focus-box-shadow:0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5);display:inline-block;padding:var(--bs-btn-padding-y) var(--bs-btn-padding-x);font-family:var(--bs-btn-font-family);font-size:var(--bs-btn-font-size);font-weight:var(--bs-btn-font-weight);line-height:var(--bs-btn-line-height);color:var(--bs-btn-color);text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;border:var(--bs-btn-border-width) solid var(--bs-btn-border-color);border-radius:var(--bs-btn-border-radius);background-color:var(--bs-btn-bg);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color)}.btn-check+.btn:hover{color:var(--bs-btn-color);background-color:var(--bs-btn-bg);border-color:var(--bs-btn-border-color)}.btn:focus-visible{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:focus-visible+.btn{border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:checked+.btn,.btn.active,.btn.show,.btn:first-child:active,:not(.btn-check)+.btn:active{color:var(--bs-btn-active-color);background-color:var(--bs-btn-active-bg);border-color:var(--bs-btn-active-border-color)}.btn-check:checked+.btn:focus-visible,.btn.active:focus-visible,.btn.show:focus-visible,.btn:first-child:active:focus-visible,:not(.btn-check)+.btn:active:focus-visible{box-shadow:var(--bs-btn-focus-box-shadow)}.btn.disabled,.btn:disabled,fieldset:disabled .btn{color:var(--bs-btn-disabled-color);pointer-events:none;background-color:var(--bs-btn-disabled-bg);border-color:var(--bs-btn-disabled-border-color);opacity:var(--bs-btn-disabled-opacity)}.btn-primary{--bs-btn-color:#fff;--bs-btn-bg:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0b5ed7;--bs-btn-hover-border-color:#0a58ca;--bs-btn-focus-shadow-rgb:49,132,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0a58ca;--bs-btn-active-border-color:#0a53be;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#0d6efd;--bs-btn-disabled-border-color:#0d6efd}.btn-secondary{--bs-btn-color:#fff;--bs-btn-bg:#6c757d;--bs-btn-border-color:#6c757d;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#5c636a;--bs-btn-hover-border-color:#565e64;--bs-btn-focus-shadow-rgb:130,138,145;--bs-btn-active-color:#fff;--bs-btn-active-bg:#565e64;--bs-btn-active-border-color:#51585e;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#6c757d;--bs-btn-disabled-border-color:#6c757d}.btn-success{--bs-btn-color:#fff;--bs-btn-bg:#198754;--bs-btn-border-color:#198754;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#157347;--bs-btn-hover-border-color:#146c43;--bs-btn-focus-shadow-rgb:60,153,110;--bs-btn-active-color:#fff;--bs-btn-active-bg:#146c43;--bs-btn-active-border-color:#13653f;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#198754;--bs-btn-disabled-border-color:#198754}.btn-info{--bs-btn-color:#000;--bs-btn-bg:#0dcaf0;--bs-btn-border-color:#0dcaf0;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#31d2f2;--bs-btn-hover-border-color:#25cff2;--bs-btn-focus-shadow-rgb:11,172,204;--bs-btn-active-color:#000;--bs-btn-active-bg:#3dd5f3;--bs-btn-active-border-color:#25cff2;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#0dcaf0;--bs-btn-disabled-border-color:#0dcaf0}.btn-warning{--bs-btn-color:#000;--bs-btn-bg:#ffc107;--bs-btn-border-color:#ffc107;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#ffca2c;--bs-btn-hover-border-color:#ffc720;--bs-btn-focus-shadow-rgb:217,164,6;--bs-btn-active-color:#000;--bs-btn-active-bg:#ffcd39;--bs-btn-active-border-color:#ffc720;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#ffc107;--bs-btn-disabled-border-color:#ffc107}.btn-danger{--bs-btn-color:#fff;--bs-btn-bg:#dc3545;--bs-btn-border-color:#dc3545;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#bb2d3b;--bs-btn-hover-border-color:#b02a37;--bs-btn-focus-shadow-rgb:225,83,97;--bs-btn-active-color:#fff;--bs-btn-active-bg:#b02a37;--bs-btn-active-border-color:#a52834;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#dc3545;--bs-btn-disabled-border-color:#dc3545}.btn-light{--bs-btn-color:#000;--bs-btn-bg:#f8f9fa;--bs-btn-border-color:#f8f9fa;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#d3d4d5;--bs-btn-hover-border-color:#c6c7c8;--bs-btn-focus-shadow-rgb:211,212,213;--bs-btn-active-color:#000;--bs-btn-active-bg:#c6c7c8;--bs-btn-active-border-color:#babbbc;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#f8f9fa;--bs-btn-disabled-border-color:#f8f9fa}.btn-dark{--bs-btn-color:#fff;--bs-btn-bg:#212529;--bs-btn-border-color:#212529;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#424649;--bs-btn-hover-border-color:#373b3e;--bs-btn-focus-shadow-rgb:66,70,73;--bs-btn-active-color:#fff;--bs-btn-active-bg:#4d5154;--bs-btn-active-border-color:#373b3e;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#212529;--bs-btn-disabled-border-color:#212529}.btn-outline-primary{--bs-btn-color:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0d6efd;--bs-btn-hover-border-color:#0d6efd;--bs-btn-focus-shadow-rgb:13,110,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0d6efd;--bs-btn-active-border-color:#0d6efd;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#0d6efd;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#0d6efd;--bs-gradient:none}.btn-outline-secondary{--bs-btn-color:#6c757d;--bs-btn-border-color:#6c757d;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#6c757d;--bs-btn-hover-border-color:#6c757d;--bs-btn-focus-shadow-rgb:108,117,125;--bs-btn-active-color:#fff;--bs-btn-active-bg:#6c757d;--bs-btn-active-border-color:#6c757d;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#6c757d;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#6c757d;--bs-gradient:none}.btn-outline-success{--bs-btn-color:#198754;--bs-btn-border-color:#198754;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#198754;--bs-btn-hover-border-color:#198754;--bs-btn-focus-shadow-rgb:25,135,84;--bs-btn-active-color:#fff;--bs-btn-active-bg:#198754;--bs-btn-active-border-color:#198754;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#198754;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#198754;--bs-gradient:none}.btn-outline-info{--bs-btn-color:#0dcaf0;--bs-btn-border-color:#0dcaf0;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#0dcaf0;--bs-btn-hover-border-color:#0dcaf0;--bs-btn-focus-shadow-rgb:13,202,240;--bs-btn-active-color:#000;--bs-btn-active-bg:#0dcaf0;--bs-btn-active-border-color:#0dcaf0;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#0dcaf0;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#0dcaf0;--bs-gradient:none}.btn-outline-warning{--bs-btn-color:#ffc107;--bs-btn-border-color:#ffc107;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#ffc107;--bs-btn-hover-border-color:#ffc107;--bs-btn-focus-shadow-rgb:255,193,7;--bs-btn-active-color:#000;--bs-btn-active-bg:#ffc107;--bs-btn-active-border-color:#ffc107;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#ffc107;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#ffc107;--bs-gradient:none}.btn-outline-danger{--bs-btn-color:#dc3545;--bs-btn-border-color:#dc3545;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#dc3545;--bs-btn-hover-border-color:#dc3545;--bs-btn-focus-shadow-rgb:220,53,69;--bs-btn-active-color:#fff;--bs-btn-active-bg:#dc3545;--bs-btn-active-border-color:#dc3545;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#dc3545;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#dc3545;--bs-gradient:none}.btn-outline-light{--bs-btn-color:#f8f9fa;--bs-btn-border-color:#f8f9fa;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#f8f9fa;--bs-btn-hover-border-color:#f8f9fa;--bs-btn-focus-shadow-rgb:248,249,250;--bs-btn-active-color:#000;--bs-btn-active-bg:#f8f9fa;--bs-btn-active-border-color:#f8f9fa;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#f8f9fa;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#f8f9fa;--bs-gradient:none}.btn-outline-dark{--bs-btn-color:#212529;--bs-btn-border-color:#212529;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#212529;--bs-btn-hover-border-color:#212529;--bs-btn-focus-shadow-rgb:33,37,41;--bs-btn-active-color:#fff;--bs-btn-active-bg:#212529;--bs-btn-active-border-color:#212529;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#212529;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#212529;--bs-gradient:none}.btn-link{--bs-btn-font-weight:400;--bs-btn-color:var(--bs-link-color);--bs-btn-bg:transparent;--bs-btn-border-color:transparent;--bs-btn-hover-color:var(--bs-link-hover-color);--bs-btn-hover-border-color:transparent;--bs-btn-active-color:var(--bs-link-hover-color);--bs-btn-active-border-color:transparent;--bs-btn-disabled-color:#6c757d;--bs-btn-disabled-border-color:transparent;--bs-btn-box-shadow:none;--bs-btn-focus-shadow-rgb:49,132,253;text-decoration:underline}.btn-link:focus-visible{color:var(--bs-btn-color)}.btn-link:hover{color:var(--bs-btn-hover-color)}.btn-group-lg>.btn,.btn-lg{--bs-btn-padding-y:0.5rem;--bs-btn-padding-x:1rem;--bs-btn-font-size:1.25rem;--bs-btn-border-radius:0.5rem}.btn-group-sm>.btn,.btn-sm{--bs-btn-padding-y:0.25rem;--bs-btn-padding-x:0.5rem;--bs-btn-font-size:0.875rem;--bs-btn-border-radius:0.25rem}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.collapsing.collapse-horizontal{width:0;height:auto;transition:width .35s ease}@media (prefers-reduced-motion:reduce){.collapsing.collapse-horizontal{transition:none}}.dropdown,.dropdown-center,.dropend,.dropstart,.dropup,.dropup-center{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{--bs-dropdown-zindex:1000;--bs-dropdown-min-width:10rem;--bs-dropdown-padding-x:0;--bs-dropdown-padding-y:0.5rem;--bs-dropdown-spacer:0.125rem;--bs-dropdown-font-size:1rem;--bs-dropdown-color:#212529;--bs-dropdown-bg:#fff;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-border-radius:0.375rem;--bs-dropdown-border-width:1px;--bs-dropdown-inner-border-radius:calc(0.375rem - 1px);--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-divider-margin-y:0.5rem;--bs-dropdown-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-dropdown-link-color:#212529;--bs-dropdown-link-hover-color:#1e2125;--bs-dropdown-link-hover-bg:#e9ecef;--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:#adb5bd;--bs-dropdown-item-padding-x:1rem;--bs-dropdown-item-padding-y:0.25rem;--bs-dropdown-header-color:#6c757d;--bs-dropdown-header-padding-x:1rem;--bs-dropdown-header-padding-y:0.5rem;position:absolute;z-index:var(--bs-dropdown-zindex);display:none;min-width:var(--bs-dropdown-min-width);padding:var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x);margin:0;font-size:var(--bs-dropdown-font-size);color:var(--bs-dropdown-color);text-align:left;list-style:none;background-color:var(--bs-dropdown-bg);background-clip:padding-box;border:var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color);border-radius:var(--bs-dropdown-border-radius)}.dropdown-menu[data-bs-popper]{top:100%;left:0;margin-top:var(--bs-dropdown-spacer)}.dropdown-menu-start{--bs-position:start}.dropdown-menu-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-end{--bs-position:end}.dropdown-menu-end[data-bs-popper]{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-start{--bs-position:start}.dropdown-menu-sm-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-sm-end{--bs-position:end}.dropdown-menu-sm-end[data-bs-popper]{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-start{--bs-position:start}.dropdown-menu-md-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-md-end{--bs-position:end}.dropdown-menu-md-end[data-bs-popper]{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-start{--bs-position:start}.dropdown-menu-lg-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-lg-end{--bs-position:end}.dropdown-menu-lg-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-start{--bs-position:start}.dropdown-menu-xl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xl-end{--bs-position:end}.dropdown-menu-xl-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1400px){.dropdown-menu-xxl-start{--bs-position:start}.dropdown-menu-xxl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xxl-end{--bs-position:end}.dropdown-menu-xxl-end[data-bs-popper]{right:0;left:auto}}.dropup .dropdown-menu[data-bs-popper]{top:auto;bottom:100%;margin-top:0;margin-bottom:var(--bs-dropdown-spacer)}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-menu[data-bs-popper]{top:0;right:auto;left:100%;margin-top:0;margin-left:var(--bs-dropdown-spacer)}.dropend .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropend .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-toggle::after{vertical-align:0}.dropstart .dropdown-menu[data-bs-popper]{top:0;right:100%;left:auto;margin-top:0;margin-right:var(--bs-dropdown-spacer)}.dropstart .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropstart .dropdown-toggle::after{display:none}.dropstart .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropstart .dropdown-toggle:empty::after{margin-left:0}.dropstart .dropdown-toggle::before{vertical-align:0}.dropdown-divider{height:0;margin:var(--bs-dropdown-divider-margin-y) 0;overflow:hidden;border-top:1px solid var(--bs-dropdown-divider-bg);opacity:1}.dropdown-item{display:block;width:100%;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);clear:both;font-weight:400;color:var(--bs-dropdown-link-color);text-align:inherit;text-decoration:none;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:var(--bs-dropdown-link-hover-color);background-color:var(--bs-dropdown-link-hover-bg)}.dropdown-item.active,.dropdown-item:active{color:var(--bs-dropdown-link-active-color);text-decoration:none;background-color:var(--bs-dropdown-link-active-bg)}.dropdown-item.disabled,.dropdown-item:disabled{color:var(--bs-dropdown-link-disabled-color);pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x);margin-bottom:0;font-size:.875rem;color:var(--bs-dropdown-header-color);white-space:nowrap}.dropdown-item-text{display:block;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);color:var(--bs-dropdown-link-color)}.dropdown-menu-dark{--bs-dropdown-color:#dee2e6;--bs-dropdown-bg:#343a40;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-box-shadow: ;--bs-dropdown-link-color:#dee2e6;--bs-dropdown-link-hover-color:#fff;--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-link-hover-bg:rgba(255, 255, 255, 0.15);--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:#adb5bd;--bs-dropdown-header-color:#adb5bd}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group-vertical>.btn-check:checked+.btn,.btn-group-vertical>.btn-check:focus+.btn,.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn-check:checked+.btn,.btn-group>.btn-check:focus+.btn,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group{border-radius:.375rem}.btn-group>.btn-group:not(:first-child),.btn-group>:not(.btn-check:first-child)+.btn{margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn.dropdown-toggle-split:first-child,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:nth-child(n+3),.btn-group>:not(.btn-check)+.btn{border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropend .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropstart .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn~.btn{border-top-left-radius:0;border-top-right-radius:0}.nav{--bs-nav-link-padding-x:1rem;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color:var(--bs-link-color);--bs-nav-link-hover-color:var(--bs-link-hover-color);--bs-nav-link-disabled-color:#6c757d;display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);font-size:var(--bs-nav-link-font-size);font-weight:var(--bs-nav-link-font-weight);color:var(--bs-nav-link-color);text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}@media (prefers-reduced-motion:reduce){.nav-link{transition:none}}.nav-link:focus,.nav-link:hover{color:var(--bs-nav-link-hover-color)}.nav-link.disabled{color:var(--bs-nav-link-disabled-color);pointer-events:none;cursor:default}.nav-tabs{--bs-nav-tabs-border-width:1px;--bs-nav-tabs-border-color:#dee2e6;--bs-nav-tabs-border-radius:0.375rem;--bs-nav-tabs-link-hover-border-color:#e9ecef #e9ecef #dee2e6;--bs-nav-tabs-link-active-color:#495057;--bs-nav-tabs-link-active-bg:#fff;--bs-nav-tabs-link-active-border-color:#dee2e6 #dee2e6 #fff;border-bottom:var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color)}.nav-tabs .nav-link{margin-bottom:calc(-1 * var(--bs-nav-tabs-border-width));background:0 0;border:var(--bs-nav-tabs-border-width) solid transparent;border-top-left-radius:var(--bs-nav-tabs-border-radius);border-top-right-radius:var(--bs-nav-tabs-border-radius)}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{isolation:isolate;border-color:var(--bs-nav-tabs-link-hover-border-color)}.nav-tabs .nav-link.disabled,.nav-tabs .nav-link:disabled{color:var(--bs-nav-link-disabled-color);background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}.nav-tabs .dropdown-menu{margin-top:calc(-1 * var(--bs-nav-tabs-border-width));border-top-left-radius:0;border-top-right-radius:0}.nav-pills{--bs-nav-pills-border-radius:0.375rem;--bs-nav-pills-link-active-color:#fff;--bs-nav-pills-link-active-bg:#0d6efd}.nav-pills .nav-link{background:0 0;border:0;border-radius:var(--bs-nav-pills-border-radius)}.nav-pills .nav-link:disabled{color:var(--bs-nav-link-disabled-color);background-color:transparent;border-color:transparent}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:var(--bs-nav-pills-link-active-color);background-color:var(--bs-nav-pills-link-active-bg)}.nav-fill .nav-item,.nav-fill>.nav-link{flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{flex-basis:0;flex-grow:1;text-align:center}.nav-fill .nav-item .nav-link,.nav-justified .nav-item .nav-link{width:100%}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{--bs-navbar-padding-x:0;--bs-navbar-padding-y:0.5rem;--bs-navbar-color:rgba(0, 0, 0, 0.55);--bs-navbar-hover-color:rgba(0, 0, 0, 0.7);--bs-navbar-disabled-color:rgba(0, 0, 0, 0.3);--bs-navbar-active-color:rgba(0, 0, 0, 0.9);--bs-navbar-brand-padding-y:0.3125rem;--bs-navbar-brand-margin-end:1rem;--bs-navbar-brand-font-size:1.25rem;--bs-navbar-brand-color:rgba(0, 0, 0, 0.9);--bs-navbar-brand-hover-color:rgba(0, 0, 0, 0.9);--bs-navbar-nav-link-padding-x:0.5rem;--bs-navbar-toggler-padding-y:0.25rem;--bs-navbar-toggler-padding-x:0.75rem;--bs-navbar-toggler-font-size:1.25rem;--bs-navbar-toggler-icon-bg:url(${R});--bs-navbar-toggler-border-color:rgba(0, 0, 0, 0.1);--bs-navbar-toggler-border-radius:0.375rem;--bs-navbar-toggler-focus-width:0.25rem;--bs-navbar-toggler-transition:box-shadow 0.15s ease-in-out;position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:var(--bs-navbar-padding-y) var(--bs-navbar-padding-x)}.navbar>.container,.navbar>.container-fluid,.navbar>.container-lg,.navbar>.container-md,.navbar>.container-sm,.navbar>.container-xl,.navbar>.container-xxl{display:flex;flex-wrap:inherit;align-items:center;justify-content:space-between}.navbar-brand{padding-top:var(--bs-navbar-brand-padding-y);padding-bottom:var(--bs-navbar-brand-padding-y);margin-right:var(--bs-navbar-brand-margin-end);font-size:var(--bs-navbar-brand-font-size);color:var(--bs-navbar-brand-color);text-decoration:none;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{color:var(--bs-navbar-brand-hover-color)}.navbar-nav{--bs-nav-link-padding-x:0;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color:var(--bs-navbar-color);--bs-nav-link-hover-color:var(--bs-navbar-hover-color);--bs-nav-link-disabled-color:var(--bs-navbar-disabled-color);display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link.active,.navbar-nav .show>.nav-link{color:var(--bs-navbar-active-color)}.navbar-nav .dropdown-menu{position:static}.navbar-text{padding-top:.5rem;padding-bottom:.5rem;color:var(--bs-navbar-color)}.navbar-text a,.navbar-text a:focus,.navbar-text a:hover{color:var(--bs-navbar-active-color)}.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}.navbar-toggler{padding:var(--bs-navbar-toggler-padding-y) var(--bs-navbar-toggler-padding-x);font-size:var(--bs-navbar-toggler-font-size);line-height:1;color:var(--bs-navbar-color);background-color:transparent;border:var(--bs-border-width) solid var(--bs-navbar-toggler-border-color);border-radius:var(--bs-navbar-toggler-border-radius);transition:var(--bs-navbar-toggler-transition)}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-toggler:hover{text-decoration:none}.navbar-toggler:focus{text-decoration:none;outline:0;box-shadow:0 0 0 var(--bs-navbar-toggler-focus-width)}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;background-image:var(--bs-navbar-toggler-icon-bg);background-repeat:no-repeat;background-position:center;background-size:100%}.navbar-nav-scroll{max-height:var(--bs-scroll-height,75vh);overflow-y:auto}@media (min-width:576px){.navbar-expand-sm{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}.navbar-expand-sm .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-sm .offcanvas .offcanvas-header{display:none}.navbar-expand-sm .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}.navbar-expand-md .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-md .offcanvas .offcanvas-header{display:none}.navbar-expand-md .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:992px){.navbar-expand-lg{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}.navbar-expand-lg .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-lg .offcanvas .offcanvas-header{display:none}.navbar-expand-lg .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1200px){.navbar-expand-xl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}.navbar-expand-xl .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-xl .offcanvas .offcanvas-header{display:none}.navbar-expand-xl .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1400px){.navbar-expand-xxl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xxl .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}.navbar-expand-xxl .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-xxl .offcanvas .offcanvas-header{display:none}.navbar-expand-xxl .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}.navbar-expand{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-expand .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand .offcanvas .offcanvas-header{display:none}.navbar-expand .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}.navbar-dark{--bs-navbar-color:rgba(255, 255, 255, 0.55);--bs-navbar-hover-color:rgba(255, 255, 255, 0.75);--bs-navbar-disabled-color:rgba(255, 255, 255, 0.25);--bs-navbar-active-color:#fff;--bs-navbar-brand-color:#fff;--bs-navbar-brand-hover-color:#fff;--bs-navbar-toggler-border-color:rgba(255, 255, 255, 0.1);--bs-navbar-toggler-icon-bg:url(${F})}.card{--bs-card-spacer-y:1rem;--bs-card-spacer-x:1rem;--bs-card-title-spacer-y:0.5rem;--bs-card-border-width:1px;--bs-card-border-color:var(--bs-border-color-translucent);--bs-card-border-radius:0.375rem;--bs-card-box-shadow: ;--bs-card-inner-border-radius:calc(0.375rem - 1px);--bs-card-cap-padding-y:0.5rem;--bs-card-cap-padding-x:1rem;--bs-card-cap-bg:rgba(0, 0, 0, 0.03);--bs-card-cap-color: ;--bs-card-height: ;--bs-card-color: ;--bs-card-bg:#fff;--bs-card-img-overlay-padding:1rem;--bs-card-group-margin:0.75rem;position:relative;display:flex;flex-direction:column;min-width:0;height:var(--bs-card-height);word-wrap:break-word;background-color:var(--bs-card-bg);background-clip:border-box;border:var(--bs-card-border-width) solid var(--bs-card-border-color);border-radius:var(--bs-card-border-radius)}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:var(--bs-card-inner-border-radius);border-top-right-radius:var(--bs-card-inner-border-radius)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:var(--bs-card-inner-border-radius);border-bottom-left-radius:var(--bs-card-inner-border-radius)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{flex:1 1 auto;padding:var(--bs-card-spacer-y) var(--bs-card-spacer-x);color:var(--bs-card-color)}.card-title{margin-bottom:var(--bs-card-title-spacer-y)}.card-subtitle{margin-top:calc(-.5 * var(--bs-card-title-spacer-y));margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link+.card-link{margin-left:var(--bs-card-spacer-x)}.card-header{padding:var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);margin-bottom:0;color:var(--bs-card-cap-color);background-color:var(--bs-card-cap-bg);border-bottom:var(--bs-card-border-width) solid var(--bs-card-border-color)}.card-header:first-child{border-radius:var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0}.card-footer{padding:var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);color:var(--bs-card-cap-color);background-color:var(--bs-card-cap-bg);border-top:var(--bs-card-border-width) solid var(--bs-card-border-color)}.card-footer:last-child{border-radius:0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius)}.card-header-tabs{margin-right:calc(-.5 * var(--bs-card-cap-padding-x));margin-bottom:calc(-1 * var(--bs-card-cap-padding-y));margin-left:calc(-.5 * var(--bs-card-cap-padding-x));border-bottom:0}.card-header-tabs .nav-link.active{background-color:var(--bs-card-bg);border-bottom-color:var(--bs-card-bg)}.card-header-pills{margin-right:calc(-.5 * var(--bs-card-cap-padding-x));margin-left:calc(-.5 * var(--bs-card-cap-padding-x))}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:var(--bs-card-img-overlay-padding);border-radius:var(--bs-card-inner-border-radius)}.card-img,.card-img-bottom,.card-img-top{width:100%}.card-img,.card-img-top{border-top-left-radius:var(--bs-card-inner-border-radius);border-top-right-radius:var(--bs-card-inner-border-radius)}.card-img,.card-img-bottom{border-bottom-right-radius:var(--bs-card-inner-border-radius);border-bottom-left-radius:var(--bs-card-inner-border-radius)}.card-group>.card{margin-bottom:var(--bs-card-group-margin)}@media (min-width:576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.accordion{--bs-accordion-color:#212529;--bs-accordion-bg:#fff;--bs-accordion-transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out,border-radius 0.15s ease;--bs-accordion-border-color:var(--bs-border-color);--bs-accordion-border-width:1px;--bs-accordion-border-radius:0.375rem;--bs-accordion-inner-border-radius:calc(0.375rem - 1px);--bs-accordion-btn-padding-x:1.25rem;--bs-accordion-btn-padding-y:1rem;--bs-accordion-btn-color:#212529;--bs-accordion-btn-bg:var(--bs-accordion-bg);--bs-accordion-btn-icon:url(${P});--bs-accordion-btn-icon-width:1.25rem;--bs-accordion-btn-icon-transform:rotate(-180deg);--bs-accordion-btn-icon-transition:transform 0.2s ease-in-out;--bs-accordion-btn-active-icon:url(${N});--bs-accordion-btn-focus-border-color:#86b7fe;--bs-accordion-btn-focus-box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);--bs-accordion-body-padding-x:1.25rem;--bs-accordion-body-padding-y:1rem;--bs-accordion-active-color:#0c63e4;--bs-accordion-active-bg:#e7f1ff}.accordion-button{position:relative;display:flex;align-items:center;width:100%;padding:var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x);font-size:1rem;color:var(--bs-accordion-btn-color);text-align:left;background-color:var(--bs-accordion-btn-bg);border:0;border-radius:0;overflow-anchor:none;transition:var(--bs-accordion-transition)}@media (prefers-reduced-motion:reduce){.accordion-button{transition:none}}.accordion-button:not(.collapsed){color:var(--bs-accordion-active-color);background-color:var(--bs-accordion-active-bg);box-shadow:inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color)}.accordion-button:not(.collapsed)::after{background-image:var(--bs-accordion-btn-active-icon);transform:var(--bs-accordion-btn-icon-transform)}.accordion-button::after{flex-shrink:0;width:var(--bs-accordion-btn-icon-width);height:var(--bs-accordion-btn-icon-width);margin-left:auto;content:"";background-image:var(--bs-accordion-btn-icon);background-repeat:no-repeat;background-size:var(--bs-accordion-btn-icon-width);transition:var(--bs-accordion-btn-icon-transition)}@media (prefers-reduced-motion:reduce){.accordion-button::after{transition:none}}.accordion-button:hover{z-index:2}.accordion-button:focus{z-index:3;border-color:var(--bs-accordion-btn-focus-border-color);outline:0;box-shadow:var(--bs-accordion-btn-focus-box-shadow)}.accordion-header{margin-bottom:0}.accordion-item{color:var(--bs-accordion-color);background-color:var(--bs-accordion-bg);border:var(--bs-accordion-border-width) solid var(--bs-accordion-border-color)}.accordion-item:first-of-type{border-top-left-radius:var(--bs-accordion-border-radius);border-top-right-radius:var(--bs-accordion-border-radius)}.accordion-item:first-of-type .accordion-button{border-top-left-radius:var(--bs-accordion-inner-border-radius);border-top-right-radius:var(--bs-accordion-inner-border-radius)}.accordion-item:not(:first-of-type){border-top:0}.accordion-item:last-of-type{border-bottom-right-radius:var(--bs-accordion-border-radius);border-bottom-left-radius:var(--bs-accordion-border-radius)}.accordion-item:last-of-type .accordion-button.collapsed{border-bottom-right-radius:var(--bs-accordion-inner-border-radius);border-bottom-left-radius:var(--bs-accordion-inner-border-radius)}.accordion-item:last-of-type .accordion-collapse{border-bottom-right-radius:var(--bs-accordion-border-radius);border-bottom-left-radius:var(--bs-accordion-border-radius)}.accordion-body{padding:var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x)}.accordion-flush .accordion-collapse{border-width:0}.accordion-flush .accordion-item{border-right:0;border-left:0;border-radius:0}.accordion-flush .accordion-item:first-child{border-top:0}.accordion-flush .accordion-item:last-child{border-bottom:0}.accordion-flush .accordion-item .accordion-button,.accordion-flush .accordion-item .accordion-button.collapsed{border-radius:0}.breadcrumb{--bs-breadcrumb-padding-x:0;--bs-breadcrumb-padding-y:0;--bs-breadcrumb-margin-bottom:1rem;--bs-breadcrumb-bg: ;--bs-breadcrumb-border-radius: ;--bs-breadcrumb-divider-color:#6c757d;--bs-breadcrumb-item-padding-x:0.5rem;--bs-breadcrumb-item-active-color:#6c757d;display:flex;flex-wrap:wrap;padding:var(--bs-breadcrumb-padding-y) var(--bs-breadcrumb-padding-x);margin-bottom:var(--bs-breadcrumb-margin-bottom);font-size:var(--bs-breadcrumb-font-size);list-style:none;background-color:var(--bs-breadcrumb-bg);border-radius:var(--bs-breadcrumb-border-radius)}.breadcrumb-item+.breadcrumb-item{padding-left:var(--bs-breadcrumb-item-padding-x)}.breadcrumb-item+.breadcrumb-item::before{float:left;padding-right:var(--bs-breadcrumb-item-padding-x);color:var(--bs-breadcrumb-divider-color);content:var(--bs-breadcrumb-divider, "/")}.breadcrumb-item.active{color:var(--bs-breadcrumb-item-active-color)}.pagination{--bs-pagination-padding-x:0.75rem;--bs-pagination-padding-y:0.375rem;--bs-pagination-font-size:1rem;--bs-pagination-color:var(--bs-link-color);--bs-pagination-bg:#fff;--bs-pagination-border-width:1px;--bs-pagination-border-color:#dee2e6;--bs-pagination-border-radius:0.375rem;--bs-pagination-hover-color:var(--bs-link-hover-color);--bs-pagination-hover-bg:#e9ecef;--bs-pagination-hover-border-color:#dee2e6;--bs-pagination-focus-color:var(--bs-link-hover-color);--bs-pagination-focus-bg:#e9ecef;--bs-pagination-focus-box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);--bs-pagination-active-color:#fff;--bs-pagination-active-bg:#0d6efd;--bs-pagination-active-border-color:#0d6efd;--bs-pagination-disabled-color:#6c757d;--bs-pagination-disabled-bg:#fff;--bs-pagination-disabled-border-color:#dee2e6;display:flex;padding-left:0;list-style:none}.page-link{position:relative;display:block;padding:var(--bs-pagination-padding-y) var(--bs-pagination-padding-x);font-size:var(--bs-pagination-font-size);color:var(--bs-pagination-color);text-decoration:none;background-color:var(--bs-pagination-bg);border:var(--bs-pagination-border-width) solid var(--bs-pagination-border-color);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.page-link{transition:none}}.page-link:hover{z-index:2;color:var(--bs-pagination-hover-color);background-color:var(--bs-pagination-hover-bg);border-color:var(--bs-pagination-hover-border-color)}.page-link:focus{z-index:3;color:var(--bs-pagination-focus-color);background-color:var(--bs-pagination-focus-bg);outline:0;box-shadow:var(--bs-pagination-focus-box-shadow)}.active>.page-link,.page-link.active{z-index:3;color:var(--bs-pagination-active-color);background-color:var(--bs-pagination-active-bg);border-color:var(--bs-pagination-active-border-color)}.disabled>.page-link,.page-link.disabled{color:var(--bs-pagination-disabled-color);pointer-events:none;background-color:var(--bs-pagination-disabled-bg);border-color:var(--bs-pagination-disabled-border-color)}.page-item:not(:first-child) .page-link{margin-left:-1px}.page-item:first-child .page-link{border-top-left-radius:var(--bs-pagination-border-radius);border-bottom-left-radius:var(--bs-pagination-border-radius)}.page-item:last-child .page-link{border-top-right-radius:var(--bs-pagination-border-radius);border-bottom-right-radius:var(--bs-pagination-border-radius)}.pagination-lg{--bs-pagination-padding-x:1.5rem;--bs-pagination-padding-y:0.75rem;--bs-pagination-font-size:1.25rem;--bs-pagination-border-radius:0.5rem}.pagination-sm{--bs-pagination-padding-x:0.5rem;--bs-pagination-padding-y:0.25rem;--bs-pagination-font-size:0.875rem;--bs-pagination-border-radius:0.25rem}.badge{--bs-badge-padding-x:0.65em;--bs-badge-padding-y:0.35em;--bs-badge-font-size:0.75em;--bs-badge-font-weight:700;--bs-badge-color:#fff;--bs-badge-border-radius:0.375rem;display:inline-block;padding:var(--bs-badge-padding-y) var(--bs-badge-padding-x);font-size:var(--bs-badge-font-size);font-weight:var(--bs-badge-font-weight);line-height:1;color:var(--bs-badge-color);text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:var(--bs-badge-border-radius)}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.alert{--bs-alert-bg:transparent;--bs-alert-padding-x:1rem;--bs-alert-padding-y:1rem;--bs-alert-margin-bottom:1rem;--bs-alert-color:inherit;--bs-alert-border-color:transparent;--bs-alert-border:1px solid var(--bs-alert-border-color);--bs-alert-border-radius:0.375rem;position:relative;padding:var(--bs-alert-padding-y) var(--bs-alert-padding-x);margin-bottom:var(--bs-alert-margin-bottom);color:var(--bs-alert-color);background-color:var(--bs-alert-bg);border:var(--bs-alert-border);border-radius:var(--bs-alert-border-radius)}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:3rem}.alert-dismissible .btn-close{position:absolute;top:0;right:0;z-index:2;padding:1.25rem 1rem}.alert-primary{--bs-alert-color:#084298;--bs-alert-bg:#cfe2ff;--bs-alert-border-color:#b6d4fe}.alert-primary .alert-link{color:#06357a}.alert-secondary{--bs-alert-color:#41464b;--bs-alert-bg:#e2e3e5;--bs-alert-border-color:#d3d6d8}.alert-secondary .alert-link{color:#34383c}.alert-success{--bs-alert-color:#0f5132;--bs-alert-bg:#d1e7dd;--bs-alert-border-color:#badbcc}.alert-success .alert-link{color:#0c4128}.alert-info{--bs-alert-color:#055160;--bs-alert-bg:#cff4fc;--bs-alert-border-color:#b6effb}.alert-info .alert-link{color:#04414d}.alert-warning{--bs-alert-color:#664d03;--bs-alert-bg:#fff3cd;--bs-alert-border-color:#ffecb5}.alert-warning .alert-link{color:#523e02}.alert-danger{--bs-alert-color:#842029;--bs-alert-bg:#f8d7da;--bs-alert-border-color:#f5c2c7}.alert-danger .alert-link{color:#6a1a21}.alert-light{--bs-alert-color:#636464;--bs-alert-bg:#fefefe;--bs-alert-border-color:#fdfdfe}.alert-light .alert-link{color:#4f5050}.alert-dark{--bs-alert-color:#141619;--bs-alert-bg:#d3d3d4;--bs-alert-border-color:#bcbebf}.alert-dark .alert-link{color:#101214}@keyframes progress-bar-stripes{0%{background-position-x:1rem}}.progress{--bs-progress-height:1rem;--bs-progress-font-size:0.75rem;--bs-progress-bg:#e9ecef;--bs-progress-border-radius:0.375rem;--bs-progress-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.075);--bs-progress-bar-color:#fff;--bs-progress-bar-bg:#0d6efd;--bs-progress-bar-transition:width 0.6s ease;display:flex;height:var(--bs-progress-height);overflow:hidden;font-size:var(--bs-progress-font-size);background-color:var(--bs-progress-bg);border-radius:var(--bs-progress-border-radius)}.progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:var(--bs-progress-bar-color);text-align:center;white-space:nowrap;background-color:var(--bs-progress-bar-bg);transition:var(--bs-progress-bar-transition)}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:var(--bs-progress-height) var(--bs-progress-height)}.progress-bar-animated{animation:1s linear infinite progress-bar-stripes}@media (prefers-reduced-motion:reduce){.progress-bar-animated{animation:none}}.list-group{--bs-list-group-color:#212529;--bs-list-group-bg:#fff;--bs-list-group-border-color:rgba(0, 0, 0, 0.125);--bs-list-group-border-width:1px;--bs-list-group-border-radius:0.375rem;--bs-list-group-item-padding-x:1rem;--bs-list-group-item-padding-y:0.5rem;--bs-list-group-action-color:#495057;--bs-list-group-action-hover-color:#495057;--bs-list-group-action-hover-bg:#f8f9fa;--bs-list-group-action-active-color:#212529;--bs-list-group-action-active-bg:#e9ecef;--bs-list-group-disabled-color:#6c757d;--bs-list-group-disabled-bg:#fff;--bs-list-group-active-color:#fff;--bs-list-group-active-bg:#0d6efd;--bs-list-group-active-border-color:#0d6efd;display:flex;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:var(--bs-list-group-border-radius)}.list-group-numbered{list-style-type:none;counter-reset:section}.list-group-numbered>.list-group-item::before{content:counters(section, ".") ". ";counter-increment:section}.list-group-item-action{width:100%;color:var(--bs-list-group-action-color);text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:var(--bs-list-group-action-hover-color);text-decoration:none;background-color:var(--bs-list-group-action-hover-bg)}.list-group-item-action:active{color:var(--bs-list-group-action-active-color);background-color:var(--bs-list-group-action-active-bg)}.list-group-item{position:relative;display:block;padding:var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x);color:var(--bs-list-group-color);text-decoration:none;background-color:var(--bs-list-group-bg);border:var(--bs-list-group-border-width) solid var(--bs-list-group-border-color)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:var(--bs-list-group-disabled-color);pointer-events:none;background-color:var(--bs-list-group-disabled-bg)}.list-group-item.active{z-index:2;color:var(--bs-list-group-active-color);background-color:var(--bs-list-group-active-bg);border-color:var(--bs-list-group-active-border-color)}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:calc(-1 * var(--bs-list-group-border-width));border-top-width:var(--bs-list-group-border-width)}.list-group-horizontal{flex-direction:row}.list-group-horizontal>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}@media (min-width:576px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:768px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:992px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:1400px){.list-group-horizontal-xxl{flex-direction:row}.list-group-horizontal-xxl>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-xxl>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-xxl>.list-group-item.active{margin-top:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 var(--bs-list-group-border-width)}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#084298;background-color:#cfe2ff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#084298;background-color:#bacbe6}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#084298;border-color:#084298}.list-group-item-secondary{color:#41464b;background-color:#e2e3e5}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#41464b;background-color:#cbccce}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#41464b;border-color:#41464b}.list-group-item-success{color:#0f5132;background-color:#d1e7dd}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#0f5132;background-color:#bcd0c7}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#0f5132;border-color:#0f5132}.list-group-item-info{color:#055160;background-color:#cff4fc}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#055160;background-color:#badce3}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#055160;border-color:#055160}.list-group-item-warning{color:#664d03;background-color:#fff3cd}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#664d03;background-color:#e6dbb9}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#664d03;border-color:#664d03}.list-group-item-danger{color:#842029;background-color:#f8d7da}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#842029;background-color:#dfc2c4}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#842029;border-color:#842029}.list-group-item-light{color:#636464;background-color:#fefefe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#636464;background-color:#e5e5e5}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#636464;border-color:#636464}.list-group-item-dark{color:#141619;background-color:#d3d3d4}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#141619;background-color:#bebebf}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#141619;border-color:#141619}.btn-close{box-sizing:content-box;width:1em;height:1em;padding:.25em .25em;color:#000;background:transparent url(${j}) center/1em auto no-repeat;border:0;border-radius:.375rem;opacity:.5}.btn-close:hover{color:#000;text-decoration:none;opacity:.75}.btn-close:focus{outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25);opacity:1}.btn-close.disabled,.btn-close:disabled{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:.25}.btn-close-white{filter:invert(1) grayscale(100%) brightness(200%)}.toast{--bs-toast-zindex:1090;--bs-toast-padding-x:0.75rem;--bs-toast-padding-y:0.5rem;--bs-toast-spacing:1.5rem;--bs-toast-max-width:350px;--bs-toast-font-size:0.875rem;--bs-toast-color: ;--bs-toast-bg:rgba(255, 255, 255, 0.85);--bs-toast-border-width:1px;--bs-toast-border-color:var(--bs-border-color-translucent);--bs-toast-border-radius:0.375rem;--bs-toast-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-toast-header-color:#6c757d;--bs-toast-header-bg:rgba(255, 255, 255, 0.85);--bs-toast-header-border-color:rgba(0, 0, 0, 0.05);width:var(--bs-toast-max-width);max-width:100%;font-size:var(--bs-toast-font-size);color:var(--bs-toast-color);pointer-events:auto;background-color:var(--bs-toast-bg);background-clip:padding-box;border:var(--bs-toast-border-width) solid var(--bs-toast-border-color);box-shadow:var(--bs-toast-box-shadow);border-radius:var(--bs-toast-border-radius)}.toast.showing{opacity:0}.toast:not(.show){display:none}.toast-container{--bs-toast-zindex:1090;position:absolute;z-index:var(--bs-toast-zindex);width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:100%;pointer-events:none}.toast-container>:not(:last-child){margin-bottom:var(--bs-toast-spacing)}.toast-header{display:flex;align-items:center;padding:var(--bs-toast-padding-y) var(--bs-toast-padding-x);color:var(--bs-toast-header-color);background-color:var(--bs-toast-header-bg);background-clip:padding-box;border-bottom:var(--bs-toast-border-width) solid var(--bs-toast-header-border-color);border-top-left-radius:calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width));border-top-right-radius:calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width))}.toast-header .btn-close{margin-right:calc(-.5 * var(--bs-toast-padding-x));margin-left:var(--bs-toast-padding-x)}.toast-body{padding:var(--bs-toast-padding-x);word-wrap:break-word}.modal{--bs-modal-zindex:1055;--bs-modal-width:500px;--bs-modal-padding:1rem;--bs-modal-margin:0.5rem;--bs-modal-color: ;--bs-modal-bg:#fff;--bs-modal-border-color:var(--bs-border-color-translucent);--bs-modal-border-width:1px;--bs-modal-border-radius:0.5rem;--bs-modal-box-shadow:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--bs-modal-inner-border-radius:calc(0.5rem - 1px);--bs-modal-header-padding-x:1rem;--bs-modal-header-padding-y:1rem;--bs-modal-header-padding:1rem 1rem;--bs-modal-header-border-color:var(--bs-border-color);--bs-modal-header-border-width:1px;--bs-modal-title-line-height:1.5;--bs-modal-footer-gap:0.5rem;--bs-modal-footer-bg: ;--bs-modal-footer-border-color:var(--bs-border-color);--bs-modal-footer-border-width:1px;position:fixed;top:0;left:0;z-index:var(--bs-modal-zindex);display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}.modal-dialog{position:relative;width:auto;margin:var(--bs-modal-margin);pointer-events:none}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{height:calc(100% - var(--bs-modal-margin) * 2)}.modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - var(--bs-modal-margin) * 2)}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;color:var(--bs-modal-color);pointer-events:auto;background-color:var(--bs-modal-bg);background-clip:padding-box;border:var(--bs-modal-border-width) solid var(--bs-modal-border-color);border-radius:var(--bs-modal-border-radius);outline:0}.modal-backdrop{--bs-backdrop-zindex:1050;--bs-backdrop-bg:#000;--bs-backdrop-opacity:0.5;position:fixed;top:0;left:0;z-index:var(--bs-backdrop-zindex);width:100vw;height:100vh;background-color:var(--bs-backdrop-bg)}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:var(--bs-backdrop-opacity)}.modal-header{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:var(--bs-modal-header-padding);border-bottom:var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color);border-top-left-radius:var(--bs-modal-inner-border-radius);border-top-right-radius:var(--bs-modal-inner-border-radius)}.modal-header .btn-close{padding:calc(var(--bs-modal-header-padding-y) * .5) calc(var(--bs-modal-header-padding-x) * .5);margin:calc(-.5 * var(--bs-modal-header-padding-y)) calc(-.5 * var(--bs-modal-header-padding-x)) calc(-.5 * var(--bs-modal-header-padding-y)) auto}.modal-title{margin-bottom:0;line-height:var(--bs-modal-title-line-height)}.modal-body{position:relative;flex:1 1 auto;padding:var(--bs-modal-padding)}.modal-footer{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * .5);background-color:var(--bs-modal-footer-bg);border-top:var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color);border-bottom-right-radius:var(--bs-modal-inner-border-radius);border-bottom-left-radius:var(--bs-modal-inner-border-radius)}.modal-footer>*{margin:calc(var(--bs-modal-footer-gap) * .5)}@media (min-width:576px){.modal{--bs-modal-margin:1.75rem;--bs-modal-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15)}.modal-dialog{max-width:var(--bs-modal-width);margin-right:auto;margin-left:auto}.modal-sm{--bs-modal-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{--bs-modal-width:800px}}@media (min-width:1200px){.modal-xl{--bs-modal-width:1140px}}.modal-fullscreen{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen .modal-footer,.modal-fullscreen .modal-header{border-radius:0}.modal-fullscreen .modal-body{overflow-y:auto}@media (max-width:575.98px){.modal-fullscreen-sm-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-sm-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-sm-down .modal-footer,.modal-fullscreen-sm-down .modal-header{border-radius:0}.modal-fullscreen-sm-down .modal-body{overflow-y:auto}}@media (max-width:767.98px){.modal-fullscreen-md-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-md-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-md-down .modal-footer,.modal-fullscreen-md-down .modal-header{border-radius:0}.modal-fullscreen-md-down .modal-body{overflow-y:auto}}@media (max-width:991.98px){.modal-fullscreen-lg-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-lg-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-lg-down .modal-footer,.modal-fullscreen-lg-down .modal-header{border-radius:0}.modal-fullscreen-lg-down .modal-body{overflow-y:auto}}@media (max-width:1199.98px){.modal-fullscreen-xl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xl-down .modal-footer,.modal-fullscreen-xl-down .modal-header{border-radius:0}.modal-fullscreen-xl-down .modal-body{overflow-y:auto}}@media (max-width:1399.98px){.modal-fullscreen-xxl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xxl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xxl-down .modal-footer,.modal-fullscreen-xxl-down .modal-header{border-radius:0}.modal-fullscreen-xxl-down .modal-body{overflow-y:auto}}.tooltip{--bs-tooltip-zindex:1080;--bs-tooltip-max-width:200px;--bs-tooltip-padding-x:0.5rem;--bs-tooltip-padding-y:0.25rem;--bs-tooltip-margin: ;--bs-tooltip-font-size:0.875rem;--bs-tooltip-color:#fff;--bs-tooltip-bg:#000;--bs-tooltip-border-radius:0.375rem;--bs-tooltip-opacity:0.9;--bs-tooltip-arrow-width:0.8rem;--bs-tooltip-arrow-height:0.4rem;z-index:var(--bs-tooltip-zindex);display:block;padding:var(--bs-tooltip-arrow-height);margin:var(--bs-tooltip-margin);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-tooltip-font-size);word-wrap:break-word;opacity:0}.tooltip.show{opacity:var(--bs-tooltip-opacity)}.tooltip .tooltip-arrow{display:block;width:var(--bs-tooltip-arrow-width);height:var(--bs-tooltip-arrow-height)}.tooltip .tooltip-arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow,.bs-tooltip-top .tooltip-arrow{bottom:0}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,.bs-tooltip-top .tooltip-arrow::before{top:-1px;border-width:var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0;border-top-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow,.bs-tooltip-end .tooltip-arrow{left:0;width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before,.bs-tooltip-end .tooltip-arrow::before{right:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0;border-right-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow,.bs-tooltip-bottom .tooltip-arrow{top:0}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before,.bs-tooltip-bottom .tooltip-arrow::before{bottom:-1px;border-width:0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height);border-bottom-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow,.bs-tooltip-start .tooltip-arrow{right:0;width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before,.bs-tooltip-start .tooltip-arrow::before{left:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * .5) 0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height);border-left-color:var(--bs-tooltip-bg)}.tooltip-inner{max-width:var(--bs-tooltip-max-width);padding:var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x);color:var(--bs-tooltip-color);text-align:center;background-color:var(--bs-tooltip-bg);border-radius:var(--bs-tooltip-border-radius)}.popover{--bs-popover-zindex:1070;--bs-popover-max-width:276px;--bs-popover-font-size:0.875rem;--bs-popover-bg:#fff;--bs-popover-border-width:1px;--bs-popover-border-color:var(--bs-border-color-translucent);--bs-popover-border-radius:0.5rem;--bs-popover-inner-border-radius:calc(0.5rem - 1px);--bs-popover-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-popover-header-padding-x:1rem;--bs-popover-header-padding-y:0.5rem;--bs-popover-header-font-size:1rem;--bs-popover-header-color: ;--bs-popover-header-bg:#f0f0f0;--bs-popover-body-padding-x:1rem;--bs-popover-body-padding-y:1rem;--bs-popover-body-color:#212529;--bs-popover-arrow-width:1rem;--bs-popover-arrow-height:0.5rem;--bs-popover-arrow-border:var(--bs-popover-border-color);z-index:var(--bs-popover-zindex);display:block;max-width:var(--bs-popover-max-width);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-popover-font-size);word-wrap:break-word;background-color:var(--bs-popover-bg);background-clip:padding-box;border:var(--bs-popover-border-width) solid var(--bs-popover-border-color);border-radius:var(--bs-popover-border-radius)}.popover .popover-arrow{display:block;width:var(--bs-popover-arrow-width);height:var(--bs-popover-arrow-height)}.popover .popover-arrow::after,.popover .popover-arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid;border-width:0}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow,.bs-popover-top>.popover-arrow{bottom:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width))}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::after,.bs-popover-top>.popover-arrow::before{border-width:var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * .5) 0}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::before{bottom:0;border-top-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-top>.popover-arrow::after{bottom:var(--bs-popover-border-width);border-top-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow,.bs-popover-end>.popover-arrow{left:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));width:var(--bs-popover-arrow-height);height:var(--bs-popover-arrow-width)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::after,.bs-popover-end>.popover-arrow::before{border-width:calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * .5) 0}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::before{left:0;border-right-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-end>.popover-arrow::after{left:var(--bs-popover-border-width);border-right-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow,.bs-popover-bottom>.popover-arrow{top:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width))}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::before{border-width:0 calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::before{top:0;border-bottom-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::after{top:var(--bs-popover-border-width);border-bottom-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:var(--bs-popover-arrow-width);margin-left:calc(-.5 * var(--bs-popover-arrow-width));content:"";border-bottom:var(--bs-popover-border-width) solid var(--bs-popover-header-bg)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow,.bs-popover-start>.popover-arrow{right:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));width:var(--bs-popover-arrow-height);height:var(--bs-popover-arrow-width)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::after,.bs-popover-start>.popover-arrow::before{border-width:calc(var(--bs-popover-arrow-width) * .5) 0 calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::before{right:0;border-left-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-start>.popover-arrow::after{right:var(--bs-popover-border-width);border-left-color:var(--bs-popover-bg)}.popover-header{padding:var(--bs-popover-header-padding-y) var(--bs-popover-header-padding-x);margin-bottom:0;font-size:var(--bs-popover-header-font-size);color:var(--bs-popover-header-color);background-color:var(--bs-popover-header-bg);border-bottom:var(--bs-popover-border-width) solid var(--bs-popover-border-color);border-top-left-radius:var(--bs-popover-inner-border-radius);border-top-right-radius:var(--bs-popover-inner-border-radius)}.popover-header:empty{display:none}.popover-body{padding:var(--bs-popover-body-padding-y) var(--bs-popover-body-padding-x);color:var(--bs-popover-body-color)}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-end,.carousel-item-next:not(.carousel-item-start){transform:translateX(100%)}.active.carousel-item-start,.carousel-item-prev:not(.carousel-item-end){transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item-next.carousel-item-start,.carousel-fade .carousel-item-prev.carousel-item-end,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:0 0;border:0;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:2rem;height:2rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}.carousel-control-prev-icon{background-image:url(${B})}.carousel-control-next-icon{background-image:url(${U})}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:2;display:flex;justify-content:center;padding:0;margin-right:15%;margin-bottom:1rem;margin-left:15%;list-style:none}.carousel-indicators [data-bs-target]{box-sizing:content-box;flex:0 1 auto;width:30px;height:3px;padding:0;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border:0;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators [data-bs-target]{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:1.25rem;left:15%;padding-top:1.25rem;padding-bottom:1.25rem;color:#fff;text-align:center}.carousel-dark .carousel-control-next-icon,.carousel-dark .carousel-control-prev-icon{filter:invert(1) grayscale(100)}.carousel-dark .carousel-indicators [data-bs-target]{background-color:#000}.carousel-dark .carousel-caption{color:#000}.spinner-border,.spinner-grow{display:inline-block;width:var(--bs-spinner-width);height:var(--bs-spinner-height);vertical-align:var(--bs-spinner-vertical-align);border-radius:50%;animation:var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name)}@keyframes spinner-border{to{transform:rotate(360deg)}}.spinner-border{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-border-width:0.25em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-border;border:var(--bs-spinner-border-width) solid currentcolor;border-right-color:transparent}.spinner-border-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem;--bs-spinner-border-width:0.2em}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-grow;background-color:currentcolor;opacity:0}.spinner-grow-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{--bs-spinner-animation-speed:1.5s}}.offcanvas,.offcanvas-lg,.offcanvas-md,.offcanvas-sm,.offcanvas-xl,.offcanvas-xxl{--bs-offcanvas-zindex:1045;--bs-offcanvas-width:400px;--bs-offcanvas-height:30vh;--bs-offcanvas-padding-x:1rem;--bs-offcanvas-padding-y:1rem;--bs-offcanvas-color: ;--bs-offcanvas-bg:#fff;--bs-offcanvas-border-width:1px;--bs-offcanvas-border-color:var(--bs-border-color-translucent);--bs-offcanvas-box-shadow:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075)}@media (max-width:575.98px){.offcanvas-sm{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:575.98px) and (prefers-reduced-motion:reduce){.offcanvas-sm{transition:none}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:575.98px){.offcanvas-sm.show:not(.hiding),.offcanvas-sm.showing{transform:none}}@media (max-width:575.98px){.offcanvas-sm.hiding,.offcanvas-sm.show,.offcanvas-sm.showing{visibility:visible}}@media (min-width:576px){.offcanvas-sm{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-sm .offcanvas-header{display:none}.offcanvas-sm .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:767.98px){.offcanvas-md{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:767.98px) and (prefers-reduced-motion:reduce){.offcanvas-md{transition:none}}@media (max-width:767.98px){.offcanvas-md.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:767.98px){.offcanvas-md.show:not(.hiding),.offcanvas-md.showing{transform:none}}@media (max-width:767.98px){.offcanvas-md.hiding,.offcanvas-md.show,.offcanvas-md.showing{visibility:visible}}@media (min-width:768px){.offcanvas-md{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-md .offcanvas-header{display:none}.offcanvas-md .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:991.98px){.offcanvas-lg{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:991.98px) and (prefers-reduced-motion:reduce){.offcanvas-lg{transition:none}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:991.98px){.offcanvas-lg.show:not(.hiding),.offcanvas-lg.showing{transform:none}}@media (max-width:991.98px){.offcanvas-lg.hiding,.offcanvas-lg.show,.offcanvas-lg.showing{visibility:visible}}@media (min-width:992px){.offcanvas-lg{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-lg .offcanvas-header{display:none}.offcanvas-lg .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:1199.98px){.offcanvas-xl{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:1199.98px) and (prefers-reduced-motion:reduce){.offcanvas-xl{transition:none}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:1199.98px){.offcanvas-xl.show:not(.hiding),.offcanvas-xl.showing{transform:none}}@media (max-width:1199.98px){.offcanvas-xl.hiding,.offcanvas-xl.show,.offcanvas-xl.showing{visibility:visible}}@media (min-width:1200px){.offcanvas-xl{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-xl .offcanvas-header{display:none}.offcanvas-xl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:1399.98px){.offcanvas-xxl{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}}@media (max-width:1399.98px) and (prefers-reduced-motion:reduce){.offcanvas-xxl{transition:none}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}}@media (max-width:1399.98px){.offcanvas-xxl.show:not(.hiding),.offcanvas-xxl.showing{transform:none}}@media (max-width:1399.98px){.offcanvas-xxl.hiding,.offcanvas-xxl.show,.offcanvas-xxl.showing{visibility:visible}}@media (min-width:1400px){.offcanvas-xxl{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-xxl .offcanvas-header{display:none}.offcanvas-xxl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}.offcanvas{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}@media (prefers-reduced-motion:reduce){.offcanvas{transition:none}}.offcanvas.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}.offcanvas.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}.offcanvas.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}.offcanvas.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}.offcanvas.show:not(.hiding),.offcanvas.showing{transform:none}.offcanvas.hiding,.offcanvas.show,.offcanvas.showing{visibility:visible}.offcanvas-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.offcanvas-backdrop.fade{opacity:0}.offcanvas-backdrop.show{opacity:.5}.offcanvas-header{display:flex;align-items:center;justify-content:space-between;padding:var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x)}.offcanvas-header .btn-close{padding:calc(var(--bs-offcanvas-padding-y) * .5) calc(var(--bs-offcanvas-padding-x) * .5);margin-top:calc(-.5 * var(--bs-offcanvas-padding-y));margin-right:calc(-.5 * var(--bs-offcanvas-padding-x));margin-bottom:calc(-.5 * var(--bs-offcanvas-padding-y))}.offcanvas-title{margin-bottom:0;line-height:1.5}.offcanvas-body{flex-grow:1;padding:var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x);overflow-y:auto}.placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentcolor;opacity:.5}.placeholder.btn::before{display:inline-block;content:""}.placeholder-xs{min-height:.6em}.placeholder-sm{min-height:.8em}.placeholder-lg{min-height:1.2em}.placeholder-glow .placeholder{animation:placeholder-glow 2s ease-in-out infinite}@keyframes placeholder-glow{50%{opacity:.2}}.placeholder-wave{-webkit-mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);-webkit-mask-size:200% 100%;mask-size:200% 100%;animation:placeholder-wave 2s linear infinite}@keyframes placeholder-wave{100%{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}.clearfix::after{display:block;clear:both;content:""}.text-bg-primary{color:#fff!important;background-color:RGBA(13,110,253,var(--bs-bg-opacity,1))!important}.text-bg-secondary{color:#fff!important;background-color:RGBA(108,117,125,var(--bs-bg-opacity,1))!important}.text-bg-success{color:#fff!important;background-color:RGBA(25,135,84,var(--bs-bg-opacity,1))!important}.text-bg-info{color:#000!important;background-color:RGBA(13,202,240,var(--bs-bg-opacity,1))!important}.text-bg-warning{color:#000!important;background-color:RGBA(255,193,7,var(--bs-bg-opacity,1))!important}.text-bg-danger{color:#fff!important;background-color:RGBA(220,53,69,var(--bs-bg-opacity,1))!important}.text-bg-light{color:#000!important;background-color:RGBA(248,249,250,var(--bs-bg-opacity,1))!important}.text-bg-dark{color:#fff!important;background-color:RGBA(33,37,41,var(--bs-bg-opacity,1))!important}.link-primary{color:#0d6efd!important}.link-primary:focus,.link-primary:hover{color:#0a58ca!important}.link-secondary{color:#6c757d!important}.link-secondary:focus,.link-secondary:hover{color:#565e64!important}.link-success{color:#198754!important}.link-success:focus,.link-success:hover{color:#146c43!important}.link-info{color:#0dcaf0!important}.link-info:focus,.link-info:hover{color:#3dd5f3!important}.link-warning{color:#ffc107!important}.link-warning:focus,.link-warning:hover{color:#ffcd39!important}.link-danger{color:#dc3545!important}.link-danger:focus,.link-danger:hover{color:#b02a37!important}.link-light{color:#f8f9fa!important}.link-light:focus,.link-light:hover{color:#f9fafb!important}.link-dark{color:#212529!important}.link-dark:focus,.link-dark:hover{color:#1a1e21!important}.ratio{position:relative;width:100%}.ratio::before{display:block;padding-top:var(--bs-aspect-ratio);content:""}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-1x1{--bs-aspect-ratio:100%}.ratio-4x3{--bs-aspect-ratio:75%}.ratio-16x9{--bs-aspect-ratio:56.25%}.ratio-21x9{--bs-aspect-ratio:42.8571428571%}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}@media (min-width:576px){.sticky-sm-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-sm-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:768px){.sticky-md-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-md-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:992px){.sticky-lg-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-lg-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:1200px){.sticky-xl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-xl-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:1400px){.sticky-xxl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-xxl-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}.hstack{display:flex;flex-direction:row;align-items:center;align-self:stretch}.vstack{display:flex;flex:1 1 auto;flex-direction:column;align-self:stretch}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:""}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vr{display:inline-block;align-self:stretch;width:1px;min-height:1em;background-color:currentcolor;opacity:.25}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.float-start{float:left!important}.float-end{float:right!important}.float-none{float:none!important}.opacity-0{opacity:0!important}.opacity-25{opacity:.25!important}.opacity-50{opacity:.5!important}.opacity-75{opacity:.75!important}.opacity-100{opacity:1!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-visible{overflow:visible!important}.overflow-scroll{overflow:scroll!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.top-0{top:0!important}.top-50{top:50%!important}.top-100{top:100%!important}.bottom-0{bottom:0!important}.bottom-50{bottom:50%!important}.bottom-100{bottom:100%!important}.start-0{left:0!important}.start-50{left:50%!important}.start-100{left:100%!important}.end-0{right:0!important}.end-50{right:50%!important}.end-100{right:100%!important}.translate-middle{transform:translate(-50%,-50%)!important}.translate-middle-x{transform:translateX(-50%)!important}.translate-middle-y{transform:translateY(-50%)!important}.border{border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-0{border:0!important}.border-top{border-top:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-top-0{border-top:0!important}.border-end{border-right:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-end-0{border-right:0!important}.border-bottom{border-bottom:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-bottom-0{border-bottom:0!important}.border-start{border-left:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-start-0{border-left:0!important}.border-primary{--bs-border-opacity:1;border-color:rgba(var(--bs-primary-rgb),var(--bs-border-opacity))!important}.border-secondary{--bs-border-opacity:1;border-color:rgba(var(--bs-secondary-rgb),var(--bs-border-opacity))!important}.border-success{--bs-border-opacity:1;border-color:rgba(var(--bs-success-rgb),var(--bs-border-opacity))!important}.border-info{--bs-border-opacity:1;border-color:rgba(var(--bs-info-rgb),var(--bs-border-opacity))!important}.border-warning{--bs-border-opacity:1;border-color:rgba(var(--bs-warning-rgb),var(--bs-border-opacity))!important}.border-danger{--bs-border-opacity:1;border-color:rgba(var(--bs-danger-rgb),var(--bs-border-opacity))!important}.border-light{--bs-border-opacity:1;border-color:rgba(var(--bs-light-rgb),var(--bs-border-opacity))!important}.border-dark{--bs-border-opacity:1;border-color:rgba(var(--bs-dark-rgb),var(--bs-border-opacity))!important}.border-white{--bs-border-opacity:1;border-color:rgba(var(--bs-white-rgb),var(--bs-border-opacity))!important}.border-1{--bs-border-width:1px}.border-2{--bs-border-width:2px}.border-3{--bs-border-width:3px}.border-4{--bs-border-width:4px}.border-5{--bs-border-width:5px}.border-opacity-10{--bs-border-opacity:0.1}.border-opacity-25{--bs-border-opacity:0.25}.border-opacity-50{--bs-border-opacity:0.5}.border-opacity-75{--bs-border-opacity:0.75}.border-opacity-100{--bs-border-opacity:1}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.mw-100{max-width:100%!important}.vw-100{width:100vw!important}.min-vw-100{min-width:100vw!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mh-100{max-height:100%!important}.vh-100{height:100vh!important}.min-vh-100{min-height:100vh!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-right:0!important;margin-left:0!important}.mx-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-auto{margin-left:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-right:0!important;padding-left:0!important}.px-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-right:0!important}.pe-1{padding-right:.25rem!important}.pe-2{padding-right:.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-left:0!important}.ps-1{padding-left:.25rem!important}.ps-2{padding-left:.5rem!important}.ps-3{padding-left:1rem!important}.ps-4{padding-left:1.5rem!important}.ps-5{padding-left:3rem!important}.gap-0{gap:0!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:1rem!important}.gap-4{gap:1.5rem!important}.gap-5{gap:3rem!important}.font-monospace{font-family:var(--bs-font-monospace)!important}.fs-1{font-size:calc(1.375rem + 1.5vw)!important}.fs-2{font-size:calc(1.325rem + .9vw)!important}.fs-3{font-size:calc(1.3rem + .6vw)!important}.fs-4{font-size:calc(1.275rem + .3vw)!important}.fs-5{font-size:1.25rem!important}.fs-6{font-size:1rem!important}.fst-italic{font-style:italic!important}.fst-normal{font-style:normal!important}.fw-light{font-weight:300!important}.fw-lighter{font-weight:lighter!important}.fw-normal{font-weight:400!important}.fw-bold{font-weight:700!important}.fw-semibold{font-weight:600!important}.fw-bolder{font-weight:bolder!important}.lh-1{line-height:1!important}.lh-sm{line-height:1.25!important}.lh-base{line-height:1.5!important}.lh-lg{line-height:2!important}.text-start{text-align:left!important}.text-end{text-align:right!important}.text-center{text-align:center!important}.text-decoration-none{text-decoration:none!important}.text-decoration-underline{text-decoration:underline!important}.text-decoration-line-through{text-decoration:line-through!important}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-break{word-wrap:break-word!important;word-break:break-word!important}.text-primary{--bs-text-opacity:1;color:rgba(var(--bs-primary-rgb),var(--bs-text-opacity))!important}.text-secondary{--bs-text-opacity:1;color:rgba(var(--bs-secondary-rgb),var(--bs-text-opacity))!important}.text-success{--bs-text-opacity:1;color:rgba(var(--bs-success-rgb),var(--bs-text-opacity))!important}.text-info{--bs-text-opacity:1;color:rgba(var(--bs-info-rgb),var(--bs-text-opacity))!important}.text-warning{--bs-text-opacity:1;color:rgba(var(--bs-warning-rgb),var(--bs-text-opacity))!important}.text-danger{--bs-text-opacity:1;color:rgba(var(--bs-danger-rgb),var(--bs-text-opacity))!important}.text-light{--bs-text-opacity:1;color:rgba(var(--bs-light-rgb),var(--bs-text-opacity))!important}.text-dark{--bs-text-opacity:1;color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}.text-black{--bs-text-opacity:1;color:rgba(var(--bs-black-rgb),var(--bs-text-opacity))!important}.text-white{--bs-text-opacity:1;color:rgba(var(--bs-white-rgb),var(--bs-text-opacity))!important}.text-body{--bs-text-opacity:1;color:rgba(var(--bs-body-color-rgb),var(--bs-text-opacity))!important}.text-muted{--bs-text-opacity:1;color:#6c757d!important}.text-black-50{--bs-text-opacity:1;color:rgba(0,0,0,.5)!important}.text-white-50{--bs-text-opacity:1;color:rgba(255,255,255,.5)!important}.text-reset{--bs-text-opacity:1;color:inherit!important}.text-opacity-25{--bs-text-opacity:0.25}.text-opacity-50{--bs-text-opacity:0.5}.text-opacity-75{--bs-text-opacity:0.75}.text-opacity-100{--bs-text-opacity:1}.bg-primary{--bs-bg-opacity:1;background-color:rgba(var(--bs-primary-rgb),var(--bs-bg-opacity))!important}.bg-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-secondary-rgb),var(--bs-bg-opacity))!important}.bg-success{--bs-bg-opacity:1;background-color:rgba(var(--bs-success-rgb),var(--bs-bg-opacity))!important}.bg-info{--bs-bg-opacity:1;background-color:rgba(var(--bs-info-rgb),var(--bs-bg-opacity))!important}.bg-warning{--bs-bg-opacity:1;background-color:rgba(var(--bs-warning-rgb),var(--bs-bg-opacity))!important}.bg-danger{--bs-bg-opacity:1;background-color:rgba(var(--bs-danger-rgb),var(--bs-bg-opacity))!important}.bg-light{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-rgb),var(--bs-bg-opacity))!important}.bg-dark{--bs-bg-opacity:1;background-color:rgba(var(--bs-dark-rgb),var(--bs-bg-opacity))!important}.bg-black{--bs-bg-opacity:1;background-color:rgba(var(--bs-black-rgb),var(--bs-bg-opacity))!important}.bg-white{--bs-bg-opacity:1;background-color:rgba(var(--bs-white-rgb),var(--bs-bg-opacity))!important}.bg-body{--bs-bg-opacity:1;background-color:rgba(var(--bs-body-bg-rgb),var(--bs-bg-opacity))!important}.bg-transparent{--bs-bg-opacity:1;background-color:transparent!important}.bg-opacity-10{--bs-bg-opacity:0.1}.bg-opacity-25{--bs-bg-opacity:0.25}.bg-opacity-50{--bs-bg-opacity:0.5}.bg-opacity-75{--bs-bg-opacity:0.75}.bg-opacity-100{--bs-bg-opacity:1}.bg-gradient{background-image:var(--bs-gradient)!important}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.pe-none{pointer-events:none!important}.pe-auto{pointer-events:auto!important}.rounded{border-radius:var(--bs-border-radius)!important}.rounded-0{border-radius:0!important}.rounded-1{border-radius:var(--bs-border-radius-sm)!important}.rounded-2{border-radius:var(--bs-border-radius)!important}.rounded-3{border-radius:var(--bs-border-radius-lg)!important}.rounded-4{border-radius:var(--bs-border-radius-xl)!important}.rounded-5{border-radius:var(--bs-border-radius-2xl)!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:var(--bs-border-radius-pill)!important}.rounded-top{border-top-left-radius:var(--bs-border-radius)!important;border-top-right-radius:var(--bs-border-radius)!important}.rounded-end{border-top-right-radius:var(--bs-border-radius)!important;border-bottom-right-radius:var(--bs-border-radius)!important}.rounded-bottom{border-bottom-right-radius:var(--bs-border-radius)!important;border-bottom-left-radius:var(--bs-border-radius)!important}.rounded-start{border-bottom-left-radius:var(--bs-border-radius)!important;border-top-left-radius:var(--bs-border-radius)!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media (min-width:576px){.float-sm-start{float:left!important}.float-sm-end{float:right!important}.float-sm-none{float:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-right:0!important;margin-left:0!important}.mx-sm-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-sm-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-sm-3{margin-right:1rem!important;margin-left:1rem!important}.mx-sm-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-sm-5{margin-right:3rem!important;margin-left:3rem!important}.mx-sm-auto{margin-right:auto!important;margin-left:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-right:0!important}.me-sm-1{margin-right:.25rem!important}.me-sm-2{margin-right:.5rem!important}.me-sm-3{margin-right:1rem!important}.me-sm-4{margin-right:1.5rem!important}.me-sm-5{margin-right:3rem!important}.me-sm-auto{margin-right:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-left:0!important}.ms-sm-1{margin-left:.25rem!important}.ms-sm-2{margin-left:.5rem!important}.ms-sm-3{margin-left:1rem!important}.ms-sm-4{margin-left:1.5rem!important}.ms-sm-5{margin-left:3rem!important}.ms-sm-auto{margin-left:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-right:0!important;padding-left:0!important}.px-sm-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-sm-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-sm-3{padding-right:1rem!important;padding-left:1rem!important}.px-sm-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-sm-5{padding-right:3rem!important;padding-left:3rem!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-right:0!important}.pe-sm-1{padding-right:.25rem!important}.pe-sm-2{padding-right:.5rem!important}.pe-sm-3{padding-right:1rem!important}.pe-sm-4{padding-right:1.5rem!important}.pe-sm-5{padding-right:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-left:0!important}.ps-sm-1{padding-left:.25rem!important}.ps-sm-2{padding-left:.5rem!important}.ps-sm-3{padding-left:1rem!important}.ps-sm-4{padding-left:1.5rem!important}.ps-sm-5{padding-left:3rem!important}.gap-sm-0{gap:0!important}.gap-sm-1{gap:.25rem!important}.gap-sm-2{gap:.5rem!important}.gap-sm-3{gap:1rem!important}.gap-sm-4{gap:1.5rem!important}.gap-sm-5{gap:3rem!important}.text-sm-start{text-align:left!important}.text-sm-end{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.float-md-start{float:left!important}.float-md-end{float:right!important}.float-md-none{float:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-right:0!important;margin-left:0!important}.mx-md-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-md-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-md-3{margin-right:1rem!important;margin-left:1rem!important}.mx-md-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-md-5{margin-right:3rem!important;margin-left:3rem!important}.mx-md-auto{margin-right:auto!important;margin-left:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-right:0!important}.me-md-1{margin-right:.25rem!important}.me-md-2{margin-right:.5rem!important}.me-md-3{margin-right:1rem!important}.me-md-4{margin-right:1.5rem!important}.me-md-5{margin-right:3rem!important}.me-md-auto{margin-right:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-left:0!important}.ms-md-1{margin-left:.25rem!important}.ms-md-2{margin-left:.5rem!important}.ms-md-3{margin-left:1rem!important}.ms-md-4{margin-left:1.5rem!important}.ms-md-5{margin-left:3rem!important}.ms-md-auto{margin-left:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-right:0!important;padding-left:0!important}.px-md-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-md-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-md-3{padding-right:1rem!important;padding-left:1rem!important}.px-md-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-md-5{padding-right:3rem!important;padding-left:3rem!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-right:0!important}.pe-md-1{padding-right:.25rem!important}.pe-md-2{padding-right:.5rem!important}.pe-md-3{padding-right:1rem!important}.pe-md-4{padding-right:1.5rem!important}.pe-md-5{padding-right:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-left:0!important}.ps-md-1{padding-left:.25rem!important}.ps-md-2{padding-left:.5rem!important}.ps-md-3{padding-left:1rem!important}.ps-md-4{padding-left:1.5rem!important}.ps-md-5{padding-left:3rem!important}.gap-md-0{gap:0!important}.gap-md-1{gap:.25rem!important}.gap-md-2{gap:.5rem!important}.gap-md-3{gap:1rem!important}.gap-md-4{gap:1.5rem!important}.gap-md-5{gap:3rem!important}.text-md-start{text-align:left!important}.text-md-end{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.float-lg-start{float:left!important}.float-lg-end{float:right!important}.float-lg-none{float:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-right:0!important;margin-left:0!important}.mx-lg-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-lg-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-lg-3{margin-right:1rem!important;margin-left:1rem!important}.mx-lg-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-lg-5{margin-right:3rem!important;margin-left:3rem!important}.mx-lg-auto{margin-right:auto!important;margin-left:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-right:0!important}.me-lg-1{margin-right:.25rem!important}.me-lg-2{margin-right:.5rem!important}.me-lg-3{margin-right:1rem!important}.me-lg-4{margin-right:1.5rem!important}.me-lg-5{margin-right:3rem!important}.me-lg-auto{margin-right:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-left:0!important}.ms-lg-1{margin-left:.25rem!important}.ms-lg-2{margin-left:.5rem!important}.ms-lg-3{margin-left:1rem!important}.ms-lg-4{margin-left:1.5rem!important}.ms-lg-5{margin-left:3rem!important}.ms-lg-auto{margin-left:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-right:0!important;padding-left:0!important}.px-lg-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-lg-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-lg-3{padding-right:1rem!important;padding-left:1rem!important}.px-lg-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-lg-5{padding-right:3rem!important;padding-left:3rem!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-right:0!important}.pe-lg-1{padding-right:.25rem!important}.pe-lg-2{padding-right:.5rem!important}.pe-lg-3{padding-right:1rem!important}.pe-lg-4{padding-right:1.5rem!important}.pe-lg-5{padding-right:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-left:0!important}.ps-lg-1{padding-left:.25rem!important}.ps-lg-2{padding-left:.5rem!important}.ps-lg-3{padding-left:1rem!important}.ps-lg-4{padding-left:1.5rem!important}.ps-lg-5{padding-left:3rem!important}.gap-lg-0{gap:0!important}.gap-lg-1{gap:.25rem!important}.gap-lg-2{gap:.5rem!important}.gap-lg-3{gap:1rem!important}.gap-lg-4{gap:1.5rem!important}.gap-lg-5{gap:3rem!important}.text-lg-start{text-align:left!important}.text-lg-end{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.float-xl-start{float:left!important}.float-xl-end{float:right!important}.float-xl-none{float:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-right:0!important;margin-left:0!important}.mx-xl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xl-auto{margin-right:auto!important;margin-left:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-right:0!important}.me-xl-1{margin-right:.25rem!important}.me-xl-2{margin-right:.5rem!important}.me-xl-3{margin-right:1rem!important}.me-xl-4{margin-right:1.5rem!important}.me-xl-5{margin-right:3rem!important}.me-xl-auto{margin-right:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-left:0!important}.ms-xl-1{margin-left:.25rem!important}.ms-xl-2{margin-left:.5rem!important}.ms-xl-3{margin-left:1rem!important}.ms-xl-4{margin-left:1.5rem!important}.ms-xl-5{margin-left:3rem!important}.ms-xl-auto{margin-left:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-right:0!important;padding-left:0!important}.px-xl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-right:0!important}.pe-xl-1{padding-right:.25rem!important}.pe-xl-2{padding-right:.5rem!important}.pe-xl-3{padding-right:1rem!important}.pe-xl-4{padding-right:1.5rem!important}.pe-xl-5{padding-right:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-left:0!important}.ps-xl-1{padding-left:.25rem!important}.ps-xl-2{padding-left:.5rem!important}.ps-xl-3{padding-left:1rem!important}.ps-xl-4{padding-left:1.5rem!important}.ps-xl-5{padding-left:3rem!important}.gap-xl-0{gap:0!important}.gap-xl-1{gap:.25rem!important}.gap-xl-2{gap:.5rem!important}.gap-xl-3{gap:1rem!important}.gap-xl-4{gap:1.5rem!important}.gap-xl-5{gap:3rem!important}.text-xl-start{text-align:left!important}.text-xl-end{text-align:right!important}.text-xl-center{text-align:center!important}}@media (min-width:1400px){.float-xxl-start{float:left!important}.float-xxl-end{float:right!important}.float-xxl-none{float:none!important}.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-right:0!important;margin-left:0!important}.mx-xxl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xxl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xxl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xxl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xxl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xxl-auto{margin-right:auto!important;margin-left:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xxl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-right:0!important}.me-xxl-1{margin-right:.25rem!important}.me-xxl-2{margin-right:.5rem!important}.me-xxl-3{margin-right:1rem!important}.me-xxl-4{margin-right:1.5rem!important}.me-xxl-5{margin-right:3rem!important}.me-xxl-auto{margin-right:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-left:0!important}.ms-xxl-1{margin-left:.25rem!important}.ms-xxl-2{margin-left:.5rem!important}.ms-xxl-3{margin-left:1rem!important}.ms-xxl-4{margin-left:1.5rem!important}.ms-xxl-5{margin-left:3rem!important}.ms-xxl-auto{margin-left:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-right:0!important;padding-left:0!important}.px-xxl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xxl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xxl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xxl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xxl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xxl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pe-xxl-0{padding-right:0!important}.pe-xxl-1{padding-right:.25rem!important}.pe-xxl-2{padding-right:.5rem!important}.pe-xxl-3{padding-right:1rem!important}.pe-xxl-4{padding-right:1.5rem!important}.pe-xxl-5{padding-right:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-left:0!important}.ps-xxl-1{padding-left:.25rem!important}.ps-xxl-2{padding-left:.5rem!important}.ps-xxl-3{padding-left:1rem!important}.ps-xxl-4{padding-left:1.5rem!important}.ps-xxl-5{padding-left:3rem!important}.gap-xxl-0{gap:0!important}.gap-xxl-1{gap:.25rem!important}.gap-xxl-2{gap:.5rem!important}.gap-xxl-3{gap:1rem!important}.gap-xxl-4{gap:1.5rem!important}.gap-xxl-5{gap:3rem!important}.text-xxl-start{text-align:left!important}.text-xxl-end{text-align:right!important}.text-xxl-center{text-align:center!important}}@media (min-width:1200px){.fs-1{font-size:2.5rem!important}.fs-2{font-size:2rem!important}.fs-3{font-size:1.75rem!important}.fs-4{font-size:1.5rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}}`,""]);var G=new CSSStyleSheet;G.replaceSync(M.toString());const V=G},62621:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(78706),i=r.n(n),o=r(72859),a=r.n(o)()(i());a.push([t.id,".chsp-meta {\n z-index: 1;\n cursor: pointer;\n}\n\n.chsp-meta .chsp-info-icon {\n float: right;\n margin-top: 5px;\n margin-left: 3px;\n}\n\n.chsp-meta .chsp-info-icon svg {\n display: block;\n width: 14px;\n height: 14px;\n opacity: 0.6;\n}\n\n.chsp-authors-list {\n padding: 0;\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n justify-content: center;\n}\n\n.chsp-authors-list li {\n border: solid #dee2e6 1px;\n padding: 10px;\n list-style-type: none;\n white-space: nowrap;\n}\n\n.chsp-open-map-settings {\n position: absolute;\n top: 3px;\n left: 5px;\n z-index: 10;\n}\n\n.chsp-open-viewer-settings {\n position: absolute;\n top: 5px;\n right: 5px;\n}\n\n.chsp-extra-options-btn {\n margin: auto;\n display: block;\n}\n\n/* Tooltip text */\n.chsp-tooltip {\n visibility: hidden;\n background: #69738a;\n color: white;\n padding: 6px;\n font-size: 12px;\n line-height: 12px;\n white-space: nowrap;\n border-radius: 2px;\n text-align: center;\n display: inline-block;\n width: 9em;\n position: absolute;\n z-index: 100000;\n}\n\n.chsp-tooltip-right {\n top: 0px;\n right: -9.5em;\n}\n\n.chsp-tooltip-below {\n top: 35px;\n left: -3.5em;\n}\n\n.chsp-has-tooltip:hover .chsp-tooltip {\n visibility: visible;\n}\n\n.chsp-pin-marker {\n border-radius: 50%;\n border: solid 1px black;\n --size: 12px;\n width: var(--size);\n height: var(--size);\n z-index: 10;\n}\n\n.chsp-map-pin-marker {\n position: absolute;\n /* ensure the top/right/left/bottom positioning is relative to the center of the div */\n transform: translate(calc(-50% + var(--size)), -50%);\n}\n\n.chsp-pin-marker:hover {\n --size: 20px;\n cursor: pointer;\n}\n\n/* This class is added on top of .chsp-pin-marker for the active pinned structure/environment */\n.chsp-active-pin {\n border-width: 2px;\n --size: 20px;\n}\n\n.chsp-active-pin:hover {\n --size: 22px;\n cursor: default;\n}\n\n.chsp-viewer-button {\n position: absolute;\n padding: 1px;\n margin: 0;\n height: 28px;\n width: 28px;\n z-index: 10;\n}\n\n.chsp-viewer-action-button {\n background-color: white;\n border: none;\n}\n\n.chsp-viewer-action-button:hover {\n background: white;\n}\n\n.chsp-viewer-action-button svg {\n opacity: 0.4;\n transition: opacity 0.15s ease-in-out;\n}\n\n.chsp-viewer-action-button:hover svg {\n opacity: 0.6;\n}\n\n.chsp-structure-viewer-grid {\n display: grid;\n position: relative;\n width: 100%;\n height: 100%;\n grid-column-gap: 2px;\n grid-row-gap: 2px;\n}\n\n.chsp-structure-viewer-cell {\n width: 99%;\n height: 99%;\n left: 0.5%;\n top: 0.5%;\n position: relative;\n border: 1px solid lightgray;\n padding: 1px;\n}\n\n.chsp-structure-viewer-cell-active {\n border-color: gray;\n}\n\n.chsp-map-options {\n display: grid;\n grid-template-columns: 1fr 0.5fr;\n align-items: center;\n justify-content: center;\n align-content: start;\n column-gap: 1em;\n}\n\n.chsp-map-options label {\n min-width: 6em;\n}\n\n.chsp-map-options > :nth-child(n + 3):not(.chsp-map-extra-options) {\n margin-top: 1.3rem;\n}\n\n.chsp-map-extra-options {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: auto 1fr 1fr;\n column-gap: 1em;\n}\n\n.chsp-map-extra-options > * {\n margin: 0.5em 0;\n}\n\n.chsp-map-extra-options label {\n min-width: auto;\n}\n\n.chsp-map-extra-options {\n grid-column: 1 / span 2;\n}\n\n.chsp-map-options .form-check-label {\n width: auto;\n}\n\n.chsp-modal-header {\n cursor: grab;\n}\n\n.chsp-play-button {\n border: 0;\n background: transparent;\n box-sizing: border-box;\n height: 1.2em;\n width: 1.2em;\n margin-left: 0.5ex;\n\n border-color: transparent transparent transparent #202020;\n transition: 100ms all ease;\n cursor: pointer;\n\n border-style: solid;\n border-width: 0.7em 0 0.7em 1em;\n}\n\n.chsp-play-button.chsp-playing {\n border-style: double;\n border-width: 0px 0 0px 1.2em;\n}\n\n.chsp-play-button:hover {\n border-color: transparent transparent transparent #404040;\n}\n\n.chsp-properties-table {\n height: 100%;\n width: 80%;\n margin: auto;\n}\n\n.chsp-properties-table td,\n.chsp-properties-table th {\n width: 50%;\n border-top: none;\n}\n\n.chsp-settings-section-title {\n font-weight: bold;\n}\n\n/* Change Plotly modebar style to match the style of the structure grid buttons */\n\n.chsp-map .modebar-group {\n padding-left: 0 !important;\n}\n\n.chsp-map .modebar-btn {\n cursor: default !important;\n font-family: apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n 'Noto Color Emoji';\n}\n\n.chsp-map .modebar-btn::after {\n opacity: 0.9;\n}\n\n.chsp-map .icon:hover + .modebar-btn::after {\n visibility: visible;\n}\n\n.chsp-map .modebar-btn::before {\n content: none !important;\n}\n\n.chsp-map .modebar-btn .icon {\n transition: opacity 0.15s ease-in-out;\n padding: 3px;\n opacity: 0.3;\n cursor: pointer;\n}\n\n.chsp-map .modebar-group svg.icon {\n width: 2em;\n height: 2em;\n border-radius: 0.2em;\n}\n\n.chsp-map .modebar-group svg.icon:active {\n color: #212529;\n background-color: #dae0e5;\n border-color: #d3d9df;\n box-shadow: 0 0 0 0.2rem rgb(216 217 219 / 50%);\n}\n\n.chsp-map .modebar-btn .icon path {\n transition:\n color 0.15s ease-in-out,\n background-color 0.15s ease-in-out,\n border-color 0.15s ease-in-out,\n box-shadow 0.15s ease-in-out;\n fill: black !important;\n}\n\n.chsp-map .modebar-btn .icon:hover {\n opacity: 0.6;\n}\n\n.chsp-map .modebar-btn.active .icon {\n opacity: 0.6;\n}\n\n.chsp-info-btns {\n display: flex;\n position: relative;\n margin-bottom: 0.5ex;\n margin-top: 0.5ex;\n justify-content: center;\n}\n\n.chsp-info-structure-btn {\n min-width: 8em;\n padding-left: 6px;\n padding-right: 4px;\n font-weight: bold;\n font-size: small;\n background-color: none;\n border-color: #66a5e8;\n border-width: 2px;\n float: left;\n}\n\n.chsp-info-structure-btn:hover {\n background-color: #5b94d0;\n}\n\n.chsp-info-atom-btn {\n margin-left: 1em;\n padding-left: 6px;\n padding-right: 4px;\n min-width: 8em;\n font-weight: bold;\n font-size: small;\n background-color: none;\n border-color: #4cb64c;\n border-width: 2px;\n}\n\n.chsp-info-atom-btn:hover {\n background-color: #44a344;\n}\n\n.chsp-info-btns-svg {\n float: left;\n padding-right: 6px;\n padding-top: 3px;\n}\n\n.chsp-info-btns-svg svg {\n display: block;\n opacity: 0.6;\n}\n\n.chsp-info-number {\n -moz-appearance: textfield;\n appearance: textfield;\n border: none;\n transition: background-color 0.15s;\n background-color: #ebedf0;\n margin-left: 2px;\n margin-right: 3px;\n font-family: inherit;\n width: 4em;\n}\n\n.chsp-info-atom-btn:hover .chsp-info-number {\n background-color: #69b569;\n}\n\n.chsp-info-structure-btn:hover .chsp-info-number {\n background-color: #7ba9d9;\n}\n\n.chsp-info-number::-webkit-outer-spin-button,\n.chsp-info-number::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.chsp-info-tables {\n position: relative;\n width: 100%;\n}\n\n.chsp-info-table {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 10;\n background-color: white;\n /* max-height is set in JavaScript */\n overflow: auto;\n}\n\n.chsp-info-table.collapsing {\n overflow: hidden;\n}\n\n.chsp-info-table table {\n margin: 0;\n}\n\n/* Change the atoms slider thumb color to green, to match structure highlight */\n.chsp-atom-slider::-webkit-slider-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-moz-range-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-ms-thumb {\n background-color: #008000;\n}\n\n.chsp-atom-slider::-webkit-slider-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider::-moz-range-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider::-ms-thumb:active {\n background-color: #99cc99;\n}\n\n.chsp-atom-slider:focus::-webkit-slider-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-atom-slider:focus::-moz-range-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-atom-slider:focus::-ms-thumb {\n box-shadow:\n 0 0 0 1px #fff,\n 0 0 0 0.2rem rgba(0, 255, 0, 0.25);\n}\n\n.chsp-settings-representation {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr;\n grid-row-gap: 1ex;\n}\n\n.chsp-settings-representation label {\n cursor: help;\n}\n\n.chsp-settings-supercell {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr 2fr;\n}\n\n.chsp-supercell-count {\n max-width: 3.5em;\n}\n\n.chsp-settings-camera {\n display: grid;\n gap: 1em;\n grid-template-columns: repeat(7, auto);\n justify-content: center;\n}\n\n.chsp-settings-environments {\n display: grid;\n align-items: center;\n column-gap: 1em;\n grid-template-columns: 1fr 1fr 1fr;\n}\n\n.chsp-settings-extra-options {\n display: grid;\n gap: 1em;\n grid-template-columns: 1fr 1fr 1fr;\n grid-column: 1 / span 3;\n}\n\n.chsp-settings-extra-options > :nth-child(-n + 3) {\n margin-top: 1em;\n}\n\n.chsp-settings-trajectory {\n display: grid;\n grid-template-columns: 12em 12em;\n justify-content: center;\n align-content: center;\n gap: 1em;\n margin-bottom: 1ex;\n}\n\n.chsp-cell-info {\n position: absolute;\n bottom: 5px;\n left: 5px;\n font-size: 0.8em;\n}\n\n.chsp-toggle-plot-btn {\n display: block;\n position: relative;\n margin-top: 3px;\n margin-bottom: 1px;\n}\n\n.chsp-atom-color-property {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: 1fr 1fr;\n column-gap: 1em;\n margin: 0.5em 0;\n}\n\n.chsp-atom-extra-options {\n display: grid;\n align-items: center;\n justify-items: center;\n grid-template-columns: auto 1fr 1fr;\n column-gap: 1em;\n}\n\n.chsp-atom-extra-options > * {\n margin: 0.5em 0;\n}\n\n.chsp-atom-extra-options label {\n min-width: auto;\n}\n\n.chsp-atom-extra-options {\n grid-column: 1 / span 2;\n}\n\n.chsp-target-toggle {\n padding-left: 5px;\n padding-right: 5px;\n display: flex;\n justify-content: flex-end;\n gap: 5px;\n}\n\n.chsp-target-spinner {\n width: 25px;\n height: 25px;\n margin-left: 5px;\n}\n",""]);var s=new CSSStyleSheet;s.replaceSync(a.toString());const l=s},37821:function(module,__unused_webpack_exports,__webpack_require__){var process=__webpack_require__(39807),factory;factory=()=>(()=>{var __webpack_modules__={"./node_modules/iobuffer/lib-esm/IOBuffer.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{IOBuffer:()=>a});var n=r("./node_modules/iobuffer/lib-esm/text.browser.js");const i=(()=>{const t=new Uint8Array(4);return!((new Uint32Array(t.buffer)[0]=1)&t[0])})(),o={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class a{constructor(t=8192,e={}){let r=!1;"number"==typeof t?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);const n=e.offset?e.offset>>>0:0,i=t.byteLength-n;let o=n;(ArrayBuffer.isView(t)||t instanceof a)&&(t.byteLength!==t.buffer.byteLength&&(o=t.byteOffset+n),t=t.buffer),this.lastWrittenByte=r?i:0,this.buffer=t,this.length=i,this.byteLength=i,this.byteOffset=o,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,o,i),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}back(t=1){return this.offset-=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const t=this._marks.pop();if(void 0===t)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const e=2*(this.offset+t),r=new Uint8Array(e);r.set(new Uint8Array(this.buffer)),this.buffer=r.buffer,this.length=this.byteLength=e,this._data=new DataView(this.buffer)}return this}readBoolean(){return 0!==this.readUint8()}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,e){const r=o[e].BYTES_PER_ELEMENT*t,n=this.byteOffset+this.offset,a=this.buffer.slice(n,n+r);if(this.littleEndian===i&&"uint8"!==e&&"int8"!==e){const t=new Uint8Array(this.buffer.slice(n,n+r));t.reverse();const i=new o[e](t.buffer);return this.offset+=r,i.reverse(),i}const s=new o[e](a);return this.offset+=r,s}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let e="";for(let r=0;rthis.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}},"./node_modules/iobuffer/lib-esm/text-encoding-polyfill.js":function(){"use strict";!function(t){if(t.TextEncoder&&t.TextDecoder)return!1;function e(t="utf-8"){if("utf-8"!==t)throw new RangeError(`Failed to construct 'TextEncoder': The encoding label provided ('${t}') is invalid.`)}function r(t="utf-8",e={fatal:!1}){if("utf-8"!==t)throw new RangeError(`Failed to construct 'TextDecoder': The encoding label provided ('${t}') is invalid.`);if(e.fatal)throw new Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}Object.defineProperty(e.prototype,"encoding",{value:"utf-8"}),e.prototype.encode=function(t,e={stream:!1}){if(e.stream)throw new Error("Failed to encode: the 'stream' option is unsupported.");let r=0;const n=t.length;let i=0,o=Math.max(32,n+(n>>1)+7),a=new Uint8Array(o>>3<<3);for(;r=55296&&e<=56319){if(r=55296&&e<=56319)continue}if(i+4>a.length){o+=8,o*=1+r/t.length*2,o=o>>3<<3;const e=new Uint8Array(o);e.set(a),a=e}if(4294967168&e){if(4294965248&e)if(4294901760&e){if(4292870144&e)continue;a[i++]=e>>18&7|240,a[i++]=e>>12&63|128,a[i++]=e>>6&63|128}else a[i++]=e>>12&15|224,a[i++]=e>>6&63|128;else a[i++]=e>>6&31|192;a[i++]=63&e|128}else a[i++]=e}return a.slice(0,i)},Object.defineProperty(r.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(r.prototype,"fatal",{value:!1}),Object.defineProperty(r.prototype,"ignoreBOM",{value:!1}),r.prototype.decode=function(t,e={stream:!1}){if(e.stream)throw new Error("Failed to decode: the 'stream' option is unsupported.");const r=new Uint8Array(t);let n=0;const i=r.length,o=[];for(;n65535&&(e-=65536,o.push(e>>>10&1023|55296),e=56320|1023&e),o.push(e)}}else o.push(t)}return String.fromCharCode.apply(null,o)},t.TextEncoder=e,t.TextDecoder=r}("undefined"!=typeof window?window:"undefined"!=typeof self?self:this)},"./node_modules/iobuffer/lib-esm/text.browser.js":(t,e,r)=>{"use strict";function n(t,e="utf8"){return new TextDecoder(e).decode(t)}r.r(e),r.d(e,{decode:()=>n,encode:()=>o}),r("./node_modules/iobuffer/lib-esm/text-encoding-polyfill.js");const i=new TextEncoder;function o(t){return i.encode(t)}},"./node_modules/netcdfjs/lib-esm/data.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{nonRecord:()=>i,record:()=>o});var n=r("./node_modules/netcdfjs/lib-esm/types.js");function i(t,e){const r=(0,n.str2num)(e.type),i=e.size/(0,n.num2bytes)(r),o=new Array(i);for(let e=0;e{"use strict";r.r(e),r.d(e,{header:()=>u});var n=r("./node_modules/netcdfjs/lib-esm/types.js"),i=r("./node_modules/netcdfjs/lib-esm/utils.js");const o=0,a=10,s=11,l=12,c=0;function u(t,e){const r={version:e},l={length:t.readUint32()},u=function(t){const e={};let r,n;const s=t.readUint32();let l;if(s===o)return(0,i.notNetcdf)(t.readUint32()!==o,"wrong empty tag for list of dimensions"),[];{(0,i.notNetcdf)(s!==a,"wrong tag for list of dimensions");const e=t.readUint32();l=new Array(e);for(let o=0;o6,`non valid type ${f}`);const p=t.readUint32();let m=t.readUint32();2===r&&((0,i.notNetcdf)(m>0,"offsets larger than 4GB not supported"),m=t.readUint32());let g=!1;void 0!==e&&u[0]===e&&(c+=p,g=!0),l[a]={name:o,dimensions:u,attributes:d,type:(0,n.num2str)(f),size:p,offset:m,record:g}}}return{variables:l,recordStep:c}}(t,l?.id,e);return Array.isArray(d)||(r.variables=d.variables,l.recordStep=d.recordStep),r.recordDimension=l,r}function h(t){const e=t.readUint32();let r;if(e===o)return(0,i.notNetcdf)(t.readUint32()!==o,"wrong empty tag for list of attributes"),[];{(0,i.notNetcdf)(e!==l,"wrong tag for list of attributes");const o=t.readUint32();r=new Array(o);for(let e=0;e6,`non valid type ${a}`);const s=t.readUint32(),l=(0,n.readType)(t,a,s);(0,i.padding)(t),r[e]={name:o,type:(0,n.num2str)(a),value:l}}}return r}},"./node_modules/netcdfjs/lib-esm/index.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{NetCDFReader:()=>n.NetCDFReader});var n=r("./node_modules/netcdfjs/lib-esm/parser.js")},"./node_modules/netcdfjs/lib-esm/parser.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{NetCDFReader:()=>l});var n=r("./node_modules/iobuffer/lib-esm/IOBuffer.js"),i=r("./node_modules/netcdfjs/lib-esm/data.js"),o=r("./node_modules/netcdfjs/lib-esm/header.js"),a=r("./node_modules/netcdfjs/lib-esm/toString.js"),s=r("./node_modules/netcdfjs/lib-esm/utils.js");class l{constructor(t){this.toString=a.toString;const e=new n.IOBuffer(t);e.setBigEndian(),(0,s.notNetcdf)("CDF"!==e.readChars(3),"should start with CDF");const r=e.readByte();(0,s.notNetcdf)(r>2,"unknown version"),this.header=(0,o.header)(e,r),this.buffer=e}get version(){return 1===this.header.version?"classic format":"64-bit offset format"}get recordDimension(){return this.header.recordDimension}get dimensions(){return this.header.dimensions}get globalAttributes(){return this.header.globalAttributes}getAttribute(t){const e=this.globalAttributes.find((e=>e.name===t));return e?e.value:null}getDataVariableAsString(t){const e=this.getDataVariable(t);return e?e.join(""):null}get variables(){return this.header.variables}getDataVariable(t){let e;if(e="string"==typeof t?this.header.variables.find((e=>e.name===t)):t,void 0===e)throw new Error("Not a valid NetCDF v3.x file: variable not found");return this.buffer.seek(e.offset),e.record?(0,i.record)(this.buffer,e,this.header.recordDimension):(0,i.nonRecord)(this.buffer,e)}dataVariableExists(t){return void 0!==this.header.variables.find((e=>e.name===t))}attributeExists(t){return void 0!==this.globalAttributes.find((e=>e.name===t))}}},"./node_modules/netcdfjs/lib-esm/toString.js":(t,e,r)=>{"use strict";function n(){const t=[];t.push("DIMENSIONS");for(const e of this.dimensions)t.push(` ${e.name.padEnd(30)} = size: ${e.size}`);t.push(""),t.push("GLOBAL ATTRIBUTES");for(const e of this.globalAttributes)t.push(` ${e.name.padEnd(30)} = ${e.value}`);const e=JSON.parse(JSON.stringify(this.variables));t.push(""),t.push("VARIABLES:");for(const r of e){r.value=this.getDataVariable(r);let e=JSON.stringify(r.value);e.length>50&&(e=e.substring(0,50)),isNaN(r.value.length)||(e+=` (length: ${r.value.length})`),t.push(` ${r.name.padEnd(30)} = ${e}`)}return t.join("\n")}r.r(e),r.d(e,{toString:()=>n})},"./node_modules/netcdfjs/lib-esm/types.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{num2bytes:()=>o,num2str:()=>i,readType:()=>l,str2num:()=>a});const n={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6};function i(t){switch(Number(t)){case n.BYTE:return"byte";case n.CHAR:return"char";case n.SHORT:return"short";case n.INT:return"int";case n.FLOAT:return"float";case n.DOUBLE:return"double";default:return"undefined"}}function o(t){switch(Number(t)){case n.BYTE:case n.CHAR:return 1;case n.SHORT:return 2;case n.INT:case n.FLOAT:return 4;case n.DOUBLE:return 8;default:return-1}}function a(t){switch(String(t)){case"byte":return n.BYTE;case"char":return n.CHAR;case"short":return n.SHORT;case"int":return n.INT;case"float":return n.FLOAT;case"double":return n.DOUBLE;default:return-1}}function s(t,e){if(1!==t){const r=new Array(t);for(let n=0;n{"use strict";function n(t,e){if(t)throw new TypeError(`Not a valid NetCDF v3.x file: ${e}`)}function i(t){t.offset%4!=0&&t.skip(4-t.offset%4)}function o(t){const e=t.readUint32(),r=t.readChars(e);return i(t),r}r.r(e),r.d(e,{notNetcdf:()=>n,padding:()=>i,readName:()=>o})},"./src/WebGL/shaders/lib/basic/basic.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 viewMatrix;\nuniform float opacity;\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\nvoid main() {\n gl_FragColor = vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}"},"./src/WebGL/shaders/lib/basic/basic.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\n\nattribute vec3 position;\nattribute vec3 color;\n\nvarying vec3 vColor;\n\nvoid main() {\n\n vColor = color;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix * mvPosition;\n\n}"},"./src/WebGL/shaders/lib/instanced/instanced.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 viewMatrix;\nuniform float opacity;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLightFront;\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\n\n #ifndef WIREFRAME\n gl_FragColor.xyz *= vLightFront;\n #endif\n\n gl_FragColor = gl_FragColor * vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n}\n\n\n"},"./src/WebGL/shaders/lib/instanced/instanced.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 offset;\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute float radius;\n\nvarying vec3 vColor;\nvarying vec3 vLightFront;\n\nvoid main() {\n\n vColor = color;\n\n vec3 objectNormal = normal;\n vec3 transformedNormal = normalMatrix * objectNormal;\n vec4 mvPosition = modelViewMatrix * vec4( position * radius + offset, 1.0 );\n\n vLightFront = vec3( 0.0 );\n\n transformedNormal = normalize( transformedNormal );\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n\n vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\n\n gl_Position = projectionMatrix * mvPosition;\n}\n\n"},"./src/WebGL/shaders/lib/lambert/lambert.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 viewMatrix;\nuniform float opacity;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLightFront;\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\n\n #ifndef WIREFRAME\n gl_FragColor.xyz *= vLightFront;\n #endif\n\n gl_FragColor = gl_FragColor * vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n}"},"./src/WebGL/shaders/lib/lambert/lambert.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec3 vColor;\nvarying vec3 vLightFront;\n\nvoid main() {\n\n vColor = color;\n\n vec3 objectNormal = normal;\n vec3 transformedNormal = normalMatrix * objectNormal;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\n vLightFront = vec3( 0.0 );\n\n transformedNormal = normalize( transformedNormal );\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n\n vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\n\n gl_Position = projectionMatrix * mvPosition;\n}"},"./src/WebGL/shaders/lib/lambertdouble/lambertdouble.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 viewMatrix;\nuniform float opacity;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLightFront;\nvarying vec3 vLightBack;\n\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\n\n #ifndef WIREFRAME\n if ( gl_FrontFacing )\n gl_FragColor.xyz *= vLightFront;\n else\n gl_FragColor.xyz *= vLightBack;\n #endif\n\n gl_FragColor = gl_FragColor * vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n}\n\n\n"},"./src/WebGL/shaders/lib/lambertdouble/lambertdouble.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec3 vColor;\nvarying vec3 vLightFront;\nvarying vec3 vLightBack;\n\nvoid main() {\n\n vColor = color;\n\n vec3 objectNormal = normal;\n vec3 transformedNormal = normalMatrix * objectNormal;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\n vLightFront = vec3( 0.0 );\n vLightBack = vec3( 0.0 );\n\n transformedNormal = normalize( transformedNormal );\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n vec3 directionalLightWeightingBack = vec3( max( -dotProduct, 0.0 ) );\n\n vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\n vLightBack += directionalLightColor[ 0 ] * directionalLightWeightingBack;\n\n gl_Position = projectionMatrix * mvPosition;\n}\n\n"},"./src/WebGL/shaders/lib/outline/outline.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform float opacity;\nuniform vec3 outlineColor;\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n gl_FragColor = vec4( outlineColor, 1 );\n}\n\n\n"},"./src/WebGL/shaders/lib/outline/outline.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float outlineWidth;\nuniform float outlinePushback;\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvoid main() {\n\n vec4 norm = modelViewMatrix*vec4(normalize(normal),0.0);\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n mvPosition.xy += norm.xy*outlineWidth;\n gl_Position = projectionMatrix * mvPosition;\n mvPosition.z -= outlinePushback; //go backwards in model space\n vec4 pushpos = projectionMatrix*mvPosition; //project to get z in projection space, I'm probably missing some simple math to do the same thing..\n gl_Position.z = gl_Position.w*pushpos.z/pushpos.w;\n}\n\n"},"./src/WebGL/shaders/lib/screen/screen.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform sampler2D colormap;\nvarying highp vec2 vTexCoords;\nuniform vec2 dimensions;\n//DEFINEFRAGCOLOR\nvoid main (void) {\n gl_FragColor = texture2D(colormap, vTexCoords);\n}\n "},"./src/WebGL/shaders/lib/screen/screen.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="attribute vec2 vertexPosition;\nvarying highp vec2 vTexCoords;\nconst vec2 scale = vec2(0.5, 0.5);\n\nvoid main() {\n vTexCoords = vertexPosition * scale + scale; // scale vertex attribute to [0,1] range\n gl_Position = vec4(vertexPosition, 0.0, 1.0);\n}\n "},"./src/WebGL/shaders/lib/screenaa/screenaa.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform sampler2D colormap;\nvarying highp vec2 vTexCoords;\nuniform vec2 dimensions;\n\n// Basic FXAA implementation based on the code on geeks3d.com \n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#define FXAA_SPAN_MAX 8.0\n\nvec4 applyFXAA(vec2 fragCoord, sampler2D tex)\n{\n vec4 color;\n vec2 inverseVP = vec2(1.0 / dimensions.x, 1.0 / dimensions.y);\n vec3 rgbNW = texture2D(tex, fragCoord + vec2(-1.0, -1.0) * inverseVP).xyz;\n vec3 rgbNE = texture2D(tex, fragCoord + vec2(1.0, -1.0) * inverseVP).xyz;\n vec3 rgbSW = texture2D(tex, fragCoord + vec2(-1.0, 1.0) * inverseVP).xyz;\n vec3 rgbSE = texture2D(tex, fragCoord + vec2(1.0, 1.0) * inverseVP).xyz;\n vec3 rgbM = texture2D(tex, fragCoord * inverseVP).xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n\n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord + dir * -0.5).xyz +\n texture2D(tex, fragCoord + dir * 0.5).xyz);\n\n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, 1.0);\n else\n color = vec4(rgbB, 1.0);\n return color;\n}\n//DEFINEFRAGCOLOR\nvoid main (void) {\n gl_FragColor = applyFXAA(vTexCoords, colormap);\n}\n "},"./src/WebGL/shaders/lib/screenaa/screenaa.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="attribute vec2 vertexPosition;\nvarying highp vec2 vTexCoords;\nconst vec2 scale = vec2(0.5, 0.5);\n\nvoid main() {\n vTexCoords = vertexPosition * scale + scale; // scale vertex attribute to [0,1] range\n gl_Position = vec4(vertexPosition, 0.0, 1.0);\n}\n "},"./src/WebGL/shaders/lib/sphereimposter/sphereimposter.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\nuniform mat4 viewMatrix;\nuniform float opacity;\nuniform mat4 projectionMatrix;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\nuniform float uDepth;\nuniform vec3 directionalLightColor[ 1 ];\n\nvarying vec3 vColor;\nvarying vec2 mapping;\nvarying float rval;\nvarying vec3 vLight;\nvarying vec3 center;\n\n//DEFINEFRAGCOLOR\n\nvoid main() {\n float lensqr = dot(mapping,mapping);\n float rsqr = rval*rval;\n if(lensqr > rsqr)\n discard;\n float z = sqrt(rsqr-lensqr);\n vec3 cameraPos = center+ vec3(mapping.x,mapping.y,z);\n vec4 clipPos = projectionMatrix * vec4(cameraPos, 1.0);\n float ndcDepth = clipPos.z / clipPos.w;\n gl_FragDepthEXT = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n vec3 norm = normalize(vec3(mapping.x,mapping.y,z));\n float dotProduct = dot( norm, vLight );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n vec3 vLight = directionalLightColor[ 0 ] * directionalLightWeighting;\n gl_FragColor = vec4(vLight*vColor, opacity*opacity );\n float fogFactor = smoothstep( fogNear, fogFar, gl_FragDepthEXT/gl_FragCoord.w );\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n\n}\n\n"},"./src/WebGL/shaders/lib/sphereimposter/sphereimposter.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec2 mapping;\nvarying vec3 vColor;\nvarying float rval;\nvarying vec3 vLight;\nvarying vec3 center;\n\nvoid main() {\n\n vColor = color;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n center = mvPosition.xyz;\n vec4 projPosition = projectionMatrix * mvPosition;\n vec4 adjust = projectionMatrix* vec4(normal,0.0); adjust.z = 0.0; adjust.w = 0.0;\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vLight = normalize( lDirection.xyz );\n mapping = normal.xy;\n rval = abs(normal.x);\n gl_Position = projPosition+adjust;\n\n}\n"},"./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform float opacity;\nuniform vec3 outlineColor;\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\nuniform mat4 projectionMatrix;\nvarying vec2 mapping;\nvarying float rval;\nvarying vec3 center;\n\nuniform float outlinePushback;\n\n//DEFINEFRAGCOLOR\n\nvoid main() {\n float lensqr = dot(mapping,mapping);\n float rsqr = rval*rval;\n if(lensqr > rsqr)\n discard;\n float z = sqrt(rsqr-lensqr);\n vec3 cameraPos = center+ vec3(mapping.x,mapping.y,z-outlinePushback);\n vec4 clipPos = projectionMatrix * vec4(cameraPos, 1.0);\n float ndcDepth = clipPos.z / clipPos.w;\n gl_FragDepthEXT = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n gl_FragColor = vec4(outlineColor, 1 );\n}\n\n\n"},"./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float outlineWidth;\nuniform float outlinePushback;\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec2 mapping;\nvarying float rval;\nvarying vec3 center;\n\nvoid main() {\n\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n center = mvPosition.xyz;\n vec4 projPosition = projectionMatrix * mvPosition;\n vec2 norm = normal.xy + vec2(sign(normal.x)*outlineWidth,sign(normal.y)*outlineWidth);\n vec4 adjust = projectionMatrix* vec4(norm,normal.z,0.0); adjust.z = 0.0; adjust.w = 0.0;\n mapping = norm.xy;\n rval = abs(norm.x);\n gl_Position = projPosition+adjust;\n}\n\n"},"./src/WebGL/shaders/lib/sprite/sprite.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform vec3 color;\nuniform sampler2D map;\nuniform float opacity;\n\nuniform int fogType;\nuniform vec3 fogColor;\nuniform float fogDensity;\nuniform float fogNear;\nuniform float fogFar;\nuniform float alphaTest;\n\nvarying vec2 vUV;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n vec4 texture = texture2D(map, vUV);\n\n if (texture.a < alphaTest) discard;\n\n gl_FragColor = vec4(color * texture.xyz, texture.a * opacity);\n\n if (fogType > 0) {\n\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n float fogFactor = 0.0;\n\n if (fogType == 1) {\n fogFactor = smoothstep(fogNear, fogFar, depth);\n }\n\n else {\n const float LOG2 = 1.442695;\n float fogFactor = exp2(- fogDensity * fogDensity * depth * depth * LOG2);\n fogFactor = 1.0 - clamp(fogFactor, 0.0, 1.0);\n }\n\n gl_FragColor = mix(gl_FragColor, vec4(fogColor, gl_FragColor.w), fogFactor);\n\n }\n}\n\n"},"./src/WebGL/shaders/lib/sprite/sprite.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform int useScreenCoordinates;\nuniform vec3 screenPosition;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float rotation;\nuniform vec2 scale;\nuniform vec2 alignment;\nuniform vec2 uvOffset;\nuniform vec2 uvScale;\n\nattribute vec2 position;\nattribute vec2 uv;\n\nvarying vec2 vUV;\n\nvoid main() {\n\n vUV = uvOffset + uv * uvScale;\n\n vec2 alignedPosition = position + alignment;\n\n vec2 rotatedPosition;\n rotatedPosition.x = ( cos(rotation) * alignedPosition.x - sin(rotation) * alignedPosition.y ) * scale.x;\n rotatedPosition.y = ( sin(rotation) * alignedPosition.x + cos(rotation) * alignedPosition.y ) * scale.y;\n\n vec4 finalPosition;\n\n if(useScreenCoordinates != 0) {\n finalPosition = vec4(screenPosition.xy + rotatedPosition, screenPosition.z, 1.0);\n }\n\n else {\n finalPosition = projectionMatrix * modelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0); finalPosition /= finalPosition.w;\n finalPosition.xy += rotatedPosition; \n }\n\n gl_Position = finalPosition;\n\n}\n\n"},"./src/WebGL/shaders/lib/stickimposter/stickimposter.partial.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n=" float dotProduct = dot( norm, vLight );\n vec3 light = vec3( max( dotProduct, 0.0 ) );\n gl_FragColor = vec4(light*color, opacity*opacity );\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}"},"./src/WebGL/shaders/lib/stickimposter/stickimposter.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute float radius;\n\nvarying vec3 vColor;\nvarying vec3 vLight;\nvarying vec3 cposition;\nvarying vec3 p1;\nvarying vec3 p2;\nvarying float r;\n\nvoid main() {\n\n vColor = color; vColor.z = abs(vColor.z); //z indicates which vertex and so would vary\n r = abs(radius);\n vec4 to = modelViewMatrix*vec4(normal, 1.0); //normal is other point of cylinder\n vec4 pt = modelViewMatrix*vec4(position, 1.0);\n vec4 mvPosition = pt;\n p1 = pt.xyz; p2 = to.xyz;\n vec3 norm = to.xyz-pt.xyz;\n float mult = 1.1; //slop to account for perspective of sphere\n if(length(p1) > length(p2)) { //billboard at level of closest point\n mvPosition = to;\n }\n vec3 n = normalize(mvPosition.xyz);\n//intersect with the plane defined by the camera looking at the billboard point\n if(color.z >= 0.0) { //p1\n if(projectionMatrix[3][3] == 0.0) { //perspective\n vec3 pnorm = normalize(p1);\n float t = dot(mvPosition.xyz-p1,n)/dot(pnorm,n);\n mvPosition.xyz = p1+t*pnorm; \n } else { //orthographic\n mvPosition.xyz = p1;\n }\n } else {\n if(projectionMatrix[3][3] == 0.0) { //perspective\n vec3 pnorm = normalize(p2);\n float t = dot(mvPosition.xyz-p2,n)/dot(pnorm,n);\n mvPosition.xyz = p2+t*pnorm;\n } else { //orthographic\n mvPosition.xyz = p2;\n } \n mult *= -1.0;\n }\n vec3 cr = normalize(cross(mvPosition.xyz,norm))*radius;\n vec3 doublecr = normalize(cross(mvPosition.xyz,cr))*radius;\n mvPosition.xyz += mult*(cr + doublecr).xyz;\n cposition = mvPosition.xyz;\n gl_Position = projectionMatrix * mvPosition;\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vLight = normalize( lDirection.xyz )*directionalLightColor[0]; //not really sure this is right, but color is always white so..\n}\n\n"},"./src/WebGL/shaders/lib/stickimposteroutline/stickimposteroutline.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\nuniform vec3 outlineColor;\nuniform float outlineWidth;\nuniform float outlinePushback;\n\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute float radius;\n\nvarying vec3 vColor;\nvarying vec3 vLight;\nvarying vec3 cposition;\nvarying vec3 p1;\nvarying vec3 p2;\nvarying float r;\n\nvoid main() {\n\n vColor = outlineColor;\n float rad = radius+sign(radius)*outlineWidth;\n r = abs(rad);\n vec4 to = modelViewMatrix*vec4(normal, 1.0); //normal is other point of cylinder\n vec4 pt = modelViewMatrix*vec4(position, 1.0);\n//pushback\n to.xyz += normalize(to.xyz)*outlinePushback;\n pt.xyz += normalize(pt.xyz)*outlinePushback;\n\n vec4 mvPosition = pt;\n p1 = pt.xyz; p2 = to.xyz;\n vec3 norm = to.xyz-pt.xyz;\n float mult = 1.1; //slop to account for perspective of sphere\n if(length(p1) > length(p2)) { //billboard at level of closest point\n mvPosition = to;\n }\n vec3 n = normalize(mvPosition.xyz);\n//intersect with the plane defined by the camera looking at the billboard point\n if(color.z >= 0.0) { //p1\n vec3 pnorm = normalize(p1);\n float t = dot(mvPosition.xyz-p1,n)/dot(pnorm,n);\n mvPosition.xyz = p1+t*pnorm;\n } else {\n vec3 pnorm = normalize(p2);\n float t = dot(mvPosition.xyz-p2,n)/dot(pnorm,n);\n mvPosition.xyz = p2+t*pnorm;\n mult *= -1.0;\n }\n vec3 cr = normalize(cross(mvPosition.xyz,norm))*rad;\n vec3 doublecr = normalize(cross(mvPosition.xyz,cr))*rad;\n mvPosition.xy += mult*(cr + doublecr).xy;\n cposition = mvPosition.xyz;\n gl_Position = projectionMatrix * mvPosition;\n vLight = vec3(1.0,1.0,1.0);\n}\n\n"},"./src/WebGL/shaders/lib/volumetric/volumetric.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="\nuniform highp sampler3D data;\nuniform highp sampler2D colormap;\nuniform highp sampler2D depthmap;\n\n\nuniform mat4 textmat;\nuniform mat4 projinv;\nuniform mat4 projectionMatrix;\n\nuniform float step;\nuniform float subsamples;\nuniform float maxdepth;\nuniform float transfermin;\nuniform float transfermax;\nin vec4 mvPosition;\nout vec4 color;\nvoid main(void) {\n\n vec4 pos = mvPosition;\n bool seengood = false;\n float i = 0.0;\n color = vec4(1,1,1,0);\n float increment = 1.0/subsamples;\n float maxsteps = (maxdepth*subsamples/step);\n//there's probably a better way to do this..\n//calculate farthest possible point in model coordinates\n vec4 maxpos = vec4(pos.x,pos.y,pos.z-maxdepth,1.0);\n// convert to projection\n maxpos = projectionMatrix*maxpos;\n vec4 startp = projectionMatrix*pos;\n// homogonize\n maxpos /= maxpos.w;\n startp /= startp.w;\n//take x,y from start and z from max\n maxpos = vec4(startp.x,startp.y,maxpos.z,1.0);\n//convert back to model space\n maxpos = projinv*maxpos;\n maxpos /= maxpos.w;\n float incr = step/subsamples;\n//get depth from depthmap\n//startp is apparently [-1,1]\n vec2 tpos = startp.xy/2.0+0.5;\n float depth = texture(depthmap, tpos).r;\n//compute vector between start and end\n vec4 direction = maxpos-pos;\n for( i = 0.0; i <= maxsteps; i++) {\n vec4 pt = (pos+(i/maxsteps)*direction);\n vec4 ppt = projectionMatrix*pt;\n float ptdepth = ppt.z/ppt.w;\n ptdepth = ((gl_DepthRange.diff * ptdepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n if(ptdepth > depth) break;\n pt = textmat*pt;\n// pt /= pt.w;\n if(pt.x >= -0.01 && pt.y >= -0.01 && pt.z >= -0.01 && pt.x <= 1.01 && pt.y <= 1.01 && pt.z <= 1.01) {\n seengood = true;\n } else if(seengood) {\n break;\n }\n if( pt.x < -0.01 || pt.x > 1.01 || pt.y < -0.01 || pt.y > 1.01 || pt.z < -0.01 || pt.z > 1.01 ){\n color.a = 0.0;\n continue;\n }\n else {\n float val = texture(data, pt.zyx).r;\n if(isinf(val)) continue; //masked out\n float cval = (val-transfermin)/(transfermax-transfermin); //scale to texture 0-1 range\n vec4 val_color = texture(colormap, vec2(cval,0.5));\n color.rgb = color.rgb*color.a + (1.0-color.a)*val_color.a*val_color.rgb;\n color.a += (1.0 - color.a) * val_color.a; \n if(color.a > 0.0) color.rgb /= color.a;\n// color = vec4(pt.x, pt.y, pt.z, 1.0);\n }\n// color = vec4(pt.x, pt.y, pt.z, 0.0)\n }\n}\n\n "},"./src/WebGL/shaders/lib/volumetric/volumetric.vert":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\n\nin vec3 position;\nout vec4 mvPosition;\nvoid main() {\n\n mvPosition = modelViewMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix*mvPosition;\n}\n"},"./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n});const n="uniform float opacity;\nuniform mat4 projectionMatrix;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLight;\nvarying vec3 vColor;\nvarying vec3 cposition;\nvarying vec3 p1;\nvarying vec3 p2;\nvarying float r;\n\n//DEFINEFRAGCOLOR\n\n//cylinder-ray intersection testing taken from http://mrl.nyu.edu/~dzorin/cg05/lecture12.pdf\n//also useful: http://stackoverflow.com/questions/9595300/cylinder-impostor-in-glsl\n//with a bit more care (caps) this could be a general cylinder imposter (see also outline)\nvoid main() {\n vec3 color = abs(vColor);\n vec3 pos = cposition;\n vec3 p = pos; //ray point\n vec3 v = vec3(0.0,0.0,-1.0); //ray normal - orthographic\n if(projectionMatrix[3][3] == 0.0) v = normalize(pos); //ray normal - perspective\n vec3 pa = p1; //cyl start\n vec3 va = normalize(p2-p1); //cyl norm\n vec3 tmp1 = v-(dot(v,va)*va);\n vec3 deltap = p-pa;\n float A = dot(tmp1,tmp1);\n if(A == 0.0) discard;\n vec3 tmp2 = deltap-(dot(deltap,va)*va);\n float B = 2.0*dot(tmp1, tmp2);\n float C = dot(tmp2,tmp2)-r*r;\n//quadratic equation!\n float det = (B*B) - (4.0*A*C);\n if(det < 0.0) discard;\n float sqrtDet = sqrt(det);\n float posT = (-B+sqrtDet)/(2.0*A);\n float negT = (-B-sqrtDet)/(2.0*A);\n float intersectionT = min(posT,negT);\n vec3 qi = p+v*intersectionT;\n float dotp1 = dot(va,qi-p1);\n float dotp2 = dot(va,qi-p2);\n vec3 norm;\n if( dotp1 < 0.0 || dotp2 > 0.0) { //(p-c)^2 + 2(p-c)vt +v^2+t^2 - r^2 = 0\n vec3 cp;\n if( dotp1 < 0.0) { \n// if(vColor.x < 0.0 ) discard; //color sign bit indicates if we should cap or not\n cp = p1;\n } else {\n// if(vColor.y < 0.0 ) discard;\n cp = p2;\n }\n vec3 diff = p-cp;\n A = dot(v,v);\n B = dot(diff,v)*2.0;\n C = dot(diff,diff)-r*r;\n det = (B*B) - (4.0*C);\n if(det < 0.0) discard;\n sqrtDet = sqrt(det);\n posT = (-B+sqrtDet)/(2.0);\n negT = (-B-sqrtDet)/(2.0);\n float t = min(posT,negT);\n qi = p+v*t; \n norm = normalize(qi-cp); \n } else {\n norm = normalize(qi-(dotp1*va + p1));\n }\n vec4 clipPos = projectionMatrix * vec4(qi, 1.0);\n float ndcDepth = clipPos.z / clipPos.w;\n float depth = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n gl_FragDepthEXT = depth;"},"./src/GLDraw.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{CAP:()=>n,GLDraw:()=>i});var n,i,o=r("./src/WebGL/math/index.ts");!function(t){t[t.NONE=0]="NONE",t[t.FLAT=1]="FLAT",t[t.ROUND=2]="ROUND"}(n||(n={})),function(t){function e(t,e,r){var n,i,o,a,s,l=Math.hypot(t,e);l<1e-4?(i=0,o=1):(i=-t/l,o=e/l),e=-i*t+o*e,(n=Math.hypot(e,r))<1e-4?(a=0,s=1):(a=r/n,s=e/n);var c=new Float32Array(9);return c[0]=o,c[1]=i,c[2]=0,c[3]=-i*s,c[4]=o*s,c[5]=a,c[6]=i*a,c[7]=-o*a,c[8]=s,c}var r=new class{constructor(){this.cache={};let t,e=[],r=Math.pow(2,4),n=2,i=Math.pow(2,n),a=r/i;for(e[0]=new o.Vector3(-1,0,0),e[a]=new o.Vector3(0,0,1),e[2*a]=new o.Vector3(1,0,0),e[3*a]=new o.Vector3(0,0,-1),n=3;n<=4;n++){for(i=Math.pow(2,n-1),a=r/i,t=0;t{"use strict";r.r(e),r.d(e,{GLModel:()=>g});var n=r("./src/WebGL/index.ts"),i=r("./src/WebGL/shapes/index.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/colors.ts"),s=r("./src/GLDraw.ts"),l=r("./src/glcartoon.ts"),c=r("./src/utilities.ts"),u=r("./src/Gradient.ts"),h=r("./src/parsers/index.ts"),d=r("./node_modules/netcdfjs/lib-esm/index.js"),f=r("./node_modules/pako/dist/pako.esm.mjs"),p=r("./src/parsers/utils/assignBonds.ts");function m(t){let e;return e="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t),(0,f.inflate)(e,{to:"string"})}class g{static sameObj(t,e){return t&&e?JSON.stringify(t)==JSON.stringify(e):t==e}constructor(t,e){this.atoms=[],this.frames=[],this.box=null,this.atomdfs=null,this.id=0,this.hidden=!1,this.molObj=null,this.renderedMolObj=null,this.lastColors=null,this.modelData={},this.modelDatas=null,this.idMatrix=new o.Matrix4,this.dontDuplicateAtoms=!0,this.defaultColor=a.elementColors.defaultColor,this.defaultStickRadius=.25,this.options=e||{},this.ElementColors=this.options.defaultcolors?this.options.defaultcolors:a.elementColors.defaultColors,this.defaultSphereRadius=this.options.defaultSphereRadius?this.options.defaultSphereRadius:1.5,this.defaultCartoonQuality=this.options.cartoonQuality?this.options.cartoonQuality:10,this.id=t}getRadiusFromStyle(t,e){var r=this.defaultSphereRadius;if(void 0!==e.radius)r=e.radius;else if(g.vdwRadii[t.elem])r=g.vdwRadii[t.elem];else if(t.elem.length>1){let e=t.elem;e=e[0].toUpperCase()+e[1].toLowerCase(),g.vdwRadii[e]&&(r=g.vdwRadii[e])}return void 0!==e.scale&&(r*=e.scale),r}drawAtomCross(t,e){if(t.style.cross){var r=t.style.cross;if(!r.hidden){var i=r.linewidth||g.defaultlineWidth;e[i]||(e[i]=new n.Geometry);var a=e[i].updateGeoGroup(6),s=this.getRadiusFromStyle(t,r),l=[[s,0,0],[-s,0,0],[0,s,0],[0,-s,0],[0,0,s],[0,0,-s]],u=t.clickable||t.hoverable;u&&void 0===t.intersectionShape&&(t.intersectionShape={sphere:[],cylinder:[],line:[]});for(var h=(0,c.getColorFromStyle)(t,r),d=a.vertexArray,f=a.colorArray,p=0;p<6;p++){var m=3*a.vertices;if(a.vertices++,d[m]=t.x+l[p][0],d[m+1]=t.y+l[p][1],d[m+2]=t.z+l[p][2],f[m]=h.r,f[m+1]=h.g,f[m+2]=h.b,u){var v=new o.Vector3(l[p][0],l[p][1],l[p][2]);v.multiplyScalar(.1),v.set(v.x+t.x,v.y+t.y,v.z+t.z),t.intersectionShape.line.push(v)}}}}}getGoodCross(t,e,r,n){for(var i=null,a=-1,s=0,l=t.bonds.length;sa&&(i=h,(a=c)>.1))return i}return i}getSideBondV(t,e,r){var n,i,a,s,l=new o.Vector3(t.x,t.y,t.z),c=new o.Vector3(e.x,e.y,e.z).clone(),u=null;if(c.sub(l),1===t.bonds.length)1===e.bonds.length?(u=c.clone(),Math.abs(u.x)>1e-4?u.y+=1:u.x+=1):(n=(r+1)%e.bonds.length,i=e.bonds[n],(a=this.atoms[i]).index==t.index&&(n=(n+1)%e.bonds.length,i=e.bonds[n],a=this.atoms[i]),(s=new o.Vector3(a.x,a.y,a.z).clone()).sub(l),(u=s.clone()).cross(c));else if((u=this.getGoodCross(t,e,l,c)).lengthSq()<.01){var h=this.getGoodCross(e,t,l,c);null!=h&&(u=h)}return u.lengthSq()<.01&&(u=c.clone(),Math.abs(u.x)>1e-4?u.y+=1:u.x+=1),u.cross(c),u.normalize(),u}addLine(t,e,r,n,i,o){t[r]=n.x,t[r+1]=n.y,t[r+2]=n.z,e[r]=o.r,e[r+1]=o.g,e[r+2]=o.b,t[r+3]=i.x,t[r+4]=i.y,t[r+5]=i.z,e[r+3]=o.r,e[r+4]=o.g,e[r+5]=o.b}drawBondLines(t,e,r){if(t.style.line){var i=t.style.line;if(!i.hidden){var s,l,u,h,d=i.linewidth||g.defaultlineWidth;r[d]||(r[d]=new n.Geometry);for(var f=r[d].updateGeoGroup(6*t.bonds.length),p=f.vertexArray,m=f.colorArray,v=0;v=b.index)){var y=new o.Vector3(t.x,t.y,t.z),x=new o.Vector3(b.x,b.y,b.z),_=y.clone().add(x).multiplyScalar(.5),w=!1,k=t.clickable||t.hoverable,A=b.clickable||b.hoverable;(k||A)&&(k&&(void 0===t.intersectionShape&&(t.intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]}),t.intersectionShape.line.push(y),t.intersectionShape.line.push(_)),A&&(void 0===b.intersectionShape&&(b.intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]}),b.intersectionShape.line.push(_),b.intersectionShape.line.push(x)));var M=(0,c.getColorFromStyle)(t,t.style.line),T=(0,c.getColorFromStyle)(b,b.style.line);if(t.bondStyles&&t.bondStyles[v]){var S=t.bondStyles[v];if(!S.iswire)continue;S.singleBond&&(w=!0),void 0!==S.color1&&(M=a.CC.color(S.color1)),void 0!==S.color2&&(T=a.CC.color(S.color2))}var C,E,L=3*f.vertices;if(t.bondOrder[v]>1&&t.bondOrder[v]<4&&!w){var z=this.getSideBondV(t,b,v),O=x.clone();O.sub(y),2==t.bondOrder[v]?(z.multiplyScalar(.1),(s=y.clone()).add(z),(l=y.clone()).sub(z),(u=s.clone()).add(O),(h=l.clone()).add(O),M==T?(f.vertices+=4,this.addLine(p,m,L,s,u,M),this.addLine(p,m,L+6,l,h,M)):(f.vertices+=8,O.multiplyScalar(.5),(C=s.clone()).add(O),(E=l.clone()).add(O),this.addLine(p,m,L,s,C,M),this.addLine(p,m,L+6,C,u,T),this.addLine(p,m,L+12,l,E,M),this.addLine(p,m,L+18,E,h,T))):3==t.bondOrder[v]&&(z.multiplyScalar(.1),(s=y.clone()).add(z),(l=y.clone()).sub(z),(u=s.clone()).add(O),(h=l.clone()).add(O),M==T?(f.vertices+=6,this.addLine(p,m,L,y,x,M),this.addLine(p,m,L+6,s,u,M),this.addLine(p,m,L+12,l,h,M)):(f.vertices+=12,O.multiplyScalar(.5),(C=s.clone()).add(O),(E=l.clone()).add(O),this.addLine(p,m,L,y,_,M),this.addLine(p,m,L+6,_,x,T),this.addLine(p,m,L+12,s,C,M),this.addLine(p,m,L+18,C,u,T),this.addLine(p,m,L+24,l,E,M),this.addLine(p,m,L+30,E,h,T)))}else M==T?(f.vertices+=2,this.addLine(p,m,L,y,x,M)):(f.vertices+=4,this.addLine(p,m,L,y,_,M),this.addLine(p,m,L+6,_,x,T))}}}}}drawAtomSphere(t,e){if(t.style.sphere){var r=t.style.sphere;if(!r.hidden){var n=(0,c.getColorFromStyle)(t,r),a=this.getRadiusFromStyle(t,r);if((!0===t.clickable||t.hoverable)&&void 0!==t.intersectionShape){var l=new o.Vector3(t.x,t.y,t.z);t.intersectionShape.sphere.push(new i.Sphere(l,a))}s.GLDraw.drawSphere(e,t,a,n)}}}drawAtomClickSphere(t){if(t.style.clicksphere){var e=t.style.clicksphere;if(!e.hidden){var r=this.getRadiusFromStyle(t,e);if((!0===t.clickable||t.hoverable)&&void 0!==t.intersectionShape){var n=new o.Vector3(t.x,t.y,t.z);t.intersectionShape.sphere.push(new i.Sphere(n,r))}}}}drawAtomInstanced(t,e){if(t.style.sphere){var r=t.style.sphere;if(!r.hidden){var n=this.getRadiusFromStyle(t,r),a=(0,c.getColorFromStyle)(t,r),s=e.updateGeoGroup(1),l=s.vertices,u=3*l,h=s.vertexArray,d=s.colorArray,f=s.radiusArray;if(h[u]=t.x,h[u+1]=t.y,h[u+2]=t.z,d[u]=a.r,d[u+1]=a.g,d[u+2]=a.b,f[l]=n,(!0===t.clickable||t.hoverable)&&void 0!==t.intersectionShape){var p=new o.Vector3(t.x,t.y,t.z);t.intersectionShape.sphere.push(new i.Sphere(p,n))}s.vertices+=1}}}drawSphereImposter(t,e,r,n){var i,o=t.updateGeoGroup(4),a=o.vertices,s=3*a,l=o.vertexArray,c=o.colorArray;for(i=0;i<4;i++)l[s+3*i]=e.x,l[s+3*i+1]=e.y,l[s+3*i+2]=e.z;var u=o.normalArray;for(i=0;i<4;i++)c[s+3*i]=n.r,c[s+3*i+1]=n.g,c[s+3*i+2]=n.b;u[s+0]=-r,u[s+1]=r,u[s+2]=0,u[s+3]=-r,u[s+4]=-r,u[s+5]=0,u[s+6]=r,u[s+7]=-r,u[s+8]=0,u[s+9]=r,u[s+10]=r,u[s+11]=0,o.vertices+=4;var h=o.faceArray,d=o.faceidx;h[d+0]=a,h[d+1]=a+1,h[d+2]=a+2,h[d+3]=a+2,h[d+4]=a+3,h[d+5]=a,o.faceidx+=6}drawAtomImposter(t,e){if(t.style.sphere){var r=t.style.sphere;if(!r.hidden){var n=this.getRadiusFromStyle(t,r),a=(0,c.getColorFromStyle)(t,r);if((!0===t.clickable||t.hoverable)&&void 0!==t.intersectionShape){var s=new o.Vector3(t.x,t.y,t.z);t.intersectionShape.sphere.push(new i.Sphere(s,n))}this.drawSphereImposter(e,t,n,a)}}}calculateDashes(t,e,r,n,i){var a=Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)+Math.pow(t.z-e.z,2));r=Math.max(r,0),i=Math.max(i,0)+2*r,(n=Math.max(n,.001))+i>a&&(n=a,i=0);var s,l=Math.floor((a-n)/(n+i))+1;i=(a-l*n)/l;for(var c=new o.Vector3(t.x,t.y,t.z),u=new o.Vector3((e.x-t.x)/(a/i),(e.y-t.y)/(a/i),(e.z-t.z)/(a/i)),h=new o.Vector3((e.x-t.x)/(a/n),(e.y-t.y)/(a/n),(e.z-t.z)/(a/n)),d=[],f=0;f{var e=r.imposter?g.drawStickImposter:s.GLDraw.drawCylinder;return!D&&t>=1?e:(t,r,n,i,o,a=0,s=0,l=.1,c=.25)=>{this.calculateDashes(r,n,i,l,c).forEach((r=>{e(t,r.from,r.to,i,o,a,s)}))}};for(f=0;f3){if(t.bondOrder[f]<1&&(z*=t.bondOrder[f]),!j.capDrawn&&j.bonds.length<4&&(R=2),F!=U?(k=(new o.Vector3).addVectors(G,V).multiplyScalar(.5),N(r,G,k,z,F,I,0,E,L),N(r,k,V,z,U,0,R,E,L)):N(r,G,V,z,F,I,R,E,L),h=t.clickable||t.hoverable,d=j.clickable||j.hoverable,h||d){if(k||(k=(new o.Vector3).addVectors(G,V).multiplyScalar(.5)),h){var H=new i.Cylinder(G,k,z),W=new i.Sphere(G,z);t.intersectionShape.cylinder.push(H),t.intersectionShape.sphere.push(W)}if(d){var q=new i.Cylinder(V,k,z),Y=new i.Sphere(V,z);j.intersectionShape.cylinder.push(q),j.intersectionShape.sphere.push(Y)}}}else if(t.bondOrder[f]>1){var Z=0,X=0;z!=T&&(Z=2,X=2);var $,J,K,Q,tt,et=V.clone(),rt=null;et.sub(G),rt=this.getSideBondV(t,j,f),2==t.bondOrder[f]?($=z*S,rt.multiplyScalar(1.5*$),(J=G.clone()).add(rt),(K=G.clone()).sub(rt),(Q=J.clone()).add(et),(tt=K.clone()).add(et),F!=U?(k=(new o.Vector3).addVectors(J,Q).multiplyScalar(.5),A=(new o.Vector3).addVectors(K,tt).multiplyScalar(.5),N(r,J,k,$,F,Z,0),N(r,k,Q,$,U,0,X),N(r,K,A,$,F,Z,0),N(r,A,tt,$,U,0,X)):(N(r,J,Q,$,F,Z,X),N(r,K,tt,$,F,Z,X)),h=t.clickable||t.hoverable,d=j.clickable||j.hoverable,(h||d)&&(k||(k=(new o.Vector3).addVectors(J,Q).multiplyScalar(.5)),A||(A=(new o.Vector3).addVectors(K,tt).multiplyScalar(.5)),h&&(v=new i.Cylinder(J,k,$),b=new i.Cylinder(K,A,$),t.intersectionShape.cylinder.push(v),t.intersectionShape.cylinder.push(b)),d&&(x=new i.Cylinder(Q,k,$),_=new i.Cylinder(tt,A,$),j.intersectionShape.cylinder.push(x),j.intersectionShape.cylinder.push(_)))):3==t.bondOrder[f]&&($=z*C,rt.cross(et),rt.normalize(),rt.multiplyScalar(3*$),(J=G.clone()).add(rt),(K=G.clone()).sub(rt),(Q=J.clone()).add(et),(tt=K.clone()).add(et),F!=U?(k=(new o.Vector3).addVectors(J,Q).multiplyScalar(.5),A=(new o.Vector3).addVectors(K,tt).multiplyScalar(.5),M=(new o.Vector3).addVectors(G,V).multiplyScalar(.5),N(r,J,k,$,F,Z,0),N(r,k,Q,$,U,0,X),N(r,G,M,$,F,I,0),N(r,M,V,$,U,0,R),N(r,K,A,$,F,Z,0),N(r,A,tt,$,U,0,X)):(N(r,J,Q,$,F,Z,X),N(r,G,V,$,F,I,R),N(r,K,tt,$,F,Z,X)),h=t.clickable||t.hoverable,d=j.clickable||j.hoverable,(h||d)&&(k||(k=(new o.Vector3).addVectors(J,Q).multiplyScalar(.5)),A||(A=(new o.Vector3).addVectors(K,tt).multiplyScalar(.5)),M||(M=(new o.Vector3).addVectors(G,V).multiplyScalar(.5)),h&&(v=new i.Cylinder(J.clone(),k.clone(),$),b=new i.Cylinder(K.clone(),A.clone(),$),y=new i.Cylinder(G.clone(),M.clone(),$),t.intersectionShape.cylinder.push(v),t.intersectionShape.cylinder.push(b),t.intersectionShape.cylinder.push(y)),d&&(x=new i.Cylinder(Q.clone(),k.clone(),$),_=new i.Cylinder(tt.clone(),A.clone(),$),w=new i.Cylinder(V.clone(),M.clone(),$),j.intersectionShape.cylinder.push(x),j.intersectionShape.cylinder.push(_),j.intersectionShape.cylinder.push(w))))}}}var nt=!1,it=0,ot=!1;for(f=0;f0&&(nt=!0):0==it&&(t.bonds.length>0||u.showNonBonded)&&(nt=!0),nt&&(z=T,r.imposter?this.drawSphereImposter(r.sphereGeometry,t,z,F):s.GLDraw.drawSphere(r,t,z,F))}}}createMolObj(t,e){e=e||{};var r,i,o,c,u=new n.Object3D,h=[],d={},f={},p=this.drawAtomSphere,m=null,g=null;e.supportsImposters?(p=this.drawAtomImposter,(m=new n.Geometry(!0)).imposter=!0,(g=new n.Geometry(!0,!0)).imposter=!0,g.sphereGeometry=new n.Geometry(!0),g.sphereGeometry.imposter=!0,g.drawnCaps={}):e.supportsAIA?(p=this.drawAtomInstanced,(m=new n.Geometry(!1,!0,!0)).instanced=!0,g=new n.Geometry(!0)):(m=new n.Geometry(!0),g=new n.Geometry(!0));var v,b={},y=[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(r=0,o=t.length;ry[1]&&(y[1]=x.resi)),h.push(x))}}if(h.length>0&&(0,l.drawCartoon)(u,h,y,this.defaultCartoonQuality),m&&m.vertices>0){m.initTypedArrays();var _=null,w=null;m.imposter?_=new n.SphereImposterMaterial({ambient:0,vertexColors:!0,reflectivity:0}):m.instanced?(w=new n.Geometry(!0),s.GLDraw.drawSphere(w,{x:0,y:0,z:0},1,new a.Color(.5,.5,.5)),w.initTypedArrays(),_=new n.InstancedMaterial({sphereMaterial:new n.MeshLambertMaterial({ambient:0,vertexColors:!0,reflectivity:0}),sphere:w})):_=new n.MeshLambertMaterial({ambient:0,vertexColors:!0,reflectivity:0}),b.sphere<1&&b.sphere>=0&&(_.transparent=!0,_.opacity=b.sphere),w=new n.Mesh(m,_),u.add(w)}if(g.vertices>0){var k=null,A=null,M=g.sphereGeometry;M&&void 0!==M.vertices&&0!=M.vertices||(M=null),g.initTypedArrays(),M&&M.initTypedArrays();var T={ambient:0,vertexColors:!0,reflectivity:0};g.imposter?(k=new n.StickImposterMaterial(T),A=new n.SphereImposterMaterial(T)):(k=new n.MeshLambertMaterial(T),A=new n.MeshLambertMaterial(T),k.wireframe&&(g.setUpWireframe(),M&&M.setUpWireframe())),b.stick<1&&b.stick>=0&&(k.transparent=!0,k.opacity=b.stick,A.transparent=!0,A.opacity=b.stick);var S=new n.Mesh(g,k);if(u.add(S),M){var C=new n.Mesh(M,A);u.add(C)}}for(r in d)if(d.hasOwnProperty(r)){v=r;var E=new n.LineBasicMaterial({linewidth:v,vertexColors:!0});b.line<1&&b.line>=0&&(E.transparent=!0,E.opacity=b.line),d[r].initTypedArrays();var L=new n.Line(d[r],E,n.LineStyle.LinePieces);u.add(L)}for(r in f)if(f.hasOwnProperty(r)){v=r;var z=new n.LineBasicMaterial({linewidth:v,vertexColors:!0});b.cross<1&&b.cross>=0&&(z.transparent=!0,z.opacity=b.cross),f[r].initTypedArrays();var O=new n.Line(f[r],z,n.LineStyle.LinePieces);u.add(O)}if(this.dontDuplicateAtoms&&this.modelData.symmetries&&this.modelData.symmetries.length>0){var D,I=new n.Object3D;for(D=0;Dr?e-n:e}adjustCoordinatesToBox(){if(this.box&&this.atomdfs)for(var t=this.box[0],e=this.box[1],r=this.box[2],n=.9*t,i=.9*e,o=.9*r,a=0;a=r)&&(t=r-1),null!=n.frames.url){var a=n.frames.url;(0,c.getbin)(a+"/traj/frame/"+t+"/"+n.frames.path,void 0,"POST",void 0).then((function(t){for(var e=new Float32Array(t,44),r=0,o=0;o=n&&t<=i)return!0}}return!1}static deepCopyAndCache(t,e){if("object"!=typeof t||null==t)return t;if(t.__cache_created)return t;const r={};for(const n in t){const i=t[n];if(Array.isArray(i)){r[n]=[];for(let t=0;t=n[0][0]&&a<=n[1][0]&&s>=n[0][1]&&s<=n[1][1]&&l>=n[0][2]&&l<=n[1][2]&&(a>=r[0][0]&&a<=r[1][0]&&s>=r[0][1]&&s<=r[1][1]&&l>=r[0][2]&&l<=r[1][2]||o.push(this.atoms[t]))}return o}static getFloat(t){return"number"==typeof t?t:parseFloat(t)}selectedAtoms(t,e){var r=[];t=g.deepCopyAndCache(t||{},this),e||(e=this.atoms);for(var n=e.length,i=0;i0&&r.push(n[t])}}if(t.hasOwnProperty("within")&&t.within.hasOwnProperty("sel")&&t.within.hasOwnProperty("distance")){var s=this.selectedAtoms(t.within.sel,this.atoms),l={};const e=g.getFloat(t.within.distance),n=e*e;for(let t=0;t0&&(l[e]=1)}var c=[];if(t.within.invert)for(let t=0;t0;)if(e=d.pop(),f=e.chain,p=e.resi,void 0===h[e.index]){h[e.index]=!0;for(var m=0;m0&&(this.molObj=null)}else console.log("Callback is not a function")}setHoverable(t,e,r,n){if(e=!!e,r=(0,c.makeFunction)(r),n=(0,c.makeFunction)(n),null!==r)if(null!==n){var i=this.selectedAtoms(t,this.atoms),o=i.length;for(let t=0;t0&&(this.molObj=null)}else console.log("Unhover_callback is not a function");else console.log("Hover_callback is not a function")}enableContextMenu(t,e){var r;e=!!e;var n=this.selectedAtoms(t,this.atoms),i=n.length;for(r=0;r0&&(this.molObj=null)}setColorByElement(t,e){if(null===this.molObj||!g.sameObj(e,this.lastColors)){this.lastColors=e;var r=this.selectedAtoms(t,r);r.length>0&&(this.molObj=null);for(var n=0;n0&&(this.molObj=null),"string"==typeof r&&void 0!==u.Gradient.builtinGradients[r]&&(r=new u.Gradient.builtinGradients[r]),n||(n=r.range()),n||(n=(0,c.getPropertyRange)(a,e)),i=0;i0&&(this.molObj=null);for(let t=0;t=i)continue;let a={b:r,e:i},s=o.bondOrder[t];1!=s&&(a.o=s),e.b.push(a)}}return e}globj(t,e){(null===this.molObj||e.regen)&&(this.molObj=this.createMolObj(this.atoms,e),this.renderedMolObj&&(t.remove(this.renderedMolObj),this.renderedMolObj=null),this.renderedMolObj=this.molObj.clone(),this.hidden&&(this.renderedMolObj.setVisible(!1),this.molObj.setVisible(!1)),t.add(this.renderedMolObj))}exportVRML(){return this.createMolObj(this.atoms,{supportsImposters:!1,supportsAIA:!1}).vrml()}removegl(t){this.renderedMolObj&&(void 0!==this.renderedMolObj.geometry&&this.renderedMolObj.geometry.dispose(),void 0!==this.renderedMolObj.material&&this.renderedMolObj.material.dispose(),t.remove(this.renderedMolObj),this.renderedMolObj=null),this.molObj=null}hide(){this.hidden=!0,this.renderedMolObj&&this.renderedMolObj.setVisible(!1),this.molObj&&this.molObj.setVisible(!1)}show(){this.hidden=!1,this.renderedMolObj&&this.renderedMolObj.setVisible(!0),this.molObj&&this.molObj.setVisible(!0)}addPropertyLabels(t,e,r,n){for(var i=this.selectedAtoms(e,i),o=(0,c.deepCopy)(n),a=0;aMOLECULE/gm)?"mol2":t.match(/^data_/gm)&&t.match(/^loop_/gm)?"cif":t.match(/^HETATM/gm)||t.match(/^ATOM/gm)?"pdb":t.match(/ITEM: TIMESTEP/gm)?"lammpstrj":t.match(/^.*\n.*\n.\s*(\d+)\s+(\d+)/gm)?"sdf":t.match(/^%VERSION\s+VERSION_STAMP/gm)?"prmtop":"xyz",console.log("Best guess: "+e))),(0,h.Parsers[e])(t,r)}}g.defaultAtomStyle={line:{}},g.defaultlineWidth=1,g.vdwRadii={H:1.2,He:1.4,Li:1.82,Be:1.53,B:1.92,C:1.7,N:1.55,O:1.52,F:1.47,Ne:1.54,Na:2.27,Mg:1.73,Al:1.84,Si:2.1,P:1.8,S:1.8,Cl:1.75,Ar:1.88,K:2.75,Ca:2.31,Ni:1.63,Cu:1.4,Zn:1.39,Ga:1.87,Ge:2.11,As:1.85,Se:1.9,Br:1.85,Kr:2.02,Rb:3.03,Sr:2.49,Pd:1.63,Ag:1.72,Cd:1.58,In:1.93,Sn:2.17,Sb:2.06,Te:2.06,I:1.98,Xe:2.16,Cs:3.43,Ba:2.68,Pt:1.75,Au:1.66,Hg:1.55,Tl:1.96,Pb:2.02,Bi:2.07,Po:1.97,At:2.02,Rn:2.2,Fr:3.48,Ra:2.83,U:1.86},g.ignoredKeys=new Set(["props","invert","model","frame","byres","expand","within","and","or","not"])},"./src/GLShape.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{GLShape:()=>d,splitMesh:()=>f});var n=r("./src/WebGL/index.ts"),i=r("./src/WebGL/shapes/index.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/colors.ts"),s=r("./src/ProteinSurface4.ts"),l=r("./src/VolumeData.ts"),c=r("./src/GLDraw.ts"),u=r("./src/glcartoon.ts"),h=r("./src/utilities.ts");class d{static finalizeGeo(t){var e=t.updateGeoGroup(0);e.vertices>0&&e.truncateArrayBuffers(!0,!0)}static updateColor(t,e){var r,n,i;e=e||a.CC.color(e),t.colorsNeedUpdate=!0,e.constructor!==Array&&(r=e.r,n=e.g,i=e.b);for(let o in t.geometryGroups){let a=t.geometryGroups[o],s=a.colorArray;for(let t=0,o=a.vertices;t0?u/t:(t+u)/t}d.multiplyScalar(c);var f=new o.Vector3(n.x,n.y,n.z).add(d),p=d.clone().negate();let m=new o.Vector3(n.x,n.y,n.z);t.intersectionShape.cylinder.push(new i.Cylinder(m,f.clone(),s)),t.intersectionShape.sphere.push(new i.Sphere(m,s));var g=[];g[0]=d.clone(),Math.abs(g[0].x)>1e-4?g[0].y+=1:g[0].x+=1,g[0].cross(d),g[0].normalize(),g[4]=g[0].clone(),g[4].crossVectors(g[0],d),g[4].normalize(),g[8]=g[0].clone().negate(),g[12]=g[4].clone().negate(),g[2]=g[0].clone().add(g[4]).normalize(),g[6]=g[4].clone().add(g[8]).normalize(),g[10]=g[8].clone().add(g[12]).normalize(),g[14]=g[12].clone().add(g[0]).normalize(),g[1]=g[0].clone().add(g[2]).normalize(),g[3]=g[2].clone().add(g[4]).normalize(),g[5]=g[4].clone().add(g[6]).normalize(),g[7]=g[6].clone().add(g[8]).normalize(),g[9]=g[8].clone().add(g[10]).normalize(),g[11]=g[10].clone().add(g[12]).normalize(),g[13]=g[12].clone().add(g[14]).normalize(),g[15]=g[14].clone().add(g[0]).normalize();var v,b,y,x,_,w,k,A,M,T,S,C,E,L,z,O,D,I,R,F,P,N,j=h.vertices,B=h.vertexArray,U=h.faceArray,G=h.normalArray,V=h.lineArray;for(b=0,y=g.length;b0){var Y=B[v-3],Z=B[v-2],X=B[v-1],$=new o.Vector3(Y,Z,X),J=new o.Vector3(a.x,a.y,a.z),K=f.clone(),Q=new o.Vector3(q.x,q.y,q.z);t.intersectionShape.triangle.push(new i.Triangle(Q,J,$)),t.intersectionShape.triangle.push(new i.Triangle($.clone(),K,Q.clone()))}}h.vertices+=48,B[v=3*h.vertices]=n.x,B[v+1]=n.y,B[v+2]=n.z,B[v+3]=f.x,B[v+4]=f.y,B[v+5]=f.z,B[v+6]=a.x,B[v+7]=a.y,B[v+8]=a.z,h.vertices+=3;var tt=h.vertices-3,et=h.vertices-2,rt=h.vertices-1,nt=3*tt,it=3*et,ot=3*rt;for(b=0,y=g.length-1;bs&&(s=u),h>l&&(l=h),d>c&&(c=d)}t.center.set((s+i)/2,(l+o)/2,(c+a)/2),t.radius=t.center.distanceTo({x:s,y:l,z:c}),t.box={min:{x:i,y:o,z:a},max:{x:s,y:l,z:c}}}static addCustomGeo(t,e,r,n,a){var s,l,c,u,h,f,p,m,g,v=e.addGeoGroup(),b=r.vertexArr,y=r.normalArr,x=r.faceArr;v.vertices=b.length,v.faceidx=x.length;var _=v.vertexArray,w=v.colorArray;for(n.constructor!==Array&&(m=n.r,g=n.g,u=n.b),f=0,p=v.vertices;fc?(h.fromCap=0,h.toCap=2):(h.fromCap=2,h.toCap=2),this.addCylinder(h)}}addLine(t){var e,r;e=t.start?new o.Vector3(t.start.x||0,t.start.y||0,t.start.z||0):new o.Vector3(0,0,0),t.end?void 0===(r=new o.Vector3(t.end.x,t.end.y||0,t.end.z||0)).x&&(r.x=3):r=new o.Vector3(3,0,0);var n=this.geo.updateGeoGroup(2),i=n.vertices,a=3*i,s=n.vertexArray;s[a]=e.x,s[a+1]=e.y,s[a+2]=e.z,s[a+3]=r.x,s[a+4]=r.y,s[a+5]=r.z,n.vertices+=2;var l=n.lineArray,c=n.lineidx;l[c]=i,l[c+1]=i+1,n.lineidx+=2;var u=new o.Vector3;this.components.push({centroid:u.addVectors(e,r).multiplyScalar(.5)}),n=this.geo.updateGeoGroup(0),d.updateBoundingFromPoints(this.boundingSphere,this.components,n.vertexArray,n.vertices)}addArrow(t){if(t.start?t.start=new o.Vector3(t.start.x||0,t.start.y||0,t.start.z||0):t.start=new o.Vector3(0,0,0),t.dir instanceof o.Vector3&&"number"==typeof t.length){var e=t.dir.clone().multiplyScalar(t.length).add(t.start);t.end=e}else t.end?(t.end=new o.Vector3(t.end.x,t.end.y||0,t.end.z||0),void 0===t.end.x&&(t.end.x=3)):t.end=new o.Vector3(3,0,0);t.radius=t.radius||.1,t.radiusRatio=t.radiusRatio||1.618034,t.mid=0=0?m[n]-a:a-m[n])>0&&(g[n]|=d.ISDONE);var v=[],b=[];s.MarchingCube.march(g,v,b,{fulltable:!0,voxel:l,unitCube:t.unit,origin:t.origin,matrix:t.matrix,nX:u,nY:h,nZ:f}),!l&&c>0&&s.MarchingCube.laplacianSmooth(c,v,b);var y=[],x=[],_=[];if(e.selectedRegion&&void 0===e.coords&&(e.coords=e.selectedRegion),void 0!==e.coords){var w=e.coords[0].x,k=e.coords[0].y,A=e.coords[0].z,M=e.coords[0].x,T=e.coords[0].y,S=e.coords[0].z;for(let t=0;tw?w=e.coords[t].x:e.coords[t].xk?k=e.coords[t].y:e.coords[t].yA?A=e.coords[t].z:e.coords[t].zM&&v[t].xT&&v[t].yS&&v[t].z=64e3&&(e.push({vertexArr:[],normalArr:[],faceArr:[]}),t.colorArr&&(e.colorArr=[]),i++)}return e}d.ISDONE=2,d.drawCustom=function(t,e,r){var n=r,i=n.vertexArr,o=n.faceArr;0!==i.length&&0!==o.length||console.warn("Error adding custom shape component: No vertices and/or face indices supplied!");var s=r.color;void 0===s&&(s=t.color),s=a.CC.color(s);for(var l=f(n),c=0,u=l.length;c{"use strict";r.r(e),r.d(e,{GLViewer:()=>m,createStereoViewer:()=>b,createViewer:()=>g,createViewerGrid:()=>v});var n=r("./src/WebGL/index.ts"),i=r("./src/WebGL/math/index.ts"),o=r("./src/colors.ts"),a=r("./src/utilities.ts"),s=r("./src/Gradient.ts"),l=r("./src/GLModel.ts"),c=r("./src/Label.ts"),u=r("./src/GLShape.ts"),h=r("./src/VolumeData.ts"),d=r("./src/ProteinSurface4.ts"),f=r("./src/VolumetricRender.ts"),p=r("./node_modules/upng-js/UPNG.js");class m{getRect(){let t=this.container,e=t.getBoundingClientRect();if(0==e.width&&0==e.height&&"none"===t.style.display){let r=t.style.position,n=t.style.visibility;t.style.display="block",t.style.visibility="hidden",t.style.position="absolute",e=t.getBoundingClientRect(),t.style.display="none",t.style.visibility=n,t.style.position=r}return e}getWidth(){return this.getRect().width}getHeight(){return this.getRect().height}setupRenderer(){this.renderer=new n.Renderer({antialias:this.config.antialias,preserveDrawingBuffer:!0,premultipliedAlpha:!1,id:this.config.id,row:this.config.row,col:this.config.col,rows:this.config.rows,cols:this.config.cols,canvas:this.config.canvas,containerWidth:this.WIDTH||1,containerHeight:this.HEIGHT||1}),this.renderer.domElement.style.width="100%",this.renderer.domElement.style.height="100%",this.renderer.domElement.style.padding="0",this.renderer.domElement.style.position="absolute",this.renderer.domElement.style.top="0px",this.renderer.domElement.style.left="0px",this.renderer.domElement.style.zIndex="0"}initializeScene(){this.scene=new n.Scene,this.scene.fog=new n.Fog(this.bgColor,100,200),this.modelGroup=new n.Object3D,this.rotationGroup=new n.Object3D,this.rotationGroup.useQuaternion=!0,this.rotationGroup.quaternion=new i.Quaternion(0,0,0,1),this.rotationGroup.add(this.modelGroup),this.scene.add(this.rotationGroup);var t=new n.Light(16777215);t.position=new i.Vector3(.2,.2,1).normalize(),t.intensity=1,this.scene.add(t)}initContainer(t){this.container=t,this.WIDTH=this.getWidth(),this.HEIGHT=this.getHeight(),this.ASPECT=this.renderer.getAspect(this.WIDTH,this.HEIGHT),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.container.append(this.renderer.domElement),this.glDOM=this.renderer.domElement,this.nomouse||(this.glDOM.addEventListener("mousedown",this._handleMouseDown.bind(this),{passive:!1}),this.glDOM.addEventListener("touchstart",this._handleMouseDown.bind(this),{passive:!1}),this.glDOM.addEventListener("wheel",this._handleMouseScroll.bind(this),{passive:!1}),this.glDOM.addEventListener("mousemove",this._handleMouseMove.bind(this),{passive:!1}),this.glDOM.addEventListener("touchmove",this._handleMouseMove.bind(this),{passive:!1}),this.glDOM.addEventListener("contextmenu",this._handleContextMenu.bind(this),{passive:!1}))}decAnim(){this.animated--,this.animated<0&&(this.animated=0)}incAnim(){this.animated++}nextSurfID(){var t=0;for(let r in this.surfaces)if(this.surfaces.hasOwnProperty(r)){var e=parseInt(r);isNaN(e)||e>t&&(t=e)}return t+1}setSlabAndFog(){let t=this.camera.position.z-this.rotationGroup.position.z;t<1&&(t=1),this.camera.near=t+this.slabNear,this.camera.near<1&&(this.camera.near=1),this.camera.far=t+this.slabFar,this.camera.near+1>this.camera.far&&(this.camera.far=this.camera.near+1),this.camera.fov=this.fov,this.camera.right=t*Math.tan(Math.PI/180*this.fov),this.camera.left=-this.camera.right,this.camera.top=this.camera.right/this.ASPECT,this.camera.bottom=-this.camera.top,this.camera.updateProjectionMatrix(),this.scene.fog.near=this.camera.near+this.fogStart*(this.camera.far-this.camera.near),this.scene.fog.far=this.camera.far,this.config.disableFog&&(this.scene.fog.near=this.scene.fog.far)}show(t){if(this.renderer.setViewport(),this.scene&&(this.setSlabAndFog(),this.renderer.render(this.scene,this.camera),this.viewChangeCallback&&this.viewChangeCallback(this._viewer.getView()),!t&&this.linkedViewers.length>0))for(var e=this._viewer.getView(),r=0;r0){let e=this.CAMERA_Z-this.config.lowerZoomLimit;t>e&&(t=e)}if(this.config.upperZoomLimit&&this.config.upperZoomLimit>0){let e=this.CAMERA_Z-this.config.upperZoomLimit;tthis.CAMERA_Z-1&&(t=this.CAMERA_Z-1),t}static slerp(t,e,r){if(1==r)return e.clone();if(0==r)return t.clone();let n=t.x*e.x+t.y*e.y+t.z*e.z+t.w*e.w;if(n>.9995){let n=new i.Quaternion(t.x+r*(e.x-t.x),t.y+r*(e.y-t.y),t.z+r*(e.z-t.z),t.w+r*(e.w-t.w));return n.normalize(),n}n<0&&(e=e.clone().multiplyScalar(-1),n=-n),n>1?n=1:n<-1&&(n=-1);var o=Math.acos(n)*r,a=e.clone();a.sub(t.clone().multiplyScalar(n)),a.normalize();var s=Math.cos(o),l=Math.sin(o),c=new i.Quaternion(t.x*s+a.x*l,t.y*s+a.y*l,t.z*s+a.z*l,t.w*s+a.w*l);return c.normalize(),c}constructor(t,e={}){this.nomouse=!1,this.glDOM=null,this.models=[],this.surfaces={},this.shapes=[],this.labels=[],this.clickables=[],this.hoverables=[],this.contextMenuEnabledAtoms=[],this.current_hover=null,this.hoverDuration=500,this.viewer_frame=0,this.viewChangeCallback=null,this.stateChangeCallback=null,this.NEAR=1,this.FAR=800,this.CAMERA_Z=150,this.fov=20,this.linkedViewers=[],this.renderer=null,this.control_all=!1,this.scene=null,this.rotationGroup=null,this.modelGroup=null,this.fogStart=.4,this.slabNear=-50,this.slabFar=50,this.cq=new i.Quaternion(0,0,0,1),this.dq=new i.Quaternion(0,0,0,1),this.animated=0,this.animationTimers=new Set,this.isDragging=!1,this.mouseStartX=0,this.mouseStartY=0,this.touchDistanceStart=0,this.touchHold=!1,this.currentModelPos=0,this.cz=0,this.cslabNear=0,this.cslabFar=0,this.userContextMenuHandler=null,this.config=e,this.callback=this.config.callback,this.defaultcolors=this.config.defaultcolors,this.defaultcolors||(this.defaultcolors=o.elementColors.defaultColors),this.nomouse=this.config.nomouse,this.bgColor=0,this.config.backgroundColor=this.config.backgroundColor||"#ffffff",void 0!==this.config.backgroundColor&&(this.bgColor=o.CC.color(this.config.backgroundColor).getHex()),this.config.backgroundAlpha=null==this.config.backgroundAlpha?1:this.config.backgroundAlpha,this.camerax=0,void 0!==this.config.camerax&&(this.camerax=parseFloat(this.config.camerax)),this._viewer=this,this.container=t,null!=this.config.hoverDuration&&(this.hoverDuration=this.config.hoverDuration),void 0===this.config.antialias&&(this.config.antialias=!0),void 0===this.config.cartoonQuality&&(this.config.cartoonQuality=10),this.WIDTH=this.getWidth(),this.HEIGHT=this.getHeight(),this.setupRenderer(),this.row=null==this.config.row?0:this.config.row,this.col=null==this.config.col?0:this.config.col,this.cols=this.config.cols,this.rows=this.config.rows,this.viewers=this.config.viewers,this.control_all=this.config.control_all,this.ASPECT=this.renderer.getAspect(this.WIDTH,this.HEIGHT),this.camera=new n.Camera(this.fov,this.ASPECT,this.NEAR,this.FAR,this.config.orthographic),this.camera.position=new i.Vector3(this.camerax,0,this.CAMERA_Z),this.lookingAt=new i.Vector3,this.camera.lookAt(this.lookingAt),this.raycaster=new n.Raycaster(new i.Vector3(0,0,0),new i.Vector3(0,0,0)),this.projector=new n.Projector,this.initializeScene(),this.renderer.setClearColorHex(this.bgColor,this.config.backgroundAlpha),this.scene.fog.color=o.CC.color(this.bgColor),document.body.addEventListener("mouseup",this._handleMouseUp.bind(this)),document.body.addEventListener("touchend",this._handleMouseUp.bind(this)),this.initContainer(this.container),this.config.style&&this.setViewStyle(this.config),window.addEventListener("resize",this.resize.bind(this)),void 0!==window.ResizeObserver&&(this.divwatcher=new window.ResizeObserver(this.resize.bind(this)),this.divwatcher.observe(this.container));try{"function"==typeof this.callback&&this.callback(this)}catch(t){console.log("error with glviewer callback: "+t)}}targetedObjects(t,e,r){var n={x:t,y:e,z:-1};return Array.isArray(r)||(r=this.selectedAtoms(r)),0==r.length?[]:(this.raycaster.setFromCamera(n,this.camera),this.raycaster.intersectObjects(this.modelGroup,r))}modelToScreen(t){let e=!1;Array.isArray(t)||(t=[t],e=!0);let r=this.renderer.getXRatio(),n=this.renderer.getYRatio(),o=this.col,a=this.row,s=o*(this.WIDTH/r),l=(n-a-1)*(this.HEIGHT/n),c=[],u=this.canvasOffset();return t.forEach((t=>{let e=new i.Vector3(t.x,t.y,t.z);e.applyMatrix4(this.modelGroup.matrixWorld),this.projector.projectVector(e,this.camera);let o=this.WIDTH/r*(e.x+1)/2+u.left+s,a=-this.HEIGHT/n*(e.y-1)/2+u.top+l;c.push({x:o,y:a})})),e&&(c=c[0]),c}screenOffsetToModel(t,e,r){var n=t/this.WIDTH,o=e/this.HEIGHT,a=void 0===r?this.rotationGroup.position.z:r,s=this.rotationGroup.quaternion,l=new i.Vector3(0,0,a);return this.projector.projectVector(l,this.camera),l.x+=2*n,l.y-=2*o,this.projector.unprojectVector(l,this.camera),l.z=0,l.applyQuaternion(s),l}screenToModelDistance(t,e){let r=this.canvasOffset(),n=new i.Vector3(e.x,e.y,e.z);n.applyMatrix4(this.modelGroup.matrixWorld);let o=n.clone();this.projector.projectVector(n,this.camera);let a=new i.Vector3(2*(t.x-r.left)/this.WIDTH-1,2*(t.y-r.top)/-this.HEIGHT+1,n.z);return this.projector.unprojectVector(a,this.camera),a.distanceTo(o)}setViewChangeCallback(t){"function"!=typeof t&&null!=t||(this.viewChangeCallback=t)}setStateChangeCallback(t){"function"!=typeof t&&null!=t||(this.stateChangeCallback=t)}getConfig(){return this.config}setConfig(t){this.config=t}getInternalState(){var t={models:[],surfaces:[],shapes:[],labels:[]};for(let e=0;e{e.getCanvas().toBlob((function(e){e.arrayBuffer().then(t)}),"image/png")}))),n+=1,n==t&&(e.viewChangeCallback=i,Promise.all(o).then((t=>{let n=[];for(let e=0;e0&&(this.hoverTimeout=setTimeout((function(){a.handleHoverSelection(o.x,o.y,t)}),this.hoverDuration)),this.isDragging)){var l=(e-this.mouseStartX)/this.WIDTH,c=(r-this.mouseStartY)/this.HEIGHT;0!=this.touchDistanceStart&&t.targetTouches&&2==t.targetTouches.length?(s=2,c=2*(this.calcTouchDistance(t)-this.touchDistanceStart)/(this.WIDTH+this.HEIGHT)):t.targetTouches&&3==t.targetTouches.length&&(s=1),l*=n,c*=i;var u,h=Math.hypot(l,c);if(3==s||3==this.mouseButton&&t.ctrlKey)this.slabNear=this.cslabNear+100*l,this.slabFar=this.cslabFar-100*c;else if(2==s||3==this.mouseButton||t.shiftKey)(u=.85*(this.CAMERA_Z-this.rotationGroup.position.z))<80&&(u=80),this.rotationGroup.position.z=this.cz+c*u,this.rotationGroup.position.z=this.adjustZoomToLimits(this.rotationGroup.position.z);else if(1==s||2==this.mouseButton||t.ctrlKey){var d=this.screenOffsetToModel(n*(e-this.mouseStartX),i*(r-this.mouseStartY));this.modelGroup.position.addVectors(this.currentModelPos,d)}else if((0===s||1==this.mouseButton)&&0!==h){var f=Math.sin(h*Math.PI)/h;this.dq.x=Math.cos(h*Math.PI),this.dq.y=0,this.dq.z=f*l,this.dq.w=-f*c,this.rotationGroup.quaternion.set(1,0,0,0),this.rotationGroup.quaternion.multiply(this.dq),this.rotationGroup.quaternion.multiply(this.cq)}this.show()}}_handleContextMenu(t){t.preventDefault();var e=this.getX(t),r=this.getY(t);if(e==this.mouseStartX&&r==this.mouseStartY){var n=this.mouseStartX,i=this.mouseStartY,o=this.canvasOffset();let t=this.mouseXY(n,i),e=t.x,r=t.y,s=this.targetedObjects(e,r,this.contextMenuEnabledAtoms);var a=null;s.length&&(a=s[0].clickable),o=this.canvasOffset(),n=this.mouseStartX-o.left,i=this.mouseStartY-o.top,this.userContextMenuHandler&&this.userContextMenuHandler(a,n,i,s)}}setContainer(t){let e=(0,a.getElement)(t)||this.container;return this.initContainer(e),this}setBackgroundColor(t,e){(void 0===e||e<0||e>1)&&(e=1);var r=o.CC.color(t);return this.scene.fog.color=r,this.bgColor=r.getHex(),this.renderer.setClearColorHex(r.getHex(),e),this.show(),this}setProjection(t){this.camera.ortho="orthographic"===t,this.setSlabAndFog()}setViewStyle(t){if("outline"===t.style){var e={};t.color&&(e.color=o.CC.color(t.color)),t.width&&(e.width=t.width),this.renderer.enableOutline(e)}else this.renderer.disableOutline();return this}updateSize(){this.renderer.setSize(this.WIDTH,this.HEIGHT),this.ASPECT=this.renderer.getAspect(this.WIDTH,this.HEIGHT),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.camera.aspect=this.ASPECT,this.camera.updateProjectionMatrix()}setWidth(t){return this.WIDTH=t||this.WIDTH,this.updateSize(),this}setHeight(t){return this.HEIGHT=t||this.HEIGHT,this.updateSize(),this}resize(){this.WIDTH=this.getWidth(),this.HEIGHT=this.getHeight();let t=!1;if(this.renderer.isLost()&&this.WIDTH>0&&this.HEIGHT>0){let e=!1,r=this.container.querySelector("canvas");r&&r!=this.renderer.getCanvas()?this.config.canvas=r:(r.remove(),this.config&&null!=this.config.canvas&&(delete this.config.canvas,e=!0)),this.setupRenderer(),this.initContainer(this.container),t=!0,e&&(this.config.canvas=this.renderer.getCanvas())}if(0==this.WIDTH||0==this.HEIGHT?this.animated&&this._viewer.pauseAnimate():this.animated&&this._viewer.resumeAnimate(),this.updateSize(),t){let t=this.renderer.supportedExtensions();if(t.regen=!0,this.viewers)for(let e=0,r=this.viewers.length;e=0&&(this.modelGroup.remove(this.labels[r].sprite),(this.viewer_frame<0||this.labels[r].frame==this.viewer_frame)&&this.modelGroup.add(this.labels[r].sprite));for(r in this.surfaces)if(this.surfaces.hasOwnProperty(r)){var a=this.surfaces[r];for(i=0;i1||1==a[i].symmetries.length&&!a[i].symmetries[i].isIdentity()){var c,u=new n.Object3D;for(c=0;c0?this.animateMotion(e,r,this.modelGroup.position,this.adjustZoomToLimits(i),this.rotationGroup.quaternion,this.lookingAt):(this.rotationGroup.position.z=this.adjustZoomToLimits(i),this.show()),this}translate(t,e,r=0,n=!1){var o=t/this.WIDTH,a=e/this.HEIGHT,s=new i.Vector3(0,0,-this.CAMERA_Z);this.projector.projectVector(s,this.camera),s.x-=o,s.y-=a,this.projector.unprojectVector(s,this.camera),s.z=0;var l=this.lookingAt.clone().add(s);return r>0?this.animateMotion(r,n,this.modelGroup.position,this.rotationGroup.position.z,this.rotationGroup.quaternion,l):(this.lookingAt=l,this.camera.lookAt(this.lookingAt),this.show()),this}translateScene(t,e,r=0,n=!1){var i=this.screenOffsetToModel(t,e),o=this.modelGroup.position.clone().add(i);return r>0?this.animateMotion(r,n,this.modelGroup.position,this.rotationGroup.position.z,this.rotationGroup.quaternion,this.lookingAt):(this.modelGroup.position=o,this.show()),this}fitSlab(t){t=t||{};var e=this.getAtomsFromSel(t),r=(0,a.getExtent)(e),n=r[1][0]-r[0][0],i=r[1][1]-r[0][1],o=r[1][2]-r[0][2],s=Math.hypot(n,i,o);return s<5&&(s=5),this.slabNear=-s/1.9,this.slabFar=s/2,this}center(t={},e=0,r=!1){var n,o,s=this.getAtomsFromSel(t),l=(0,a.getExtent)(s);(0,a.isEmptyObject)(t)?(this.shapes.forEach((t=>{if(t&&t.boundingSphere&&t.boundingSphere.center){var e=t.boundingSphere.center,r=t.boundingSphere.radius;r>0?(s.push(new i.Vector3(e.x+r,e.y,e.z)),s.push(new i.Vector3(e.x-r,e.y,e.z)),s.push(new i.Vector3(e.x,e.y+r,e.z)),s.push(new i.Vector3(e.x,e.y-r,e.z)),s.push(new i.Vector3(e.x,e.y,e.z+r)),s.push(new i.Vector3(e.x,e.y,e.z-r))):s.push(e)}})),l=(0,a.getExtent)(s),n=s,o=l):(n=this.getAtomsFromSel({}),o=(0,a.getExtent)(n));var c=new i.Vector3(l[2][0],l[2][1],l[2][2]),u=o[1][0]-o[0][0],h=o[1][1]-o[0][1],d=o[1][2]-o[0][2],f=Math.hypot(u,h,d);f<5&&(f=5),this.slabNear=-f/1.9,this.slabFar=f/2,u=l[1][0]-l[0][0],h=l[1][1]-l[0][1],d=l[1][2]-l[0][2],(f=Math.hypot(u,h,d))<5&&(f=5);for(var p=25,m=0;mp&&(p=g)}f=2*Math.sqrt(p);var v=c.clone().multiplyScalar(-1);return e>0?this.animateMotion(e,r,v,this.rotationGroup.position.z,this.rotationGroup.quaternion,this.lookingAt):(this.modelGroup.position=v,this.show()),this}zoomTo(t={},e=0,r=!1){let n=this.getAtomsFromSel(t),o=(0,a.getExtent)(n),s=o;if((0,a.isEmptyObject)(t)){let t=n&&n.length;if(this.shapes.forEach((t=>{if(t&&t.boundingSphere)if(t.boundingSphere.box){let e=t.boundingSphere.box;n.push(new i.Vector3(e.min.x,e.min.y,e.min.z)),n.push(new i.Vector3(e.max.x,e.max.y,e.max.z))}else if(t.boundingSphere.center){var e=t.boundingSphere.center,r=t.boundingSphere.radius;r>0?(n.push(new i.Vector3(e.x+r,e.y,e.z)),n.push(new i.Vector3(e.x-r,e.y,e.z)),n.push(new i.Vector3(e.x,e.y+r,e.z)),n.push(new i.Vector3(e.x,e.y-r,e.z)),n.push(new i.Vector3(e.x,e.y,e.z+r)),n.push(new i.Vector3(e.x,e.y,e.z-r))):n.push(e)}})),s=(0,a.getExtent)(n),!t)for(let t=0;t<3;t++)o[2][t]=(s[0][t]+s[1][t])/2}else{let t=this.getAtomsFromSel({});s=(0,a.getExtent)(t)}var l=new i.Vector3(o[2][0],o[2][1],o[2][2]),c=s[1][0]-s[0][0],u=s[1][1]-s[0][1],h=s[1][2]-s[0][2],d=Math.hypot(c,u,h);d<5&&(d=5),this.slabNear=-d/1.9,this.slabFar=d/2,0===Object.keys(t).length&&(this.slabNear=Math.min(2*-d,-50),this.slabFar=Math.max(2*d,50));var f=this.config.minimumZoomToDistance||5;c=o[1][0]-o[0][0],u=o[1][1]-o[0][1],h=o[1][2]-o[0][2],(d=Math.hypot(c,u,h))p&&(p=g)}d=2*Math.sqrt(p);var v=l.clone().multiplyScalar(-1),b=-(.5*d/Math.tan(Math.PI/180*this.camera.fov/2)-this.CAMERA_Z);return b=this.adjustZoomToLimits(b),e>0?this.animateMotion(e,r,v,b,this.rotationGroup.quaternion,this.lookingAt):(this.modelGroup.position=v,this.rotationGroup.position.z=b,this.show()),this}setSlab(t,e){this.slabNear=t,this.slabFar=e}getSlab(){return{near:this.slabNear,far:this.slabFar}}addLabel(t,e={},r,n=!1){if(r){var i=(0,a.getExtent)(this.getAtomsFromSel(r));e.position={x:i[2][0],y:i[2][1],z:i[2][2]}}var o=new c.Label(t,e);return o.setContext(),this.modelGroup.add(o.sprite),this.labels.push(o),n||this.show(),o}addResLabels(t,e,r=!1){let n=this.labels.length;return this.applyToModels("addResLabels",t,this,e,r),this.show(),this.labels.slice(n)}addPropertyLabels(t,e,r){return this.applyToModels("addPropertyLabels",t,e,this,r),this.show(),this}removeLabel(t){for(var e=0;e0&&void 0===this.shapes[this.shapes.length-1];)this.shapes.pop();return this}removeAllShapes(){for(var t=0;t-1e-4&&o.x<1.0001&&o.y>-1e-4&&o.y<1.0001&&o.z>-1e-4&&o.z<1.0001)}}for(let o=0;oo){t.start=r,t.end=n,e.addLine(t);break}h.addVectors(r,c),t.start=r,t.end=h,e.addLine(t),r=h.clone(),d+=a,h.addVectors(r,u),r=h.clone(),d+=s}return e.finalize(),e}addCustom(t){t=t||{};var e=new u.GLShape(t);return e.shapePosition=this.shapes.length,e.addCustom(t),this.shapes.push(e),e.finalize(),e}addVolumetricData(t,e,r={}){var n=new h.VolumeData(t,e);return r.hasOwnProperty("transferfn")?this.addVolumetricRender(n,r):this.addIsosurface(n,r)}addIsosurface(t,e={},r){var n=new u.GLShape(e);return n.shapePosition=this.shapes.length,n.addIsosurface(t,e,r),this.shapes.push(n),n}addVolumetricRender(t,e){e=e||{};var r=new f.GLVolumetricRender(t,e);return r.shapePosition=this.shapes.length,this.shapes.push(r),r}hasVolumetricRender(){return this.renderer.supportsVolumetric()}enableFog(t){t?this.scene.fog=new n.Fog(this.bgColor,100,200):(this.config.disableFog=!0,this.show())}setFrame(t){this.viewer_frame=t;let e=this;return new Promise((function(r){var n=e.models.map((function(r){return r.setFrame(t,e)}));Promise.all(n).then((function(){r()}))}))}getFrame(){return this.viewer_frame}getNumFrames(){var t=0;for(let e=0;et&&(t=this.models[e].getNumFrames());for(let e=0;e=t&&(t=this.shapes[e].frame+1);for(let e=0;e=t&&(t=this.labels[e].frame+1);return t}animate(t){this.incAnim();var e=100,r="forward",n=0;(t=t||{}).interval&&(e=t.interval),t.loop&&(r=t.loop),t.reps&&(n=t.reps);var i=this.getNumFrames(),o=this,s=0;t.startFrame&&(s=t.startFrame%i);var l=1;t.step&&(n/=l=t.step);var c,u,h=0,d=i*n,f=new Date,p=function(t){f=new Date,"forward"==t?o.setFrame(s).then((function(){s=(s+l)%i,c()})):"backward"==t?o.setFrame(i-1-s).then((function(){s=(s+l)%i,c()})):o.setFrame(s).then((function(){l*=(s+=l)%(i-1)==0?-1:1,c()}))};return c=function(){if(o.render(),o.getCanvas().isConnected)if(++h!=d&&o.isAnimated()){var t=e-((new Date).getTime()-f.getTime());t=t>0?t:0,o.animationTimers.delete(u),u=new a.PausableTimer(p,t,r),o.animationTimers.add(u)}else u.cancel(),o.animationTimers.delete(u),o.decAnim();else o.stopAnimate()},u=new a.PausableTimer(p,0,r),this.animationTimers.add(u),this}stopAnimate(){return this.animated=0,this.animationTimers.forEach((function(t){t.cancel()})),this.animationTimers=new Set,this}pauseAnimate(){return this.animationTimers.forEach((function(t){t.pause()})),this}resumeAnimate(){return this.animationTimers.forEach((function(t){t.resume()})),this}isAnimated(){return this.animated>0}getModelOpt(t){return t&&!t.defaultcolors?(t.defaultcolors=this.defaultcolors,t.cartoonQuality=t.cartoonQuality||this.config.cartoonQuality):void 0===t&&(t={defaultcolors:this.defaultcolors,cartoonQuality:this.config.cartoonQuality}),t}addModel(t,e="",r){r=this.getModelOpt(r);var n=new l.GLModel(this.models.length,r);return n.addMolData(t,e,r),this.models.push(n),n}addModels(t,e,r){(r=this.getModelOpt(r)).multimodel=!0,r.frames=!0;for(var n=l.GLModel.parseMolData(t,e,r),i=0;i0&&void 0===this.models[this.models.length-1];)this.models.pop();return this}}removeAllModels(){for(var t=0;te[1][0]||n.ye[1][1]||n.ze[1][2]||r.push(n))}return r}static volume(t){return(t[1][0]-t[0][0])*(t[1][1]-t[0][1])*(t[1][2]-t[0][2])}carveUpExtent(t,e,r){let n=[],i={};for(let t=0,r=e.length;tn&&r>i?0:n>r&&n>i?1:2;var o=a(t),l=a(t),c=(t[1][e]-t[0][e])/2+t[0][e];o[1][e]=c,l[0][e]=c;var u=s(o),h=s(l);return u.concat(h)},l=s(t);for(let t=0,i=l.length;t0)for(let t=0,e=h.length;t1||1==w.length&&!w[0].isIdentity()){_=!0;break}}var k=function(t,r,n){var i;b=l?m.shallowCopy(p.getAtomsFromSel(l)):n;var o=(0,a.getExtent)(n,!0);if(e.map&&e.map.prop){var c=e.map.prop;let t=(0,s.getGradient)(e.map.scheme||e.map.gradient||new s.Gradient.RWB),r=t.range();r||(r=(0,a.getPropertyRange)(n,c)),e.colorscheme={prop:c,gradient:t}}for(let t=0,n=r.length;t0){var x=(0,a.getExtent)(b,!0);y.sort((function(t,e){var r=function(t,e){var r=t.extent,n=r[1][0]-r[0][0],i=r[1][1]-r[0][1],o=r[1][2]-r[0][2],a=n-e[2][0];a*=a;var s=i-e[2][1];s*=s;var l=o-e[2][2];return a+s+l*l};return r(t,x)-r(e,x)}))}var _=[];for(let t=0,e=r.length;t0&&(A.push({geo:new n.Geometry(!0),mat:f,done:!1,finished:!1,symmetries:this.models[x].getSymmetries()}),C.push(k(A[A.length-1],T[x],S[x])));M=Promise.all(C)}else A.push({geo:new n.Geometry(!0),mat:f,done:!1,finished:!1,symmetries:[new i.Matrix4]}),M=k(A[A.length-1],v,y);return this.surfaces[h]=A,M.surfid=h,c&&"function"==typeof c?(M.then((function(t){c(t)})),h):M}setSurfaceMaterialStyle(t,e){if((0,a.adjustVolumeStyle)(e),this.surfaces[t]){var r=this.surfaces[t];r.style=e;for(var i=0;i0?this.camera.position.x=r*Math.tan(Math.PI/180*e):this.camera.position.x=-r*Math.tan(Math.PI/180*e),this.camera.lookAt(new i.Vector3(0,0,this.rotationGroup.position.z)),this.camera.position.x}setDefaultCartoonQuality(t){this.config.cartoonQuality=t}}function g(t,e){if(t=(0,a.getElement)(t)){e=e||{};try{return new m(t,e)}catch(t){throw"error creating viewer: "+t}}}function v(t,e={},r={}){if(t=(0,a.getElement)(t)){var n=[],i=document.createElement("canvas");r.rows=e.rows,r.cols=e.cols,r.control_all=null!=e.control_all&&e.control_all,t.appendChild(i);try{for(var o=0;o{"use strict";r.r(e),r.d(e,{CustomLinear:()=>u,Gradient:()=>d,GradientType:()=>i,ROYGB:()=>l,RWB:()=>s,Sinebow:()=>c,builtinGradients:()=>h,getGradient:()=>a,normalizeValue:()=>o});var n=r("./src/colors.ts");class i{}function o(t,e,r){return e>=t?(re&&(r=e),{lo:t,hi:e,val:r}):(r>t&&(r=t),r=2?(this.max=t[1],this.min=t[0]):t&&e&&!Array.isArray(t)&&(this.min=t,this.max=e)}range(){return void 0!==this.min&&void 0!==this.max?[this.min,this.max]:null}valueToHex(t,e){var r,n;if(t=this.mult*t,e?(r=e[0],n=e[1]):(r=this.min,n=this.max),void 0===t)return 16777215;var i=o(r,n,t);r=i.lo;var a,s=n=i.hi;return(t=i.val)<(s=e&&void 0!==e[2]?e[2]:void 0!==this.mid?this.mid:(r+n)/2)?16711680+256*(a=Math.floor(255*Math.sqrt((t-r)/(s-r))))+a:t>s?65536*(a=Math.floor(255*Math.sqrt(1-(t-s)/(n-s))))+256*a+255:16777215}}class l extends i{constructor(t,e){super(),this.gradient="ROYGB",this.mult=1,this.min=t,this.max=e,void 0===e&&Array.isArray(t)&&t.length>=2?(this.max=t[1],this.min=t[0]):t&&e&&!Array.isArray(t)&&(this.min=t,this.max=e)}valueToHex(t,e){var r,n;if(t=this.mult*t,e?(r=e[0],n=e[1]):(r=this.min,n=this.max),void 0===t)return 16777215;var i=o(r,n,t),a=((r=i.lo)+(n=i.hi))/2,s=(r+a)/2,l=(a+n)/2;return(t=i.val)=2&&(this.max=t[1],this.min=t[0]),e=2?(this.max=t[1],this.min=t[0],i=e):(this.min=t,this.max=e,i=r),i)for(let t of i)this.colors.push(n.CC.color(t));else this.colors.push(n.CC.color(0))}range(){return void 0!==this.min&&void 0!==this.max?[this.min,this.max]:null}valueToHex(t,e){var r,i;if(e?(r=e[0],i=e[1]):(r=this.min,i=this.max),void 0===t)return 16777215;var a=o(r,i,t);r=a.lo,i=a.hi,t=a.val;let s=this.colors.length,l=(i-r)/s,c=Math.min(Math.floor((t-r)/l),s-1),u=Math.min(c+1,s-1),h=(t-r-c*l)/l,d=this.colors[c],f=this.colors[u];return new n.Color(d.r+h*(f.r-d.r),d.g+h*(f.g-d.g),d.b+h*(f.b-d.b)).getHex()}}const h={rwb:s,RWB:s,roygb:l,ROYGB:l,sinebow:c,linear:u};class d extends i{valueToHex(t,e){return 0}range(){return null}}d.RWB=s,d.ROYGB=l,d.Sinebow=c,d.CustomLinear=u,d.builtinGradients=h,d.normalizeValue=o,d.getGradient=a},"./src/Label.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Label:()=>l,LabelCount:()=>a});var n=r("./src/WebGL/index.ts"),i=r("./src/Gradient.ts"),o=r("./src/colors.ts");let a=0;function s(t,e,r){var n=r;return void 0!==t&&(t instanceof o.Color?n=t.scaled():void 0!==(n=o.CC.color(t)).scaled&&(n=n.scaled())),void 0!==e&&(n.a=parseFloat(e)),n}class l{constructor(t,e){this.id=a++,this.stylespec=e||{},this.canvas=document.createElement("canvas"),this.canvas.width=134,this.canvas.height=35,this.context=this.canvas.getContext("2d"),this.sprite=new n.Sprite,this.text=t,this.frame=this.stylespec.frame}getStyle(){return this.stylespec}setContext(){var t=this.stylespec,e=void 0!==t.useScreen&&t.useScreen,r=t.showBackground;"0"!==r&&"false"!==r||(r=!1),void 0===r&&(r=!0);var o=t.font?t.font:"sans-serif",a=parseInt(t.fontSize)?parseInt(t.fontSize):18,l=s(t.fontColor,t.fontOpacity,{r:255,g:255,b:255,a:1}),c=t.padding?t.padding:4,u=t.borderThickness?t.borderThickness:0,h=s(t.backgroundColor,t.backgroundOpacity,{r:0,g:0,b:0,a:1}),d=s(t.borderColor,t.borderOpacity,h),f=t.position?t.position:{x:-10,y:1,z:1},p=void 0===t.inFront||t.inFront;"false"!==p&&"0"!==p||(p=!1);var m=t.alignment||n.SpriteAlignment.topLeft;"string"==typeof m&&m in n.SpriteAlignment&&(m=n.SpriteAlignment[m]);var g="";t.bold&&(g="bold "),this.context.font=g+a+"px "+o;var v=this.context.measureText(this.text).width;r||(u=0);var b=v+2.5*u+2*c,y=1.25*a+2*u+2*c;if(t.backgroundImage){var x=t.backgroundImage,_=t.backgroundWidth?t.backgroundWidth:x.width,w=t.backgroundHeight?t.backgroundHeight:x.height;_>b&&(b=_),w>y&&(y=w)}if(this.canvas.width=b,this.canvas.height=y,this.context.clearRect(0,0,this.canvas.width,this.canvas.height),g="",t.bold&&(g="bold "),this.context.font=g+a+"px "+o,this.context.fillStyle="rgba("+h.r+","+h.g+","+h.b+","+h.a+")",this.context.strokeStyle="rgba("+d.r+","+d.g+","+d.b+","+d.a+")",t.backgroundGradient){let e=this.context.createLinearGradient(0,y/2,b,y/2),r=i.Gradient.getGradient(t.backgroundGradient),n=r.range(),o=-1,a=1;n&&(o=n[0],a=n[1]);let l=a-o;for(let t=0;t<1.01;t+=.1){let n=s(r.valueToHex(o+l*t)),i="rgba("+n.r+","+n.g+","+n.b+","+n.a+")";e.addColorStop(t,i)}this.context.fillStyle=e}this.context.lineWidth=u,r&&function(t,e,r,n,i,o,a){t.beginPath(),t.moveTo(e+6,r),t.lineTo(e+n-6,r),t.quadraticCurveTo(e+n,r,e+n,r+6),t.lineTo(e+n,r+i-6),t.quadraticCurveTo(e+n,r+i,e+n-6,r+i),t.lineTo(e+6,r+i),t.quadraticCurveTo(e,r+i,e,r+i-6),t.lineTo(e,r+6),t.quadraticCurveTo(e,r,e+6,r),t.closePath(),t.fill(),a&&t.stroke()}(this.context,u,u,b-2*u,y-2*u,0,u>0),t.backgroundImage&&this.context.drawImage(x,0,0,b,y),this.context.fillStyle="rgba("+l.r+","+l.g+","+l.b+","+l.a+")",this.context.fillText(this.text,u+c,a+u+c,v);var k=new n.Texture(this.canvas);k.needsUpdate=!0,this.sprite.material=new n.SpriteMaterial({map:k,useScreenCoordinates:e,alignment:m,depthTest:!p,screenOffset:t.screenOffset||null}),this.sprite.scale.set(1,1,1),this.sprite.position.set(f.x,f.y,f.z)}dispose(){void 0!==this.sprite.material.map&&this.sprite.material.map.dispose(),void 0!==this.sprite.material&&this.sprite.material.dispose()}}},"./src/ProteinSurface4.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{MarchingCube:()=>l,MarchingCubeInitializer:()=>s,PointGrid:()=>c,ProteinSurface:()=>u,SurfaceType:()=>n,setSyncSurface:()=>a,syncSurface:()=>o});var n,i=r("./src/WebGL/math/index.ts");!function(t){t[t.VDW=1]="VDW",t[t.MS=2]="MS",t[t.SAS=3]="SAS",t[t.SES=4]="SES"}(n||(n={}));var o=!1;function a(t){o=t}(window.navigator.userAgent.indexOf("MSIE ")>=0||window.navigator.userAgent.indexOf("Trident/")>=0)&&(o=!0);class s{constructor(){this.ISDONE=2,this.edgeTable=new Uint32Array([0,0,0,0,0,0,0,2816,0,0,0,1792,0,3328,3584,3840,0,0,0,138,0,21,0,134,0,0,0,652,0,2067,3865,3600,0,0,0,42,0,0,0,294,0,0,21,28,0,3875,1049,3360,0,168,162,170,0,645,2475,2210,0,687,293,172,4010,3747,3497,3232,0,0,0,0,0,69,0,900,0,0,0,1792,138,131,1608,1920,0,81,0,2074,84,85,84,86,0,81,0,3676,330,1105,1881,1616,0,0,0,42,0,69,0,502,0,0,21,3580,138,2035,1273,1520,2816,104,2337,106,840,581,367,102,2816,3695,3429,3180,1898,1635,1385,1120,0,0,0,0,0,0,0,3910,0,0,69,588,42,2083,41,2880,0,0,0,1722,0,2293,4095,3830,0,255,757,764,2538,2291,3065,2800,0,0,81,338,0,3925,1119,3414,84,855,85,340,2130,2899,89,2384,1792,712,194,1162,4036,3781,3535,3270,708,719,197,204,3018,2755,2505,2240,0,0,0,0,168,420,168,1958,162,162,676,2988,170,163,680,928,3328,3096,3328,3642,52,53,1855,1590,2340,2111,2869,2620,298,51,825,560,3584,3584,3090,3482,1668,1941,1183,1430,146,2975,2069,2460,154,915,153,400,3840,3592,3329,3082,1796,1541,1295,1030,2818,2575,2309,2060,778,515,265,0]),this.triTable=[[],[],[],[],[],[],[],[11,9,8],[],[],[],[8,10,9],[],[10,8,11],[9,11,10],[8,10,9,8,11,10],[],[],[],[1,7,3],[],[4,2,0],[],[2,1,7],[],[],[],[2,7,3,2,9,7],[],[1,4,11,1,0,4],[3,8,0,11,9,4,11,10,9],[4,11,9,11,10,9],[],[],[],[5,3,1],[],[],[],[2,5,8,2,1,5],[],[],[2,4,0],[3,2,4],[],[0,9,1,8,10,5,8,11,10],[3,4,0,3,10,4],[5,8,10,8,11,10],[],[3,5,7],[7,1,5],[1,7,3,1,5,7],[],[9,2,0,9,7,2],[0,3,8,1,7,11,1,5,7],[11,1,7,1,5,7],[],[9,1,0,5,3,2,5,7,3],[8,2,5,8,0,2],[2,5,3,5,7,3],[3,9,1,3,8,9,7,11,10,7,10,5],[9,1,0,10,7,11,10,5,7],[3,8,0,7,10,5,7,11,10],[11,5,7,11,10,5],[],[],[],[],[],[0,6,2],[],[7,2,9,7,9,8],[],[],[],[8,10,9],[7,1,3],[7,1,0],[6,9,3,6,10,9],[7,10,8,10,9,8],[],[6,0,4],[],[11,1,4,11,3,1],[2,4,6],[2,0,4,2,4,6],[2,4,6],[1,4,2,4,6,2],[],[6,0,4],[],[2,11,3,6,9,4,6,10,9],[8,6,1,8,1,3],[10,0,6,0,4,6],[8,0,3,9,6,10,9,4,6],[10,4,6,10,9,4],[],[],[],[5,3,1],[],[0,6,2],[],[7,4,8,5,2,1,5,6,2],[],[],[2,4,0],[7,4,8,2,11,3,10,5,6],[7,1,3],[5,6,10,0,9,1,8,7,4],[5,6,10,7,0,3,7,4,0],[10,5,6,4,8,7],[9,11,8],[3,5,6],[0,5,11,0,11,8],[6,3,5,3,1,5],[3,9,6,3,8,9],[9,6,0,6,2,0],[0,3,8,2,5,6,2,1,5],[1,6,2,1,5,6],[9,11,8],[1,0,9,6,10,5,11,3,2],[6,10,5,2,8,0,2,11,8],[3,2,11,10,5,6],[10,5,6,9,3,8,9,1,3],[0,9,1,5,6,10],[8,0,3,10,5,6],[10,5,6],[],[],[],[],[],[],[],[1,10,2,9,11,6,9,8,11],[],[],[6,0,2],[3,6,9,3,2,6],[3,5,1],[0,5,1,0,11,5],[0,3,5],[6,9,11,9,8,11],[],[],[],[4,5,9,7,1,10,7,3,1],[],[11,6,7,2,4,5,2,0,4],[11,6,7,8,0,3,1,10,2,9,4,5],[6,7,11,1,10,2,9,4,5],[],[4,1,0,4,5,1,6,7,3,6,3,2],[9,4,5,0,6,7,0,2,6],[4,5,9,6,3,2,6,7,3],[6,7,11,5,3,8,5,1,3],[6,7,11,4,1,0,4,5,1],[4,5,9,3,8,0,11,6,7],[9,4,5,7,11,6],[],[],[0,6,4],[8,6,4,8,1,6],[],[0,10,2,0,9,10,4,8,11,4,11,6],[10,2,1,6,0,3,6,4,0],[10,2,1,11,4,8,11,6,4],[4,2,6],[1,0,9,2,4,8,2,6,4],[2,4,0,2,6,4],[8,2,4,2,6,4],[11,4,1,11,6,4],[0,9,1,4,11,6,4,8,11],[3,6,0,6,4,0],[8,6,4,8,11,6],[10,8,9],[6,3,9,6,7,3],[6,7,1],[10,7,1,7,3,1],[7,11,6,8,10,2,8,9,10],[11,6,7,10,0,9,10,2,0],[2,1,10,7,11,6,8,0,3],[1,10,2,6,7,11],[7,2,6,7,9,2],[1,0,9,3,6,7,3,2,6],[7,0,6,0,2,6],[2,7,3,2,6,7],[7,11,6,3,9,1,3,8,9],[9,1,0,11,6,7],[0,3,8,11,6,7],[11,6,7],[],[],[],[],[5,3,7],[8,5,2,8,7,5],[5,3,7],[1,10,2,5,8,7,5,9,8],[1,7,5],[1,7,5],[9,2,7,9,7,5],[11,3,2,8,5,9,8,7,5],[1,3,7,1,7,5],[0,7,1,7,5,1],[9,3,5,3,7,5],[9,7,5,9,8,7],[8,10,11],[3,4,10,3,10,11],[8,10,11],[5,9,4,1,11,3,1,10,11],[2,4,5],[5,2,4,2,0,4],[0,3,8,5,9,4,10,2,1],[2,1,10,9,4,5],[2,8,5,2,11,8],[3,2,11,1,4,5,1,0,4],[9,4,5,8,2,11,8,0,2],[11,3,2,9,4,5],[8,5,3,5,1,3],[5,0,4,5,1,0],[3,8,0,4,5,9],[9,4,5],[11,9,10],[11,9,10],[1,11,4,1,10,11],[8,7,4,11,1,10,11,3,1],[2,7,9,2,9,10],[4,8,7,0,10,2,0,9,10],[2,1,10,0,7,4,0,3,7],[10,2,1,8,7,4],[1,7,4],[3,2,11,4,8,7,9,1,0],[11,4,2,4,0,2],[2,11,3,7,4,8],[4,1,7,1,3,7],[1,0,9,8,7,4],[3,4,0,3,7,4],[8,7,4],[8,9,10,8,10,11],[3,9,11,9,10,11],[0,10,8,10,11,8],[10,3,1,10,11,3],[2,8,10,8,9,10],[9,2,0,9,10,2],[8,0,3,1,10,2],[10,2,1],[1,11,9,11,8,9],[11,3,2,0,9,1],[11,0,2,11,8,0],[11,3,2],[8,1,3,8,9,1],[9,1,0],[8,0,3],[]],this.edgeTable2=[0,265,515,778,2060,2309,2575,2822,1030,1295,1541,1804,3082,3331,3593,3840,400,153,915,666,2460,2197,2975,2710,1430,1183,1941,1692,3482,3219,3993,3728,560,825,51,314,2620,2869,2111,2358,1590,1855,1077,1340,3642,3891,3129,3376,928,681,419,170,2988,2725,2479,2214,1958,1711,1445,1196,4010,3747,3497,3232,2240,2505,2755,3018,204,453,719,966,3270,3535,3781,4044,1226,1475,1737,1984,2384,2137,2899,2650,348,85,863,598,3414,3167,3925,3676,1370,1107,1881,1616,2800,3065,2291,2554,764,1013,255,502,3830,4095,3317,3580,1786,2035,1273,1520,2912,2665,2403,2154,876,613,367,102,3942,3695,3429,3180,1898,1635,1385,1120,1120,1385,1635,1898,3180,3429,3695,3942,102,367,613,876,2154,2403,2665,2912,1520,1273,2035,1786,3580,3317,4095,3830,502,255,1013,764,2554,2291,3065,2800,1616,1881,1107,1370,3676,3925,3167,3414,598,863,85,348,2650,2899,2137,2384,1984,1737,1475,1226,4044,3781,3535,3270,966,719,453,204,3018,2755,2505,2240,3232,3497,3747,4010,1196,1445,1711,1958,2214,2479,2725,2988,170,419,681,928,3376,3129,3891,3642,1340,1077,1855,1590,2358,2111,2869,2620,314,51,825,560,3728,3993,3219,3482,1692,1941,1183,1430,2710,2975,2197,2460,666,915,153,400,3840,3593,3331,3082,1804,1541,1295,1030,2822,2575,2309,2060,778,515,265,0],this.triTable2=[[],[8,3,0],[9,0,1],[8,3,1,8,1,9],[11,2,3],[11,2,0,11,0,8],[11,2,3,0,1,9],[2,1,11,1,9,11,11,9,8],[10,1,2],[8,3,0,1,2,10],[9,0,2,9,2,10],[3,2,8,2,10,8,8,10,9],[10,1,3,10,3,11],[1,0,10,0,8,10,10,8,11],[0,3,9,3,11,9,9,11,10],[8,10,9,8,11,10],[8,4,7],[3,0,4,3,4,7],[1,9,0,8,4,7],[9,4,1,4,7,1,1,7,3],[2,3,11,7,8,4],[7,11,4,11,2,4,4,2,0],[3,11,2,4,7,8,9,0,1],[2,7,11,2,1,7,1,4,7,1,9,4],[10,1,2,8,4,7],[2,10,1,0,4,7,0,7,3],[4,7,8,0,2,10,0,10,9],[2,7,3,2,9,7,7,9,4,2,10,9],[8,4,7,11,10,1,11,1,3],[11,4,7,1,4,11,1,11,10,1,0,4],[3,8,0,7,11,4,11,9,4,11,10,9],[7,11,4,4,11,9,11,10,9],[9,5,4],[3,0,8,4,9,5],[5,4,0,5,0,1],[4,8,5,8,3,5,5,3,1],[11,2,3,9,5,4],[9,5,4,8,11,2,8,2,0],[3,11,2,1,5,4,1,4,0],[8,5,4,2,5,8,2,8,11,2,1,5],[2,10,1,9,5,4],[0,8,3,5,4,9,10,1,2],[10,5,2,5,4,2,2,4,0],[3,4,8,3,2,4,2,5,4,2,10,5],[5,4,9,1,3,11,1,11,10],[0,9,1,4,8,5,8,10,5,8,11,10],[3,4,0,3,10,4,4,10,5,3,11,10],[4,8,5,5,8,10,8,11,10],[9,5,7,9,7,8],[0,9,3,9,5,3,3,5,7],[8,0,7,0,1,7,7,1,5],[1,7,3,1,5,7],[11,2,3,8,9,5,8,5,7],[9,2,0,9,7,2,2,7,11,9,5,7],[0,3,8,2,1,11,1,7,11,1,5,7],[2,1,11,11,1,7,1,5,7],[1,2,10,5,7,8,5,8,9],[9,1,0,10,5,2,5,3,2,5,7,3],[5,2,10,8,2,5,8,5,7,8,0,2],[10,5,2,2,5,3,5,7,3],[3,9,1,3,8,9,7,11,10,7,10,5],[9,1,0,10,7,11,10,5,7],[3,8,0,7,10,5,7,11,10],[11,5,7,11,10,5],[11,7,6],[0,8,3,11,7,6],[9,0,1,11,7,6],[7,6,11,3,1,9,3,9,8],[2,3,7,2,7,6],[8,7,0,7,6,0,0,6,2],[1,9,0,3,7,6,3,6,2],[7,6,2,7,2,9,2,1,9,7,9,8],[1,2,10,6,11,7],[2,10,1,7,6,11,8,3,0],[11,7,6,10,9,0,10,0,2],[7,6,11,3,2,8,8,2,10,8,10,9],[6,10,7,10,1,7,7,1,3],[6,10,1,6,1,7,7,1,0,7,0,8],[9,0,3,6,9,3,6,10,9,6,3,7],[6,10,7,7,10,8,10,9,8],[8,4,6,8,6,11],[11,3,6,3,0,6,6,0,4],[0,1,9,4,6,11,4,11,8],[1,9,4,11,1,4,11,3,1,11,4,6],[3,8,2,8,4,2,2,4,6],[2,0,4,2,4,6],[1,9,0,3,8,2,2,8,4,2,4,6],[9,4,1,1,4,2,4,6,2],[10,1,2,11,8,4,11,4,6],[10,1,2,11,3,6,6,3,0,6,0,4],[0,2,10,0,10,9,4,11,8,4,6,11],[2,11,3,6,9,4,6,10,9],[8,4,6,8,6,1,6,10,1,8,1,3],[1,0,10,10,0,6,0,4,6],[8,0,3,9,6,10,9,4,6],[10,4,6,10,9,4],[9,5,4,7,6,11],[4,9,5,3,0,8,11,7,6],[6,11,7,4,0,1,4,1,5],[6,11,7,4,8,5,5,8,3,5,3,1],[4,9,5,6,2,3,6,3,7],[9,5,4,8,7,0,0,7,6,0,6,2],[4,0,1,4,1,5,6,3,7,6,2,3],[7,4,8,5,2,1,5,6,2],[6,11,7,1,2,10,9,5,4],[11,7,6,8,3,0,1,2,10,9,5,4],[11,7,6,10,5,2,2,5,4,2,4,0],[7,4,8,2,11,3,10,5,6],[4,9,5,6,10,7,7,10,1,7,1,3],[5,6,10,0,9,1,8,7,4],[5,6,10,7,0,3,7,4,0],[10,5,6,4,8,7],[5,6,9,6,11,9,9,11,8],[0,9,5,0,5,3,3,5,6,3,6,11],[0,1,5,0,5,11,5,6,11,0,11,8],[11,3,6,6,3,5,3,1,5],[9,5,6,3,9,6,3,8,9,3,6,2],[5,6,9,9,6,0,6,2,0],[0,3,8,2,5,6,2,1,5],[1,6,2,1,5,6],[1,2,10,5,6,9,9,6,11,9,11,8],[1,0,9,6,10,5,11,3,2],[6,10,5,2,8,0,2,11,8],[3,2,11,10,5,6],[10,5,6,9,3,8,9,1,3],[0,9,1,5,6,10],[8,0,3,10,5,6],[10,5,6],[10,6,5],[8,3,0,10,6,5],[0,1,9,5,10,6],[10,6,5,9,8,3,9,3,1],[3,11,2,10,6,5],[6,5,10,2,0,8,2,8,11],[1,9,0,6,5,10,11,2,3],[1,10,2,5,9,6,9,11,6,9,8,11],[1,2,6,1,6,5],[0,8,3,2,6,5,2,5,1],[5,9,6,9,0,6,6,0,2],[9,6,5,3,6,9,3,9,8,3,2,6],[11,6,3,6,5,3,3,5,1],[0,5,1,0,11,5,5,11,6,0,8,11],[0,5,9,0,3,5,3,6,5,3,11,6],[5,9,6,6,9,11,9,8,11],[10,6,5,4,7,8],[5,10,6,7,3,0,7,0,4],[5,10,6,0,1,9,8,4,7],[4,5,9,6,7,10,7,1,10,7,3,1],[7,8,4,2,3,11,10,6,5],[11,6,7,10,2,5,2,4,5,2,0,4],[11,6,7,8,0,3,1,10,2,9,4,5],[6,7,11,1,10,2,9,4,5],[7,8,4,5,1,2,5,2,6],[4,1,0,4,5,1,6,7,3,6,3,2],[9,4,5,8,0,7,0,6,7,0,2,6],[4,5,9,6,3,2,6,7,3],[6,7,11,4,5,8,5,3,8,5,1,3],[6,7,11,4,1,0,4,5,1],[4,5,9,3,8,0,11,6,7],[9,4,5,7,11,6],[10,6,4,10,4,9],[8,3,0,9,10,6,9,6,4],[1,10,0,10,6,0,0,6,4],[8,6,4,8,1,6,6,1,10,8,3,1],[2,3,11,6,4,9,6,9,10],[0,10,2,0,9,10,4,8,11,4,11,6],[10,2,1,11,6,3,6,0,3,6,4,0],[10,2,1,11,4,8,11,6,4],[9,1,4,1,2,4,4,2,6],[1,0,9,3,2,8,2,4,8,2,6,4],[2,4,0,2,6,4],[3,2,8,8,2,4,2,6,4],[1,4,9,11,4,1,11,1,3,11,6,4],[0,9,1,4,11,6,4,8,11],[11,6,3,3,6,0,6,4,0],[8,6,4,8,11,6],[6,7,10,7,8,10,10,8,9],[9,3,0,6,3,9,6,9,10,6,7,3],[6,1,10,6,7,1,7,0,1,7,8,0],[6,7,10,10,7,1,7,3,1],[7,11,6,3,8,2,8,10,2,8,9,10],[11,6,7,10,0,9,10,2,0],[2,1,10,7,11,6,8,0,3],[1,10,2,6,7,11],[7,2,6,7,9,2,2,9,1,7,8,9],[1,0,9,3,6,7,3,2,6],[8,0,7,7,0,6,0,2,6],[2,7,3,2,6,7],[7,11,6,3,9,1,3,8,9],[9,1,0,11,6,7],[0,3,8,11,6,7],[11,6,7],[11,7,5,11,5,10],[3,0,8,7,5,10,7,10,11],[9,0,1,10,11,7,10,7,5],[3,1,9,3,9,8,7,10,11,7,5,10],[10,2,5,2,3,5,5,3,7],[5,10,2,8,5,2,8,7,5,8,2,0],[9,0,1,10,2,5,5,2,3,5,3,7],[1,10,2,5,8,7,5,9,8],[2,11,1,11,7,1,1,7,5],[0,8,3,2,11,1,1,11,7,1,7,5],[9,0,2,9,2,7,2,11,7,9,7,5],[11,3,2,8,5,9,8,7,5],[1,3,7,1,7,5],[8,7,0,0,7,1,7,5,1],[0,3,9,9,3,5,3,7,5],[9,7,5,9,8,7],[4,5,8,5,10,8,8,10,11],[3,0,4,3,4,10,4,5,10,3,10,11],[0,1,9,4,5,8,8,5,10,8,10,11],[5,9,4,1,11,3,1,10,11],[3,8,4,3,4,2,2,4,5,2,5,10],[10,2,5,5,2,4,2,0,4],[0,3,8,5,9,4,10,2,1],[2,1,10,9,4,5],[8,4,5,2,8,5,2,11,8,2,5,1],[3,2,11,1,4,5,1,0,4],[9,4,5,8,2,11,8,0,2],[11,3,2,9,4,5],[4,5,8,8,5,3,5,1,3],[5,0,4,5,1,0],[3,8,0,4,5,9],[9,4,5],[7,4,11,4,9,11,11,9,10],[3,0,8,7,4,11,11,4,9,11,9,10],[11,7,4,1,11,4,1,10,11,1,4,0],[8,7,4,11,1,10,11,3,1],[2,3,7,2,7,9,7,4,9,2,9,10],[4,8,7,0,10,2,0,9,10],[2,1,10,0,7,4,0,3,7],[10,2,1,8,7,4],[2,11,7,2,7,1,1,7,4,1,4,9],[3,2,11,4,8,7,9,1,0],[7,4,11,11,4,2,4,0,2],[2,11,3,7,4,8],[9,1,4,4,1,7,1,3,7],[1,0,9,8,7,4],[3,4,0,3,7,4],[8,7,4],[8,9,10,8,10,11],[0,9,3,3,9,11,9,10,11],[1,10,0,0,10,8,10,11,8],[10,3,1,10,11,3],[3,8,2,2,8,10,8,9,10],[9,2,0,9,10,2],[8,0,3,1,10,2],[10,2,1],[2,11,1,1,11,9,11,8,9],[11,3,2,0,9,1],[11,0,2,11,8,0],[11,3,2],[8,1,3,8,9,1],[9,1,0],[8,0,3],[]]}march(t,e,r,n){let o=!!n.fulltable,a=n.hasOwnProperty("origin")&&n.origin.hasOwnProperty("x")?n.origin:{x:0,y:0,z:0},s=!!n.voxel,l=n.matrix,c=n.nX||0,u=n.nY||0,h=n.nZ||0,d=n.scale||1,f=null;f=n.unitCube?n.unitCube:{x:d,y:d,z:d};let p,m,g=new Int32Array(c*u*h);for(p=0,m=g.length;p>2))+n+((2&e)>>1))*h+i+(1&e)]&this.ISDONE)<=3&&(e.push(e[n]),n=e.length-1,e.push(e[i]),i=e.length-1,e.push(e[o]),o=e.length-1),r.push(n),r.push(i),r.push(o)}}}laplacianSmooth(t,e,r){let n,i,o,a,s,l=new Array(e.length);for(n=0,i=e.length;n1e6&&(this.scaleFactor=this.defaultScaleFactor/2);let n=1/this.scaleFactor*5.5;this.pminx=t[0][0],this.pmaxx=t[1][0],this.pminy=t[0][1],this.pmaxy=t[1][1],this.pminz=t[0][2],this.pmaxz=t[1][2],e?(this.pminx-=this.probeRadius+n,this.pminy-=this.probeRadius+n,this.pminz-=this.probeRadius+n,this.pmaxx+=this.probeRadius+n,this.pmaxy+=this.probeRadius+n,this.pmaxz+=this.probeRadius+n):(this.pminx-=n,this.pminy-=n,this.pminz-=n,this.pmaxx+=n,this.pmaxy+=n,this.pmaxz+=n),this.pminx=Math.floor(this.pminx*this.scaleFactor)/this.scaleFactor,this.pminy=Math.floor(this.pminy*this.scaleFactor)/this.scaleFactor,this.pminz=Math.floor(this.pminz*this.scaleFactor)/this.scaleFactor,this.pmaxx=Math.ceil(this.pmaxx*this.scaleFactor)/this.scaleFactor,this.pmaxy=Math.ceil(this.pmaxy*this.scaleFactor)/this.scaleFactor,this.pmaxz=Math.ceil(this.pmaxz*this.scaleFactor)/this.scaleFactor,this.ptranx=-this.pminx,this.ptrany=-this.pminy,this.ptranz=-this.pminz,this.pLength=Math.ceil(this.scaleFactor*(this.pmaxx-this.pminx))+1,this.pWidth=Math.ceil(this.scaleFactor*(this.pmaxy-this.pminy))+1,this.pHeight=Math.ceil(this.scaleFactor*(this.pmaxz-this.pminz))+1,this.boundingatom(e),this.cutRadius=this.probeRadius*this.scaleFactor,this.vpBits=new Uint8Array(this.pLength*this.pWidth*this.pHeight),this.vpDistance=new Float64Array(this.pLength*this.pWidth*this.pHeight),this.vpAtomID=new Int32Array(this.pLength*this.pWidth*this.pHeight)}boundingatom(t){let e={};for(const r in this.vdwRadii){let n=this.vdwRadii[r];e[r]=t?(n+this.probeRadius)*this.scaleFactor+.5:n*this.scaleFactor+.5;let i=e[r]*e[r];this.widxz[r]=Math.floor(e[r])+1,this.depty[r]=new Int32Array(this.widxz[r]*this.widxz[r]);let o=0;for(let t=0;ti)this.depty[r][o]=-1;else{let t=Math.sqrt(i-n);this.depty[r][o]=Math.floor(t)}o++}}}fillvoxels(t,e){for(let t=0,e=this.vpBits.length;t=this.pLength||c>=this.pWidth||u>=this.pHeight)continue;let d=a*s+c*this.pHeight+u;if(this.vpBits[d]&this.INOUT){let a=e[this.vpAtomID[d]];if(a.serial!=t.serial){let e=r+f-Math.floor(.5+this.scaleFactor*(a.x+this.ptranx)),s=n+o-Math.floor(.5+this.scaleFactor*(a.y+this.ptrany)),l=i+p-Math.floor(.5+this.scaleFactor*(a.z+this.ptranz));f*f+o*o+p*p=this.pLength||c>=this.pWidth||u>=this.pHeight)continue;let d=a*s+c*this.pHeight+u;if(this.vpBits[d]&this.ISDONE){let a=e[this.vpAtomID[d]];if(a.serial!=t.serial){let e=n+f-Math.floor(.5+this.scaleFactor*(a.x+this.ptranx)),s=i+r-Math.floor(.5+this.scaleFactor*(a.y+this.ptrany)),l=o+p-Math.floor(.5+this.scaleFactor*(a.z+this.ptranz));f*f+r*r+p*p-1&&a-1&&l-1&&s=s)||(this.vpBits[t]|=this.ISBOUND))}fastoneshell(t,e){let r,n,i,o,a,s,l,c,u,h=[];if(0===t.length)return h;let d={ix:-1,iy:-1,iz:-1},f=this.pWidth*this.pHeight;for(let p=0,m=t.length;p-1&&d.iy-1&&d.iz-1&&(u=d.ix*f+this.pHeight*d.iy+d.iz,this.vpBits[u]&this.INOUT&&!(this.vpBits[u]&this.ISDONE)?(e.set(d.ix,d.iy,i+this.nb[t][2],c),o=d.ix-c.ix,a=d.iy-c.iy,s=d.iz-c.iz,l=o*o+a*a+s*s,this.vpDistance[u]=l,this.vpBits[u]|=this.ISDONE,this.vpBits[u]|=this.ISBOUND,h.push({ix:d.ix,iy:d.iy,iz:d.iz})):this.vpBits[u]&this.INOUT&&this.vpBits[u]&this.ISDONE&&(o=d.ix-c.ix,a=d.iy-c.iy,s=d.iz-c.iz,l=o*o+a*a+s*s,l-1&&d.iy-1&&d.iz-1&&(u=d.ix*f+this.pHeight*d.iy+d.iz,this.vpBits[u]&this.INOUT&&!(this.vpBits[u]&this.ISDONE)?(e.set(d.ix,d.iy,i+this.nb[t][2],c),o=d.ix-c.ix,a=d.iy-c.iy,s=d.iz-c.iz,l=o*o+a*a+s*s,this.vpDistance[u]=l,this.vpBits[u]|=this.ISDONE,this.vpBits[u]|=this.ISBOUND,h.push({ix:d.ix,iy:d.iy,iz:d.iz})):this.vpBits[u]&this.INOUT&&this.vpBits[u]&this.ISDONE&&(o=d.ix-c.ix,a=d.iy-c.iy,s=d.iz-c.iz,l=o*o+a*a+s*s,l-1&&d.iy-1&&d.iz-1&&(u=d.ix*f+this.pHeight*d.iy+d.iz,this.vpBits[u]&this.INOUT&&!(this.vpBits[u]&this.ISDONE)?(e.set(d.ix,d.iy,i+this.nb[t][2],c),o=d.ix-c.ix,a=d.iy-c.iy,s=d.iz-c.iz,l=o*o+a*a+s*s,this.vpDistance[u]=l,this.vpBits[u]|=this.ISDONE,this.vpBits[u]|=this.ISBOUND,h.push({ix:d.ix,iy:d.iy,iz:d.iz})):this.vpBits[u]&this.INOUT&&this.vpBits[u]&this.ISDONE&&(o=d.ix-c.ix,a=d.iy-c.iy,s=d.iz-c.iz,l=o*o+a*a+s*s,l{"use strict";r.r(e),r.d(e,{VolumeData:()=>l});var n=r("./src/utilities.ts"),i=r("./src/WebGL/math/index.ts"),o=r("./src/parsers/VASP.ts"),a=r("./src/parsers/CUBE.ts"),s=r("./node_modules/pako/dist/pako.esm.mjs");class l{constructor(t,e,r){if(this.unit={x:1,y:1,z:1},this.origin={x:0,y:0,z:0},this.size={x:0,y:0,z:0},this.data=new Float32Array([]),this.matrix=null,this.inversematrix=null,this.isbinary=new Set(["ccp4","CCP4"]),this.getCoordinates=function(t){var e=t/(this.size.y*this.size.z),r=t%(this.size.y*this.size.z),n=t%this.size.z;return e*=this.unit.x,r*=this.unit.y,n*=this.unit.z,{x:e+=this.origin.x,y:r+=this.origin.y,z:n+=this.origin.z}},this.vasp=function(t){var e=t.replace(/^\s+/,"").split(/[\n\r]/),r=(0,o.VASP)(t)[0].length;if(0==r)return console.log("No good formating of CHG or CHGCAR file, not atomic information provided in the file."),void(this.data=[]);var n,a=1.889725992,s=parseFloat(e[1]);n=e[2].replace(/^\s+/,"").split(/\s+/);var l=new i.Vector3(parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2])).multiplyScalar(s*a);n=e[3].replace(/^\s+/,"").split(/\s+/);var c=new i.Vector3(parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2])).multiplyScalar(s*a);n=e[4].replace(/^\s+/,"").split(/\s+/);var u=new i.Vector3(parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2])).multiplyScalar(s*a),h=l.x*(c.y*u.z-u.y*c.z)-c.x*(l.y*u.z-u.y*l.z)+u.x*(l.y*c.z-c.y*l.z),d=1/(h=Math.abs(h)/Math.pow(a,3));e.splice(0,8+r+1);var f=e[0].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),p=Math.abs(parseFloat(f[0])),m=Math.abs(parseFloat(f[1])),g=Math.abs(parseFloat(f[2])),v=this.origin=new i.Vector3(0,0,0);this.size={x:p,y:m,z:g},this.unit=new i.Vector3(l.x,c.y,u.z),l=l.multiplyScalar(1/(a*p)),c=c.multiplyScalar(1/(a*m)),u=u.multiplyScalar(1/(a*g)),0==l.y&&0==l.z&&0==c.x&&0==c.z&&0==u.x&&0==u.y||(this.matrix=new i.Matrix4(l.x,c.x,u.x,0,l.y,c.y,u.y,0,l.z,c.z,u.z,0,0,0,0,1),this.matrix=this.matrix.multiplyMatrices(this.matrix,(new i.Matrix4).makeTranslation(v.x,v.y,v.z)),this.origin=new i.Vector3(0,0,0),this.unit=new i.Vector3(1,1,1)),e.splice(0,1);var b=e.join(" "),y=(b=b.replace(/^\s+/,"")).split(/[\s\r]+/);y.splice(p*m*g+1);for(var x=Float32Array.from(y,parseFloat),_=0;_=this.size.x||e<0||e>=this.size.y||r<0||r>=this.size.z?-1:t*this.size.y*this.size.z+e*this.size.z+r}getVal(t,e,r){let n=this.getIndex(t,e,r);return n<0?0:this.data[n]}cube(t){var e=t.split(/\r?\n/);if(!(e.length<6)){var r=(0,a.CUBE)(t,{}).modelData[0].cryst,n=e[2].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),i=parseFloat(n[0]),o=Math.abs(i);this.origin=r.origin,this.size=r.size,this.unit=r.unit,this.matrix=r.matrix4;var s=6;i<0&&s++;var l=e.splice(o+s).join(" "),c=(l=l.replace(/^\s+/,"")).split(/[\s\r]+/);this.data=Float32Array.from(c,parseFloat)}}ccp4(t){var e={};t=new Int8Array(t);var r=new Int32Array(t.buffer,0,56),n=new Float32Array(t.buffer,0,56),o=new DataView(t.buffer);if(e.MAP=String.fromCharCode(o.getUint8(208),o.getUint8(209),o.getUint8(210),o.getUint8(211)),e.MACHST=[o.getUint8(212),o.getUint8(213)],17===e.MACHST[0]&&17===e.MACHST[1])for(var a=t.byteLength,s=0;s{"use strict";r.r(e),r.d(e,{GLVolumetricRender:()=>l});var n=r("./src/WebGL/shapes/index.ts"),i=r("./src/WebGL/math/index.ts"),o=r("./src/WebGL/index.ts"),a=r("./src/colors.ts"),s=r("./src/GLShape.ts");class l{static interpolateArray(t,e){function r(t,e,r){return t+(e-t)*r}var n=[],i=(t.length-1)/(e-1);n[0]=t[0];for(var o=1;o=0||t.getIndex(u,h,d)>=0)for(let e=s;e=0&&!r[s]&&(e-a.x)*(e-a.x)+(n-a.y)*(n-a.y)+(o-a.z)*(o-a.z){"use strict";r.r(e),r.d(e,{Camera:()=>o});var n=r("./src/WebGL/core/index.ts"),i=r("./src/WebGL/math/index.ts");class o extends n.Object3D{constructor(t=50,e=1,r=.1,n=2e3,o=!1){super(),this.projectionMatrix=new i.Matrix4,this.projectionMatrixInverse=new i.Matrix4,this.matrixWorldInverse=new i.Matrix4,this.fov=t,this.aspect=e,this.near=r,this.far=n;var a=this.position.z;this.right=a*Math.tan(Math.PI/180*t),this.left=-this.right,this.top=this.right/this.aspect,this.bottom=-this.top,this.ortho=!!o,this.updateProjectionMatrix()}lookAt(t){this.matrix.lookAt(this.position,t,this.up),this.rotationAutoUpdate&&(!1===this.useQuaternion&&this.rotation instanceof i.Vector3?this.rotation.setEulerFromRotationMatrix(this.matrix,this.eulerOrder):console.error("Unimplemented math operation."))}updateProjectionMatrix(){this.ortho?this.projectionMatrix.makeOrthographic(this.left,this.right,this.top,this.bottom,this.near,this.far):this.projectionMatrix.makePerspective(this.fov,this.aspect,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)}}},"./src/WebGL/Fog.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Fog:()=>i});var n=r("./src/colors.ts");class i{constructor(t,e=1,r=1e3){this.name="",this.color=new n.Color(t),this.near=e,this.far=r}clone(){return new i(this.color.getHex(),this.near,this.far)}}},"./src/WebGL/Renderer.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Renderer:()=>f});var n=r("./src/WebGL/Camera.ts"),i=r("./src/WebGL/constants/Sides.ts"),o=r("./src/WebGL/constants/TextureConstants.ts"),a=r("./src/WebGL/core/index.ts"),s=r("./src/colors.ts"),l=r("./src/WebGL/materials/index.ts"),c=r("./src/WebGL/math/index.ts"),u=r("./src/WebGL/objects/index.ts"),h=r("./src/WebGL/shaders/index.ts"),d=r("./src/WebGL/SpritePlugin.ts");class f{constructor(t){this.context=null,this.devicePixelRatio=1,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.autoUpdateObjects=!0,this.autoUpdateScene=!0,this.info={memory:{programs:0,geometries:0,textures:0},render:{calls:0,vertices:0,faces:0,points:0}},this._programs=[],this._programs_counter=0,this._webglversion=1,this._currentProgram=null,this._currentMaterialId=-1,this._currentGeometryGroupHash=null,this._currentCamera=null,this._geometryGroupCounter=0,this._oldDoubleSided=-1,this._oldFlipSided=-1,this._oldDepthTest=-1,this._oldDepthWrite=-1,this._oldPolygonOffset=null,this._oldLineWidth=null,this._viewportWidth=0,this._viewportHeight=0,this._currentWidth=0,this._currentHeight=0,this._enabledAttributes={},this._projScreenMatrix=new c.Matrix4,this._vector3=new c.Vector3,this._worldInverse=new c.Matrix4,this._projInverse=new c.Matrix4,this._textureMatrix=new c.Matrix4,this._direction=new c.Vector3,this._lightsNeedUpdate=!0,this._lights={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[],distances:[]},spot:{length:0,colors:[],positions:[],distances:[],directions:[],anglesCos:[],exponents:[]},hemi:{length:0,skyColors:[],groundColors:[],positions:[]}},this.sprites=new d.SpritePlugin,this._screenshader=null,this._vertexattribpos=null,this._screenQuadVBO=null,this._fb=null,this._targetTexture=null,this._depthTexture=null,t=t||{},this.row=t.row,this.col=t.col,this.rows=t.rows,this.cols=t.cols,this._canvas=void 0!==t.canvas?t.canvas:document.createElement("canvas"),this._precision=void 0!==t.precision?t.precision:"highp",this._alpha=void 0===t.alpha||t.alpha,this._premultipliedAlpha=void 0===t.premultipliedAlpha||t.premultipliedAlpha,this._antialias=void 0!==t.antialias&&t.antialias,this._stencil=void 0===t.stencil||t.stencil,this._preserveDrawingBuffer=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,this._clearColor=void 0!==t.clearColor?new s.Color(t.clearColor):new s.Color(0),this._clearAlpha=void 0!==t.clearAlpha?t.clearAlpha:0,this._outlineMaterial=new l.MeshOutlineMaterial(t.outline),this._outlineSphereImposterMaterial=new l.SphereImposterOutlineMaterial(t.outline),this._outlineStickImposterMaterial=new l.StickImposterOutlineMaterial(t.outline),this._outlineEnabled=!!t.outline,this.domElement=this._canvas,this._canvas.id=t.id,this.initGL(),this.setDefaultGLState(),this.context=this._gl,this.isWebGL1()?this._extInstanced=this._gl.getExtension("ANGLE_instanced_arrays"):this._extInstanced={vertexAttribDivisorANGLE:this._gl.vertexAttribDivisor.bind(this._gl),drawElementsInstancedANGLE:this._gl.drawElementsInstanced.bind(this._gl)},this._extFragDepth=this._gl.getExtension("EXT_frag_depth"),this._extFloatLinear=this._gl.getExtension("OES_texture_float_linear"),this._extColorBufferFloat=this._gl.getExtension("EXT_color_buffer_float"),this.sprites.init(this)}supportedExtensions(){return{supportsAIA:Boolean(this._extInstanced),supportsImposters:Boolean(this._extFragDepth)||!this.isWebGL1(),regen:!1}}getContext(){return this._gl}getCanvas(){return this._canvas}isLost(){return this._gl.isContextLost()}getPrecision(){return this._precision}setClearColorHex(t,e){this._clearColor.setHex(t),this._clearAlpha=e,this._gl.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearAlpha)}enableOutline(t){this._outlineMaterial=new l.MeshOutlineMaterial(t),this._outlineSphereImposterMaterial=new l.SphereImposterOutlineMaterial(t),this._outlineStickImposterMaterial=new l.StickImposterOutlineMaterial(t),this._outlineEnabled=!0}disableOutline(){this._outlineEnabled=!1}setViewport(){if(null!=this.rows&&null!=this.cols&&null!=this.row&&null!=this.col){var t=this._canvas.width/this.cols,e=this._canvas.height/this.rows;this._viewportWidth=t,this._viewportHeight=e,this._gl.enable(this._gl.SCISSOR_TEST),this._gl.scissor(t*this.col,e*this.row,t,e),this._gl.viewport(t*this.col,e*this.row,t,e)}}setSize(t,e){if(this.devicePixelRatio=void 0!==window.devicePixelRatio?window.devicePixelRatio:1,this._antialias&&this.devicePixelRatio<2&&(this.devicePixelRatio*=2),null!=this.rows&&null!=this.cols&&null!=this.row&&null!=this.col){var r=t/this.cols,n=e/this.rows;this._canvas.width=t*this.devicePixelRatio,this._canvas.height=e*this.devicePixelRatio,this._viewportWidth=r*this.devicePixelRatio,this._viewportHeight=n*this.devicePixelRatio,this._canvas.style.width=t+"px",this._canvas.style.height=e+"px",this.setViewport()}else this._viewportWidth=this._canvas.width=t*this.devicePixelRatio,this._viewportHeight=this._canvas.height=e*this.devicePixelRatio,this._canvas.style.width=t+"px",this._canvas.style.height=e+"px",this._gl.viewport(0,0,this._gl.drawingBufferWidth,this._gl.drawingBufferHeight);this.initFrameBuffer()}clear(t,e,r){var n=0;(void 0===t||t)&&(n|=this._gl.COLOR_BUFFER_BIT),(void 0===e||e)&&(n|=this._gl.DEPTH_BUFFER_BIT),(void 0===r||r)&&(n|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(n)}clearTarget(t,e,r){this.clear(t,e,r)}setMaterialFaces(t,e){var r=t.side===i.DoubleSide,n=t.side===i.BackSide;t.imposter||(n=e?!n:n),this._oldDoubleSided!==r&&(r?this._gl.disable(this._gl.CULL_FACE):this._gl.enable(this._gl.CULL_FACE),this._oldDoubleSided=r),this._oldFlipSided!==n&&(n?this._gl.frontFace(this._gl.CW):this._gl.frontFace(this._gl.CCW),this._oldFlipSided=n),this._gl.cullFace(this._gl.BACK)}setDepthTest(t){this._oldDepthTest!==t&&(t?this._gl.enable(this._gl.DEPTH_TEST):this._gl.disable(this._gl.DEPTH_TEST),this._oldDepthTest=t)}setDepthWrite(t){this._oldDepthWrite!==t&&(this._gl.depthMask(t),this._oldDepthWrite=t)}setBlending(t){t?(this._gl.enable(this._gl.BLEND),this._gl.blendEquationSeparate(this._gl.FUNC_ADD,this._gl.FUNC_ADD),this._gl.blendFuncSeparate(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA)):this._gl.disable(this._gl.BLEND)}initMaterial(t,e,r,n){var i,o;if(t.addEventListener("dispose",this.onMaterialDispose.bind(this)),o=t.shaderID){var a=h.ShaderLib[o];t.vertexShader=a.vertexShader,t.fragmentShader=a.fragmentShader,t.uniforms=h.ShaderUtils.clone(a.uniforms)}i={wireframe:t.wireframe,fragdepth:t.imposter,volumetric:t.volumetric},t.program=this.buildProgram(t.fragmentShader,t.vertexShader,t.uniforms,i)}renderBuffer(t,e,r,n,i,o){var a,s;if(n.visible&&(a=this.setProgram(t,e,r,n,o,this))){s=a.attributes;var l,c,h=!1,d=n.wireframe?1:0,f=16777215*i.id+2*a.id+d;if(f!==this._currentGeometryGroupHash&&(this._currentGeometryGroupHash=f,h=!0),h&&(this.disableAttributes(),s.position>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglVertexBuffer),this.enableAttribute(s.position),this._gl.vertexAttribPointer(s.position,3,this._gl.FLOAT,!1,0,0)),s.color>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglColorBuffer),this.enableAttribute(s.color),this._gl.vertexAttribPointer(s.color,3,this._gl.FLOAT,!1,0,0)),s.normal>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglNormalBuffer),this.enableAttribute(s.normal),this._gl.vertexAttribPointer(s.normal,3,this._gl.FLOAT,!1,0,0)),s.offset>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglOffsetBuffer),this.enableAttribute(s.offset),this._gl.vertexAttribPointer(s.offset,3,this._gl.FLOAT,!1,0,0)),s.radius>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglRadiusBuffer),this.enableAttribute(s.radius),this._gl.vertexAttribPointer(s.radius,1,this._gl.FLOAT,!1,0,0))),o instanceof u.Mesh){if("instanced"===n.shaderID){var p=n.sphere.geometryGroups[0];h&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglVertexBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,p.vertexArray,this._gl.STATIC_DRAW),this._gl.bindBuffer(this._gl.ARRAY_BUFFER,i.__webglNormalBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,p.normalArray,this._gl.STATIC_DRAW),this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,i.__webglFaceBuffer),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,p.faceArray,this._gl.STATIC_DRAW)),l=p.faceidx,this._extInstanced.vertexAttribDivisorANGLE(s.offset,1),this._extInstanced.vertexAttribDivisorANGLE(s.radius,1),this._extInstanced.vertexAttribDivisorANGLE(s.color,1),this._extInstanced.drawElementsInstancedANGLE(this._gl.TRIANGLES,l,this._gl.UNSIGNED_SHORT,0,i.radiusArray.length),this._extInstanced.vertexAttribDivisorANGLE(s.offset,0),this._extInstanced.vertexAttribDivisorANGLE(s.radius,0),this._extInstanced.vertexAttribDivisorANGLE(s.color,0)}else n.wireframe?(c=i.lineidx,this.setLineWidth(n.wireframeLinewidth),h&&this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,i.__webglLineBuffer),this._gl.drawElements(this._gl.LINES,c,this._gl.UNSIGNED_SHORT,0)):(l=i.faceidx,h&&this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,i.__webglFaceBuffer),this._gl.drawElements(this._gl.TRIANGLES,l,this._gl.UNSIGNED_SHORT,0));this.info.render.calls++,this.info.render.vertices+=l,this.info.render.faces+=l/3}else o instanceof u.Line&&(c=i.vertices,this.setLineWidth(n.linewidth),this._gl.drawArrays(this._gl.LINES,0,c),this.info.render.calls++)}}render(t,e,r){if(e instanceof n.Camera!=0){var i,o,a,s,l,c=t.__lights,u=t.fog;this._currentMaterialId=-1,this._lightsNeedUpdate=!0,this.autoUpdateScene&&t.updateMatrixWorld(),void 0===e.parent&&e.updateMatrixWorld(),e.matrixWorldInverse.getInverse(e.matrixWorld),this._projScreenMatrix.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this.autoUpdateObjects&&this.initWebGLObjects(t),this.info.render.calls=0,this.info.render.vertices=0,this.info.render.faces=0,this.info.render.points=0,this._currentWidth=this._viewportWidth,this._currentHeight=this._viewportHeight,this.setViewport(),this.setFrameBuffer(),(this.autoClear||r)&&(this._gl.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearAlpha),this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil));var h=!1;for(i=0,o=(l=t.__webglObjects).length;i=0;--r)t[r].object===e&&t.splice(r,1)}removeInstancesDirect(t,e){for(var r=t.length-1;r>=0;--r)t[r]===e&&t.splice(r,1)}unrollBufferMaterial(t){var e=t.object.material;if(e.volumetric)t.opaque=null,t.transparent=null,t.volumetric=e;else if(e.transparent){if(t.opaque=null,t.volumetric=null,t.transparent=e,!e.wireframe){var r=e.clone();r.opacity=0,t.blank=r}}else t.opaque=e,t.transparent=null,t.volumetric=null}setBuffers(t,e){var r=t.vertexArray,n=t.colorArray;if(void 0!==t.__webglOffsetBuffer?(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglOffsetBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,r,e)):(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglVertexBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,r,e)),this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglColorBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,n,e),t.normalArray&&void 0!==t.__webglNormalBuffer){var i=t.normalArray;this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglNormalBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,i,e)}if(t.radiusArray&&void 0!==t.__webglRadiusBuffer&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,t.__webglRadiusBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,t.radiusArray,e)),t.faceArray&&void 0!==t.__webglFaceBuffer){var o=t.faceArray;this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,t.__webglFaceBuffer),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,o,e)}if(t.lineArray&&void 0!==t.__webglLineBuffer){var a=t.lineArray;this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,t.__webglLineBuffer),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,a,e)}}createMeshBuffers(t){t.radiusArray&&(t.__webglRadiusBuffer=this._gl.createBuffer()),t.useOffset&&(t.__webglOffsetBuffer=this._gl.createBuffer()),t.__webglVertexBuffer=this._gl.createBuffer(),t.__webglNormalBuffer=this._gl.createBuffer(),t.__webglColorBuffer=this._gl.createBuffer(),t.__webglFaceBuffer=this._gl.createBuffer(),t.__webglLineBuffer=this._gl.createBuffer(),this.info.memory.geometries++}createLineBuffers(t){t.__webglVertexBuffer=this._gl.createBuffer(),t.__webglColorBuffer=this._gl.createBuffer(),this.info.memory.geometries++}addBuffer(t,e,r){t.push({buffer:e,object:r,opaque:null,transparent:null})}setupMatrices(t,e){t._modelViewMatrix.multiplyMatrices(e.matrixWorldInverse,t.matrixWorld),t._normalMatrix.getInverse(t._modelViewMatrix),t._normalMatrix.transpose()}filterFallback(t){return this._gl.LINEAR}setTextureParameters(t,e){t==this._gl.TEXTURE_2D?(this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(t,this._gl.TEXTURE_MAG_FILTER,this.filterFallback(e.magFilter)),this._gl.texParameteri(t,this._gl.TEXTURE_MIN_FILTER,this.filterFallback(e.minFilter))):(this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(t,this._gl.TEXTURE_WRAP_R,this._gl.CLAMP_TO_EDGE),this._extColorBufferFloat&&this._extFloatLinear?(this._gl.texParameteri(t,this._gl.TEXTURE_MAG_FILTER,this._gl.LINEAR),this._gl.texParameteri(t,this._gl.TEXTURE_MIN_FILTER,this._gl.LINEAR)):(this._gl.texParameteri(t,this._gl.TEXTURE_MAG_FILTER,this._gl.NEAREST),this._gl.texParameteri(t,this._gl.TEXTURE_MIN_FILTER,this._gl.NEAREST)))}paramToGL(t){return t===o.UnsignedByteType?this._gl.UNSIGNED_BYTE:t===o.RGBAFormat?this._gl.RGBA:t===o.NearestFilter?this._gl.NEAREST:0}setupLights(t,e){var r,n,i,o,s,l=this._lights,c=l.directional.colors,u=l.directional.positions,h=0,d=0;for(r=0,n=e.length;r{"use strict";r.r(e),r.d(e,{SpritePlugin:()=>i});var n=r("./src/WebGL/shaders/index.ts");class i{constructor(){this.sprite={vertices:null,faces:null,vertexBuffer:null,elementBuffer:null,program:null,attributes:{},uniforms:null}}init(t){this.gl=t.context,this.renderer=t,this.precision=t.getPrecision(),this.sprite.vertices=new Float32Array(16),this.sprite.faces=new Uint16Array(6);var e=0;this.sprite.vertices[e++]=-1,this.sprite.vertices[e++]=-1,this.sprite.vertices[e++]=0,this.sprite.vertices[e++]=0,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=-1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=0,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=-1,this.sprite.vertices[e++]=1,this.sprite.vertices[e++]=0,this.sprite.vertices[e++]=1,e=0,this.sprite.faces[e++]=0,this.sprite.faces[e++]=1,this.sprite.faces[e++]=2,this.sprite.faces[e++]=0,this.sprite.faces[e++]=2,this.sprite.faces[e++]=3,this.sprite.vertexBuffer=this.gl.createBuffer(),this.sprite.elementBuffer=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.sprite.vertexBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,this.sprite.vertices,this.gl.STATIC_DRAW),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.sprite.elementBuffer),this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,this.sprite.faces,this.gl.STATIC_DRAW),this.sprite.program=this.createProgram(n.ShaderLib.sprite,this.precision||1),this.sprite.attributes={};const r={};this.sprite.attributes.position=this.gl.getAttribLocation(this.sprite.program,"position"),this.sprite.attributes.uv=this.gl.getAttribLocation(this.sprite.program,"uv"),r.uvOffset=this.gl.getUniformLocation(this.sprite.program,"uvOffset"),r.uvScale=this.gl.getUniformLocation(this.sprite.program,"uvScale"),r.rotation=this.gl.getUniformLocation(this.sprite.program,"rotation"),r.scale=this.gl.getUniformLocation(this.sprite.program,"scale"),r.alignment=this.gl.getUniformLocation(this.sprite.program,"alignment"),r.color=this.gl.getUniformLocation(this.sprite.program,"color"),r.map=this.gl.getUniformLocation(this.sprite.program,"map"),r.opacity=this.gl.getUniformLocation(this.sprite.program,"opacity"),r.useScreenCoordinates=this.gl.getUniformLocation(this.sprite.program,"useScreenCoordinates"),r.screenPosition=this.gl.getUniformLocation(this.sprite.program,"screenPosition"),r.modelViewMatrix=this.gl.getUniformLocation(this.sprite.program,"modelViewMatrix"),r.projectionMatrix=this.gl.getUniformLocation(this.sprite.program,"projectionMatrix"),r.fogType=this.gl.getUniformLocation(this.sprite.program,"fogType"),r.fogDensity=this.gl.getUniformLocation(this.sprite.program,"fogDensity"),r.fogNear=this.gl.getUniformLocation(this.sprite.program,"fogNear"),r.fogFar=this.gl.getUniformLocation(this.sprite.program,"fogFar"),r.fogColor=this.gl.getUniformLocation(this.sprite.program,"fogColor"),r.alphaTest=this.gl.getUniformLocation(this.sprite.program,"alphaTest"),this.sprite.uniforms=r}render(t,e,r,n,i){var a,s,l,c,u,h,d,f,p,m;if(!this.gl)throw new Error("WebGLRenderer not initialized");let g=[];null===(a=null==t?void 0:t.__webglSprites)||void 0===a||a.forEach((t=>{(i&&0==t.material.depthTest||!i&&t.material.depthTest)&&g.push(t)}));let v=g.length;if(!v)return;const b=this.sprite.attributes,y=this.sprite.uniforms;if(!y)throw new Error("Uniforms not defined");var x=.5*r,_=.5*n;this.gl.useProgram(this.sprite.program),this.gl.enableVertexAttribArray(b.position),this.gl.enableVertexAttribArray(b.uv),this.gl.disable(this.gl.CULL_FACE),this.gl.enable(this.gl.BLEND),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.sprite.vertexBuffer),this.gl.vertexAttribPointer(b.position,2,this.gl.FLOAT,!1,16,0),this.gl.vertexAttribPointer(b.uv,2,this.gl.FLOAT,!1,16,8),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.sprite.elementBuffer),this.gl.uniformMatrix4fv(y.projectionMatrix,!1,e.projectionMatrix.elements),this.gl.activeTexture(this.gl.TEXTURE0),this.gl.uniform1i(y.map,0);var w,k=0,A=0,M=t.fog;let T,S,C,E;M?(this.gl.uniform3f(y.fogColor,M.color.r,M.color.g,M.color.b),this.gl.uniform1f(y.fogNear,M.near),this.gl.uniform1f(y.fogFar,M.far),this.gl.uniform1i(y.fogType,1),k=1,A=1):(this.gl.uniform1i(y.fogType,0),k=0,A=0);let L=[];for(w=0;w{"use strict";var n;r.r(e),r.d(e,{Coloring:()=>n}),function(t){t[t.NoColors=0]="NoColors",t[t.FaceColors=1]="FaceColors",t[t.VertexColors=2]="VertexColors"}(n||(n={}))},"./src/WebGL/constants/Shading.ts":(t,e,r)=>{"use strict";var n;r.r(e),r.d(e,{Shading:()=>n}),function(t){t[t.NoShading=0]="NoShading",t[t.FlatShading=1]="FlatShading",t[t.SmoothShading=2]="SmoothShading"}(n||(n={}))},"./src/WebGL/constants/Sides.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BackSide:()=>i,DoubleSide:()=>o,FrontSide:()=>n});const n=0,i=1,o=2},"./src/WebGL/constants/SpriteAlignment.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SpriteAlignment:()=>i});var n=r("./src/WebGL/math/index.ts");const i={topLeft:new n.Vector2(1,-1),topCenter:new n.Vector2(0,-1),topRight:new n.Vector2(-1,-1),centerLeft:new n.Vector2(1,0),center:new n.Vector2(0,0),centerRight:new n.Vector2(-1,0),bottomLeft:new n.Vector2(1,1),bottomCenter:new n.Vector2(0,1),bottomRight:new n.Vector2(-1,1)}},"./src/WebGL/constants/TextureConstants.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ClampToEdgeWrapping:()=>n,FloatType:()=>l,LinearFilter:()=>i,LinearMipMapLinearFilter:()=>a,NearestFilter:()=>o,R32Format:()=>h,RFormat:()=>u,RGBAFormat:()=>c,UnsignedByteType:()=>s});const n=1001,i=1006,o=1007,a=1008,s=1009,l=1010,c=1021,u=1022,h=1023},"./src/WebGL/constants/TextureOperations.ts":(t,e,r)=>{"use strict";var n;r.r(e),r.d(e,{TextureOperations:()=>n}),function(t){t[t.MultiplyOperation=0]="MultiplyOperation",t[t.MixOperation=1]="MixOperation",t[t.AddOperation=2]="AddOperation"}(n||(n={}))},"./src/WebGL/constants/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BackSide:()=>i.BackSide,ClampToEdgeWrapping:()=>s.ClampToEdgeWrapping,Coloring:()=>n.Coloring,DoubleSide:()=>i.DoubleSide,FloatType:()=>s.FloatType,FrontSide:()=>i.FrontSide,LinearFilter:()=>s.LinearFilter,LinearMipMapLinearFilter:()=>s.LinearMipMapLinearFilter,NearestFilter:()=>s.NearestFilter,R32Format:()=>s.R32Format,RFormat:()=>s.RFormat,RGBAFormat:()=>s.RGBAFormat,Shading:()=>o.Shading,SpriteAlignment:()=>a.SpriteAlignment,TextureOperations:()=>l.TextureOperations,UnsignedByteType:()=>s.UnsignedByteType});var n=r("./src/WebGL/constants/Coloring.ts"),i=r("./src/WebGL/constants/Sides.ts"),o=r("./src/WebGL/constants/Shading.ts"),a=r("./src/WebGL/constants/SpriteAlignment.ts"),s=r("./src/WebGL/constants/TextureConstants.ts"),l=r("./src/WebGL/constants/TextureOperations.ts")},"./src/WebGL/core/EventDispatcher.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{EventDispatcher:()=>n});class n{constructor(){this.listeners={}}dispatchEvent(t){var e=this.listeners[t.type];if(void 0!==e){t.target=this;for(var r=0,n=e.length;r{"use strict";r.r(e),r.d(e,{Geometry:()=>l,GeometryGroup:()=>s,GeometryIDCount:()=>c});var n=r("./src/WebGL/materials/LineBasicMaterial.ts"),i=r("./src/WebGL/core/EventDispatcher.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/colors.ts");class s{constructor(t=0){this.vertexArray=null,this.colorArray=null,this.normalArray=null,this.radiusArray=null,this.faceArray=null,this.lineArray=null,this.vertices=0,this.faceidx=0,this.lineidx=0,this.__inittedArrays=!1,this.id=t}setColors(t){var e=this.vertexArray,r=this.colorArray;if(!e)throw new Error("vertex array not initialized");if(!r)throw new Error("color array not initialized");if(e.length==r.length)for(var n=0;n0?this.lineArray=(null==a?void 0:a.subarray(0,this.lineidx))||null:this.lineArray=new Uint16Array(0)):(this.normalArray=new Float32Array(0),this.faceArray=new Uint16Array(0),this.lineArray=new Uint16Array(0)),s&&(this.radiusArray=s.subarray(0,this.vertices)),e&&(this.normalArray&&(this.normalArray=new Float32Array(this.normalArray)),this.faceArray&&(this.faceArray=new Uint16Array(this.faceArray)),this.lineArray&&(this.lineArray=new Uint16Array(this.lineArray)),this.vertexArray&&(this.vertexArray=new Float32Array(this.vertexArray)),this.colorArray&&(this.colorArray=new Float32Array(this.colorArray)),this.radiusArray&&(this.radiusArray=new Float32Array(this.radiusArray))),this.__inittedArrays=!0}}class l extends i.EventDispatcher{constructor(t=!1,e=!1,r=!1){super(),this.name="",this.hasTangents=!1,this.dynamic=!0,this.verticesNeedUpdate=!1,this.elementsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.buffersNeedUpdate=!1,this.imposter=!1,this.instanced=!1,this.geometryGroups=[],this.groups=0,this.id=c++,this.mesh=t,this.radii=e,this.offset=r}updateGeoGroup(t=0){var e,r=this.groups>0?this.geometryGroups[this.groups-1]:null;return(!r||r.vertices+t>((null===(e=null==r?void 0:r.vertexArray)||void 0===e?void 0:e.length)||0)/3)&&(r=this.addGeoGroup()),r}vrml(t,e){for(var r="",n=this.geometryGroups.length,i=0;i{"use strict";r.r(e),r.d(e,{Light:()=>l,Object3D:()=>a,Object3DIDCount:()=>o,Scene:()=>s});var n=r("./src/WebGL/math/index.ts"),i=r("./src/colors.ts");let o=0;class a{constructor(){this.id=o++,this.name="",this.children=[],this.position=new n.Vector3,this.rotation=new n.Vector3,this.matrix=new n.Matrix4,this.matrixWorld=new n.Matrix4,this.quaternion=new n.Quaternion,this.eulerOrder="XYZ",this.up=new n.Vector3(0,1,0),this.scale=new n.Vector3(1,1,1),this.matrixAutoUpdate=!0,this.matrixWorldNeedsUpdate=!0,this.rotationAutoUpdate=!0,this.useQuaternion=!1,this.visible=!0}lookAt(t){this.matrix.lookAt(t,this.position,this.up),this.rotationAutoUpdate&&(!0===this.useQuaternion?console.error("Unimplemented math operation."):this.rotation instanceof n.Vector3&&this.rotation.setEulerFromRotationMatrix(this.matrix,this.eulerOrder))}add(t){if(t!==this){t.parent=this,this.children.push(t);for(var e=this;void 0!==e.parent;)e=e.parent;void 0!==e&&e instanceof s&&e.__addObject(t)}else console.error("Can't add $3Dmol.Object3D to itself")}remove(t){var e=this.children.indexOf(t);if(-1!==e){t.parent=void 0,this.children.splice(e,1);for(var r=this;void 0!==r.parent;)r=r.parent;void 0!==r&&r instanceof s&&r.__removeObject(t)}}vrml(t){t||(t=" ");var e=2*Math.atan2(this.quaternion.lengthxyz(),this.quaternion.w),r=0,n=0,i=0;if(0!=e){let t=Math.sin(e/2);r=this.quaternion.x/t,n=this.quaternion.y/t,i=this.quaternion.z/t}var o=t+"Transform {\n"+t+" center "+this.position.x+" "+this.position.y+" "+this.position.z+"\n"+t+" rotation "+r+" "+n+" "+i+" "+e+"\n"+t+" children [\n";this.geometry&&(o+=this.geometry.vrml(t,this.material));for(var a=0;a{"use strict";r.r(e),r.d(e,{Projector:()=>i});const n=new(r("./src/WebGL/math/index.ts").Matrix4);class i{static unprojectVector(t,e){return e.projectionMatrixInverse.getInverse(e.projectionMatrix),n.multiplyMatrices(e.matrixWorld,e.projectionMatrixInverse),t.applyProjection(n)}static projectVector(t,e){return e.matrixWorldInverse.getInverse(e.matrixWorld),n.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),t.applyProjection(n)}projectVector(t,e){return i.projectVector(t,e)}unprojectVector(t,e){return i.unprojectVector(t,e)}}},"./src/WebGL/core/Raycaster.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Raycaster:()=>s,intersectObject:()=>v});var n=r("./src/WebGL/math/index.ts"),i=r("./src/WebGL/shapes/index.ts");const o=(t,e)=>t.distance-e.distance,a=new n.Matrix4;class s{constructor(t,e,r,i){this.precision=1e-4,this.linePrecision=.2,this.ray=new n.Ray(t,e),this.ray.direction.lengthSq()>0&&this.ray.direction.normalize(),this.near=i||0,this.far=r||1/0}set(t,e){this.ray.set(t,e)}setFromCamera(t,e){e.ortho?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,t.z),e.projectionMatrixInverse.getInverse(e.projectionMatrix),a.multiplyMatrices(e.matrixWorld,e.projectionMatrixInverse),this.ray.direction.applyProjection(a),this.ray.direction.sub(this.ray.origin).normalize())}intersectObjects(t,e){for(var r=[],n=0,i=e.length;nMath.min(Math.max(t,-1),1);var c=new i.Sphere,u=new i.Cylinder,h=new i.Triangle,d=new n.Vector3,f=new n.Vector3,p=new n.Vector3,m=new n.Vector3,g=new n.Vector3;function v(t,e,r,n){if(g.getPositionFromMatrix(t.matrixWorld),void 0===e.intersectionShape)return n;var o,a,s,v,b,y,x,_,w,k,A,M,T,S,C=e.intersectionShape,E=r.linePrecision,L=(E*=t.matrixWorld.getMaxScaleOnAxis())*E;if(void 0!==e.boundingSphere&&e.boundingSphere instanceof i.Sphere&&(c.copy(e.boundingSphere),c.applyMatrix4(t.matrixWorld),!r.ray.isIntersectionSphere(c)))return n;for(o=0,a=C.triangle.length;o=0)continue;if(d.subVectors(h.a,r.ray.origin),(x=s.dot(d)/v)<0)continue;f.copy(r.ray.direction).multiplyScalar(x).add(r.ray.origin),f.sub(h.a),p.copy(h.b).sub(h.a),m.copy(h.c).sub(h.a);var z=p.dot(m),O=p.lengthSq(),D=m.lengthSq();if((M=(O*f.dot(m)-z*f.dot(p))/(O*D-z*z))<0||M>1)continue;if((A=(f.dot(p)-M*z)/O)<0||A>1||A+M>1)continue;n.push({clickable:e,distance:x})}for(o=0,a=C.cylinder.length;ou.lengthSq()||M<0)continue;n.push({clickable:e,distance:x})}}for(o=0,a=C.line.length;o{"use strict";r.r(e),r.d(e,{Texture:()=>s,TextureIdCount:()=>l});var n=r("./src/WebGL/constants/TextureConstants.ts"),i=r("./src/WebGL/math/index.ts"),o=r("./src/WebGL/core/EventDispatcher.ts"),a=r("./src/WebGL/core/UVMapping.ts");class s extends o.EventDispatcher{constructor(t,e){super(),this.id=l++,this.name="",this.image=t,this.mapping=new a.UVMapping,this.wrapS=n.ClampToEdgeWrapping,this.wrapT=n.ClampToEdgeWrapping,this.anisotropy=1,e?(this.format=n.RFormat,this.type=n.FloatType,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.magFilter=n.NearestFilter,this.minFilter=n.NearestFilter):(this.format=n.RGBAFormat,this.type=n.UnsignedByteType,this.offset=new i.Vector2(0,0),this.repeat=new i.Vector2(1,1),this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.magFilter=n.LinearFilter,this.minFilter=n.LinearMipMapLinearFilter),this.needsUpdate=!1,this.onUpdate=null}clone(t=new s){return t.image=this.image,t.mapping=this.mapping,t.wrapS=this.wrapS,t.wrapT=this.wrapT,t.magFilter=this.magFilter,t.minFilter=this.minFilter,t.anisotropy=this.anisotropy,t.format=this.format,t.type=this.type,t.offset.copy(this.offset),t.repeat.copy(this.repeat),t.premultiplyAlpha=this.premultiplyAlpha,t.flipY=this.flipY,t.unpackAlignment=this.unpackAlignment,t}dispose(){this.dispatchEvent({type:"dispose"})}}let l=0},"./src/WebGL/core/UVMapping.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{UVMapping:()=>n});class n{}},"./src/WebGL/core/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{EventDispatcher:()=>n.EventDispatcher,Geometry:()=>i.Geometry,GeometryGroup:()=>i.GeometryGroup,GeometryIDCount:()=>i.GeometryIDCount,Light:()=>o.Light,Object3D:()=>o.Object3D,Object3DIDCount:()=>o.Object3DIDCount,Projector:()=>a.Projector,Raycaster:()=>s.Raycaster,Scene:()=>o.Scene,Texture:()=>l.Texture,TextureIdCount:()=>l.TextureIdCount,UVMapping:()=>c.UVMapping,intersectObject:()=>s.intersectObject});var n=r("./src/WebGL/core/EventDispatcher.ts"),i=r("./src/WebGL/core/Geometry.ts"),o=r("./src/WebGL/core/Object3D.ts"),a=r("./src/WebGL/core/Projector.ts"),s=r("./src/WebGL/core/Raycaster.ts"),l=r("./src/WebGL/core/Texture.ts"),c=r("./src/WebGL/core/UVMapping.ts")},"./src/WebGL/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BackSide:()=>n.BackSide,Camera:()=>u.Camera,ClampToEdgeWrapping:()=>n.ClampToEdgeWrapping,Coloring:()=>n.Coloring,Cylinder:()=>c.Cylinder,DoubleSide:()=>n.DoubleSide,EventDispatcher:()=>i.EventDispatcher,FloatType:()=>n.FloatType,Fog:()=>h.Fog,FrontSide:()=>n.FrontSide,Geometry:()=>i.Geometry,GeometryGroup:()=>i.GeometryGroup,GeometryIDCount:()=>i.GeometryIDCount,ImposterMaterial:()=>o.ImposterMaterial,InstancedMaterial:()=>o.InstancedMaterial,Light:()=>i.Light,Line:()=>s.Line,LineBasicMaterial:()=>o.LineBasicMaterial,LineStyle:()=>s.LineStyle,LinearFilter:()=>n.LinearFilter,LinearMipMapLinearFilter:()=>n.LinearMipMapLinearFilter,Material:()=>o.Material,MaterialIdCount:()=>o.MaterialIdCount,Matrix3:()=>a.Matrix3,Matrix4:()=>a.Matrix4,Mesh:()=>s.Mesh,MeshDoubleLambertMaterial:()=>o.MeshDoubleLambertMaterial,MeshLambertMaterial:()=>o.MeshLambertMaterial,MeshOutlineMaterial:()=>o.MeshOutlineMaterial,NearestFilter:()=>n.NearestFilter,Object3D:()=>i.Object3D,Object3DIDCount:()=>i.Object3DIDCount,Projector:()=>i.Projector,Quaternion:()=>a.Quaternion,R32Format:()=>n.R32Format,RFormat:()=>n.RFormat,RGBAFormat:()=>n.RGBAFormat,Ray:()=>a.Ray,Raycaster:()=>i.Raycaster,Renderer:()=>d.Renderer,Scene:()=>i.Scene,ShaderLib:()=>l.ShaderLib,ShaderUtils:()=>l.ShaderUtils,Shading:()=>n.Shading,Sphere:()=>c.Sphere,SphereImposterMaterial:()=>o.SphereImposterMaterial,SphereImposterOutlineMaterial:()=>o.SphereImposterOutlineMaterial,Sprite:()=>s.Sprite,SpriteAlignment:()=>n.SpriteAlignment,SpriteMaterial:()=>o.SpriteMaterial,SpritePlugin:()=>f.SpritePlugin,StickImposterMaterial:()=>o.StickImposterMaterial,StickImposterOutlineMaterial:()=>o.StickImposterOutlineMaterial,Texture:()=>i.Texture,TextureIdCount:()=>i.TextureIdCount,TextureOperations:()=>n.TextureOperations,Triangle:()=>c.Triangle,UVMapping:()=>i.UVMapping,UnsignedByteType:()=>n.UnsignedByteType,Vector2:()=>a.Vector2,Vector3:()=>a.Vector3,VolumetricMaterial:()=>o.VolumetricMaterial,basic:()=>l.basic,clamp:()=>a.clamp,clone:()=>l.clone,conversionMatrix3:()=>a.conversionMatrix3,degToRad:()=>a.degToRad,instanced:()=>l.instanced,intersectObject:()=>i.intersectObject,lambert:()=>l.lambert,lambertdouble:()=>l.lambertdouble,outline:()=>l.outline,screen:()=>l.screen,screenaa:()=>l.screenaa,sphereimposter:()=>l.sphereimposter,sphereimposteroutline:()=>l.sphereimposteroutline,sprite:()=>l.sprite,stickimposter:()=>l.stickimposter,stickimposteroutline:()=>l.stickimposteroutline,volumetric:()=>l.volumetric});var n=r("./src/WebGL/constants/index.ts"),i=r("./src/WebGL/core/index.ts"),o=r("./src/WebGL/materials/index.ts"),a=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/objects/index.ts"),l=r("./src/WebGL/shaders/index.ts"),c=r("./src/WebGL/shapes/index.ts"),u=r("./src/WebGL/Camera.ts"),h=r("./src/WebGL/Fog.ts"),d=r("./src/WebGL/Renderer.ts"),f=r("./src/WebGL/SpritePlugin.ts")},"./src/WebGL/materials/ImposterMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ImposterMaterial:()=>l});var n=r("./src/WebGL/constants/Coloring.ts"),i=r("./src/WebGL/constants/Shading.ts"),o=r("./src/colors.ts"),a=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/materials/Material.ts");class l extends s.Material{constructor(t){super(),this.color=new o.Color(16777215),this.ambient=new o.Color(1048575),this.emissive=new o.Color(0),this.imposter=!0,this.wrapAround=!1,this.wrapRGB=new a.Vector3(1,1,1),this.map=void 0,this.lightMap=null,this.specularMap=null,this.envMap=null,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.shading=i.Shading.SmoothShading,this.shaderID=null,this.vertexColors=n.Coloring.NoColors,this.skinning=!1,this.setValues(t)}clone(t=new l){return super.clone.call(this,t),t.color.copy(this.color),t.ambient.copy(this.ambient),t.emissive.copy(this.emissive),t.wrapAround=this.wrapAround,t.wrapRGB.copy(this.wrapRGB),t.map=this.map,t.lightMap=this.lightMap,t.specularMap=this.specularMap,t.envMap=this.envMap,t.combine=this.combine,t.reflectivity=this.reflectivity,t.refractionRatio=this.refractionRatio,t.fog=this.fog,t.shading=this.shading,t.shaderID=this.shaderID,t.vertexColors=this.vertexColors,t.skinning=this.skinning,t.morphTargets=this.morphTargets,t.morphNormals=this.morphNormals,t}}},"./src/WebGL/materials/InstancedMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{InstancedMaterial:()=>l});var n=r("./src/WebGL/constants/Coloring.ts"),i=r("./src/WebGL/constants/Shading.ts"),o=r("./src/colors.ts"),a=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/materials/Material.ts");class l extends s.Material{constructor(t){super(),this.color=new o.Color(16777215),this.ambient=new o.Color(1048575),this.emissive=new o.Color(0),this.wrapAround=!1,this.wrapRGB=new a.Vector3(1,1,1),this.map=void 0,this.lightMap=null,this.specularMap=null,this.envMap=null,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.shading=i.Shading.SmoothShading,this.shaderID="instanced",this.vertexColors=n.Coloring.NoColors,this.skinning=!1,this.sphere=null,this.setValues(t)}clone(t=new l){return super.clone.call(this,t),t.color.copy(this.color),t.ambient.copy(this.ambient),t.emissive.copy(this.emissive),t.wrapAround=this.wrapAround,t.wrapRGB.copy(this.wrapRGB),t.map=this.map,t.lightMap=this.lightMap,t.specularMap=this.specularMap,t.envMap=this.envMap,t.combine=this.combine,t.reflectivity=this.reflectivity,t.refractionRatio=this.refractionRatio,t.fog=this.fog,t.shading=this.shading,t.shaderID=this.shaderID,t.vertexColors=this.vertexColors,t.skinning=this.skinning,t.morphTargets=this.morphTargets,t.morphNormals=this.morphNormals,t.sphere=this.sphere,t}}},"./src/WebGL/materials/LineBasicMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{LineBasicMaterial:()=>o});var n=r("./src/colors.ts"),i=r("./src/WebGL/materials/Material.ts");class o extends i.Material{constructor(t){super(),this.color=new n.Color(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.vertexColors=!1,this.fog=!0,this.shaderID="basic",this.setValues(t)}clone(t=new o){return super.clone.call(this,t),t.color.copy(this.color),t}}},"./src/WebGL/materials/Material.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Material:()=>s,MaterialIdCount:()=>l});var n=r("./src/WebGL/constants/Sides.ts"),i=r("./src/WebGL/core/index.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/colors.ts");class s extends i.EventDispatcher{constructor(){super(...arguments),this.id=l++,this.name="",this.side=n.FrontSide,this.opacity=1,this.transparent=!1,this.depthTest=!0,this.depthWrite=!0,this.stencilTest=!0,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.alphaTest=0,this.visible=!0,this.needsUpdate=!0,this.outline=!1,this.wireframe=!1}setValues(t={}){if(void 0!==t)for(var e in t){var r=t[e];if(void 0!==r){if(e in this){var n=this[e];n instanceof a.Color&&r instanceof a.Color?n.copy(r):n instanceof a.Color?n.set(r):n instanceof o.Vector3&&r instanceof o.Vector3?n.copy(r):this[e]=r}}else console.warn("$3Dmol.Material: '"+e+"' parameter is undefined.")}}clone(t=new s){return t.name=this.name,t.side=this.side,t.opacity=this.opacity,t.transparent=this.transparent,t.depthTest=this.depthTest,t.depthWrite=this.depthWrite,t.stencilTest=this.stencilTest,t.polygonOffset=this.polygonOffset,t.polygonOffsetFactor=this.polygonOffsetFactor,t.polygonOffsetUnits=this.polygonOffsetUnits,t.alphaTest=this.alphaTest,t.overdraw=this.overdraw,t.visible=this.visible,t}dispose(){this.dispatchEvent({type:"dispose"})}}let l=0},"./src/WebGL/materials/MeshDoubleLambertMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{MeshDoubleLambertMaterial:()=>o});var n=r("./src/WebGL/constants/Sides.ts"),i=r("./src/WebGL/materials/MeshLambertMaterial.ts");class o extends i.MeshLambertMaterial{constructor(t){super(t),this.shaderID="lambertdouble",this.side=n.DoubleSide,this.outline=!1}clone(t=new o){return super.clone.call(this,t),t}}},"./src/WebGL/materials/MeshLambertMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{MeshLambertMaterial:()=>l});var n=r("./src/WebGL/constants/Coloring.ts"),i=r("./src/WebGL/constants/Shading.ts"),o=r("./src/WebGL/materials/Material.ts"),a=r("./src/colors.ts"),s=r("./src/WebGL/math/index.ts");class l extends o.Material{constructor(t){super(),this.color=new a.Color(16777215),this.ambient=new a.Color(1048575),this.emissive=new a.Color(0),this.wrapAround=!1,this.wrapRGB=new s.Vector3(1,1,1),this.map=void 0,this.lightMap=null,this.specularMap=null,this.envMap=null,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.shading=i.Shading.SmoothShading,this.shaderID="lambert",this.vertexColors=n.Coloring.NoColors,this.skinning=!1,this.setValues(t)}clone(t=new l){return super.clone.call(this,t),t.color.copy(this.color),t.ambient.copy(this.ambient),t.emissive.copy(this.emissive),t.wrapAround=this.wrapAround,t.wrapRGB.copy(this.wrapRGB),t.map=this.map,t.lightMap=this.lightMap,t.specularMap=this.specularMap,t.envMap=this.envMap,t.combine=this.combine,t.reflectivity=this.reflectivity,t.refractionRatio=this.refractionRatio,t.fog=this.fog,t.shading=this.shading,t.shaderID=this.shaderID,t.vertexColors=this.vertexColors,t.skinning=this.skinning,t.morphTargets=this.morphTargets,t.morphNormals=this.morphNormals,t}}},"./src/WebGL/materials/MeshOutlineMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{MeshOutlineMaterial:()=>o});var n=r("./src/colors.ts"),i=r("./src/WebGL/materials/Material.ts");class o extends i.Material{constructor(t){super(),t=t||{},this.fog=!0,this.shaderID="outline",this.wireframe=!1,this.outlineColor=t.color||new n.Color(0,0,0),this.outlineWidth=t.width||.1,this.outlinePushback=t.pushback||1}clone(t=new o){return super.clone.call(this,t),t.fog=this.fog,t.shaderID=this.shaderID,t.wireframe=this.wireframe,t}}},"./src/WebGL/materials/SphereImposterMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SphereImposterMaterial:()=>i});var n=r("./src/WebGL/materials/ImposterMaterial.ts");class i extends n.ImposterMaterial{constructor(t){super(t),this.shaderID="sphereimposter",this.setValues(t)}clone(t=new i){return super.clone.call(this,t),t}}},"./src/WebGL/materials/SphereImposterOutlineMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SphereImposterOutlineMaterial:()=>o});var n=r("./src/colors.ts"),i=r("./src/WebGL/materials/ImposterMaterial.ts");class o extends i.ImposterMaterial{constructor(t){super(t),t=t||{},this.shaderID="sphereimposteroutline",this.outlineColor=t.color||new n.Color(0,0,0),this.outlineWidth=t.width||.1,this.outlinePushback=t.pushback||1,this.setValues(t)}clone(t=new o){return super.clone.call(this,t),t.outlineColor=this.outlineColor,t.outlineWidth=this.outlineWidth,t.outlinePushback=this.outlinePushback,t}}},"./src/WebGL/materials/SpriteMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SpriteMaterial:()=>l});var n=r("./src/WebGL/constants/SpriteAlignment.ts"),i=r("./src/WebGL/core/Texture.ts"),o=r("./src/colors.ts"),a=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/materials/Material.ts");class l extends s.Material{constructor(t){super(),this.color=new o.Color(16777215),this.map=new i.Texture,this.useScreenCoordinates=!0,this.fog=!1,this.uvOffset=new a.Vector2(0,0),this.uvScale=new a.Vector2(1,1),this.depthTest=!this.useScreenCoordinates,this.sizeAttenuation=!this.useScreenCoordinates,this.screenOffset=this.screenOffset,this.scaleByViewPort=!this.sizeAttenuation,this.alignment=n.SpriteAlignment.center.clone(),this.setValues(t),void 0===(t=t||{}).depthTest&&(this.depthTest=!this.useScreenCoordinates),void 0===t.sizeAttenuation&&(this.sizeAttenuation=!this.useScreenCoordinates),void 0===t.scaleByViewPort&&(this.scaleByViewPort=!this.sizeAttenuation)}clone(t=new l){return super.clone.call(this,t),t.color.copy(this.color),t.map=this.map,t.useScreenCoordinates=this.useScreenCoordinates,t.screenOffset=this.screenOffset,t.sizeAttenuation=this.sizeAttenuation,t.scaleByViewport=this.scaleByViewPort,t.alignment.copy(this.alignment),t.uvOffset.copy(this.uvOffset),t}}},"./src/WebGL/materials/StickImposterMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{StickImposterMaterial:()=>i});var n=r("./src/WebGL/materials/ImposterMaterial.ts");class i extends n.ImposterMaterial{constructor(t){super(t),this.shaderID="stickimposter",this.setValues(t)}clone(t=new i){return super.clone.call(this,t),t}}},"./src/WebGL/materials/StickImposterOutlineMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{StickImposterOutlineMaterial:()=>o});var n=r("./src/colors.ts"),i=r("./src/WebGL/materials/ImposterMaterial.ts");class o extends i.ImposterMaterial{constructor(t={}){super(t),this.shaderID="stickimposteroutline",this.outlineColor=new n.Color(0,0,0),this.outlineWidth=.1,this.outlinePushback=1,t.color&&(this.outlineColor=t.color),t.width&&(this.outlineWidth=t.width),t.pushback&&(this.outlinePushback=t.pushback),this.setValues(t)}clone(t=new o){return super.clone.call(this,t),t.outlineColor=this.outlineColor,t.outlineWidth=this.outlineWidth,t.outlinePushback=this.outlinePushback,t}}},"./src/WebGL/materials/VolumetricMaterial.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{VolumetricMaterial:()=>a});var n=r("./src/WebGL/constants/Sides.ts"),i=r("./src/colors.ts"),o=r("./src/WebGL/materials/Material.ts");class a extends o.Material{constructor(t){super(),this.transparent=!1,this.volumetric=!0,this.color=new i.Color(16777215),this.transferfn=null,this.map=void 0,this.extent=[],this.maxdepth=100,this.unit=0,this.texmatrix=null,this.transfermin=-1,this.transfermax=1,this.subsamples=5,this.shaderID="volumetric",this.side=n.FrontSide,this.setValues(t)}clone(t=new a){return super.clone.call(this,t),t.transparent=this.transparent,t.volumetric=this.volumetric,t.color=this.color,t.transferfn=this.transferfn,t.map=this.map,t.extent=this.extent,t.maxdepth=this.maxdepth,t.unit=this.unit,t.texmatrix=this.texmatrix,t.transfermin=this.transfermin,t.transfermax=this.transfermax,t.subsamples=this.subsamples,t.shaderID=this.shaderID,t.side=this.side,t}}},"./src/WebGL/materials/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ImposterMaterial:()=>n.ImposterMaterial,InstancedMaterial:()=>i.InstancedMaterial,LineBasicMaterial:()=>o.LineBasicMaterial,Material:()=>a.Material,MaterialIdCount:()=>a.MaterialIdCount,MeshDoubleLambertMaterial:()=>s.MeshDoubleLambertMaterial,MeshLambertMaterial:()=>l.MeshLambertMaterial,MeshOutlineMaterial:()=>c.MeshOutlineMaterial,SphereImposterMaterial:()=>u.SphereImposterMaterial,SphereImposterOutlineMaterial:()=>h.SphereImposterOutlineMaterial,SpriteMaterial:()=>d.SpriteMaterial,StickImposterMaterial:()=>f.StickImposterMaterial,StickImposterOutlineMaterial:()=>p.StickImposterOutlineMaterial,VolumetricMaterial:()=>m.VolumetricMaterial});var n=r("./src/WebGL/materials/ImposterMaterial.ts"),i=r("./src/WebGL/materials/InstancedMaterial.ts"),o=r("./src/WebGL/materials/LineBasicMaterial.ts"),a=r("./src/WebGL/materials/Material.ts"),s=r("./src/WebGL/materials/MeshDoubleLambertMaterial.ts"),l=r("./src/WebGL/materials/MeshLambertMaterial.ts"),c=r("./src/WebGL/materials/MeshOutlineMaterial.ts"),u=r("./src/WebGL/materials/SphereImposterMaterial.ts"),h=r("./src/WebGL/materials/SphereImposterOutlineMaterial.ts"),d=r("./src/WebGL/materials/SpriteMaterial.ts"),f=r("./src/WebGL/materials/StickImposterMaterial.ts"),p=r("./src/WebGL/materials/StickImposterOutlineMaterial.ts"),m=r("./src/WebGL/materials/VolumetricMaterial.ts")},"./src/WebGL/math/Quaternion.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Quaternion:()=>n});class n{constructor(t,e,r,n){this.x=t||0,this.y=e||0,this.z=r||0,this.w=void 0!==n?n:1}set(t,e,r,n){return this.x=t,this.y=e,this.z=r,this.w=n,this}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this}conjugate(){return this.x*=-1,this.y*=-1,this.z*=-1,this}inverse(){return this.conjugate().normalize()}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}lengthxyz(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}normalize(){let t=this.length();return 0===t?(this.x=0,this.y=0,this.z=0,this.w=1):(t=1/t,this.x*=t,this.y*=t,this.z*=t,this.w*=t),this}multiply(t){return this.multiplyQuaternions(this,t)}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}multiplyQuaternions(t,e){const r=t.x,n=t.y,i=t.z,o=t.w,a=e.x,s=e.y,l=e.z,c=e.w;return this.x=r*c+o*a+n*l-i*s,this.y=n*c+o*s+i*a-r*l,this.z=i*c+o*l+r*s-n*a,this.w=o*c-r*a-n*s-i*l,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}clone(){return new n(this.x,this.y,this.z,this.w)}setFromEuler(t){const e=Math.cos(t.x/2),r=Math.cos(t.y/2),n=Math.cos(t.z/2),i=Math.sin(t.x/2),o=Math.sin(t.y/2),a=Math.sin(t.z/2);return this.x=i*r*n+e*o*a,this.y=e*o*n-i*r*a,this.z=e*r*a+i*o*n,this.w=e*r*n-i*o*a,this}}},"./src/WebGL/math/Vector2.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Vector2:()=>n});class n{constructor(t,e){this.x=t||0,this.y=e||0}set(t,e){return this.x=t,this.y=e,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}copy(t){return this.x=t.x,this.y=t.y,this}clone(){return new n(this.x,this.y)}}},"./src/WebGL/math/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Matrix3:()=>l.Matrix3,Matrix4:()=>l.Matrix4,Quaternion:()=>n.Quaternion,Ray:()=>l.Ray,Vector2:()=>i.Vector2,Vector3:()=>l.Vector3,clamp:()=>o.clamp,conversionMatrix3:()=>a.conversionMatrix3,degToRad:()=>s.degToRad});var n=r("./src/WebGL/math/Quaternion.ts"),i=r("./src/WebGL/math/Vector2.ts"),o=r("./src/WebGL/math/utils/clamp.ts"),a=r("./src/WebGL/math/utils/conversionMatrix3.ts"),s=r("./src/WebGL/math/utils/degToRad.ts"),l=r("./src/WebGL/math/math.ts")},"./src/WebGL/math/math.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Matrix3:()=>d,Matrix4:()=>u,Ray:()=>f,Vector3:()=>h});var n,i,o,a,s,l=r("./src/WebGL/math/utils/degToRad.ts"),c=r("./src/WebGL/math/utils/clamp.ts");class u{constructor(t=1,e=0,r=0,n=0,i=0,o=1,a=0,s=0,l=0,c=0,u=1,h=0,d=0,f=0,p=0,m=1){void 0!==t&&"number"!=typeof t?this.elements=new Float32Array(t):(this.elements=new Float32Array(16),this.elements[0]=t,this.elements[4]=e,this.elements[8]=r,this.elements[12]=n,this.elements[1]=i,this.elements[5]=o,this.elements[9]=a,this.elements[13]=s,this.elements[2]=l,this.elements[6]=c,this.elements[10]=u,this.elements[14]=h,this.elements[3]=d,this.elements[7]=f,this.elements[11]=p,this.elements[15]=m)}makeScale(t,e,r){throw new Error("Method not implemented.")}set(t,e,r,n,i,o,a,s,l,c,u,h,d,f,p,m){const g=this.elements;return g[0]=t,g[4]=e,g[8]=r,g[12]=n,g[1]=i,g[5]=o,g[9]=a,g[13]=s,g[2]=l,g[6]=c,g[10]=u,g[14]=h,g[3]=d,g[7]=f,g[11]=p,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}copy(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15]),this}matrix3FromTopLeft(){const t=this.elements;return new d(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10])}setRotationFromEuler(t,e){const r=this.elements,{x:n,y:i,z:o}=t,a=Math.cos(n),s=Math.sin(n),l=Math.cos(i),c=Math.sin(i),u=Math.cos(o),h=Math.sin(o);if(void 0===e||"XYZ"===e){const t=a*u,e=a*h,n=s*u,i=s*h;r[0]=l*u,r[4]=-l*h,r[8]=c,r[1]=e+n*c,r[5]=t-i*c,r[9]=-s*l,r[2]=i-t*c,r[6]=n+e*c,r[10]=a*l}else console.error(`Error with matrix4 setRotationFromEuler. Order: ${e}`);return this}setRotationFromQuaternion(t){const e=this.elements,{x:r,y:n,z:i,w:o}=t,a=r+r,s=n+n,l=i+i,c=r*a,u=r*s,h=r*l,d=n*s,f=n*l,p=i*l,m=o*a,g=o*s,v=o*l;return e[0]=1-(d+p),e[4]=u-v,e[8]=h+g,e[1]=u+v,e[5]=1-(c+p),e[9]=f-m,e[2]=h-g,e[6]=f+m,e[10]=1-(c+d),this}multiplyMatrices(t,e){const r=t.elements,n=e.elements,i=this.elements,o=r[0],a=r[4],s=r[8],l=r[12],c=r[1],u=r[5],h=r[9],d=r[13],f=r[2],p=r[6],m=r[10],g=r[14],v=r[3],b=r[7],y=r[11],x=r[15],_=n[0],w=n[4],k=n[8],A=n[12],M=n[1],T=n[5],S=n[9],C=n[13],E=n[2],L=n[6],z=n[10],O=n[14],D=n[3],I=n[7],R=n[11],F=n[15];return i[0]=o*_+a*M+s*E+l*D,i[4]=o*w+a*T+s*L+l*I,i[8]=o*k+a*S+s*z+l*R,i[12]=o*A+a*C+s*O+l*F,i[1]=c*_+u*M+h*E+d*D,i[5]=c*w+u*T+h*L+d*I,i[9]=c*k+u*S+h*z+d*R,i[13]=c*A+u*C+h*O+d*F,i[2]=f*_+p*M+m*E+g*D,i[6]=f*w+p*T+m*L+g*I,i[10]=f*k+p*S+m*z+g*R,i[14]=f*A+p*C+m*O+g*F,i[3]=v*_+b*M+y*E+x*D,i[7]=v*w+b*T+y*L+x*I,i[11]=v*k+b*S+y*z+x*R,i[15]=v*A+b*C+y*O+x*F,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}makeTranslation(t,e,r){return this.set(1,0,0,t,0,1,0,e,0,0,1,r,0,0,0,1),this}snap(t){t||(t=4);const e=Math.pow(10,4),r=this.elements;for(let t=0;t<16;t++){const n=Math.round(r[t]);n===Math.round(r[t]*e)/e&&(r[t]=n)}return this}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t){const e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this}translate(t){const e=this.elements;return e[12]+=t.x,e[13]+=t.y,e[14]+=t.z,this}getInverse(t,e){const r=this.elements,n=t.elements,i=n[0],o=n[4],a=n[8],s=n[12],l=n[1],c=n[5],u=n[9],h=n[13],d=n[2],f=n[6],p=n[10],m=n[14],g=n[3],v=n[7],b=n[11],y=n[15];r[0]=u*m*v-h*p*v+h*f*b-c*m*b-u*f*y+c*p*y,r[4]=s*p*v-a*m*v-s*f*b+o*m*b+a*f*y-o*p*y,r[8]=a*h*v-s*u*v+s*c*b-o*h*b-a*c*y+o*u*y,r[12]=s*u*f-a*h*f-s*c*p+o*h*p+a*c*m-o*u*m,r[1]=h*p*g-u*m*g-h*d*b+l*m*b+u*d*y-l*p*y,r[5]=a*m*g-s*p*g+s*d*b-i*m*b-a*d*y+i*p*y,r[9]=s*u*g-a*h*g-s*l*b+i*h*b+a*l*y-i*u*y,r[13]=a*h*d-s*u*d+s*l*p-i*h*p-a*l*m+i*u*m,r[2]=c*m*g-h*f*g+h*d*v-l*m*v-c*d*y+l*f*y,r[6]=s*f*g-o*m*g-s*d*v+i*m*v+o*d*y-i*f*y,r[10]=o*h*g-s*c*g+s*l*v-i*h*v-o*l*y+i*c*y,r[14]=s*c*d-o*h*d-s*l*f+i*h*f+o*l*m-i*c*m,r[3]=u*f*g-c*p*g-u*d*v+l*p*v+c*d*b-l*f*b,r[7]=o*p*g-a*f*g+a*d*v-i*p*v-o*d*b+i*f*b,r[11]=a*c*g-o*u*g-a*l*v+i*u*v+o*l*b-i*c*b,r[15]=o*u*d-a*c*d+a*l*f-i*u*f-o*l*p+i*c*p;const x=i*r[0]+l*r[4]+d*r[8]+g*r[12];if(0===x){const t="Matrix4.getInverse(): can't invert matrix, determinant is 0";if(e)throw new Error(t);return console.warn(t),this.identity(),this}return this.multiplyScalar(1/x),this}isReflected(){const t=this.elements,e=t[0],r=t[4],n=t[8],i=t[1],o=t[5],a=t[9],s=t[2],l=t[6],c=t[10];return e*o*c+i*l*n+s*r*a-s*o*n-i*r*c-e*l*a<0}scale(t){const e=this.elements,{x:r}=t,{y:n}=t,{z:i}=t;return e[0]*=r,e[4]*=n,e[8]*=i,e[1]*=r,e[5]*=n,e[9]*=i,e[2]*=r,e[6]*=n,e[10]*=i,e[3]*=r,e[7]*=n,e[11]*=i,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,Math.max(r,n)))}makeFrustum(t,e,r,n,i,o){const a=this.elements,s=2*i/(e-t),l=2*i/(n-r),c=(e+t)/(e-t),u=(n+r)/(n-r),h=-(o+i)/(o-i),d=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=l,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=d,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makePerspective(t,e,r,n){const i=r*Math.tan((0,l.degToRad)(.5*t)),o=-i,a=o*e,s=i*e;return this.makeFrustum(a,s,o,i,r,n)}makeOrthographic(t,e,r,n,i,o){const a=this.elements,s=1/(e-t),l=1/(r-n),c=1/(o-i),u=(e+t)*s,h=(r+n)*l,d=(o+i)*c;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}isEqual(t){const e=t.elements,r=this.elements;return r[0]===e[0]&&r[4]===e[4]&&r[8]===e[8]&&r[12]===e[12]&&r[1]===e[1]&&r[5]===e[5]&&r[9]===e[9]&&r[13]===e[13]&&r[2]===e[2]&&r[6]===e[6]&&r[10]===e[10]&&r[14]===e[14]&&r[3]===e[3]&&r[7]===e[7]&&r[11]===e[11]&&r[15]===e[15]}clone(){const t=this.elements;return new u(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])}isIdentity(){const t=this.elements;return 1===t[0]&&0===t[4]&&0===t[8]&&0===t[12]&&0===t[1]&&1===t[5]&&0===t[9]&&0===t[13]&&0===t[2]&&0===t[6]&&1===t[10]&&0===t[14]&&0===t[3]&&0===t[7]&&0===t[11]&&1===t[15]}isNearlyIdentity(t){return this.clone().snap(t).isIdentity()}getScale(t){const e=this.elements;return t=t||new h,o.set(e[0],e[1],e[2]),a.set(e[4],e[5],e[6]),s.set(e[8],e[9],e[10]),t.x=o.length(),t.y=a.length(),t.z=s.length(),t}lookAt(t,e,r){const n=this.elements;return s.subVectors(t,e).normalize(),0===s.length()&&(s.z=1),o.crossVectors(r,s).normalize(),0===o.length()&&(s.x+=1e-4,o.crossVectors(r,s).normalize()),a.crossVectors(s,o),n[0]=o.x,n[4]=a.x,n[8]=s.x,n[1]=o.y,n[5]=a.y,n[9]=s.y,n[2]=o.z,n[6]=a.z,n[10]=s.z,this}compose(t,e,r){const o=this.elements;return n.identity(),n.setRotationFromQuaternion(e),i.makeScale(r.x,r.y,r.z),this.multiplyMatrices(n,i),o[12]=t.x,o[13]=t.y,o[14]=t.z,this}}n=new u,i=new u;class h{constructor(t,e,r){this.x=t||0,this.y=e||0,this.z=r||0,this.atomid=void 0}set(t,e,r){return this.x=t,this.y=e,this.z=r,this}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}divideScalar(t){return 0!==t?(this.x/=t,this.y/=t,this.z/=t):(this.x=0,this.y=0,this.z=0),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,r=this.y-t.y,n=this.z-t.z;return e*e+r*r+n*n}applyMatrix3(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.elements;return this.x=i[0]*e+i[3]*r+i[6]*n,this.y=i[1]*e+i[4]*r+i[7]*n,this.z=i[2]*e+i[5]*r+i[8]*n,this}applyMatrix4(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.elements;return this.x=i[0]*e+i[4]*r+i[8]*n+i[12],this.y=i[1]*e+i[5]*r+i[9]*n+i[13],this.z=i[2]*e+i[6]*r+i[10]*n+i[14],this}applyProjection(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.elements,o=i[3]*e+i[7]*r+i[11]*n+i[15];return this.x=(i[0]*e+i[4]*r+i[8]*n+i[12])/o,this.y=(i[1]*e+i[5]*r+i[9]*n+i[13])/o,this.z=(i[2]*e+i[6]*r+i[10]*n+i[14])/o,this}applyQuaternion(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.x,o=t.y,a=t.z,s=t.w,l={};l.x=2*(r*a-n*o),l.y=2*(n*i-e*a),l.z=2*(e*o-r*i);const c={};return c.x=l.y*a-l.z*o,c.y=l.z*i-l.x*a,c.z=l.x*o-l.y*i,this.x=e+s*l.x+c.x,this.y=r+s*l.y+c.y,this.z=n+s*l.z+c.z,this}negate(){return this.multiplyScalar(-1)}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}normalize(){return this.divideScalar(this.length())}cross(t){const{x:e}=this,{y:r}=this,{z:n}=this;return this.x=r*t.z-n*t.y,this.y=n*t.x-e*t.z,this.z=e*t.y-r*t.x,this}crossVectors(t,e){return this.x=t.y*e.z-t.z*e.y,this.y=t.z*e.x-t.x*e.z,this.z=t.x*e.y-t.y*e.x,this}equals(t){return this.x==t.x&&this.y==t.y&&this.z==t.z}getPositionFromMatrix(t){return this.x=t.elements[12],this.y=t.elements[13],this.z=t.elements[14],this}setEulerFromRotationMatrix(t,e){const r=t.elements,n=r[0],i=r[4],o=r[8],a=r[5],s=r[9],l=r[6],u=r[10];return void 0===e||"XYZ"===e?(this.y=Math.asin((0,c.clamp)(o,-1,1)),Math.abs(o)<.99999?(this.x=Math.atan2(-s,u),this.z=Math.atan2(-i,n)):(this.x=Math.atan2(l,a),this.z=0)):console.error(`Error with vector's setEulerFromRotationMatrix: Unknown order: ${e}`),this}rotateAboutVector(t,e){t.normalize();const r=Math.cos(e),n=Math.sin(e),i=this.clone().multiplyScalar(r),o=t.clone().cross(this).multiplyScalar(n),a=t.clone().multiplyScalar(t.clone().dot(this)).multiplyScalar(1-r),s=i.add(o).add(a);return this.x=s.x,this.y=s.y,this.z=s.z,this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}transformDirection(t){const{x:e}=this,{y:r}=this,{z:n}=this,i=t.elements;return this.x=i[0]*e+i[4]*r+i[8]*n,this.y=i[1]*e+i[5]*r+i[9]*n,this.z=i[2]*e+i[6]*r+i[10]*n,this.normalize()}clone(){return new h(this.x,this.y,this.z)}unproject(t){const e=n;return e.multiplyMatrices(t.matrixWorld,e.getInverse(t.projectionMatrix)),this.applyMatrix4(e)}}o=new h,a=new h,s=new h;class d{constructor(t=1,e=0,r=0,n=0,i=1,o=0,a=0,s=0,l=1){this.elements=new Float32Array(9),this.set(t,e,r,n,i,o,a,s,l)}set(t,e,r,n,i,o,a,s,l){const c=this.elements;return c[0]=t,c[3]=e,c[6]=r,c[1]=n,c[4]=i,c[7]=o,c[2]=a,c[5]=s,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=t.elements;this.set(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}getInverse3(t){const e=t.elements,r=this.elements;r[0]=e[4]*e[8]-e[5]*e[7],r[3]=e[6]*e[5]-e[3]*e[8],r[6]=e[3]*e[7]-e[6]*e[4],r[1]=e[7]*e[2]-e[1]*e[8],r[4]=e[0]*e[8]-e[6]*e[2],r[7]=e[1]*e[6]-e[0]*e[7],r[2]=e[1]*e[5]-e[2]*e[4],r[5]=e[2]*e[3]-e[0]*e[5],r[8]=e[0]*e[4]-e[1]*e[3];const n=e[0]*r[0]+e[3]*r[1]+e[6]*r[2];return this.multiplyScalar(1/n),this}getInverse(t,e){const r=t.elements,n=this.elements;n[0]=r[10]*r[5]-r[6]*r[9],n[1]=-r[10]*r[1]+r[2]*r[9],n[2]=r[6]*r[1]-r[2]*r[5],n[3]=-r[10]*r[4]+r[6]*r[8],n[4]=r[10]*r[0]-r[2]*r[8],n[5]=-r[6]*r[0]+r[2]*r[4],n[6]=r[9]*r[4]-r[5]*r[8],n[7]=-r[9]*r[0]+r[1]*r[8],n[8]=r[5]*r[0]-r[1]*r[4];const i=r[0]*n[0]+r[1]*n[3]+r[2]*n[6];if(0===i){const t="Matrix3.getInverse(): can't invert matrix, determinant is 0";if(e)throw new Error(t);return console.warn(t),this.identity(),this}return this.multiplyScalar(1/i),this}getDeterminant(){const t=this.elements;return t[0]*t[4]*t[8]+t[1]*t[5]*t[6]+t[2]*t[3]*t[7]-t[2]*t[4]*t[6]-t[1]*t[3]*t[8]-t[0]*t[5]*t[7]}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}clone(){const t=this.elements;return new d(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8])}getMatrix4(){const t=this.elements;return new u(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0)}}class f{constructor(t,e){this.origin=void 0!==t?t:new h,this.direction=void 0!==e?e:new h}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return(e||new h).copy(this.direction).multiplyScalar(t).add(this.origin)}recast(t){const e=o;return this.origin.copy(this.at(t,e)),this}closestPointToPoint(t,e){const r=e||new h;r.subVectors(t,this.origin);const n=r.dot(this.direction);return r.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(t){const e=o,r=e.subVectors(t,this.origin).dot(this.direction);return e.copy(this.direction).multiplyScalar(r).add(this.origin),e.distanceTo(t)}isIntersectionCylinder(){}isIntersectionSphere(t){return this.distanceToPoint(t.center)<=t.radius}isIntersectionPlane(t){return 0!==t.normal.dot(this.direction)||0===t.distanceToPoint(this.origin)}distanceToPlane(t){const e=t.normal.dot(this.direction);return 0===e?0===t.distanceToPoint(this.origin)?0:void 0:-(this.origin.dot(t.normal)+t.constant)/e}intersectPlane(t,e){const r=this.distanceToPlane(t);if(void 0!==r)return this.at(r,e)}applyMatrix4(t){return this.direction.add(this.origin).applyMatrix4(t),this.origin.applyMatrix4(t),this.direction.sub(this.origin),this}clone(){return(new f).copy(this)}}},"./src/WebGL/math/utils/clamp.ts":(t,e,r)=>{"use strict";function n(t,e,r){return Math.min(Math.max(t,e),r)}r.r(e),r.d(e,{clamp:()=>n})},"./src/WebGL/math/utils/conversionMatrix3.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{conversionMatrix3:()=>i});var n=r("./src/WebGL/math/math.ts");function i(t,e,r,i,o,a){i=i*Math.PI/180,o=o*Math.PI/180,a=a*Math.PI/180;const s=t=>t*t,l=Math.cos(i),c=Math.cos(o),u=Math.cos(a),h=Math.sin(a);return new n.Matrix3(t,e*u,r*c,0,e*h,r*(l-c*u)/h,0,0,r*Math.sqrt(1-s(l)-s(c)-s(u)+2*l*c*u)/h)}},"./src/WebGL/math/utils/degToRad.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{degToRad:()=>i});const n=Math.PI/180;function i(t){return t*n}},"./src/WebGL/objects/Line.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Line:()=>a,LineStyle:()=>n});var n,i=r("./src/WebGL/materials/index.ts"),o=r("./src/WebGL/core/index.ts");!function(t){t[t.LineStrip=0]="LineStrip",t[t.LinePieces=1]="LinePieces"}(n||(n={}));class a extends o.Object3D{constructor(t,e=new i.LineBasicMaterial({color:16777215*Math.random()}),r=n.LineStrip){super(),this.geometry=t,this.material=e,this.type=r}clone(t=new a(this.geometry,this.material,this.type)){return super.clone.call(this,t),t}}},"./src/WebGL/objects/Mesh.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Mesh:()=>i});var n=r("./src/WebGL/core/index.ts");class i extends n.Object3D{constructor(t,e){super(),this.geometry=t,this.material=e}clone(t){return void 0===t&&(t=new i(this.geometry,this.material)),super.clone.call(this,t),t}}},"./src/WebGL/objects/Sprite.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Sprite:()=>o});var n=r("./src/WebGL/materials/index.ts"),i=r("./src/WebGL/core/index.ts");class o extends i.Object3D{constructor(t=new n.SpriteMaterial){super(),this.material=t,this.rotation3d=this.rotation,this.rotation=0}updateMatrix(){this.matrix.setPosition(this.position),this.rotation3d.set(0,0,this.rotation),this.matrix.setRotationFromEuler(this.rotation3d),1===this.scale.x&&1===this.scale.y||this.matrix.scale(this.scale),this.matrixWorldNeedsUpdate=!0}clone(t=new o(this.material)){return i.Object3D.prototype.clone.call(this,t),t}}},"./src/WebGL/objects/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Line:()=>n.Line,LineStyle:()=>n.LineStyle,Mesh:()=>i.Mesh,Sprite:()=>o.Sprite});var n=r("./src/WebGL/objects/Line.ts"),i=r("./src/WebGL/objects/Mesh.ts"),o=r("./src/WebGL/objects/Sprite.ts")},"./src/WebGL/shaders/ShaderType.ts":(t,e,r)=>{"use strict";r.r(e)},"./src/WebGL/shaders/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ShaderLib:()=>n.ShaderLib,ShaderUtils:()=>i.ShaderUtils,basic:()=>n.basic,clone:()=>i.clone,instanced:()=>n.instanced,lambert:()=>n.lambert,lambertdouble:()=>n.lambertdouble,outline:()=>n.outline,screen:()=>n.screen,screenaa:()=>n.screenaa,sphereimposter:()=>n.sphereimposter,sphereimposteroutline:()=>n.sphereimposteroutline,sprite:()=>n.sprite,stickimposter:()=>n.stickimposter,stickimposteroutline:()=>n.stickimposteroutline,volumetric:()=>n.volumetric});var n=r("./src/WebGL/shaders/lib/index.ts"),i=r("./src/WebGL/shaders/utils/index.ts");r("./src/WebGL/shaders/ShaderType.ts")},"./src/WebGL/shaders/lib/basic/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{basic:()=>o});var n=r("./src/WebGL/shaders/lib/basic/uniforms.ts"),i=r("./src/WebGL/shaders/lib/basic/basic.frag");const o={vertexShader:r("./src/WebGL/shaders/lib/basic/basic.vert").default.replace("#define GLSLIFY 1",""),fragmentShader:i.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/basic/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3}}},"./src/WebGL/shaders/lib/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ShaderLib:()=>g,basic:()=>n.basic,instanced:()=>i.instanced,lambert:()=>o.lambert,lambertdouble:()=>a.lambertdouble,outline:()=>s.outline,screen:()=>l.screen,screenaa:()=>c.screenaa,sphereimposter:()=>u.sphereimposter,sphereimposteroutline:()=>h.sphereimposteroutline,sprite:()=>d.sprite,stickimposter:()=>f.stickimposter,stickimposteroutline:()=>p.stickimposteroutline,volumetric:()=>m.volumetric});var n=r("./src/WebGL/shaders/lib/basic/index.ts"),i=r("./src/WebGL/shaders/lib/instanced/index.ts"),o=r("./src/WebGL/shaders/lib/lambert/index.ts"),a=r("./src/WebGL/shaders/lib/lambertdouble/index.ts"),s=r("./src/WebGL/shaders/lib/outline/index.ts"),l=r("./src/WebGL/shaders/lib/screen/index.ts"),c=r("./src/WebGL/shaders/lib/screenaa/index.ts"),u=r("./src/WebGL/shaders/lib/sphereimposter/index.ts"),h=r("./src/WebGL/shaders/lib/sphereimposteroutline/index.ts"),d=r("./src/WebGL/shaders/lib/sprite/index.ts"),f=r("./src/WebGL/shaders/lib/stickimposter/index.ts"),p=r("./src/WebGL/shaders/lib/stickimposteroutline/index.ts"),m=r("./src/WebGL/shaders/lib/volumetric/index.ts");const g={basic:n.basic,instanced:i.instanced,lambert:o.lambert,lambertdouble:a.lambertdouble,outline:s.outline,screen:l.screen,screenaa:c.screenaa,sphereimposter:u.sphereimposter,sphereimposteroutline:h.sphereimposteroutline,sprite:d.sprite,stickimposter:f.stickimposter,stickimposteroutline:p.stickimposteroutline,volumetric:m.volumetric}},"./src/WebGL/shaders/lib/instanced/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{instanced:()=>a});var n=r("./src/WebGL/shaders/lib/instanced/uniforms.ts"),i=r("./src/WebGL/shaders/lib/instanced/instanced.frag"),o=r("./src/WebGL/shaders/lib/instanced/instanced.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/instanced/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/lambert/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{lambert:()=>a});var n=r("./src/WebGL/shaders/lib/lambert/uniforms.ts"),i=r("./src/WebGL/shaders/lib/lambert/lambert.frag"),o=r("./src/WebGL/shaders/lib/lambert/lambert.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/lambert/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/lambertdouble/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{lambertdouble:()=>a});var n=r("./src/WebGL/shaders/lib/lambertdouble/uniforms.ts"),i=r("./src/WebGL/shaders/lib/lambertdouble/lambertdouble.frag"),o=r("./src/WebGL/shaders/lib/lambertdouble/lambertdouble.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/lambertdouble/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/outline/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{outline:()=>a});var n=r("./src/WebGL/shaders/lib/outline/uniforms.ts"),i=r("./src/WebGL/shaders/lib/outline/outline.frag"),o=r("./src/WebGL/shaders/lib/outline/outline.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/outline/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>i});var n=r("./src/colors.ts");const i={opacity:{type:"f",value:1},outlineColor:{type:"c",value:new n.Color(0,0,0)},fogColor:{type:"c",value:new n.Color(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},outlineWidth:{type:"f",value:.1},outlinePushback:{type:"f",value:1}}},"./src/WebGL/shaders/lib/screen/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{screen:()=>a});var n=r("./src/WebGL/shaders/lib/screen/uniforms.ts"),i=r("./src/WebGL/shaders/lib/screen/screen.frag"),o=r("./src/WebGL/shaders/lib/screen/screen.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/screen/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={}},"./src/WebGL/shaders/lib/screenaa/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{screenaa:()=>a});var n=r("./src/WebGL/shaders/lib/screenaa/uniforms.ts"),i=r("./src/WebGL/shaders/lib/screenaa/screenaa.frag"),o=r("./src/WebGL/shaders/lib/screenaa/screenaa.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/screenaa/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={}},"./src/WebGL/shaders/lib/sphereimposter/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{sphereimposter:()=>o});var n=r("./src/WebGL/shaders/lib/sphereimposter/uniforms.ts"),i=r("./src/WebGL/shaders/lib/sphereimposter/sphereimposter.frag");const o={vertexShader:r("./src/WebGL/shaders/lib/sphereimposter/sphereimposter.vert").default.replace("#define GLSLIFY 1",""),fragmentShader:i.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/sphereimposter/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/sphereimposteroutline/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{sphereimposteroutline:()=>a});var n=r("./src/WebGL/shaders/lib/sphereimposteroutline/uniforms.ts"),i=r("./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.frag"),o=r("./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/sphereimposteroutline/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>i});var n=r("./src/colors.ts");const i={opacity:{type:"f",value:1},outlineColor:{type:"c",value:new n.Color(0,0,0)},fogColor:{type:"c",value:new n.Color(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},outlineWidth:{type:"f",value:.1},outlinePushback:{type:"f",value:1}}},"./src/WebGL/shaders/lib/sprite/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{sprite:()=>a});var n=r("./src/WebGL/shaders/lib/sprite/uniforms.ts"),i=r("./src/WebGL/shaders/lib/sprite/sprite.frag"),o=r("./src/WebGL/shaders/lib/sprite/sprite.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/sprite/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={}},"./src/WebGL/shaders/lib/stickimposter/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{stickimposter:()=>s});var n=r("./src/WebGL/shaders/lib/stickimposter/uniforms.ts"),i=r("./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag"),o=r("./src/WebGL/shaders/lib/stickimposter/stickimposter.partial.frag"),a=r("./src/WebGL/shaders/lib/stickimposter/stickimposter.vert");const s={fragmentShader:[i.default,o.default].join("\n").replace("#define GLSLIFY 1",""),vertexShader:a.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/stickimposter/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/stickimposteroutline/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{stickimposteroutline:()=>a});var n=r("./src/WebGL/shaders/lib/stickimposteroutline/uniforms.ts"),i=r("./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag"),o=r("./src/WebGL/shaders/lib/stickimposteroutline/stickimposteroutline.vert");const a={fragmentShader:(i.default+"gl_FragColor = vec4(color,1.0);}").replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/stickimposteroutline/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>i});var n=r("./src/colors.ts");const i={opacity:{type:"f",value:1},fogColor:{type:"c",value:new n.Color(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},outlineColor:{type:"c",value:new n.Color(0,0,0)},outlineWidth:{type:"f",value:.1},outlinePushback:{type:"f",value:1}}},"./src/WebGL/shaders/lib/volumetric/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{volumetric:()=>a});var n=r("./src/WebGL/shaders/lib/volumetric/uniforms.ts"),i=r("./src/WebGL/shaders/lib/volumetric/volumetric.frag"),o=r("./src/WebGL/shaders/lib/volumetric/volumetric.vert");const a={fragmentShader:i.default.replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:n.uniforms}},"./src/WebGL/shaders/lib/volumetric/uniforms.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{uniforms:()=>n});const n={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},data:{type:"i",value:3},colormap:{type:"i",value:4},depthmap:{type:"i",value:5},step:{type:"f",value:1},maxdepth:{type:"f",value:100},subsamples:{type:"f",value:5},textmat:{type:"mat4",value:[]},projinv:{type:"mat4",value:[]},transfermin:{type:"f",value:-.2},transfermax:{type:"f",value:.2}}},"./src/WebGL/shaders/utils/clone.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{clone:()=>i});var n=r("./src/colors.ts");function i(t){let e={};for(const i in t){e[i]={},e[i].type=t[i].type;var r=t[i].value;r instanceof n.Color?e[i].value=r.clone():"number"==typeof r?e[i].value=r:r instanceof Array?e[i].value=[]:console.error("Error copying shader uniforms from ShaderLib: unknown type for uniform")}return e}},"./src/WebGL/shaders/utils/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ShaderUtils:()=>o,clone:()=>n.clone});var n=r("./src/WebGL/shaders/utils/clone.ts"),i=r("./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag");const o={clone:n.clone,stickimposterFragmentShader:i.default}},"./src/WebGL/shapes/Cylinder.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Cylinder:()=>o});var n=r("./src/WebGL/math/index.ts");let i=new n.Vector3;class o{constructor(t=new n.Vector3,e=new n.Vector3,r=0){this.c1=t,this.c2=e,this.radius=r,this.direction=(new n.Vector3).subVectors(this.c2,this.c1).normalize()}copy(t){return this.c1.copy(t.c1),this.c2.copy(t.c2),this.direction.copy(t.direction),this.radius=t.radius,this}lengthSq(){return i.subVectors(this.c2,this.c1).lengthSq()}applyMatrix4(t){return this.direction.add(this.c1).applyMatrix4(t),this.c1.applyMatrix4(t),this.c2.applyMatrix4(t),this.direction.sub(this.c1).normalize(),this.radius=this.radius*t.getMaxScaleOnAxis(),this}}},"./src/WebGL/shapes/Sphere.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Sphere:()=>i});var n=r("./src/WebGL/math/index.ts");class i{constructor(t={x:0,y:0,z:0},e=0){this.center=new n.Vector3(t.x,t.y,t.z),this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new i).copy(this)}}},"./src/WebGL/shapes/Triangle.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Triangle:()=>o});var n=r("./src/WebGL/math/index.ts");const i=new n.Vector3;class o{constructor(t=new n.Vector3,e=new n.Vector3,r=new n.Vector3){this.a=t,this.b=e,this.c=r}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}applyMatrix4(t){return this.a.applyMatrix4(t),this.b.applyMatrix4(t),this.c.applyMatrix4(t),this}getNormal(){var t=this.a.clone();return t.sub(this.b),i.subVectors(this.c,this.b),t.cross(i),t.normalize(),t}}},"./src/WebGL/shapes/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Cylinder:()=>i.Cylinder,Sphere:()=>n.Sphere,Triangle:()=>o.Triangle});var n=r("./src/WebGL/shapes/Sphere.ts"),i=r("./src/WebGL/shapes/Cylinder.ts"),o=r("./src/WebGL/shapes/Triangle.ts")},"./src/autoload.ts":(__unused_webpack_module,__nested_webpack_exports__,__nested_webpack_require_886947__)=>{"use strict";__nested_webpack_require_886947__.r(__nested_webpack_exports__),__nested_webpack_require_886947__.d(__nested_webpack_exports__,{autoinit:()=>autoinit,autoload:()=>autoload,processing_autoinit:()=>processing_autoinit,viewers:()=>viewers});var _GLViewer__WEBPACK_IMPORTED_MODULE_0__=__nested_webpack_require_886947__("./src/GLViewer.ts"),_ProteinSurface4__WEBPACK_IMPORTED_MODULE_1__=__nested_webpack_require_886947__("./src/ProteinSurface4.ts"),_utilities__WEBPACK_IMPORTED_MODULE_2__=__nested_webpack_require_886947__("./src/utilities.ts"),_colors__WEBPACK_IMPORTED_MODULE_3__=__nested_webpack_require_886947__("./src/colors.ts"),autoinit=!1,processing_autoinit=!1,viewers={};function autoload(viewer,callback){var i,dataname,type;if(null!=document.querySelector(".viewer_3Dmoljs")&&(autoinit=!0),autoinit){processing_autoinit=!0,viewer=null!=viewer?viewer:null;var nviewers=0;document.querySelectorAll(".viewer_3Dmoljs").forEach((viewerdiv=>{var datauri=[],datatypes=[],uri="";"static"==viewerdiv.style.position&&(viewerdiv.style.position="relative");var UI=null;if(type=null,viewerdiv.dataset.pdb)datauri.push("https://files.rcsb.org/view/"+viewerdiv.dataset.pdb+".pdb"),datatypes.push("pdb");else if(viewerdiv.dataset.cid)datatypes.push("sdf"),datauri.push("https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"+viewerdiv.dataset.cid+"/SDF?record_type=3d");else if(viewerdiv.dataset.href||viewerdiv.dataset.url){uri=viewerdiv.dataset.href?viewerdiv.dataset.href:viewerdiv.dataset.url,datauri.push(uri),type=uri.substring(uri.lastIndexOf(".")+1),datatypes.push(type);var molName=uri.substring(uri.lastIndexOf("/")+1,uri.lastIndexOf("."));"/"==molName&&(molName=uri.substring(uri.lastIndexOf("/")+1)),viewerdiv.dataset[datatypes[datatypes.length-1]]=molName}var divdata=viewerdiv.dataset;for(i in divdata)"pdb"===i.substring(0,3)&&"pdb"!==i?(datauri.push("https://files.rcsb.org/view/"+divdata[i]+".pdb"),datatypes.push("pdb")):"href"===i.substring(0,4)&&"href"!==i?(uri=divdata[i],datauri.push(uri),datatypes.push(uri.substring(uri.lastIndexOf(".")+1))):"cid"===i.substring(0,3)&&"cid"!==i&&(datauri.push("https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"+divdata[i]+"/SDF?record_type=3d"),datatypes.push("sdf"));var options={};viewerdiv.dataset.options&&(options=(0,_utilities__WEBPACK_IMPORTED_MODULE_2__.specStringToObject)(viewerdiv.dataset.options));var bgcolor=_colors__WEBPACK_IMPORTED_MODULE_3__.CC.color(viewerdiv.dataset.backgroundcolor),bgalpha=viewerdiv.dataset.backgroundalpha;bgalpha=null==bgalpha?1:parseFloat(bgalpha);var style={line:{}};viewerdiv.dataset.style&&(style=(0,_utilities__WEBPACK_IMPORTED_MODULE_2__.specStringToObject)(viewerdiv.dataset.style));var select={};viewerdiv.dataset.select&&(select=(0,_utilities__WEBPACK_IMPORTED_MODULE_2__.specStringToObject)(viewerdiv.dataset.select));var selectstylelist=[],surfaces=[],labels=[],zoomto={},spin=null,d=viewerdiv.dataset,stylere=/style(.+)/,surfre=/surface(.*)/,reslabre=/labelres(.*)/,keys=[];for(dataname in d)Object.prototype.hasOwnProperty.call(d,dataname)&&keys.push(dataname);for(keys.sort(),i=0;i{UI.loadSurface("VDW",e,r,t)})):t.addSurface(_ProteinSurface4__WEBPACK_IMPORTED_MODULE_1__.SurfaceType.VDW,r,e,e)}for(i=0;i{"complete"===document.readyState&&autoload()}},"./src/colors.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{CC:()=>i,Color:()=>n,builtinColorSchemes:()=>h,chains:()=>u,elementColors:()=>l,htmlColors:()=>o,residues:()=>c,ssColors:()=>a});class n{constructor(t,e,r){return this.r=0,this.g=0,this.b=0,arguments.length>1&&"number"==typeof t?(this.r=t||0,this.g=e||0,this.b=r||0,this):this.set(t||0)}set(t){return t instanceof n?t.clone():("number"==typeof t?this.setHex(t):"object"==typeof t&&(this.r=(null==t?void 0:t.r)||0,this.g=(null==t?void 0:t.g)||0,this.b=(null==t?void 0:t.b)||0),this)}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this}getHex(){return Math.round(255*this.r)<<16|Math.round(255*this.g)<<8|Math.round(255*this.b)}clone(){return new n(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}scaled(){var t={};return t.r=Math.round(255*this.r),t.g=Math.round(255*this.g),t.b=Math.round(255*this.b),t.a=1,t}}class i{static color(t){if(!t)return i.cache[0];if(t instanceof n)return t;if("number"==typeof t&&void 0!==i.cache[t])return i.cache[t];if(t&&Array.isArray(t))return t.map(i.color);let e=i.getHex(t),r=new n(e);return i.cache[e]=r,r}static getHex(t){var e;if(Array.isArray(t))return t.map(i.getHex);if("string"==typeof t){let r=t;if(!isNaN(parseInt(r)))return parseInt(r);if(r=r.trim(),4==r.length&&"#"==r[0]&&(r="#"+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]),7==r.length&&"#"==r[0])return parseInt(r.substring(1),16);let n=i.rgbRegEx.exec(r);if(n){""!=n[1]&&console.log("WARNING: Opacity value in rgba ignored. Specify separately as opacity attribute.");let t=0;for(let e=2;e<5;e++){t*=256;let r=n[e].endsWith("%")?255*parseFloat(n[e])/100:parseFloat(n[e]);t+=Math.round(r)}return t}return(null===(e=null===window||void 0===window?void 0:window.$3Dmol)||void 0===e?void 0:e.htmlColors[t.toLowerCase()])||0}return t}}i.rgbRegEx=/rgb(a?)\(\s*([^ ,\)\t]+)\s*,\s*([^ ,\)\t]+)\s*,\s*([^ ,\)\t]+)/i,i.cache={0:new n(0)};const o={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,darkgrey:11119017,darkgreen:25600,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,grey:8421504,green:32768,greenyellow:11403055,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,lightgrey:13882323,lightgreen:9498256,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},a={pyMol:{h:16711680,s:16776960,c:65280},Jmol:{h:16711808,s:16762880,c:16777215}},s={H:16777215,He:16761035,HE:16761035,Li:11674146,LI:11674146,B:65280,C:13158600,N:9408511,O:15728640,F:14329120,Na:255,NA:255,Mg:2263842,MG:2263842,Al:8421520,AL:8421520,Si:14329120,SI:14329120,P:16753920,S:16762930,Cl:65280,CL:65280,Ca:8421520,CA:8421520,Ti:8421520,TI:8421520,Cr:8421520,CR:8421520,Mn:8421520,MN:8421520,Fe:16753920,FE:16753920,Ni:10824234,NI:10824234,Cu:10824234,CU:10824234,Zn:10824234,ZN:10824234,Br:10824234,BR:10824234,Ag:8421520,AG:8421520,I:10494192,Ba:16753920,BA:16753920,Au:14329120,AU:14329120},l={defaultColor:16716947,Jmol:{H:16777215,He:14286847,HE:14286847,Li:13402367,LI:13402367,Be:12779264,BE:12779264,B:16758197,C:9474192,N:3166456,O:16715021,F:9494608,Ne:11789301,NE:11789301,Na:11230450,NA:11230450,Mg:9109248,MG:9109248,Al:12560038,AL:12560038,Si:1578e4,SI:1578e4,P:16744448,S:16777008,Cl:2093087,CL:2093087,Ar:8442339,AR:8442339,K:9388244,Ca:4062976,CA:4062976,Sc:15132390,SC:15132390,Ti:12567239,TI:12567239,V:10921643,Cr:9083335,CR:9083335,Mn:10255047,MN:10255047,Fe:14706227,FE:14706227,Co:15765664,CO:15765664,Ni:5296208,NI:5296208,Cu:13140019,CU:13140019,Zn:8224944,ZN:8224944,Ga:12750735,GA:12750735,Ge:6721423,GE:6721423,As:12419299,AS:12419299,Se:16752896,SE:16752896,Br:10889513,BR:10889513,Kr:6076625,KR:6076625,Rb:7351984,RB:7351984,Sr:65280,SR:65280,Y:9764863,Zr:9756896,ZR:9756896,Nb:7586505,NB:7586505,Mo:5551541,MO:5551541,Tc:3907230,TC:3907230,Ru:2396047,RU:2396047,Rh:687500,RH:687500,Pd:27013,PD:27013,Ag:12632256,AG:12632256,Cd:16767375,CD:16767375,In:10909043,IN:10909043,Sn:6717568,SN:6717568,Sb:10380213,SB:10380213,Te:13924864,TE:13924864,I:9699476,Xe:4366e3,XE:4366e3,Cs:5707663,CS:5707663,Ba:51456,BA:51456,La:7394559,LA:7394559,Ce:16777159,CE:16777159,Pr:14286791,PR:14286791,Nd:13107143,ND:13107143,Pm:10747847,PM:10747847,Sm:9437127,SM:9437127,Eu:6422471,EU:6422471,Gd:4587463,GD:4587463,Tb:3211207,TB:3211207,Dy:2097095,DY:2097095,Ho:65436,HO:65436,Er:58997,ER:58997,Tm:54354,TM:54354,Yb:48952,YB:48952,Lu:43812,LU:43812,Hf:5096191,HF:5096191,Ta:5089023,TA:5089023,W:2200790,Re:2522539,RE:2522539,Os:2516630,OS:2516630,Ir:1528967,IR:1528967,Pt:13684960,PT:13684960,Au:16765219,AU:16765219,Hg:12105936,HG:12105936,Tl:10900557,TL:10900557,Pb:5724513,PB:5724513,Bi:10375093,BI:10375093,Po:11230208,PO:11230208,At:7688005,AT:7688005,Rn:4358806,RN:4358806,Fr:4325478,FR:4325478,Ra:32e3,RA:32e3,Ac:7384058,AC:7384058,Th:47871,TH:47871,Pa:41471,PA:41471,U:36863,Np:33023,NP:33023,Pu:27647,PU:27647,Am:5528818,AM:5528818,Cm:7888099,CM:7888099,Bk:9064419,BK:9064419,Cf:10565332,CF:10565332,Es:11739092,ES:11739092,Fm:11739066,FM:11739066,Md:11734438,MD:11734438,No:12389767,NO:12389767,Lr:13041766,LR:13041766,Rf:13369433,RF:13369433,Db:13697103,DB:13697103,Sg:14221381,SG:14221381,Bh:14680120,BH:14680120,Hs:15073326,HS:15073326,Mt:15400998,MT:15400998},rasmol:s,defaultColors:Object.assign({},s),greenCarbon:Object.assign(Object.assign({},s),{C:65280}),cyanCarbon:Object.assign(Object.assign({},s),{C:65535}),magentaCarbon:Object.assign(Object.assign({},s),{C:16711935}),yellowCarbon:Object.assign(Object.assign({},s),{C:16776960}),whiteCarbon:Object.assign(Object.assign({},s),{C:16777215}),orangeCarbon:Object.assign(Object.assign({},s),{C:16753920}),purpleCarbon:Object.assign(Object.assign({},s),{C:8388736}),blueCarbon:Object.assign(Object.assign({},s),{C:255})},c={amino:{ALA:13158600,ARG:1334015,ASN:56540,ASP:15075850,CYS:15132160,GLN:56540,GLU:15075850,GLY:15461355,HIS:8553170,ILE:1016335,LEU:1016335,LYS:1334015,MET:15132160,PHE:3289770,PRO:14456450,SER:16422400,THR:16422400,TRP:11819700,TYR:3289770,VAL:1016335,ASX:16738740,GLX:16738740},shapely:{ALA:9240460,ARG:124,ASN:16743536,ASP:10485826,CYS:16777072,GLN:16731212,GLU:6684672,GLY:16777215,HIS:7368959,ILE:19456,LEU:4546117,LYS:4671416,MET:12099650,PHE:5459026,PRO:5395026,SER:16740418,THR:12078080,TRP:5195264,TYR:9203788,VAL:16747775,ASX:16711935,GLX:16711935},nucleic:{A:10526975,G:16740464,I:8454143,C:16747595,T:10551200,U:16744576}},u={atom:{A:12636415,B:11599792,C:16761032,D:16777088,E:16761087,F:11596016,G:16765040,H:15761536,I:16113331,J:49151,K:13458524,L:6737322,M:10145074,N:15631086,O:52945,P:65407,Q:3978097,R:139,S:12433259,T:25600,U:8388608,V:8421376,W:8388736,X:32896,Y:12092939,Z:11674146},hetatm:{A:9478351,B:8441752,C:13602992,D:13619056,E:13603023,F:8437952,G:13607008,H:12603504,I:12955267,J:42959,K:11881548,L:5682578,M:9090346,N:12481214,O:46753,P:53103,Q:3447649,R:187,S:10854235,T:37888,U:11534336,V:11579392,W:11534512,X:45232,Y:15250963,Z:12726834}},h={ssPyMol:{prop:"ss",map:a.pyMol},ssJmol:{prop:"ss",map:a.Jmol},Jmol:{prop:"elem",map:l.Jmol},amino:{prop:"resn",map:c.amino},shapely:{prop:"resn",map:c.shapely},nucleic:{prop:"resn",map:c.nucleic},chain:{prop:"chain",map:u.atom},rasmol:{prop:"elem",map:l.rasmol},default:{prop:"elem",map:l.defaultColors},greenCarbon:{prop:"elem",map:l.greenCarbon},chainHetatm:{prop:"chain",map:u.hetatm},cyanCarbon:{prop:"elem",map:l.cyanCarbon},magentaCarbon:{prop:"elem",map:l.magentaCarbon},purpleCarbon:{prop:"elem",map:l.purpleCarbon},whiteCarbon:{prop:"elem",map:l.whiteCarbon},orangeCarbon:{prop:"elem",map:l.orangeCarbon},yellowCarbon:{prop:"elem",map:l.yellowCarbon},blueCarbon:{prop:"elem",map:l.blueCarbon}}},"./src/glcartoon.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{drawCartoon:()=>T,subdivide_spline:()=>u});var n=r("./src/WebGL/math/index.ts"),i=r("./src/WebGL/shapes/index.ts"),o=r("./src/WebGL/index.ts"),a=r("./src/Gradient.ts"),s=r("./src/colors.ts"),l=r("./src/GLDraw.ts"),c=r("./src/utilities.ts");function u(t,e){var r,i,o,a,s,l,c,u,h,d=[],f=t;for((f=[]).push(t[0]),r=1,i=t.length-1;r0){var g=[i,i+1,i-1,i-2],v=h.faceidx;p[v]=g[0],p[v+1]=g[1],p[v+2]=g[3],p[v+3]=g[1],p[v+4]=g[2],p[v+5]=g[3],h.faceidx+=6}h.vertices+=2}}function v(t,e,r,n,o,a,l){l&&"default"!==l||(l="rectangle"),"edged"===l?function(t,e,r,n,o,a){if(!(e.length<2)){var l,c;if(l=e[0],c=e[e.length-1],l=u(l,n),c=u(c,n),!o)return g(t,l,c,r);var h,d,f,p,m,v,b,y,x,_,w,k,A,M,T,S,C,E,L,z,O,D,I=[],R=[[0,2,-6,-8],[-4,-2,6,4],[7,-1,-5,3],[-3,5,1,-7]];for(A=0,M=l.length;A0){var P=void 0!==k&&void 0!==w&&k.serial!==w.serial;for(T=0;T<4;T++){var N=[v+R[T][0],v+R[T][1],v+R[T][2],v+R[T][3]];if(D[y=L.faceidx]=N[0],D[y+1]=N[1],D[y+2]=N[3],D[y+3]=N[1],D[y+4]=N[2],D[y+5]=N[3],L.faceidx+=6,w.clickable||k.clickable||w.hoverable||k.hoverable){var j=I[N[3]].clone(),B=I[N[0]].clone(),U=I[N[2]].clone(),G=I[N[1]].clone();if(j.atom=I[N[3]].atom||null,U.atom=I[N[2]].atom||null,B.atom=I[N[0]].atom||null,G.atom=I[N[1]].atom||null,P){var V=j.clone().add(B).multiplyScalar(.5),H=U.clone().add(G).multiplyScalar(.5),W=j.clone().add(G).multiplyScalar(.5);T%2==0?((k.clickable||k.hoverable)&&(S=new i.Triangle(V,W,j),C=new i.Triangle(H,U,W),E=new i.Triangle(W,U,j),k.intersectionShape.triangle.push(S),k.intersectionShape.triangle.push(C),k.intersectionShape.triangle.push(E)),(w.clickable||w.hoverable)&&(S=new i.Triangle(B,G,W),C=new i.Triangle(G,H,W),E=new i.Triangle(B,W,V),w.intersectionShape.triangle.push(S),w.intersectionShape.triangle.push(C),w.intersectionShape.triangle.push(E))):((w.clickable||w.hoverable)&&(S=new i.Triangle(V,W,j),C=new i.Triangle(H,U,W),E=new i.Triangle(W,U,j),w.intersectionShape.triangle.push(S),w.intersectionShape.triangle.push(C),w.intersectionShape.triangle.push(E)),(k.clickable||k.hoverable)&&(S=new i.Triangle(B,G,W),C=new i.Triangle(G,H,W),E=new i.Triangle(B,W,V),k.intersectionShape.triangle.push(S),k.intersectionShape.triangle.push(C),k.intersectionShape.triangle.push(E)))}else(w.clickable||w.hoverable)&&(S=new i.Triangle(B,G,j),C=new i.Triangle(G,U,j),w.intersectionShape.triangle.push(S),w.intersectionShape.triangle.push(C))}}}L.vertices+=8,k=w}var q=I.length-8;for(z=(L=t.updateGeoGroup(8)).vertexArray,O=L.colorArray,D=L.faceArray,b=3*(v=L.vertices),y=L.faceidx,A=0;A<4;A++){I.push(I[2*A]),I.push(I[q+2*A]);var Y=I[2*A],Z=I[q+2*A];z[b+6*A]=Y.x,z[b+1+6*A]=Y.y,z[b+2+6*A]=Y.z,z[b+3+6*A]=Z.x,z[b+4+6*A]=Z.y,z[b+5+6*A]=Z.z,O[b+6*A]=x.r,O[b+1+6*A]=x.g,O[b+2+6*A]=x.b,O[b+3+6*A]=x.r,O[b+4+6*A]=x.g,O[b+5+6*A]=x.b}q+=8,S=[v,v+2,v+6,v+4],C=[v+1,v+5,v+7,v+3],D[y]=S[0],D[y+1]=S[1],D[y+2]=S[3],D[y+3]=S[1],D[y+4]=S[2],D[y+5]=S[3],D[y+6]=C[0],D[y+7]=C[1],D[y+8]=C[3],D[y+9]=C[1],D[y+10]=C[2],D[y+11]=C[3],L.faceidx+=12,L.vertices+=8}}(t,e,r,n,o):"rectangle"!==l&&"oval"!==l&&"parabola"!==l||function(t,e,r,n,o,a,l){var c,h,d,f,p,m,v,b,y,x;if((d=e.length)<2||e[0].length<2)return;for(c=0;c0&&(c-=1,a=!0),E=Math.round(c*(r.length-1)/f),C=s.CC.color(r[E]),y=v,x=b,v=[],b=[],p=[],void 0!==e[0][c].atom&&(S=e[0][c].atom,"oval"===l?m=_:"rectangle"===l?m=w:"parabola"===l&&(m=k)),m||(m=w),h=0;h0&&!a){for(h=0;h<2*d;h++)D=[A+I[h][0],A+I[h][1],A+I[h][2],A+I[h][3]],O[T=R.faceidx]=D[0],O[T+1]=D[1],O[T+2]=D[3],O[T+3]=D[1],O[T+4]=D[2],O[T+5]=D[3],R.faceidx+=6;if(S.clickable||S.hoverable){var N=[];for(h in N.push(new i.Triangle(y[0],v[0],v[d-1])),N.push(new i.Triangle(y[0],v[d-1],y[d-1])),N.push(new i.Triangle(y[d-1],v[d-1],b[d-1])),N.push(new i.Triangle(y[d-1],b[d-1],x[d-1])),N.push(new i.Triangle(b[0],x[0],x[d-1])),N.push(new i.Triangle(b[d-1],b[0],x[d-1])),N.push(new i.Triangle(v[0],y[0],x[0])),N.push(new i.Triangle(b[0],v[0],x[0])),N)S.intersectionShape.triangle.push(N[h])}}R.vertices+=2*d}for(L=R.vertexArray,z=R.colorArray,O=R.faceArray,M=3*(A=R.vertices),T=R.faceidx,c=0;c=0&&r<1&&(a.transparent=!0,a.opacity=r),a.outline=n;var s=new o.Mesh(e,a);t.add(s)}}function _(t,e,r,i,o,a,s,l,c){var u,m,g,v,b,y;if(i&&o&&s){var x=o.sub(i);x.normalize();var _=l[c];for(m=c+1;m0&&v(V,W,H,d,L,0,W.style);var r=[],n=null;if(e){for(z=0;z0&&v(V,W,H,d,L,0,W.style),W=[],z=0;z{"use strict";r.r(e),r.d(e,{CAP:()=>m.CAP,CC:()=>i.CC,Color:()=>i.Color,CustomLinear:()=>n.CustomLinear,Cylinder:()=>c.Cylinder,GLDraw:()=>m.GLDraw,GLModel:()=>v.GLModel,GLShape:()=>p.GLShape,GLViewer:()=>b.GLViewer,GLVolumetricRender:()=>f.GLVolumetricRender,Gradient:()=>n.Gradient,GradientType:()=>n.GradientType,Label:()=>o.Label,LabelCount:()=>o.LabelCount,MarchingCube:()=>h.MarchingCube,MarchingCubeInitializer:()=>h.MarchingCubeInitializer,Matrix3:()=>l.Matrix3,Matrix4:()=>l.Matrix4,Parsers:()=>s.Parsers,PausableTimer:()=>u.PausableTimer,PointGrid:()=>h.PointGrid,ProteinSurface:()=>h.ProteinSurface,Quaternion:()=>l.Quaternion,ROYGB:()=>n.ROYGB,RWB:()=>n.RWB,Ray:()=>l.Ray,Sinebow:()=>n.Sinebow,Sphere:()=>c.Sphere,SurfaceType:()=>h.SurfaceType,Triangle:()=>c.Triangle,Vector2:()=>l.Vector2,Vector3:()=>l.Vector3,VolumeData:()=>d.VolumeData,adjustVolumeStyle:()=>u.adjustVolumeStyle,applyPartialCharges:()=>a.applyPartialCharges,autoinit:()=>y.autoinit,autoload:()=>y.autoload,base64ToArray:()=>u.base64ToArray,bondLength:()=>s.bondLength,builtinColorSchemes:()=>i.builtinColorSchemes,builtinGradients:()=>n.builtinGradients,chains:()=>i.chains,clamp:()=>l.clamp,conversionMatrix3:()=>l.conversionMatrix3,createStereoViewer:()=>b.createStereoViewer,createViewer:()=>b.createViewer,createViewerGrid:()=>b.createViewerGrid,deepCopy:()=>u.deepCopy,degToRad:()=>l.degToRad,download:()=>u.download,drawCartoon:()=>g.drawCartoon,elementColors:()=>i.elementColors,extend:()=>u.extend,get:()=>u.get,getAtomProperty:()=>u.getAtomProperty,getColorFromStyle:()=>u.getColorFromStyle,getElement:()=>u.getElement,getExtent:()=>u.getExtent,getGradient:()=>n.getGradient,getPropertyRange:()=>u.getPropertyRange,getbin:()=>u.getbin,htmlColors:()=>i.htmlColors,isEmptyObject:()=>u.isEmptyObject,isNumeric:()=>u.isNumeric,makeFunction:()=>u.makeFunction,mergeGeos:()=>u.mergeGeos,normalizeValue:()=>n.normalizeValue,partialCharges:()=>a.partialCharges,processing_autoinit:()=>y.processing_autoinit,residues:()=>i.residues,setBondLength:()=>s.setBondLength,setSyncSurface:()=>h.setSyncSurface,specStringToObject:()=>u.specStringToObject,splitMesh:()=>p.splitMesh,ssColors:()=>i.ssColors,subdivide_spline:()=>g.subdivide_spline,syncSurface:()=>h.syncSurface,viewers:()=>y.viewers});var n=r("./src/Gradient.ts"),i=r("./src/colors.ts"),o=r("./src/Label.ts"),a=r("./src/partialCharges.ts"),s=r("./src/parsers/index.ts"),l=r("./src/WebGL/math/index.ts"),c=r("./src/WebGL/shapes/index.ts"),u=r("./src/utilities.ts"),h=r("./src/ProteinSurface4.ts"),d=r("./src/VolumeData.ts"),f=r("./src/VolumetricRender.ts"),p=r("./src/GLShape.ts"),m=r("./src/GLDraw.ts"),g=r("./src/glcartoon.ts"),v=r("./src/GLModel.ts"),b=r("./src/GLViewer.ts"),y=r("./src/autoload.ts");r("./src/specs.ts"),window&&(window.$3Dmol=e)},"./src/parsers/CDJSON.ts":(t,e,r)=>{"use strict";function n(t,e){var r=[[]];"string"==typeof t&&(t=JSON.parse(t));for(var n=t.m,i=n[0].a,o=n[0].b,a=n[0].s,s=void 0!==e&&void 0!==e.parseStyle?e.parseStyle:void 0!==a,l=r[r.length-1].length,c=0;cn})},"./src/parsers/CIF.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{CIF:()=>s});var n=r("./src/parsers/utils/computeSecondaryStructure.ts"),i=r("./src/parsers/utils/processSymmetries.ts"),o=r("./src/WebGL/index.ts"),a=r("./src/parsers/utils/assignPDBBonds.ts");function s(t,e={}){var r=[],s=!e.doAssembly,l=r.modelData=[],c=void 0===e.assignBonds||e.assignBonds;function u(t,e){for(var r=[],n=0,i=0;i-1){let t=p.split("");t[m]="_",p=(p=t.join("")).substring(0,m)+"_"+p.substring(m+1)}}d.push(p)}}for(var g,v,b,y,x=0;x{"use strict";r.r(e),r.d(e,{CUBE:()=>a});var n=r("./src/WebGL/index.ts"),i=r("./src/parsers/utils/assignBonds.ts"),o=r("./src/parsers/utils/anumToSymbol.ts");function a(t,e){e=e||{};var r=[[]],a=t.split(/\r?\n/),s=void 0===e.assignBonds||e.assignBonds;if(a.length<6)return r;var l=a[2].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),c=Math.abs(parseFloat(l[0]));let u={};var h=u.origin=new n.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3]));l=a[3].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");var d=(l=a[3].replace(/^\s+/,"").replace(/\s+/g," ").split(" "))[0]>0?.529177:1;h.multiplyScalar(d);var f=Math.abs(l[0]),p=new n.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])).multiplyScalar(d);l=a[4].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");var m=Math.abs(l[0]),g=new n.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])).multiplyScalar(d);l=a[5].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");var v=Math.abs(l[0]),b=new n.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])).multiplyScalar(d);if(u.size={x:f,y:m,z:v},u.unit=new n.Vector3(p.x,g.y,b.z),0!=p.y||0!=p.z||0!=g.x||0!=g.z||0!=b.x||0!=b.y){u.matrix4=new n.Matrix4(p.x,g.x,b.x,0,p.y,g.y,b.y,0,p.z,g.z,b.z,0,0,0,0,1);let t=(new n.Matrix4).makeTranslation(h.x,h.y,h.z);u.matrix4=u.matrix4.multiplyMatrices(t,u.matrix4),u.matrix=u.matrix4.matrix3FromTopLeft(),u.origin=new n.Vector3(0,0,0),u.unit=new n.Vector3(1,1,1)}r.modelData=[{cryst:u}],a=a.splice(6,c);for(var y=r[r.length-1].length,x=y+a.length,_=y;_{"use strict";r.r(e),r.d(e,{GRO:()=>o});var n=r("./src/parsers/utils/assignPDBBonds.ts"),i=r("./src/parsers/utils/atomNameToElem.ts");function o(t,e){for(var r=[],o=t.split(/\r?\n|\r/);o.length>0&&!(o.length<3);){var a=parseInt(o[1]);if(isNaN(a)||a<=0)break;if(o.length44&&(f.dx=10*parseFloat(d.slice(44,52)),f.dy=10*parseFloat(d.slice(52,60)),f.dz=10*parseFloat(d.slice(60,68))),s[h]=f}if(o.length<=l+3){var p=o[l++].trim().split(/\s+/);if(3==p.length){for(var m=0;m<3;m++)p[m]=10*parseFloat(p[m]);r.box=p}}o.splice(0,++l)}for(let t=0;t{"use strict";r.r(e),r.d(e,{LAMMPSTRJ:()=>i});var n=r("./src/parsers/utils/assignBonds.ts");function i(t,e){for(var r=[],i={id:"serial",type:"atom",element:"elem",q:"charge",radius:"radius",x:"x",xu:"x",xs:"x",xsu:"x",y:"y",yu:"y",ys:"y",ysu:"y",z:"z",zu:"z",zs:"z",zsu:"z"},o=t.split(/\r?\n|\r/),a=0,s=0,l=0;l{"use strict";r.r(e),r.d(e,{MMTFparser:()=>h});var n=r("./src/utilities.ts"),i=r("./src/WebGL/index.ts"),o=r("./src/parsers/utils/computeSecondaryStructure.ts"),a=r("./src/parsers/utils/processSymmetries.ts"),s=r("./src/vendor/mmtf.js"),l=function(t){return String.fromCharCode.apply(null,t).replace(/\0/g,"")},c=function(t){return 0==t||2==t||4==t?"h":3==t?"s":"c"};let u=new Set(["D-SACCHARIDE","D-SACCHARIDE 1,4 AND 1,4 LINKING","D-SACCHARIDE 1,4 AND 1,6 LINKING","L-SACCHARIDE","L-SACCHARIDE 1,4 AND 1,4 LINKING","L-SACCHARIDE 1,4 AND 1,6 LINKING","NON-POLYMER","OTHER","PEPTIDE-LIKE","SACCHARIDE"]);function h(t,e){var r=!e.keepH,h=e.altLoc?e.altLoc:"A",d=!!e.noSecondaryStructure,f=!e.noComputeSecondaryStructure,p=!e.doAssembly,m=e.assemblyIndex?e.assemblyIndex:0;t="string"==typeof t?(0,n.base64ToArray)(t):new Uint8Array(t);var g,v,b,y,x,_,w=s.decode(t),k=[[]],A=k.modelData=[],M=0,T=0,S=0,C=w.secStructList,E=w.bFactorList,L=w.altLocList,z=w.occupancyList,O=w.bondAtomList,D=w.bondOrderList,I=w.numModels;if(0==I)return k;e.multimodel||(I=1);var R=[];if(!p&&w.bioAssemblyList&&w.bioAssemblyList.length>0){var F=w.bioAssemblyList[m].transformList;for(g=0,_=F.length;g<_;g++){var P=new i.Matrix4(F[g].matrix);P.transpose(),R.push(P)}}var N=null;if(w.unitCell){var j=w.unitCell;N={a:j[0],b:j[1],c:j[2],alpha:j[3],beta:j[4],gamma:j[5]}}let B=[];w.entityList.forEach((t=>{t.chainIndexList.forEach((e=>{B[e]="polymer"==t.type}))}));var U=0;for(x=0;x=C.length||c(C[et]!=tt))&&(Q=!0)}var rt=w.groupIdList[T],nt=X.groupName;let t=X.chemCompType;var it=S;let e=u.has(t)||!B[M];for(b=0;b<$;++b){var ot=X.elementList[b];if(r&&"H"==ot)S+=1;else{var at="";E&&(at=E[S]);var st="";L&&L[S]&&(st=String.fromCharCode(L[S]));var lt="";if(z&&(lt=z[S]),""==st||st==h||"*"==h){var ct=w.atomIdList[S],ut=X.atomNameList[b],ht=0;X.atomChargeList&&(ht=X.atomChargeList[b]);var dt=w.xCoordList[S],ft=w.yCoordList[S],pt=w.zCoordList[S];H[S]=V.length,V.push({resn:nt,x:dt,y:ft,z:pt,elem:ot,hetflag:e,chain:q,resi:rt,icode:st,rescode:rt+(" "!=st?"^"+st:""),serial:ct,altLoc:st,index:S,atom:ut,bonds:[],ss:c(J),ssbegin:K,ssend:Q,bondOrder:[],properties:{charge:ht,occupancy:lt},b:at}),S+=1}else S+=1}}var mt=X.bondAtomList;for(b=0,y=X.bondOrderList.length;b=S){U=t;break}let i=H[e],o=H[r],a=V[i],s=V[o];a&&s&&(a.bonds.push(o),a.bondOrder.push(n),s.bonds.push(i),s.bondOrder.push(n))}e.multimodel&&(e.onemol||k.push([]))}if(!p)for(let t=0;t{"use strict";r.r(e),r.d(e,{MOL2:()=>i});let n={"C.1":"C",C1:"C","C.2":"C",C2:"C","C.3":"C",C3:"C","C.ar":"C",Car:"C","C.cat":"C",Ccat:"C","H.spc":"H",Hspc:"H","H.t3p":"H",Ht3p:"H","N.1":"N",N1:"N","N.2":"N",N2:"N","N.3":"N",N3:"N","N.4":"N",N4:"N","N.am":"N",Nam:"N","N.ar":"N",Nar:"N","N.p13":"N",Np13:"N","O.2":"O",O2:"O","O.3":"O",O3:"O","O.co2":"O",Oco2:"O","O.spc":"O",Ospc:"O","O.t3p":"O",Ot3p:"O","P.3":"P",P3:"P","S.2":"S",S2:"S","S.3":"S",S3:"S","S.o":"S",So:"S","S.o2":"S",So2:"S"};function i(t,e){var r=[[]],i=!1;void 0!==e.keepH&&(i=!e.keepH);var o=t.search(/@MOLECULE/),a=t.search(/@ATOM/);if(-1==o||-1==a)return r;for(var s=t.substring(o).split(/\r?\n|\r/);s.length>0;){var l=[],c=s[2].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),u=parseInt(c[0]),h=0;c.length>1&&(h=parseInt(c[1]));var d,f=4;for(d=3;dATOM"==s[d]){f=d+1;break}var p=r[r.length-1].length,m=p+u;for(d=p;dBOND"==s[f++]){_=!0;break}if(_&&h)for(d=0;d{"use strict";r.r(e),r.d(e,{PDB:()=>i});var n=r("./src/parsers/utils/getSinglePDB.ts");function i(t,e){e=e||{};var r=[],i={};r.modelData=[];for(var o=t.split(/\r?\n|\r/);o.length>0;){var a=(0,n.getSinglePDB)(o,e,i),s=a[0],l=a[1];if(o=a[2],0!=s.length){if(e.multimodel&&e.onemol&&r.length>0)for(var c=r[0].length,u=0;u{"use strict";r.r(e),r.d(e,{PQR:()=>o});var n=r("./src/parsers/utils/assignPDBBonds.ts"),i=r("./src/parsers/utils/computeSecondaryStructure.ts");function o(t,e){var r=[[]],o=!e.noSecondaryStructure;r.modelData=[{symmetries:[]}];var a,s=[],l=t.split(/\r?\n|\r/);for(let t=0;t1&&e[1].toUpperCase()!=e[1]&&(v=e.substring(0,2)),u="H"==a[0],s[t]=r[r.length-1].length,r[r.length-1].push({resn:n,x:d,y:f,z:p,elem:v,hetflag:u,chain:i,resi:o,serial:t,atom:e,bonds:[],ss:"c",bondOrder:[],properties:{charge:m,partialCharge:m,radius:g},pdbline:a})}else if("CONECT"==c){var b=parseInt(a.substring(6,11)),y=r[r.length-1][s[b]];for(let t=0;t<4;t++){var x=parseInt(a.substring([11,16,21,26][t],[11,16,21,26][t]+5)),_=r[r.length-1][s[x]];void 0!==y&&void 0!==_&&(y.bonds.push(s[x]),y.bondOrder.push(1))}}}for(let t=0;t{"use strict";function n(t){var e,r=[],n=0,i=t.split(/\r?\n|\r/);if(!(i.length>0&&i[0].includes("VERSION")))return[];var o=i.filter((function(t){return t.includes("POINTERS")||t.includes("ATOM_NAME")||t.includes("CHARGE")||t.includes("RADII")||t.includes("BONDS_INC_HYDROGEN")||t.includes("BONDS_WITHOUT_HYDROGEN")})),a=u("POINTERS");if(-1==a)return[];var s=h(a),l=parseInt(i[a+1].slice(0,s[1]));if(isNaN(l)||l<=0)return[];if(-1==(a=u("ATOM_NAME")))return[];var c=(s=h(a))[0];for(let t=0;t0){for(;!i[e].includes("FORMAT");)e++;return e}return-1}function h(t){var e=i[t].match(/\((\d*)\S*/),r=i[t].match(/[a-zA-Z](\d*)\)\s*/);return null==r&&(r=i[t].match(/[a-zA-Z](\d*)\.\d*\)\s*/)),[e[1],r[1]]}return[r]}r.r(e),r.d(e,{PRMTOP:()=>n})},"./src/parsers/SDF.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SDF:()=>o});var n=function(t,e){var r=[[]],n=!1;for(void 0!==e.keepH&&(n=!e.keepH);t.length>0&&!(t.length<4);){var i=parseInt(t[3].substring(0,3));if(isNaN(i)||i<=0)break;var o=parseInt(t[3].substring(3,6)),a=4;if(t.length<4+i+o)break;var s,l,c=[],u=r[r.length-1].length,h=u+i;for(s=u;s0&&!(t.length<8)&&t[4].startsWith("M V30 BEGIN CTAB")&&t[5].startsWith("M V30 COUNTS")&&!(t[5].length<14);){var i=t[5].substring(13).match(/\S+/g);if(i.length<2)break;var o=parseInt(i[0]);if(isNaN(o)||o<=0)break;var a=parseInt(i[1]),s=7;if(t.length<8+o+a)break;var l,c=[],u=r[r.length-1].length,h=u+o;for(l=u;l4){var f={},p=d[1].replace(/ /g,"");f.atom=f.elem=p[0].toUpperCase()+p.substring(1).toLowerCase(),"H"===f.elem&&n||(f.serial=l,c[l]=r[r.length-1].length,f.x=parseFloat(d[2]),f.y=parseFloat(d[3]),f.z=parseFloat(d[4]),f.hetflag=!0,f.bonds=[],f.bondOrder=[],f.properties={},f.index=r[r.length-1].length,r[r.length-1].push(f))}}if("M V30 END ATOM"!==t[s])break;if(s++,0===a||"M V30 BEGIN BOND"!==t[s])break;for(s++,l=0;l3){var g=c[parseInt(m[2])-1+u],v=c[parseInt(m[3])-1+u],b=parseFloat(m[1]);void 0!==g&&void 0!==v&&(r[r.length-1][g].bonds.push(v),r[r.length-1][g].bondOrder.push(b),r[r.length-1][v].bonds.push(g),r[r.length-1][v].bondOrder.push(b))}}if(!e.multimodel)break;for(e.onemol||r.push([]);"$$$$"!==t[s]&&s3&&o[3].length>38&&(r=o[3].substring(34,39)),"V2000"===r?n(o,e):"V3000"===r?i(o,e):[[""]]}},"./src/parsers/VASP.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{VASP:()=>i});var n=r("./src/WebGL/index.ts");function i(t){var e=[[]],r={},i=t.replace(/^\s+/,"").split(/\r?\n/);if(i.length<3)return e;if(!i[1].match(/\d+/))return console.log("Warning: second line of the vasp structure file must be a number"),e;if(r.length=parseFloat(i[1]),r.length<0)return console.log("Warning: Vasp implementation for negative lattice lengths is not yet available"),e;r.xVec=new Float32Array(i[2].replace(/^\s+/,"").split(/\s+/)),r.yVec=new Float32Array(i[3].replace(/^\s+/,"").split(/\s+/)),r.zVec=new Float32Array(i[4].replace(/^\s+/,"").split(/\s+/));var o=new n.Matrix3(r.xVec[0],r.xVec[1],r.xVec[2],r.yVec[0],r.yVec[1],r.yVec[2],r.zVec[0],r.zVec[1],r.zVec[2]);o.multiplyScalar(r.length),e.modelData=[{symmetries:[],cryst:{matrix:o}}];var a=i[5].replace(/\s+/,"").replace(/\s+$/,"").split(/\s+/),s=new Int16Array(i[6].replace(/^\s+/,"").split(/\s+/)),l=i[7].replace(/\s+/,"");if(l.match(/C/))l="cartesian";else{if(!l.match(/D/))return console.log("Warning: Unknown vasp mode in POSCAR file: mode must be either C(artesian) or D(irect)"),e;l="direct"}if(a.length!=s.length)return console.log("Warning: declaration of atomary species wrong:"),console.log(a),console.log(s),e;i.splice(0,8);for(var c=0,u=0,h=a.length;u{"use strict";r.r(e),r.d(e,{XYZ:()=>o});var n=r("./src/WebGL/index.ts"),i=r("./src/parsers/utils/assignBonds.ts");function o(t,e){for(var r=[[]],o=void 0===(e=e||{}).assignBonds||e.assignBonds,a=t.split(/\r?\n|\r/);a.length>0&&!(a.length<3);){var s=parseInt(a[0]);if(isNaN(s)||s<=0)break;if(a.length1){var c=new Float32Array(l[1].split(/\s+/)),u=new n.Matrix3(c[0],c[3],c[6],c[1],c[4],c[7],c[2],c[5],c[8]);r.modelData=[{cryst:{matrix:u}}]}for(var h=2,d=r[r.length-1].length,f=d+s,p=d;p=7&&(g.dx=parseFloat(m[4]),g.dy=parseFloat(m[5]),g.dz=parseFloat(m[6]))}if(!e.multimodel)break;r.push([]),a.splice(0,h)}if(o)for(let t=0;t{"use strict";r.r(e),r.d(e,{Parsers:()=>v,bondLength:()=>g.bondLength,setBondLength:()=>g.setBondLength});var n=r("./src/parsers/VASP.ts"),i=r("./src/parsers/CUBE.ts"),o=r("./src/parsers/XYZ.ts"),a=r("./src/parsers/SDF.ts"),s=r("./src/parsers/CDJSON.ts"),l=r("./src/parsers/CIF.ts"),c=r("./src/parsers/MOL2.ts"),u=r("./src/parsers/PDB.ts"),h=r("./src/parsers/PQR.ts"),d=r("./src/parsers/MMTF.ts"),f=r("./src/parsers/PRMTOP.ts"),p=r("./src/parsers/GRO.ts"),m=r("./src/parsers/LAMMPSTRJ.ts"),g=r("./src/parsers/utils/bondLength.ts");const v={vasp:n.VASP,VASP:n.VASP,cube:i.CUBE,CUBE:i.CUBE,xyz:o.XYZ,XYZ:o.XYZ,sdf:a.SDF,SDF:a.SDF,json:s.CDJSON,cdjson:s.CDJSON,CDJSON:s.CDJSON,mcif:l.CIF,cif:l.CIF,CIF:l.CIF,mol2:c.MOL2,MOL2:c.MOL2,pdb:u.PDB,PDB:u.PDB,pdbqt:u.PDB,PDBQT:u.PDB,pqr:h.PQR,PQR:h.PQR,mmtf:d.MMTFparser,MMTF:d.MMTFparser,prmtop:f.PRMTOP,PRMTOP:f.PRMTOP,gro:p.GRO,GRO:p.GRO,lammpstrj:m.LAMMPSTRJ,LAMMPSTRJ:m.LAMMPSTRJ}},"./src/parsers/utils/anumToSymbol.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{anumToSymbol:()=>n});const n={1:"H",2:"He",3:"Li",4:"Be",5:"B",6:"C",7:"N",8:"O",9:"F",10:"Ne",11:"Na",12:"Mg",13:"Al",14:"Si",15:"P",16:"S",17:"Cl",18:"Ar",19:"K",20:"Ca",21:"Sc",22:"Ti",23:"V",24:"Cr",25:"Mn",26:"Fe",27:"Co",28:"Ni",29:"Cu",30:"Zn",31:"Ga",32:"Ge",33:"As",34:"Se",35:"Br",36:"Kr",37:"Rb",38:"Sr",39:"Y",40:"Zr",41:"Nb",42:"Mo",43:"Tc",44:"Ru",45:"Rh",46:"Pd",47:"Ag",48:"Cd",49:"In",50:"Sn",51:"Sb",52:"Te",53:"I",54:"Xe",55:"Cs",56:"Ba",71:"Lu",72:"Hf",73:"Ta",74:"W",75:"Re",76:"Os",77:"Ir",78:"Pt",79:"Au",80:"Hg",81:"Tl",82:"Pb",83:"Bi",84:"Po",85:"At",86:"Rn",87:"Fr",88:"Ra",104:"Rf",105:"Db",106:"Sg",107:"Bh",108:"Hs",109:"Mt",110:"Ds",111:"Rg",112:"Cn",113:"Nh",114:"Fl",115:"Mc",116:"Lv",117:"Ts",118:"Og",57:"La",58:"Ce",59:"Pr",60:"Nd",61:"Pm",62:"Sm",63:"Eu",64:"Gd",65:"Tb",66:"Dy",67:"Ho",68:"Er",69:"Tm",70:"Yb",89:"Ac",90:"Th",91:"Pa",92:"U",93:"Np",94:"Pu",95:"Am",96:"Cm",97:"Bk",98:"Cf",99:"Es",100:"Fm",101:"Md",102:"No"}},"./src/parsers/utils/areConnected.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{areConnected:()=>o});var n=r("./src/parsers/utils/bondLength.ts");const i=new Set(["Na","K","Ca","Mg","Mn","Sr"]);function o(t,e,r){if(r&&r.unboundCations&&(i.has(t.elem)||i.has(e.elem)))return!1;let o=(0,n.bondLength)(t.elem)+(0,n.bondLength)(e.elem);o+=.25,o*=o;let a=t.x-e.x;if(a*=a,a>o)return!1;let s=t.y-e.y;if(s*=s,s>o)return!1;let l=t.z-e.z;if(l*=l,l>o)return!1;const c=a+s+l;return!(isNaN(c)||c<.5||c>o||t.altLoc!==e.altLoc&&" "!==t.altLoc&&" "!==e.altLoc)}},"./src/parsers/utils/assignBackboneHBonds.ts":(t,e,r)=>{"use strict";function n(t,e){const r=e||3.2,n=r*r,i=[];for(let e=0,r=t.length;er)break;if(t.atom==o.atom)continue;const s=Math.abs(t.y-o.y);if(s>r)continue;const l=Math.abs(t.x-o.x);if(l>r)continue;const c=l*l+s*s+e*e;c>n||t.chain==o.chain&&Math.abs(t.resi-o.resi)<4||(cn})},"./src/parsers/utils/assignBonds.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{assignBonds:()=>a});var n=r("./src/parsers/utils/areConnected.ts");const i=[{x:0,y:0,z:1},{x:0,y:1,z:-1},{x:0,y:1,z:0},{x:0,y:1,z:1},{x:1,y:-1,z:-1},{x:1,y:-1,z:0},{x:1,y:-1,z:1},{x:1,y:0,z:-1},{x:1,y:0,z:0},{x:1,y:0,z:1},{x:1,y:1,z:-1},{x:1,y:1,z:0},{x:1,y:1,z:1}],o=4.95;function a(t,e){for(let e=0,r=t.length;e{"use strict";r.r(e),r.d(e,{assignPDBBonds:()=>a});var n=r("./src/parsers/utils/areConnected.ts"),i=r("./src/parsers/utils/assignBonds.ts"),o=r("./src/parsers/utils/standardResidues.ts");function a(t,e){const r=[],a=[];for(let e=0,n=t.length;e1)break;(0,n.areConnected)(i,t,e)&&(-1===i.bonds.indexOf(t.index)&&(i.bonds.push(t.index),i.bondOrder.push(1),t.bonds.push(i.index),t.bondOrder.push(1)),i.resi!==t.resi&&(s=!0))}}}},"./src/parsers/utils/atomNameToElem.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{atomNameToElem:()=>i});var n=r("./src/parsers/utils/bondLength.ts");function i(t,e){let r=t.replace(/ /g,"");return r.length>0&&"H"===r[0]&&"Hg"!==r&&"He"!==r&&"Hf"!==r&&"Hs"!==r&&"Ho"!==r&&(r="H"),r.length>1&&(r=r[0].toUpperCase()+r.substring(1).toLowerCase(),void 0===n.bondTable[r]?r=r[0]:e&&("Ca"===r||"Cd"===r)&&(r="C")),r}},"./src/parsers/utils/bondLength.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{bondLength:()=>i,bondTable:()=>n,setBondLength:()=>o});let n={H:.37,He:.32,Li:1.34,Be:.9,B:.82,C:.77,N:.75,O:.73,F:.71,Ne:.69,Na:1.54,Mg:1.3,Al:1.18,Si:1.11,P:1.06,S:1.02,Cl:.99,Ar:.97,K:1.96,Ca:1.74,Sc:1.44,Ti:1.56,V:1.25,Mn:1.39,Fe:1.25,Co:1.26,Ni:1.21,Cu:1.38,Zn:1.31,Ga:1.26,Ge:1.22,Se:1.16,Br:1.14,Kr:1.1,Rb:2.11,Sr:1.92,Y:1.62,Zr:1.48,Nb:1.37,Mo:1.45,Tc:1.56,Ru:1.26,Rh:1.35,Pd:1.31,Ag:1.53,Cd:1.48,In:1.44,Sn:1.41,Sb:1.38,Te:1.35,I:1.33,Xe:1.3,Cs:2.25,Ba:1.98,Lu:1.6,Hf:1.5,Ta:1.38,W:1.46,Re:1.59,Os:1.44,Ir:1.37,Pt:1.28,Au:1.44,Hg:1.49,Tl:1.48,Pb:1.47,Bi:1.46,Rn:1.45};function i(t){return n[t]||1.6}function o(t,e){e<0&&(e=0),n[t]=e}},"./src/parsers/utils/computeSecondaryStructure.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{computeSecondaryStructure:()=>i});var n=r("./src/parsers/utils/assignBackboneHBonds.ts");function i(t,e){(0,n.assignBackboneHBonds)(t,e);const r={};let i,o,a,s,l,c;for(i=0,o=t.length;i{"use strict";r.r(e),r.d(e,{getSinglePDB:()=>h});var n=r("./src/WebGL/index.ts"),i=r("./src/parsers/utils/atomNameToElem.ts"),o=r("./src/parsers/utils/bondLength.ts"),a=r("./src/parsers/utils/computeSecondaryStructure.ts"),s=r("./src/parsers/utils/isEmpty.ts"),l=r("./src/parsers/utils/processSymmetries.ts"),c=r("./src/parsers/utils/assignPDBBonds.ts"),u=r("./src/parsers/utils/validateBonds.ts");function h(t,e,r){const h=[],d=void 0===e.assignBonds||e.assignBonds,f=!e.keepH,p=!!e.noSecondaryStructure,m=!e.noComputeSecondaryStructure,g=!e.doAssembly,v=e.altLoc?e.altLoc:"A",b={symmetries:[],cryst:void 0};let y,x=[];const _=[];let w;const k={};for(let e=0;e=4?1:r}}else k[o]=1,0!=e.bonds.length&&e.bonds[e.bonds.length-1]===i||(e.bonds.push(i),e.bondOrder.push(1))}}else if("HELIX "===a){s=w.substring(19,20),l=parseInt(w.substring(21,25)),c=parseInt(w.substring(33,37)),s in r||(r[s]={}),r[s][l]="h1";for(let t=l+1;t1&&("1"==t[1]?e.ssbegin=!0:"2"==t[1]&&(e.ssend=!0))}}return[h,b,x]}},"./src/parsers/utils/isEmpty.ts":(t,e,r)=>{"use strict";function n(t){for(const e in t)return!1;return!0}r.r(e),r.d(e,{isEmpty:()=>n})},"./src/parsers/utils/processSymmetries.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{processSymmetries:()=>i});var n=r("./src/WebGL/index.ts");function i(t,e,r,i){const o=!r.duplicateAssemblyAtoms,a=e.length;let s=a,l=-1,c=null,u=null;(r.normalizeAssembly||r.wrapAtoms)&&i&&(c=(0,n.conversionMatrix3)(i.a,i.b,i.c,i.alpha,i.beta,i.gamma),u=new n.Matrix3,u.getInverse3(c));let h=function(t){let e=t.clone().applyMatrix3(u);const r=[e.x,e.y,e.z],i=[0,0,0];for(let t=0;t<3;t++){for(;r[t]<-.001;)r[t]+=1,i[t]+=1;for(;r[t]>1.001;)r[t]-=1,i[t]-=1}const o=new n.Vector3(i[0],i[1],i[2]);return o.applyMatrix3(c),o};if(r.normalizeAssembly&&i)for(let r=0;r.001&&(l=r),t[r].translate(o)}if(o){if(t.length>1)for(let r=0;r=0){const r=new n.Vector3;for(let n=0;n{"use strict";r.r(e),r.d(e,{standardResidues:()=>n});const n=new Set(["ABU","ACD","ALA","ALB","ALI","ARG","AR0","ASN","ASP","ASX","BAS","CYS","CYH","CYX","CSS","CSH","GLN","GLU","GLX","GLY","HIS","HIE","HID","HIP","HYP","ILE","ILU","LEU","LYS","MET","PCA","PGA","PHE","PR0","PRO","PRZ","SER","THR","TRP","TYR","VAL","A","1MA","C","5MC","OMC","G","1MG","2MG","M2G","7MG","OMG","YG","I","T","U","+U","H2U","5MU","PSU","ACE","F0R","H2O","HOH","WAT"])},"./src/parsers/utils/validateBonds.ts":(t,e,r)=>{"use strict";function n(t,e){for(let r=0,n=t.length;rn})},"./src/partialCharges.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{applyPartialCharges:()=>i,partialCharges:()=>n});const n={"ALA:N":-.15,"ALA:CA":.1,"ALA:CB":0,"ALA:C":.6,"ALA:O":-.55,"ARG:N":-.15,"ARG:CA":.1,"ARG:CB":0,"ARG:CG":0,"ARG:CD":.1,"ARG:NE":-.1,"ARG:CZ":.5,"ARG:NH1":.25,"ARG:NH2":.25,"ARG:C":.6,"ARG:O":-.55,"ASN:N":-.15,"ASN:CA":.1,"ASN:CB":0,"ASN:CG":.55,"ASN:OD1":-.55,"ASN:ND2":0,"ASN:C":.6,"ASN:O":-.55,"ASP:N":-.15,"ASP:CA":.1,"ASP:CB":0,"ASP:CG":.14,"ASP:OD1":-.57,"ASP:OD2":-.57,"ASP:C":.6,"ASP:O":-.55,"CYS:N":-.15,"CYS:CA":.1,"CYS:CB":.19,"CYS:SG":-.19,"CYS:C":.6,"CYS:O":-.55,"GLN:N":-.15,"GLN:CA":.1,"GLN:CB":0,"GLN:CG":0,"GLN:CD":.55,"GLN:OE1":-.55,"GLN:NE2":0,"GLN:C":.6,"GLN:O":-.55,"GLU:N":-.15,"GLU:CA":.1,"GLU:CB":0,"GLU:CG":0,"GLU:CD":.14,"GLU:OE1":-.57,"GLU:OE2":-.57,"GLU:C":.6,"GLU:O":-.55,"GLY:N":-.15,"GLY:CA":.1,"GLY:C":.6,"GLY:O":-.55,"HIS:N":-.15,"HIS:CA":.1,"HIS:CB":0,"HIS:CG":.1,"HIS:ND1":-.1,"HIS:CD2":.1,"HIS:NE2":-.4,"HIS:CE1":.3,"HIS:C":.6,"HIS:O":-.55,"ILE:N":-.15,"ILE:CA":.1,"ILE:CB":0,"ILE:CG2":0,"ILE:CG1":0,"ILE:CD":0,"ILE:C":.6,"ILE:O":-.55,"LEU:N":-.15,"LEU:CA":.1,"LEU:CB":0,"LEU:CG":0,"LEU:CD1":0,"LEU:CD2":0,"LEU:C":.6,"LEU:O":-.55,"LYS:N":-.15,"LYS:CA":.1,"LYS:CB":0,"LYS:CG":0,"LYS:CD":0,"LYS:CE":.25,"LYS:NZ":.75,"LYS:C":.6,"LYS:O":-.55,"MET:N":-.15,"MET:CA":.1,"MET:CB":0,"MET:CG":.06,"MET:SD":-.12,"MET:CE":.06,"MET:C":.6,"MET:O":-.55,"PHE:N":-.15,"PHE:CA":.1,"PHE:CB":0,"PHE:CG":0,"PHE:CD1":0,"PHE:CD2":0,"PHE:CE1":0,"PHE:CE2":0,"PHE:CZ":0,"PHE:C":.6,"PHE:O":-.55,"PRO:N":-.25,"PRO:CD":.1,"PRO:CA":.1,"PRO:CB":0,"PRO:CG":0,"PRO:C":.6,"PRO:O":-.55,"SER:N":-.15,"SER:CA":.1,"SER:CB":.25,"SER:OG":-.25,"SER:C":.6,"SER:O":-.55,"THR:N":-.15,"THR:CA":.1,"THR:CB":.25,"THR:OG1":-.25,"THR:CG2":0,"THR:C":.6,"THR:O":-.55,"TRP:N":-.15,"TRP:CA":.1,"TRP:CB":0,"TRP:CG":-.03,"TRP:CD2":.1,"TRP:CE2":-.04,"TRP:CE3":-.03,"TRP:CD1":.06,"TRP:NE1":-.06,"TRP:CZ2":0,"TRP:CZ3":0,"TRP:CH2":0,"TRP:C":.6,"TRP:O":-.55,"TYR:N":-.15,"TYR:CA":.1,"TYR:CB":0,"TYR:CG":0,"TYR:CD1":0,"TYR:CE1":0,"TYR:CD2":0,"TYR:CE2":0,"TYR:CZ":.25,"TYR:OH":-.25,"TYR:C":.6,"TYR:O":-.55,"VAL:N":-.15,"VAL:CA":.1,"VAL:CB":0,"VAL:CG1":0,"VAL:CG2":0,"VAL:C":.6,"VAL:O":-.55};function i(t,e){if((!e||void 0===t.partialCharge)&&t.resn&&t.atom){var r=t.resn+":"+t.atom;t.properties.partialCharge=n[r]}}},"./src/specs.ts":(t,e,r)=>{"use strict";r.r(e)},"./src/utilities.ts":(__unused_webpack_module,__nested_webpack_exports__,__nested_webpack_require_1113028__)=>{"use strict";__nested_webpack_require_1113028__.r(__nested_webpack_exports__),__nested_webpack_require_1113028__.d(__nested_webpack_exports__,{PausableTimer:()=>PausableTimer,adjustVolumeStyle:()=>adjustVolumeStyle,base64ToArray:()=>base64ToArray,deepCopy:()=>deepCopy,download:()=>download,extend:()=>extend,get:()=>get,getAtomProperty:()=>getAtomProperty,getColorFromStyle:()=>getColorFromStyle,getElement:()=>getElement,getExtent:()=>getExtent,getPropertyRange:()=>getPropertyRange,getbin:()=>getbin,isEmptyObject:()=>isEmptyObject,isNumeric:()=>isNumeric,makeFunction:()=>makeFunction,mergeGeos:()=>mergeGeos,specStringToObject:()=>specStringToObject});var _Gradient__WEBPACK_IMPORTED_MODULE_0__=__nested_webpack_require_1113028__("./src/Gradient.ts"),_VolumeData__WEBPACK_IMPORTED_MODULE_1__=__nested_webpack_require_1113028__("./src/VolumeData.ts"),_colors__WEBPACK_IMPORTED_MODULE_2__=__nested_webpack_require_1113028__("./src/colors.ts");function extend(t,e){for(var r in e)e.hasOwnProperty(r)&&void 0!==e[r]&&(t[r]=e[r]);return t}function deepCopy(t){let e,r,n;if(null==t)return{};if("object"!=typeof t||null===t)return t;for(n in e=Array.isArray(t)?[]:{},t)r=t[n],e[n]=deepCopy(r);return e}function isNumeric(t){var e=typeof t;return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))}function isEmptyObject(t){var e;for(e in t)return!1;return!0}function makeFunction(callback){return callback&&"string"==typeof callback&&(callback=eval("("+callback+")")),callback&&"function"!=typeof callback?null:callback}function adjustVolumeStyle(t){t&&(!t.volformat||t.voldata instanceof _VolumeData__WEBPACK_IMPORTED_MODULE_1__.VolumeData||(t.voldata=new _VolumeData__WEBPACK_IMPORTED_MODULE_1__.VolumeData(t.voldata,t.volformat)),t.volscheme&&(t.volscheme=_Gradient__WEBPACK_IMPORTED_MODULE_0__.Gradient.getGradient(t.volscheme)))}function getExtent(t,e){var r,n,i,o,a,s,l,c,u,h,d=!e;if(r=n=i=9999,o=a=s=-9999,l=c=u=h=0,0===t.length)return[[0,0,0],[0,0,0],[0,0,0]];for(var f=0;fp.x?o:p.x,a=a>p.y?a:p.y,s=s>p.z?s:p.z,p.symmetries&&d))for(var m=0;mp.symmetries[m].x?o:p.symmetries[m].x,a=a>p.symmetries[m].y?a:p.symmetries[m].y,s=s>p.symmetries[m].z?s:p.symmetries[m].z}return[[r,n,i],[o,a,s],[l/h,c/h,u/h]]}function getPropertyRange(t,e){for(var r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,i=0,o=t.length;in&&(n=a))}return isFinite(r)||isFinite(n)?isFinite(r)?isFinite(n)||(n=r):r=n:r=n=0,[r,n]}class PausableTimer{constructor(t,e,r){this.total_time_run=0,this.fn=t,this.arg=r,this.countdown=e,this.start_time=(new Date).getTime(),this.ident=setTimeout(t,e,r)}cancel(){clearTimeout(this.ident)}pause(){clearTimeout(this.ident),this.total_time_run=(new Date).getTime()-this.start_time}resume(){this.ident=setTimeout(this.fn,Math.max(0,this.countdown-this.total_time_run),this.arg)}}function base64ToArray(t){for(var e=window.atob(t),r=e.length,n=new Uint8Array(r),i=0;i=0?parseFloat(t):parseInt(t):"true"===t||"false"!==t&&t},r={};if("all"===(t=t.replace(/%7E/g,"~")))return r;for(var n=t.split(";"),i=0;it.text()));return e?r.then(e):r}function getbin(t,e,r,n){var i;return i="POST"==r?fetch(t,{method:"POST",body:n}).then((t=>checkStatus(t))).then((t=>t.arrayBuffer())):fetch(t).then((t=>checkStatus(t))).then((t=>t.arrayBuffer())),e?i.then(e):i}function download(t,e,r,n){var i="",o="",a="",s="",l=null,c=e.addModel();if(t.indexOf(":")<0&&(t=4==t.length?"pdb:"+t:isNaN(t)?"url:"+t:"cid:"+t),"mmtf:"===t.substring(0,5))o=r&&r.pdbUri?r.pdbUri:"https://mmtf.rcsb.org/v1.0/full/",t=t.substring(5).toUpperCase(),s=o+t,r&&void 0===r.noComputeSecondaryStructure&&(r.noComputeSecondaryStructure=!0),l=new Promise((function(t){getbin(s).then((function(n){c.addMolData(n,"mmtf",r),e.zoomTo(),e.render(),t(c)}),(function(){console.log("fetch of "+s+" failed.")}))}));else{if("pdb:"===t.substring(0,4)){if(i="mmtf",r&&r.format&&(i=r.format),r&&void 0===r.noComputeSecondaryStructure&&(r.noComputeSecondaryStructure=!0),!(t=t.substring(4).toUpperCase()).match(/^[1-9][A-Za-z0-9]{3}$/))return void alert("Wrong PDB ID");"mmtf"==i?(a=r&&r.mmtfUri?r.mmtfUri:"https://mmtf.rcsb.org/v1.0/full/",s=a+t.toUpperCase()):(o=r&&r.pdbUri?r.pdbUri:"https://files.rcsb.org/view/",s=o+t+"."+i)}else if("cid:"==t.substring(0,4)){if(i="sdf",!(t=t.substring(4)).match(/^[0-9]+$/))return void alert("Wrong Compound ID");s="https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"+t+"/SDF?record_type=3d"}else"url:"==t.substring(0,4)&&(s=t.substring(4),i=s);var u=function(t){c.addMolData(t,i,r),e.zoomTo(),e.render()};l=new Promise((function(e){"mmtf"==i?getbin(s).then((function(t){u(t),e(c)})).catch((function(){o=r&&r.pdbUri?r.pdbUri:"https://files.rcsb.org/view/",s=o+t+".pdb",i="pdb",console.log("falling back to pdb format"),get(s).then((function(t){u(t),e(c)})).catch((function(t){u(""),e(c),console.log("fetch of "+s+" failed: "+t.statusText)}))})):get(s).then((function(t){u(t),e(c)})).catch((function(t){u(""),e(c),console.log("fetch of "+s+" failed: "+t.statusText)}))}))}return n?(l.then((function(t){n(t)})),c):l}function getColorFromStyle(t,e){let r=e.colorscheme;if(void 0!==_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r])r=_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r];else if("string"==typeof r&&r.endsWith("Carbon")){let t=r.substring(0,r.lastIndexOf("Carbon")).toLowerCase();if(void 0!==_colors__WEBPACK_IMPORTED_MODULE_2__.htmlColors[t]){let e=Object.assign({},_colors__WEBPACK_IMPORTED_MODULE_2__.elementColors.defaultColors);e.C=_colors__WEBPACK_IMPORTED_MODULE_2__.htmlColors[t],_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r]={prop:"elem",map:e},r=_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r]}}let n=t.color;if(void 0!==e.color&&"spectrum"!=e.color&&(n=e.color),void 0!==r){let o,a;if(void 0!==_colors__WEBPACK_IMPORTED_MODULE_2__.elementColors[r])r=_colors__WEBPACK_IMPORTED_MODULE_2__.elementColors[r],void 0!==r[t[r.prop]]&&(n=r.map[t[r.prop]]);else if(void 0!==r[t[r.prop]])n=r.map[t[r.prop]];else if(void 0!==r.prop&&void 0!==r.gradient){o=r.prop;var i=r.gradient;void 0!==_Gradient__WEBPACK_IMPORTED_MODULE_0__.builtinGradients[i]&&(i=new _Gradient__WEBPACK_IMPORTED_MODULE_0__.builtinGradients[i](r.min,r.max,r.mid?r.mid:r.colors));let e=i.range()||[-1,1];a=getAtomProperty(t,o),null!=a&&(n=i.valueToHex(a,e))}else void 0!==r.prop&&void 0!==r.map?(o=r.prop,a=getAtomProperty(t,o),void 0!==r.map[a]&&(n=r.map[a])):void 0!==e.colorscheme[t.elem]?n=e.colorscheme[t.elem]:console.log("Could not interpret colorscheme "+r)}else void 0!==e.colorfunc&&(n=e.colorfunc(t));return _colors__WEBPACK_IMPORTED_MODULE_2__.CC.color(n)}function getElement(t){let e=t;return"string"==typeof t?e=document.querySelector("#"+t):"object"==typeof t&&t.get&&(e=t.get(0)),e}},"./node_modules/upng-js/UPNG.js":(t,e,r)=>{var n;n={},t.exports=n,function(t,e){t.toRGBA8=function(e){var r=e.width,n=e.height;if(null==e.tabs.acTL)return[t.toRGBA8.decodeImage(e.data,r,n,e).buffer];var i=[];null==e.frames[0].data&&(e.frames[0].data=e.data);for(var o,a=new Uint8Array(r*n*4),s=0;s>3)]>>7-(7&p)&1);l[T]=x[S],l[T+1]=x[S+1],l[T+2]=x[S+2],l[T+3]=C>2)]>>6-((3&p)<<1)&3),l[T]=x[S],l[T+1]=x[S+1],l[T+2]=x[S+2],l[T+3]=C>1)]>>4-((1&p)<<2)&15),l[T]=x[S],l[T+1]=x[S+1],l[T+2]=x[S+2],l[T+3]=C>3]>>7-(7&p)&1))==255*g?0:255;c[p]=z<<24|E<<16|E<<8|E}if(2==h)for(p=0;p>2]>>6-((3&p)<<1)&3))==85*g?0:255,c[p]=z<<24|E<<16|E<<8|E;if(4==h)for(p=0;p>1]>>4-((1&p)<<2)&15))==17*g?0:255,c[p]=z<<24|E<<16|E<<8|E;if(8==h)for(p=0;p>3,s=Math.ceil(n*o/8),l=new Uint8Array(i*s),c=0,u=[0,0,4,0,2,0,1],h=[0,4,0,2,0,1,0],d=[8,8,8,4,4,2,2],f=[8,8,4,4,2,2,1],p=0;p<7;){for(var m=d[p],g=f[p],v=0,b=0,y=u[p];y>3])>>7-(7&M)&1,l[k*s+(A>>3)]|=T<<7-(3&A)),2==o&&(T=(T=e[M>>3])>>6-(7&M)&3,l[k*s+(A>>2)]|=T<<6-((3&A)<<1)),4==o&&(T=(T=e[M>>3])>>4-(7&M)&15,l[k*s+(A>>1)]|=T<<4-((1&A)<<2)),o>=8)for(var S=k*s+A*a,C=0;C>3)+C];M+=o,A+=g}w++,k+=m}v*b!=0&&(c+=b*(1+_)),p+=1}return l},t.decode._getBPP=function(t){return[1,null,3,1,2,null,4][t.ctype]*t.depth},t.decode._filterZero=function(e,r,n,i,o){var a=t.decode._getBPP(r),s=Math.ceil(i*a/8),l=t.decode._paeth;a=Math.ceil(a/8);for(var c=0;c>1)&255;if(4==d)for(f=a;f>1)&255;for(f=a;f>1)&255}if(4==d){for(f=0;f>8&255,t[e+1]=255&r},readUint:function(t,e){return 16777216*t[e]+(t[e+1]<<16|t[e+2]<<8|t[e+3])},writeUint:function(t,e,r){t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r},readASCII:function(t,e,r){for(var n="",i=0;i=0&&s>=0?(h=f*e+p<<2,d=(s+f)*i+a+p<<2):(h=(-s+f)*e-a+p<<2,d=f*i+p<<2),0==l)n[d]=t[h],n[d+1]=t[h+1],n[d+2]=t[h+2],n[d+3]=t[h+3];else if(1==l){var m=t[h+3]*(1/255),g=t[h]*m,v=t[h+1]*m,b=t[h+2]*m,y=n[d+3]*(1/255),x=n[d]*y,_=n[d+1]*y,w=n[d+2]*y,k=1-m,A=m+y*k,M=0==A?0:1/A;n[d+3]=255*A,n[d+0]=(g+x*k)*M,n[d+1]=(v+_*k)*M,n[d+2]=(b+w*k)*M}else if(2==l)m=t[h+3],g=t[h],v=t[h+1],b=t[h+2],y=n[d+3],x=n[d],_=n[d+1],w=n[d+2],m==y&&g==x&&v==_&&b==w?(n[d]=0,n[d+1]=0,n[d+2]=0,n[d+3]=0):(n[d]=g,n[d+1]=v,n[d+2]=b,n[d+3]=m);else if(3==l){if(m=t[h+3],g=t[h],v=t[h+1],b=t[h+2],y=n[d+3],x=n[d],_=n[d+1],w=n[d+2],m==y&&g==x&&v==_&&b==w)continue;if(m<220&&y>20)return!1}return!0},t.encode=function(e,r,n,i,o,a){null==i&&(i=0),null==a&&(a=!1);for(var s=new Uint8Array(e[0].byteLength*e.length+100),l=[137,80,78,71,13,10,26,10],c=0;c<8;c++)s[c]=l[c];var u=8,h=t._bin,d=t.crc.crc,f=h.writeUint,p=h.writeUshort,m=h.writeASCII,g=t.encode.compressPNG(e,r,n,i,a);f(s,u,13),m(s,u+=4,"IHDR"),f(s,u+=4,r),f(s,u+=4,n),s[u+=4]=g.depth,s[++u]=g.ctype,s[++u]=0,s[++u]=0,s[++u]=0,f(s,++u,d(s,u-17,17)),f(s,u+=4,1),m(s,u+=4,"sRGB"),s[u+=4]=1,f(s,++u,d(s,u-5,5)),u+=4;var v=e.length>1;if(v&&(f(s,u,8),m(s,u+=4,"acTL"),f(s,u+=4,e.length),f(s,u+=4,0),f(s,u+=4,d(s,u-12,12)),u+=4),3==g.ctype){for(f(s,u,3*(T=g.plte.length)),m(s,u+=4,"PLTE"),u+=4,c=0;c>8&255,w=y>>16&255;s[u+b+0]=x,s[u+b+1]=_,s[u+b+2]=w}if(f(s,u+=3*T,d(s,u-3*T-4,3*T+4)),u+=4,g.gotAlpha){for(f(s,u,T),m(s,u+=4,"tRNS"),u+=4,c=0;c>24&255;f(s,u+=T,d(s,u-T-4,T+4)),u+=4}}for(var k=0,A=0;A=300))break}}var _=!!m&&o,w=v.length;w<=256&&0==a&&(l=w<=2?1:w<=4?2:w<=16?4:8,o&&(l=8),m=!0);var k=[];for(h=0;hj&&(j=G),UB&&(B=U));var V=-1==j?1:(j-P+1)*(B-N+1);V>1)]|=g[M[q+G]]<<4-4*(1&G);else if(2==l)for(G=0;G>2)]|=g[M[q+G]]<<6-2*(3&G);else if(1==l)for(G=0;G>3)]|=g[M[q+G]]<<7-1*(7&G)}A=H,s=3,c=1}else if(0==m&&1==e.length){H=new Uint8Array(C*E*3);var Y=C*E;for(p=0;p5e5)||2!=l&&3!=l&&4!=l){for(var c=0;c>1)+256&255;if(4==a)for(u=o;u>1)&255;for(u=o;u>1)&255}if(4==a){for(u=0;u>>1:r>>>=1;t[e]=r}return t}(),update:function(e,r,n,i){for(var o=0;o>>8;return e},crc:function(e,r,n){return 4294967295^t.crc.update(4294967295,e,r,n)}},t.quantize=function(e,r,n){for(var i=[],o=0,a=0;am&&(m=p[a].est.L,g=a);if(m<.001)break;var v=p[g],b=t.quantize.splitPixels(s,l,v.i0,v.i1,v.est.e,v.est.eMq255),y={i0:v.i0,i1:b,bst:null,est:null,tdst:0,left:null,right:null};y.bst=t.quantize.stats(s,y.i0,y.i1),y.est=t.quantize.estats(y.bst);var x={i0:b,i1:v.i1,bst:null,est:null,tdst:0,left:null,right:null};for(x.bst={R:[],m:[],N:v.bst.N-y.bst.N},a=0;a<16;a++)x.bst.R[a]=v.bst.R[a]-y.bst.R[a];for(a=0;a<4;a++)x.bst.m[a]=v.bst.m[a]-y.bst.m[a];x.est=t.quantize.estats(x.bst),v.left=y,v.right=x,p[g]=y,p.push(x)}p.sort((function(t,e){return e.bst.N-t.bst.N}));for(var _=0;_>2]=L.est.rgba}i[_]=A.buffer}return{bufs:i,plte:p}},t.quantize.getNearest=function(e,r,n,i,o){if(null==e.left)return e.tdst=t.quantize.dist(e.est.q,r,n,i,o),e;var a=t.quantize.planeDst(e.est,r,n,i,o),s=e.left,l=e.right;a>0&&(s=e.right,l=e.left);var c=t.quantize.getNearest(s,r,n,i,o);if(c.tdst<=a*a)return c;var u=t.quantize.getNearest(l,r,n,i,o);return u.tdsta;)i-=4;if(n>=i)break;var l=r[n>>2];r[n>>2]=r[i>>2],r[i>>2]=l,n+=4,i-=4}for(;s(e,n,o)>a;)n-=4;return n+4},t.quantize.vecDot=function(t,e,r){return t[e]*r[0]+t[e+1]*r[1]+t[e+2]*r[2]+t[e+3]*r[3]},t.quantize.stats=function(t,e,r){for(var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],o=r-e>>2,a=e;a>>0}},t.M4={multVec:function(t,e){return[t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3],t[4]*e[0]+t[5]*e[1]+t[6]*e[2]+t[7]*e[3],t[8]*e[0]+t[9]*e[1]+t[10]*e[2]+t[11]*e[3],t[12]*e[0]+t[13]*e[1]+t[14]*e[2]+t[15]*e[3]]},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},sml:function(t,e){return[t*e[0],t*e[1],t*e[2],t*e[3]]}},t.encode.alphaMul=function(t,e){for(var r=new Uint8Array(t.length),n=t.length>>2,i=0;i{"use strict";var n={};(0,r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js").assign)(n,r("./node_modules/upng-js/node_modules/pako/lib/deflate.js"),r("./node_modules/upng-js/node_modules/pako/lib/inflate.js"),r("./node_modules/upng-js/node_modules/pako/lib/zlib/constants.js")),t.exports=n},"./node_modules/upng-js/node_modules/pako/lib/deflate.js":(t,e,r)=>{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/zlib/deflate.js"),i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/utils/strings.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/zlib/zstream.js"),l=Object.prototype.toString,c=0,u=-1,h=0,d=8;function f(t){if(!(this instanceof f))return new f(t);this.options=i.assign({level:u,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==c)throw new Error(a[r]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var p;if(p="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===l.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(r=n.deflateSetDictionary(this.strm,p))!==c)throw new Error(a[r]);this._dict_set=!0}}function p(t,e){var r=new f(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}f.prototype.push=function(t,e){var r,a,s=this.strm,u=this.options.chunkSize;if(this.ended)return!1;a=e===~~e?e:!0===e?4:0,"string"==typeof t?s.input=o.string2buf(t):"[object ArrayBuffer]"===l.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(u),s.next_out=0,s.avail_out=u),1!==(r=n.deflate(s,a))&&r!==c)return this.onEnd(r),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==r);return 4===a?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===c):2!==a||(this.onEnd(c),s.avail_out=0,!0)},f.prototype.onData=function(t){this.chunks.push(t)},f.prototype.onEnd=function(t){t===c&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Deflate=f,e.deflate=p,e.deflateRaw=function(t,e){return(e=e||{}).raw=!0,p(t,e)},e.gzip=function(t,e){return(e=e||{}).gzip=!0,p(t,e)}},"./node_modules/upng-js/node_modules/pako/lib/inflate.js":(t,e,r)=>{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/zlib/inflate.js"),i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/utils/strings.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/constants.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js"),l=r("./node_modules/upng-js/node_modules/pako/lib/zlib/zstream.js"),c=r("./node_modules/upng-js/node_modules/pako/lib/zlib/gzheader.js"),u=Object.prototype.toString;function h(t){if(!(this instanceof h))return new h(t);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,e.windowBits);if(r!==a.Z_OK)throw new Error(s[r]);if(this.header=new c,n.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=o.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=n.inflateSetDictionary(this.strm,e.dictionary))!==a.Z_OK))throw new Error(s[r])}function d(t,e){var r=new h(e);if(r.push(t,!0),r.err)throw r.msg||s[r.err];return r.result}h.prototype.push=function(t,e){var r,s,l,c,h,d=this.strm,f=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;s=e===~~e?e:!0===e?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof t?d.input=o.binstring2buf(t):"[object ArrayBuffer]"===u.call(t)?d.input=new Uint8Array(t):d.input=t,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new i.Buf8(f),d.next_out=0,d.avail_out=f),(r=n.inflate(d,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&p&&(r=n.inflateSetDictionary(this.strm,p)),r===a.Z_BUF_ERROR&&!0===m&&(r=a.Z_OK,m=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&r!==a.Z_STREAM_END&&(0!==d.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(d.output,d.next_out),c=d.next_out-l,h=o.buf2string(d.output,l),d.next_out=c,d.avail_out=f-c,c&&i.arraySet(d.output,d.output,l,c,0),this.onData(h)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(m=!0)}while((d.avail_in>0||0===d.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),d.avail_out=0,!0)},h.prototype.onData=function(t){this.chunks.push(t)},h.prototype.onEnd=function(t){t===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=h,e.inflate=d,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,d(t,e)},e.ungzip=d},"./node_modules/upng-js/node_modules/pako/lib/utils/common.js":(t,e)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(t[i]=r[i])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var o=0;o{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){o=!1}for(var a=new n.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function l(t,e){if(e<65534&&(t.subarray&&o||!t.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var r="",a=0;a>>6,e[a++]=128|63&r):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|63&r):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|63&r);return e},e.buf2binstring=function(t){return l(t,t.length)},e.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r4)c[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r1?c[n++]=65533:i<65536?c[n++]=i:(i-=65536,c[n++]=55296|i>>10&1023,c[n++]=56320|1023&i)}return l(c,n)},e.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+a[t[r]]>e?r:e}},"./node_modules/upng-js/node_modules/pako/lib/zlib/adler32.js":t=>{"use strict";t.exports=function(t,e,r,n){for(var i=65535&t,o=t>>>16&65535,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(i=i+e[n++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16}},"./node_modules/upng-js/node_modules/pako/lib/zlib/constants.js":t=>{"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},"./node_modules/upng-js/node_modules/pako/lib/zlib/crc32.js":t=>{"use strict";var e=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,r,n,i){var o=e,a=i+n;t^=-1;for(var s=i;s>>8^o[255&(t^r[s])];return~t}},"./node_modules/upng-js/node_modules/pako/lib/zlib/deflate.js":(t,e,r)=>{"use strict";var n,i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/zlib/trees.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/adler32.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/zlib/crc32.js"),l=r("./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js"),c=0,u=0,h=-2,d=2,f=8,p=286,m=30,g=19,v=2*p+1,b=15,y=3,x=258,_=x+y+1,w=42,k=103,A=113,M=666;function T(t,e){return t.msg=l[e],e}function S(t){return(t<<1)-(t>4?9:0)}function C(t){for(var e=t.length;--e>=0;)t[e]=0}function E(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function L(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,E(t.strm)}function z(t,e){t.pending_buf[t.pending++]=e}function O(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function D(t,e){var r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,l=t.strstart>t.w_size-_?t.strstart-(t.w_size-_):0,c=t.window,u=t.w_mask,h=t.prev,d=t.strstart+x,f=c[o+a-1],p=c[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(c[(r=e)+a]===p&&c[r+a-1]===f&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&oa){if(t.match_start=e,a=n,n>=s)break;f=c[o+a-1],p=c[o+a]}}}while((e=h[e&u])>l&&0!=--i);return a<=t.lookahead?a:t.lookahead}function I(t){var e,r,n,o,l,c,u,h,d,f,p=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=p+(p-_)){i.arraySet(t.window,t.window,p,p,0),t.match_start-=p,t.strstart-=p,t.block_start-=p,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=p?n-p:0}while(--r);e=r=p;do{n=t.prev[--e],t.prev[e]=n>=p?n-p:0}while(--r);o+=p}if(0===t.strm.avail_in)break;if(c=t.strm,u=t.window,h=t.strstart+t.lookahead,d=o,f=void 0,(f=c.avail_in)>d&&(f=d),r=0===f?0:(c.avail_in-=f,i.arraySet(u,c.input,c.next_in,f,h),1===c.state.wrap?c.adler=a(c.adler,u,f,h):2===c.state.wrap&&(c.adler=s(c.adler,u,f,h)),c.next_in+=f,c.total_in+=f,f),t.lookahead+=r,t.lookahead+t.insert>=y)for(l=t.strstart-t.insert,t.ins_h=t.window[l],t.ins_h=(t.ins_h<=y&&(t.ins_h=(t.ins_h<=y)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-y),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=y){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=y&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=y-1)),t.prev_length>=y&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-y,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-y),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<15&&(s=2,n-=16),o<1||o>9||r!==f||n<8||n>15||e<0||e>9||a<0||a>4)return T(t,h);8===n&&(n=9);var l=new N;return t.state=l,l.strm=t,l.wrap=s,l.gzhead=null,l.w_bits=n,l.w_size=1<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(I(t),0===t.lookahead&&e===c)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,L(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-_&&(L(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(L(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(L(t,!1),t.strm.avail_out),1)})),new P(4,4,8,4,R),new P(4,5,16,8,R),new P(4,6,32,32,R),new P(4,4,16,16,F),new P(8,16,32,32,F),new P(8,16,128,128,F),new P(8,32,128,256,F),new P(32,128,258,1024,F),new P(32,258,258,4096,F)],e.deflateInit=function(t,e){return U(t,e,f,15,8,0)},e.deflateInit2=U,e.deflateReset=B,e.deflateResetKeep=j,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?h:(t.state.gzhead=e,u):h},e.deflate=function(t,e){var r,i,a,l;if(!t||!t.state||e>5||e<0)return t?T(t,h):h;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||i.status===M&&4!==e)return T(t,0===t.avail_out?-5:h);if(i.strm=t,r=i.last_flush,i.last_flush=e,i.status===w)if(2===i.wrap)t.adler=0,z(i,31),z(i,139),z(i,8),i.gzhead?(z(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),z(i,255&i.gzhead.time),z(i,i.gzhead.time>>8&255),z(i,i.gzhead.time>>16&255),z(i,i.gzhead.time>>24&255),z(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),z(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(z(i,255&i.gzhead.extra.length),z(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=s(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(z(i,0),z(i,0),z(i,0),z(i,0),z(i,0),z(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),z(i,3),i.status=A);else{var d=f+(i.w_bits-8<<4)<<8;d|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(d|=32),d+=31-d%31,i.status=A,O(i,d),0!==i.strstart&&(O(i,t.adler>>>16),O(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),E(t),a=i.pending,i.pending!==i.pending_buf_size));)z(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),E(t),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),E(t),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.status=k)}else i.status=k;if(i.status===k&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&E(t),i.pending+2<=i.pending_buf_size&&(z(i,255&t.adler),z(i,t.adler>>8&255),t.adler=0,i.status=A)):i.status=A),0!==i.pending){if(E(t),0===t.avail_out)return i.last_flush=-1,u}else if(0===t.avail_in&&S(e)<=S(r)&&4!==e)return T(t,-5);if(i.status===M&&0!==t.avail_in)return T(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==c&&i.status!==M){var p=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(I(t),0===t.lookahead)){if(e===c)return 1;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(L(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(L(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(L(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,a,s=t.window;;){if(t.lookahead<=x){if(I(t),t.lookahead<=x&&e===c)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=y&&t.strstart>0&&(n=s[i=t.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){a=t.strstart+x;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=y?(r=o._tr_tally(t,1,t.match_length-y),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(L(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(L(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(L(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==p&&4!==p||(i.status=M),1===p||3===p)return 0===t.avail_out&&(i.last_flush=-1),u;if(2===p&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(C(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),E(t),0===t.avail_out))return i.last_flush=-1,u}return 4!==e?u:i.wrap<=0?1:(2===i.wrap?(z(i,255&t.adler),z(i,t.adler>>8&255),z(i,t.adler>>16&255),z(i,t.adler>>24&255),z(i,255&t.total_in),z(i,t.total_in>>8&255),z(i,t.total_in>>16&255),z(i,t.total_in>>24&255)):(O(i,t.adler>>>16),O(i,65535&t.adler)),E(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?u:1)},e.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==w&&69!==e&&73!==e&&91!==e&&e!==k&&e!==A&&e!==M?T(t,h):(t.state=null,e===A?T(t,-3):u):h},e.deflateSetDictionary=function(t,e){var r,n,o,s,l,c,d,f,p=e.length;if(!t||!t.state)return h;if(2===(s=(r=t.state).wrap)||1===s&&r.status!==w||r.lookahead)return h;for(1===s&&(t.adler=a(t.adler,e,p,0)),r.wrap=0,p>=r.w_size&&(0===s&&(C(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new i.Buf8(r.w_size),i.arraySet(f,e,p-r.w_size,r.w_size,0),e=f,p=r.w_size),l=t.avail_in,c=t.next_in,d=t.input,t.avail_in=p,t.next_in=0,t.input=e,I(r);r.lookahead>=y;){n=r.strstart,o=r.lookahead-(y-1);do{r.ins_h=(r.ins_h<{"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},"./node_modules/upng-js/node_modules/pako/lib/zlib/inffast.js":t=>{"use strict";t.exports=function(t,e){var r,n,i,o,a,s,l,c,u,h,d,f,p,m,g,v,b,y,x,_,w,k,A,M,T;r=t.state,n=t.next_in,M=t.input,i=n+(t.avail_in-5),o=t.next_out,T=t.output,a=o-(e-t.avail_out),s=o+(t.avail_out-257),l=r.dmax,c=r.wsize,u=r.whave,h=r.wnext,d=r.window,f=r.hold,p=r.bits,m=r.lencode,g=r.distcode,v=(1<>>=x=y>>>24,p-=x,0==(x=y>>>16&255))T[o++]=65535&y;else{if(!(16&x)){if(64&x){if(32&x){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}y=m[(65535&y)+(f&(1<>>=x,p-=x),p<15&&(f+=M[n++]<>>=x=y>>>24,p-=x,16&(x=y>>>16&255)){if(w=65535&y,p<(x&=15)&&(f+=M[n++]<l){t.msg="invalid distance too far back",r.mode=30;break t}if(f>>>=x,p-=x,w>(x=o-a)){if((x=w-x)>u&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(k=0,A=d,0===h){if(k+=c-x,x<_){_-=x;do{T[o++]=d[k++]}while(--x);k=o-w,A=T}}else if(h2;)T[o++]=A[k++],T[o++]=A[k++],T[o++]=A[k++],_-=3;_&&(T[o++]=A[k++],_>1&&(T[o++]=A[k++]))}else{k=o-w;do{T[o++]=T[k++],T[o++]=T[k++],T[o++]=T[k++],_-=3}while(_>2);_&&(T[o++]=T[k++],_>1&&(T[o++]=T[k++]))}break}if(64&x){t.msg="invalid distance code",r.mode=30;break t}y=g[(65535&y)+(f&(1<>3,f&=(1<<(p-=_<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),i=r("./node_modules/upng-js/node_modules/pako/lib/zlib/adler32.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/zlib/crc32.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/inffast.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/zlib/inftrees.js"),l=0,c=-2,u=1,h=12,d=30,f=852,p=592;function m(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=u,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(f),e.distcode=e.distdyn=new n.Buf32(p),e.sane=1,e.back=-1,l):c}function b(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,v(t)):c}function y(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?c:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,b(t))):c}function x(t,e){var r,n;return t?(n=new g,t.state=n,n.window=null,(r=y(t,e))!==l&&(t.state=null),r):c}var _,w,k=!0;function A(t){if(k){var e;for(_=new n.Buf32(512),w=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(s(1,t.lens,0,288,_,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;s(2,t.lens,0,32,w,0,t.work,{bits:5}),k=!1}t.lencode=_,t.lenbits=9,t.distcode=w,t.distbits=5}function M(t,e,r,i){var o,a=t.state;return null===a.window&&(a.wsize=1<=a.wsize?(n.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),n.arraySet(a.window,e,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,e,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=o(r.check,B,2,0),x=0,_=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&x)<<8)+(x>>8))%31){t.msg="incorrect header check",r.mode=d;break}if(8!=(15&x)){t.msg="unknown compression method",r.mode=d;break}if(_-=4,R=8+(15&(x>>>=4)),0===r.wbits)r.wbits=R;else if(R>r.wbits){t.msg="invalid window size",r.mode=d;break}r.dmax=1<>8&1),512&r.flags&&(B[0]=255&x,B[1]=x>>>8&255,r.check=o(r.check,B,2,0)),x=0,_=0,r.mode=3;case 3:for(;_<32;){if(0===b)break t;b--,x+=f[g++]<<_,_+=8}r.head&&(r.head.time=x),512&r.flags&&(B[0]=255&x,B[1]=x>>>8&255,B[2]=x>>>16&255,B[3]=x>>>24&255,r.check=o(r.check,B,4,0)),x=0,_=0,r.mode=4;case 4:for(;_<16;){if(0===b)break t;b--,x+=f[g++]<<_,_+=8}r.head&&(r.head.xflags=255&x,r.head.os=x>>8),512&r.flags&&(B[0]=255&x,B[1]=x>>>8&255,r.check=o(r.check,B,2,0)),x=0,_=0,r.mode=5;case 5:if(1024&r.flags){for(;_<16;){if(0===b)break t;b--,x+=f[g++]<<_,_+=8}r.length=x,r.head&&(r.head.extra_len=x),512&r.flags&&(B[0]=255&x,B[1]=x>>>8&255,r.check=o(r.check,B,2,0)),x=0,_=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((T=r.length)>b&&(T=b),T&&(r.head&&(R=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,f,g,T,R)),512&r.flags&&(r.check=o(r.check,f,T,g)),b-=T,g+=T,r.length-=T),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===b)break t;T=0;do{R=f[g+T++],r.head&&R&&r.length<65536&&(r.head.name+=String.fromCharCode(R))}while(R&&T>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=h;break;case 10:for(;_<32;){if(0===b)break t;b--,x+=f[g++]<<_,_+=8}t.adler=r.check=m(x),x=0,_=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=v,t.avail_out=y,t.next_in=g,t.avail_in=b,r.hold=x,r.bits=_,2;t.adler=r.check=1,r.mode=h;case h:if(5===e||6===e)break t;case 13:if(r.last){x>>>=7&_,_-=7&_,r.mode=27;break}for(;_<3;){if(0===b)break t;b--,x+=f[g++]<<_,_+=8}switch(r.last=1&x,_-=1,3&(x>>>=1)){case 0:r.mode=14;break;case 1:if(A(r),r.mode=20,6===e){x>>>=2,_-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=d}x>>>=2,_-=2;break;case 14:for(x>>>=7&_,_-=7&_;_<32;){if(0===b)break t;b--,x+=f[g++]<<_,_+=8}if((65535&x)!=(x>>>16^65535)){t.msg="invalid stored block lengths",r.mode=d;break}if(r.length=65535&x,x=0,_=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(T=r.length){if(T>b&&(T=b),T>y&&(T=y),0===T)break t;n.arraySet(p,f,g,T,v),b-=T,g+=T,y-=T,v+=T,r.length-=T;break}r.mode=h;break;case 17:for(;_<14;){if(0===b)break t;b--,x+=f[g++]<<_,_+=8}if(r.nlen=257+(31&x),x>>>=5,_-=5,r.ndist=1+(31&x),x>>>=5,_-=5,r.ncode=4+(15&x),x>>>=4,_-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=d;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,_-=3}for(;r.have<19;)r.lens[U[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,P={bits:r.lenbits},F=s(0,r.lens,0,19,r.lencode,0,r.work,P),r.lenbits=P.bits,F){t.msg="invalid code lengths set",r.mode=d;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,z=65535&j,!((E=j>>>24)<=_);){if(0===b)break t;b--,x+=f[g++]<<_,_+=8}if(z<16)x>>>=E,_-=E,r.lens[r.have++]=z;else{if(16===z){for(N=E+2;_>>=E,_-=E,0===r.have){t.msg="invalid bit length repeat",r.mode=d;break}R=r.lens[r.have-1],T=3+(3&x),x>>>=2,_-=2}else if(17===z){for(N=E+3;_>>=E)),x>>>=3,_-=3}else{for(N=E+7;_>>=E)),x>>>=7,_-=7}if(r.have+T>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=d;break}for(;T--;)r.lens[r.have++]=R}}if(r.mode===d)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=d;break}if(r.lenbits=9,P={bits:r.lenbits},F=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,P),r.lenbits=P.bits,F){t.msg="invalid literal/lengths set",r.mode=d;break}if(r.distbits=6,r.distcode=r.distdyn,P={bits:r.distbits},F=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,P),r.distbits=P.bits,F){t.msg="invalid distances set",r.mode=d;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(b>=6&&y>=258){t.next_out=v,t.avail_out=y,t.next_in=g,t.avail_in=b,r.hold=x,r.bits=_,a(t,k),v=t.next_out,p=t.output,y=t.avail_out,g=t.next_in,f=t.input,b=t.avail_in,x=r.hold,_=r.bits,r.mode===h&&(r.back=-1);break}for(r.back=0;L=(j=r.lencode[x&(1<>>16&255,z=65535&j,!((E=j>>>24)<=_);){if(0===b)break t;b--,x+=f[g++]<<_,_+=8}if(L&&!(240&L)){for(O=E,D=L,I=z;L=(j=r.lencode[I+((x&(1<>O)])>>>16&255,z=65535&j,!(O+(E=j>>>24)<=_);){if(0===b)break t;b--,x+=f[g++]<<_,_+=8}x>>>=O,_-=O,r.back+=O}if(x>>>=E,_-=E,r.back+=E,r.length=z,0===L){r.mode=26;break}if(32&L){r.back=-1,r.mode=h;break}if(64&L){t.msg="invalid literal/length code",r.mode=d;break}r.extra=15&L,r.mode=22;case 22:if(r.extra){for(N=r.extra;_>>=r.extra,_-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;L=(j=r.distcode[x&(1<>>16&255,z=65535&j,!((E=j>>>24)<=_);){if(0===b)break t;b--,x+=f[g++]<<_,_+=8}if(!(240&L)){for(O=E,D=L,I=z;L=(j=r.distcode[I+((x&(1<>O)])>>>16&255,z=65535&j,!(O+(E=j>>>24)<=_);){if(0===b)break t;b--,x+=f[g++]<<_,_+=8}x>>>=O,_-=O,r.back+=O}if(x>>>=E,_-=E,r.back+=E,64&L){t.msg="invalid distance code",r.mode=d;break}r.offset=z,r.extra=15&L,r.mode=24;case 24:if(r.extra){for(N=r.extra;_>>=r.extra,_-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=d;break}r.mode=25;case 25:if(0===y)break t;if(T=k-y,r.offset>T){if((T=r.offset-T)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=d;break}T>r.wnext?(T-=r.wnext,S=r.wsize-T):S=r.wnext-T,T>r.length&&(T=r.length),C=r.window}else C=p,S=v-r.offset,T=r.length;T>y&&(T=y),y-=T,r.length-=T;do{p[v++]=C[S++]}while(--T);0===r.length&&(r.mode=21);break;case 26:if(0===y)break t;p[v++]=r.length,y--,r.mode=21;break;case 27:if(r.wrap){for(;_<32;){if(0===b)break t;b--,x|=f[g++]<<_,_+=8}if(k-=y,t.total_out+=k,r.total+=k,k&&(t.adler=r.check=r.flags?o(r.check,p,k,v-k):i(r.check,p,k,v-k)),k=y,(r.flags?x:m(x))!==r.check){t.msg="incorrect data check",r.mode=d;break}x=0,_=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;_<32;){if(0===b)break t;b--,x+=f[g++]<<_,_+=8}if(x!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=d;break}x=0,_=0}r.mode=29;case 29:F=1;break t;case d:F=-3;break t;case 31:return-4;default:return c}return t.next_out=v,t.avail_out=y,t.next_in=g,t.avail_in=b,r.hold=x,r.bits=_,(r.wsize||k!==t.avail_out&&r.mode{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(t,e,r,l,c,u,h,d){var f,p,m,g,v,b,y,x,_,w=d.bits,k=0,A=0,M=0,T=0,S=0,C=0,E=0,L=0,z=0,O=0,D=null,I=0,R=new n.Buf16(16),F=new n.Buf16(16),P=null,N=0;for(k=0;k<=15;k++)R[k]=0;for(A=0;A=1&&0===R[T];T--);if(S>T&&(S=T),0===T)return c[u++]=20971520,c[u++]=20971520,d.bits=1,0;for(M=1;M0&&(0===t||1!==T))return-1;for(F[1]=0,k=1;k<15;k++)F[k+1]=F[k]+R[k];for(A=0;A852||2===t&&z>592)return 1;for(;;){y=k-E,h[A]b?(x=P[N+h[A]],_=D[I+h[A]]):(x=96,_=0),f=1<>E)+(p-=f)]=y<<24|x<<16|_}while(0!==p);for(f=1<>=1;if(0!==f?(O&=f-1,O+=f):O=0,A++,0==--R[k]){if(k===T)break;k=e[r+h[A]]}if(k>S&&(O&g)!==m){for(0===E&&(E=S),v+=M,L=1<<(C=k-E);C+E852||2===t&&z>592)return 1;c[m=O&g]=S<<24|C<<16|v-u}}return 0!==O&&(c[v+O]=k-E<<24|64<<16),d.bits=S,0}},"./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js":t=>{"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},"./node_modules/upng-js/node_modules/pako/lib/zlib/trees.js":(t,e,r)=>{"use strict";var n=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js");function i(t){for(var e=t.length;--e>=0;)t[e]=0}var o=256,a=286,s=30,l=15,c=16,u=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],h=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],f=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=new Array(576);i(p);var m=new Array(60);i(m);var g=new Array(512);i(g);var v=new Array(256);i(v);var b=new Array(29);i(b);var y,x,_,w=new Array(s);function k(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function A(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function M(t){return t<256?g[t]:g[256+(t>>>7)]}function T(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function S(t,e,r){t.bi_valid>c-r?(t.bi_buf|=e<>c-t.bi_valid,t.bi_valid+=r-c):(t.bi_buf|=e<>>=1,r<<=1}while(--e>0);return r>>>1}function L(t,e,r){var n,i,o=new Array(l+1),a=0;for(n=1;n<=l;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=E(o[s]++,s))}}function z(t){var e;for(e=0;e8?T(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function D(t,e,r,n){var i=2*e,o=2*r;return t[i]>1;r>=1;r--)I(t,o,r);i=c;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],I(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,o[2*i]=o[2*r]+o[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,o[2*r+1]=o[2*n+1]=i,t.heap[1]=i++,I(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,o,a,s,c=e.dyn_tree,u=e.max_code,h=e.stat_desc.static_tree,d=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,m=e.stat_desc.max_length,g=0;for(o=0;o<=l;o++)t.bl_count[o]=0;for(c[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(o=c[2*c[2*(n=t.heap[r])+1]+1]+1)>m&&(o=m,g++),c[2*n+1]=o,n>u||(t.bl_count[o]++,a=0,n>=p&&(a=f[n-p]),s=c[2*n],t.opt_len+=s*(o+a),d&&(t.static_len+=s*(h[2*n+1]+a)));if(0!==g){do{for(o=m-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[m]--,g-=2}while(g>0);for(o=m;0!==o;o--)for(n=t.bl_count[o];0!==n;)(i=t.heap[--r])>u||(c[2*i+1]!==o&&(t.opt_len+=(o-c[2*i+1])*c[2*i],c[2*i+1]=o),n--)}}(t,e),L(o,u,t.bl_count)}function P(t,e,r){var n,i,o=-1,a=e[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++s>=7;n0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e=3&&0===t.bl_tree[2*f[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(a=t.static_len+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==e?B(t,e,r,n):4===t.strategy||a===i?(S(t,2+(n?1:0),3),R(t,p,m)):(S(t,4+(n?1:0),3),function(t,e,r,n){var i;for(S(t,e-257,5),S(t,r-1,5),S(t,n-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(v[r]+o+1)]++,t.dyn_dtree[2*M(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){S(t,2,3),C(t,256,p),function(t){16===t.bi_valid?(T(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},"./node_modules/upng-js/node_modules/pako/lib/zlib/zstream.js":t=>{"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},"./src/SurfaceWorker.js":()=>{$3Dmol.workerString=function(){self.onmessage=function(t){var e=t.data,r=e.type;if(r<0)self.atomData=e.atoms,self.volume=e.volume,self.ps=new ProteinSurface;else{var n=self.ps;n.initparm(e.expandedExtent,1!=r,self.volume),n.fillvoxels(self.atomData,e.extendedAtoms),n.buildboundary(),4!==r&&2!==r||(n.fastdistancemap(),n.boundingatom(!1),n.fillvoxelswaals(self.atomData,e.extendedAtoms)),n.marchingcube(r);var i=n.getFacesAndVertices(e.atomsToShow);self.postMessage(i)}}}.toString().replace(/(^.*?\{|\}$)/g,""),$3Dmol.workerString+=";\nfunction _classCallCheck() {};",$3Dmol.workerString+=";\n"+$3Dmol.Vector3.toString(),$3Dmol.workerString+=";\n"+$3Dmol.MarchingCubeInitializer.toString()+";\n\n",$3Dmol.workerString+=";\n"+$3Dmol.PointGrid.toString()+";\n",$3Dmol.workerString+=";\nvar ProteinSurface = "+$3Dmol.ProteinSurface.toString()+";\n",$3Dmol.SurfaceWorker=window.URL?window.URL.createObjectURL(new Blob([$3Dmol.workerString],{type:"text/javascript"})):void 0},"./src/exporter.js":t=>{"object"==typeof t.exports&&(t.exports=window.$3Dmol)},"./src/vendor/mmtf.js":function(t,e){!function(t){"use strict";function e(t,e,r){for(var n=(t.byteLength,0),i=r.length;i>n;n++){var o=r.charCodeAt(n);if(128>o)t.setUint8(e++,o>>>0&127);else if(2048>o)t.setUint8(e++,o>>>6&31|192),t.setUint8(e++,o>>>0&63|128);else if(65536>o)t.setUint8(e++,o>>>12&15|224),t.setUint8(e++,o>>>6&63|128),t.setUint8(e++,o>>>0&63|128);else{if(!(1114112>o))throw new Error("bad codepoint "+o);t.setUint8(e++,o>>>18&7|240),t.setUint8(e++,o>>>12&63|128),t.setUint8(e++,o>>>6&63|128),t.setUint8(e++,o>>>0&63|128)}}}function r(t){for(var e=0,r=0,n=t.length;n>r;r++){var i=t.charCodeAt(r);if(128>i)e+=1;else if(2048>i)e+=2;else if(65536>i)e+=3;else{if(!(1114112>i))throw new Error("bad codepoint "+i);e+=4}}return e}function n(t,i,o){var a=typeof t;if("string"===a){if(32>(s=r(t)))return i.setUint8(o,160|s),e(i,o+1,t),1+s;if(256>s)return i.setUint8(o,217),i.setUint8(o+1,s),e(i,o+2,t),2+s;if(65536>s)return i.setUint8(o,218),i.setUint16(o+1,s),e(i,o+3,t),3+s;if(4294967296>s)return i.setUint8(o,219),i.setUint32(o+1,s),e(i,o+5,t),5+s}if(t instanceof Uint8Array){var s=t.byteLength,l=new Uint8Array(i.buffer);if(256>s)return i.setUint8(o,196),i.setUint8(o+1,s),l.set(t,o+2),2+s;if(65536>s)return i.setUint8(o,197),i.setUint16(o+1,s),l.set(t,o+3),3+s;if(4294967296>s)return i.setUint8(o,198),i.setUint32(o+1,s),l.set(t,o+5),5+s}if("number"===a){if(!isFinite(t))throw new Error("Number not finite: "+t);if(Math.floor(t)!==t)return i.setUint8(o,203),i.setFloat64(o+1,t),9;if(t>=0){if(128>t)return i.setUint8(o,t),1;if(256>t)return i.setUint8(o,204),i.setUint8(o+1,t),2;if(65536>t)return i.setUint8(o,205),i.setUint16(o+1,t),3;if(4294967296>t)return i.setUint8(o,206),i.setUint32(o+1,t),5;throw new Error("Number too big 0x"+t.toString(16))}if(t>=-32)return i.setInt8(o,t),1;if(t>=-128)return i.setUint8(o,208),i.setInt8(o+1,t),2;if(t>=-32768)return i.setUint8(o,209),i.setInt16(o+1,t),3;if(t>=-2147483648)return i.setUint8(o,210),i.setInt32(o+1,t),5;throw new Error("Number too small -0x"+(-t).toString(16).substr(1))}if(null===t)return i.setUint8(o,192),1;if("boolean"===a)return i.setUint8(o,t?195:194),1;if("object"===a){var c=0,u=Array.isArray(t);if(u)s=t.length;else{var h=Object.keys(t);s=h.length}if(16>s?(i.setUint8(o,s|(u?144:128)),c=1):65536>s?(i.setUint8(o,u?220:222),i.setUint16(o+1,s),c=3):4294967296>s&&(i.setUint8(o,u?221:223),i.setUint32(o+1,s),c=5),u)for(var d=0;s>d;d++)c+=n(t[d],i,o+c);else for(d=0;s>d;d++){var f=h[d];c+=n(f,i,o+c),c+=n(t[f],i,o+c)}return c}throw new Error("Unknown type "+a)}function i(t){var e=typeof t;if("string"===e){if(32>(n=r(t)))return 1+n;if(256>n)return 2+n;if(65536>n)return 3+n;if(4294967296>n)return 5+n}if(t instanceof Uint8Array){if(256>(n=t.byteLength))return 2+n;if(65536>n)return 3+n;if(4294967296>n)return 5+n}if("number"===e){if(Math.floor(t)!==t)return 9;if(t>=0){if(128>t)return 1;if(256>t)return 2;if(65536>t)return 3;if(4294967296>t)return 5;throw new Error("Number too big 0x"+t.toString(16))}if(t>=-32)return 1;if(t>=-128)return 2;if(t>=-32768)return 3;if(t>=-2147483648)return 5;throw new Error("Number too small -0x"+t.toString(16).substr(1))}if("boolean"===e||null===t)return 1;if("object"===e){var n,o=0;if(Array.isArray(t)){n=t.length;for(var a=0;n>a;a++)o+=i(t[a])}else{var s=Object.keys(t);for(n=s.length,a=0;n>a;a++){var l=s[a];o+=i(l)+i(t[l])}}if(16>n)return 1+o;if(65536>n)return 3+o;if(4294967296>n)return 5+o;throw new Error("Array or object too long 0x"+n.toString(16))}throw new Error("Unknown type "+e)}function o(t){var e=new ArrayBuffer(i(t));return n(t,new DataView(e),0),new Uint8Array(e)}function a(t,e,r){return e?new t(e.buffer,e.byteOffset,e.byteLength/(r||1)):void 0}function s(t){return a(DataView,t)}function l(t){return a(Uint8Array,t)}function c(t){return a(Int8Array,t)}function u(t){return a(Int32Array,t,4)}function h(t,e){var r=t.length/2;e||(e=new Int16Array(r));for(var n=0,i=0;r>n;++n,i+=2)e[n]=t[i]<<8^t[i+1];return e}function d(t,e){var r=t.length/4;e||(e=new Int32Array(r));for(var n=0,i=0;r>n;++n,i+=4)e[n]=t[i]<<24^t[i+1]<<16^t[i+2]<<8^t[i+3];return e}function f(t,e){var r=t.length;e||(e=new Uint8Array(4*r));for(var n=s(e),i=0;r>i;++i)n.setInt32(4*i,t[i]);return l(e)}function p(t,e,r){var n=t.length,i=1/e;r||(r=new Float32Array(n));for(var o=0;n>o;++o)r[o]=t[o]*i;return r}function m(t,e,r){var n=t.length;r||(r=new Int32Array(n));for(var i=0;n>i;++i)r[i]=Math.round(t[i]*e);return r}function g(t,e){var r,n;if(!e){var i=0;for(r=0,n=t.length;n>r;r+=2)i+=t[r+1];e=new t.constructor(i)}var o=0;for(r=0,n=t.length;n>r;r+=2)for(var a=t[r],s=t[r+1],l=0;s>l;++l)e[o]=a,++o;return e}function v(t){if(0===t.length)return new Int32Array;var e,r,n=2;for(e=1,r=t.length;r>e;++e)t[e-1]!==t[e]&&(n+=2);var i=new Int32Array(n),o=0,a=1;for(e=1,r=t.length;r>e;++e)t[e-1]!==t[e]?(i[o]=t[e-1],i[o+1]=a,a=1,o+=2):++a;return i[o]=t[t.length-1],i[o+1]=a,i}function b(t,e){var r=t.length;e||(e=new t.constructor(r)),r&&(e[0]=t[0]);for(var n=1;r>n;++n)e[n]=t[n]+e[n-1];return e}function y(t,e){var r=t.length;e||(e=new t.constructor(r)),e[0]=t[0];for(var n=1;r>n;++n)e[n]=t[n]-t[n-1];return e}function x(t,e){var r,n,i=t instanceof Int8Array?127:32767,o=-i-1,a=t.length;if(!e){var s=0;for(r=0;a>r;++r)t[r]o&&++s;e=new Int32Array(s)}for(r=0,n=0;a>r;){for(var l=0;t[r]===i||t[r]===o;)l+=t[r],++r;l+=t[r],++r,e[n]=l,++n}return e}function _(t,e,r){return p(x(t,u(r)),e,r)}function w(t,e,r){var n=x(t,u(r));return function(t,e,r){return p(b(t,u(r)),e,r)}(n,e,function(t){return a(Float32Array,t,4)}(n))}function k(t,e,r){return function(t,e){var r,n=e?127:32767,i=-n-1,o=t.length,a=0;for(r=0;o>r;++r)0===(c=t[r])?++a:c>0?(a+=Math.ceil(c/n),c%n==0&&(a+=1)):(a+=Math.ceil(c/i),c%i==0&&(a+=1));var s=e?new Int8Array(a):new Int16Array(a),l=0;for(r=0;o>r;++r){var c;if((c=t[r])>=0)for(;c>=n;)s[l]=n,++l,c-=n;else for(;i>=c;)s[l]=i,++l,c-=i;s[l]=c,++l}return s}(function(t,e,r){return y(m(t,e),r)}(t,e),r)}function A(t,e,r,n){var i=new ArrayBuffer(12+n.byteLength),o=new Uint8Array(i),a=new DataView(i);return a.setInt32(0,t),a.setInt32(4,e),r&&o.set(r,8),o.set(n,12),o}function M(t){return A(2,t.length,void 0,l(t))}function T(t){return A(4,t.length,void 0,f(t))}function S(t,e){return A(5,t.length/e,f([e]),l(t))}function C(t){return A(6,t.length,void 0,f(v(t)))}function E(t){return A(8,t.length,void 0,f(function(t){return v(y(t))}(t)))}function L(t,e){return A(9,t.length,f([e]),f(function(t,e){return v(m(t,e))}(t,e)))}function z(t,e){return A(10,t.length,f([e]),function(t,e){var r=t.length;e||(e=new Uint8Array(2*r));for(var n=s(e),i=0;r>i;++i)n.setInt16(2*i,t[i]);return l(e)}(k(t,e)))}function O(t){var e={};return j.forEach((function(r){void 0!==t[r]&&(e[r]=t[r])})),t.bondAtomList&&(e.bondAtomList=T(t.bondAtomList)),t.bondOrderList&&(e.bondOrderList=M(t.bondOrderList)),e.xCoordList=z(t.xCoordList,1e3),e.yCoordList=z(t.yCoordList,1e3),e.zCoordList=z(t.zCoordList,1e3),t.bFactorList&&(e.bFactorList=z(t.bFactorList,100)),t.atomIdList&&(e.atomIdList=E(t.atomIdList)),t.altLocList&&(e.altLocList=C(t.altLocList)),t.occupancyList&&(e.occupancyList=L(t.occupancyList,100)),e.groupIdList=E(t.groupIdList),e.groupTypeList=T(t.groupTypeList),t.secStructList&&(e.secStructList=M(t.secStructList)),t.insCodeList&&(e.insCodeList=C(t.insCodeList)),t.sequenceIndexList&&(e.sequenceIndexList=E(t.sequenceIndexList)),e.chainIdList=S(t.chainIdList,4),t.chainNameList&&(e.chainNameList=S(t.chainNameList,4)),e}function D(t){function e(t){for(var e={},r=0;t>r;r++)e[o()]=o();return e}function r(e){var r=t.subarray(a,a+e);return a+=e,r}function n(e){var r=t.subarray(a,a+e);a+=e;var n=65535;if(e>n){for(var i=[],o=0;or;r++)e[r]=o();return e}function o(){var o,l,c=t[a];if(!(128&c))return a++,c;if(128==(240&c))return a++,e(l=15&c);if(144==(240&c))return a++,i(l=15&c);if(160==(224&c))return a++,n(l=31&c);if(!(224&~c))return o=s.getInt8(a),a++,o;switch(c){case 192:return a++,null;case 194:return a++,!1;case 195:return a++,!0;case 196:return l=s.getUint8(a+1),a+=2,r(l);case 197:return l=s.getUint16(a+1),a+=3,r(l);case 198:return l=s.getUint32(a+1),a+=5,r(l);case 202:return o=s.getFloat32(a+1),a+=5,o;case 203:return o=s.getFloat64(a+1),a+=9,o;case 204:return o=t[a+1],a+=2,o;case 205:return o=s.getUint16(a+1),a+=3,o;case 206:return o=s.getUint32(a+1),a+=5,o;case 208:return o=s.getInt8(a+1),a+=2,o;case 209:return o=s.getInt16(a+1),a+=3,o;case 210:return o=s.getInt32(a+1),a+=5,o;case 217:return l=s.getUint8(a+1),a+=2,n(l);case 218:return l=s.getUint16(a+1),a+=3,n(l);case 219:return l=s.getUint32(a+1),a+=5,n(l);case 220:return l=s.getUint16(a+1),a+=3,i(l);case 221:return l=s.getUint32(a+1),a+=5,i(l);case 222:return l=s.getUint16(a+1),a+=3,e(l);case 223:return l=s.getUint32(a+1),a+=5,e(l)}throw new Error("Unknown type 0x"+c.toString(16))}var a=0,s=new DataView(t.buffer);return o()}function I(t,e,r,n){switch(t){case 1:return function(t,e){var r=t.length;e||(e=new Float32Array(r/4));for(var n=s(e),i=s(t),o=0,a=0,l=r/4;l>o;++o,a+=4)n.setFloat32(a,i.getFloat32(a),!0);return e}(e);case 2:return c(e);case 3:return h(e);case 4:return d(e);case 5:return l(e);case 6:return g(d(e),new Uint8Array(r));case 7:return g(d(e));case 8:return function(t,e){return b(g(t),e)}(d(e));case 9:return function(t,e,r){return p(g(t,u(r)),e,r)}(d(e),d(n)[0]);case 10:return w(h(e),d(n)[0]);case 11:return p(h(e),d(n)[0]);case 12:return _(h(e),d(n)[0]);case 13:return _(c(e),d(n)[0]);case 14:return x(h(e));case 15:return x(c(e))}}function R(t,e){var r=(e=e||{}).ignoreFields,n={};return B.forEach((function(e){var i=!!r&&-1!==r.indexOf(e),o=t[e];i||void 0===o||(o instanceof Uint8Array?n[e]=I.apply(null,function(t){var e=s(t),r=e.getInt32(0),n=e.getInt32(4),i=t.subarray(8,12);return[r,t=t.subarray(12),n,i]}(o)):n[e]=o)})),n}function F(t){return String.fromCharCode.apply(null,t).replace(/\0/g,"")}function P(t,e){return t instanceof ArrayBuffer&&(t=new Uint8Array(t)),R(t instanceof Uint8Array?D(t):t,e)}function N(t,e,r,n){var i=new XMLHttpRequest;i.addEventListener("load",(function(){try{var t=P(i.response);r(t)}catch(t){n(t)}}),!0),i.addEventListener("error",n,!0),i.responseType="arraybuffer",i.open("GET",e+t.toUpperCase()),i.send()}var j=["mmtfVersion","mmtfProducer","unitCell","spaceGroup","structureId","title","depositionDate","releaseDate","experimentalMethods","resolution","rFree","rWork","bioAssemblyList","ncsOperatorList","entityList","groupList","numBonds","numAtoms","numGroups","numChains","numModels","groupsPerChain","chainsPerModel"],B=j.concat(["xCoordList","yCoordList","zCoordList","groupIdList","groupTypeList","chainIdList","bFactorList","atomIdList","altLocList","occupancyList","secStructList","insCodeList","sequenceIndexList","chainNameList","bondAtomList","bondOrderList"]),U="//mmtf.rcsb.org/v1.0/",G=U+"full/",V=U+"reduced/";t.encode=function(t){return o(O(t))},t.decode=P,t.traverse=function(t,e,r){var n,i,o,a,s,l,c=(r=r||{}).firstModelOnly,u=e.onModel,h=e.onChain,d=e.onGroup,f=e.onAtom,p=e.onBond,m=0,g=0,v=0,b=0,y=0,x=-1,_=t.chainNameList,w=t.secStructList,k=t.insCodeList,A=t.sequenceIndexList,M=t.atomIdList,T=t.bFactorList,S=t.altLocList,C=t.occupancyList,E=t.bondAtomList,L=t.bondOrderList;for(n=0,i=t.chainsPerModel.length;i>n&&!(c&&m>0);++n){var z=t.chainsPerModel[m];for(u&&u({chainCount:z,modelIndex:m}),o=0;z>o;++o){var O=t.groupsPerChain[g];if(h){var D=F(t.chainIdList.subarray(4*g,4*g+4)),I=null;_&&(I=F(_.subarray(4*g,4*g+4))),h({groupCount:O,chainIndex:g,modelIndex:m,chainId:D,chainName:I})}for(a=0;O>a;++a){var R=t.groupList[t.groupTypeList[v]],P=R.atomNameList.length;if(d){var N=null;w&&(N=w[v]);var j=null;t.insCodeList&&(j=String.fromCharCode(k[v]));var B=null;A&&(B=A[v]),d({atomCount:P,groupIndex:v,chainIndex:g,modelIndex:m,groupId:t.groupIdList[v],groupType:t.groupTypeList[v],groupName:R.groupName,singleLetterCode:R.singleLetterCode,chemCompType:R.chemCompType,secStruct:N,insCode:j,sequenceIndex:B})}for(s=0;P>s;++s){if(f){var U=null;M&&(U=M[b]);var G=null;T&&(G=T[b]);var V=null;S&&(V=String.fromCharCode(S[b]));var H=null;C&&(H=C[b]),f({atomIndex:b,groupIndex:v,chainIndex:g,modelIndex:m,atomId:U,element:R.elementList[s],atomName:R.atomNameList[s],formalCharge:R.formalChargeList[s],xCoord:t.xCoordList[b],yCoord:t.yCoordList[b],zCoord:t.zCoordList[b],bFactor:G,altLoc:V,occupancy:H})}b+=1}if(p){var W=R.bondAtomList;for(s=0,l=R.bondOrderList.length;l>s;++s)p({atomIndex1:b-P+W[2*s],atomIndex2:b-P+W[2*s+1],bondOrder:R.bondOrderList[s]})}v+=1}g+=1}if(y=x+1,x=b-1,p&&E)for(s=0,l=E.length;l>s;s+=2){var q=E[s],Y=E[s+1];(q>=y&&x>=q||Y>=y&&x>=Y)&&p({atomIndex1:q,atomIndex2:Y,bondOrder:L?L[s/2]:null})}m+=1}},t.fetch=function(t,e,r){N(t,G,e,r)},t.fetchReduced=function(t,e,r){N(t,V,e,r)},t.version="v1.0.1",t.fetchUrl=G,t.fetchReducedUrl=V,t.encodeMsgpack=o,t.encodeMmtf=O,t.decodeMsgpack=D,t.decodeMmtf=R}(e)},"./node_modules/pako/dist/pako.esm.mjs":(t,e,r)=>{"use strict";function n(t){let e=t.length;for(;--e>=0;)t[e]=0}r.r(e),r.d(e,{Deflate:()=>ur,Inflate:()=>pr,constants:()=>br,default:()=>yr,deflate:()=>hr,deflateRaw:()=>dr,gzip:()=>fr,inflate:()=>mr,inflateRaw:()=>gr,ungzip:()=>vr});const i=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),o=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),s=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=new Array(576);n(l);const c=new Array(60);n(c);const u=new Array(512);n(u);const h=new Array(256);n(h);const d=new Array(29);n(d);const f=new Array(30);function p(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}let m,g,v;function b(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}n(f);const y=t=>t<256?u[t]:u[256+(t>>>7)],x=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},_=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<{_(t,r[2*e],r[2*e+1])},k=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},A=(t,e,r)=>{const n=new Array(16);let i,o,a=0;for(i=1;i<=15;i++)a=a+r[i-1]<<1,n[i]=a;for(o=0;o<=e;o++){let e=t[2*o+1];0!==e&&(t[2*o]=k(n[e]++,e))}},M=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},T=t=>{t.bi_valid>8?x(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=(t,e,r,n)=>{const i=2*e,o=2*r;return t[i]{const n=t.heap[r];let i=r<<1;for(;i<=t.heap_len&&(i{let n,a,s,l,c=0;if(0!==t.sym_next)do{n=255&t.pending_buf[t.sym_buf+c++],n+=(255&t.pending_buf[t.sym_buf+c++])<<8,a=t.pending_buf[t.sym_buf+c++],0===n?w(t,a,e):(s=h[a],w(t,s+256+1,e),l=i[s],0!==l&&(a-=d[s],_(t,a,l)),n--,s=y(n),w(t,s,r),l=o[s],0!==l&&(n-=f[s],_(t,n,l)))}while(c{const r=e.dyn_tree,n=e.stat_desc.static_tree,i=e.stat_desc.has_stree,o=e.stat_desc.elems;let a,s,l,c=-1;for(t.heap_len=0,t.heap_max=573,a=0;a>1;a>=1;a--)C(t,r,a);l=o;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],C(t,r,1),s=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=s,r[2*l]=r[2*a]+r[2*s],t.depth[l]=(t.depth[a]>=t.depth[s]?t.depth[a]:t.depth[s])+1,r[2*a+1]=r[2*s+1]=l,t.heap[1]=l++,C(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,i=e.stat_desc.static_tree,o=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,l=e.stat_desc.max_length;let c,u,h,d,f,p,m=0;for(d=0;d<=15;d++)t.bl_count[d]=0;for(r[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<573;c++)u=t.heap[c],d=r[2*r[2*u+1]+1]+1,d>l&&(d=l,m++),r[2*u+1]=d,u>n||(t.bl_count[d]++,f=0,u>=s&&(f=a[u-s]),p=r[2*u],t.opt_len+=p*(d+f),o&&(t.static_len+=p*(i[2*u+1]+f)));if(0!==m){do{for(d=l-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[l]--,m-=2}while(m>0);for(d=l;0!==d;d--)for(u=t.bl_count[d];0!==u;)h=t.heap[--c],h>n||(r[2*h+1]!==d&&(t.opt_len+=(d-r[2*h+1])*r[2*h],r[2*h+1]=d),u--)}})(t,e),A(r,c,t.bl_count)},z=(t,e,r)=>{let n,i,o=-1,a=e[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++s{let n,i,o=-1,a=e[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),n=0;n<=r;n++)if(i=a,a=e[2*(n+1)+1],!(++s{_(t,0+(n?1:0),3),T(t),x(t,r),x(t,~r),r&&t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r};var R={_tr_init:t=>{D||((()=>{let t,e,r,n,s;const b=new Array(16);for(r=0,n=0;n<28;n++)for(d[n]=r,t=0;t<1<>=7;n<30;n++)for(f[n]=s<<7,t=0;t<1<{let i,o,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),L(t,t.l_desc),L(t,t.d_desc),a=(t=>{let e;for(z(t,t.dyn_ltree,t.l_desc.max_code),z(t,t.dyn_dtree,t.d_desc.max_code),L(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*s[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),i=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?I(t,e,r,n):4===t.strategy||o===i?(_(t,2+(n?1:0),3),E(t,l,c)):(_(t,4+(n?1:0),3),((t,e,r,n)=>{let i;for(_(t,e-257,5),_(t,r-1,5),_(t,n-4,4),i=0;i(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=r,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(h[r]+256+1)]++,t.dyn_dtree[2*y(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{_(t,2,3),w(t,256,l),(t=>{16===t.bi_valid?(x(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}},F=(t,e,r,n)=>{let i=65535&t,o=t>>>16&65535,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{i=i+e[n++]|0,o=o+i|0}while(--a);i%=65521,o%=65521}return i|o<<16};const P=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());var N=(t,e,r,n)=>{const i=P,o=n+r;t^=-1;for(let r=n;r>>8^i[255&(t^e[r])];return~t},j={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},B={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:U,_tr_stored_block:G,_tr_flush_block:V,_tr_tally:H,_tr_align:W}=R,{Z_NO_FLUSH:q,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:Z,Z_FINISH:X,Z_BLOCK:$,Z_OK:J,Z_STREAM_END:K,Z_STREAM_ERROR:Q,Z_DATA_ERROR:tt,Z_BUF_ERROR:et,Z_DEFAULT_COMPRESSION:rt,Z_FILTERED:nt,Z_HUFFMAN_ONLY:it,Z_RLE:ot,Z_FIXED:at,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:lt,Z_DEFLATED:ct}=B,ut=258,ht=262,dt=42,ft=113,pt=666,mt=(t,e)=>(t.msg=j[e],e),gt=t=>2*t-(t>4?9:0),vt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},bt=t=>{let e,r,n,i=t.w_size;e=t.hash_size,n=e;do{r=t.head[--n],t.head[n]=r>=i?r-i:0}while(--e);e=i,n=e;do{r=t.prev[--n],t.prev[n]=r>=i?r-i:0}while(--e)};let yt=(t,e,r)=>(e<{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},_t=(t,e)=>{V(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,xt(t.strm)},wt=(t,e)=>{t.pending_buf[t.pending++]=e},kt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},At=(t,e,r,n)=>{let i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),r),1===t.state.wrap?t.adler=F(t.adler,e,i,r):2===t.state.wrap&&(t.adler=N(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)},Mt=(t,e)=>{let r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match;const l=t.strstart>t.w_size-ht?t.strstart-(t.w_size-ht):0,c=t.window,u=t.w_mask,h=t.prev,d=t.strstart+ut;let f=c[o+a-1],p=c[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(r=e,c[r+a]===p&&c[r+a-1]===f&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&oa){if(t.match_start=e,a=n,n>=s)break;f=c[o+a-1],p=c[o+a]}}}while((e=h[e&u])>l&&0!=--i);return a<=t.lookahead?a:t.lookahead},Tt=t=>{const e=t.w_size;let r,n,i;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-ht)&&(t.window.set(t.window.subarray(e,e+e-n),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),bt(t),n+=e),0===t.strm.avail_in)break;if(r=At(t.strm,t.window,t.strstart+t.lookahead,n),t.lookahead+=r,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=yt(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=yt(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead{let r,n,i,o=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,a=0,s=t.strm.avail_in;do{if(r=65535,i=t.bi_valid+42>>3,t.strm.avail_outn+t.strm.avail_in&&(r=n+t.strm.avail_in),r>i&&(r=i),r>8,t.pending_buf[t.pending-2]=~r,t.pending_buf[t.pending-1]=~r>>8,xt(t.strm),n&&(n>r&&(n=r),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,r-=n),r&&(At(t.strm,t.strm.output,t.strm.next_out,r),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r)}while(0===a);return s-=t.strm.avail_in,s&&(s>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=s&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-s,t.strm.next_in),t.strstart),t.strstart+=s,t.insert+=s>t.w_size-t.insert?t.w_size-t.insert:s),t.block_start=t.strstart),t.high_wateri&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,i+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),i>t.strm.avail_in&&(i=t.strm.avail_in),i&&(At(t.strm,t.window,t.strstart,i),t.strstart+=i,t.insert+=i>t.w_size-t.insert?t.w_size-t.insert:i),t.high_water>3,i=t.pending_buf_size-i>65535?65535:t.pending_buf_size-i,o=i>t.w_size?t.w_size:i,n=t.strstart-t.block_start,(n>=o||(n||e===X)&&e!==q&&0===t.strm.avail_in&&n<=i)&&(r=n>i?i:n,a=e===X&&0===t.strm.avail_in&&r===n?1:0,G(t,t.block_start,r,a),t.block_start+=r,xt(t.strm)),a?3:1)},Ct=(t,e)=>{let r,n;for(;;){if(t.lookahead=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-ht&&(t.match_length=Mt(t,r)),t.match_length>=3)if(n=H(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=yt(t,t.ins_h,t.window[t.strstart+1]);else n=H(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(_t(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===X?(_t(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(_t(t,!1),0===t.strm.avail_out)?1:2},Et=(t,e)=>{let r,n,i;for(;;){if(t.lookahead=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=H(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(_t(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=H(t,0,t.window[t.strstart-1]),n&&_t(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=H(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===X?(_t(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(_t(t,!1),0===t.strm.avail_out)?1:2};function Lt(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}const zt=[new Lt(0,0,0,0,St),new Lt(4,4,8,4,Ct),new Lt(4,5,16,8,Ct),new Lt(4,6,32,32,Ct),new Lt(4,4,16,16,Et),new Lt(8,16,32,32,Et),new Lt(8,16,128,128,Et),new Lt(8,32,128,256,Et),new Lt(32,128,258,1024,Et),new Lt(32,258,258,4096,Et)];function Ot(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ct,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),vt(this.dyn_ltree),vt(this.dyn_dtree),vt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),vt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),vt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Dt=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==dt&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==ft&&e.status!==pt?1:0},It=t=>{if(Dt(t))return mt(t,Q);t.total_in=t.total_out=0,t.data_type=lt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?dt:ft,t.adler=2===e.wrap?0:1,e.last_flush=-2,U(e),J},Rt=t=>{const e=It(t);var r;return e===J&&((r=t.state).window_size=2*r.w_size,vt(r.head),r.max_lazy_match=zt[r.level].max_lazy,r.good_match=zt[r.level].good_length,r.nice_match=zt[r.level].nice_length,r.max_chain_length=zt[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),e},Ft=(t,e,r,n,i,o)=>{if(!t)return Q;let a=1;if(e===rt&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>9||r!==ct||n<8||n>15||e<0||e>9||o<0||o>at||8===n&&1!==a)return mt(t,Q);8===n&&(n=9);const s=new Ot;return t.state=s,s.strm=t,s.status=dt,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<Ft(t,e,ct,15,8,st),deflateInit2:Ft,deflateReset:Rt,deflateResetKeep:It,deflateSetHeader:(t,e)=>Dt(t)||2!==t.state.wrap?Q:(t.state.gzhead=e,J),deflate:(t,e)=>{if(Dt(t)||e>$||e<0)return t?mt(t,Q):Q;const r=t.state;if(!t.output||0!==t.avail_in&&!t.input||r.status===pt&&e!==X)return mt(t,0===t.avail_out?et:Q);const n=r.last_flush;if(r.last_flush=e,0!==r.pending){if(xt(t),0===t.avail_out)return r.last_flush=-1,J}else if(0===t.avail_in&>(e)<=gt(n)&&e!==X)return mt(t,et);if(r.status===pt&&0!==t.avail_in)return mt(t,et);if(r.status===dt&&0===r.wrap&&(r.status=ft),r.status===dt){let e=ct+(r.w_bits-8<<4)<<8,n=-1;if(n=r.strategy>=it||r.level<2?0:r.level<6?1:6===r.level?2:3,e|=n<<6,0!==r.strstart&&(e|=32),e+=31-e%31,kt(r,e),0!==r.strstart&&(kt(r,t.adler>>>16),kt(r,65535&t.adler)),t.adler=1,r.status=ft,xt(t),0!==r.pending)return r.last_flush=-1,J}if(57===r.status)if(t.adler=0,wt(r,31),wt(r,139),wt(r,8),r.gzhead)wt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),wt(r,255&r.gzhead.time),wt(r,r.gzhead.time>>8&255),wt(r,r.gzhead.time>>16&255),wt(r,r.gzhead.time>>24&255),wt(r,9===r.level?2:r.strategy>=it||r.level<2?4:0),wt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(wt(r,255&r.gzhead.extra.length),wt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=N(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(wt(r,0),wt(r,0),wt(r,0),wt(r,0),wt(r,0),wt(r,9===r.level?2:r.strategy>=it||r.level<2?4:0),wt(r,3),r.status=ft,xt(t),0!==r.pending)return r.last_flush=-1,J;if(69===r.status){if(r.gzhead.extra){let e=r.pending,n=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+n>r.pending_buf_size;){let i=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+i),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>e&&(t.adler=N(t.adler,r.pending_buf,r.pending-e,e)),r.gzindex+=i,xt(t),0!==r.pending)return r.last_flush=-1,J;e=0,n-=i}let i=new Uint8Array(r.gzhead.extra);r.pending_buf.set(i.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending+=n,r.gzhead.hcrc&&r.pending>e&&(t.adler=N(t.adler,r.pending_buf,r.pending-e,e)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let e,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(t.adler=N(t.adler,r.pending_buf,r.pending-n,n)),xt(t),0!==r.pending)return r.last_flush=-1,J;n=0}e=r.gzindexn&&(t.adler=N(t.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let e,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(t.adler=N(t.adler,r.pending_buf,r.pending-n,n)),xt(t),0!==r.pending)return r.last_flush=-1,J;n=0}e=r.gzindexn&&(t.adler=N(t.adler,r.pending_buf,r.pending-n,n))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(xt(t),0!==r.pending))return r.last_flush=-1,J;wt(r,255&t.adler),wt(r,t.adler>>8&255),t.adler=0}if(r.status=ft,xt(t),0!==r.pending)return r.last_flush=-1,J}if(0!==t.avail_in||0!==r.lookahead||e!==q&&r.status!==pt){let n=0===r.level?St(r,e):r.strategy===it?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(Tt(t),0===t.lookahead)){if(e===q)return 1;break}if(t.match_length=0,r=H(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(_t(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(_t(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(_t(t,!1),0===t.strm.avail_out)?1:2})(r,e):r.strategy===ot?((t,e)=>{let r,n,i,o;const a=t.window;for(;;){if(t.lookahead<=ut){if(Tt(t),t.lookahead<=ut&&e===q)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=t.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=t.strstart+ut;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=H(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=H(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(_t(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(_t(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(_t(t,!1),0===t.strm.avail_out)?1:2})(r,e):zt[r.level].func(r,e);if(3!==n&&4!==n||(r.status=pt),1===n||3===n)return 0===t.avail_out&&(r.last_flush=-1),J;if(2===n&&(e===Y?W(r):e!==$&&(G(r,0,0,!1),e===Z&&(vt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),xt(t),0===t.avail_out))return r.last_flush=-1,J}return e!==X?J:r.wrap<=0?K:(2===r.wrap?(wt(r,255&t.adler),wt(r,t.adler>>8&255),wt(r,t.adler>>16&255),wt(r,t.adler>>24&255),wt(r,255&t.total_in),wt(r,t.total_in>>8&255),wt(r,t.total_in>>16&255),wt(r,t.total_in>>24&255)):(kt(r,t.adler>>>16),kt(r,65535&t.adler)),xt(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?J:K)},deflateEnd:t=>{if(Dt(t))return Q;const e=t.state.status;return t.state=null,e===ft?mt(t,tt):J},deflateSetDictionary:(t,e)=>{let r=e.length;if(Dt(t))return Q;const n=t.state,i=n.wrap;if(2===i||1===i&&n.status!==dt||n.lookahead)return Q;if(1===i&&(t.adler=F(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===i&&(vt(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const o=t.avail_in,a=t.next_in,s=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,Tt(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,Tt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=a,t.input=s,t.avail_in=o,n.wrap=i,J},deflateInfo:"pako deflate (from Nodeca project)"};const Nt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var jt={assign:function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const e in r)Nt(r,e)&&(t[e]=r[e])}}return t},flattenChunks:t=>{let e=0;for(let r=0,n=t.length;r=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Ut[254]=Ut[254]=1;var Gt={string2buf:t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,i,o,a=t.length,s=0;for(i=0;i>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e},buf2string:(t,e)=>{const r=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let n,i;const o=new Array(2*r);for(i=0,n=0;n4)o[i++]=65533,n+=a-1;else{for(e&=2===a?31:3===a?15:7;a>1&&n1?o[i++]=65533:e<65536?o[i++]=e:(e-=65536,o[i++]=55296|e>>10&1023,o[i++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Bt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let n=0;n{(e=e||t.length)>t.length&&(e=t.length);let r=e-1;for(;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+Ut[t[r]]>e?r:e}},Vt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ht=Object.prototype.toString,{Z_NO_FLUSH:Wt,Z_SYNC_FLUSH:qt,Z_FULL_FLUSH:Yt,Z_FINISH:Zt,Z_OK:Xt,Z_STREAM_END:$t,Z_DEFAULT_COMPRESSION:Jt,Z_DEFAULT_STRATEGY:Kt,Z_DEFLATED:Qt}=B;function te(t){this.options=jt.assign({level:Jt,method:Qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Kt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Vt,this.strm.avail_out=0;let r=Pt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==Xt)throw new Error(j[r]);if(e.header&&Pt.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Gt.string2buf(e.dictionary):"[object ArrayBuffer]"===Ht.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=Pt.deflateSetDictionary(this.strm,t),r!==Xt)throw new Error(j[r]);this._dict_set=!0}}function ee(t,e){const r=new te(e);if(r.push(t,!0),r.err)throw r.msg||j[r.err];return r.result}te.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize;let i,o;if(this.ended)return!1;for(o=e===~~e?e:!0===e?Zt:Wt,"string"==typeof t?r.input=Gt.string2buf(t):"[object ArrayBuffer]"===Ht.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(o===qt||o===Yt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(i=Pt.deflate(r,o),i===$t)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),i=Pt.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Xt;if(0!==r.avail_out){if(o>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},te.prototype.onData=function(t){this.chunks.push(t)},te.prototype.onEnd=function(t){t===Xt&&(this.result=jt.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var re={Deflate:te,deflate:ee,deflateRaw:function(t,e){return(e=e||{}).raw=!0,ee(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,ee(t,e)},constants:B};const ne=16209;var ie=function(t,e){let r,n,i,o,a,s,l,c,u,h,d,f,p,m,g,v,b,y,x,_,w,k,A,M;const T=t.state;r=t.next_in,A=t.input,n=r+(t.avail_in-5),i=t.next_out,M=t.output,o=i-(e-t.avail_out),a=i+(t.avail_out-257),s=T.dmax,l=T.wsize,c=T.whave,u=T.wnext,h=T.window,d=T.hold,f=T.bits,p=T.lencode,m=T.distcode,g=(1<>>24,d>>>=y,f-=y,y=b>>>16&255,0===y)M[i++]=65535&b;else{if(!(16&y)){if(64&y){if(32&y){T.mode=16191;break t}t.msg="invalid literal/length code",T.mode=ne;break t}b=p[(65535&b)+(d&(1<>>=y,f-=y),f<15&&(d+=A[r++]<>>24,d>>>=y,f-=y,y=b>>>16&255,16&y){if(_=65535&b,y&=15,fs){t.msg="invalid distance too far back",T.mode=ne;break t}if(d>>>=y,f-=y,y=i-o,_>y){if(y=_-y,y>c&&T.sane){t.msg="invalid distance too far back",T.mode=ne;break t}if(w=0,k=h,0===u){if(w+=l-y,y2;)M[i++]=k[w++],M[i++]=k[w++],M[i++]=k[w++],x-=3;x&&(M[i++]=k[w++],x>1&&(M[i++]=k[w++]))}else{w=i-_;do{M[i++]=M[w++],M[i++]=M[w++],M[i++]=M[w++],x-=3}while(x>2);x&&(M[i++]=M[w++],x>1&&(M[i++]=M[w++]))}break}if(64&y){t.msg="invalid distance code",T.mode=ne;break t}b=m[(65535&b)+(d&(1<>3,r-=x,f-=x<<3,d&=(1<{const l=s.bits;let c,u,h,d,f,p,m=0,g=0,v=0,b=0,y=0,x=0,_=0,w=0,k=0,A=0,M=null;const T=new Uint16Array(16),S=new Uint16Array(16);let C,E,L,z=null;for(m=0;m<=15;m++)T[m]=0;for(g=0;g=1&&0===T[b];b--);if(y>b&&(y=b),0===b)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(v=1;v0&&(0===t||1!==b))return-1;for(S[1]=0,m=1;m<15;m++)S[m+1]=S[m]+T[m];for(g=0;g852||2===t&&k>592)return 1;for(;;){C=m-_,a[g]+1=p?(E=z[a[g]-p],L=M[a[g]-p]):(E=96,L=0),c=1<>_)+u]=C<<24|E<<16|L}while(0!==u);for(c=1<>=1;if(0!==c?(A&=c-1,A+=c):A=0,g++,0==--T[m]){if(m===b)break;m=e[r+a[g]]}if(m>y&&(A&d)!==h){for(0===_&&(_=y),f+=v,x=m-_,w=1<852||2===t&&k>592)return 1;h=A&d,i[h]=y<<24|x<<16|f-o}}return 0!==A&&(i[f+A]=m-_<<24|64<<16),s.bits=y,0};const{Z_FINISH:ue,Z_BLOCK:he,Z_TREES:de,Z_OK:fe,Z_STREAM_END:pe,Z_NEED_DICT:me,Z_STREAM_ERROR:ge,Z_DATA_ERROR:ve,Z_MEM_ERROR:be,Z_BUF_ERROR:ye,Z_DEFLATED:xe}=B,_e=16180,we=16190,ke=16191,Ae=16192,Me=16194,Te=16199,Se=16200,Ce=16206,Ee=16209,Le=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ze(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Oe=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<_e||e.mode>16211?1:0},De=t=>{if(Oe(t))return ge;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=_e,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,fe},Ie=t=>{if(Oe(t))return ge;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,De(t)},Re=(t,e)=>{let r;if(Oe(t))return ge;const n=t.state;return e<0?(r=0,e=-e):(r=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?ge:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,Ie(t))},Fe=(t,e)=>{if(!t)return ge;const r=new ze;t.state=r,r.strm=t,r.window=null,r.mode=_e;const n=Re(t,e);return n!==fe&&(t.state=null),n};let Pe,Ne,je=!0;const Be=t=>{if(je){Pe=new Int32Array(512),Ne=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ce(1,t.lens,0,288,Pe,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ce(2,t.lens,0,32,Ne,0,t.work,{bits:5}),je=!1}t.lencode=Pe,t.lenbits=9,t.distcode=Ne,t.distbits=5},Ue=(t,e,r,n)=>{let i;const o=t.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(e.subarray(r-o.wsize,r),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),o.window.set(e.subarray(r-n,r-n+i),o.wnext),(n-=i)?(o.window.set(e.subarray(r-n,r),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whaveFe(t,15),inflateInit2:Fe,inflate:(t,e)=>{let r,n,i,o,a,s,l,c,u,h,d,f,p,m,g,v,b,y,x,_,w,k,A=0;const M=new Uint8Array(4);let T,S;const C=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Oe(t)||!t.output||!t.input&&0!==t.avail_in)return ge;r=t.state,r.mode===ke&&(r.mode=Ae),a=t.next_out,i=t.output,l=t.avail_out,o=t.next_in,n=t.input,s=t.avail_in,c=r.hold,u=r.bits,h=s,d=l,k=fe;t:for(;;)switch(r.mode){case _e:if(0===r.wrap){r.mode=Ae;break}for(;u<16;){if(0===s)break t;s--,c+=n[o++]<>>8&255,r.check=N(r.check,M,2,0),c=0,u=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=Ee;break}if((15&c)!==xe){t.msg="unknown compression method",r.mode=Ee;break}if(c>>>=4,u-=4,w=8+(15&c),0===r.wbits&&(r.wbits=w),w>15||w>r.wbits){t.msg="invalid window size",r.mode=Ee;break}r.dmax=1<>8&1),512&r.flags&&4&r.wrap&&(M[0]=255&c,M[1]=c>>>8&255,r.check=N(r.check,M,2,0)),c=0,u=0,r.mode=16182;case 16182:for(;u<32;){if(0===s)break t;s--,c+=n[o++]<>>8&255,M[2]=c>>>16&255,M[3]=c>>>24&255,r.check=N(r.check,M,4,0)),c=0,u=0,r.mode=16183;case 16183:for(;u<16;){if(0===s)break t;s--,c+=n[o++]<>8),512&r.flags&&4&r.wrap&&(M[0]=255&c,M[1]=c>>>8&255,r.check=N(r.check,M,2,0)),c=0,u=0,r.mode=16184;case 16184:if(1024&r.flags){for(;u<16;){if(0===s)break t;s--,c+=n[o++]<>>8&255,r.check=N(r.check,M,2,0)),c=0,u=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(f=r.length,f>s&&(f=s),f&&(r.head&&(w=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(o,o+f),w)),512&r.flags&&4&r.wrap&&(r.check=N(r.check,n,f,o)),s-=f,o+=f,r.length-=f),r.length))break t;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===s)break t;f=0;do{w=n[o+f++],r.head&&w&&r.length<65536&&(r.head.name+=String.fromCharCode(w))}while(w&&f>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=ke;break;case 16189:for(;u<32;){if(0===s)break t;s--,c+=n[o++]<>>=7&u,u-=7&u,r.mode=Ce;break}for(;u<3;){if(0===s)break t;s--,c+=n[o++]<>>=1,u-=1,3&c){case 0:r.mode=16193;break;case 1:if(Be(r),r.mode=Te,e===de){c>>>=2,u-=2;break t}break;case 2:r.mode=16196;break;case 3:t.msg="invalid block type",r.mode=Ee}c>>>=2,u-=2;break;case 16193:for(c>>>=7&u,u-=7&u;u<32;){if(0===s)break t;s--,c+=n[o++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=Ee;break}if(r.length=65535&c,c=0,u=0,r.mode=Me,e===de)break t;case Me:r.mode=16195;case 16195:if(f=r.length,f){if(f>s&&(f=s),f>l&&(f=l),0===f)break t;i.set(n.subarray(o,o+f),a),s-=f,o+=f,l-=f,a+=f,r.length-=f;break}r.mode=ke;break;case 16196:for(;u<14;){if(0===s)break t;s--,c+=n[o++]<>>=5,u-=5,r.ndist=1+(31&c),c>>>=5,u-=5,r.ncode=4+(15&c),c>>>=4,u-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=Ee;break}r.have=0,r.mode=16197;case 16197:for(;r.have>>=3,u-=3}for(;r.have<19;)r.lens[C[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,T={bits:r.lenbits},k=ce(0,r.lens,0,19,r.lencode,0,r.work,T),r.lenbits=T.bits,k){t.msg="invalid code lengths set",r.mode=Ee;break}r.have=0,r.mode=16198;case 16198:for(;r.have>>24,v=A>>>16&255,b=65535&A,!(g<=u);){if(0===s)break t;s--,c+=n[o++]<>>=g,u-=g,r.lens[r.have++]=b;else{if(16===b){for(S=g+2;u>>=g,u-=g,0===r.have){t.msg="invalid bit length repeat",r.mode=Ee;break}w=r.lens[r.have-1],f=3+(3&c),c>>>=2,u-=2}else if(17===b){for(S=g+3;u>>=g,u-=g,w=0,f=3+(7&c),c>>>=3,u-=3}else{for(S=g+7;u>>=g,u-=g,w=0,f=11+(127&c),c>>>=7,u-=7}if(r.have+f>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=Ee;break}for(;f--;)r.lens[r.have++]=w}}if(r.mode===Ee)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=Ee;break}if(r.lenbits=9,T={bits:r.lenbits},k=ce(1,r.lens,0,r.nlen,r.lencode,0,r.work,T),r.lenbits=T.bits,k){t.msg="invalid literal/lengths set",r.mode=Ee;break}if(r.distbits=6,r.distcode=r.distdyn,T={bits:r.distbits},k=ce(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,T),r.distbits=T.bits,k){t.msg="invalid distances set",r.mode=Ee;break}if(r.mode=Te,e===de)break t;case Te:r.mode=Se;case Se:if(s>=6&&l>=258){t.next_out=a,t.avail_out=l,t.next_in=o,t.avail_in=s,r.hold=c,r.bits=u,ie(t,d),a=t.next_out,i=t.output,l=t.avail_out,o=t.next_in,n=t.input,s=t.avail_in,c=r.hold,u=r.bits,r.mode===ke&&(r.back=-1);break}for(r.back=0;A=r.lencode[c&(1<>>24,v=A>>>16&255,b=65535&A,!(g<=u);){if(0===s)break t;s--,c+=n[o++]<>y)],g=A>>>24,v=A>>>16&255,b=65535&A,!(y+g<=u);){if(0===s)break t;s--,c+=n[o++]<>>=y,u-=y,r.back+=y}if(c>>>=g,u-=g,r.back+=g,r.length=b,0===v){r.mode=16205;break}if(32&v){r.back=-1,r.mode=ke;break}if(64&v){t.msg="invalid literal/length code",r.mode=Ee;break}r.extra=15&v,r.mode=16201;case 16201:if(r.extra){for(S=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;A=r.distcode[c&(1<>>24,v=A>>>16&255,b=65535&A,!(g<=u);){if(0===s)break t;s--,c+=n[o++]<>y)],g=A>>>24,v=A>>>16&255,b=65535&A,!(y+g<=u);){if(0===s)break t;s--,c+=n[o++]<>>=y,u-=y,r.back+=y}if(c>>>=g,u-=g,r.back+=g,64&v){t.msg="invalid distance code",r.mode=Ee;break}r.offset=b,r.extra=15&v,r.mode=16203;case 16203:if(r.extra){for(S=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=Ee;break}r.mode=16204;case 16204:if(0===l)break t;if(f=d-l,r.offset>f){if(f=r.offset-f,f>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=Ee;break}f>r.wnext?(f-=r.wnext,p=r.wsize-f):p=r.wnext-f,f>r.length&&(f=r.length),m=r.window}else m=i,p=a-r.offset,f=r.length;f>l&&(f=l),l-=f,r.length-=f;do{i[a++]=m[p++]}while(--f);0===r.length&&(r.mode=Se);break;case 16205:if(0===l)break t;i[a++]=r.length,l--,r.mode=Se;break;case Ce:if(r.wrap){for(;u<32;){if(0===s)break t;s--,c|=n[o++]<{if(Oe(t))return ge;let e=t.state;return e.window&&(e.window=null),t.state=null,fe},inflateGetHeader:(t,e)=>{if(Oe(t))return ge;const r=t.state;return 2&r.wrap?(r.head=e,e.done=!1,fe):ge},inflateSetDictionary:(t,e)=>{const r=e.length;let n,i,o;return Oe(t)?ge:(n=t.state,0!==n.wrap&&n.mode!==we?ge:n.mode===we&&(i=1,i=F(i,e,r,0),i!==n.check)?ve:(o=Ue(t,e,r,r),o?(n.mode=16210,be):(n.havedict=1,fe)))},inflateInfo:"pako inflate (from Nodeca project)"},Ve=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const He=Object.prototype.toString,{Z_NO_FLUSH:We,Z_FINISH:qe,Z_OK:Ye,Z_STREAM_END:Ze,Z_NEED_DICT:Xe,Z_STREAM_ERROR:$e,Z_DATA_ERROR:Je,Z_MEM_ERROR:Ke}=B;function Qe(t){this.options=jt.assign({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Vt,this.strm.avail_out=0;let r=Ge.inflateInit2(this.strm,e.windowBits);if(r!==Ye)throw new Error(j[r]);if(this.header=new Ve,Ge.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Gt.string2buf(e.dictionary):"[object ArrayBuffer]"===He.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=Ge.inflateSetDictionary(this.strm,e.dictionary),r!==Ye)))throw new Error(j[r])}function tr(t,e){const r=new Qe(e);if(r.push(t),r.err)throw r.msg||j[r.err];return r.result}Qe.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize,i=this.options.dictionary;let o,a,s;if(this.ended)return!1;for(a=e===~~e?e:!0===e?qe:We,"[object ArrayBuffer]"===He.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),o=Ge.inflate(r,a),o===Xe&&i&&(o=Ge.inflateSetDictionary(r,i),o===Ye?o=Ge.inflate(r,a):o===Je&&(o=Xe));r.avail_in>0&&o===Ze&&r.state.wrap>0&&0!==t[r.next_in];)Ge.inflateReset(r),o=Ge.inflate(r,a);switch(o){case $e:case Je:case Xe:case Ke:return this.onEnd(o),this.ended=!0,!1}if(s=r.avail_out,r.next_out&&(0===r.avail_out||o===Ze))if("string"===this.options.to){let t=Gt.utf8border(r.output,r.next_out),e=r.next_out-t,i=Gt.buf2string(r.output,t);r.next_out=e,r.avail_out=n-e,e&&r.output.set(r.output.subarray(t,t+e),0),this.onData(i)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(o!==Ye||0!==s){if(o===Ze)return o=Ge.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},Qe.prototype.onData=function(t){this.chunks.push(t)},Qe.prototype.onEnd=function(t){t===Ye&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=jt.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var er={Inflate:Qe,inflate:tr,inflateRaw:function(t,e){return(e=e||{}).raw=!0,tr(t,e)},ungzip:tr,constants:B};const{Deflate:rr,deflate:nr,deflateRaw:ir,gzip:or}=re,{Inflate:ar,inflate:sr,inflateRaw:lr,ungzip:cr}=er;var ur=rr,hr=nr,dr=ir,fr=or,pr=ar,mr=sr,gr=lr,vr=cr,br=B,yr={Deflate:rr,deflate:nr,deflateRaw:ir,gzip:or,Inflate:ar,inflate:sr,inflateRaw:lr,ungzip:cr,constants:B}}},__webpack_module_cache__={};function __nested_webpack_require_1637606__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__nested_webpack_require_1637606__),r.exports}__nested_webpack_require_1637606__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __nested_webpack_require_1637606__.d(e,{a:e}),e},__nested_webpack_require_1637606__.d=(t,e)=>{for(var r in e)__nested_webpack_require_1637606__.o(e,r)&&!__nested_webpack_require_1637606__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},__nested_webpack_require_1637606__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__nested_webpack_require_1637606__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__nested_webpack_require_1637606__("./src/index.ts"),__nested_webpack_require_1637606__("./src/SurfaceWorker.js");var __nested_webpack_exports__=__nested_webpack_require_1637606__("./src/exporter.js");return __nested_webpack_exports__})(),module.exports=factory()},27941:(t,e,r)=>{var n,i;(function(){var o={version:"3.8.0"},a=[].slice,s=function(t){return a.call(t)},l=self.document;function c(t){return t&&(t.ownerDocument||t.document||t).documentElement}function u(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(l)try{s(l.documentElement.childNodes)[0].nodeType}catch(t){s=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var h=this.Element.prototype,d=h.setAttribute,f=h.setAttributeNS,p=this.CSSStyleDeclaration.prototype,m=p.setProperty;h.setAttribute=function(t,e){d.call(this,t,e+"")},h.setAttributeNS=function(t,e,r){f.call(this,t,e,r+"")},p.setProperty=function(t,e,r){m.call(this,t,e+"",r)}}function g(t,e){return te?1:t>=e?0:NaN}function v(t){return null===t?NaN:+t}function b(t){return!isNaN(t)}function y(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[o],r)<0?n=o+1:i=o}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[o],r)>0?i=o:n=o+1}return n}}}o.ascending=g,o.descending=function(t,e){return et?1:e>=t?0:NaN},o.min=function(t,e){var r,n,i=-1,o=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},o.max=function(t,e){var r,n,i=-1,o=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},o.extent=function(t,e){var r,n,i,o=-1,a=t.length;if(1===arguments.length){for(;++o=n){r=i=n;break}for(;++on&&(r=n),i=n){r=i=n;break}for(;++on&&(r=n),i1)return a/(l-1)},o.deviation=function(){var t=o.variance.apply(this,arguments);return t?Math.sqrt(t):t};var x=y(g);function _(t){return t.length}o.bisectLeft=x.left,o.bisect=o.bisectRight=x.right,o.bisector=function(t){return y(1===t.length?function(e,r){return g(t(e),r)}:t)},o.shuffle=function(t,e,r){(o=arguments.length)<3&&(r=t.length,o<2&&(e=0));for(var n,i,o=r-e;o;)i=Math.random()*o--|0,n=t[o+e],t[o+e]=t[i+e],t[i+e]=n;return t},o.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},o.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e=0;)for(e=(n=t[i]).length;--e>=0;)r[--a]=n[e];return r};var w=Math.abs;function k(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function A(){this._=Object.create(null)}o.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error("infinite range");var n,i=[],o=function(t){for(var e=1;t*e%1;)e*=10;return e}(w(r)),a=-1;if(t*=o,e*=o,(r*=o)<0)for(;(n=t+r*++a)>e;)i.push(n/o);else for(;(n=t+r*++a)=n.length)return e?e.call(r,o):t?o.sort(t):o;for(var l,c,u,h,d=-1,f=o.length,p=n[s++],m=new A;++d=n.length)return t;var r=[],o=i[e++];return t.forEach((function(t,n){r.push({key:t,values:s(n,e)})})),o?r.sort((function(t,e){return o(t.key,e.key)})):r}return r.map=function(t,e){return a(e,t,0)},r.entries=function(t){return s(a(o.map,t,0),0)},r.key=function(t){return n.push(t),r},r.sortKeys=function(t){return i[n.length-1]=t,r},r.sortValues=function(e){return t=e,r},r.rollup=function(t){return e=t,r},r},o.set=function(t){var e=new I;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},o.event=null,o.requote=function(t){return t.replace(W,"\\$&")};var W=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,q={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function Y(t){return q(t,J),t}var Z=function(t,e){return e.querySelector(t)},X=function(t,e){return e.querySelectorAll(t)},$=function(t,e){var r=t.matches||t[P(t,"matchesSelector")];return $=function(t,e){return r.call(t,e)},$(t,e)};"function"==typeof Sizzle&&(Z=function(t,e){return Sizzle(t,e)[0]||null},X=Sizzle,$=Sizzle.matchesSelector),o.selection=function(){return o.select(l.documentElement)};var J=o.selection.prototype=[];function K(t){return"function"==typeof t?t:function(){return Z(t,this)}}function Q(t){return"function"==typeof t?t:function(){return X(t,this)}}J.select=function(t){var e,r,n,i,o=[];t=K(t);for(var a=-1,s=this.length;++a=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),et.hasOwnProperty(r)?{space:et[r],local:t}:t}},J.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node();return(t=o.ns.qualify(t)).local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(rt(e,t[e]));return this}return this.each(rt(t,e))},J.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=ot(t)).length,i=-1;if(e=r.classList){for(;++i=0;)(r=n[i])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this},J.sort=function(t){t=pt.apply(this,arguments);for(var e=-1,r=this.length;++e0&&(t=t.slice(0,i));var l=yt.get(t);function c(){var e=this[n];e&&(this.removeEventListener(t,e,e.$),delete this[n])}return l&&(t=l,a=_t),i?e?function(){var i=a(e,s(arguments));c.call(this),this.addEventListener(t,this[n]=i,i.$=r),i._=e}:c:e?j:function(){var e,r=new RegExp("^__on([^.]+)"+o.requote(t)+"$");for(var n in this)if(e=n.match(r)){var i=this[n];this.removeEventListener(e[1],i,i.$),delete this[n]}}}o.selection.enter=gt,o.selection.enter.prototype=vt,vt.append=J.append,vt.empty=J.empty,vt.node=J.node,vt.call=J.call,vt.size=J.size,vt.select=function(t){for(var e,r,n,i,o,a=[],s=-1,l=this.length;++s=n&&(n=e+1);!(a=s[n])&&++n1?Dt:t<-1?-Dt:Math.asin(t)}function Pt(t){return((t=Math.exp(t))+1/t)/2}var Nt=Math.SQRT2;o.interpolateZoom=function(t,e){var r,n,i=t[0],o=t[1],a=t[2],s=e[0],l=e[1],c=e[2],u=s-i,h=l-o,d=u*u+h*h;if(d0&&(t=t.transition().duration(m)),t.call(w.event)}function S(){s&&s.domain(a.range().map((function(t){return(t-d.x)/d.k})).map(a.invert)),h&&h.domain(c.range().map((function(t){return(t-d.y)/d.k})).map(c.invert))}function C(t){g++||t({type:"zoomstart"})}function E(t){S(),t({type:"zoom",scale:d.k,translate:[d.x,d.y]})}function L(t){--g||(t({type:"zoomend"}),e=null)}function z(){var t=this,e=_.of(t,arguments),r=0,n=o.select(u(t)).on(b,(function(){r=1,M(o.mouse(t),i),E(e)})).on(y,(function(){n.on(b,null).on(y,null),a(r),L(e)})),i=k(o.mouse(t)),a=At(t);$i.call(t),C(e)}function O(){var t,e=this,r=_.of(e,arguments),n={},a=0,s=".zoom-"+o.event.changedTouches[0].identifier,l="touchmove"+s,c="touchend"+s,u=[],h=o.select(e),f=At(e);function p(){var r=o.touches(e);return t=d.k,r.forEach((function(t){t.identifier in n&&(n[t.identifier]=k(t))})),r}function m(){var t=o.event.target;o.select(t).on(l,g).on(c,b),u.push(t);for(var r=o.event.changedTouches,s=0,h=r.length;s1){v=f[0];var y=f[1],x=v[0]-y[0],_=v[1]-y[1];a=x*x+_*_}}function g(){var s,l,c,u,h=o.touches(e);$i.call(e);for(var d=0,f=h.length;d360?t-=360:t<0&&(t+=360),t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)||e<0?0:e>1?1:e,n=2*(r=r<0?0:r>1?1:r)-(i=r<=.5?r*(1+e):r+e-r*e),new oe(o(t+120),o(t),o(t-120))}function qt(t,e,r){return this instanceof qt?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof qt?new qt(t.h,t.c,t.l):function(t,e,r){return t>0?new qt(Math.atan2(r,e)*Rt,Math.sqrt(e*e+r*r),t):new qt(NaN,NaN,t)}(t instanceof Xt?t.l:(t=de((t=o.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new qt(t,e,r)}Ht.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Vt(this.h,this.s,this.l/t)},Ht.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Vt(this.h,this.s,t*this.l)},Ht.rgb=function(){return Wt(this.h,this.s,this.l)},o.hcl=qt;var Yt=qt.prototype=new Gt;function Zt(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new Xt(r,Math.cos(t*=It)*e,Math.sin(t)*e)}function Xt(t,e,r){return this instanceof Xt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof Xt?new Xt(t.l,t.a,t.b):t instanceof qt?Zt(t.h,t.c,t.l):de((t=oe(t)).r,t.g,t.b):new Xt(t,e,r)}Yt.brighter=function(t){return new qt(this.h,this.c,Math.min(100,this.l+$t*(arguments.length?t:1)))},Yt.darker=function(t){return new qt(this.h,this.c,Math.max(0,this.l-$t*(arguments.length?t:1)))},Yt.rgb=function(){return Zt(this.h,this.c,this.l).rgb()},o.lab=Xt;var $t=18,Jt=.95047,Kt=1,Qt=1.08883,te=Xt.prototype=new Gt;function ee(t,e,r){var n=(t+16)/116,i=n+e/500,o=n-r/200;return new oe(ie(3.2404542*(i=re(i)*Jt)-1.5371385*(n=re(n)*Kt)-.4985314*(o=re(o)*Qt)),ie(-.969266*i+1.8760108*n+.041556*o),ie(.0556434*i-.2040259*n+1.0572252*o))}function re(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ne(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ie(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function oe(t,e,r){return this instanceof oe?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof oe?new oe(t.r,t.g,t.b):ue(""+t,oe,Wt):new oe(t,e,r)}function ae(t){return new oe(t>>16,t>>8&255,255&t)}function se(t){return ae(t)+""}te.brighter=function(t){return new Xt(Math.min(100,this.l+$t*(arguments.length?t:1)),this.a,this.b)},te.darker=function(t){return new Xt(Math.max(0,this.l-$t*(arguments.length?t:1)),this.a,this.b)},te.rgb=function(){return ee(this.l,this.a,this.b)},o.rgb=oe;var le=oe.prototype=new Gt;function ce(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function ue(t,e,r){var n,i,o,a=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(pe(i[0]),pe(i[1]),pe(i[2]))}return(o=me.get(t))?e(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,l=15&o,l|=l<<4):7===t.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),e(a,s,l))}function he(t,e,r){var n,i,o=Math.min(t/=255,e/=255,r/=255),a=Math.max(t,e,r),s=a-o,l=(a+o)/2;return s?(i=l<.5?s/(a+o):s/(2-a-o),n=t==a?(e-r)/s+(e0&&l<1?0:n),new Vt(n,i,l)}function de(t,e,r){var n=ne((.4124564*(t=fe(t))+.3575761*(e=fe(e))+.1804375*(r=fe(r)))/Jt),i=ne((.2126729*t+.7151522*e+.072175*r)/Kt);return Xt(116*i-16,500*(n-i),200*(i-ne((.0193339*t+.119192*e+.9503041*r)/Qt)))}function fe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function pe(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}le.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b,i=30;return e||r||n?(e&&e=200&&e<300||304===e){try{t=r.call(i,c)}catch(t){return void a.error.call(i,t)}a.load.call(i,t)}else a.error.call(i,c)}return self.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(t)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=h:c.onreadystatechange=function(){c.readyState>3&&h()},c.onprogress=function(t){var e=o.event;o.event=t;try{a.progress.call(i,c)}finally{o.event=e}},i.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",i)},i.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",i):e},i.responseType=function(t){return arguments.length?(u=t,i):u},i.response=function(t){return r=t,i},["get","post"].forEach((function(t){i[t]=function(){return i.send.apply(i,[t].concat(s(arguments)))}})),i.send=function(r,n,o){if(2===arguments.length&&"function"==typeof n&&(o=n,n=null),c.open(r,t,!0),null==e||"accept"in l||(l.accept=e+",*/*"),c.setRequestHeader)for(var s in l)c.setRequestHeader(s,l[s]);return null!=e&&c.overrideMimeType&&c.overrideMimeType(e),null!=u&&(c.responseType=u),null!=o&&i.on("error",o).on("load",(function(t){o(null,t)})),a.beforesend.call(i,c),c.send(null==n?null:n),i},i.abort=function(){return c.abort(),i},o.rebind(i,a,"on"),null==n?i:i.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(n))}me.forEach((function(t,e){me.set(t,ae(e))})),o.functor=ge,o.xhr=ve(R),o.dsv=function(t,e){var r=new RegExp('["'+t+"\n]"),n=t.charCodeAt(0);function i(t,r,n){arguments.length<3&&(n=r,r=null);var i=be(t,e,null==r?o:a(r),n);return i.row=function(t){return arguments.length?i.response(null==(r=t)?o:a(t)):r},i}function o(t){return i.parse(t.responseText)}function a(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return r.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return i.parse=function(t,e){var r;return i.parseRows(t,(function(t,n){if(r)return r(t,n-1);var i=function(e){for(var r={},n=t.length,i=0;i=l)return a;if(i)return i=!1,o;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++24?(isFinite(e)&&(clearTimeout(we),we=setTimeout(Me,e)),_e=0):(_e=1,ke(Me))}function Te(){for(var t=Date.now(),e=ye;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Se(){for(var t,e=ye,r=1/0;e;)e.c?(e.t1&&(e=t[o[a-2]],r=t[o[a-1]],n=t[s],(r[0]-e[0])*(n[1]-e[1])-(r[1]-e[1])*(n[0]-e[0])<=0);)--a;o[a++]=s}return o.slice(0,a)}function ze(t,e){return t[0]-e[0]||t[1]-e[1]}o.timer=function(){Ae.apply(this,arguments)},o.timer.flush=function(){Te(),Se()},o.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)},o.geom={},o.geom.hull=function(t){var e=Ce,r=Ee;if(arguments.length)return n(t);function n(t){if(t.length<3)return[];var n,i=ge(e),o=ge(r),a=t.length,s=[],l=[];for(n=0;n=0;--n)f.push(t[s[c[n]][2]]);for(n=+h;nCt)s=s.L;else{if(!((i=o-Xe(s,a))>Ct)){n>-Ct?(e=s.P,r=s):i>-Ct?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=He(t);if(Ne.insert(e,l),e||r){if(e===r)return tr(e),r=He(e.site),Ne.insert(l,r),l.edge=r.edge=nr(e.site,l.site),Qe(e),void Qe(r);if(r){tr(e),tr(r);var c=e.site,u=c.x,h=c.y,d=t.x-u,f=t.y-h,p=r.site,m=p.x-u,g=p.y-h,v=2*(d*g-f*m),b=d*d+f*f,y=m*m+g*g,x={x:(g*b-f*y)/v+u,y:(d*y-m*b)/v+h};ir(r.edge,c,p,x),l.edge=nr(c,t,null,x),r.edge=nr(t,p,null,x),Qe(e),Qe(r)}else l.edge=nr(e.site,l.site)}}function Ze(t,e){var r=t.site,n=r.x,i=r.y,o=i-e;if(!o)return n;var a=t.P;if(!a)return-1/0;var s=(r=a.site).x,l=r.y,c=l-e;if(!c)return s;var u=s-n,h=1/o-1/c,d=u/c;return h?(-d+Math.sqrt(d*d-2*h*(u*u/(-2*c)-l+c/2+i-o/2)))/h+n:(n+s)/2}function Xe(t,e){var r=t.N;if(r)return Ze(r,e);var n=t.site;return n.y===e?n.x:1/0}function $e(t){this.site=t,this.edges=[]}function Je(t,e){return e.angle-t.angle}function Ke(){sr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Qe(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,i=t.site,o=r.site;if(n!==o){var a=i.x,s=i.y,l=n.x-a,c=n.y-s,u=o.x-a,h=2*(l*(g=o.y-s)-c*u);if(!(h>=-Et)){var d=l*l+c*c,f=u*u+g*g,p=(g*d-c*f)/h,m=(l*f-u*d)/h,g=m+s,v=Ge.pop()||new Ke;v.arc=t,v.site=i,v.x=p+a,v.y=g+Math.sqrt(p*p+m*m),v.cy=g,t.circle=v;for(var b=null,y=Be._;y;)if(v.y=s)return;if(d>p){if(o){if(o.y>=c)return}else o={x:g,y:l};r={x:g,y:c}}else{if(o){if(o.y1)if(d>p){if(o){if(o.y>=c)return}else o={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(o){if(o.y=s)return}else o={x:a,y:n*a+i};r={x:s,y:n*s+i}}else{if(o){if(o.x0)){if(e/=d,d<0){if(e0){if(e>h)return;e>u&&(u=e)}if(e=i-l,d||!(e<0)){if(e/=d,d<0){if(e>h)return;e>u&&(u=e)}else if(d>0){if(e0)){if(e/=f,f<0){if(e0){if(e>h)return;e>u&&(u=e)}if(e=o-c,f||!(e<0)){if(e/=f,f<0){if(e>h)return;e>u&&(u=e)}else if(f>0){if(e0&&(t.a={x:l+u*d,y:c+u*f}),h<1&&(t.b={x:l+h*d,y:c+h*f}),t}}}}}),l=a.length;l--;)(!er(e=a[l],t)||!s(e)||w(e.a.x-e.b.x)Ct||w(i-r)>Ct)&&(s.splice(a,0,new or((v=o.site,b=u,y=w(n-h)Ct?{x:h,y:w(e-h)Ct?{x:w(r-p)Ct?{x:d,y:w(e-d)Ct?{x:w(r-f)=r&&c.x<=i&&c.y>=n&&c.y<=a?[[r,a],[i,a],[i,n],[r,n]]:[]).point=t[s]})),e}function s(t){return t.map((function(t,e){return{x:Math.round(n(t,e)/Ct)*Ct,y:Math.round(i(t,e)/Ct)*Ct,i:e}}))}return a.links=function(t){return hr(s(t)).edges.filter((function(t){return t.l&&t.r})).map((function(e){return{source:t[e.l.i],target:t[e.r.i]}}))},a.triangles=function(t){var e=[];return hr(s(t)).cells.forEach((function(r,n){for(var i,o,a,s,l=r.site,c=r.edges.sort(Je),u=-1,h=c.length,d=c[h-1].edge,f=d.l===l?d.r:d.l;++uo&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:yr(r,n)})),o=wr.lastIndex;return om&&(m=l.x),l.y>g&&(g=l.y),c.push(l.x),u.push(l.y);else for(h=0;hm&&(m=y),x>g&&(g=x),c.push(y),u.push(x)}var _=m-f,k=g-p;function A(t,e,r,n,i,o,a,s){if(!isNaN(r)&&!isNaN(n))if(t.leaf){var l=t.x,c=t.y;if(null!=l)if(w(l-r)+w(c-n)<.01)M(t,e,r,n,i,o,a,s);else{var u=t.point;t.x=t.y=t.point=null,M(t,u,l,c,i,o,a,s),M(t,e,r,n,i,o,a,s)}else t.x=r,t.y=n,t.point=e}else M(t,e,r,n,i,o,a,s)}function M(t,e,r,n,i,o,a,s){var l=.5*(i+a),c=.5*(o+s),u=r>=l,h=n>=c,d=h<<1|u;t.leaf=!1,u?i=l:a=l,h?o=c:s=c,A(t=t.nodes[d]||(t.nodes[d]={leaf:!0,nodes:[],point:null,x:null,y:null}),e,r,n,i,o,a,s)}_>k?g=p+_:m=f+k;var T={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){A(T,t,+v(t,++h),+b(t,h),f,p,m,g)}};if(T.visit=function(t){gr(t,T,f,p,m,g)},T.find=function(t){return function(t,e,r,n,i,o,a){var s,l=1/0;return function t(c,u,h,d,f){if(!(u>o||h>a||d=_)<<1|e>=x,k=w+4;w=0&&!(r=o.interpolators[n](t,e)););return r}function Ar(t,e){var r,n=[],i=[],o=t.length,a=e.length,s=Math.min(t.length,e.length);for(r=0;r=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function Dr(t){return 1-Math.cos(t*Dt)}function Ir(t){return Math.pow(2,10*(t-1))}function Rr(t){return 1-Math.sqrt(1-t*t)}function Fr(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Pr(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function Nr(t){var e,r,n,i=[t.a,t.b],o=[t.c,t.d],a=Br(i),s=jr(i,o),l=Br(((e=o)[0]+=(n=-s)*(r=i)[0],e[1]+=n*r[1],e))||0;i[0]*o[1]=0?t.slice(0,r):t,i=r>=0?t.slice(r+1):"in";return n=Tr.get(n)||Mr,i=Sr.get(i)||R,e=i(n.apply(null,a.call(arguments,1))),function(t){return t<=0?0:t>=1?1:e(t)}},o.interpolateHcl=function(t,e){t=o.hcl(t),e=o.hcl(e);var r=t.h,n=t.c,i=t.l,a=e.h-r,s=e.c-n,l=e.l-i;return isNaN(s)&&(s=0,n=isNaN(n)?e.c:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return Zt(r+a*t,n+s*t,i+l*t)+""}},o.interpolateHsl=function(t,e){t=o.hsl(t),e=o.hsl(e);var r=t.h,n=t.s,i=t.l,a=e.h-r,s=e.s-n,l=e.l-i;return isNaN(s)&&(s=0,n=isNaN(n)?e.s:n),isNaN(a)?(a=0,r=isNaN(r)?e.h:r):a>180?a-=360:a<-180&&(a+=360),function(t){return Wt(r+a*t,n+s*t,i+l*t)+""}},o.interpolateLab=function(t,e){t=o.lab(t),e=o.lab(e);var r=t.l,n=t.a,i=t.b,a=e.l-r,s=e.a-n,l=e.b-i;return function(t){return ee(r+a*t,n+s*t,i+l*t)+""}},o.interpolateRound=Pr,o.transform=function(t){var e=l.createElementNS(o.ns.prefix.svg,"g");return(o.transform=function(t){if(null!=t){e.setAttribute("transform",t);var r=e.transform.baseVal.consolidate()}return new Nr(r?r.matrix:Ur)})(t)},Nr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Ur={a:1,b:0,c:0,d:1,e:0,f:0};function Gr(t){return t.length?t.pop()+",":""}function Vr(t,e){var r=[],n=[];return t=o.transform(t),e=o.transform(e),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push("translate(",null,",",null,")");n.push({i:i-4,x:yr(t[0],e[0])},{i:i-2,x:yr(t[1],e[1])})}else(e[0]||e[1])&&r.push("translate("+e+")")}(t.translate,e.translate,r,n),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(Gr(r)+"rotate(",null,")")-2,x:yr(t,e)})):e&&r.push(Gr(r)+"rotate("+e+")")}(t.rotate,e.rotate,r,n),function(t,e,r,n){t!==e?n.push({i:r.push(Gr(r)+"skewX(",null,")")-2,x:yr(t,e)}):e&&r.push(Gr(r)+"skewX("+e+")")}(t.skew,e.skew,r,n),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(Gr(r)+"scale(",null,",",null,")");n.push({i:i-4,x:yr(t[0],e[0])},{i:i-2,x:yr(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(Gr(r)+"scale("+e+")")}(t.scale,e.scale,r,n),t=e=null,function(t){for(var e,i=-1,o=n.length;++i0?r=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:r=0})):e>0&&(l.start({type:"start",alpha:r=e}),t=Ae(s.tick)),s):r},s.start=function(){var t,e,r,o=v.length,l=b.length,u=c[0],p=c[1];for(t=0;t=0;)r.push(i[n])}function on(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(o=t.children)&&(i=o.length))for(var i,o,a=-1;++a=0;)a.push(u=c[l]),u.parent=o,u.depth=o.depth+1;r&&(o.value=0),o.children=c}else r&&(o.value=+r.call(n,o,o.depth)||0),delete o.children;return on(i,(function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)})),s}return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(nn(t,(function(t){t.children&&(t.value=0)})),on(t,(function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)}))),t},n},o.layout.partition=function(){var t=o.layout.hierarchy(),e=[1,1];function r(t,e,n,i){var o=t.children;if(t.x=e,t.y=t.depth*i,t.dx=n,t.dy=i,o&&(a=o.length)){var a,s,l,c=-1;for(n=t.value?n/t.value:0;++cs&&(s=n),a.push(n)}for(r=0;ri&&(n=r,i=e);return n}function yn(t){return t.reduce(xn,0)}function xn(t,e){return t+e[1]}function _n(t,e){return wn(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function wn(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,o=[];++r<=e;)o[r]=i*r+n;return o}function kn(t){return[o.min(t),o.max(t)]}function An(t,e){return t.value-e.value}function Mn(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function Tn(t,e){t._pack_next=e,e._pack_prev=t}function Sn(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function Cn(t){if((e=t.children)&&(l=e.length)){var e,r,n,i,o,a,s,l,c=1/0,u=-1/0,h=1/0,d=-1/0;if(e.forEach(En),(r=e[0]).x=-r.r,r.y=0,y(r),l>1&&((n=e[1]).x=n.r,n.y=0,y(n),l>2))for(On(r,n,i=e[2]),y(i),Mn(r,i),r._pack_prev=i,Mn(i,n),n=r._pack_next,o=3;o0)for(a=-1;++a=h[0]&&l<=h[1]&&((s=c[o.bisect(d,l,1,p)-1]).y+=m,s.push(i[a]));return c}return i.value=function(t){return arguments.length?(e=t,i):e},i.range=function(t){return arguments.length?(r=ge(t),i):r},i.bins=function(t){return arguments.length?(n="number"==typeof t?function(e){return wn(e,t)}:ge(t),i):n},i.frequency=function(e){return arguments.length?(t=!!e,i):t},i},o.layout.pack=function(){var t,e=o.layout.hierarchy().sort(An),r=0,n=[1,1];function i(i,o){var a=e.call(this,i,o),s=a[0],l=n[0],c=n[1],u=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,on(s,(function(t){t.r=+u(t.value)})),on(s,Cn),r){var h=r*(t?1:Math.max(2*s.r/l,2*s.r/c))/2;on(s,(function(t){t.r+=h})),on(s,Cn),on(s,(function(t){t.r-=h}))}return zn(s,l/2,c/2,t?1:1/Math.max(2*s.r/l,2*s.r/c)),a}return i.size=function(t){return arguments.length?(n=t,i):n},i.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,i):t},i.padding=function(t){return arguments.length?(r=+t,i):r},rn(i,e)},o.layout.tree=function(){var t=o.layout.hierarchy().sort(null).value(null),e=Dn,r=[1,1],n=null;function i(i,o){var c=t.call(this,i,o),u=c[0],h=function(t){for(var e,r={A:null,children:[t]},n=[r];null!=(e=n.pop());)for(var i,o=e.children,a=0,s=o.length;af.x&&(f=t),t.depth>p.depth&&(p=t)}));var m=e(d,f)/2-d.x,g=r[0]/(f.x+e(f,d)/2+m),v=r[1]/(p.depth||1);nn(u,(function(t){t.x=(t.x+m)*g,t.y=t.depth*v}))}return c}function a(t){var r=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(r.length){!function(t){for(var e,r=0,n=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var o=(r[0].z+r[r.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,r,n){if(r){for(var i,o=t,a=t,s=r,l=o.parent.children[0],c=o.m,u=a.m,h=s.m,d=l.m;s=Rn(s),o=In(o),s&&o;)l=In(l),(a=Rn(a)).a=t,(i=s.z+h-o.z-c+e(s._,o._))>0&&(Fn(Pn(s,t,n),t,i),c+=i,u+=i),h+=s.m,c+=o.m,d+=l.m,u+=a.m;s&&!Rn(a)&&(a.t=s,a.m+=h-u),o&&!In(l)&&(l.t=o,l.m+=c-d,n=t)}return n}(t,i,t.parent.A||n[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=r[0],t.y=t.depth*r[1]}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(n=null==(r=t)?l:null,i):n?null:r},i.nodeSize=function(t){return arguments.length?(n=null==(r=t)?null:l,i):n?r:null},rn(i,t)},o.layout.cluster=function(){var t=o.layout.hierarchy().sort(null).value(null),e=Dn,r=[1,1],n=!1;function i(i,a){var s,l=t.call(this,i,a),c=l[0],u=0;on(c,(function(t){var r=t.children;r&&r.length?(t.x=function(t){return t.reduce((function(t,e){return t+e.x}),0)/t.length}(r),t.y=function(t){return 1+o.max(t,(function(t){return t.y}))}(r)):(t.x=s?u+=e(t,s):0,t.y=0,s=t)}));var h=Nn(c),d=jn(c),f=h.x-e(h,d)/2,p=d.x+e(d,h)/2;return on(c,n?function(t){t.x=(t.x-c.x)*r[0],t.y=(c.y-t.y)*r[1]}:function(t){t.x=(t.x-f)/(p-f)*r[0],t.y=(1-(c.y?t.y/c.y:1))*r[1]}),l}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(n=null==(r=t),i):n?null:r},i.nodeSize=function(t){return arguments.length?(n=null!=(r=t),i):n?r:null},rn(i,t)},o.layout.treemap=function(){var t,e=o.layout.hierarchy(),r=Math.round,n=[1,1],i=null,a=Bn,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(t,e){for(var r,n,i=-1,o=t.length;++i0;)s.push(r=c[i-1]),s.area+=r.area,"squarify"!==l||(n=f(s,m))<=d?(c.pop(),d=n):(s.area-=s.pop().area,p(s,m,o,!1),m=Math.min(o.dx,o.dy),s.length=s.area=0,d=1/0);s.length&&(p(s,m,o,!0),s.length=s.area=0),e.forEach(h)}}function d(t){var e=t.children;if(e&&e.length){var r,n=a(t),i=e.slice(),o=[];for(u(i,n.dx*n.dy/t.value),o.area=0;r=i.pop();)o.push(r),o.area+=r.area,null!=r.z&&(p(o,r.z?n.dx:n.dy,n,!i.length),o.length=o.area=0);e.forEach(d)}}function f(t,e){for(var r,n=t.area,i=0,o=1/0,a=-1,s=t.length;++ai&&(i=r));return e*=e,(n*=n)?Math.max(e*i*c/n,n/(e*o*c)):1/0}function p(t,e,n,i){var o,a=-1,s=t.length,l=n.x,c=n.y,u=e?r(t.area/e):0;if(e==n.dx){for((i||u>n.dy)&&(u=n.dy);++an.dx)&&(u=n.dx);++a1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=o.random.normal.apply(o,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=o.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,r=0;r2?Zn:Hn,l=n?Wr:Hr;return i=a(t,e,l,r),o=a(e,t,l,kr),s}function s(t){return i(t)}return s.invert=function(t){return o(t)},s.domain=function(e){return arguments.length?(t=e.map(Number),a()):t},s.range=function(t){return arguments.length?(e=t,a()):e},s.rangeRound=function(t){return s.range(t).interpolate(Pr)},s.clamp=function(t){return arguments.length?(n=t,a()):n},s.interpolate=function(t){return arguments.length?(r=t,a()):r},s.ticks=function(e){return Qn(t,e)},s.tickFormat=function(e,r){return d3_scale_linearTickFormat(t,e,r)},s.nice=function(e){return Jn(t,e),a()},s.copy=function(){return Xn(t,e,r,n)},a()}function $n(t,e){return o.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Jn(t,e){return Wn(t,qn(Kn(t,e)[2])),Wn(t,qn(Kn(t,e)[2])),t}function Kn(t,e){null==e&&(e=10);var r=Gn(t),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),o=e/n*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function Qn(t,e){return o.range.apply(o,Kn(t,e))}function ti(t,e,r,n){function i(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function o(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function a(e){return t(i(e))}return a.invert=function(e){return o(t.invert(e))},a.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((n=e.map(Number)).map(i)),a):n},a.base=function(r){return arguments.length?(e=+r,t.domain(n.map(i)),a):e},a.nice=function(){var e=Wn(n.map(i),r?Math:ei);return t.domain(e),n=e.map(o),a},a.ticks=function(){var t=Gn(n),a=[],s=t[0],l=t[1],c=Math.floor(i(s)),u=Math.ceil(i(l)),h=e%1?2:e;if(isFinite(u-c)){if(r){for(;c0;d--)a.push(o(c)*d);for(c=0;a[c]l;u--);a=a.slice(c,u)}return a},a.copy=function(){return ti(t.copy(),e,r,n)},$n(a,t)}o.scale.linear=function(){return Xn([0,1],[0,1],kr,!1)},o.scale.log=function(){return ti(o.scale.linear().domain([0,1]),10,!0,[1,10])};var ei={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function ri(t,e,r){var n=ni(e),i=ni(1/e);function o(e){return t(n(e))}return o.invert=function(e){return i(t.invert(e))},o.domain=function(e){return arguments.length?(t.domain((r=e.map(Number)).map(n)),o):r},o.ticks=function(t){return Qn(r,t)},o.tickFormat=function(t,e){return d3_scale_linearTickFormat(r,t,e)},o.nice=function(t){return o.domain(Jn(r,t))},o.exponent=function(a){return arguments.length?(n=ni(e=a),i=ni(1/e),t.domain(r.map(n)),o):e},o.copy=function(){return ri(t.copy(),e,r)},$n(o,t)}function ni(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function ii(t,e){var r,n,i;function a(i){return n[((r.get(i)||("range"===e.t?r.set(i,t.push(i)):NaN))-1)%n.length]}function s(e,r){return o.range(t.length).map((function(t){return e+r*t}))}return a.domain=function(n){if(!arguments.length)return t;t=[],r=new A;for(var i,o=-1,s=n.length;++o0?r[n-1]:t[0],nh?0:1;if(c=Ot)return l(c,f)+(s?l(s,1-f):"")+"Z";var p,m,g,v,b,y,x,_,w,k,A,M,T=0,S=0,C=[];if((v=(+a.apply(this,arguments)||0)/2)&&(g=n===pi?Math.sqrt(s*s+c*c):+n.apply(this,arguments),f||(S*=-1),c&&(S=Ft(g/c*Math.sin(v))),s&&(T=Ft(g/s*Math.sin(v)))),c){b=c*Math.cos(u+S),y=c*Math.sin(u+S),x=c*Math.cos(h-S),_=c*Math.sin(h-S);var E=Math.abs(h-u-2*S)<=Lt?0:1;if(S&&xi(b,y,x,_)===f^E){var L=(u+h)/2;b=c*Math.cos(L),y=c*Math.sin(L),x=_=null}}else b=y=0;if(s){w=s*Math.cos(h-T),k=s*Math.sin(h-T),A=s*Math.cos(u+T),M=s*Math.sin(u+T);var z=Math.abs(u-h+2*T)<=Lt?0:1;if(T&&xi(w,k,A,M)===1-f^z){var O=(u+h)/2;w=s*Math.cos(O),k=s*Math.sin(O),A=M=null}}else w=k=0;if(d>Ct&&(p=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){m=s0?0:1}function _i(t,e,r,n,i){var o=t[0]-e[0],a=t[1]-e[1],s=(i?n:-n)/Math.sqrt(o*o+a*a),l=s*a,c=-s*o,u=t[0]+l,h=t[1]+c,d=e[0]+l,f=e[1]+c,p=(u+d)/2,m=(h+f)/2,g=d-u,v=f-h,b=g*g+v*v,y=r-n,x=u*f-d*h,_=(v<0?-1:1)*Math.sqrt(Math.max(0,y*y*b-x*x)),w=(x*v-g*_)/b,k=(-x*g-v*_)/b,A=(x*v+g*_)/b,M=(-x*g+v*_)/b,T=w-p,S=k-m,C=A-p,E=M-m;return T*T+S*S>C*C+E*E&&(w=A,k=M),[[w-l,k-c],[w*r/y,k*r/y]]}function wi(){return!0}function ki(t){var e=Ce,r=Ee,n=wi,i=Mi,o=i.key,a=.7;function s(o){var s,l=[],c=[],u=-1,h=o.length,d=ge(e),f=ge(r);function p(){l.push("M",i(t(c),a))}for(;++u1&&i.push("H",n[0]),i.join("")},"step-before":Si,"step-after":Ci,basis:zi,"basis-open":function(t){if(t.length<4)return Mi(t);for(var e,r=[],n=-1,i=t.length,o=[0],a=[0];++n<3;)e=t[n],o.push(e[0]),a.push(e[1]);for(r.push(Oi(Ri,o)+","+Oi(Ri,a)),--n;++n9&&(i=3*e/Math.sqrt(i),a[s]=i*r,a[s+1]=i*n);for(s=-1;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}(t))}});function Mi(t){return t.length>1?t.join("L"):t+"Z"}function Ti(t){return t.join("L")+"Z"}function Si(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1){s=e[1],o=t[l],l++,n+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var c=2;cLt)+",1 "+e}function l(t,e,r,n){return"Q 0,0 "+n}return o.radius=function(t){return arguments.length?(r=ge(t),o):r},o.source=function(e){return arguments.length?(t=ge(e),o):t},o.target=function(t){return arguments.length?(e=ge(t),o):e},o.startAngle=function(t){return arguments.length?(n=ge(t),o):n},o.endAngle=function(t){return arguments.length?(i=ge(t),o):i},o},o.svg.diagonal=function(){var t=Bi,e=Ui,r=Vi;function n(n,i){var o=t.call(this,n,i),a=e.call(this,n,i),s=(o.y+a.y)/2,l=[o,{x:o.x,y:s},{x:a.x,y:s},a];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(e){return arguments.length?(t=ge(e),n):t},n.target=function(t){return arguments.length?(e=ge(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},o.svg.diagonal.radial=function(){var t=o.svg.diagonal(),e=Vi,r=t.projection;return t.projection=function(t){return arguments.length?r(function(t){return function(){var e=t.apply(this,arguments),r=e[0],n=e[1]-Dt;return[r*Math.cos(n),r*Math.sin(n)]}}(e=t)):e},t},o.svg.symbol=function(){var t=Wi,e=Hi;function r(r,n){return(Yi.get(t.call(this,r,n))||qi)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=ge(e),r):t},r.size=function(t){return arguments.length?(e=ge(t),r):e},r};var Yi=o.map({circle:qi,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Xi)),r=e*Xi;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Zi),r=e*Zi/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Zi),r=e*Zi/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});o.svg.symbolTypes=Yi.keys();var Zi=Math.sqrt(3),Xi=Math.tan(30*It);J.transition=function(t){for(var e,r,n=Qi||++ro,i=oo(t),o=[],a=to||{time:Date.now(),ease:Or,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--d].call(t,a);if(o>=1)return h.event&&h.event.end.call(t,t.__data__,e),--u.count?delete u[n]:delete t[r],1}h||(o=i.time,a=Ae((function(t){var e=h.delay;if(a.t=e+o,e<=t)return d(t-e);a.c=d}),0,o),h=u[n]={tween:new A,time:o,timer:a,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++u.count)}eo.call=J.call,eo.empty=J.empty,eo.node=J.node,eo.size=J.size,o.transition=function(t,e){return t&&t.transition?Qi?t.transition(e):t:o.selection().transition(t)},o.transition.prototype=eo,eo.select=function(t){var e,r,n,i=this.id,o=this.namespace,a=[];t=K(t);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",a[1]-a[0])}function m(t){t.select(".extent").attr("y",s[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function g(){var h,g,v=this,b=o.select(o.event.target),y=r.of(v,arguments),x=o.select(v),_=b.datum(),w=!/^(n|s)$/.test(_)&&n,k=!/^(e|w)$/.test(_)&&i,A=b.classed("extent"),M=At(v),T=o.mouse(v),S=o.select(u(v)).on("keydown.brush",(function(){32==o.event.keyCode&&(A||(h=null,T[0]-=a[1],T[1]-=s[1],A=2),G())})).on("keyup.brush",(function(){32==o.event.keyCode&&2==A&&(T[0]+=a[1],T[1]+=s[1],A=0,G())}));if(o.event.changedTouches?S.on("touchmove.brush",L).on("touchend.brush",O):S.on("mousemove.brush",L).on("mouseup.brush",O),x.interrupt().selectAll("*").interrupt(),A)T[0]=a[0]-T[0],T[1]=s[0]-T[1];else if(_){var C=+/w$/.test(_),E=+/^n/.test(_);g=[a[1-C]-T[0],s[1-E]-T[1]],T[0]=a[C],T[1]=s[E]}else o.event.altKey&&(h=T.slice());function L(){var t=o.mouse(v),e=!1;g&&(t[0]+=g[0],t[1]+=g[1]),A||(o.event.altKey?(h||(h=[(a[0]+a[1])/2,(s[0]+s[1])/2]),T[0]=a[+(t[0]{"use strict";t.exports=r(48777)},48777:(t,e,r)=>{"use strict";var n=r(72478),i=r(90897),o=r(94698),a=r(25359),s=r(9994),l=r(7999),c=r(97e3),u=r(23754),h=r(22366),d=r(54387);function f(t,e){for(var r=e[0],n=e[1],o=1/(e[2]-r),a=1/(e[3]-n),s=new Array(t.length),l=0,c=t.length/2;l>>1;e.dtype||(e.dtype="array"),"string"==typeof e.dtype?p=new(h(e.dtype))(g):e.dtype&&(p=e.dtype,Array.isArray(p)&&(p.length=g));for(var v=0;vr||s>1073741824){for(var d=0;dr+i||T>n+i||S=L||a===s)){var l=b[o];void 0===s&&(s=l.length);for(var c=a;c=g&&h<=w&&d>=v&&d<=k&&z.push(u)}var f=y[o],p=f[4*a+0],m=f[4*a+1],x=f[4*a+2],_=f[4*a+3],A=function(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}(f,a+1),C=.5*i,O=o+1;e(r,n,C,O,p,m||x||_||A),e(r,n+C,C,O,m,x||_||A),e(r+C,n,C,O,x,_||A),e(r+C,n+C,C,O,_,A)}}(0,0,1,0,0,1),z},p;function C(t,e,r){for(var n=1,i=.5,o=.5,a=.5,s=0;s{t.exports=function(t){var e=0,r=0,n=0,i=0;return t.map((function(t){var o=(t=t.slice())[0],a=o.toUpperCase();if(o!=a)switch(t[0]=a,o){case"a":t[6]+=n,t[7]+=i;break;case"v":t[1]+=i;break;case"h":t[1]+=n;break;default:for(var s=1;s{"use strict";t.exports=function(t,e){if(!t||null==t.length)throw Error("Argument should be an array");e=null==e?1:Math.floor(e);for(var r=Array(2*e),n=0;ni&&(i=t[a]),t[a]{"use strict";t.exports=function(t,e,r){if("function"==typeof Array.prototype.findIndex)return t.findIndex(e,r);if("function"!=typeof e)throw new TypeError("predicate must be a function");var n=Object(t),i=n.length;if(0===i)return-1;for(var o=0;o{"use strict";var n=r(25359);t.exports=function(t,e,r){if(!t||null==t.length)throw Error("Argument should be an array");null==e&&(e=1),null==r&&(r=n(t,e));for(var i=0;i{"use strict";var n=r(39807);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){for(var r=0;r1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i{"use strict";var n=r(39807);function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;et.length)&&(r=t.length),t.substring(r-e.length,r)===e}var y="",x="",_="",w="",k={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function A(t){var e=Object.keys(t),r=Object.create(Object.getPrototypeOf(t));return e.forEach((function(e){r[e]=t[e]})),Object.defineProperty(r,"message",{value:t.message}),r}function M(t){return g(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var T=function(t,e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(T,t);var r,i,s,u,h=(r=T,i=d(),function(){var t,e=p(r);if(i){var n=p(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return l(this,t)});function T(t){var e;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,T),"object"!==m(t)||null===t)throw new v("options","Object",t);var r=t.message,i=t.operator,o=t.stackStartFn,a=t.actual,s=t.expected,u=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)e=h.call(this,String(r));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(y="",x="",w="",_=""):(y="",x="",w="",_="")),"object"===m(a)&&null!==a&&"object"===m(s)&&null!==s&&"stack"in a&&a instanceof Error&&"stack"in s&&s instanceof Error&&(a=A(a),s=A(s)),"deepStrictEqual"===i||"strictEqual"===i)e=h.call(this,function(t,e,r){var i="",o="",a=0,s="",l=!1,c=M(t),u=c.split("\n"),h=M(e).split("\n"),d=0,f="";if("strictEqual"===r&&"object"===m(t)&&"object"===m(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===u.length&&1===h.length&&u[0]!==h[0]){var p=u[0].length+h[0].length;if(p<=10){if(!("object"===m(t)&&null!==t||"object"===m(e)&&null!==e||0===t&&0===e))return"".concat(k[r],"\n\n")+"".concat(u[0]," !== ").concat(h[0],"\n")}else if("strictEqualObject"!==r&&p<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;u[0][d]===h[0][d];)d++;d>2&&(f="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var r=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+t.substring(0,r-t.length)}(" ",d),"^"),d=0)}}for(var g=u[u.length-1],v=h[h.length-1];g===v&&(d++<2?s="\n ".concat(g).concat(s):i=g,u.pop(),h.pop(),0!==u.length&&0!==h.length);)g=u[u.length-1],v=h[h.length-1];var A=Math.max(u.length,h.length);if(0===A){var T=c.split("\n");if(T.length>30)for(T[26]="".concat(y,"...").concat(w);T.length>27;)T.pop();return"".concat(k.notIdentical,"\n\n").concat(T.join("\n"),"\n")}d>3&&(s="\n".concat(y,"...").concat(w).concat(s),l=!0),""!==i&&(s="\n ".concat(i).concat(s),i="");var S=0,C=k[r]+"\n".concat(x,"+ actual").concat(w," ").concat(_,"- expected").concat(w),E=" ".concat(y,"...").concat(w," Lines skipped");for(d=0;d1&&d>2&&(L>4?(o+="\n".concat(y,"...").concat(w),l=!0):L>3&&(o+="\n ".concat(h[d-2]),S++),o+="\n ".concat(h[d-1]),S++),a=d,i+="\n".concat(_,"-").concat(w," ").concat(h[d]),S++;else if(h.length1&&d>2&&(L>4?(o+="\n".concat(y,"...").concat(w),l=!0):L>3&&(o+="\n ".concat(u[d-2]),S++),o+="\n ".concat(u[d-1]),S++),a=d,o+="\n".concat(x,"+").concat(w," ").concat(u[d]),S++;else{var z=h[d],O=u[d],D=O!==z&&(!b(O,",")||O.slice(0,-1)!==z);D&&b(z,",")&&z.slice(0,-1)===O&&(D=!1,O+=","),D?(L>1&&d>2&&(L>4?(o+="\n".concat(y,"...").concat(w),l=!0):L>3&&(o+="\n ".concat(u[d-2]),S++),o+="\n ".concat(u[d-1]),S++),a=d,o+="\n".concat(x,"+").concat(w," ").concat(O),i+="\n".concat(_,"-").concat(w," ").concat(z),S+=2):(o+=i,i="",1!==L&&0!==d||(o+="\n ".concat(O),S++))}if(S>20&&d30)for(f[26]="".concat(y,"...").concat(w);f.length>27;)f.pop();e=1===f.length?h.call(this,"".concat(d," ").concat(f[0])):h.call(this,"".concat(d,"\n\n").concat(f.join("\n"),"\n"))}else{var p=M(a),g="",S=k[i];"notDeepEqual"===i||"notEqual"===i?(p="".concat(k[i],"\n\n").concat(p)).length>1024&&(p="".concat(p.slice(0,1021),"...")):(g="".concat(M(s)),p.length>512&&(p="".concat(p.slice(0,509),"...")),g.length>512&&(g="".concat(g.slice(0,509),"...")),"deepEqual"===i||"equal"===i?p="".concat(S,"\n\n").concat(p,"\n\nshould equal\n\n"):g=" ".concat(i," ").concat(g)),e=h.call(this,"".concat(p).concat(g))}return Error.stackTraceLimit=u,e.generatedMessage=!r,Object.defineProperty(c(e),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),e.code="ERR_ASSERTION",e.actual=a,e.expected=s,e.operator=i,Error.captureStackTrace&&Error.captureStackTrace(c(e),o),e.stack,e.name="AssertionError",l(e)}return s=T,(u=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:e,value:function(t,e){return g(this,o(o({},e),{},{customInspect:!1,depth:0}))}}])&&a(s.prototype,u),Object.defineProperty(s,"prototype",{writable:!1}),T}(u(Error),g.custom);t.exports=T},81146:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},o(t)}var a,s,l={};function c(t,e,r){r||(r=Error);var a=function(r){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&i(t,e)}(u,r);var a,s,l,c=(s=u,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=o(s);if(l){var r=o(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(r,n,i){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),o=c.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i)),o.code=t,o}return a=u,Object.defineProperty(a,"prototype",{writable:!1}),a}(r);l[t]=a}function u(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",(function(t,e,i){var o,s,l,c,h;if(void 0===a&&(a=r(34961)),a("string"==typeof t,"'name' must be a string"),"string"==typeof e&&(s="not ",e.substr(0,4)===s)?(o="must not be",e=e.replace(/^not /,"")):o="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-9,r)===e}(t," argument"))l="The ".concat(t," ").concat(o," ").concat(u(e,"type"));else{var d=("number"!=typeof h&&(h=0),h+1>(c=t).length||-1===c.indexOf(".",h)?"argument":"property");l='The "'.concat(t,'" ').concat(d," ").concat(o," ").concat(u(e,"type"))}return l+". Received type ".concat(n(i))}),TypeError),c("ERR_INVALID_ARG_VALUE",(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=r(11276));var i=s.inspect(e);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),c("ERR_INVALID_RETURN_VALUE",(function(t,e,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(t,' to be returned from the "').concat(e,'"')+" function but got ".concat(i,".")}),TypeError),c("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),n=0;n0,"At least one arg needs to be specified");var i="The ",o=e.length;switch(e=e.map((function(t){return'"'.concat(t,'"')})),o){case 1:i+="".concat(e[0]," argument");break;case 2:i+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:i+=e.slice(0,o-1).join(", "),i+=", and ".concat(e[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),t.exports.codes=l},88884:(t,e,r)=>{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r10)return!0;for(var e=0;e57)return!0}return 10===t.length&&t>=Math.pow(2,32)}function D(t){return Object.keys(t).filter(O).concat(u(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}function I(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i{"use strict";r.r(e),r.d(e,{decode:()=>s,encode:()=>a});for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="undefined"==typeof Uint8Array?[]:new Uint8Array(256),o=0;o<64;o++)i[n.charCodeAt(o)]=o;var a=function(t){var e,r=new Uint8Array(t),i=r.length,o="";for(e=0;e>2],o+=n[(3&r[e])<<4|r[e+1]>>4],o+=n[(15&r[e+1])<<2|r[e+2]>>6],o+=n[63&r[e+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},s=function(t){var e,r,n,o,a,s=.75*t.length,l=t.length,c=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var u=new ArrayBuffer(s),h=new Uint8Array(u);for(e=0;e>4,h[c++]=(15&n)<<4|o>>2,h[c++]=(3&o)<<6|63&a;return u}},17507:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=s(t),a=o[0],l=o[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,a,l)),u=0,h=l>0?a-4:a;for(r=0;r>16&255,c[u++]=e>>8&255,c[u++]=255&e;return 2===l&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[u++]=255&e),1===l&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[u++]=e>>8&255,c[u++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,n){for(var i,o,a=[],s=e;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},72478:t=>{"use strict";function e(t,e,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)>=0?(o=a,i=a-1):n=a+1}return o}function r(t,e,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)>0?(o=a,i=a-1):n=a+1}return o}function n(t,e,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)<0?(o=a,n=a+1):i=a-1}return o}function i(t,e,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)<=0?(o=a,n=a+1):i=a-1}return o}function o(t,e,r,n,i){for(;n<=i;){var o=n+i>>>1,a=t[o],s=void 0!==r?r(a,e):a-e;if(0===s)return o;s<=0?n=o+1:i=o-1}return-1}function a(t,e,r,n,i,o){return"function"==typeof r?o(t,e,r,void 0===n?0:0|n,void 0===i?t.length-1:0|i):o(t,e,void 0,void 0===r?0:0|r,void 0===n?t.length-1:0|n)}t.exports={ge:function(t,r,n,i,o){return a(t,r,n,i,o,e)},gt:function(t,e,n,i,o){return a(t,e,n,i,o,r)},lt:function(t,e,r,i,o){return a(t,e,r,i,o,n)},le:function(t,e,r,n,o){return a(t,e,r,n,o,i)},eq:function(t,e,r,n,i){return a(t,e,r,n,i,o)}}},88828:(t,e)=>{"use strict";function r(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},25875:t=>{"use strict";t.exports=function(t,n){n||(n={});var i,o,a,s,l,c,u,h,d,f,p,m=null==n.cutoff?.25:n.cutoff,g=null==n.radius?8:n.radius,v=n.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!n.width||!n.height)throw Error("For raw data width and height should be provided by options");i=n.width,o=n.height,s=t,c=n.stride?n.stride:Math.floor(t.length/i/o)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(u=(h=t).getContext("2d"),i=h.width,o=h.height,s=(d=u.getImageData(0,0,i,o)).data,c=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(u=t,i=(h=t.canvas).width,o=h.height,s=(d=u.getImageData(0,0,i,o)).data,c=4):window.ImageData&&t instanceof window.ImageData&&(d=t,i=t.width,o=t.height,s=d.data,c=4);if(a=Math.max(i,o),window.Uint8ClampedArray&&s instanceof window.Uint8ClampedArray||window.Uint8Array&&s instanceof window.Uint8Array)for(l=s,s=Array(i*o),f=0,p=Math.floor(l.length/c);f{"use strict";const n=r(17507),i=r(23778),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=l,e.IS=50;const a=2147483647;function s(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return c(t,e,r)}function c(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|m(t,e);let n=s(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(X(t,Uint8Array)){const e=new Uint8Array(t);return f(e.buffer,e.byteOffset,e.byteLength)}return d(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(X(t,ArrayBuffer)||t&&X(t.buffer,ArrayBuffer))return f(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(X(t,SharedArrayBuffer)||t&&X(t.buffer,SharedArrayBuffer)))return f(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return l.from(n,e,r);const i=function(t){if(l.isBuffer(t)){const e=0|p(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||$(t.length)?s(0):d(t):"Buffer"===t.type&&Array.isArray(t.data)?d(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return u(t),s(t<0?0:0|p(t))}function d(t){const e=t.length<0?0:0|p(t.length),r=s(e);for(let n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function m(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||X(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(i)return n?-1:q(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return C(this,e,r);case"latin1":case"binary":return E(this,e,r);case"base64":return M(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),$(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=l.from(e,n)),l.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){let o,a=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let n=-1;for(o=r;os&&(r=s-l),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=e.length;let a;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function M(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+a<=r){let r,n,s,l;switch(a){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(l=(31&e)<<6|63&r,l>127&&(o=l));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(l=(15&e)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:r=t[i+1],n=t[i+2],s=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(l=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&s,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(t){const e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nn.length?(l.isBuffer(e)||(e=l.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!l.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;er&&(t+=" ... "),""},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(t,e,r,n,i){if(X(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0);const s=Math.min(o,a),c=this.slice(n,i),u=t.slice(e,r);for(let t=0;t>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return x(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":case"latin1":case"binary":return w(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function C(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;in)&&(r=n);let i="";for(let n=e;nr)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,r,n,i,o){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function I(t,e,r,n,i){G(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function R(t,e,r,n,i){G(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function F(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(t,e,r,n,o){return e=+e,r>>>=0,o||F(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function N(t,e,r,n,o){return e=+e,r>>>=0,o||F(t,0,r,8),i.write(t,e,r,n,52,8),r+8}l.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],i=1,o=0;for(;++o>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readBigUInt64LE=K((function(t){V(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*e)),n},l.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},l.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readBigInt64LE=K((function(t){V(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<>>=0,e||O(t,4,this.length),i.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||D(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,n||D(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigUInt64LE=K((function(t,e=0){return I(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=K((function(t,e=0){return R(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);D(this,t,e,r,n-1,-n)}let i=0,o=1,a=0;for(this[e]=255&t;++i>>=0,!n){const n=Math.pow(2,8*r-1);D(this,t,e,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+r},l.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigInt64LE=K((function(t,e=0){return I(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=K((function(t,e=0){return R(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},l.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},l.prototype.writeDoubleLE=function(t,e,r){return N(this,t,e,!0,r)},l.prototype.writeDoubleBE=function(t,e,r){return N(this,t,e,!1,r)},l.prototype.copy=function(t,e,r,n){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function G(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new j.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){V(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||H(e,t.length-(r+1))}(n,i,o)}function V(t,e){if("number"!=typeof t)throw new j.ERR_INVALID_ARG_TYPE(e,"number",t)}function H(t,e,r){if(Math.floor(t)!==t)throw V(t,r),new j.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}B("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),B("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),B("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=U(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=U(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function q(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let a=0;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Y(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Z(t,e,r,n){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function X(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function $(t){return t!=t}const J=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function K(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},24310:(t,e,r)=>{"use strict";var n=r(59412),i=r(61398),o=i(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&o(t,".prototype.")>-1?i(r):r}},61398:(t,e,r)=>{"use strict";var n=r(35366),i=r(59412),o=r(86928),a=r(48744),s=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),c=i("%Reflect.apply%",!0)||n.call(l,s),u=r(38232),h=i("%Math.max%");t.exports=function(t){if("function"!=typeof t)throw new a("a function is required");var e=c(n,l,arguments);return o(e,1+h(0,t.length-(arguments.length-1)),!0)};var d=function(){return c(n,s,arguments)};u?u(t.exports,"apply",{value:d}):t.exports.apply=d},90897:t=>{t.exports=function(t,e,r){return er?r:t:te?e:t}},92173:(t,e,r)=>{"use strict";var n=r(90897);function i(t,e){null==e&&(e=!0);var r=t[0],i=t[1],o=t[2],a=t[3];return null==a&&(a=e?1:255),e&&(r*=255,i*=255,o*=255,a*=255),16777216*(r=255&n(r,0,255))+((i=255&n(i,0,255))<<16)+((o=255&n(o,0,255))<<8)+(255&n(a,0,255))}t.exports=i,t.exports.to=i,t.exports.from=function(t,e){var r=(t=+t)>>>24,n=(16711680&t)>>>16,i=(65280&t)>>>8,o=255&t;return!1===e?[r,n,i,o]:[r/255,n/255,i/255,o/255]}},22319:t=>{"use strict";t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},34463:(t,e,r)=>{"use strict";var n=r(31562),i=r(90897),o=r(22366);t.exports=function(t,e){"float"!==e&&e||(e="array"),"uint"===e&&(e="uint8"),"uint_clamped"===e&&(e="uint8_clamped");var r=new(o(e))(4),a="uint8"!==e&&"uint8_clamped"!==e;return t.length&&"string"!=typeof t||((t=n(t))[0]/=255,t[1]/=255,t[2]/=255),function(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||!!(Array.isArray(t)&&(t[0]>1||0===t[0])&&(t[1]>1||0===t[1])&&(t[2]>1||0===t[2])&&(!t[3]||t[3]>1))}(t)?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:255,a&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(a?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:1):(r[0]=i(Math.floor(255*t[0]),0,255),r[1]=i(Math.floor(255*t[1]),0,255),r[2]=i(Math.floor(255*t[2]),0,255),r[3]=null==t[3]?255:i(Math.floor(255*t[3]),0,255)),r)}},11211:(t,e,r)=>{"use strict";var n=r(22319);t.exports=function(t){var e,r,o=[],a=1;if("string"==typeof t)if(t=t.toLowerCase(),n[t])o=n[t].slice(),r="rgb";else if("transparent"===t)a=0,r="rgb",o=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var s=t.slice(1);a=1,(u=s.length)<=4?(o=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===u&&(a=parseInt(s[3]+s[3],16)/255)):(o=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===u&&(a=parseInt(s[6]+s[7],16)/255)),o[0]||(o[0]=0),o[1]||(o[1]=0),o[2]||(o[2]=0),r="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var l=e[1],c="rgb"===l;r=s=l.replace(/a$/,"");var u="cmyk"===s?4:"gray"===s?1:3;o=e[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(t,e){if(/%$/.test(t))return e===u?parseFloat(t)/100:"rgb"===s?255*parseFloat(t)/100:parseFloat(t);if("h"===s[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==i[t])return i[t]}return parseFloat(t)})),l===s&&o.push(1),a=c||void 0===o[u]?1:o[u],o=o.slice(0,u)}else t.length>10&&/[0-9](?:\s|\/)/.test(t)&&(o=t.match(/([0-9]+)/g).map((function(t){return parseFloat(t)})),r=t.match(/([a-z])/gi).join("").toLowerCase());else isNaN(t)?Array.isArray(t)||t.length?(o=[t[0],t[1],t[2]],r="rgb",a=4===t.length?t[3]:1):t instanceof Object&&(null!=t.r||null!=t.red||null!=t.R?(r="rgb",o=[t.r||t.red||t.R||0,t.g||t.green||t.G||0,t.b||t.blue||t.B||0]):(r="hsl",o=[t.h||t.hue||t.H||0,t.s||t.saturation||t.S||0,t.l||t.lightness||t.L||t.b||t.brightness]),a=t.a||t.alpha||t.opacity||1,null!=t.opacity&&(a/=100)):(r="rgb",o=[t>>>16,(65280&t)>>>8,255&t]);return{space:r,values:o,alpha:a}};var i={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},31562:(t,e,r)=>{"use strict";var n=r(11211),i=r(31497),o=r(90897);t.exports=function(t){var e,r=n(t);return r.space?((e=Array(3))[0]=o(r.values[0],0,255),e[1]=o(r.values[1],0,255),e[2]=o(r.values[2],0,255),"h"===r.space[0]&&(e=i.rgb(e)),e.push(o(r.alpha,0,1)),e):[]}},31497:(t,e,r)=>{"use strict";var n=r(65837);t.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e,r,n,i,o,a=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[o=255*l,o,o];e=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(n=a+1/3*-(c-1))<0?n++:n>1&&n--,o=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[c]=255*o;return i}},n.hsl=function(t){var e,r,n=t[0]/255,i=t[1]/255,o=t[2]/255,a=Math.min(n,i,o),s=Math.max(n,i,o),l=s-a;return s===a?e=0:n===s?e=(i-o)/l:i===s?e=2+(o-n)/l:o===s&&(e=4+(n-i)/l),(e=Math.min(60*e,360))<0&&(e+=360),r=(a+s)/2,[e,100*(s===a?0:r<=.5?l/(s+a):l/(2-s-a)),100*r]}},65837:t=>{"use strict";t.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},86643:()=>{!function(){"use strict";if("undefined"!=typeof document&&!("adoptedStyleSheets"in document)){var t="ShadyCSS"in window&&!ShadyCSS.nativeShadow,e=document.implementation.createHTMLDocument(""),r=new WeakMap,n="object"==typeof DOMException?Error:DOMException,i=Object.defineProperty,o=Array.prototype.forEach,a=/@import.+?;?$/gm,s=CSSStyleSheet.prototype;s.replace=function(){return Promise.reject(new n("Can't call replace on non-constructed CSSStyleSheets."))},s.replaceSync=function(){throw new n("Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.")};var l=new WeakMap,c=new WeakMap,u=new WeakMap,h=new WeakMap,d=S.prototype;d.replace=function(t){try{return this.replaceSync(t),Promise.resolve(this)}catch(t){return Promise.reject(t)}},d.replaceSync=function(t){if(T(this),"string"==typeof t){var e=this;l.get(e).textContent=function(t){var e=t.replace(a,"");return e!==t&&console.warn("@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418"),e.trim()}(t),h.set(e,[]),c.get(e).forEach((function(t){t.isConnected()&&M(e,A(e,t))}))}},i(d,"cssRules",{configurable:!0,enumerable:!0,get:function(){return T(this),l.get(this).sheet.cssRules}}),i(d,"media",{configurable:!0,enumerable:!0,get:function(){return T(this),l.get(this).sheet.media}}),["addRule","deleteRule","insertRule","removeRule"].forEach((function(t){d[t]=function(){var e=this;T(e);var r=arguments;h.get(e).push({method:t,args:r}),c.get(e).forEach((function(n){if(n.isConnected()){var i=A(e,n).sheet;i[t].apply(i,r)}}));var n=l.get(e).sheet;return n[t].apply(n,r)}})),i(S,Symbol.hasInstance,{configurable:!0,value:w});var f={childList:!0,subtree:!0},p=new WeakMap,m=new WeakMap,g=new WeakMap,v=new WeakMap;if(D.prototype={isConnected:function(){var t=m.get(this);return t instanceof Document?"loading"!==t.readyState:function(t){return"isConnected"in t?t.isConnected:document.contains(t)}(t.host)},connect:function(){var t=z(this);v.get(this).observe(t,f),g.get(this).length>0&&O(this),L(t,(function(t){C(t).connect()}))},disconnect:function(){v.get(this).disconnect()},update:function(t){var e=this,r=m.get(e)===document?"Document":"ShadowRoot";if(!Array.isArray(t))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+r+": Iterator getter is not callable.");if(!t.every(w))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+r+": Failed to convert value to 'CSSStyleSheet'");if(t.some(k))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+r+": Can't adopt non-constructed stylesheets");e.sheets=t;var n,i,o=g.get(e),a=(n=t).filter((function(t,e){return n.indexOf(t)===e}));(i=a,o.filter((function(t){return-1===i.indexOf(t)}))).forEach((function(t){var r;(r=A(t,e)).parentNode.removeChild(r),function(t,e){u.get(t).delete(e),c.set(t,c.get(t).filter((function(t){return t!==e})))}(t,e)})),g.set(e,a),e.isConnected()&&a.length>0&&O(e)}},window.CSSStyleSheet=S,E(Document),"ShadowRoot"in window){E(ShadowRoot);var b=Element.prototype,y=b.attachShadow;b.attachShadow=function(t){var e=y.call(this,t);return"closed"===t.mode&&r.set(this,e),e}}var x=C(document);x.isConnected()?x.connect():document.addEventListener("DOMContentLoaded",x.connect.bind(x))}function _(t){return t.shadowRoot||r.get(t)}function w(t){return"object"==typeof t&&(d.isPrototypeOf(t)||s.isPrototypeOf(t))}function k(t){return"object"==typeof t&&s.isPrototypeOf(t)}function A(t,e){return u.get(t).get(e)}function M(t,e){requestAnimationFrame((function(){e.textContent=l.get(t).textContent,h.get(t).forEach((function(t){return e.sheet[t.method].apply(e.sheet,t.args)}))}))}function T(t){if(!l.has(t))throw new TypeError("Illegal invocation")}function S(){var t=this,r=document.createElement("style");e.body.appendChild(r),l.set(t,r),c.set(t,[]),u.set(t,new WeakMap),h.set(t,[])}function C(t){var e=p.get(t);return e||(e=new D(t),p.set(t,e)),e}function E(t){i(t.prototype,"adoptedStyleSheets",{configurable:!0,enumerable:!0,get:function(){return C(this).sheets},set:function(t){C(this).update(t)}})}function L(t,e){for(var r=document.createNodeIterator(t,NodeFilter.SHOW_ELEMENT,(function(t){return _(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),null,!1),n=void 0;n=r.nextNode();)e(_(n))}function z(t){var e=m.get(t);return e instanceof Document?e.body:e}function O(t){var e=document.createDocumentFragment(),r=g.get(t),n=v.get(t),i=z(t);n.disconnect(),r.forEach((function(r){e.appendChild(A(r,t)||function(t,e){var r=document.createElement("style");return u.get(t).set(e,r),c.get(t).push(e),r}(r,t))})),i.insertBefore(e,null),n.observe(i,f),r.forEach((function(e){M(e,A(e,t))}))}function D(e){var r=this;r.sheets=[],m.set(r,e),g.set(r,[]),v.set(r,new MutationObserver((function(e,n){document?e.forEach((function(e){t||o.call(e.addedNodes,(function(t){t instanceof Element&&L(t,(function(t){C(t).connect()}))})),o.call(e.removedNodes,(function(e){e instanceof Element&&(function(t,e){return e instanceof HTMLStyleElement&&g.get(t).some((function(e){return A(e,t)}))}(r,e)&&O(r),t||L(e,(function(t){C(t).disconnect()})))}))})):n.disconnect()})))}}()},82393:(t,e,r)=>{"use strict";t.exports={parse:r(60062),stringify:r(40288)}},15305:(t,e,r)=>{"use strict";var n=r(23648);t.exports={isSize:function(t){return/^[\d\.]/.test(t)||-1!==t.indexOf("/")||-1!==n.indexOf(t)}}},60062:(t,e,r)=>{"use strict";var n=r(51183),i=r(54324),o=r(94316),a=r(99803),s=r(87486),l=r(2362),c=r(46492),u=r(15305).isSize;t.exports=d;var h=d.cache={};function d(t){if("string"!=typeof t)throw new Error("Font argument must be a string.");if(h[t])return h[t];if(""===t)throw new Error("Cannot parse an empty string.");if(-1!==o.indexOf(t))return h[t]={system:t};for(var e,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},d=c(t,/\s+/);e=d.shift();){if(-1!==i.indexOf(e))return["style","variant","weight","stretch"].forEach((function(t){r[t]=e})),h[t]=r;if(-1===s.indexOf(e))if("normal"!==e&&"small-caps"!==e)if(-1===l.indexOf(e)){if(-1===a.indexOf(e)){if(u(e)){var p=c(e,"/");if(r.size=p[0],null!=p[1]?r.lineHeight=f(p[1]):"/"===d[0]&&(d.shift(),r.lineHeight=f(d.shift())),!d.length)throw new Error("Missing required font-family.");return r.family=c(d.join(" "),/\s*,\s*/).map(n),h[t]=r}throw new Error("Unknown or unsupported font token: "+e)}r.weight=e}else r.stretch=e;else r.variant=e;else r.style=e}throw new Error("Missing required font-size.")}function f(t){var e=parseFloat(t);return e.toString()===t?e:t}},40288:(t,e,r)=>{"use strict";var n=r(9994),i=r(15305).isSize,o=p(r(54324)),a=p(r(94316)),s=p(r(99803)),l=p(r(87486)),c=p(r(2362)),u={normal:1,"small-caps":1},h={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},d="serif";function f(t,e){if(t&&!e[t]&&!o[t])throw Error("Unknown keyword `"+t+"`");return t}function p(t){for(var e={},r=0;r{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",n=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,n,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},21906:t=>{"use strict";t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},78706:t=>{"use strict";t.exports=function(t){return t[1]}},39683:(t,e,r)=>{"use strict";var n,i=r(59738),o=r(10040),a=r(4216),s=r(15498),l=r(54863),c=r(30829),u=Function.prototype.bind,h=Object.defineProperty,d=Object.prototype.hasOwnProperty;n=function(t,e,r){var n,i=o(e)&&a(e.value);return delete(n=s(e)).writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&d.call(this,t)?i:(e.value=u.call(i,r.resolveContext?r.resolveContext(this):this),h(this,t,e),this[t])},n},t.exports=function(t){var e=l(arguments[1]);return i(e.resolveContext)&&a(e.resolveContext),c(t,(function(t,r){return n(r,t,e)}))}},86142:(t,e,r)=>{"use strict";var n=r(59738),i=r(15034),o=r(18021),a=r(54863),s=r(79813);(t.exports=function(t,e){var r,i,l,c,u;return arguments.length<2||"string"!=typeof t?(c=e,e=t,t=null):c=arguments[2],n(t)?(r=s.call(t,"c"),i=s.call(t,"e"),l=s.call(t,"w")):(r=l=!0,i=!1),u={value:e,configurable:r,enumerable:i,writable:l},c?o(a(c),u):u}).gs=function(t,e,r){var l,c,u,h;return"string"!=typeof t?(u=r,r=e,e=t,t=null):u=arguments[3],n(e)?i(e)?n(r)?i(r)||(u=r,r=void 0):r=void 0:(u=e,e=r=void 0):e=void 0,n(t)?(l=s.call(t,"c"),c=s.call(t,"e")):(l=!0,c=!1),h={get:e,set:r,configurable:l,enumerable:c},u?o(a(u),h):h}},31830:(t,e,r)=>{"use strict";function n(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}r.d(e,{GP:()=>d,OE:()=>m});var i,o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a(t){if(!(e=o.exec(t)))throw new Error("invalid format: "+t);var e;return new s({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function s(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function l(t,e){var r=n(t,e);if(!r)return t+"";var i=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}a.prototype=s.prototype,s.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const c={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return l(100*t,e)},r:l,s:function(t,e){var r=n(t,e);if(!r)return t+"";var o=r[0],a=r[1],s=a-(i=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,l=o.length;return s===l?o:s>l?o+new Array(s-l+1).join("0"):s>0?o.slice(0,s)+"."+o.slice(s):"0."+new Array(1-s).join("0")+n(t,Math.max(0,e+s-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function u(t){return t}var h,d,f=Array.prototype.map,p=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function m(t){var e,r,o=void 0===t.grouping||void 0===t.thousands?u:(e=f.call(t.grouping,Number),r=t.thousands+"",function(t,n){for(var i=t.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(t.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[a=(a+1)%e.length];return o.reverse().join(r)}),s=void 0===t.currency?"":t.currency[0]+"",l=void 0===t.currency?"":t.currency[1]+"",h=void 0===t.decimal?".":t.decimal+"",d=void 0===t.numerals?u:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(f.call(t.numerals,String)),m=void 0===t.percent?"%":t.percent+"",g=void 0===t.minus?"-":t.minus+"",v=void 0===t.nan?"NaN":t.nan+"";function b(t){var e=(t=a(t)).fill,r=t.align,n=t.sign,u=t.symbol,f=t.zero,b=t.width,y=t.comma,x=t.precision,_=t.trim,w=t.type;"n"===w?(y=!0,w="g"):c[w]||(void 0===x&&(x=12),_=!0,w="g"),(f||"0"===e&&"="===r)&&(f=!0,e="0",r="=");var k="$"===u?s:"#"===u&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",A="$"===u?l:/[%p]/.test(w)?m:"",M=c[w],T=/[defgprs%]/.test(w);function S(t){var a,s,l,c=k,u=A;if("c"===w)u=M(t)+u,t="";else{var m=(t=+t)<0||1/t<0;if(t=isNaN(t)?v:M(Math.abs(t),x),_&&(t=function(t){t:for(var e,r=t.length,n=1,i=-1;n0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),m&&0==+t&&"+"!==n&&(m=!1),c=(m?"("===n?n:g:"-"===n||"("===n?"":n)+c,u=("s"===w?p[8+i/3]:"")+u+(m&&"("===n?")":""),T)for(a=-1,s=t.length;++a(l=t.charCodeAt(a))||l>57){u=(46===l?h+t.slice(a+1):t.slice(a))+u,t=t.slice(0,a);break}}y&&!f&&(t=o(t,1/0));var S=c.length+t.length+u.length,C=S>1)+c+t+u+C.slice(S);break;default:t=C+c+t+u}return d(t)}return x=void 0===x?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x)),S.toString=function(){return t+""},S}return{format:b,formatPrefix:function(t,e){var r,i=b(((t=a(t)).type="f",t)),o=3*Math.max(-8,Math.min(8,Math.floor((r=e,((r=n(Math.abs(r)))?r[1]:NaN)/3)))),s=Math.pow(10,-o),l=p[8+o/3];return function(t){return i(s*t)+l}}}}h=m({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),d=h.format,h.formatPrefix},79969:(t,e,r)=>{"use strict";r.d(e,{DC:()=>p,de:()=>d,aL:()=>m});var n=r(64772),i=r(79896),o=r(61396),a=r(67848),s=r(28397),l=r(34045);function c(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function u(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function h(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function d(t){var e=t.dateTime,r=t.date,s=t.time,l=t.periods,d=t.days,f=t.shortDays,p=t.months,m=t.shortMonths,v=w(l),b=k(l),y=w(d),x=k(d),_=w(f),et=k(f),_t=w(p),Dt=k(p),It=w(m),Rt=k(m),Ft={a:function(t){return f[t.getDay()]},A:function(t){return d[t.getDay()]},b:function(t){return m[t.getMonth()]},B:function(t){return p[t.getMonth()]},c:null,d:H,e:H,f:X,g:at,G:lt,H:W,I:q,j:Y,L:Z,m:$,M:J,p:function(t){return l[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:zt,s:Ot,S:K,u:Q,U:tt,V:rt,w:nt,W:it,x:null,X:null,y:ot,Y:st,Z:ct,"%":Lt},Pt={a:function(t){return f[t.getUTCDay()]},A:function(t){return d[t.getUTCDay()]},b:function(t){return m[t.getUTCMonth()]},B:function(t){return p[t.getUTCMonth()]},c:null,d:ut,e:ut,f:mt,g:Tt,G:Ct,H:ht,I:dt,j:ft,L:pt,m:gt,M:vt,p:function(t){return l[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:zt,s:Ot,S:bt,u:yt,U:xt,V:wt,w:kt,W:At,x:null,X:null,y:Mt,Y:St,Z:Et,"%":Lt},Nt={a:function(t,e,r){var n=_.exec(e.slice(r));return n?(t.w=et[n[0].toLowerCase()],r+n[0].length):-1},A:function(t,e,r){var n=y.exec(e.slice(r));return n?(t.w=x[n[0].toLowerCase()],r+n[0].length):-1},b:function(t,e,r){var n=It.exec(e.slice(r));return n?(t.m=Rt[n[0].toLowerCase()],r+n[0].length):-1},B:function(t,e,r){var n=_t.exec(e.slice(r));return n?(t.m=Dt[n[0].toLowerCase()],r+n[0].length):-1},c:function(t,r,n){return Ut(t,e,r,n)},d:I,e:I,f:B,g:L,G:E,H:F,I:F,j:R,L:j,m:D,M:P,p:function(t,e,r){var n=v.exec(e.slice(r));return n?(t.p=b[n[0].toLowerCase()],r+n[0].length):-1},q:O,Q:G,s:V,S:N,u:M,U:T,V:S,w:A,W:C,x:function(t,e,n){return Ut(t,r,e,n)},X:function(t,e,r){return Ut(t,s,e,r)},y:L,Y:E,Z:z,"%":U};function jt(t,e){return function(r){var n,i,o,a=[],s=-1,l=0,c=t.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in d||(d.w=1),"Z"in d?(l=(s=u(h(d.y,0,1))).getUTCDay(),s=l>4||0===l?n.rt.ceil(s):(0,n.rt)(s),s=i.A.offset(s,7*(d.V-1)),d.y=s.getUTCFullYear(),d.m=s.getUTCMonth(),d.d=s.getUTCDate()+(d.w+6)%7):(l=(s=c(h(d.y,0,1))).getDay(),s=l>4||0===l?o.By.ceil(s):(0,o.By)(s),s=a.A.offset(s,7*(d.V-1)),d.y=s.getFullYear(),d.m=s.getMonth(),d.d=s.getDate()+(d.w+6)%7)}else("W"in d||"U"in d)&&("w"in d||(d.w="u"in d?d.u%7:"W"in d?1:0),l="Z"in d?u(h(d.y,0,1)).getUTCDay():c(h(d.y,0,1)).getDay(),d.m=0,d.d="W"in d?(d.w+6)%7+7*d.W-(l+5)%7:d.w+7*d.U-(l+6)%7);return"Z"in d?(d.H+=d.Z/100|0,d.M+=d.Z%100,u(d)):c(d)}}function Ut(t,e,r,n){for(var i,o,a=0,s=e.length,l=r.length;a=l)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=Nt[i in g?e.charAt(a++):i])||(n=o(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Ft.x=jt(r,Ft),Ft.X=jt(s,Ft),Ft.c=jt(e,Ft),Pt.x=jt(r,Pt),Pt.X=jt(s,Pt),Pt.c=jt(e,Pt),{format:function(t){var e=jt(t+="",Ft);return e.toString=function(){return t},e},parse:function(t){var e=Bt(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=jt(t+="",Pt);return e.toString=function(){return t},e},utcParse:function(t){var e=Bt(t+="",!0);return e.toString=function(){return t},e}}}var f,p,m,g={"-":"",_:" ",0:"0"},v=/^\s*\d+/,b=/^%/,y=/[\\^$*+?|[\]().{}]/g;function x(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",o=i.length;return n+(o68?1900:2e3),r+n[0].length):-1}function z(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function O(t,e,r){var n=v.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function D(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function I(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function R(t,e,r){var n=v.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function F(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function P(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function N(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function j(t,e,r){var n=v.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function B(t,e,r){var n=v.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function U(t,e,r){var n=b.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function G(t,e,r){var n=v.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function V(t,e,r){var n=v.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function H(t,e){return x(t.getDate(),e,2)}function W(t,e){return x(t.getHours(),e,2)}function q(t,e){return x(t.getHours()%12||12,e,2)}function Y(t,e){return x(1+a.A.count((0,s.A)(t),t),e,3)}function Z(t,e){return x(t.getMilliseconds(),e,3)}function X(t,e){return Z(t,e)+"000"}function $(t,e){return x(t.getMonth()+1,e,2)}function J(t,e){return x(t.getMinutes(),e,2)}function K(t,e){return x(t.getSeconds(),e,2)}function Q(t){var e=t.getDay();return 0===e?7:e}function tt(t,e){return x(o.fz.count((0,s.A)(t)-1,t),e,2)}function et(t){var e=t.getDay();return e>=4||0===e?(0,o.dt)(t):o.dt.ceil(t)}function rt(t,e){return t=et(t),x(o.dt.count((0,s.A)(t),t)+(4===(0,s.A)(t).getDay()),e,2)}function nt(t){return t.getDay()}function it(t,e){return x(o.By.count((0,s.A)(t)-1,t),e,2)}function ot(t,e){return x(t.getFullYear()%100,e,2)}function at(t,e){return x((t=et(t)).getFullYear()%100,e,2)}function st(t,e){return x(t.getFullYear()%1e4,e,4)}function lt(t,e){var r=t.getDay();return x((t=r>=4||0===r?(0,o.dt)(t):o.dt.ceil(t)).getFullYear()%1e4,e,4)}function ct(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+x(e/60|0,"0",2)+x(e%60,"0",2)}function ut(t,e){return x(t.getUTCDate(),e,2)}function ht(t,e){return x(t.getUTCHours(),e,2)}function dt(t,e){return x(t.getUTCHours()%12||12,e,2)}function ft(t,e){return x(1+i.A.count((0,l.A)(t),t),e,3)}function pt(t,e){return x(t.getUTCMilliseconds(),e,3)}function mt(t,e){return pt(t,e)+"000"}function gt(t,e){return x(t.getUTCMonth()+1,e,2)}function vt(t,e){return x(t.getUTCMinutes(),e,2)}function bt(t,e){return x(t.getUTCSeconds(),e,2)}function yt(t){var e=t.getUTCDay();return 0===e?7:e}function xt(t,e){return x(n.Hl.count((0,l.A)(t)-1,t),e,2)}function _t(t){var e=t.getUTCDay();return e>=4||0===e?(0,n.pT)(t):n.pT.ceil(t)}function wt(t,e){return t=_t(t),x(n.pT.count((0,l.A)(t),t)+(4===(0,l.A)(t).getUTCDay()),e,2)}function kt(t){return t.getUTCDay()}function At(t,e){return x(n.rt.count((0,l.A)(t)-1,t),e,2)}function Mt(t,e){return x(t.getUTCFullYear()%100,e,2)}function Tt(t,e){return x((t=_t(t)).getUTCFullYear()%100,e,2)}function St(t,e){return x(t.getUTCFullYear()%1e4,e,4)}function Ct(t,e){var r=t.getUTCDay();return x((t=r>=4||0===r?(0,n.pT)(t):n.pT.ceil(t)).getUTCFullYear()%1e4,e,4)}function Et(){return"+0000"}function Lt(){return"%"}function zt(t){return+t}function Ot(t){return Math.floor(+t/1e3)}f=d({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"]}),p=f.format,f.parse,m=f.utcFormat,f.utcParse},67848:(t,e,r)=>{"use strict";r.d(e,{A:()=>a,_:()=>s});var n=r(94825),i=r(37968),o=(0,n.A)((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.rR)/i.Nm}),(function(t){return t.getDate()-1}));const a=o;var s=o.range},37968:(t,e,r)=>{"use strict";r.d(e,{Fq:()=>s,JJ:()=>o,Nm:()=>a,Tt:()=>n,rR:()=>i});var n=1e3,i=6e4,o=36e5,a=864e5,s=6048e5},55622:(t,e,r)=>{"use strict";r.r(e),r.d(e,{timeDay:()=>v.A,timeDays:()=>v._,timeFriday:()=>b.Sh,timeFridays:()=>b.tz,timeHour:()=>m,timeHours:()=>g,timeInterval:()=>n.A,timeMillisecond:()=>o,timeMilliseconds:()=>a,timeMinute:()=>d,timeMinutes:()=>f,timeMonday:()=>b.By,timeMondays:()=>b.KP,timeMonth:()=>x,timeMonths:()=>_,timeSaturday:()=>b.kS,timeSaturdays:()=>b.t$,timeSecond:()=>c,timeSeconds:()=>u,timeSunday:()=>b.fz,timeSundays:()=>b.se,timeThursday:()=>b.dt,timeThursdays:()=>b.Q$,timeTuesday:()=>b.eQ,timeTuesdays:()=>b.yW,timeWednesday:()=>b.l3,timeWednesdays:()=>b.gf,timeWeek:()=>b.fz,timeWeeks:()=>b.se,timeYear:()=>w.A,timeYears:()=>w.V,utcDay:()=>E.A,utcDays:()=>E.o,utcFriday:()=>L.a1,utcFridays:()=>L.Zn,utcHour:()=>S,utcHours:()=>C,utcMillisecond:()=>o,utcMilliseconds:()=>a,utcMinute:()=>A,utcMinutes:()=>M,utcMonday:()=>L.rt,utcMondays:()=>L.ON,utcMonth:()=>O,utcMonths:()=>D,utcSaturday:()=>L.c8,utcSaturdays:()=>L.Xo,utcSecond:()=>c,utcSeconds:()=>u,utcSunday:()=>L.Hl,utcSundays:()=>L.aZ,utcThursday:()=>L.pT,utcThursdays:()=>L.wr,utcTuesday:()=>L.sr,utcTuesdays:()=>L.jN,utcWednesday:()=>L.z2,utcWednesdays:()=>L.G6,utcWeek:()=>L.Hl,utcWeeks:()=>L.aZ,utcYear:()=>I.A,utcYears:()=>I.j});var n=r(94825),i=(0,n.A)((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?(0,n.A)((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,r){e.setTime(+e+r*t)}),(function(e,r){return(r-e)/t})):i:null};const o=i;var a=i.range,s=r(37968),l=(0,n.A)((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*s.Tt)}),(function(t,e){return(e-t)/s.Tt}),(function(t){return t.getUTCSeconds()}));const c=l;var u=l.range,h=(0,n.A)((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*s.Tt)}),(function(t,e){t.setTime(+t+e*s.rR)}),(function(t,e){return(e-t)/s.rR}),(function(t){return t.getMinutes()}));const d=h;var f=h.range,p=(0,n.A)((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*s.Tt-t.getMinutes()*s.rR)}),(function(t,e){t.setTime(+t+e*s.JJ)}),(function(t,e){return(e-t)/s.JJ}),(function(t){return t.getHours()}));const m=p;var g=p.range,v=r(67848),b=r(61396),y=(0,n.A)((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));const x=y;var _=y.range,w=r(28397),k=(0,n.A)((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*s.rR)}),(function(t,e){return(e-t)/s.rR}),(function(t){return t.getUTCMinutes()}));const A=k;var M=k.range,T=(0,n.A)((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*s.JJ)}),(function(t,e){return(e-t)/s.JJ}),(function(t){return t.getUTCHours()}));const S=T;var C=T.range,E=r(79896),L=r(64772),z=(0,n.A)((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}));const O=z;var D=z.range,I=r(34045)},94825:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=new Date,i=new Date;function o(t,e,r,a){function s(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return s.floor=function(e){return t(e=new Date(+e)),e},s.ceil=function(r){return t(r=new Date(r-1)),e(r,1),t(r),r},s.round=function(t){var e=s(t),r=s.ceil(t);return t-e0))return a;do{a.push(o=new Date(+r)),e(r,i),t(r)}while(o=e)for(;t(e),!r(e);)e.setTime(e-1)}),(function(t,n){if(t>=t)if(n<0)for(;++n<=0;)for(;e(t,-1),!r(t););else for(;--n>=0;)for(;e(t,1),!r(t););}))},r&&(s.count=function(e,o){return n.setTime(+e),i.setTime(+o),t(n),t(i),Math.floor(r(n,i))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(a?function(e){return a(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}},79896:(t,e,r)=>{"use strict";r.d(e,{A:()=>a,o:()=>s});var n=r(94825),i=r(37968),o=(0,n.A)((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/i.Nm}),(function(t){return t.getUTCDate()-1}));const a=o;var s=o.range},64772:(t,e,r)=>{"use strict";r.d(e,{G6:()=>g,Hl:()=>a,ON:()=>p,Xo:()=>y,Zn:()=>b,a1:()=>h,aZ:()=>f,c8:()=>d,jN:()=>m,pT:()=>u,rt:()=>s,sr:()=>l,wr:()=>v,z2:()=>c});var n=r(94825),i=r(37968);function o(t){return(0,n.A)((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/i.Fq}))}var a=o(0),s=o(1),l=o(2),c=o(3),u=o(4),h=o(5),d=o(6),f=a.range,p=s.range,m=l.range,g=c.range,v=u.range,b=h.range,y=d.range},34045:(t,e,r)=>{"use strict";r.d(e,{A:()=>o,j:()=>a});var n=r(94825),i=(0,n.A)((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?(0,n.A)((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null};const o=i;var a=i.range},61396:(t,e,r)=>{"use strict";r.d(e,{By:()=>s,KP:()=>p,Q$:()=>v,Sh:()=>h,dt:()=>u,eQ:()=>l,fz:()=>a,gf:()=>g,kS:()=>d,l3:()=>c,se:()=>f,t$:()=>y,tz:()=>b,yW:()=>m});var n=r(94825),i=r(37968);function o(t){return(0,n.A)((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.rR)/i.Fq}))}var a=o(0),s=o(1),l=o(2),c=o(3),u=o(4),h=o(5),d=o(6),f=a.range,p=s.range,m=l.range,g=c.range,v=u.range,b=h.range,y=d.range},28397:(t,e,r)=>{"use strict";r.d(e,{A:()=>o,V:()=>a});var n=r(94825),i=(0,n.A)((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?(0,n.A)((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,r){e.setFullYear(e.getFullYear()+r*t)})):null};const o=i;var a=i.range},43362:(t,e,r)=>{"use strict";var n=r(38232),i=r(66367),o=r(48744),a=r(55572);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new o("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],h=!!a&&a(t,e);if(n)n(t,e,{configurable:null===c&&h?h.configurable:!c,enumerable:null===s&&h?h.enumerable:!s,value:r,writable:null===l&&h?h.writable:!l});else{if(!u&&(s||l||c))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},10781:(t,e,r)=>{"use strict";var n=r(99952),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=r(43362),l=r(20419)(),c=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(i=n)||"[object Function]"!==o.call(i)||!n())return;var i;l?s(t,e,r,!0):s(t,e,r)},u=function(t,e){var r=arguments.length>2?arguments[2]:{},o=n(e);i&&(o=a.call(o,Object.getOwnPropertySymbols(e)));for(var s=0;s{"use strict";t.exports=function(){for(var t=0;t{"use strict";t.exports=n;var e=(n.canvas=document.createElement("canvas")).getContext("2d"),r=i([32,126]);function n(t,n){Array.isArray(t)&&(t=t.join(", "));var o,a={},s=16,l=.05;n&&(2===n.length&&"number"==typeof n[0]?o=i(n):Array.isArray(n)?o=n:(n.o?o=i(n.o):n.pairs&&(o=n.pairs),n.fontSize&&(s=n.fontSize),null!=n.threshold&&(l=n.threshold))),o||(o=r),e.font=s+"px "+t;for(var c=0;cs*l){var f=(d-h)/s;a[u]=1e3*f}}return a}function i(t){for(var e=[],r=t[0];r<=t[1];r++)for(var n=String.fromCharCode(r),i=t[0];i{var n=r(97883),i=r(25058),o={M:"moveTo",C:"bezierCurveTo"};t.exports=function(t,e){t.beginPath(),i(n(e)).forEach((function(e){var r=e[0],n=e.slice(1);t[o[r]].apply(t,n)})),t.closePath()}},22366:t=>{t.exports=function(t){switch(t){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},31338:t=>{"use strict";function e(t,r,n){var i=0|t[n];if(i<=0)return[];var o,a=new Array(i);if(n===t.length-1)for(o=0;o0)return function(t,e){var r,n;for(r=new Array(t),n=0;n{"use strict";function e(t,e,n){n=n||2;var o,a,s,l,h,d,p,m=e&&e.length,g=m?e[0]*n:t.length,v=r(t,0,g,n,!0),b=[];if(!v||v.next===v.prev)return b;if(m&&(v=function(t,e,n,i){var o,a,s,l=[];for(o=0,a=e.length;o80*n){o=s=t[0],a=l=t[1];for(var y=n;ys&&(s=h),d>l&&(l=d);p=0!==(p=Math.max(s-o,l-a))?32767/p:0}return i(v,b,n,o,a,p,0),b}function r(t,e,r,n,i){var o,a;if(i===T(t,e,r,n)>0)for(o=e;o=e;o-=n)a=k(o,t[o],t[o+1],a);return a&&v(a,a.next)&&(A(a),a=a.next),a}function n(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!v(n,n.next)&&0!==g(n.prev,n,n.next))n=n.next;else{if(A(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function i(t,e,r,c,u,h,f){if(t){!f&&h&&function(t,e,r,n){var i=t;do{0===i.z&&(i.z=d(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,o,a,s,l,c=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,n=r,s=0,e=0;e0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;r=n}o.nextZ=null,c*=2}while(a>1)}(i)}(t,c,u,h);for(var p,m,g=t;t.prev!==t.next;)if(p=t.prev,m=t.next,h?a(t,c,u,h):o(t))e.push(p.i/r|0),e.push(t.i/r|0),e.push(m.i/r|0),A(t),t=m.next,g=m.next;else if((t=m)===g){f?1===f?i(t=s(n(t),e,r),e,r,c,u,h,2):2===f&&l(t,e,r,c,u,h):i(n(t),e,r,c,u,h,1);break}}}function o(t){var e=t.prev,r=t,n=t.next;if(g(e,r,n)>=0)return!1;for(var i=e.x,o=r.x,a=n.x,s=e.y,l=r.y,c=n.y,u=io?i>a?i:a:o>a?o:a,f=s>l?s>c?s:c:l>c?l:c,m=n.next;m!==e;){if(m.x>=u&&m.x<=d&&m.y>=h&&m.y<=f&&p(i,s,o,l,a,c,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function a(t,e,r,n){var i=t.prev,o=t,a=t.next;if(g(i,o,a)>=0)return!1;for(var s=i.x,l=o.x,c=a.x,u=i.y,h=o.y,f=a.y,m=sl?s>c?s:c:l>c?l:c,y=u>h?u>f?u:f:h>f?h:f,x=d(m,v,e,r,n),_=d(b,y,e,r,n),w=t.prevZ,k=t.nextZ;w&&w.z>=x&&k&&k.z<=_;){if(w.x>=m&&w.x<=b&&w.y>=v&&w.y<=y&&w!==i&&w!==a&&p(s,u,l,h,c,f,w.x,w.y)&&g(w.prev,w,w.next)>=0)return!1;if(w=w.prevZ,k.x>=m&&k.x<=b&&k.y>=v&&k.y<=y&&k!==i&&k!==a&&p(s,u,l,h,c,f,k.x,k.y)&&g(k.prev,k,k.next)>=0)return!1;k=k.nextZ}for(;w&&w.z>=x;){if(w.x>=m&&w.x<=b&&w.y>=v&&w.y<=y&&w!==i&&w!==a&&p(s,u,l,h,c,f,w.x,w.y)&&g(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;k&&k.z<=_;){if(k.x>=m&&k.x<=b&&k.y>=v&&k.y<=y&&k!==i&&k!==a&&p(s,u,l,h,c,f,k.x,k.y)&&g(k.prev,k,k.next)>=0)return!1;k=k.nextZ}return!0}function s(t,e,r){var i=t;do{var o=i.prev,a=i.next.next;!v(o,a)&&b(o,i,i.next,a)&&_(o,a)&&_(a,o)&&(e.push(o.i/r|0),e.push(i.i/r|0),e.push(a.i/r|0),A(i),A(i.next),i=t=a),i=i.next}while(i!==t);return n(i)}function l(t,e,r,o,a,s){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&m(l,c)){var u=w(l,c);return l=n(l,l.next),u=n(u,u.next),i(l,e,r,o,a,s,0),void i(u,e,r,o,a,s,0)}c=c.next}l=l.next}while(l!==t)}function c(t,e){return t.x-e.x}function u(t,e){var r=function(t,e){var r,n=e,i=t.x,o=t.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>a&&(a=s,r=n.x=n.x&&n.x>=u&&i!==n.x&&p(or.x||n.x===r.x&&h(r,n)))&&(r=n,f=l)),n=n.next}while(n!==c);return r}(t,e);if(!r)return e;var i=w(r,t);return n(i,i.next),n(r,r.next)}function h(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function d(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function f(t){var e=t,r=t;do{(e.x=(t-a)*(o-s)&&(t-a)*(n-s)>=(r-a)*(e-s)&&(r-a)*(o-s)>=(i-a)*(n-s)}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&b(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(_(t,e)&&_(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||v(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,r,n){var i=x(g(t,e,r)),o=x(g(t,e,n)),a=x(g(r,n,t)),s=x(g(r,n,e));return i!==o&&a!==s||!(0!==i||!y(t,r,e))||!(0!==o||!y(t,n,e))||!(0!==a||!y(r,t,n))||!(0!==s||!y(r,e,n))}function y(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function x(t){return t>0?1:t<0?-1:0}function _(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function w(t,e){var r=new M(t.i,t.x,t.y),n=new M(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function k(t,e,r,n){var i=new M(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function A(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function M(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function T(t,e,r,n){for(var i=0,o=e,a=r-n;o0&&(n+=t[i-1].length,r.holes.push(n))}return r}},38232:(t,e,r)=>{"use strict";var n=r(59412)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(t){n=!1}t.exports=n},33674:t=>{"use strict";t.exports=EvalError},94234:t=>{"use strict";t.exports=Error},8975:t=>{"use strict";t.exports=RangeError},59299:t=>{"use strict";t.exports=ReferenceError},66367:t=>{"use strict";t.exports=SyntaxError},48744:t=>{"use strict";t.exports=TypeError},63432:t=>{"use strict";t.exports=URIError},18918:(t,e,r)=>{"use strict";var n=r(2033);t.exports=function(){return n(this).length=0,this}},54034:(t,e,r)=>{"use strict";t.exports=r(90329)()?Array.from:r(28741)},90329:t=>{"use strict";t.exports=function(){var t,e,r=Array.from;return"function"==typeof r&&(e=r(t=["raz","dwa"]),Boolean(e&&e!==t&&"dwa"===e[1]))}},28741:(t,e,r)=>{"use strict";var n=r(89791).iterator,i=r(40471),o=r(85875),a=r(60812),s=r(55366),l=r(2033),c=r(93767),u=r(54295),h=Array.isArray,d=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;t.exports=function(t){var e,r,m,g,v,b,y,x,_,w,k=arguments[1],A=arguments[2];if(t=Object(l(t)),c(k)&&s(k),this&&this!==Array&&o(this))e=this;else{if(!k){if(i(t))return 1!==(v=t.length)?Array.apply(null,t):((g=new Array(1))[0]=t[0],g);if(h(t)){for(g=new Array(v=t.length),r=0;r=55296&&b<=56319&&(w+=t[++r]),w=k?d.call(k,A,w,m):w,e?(f.value=w,p(g,m,f)):g[m]=w,++m;v=m}if(void 0===v)for(v=a(t.length),e&&(g=new e(v)),r=0;r{"use strict";var e=Object.prototype.toString,r=e.call(function(){return arguments}());t.exports=function(t){return e.call(t)===r}},85875:t=>{"use strict";var e=Object.prototype.toString,r=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);t.exports=function(t){return"function"==typeof t&&r(e.call(t))}},20450:t=>{"use strict";t.exports=function(){}},55334:(t,e,r)=>{"use strict";t.exports=r(42669)()?Math.sign:r(78209)},42669:t=>{"use strict";t.exports=function(){var t=Math.sign;return"function"==typeof t&&1===t(10)&&-1===t(-20)}},78209:t=>{"use strict";t.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},28371:(t,e,r)=>{"use strict";var n=r(55334),i=Math.abs,o=Math.floor;t.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&&isFinite(t)?n(t)*o(i(t)):t}},60812:(t,e,r)=>{"use strict";var n=r(28371),i=Math.max;t.exports=function(t){return i(0,n(t))}},78826:(t,e,r)=>{"use strict";var n=r(55366),i=r(2033),o=Function.prototype.bind,a=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(r,c){var u,h=arguments[2],d=arguments[3];return r=Object(i(r)),n(c),u=s(r),d&&u.sort("function"==typeof d?o.call(d,r):void 0),"function"!=typeof t&&(t=u[t]),a.call(t,u,(function(t,n){return l.call(r,t)?a.call(c,h,r[t],t,r,n):e}))}}},18021:(t,e,r)=>{"use strict";t.exports=r(99484)()?Object.assign:r(28752)},99484:t=>{"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},28752:(t,e,r)=>{"use strict";var n=r(87984),i=r(2033),o=Math.max;t.exports=function(t,e){var r,a,s,l=o(arguments.length,2);for(t=Object(i(t)),s=function(n){try{t[n]=e[n]}catch(t){r||(r=t)}},a=1;a{"use strict";var n=r(54034),i=r(18021),o=r(2033);t.exports=function(t){var e=Object(o(t)),r=arguments[1],a=Object(arguments[2]);if(e!==t&&!r)return e;var s={};return r?n(r,(function(e){(a.ensure||e in t)&&(s[e]=t[e])})):i(s,t),s}},39095:(t,e,r)=>{"use strict";var n,i,o,a,s=Object.create;r(11314)()||(n=r(786)),t.exports=n?1!==n.level?s:(i={},o={},a={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach((function(t){o[t]="__proto__"!==t?a:{configurable:!0,enumerable:!1,writable:!0,value:void 0}})),Object.defineProperties(i,o),Object.defineProperty(n,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:i}),function(t,e){return s(null===t?i:t,e)}):s},17916:(t,e,r)=>{"use strict";t.exports=r(78826)("forEach")},27375:(t,e,r)=>{"use strict";var n=r(93767),i={function:!0,object:!0};t.exports=function(t){return n(t)&&i[typeof t]||!1}},93767:(t,e,r)=>{"use strict";var n=r(20450)();t.exports=function(t){return t!==n&&null!==t}},87984:(t,e,r)=>{"use strict";t.exports=r(60263)()?Object.keys:r(42351)},60263:t=>{"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},42351:(t,e,r)=>{"use strict";var n=r(93767),i=Object.keys;t.exports=function(t){return i(n(t)?Object(t):t)}},30829:(t,e,r)=>{"use strict";var n=r(55366),i=r(17916),o=Function.prototype.call;t.exports=function(t,e){var r={},a=arguments[2];return n(e),i(t,(function(t,n,i,s){r[n]=o.call(e,a,t,n,i,s)})),r}},54863:(t,e,r)=>{"use strict";var n=r(93767),i=Array.prototype.forEach,o=Object.create;t.exports=function(t){var e=o(null);return i.call(arguments,(function(t){n(t)&&function(t,e){var r;for(r in t)e[r]=t[r]}(Object(t),e)})),e}},83579:(t,e,r)=>{"use strict";t.exports=r(11314)()?Object.setPrototypeOf:r(786)},11314:t=>{"use strict";var e=Object.create,r=Object.getPrototypeOf,n={};t.exports=function(){var t=Object.setPrototypeOf;return"function"==typeof t&&r(t((arguments[0]||e)(null),n))===n}},786:(t,e,r)=>{"use strict";var n,i,o,a,s=r(27375),l=r(2033),c=Object.prototype.isPrototypeOf,u=Object.defineProperty,h={configurable:!0,enumerable:!1,writable:!0,value:void 0};n=function(t,e){if(l(t),null===e||s(e))return t;throw new TypeError("Prototype must be null or an object")},t.exports=(i=function(){var t,e=Object.create(null),r={},n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{(t=n.set).call(e,r)}catch(t){}if(Object.getPrototypeOf(e)===r)return{set:t,level:2}}return e.__proto__=r,Object.getPrototypeOf(e)===r?{level:2}:((e={}).__proto__=r,Object.getPrototypeOf(e)===r&&{level:1})}(),i?(2===i.level?i.set?(a=i.set,o=function(t,e){return a.call(n(t,e),e),t}):o=function(t,e){return n(t,e).__proto__=e,t}:o=function t(e,r){var i;return n(e,r),(i=c.call(t.nullPolyfill,e))&&delete t.nullPolyfill.__proto__,null===r&&(r=t.nullPolyfill),e.__proto__=r,i&&u(t.nullPolyfill,"__proto__",h),e},Object.defineProperty(o,"level",{configurable:!1,enumerable:!1,writable:!1,value:i.level})):null),r(39095)},55366:t=>{"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},66529:(t,e,r)=>{"use strict";var n=r(27375);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not an Object");return t}},2033:(t,e,r)=>{"use strict";var n=r(93767);t.exports=function(t){if(!n(t))throw new TypeError("Cannot use null or undefined");return t}},79813:(t,e,r)=>{"use strict";t.exports=r(82844)()?String.prototype.contains:r(65040)},82844:t=>{"use strict";var e="razdwatrzy";t.exports=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}},65040:t=>{"use strict";var e=String.prototype.indexOf;t.exports=function(t){return e.call(this,t,arguments[1])>-1}},54295:t=>{"use strict";var e=Object.prototype.toString,r=e.call("");t.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||e.call(t)===r)||!1}},36434:t=>{"use strict";var e=Object.create(null),r=Math.random;t.exports=function(){var t;do{t=r().toString(36).slice(2)}while(e[t]);return t}},46136:(t,e,r)=>{"use strict";var n,i=r(83579),o=r(79813),a=r(86142),s=r(89791),l=r(15929),c=Object.defineProperty;n=t.exports=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");l.call(this,t),e=e?o.call(e,"key+value")?"key+value":o.call(e,"key")?"key":"value":"value",c(this,"__kind__",a("",e))},i&&i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:a((function(t){return"value"===this.__kind__?this.__list__[t]:"key+value"===this.__kind__?[t,this.__list__[t]]:t}))}),c(n.prototype,s.toStringTag,a("c","Array Iterator"))},88822:(t,e,r)=>{"use strict";var n=r(40471),i=r(55366),o=r(54295),a=r(28753),s=Array.isArray,l=Function.prototype.call,c=Array.prototype.some;t.exports=function(t,e){var r,u,h,d,f,p,m,g,v=arguments[2];if(s(t)||n(t)?r="array":o(t)?r="string":t=a(t),i(e),h=function(){d=!0},"array"!==r)if("string"!==r)for(u=t.next();!u.done;){if(l.call(e,v,u.value,h),d)return;u=t.next()}else for(p=t.length,f=0;f=55296&&g<=56319&&(m+=t[++f]),l.call(e,v,m,h),!d);++f);else c.call(t,(function(t){return l.call(e,v,t,h),d}))}},28753:(t,e,r)=>{"use strict";var n=r(40471),i=r(54295),o=r(46136),a=r(45408),s=r(86898),l=r(89791).iterator;t.exports=function(t){return"function"==typeof s(t)[l]?t[l]():n(t)?new o(t):i(t)?new a(t):new o(t)}},15929:(t,e,r)=>{"use strict";var n,i=r(18918),o=r(18021),a=r(55366),s=r(2033),l=r(86142),c=r(39683),u=r(89791),h=Object.defineProperty,d=Object.defineProperties;t.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");d(this,{__list__:l("w",s(t)),__context__:l("w",e),__nextIndex__:l("w",0)}),e&&(a(e.on),e.on("_add",this._onAdd),e.on("_delete",this._onDelete),e.on("_clear",this._onClear))},delete n.prototype.constructor,d(n.prototype,o({_next:l((function(){var t;if(this.__list__)return this.__redo__&&void 0!==(t=this.__redo__.shift())?t:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(e,r){e>=t&&(this.__redo__[r]=++e)}),this),this.__redo__.push(t)):h(this,"__redo__",l("c",[t])))})),_onDelete:l((function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(e=this.__redo__.indexOf(t))&&this.__redo__.splice(e,1),this.__redo__.forEach((function(e,r){e>t&&(this.__redo__[r]=--e)}),this)))})),_onClear:l((function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0}))}))),h(n.prototype,u.iterator,l((function(){return this})))},46692:(t,e,r)=>{"use strict";var n=r(40471),i=r(93767),o=r(54295),a=r(89791).iterator,s=Array.isArray;t.exports=function(t){return!(!i(t)||!s(t)&&!o(t)&&!n(t)&&"function"!=typeof t[a])}},45408:(t,e,r)=>{"use strict";var n,i=r(83579),o=r(86142),a=r(89791),s=r(15929),l=Object.defineProperty;n=t.exports=function(t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");t=String(t),s.call(this,t),l(this,"__length__",o("",t.length))},i&&i(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:o((function(){if(this.__list__)return this.__nextIndex__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,a.toStringTag,o("c","String Iterator"))},86898:(t,e,r)=>{"use strict";var n=r(46692);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not iterable");return t}},89791:(t,e,r)=>{"use strict";t.exports=r(87494)()?r(63844).Symbol:r(44164)},87494:(t,e,r)=>{"use strict";var n=r(63844),i={object:!0,symbol:!0};t.exports=function(){var t,e=n.Symbol;if("function"!=typeof e)return!1;t=e("test symbol");try{String(t)}catch(t){return!1}return!!i[typeof e.iterator]&&!!i[typeof e.toPrimitive]&&!!i[typeof e.toStringTag]}},84848:t=>{"use strict";t.exports=function(t){return!!t&&("symbol"==typeof t||!!t.constructor&&"Symbol"===t.constructor.name&&"Symbol"===t[t.constructor.toStringTag])}},78718:(t,e,r)=>{"use strict";var n=r(86142),i=Object.create,o=Object.defineProperty,a=Object.prototype,s=i(null);t.exports=function(t){for(var e,r,i=0;s[t+(i||"")];)++i;return s[t+=i||""]=!0,o(a,e="@@"+t,n.gs(null,(function(t){r||(r=!0,o(this,e,n(t)),r=!1)}))),e}},25052:(t,e,r)=>{"use strict";var n=r(86142),i=r(63844).Symbol;t.exports=function(t){return Object.defineProperties(t,{hasInstance:n("",i&&i.hasInstance||t("hasInstance")),isConcatSpreadable:n("",i&&i.isConcatSpreadable||t("isConcatSpreadable")),iterator:n("",i&&i.iterator||t("iterator")),match:n("",i&&i.match||t("match")),replace:n("",i&&i.replace||t("replace")),search:n("",i&&i.search||t("search")),species:n("",i&&i.species||t("species")),split:n("",i&&i.split||t("split")),toPrimitive:n("",i&&i.toPrimitive||t("toPrimitive")),toStringTag:n("",i&&i.toStringTag||t("toStringTag")),unscopables:n("",i&&i.unscopables||t("unscopables"))})}},68813:(t,e,r)=>{"use strict";var n=r(86142),i=r(85618),o=Object.create(null);t.exports=function(t){return Object.defineProperties(t,{for:n((function(e){return o[e]?o[e]:o[e]=t(String(e))})),keyFor:n((function(t){var e;for(e in i(t),o)if(o[e]===t)return e}))})}},44164:(t,e,r)=>{"use strict";var n,i,o,a=r(86142),s=r(85618),l=r(63844).Symbol,c=r(78718),u=r(25052),h=r(68813),d=Object.create,f=Object.defineProperties,p=Object.defineProperty;if("function"==typeof l)try{String(l()),o=!0}catch(t){}else l=null;i=function(t){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return n(t)},t.exports=n=function t(e){var r;if(this instanceof t)throw new TypeError("Symbol is not a constructor");return o?l(e):(r=d(i.prototype),e=void 0===e?"":String(e),f(r,{__description__:a("",e),__name__:a("",c(e))}))},u(n),h(n),f(i.prototype,{constructor:a(n),toString:a("",(function(){return this.__name__}))}),f(n.prototype,{toString:a((function(){return"Symbol ("+s(this).__description__+")"})),valueOf:a((function(){return s(this)}))}),p(n.prototype,n.toPrimitive,a("",(function(){var t=s(this);return"symbol"==typeof t?t:t.toString()}))),p(n.prototype,n.toStringTag,a("c","Symbol")),p(i.prototype,n.toStringTag,a("c",n.prototype[n.toStringTag])),p(i.prototype,n.toPrimitive,a("c",n.prototype[n.toPrimitive]))},85618:(t,e,r)=>{"use strict";var n=r(84848);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not a symbol");return t}},41456:(t,e,r)=>{"use strict";t.exports=r(39687)()?WeakMap:r(87841)},39687:t=>{"use strict";t.exports=function(){var t,e;if("function"!=typeof WeakMap)return!1;try{t=new WeakMap([[e={},"one"],[{},"two"],[{},"three"]])}catch(t){return!1}return"[object WeakMap]"===String(t)&&"function"==typeof t.set&&t.set({},1)===t&&"function"==typeof t.delete&&"function"==typeof t.has&&"one"===t.get(e)}},99037:t=>{"use strict";t.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)},87841:(t,e,r)=>{"use strict";var n,i=r(93767),o=r(83579),a=r(66529),s=r(2033),l=r(36434),c=r(86142),u=r(28753),h=r(88822),d=r(89791).toStringTag,f=r(99037),p=Array.isArray,m=Object.defineProperty,g=Object.prototype.hasOwnProperty,v=Object.getPrototypeOf;t.exports=n=function(){var t,e=arguments[0];if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");return t=f&&o&&WeakMap!==n?o(new WeakMap,v(this)):this,i(e)&&(p(e)||(e=u(e))),m(t,"__weakMapData__",c("c","$weakMap$"+l())),e?(h(e,(function(e){s(e),t.set(e[0],e[1])})),t):t},f&&(o&&o(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:c(n)})),Object.defineProperties(n.prototype,{delete:c((function(t){return!!g.call(a(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)})),get:c((function(t){if(g.call(a(t),this.__weakMapData__))return t[this.__weakMapData__]})),has:c((function(t){return g.call(a(t),this.__weakMapData__)})),set:c((function(t,e){return m(a(t),this.__weakMapData__,c("c",e)),this})),toString:c((function(){return"[object WeakMap]"}))}),m(n.prototype,d,c("c","WeakMap"))},86626:t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}m(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&m(t,"error",e,{once:!0})}(t,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function c(t,e,r,n){var i,o,a,c;if(s(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"==typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=l(t))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,c=u,console&&console.warn&&console.warn(c)}return t}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=u.bind(n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[t];if(void 0===l)return!1;if("function"==typeof l)n(l,this,e);else{var c=l.length,u=p(l,c);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):f.call(t,e)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},44232:t=>{var e=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};t.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return e()}try{return __global__||e()}finally{delete Object.prototype.__global__}}()},63844:(t,e,r)=>{"use strict";t.exports=r(25515)()?globalThis:r(44232)},25515:t=>{"use strict";t.exports=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}},7370:(t,e,r)=>{"use strict";var n=r(45219);t.exports=function(t){var e=typeof t;if("string"===e){var r=t;if(0==(t=+t)&&n(r))return!1}else if("number"!==e)return!1;return t-t<1}},97e3:(t,e,r)=>{var n=r(22366);t.exports=function(t,e,r){if(!t)throw new TypeError("must specify data as first parameter");if(r=0|+(r||0),Array.isArray(t)&&t[0]&&"number"==typeof t[0][0]){var i,o,a,s,l=t[0].length,c=t.length*l;e&&"string"!=typeof e||(e=new(n(e||"float32"))(c+r));var u=e.length-r;if(c!==u)throw new Error("source length "+c+" ("+l+"x"+t.length+") does not match destination length "+u);for(i=0,a=r;i{"use strict";var n=r(40288),i=[32,126];t.exports=function(t){var e=(t=t||{}).shape?t.shape:t.canvas?[t.canvas.width,t.canvas.height]:[512,512],r=t.canvas||document.createElement("canvas"),o=t.font,a="number"==typeof t.step?[t.step,t.step]:t.step||[32,32],s=t.chars||i;if(o&&"string"!=typeof o&&(o=n(o)),Array.isArray(s)){if(2===s.length&&"number"==typeof s[0]&&"number"==typeof s[1]){for(var l=[],c=s[0],u=0;c<=s[1];c++)l[u++]=String.fromCharCode(c);s=l}}else s=String(s).split("");e=e.slice(),r.width=e[0],r.height=e[1];var h=r.getContext("2d");h.fillStyle="#000",h.fillRect(0,0,r.width,r.height),h.font=o,h.textAlign="center",h.textBaseline="middle",h.fillStyle="#fff";var d=a[0]/2,f=a[1]/2;for(c=0;ce[0]-a[0]/2&&(d=a[0]/2,f+=a[1]);return r}},45250:t=>{"use strict";function e(t,o){o||(o={}),("string"==typeof t||Array.isArray(t))&&(o.family=t);var a=Array.isArray(o.family)?o.family.join(", "):o.family;if(!a)throw Error("`family` must be defined");var s=o.size||o.fontSize||o.em||48,l=o.weight||o.fontWeight||"",c=(t=[o.style||o.fontStyle||"",l,s].join(" ")+"px "+a,o.origin||"top");if(e.cache[a]&&s<=e.cache[a].em)return r(e.cache[a],c);var u=o.canvas||e.canvas,h=u.getContext("2d"),d={upper:void 0!==o.upper?o.upper:"H",lower:void 0!==o.lower?o.lower:"x",descent:void 0!==o.descent?o.descent:"p",ascent:void 0!==o.ascent?o.ascent:"h",tittle:void 0!==o.tittle?o.tittle:"i",overshoot:void 0!==o.overshoot?o.overshoot:"O"},f=Math.ceil(1.5*s);u.height=f,u.width=.5*f,h.font=t;var p="H",m={top:0};h.clearRect(0,0,f,f),h.textBaseline="top",h.fillStyle="black",h.fillText(p,0,0);var g=n(h.getImageData(0,0,f,f));h.clearRect(0,0,f,f),h.textBaseline="bottom",h.fillText(p,0,f);var v=n(h.getImageData(0,0,f,f));m.lineHeight=m.bottom=f-v+g,h.clearRect(0,0,f,f),h.textBaseline="alphabetic",h.fillText(p,0,f);var b=f-n(h.getImageData(0,0,f,f))-1+g;m.baseline=m.alphabetic=b,h.clearRect(0,0,f,f),h.textBaseline="middle",h.fillText(p,0,.5*f);var y=n(h.getImageData(0,0,f,f));m.median=m.middle=f-y-1+g-.5*f,h.clearRect(0,0,f,f),h.textBaseline="hanging",h.fillText(p,0,.5*f);var x=n(h.getImageData(0,0,f,f));m.hanging=f-x-1+g-.5*f,h.clearRect(0,0,f,f),h.textBaseline="ideographic",h.fillText(p,0,f);var _=n(h.getImageData(0,0,f,f));if(m.ideographic=f-_-1+g,d.upper&&(h.clearRect(0,0,f,f),h.textBaseline="top",h.fillText(d.upper,0,0),m.upper=n(h.getImageData(0,0,f,f)),m.capHeight=m.baseline-m.upper),d.lower&&(h.clearRect(0,0,f,f),h.textBaseline="top",h.fillText(d.lower,0,0),m.lower=n(h.getImageData(0,0,f,f)),m.xHeight=m.baseline-m.lower),d.tittle&&(h.clearRect(0,0,f,f),h.textBaseline="top",h.fillText(d.tittle,0,0),m.tittle=n(h.getImageData(0,0,f,f))),d.ascent&&(h.clearRect(0,0,f,f),h.textBaseline="top",h.fillText(d.ascent,0,0),m.ascent=n(h.getImageData(0,0,f,f))),d.descent&&(h.clearRect(0,0,f,f),h.textBaseline="top",h.fillText(d.descent,0,0),m.descent=i(h.getImageData(0,0,f,f))),d.overshoot){h.clearRect(0,0,f,f),h.textBaseline="top",h.fillText(d.overshoot,0,0);var w=i(h.getImageData(0,0,f,f));m.overshoot=w-b}for(var k in m)m[k]/=s;return m.em=s,e.cache[a]=m,r(m,c)}function r(t,e){var r={};for(var n in"string"==typeof e&&(e=t[e]),t)"em"!==n&&(r[n]=t[n]-e);return r}function n(t){for(var e=t.height,r=t.data,n=3;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}t.exports=e,e.canvas=document.createElement("canvas"),e.cache={}},85573:(t,e,r)=>{"use strict";var n=r(60245),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===i.call(t)?function(t,e,r){for(var n=0,i=t.length;n{"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n{"use strict";var n=r(5438);t.exports=Function.prototype.bind||n},64487:t=>{t.exports=function(t,e){if("string"!=typeof t)throw new TypeError("must specify type string");if(e=e||{},"undefined"==typeof document&&!e.canvas)return null;var r=e.canvas||document.createElement("canvas");"number"==typeof e.width&&(r.width=e.width),"number"==typeof e.height&&(r.height=e.height);var n,i=e;try{var o=[t];0===t.indexOf("webgl")&&o.push("experimental-"+t);for(var a=0;a{"use strict";var n,i=r(94234),o=r(33674),a=r(8975),s=r(59299),l=r(66367),c=r(48744),u=r(63432),h=Function,d=function(t){try{return h('"use strict"; return ('+t+").constructor;")()}catch(t){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(t){f=null}var p=function(){throw new c},m=f?function(){try{return p}catch(t){try{return f(arguments,"callee").get}catch(t){return p}}}():p,g=r(23266)(),v=r(39681)(),b=Object.getPrototypeOf||(v?function(t){return t.__proto__}:null),y={},x="undefined"!=typeof Uint8Array&&b?b(Uint8Array):n,_={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":y,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":l,"%ThrowTypeError%":m,"%TypedArray%":x,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(b)try{null.error}catch(t){var w=b(b(t));_["%Error.prototype%"]=w}var k=function t(e){var r;if("%AsyncFunction%"===e)r=d("async function () {}");else if("%GeneratorFunction%"===e)r=d("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=d("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&b&&(r=b(i.prototype))}return _[e]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},M=r(35366),T=r(19942),S=M.call(Function.call,Array.prototype.concat),C=M.call(Function.apply,Array.prototype.splice),E=M.call(Function.call,String.prototype.replace),L=M.call(Function.call,String.prototype.slice),z=M.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,I=function(t,e){var r,n=t;if(T(A,n)&&(n="%"+(r=A[n])[0]+"%"),T(_,n)){var i=_[n];if(i===y&&(i=k(n)),void 0===i&&!e)throw new c("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new l("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new c('"allowMissing" argument must be a boolean');if(null===z(/^%?[^%]*%?$/,t))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=L(t,0,1),r=L(t,-1);if("%"===e&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new l("invalid intrinsic syntax, expected opening `%`");var n=[];return E(t,O,(function(t,e,r,i){n[n.length]=r?E(i,D,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=I("%"+n+"%",e),o=i.name,a=i.value,s=!1,u=i.alias;u&&(n=u[0],C(r,S([0,1],u)));for(var h=1,d=!0;h=r.length){var v=f(a,p);a=(d=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:a[p]}else d=T(a,p),a=a[p];d&&!s&&(_[o]=a)}}return a}},4813:t=>{t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],f=e[11],p=e[12],m=e[13],g=e[14],v=e[15];return t[0]=s*(d*v-f*g)-h*(l*v-c*g)+m*(l*f-c*d),t[1]=-(n*(d*v-f*g)-h*(i*v-o*g)+m*(i*f-o*d)),t[2]=n*(l*v-c*g)-s*(i*v-o*g)+m*(i*c-o*l),t[3]=-(n*(l*f-c*d)-s*(i*f-o*d)+h*(i*c-o*l)),t[4]=-(a*(d*v-f*g)-u*(l*v-c*g)+p*(l*f-c*d)),t[5]=r*(d*v-f*g)-u*(i*v-o*g)+p*(i*f-o*d),t[6]=-(r*(l*v-c*g)-a*(i*v-o*g)+p*(i*c-o*l)),t[7]=r*(l*f-c*d)-a*(i*f-o*d)+u*(i*c-o*l),t[8]=a*(h*v-f*m)-u*(s*v-c*m)+p*(s*f-c*h),t[9]=-(r*(h*v-f*m)-u*(n*v-o*m)+p*(n*f-o*h)),t[10]=r*(s*v-c*m)-a*(n*v-o*m)+p*(n*c-o*s),t[11]=-(r*(s*f-c*h)-a*(n*f-o*h)+u*(n*c-o*s)),t[12]=-(a*(h*g-d*m)-u*(s*g-l*m)+p*(s*d-l*h)),t[13]=r*(h*g-d*m)-u*(n*g-i*m)+p*(n*d-i*h),t[14]=-(r*(s*g-l*m)-a*(n*g-i*m)+p*(n*l-i*s)),t[15]=r*(s*d-l*h)-a*(n*d-i*h)+u*(n*l-i*s),t}},1903:t=>{t.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},42981:t=>{t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},46864:t=>{t.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},49921:t=>{t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11],f=t[12],p=t[13],m=t[14],g=t[15];return(e*a-r*o)*(h*g-d*m)-(e*s-n*o)*(u*g-d*p)+(e*l-i*o)*(u*m-h*p)+(r*s-n*a)*(c*g-d*f)-(r*l-i*a)*(c*m-h*f)+(n*l-i*s)*(c*p-u*f)}},17399:t=>{t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=r+r,s=n+n,l=i+i,c=r*a,u=n*a,h=n*s,d=i*a,f=i*s,p=i*l,m=o*a,g=o*s,v=o*l;return t[0]=1-h-p,t[1]=u+v,t[2]=d-g,t[3]=0,t[4]=u-v,t[5]=1-c-p,t[6]=f+m,t[7]=0,t[8]=d+g,t[9]=f-m,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},7354:t=>{t.exports=function(t,e,r){var n,i,o,a=r[0],s=r[1],l=r[2],c=Math.sqrt(a*a+s*s+l*l);return Math.abs(c)<1e-6?null:(a*=c=1/c,s*=c,l*=c,n=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=s*a*o+l*n,t[2]=l*a*o-s*n,t[3]=0,t[4]=a*s*o-l*n,t[5]=s*s*o+i,t[6]=l*s*o+a*n,t[7]=0,t[8]=a*l*o+s*n,t[9]=s*l*o-a*n,t[10]=l*l*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}},76743:t=>{t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3],s=n+n,l=i+i,c=o+o,u=n*s,h=n*l,d=n*c,f=i*l,p=i*c,m=o*c,g=a*s,v=a*l,b=a*c;return t[0]=1-(f+m),t[1]=h+b,t[2]=d-v,t[3]=0,t[4]=h-b,t[5]=1-(u+m),t[6]=p+g,t[7]=0,t[8]=d+v,t[9]=p-g,t[10]=1-(u+f),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}},90367:t=>{t.exports=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},68673:t=>{t.exports=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}},80180:t=>{t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},68727:t=>{t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},96402:t=>{t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},29192:t=>{t.exports=function(t,e,r,n,i,o,a){var s=1/(r-e),l=1/(i-n),c=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(r+e)*s,t[9]=(i+n)*l,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t}},87894:t=>{t.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},79538:(t,e,r)=>{t.exports={create:r(46864),clone:r(1903),copy:r(42981),identity:r(87894),transpose:r(45665),invert:r(27608),adjoint:r(4813),determinant:r(49921),multiply:r(66760),translate:r(77656),scale:r(62504),rotate:r(26079),rotateX:r(15567),rotateY:r(52408),rotateZ:r(27089),fromRotation:r(7354),fromRotationTranslation:r(76743),fromScaling:r(90367),fromTranslation:r(68673),fromXRotation:r(80180),fromYRotation:r(68727),fromZRotation:r(96402),fromQuat:r(17399),frustum:r(29192),perspective:r(4772),perspectiveFromFieldOfView:r(11882),ortho:r(74040),lookAt:r(66582),str:r(65213)}},27608:t=>{t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],f=e[11],p=e[12],m=e[13],g=e[14],v=e[15],b=r*s-n*a,y=r*l-i*a,x=r*c-o*a,_=n*l-i*s,w=n*c-o*s,k=i*c-o*l,A=u*m-h*p,M=u*g-d*p,T=u*v-f*p,S=h*g-d*m,C=h*v-f*m,E=d*v-f*g,L=b*E-y*C+x*S+_*T-w*M+k*A;return L?(L=1/L,t[0]=(s*E-l*C+c*S)*L,t[1]=(i*C-n*E-o*S)*L,t[2]=(m*k-g*w+v*_)*L,t[3]=(d*w-h*k-f*_)*L,t[4]=(l*T-a*E-c*M)*L,t[5]=(r*E-i*T+o*M)*L,t[6]=(g*x-p*k-v*y)*L,t[7]=(u*k-d*x+f*y)*L,t[8]=(a*C-s*T+c*A)*L,t[9]=(n*T-r*C-o*A)*L,t[10]=(p*w-m*x+v*b)*L,t[11]=(h*x-u*w-f*b)*L,t[12]=(s*M-a*S-l*A)*L,t[13]=(r*S-n*M+i*A)*L,t[14]=(m*y-p*_-g*b)*L,t[15]=(u*_-h*y+d*b)*L,t):null}},66582:(t,e,r)=>{var n=r(87894);t.exports=function(t,e,r,i){var o,a,s,l,c,u,h,d,f,p,m=e[0],g=e[1],v=e[2],b=i[0],y=i[1],x=i[2],_=r[0],w=r[1],k=r[2];return Math.abs(m-_)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(v-k)<1e-6?n(t):(h=m-_,d=g-w,f=v-k,o=y*(f*=p=1/Math.sqrt(h*h+d*d+f*f))-x*(d*=p),a=x*(h*=p)-b*f,s=b*d-y*h,(p=Math.sqrt(o*o+a*a+s*s))?(o*=p=1/p,a*=p,s*=p):(o=0,a=0,s=0),l=d*s-f*a,c=f*o-h*s,u=h*a-d*o,(p=Math.sqrt(l*l+c*c+u*u))?(l*=p=1/p,c*=p,u*=p):(l=0,c=0,u=0),t[0]=o,t[1]=l,t[2]=h,t[3]=0,t[4]=a,t[5]=c,t[6]=d,t[7]=0,t[8]=s,t[9]=u,t[10]=f,t[11]=0,t[12]=-(o*m+a*g+s*v),t[13]=-(l*m+c*g+u*v),t[14]=-(h*m+d*g+f*v),t[15]=1,t)}},66760:t=>{t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=e[9],f=e[10],p=e[11],m=e[12],g=e[13],v=e[14],b=e[15],y=r[0],x=r[1],_=r[2],w=r[3];return t[0]=y*n+x*s+_*h+w*m,t[1]=y*i+x*l+_*d+w*g,t[2]=y*o+x*c+_*f+w*v,t[3]=y*a+x*u+_*p+w*b,y=r[4],x=r[5],_=r[6],w=r[7],t[4]=y*n+x*s+_*h+w*m,t[5]=y*i+x*l+_*d+w*g,t[6]=y*o+x*c+_*f+w*v,t[7]=y*a+x*u+_*p+w*b,y=r[8],x=r[9],_=r[10],w=r[11],t[8]=y*n+x*s+_*h+w*m,t[9]=y*i+x*l+_*d+w*g,t[10]=y*o+x*c+_*f+w*v,t[11]=y*a+x*u+_*p+w*b,y=r[12],x=r[13],_=r[14],w=r[15],t[12]=y*n+x*s+_*h+w*m,t[13]=y*i+x*l+_*d+w*g,t[14]=y*o+x*c+_*f+w*v,t[15]=y*a+x*u+_*p+w*b,t}},74040:t=>{t.exports=function(t,e,r,n,i,o,a){var s=1/(e-r),l=1/(n-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(a+o)*c,t[15]=1,t}},4772:t=>{t.exports=function(t,e,r,n,i){var o=1/Math.tan(e/2),a=1/(n-i);return t[0]=o/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*a,t[15]=0,t}},11882:t=>{t.exports=function(t,e,r,n){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(a+s),c=2/(i+o);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(a-s)*l*.5,t[9]=(i-o)*c*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t}},26079:t=>{t.exports=function(t,e,r,n){var i,o,a,s,l,c,u,h,d,f,p,m,g,v,b,y,x,_,w,k,A,M,T,S,C=n[0],E=n[1],L=n[2],z=Math.sqrt(C*C+E*E+L*L);return Math.abs(z)<1e-6?null:(C*=z=1/z,E*=z,L*=z,i=Math.sin(r),a=1-(o=Math.cos(r)),s=e[0],l=e[1],c=e[2],u=e[3],h=e[4],d=e[5],f=e[6],p=e[7],m=e[8],g=e[9],v=e[10],b=e[11],y=C*C*a+o,x=E*C*a+L*i,_=L*C*a-E*i,w=C*E*a-L*i,k=E*E*a+o,A=L*E*a+C*i,M=C*L*a+E*i,T=E*L*a-C*i,S=L*L*a+o,t[0]=s*y+h*x+m*_,t[1]=l*y+d*x+g*_,t[2]=c*y+f*x+v*_,t[3]=u*y+p*x+b*_,t[4]=s*w+h*k+m*A,t[5]=l*w+d*k+g*A,t[6]=c*w+f*k+v*A,t[7]=u*w+p*k+b*A,t[8]=s*M+h*T+m*S,t[9]=l*M+d*T+g*S,t[10]=c*M+f*T+v*S,t[11]=u*M+p*T+b*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}},15567:t=>{t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=e[9],h=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*n,t[5]=a*i+u*n,t[6]=s*i+h*n,t[7]=l*i+d*n,t[8]=c*i-o*n,t[9]=u*i-a*n,t[10]=h*i-s*n,t[11]=d*i-l*n,t}},52408:t=>{t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],a=e[1],s=e[2],l=e[3],c=e[8],u=e[9],h=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*n,t[1]=a*i-u*n,t[2]=s*i-h*n,t[3]=l*i-d*n,t[8]=o*n+c*i,t[9]=a*n+u*i,t[10]=s*n+h*i,t[11]=l*n+d*i,t}},27089:t=>{t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],a=e[1],s=e[2],l=e[3],c=e[4],u=e[5],h=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*n,t[1]=a*i+u*n,t[2]=s*i+h*n,t[3]=l*i+d*n,t[4]=c*i-o*n,t[5]=u*i-a*n,t[6]=h*i-s*n,t[7]=d*i-l*n,t}},62504:t=>{t.exports=function(t,e,r){var n=r[0],i=r[1],o=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},65213:t=>{t.exports=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}},77656:t=>{t.exports=function(t,e,r){var n,i,o,a,s,l,c,u,h,d,f,p,m=r[0],g=r[1],v=r[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*v+e[12],t[13]=e[1]*m+e[5]*g+e[9]*v+e[13],t[14]=e[2]*m+e[6]*g+e[10]*v+e[14],t[15]=e[3]*m+e[7]*g+e[11]*v+e[15]):(n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=e[9],f=e[10],p=e[11],t[0]=n,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=h,t[9]=d,t[10]=f,t[11]=p,t[12]=n*m+s*g+h*v+e[12],t[13]=i*m+l*g+d*v+e[13],t[14]=o*m+c*g+f*v+e[14],t[15]=a*m+u*g+p*v+e[15]),t}},45665:t=>{t.exports=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},69499:(t,e,r)=>{"use strict";var n=r(82393),i=r(9994),o=r(83029),a=r(6627),s=r(41456),l=r(34463),c=r(81937),u=r(31888),h=r(94698),d=r(35867),f=r(3202),p=r(70665),m=r(3812),g=r(34597),v=r(45250),b=r(97e3),y=r(88828).nextPow2,x=new s,_=!1;if(document.body){var w=document.body.appendChild(document.createElement("div"));w.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(w).fontStretch&&(_=!0),document.body.removeChild(w)}var k=function(t){!function(t){return"function"==typeof t&&t._gl&&t.prop&&t.texture&&t.buffer}(t)?this.gl=a(t):(t={regl:t},this.gl=t.regl._gl),this.shader=x.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||o({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),x.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(d(t)?t:{})};k.prototype.createShader=function(){var t=this.regl,e=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop("count"),offset:t.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this("sizeBuffer")},width:{offset:0,stride:8,buffer:t.this("sizeBuffer")},char:t.this("charBuffer"),position:t.this("position")},uniforms:{atlasSize:function(t,e){return[e.atlas.width,e.atlas.height]},atlasDim:function(t,e){return[e.atlas.cols,e.atlas.rows]},atlas:function(t,e){return e.atlas.texture},charStep:function(t,e){return e.atlas.step},em:function(t,e){return e.atlas.em},color:t.prop("color"),opacity:t.prop("opacity"),viewport:t.this("viewportArray"),scale:t.this("scale"),align:t.prop("align"),baseline:t.prop("baseline"),translate:t.this("translate"),positionOffset:t.prop("positionOffset")},primitive:"points",viewport:t.this("viewport"),vert:"\n\t\t\tprecision highp float;\n\t\t\tattribute float width, charOffset, char;\n\t\t\tattribute vec2 position;\n\t\t\tuniform float fontSize, charStep, em, align, baseline;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform vec4 color;\n\t\t\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvoid main () {\n\t\t\t\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\n\t\t\t\t\t+ vec2(positionOffset.x, -positionOffset.y)))\n\t\t\t\t\t/ (viewport.zw * scale.xy);\n\n\t\t\t\tvec2 position = (position + translate) * scale;\n\t\t\t\tposition += offset * scale;\n\n\t\t\t\tcharCoord = position * viewport.zw + viewport.xy;\n\n\t\t\t\tgl_Position = vec4(position * 2. - 1., 0, 1);\n\n\t\t\t\tgl_PointSize = charStep;\n\n\t\t\t\tcharId.x = mod(char, atlasDim.x);\n\t\t\t\tcharId.y = floor(char / atlasDim.x);\n\n\t\t\t\tcharWidth = width * em;\n\n\t\t\t\tfontColor = color / 255.;\n\t\t\t}",frag:"\n\t\t\tprecision highp float;\n\t\t\tuniform float fontSize, charStep, opacity;\n\t\t\tuniform vec2 atlasSize;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform sampler2D atlas;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\n\t\t\tfloat lightness(vec4 color) {\n\t\t\t\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\n\t\t\t}\n\n\t\t\tvoid main () {\n\t\t\t\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\n\t\t\t\tfloat halfCharStep = floor(charStep * .5 + .5);\n\n\t\t\t\t// invert y and shift by 1px (FF expecially needs that)\n\t\t\t\tuv.y = charStep - uv.y;\n\n\t\t\t\t// ignore points outside of character bounding box\n\t\t\t\tfloat halfCharWidth = ceil(charWidth * .5);\n\t\t\t\tif (floor(uv.x) > halfCharStep + halfCharWidth ||\n\t\t\t\t\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\n\n\t\t\t\tuv += charId * charStep;\n\t\t\t\tuv = uv / atlasSize;\n\n\t\t\t\tvec4 color = fontColor;\n\t\t\t\tvec4 mask = texture2D(atlas, uv);\n\n\t\t\t\tfloat maskY = lightness(mask);\n\t\t\t\t// float colorY = lightness(color);\n\t\t\t\tcolor.a *= maskY;\n\t\t\t\tcolor.a *= opacity;\n\n\t\t\t\t// color.a += .1;\n\n\t\t\t\t// antialiasing, see yiq color space y-channel formula\n\t\t\t\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n\n\t\t\t\tgl_FragColor = color;\n\t\t\t}"});return{regl:t,draw:e,atlas:{}}},k.prototype.update=function(t){var e=this;if("string"==typeof t)t={text:t};else if(!t)return;null!=(t=i(t,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0)).opacity&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map((function(t){return parseFloat(t)})):this.opacity=parseFloat(t.opacity)),null!=t.viewport&&(this.viewport=h(t.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=t.kerning&&(this.kerning=t.kerning),null!=t.offset&&("number"==typeof t.offset&&(t.offset=[t.offset,0]),this.positionOffset=b(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||t.font||(t.font=k.baseFontSize+"px sans-serif");var r,o=!1,a=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach((function(t,r){if("string"==typeof t)try{t=n.parse(t)}catch(e){t=n.parse(k.baseFontSize+"px "+t)}else{var i=t.style,s=t.weight,l=t.stretch,c=t.variant;t=n.parse(n.stringify(t)),i&&(t.style=i),s&&(t.weight=s),l&&(t.stretch=l),c&&(t.variant=c)}var u=n.stringify({size:k.baseFontSize,family:t.family,stretch:_?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style}),h=f(t.size),d=Math.round(h[0]*p(h[1]));if(d!==e.fontSize[r]&&(a=!0,e.fontSize[r]=d),!(e.font[r]&&u==e.font[r].baseString||(o=!0,e.font[r]=k.fonts[u],e.font[r]))){var m=t.family.join(", "),g=[t.style];t.style!=t.variant&&g.push(t.variant),t.variant!=t.weight&&g.push(t.weight),_&&t.weight!=t.stretch&&g.push(t.stretch),e.font[r]={baseString:u,family:m,weight:t.weight,stretch:t.stretch,style:t.style,variant:t.variant,width:{},kerning:{},metrics:v(m,{origin:"top",fontSize:k.baseFontSize,fontStyle:g.join(" ")})},k.fonts[u]=e.font[r]}})),(o||a)&&this.font.forEach((function(r,i){var o=n.stringify({size:e.fontSize[i],family:r.family,stretch:_?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(e.fontAtlas[i]=e.shader.atlas[o],!e.fontAtlas[i]){var a=r.metrics;e.shader.atlas[o]=e.fontAtlas[i]={fontString:o,step:2*Math.ceil(e.fontSize[i]*a.bottom*.5),em:e.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:e.regl.texture()}}null==t.text&&(t.text=e.text)})),"string"==typeof t.text&&t.position&&t.position.length>2){for(var s=Array(.5*t.position.length),d=0;d2){for(var w=!t.position[0].length,A=u.mallocFloat(2*this.count),M=0,T=0;M1?e.align[r]:e.align[0]:e.align;if("number"==typeof n)return n;switch(n){case"right":case"end":return-t;case"center":case"centre":case"middle":return.5*-t}return 0}))),null==this.baseline&&null==t.baseline&&(t.baseline=0),null!=t.baseline&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(t,r){var n=(e.font[r]||e.font[0]).metrics,i=0;return i+=.5*n.bottom,-1*(i+="number"==typeof t?t-n.baseline:-n[t])}))),null!=t.color)if(t.color||(t.color="transparent"),"string"!=typeof t.color&&isNaN(t.color)){var H;if("number"==typeof t.color[0]&&t.color.length>this.counts.length){var W=t.color.length;H=u.mallocUint8(W);for(var q=(t.color.subarray||t.color.slice).bind(t.color),Y=0;Y4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var $=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array($);for(var J=0;J1?this.counts[J]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[J]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*J,4*J+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[J]:this.opacity,baseline:null!=this.baselineOffset[J]?this.baselineOffset[J]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[J]?this.alignOffset[J]:this.alignOffset[0]:0,atlas:this.fontAtlas[J]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*J,2*J+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},k.prototype.destroy=function(){},k.prototype.kerning=!0,k.prototype.position={constant:new Float32Array(2)},k.prototype.translate=null,k.prototype.scale=null,k.prototype.font=null,k.prototype.text="",k.prototype.positionOffset=[0,0],k.prototype.opacity=1,k.prototype.color=new Uint8Array([0,0,0,255]),k.prototype.alignOffset=[0,0],k.maxAtlasSize=1024,k.atlasCanvas=document.createElement("canvas"),k.atlasContext=k.atlasCanvas.getContext("2d",{alpha:!1}),k.baseFontSize=64,k.fonts={},t.exports=k},6627:(t,e,r)=>{"use strict";var n=r(9994);function i(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*r.g.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*r.g.innerHeight);else{var e=t.container.getBoundingClientRect();t.canvas.width=t.width||e.right-e.left,t.canvas.height=t.height||e.bottom-e.top}}function o(t){return"function"==typeof t.getContext&&"width"in t&&"height"in t}function a(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}t.exports=function(t){var e;if(t?"string"==typeof t&&(t={container:t}):t={},(t=o(t)||"string"==typeof(e=t).nodeName&&"function"==typeof e.appendChild&&"function"==typeof e.getBoundingClientRect?{container:t}:function(t){return"function"==typeof t.drawArrays||"function"==typeof t.drawElements}(t)?{gl:t}:n(t,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0)).pixelRatio||(t.pixelRatio=r.g.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if("string"==typeof t.container){var s=document.querySelector(t.container);if(!s)throw Error("Element "+t.container+" is not found");t.container=s}o(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=a(),t.container.appendChild(t.canvas),i(t))}else if(!t.canvas){if("undefined"==typeof document)throw Error("Not DOM environment. Use headless-gl.");t.container=document.body||document.documentElement,t.canvas=a(),t.container.appendChild(t.canvas),i(t)}return t.gl||["webgl","experimental-webgl","webgl-experimental"].some((function(e){try{t.gl=t.canvas.getContext(e,t.attrs)}catch(t){}return t.gl})),t.gl}},43236:t=>{t.exports=function(t){"string"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n{"use strict";var n=r(59412)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},56885:(t,e,r)=>{"use strict";var n,i=r(41888);n="function"==typeof r.g.matchMedia?!r.g.matchMedia("(hover: none)").matches:i,t.exports=n},17520:(t,e,r)=>{"use strict";var n=r(41888);t.exports=n&&function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){t=!1}return t}()},20419:(t,e,r)=>{"use strict";var n=r(38232),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=i},39681:t=>{"use strict";var e={__proto__:null,foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof r)}},23266:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(93272);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},93272:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},15541:(t,e,r)=>{"use strict";var n=r(93272);t.exports=function(){return n()&&!!Symbol.toStringTag}},19942:(t,e,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(35366);t.exports=o.call(n,i)},23778:(t,e)=>{e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,l=(1<>1,u=-7,h=r?i-1:0,d=r?-1:1,f=t[e+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+t[e+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+t[e+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=c}return(f?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(e*l-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[r+f]=255&s,f+=p,s/=256,i-=8);for(a=a<0;t[r+f]=255&a,f+=p,a/=256,c-=8);t[r+f-p]|=128*m}},9715:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},68007:(t,e,r)=>{"use strict";var n=r(15541)(),i=r(24310)("Object.prototype.toString"),o=function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===i(t)},a=function(t){return!!o(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,t.exports=s?o:a},41888:t=>{t.exports=!0},60245:t=>{"use strict";var e,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,e)}catch(t){t!==r&&(i=null)}else i=null;var o=/^\s*class\b/,a=function(t){try{var e=n.call(t);return o.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},l=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),h=function(){return!1};if("object"==typeof document){var d=document.all;l.call(d)===l.call(document.all)&&(h=function(t){if((u||!t)&&(void 0===t||"object"==typeof t))try{var e=l.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=i?function(t){if(h(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{i(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(h(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return s(t);if(a(t))return!1;var e=l.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},74205:(t,e,r)=>{"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=r(15541)(),l=Object.getPrototypeOf;t.exports=function(t){if("function"!=typeof t)return!1;if(a.test(o.call(t)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(t);if(!l)return!1;if(void 0===n){var e=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(t){}}();n=!!e&&l(e)}return l(t)===n}},47691:t=>{"use strict";t.exports="undefined"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},12431:t=>{"use strict";t.exports=i,t.exports.isMobile=i,t.exports.default=i;const e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(t){t||(t={});let i=t.ua;if(i||"undefined"==typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"==typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!=typeof i)return!1;let o=e.test(i)&&!r.test(i)||!!t.tablet&&n.test(i);return!o&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(o=!0),o}},87266:t=>{"use strict";t.exports=function(t){return t!=t}},74858:(t,e,r)=>{"use strict";var n=r(61398),i=r(10781),o=r(87266),a=r(29419),s=r(50317),l=n(a(),Number);i(l,{getPolyfill:a,implementation:o,shim:s}),t.exports=l},29419:(t,e,r)=>{"use strict";var n=r(87266);t.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},50317:(t,e,r)=>{"use strict";var n=r(10781),i=r(29419);t.exports=function(){var t=i();return n(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},23754:t=>{"use strict";t.exports=function(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}},35867:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r;return"[object Object]"===e.call(t)&&(null===(r=Object.getPrototypeOf(t))||r===Object.getPrototypeOf({}))}},45219:t=>{"use strict";t.exports=function(t){for(var e,r=t.length,n=0;n13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},12611:t=>{"use strict";t.exports=function(t){return"string"==typeof t&&(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}},94179:(t,e,r)=>{"use strict";var n=r(17478);t.exports=function(t){return!!n(t)}},54387:t=>{"use strict";t.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},10024:t=>{var e={left:0,top:0};t.exports=function(t,r,n){r=r||t.currentTarget||t.srcElement,Array.isArray(n)||(n=[0,0]);var i,o=t.clientX||0,a=t.clientY||0,s=(i=r)===window||i===document||i===document.body?e:i.getBoundingClientRect();return n[0]=o-s.left,n[1]=a-s.top,n}},60613:function(t,e,r){var n;!function(i,o,a){o[i]=o[i]||function(){"use strict";var t,e,r,n=Object.prototype.toString,i="undefined"!=typeof setImmediate?function(t){return setImmediate(t)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(t,e,r,n){return Object.defineProperty(t,e,{value:r,writable:!0,configurable:!1!==n})}}catch(e){t=function(t,e,r){return t[e]=r,t}}function o(t,n){r.add(t,n),e||(e=i(r.drain))}function a(t){var e,r=typeof t;return null==t||"object"!=r&&"function"!=r||(e=t.then),"function"==typeof e&&e}function s(){for(var t=0;t0&&o(s,r))}catch(t){u.call(new d(r),t)}}}function u(t){var e=this;e.triggered||(e.triggered=!0,e.def&&(e=e.def),e.msg=t,e.state=2,e.chain.length>0&&o(s,e))}function h(t,e,r,n){for(var i=0;i{var e=Math.PI,r=s(120);function n(t,e,r,n){return["C",t,e,r,n,r,n]}function i(t,e,r,n,i,o){return["C",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,o/3+2/3*n,i,o]}function o(t,n,i,s,l,c,u,h,d,f){if(f)k=f[0],A=f[1],_=f[2],w=f[3];else{var p=a(t,n,-l);t=p.x,n=p.y;var m=(t-(h=(p=a(h,d,-l)).x))/2,g=(n-(d=p.y))/2,v=m*m/(i*i)+g*g/(s*s);v>1&&(i*=v=Math.sqrt(v),s*=v);var b=i*i,y=s*s,x=(c==u?-1:1)*Math.sqrt(Math.abs((b*y-b*g*g-y*m*m)/(b*g*g+y*m*m)));x==1/0&&(x=1);var _=x*i*g/s+(t+h)/2,w=x*-s*m/i+(n+d)/2,k=Math.asin(((n-w)/s).toFixed(9)),A=Math.asin(((d-w)/s).toFixed(9));(k=t<_?e-k:k)<0&&(k=2*e+k),(A=h<_?e-A:A)<0&&(A=2*e+A),u&&k>A&&(k-=2*e),!u&&A>k&&(A-=2*e)}if(Math.abs(A-k)>r){var M=A,T=h,S=d;A=k+r*(u&&A>k?1:-1);var C=o(h=_+i*Math.cos(A),d=w+s*Math.sin(A),i,s,l,0,u,T,S,[A,M,_,w])}var E=Math.tan((A-k)/4),L=4/3*i*E,z=4/3*s*E,O=[2*t-(t+L*Math.sin(k)),2*n-(n-z*Math.cos(k)),h+L*Math.sin(A),d-z*Math.cos(A),h,d];if(f)return O;C&&(O=O.concat(C));for(var D=0;D7&&(r.push(v.splice(0,7)),v.unshift("C"));break;case"S":var y=f,x=p;"C"!=e&&"S"!=e||(y+=y-a,x+=x-l),v=["C",y,x,v[1],v[2],v[3],v[4]];break;case"T":"Q"==e||"T"==e?(h=2*f-h,d=2*p-d):(h=f,d=p),v=i(f,p,h,d,v[1],v[2]);break;case"Q":h=v[1],d=v[2],v=i(f,p,v[1],v[2],v[3],v[4]);break;case"L":v=n(f,p,v[1],v[2]);break;case"H":v=n(f,p,v[1],p);break;case"V":v=n(f,p,f,v[1]);break;case"Z":v=n(f,p,c,u)}e=b,f=v[v.length-2],p=v[v.length-1],v.length>4?(a=v[v.length-4],l=v[v.length-3]):(a=f,l=p),r.push(v)}return r}},34597:t=>{"use strict";var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,i){for(var o,a,s=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l{"use strict";var e=function(t){return t!=t};t.exports=function(t,r){return 0===t&&0===r?1/t==1/r:t===r||!(!e(t)||!e(r))}},62956:(t,e,r)=>{"use strict";var n=r(10781),i=r(61398),o=r(36560),a=r(43765),s=r(6723),l=i(a(),Object);n(l,{getPolyfill:a,implementation:o,shim:s}),t.exports=l},43765:(t,e,r)=>{"use strict";var n=r(36560);t.exports=function(){return"function"==typeof Object.is?Object.is:n}},6723:(t,e,r)=>{"use strict";var n=r(43765),i=r(10781);t.exports=function(){var t=n();return i(Object,{is:t},{is:function(){return Object.is!==t}}),t}},77908:(t,e,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=r(12724),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],h=function(t){var e=t.constructor;return e&&e.prototype===t},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!d["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{h(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===o.call(t),n=a(t),s=e&&"[object String]"===o.call(t),d=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=c&&r;if(s&&t.length>0&&!i.call(t,0))for(var m=0;m0)for(var g=0;g{"use strict";var n=Array.prototype.slice,i=r(12724),o=Object.keys,a=o?function(t){return o(t)}:r(77908),s=Object.keys;a.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return i(t)?s(n.call(t)):s(t)})}else Object.keys=a;return Object.keys||a},t.exports=a},12724:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},99864:(t,e,r)=>{"use strict";var n=r(99952),i=r(93272)(),o=r(24310),a=Object,s=o("Array.prototype.push"),l=o("Object.prototype.propertyIsEnumerable"),c=i?Object.getOwnPropertySymbols:null;t.exports=function(t,e){if(null==t)throw new TypeError("target must be an object");var r=a(t);if(1===arguments.length)return r;for(var o=1;o{"use strict";var n=r(99864);t.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),r={},n=0;n{"use strict";function e(t,e){if("string"!=typeof t)return[t];var r=[t];"string"==typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var n=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],i=e.escape||"___",o=!!e.flat;n.forEach((function(t){var e=new RegExp(["\\",t[0],"[^\\",t[0],"\\",t[1],"]*\\",t[1]].join("")),n=[];function o(e,o,a){var s=r.push(e.slice(t[0].length,-t[1].length))-1;return n.push(s),i+s+i}r.forEach((function(t,n){for(var i,a=0;t!=i;)if(i=t,t=t.replace(e,o),a++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=t})),n=n.reverse(),r=r.map((function(e){return n.forEach((function(r){e=e.replace(new RegExp("(\\"+i+r+"\\"+i+")","g"),t[0]+"$1"+t[1])})),e}))}));var a=new RegExp("\\"+i+"([0-9]+)\\"+i);return o?r:function t(e,r,n){for(var i,o=[],s=0;i=a.exec(e);){if(s++>1e4)throw Error("Circular references in parenthesis");o.push(e.slice(0,i.index)),o.push(t(r[i[1]],r)),e=e.slice(i.index+i[0].length)}return o.push(e),o}(r[0],r)}function r(t,e){if(e&&e.flat){var r,n=e&&e.escape||"___",i=t[0];if(!i)return"";for(var o=new RegExp("\\"+n+"([0-9]+)\\"+n),a=0;i!=r;){if(a++>1e4)throw Error("Circular references in "+t);r=i,i=i.replace(o,s)}return i}return t.reduce((function t(e,r){return Array.isArray(r)&&(r=r.reduce(t,"")),e+r}),"");function s(e,r){if(null==t[r])throw Error("Reference "+r+"is undefined");return t[r]}}function n(t,n){return Array.isArray(t)?r(t,n):e(t,n)}n.parse=e,n.stringify=r,t.exports=n},94698:(t,e,r)=>{"use strict";var n=r(9994);t.exports=function(t){var e;return arguments.length>1&&(t=arguments),"string"==typeof t?t=t.split(/\s/).map(parseFloat):"number"==typeof t&&(t=[t]),t.length&&"number"==typeof t[0]?e=1===t.length?{width:t[0],height:t[0],x:0,y:0}:2===t.length?{width:t[0],height:t[1],x:0,y:0}:{x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&&(e={x:(t=n(t,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"})).left||0,y:t.top||0},null==t.width?t.right?e.width=t.right-e.x:e.width=0:e.width=t.width,null==t.height?t.bottom?e.height=t.bottom-e.y:e.height=0:e.height=t.height),e}},37974:t=>{t.exports=function(t){var i=[];return t.replace(r,(function(t,r,o){var a=r.toLowerCase();for(o=function(t){var e=t.match(n);return e?e.map(Number):[]}(o),"m"==a&&o.length>2&&(i.push([r].concat(o.splice(0,2))),a="l",r="m"==r?"l":"L");;){if(o.length==e[a])return o.unshift(r),i.push(o);if(o.length{t.exports=function(t,e){e||(e=[0,""]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},9994:t=>{"use strict";t.exports=function(t,e,n){var i,o,a={};if("string"==typeof e&&(e=r(e)),Array.isArray(e)){var s={};for(o=0;o{"use strict";var n=r(12822),i={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var o in i){var a=o.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(a,i[o])}},12028:(t,e,r)=>{"use strict";t.exports=r(7623)},72010:(t,e,r)=>{"use strict";t.exports=r(46443)},94646:(t,e,r)=>{"use strict";t.exports=r(88479)},91208:t=>{"use strict";t.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},77061:(t,e,r)=>{"use strict";var n=r(91208),i=r(75058),o=r(21197),a=r(46121).templatedArray,s=r(53644);function l(t){return["In order for absolute positioning of the arrow to work, *a"+t+"ref* must be exactly the same as *"+t+"ref*, otherwise *a"+t+"ref* will revert to *pixel* (explained next).","For relative positioning, *a"+t+"ref* can be set to *pixel*,","in which case the *a"+t+"* value is specified in pixels","relative to *"+t+"*.","Absolute positioning is useful","for trendline annotations which should continue to indicate","the correct trend when zoomed. Relative positioning is useful","for specifying the text offset for an annotated point."].join(" ")}function c(t,e,r){return["Sets the",t,"component of the arrow tail about the arrow head.","If `a"+t+"ref` is `pixel`, a positive (negative)","component corresponds to an arrow pointing","from",r,"to",e,"("+e,"to",r+").","If `a"+t+"ref` is not `pixel` and is exactly the same as `"+t+"ref`,","this is an absolute value on that axis,","like `"+t+"`, specified in the same coordinates as `"+t+"ref`."].join(" ")}t.exports=a("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not this annotation is visible."].join(" ")},text:{valType:"string",editType:"calc+arraydraw",description:["Sets the text associated with this annotation.","Plotly uses a subset of HTML tags to do things like","newline (
), bold (), italics (),","hyperlinks (). Tags , , "," are also supported."].join(" ")},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw",description:["Sets the angle at which the `text` is drawn","with respect to the horizontal."].join(" ")},font:i({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the annotation text font."}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit width for the text box. null (default) lets the","text set the box width. Wider text will be clipped.","There is no automatic wrapping; use
to start a new line."].join(" ")},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit height for the text box. null (default) lets the","text set the box height. Taller text will be clipped."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the annotation (text + arrow)."},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw",description:["Sets the horizontal alignment of the `text` within the box.","Has an effect only if `text` spans two or more lines","(i.e. `text` contains one or more
HTML tags) or if an","explicit width is set to override the text width."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw",description:["Sets the vertical alignment of the `text` within the box.","Has an effect only if an explicit height is set to override","the text height."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:"Sets the background color of the annotation."},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color of the border enclosing the annotation `text`."].join(" ")},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the padding (in px) between the `text`","and the enclosing border."].join(" ")},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the width (in px) of the border enclosing","the annotation `text`."].join(" ")},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not the annotation is drawn with an arrow.","If *true*, `text` is placed near the arrow's tail.","If *false*, `text` lines up with the `x` and `y` provided."].join(" ")},arrowcolor:{valType:"color",editType:"arraydraw",description:"Sets the color of the annotation arrow."},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw",description:"Sets the start annotation arrow head style."},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw",description:"Sets the annotation arrow head position."},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the end annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the start annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw",description:"Sets the width (in px) of annotation arrow line."},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the end arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the start arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},ax:{valType:"any",editType:"calc+arraydraw",description:[c("x","left","right")].join(" ")},ay:{valType:"any",editType:"calc+arraydraw",description:[c("y","top","bottom")].join(" ")},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.x.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",s.axisRefDescription("x","left","right"),l("x")].join(" ")},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.y.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",s.axisRefDescription("y","bottom","top"),l("y")].join(" ")},xref:{valType:"enumerated",values:["paper",o.idRegex.x.toString()],editType:"calc",description:["Sets the annotation's x coordinate axis.",s.axisRefDescription("x","left","right")].join(" ")},x:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's x position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's horizontal position anchor","This anchor binds the `x` position to the *left*, *center*","or *right* of the annotation.","For example, if `x` is set to 1, `xref` to *paper* and","`xanchor` to *right* then the right-most portion of the","annotation lines up with the right-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *center* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow to the","right (positive) or left (negative) by this many pixels."].join(" ")},yref:{valType:"enumerated",values:["paper",o.idRegex.y.toString()],editType:"calc",description:["Sets the annotation's y coordinate axis.",s.axisRefDescription("y","bottom","top")].join(" ")},y:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's y position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the annotation.","For example, if `y` is set to 1, `yref` to *paper* and","`yanchor` to *top* then the top-most portion of the","annotation lines up with the top-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *middle* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow up","(positive) or down (negative) by this many pixels."].join(" ")},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw",description:["Makes this annotation respond to clicks on the plot.","If you click a data point that exactly matches the `x` and `y`","values of this annotation, and it is hidden (visible: false),","it will appear. In *onoff* mode, you must click the same point","again to make it disappear, so if you click multiple points,","you can show multiple annotations. In *onout* mode, a click","anywhere else in the plot (on another data point or not) will","hide this annotation.","If you need to show/hide this annotation in response to different","`x` or `y` values, you can set `xclick` and/or `yclick`. This is","useful for example to label the side of a bar. To label markers","though, `standoff` is preferred over `xclick` and `yclick`."].join(" ")},xclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `x` value","is `xclick` rather than the annotation's `x` value."].join(" ")},yclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `y` value","is `yclick` rather than the annotation's `y` value."].join(" ")},hovertext:{valType:"string",editType:"arraydraw",description:["Sets text to appear when hovering over this annotation.","If omitted or blank, no hover label will appear."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw",description:["Sets the background color of the hover label.","By default uses the annotation's `bgcolor` made opaque,","or white if it was transparent."].join(" ")},bordercolor:{valType:"color",editType:"arraydraw",description:["Sets the border color of the hover label.","By default uses either dark grey or white, for maximum","contrast with `hoverlabel.bgcolor`."].join(" ")},font:i({editType:"arraydraw",description:["Sets the hover label text font.","By default uses the global hover font and size,","with color from `hoverlabel.bordercolor`."].join(" ")}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw",description:["Determines whether the annotation text box captures mouse move","and click events, or allows those events to pass through to data","points in the plot that may be behind the annotation. By default","`captureevents` is *false* unless `hovertext` is provided.","If you use the event `plotly_clickannotation` without `hovertext`","you must explicitly enable `captureevents`."].join(" ")},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc",description:["Obsolete. Set `xref` and `yref` separately instead."].join(" ")}}})},37830:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(8214).draw;function a(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach((function(e){var r=i.getFromId(t,e.xref),n=i.getFromId(t,e.yref),o=i.getRefType(e.xref),a=i.getRefType(e.yref);e._extremes={},"range"===o&&s(e,r),"range"===a&&s(e,n)}))}function s(t,e){var r,n=e._id,o=n.charAt(0),a=t[o],s=t["a"+o],l=t[o+"ref"],c=t["a"+o+"ref"],u=t["_"+o+"padplus"],h=t["_"+o+"padminus"],d={x:1,y:-1}[o]*t[o+"shift"],f=3*t.arrowsize*t.arrowwidth||0,p=f+d,m=f-d,g=3*t.startarrowsize*t.arrowwidth||0,v=g+d,b=g-d;if(c===l){var y=i.findExtremes(e,[e.r2c(a)],{ppadplus:p,ppadminus:m}),x=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(u,v),ppadminus:Math.max(h,b)});r={min:[y.min[0],x.min[0]],max:[y.max[0],x.max[0]]}}else v=s?v+s:v,b=s?b-s:b,r=i.findExtremes(e,[e.r2c(a)],{ppadplus:Math.max(u,p,v),ppadminus:Math.max(h,m,b)});t._extremes[n]=r}t.exports=function(t){var e=t._fullLayout;if(n.filterVisible(e.annotations).length&&t._fullData.length)return n.syncOrAsync([o,a],t)}},74434:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059),o=r(46121).arrayEditor;function a(t,e){var r,n,i,o,a,l,c,u=t._fullLayout.annotations,h=[],d=[],f=[],p=(e||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(t,e){var r,s,l=a(t,e),c=l.on,u=l.off.concat(l.explicitOff),h={},d=t._fullLayout.annotations;if(c.length||u.length){for(r=0;r{"use strict";var n=r(12822),i=r(17499);t.exports=function(t,e,r,o){o("opacity");var a=o("bgcolor"),s=o("bordercolor"),l=i.opacity(s);o("borderpad");var c=o("borderwidth"),u=o("showarrow");if(o("text",u?" ":r._dfltTitle.annotation),o("textangle"),n.coerceFont(o,"font",r.font),o("width"),o("align"),o("height")&&o("valign"),u){var h,d,f=o("arrowside");-1!==f.indexOf("end")&&(h=o("arrowhead"),d=o("arrowsize")),-1!==f.indexOf("start")&&(o("startarrowhead",h),o("startarrowsize",d)),o("arrowcolor",l?e.bordercolor:i.defaultLine),o("arrowwidth",2*(l&&c||1)),o("standoff"),o("startstandoff")}var p=o("hovertext"),m=r.hoverlabel||{};if(p){var g=o("hoverlabel.bgcolor",m.bgcolor||(i.opacity(a)?i.rgb(a):i.defaultLine)),v=o("hoverlabel.bordercolor",m.bordercolor||i.contrast(g)),b=n.extendFlat({},m.font);b.color||(b.color=v),n.coerceFont(o,"hoverlabel.font",b)}o("captureevents",!!p)}},44102:(t,e,r)=>{"use strict";var n=r(7370),i=r(61814);t.exports=function(t,e,r,o){e=e||{};var a="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(a||s)for(var l,c,u=t._fullLayout.annotations,h=e._id.charAt(0),d=0;d{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(35486),s=r(77061);function l(t,e,r){function o(r,i){return n.coerce(t,e,s,r,i)}var l=o("visible"),c=o("clicktoshow");if(l||c){a(t,e,r,o);for(var u=e.showarrow,h=["x","y"],d=[-10,-30],f={_fullLayout:r},p=0;p<2;p++){var m=h[p],g=i.coerceRef(t,e,f,m,"","paper");if("paper"!==g&&i.getFromId(f,g)._annIndices.push(e._index),i.coercePosition(e,f,o,g,m,.5),u){var v="a"+m,b=i.coerceRef(t,e,f,v,"pixel",["pixel","paper"]);"pixel"!==b&&b!==g&&(b=e[v]="pixel");var y="pixel"===b?d[p]:.4;i.coercePosition(e,f,o,b,v,y)}o(m+"anchor"),o(m+"shift")}if(n.noneOrAll(t,e,["x","y"]),u&&n.noneOrAll(t,e,["ax","ay"]),c){var x=o("xclick"),_=o("yclick");e._xclick=void 0===x?e.x:i.cleanPosition(x,f,e.xref),e._yclick=void 0===_?e.y:i.cleanPosition(_,f,e.yref)}}}t.exports=function(t,e){o(t,e,{name:"annotations",handleItemDefaults:l})}},8214:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(51137),a=r(12822),s=a.strTranslate,l=r(75815),c=r(17499),u=r(40666),h=r(70410),d=r(80394),f=r(76292),p=r(19846),m=r(46121).arrayEditor,g=r(65753);function v(t,e){var r=t._fullLayout.annotations[e]||{},n=l.getFromId(t,r.xref),i=l.getFromId(t,r.yref);n&&n.setScale(),i&&i.setScale(),y(t,r,e,!1,n,i)}function b(t,e,r,n,i){var o=i[r],a=i[r+"ref"],s=-1!==r.indexOf("y"),c="domain"===l.getRefType(a),u=s?n.h:n.w;return t?c?o+(s?-e:e)/t._length:t.p2r(t.r2p(o)+e):o+(s?-e:e)/u}function y(t,e,r,o,v,y){var x,_,w=t._fullLayout,k=t._fullLayout._size,A=t._context.edits;o?(x="annotation-"+o,_=o+".annotations"):(x="annotation",_="annotations");var M=m(t.layout,_,e),T=M.modifyBase,S=M.modifyItem,C=M.getUpdateObj;w._infolayer.selectAll("."+x+'[data-index="'+r+'"]').remove();var E="clip"+w._uid+"_ann"+r;if(e._input&&!1!==e.visible){var L={x:{},y:{}},z=+e.textangle||0,O=w._infolayer.append("g").classed(x,!0).attr("data-index",String(r)).style("opacity",e.opacity),D=O.append("g").classed("annotation-text-g",!0),I=A[e.showarrow?"annotationTail":"annotationPosition"],R=e.captureevents||A.annotationText||I,F=D.append("g").style("pointer-events",R?"all":null).call(f,"pointer").on("click",(function(){t._dragging=!1,t.emit("plotly_clickannotation",q(n.event))}));e.hovertext&&F.on("mouseover",(function(){var r=e.hoverlabel,n=r.font,i=this.getBoundingClientRect(),o=t.getBoundingClientRect();h.loneHover({x0:i.left-o.left,x1:i.right-o.left,y:(i.top+i.bottom)/2-o.top,text:e.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant},{container:w._hoverlayer.node(),outerContainer:w._paper.node(),gd:t})})).on("mouseout",(function(){h.loneUnhover(w._hoverlayer.node())}));var P=e.borderwidth,N=e.borderpad,j=P+N,B=F.append("rect").attr("class","bg").style("stroke-width",P+"px").call(c.stroke,e.bordercolor).call(c.fill,e.bgcolor),U=e.width||e.height,G=w._topclips.selectAll("#"+E).data(U?[0]:[]);G.enter().append("clipPath").classed("annclip",!0).attr("id",E).append("rect"),G.exit().remove();var V=e.font,H=w._meta?a.templateString(e.text,w._meta):e.text,W=F.append("text").classed("annotation-text",!0).text(H);A.annotationText?W.call(d.makeEditable,{delegate:F,gd:t}).call(Y).on("edit",(function(r){e.text=r,this.call(Y),S("text",r),v&&v.autorange&&T(v._name+".autorange",!0),y&&y.autorange&&T(y._name+".autorange",!0),i.call("_guiRelayout",t,C())})):W.call(Y)}else n.selectAll("#"+E).remove();function q(t){var n={index:r,annotation:e._input,fullAnnotation:e,event:t};return o&&(n.subplotId=o),n}function Y(r){return r.call(u.font,V).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),d.convertToTspans(r,t,Z),r}function Z(){var r=W.selectAll("a");1===r.size()&&r.text()===W.text()&&F.insert("a",":first-child").attr({"xlink:xlink:href":r.attr("xlink:href"),"xlink:xlink:show":r.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(B.node());var n=F.select(".annotation-text-math-group"),h=!n.empty(),m=u.bBox((h?n:W).node()),x=m.width,_=m.height,M=e.width||x,R=e.height||_,N=Math.round(M+2*j),V=Math.round(R+2*j);function H(t,e){return"auto"===e&&(e=t<1/3?"left":t>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var Y=!1,Z=["x","y"],X=0;X1)&&(nt===rt?((ft=it.r2fraction(e["a"+et]))<0||ft>1)&&(Y=!0):Y=!0),$=it._offset+it.r2p(e[et]),Q=.5}else{var pt="domain"===dt;"x"===et?(K=e[et],$=pt?it._offset+it._length*K:$=k.l+k.w*K):(K=1-e[et],$=pt?it._offset+it._length*K:$=k.t+k.h*K),Q=e.showarrow?.5:K}if(e.showarrow){ht.head=$;var mt=e["a"+et];if(tt=at*H(.5,e.xanchor)-st*H(.5,e.yanchor),nt===rt){var gt=l.getRefType(nt);"domain"===gt?("y"===et&&(mt=1-mt),ht.tail=it._offset+it._length*mt):"paper"===gt?"y"===et?(mt=1-mt,ht.tail=k.t+k.h*mt):ht.tail=k.l+k.w*mt:ht.tail=it._offset+it.r2p(mt),J=tt}else ht.tail=$+mt,J=tt+mt;ht.text=ht.tail+tt;var vt=w["x"===et?"width":"height"];if("paper"===rt&&(ht.head=a.constrain(ht.head,1,vt-1)),"pixel"===nt){var bt=-Math.max(ht.tail-3,ht.text),yt=Math.min(ht.tail+3,ht.text)-vt;bt>0?(ht.tail+=bt,ht.text+=bt):yt>0&&(ht.tail-=yt,ht.text-=yt)}ht.tail+=ut,ht.head+=ut}else J=tt=lt*H(Q,ct),ht.text=$+tt;ht.text+=ut,tt+=ut,J+=ut,e["_"+et+"padplus"]=lt/2+J,e["_"+et+"padminus"]=lt/2-J,e["_"+et+"size"]=lt,e["_"+et+"shift"]=tt}if(Y)F.remove();else{var xt=0,_t=0;if("left"!==e.align&&(xt=(M-x)*("center"===e.align?.5:1)),"top"!==e.valign&&(_t=(R-_)*("middle"===e.valign?.5:1)),h)n.select("svg").attr({x:j+xt-1,y:j+_t}).call(u.setClipUrl,U?E:null,t);else{var wt=j+_t-m.top,kt=j+xt-m.left;W.call(d.positionText,kt,wt).call(u.setClipUrl,U?E:null,t)}G.select("rect").call(u.setRect,j,j,M,R),B.call(u.setRect,P/2,P/2,N-P,V-P),F.call(u.setTranslate,Math.round(L.x.text-N/2),Math.round(L.y.text-V/2)),D.attr({transform:"rotate("+z+","+L.x.text+","+L.y.text+")"});var At,Mt=function(r,n){O.selectAll(".annotation-arrow-g").remove();var l=L.x.head,h=L.y.head,d=L.x.tail+r,f=L.y.tail+n,m=L.x.text+r,x=L.y.text+n,_=a.rotationXYMatrix(z,m,x),w=a.apply2DTransform(_),M=a.apply2DTransform2(_),E=+B.attr("width"),I=+B.attr("height"),R=m-.5*E,P=R+E,N=x-.5*I,j=N+I,U=[[R,N,R,j],[R,j,P,j],[P,j,P,N],[P,N,R,N]].map(M);if(!U.reduce((function(t,e){return t^!!a.segmentsIntersect(l,h,l+1e6,h+1e6,e[0],e[1],e[2],e[3])}),!1)){U.forEach((function(t){var e=a.segmentsIntersect(d,f,l,h,t[0],t[1],t[2],t[3]);e&&(d=e.x,f=e.y)}));var G=e.arrowwidth,V=e.arrowcolor,H=e.arrowside,W=O.append("g").style({opacity:c.opacity(V)}).classed("annotation-arrow-g",!0),q=W.append("path").attr("d","M"+d+","+f+"L"+l+","+h).style("stroke-width",G+"px").call(c.stroke,c.rgb(V));if(g(q,H,e),A.annotationPosition&&q.node().parentNode&&!o){var Y=l,Z=h;if(e.standoff){var X=Math.sqrt(Math.pow(l-d,2)+Math.pow(h-f,2));Y+=e.standoff*(d-l)/X,Z+=e.standoff*(f-h)/X}var $,J,K=W.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(d-Y)+","+(f-Z),transform:s(Y,Z)}).style("stroke-width",G+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)");p.init({element:K.node(),gd:t,prepFn:function(){var t=u.getTranslate(F);$=t.x,J=t.y,v&&v.autorange&&T(v._name+".autorange",!0),y&&y.autorange&&T(y._name+".autorange",!0)},moveFn:function(t,r){var n=w($,J),i=n[0]+t,o=n[1]+r;F.call(u.setTranslate,i,o),S("x",b(v,t,"x",k,e)),S("y",b(y,r,"y",k,e)),e.axref===e.xref&&S("ax",b(v,t,"ax",k,e)),e.ayref===e.yref&&S("ay",b(y,r,"ay",k,e)),W.attr("transform",s(t,r)),D.attr({transform:"rotate("+z+","+i+","+o+")"})},doneFn:function(){i.call("_guiRelayout",t,C());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};e.showarrow&&Mt(0,0),I&&p.init({element:F.node(),gd:t,prepFn:function(){At=D.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?S("ax",b(v,t,"ax",k,e)):S("ax",e.ax+t),e.ayref===e.yref?S("ay",b(y,r,"ay",k.w,e)):S("ay",e.ay+r),Mt(t,r);else{if(o)return;var i,a;if(v)i=b(v,t,"x",k,e);else{var l=e._xsize/k.w,c=e.x+(e._xshift-e.xshift)/k.w-l/2;i=p.align(c+t/k.w,l,0,1,e.xanchor)}if(y)a=b(y,r,"y",k,e);else{var u=e._ysize/k.h,h=e.y-(e._yshift+e.yshift)/k.h-u/2;a=p.align(h-r/k.h,u,0,1,e.yanchor)}S("x",i),S("y",a),v&&y||(n=p.getCursor(v?.5:i,y?.5:a,e.xanchor,e.yanchor))}D.attr({transform:s(t,r)+At}),f(F,n)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",q(n))},doneFn:function(){f(F),i.call("_guiRelayout",t,C());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}}t.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r{"use strict";var n=r(27941),i=r(17499),o=r(91208),a=r(12822),s=a.strScale,l=a.strRotate,c=a.strTranslate;t.exports=function(t,e,r){var a,u,h,d,f=t.node(),p=o[r.arrowhead||0],m=o[r.startarrowhead||0],g=(r.arrowwidth||1)*(r.arrowsize||1),v=(r.arrowwidth||1)*(r.startarrowsize||1),b=e.indexOf("start")>=0,y=e.indexOf("end")>=0,x=p.backoff*g+r.standoff,_=m.backoff*v+r.startstandoff;if("line"===f.nodeName){a={x:+t.attr("x1"),y:+t.attr("y1")},u={x:+t.attr("x2"),y:+t.attr("y2")};var w=a.x-u.x,k=a.y-u.y;if(d=(h=Math.atan2(k,w))+Math.PI,x&&_&&x+_>Math.sqrt(w*w+k*k))return void I();if(x){if(x*x>w*w+k*k)return void I();var A=x*Math.cos(h),M=x*Math.sin(h);u.x+=A,u.y+=M,t.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+k*k)return void I();var T=_*Math.cos(h),S=_*Math.sin(h);a.x-=T,a.y-=S,t.attr({x1:a.x,y1:a.y})}}else if("path"===f.nodeName){var C=f.getTotalLength(),E="";if(C{"use strict";var n=r(8214),i=r(74434);t.exports={moduleType:"component",name:"annotations",layoutAttributes:r(77061),supplyLayoutDefaults:r(26194),includeBasePlot:r(39859)("annotations"),calcAutorange:r(37830),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:r(44102)}},98368:(t,e,r)=>{"use strict";var n=r(77061),i=r(62309).overrideAll,o=r(46121).templatedArray;t.exports=i(o("annotation",{visible:n.visible,x:{valType:"any",description:["Sets the annotation's x position."].join(" ")},y:{valType:"any",description:["Sets the annotation's y position."].join(" ")},z:{valType:"any",description:["Sets the annotation's z position."].join(" ")},ax:{valType:"number",description:["Sets the x component of the arrow tail about the arrow head (in pixels)."].join(" ")},ay:{valType:"number",description:["Sets the y component of the arrow tail about the arrow head (in pixels)."].join(" ")},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents}),"calc","from-root")},81030:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815);function o(t,e){var r=e.fullSceneLayout.domain,o=e.fullLayout._size,a={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};t._xa={},n.extendFlat(t._xa,a),i.setConvert(t._xa),t._xa._offset=o.l+r.x[0]*o.w,t._xa.l2p=function(){return.5*(1+t._pdata[0]/t._pdata[3])*o.w*(r.x[1]-r.x[0])},t._ya={},n.extendFlat(t._ya,a),i.setConvert(t._ya),t._ya._offset=o.t+(1-r.y[1])*o.h,t._ya.l2p=function(){return.5*(1-t._pdata[1]/t._pdata[3])*o.h*(r.y[1]-r.y[0])}}t.exports=function(t){for(var e=t.fullSceneLayout.annotations,r=0;r{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(35486),s=r(98368);function l(t,e,r,o){function l(r,i){return n.coerce(t,e,s,r,i)}function c(t){var n=t+"axis",o={_fullLayout:{}};return o._fullLayout[n]=r[n],i.coercePosition(e,o,l,t,t,.5)}l("visible")&&(a(t,e,o.fullLayout,l),c("x"),c("y"),c("z"),n.noneOrAll(t,e,["x","y","z"]),e.xref="x",e.yref="y",e.zref="z",l("xanchor"),l("yanchor"),l("xshift"),l("yshift"),e.showarrow&&(e.axref="pixel",e.ayref="pixel",l("ax",-10),l("ay",-30),n.noneOrAll(t,e,["ax","ay"])))}t.exports=function(t,e,r){o(t,e,{name:"annotations",handleItemDefaults:l,fullLayout:r.fullLayout})}},86191:(t,e,r)=>{"use strict";var n=r(8214).drawRaw,i=r(40747),o=["x","y","z"];t.exports=function(t){for(var e=t.fullSceneLayout,r=t.dataScale,a=e.annotations,s=0;s1){c=!0;break}}c?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+s+'"]').remove():(l._pdata=i(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},95997:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822);t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(98368)}}},layoutAttributes:r(98368),handleDefaults:r(76023),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(r)for(var o=r.attrRegex,a=Object.keys(t),s=0;s{"use strict";e.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],e.defaultLine="#444",e.lightLine="#eee",e.background="#fff",e.borderLine="#BEC8D9",e.lightFraction=1e3/11},17499:(t,e,r)=>{"use strict";var n=r(18106),i=r(7370),o=r(98507).isTypedArray,a=t.exports={},s=r(84226);a.defaults=s.defaults;var l=a.defaultLine=s.defaultLine;a.lightLine=s.lightLine;var c=a.background=s.background;function u(t){if(i(t)||"string"!=typeof t)return t;var e=t.trim();if("rgb"!==e.substr(0,3))return t;var r=e.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return t;var n=r[1].trim().split(/\s*[\s,]\s*/),o="a"===e.charAt(3)&&4===n.length;if(!o&&3!==n.length)return t;for(var a=0;a=0))return t;if(3===a)n[a]>1&&(n[a]=1);else if(n[a]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return o?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}a.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},a.rgb=function(t){return a.tinyRGB(n(t))},a.opacity=function(t){return t?n(t).getAlpha():0},a.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},a.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||c).toRgb(),o=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},a={r:o.r*(1-r.a)+r.r*r.a,g:o.g*(1-r.a)+r.g*r.a,b:o.b*(1-r.a)+r.b*r.a};return n(a).toRgbString()},a.interpolate=function(t,e,r){var i=n(t).toRgb(),o=n(e).toRgb(),a={r:r*i.r+(1-r)*o.r,g:r*i.g+(1-r)*o.g,b:r*i.b+(1-r)*o.b};return n(a).toRgbString()},a.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(a.combine(t,c))),(i.isDark()?e?i.lighten(e):c:r?i.darken(r):l).toString()},a.stroke=function(t,e){var r=n(e);t.style({stroke:a.tinyRGB(r),"stroke-opacity":r.getAlpha()})},a.fill=function(t,e){var r=n(e);t.style({fill:a.tinyRGB(r),"fill-opacity":r.getAlpha()})},a.clean=function(t){if(t&&"object"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e{"use strict";var n=r(86130),i=r(75058),o=r(98260).extendFlat,a=r(62309).overrideAll;t.exports=a({orientation:{valType:"enumerated",values:["h","v"],dflt:"v",description:"Sets the orientation of the colorbar."},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",description:["Determines whether this color bar's thickness","(i.e. the measure in the constant color direction)","is set in units of plot *fraction* or in *pixels*.","Use `thickness` to set the value."].join(" ")},thickness:{valType:"number",min:0,dflt:30,description:["Sets the thickness of the color bar","This measure excludes the size of the padding, ticks and labels."].join(" ")},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this color bar's length","(i.e. the measure in the color variation direction)","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the color bar","This measure excludes the padding of both ends.","That is, the color bar length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",description:["Sets the x position with respect to `xref` of the color bar (in plot fraction).","When `xref` is *paper*, defaults to 1.02 when `orientation` is *v* and","0.5 when `orientation` is *h*.","When `xref` is *container*, defaults to *1* when `orientation` is *v* and","0.5 when `orientation` is *h*.","Must be between *0* and *1* if `xref` is *container*","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],description:["Sets this color bar's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the color bar.","Defaults to *left* when `orientation` is *v* and","*center* when `orientation` is *h*."].join(" ")},xpad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the x direction."},y:{valType:"number",description:["Sets the y position with respect to `yref` of the color bar (in plot fraction).","When `yref` is *paper*, defaults to 0.5 when `orientation` is *v* and","1.02 when `orientation` is *h*.","When `yref` is *container*, defaults to 0.5 when `orientation` is *v* and","1 when `orientation` is *h*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets this color bar's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the color bar.","Defaults to *middle* when `orientation` is *v* and","*bottom* when `orientation` is *h*."].join(" ")},ypad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the y direction."},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:"number",min:0,dflt:0,description:["Sets the width (in px) or the border enclosing this color bar."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:"Sets the color of padded area."},tickmode:n.minor.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:o({},n.ticks,{dflt:""}),ticklabeloverflow:o({},n.ticklabeloverflow,{description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","In other cases the default is *hide past div*."].join(" ")}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",description:["Determines where tick labels are drawn relative to the ticks.","Left and right options are used when `orientation` is *h*,","top and bottom when `orientation` is *v*."].join(" ")},ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,showticklabels:n.showticklabels,labelalias:n.labelalias,tickfont:i({description:"Sets the color bar's tick label font"}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,minexponent:n.minexponent,showexponent:n.showexponent,title:{text:{valType:"string",description:["Sets the title of the color bar.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:i({description:["Sets this color bar's title font.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),side:{valType:"enumerated",values:["right","top","bottom"],description:["Determines the location of color bar's title","with respect to the color bar.","Defaults to *top* when `orientation` if *v* and ","defaults to *right* when `orientation` if *h*.","Note that the title's location used to be set","by the now deprecated `titleside` attribute."].join(" ")}},_deprecated:{title:{valType:"string",description:["Deprecated in favor of color bar's `title.text`.","Note that value of color bar's `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:i({description:"Deprecated in favor of color bar's `title.font`."}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top",description:"Deprecated in favor of color bar's `title.side`."}}},"colorbars","from-root")},30733:t=>{"use strict";t.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},81692:(t,e,r)=>{"use strict";var n=r(12822),i=r(46121),o=r(49342),a=r(8736),s=r(84411),l=r(12213),c=r(76699);t.exports=function(t,e,r){var u=i.newContainer(e,"colorbar"),h=t.colorbar||{};function d(t,e){return n.coerce(h,u,c,t,e)}var f=r.margin||{t:0,b:0,l:0,r:0},p=r.width-f.l-f.r,m=r.height-f.t-f.b,g="v"===d("orientation"),v=d("thicknessmode");d("thickness","fraction"===v?30/(g?p:m):30);var b=d("lenmode");d("len","fraction"===b?1:g?m:p);var y,x,_,w="paper"===d("yref"),k="paper"===d("xref"),A="left";g?(_="middle",A=k?"left":"right",y=k?1.02:1,x=.5):(_=w?"bottom":"top",A="center",y=.5,x=w?1.02:1),n.coerce(h,u,{x:{valType:"number",min:k?-2:0,max:k?3:1,dflt:y}},"x"),n.coerce(h,u,{y:{valType:"number",min:w?-2:0,max:w?3:1,dflt:x}},"y"),d("xanchor",A),d("xpad"),d("yanchor",_),d("ypad"),n.noneOrAll(h,u,["x","y"]),d("outlinecolor"),d("outlinewidth"),d("bordercolor"),d("borderwidth"),d("bgcolor");var M=n.coerce(h,u,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:g?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");d("ticklabeloverflow",-1!==M.indexOf("inside")?"hide past domain":"hide past div"),o(h,u,d,"linear");var T=r.font,S={noAutotickangles:!0,outerTicks:!1,font:T};-1!==M.indexOf("inside")&&(S.bgColor="black"),l(h,u,d,"linear",S),s(h,u,d,"linear",S),a(h,u,d,"linear",S),d("title.text",r._dfltTitle.colorbar);var C=u.showticklabels?u.tickfont:T,E=n.extendFlat({},C,{weight:T.weight,style:T.style,variant:T.variant,color:T.color,size:n.bigFont(C.size)});n.coerceFont(d,"title.font",E),d("title.side",g?"top":"right")}},29648:(t,e,r)=>{"use strict";var n=r(27941),i=r(18106),o=r(51137),a=r(25059),s=r(75815),l=r(19846),c=r(12822),u=c.strTranslate,h=r(98260).extendFlat,d=r(76292),f=r(40666),p=r(17499),m=r(6883),g=r(80394),v=r(42226).flipScale,b=r(91200),y=r(52869),x=r(86130),_=r(89701),w=_.LINE_SPACING,k=_.FROM_TL,A=_.FROM_BR,M=r(30733).cn;t.exports={draw:function(t){var e=t._fullLayout._infolayer.selectAll("g."+M.colorbar).data(function(t){var e,r,n,i,o=t._fullLayout,a=t.calcdata,s=[];function l(t){return h(t,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function c(){"function"==typeof i.calc?i.calc(t,n,e):(e._fillgradient=r.reversescale?v(r.colorscale):r.colorscale,e._zrange=[r[i.min],r[i.max]])}for(var u=0;u0?n>=l:n<=l));i++)n>u&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var ft=Math.pow(10,Math.floor(Math.log(dt)/Math.LN10));ut*=ft*c.roundUp(dt/ft,[2,5,10]),(Math.abs(q.start)/q.size+1e-6)%1<2e-6&&(lt.tick0=0)}lt.dtick=ut}lt.domain=a?[at+O/N.h,at+Q-O/N.h]:[at+z/N.w,at+Q-z/N.w],lt.setScale(),t.attr("transform",u(Math.round(N.l),Math.round(N.t)));var pt,mt=t.select("."+M.cbtitleunshift).attr("transform",u(-Math.round(N.l),-Math.round(N.t))),gt=lt.ticklabelposition,vt=lt.title.font.size,bt=t.select("."+M.cbaxis),yt=0,xt=0;function _t(n,i){var o={propContainer:lt,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:P._dfltTitle.colorbar,containerGroup:t.select("."+M.cbtitle)},a="h"===n.charAt(0)?n.substr(1):"h"+n;t.selectAll("."+a+",."+a+"-math-group").remove(),m.draw(r,n,h(o,i||{}))}return c.syncOrAsync([o.previousPromises,function(){var t,e;(a&&ct||!a&&!ct)&&("top"===G&&(t=z+N.l+tt*D,e=O+N.t+et*(1-at-Q)+3+.75*vt),"bottom"===G&&(t=z+N.l+tt*D,e=O+N.t+et*(1-at)-3-.25*vt),"right"===G&&(e=O+N.t+et*I+3+.75*vt,t=z+N.l+tt*at),_t(lt._id+"title",{attributes:{x:t,y:e,"text-anchor":a?"start":"middle"}}))},function(){if(!a&&!ct||a&&ct){var o,l=t.select("."+M.cbtitle),h=l.select("text"),d=[-T/2,T/2],p=l.select(".h"+lt._id+"title-math-group").node(),m=15.6;if(h.node()&&(m=parseInt(h.node().style.fontSize,10)*w),p?(o=f.bBox(p),xt=o.width,(yt=o.height)>m&&(d[1]-=(yt-m)/2)):h.node()&&!h.classed(M.jsPlaceholder)&&(o=f.bBox(h.node()),xt=o.width,yt=o.height),a){if(yt){if(yt+=5,"top"===G)lt.domain[1]-=yt/N.h,d[1]*=-1;else{lt.domain[0]+=yt/N.h;var v=g.lineCount(h);d[1]+=(1-v)*m}l.attr("transform",u(d[0],d[1])),lt.setScale()}}else xt&&("right"===G&&(lt.domain[0]+=(xt+vt/2)/N.w),l.attr("transform",u(d[0],d[1])),lt.setScale())}t.selectAll("."+M.cbfills+",."+M.cblines).attr("transform",a?u(0,Math.round(N.h*(1-lt.domain[1]))):u(Math.round(N.w*lt.domain[0]),0)),bt.attr("transform",a?u(0,Math.round(-N.t)):u(Math.round(-N.l),0));var b=t.select("."+M.cbfills).selectAll("rect."+M.cbfill).attr("style","").data(Z);b.enter().append("rect").classed(M.cbfill,!0).attr("style",""),b.exit().remove();var y=V.map(lt.c2p).map(Math.round).sort((function(t,e){return t-e}));b.each((function(t,o){var s=[0===o?V[0]:(Z[o]+Z[o-1])/2,o===Z.length-1?V[1]:(Z[o]+Z[o+1])/2].map(lt.c2p).map(Math.round);a&&(s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,y[0],y[1]));var l=n.select(this).attr(a?"x":"y",rt).attr(a?"y":"x",n.min(s)).attr(a?"width":"height",Math.max($,2)).attr(a?"height":"width",Math.max(n.max(s)-n.min(s),2));if(e._fillgradient)f.gradient(l,r,e._id,a?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var u=W(t).replace("e-","");l.attr("fill",i(u).toHexString())}}));var x=t.select("."+M.cblines).selectAll("path."+M.cbline).data(B.color&&B.width?X:[]);x.enter().append("path").classed(M.cbline,!0),x.exit().remove(),x.each((function(t){var e=rt,r=Math.round(lt.c2p(t))+B.width/2%1;n.select(this).attr("d","M"+(a?e+","+r:r+","+e)+(a?"h":"v")+$).call(f.lineGroupStyle,B.width,H(t),B.dash)})),bt.selectAll("g."+lt._id+"tick,path").remove();var _=rt+$+(T||0)/2-("outside"===e.ticks?1:0),k=s.calcTicks(lt),A=s.getTickSigns(lt)[2];return s.drawTicks(r,lt,{vals:"inside"===lt.ticks?s.clipEnds(lt,k):k,layer:bt,path:s.makeTickPath(lt,_,A),transFn:s.makeTransTickFn(lt)}),s.drawLabels(r,lt,{vals:k,layer:bt,transFn:s.makeTransTickLabelFn(lt),labelFns:s.makeLabelFns(lt,_)})},function(){if(a&&!ct||!a&&ct){var t,i,o=lt.position||0,s=lt._offset+lt._length/2;if("right"===G)i=s,t=N.l+tt*o+10+vt*(lt.showticklabels?1:.5);else if(t=s,"bottom"===G&&(i=N.t+et*o+10+(-1===gt.indexOf("inside")?lt.tickfont.size:0)+("intside"!==lt.ticks&&e.ticklen||0)),"top"===G){var l=U.text.split("
").length;i=N.t+et*o+10-$-w*vt*l}_t((a?"h":"v")+lt._id+"title",{avoid:{selection:n.select(r).selectAll("g."+lt._id+"tick"),side:G,offsetTop:a?0:N.t,offsetLeft:a?N.l:0,maxShift:a?P.width:P.height},attributes:{x:t,y:i,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}},o.previousPromises,function(){var n,s=$+T/2;-1===gt.indexOf("inside")&&(n=f.bBox(bt.node()),s+=a?n.width:n.height),pt=mt.select("text");var c=0,h=a&&"top"===G,m=!a&&"right"===G,g=0;if(pt.node()&&!pt.classed(M.jsPlaceholder)){var b,y=mt.select(".h"+lt._id+"title-math-group").node();y&&(a&&ct||!a&&!ct)?(c=(n=f.bBox(y)).width,b=n.height):(c=(n=f.bBox(mt.node())).right-N.l-(a?rt:st),b=n.bottom-N.t-(a?st:rt),a||"top"!==G||(s+=n.height,g=n.height)),m&&(pt.attr("transform",u(c/2+vt/2,0)),c*=2),s=Math.max(s,a?c:b)}var x=2*(a?z:O)+s+S+T/2,w=0;!a&&U.text&&"bottom"===L&&I<=0&&(x+=w=x/2,g+=w),P._hColorbarMoveTitle=w,P._hColorbarMoveCBTitle=g;var j=S+T,B=(a?rt:st)-j/2-(a?z:0),V=(a?st:rt)-(a?K:O+g-w);t.select("."+M.cbbg).attr("x",B).attr("y",V).attr(a?"width":"height",Math.max(x-w,2)).attr(a?"height":"width",Math.max(K+j,2)).call(p.fill,C).call(p.stroke,e.bordercolor).style("stroke-width",S);var H=m?Math.max(c-10,0):0;t.selectAll("."+M.cboutline).attr("x",(a?rt:st+z)+H).attr("y",(a?st+O-K:rt)+(h?yt:0)).attr(a?"width":"height",Math.max($,2)).attr(a?"height":"width",Math.max(K-(a?2*O+yt:2*z+H),2)).call(p.stroke,e.outlinecolor).style({fill:"none","stroke-width":T});var W=a?nt*x:0,q=a?0:(1-it)*x-g;if(W=F?N.l-W:-W,q=R?N.t-q:-q,t.attr("transform",u(W,q)),!a&&(S||i(C).getAlpha()&&!i.equals(P.paper_bgcolor,C))){var Y=bt.selectAll("text"),Z=Y[0].length,X=t.select("."+M.cbbg).node(),J=f.bBox(X),Q=f.getTranslate(t);Y.each((function(t,e){var r=Z-1;if(0===e||e===r){var n,i=f.bBox(this),o=f.getTranslate(this);if(e===r){var a=i.right+o.x;(n=J.right+Q.x+st-S-2+D-a)>0&&(n=0)}else if(0===e){var s=i.left+o.x;(n=J.left+Q.x+st+S+2-s)<0&&(n=0)}n&&(Z<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var tt={},et=k[E],ot=A[E],at=k[L],ut=A[L],ht=x-$;a?("pixels"===d?(tt.y=I,tt.t=K*at,tt.b=K*ut):(tt.t=tt.b=0,tt.yt=I+l*at,tt.yb=I-l*ut),"pixels"===_?(tt.x=D,tt.l=x*et,tt.r=x*ot):(tt.l=ht*et,tt.r=ht*ot,tt.xl=D-v*et,tt.xr=D+v*ot)):("pixels"===d?(tt.x=D,tt.l=K*et,tt.r=K*ot):(tt.l=tt.r=0,tt.xl=D+l*et,tt.xr=D-l*ot),"pixels"===_?(tt.y=1-I,tt.t=x*at,tt.b=x*ut):(tt.t=ht*at,tt.b=ht*ut,tt.yt=I-v*at,tt.yb=I+v*ut));var dt=e.y<.5?"b":"t",ft=e.x<.5?"l":"r";r._fullLayout._reservedMargin[e._id]={};var xt={r:P.width-B-W,l:B+tt.r,b:P.height-V-q,t:V+tt.b};F&&R?o.autoMargin(r,e._id,tt):F?r._fullLayout._reservedMargin[e._id][dt]=xt[dt]:R||a?r._fullLayout._reservedMargin[e._id][ft]=xt[ft]:r._fullLayout._reservedMargin[e._id][dt]=xt[dt]}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,o,s="v"===e.orientation,c=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr("transform"),d(t)},moveFn:function(r,a){t.attr("transform",n+u(r,a)),i=l.align((s?e._uFrac:e._vFrac)+r/c.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),o=l.align((s?e._vFrac:1-e._uFrac)-a/c.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var h=l.getCursor(i,o,e.xanchor,e.yanchor);d(t,h)},doneFn:function(){if(d(t),void 0!==i&&void 0!==o){var n={};n[e._propPrefix+"x"]=i,n[e._propPrefix+"y"]=o,void 0!==e._traceIndex?a.call("_guiRestyle",r,n,e._traceIndex):a.call("_guiRelayout",r,n)}}})}(r,e,t)})),e.exit().each((function(e){o.autoMargin(t,e._id)})).remove(),e.order()}}},52467:(t,e,r)=>{"use strict";var n=r(12822);t.exports=function(t){return n.isPlainObject(t.colorbar)}},10552:(t,e,r)=>{"use strict";t.exports={moduleType:"component",name:"colorbar",attributes:r(76699),supplyDefaults:r(81692),draw:r(29648).draw,hasColorbar:r(52467)}},89322:(t,e,r)=>{"use strict";var n=r(76699),i=r(46233).counter,o=r(54747),a=r(78920).scales,s=o(a);function l(t){return"`"+t+"`"}t.exports=function(t,e){t=t||"";var r,o,c=(e=e||{}).cLetter||"c",u="onlyIfNumerical"in e?e.onlyIfNumerical:Boolean(t),h="noScale"in e?e.noScale:"marker.line"===t,d="showScaleDflt"in e?e.showScaleDflt:"z"===c,f="string"==typeof e.colorscaleDflt?a[e.colorscaleDflt]:null,p=e.editTypeOverride||"",m=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,o=e.colorAttr):o="in "+l(m+(r={z:"z",c:"color"}[c]));var g=u?" Has an effect only if "+o+" is set to a numerical array.":"",v=c+"auto",b=c+"min",y=c+"max",x=c+"mid",_=l(m+v),w=l(m+b),k=l(m+y),A=w+" and "+k,M={};M[b]=M[y]=void 0;var T={};T[v]=!1;var S={};return"color"===r&&(S.color={valType:"color",arrayOk:!0,editType:p||"style",description:["Sets the",t,"color.","It accepts either a specific color","or an array of numbers that are mapped to the colorscale","relative to the max and min values of the array or relative to",A,"if set."].join(" ")},e.anim&&(S.color.anim=!0)),S[v]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:M,description:["Determines whether or not the color domain is computed","with respect to the input data (here "+o+") or the bounds set in",A+g,"Defaults to `false` when",A,"are set by the user."].join(" ")},S[b]={valType:"number",dflt:null,editType:p||"plot",impliedEdits:T,description:["Sets the lower bound of the color domain."+g,"Value should have the same units as",o,"and if set,",k,"must be set as well."].join(" ")},S[y]={valType:"number",dflt:null,editType:p||"plot",impliedEdits:T,description:["Sets the upper bound of the color domain."+g,"Value should have the same units as",o,"and if set,",w,"must be set as well."].join(" ")},S[x]={valType:"number",dflt:null,editType:"calc",impliedEdits:M,description:["Sets the mid-point of the color domain by scaling",w,"and/or",k,"to be equidistant to this point."+g,"Value should have the same units as",o+".","Has no effect when",_,"is `false`."].join(" ")},S.colorscale={valType:"colorscale",editType:"calc",dflt:f,impliedEdits:{autocolorscale:!1},description:["Sets the colorscale."+g,"The colorscale must be an array containing","arrays mapping a normalized value to an","rgb, rgba, hex, hsl, hsv, or named color string.","At minimum, a mapping for the lowest (0) and highest (1)","values are required. For example,","`[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`.","To control the bounds of the colorscale in color space,","use",A+".","Alternatively, `colorscale` may be a palette name string","of the following list: "+s+"."].join(" ")},S.autocolorscale={valType:"boolean",dflt:!1!==e.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0},description:["Determines whether the colorscale is a default palette (`autocolorscale: true`)","or the palette determined by",l(m+"colorscale")+"."+g,"In case `colorscale` is unspecified or `autocolorscale` is true, the default","palette will be chosen according to whether numbers in the `color` array are","all positive, all negative or mixed."].join(" ")},S.reversescale={valType:"boolean",dflt:!1,editType:"plot",description:["Reverses the color mapping if true."+g,"If true,",w,"will correspond to the last color","in the array and",k,"will correspond to the first color."].join(" ")},h||(S.showscale={valType:"boolean",dflt:d,editType:"calc",description:["Determines whether or not a colorbar is displayed for this trace."+g].join(" ")},S.colorbar=n),e.noColorAxis||(S.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc",description:["Sets a reference to a shared color axis.","References to these shared color axes are *coloraxis*, *coloraxis2*, *coloraxis3*, etc.","Settings for these shared color axes are set in the layout, under","`layout.coloraxis`, `layout.coloraxis2`, etc.","Note that multiple color scales can be linked to the same color axis."].join(" ")}),S}},62182:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822),o=r(42226).extractOpts;t.exports=function(t,e,r){var a,s=t._fullLayout,l=r.vals,c=r.containerStr,u=c?i.nestedProperty(e,c).get():e,h=o(u),d=!1!==h.auto,f=h.min,p=h.max,m=h.mid,g=function(){return i.aggNums(Math.min,null,l)},v=function(){return i.aggNums(Math.max,null,l)};void 0===f?f=g():d&&(f=u._colorAx&&n(f)?Math.min(f,g()):g()),void 0===p?p=v():d&&(p=u._colorAx&&n(p)?Math.max(p,v()):v()),d&&void 0!==m&&(p-m>m-f?f=m-(p-m):p-m=0?s.colorscale.sequential:s.colorscale.sequentialminus,h._sync("colorscale",a))}},51774:(t,e,r)=>{"use strict";var n=r(12822),i=r(42226).hasColorscale,o=r(42226).extractOpts;t.exports=function(t,e){function r(t,e){var r=t["_"+e];void 0!==r&&(t[e]=r)}function a(t,i){var a=i.container?n.nestedProperty(t,i.container).get():t;if(a)if(a.coloraxis)a._colorAx=e[a.coloraxis];else{var s=o(a),l=s.auto;(l||void 0===s.min)&&r(a,i.min),(l||void 0===s.max)&&r(a,i.max),s.autocolorscale&&r(a,"colorscale")}}for(var s=0;s{"use strict";var n=r(7370),i=r(12822),o=r(52467),a=r(81692),s=r(78920).isValid,l=r(25059).traceIs;function c(t,e){var r=e.slice(0,e.length-1);return e?i.nestedProperty(t,r).get()||{}:t}t.exports=function t(e,r,u,h,d){var f=d.prefix,p=d.cLetter,m="_module"in r,g=c(e,f),v=c(r,f),b=c(r._template||{},f)||{},y=function(){return delete e.coloraxis,delete r.coloraxis,t(e,r,u,h,d)};if(m){var x=u._colorAxes||{},_=h(f+"coloraxis");if(_){var w=l(r,"contour")&&i.nestedProperty(r,"contours.coloring").get()||"heatmap",k=x[_];return void(k?(k[2].push(y),k[0]!==w&&(k[0]=!1,i.warn(["Ignoring coloraxis:",_,"setting","as it is linked to incompatible colorscales."].join(" ")))):x[_]=[w,r,[y]])}}var A=g[p+"min"],M=g[p+"max"],T=n(A)&&n(M)&&A{"use strict";var n=r(27941),i=r(18106),o=r(7370),a=r(12822),s=r(17499),l=r(78920).isValid,c=["showscale","autocolorscale","colorscale","reversescale","colorbar"],u=["min","max","mid","auto"];function h(t){var e,r,n,i=t._colorAx,o=i||t,a={};for(r=0;r=0;n--,i++){var o=t[n];r[i]=[1-o[0],o[1]]}return r}function p(t,e){e=e||{};for(var r=t.domain,a=t.range,l=a.length,c=new Array(l),u=0;u{"use strict";var n=r(78920),i=r(42226);t.exports={moduleType:"component",name:"colorscale",attributes:r(89322),layoutAttributes:r(92425),supplyLayoutDefaults:r(28558),handleDefaults:r(94461),crossTraceDefaults:r(51774),calc:r(62182),scales:n.scales,defaultScale:n.defaultScale,getScale:n.get,isValidScale:n.isValid,hasColorscale:i.hasColorscale,extractOpts:i.extractOpts,extractScale:i.extractScale,flipScale:i.flipScale,makeColorScaleFunc:i.makeColorScaleFunc,makeColorScaleFuncFromTrace:i.makeColorScaleFuncFromTrace}},92425:(t,e,r)=>{"use strict";var n=r(98260).extendFlat,i=r(89322),o=r(78920).scales,a="Note that `autocolorscale` must be true for this attribute to work.";t.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:o.Reds,editType:"calc",description:["Sets the default sequential colorscale for positive values.",a].join(" ")},sequentialminus:{valType:"colorscale",dflt:o.Blues,editType:"calc",description:["Sets the default sequential colorscale for negative values.",a].join(" ")},diverging:{valType:"colorscale",dflt:o.RdBu,editType:"calc",description:["Sets the default diverging colorscale.",a].join(" ")}},coloraxis:n({_isSubplotObj:!0,editType:"calc",description:[""].join(" ")},i("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},28558:(t,e,r)=>{"use strict";var n=r(12822),i=r(46121),o=r(92425),a=r(94461);t.exports=function(t,e){function r(r,i){return n.coerce(t,e,o,r,i)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var s,l,c=e._colorAxes;function u(t,e){return n.coerce(s,l,o.coloraxis,t,e)}for(var h in c){var d=c[h];if(d[0])s=t[h]||{},(l=i.newContainer(e,h,"coloraxis"))._name=h,a(s,l,e,u,{prefix:"",cLetter:"c"});else{for(var f=0;f{"use strict";var n=r(18106),i={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},o=i.RdBu;function a(t){var e=0;if(!Array.isArray(t)||t.length<2)return!1;if(!t[0]||!t[t.length-1])return!1;if(0!=+t[0][0]||1!=+t[t.length-1][0])return!1;for(var r=0;r{"use strict";t.exports=function(t,e,r,n,i){var o=(t-r)/(n-r),a=o+e/(n-r),s=(o+a)/2;return"left"===i||"bottom"===i?o:"center"===i||"middle"===i?s:"right"===i||"top"===i?a:o<2/3-s?o:a>4/3-s?a:s}},29182:(t,e,r)=>{"use strict";var n=r(12822),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(t,e,r,o){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===o?0:"middle"===o?1:"top"===o?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},14295:(t,e)=>{"use strict";e.selectMode=function(t){return"lasso"===t||"select"===t},e.drawMode=function(t){return"drawclosedpath"===t||"drawopenpath"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},e.openMode=function(t){return"drawline"===t||"drawopenpath"===t},e.rectMode=function(t){return"select"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},e.freeMode=function(t){return"lasso"===t||"drawclosedpath"===t||"drawopenpath"===t},e.selectingOrDrawing=function(t){return e.freeMode(t)||e.rectMode(t)}},19846:(t,e,r)=>{"use strict";var n=r(10024),i=r(56885),o=r(17520),a=r(12822).removeElement,s=r(21197),l=t.exports={};l.align=r(45035),l.getCursor=r(29182);var c=r(99573);function u(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function h(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(t){var e,r,n,c,d,f,p,m,g=t.gd,v=1,b=g._context.doubleClickDelay,y=t.element;g._mouseDownTime||(g._mouseDownTime=0),y.style.pointerEvents="all",y.onmousedown=_,o?(y._ontouchstart&&y.removeEventListener("touchstart",y._ontouchstart),y._ontouchstart=_,y.addEventListener("touchstart",_,{passive:!1})):y.ontouchstart=_;var x=t.clampFn||function(t,e,r){return Math.abs(t)b&&(v=Math.max(v-1,1)),g._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(v,f),!m){var r;try{r=new MouseEvent("click",e)}catch(t){var n=h(e);(r=document.createEvent("MouseEvents")).initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,n[0],n[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}p.dispatchEvent(r)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},l.coverSlip=u},99573:(t,e,r)=>{"use strict";var n=r(16677),i=r(76324),o=r(16822).getGraphDiv,a=r(99259),s=t.exports={};s.wrapped=function(t,e,r){(t=o(t))._fullLayout&&i.clear(t._fullLayout._uid+a.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&!t._dragged&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&i&&t.emit("plotly_unhover",{event:e,points:i}))}},68057:(t,e)=>{"use strict";e.T={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style",description:["Sets the dash style of lines. Set to a dash type string","(*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*)","or a dash length list in px (eg *5px,10px,2px,2px*)."].join(" ")},e.k={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style",description:["Sets the shape of the pattern fill.","By default, no pattern is used for filling the area."].join(" ")},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style",description:["Determines whether `marker.color` should be used","as a default to `bgcolor` or a `fgcolor`."].join(" ")},bgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of background pattern fill.","Defaults to a `marker.color` background when `fillmode` is *overlay*.","Otherwise, defaults to a transparent background."].join(" ")},fgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of foreground pattern fill.","Defaults to a `marker.color` background when `fillmode` is *replace*.","Otherwise, defaults to dark grey or white","to increase contrast with the `bgcolor`."].join(" ")},fgopacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the foreground pattern fill.","Defaults to a 0.5 when `fillmode` is *overlay*.","Otherwise, defaults to 1."].join(" ")},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style",description:["Sets the size of unit squares of the pattern fill in pixels,","which corresponds to the interval of repetition of the pattern."].join(" ")},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style",description:["Sets the solidity of the pattern fill.","Solidity is roughly the fraction of the area filled by the pattern.","Solidity of 0 shows only the background color without pattern","and solidty of 1 shows only the foreground color without pattern."].join(" ")},editType:"style",description:["Sets the pattern within the marker."].join(" ")}},40666:(t,e,r)=>{"use strict";var n=r(27941),i=r(12822),o=i.numberFormat,a=r(7370),s=r(18106),l=r(25059),c=r(17499),u=r(80755),h=i.strTranslate,d=r(80394),f=r(25853),p=r(89701).LINE_SPACING,m=r(11891).DESELECTDIM,g=r(677),v=r(43710),b=r(66811).appendArrayPointValue,y=t.exports={};function x(t,e,r,n){var i=e.fillpattern,o=e.fillgradient,a=i&&y.getPatternAttr(i.shape,0,"");if(a){var s=y.getPatternAttr(i.bgcolor,0,null),l=y.getPatternAttr(i.fgcolor,0,null),u=i.fgopacity,h=y.getPatternAttr(i.size,0,8),d=y.getPatternAttr(i.solidity,0,.3),f=e.uid;y.pattern(t,"point",r,f,a,h,d,void 0,i.fillmode,s,l,u)}else if(o&&"none"!==o.type){var p,m,g=o.type,v="scatterfill-"+e.uid;n&&(v="legendfill-"+e.uid),n||void 0===o.start&&void 0===o.stop?("horizontal"===g&&(g+="reversed"),t.call(y.gradient,r,v,g,o.colorscale,"fill")):("horizontal"===g?(p={x:o.start,y:0},m={x:o.stop,y:0}):"vertical"===g&&(p={x:0,y:o.start},m={x:0,y:o.stop}),p.x=e._xA.c2p(void 0===p.x?e._extremes.x.min[0].val:p.x,!0),p.y=e._yA.c2p(void 0===p.y?e._extremes.y.min[0].val:p.y,!0),m.x=e._xA.c2p(void 0===m.x?e._extremes.x.max[0].val:m.x,!0),m.y=e._yA.c2p(void 0===m.y?e._extremes.y.max[0].val:m.y,!0),t.call(T,r,v,"linear",o.colorscale,"fill",p,m,!0,!1))}else e.fillcolor&&t.call(c.fill,e.fillcolor)}y.font=function(t,e,r,n,o,a,s){i.isPlainObject(e)&&(s=e.variant,a=e.style,o=e.weight,n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(c.fill,n),o&&t.style("font-weight",o),a&&t.style("font-style",a),s&&t.style("font-variant",s)},y.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},y.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},y.setRect=function(t,e,r,n,i){t.call(y.setPosition,e,r).call(y.setSize,n,i)},y.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),o=n.c2p(t.y);return!!(a(i)&&a(o)&&e.node())&&("text"===e.node().nodeName?e.attr("x",i).attr("y",o):e.attr("transform",h(i,o)),!0)},y.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);y.translatePoint(t,i,e,r)}))},y.hideOutsideRangePoint=function(t,e,r,n,i,o){e.attr("display",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,o)?null:"none")},y.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,i=e.yaxis;t.each((function(e){var o=e[0].trace,a=o.xcalendar,s=o.ycalendar,c=l.traceIs(o,"bar-like")?".bartext":".point,.textpoint";t.selectAll(c).each((function(t){y.hideOutsideRangePoint(t,n.select(this),r,i,a,s)}))}))}},y.crispRound=function(t,e,r){return e&&a(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},y.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var o=(((t||[])[0]||{}).trace||{}).line||{},a=r||o.width||0,s=i||o.dash||"";c.stroke(e,n||o.color),y.dashLine(e,s,a)},y.lineGroupStyle=function(t,e,r,i){t.style("fill","none").each((function(t){var o=(((t||[])[0]||{}).trace||{}).line||{},a=e||o.width||0,s=i||o.dash||"";n.select(this).call(c.stroke,r||o.color).call(y.dashLine,s,a)}))},y.dashLine=function(t,e,r){r=+r||0,e=y.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},y.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},y.singleFillStyle=function(t,e){var r=n.select(t.node());x(t,((r.data()[0]||[])[0]||{}).trace||{},e,!1)},y.fillGroupStyle=function(t,e,r){t.style("stroke-width",0).each((function(t){var i=n.select(this);t[0].trace&&x(i,t[0].trace,e,r)}))};var _=r(68735);y.symbolNames=[],y.symbolFuncs=[],y.symbolBackOffs=[],y.symbolNeedLines={},y.symbolNoDot={},y.symbolNoFill={},y.symbolList=[],Object.keys(_).forEach((function(t){var e=_[t],r=e.n;y.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),y.symbolNames[r]=t,y.symbolFuncs[r]=e.f,y.symbolBackOffs[r]=e.backoff||0,e.needLine&&(y.symbolNeedLines[r]=!0),e.noDot?y.symbolNoDot[r]=!0:y.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(y.symbolNoFill[r]=!0)}));var w=y.symbolNames.length;function k(t,e,r,n){var i=t%100;return y.symbolFuncs[i](e,r,n)+(t>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}y.symbolNumber=function(t){if(a(t))t=+t;else if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=y.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=w||t>=400?0:Math.floor(Math.max(t,0))};var A=o("~f"),M={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function T(t,e,r,o,a,l,u,h,d,f){var p,m=a.length;"linear"===o?p={node:"linearGradient",attrs:{x1:u.x,y1:u.y,x2:h.x,y2:h.y,gradientUnits:d?"userSpaceOnUse":"objectBoundingBox"},reversed:f}:"radial"===o&&(p={node:"radialGradient",reversed:f});for(var g=new Array(m),v=0;v=0&&void 0===t.i&&(t.i=a.i),e.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(t):void 0===t.mo?s.opacity:t.mo),n.ms2mrc){var u;u="various"===t.ms||"various"===s.size?3:n.ms2mrc(t.ms),t.mrc=u,n.selectedSizeFn&&(u=t.mrc=n.selectedSizeFn(t));var h=y.symbolNumber(t.mx||s.symbol)||0;t.om=h%200>=100;var d=et(t,r),f=H(t,r);e.attr("d",k(h,u,d,f))}var p,m,g,v=!1;if(t.so)g=l.outlierwidth,m=l.outliercolor,p=s.outliercolor;else{var b=(l||{}).width;g=(t.mlw+1||b+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,m="mlc"in t?t.mlcc=n.lineScale(t.mlc):i.isArrayOrTypedArray(l.color)?c.defaultLine:l.color,i.isArrayOrTypedArray(s.color)&&(p=c.defaultLine,v=!0),p="mc"in t?t.mcc=n.markerScale(t.mc):s.color||s.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(p=n.selectedColorFn(t))}if(t.om)e.call(c.stroke,p).style({"stroke-width":(g||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:g)+"px");var x=s.gradient,_=t.mgt;_?v=!0:_=x&&x.type,i.isArrayOrTypedArray(_)&&(_=_[0],M[_]||(_=0));var w=s.pattern,A=w&&y.getPatternAttr(w.shape,t.i,"");if(_&&"none"!==_){var T=t.mgc;T?v=!0:T=x.color;var S=r.uid;v&&(S+="-"+t.i),y.gradient(e,o,S,_,[[0,T],[1,p]],"fill")}else if(A){var C=!1,E=w.fgcolor;!E&&a&&a.color&&(E=a.color,C=!0);var L=y.getPatternAttr(E,t.i,a&&a.color||null),z=y.getPatternAttr(w.bgcolor,t.i,null),O=w.fgopacity,D=y.getPatternAttr(w.size,t.i,8),I=y.getPatternAttr(w.solidity,t.i,.3);C=C||t.mcc||i.isArrayOrTypedArray(w.shape)||i.isArrayOrTypedArray(w.bgcolor)||i.isArrayOrTypedArray(w.fgcolor)||i.isArrayOrTypedArray(w.size)||i.isArrayOrTypedArray(w.solidity);var R=r.uid;C&&(R+="-"+t.i),y.pattern(e,"point",o,R,A,D,I,t.mcc,w.fillmode,z,L,O)}else i.isArrayOrTypedArray(p)?c.fill(e,p[t.i]):c.fill(e,p);g&&c.stroke(e,m)}},y.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=y.tryColorscale(r,""),e.lineScale=y.tryColorscale(r,"line"),l.traceIs(t,"symbols")&&(e.ms2mrc=g.isBubble(t)?v(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,y.makeSelectedPointStyleFns(t)),e},y.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},o=t.marker||{},a=r.marker||{},s=n.marker||{},c=o.opacity,u=a.opacity,h=s.opacity,d=void 0!==u,f=void 0!==h;(i.isArrayOrTypedArray(c)||d||f)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?o.opacity:t.mo;return t.selected?d?u:e:f?h:m*e});var p=o.color,g=a.color,v=s.color;(g||v)&&(e.selectedColorFn=function(t){var e=t.mcc||p;return t.selected?g||e:v||e});var b=o.size,y=a.size,x=s.size,_=void 0!==y,w=void 0!==x;return l.traceIs(t,"symbols")&&(_||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||b/2;return t.selected?_?y/2:e:w?x/2:e}),e},y.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},o=r.textfont||{},a=n.textfont||{},s=i.color,l=o.color,u=a.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:u||(l?e:c.addOpacity(e,m))},e},y.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=y.makeSelectedPointStyleFns(e),i=e.marker||{},o=[];r.selectedOpacityFn&&o.push((function(t,e){t.style("opacity",r.selectedOpacityFn(e))})),r.selectedColorFn&&o.push((function(t,e){c.fill(t,r.selectedColorFn(e))})),r.selectedSizeFn&&o.push((function(t,n){var o=n.mx||i.symbol||0,a=r.selectedSizeFn(n);t.attr("d",k(y.symbolNumber(o),a,et(n,e),H(n,e))),n.mrc2=a})),o.length&&t.each((function(t){for(var e=n.select(this),r=0;r0?r:0}function O(t,e,r){return r&&(t=N(t)),e?I(t[1]):D(t[0])}function D(t){var e=n.round(t,2);return S=e,e}function I(t){var e=n.round(t,2);return C=e,e}function R(t,e,r,n){var i=t[0]-e[0],o=t[1]-e[1],a=r[0]-e[0],s=r[1]-e[1],l=Math.pow(i*i+o*o,.25),c=Math.pow(a*a+s*s,.25),u=(c*c*i-l*l*a)*n,h=(c*c*o-l*l*s)*n,d=3*c*(l+c),f=3*l*(l+c);return[[D(e[0]+(d&&u/d)),I(e[1]+(d&&h/d))],[D(e[0]-(f&&u/f)),I(e[1]-(f&&h/f))]]}y.textPointStyle=function(t,e,r){if(t.size()){var o;if(e.selectedpoints){var a=y.makeSelectedTextStyleFns(e);o=a.selectedTextColorFn}var s=e.texttemplate,l=r._fullLayout;t.each((function(t){var a=n.select(this),c=s?i.extractOption(t,e,"txt","texttemplate"):i.extractOption(t,e,"tx","text");if(c||0===c){if(s){var u=e._module.formatLabels,h=u?u(t,e,l):{},f={};b(f,e,t.i);var p=e._meta||{};c=i.texttemplateString(c,h,l._d3locale,f,t,p)}var m=t.tp||e.textposition,g=z(t,e),v=o?o(t):t.tc||e.textfont.color;a.call(y.font,{family:t.tf||e.textfont.family,weight:t.tw||e.textfont.weight,style:t.ty||e.textfont.style,variant:t.tv||e.textfont.variant,size:g,color:v}).text(c).call(d.convertToTspans,r).call(L,m,g,t.mrc)}else a.remove()}))}},y.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=y.makeSelectedTextStyleFns(e);t.each((function(t){var i=n.select(this),o=r.selectedTextColorFn(t),a=t.tp||e.textposition,s=z(t,e);c.fill(i,o);var u=l.traceIs(e,"bar-like");L(i,a,s,t.mrc2||t.mrc,u)}))}},y.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],i=[];for(r=1;r=c||w>=h&&w<=c)&&(k<=d&&k>=u||k>=d&&k<=u)&&(t=[w,k])}return t}y.steps=function(t){var e=F[t]||P;return function(t){for(var r="M"+D(t[0][0])+","+I(t[0][1]),n=t.length,i=1;i=1e4&&(y.savedBBoxes={},j=0),r&&(y.savedBBoxes[r]=g),j++,i.extendFlat({},g)},y.setClipUrl=function(t,e,r){t.attr("clip-path",U(e,r))},y.getTranslate=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||0,y:+e[1]||0}},y.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",o=t[n]("transform")||"";return e=e||0,r=r||0,o=o.replace(/(\btranslate\(.*?\);?)/,"").trim(),o=(o+=h(e,r)).trim(),t[i]("transform",o),o},y.getScale=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||1,y:+e[1]||1}},y.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",o=t[n]("transform")||"";return e=e||1,r=r||1,o=o.replace(/(\bscale\(.*?\);?)/,"").trim(),o=(o+="scale("+e+","+r+")").trim(),t[i]("transform",o),o};var G=/\s*sc.*/;y.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":"scale("+e+","+r+")";t.each((function(){var t=(this.getAttribute("transform")||"").replace(G,"");t=(t+=n).trim(),this.setAttribute("transform",t)}))}};var V=/translate\([^)]*\)\s*$/;function H(t,e){var r;return t&&(r=t.mf),void 0===r&&(r=e.marker&&e.marker.standoff||0),e._geo||e._xA?r:-r}y.setTextPointsScale=function(t,e,r){t&&t.each((function(){var t,i=n.select(this),o=i.select("text");if(o.node()){var a=parseFloat(o.attr("x")||0),s=parseFloat(o.attr("y")||0),l=(i.attr("transform")||"").match(V);t=1===e&&1===r?[]:[h(a,s),"scale("+e+","+r+")",h(-a,-s)],l&&t.push(l),i.attr("transform",t.join(""))}}))},y.getMarkerStandoff=H;var W,q,Y,Z,X,$,J=Math.atan2,K=Math.cos,Q=Math.sin;function tt(t,e){var r=e[0],n=e[1];return[r*K(t)-n*Q(t),r*Q(t)+n*K(t)]}function et(t,e){var r,n,o=t.ma;void 0===o&&((o=e.marker.angle)&&!i.isArrayOrTypedArray(o)||(o=0));var s=e.marker.angleref;if("previous"===s||"north"===s){if(e._geo){var l=e._geo.project(t.lonlat);r=l[0],n=l[1]}else{var c=e._xA,u=e._yA;if(!c||!u)return 90;r=c.c2p(t.x),n=u.c2p(t.y)}if(e._geo){var h,d=t.lonlat[0],f=t.lonlat[1],p=e._geo.project([d,f+1e-5]),m=e._geo.project([d+1e-5,f]),g=J(m[1]-n,m[0]-r),v=J(p[1]-n,p[0]-r);if("north"===s)h=o/180*Math.PI;else if("previous"===s){var b=d/180*Math.PI,y=f/180*Math.PI,x=W/180*Math.PI,_=q/180*Math.PI,w=x-b,k=K(_)*Q(w),A=Q(_)*K(y)-K(_)*Q(y)*K(w);h=-J(k,A)-Math.PI,W=d,q=f}var M=tt(g,[K(h),0]),T=tt(v,[Q(h),0]);o=J(M[1]+T[1],M[0]+T[0])/Math.PI*180,"previous"!==s||$===e.uid&&t.i===X+1||(o=null)}if("previous"===s&&!e._geo)if($===e.uid&&t.i===X+1&&a(r)&&a(n)){var S=r-Y,C=n-Z,E=e.line&&e.line.shape||"",L=E.slice(E.length-1);"h"===L&&(C=0),"v"===L&&(S=0),o+=J(C,S)/Math.PI*180+90}else o=null}return Y=r,Z=n,X=t.i,$=e.uid,o}y.getMarkerAngle=et},68735:(t,e,r)=>{"use strict";var n,i,o,a,s=r(37974),l=r(27941).round,c="M0,0Z",u=Math.sqrt(2),h=Math.sqrt(3),d=Math.PI,f=Math.cos,p=Math.sin;function m(t){return null===t}function g(t,e,r){if(!(t&&t%360!=0||e))return r;if(o===t&&a===e&&n===r)return i;function l(t,r){var n=f(t),i=p(t),o=r[0],a=r[1]+(e||0);return[o*n-a*i,o*i+a*n]}o=t,a=e,n=r;for(var c=t/180*d,u=0,h=0,m=s(r),g="",v=0;v{"use strict";t.exports={visible:{valType:"boolean",editType:"calc",description:["Determines whether or not this set of error bars is visible."].join(" ")},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc",description:["Determines the rule used to generate the error bars.","If *constant`, the bar lengths are of a constant value.","Set this constant in `value`.","If *percent*, the bar lengths correspond to a percentage of","underlying data. Set this percentage in `value`.","If *sqrt*, the bar lengths correspond to the square of the","underlying data.","If *data*, the bar lengths are set with data set `array`."].join(" ")},symmetric:{valType:"boolean",editType:"calc",description:["Determines whether or not the error bars have the same length","in both direction","(top/bottom for vertical bars, left/right for horizontal bars."].join(" ")},array:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar.","Values are plotted relative to the underlying data."].join(" ")},arrayminus:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar in the","bottom (left) direction for vertical (horizontal) bars","Values are plotted relative to the underlying data."].join(" ")},value:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars."].join(" ")},valueminus:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars in the","bottom (left) direction for vertical (horizontal) bars"].join(" ")},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style",description:"Sets the stoke color of the error bars."},thickness:{valType:"number",min:0,dflt:2,editType:"style",description:"Sets the thickness (in px) of the error bars."},width:{valType:"number",min:0,editType:"plot",description:["Sets the width (in px) of the cross-bar at both ends","of the error bars."].join(" ")},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style",description:["Obsolete.","Use the alpha channel in error bar `color` to set the opacity."].join(" ")}}}},8295:(t,e,r)=>{"use strict";var n=r(7370),i=r(25059),o=r(75815),a=r(12822),s=r(27512);function l(t,e,r,i){var l=e["error_"+i]||{},c=[];if(l.visible&&-1!==["linear","log"].indexOf(r.type)){for(var u=s(l),h=0;h{"use strict";function e(t,e){return"percent"===t?function(t){return Math.abs(t*e/100)}:"constant"===t?function(){return Math.abs(e)}:"sqrt"===t?function(t){return Math.sqrt(Math.abs(t))}:void 0}t.exports=function(t){var r=t.type,n=t.symmetric;if("data"===r){var i=t.array||[];if(n)return function(t,e){var r=+i[e];return[r,r]};var o=t.arrayminus||[];return function(t,e){var r=+i[e],n=+o[e];return isNaN(r)&&isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var a=e(r,t.value),s=e(r,t.valueminus);return n||void 0===t.valueminus?function(t){var e=a(t);return[e,e]}:function(t){return[s(t),a(t)]}}},69440:(t,e,r)=>{"use strict";var n=r(7370),i=r(25059),o=r(12822),a=r(46121),s=r(96647);t.exports=function(t,e,r,l){var c="error_"+l.axis,u=a.newContainer(e,c),h=t[c]||{};function d(t,e){return o.coerce(h,u,s,t,e)}if(!1!==d("visible",void 0!==h.array||void 0!==h.value||"sqrt"===h.type)){var f=d("type","array"in h?"data":"percent"),p=!0;"sqrt"!==f&&(p=d("symmetric",!(("data"===f?"arrayminus":"valueminus")in h))),"data"===f?(d("array"),d("traceref"),p||(d("arrayminus"),d("tracerefminus"))):"percent"!==f&&"constant"!==f||(d("value"),p||d("valueminus"));var m="copy_"+l.inherit+"style";l.inherit&&(e["error_"+l.inherit]||{}).visible&&d(m,!(h.color||n(h.thickness)||n(h.width))),l.inherit&&u[m]||(d("color",r),d("thickness"),d("width",i.traceIs(e,"gl3d")?0:4))}}},90156:(t,e,r)=>{"use strict";var n=r(12822),i=r(62309).overrideAll,o=r(96647),a={error_x:n.extendFlat({},o),error_y:n.extendFlat({},o)};delete a.error_x.copy_zstyle,delete a.error_y.copy_zstyle,delete a.error_y.copy_ystyle;var s={error_x:n.extendFlat({},o),error_y:n.extendFlat({},o),error_z:n.extendFlat({},o)};delete s.error_x.copy_ystyle,delete s.error_y.copy_ystyle,delete s.error_z.copy_ystyle,delete s.error_z.copy_zstyle,t.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:a,bar:a,histogram:a,scatter3d:i(s,"calc","nested"),scattergl:i(a,"calc","nested")}},supplyDefaults:r(69440),calc:r(8295),makeComputeError:r(27512),plot:r(42961),style:r(83821),hoverInfo:function(t,e,r){(e.error_y||{}).visible&&(r.yerr=t.yh-t.y,e.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(e.error_x||{}).visible&&(r.xerr=t.xh-t.x,e.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}},42961:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=r(40666),a=r(677);t.exports=function(t,e,r,s){var l=r.xaxis,c=r.yaxis,u=s&&s.duration>0,h=t._context.staticPlot;e.each((function(e){var d,f=e[0].trace,p=f.error_x||{},m=f.error_y||{};f.ids&&(d=function(t){return t.id});var g=a.hasMarkers(f)&&f.marker.maxdisplayed>0;m.visible||p.visible||(e=[]);var v=n.select(this).selectAll("g.errorbar").data(e,d);if(v.exit().remove(),e.length){p.visible||v.selectAll("path.xerror").remove(),m.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var b=v.enter().append("g").classed("errorbar",!0);u&&b.style("opacity",0).transition().duration(s.duration).style("opacity",1),o.setClipUrl(v,r.layerClipId,t),v.each((function(t){var e=n.select(this),r=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};return void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0))),void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0))),n}(t,l,c);if(!g||t.vis){var o,a=e.select("path.yerror");if(m.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var d=m.width;o="M"+(r.x-d)+","+r.yh+"h"+2*d+"m-"+d+",0V"+r.ys,r.noYS||(o+="m-"+d+",0h"+2*d),a.size()?u&&(a=a.transition().duration(s.duration).ease(s.easing)):a=e.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("yerror",!0),a.attr("d",o)}else a.remove();var f=e.select("path.xerror");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var v=(p.copy_ystyle?m:p).width;o="M"+r.xh+","+(r.y-v)+"v"+2*v+"m0,-"+v+"H"+r.xs,r.noXS||(o+="m0,-"+v+"v"+2*v),f.size()?u&&(f=f.transition().duration(s.duration).ease(s.easing)):f=e.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("xerror",!0),f.attr("d",o)}else f.remove()}}))}}))}},83821:(t,e,r)=>{"use strict";var n=r(27941),i=r(17499);t.exports=function(t){t.each((function(t){var e=t[0].trace,r=e.error_y||{},o=e.error_x||{},a=n.select(this);a.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),o.copy_ystyle&&(o=r),a.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(i.stroke,o.color)}))}},60713:(t,e,r)=>{"use strict";var n=r(75058),i=r(53572).hoverlabel,o=r(98260).extendFlat;t.exports={hoverlabel:{bgcolor:o({},i.bgcolor,{arrayOk:!0,description:"Sets the background color of the hover labels for this trace"}),bordercolor:o({},i.bordercolor,{arrayOk:!0,description:"Sets the border color of the hover labels for this trace."}),font:n({arrayOk:!0,editType:"none",description:"Sets the font used in hover labels."}),align:o({},i.align,{arrayOk:!0}),namelength:o({},i.namelength,{arrayOk:!0}),editType:"none"}}},56173:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059);function o(t,e,r,i){i=i||n.identity,Array.isArray(t)&&(e[0][r]=i(t))}t.exports=function(t){var e=t.calcdata,r=t._fullLayout;function a(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},r)}}for(var s=0;s{"use strict";var n=r(25059),i=r(87408).hover;t.exports=function(t,e,r){var o=n.getComponentMethod("annotations","onClick")(t,t._hoverdata);function a(){t.emit("plotly_click",{points:t._hoverdata,event:e})}void 0!==r&&i(t,e,r,!0),t._hoverdata&&e&&e.target&&(o&&o.then?o.then(a):a(),e.stopImmediatePropagation&&e.stopImmediatePropagation())}},99259:t=>{"use strict";t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},55470:(t,e,r)=>{"use strict";var n=r(12822),i=r(60713),o=r(33369);t.exports=function(t,e,r,a){var s=n.extendFlat({},a.hoverlabel);e.hovertemplate&&(s.namelength=-1),o(t,e,(function(r,o){return n.coerce(t,e,i,r,o)}),s)}},66811:(t,e,r)=>{"use strict";var n=r(12822);e.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},e.isTraceInSubplots=function(t,r){if("splom"===t.type){for(var n=t.xaxes||[],i=t.yaxes||[],o=0;o=0&&r.index{"use strict";var n=r(27941),i=r(7370),o=r(18106),a=r(12822),s=a.pushUnique,l=a.strTranslate,c=a.strRotate,u=r(16677),h=r(80394),d=r(27517),f=r(40666),p=r(17499),m=r(19846),g=r(75815),v=r(25059),b=r(66811),y=r(99259),x=r(64083),_=r(67739),w=y.YANGLE,k=Math.PI*w/180,A=1/Math.sin(k),M=Math.cos(k),T=Math.sin(k),S=y.HOVERARROWSIZE,C=y.HOVERTEXTPAD,E={box:!0,ohlc:!0,violin:!0,candlestick:!0},L={scatter:!0,scattergl:!0,splom:!0};function z(t,e){return t.distance-e.distance}function O(t){return[t.trace.index,t.index,t.x0,t.y0,t.name,t.attr,t.xa?t.xa._id:"",t.ya?t.ya._id:""].join(",")}e.hover=function(t,e,r,o){t=a.getGraphDiv(t);var l=e.target;a.throttle(t._fullLayout._uid+y.HOVERID,y.HOVERMINTIME,(function(){!function(t,e,r,o,l){r||(r="xy");var c,h,f,y=Array.isArray(r)?r:[r],x=t._fullLayout,_=x.hoversubplots,w=x._plots||[],k=w[r],M=x._has("cartesian"),T=e.hovermode||x.hovermode,C="x"===(T||"").charAt(0),D="y"===(T||"").charAt(0);if(M&&(C||D)&&"axis"===_)for(var R=y.length,U=0;UX[0]._length||xt<0||xt>$[0]._length)return m.unhoverRaw(t,e)}else yt="xpx"in e?e.xpx:X[0]._length/2,xt="ypx"in e?e.ypx:$[0]._length/2;if(e.pointerX=yt+X[0]._offset,e.pointerY=xt+$[0]._offset,rt="xval"in e?b.flat(y,e.xval):b.p2c(X,yt),nt="yval"in e?b.flat(y,e.yval):b.p2c($,xt),!i(rt[0])||!i(nt[0]))return a.warn("Fx.hover failed",e,t),m.unhoverRaw(t,e)}var At=1/0;function Mt(r,n){for(ot=0;otpt&&(mt.splice(0,pt),At=mt[0].distance),M&&0!==et&&0===mt.length){ft.distance=et,ft.index=!1;var u=st._module.hoverPoints(ft,ht,dt,"closest",{hoverLayer:x._hoverlayer});if(u&&(u=u.filter((function(t){return t.spikeDistance<=et}))),u&&u.length){var h,d=u.filter((function(t){return t.xa.showspikes&&"hovered data"!==t.xa.spikesnap}));if(d.length){var f=d[0];i(f.x0)&&i(f.y0)&&(h=St(f),(!vt.vLinePoint||vt.vLinePoint.spikeDistance>h.spikeDistance)&&(vt.vLinePoint=h))}var m=u.filter((function(t){return t.ya.showspikes&&"hovered data"!==t.ya.spikesnap}));if(m.length){var g=m[0];i(g.x0)&&i(g.y0)&&(h=St(g),(!vt.hLinePoint||vt.hLinePoint.spikeDistance>h.spikeDistance)&&(vt.hLinePoint=h))}}}}}function Tt(t,e,r){for(var n,i=null,o=1/0,a=0;a0&&Math.abs(t.distance)Nt-1;jt--)Vt(mt[jt]);mt=Bt,zt()}var Ht=t._hoverdata,Wt=[],qt=V(t),Yt=H(t);for(it=0;it1||mt.length>1)||"closest"===T&&bt&&mt.length>1,ae=p.combine(x.plot_bgcolor||p.background,x.paper_bgcolor),se=I(mt,{gd:t,hovermode:T,rotateLabels:oe,bgColor:ae,container:x._hoverlayer,outerContainer:x._paper.node(),commonLabelOpts:x.hoverlabel,hoverdistance:x.hoverdistance}),le=se.hoverLabels;if(b.isUnifiedHover(T)||(function(t,e,r,n){var i,o,a,s,l,c,u,h=e?"xa":"ya",d=e?"ya":"xa",f=0,p=1,m=t.size(),g=new Array(m),v=0,b=n.minX,y=n.maxX,x=n.minY,_=n.maxY,w=function(t){return t*r._invScaleX},k=function(t){return t*r._invScaleY};function M(t){var e=t[0],r=t[t.length-1];if(o=e.pmin-e.pos-e.dp+e.size,a=r.pos+r.dp+r.size-e.pmax,o>.01){for(l=t.length-1;l>=0;l--)t[l].dp+=o;i=!1}if(!(a<.01)){if(o<-.01){for(l=t.length-1;l>=0;l--)t[l].dp-=a;i=!1}if(i){var n=0;for(s=0;se.pmax&&n++;for(s=t.length-1;s>=0&&!(n<=0);s--)(c=t[s]).pos>e.pmax-1&&(c.del=!0,n--);for(s=0;s=0;l--)t[l].dp-=a;for(s=t.length-1;s>=0&&!(n<=0);s--)(c=t[s]).pos+c.dp+c.size>e.pmax&&(c.del=!0,n--)}}}for(t.each((function(t){var n=t[h],i=t[d],o="x"===n._id.charAt(0),a=n.range;0===v&&a&&a[0]>a[1]!==o&&(p=-1);var s=0,l=o?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var c,u,f=F(t,e),m=t.anchor,M="end"===m?-1:1;if("middle"===m)u=(c=t.crossPos+(o?k(f.y-t.by/2):w(t.bx/2+t.tx2width/2)))+(o?k(t.by):w(t.bx));else if(o)u=(c=t.crossPos+k(S+f.y)-k(t.by/2-S))+k(t.by);else{var T=w(M*S+f.x),C=T+w(M*t.bx);c=t.crossPos+Math.min(T,C),u=t.crossPos+Math.max(T,C)}o?void 0!==x&&void 0!==_&&Math.min(u,_)-Math.max(c,x)>1&&("left"===i.side?(s=i._mainLinePosition,l=r.width):l=i._mainLinePosition):void 0!==b&&void 0!==y&&Math.min(u,y)-Math.max(c,b)>1&&("top"===i.side?(s=i._mainLinePosition,l=r.height):l=i._mainLinePosition)}g[v++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(o?A:1)/2,pmin:s,pmax:l}]})),g.sort((function(t,e){return t[0].posref-e[0].posref||p*(e[0].traceIndex-t[0].traceIndex)}));!i&&f<=m;){for(f++,i=!0,s=0;s.01&&E.pmin===L.pmin&&E.pmax===L.pmax){for(l=C.length-1;l>=0;l--)C[l].dp+=o;for(T.push.apply(T,C),g.splice(s+1,1),u=0,l=T.length-1;l>=0;l--)u+=T[l].dp;for(a=u/T.length,l=T.length-1;l>=0;l--)T[l].dp-=a;i=!1}else s++}g.forEach(M)}for(s=g.length-1;s>=0;s--){var z=g[s];for(l=z.length-1;l>=0;l--){var O=z[l],D=O.datum;D.offset=O.dp,D.del=O.del}}}(le,oe,x,se.commonLabelBoundingBox),P(le,oe,x._invScaleX,x._invScaleY)),l&&l.tagName){var ce=v.getComponentMethod("annotations","hasClickToShow")(t,Wt);d(n.select(l),ce?"pointer":"")}l&&!o&&function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],o=t._hoverdata[n];if(i.curveNumber!==o.curveNumber||String(i.pointNumber)!==String(o.pointNumber)||String(i.pointNumbers)!==String(o.pointNumbers))return!0}return!1}(t,0,Ht)&&(Ht&&t.emit("plotly_unhover",{event:e,points:Ht}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:X,yaxes:$,xvals:rt,yvals:nt}))}(t,e,r,o,l)}))},e.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=e.gd,o=V(i),a=H(i),s=!1,l=I(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,c=t.eventData;if(c){var u=Math.min(r,n),h=Math.max(r,n),d=Math.min(s,l),f=Math.max(s,l),m=t.trace;if(v.traceIs(m,"gl3d")){var g=i._fullLayout[m.scene]._scene.container,b=g.offsetLeft,y=g.offsetTop;u+=b,h+=b,d+=y,f+=y}c.bbox={x0:u+a,x1:h+a,y0:d+o,y1:f+o},e.inOut_bbox&&e.inOut_bbox.push(c.bbox)}else c=!1;return{color:t.color||p.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontVariant:t.fontVariant,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:"closest",rotateLabels:s,bgColor:e.bgColor||p.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}).hoverLabels,c=0,u=0;return l.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5([\s\S]*)<\/extra>/;function I(t,e){var r=e.gd,i=r._fullLayout,o=e.hovermode,s=e.rotateLabels,u=e.bgColor,d=e.container,m=e.outerContainer,g=e.commonLabelOpts||{};if(0===t.length)return[[]];var k=e.fontFamily||y.HOVERFONT,A=e.fontSize||y.HOVERFONTSIZE,M=e.fontWeight||i.font.weight,T=e.fontStyle||i.font.style,E=e.fontVariant||i.font.variant,L=t[0],z=L.xa,D=L.ya,I=o.charAt(0),F=I+"Label",P=L[F];if(void 0===P&&"multicategory"===z.type)for(var N=0;Ni.width-_&&(w=i.width-_),e.attr("d","M"+(v-w)+",0L"+(v-w+S)+","+x+S+"H"+_+"v"+x+(2*C+y.height)+"H"+-_+"V"+x+S+"H"+(v-w-S)+"Z"),v=w,$.minX=v-_,$.maxX=v+_,"top"===z.side?($.minY=b-(2*C+y.height),$.maxY=b-C):($.minY=b+C,$.maxY=b+(2*C+y.height))}else{var O,I,R;"right"===D.side?(O="start",I=1,R="",v=z._offset+z._length):(O="end",I=-1,R="-",v=z._offset),b=D._offset+(L.y0+L.y1)/2,s.attr("text-anchor",O),e.attr("d","M0,0L"+R+S+","+S+"V"+(C+y.height/2)+"h"+R+(2*C+y.width)+"V-"+(C+y.height/2)+"H"+R+S+"V-"+S+"Z"),$.minY=b-(C+y.height/2),$.maxY=b+(C+y.height/2),"right"===D.side?($.minX=v+S,$.maxX=v+S+(2*C+y.width)):($.minX=v-S-(2*C+y.width),$.maxX=v-S);var F,N=y.height/2,j=B-y.top-N,U="clip"+i._uid+"commonlabel"+D._id;if(v=0?ht:dt+mt=0?dt:kt+mt=0?ct:ut+gt=0?ut:At+gt=0,"top"!==t.idealAlign&&Z||!X?Z?(F+=j/2,t.anchor="start"):t.anchor="middle":(F-=j/2,t.anchor="end"),t.crossPos=F;else{if(t.pos=F,Z=I+N/2+$<=U,X=I-N/2-$>=0,"left"!==t.idealAlign&&Z||!X)if(Z)I+=N/2,t.anchor="start";else{t.anchor="middle";var J=$/2,K=I+J-U,Q=I-J;K>0&&(I-=K),Q<0&&(I+=-Q)}else I-=N/2,t.anchor="end";t.crossPos=I}_.attr("text-anchor",t.anchor),z&&L.attr("text-anchor",t.anchor),e.attr("transform",l(I,F)+(s?c(w):""))})),{hoverLabels:Mt,commonLabelBoundingBox:$}}function R(t,e,r,n,i,o){var s="",l="";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=a.templateString(t.name,t.trace._meta)),s=U(t.name,t.nameLength));var c=r.charAt(0),u="x"===c?"y":"x";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(l+="y: "+t.yLabel+"
"),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&(l+=(l?"z: ":"")+t.zLabel)):e&&t[c+"Label"]===i?l=t[u+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&"scattercarpet"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?"
":"")+t.text),void 0!==t.extraText&&(l+=(l?"
":"")+t.extraText),o&&""===l&&!t.hovertemplate&&(""===s&&o.remove(),l=s);var h=t.hovertemplate||!1;if(h){var d=t.hovertemplateLabels||t;t[c+"Label"]!==i&&(d[c+"other"]=d[c+"Val"],d[c+"otherLabel"]=d[c+"Label"]),l=(l=a.hovertemplateString(h,d,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(D,(function(e,r){return s=U(r,t.nameLength),""}))}return[l,s]}function F(t,e){var r=0,n=t.offset;return e&&(n*=-T,r=t.offset*M),{x:r,y:n}}function P(t,e,r,i){var o=function(t){return t*r},a=function(t){return t*i};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i,s,l,c,u=r.select("text.nums"),d=t.anchor,p="end"===d?-1:1,m=(c=(l=(s={start:1,end:-1,middle:0}[(i=t).anchor])*(S+C))+s*(i.txwidth+C),"middle"===i.anchor&&(l-=i.tx2width/2,c+=i.txwidth/2+C),{alignShift:s,textShiftX:l,text2ShiftX:c}),g=F(t,e),v=g.x,b=g.y,y="middle"===d;r.select("path").attr("d",y?"M-"+o(t.bx/2+t.tx2width/2)+","+a(b-t.by/2)+"h"+o(t.bx)+"v"+a(t.by)+"h-"+o(t.bx)+"Z":"M0,0L"+o(p*S+v)+","+a(S+b)+"v"+a(t.by/2-S)+"h"+o(p*t.bx)+"v-"+a(t.by)+"H"+o(p*S+v)+"V"+a(b-S)+"Z");var x=v+m.textShiftX,_=b+t.ty0-t.by/2+C,w=t.textAlign||"auto";"auto"!==w&&("left"===w&&"start"!==d?(u.attr("text-anchor","start"),x=y?-t.bx/2-t.tx2width/2+C:-t.bx-C):"right"===w&&"end"!==d&&(u.attr("text-anchor","end"),x=y?t.bx/2-t.tx2width/2-C:t.bx+C)),u.call(h.positionText,o(x),a(_)),t.tx2width&&(r.select("text.name").call(h.positionText,o(m.text2ShiftX+m.alignShift*C+v),a(b+t.ty0-t.by/2+C)),r.select("rect").call(f.setRect,o(m.text2ShiftX+(m.alignShift-1)*t.tx2width/2+v),a(b-t.by/2-1),o(t.tx2width),a(t.by+2)))}))}function N(t,e){var r=t.index,n=t.trace||{},o=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var c=Array.isArray(r)?function(t,e){var i=a.castOption(o,r,t);return l(i)?i:a.extractOption({},n,"",e)}:function(t,e){return a.extractOption(s,n,t,e)};function u(e,r,n){var i=c(r,n);l(i)&&(t[e]=i)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("fontWeight","htw","hoverlabel.font.weight"),u("fontStyle","hty","hoverlabel.font.style"),u("fontVariant","htv","hoverlabel.font.variant"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),t.posref="y"===e||"closest"===e&&"h"===n.orientation?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=a.constrain(t.x0,0,t.xa._length),t.x1=a.constrain(t.x1,0,t.xa._length),t.y0=a.constrain(t.y0,0,t.ya._length),t.y1=a.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel="xLabel"in t?t.xLabel:g.hoverLabelText(t.xa,t.xLabelVal,n.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel="yLabel"in t?t.yLabel:g.hoverLabelText(t.ya,t.yLabelVal,n.yhoverformat),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var h=g.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+h+" / -"+g.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" ± "+h,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var d=g.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+d+" / -"+g.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" ± "+d,"y"===e&&(t.distance+=1)}var f=t.hoverinfo||t.trace.hoverinfo;return f&&"all"!==f&&(-1===(f=Array.isArray(f)?f:f.split("+")).indexOf("x")&&(t.xLabel=void 0),-1===f.indexOf("y")&&(t.yLabel=void 0),-1===f.indexOf("z")&&(t.zLabel=void 0),-1===f.indexOf("text")&&(t.text=void 0),-1===f.indexOf("name")&&(t.name=void 0)),t}function j(t,e,r){var n,i,a=r.container,s=r.fullLayout,l=s._size,c=r.event,u=!!e.hLinePoint,h=!!e.vLinePoint;if(a.selectAll(".spikeline").remove(),h||u){var d=p.combine(s.plot_bgcolor,s.paper_bgcolor);if(u){var m,v,b=e.hLinePoint;n=b&&b.xa,"cursor"===(i=b&&b.ya).spikesnap?(m=c.pointerX,v=c.pointerY):(m=n._offset+b.x,v=i._offset+b.y);var y,x,_=o.readability(b.color,d)<1.5?p.contrast(d):b.color,w=i.spikemode,k=i.spikethickness,A=i.spikecolor||_,M=g.getPxPosition(t,i);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(y=M,x=m),-1!==w.indexOf("across")){var T=i._counterDomainMin,S=i._counterDomainMax;"free"===i.anchor&&(T=Math.min(T,i.position),S=Math.max(S,i.position)),y=l.l+T*l.w,x=l.l+S*l.w}a.insert("line",":first-child").attr({x1:y,x2:x,y1:v,y2:v,"stroke-width":k,stroke:A,"stroke-dasharray":f.dashStyle(i.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:y,x2:x,y1:v,y2:v,"stroke-width":k+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:M+("right"!==i.side?k:-k),cy:v,r:k,fill:A}).classed("spikeline",!0)}if(h){var C,E,L=e.vLinePoint;n=L&&L.xa,i=L&&L.ya,"cursor"===n.spikesnap?(C=c.pointerX,E=c.pointerY):(C=n._offset+L.x,E=i._offset+L.y);var z,O,D=o.readability(L.color,d)<1.5?p.contrast(d):L.color,I=n.spikemode,R=n.spikethickness,F=n.spikecolor||D,P=g.getPxPosition(t,n);if(-1!==I.indexOf("toaxis")||-1!==I.indexOf("across")){if(-1!==I.indexOf("toaxis")&&(z=P,O=E),-1!==I.indexOf("across")){var N=n._counterDomainMin,j=n._counterDomainMax;"free"===n.anchor&&(N=Math.min(N,n.position),j=Math.max(j,n.position)),z=l.t+(1-j)*l.h,O=l.t+(1-N)*l.h}a.insert("line",":first-child").attr({x1:C,x2:C,y1:z,y2:O,"stroke-width":R,stroke:F,"stroke-dasharray":f.dashStyle(n.spikedash,R)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:C,x2:C,y1:z,y2:O,"stroke-width":R+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==I.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:C,cy:P-("top"!==n.side?R:-R),r:R,fill:F}).classed("spikeline",!0)}}}function B(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function U(t,e){return h.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}function G(t,e,r){var n=e[t+"a"],i=e[t+"Val"],o=e.cd[0];if("category"===n.type||"multicategory"===n.type)i=n._categoriesMap[i];else if("date"===n.type){var a=e.trace[t+"periodalignment"];if(a){var s=e.cd[e.index],l=s[t+"Start"];void 0===l&&(l=s[t]);var c=s[t+"End"];void 0===c&&(c=s[t]);var u=c-l;"end"===a?i+=u:"middle"===a&&(i+=u/2)}i=n.d2c(i)}return o&&o.t&&o.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(i+=o.t.dPos)),i}function V(t){return t.offsetTop+t.clientTop}function H(t){return t.offsetLeft+t.clientLeft}function W(t,e){var r=t._fullLayout,n=e.getBoundingClientRect(),i=n.left,o=n.top,s=i+n.width,l=o+n.height,c=a.apply3DTransform(r._invTransform)(i,o),u=a.apply3DTransform(r._invTransform)(s,l),h=c[0],d=c[1],f=u[0],p=u[1];return{x:h,y:d,width:f-h,height:p-d,top:Math.min(d,p),left:Math.min(h,f),right:Math.max(h,f),bottom:Math.max(d,p)}}},33369:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(66811).isUnifiedHover;t.exports=function(t,e,r,a){a=a||{};var s=e.legend;function l(t){a.font[t]||(a.font[t]=s?e.legend.font[t]:e.font[t])}e&&o(e.hovermode)&&(a.font||(a.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),s?(a.bgcolor||(a.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),a.bordercolor||(a.bordercolor=e.legend.bordercolor)):a.bgcolor||(a.bgcolor=e.paper_bgcolor)),r("hoverlabel.bgcolor",a.bgcolor),r("hoverlabel.bordercolor",a.bordercolor),r("hoverlabel.namelength",a.namelength),n.coerceFont(r,"hoverlabel.font",a.font),r("hoverlabel.align",a.align)}},85400:(t,e,r)=>{"use strict";var n=r(12822),i=r(53572);t.exports=function(t,e){function r(r,o){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,o)}return r("clickmode"),r("hoversubplots"),r("hovermode")}},70410:(t,e,r)=>{"use strict";var n=r(27941),i=r(12822),o=r(19846),a=r(66811),s=r(53572),l=r(87408);t.exports={moduleType:"component",name:"fx",constants:r(99259),schema:{layout:s},attributes:r(60713),layoutAttributes:s,supplyLayoutGlobalDefaults:r(26271),supplyDefaults:r(55470),supplyLayoutDefaults:r(3315),calc:r(56173),getDistanceFunction:a.getDistanceFunction,getClosest:a.getClosest,inbox:a.inbox,quadrature:a.quadrature,appendArrayPointValue:a.appendArrayPointValue,castHoverOption:function(t,e,r){return i.castOption(t,e,"hoverlabel."+r)},castHoverinfo:function(t,e,r){return i.castOption(t,r,"hoverinfo",(function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)}))},hover:l.hover,unhover:o.unhover,loneHover:l.loneHover,loneUnhover:function(t){var e=i.isD3Selection(t)?t:n.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()},click:r(43006)}},53572:(t,e,r)=>{"use strict";var n=r(99259),i=r(75058),o=i({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});o.family.dflt=n.HOVERFONT,o.size.dflt=n.HOVERFONTSIZE,t.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"],description:["Determines the mode of single click interactions.","*event* is the default value and emits the `plotly_click`","event. In addition this mode emits the `plotly_selected` event","in drag modes *lasso* and *select*, but with no event data attached","(kept for compatibility reasons).","The *select* flag enables selecting single","data points via click. This mode also supports persistent selections,","meaning that pressing Shift while clicking, adds to / subtracts from an","existing selection. *select* with `hovermode`: *x* can be confusing, consider","explicitly setting `hovermode`: *closest* when using this feature.","Selection events are sent accordingly as long as *event* flag is set as well.","When the *event* flag is missing, `plotly_click` and `plotly_selected`","events are not fired."].join(" ")},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar",description:["Determines the mode of drag interactions.","*select* and *lasso* apply only to scatter traces with","markers or text. *orbit* and *turntable* apply only to","3D scenes."].join(" ")},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions.","If *closest*, a single hoverlabel will appear","for the *closest* point within the `hoverdistance`.","If *x* (or *y*), multiple hoverlabels will appear for multiple points","at the *closest* x- (or y-) coordinate within the `hoverdistance`,","with the caveat that no more than one hoverlabel will appear per trace.","If *x unified* (or *y unified*), a single hoverlabel will appear","multiple points at the closest x- (or y-) coordinate within the `hoverdistance`","with the caveat that no more than one hoverlabel will appear per trace.","In this mode, spikelines are enabled by default perpendicular to the specified axis.","If false, hover interactions are disabled."].join(" ")},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none",description:["Determines expansion of hover effects to other subplots","If *single* just the axis pair of the primary point is included without overlaying subplots.","If *overlaying* all subplots using the main axis and occupying the same space are included.","If *axis*, also include stacked subplots using the same axis","when `hovermode` is set to *x*, *x unified*, *y* or *y unified*."].join(" ")},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none",description:["Sets the default distance (in pixels) to look for data","to add hover labels (-1 means no cutoff, 0 means no looking for data).","This is only a real distance for hovering on point-like objects,","like scatter points. For area-like objects (bars, scatter fills, etc)","hovering is on inside the area and off outside, but these objects","will not supersede hover on point-like objects in case of conflict."].join(" ")},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none",description:["Sets the default distance (in pixels) to look for data to draw","spikelines to (-1 means no cutoff, 0 means no looking for data).","As with hoverdistance, distance does not apply to area-like objects.","In addition, some objects can be hovered on but will not generate","spikelines, such as scatter fills."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"none",description:["Sets the background color of all hover labels on graph"].join(" ")},bordercolor:{valType:"color",editType:"none",description:["Sets the border color of all hover labels on graph."].join(" ")},font:o,grouptitlefont:i({editType:"none",description:["Sets the font for group titles in hover (unified modes).","Defaults to `hoverlabel.font`."].join(" ")}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none",description:["Sets the horizontal alignment of the text content within hover label box.","Has an effect only if the hover label text spans more two or more lines"].join(" ")},namelength:{valType:"integer",min:-1,dflt:15,editType:"none",description:["Sets the default length (in number of characters) of the trace name in","the hover labels for all traces. -1 shows the whole name","regardless of length. 0-3 shows the first 0-3 characters, and","an integer >3 will show the whole name if it is less than that","many characters, but if it is longer, will truncate to","`namelength - 3` characters and add an ellipsis."].join(" ")},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",description:["When `dragmode` is set to *select*, this limits the selection of the drag to","horizontal, vertical or diagonal. *h* only allows horizontal selection,","*v* only vertical, *d* only diagonal and *any* sets no limit."].join(" "),editType:"none"}}},3315:(t,e,r)=>{"use strict";var n=r(12822),i=r(53572),o=r(85400),a=r(33369);t.exports=function(t,e){function r(r,o){return n.coerce(t,e,i,r,o)}o(t,e)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var s=e._has("mapbox"),l=e._has("geo"),c=e._basePlotModules.length;"zoom"===e.dragmode&&((s||l)&&1===c||s&&l&&2===c)&&(e.dragmode="pan"),a(t,e,r),n.coerceFont(r,"hoverlabel.grouptitlefont",e.hoverlabel.font)}},26271:(t,e,r)=>{"use strict";var n=r(12822),i=r(33369),o=r(53572);t.exports=function(t,e){i(t,e,(function(r,i){return n.coerce(t,e,o,r,i)}))}},4664:(t,e,r)=>{"use strict";var n=r(12822),i=r(46233).counter,o=r(40365).u,a=r(21197).idRegex,s=r(46121),l={rows:{valType:"integer",min:1,editType:"plot",description:["The number of rows in the grid. If you provide a 2D `subplots`","array or a `yaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot",description:["Is the first row the top or the bottom? Note that columns","are always enumerated from left to right."].join(" ")},columns:{valType:"integer",min:1,editType:"plot",description:["The number of columns in the grid. If you provide a 2D `subplots`","array, the length of its longest row is used as the default.","If you give an `xaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[i("xy").toString(),""],editType:"plot"},editType:"plot",description:["Used for freeform grids, where some axes may be shared across subplots","but others are not. Each entry should be a cartesian subplot id, like","*xy* or *x3y2*, or ** to leave that cell empty. You may reuse x axes","within the same column, and y axes within the same row.","Non-cartesian subplots and traces that support `domain` can place themselves","in this grid separately using the `gridcell` attribute."].join(" ")},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[a.x.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an x axis id like *x*, *x2*, etc., or ** to","not put an x axis in that column. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `yaxes` is present,","will generate consecutive IDs."].join(" ")},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[a.y.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an y axis id like *y*, *y2*, etc., or ** to","not put a y axis in that row. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `xaxes` is present,","will generate consecutive IDs."].join(" ")},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot",description:["If no `subplots`, `xaxes`, or `yaxes` are given but we do have `rows` and `columns`,","we can generate defaults using consecutive axis IDs, in two ways:","*coupled* gives one x axis per column and one y axis per row.","*independent* uses a new xy pair for each cell, left-to-right across each row","then iterating rows according to `roworder`."].join(" ")},xgap:{valType:"number",min:0,max:1,editType:"plot",description:["Horizontal space between grid cells, expressed as a fraction","of the total width available to one cell. Defaults to 0.1","for coupled-axes grids and 0.2 for independent grids."].join(" ")},ygap:{valType:"number",min:0,max:1,editType:"plot",description:["Vertical space between grid cells, expressed as a fraction","of the total height available to one cell. Defaults to 0.1","for coupled-axes grids and 0.3 for independent grids."].join(" ")},domain:o({name:"grid",editType:"plot",noGridCell:!0},{description:["The first and last cells end exactly at the domain","edges, with no grout around the edges."].join(" ")}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot",description:["Sets where the x axis labels and titles go. *bottom* means","the very bottom of the grid. *bottom plot* is the lowest plot","that each x axis is used in. *top* and *top plot* are similar."].join(" ")},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot",description:["Sets where the y axis labels and titles go. *left* means","the very left edge of the grid. *left plot* is the leftmost plot","that each y axis is used in. *right* and *right plot* are similar."].join(" ")},editType:"plot"};function c(t,e,r){var n=e[r+"axes"],i=Object.keys((t._splomAxes||{})[r]||{});return Array.isArray(n)?n:i.length?i:void 0}function u(t,e,r,n,i,o){var a=e(t+"gap",r),s=e("domain."+t);e(t+"side",n);for(var l=new Array(i),c=s[0],u=(s[1]-c)/(i-a),h=u*(1-a),d=0;d1){d||f||p||"independent"===A("pattern")&&(d=!0),g._hasSubplotGrid=d;var y,x,_="top to bottom"===A("roworder"),w=d?.2:.1,k=d?.3:.1;m&&e._splomGridDflt&&(y=e._splomGridDflt.xside,x=e._splomGridDflt.yside),g._domains={x:u("x",A,w,y,b),y:u("y",A,k,x,v,_)}}else delete e.grid}function A(t,e){return n.coerce(r,g,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,i,o,a,s,l,u,d=t.grid||{},f=e._subplots,p=r._hasSubplotGrid,m=r.rows,g=r.columns,v="independent"===r.pattern,b=r._axisMap={};if(p){var y=d.subplots||[];l=r.subplots=new Array(m);var x=1;for(n=0;n{"use strict";var n=r(21197),i=r(46121).templatedArray,o=r(53644);t.exports=i("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw",description:["Determines whether or not this image is visible."].join(" ")},source:{valType:"string",editType:"arraydraw",description:["Specifies the URL of the image to be used.","The URL must be accessible from the domain where the","plot code is run, and can be either relative or absolute."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw",description:["Specifies whether images are drawn below or above traces.","When `xref` and `yref` are both set to `paper`,","image is drawn below the entire plot area."].join(" ")},sizex:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size horizontally.","The image will be sized based on the `position` value.","When `xref` is set to `paper`, units are sized relative","to the plot width.","When `xref` ends with ` domain`, units are sized relative","to the axis width."].join(" ")},sizey:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size vertically.","The image will be sized based on the `position` value.","When `yref` is set to `paper`, units are sized relative","to the plot height.","When `yref` ends with ` domain`, units are sized relative","to the axis height."].join(" ")},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw",description:["Specifies which dimension of the image to constrain."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the image."},x:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's x position.","When `xref` is set to `paper`, units are sized relative","to the plot height.","See `xref` for more info"].join(" ")},y:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's y position.","When `yref` is set to `paper`, units are sized relative","to the plot height.","See `yref` for more info"].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw",description:"Sets the anchor for the x position"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw",description:"Sets the anchor for the y position."},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's x coordinate axis.",o.axisRefDescription("x","left","right")].join(" ")},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's y coordinate axis.",o.axisRefDescription("y","bottom","top")].join(" ")},editType:"arraydraw"})},22470:(t,e,r)=>{"use strict";var n=r(7370),i=r(61814);t.exports=function(t,e,r,o){e=e||{};var a="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(a||s)for(var l,c,u=t._fullLayout.images,h=e._id.charAt(0),d=0;d{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(3653);function s(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}var s=o("source");if(!o("visible",!!s))return e;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var l={_fullLayout:r},c=["x","y"],u=0;u<2;u++){var h=c[u],d=i.coerceRef(t,e,l,h,"paper",void 0);"paper"!==d&&i.getFromId(l,d)._imgIndices.push(e._index),i.coercePosition(e,l,o,d,h,0)}return e}t.exports=function(t,e){o(t,e,{name:"images",handleItemDefaults:s})}},87030:(t,e,r)=>{"use strict";var n=r(27941),i=r(40666),o=r(75815),a=r(99246),s=r(25853);t.exports=function(t){var e,r,l=t._fullLayout,c=[],u={},h=[];for(r=0;r{"use strict";t.exports={moduleType:"component",name:"images",layoutAttributes:r(3653),supplyLayoutDefaults:r(96658),includeBasePlot:r(39859)("images"),draw:r(87030),convertCoords:r(22470)}},15524:(t,e,r)=>{"use strict";var n=r(75058),i=r(84226);t.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend",description:["Determines whether or not this legend is visible."].join(" ")},bgcolor:{valType:"color",editType:"legend",description:["Sets the legend background color.","Defaults to `layout.paper_bgcolor`."].join(" ")},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"legend",description:"Sets the color of the border enclosing the legend."},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend",description:"Sets the width (in px) of the border enclosing the legend."},font:n({editType:"legend",description:"Sets the font used to text the legend items."}),grouptitlefont:n({editType:"legend",description:["Sets the font for group titles in legend.","Defaults to `legend.font` with its size increased about 10%."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend",description:"Sets the orientation of the legend."},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend",description:["Determines the order at which the legend items are displayed.","If *normal*, the items are displayed top-to-bottom in the same","order as the input data.","If *reversed*, the items are displayed in the opposite order","as *normal*.","If *grouped*, the items are displayed in groups","(when a trace `legendgroup` is provided).","if *grouped+reversed*, the items are displayed in the opposite order","as *grouped*."].join(" ")},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend",description:["Sets the amount of vertical space (in px) between legend groups."].join(" ")},entrywidth:{valType:"number",min:0,editType:"legend",description:["Sets the width (in px or fraction) of the legend.","Use 0 to size the entry based on the text width,","when `entrywidthmode` is set to *pixels*."].join(" ")},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend",description:"Determines what entrywidth means."},indentation:{valType:"number",min:-15,dflt:0,editType:"legend",description:"Sets the indentation (in px) of the legend entries."},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend",description:["Determines if the legend items symbols scale with their corresponding *trace* attributes","or remain *constant* independent of the symbol size on the graph."].join(" ")},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend",description:"Sets the width (in px) of the legend item symbols (the part other than the title.text)."},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend",description:["Determines the behavior on legend item click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item click interactions."].join(" ")},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend",description:["Determines the behavior on legend item double-click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item double-click interactions."].join(" ")},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend",description:["Determines the behavior on legend group item click.","*toggleitem* toggles the visibility of the individual item clicked on the graph.","*togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph."].join(" ")},x:{valType:"number",editType:"legend",description:["Sets the x position with respect to `xref` (in normalized coordinates) of the legend.","When `xref` is *paper*, defaults to *1.02* for vertical legends and","defaults to *0* for horizontal legends.","When `xref` is *container*, defaults to *1* for vertical legends and","defaults to *0* for horizontal legends.","Must be between *0* and *1* if `xref` is *container*.","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend",description:["Sets the legend's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the legend.","Value *auto* anchors legends to the right for `x` values greater than or equal to 2/3,","anchors legends to the left for `x` values less than or equal to 1/3 and","anchors legends with respect to their center otherwise."].join(" ")},y:{valType:"number",editType:"legend",description:["Sets the y position with respect to `yref` (in normalized coordinates) of the legend.","When `yref` is *paper*, defaults to *1* for vertical legends,","defaults to *-0.1* for horizontal legends on graphs w/o range sliders and","defaults to *1.1* for horizontal legends on graph with one or multiple range sliders.","When `yref` is *container*, defaults to *1*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend",description:["Sets the legend's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the legend.","Value *auto* anchors legends at their bottom for `y` values less than or equal to 1/3,","anchors legends to at their top for `y` values greater than or equal to 2/3 and","anchors legends with respect to their middle otherwise."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of legend-driven changes in trace and pie label","visibility. Defaults to `layout.uirevision`."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend",description:["Sets the vertical alignment of the symbols with respect to their associated text."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"legend",description:["Sets the title of the legend."].join(" ")},font:n({editType:"legend",description:["Sets this legend's title font.","Defaults to `legend.font` with its size increased about 20%."].join(" ")}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend",description:["Determines the location of legend's title","with respect to the legend items.","Defaulted to *top* with `orientation` is *h*.","Defaulted to *left* with `orientation` is *v*.","The *top left* options could be used to expand","top center and top right are for horizontal alignment","legend area in both x and y sides."].join(" ")},editType:"legend"},editType:"legend"}},4496:t=>{"use strict";t.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},64083:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822),o=r(46121),a=r(3520),s=r(15524),l=r(13195),c=r(18804);function u(t,e,r,u){var h=e[t]||{},d=o.newContainer(r,t);function f(t,e){return i.coerce(h,d,s,t,e)}var p=i.coerceFont(f,"font",r.font);if(f("bgcolor",r.paper_bgcolor),f("bordercolor"),f("visible")){for(var m,g=function(t,e){var r=m._input,n=m;return i.coerce(r,n,a,t,e)},v=r.font||{},b=i.coerceFont(f,"grouptitlefont",i.extendFlat({},v,{size:Math.round(1.1*v.size)})),y=0,x=!1,_="normal",w=(r.shapes||[]).filter((function(t){return t.showlegend})),k=u.concat(w).filter((function(e){return t===(e.legend||"legend")})),A=0;A("legend"===t?1:0));if(!1===T&&(r[t]=void 0),(!1!==T||h.uirevision)&&(f("uirevision",r.uirevision),!1!==T)){f("borderwidth");var S,C,E,L="h"===f("orientation"),z="paper"===f("yref"),O="paper"===f("xref"),D="left";if(L?(S=0,n.getComponentMethod("rangeslider","isVisible")(e.xaxis)?z?(C=1.1,E="bottom"):(C=1,E="top"):z?(C=-.1,E="top"):(C=0,E="bottom")):(C=1,E="auto",O?S=1.02:(S=1,D="right")),i.coerce(h,d,{x:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:S}},"x"),i.coerce(h,d,{y:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:C}},"y"),f("traceorder",_),c.isGrouped(r[t])&&f("tracegroupgap"),f("entrywidth"),f("entrywidthmode"),f("indentation"),f("itemsizing"),f("itemwidth"),f("itemclick"),f("itemdoubleclick"),f("groupclick"),f("xanchor",D),f("yanchor",E),f("valign"),i.noneOrAll(h,d,["x","y"]),f("title.text")){f("title.side",L?"left":"top");var I=i.extendFlat({},p,{size:i.bigFont(p.size)});i.coerceFont(f,"title.font",I)}}}}t.exports=function(t,e,r){var n,o=r.slice(),a=e.shapes;if(a)for(n=0;n{"use strict";var n=r(27941),i=r(12822),o=r(51137),a=r(25059),s=r(16677),l=r(19846),c=r(40666),u=r(17499),h=r(80394),d=r(52656),f=r(4496),p=r(89701),m=p.LINE_SPACING,g=p.FROM_TL,v=p.FROM_BR,b=r(71988),y=r(26972),x=r(18804),_=1,w=/^legend[0-9]*$/;function k(t,e){var r,s,d=e||{},p=t._fullLayout,w=O(d),k=d._inHover;if(k?(s=d.layer,r="hover"):(s=p._infolayer,r=w),s){var S;if(r+=p._uid,t._legendMouseDownTime||(t._legendMouseDownTime=0),k){if(!d.entries)return;S=b(d.entries,d)}else{for(var D=(t.calcdata||[]).slice(),I=p.shapes,R=0;R1)}var N=p.hiddenlabels||[];if(!(k||p.showlegend&&S.length))return s.selectAll("."+w).remove(),p._topdefs.select("#"+r).remove(),o.autoMargin(t,w);var j=i.ensureSingle(s,"g",w,(function(t){k||t.attr("pointer-events","all")})),B=i.ensureSingleById(p._topdefs,"clipPath",r,(function(t){t.append("rect")})),U=i.ensureSingle(j,"rect","bg",(function(t){t.attr("shape-rendering","crispEdges")}));U.call(u.stroke,d.bordercolor).call(u.fill,d.bgcolor).style("stroke-width",d.borderwidth+"px");var G,V=i.ensureSingle(j,"g","scrollbox"),H=d.title;d._titleWidth=0,d._titleHeight=0,H.text?((G=i.ensureSingle(V,"text",w+"titletext")).attr("text-anchor","start").call(c.font,H.font).text(H.text),E(G,V,t,d,_)):V.selectAll("."+w+"titletext").remove();var W=i.ensureSingle(j,"rect","scrollbar",(function(t){t.attr(f.scrollBarEnterAttrs).call(u.fill,f.scrollBarColor)})),q=V.selectAll("g.groups").data(S);q.enter().append("g").attr("class","groups"),q.exit().remove();var Y=q.selectAll("g.traces").data(i.identity);Y.enter().append("g").attr("class","traces"),Y.exit().remove(),Y.style("opacity",(function(t){var e=t[0].trace;return a.traceIs(e,"pie-like")?-1!==N.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1})).each((function(){n.select(this).call(T,t,d)})).call(y,t,d).each((function(){k||n.select(this).call(C,t,w)})),i.syncOrAsync([o.previousPromises,function(){return function(t,e,r,i){var o=t._fullLayout,a=O(i);i||(i=o[a]);var s=o._size,l=x.isVertical(i),u=x.isGrouped(i),h="fraction"===i.entrywidthmode,d=i.borderwidth,p=2*d,m=f.itemGap,g=i.indentation+i.itemwidth+2*m,v=2*(d+m),b=z(i),y=i.y<0||0===i.y&&"top"===b,_=i.y>1||1===i.y&&"bottom"===b,w=i.tracegroupgap,k={};i._maxHeight=Math.max(y||_?o.height/2:s.h,30);var M=0;i._width=0,i._height=0;var T=function(t){var e=0,r=0,n=t.title.side;return n&&(-1!==n.indexOf("left")&&(e=t._titleWidth),-1!==n.indexOf("top")&&(r=t._titleHeight)),[e,r]}(i);if(l)r.each((function(t){var e=t[0].height;c.setTranslate(this,d+T[0],d+T[1]+i._height+e/2+m),i._height+=e,i._width=Math.max(i._width,t[0].width)})),M=g+i._width,i._width+=m+g+p,i._height+=v,u&&(e.each((function(t,e){c.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var S=L(i),C=i.x<0||0===i.x&&"right"===S,E=i.x>1||1===i.x&&"left"===S,D=_||y,I=o.width/2;i._maxWidth=Math.max(C?D&&"left"===S?s.l+s.w:I:E?D&&"right"===S?s.r+s.w:I:s.w,2*g);var R=0,F=0;r.each((function(t){var e=A(t,i,g);R=Math.max(R,e),F+=e})),M=null;var P=0;if(u){var N=0,j=0,B=0;e.each((function(){var t=0,e=0;n.select(this).selectAll("g.traces").each((function(r){var n=A(r,i,g),o=r[0].height;c.setTranslate(this,T[0],T[1]+d+m+o/2+e),e+=o,t=Math.max(t,n),k[r[0].trace.legendgroup]=t}));var r=t+m;j>0&&r+d+j>i._maxWidth?(P=Math.max(P,j),j=0,B+=N+w,N=e):N=Math.max(N,e),c.setTranslate(this,j,B),j+=r})),i._width=Math.max(P,j)+d,i._height=B+N+v}else{var U=r.size(),G=F+p+(U-1)*m=i._maxWidth&&(P=Math.max(P,q),H=0,W+=V,i._height+=V,V=0),c.setTranslate(this,T[0]+d+H,T[1]+d+W+e/2+m),q=H+r+m,H+=n,V=Math.max(V,e)})),G?(i._width=H+p,i._height=V+v):(i._width=Math.max(P,q)+p,i._height+=V+v)}}i._width=Math.ceil(Math.max(i._width+T[0],i._titleWidth+2*(d+f.titlePad))),i._height=Math.ceil(Math.max(i._height+T[1],i._titleHeight+2*(d+f.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var Y=t._context.edits,Z=Y.legendText||Y.legendPosition;r.each((function(t){var e=n.select(this).select("."+a+"toggle"),r=t[0].height,o=t[0].trace.legendgroup,s=A(t,i,g);u&&""!==o&&(s=k[o]);var d=Z?g:M||s;l||h||(d+=m/2),c.setRect(e,0,-r/2,d,r)}))}(t,q,Y,d)},function(){var e,u,b,y,x=p._size,_=d.borderwidth,A="paper"===d.xref,T="paper"===d.yref;if(H.text&&function(t,e,r){if("top center"===e.title.side||"top right"===e.title.side){var n=e.title.font.size*m,i=0,o=t.node(),a=c.bBox(o).width;"top center"===e.title.side?i=.5*(e._width-2*r-2*f.titlePad-a):"top right"===e.title.side&&(i=e._width-2*r-2*f.titlePad-a),h.positionText(t,r+f.titlePad+i,r+n)}}(G,d,_),!k){var S,C;S=A?x.l+x.w*d.x-g[L(d)]*d._width:p.width*d.x-g[L(d)]*d._width,C=T?x.t+x.h*(1-d.y)-g[z(d)]*d._effHeight:p.height*(1-d.y)-g[z(d)]*d._effHeight;var E=function(t,e,r,n){var i=t._fullLayout,a=i[e],s=L(a),l=z(a),c="paper"===a.xref,u="paper"===a.yref;t._fullLayout._reservedMargin[e]={};var h=a.y<.5?"b":"t",d=a.x<.5?"l":"r",f={r:i.width-r,l:r+a._width,b:i.height-n,t:n+a._effHeight};if(c&&u)return o.autoMargin(t,e,{x:a.x,y:a.y,l:a._width*g[s],r:a._width*v[s],b:a._effHeight*v[l],t:a._effHeight*g[l]});c?t._fullLayout._reservedMargin[e][h]=f[h]:u||"v"===a.orientation?t._fullLayout._reservedMargin[e][d]=f[d]:t._fullLayout._reservedMargin[e][h]=f[h]}(t,w,S,C);if(E)return;if(p.margin.autoexpand){var O=S,D=C;S=A?i.constrain(S,0,p.width-d._width):O,C=T?i.constrain(C,0,p.height-d._effHeight):D,S!==O&&i.log("Constrain "+w+".x to make legend fit inside graph"),C!==D&&i.log("Constrain "+w+".y to make legend fit inside graph")}c.setTranslate(j,S,C)}if(W.on(".drag",null),j.on("wheel",null),k||d._height<=d._maxHeight||t._context.staticPlot){var I=d._effHeight;k&&(I=d._height),U.attr({width:d._width-_,height:I-_,x:_/2,y:_/2}),c.setTranslate(V,0,0),B.select("rect").attr({width:d._width-2*_,height:I-2*_,x:_,y:_}),c.setClipUrl(V,r,t),c.setRect(W,0,0,0,0),delete d._scrollY}else{var R,F,P,N=Math.max(f.scrollBarMinHeight,d._effHeight*d._effHeight/d._height),q=d._effHeight-N-2*f.scrollBarMargin,Y=d._height-d._effHeight,Z=q/Y,X=Math.min(d._scrollY||0,Y);U.attr({width:d._width-2*_+f.scrollBarWidth+f.scrollBarMargin,height:d._effHeight-_,x:_/2,y:_/2}),B.select("rect").attr({width:d._width-2*_+f.scrollBarWidth+f.scrollBarMargin,height:d._effHeight-2*_,x:_,y:_+X}),c.setClipUrl(V,r,t),K(X,N,Z),j.on("wheel",(function(){K(X=i.constrain(d._scrollY+n.event.deltaY/q*Y,0,Y),N,Z),0!==X&&X!==Y&&n.event.preventDefault()}));var $=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;R="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,P=X})).on("drag",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(F="touchmove"===t.type?t.changedTouches[0].clientY:t.clientY,X=function(t,e,r){var n=(r-e)/Z+t;return i.constrain(n,0,Y)}(P,R,F),K(X,N,Z))}));W.call($);var J=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(R=t.changedTouches[0].clientY,P=X)})).on("drag",(function(){var t=n.event.sourceEvent;"touchmove"===t.type&&(F=t.changedTouches[0].clientY,X=function(t,e,r){var n=(e-r)/Z+t;return i.constrain(n,0,Y)}(P,R,F),K(X,N,Z))}));V.call(J)}function K(e,r,n){d._scrollY=t._fullLayout[w]._scrollY=e,c.setTranslate(V,0,-e),c.setRect(W,d._width,f.scrollBarMargin+e*n,f.scrollBarWidth,r),B.select("rect").attr("y",_+e)}t._context.edits.legendPosition&&(j.classed("cursor-move",!0),l.init({element:j.node(),gd:t,prepFn:function(){var t=c.getTranslate(j);b=t.x,y=t.y},moveFn:function(t,r){var n=b+t,i=y+r;c.setTranslate(j,n,i),e=l.align(n,d._width,x.l,x.l+x.w,d.xanchor),u=l.align(i+d._height,-d._height,x.t+x.h,x.t,d.yanchor)},doneFn:function(){if(void 0!==e&&void 0!==u){var r={};r[w+".x"]=e,r[w+".y"]=u,a.call("_guiRelayout",t,r)}},clickFn:function(e,r){var n=s.selectAll("g.traces").filter((function(){var t=this.getBoundingClientRect();return r.clientX>=t.left&&r.clientX<=t.right&&r.clientY>=t.top&&r.clientY<=t.bottom}));n.size()>0&&M(t,j,n,e,r)}}))}],t)}}function A(t,e,r){var n=t[0],i=n.width,o=e.entrywidthmode,a=n.trace.legendwidth||e.entrywidth;return"fraction"===o?e._maxWidth*a:r+(a||i)}function M(t,e,r,n,i){var o=r.data()[0][0].trace,l={event:i,node:r.node(),curveNumber:o.index,expandedIndex:o._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};o._group&&(l.group=o._group),a.traceIs(o,"pie-like")&&(l.label=r.datum()[0].label);var c=s.triggerHandler(t,"plotly_legendclick",l);if(1===n){if(!1===c)return;e._clickTimeout=setTimeout((function(){t._fullLayout&&d(r,t,n)}),t._context.doubleClickDelay)}else 2===n&&(e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,"plotly_legenddoubleclick",l)&&!1!==c&&d(r,t,n))}function T(t,e,r){var n,o,s=O(r),l=t.data()[0][0],u=l.trace,d=a.traceIs(u,"pie-like"),p=!r._inHover&&e._context.edits.legendText&&!d,m=r._maxNameLength;l.groupTitle?(n=l.groupTitle.text,o=l.groupTitle.font):(o=r.font,r.entries?n=l.text:(n=d?l.label:u.name,u._meta&&(n=i.templateString(n,u._meta))));var g=i.ensureSingle(t,"text",s+"text");g.attr("text-anchor","start").call(c.font,o).text(p?S(n,m):n);var v=r.indentation+r.itemwidth+2*f.itemGap;h.positionText(g,v,0),p?g.call(h.makeEditable,{gd:e,text:n}).call(E,t,e,r).on("edit",(function(n){this.text(S(n,m)).call(E,t,e,r);var o=l.trace._fullInput||{},s={};if(a.hasTransform(o,"groupby")){var c=a.getTransformIndices(o,"groupby"),h=c[c.length-1],d=i.keyedContainer(o,"transforms["+h+"].styles","target","value.name");d.set(l.trace._group,n),s=d.constructUpdate()}else s.name=n;return o._isShape?a.call("_guiRelayout",e,"shapes["+u.index+"].name",s.name):a.call("_guiRestyle",e,s,u.index)})):E(g,t,e,r)}function S(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;for(var n=r-(t=t||"").length;n>0;n--)t+=" ";return t}function C(t,e,r){var o,a=e._context.doubleClickDelay,s=1,l=i.ensureSingle(t,"rect",r+"toggle",(function(t){e._context.staticPlot||t.style("cursor","pointer").attr("pointer-events","all"),t.call(u.fill,"rgba(0,0,0,0)")}));e._context.staticPlot||(l.on("mousedown",(function(){(o=(new Date).getTime())-e._legendMouseDownTimea&&(s=Math.max(s-1,1)),M(e,i,t,s,n.event)}})))}function E(t,e,r,n,i){n._inHover&&t.attr("data-notex",!0),h.convertToTspans(t,r,(function(){!function(t,e,r,n){var i=t.data()[0][0];if(r._inHover||!i||i.trace.showlegend){var o=t.select("g[class*=math-group]"),a=o.node(),s=O(r);r||(r=e._fullLayout[s]);var l,u,d=r.borderwidth,p=(n===_?r.title.font:i.groupTitle?i.groupTitle.font:r.font).size*m;if(a){var g=c.bBox(a);l=g.height,u=g.width,n===_?c.setTranslate(o,d,d+.75*l):c.setTranslate(o,0,.25*l)}else{var v="."+s+(n===_?"title":"")+"text",b=t.select(v),y=h.lineCount(b),x=b.node();if(l=p*y,u=x?c.bBox(x).width:0,n===_)"left"===r.title.side&&(u+=2*f.itemGap),h.positionText(b,d+f.titlePad,d+p);else{var w=2*f.itemGap+r.indentation+r.itemwidth;i.groupTitle&&(w=f.itemGap,u-=r.indentation+r.itemwidth),h.positionText(b,w,-p*((y-1)/2-.3))}}n===_?(r._titleWidth=u,r._titleHeight=l):(i.lineHeight=p,i.height=Math.max(l,16)+3,i.width=u)}else t.remove()}(e,r,n,i)}))}function L(t){return i.isRightAnchor(t)?"right":i.isCenterAnchor(t)?"center":"left"}function z(t){return i.isBottomAnchor(t)?"bottom":i.isMiddleAnchor(t)?"middle":"top"}function O(t){return t._id||"legend"}t.exports=function(t,e){if(e)k(t,e);else{var r=t._fullLayout,i=r._legends;r._infolayer.selectAll('[class^="legend"]').each((function(){var t=n.select(this),e=t.attr("class").split(" ")[0];e.match(w)&&-1===i.indexOf(e)&&t.remove()}));for(var o=0;o{"use strict";var n=r(25059),i=r(18804);t.exports=function(t,e,r){var o,a,s=e._inHover,l=i.isGrouped(e),c=i.isReversed(e),u={},h=[],d=!1,f={},p=0,m=0;function g(t,n,o){if(!1!==e.visible&&(!r||t===e._id))if(""!==n&&i.isGrouped(e))-1===h.indexOf(n)?(h.push(n),d=!0,u[n]=[o]):u[n].push(o);else{var a="~~i"+p;h.push(a),u[a]=[o],p++}}for(o=0;oS&&(T=S)}A[o][0]._groupMinRank=T,A[o][0]._preGroupSort=o}var C=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(A.forEach((function(t,e){t[0]._preGroupSort=e})),A.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),o=0;o{"use strict";var n=r(25059),i=r(12822),o=i.pushUnique,a=!0;t.exports=function(t,e,r){var s=e._fullLayout;if(!e._dragged&&!e._editing){var l,c=s.legend.itemclick,u=s.legend.itemdoubleclick,h=s.legend.groupclick;if(1===r&&"toggle"===c&&"toggleothers"===u&&a&&e.data&&e._context.showTips?(i.notifier(i._(e,"Double-click on legend to isolate one trace"),"long"),a=!1):a=!1,1===r?l=c:2===r&&(l=u),l){var d="togglegroup"===h,f=s.hiddenlabels?s.hiddenlabels.slice():[],p=t.data()[0][0];if(!p.groupTitle||!p.noClick){var m=e._fullData,g=(s.shapes||[]).filter((function(t){return t.showlegend})),v=m.concat(g),b=p.trace;b._isShape&&(b=b._fullInput);var y,x,_,w,k,A=b.legendgroup,M={},T=[],S=[],C=[],E=(s.shapes||[]).map((function(t){return t._input})),L=!1,z=b.legend,O=b._fullInput;if(O&&O._isShape||!n.traceIs(b,"pie-like")){var D,I=A&&A.length,R=[];if(I)for(y=0;y{"use strict";e.isGrouped=function(t){return-1!==(t.traceorder||"").indexOf("grouped")},e.isVertical=function(t){return"h"!==t.orientation},e.isReversed=function(t){return-1!==(t.traceorder||"").indexOf("reversed")}},97833:(t,e,r)=>{"use strict";t.exports={moduleType:"component",name:"legend",layoutAttributes:r(15524),supplyLayoutDefaults:r(64083),draw:r(67739),style:r(26972)}},26972:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=o.strTranslate,s=r(40666),l=r(17499),c=r(42226).extractOpts,u=r(677),h=r(62970),d=r(17269).castOption,f=r(4496);function p(t,e){return(e?"radial":"horizontal")+(t?"":"reversed")}function m(t){var e=t[0].trace,r=e.contours,n=u.hasLines(e),i=u.hasMarkers(e),o=e.visible&&e.fill&&"none"!==e.fill,a=!1,s=!1;if(r){var l=r.coloring;"lines"===l?a=!0:n="none"===l||"heatmap"===l||r.showlines,"constraint"===r.type?o="="!==r._operation:"fill"!==l&&"heatmap"!==l||(s=!0)}return{showMarker:i,showLine:n,showFill:o,showGradientLine:a,showGradientFill:s,anyLine:n||a,anyFill:o||s}}function g(t,e,r){return t&&o.isArrayOrTypedArray(t)?e:t>r?r:t}t.exports=function(t,e,r){var v=e._fullLayout;r||(r=v.legend);var b="constant"===r.itemsizing,y=r.itemwidth,x=(y+2*f.itemGap)/2,_=a(x,0),w=function(t,e,r,n){var i;if(t+1)i=t;else{if(!(e&&e.width>0))return 0;i=e.width}return b?n:Math.min(i,r)};function k(t,o,a){var u=t[0].trace,h=u.marker||{},d=h.line||{},f=h.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",p=a?u.visible&&u.type===a:i.traceIs(u,"bar"),m=n.select(o).select("g.legendpoints").selectAll("path.legend"+a).data(p?[t]:[]);m.enter().append("path").classed("legend"+a,!0).attr("d",f).attr("transform",_),m.exit().remove(),m.each((function(t){var i=n.select(this),o=t[0],a=w(o.mlw,h.line,5,2);i.style("stroke-width",a+"px");var f=o.mcc;if(!r._inHover&&"mc"in o){var p=c(h),m=p.mid;void 0===m&&(m=(p.max+p.min)/2),f=s.tryColorscale(h,"")(m)}var v=f||o.mc||h.color,b=h.pattern,y=b&&s.getPatternAttr(b.shape,0,"");if(y){var x=s.getPatternAttr(b.bgcolor,0,null),_=s.getPatternAttr(b.fgcolor,0,null),k=b.fgopacity,A=g(b.size,8,10),M=g(b.solidity,.5,1),T="legend-"+u.uid;i.call(s.pattern,"legend",e,T,y,A,M,f,b.fillmode,x,_,k)}else i.call(l.fill,v);a&&l.stroke(i,o.mlc||d.color)}))}function A(t,r,a){var s=t[0],l=s.trace,c=a?l.visible&&l.type===a:i.traceIs(l,a),u=n.select(r).select("g.legendpoints").selectAll("path.legend"+a).data(c?[t]:[]);if(u.enter().append("path").classed("legend"+a,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),u.exit().remove(),u.size()){var f=l.marker||{},p=w(d(f.line.width,s.pts),f.line,5,2),m="pieLike",g=o.minExtend(l,{marker:{line:{width:p}}},m),v=o.minExtend(s,{trace:g},m);h(u,v,g,e)}}t.each((function(t){var e=n.select(this),i=o.ensureSingle(e,"g","layers");i.style("opacity",t[0].trace.opacity);var s=r.indentation,l=r.valign,c=t[0].lineHeight,u=t[0].height;if("middle"===l&&0===s||!c||!u)i.attr("transform",null);else{var h={top:1,bottom:-1}[l]*(.5*(c-u+3))||0,d=r.indentation;i.attr("transform",a(d,h))}i.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var f=i.selectAll("g.legendsymbols").data([t]);f.enter().append("g").classed("legendsymbols",!0),f.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)})).each((function(t){var r,i=t[0].trace,a=[];if(i.visible)switch(i.type){case"histogram2d":case"heatmap":a=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":a=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":a=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":a=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],r=!1;break;case"streamtube":a=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],r=!1;break;case"surface":a=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],r=!0;break;case"mesh3d":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var u=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(a);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),u.exit().remove(),u.each((function(t,a){var u,h=n.select(this),d=c(i),f=d.colorscale,m=d.reversescale;if(f){if(!r){var g=f.length;u=0===a?f[m?g-1:0][1]:1===a?f[m?0:g-1][1]:f[Math.floor((g-1)/2)][1]}}else{var v=i.vertexcolor||i.facecolor||i.color;u=o.isArrayOrTypedArray(v)?v[a]||v[0]:v}h.attr("d",t[0]),u?h.call(l.fill,u):h.call((function(t){if(t.size()){var n="legendfill-"+i.uid;s.gradient(t,e,n,p(m,"radial"===r),f,"fill")}}))}))})).each((function(t){var e=t[0].trace,r="waterfall"===e.type;if(t[0]._distinct&&r){var i=t[0].trace[t[0].dir].marker;return t[0].mc=i.color,t[0].mlw=i.line.width,t[0].mlc=i.line.color,k(t,this,"waterfall")}var o=[];e.visible&&r&&(o=t[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var a=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(o);a.enter().append("path").classed("legendwaterfall",!0).attr("transform",_).style("stroke-miterlimit",1),a.exit().remove(),a.each((function(t){var r=n.select(this),i=e[t[0]].marker,o=w(void 0,i.line,5,2);r.attr("d",t[1]).style("stroke-width",o+"px").call(l.fill,i.color),o&&r.call(l.stroke,i.line.color)}))})).each((function(t){k(t,this,"funnel")})).each((function(t){k(t,this)})).each((function(t){var r=t[0].trace,a=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&i.traceIs(r,"box-violin")?[t]:[]);a.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),a.exit().remove(),a.each((function(){var t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);t.style("stroke-width",i+"px").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var c=o.minExtend(r,{marker:{size:b?12:o.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});a.call(s.pointStyle,c,e)}}))})).each((function(t){A(t,this,"funnelarea")})).each((function(t){A(t,this,"pie")})).each((function(t){var r,i,a=m(t),l=a.showFill,h=a.showLine,d=a.showGradientLine,f=a.showGradientFill,g=a.anyFill,v=a.anyLine,b=t[0],x=b.trace,_=c(x),k=_.colorscale,A=_.reversescale,M=u.hasMarkers(x)||!g?"M5,0":v?"M5,-2":"M5,-3",T=n.select(this),S=T.select(".legendfill").selectAll("path").data(l||f?[t]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",M+"h"+y+"v6h-"+y+"z").call((function(t){if(t.size())if(l)s.fillGroupStyle(t,e,!0);else{var r="legendfill-"+x.uid;s.gradient(t,e,r,p(A),k,"fill")}})),h||d){var C=w(void 0,x.line,10,5);i=o.minExtend(x,{line:{width:C}}),r=[o.minExtend(b,{trace:i})]}var E=T.select(".legendlines").selectAll("path").data(h||d?[r]:[]);E.enter().append("path").classed("js-line",!0),E.exit().remove(),E.attr("d",M+(d?"l"+y+",0.0001":"h"+y)).call(h?s.lineGroupStyle:function(t){if(t.size()){var r="legendline-"+x.uid;s.lineGroupStyle(t),s.gradient(t,e,r,p(A),k,"stroke")}})})).each((function(t){var r,i,a=m(t),l=a.anyFill,c=a.anyLine,h=a.showLine,d=a.showMarker,f=t[0],p=f.trace,g=!d&&!c&&!l&&u.hasText(p);function v(t,e,r,n){var i=o.nestedProperty(p,t).get(),a=o.isArrayOrTypedArray(i)&&e?e(i):i;if(b&&a&&void 0!==n&&(a=n),r){if(ar[1])return r[1]}return a}function y(t){return f._distinct&&f.index&&t[f.index]?t[f.index]:t[0]}if(d||g||h){var x={},w={};if(d){x.mc=v("marker.color",y),x.mx=v("marker.symbol",y),x.mo=v("marker.opacity",o.mean,[.2,1]),x.mlc=v("marker.line.color",y),x.mlw=v("marker.line.width",o.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var k=v("marker.size",o.mean,[2,16],12);x.ms=k,w.marker.size=k}h&&(w.line={width:v("line.width",y,[0,10],5)}),g&&(x.tx="Aa",x.tp=v("textposition",y),x.ts=10,x.tc=v("textfont.color",y),x.tf=v("textfont.family",y),x.tw=v("textfont.weight",y),x.ty=v("textfont.style",y),x.tv=v("textfont.variant",y)),r=[o.minExtend(f,x)],(i=o.minExtend(p,w)).selectedpoints=null,i.texttemplate=null}var A=n.select(this).select("g.legendpoints"),M=A.selectAll("path.scatterpts").data(d?r:[]);M.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),M.exit().remove(),M.call(s.pointStyle,i,e),d&&(r[0].mrc=3);var T=A.selectAll("g.pointtext").data(g?r:[]);T.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),T.exit().remove(),T.selectAll("text").call(s.textPointStyle,i,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(e.visible&&"candlestick"===e.type?[t,t]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(t,e){return e?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),o=e[r?"increasing":"decreasing"],a=w(void 0,o.line,5,2);i.style("stroke-width",a+"px").call(l.fill,o.fillcolor),a&&l.stroke(i,o.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(e.visible&&"ohlc"===e.type?[t,t]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(t,e){return e?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),o=e[r?"increasing":"decreasing"],a=w(void 0,o.line,5,2);i.style("fill","none").call(s.dashLine,o.line.dash,a),a&&l.stroke(i,o.line.color)}))}))}},62799:(t,e,r)=>{"use strict";var n=r(7113);t.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.","This may include *"+n.backButtons.join("*, *")+"*."].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.","This may include *"+n.foreButtons.join("*, *")+"*."].join(" ")}}},47685:(t,e,r)=>{"use strict";var n=r(25059),i=r(51137),o=r(99246),a=r(50917),s=r(71422).eraseActiveShape,l=r(12822),c=l._,u=t.exports={};function h(t,e){var r,i,a=e.currentTarget,s=a.getAttribute("data-attr"),l=a.getAttribute("data-val")||!0,c=t._fullLayout,u={},h=o.list(t,null,!0),d=c._cartesianSpikesEnabled;if("zoom"===s){var f,p="in"===l?.5:2,m=(1+p)/2,g=(1-p)/2;for(i=0;i{"use strict";var n=r(47685),i=Object.keys(n),o=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],a=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(o),s=[];i.forEach((function(t){!function(t){if(-1===a.indexOf(t._cat||t.name)){var e=t.name,r=(t._cat||t.name).toLowerCase();-1===s.indexOf(e)&&s.push(e),-1===s.indexOf(r)&&s.push(r)}}(n[t])})),s.sort(),t.exports={DRAW_MODES:o,backButtons:a,foreButtons:s}},90120:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(46121),a=r(62799);t.exports=function(t,e){var r=t.modebar||{},s=o.newContainer(e,"modebar");function l(t,e){return n.coerce(r,s,a,t,e)}l("orientation"),l("bgcolor",i.addOpacity(e.paper_bgcolor,.5));var c=i.contrast(i.rgb(e.modebar.bgcolor));l("color",i.addOpacity(c,.3)),l("activecolor",i.addOpacity(c,.7)),l("uirevision",e.uirevision),l("add"),l("remove")}},45828:(t,e,r)=>{"use strict";t.exports={moduleType:"component",name:"modebar",layoutAttributes:r(62799),supplyLayoutDefaults:r(90120),manage:r(83493)}},83493:(t,e,r)=>{"use strict";var n=r(99246),i=r(677),o=r(25059),a=r(66811).isUnifiedHover,s=r(27756),l=r(47685),c=r(7113).DRAW_MODES,u=r(12822).extendDeep;t.exports=function(t){var e=t._fullLayout,r=t._context,h=e._modeBar;if(r.displayModeBar||r.watermark){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var d,f=r.modeBarButtons;d=Array.isArray(f)&&f.length?function(t){for(var e=u([],t),r=0;r1?(O=["toggleHover"],D=["resetViews"]):v?(z=["zoomInGeo","zoomOutGeo"],O=["hoverClosestGeo"],D=["resetGeo"]):g?(O=["hoverClosest3d"],D=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(z=["zoomInMapbox","zoomOutMapbox"],O=["toggleHover"],D=["resetViewMapbox"]):x?O=["hoverClosestGl2d"]:b?O=["hoverClosestPie"]:M?(O=["hoverClosestCartesian","hoverCompareCartesian"],D=["resetViewSankey"]):O=["toggleHover"],m&&(O=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(t){for(var e=0;e{"use strict";var n=r(27941),i=r(7370),o=r(12822),a=r(50917),s=r(88566).version,l=new DOMParser;function c(t){this.container=t.container,this.element=document.createElement("div"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var u=c.prototype;u.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i="modebar-"+n._uid;this.element.setAttribute("id",i),this._uid=i,this.element.className="modebar","hover"===r.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===n.modebar.orientation&&(this.element.className+=" vertical",e=e.reverse());var a=n.modebar,s="hover"===r.displayModeBar?".js-plotly-plot .plotly:hover ":"";o.deleteRelatedStyleRule(i),o.addRelatedStyleRule(i,s+"#"+i+" .modebar-group","background-color: "+a.bgcolor),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+a.color),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+a.activecolor),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn.active .icon path","fill: "+a.activecolor);var l=!this.hasButtons(e),c=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(l||c||u)&&(this.removeAllButtons(),this.updateButtons(e),r.watermark||r.displaylogo)){var h=this.getLogo();r.watermark&&(h.className=h.className+" watermark"),"v"===n.modebar.orientation?this.element.insertBefore(h,this.element.childNodes[0]):this.element.appendChild(h),this.hasLogo=!0}this.updateActiveButton()},u.updateButtons=function(t){var e=this;this.buttons=t,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach((function(t){var r=e.createGroup();t.forEach((function(t){var n=t.name;if(!n)throw new Error("must provide button 'name' in button config");if(-1!==e.buttonsNames.indexOf(n))throw new Error("button name '"+n+"' is taken");e.buttonsNames.push(n);var i=e.createButton(t);e.buttonElements.push(i),r.appendChild(i)})),e.element.appendChild(r)}))},u.createGroup=function(){var t=document.createElement("div");return t.className="modebar-group",t},u.createButton=function(t){var e=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var i=t.title;void 0===i?i=t.name:"function"==typeof i&&(i=i(this.graphInfo)),(i||0===i)&&r.setAttribute("data-title",i),void 0!==t.attr&&r.setAttribute("data-attr",t.attr);var o=t.val;if(void 0!==o&&("function"==typeof o&&(o=o(this.graphInfo)),r.setAttribute("data-val",o)),"function"!=typeof t.click)throw new Error("must provide button 'click' function in button config");r.addEventListener("click",(function(r){t.click(e.graphInfo,r),e.updateActiveButton(r.currentTarget)})),r.setAttribute("data-toggle",t.toggle||!1),t.toggle&&n.select(r).classed("active",!0);var s=t.icon;return"function"==typeof s?r.appendChild(s()):r.appendChild(this.createIcon(s||a.question)),r.setAttribute("data-gravity",t.gravity||"n"),r},u.createIcon=function(t){var e,r=i(t.height)?Number(t.height):t.ascent-t.descent,n="http://www.w3.org/2000/svg";if(t.path){(e=document.createElementNS(n,"svg")).setAttribute("viewBox",[0,0,t.width,r].join(" ")),e.setAttribute("class","icon");var o=document.createElementNS(n,"path");o.setAttribute("d",t.path),t.transform?o.setAttribute("transform",t.transform):void 0!==t.ascent&&o.setAttribute("transform","matrix(1 0 0 -1 0 "+t.ascent+")"),e.appendChild(o)}return t.svg&&(e=l.parseFromString(t.svg,"application/xml").childNodes[0]),e.setAttribute("height","1em"),e.setAttribute("width","1em"),e},u.updateActiveButton=function(t){var e=this.graphInfo._fullLayout,r=void 0!==t?t.getAttribute("data-attr"):null;this.buttonElements.forEach((function(t){var i=t.getAttribute("data-val")||!0,a=t.getAttribute("data-attr"),s="true"===t.getAttribute("data-toggle"),l=n.select(t);if(s)a===r&&l.classed("active",!l.classed("active"));else{var c=null===a?a:o.nestedProperty(e,a).get();l.classed("active",c===i)}}))},u.hasButtons=function(t){var e=this.buttons;if(!e)return!1;if(t.length!==e.length)return!1;for(var r=0;r{"use strict";var n=r(75058),i=r(84226),o=(0,r(46121).templatedArray)("button",{visible:{valType:"boolean",dflt:!0,editType:"plot",description:"Determines whether or not this button is visible."},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot",description:["The unit of measurement that the `count` value will set the range by."].join(" ")},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot",description:["Sets the range update mode.","If *backward*, the range update shifts the start of range","back *count* times *step* milliseconds.","If *todate*, the range update shifts the start of range","back to the first timestamp from *count* times","*step* milliseconds back.","For example, with `step` set to *year* and `count` set to *1*","the range update shifts the start of the range back to","January 01 of the current year.","Month and year *todate* are currently available only","for the built-in (Gregorian) calendar."].join(" ")},count:{valType:"number",min:0,dflt:1,editType:"plot",description:["Sets the number of steps to take to update the range.","Use with `step` to specify the update interval."].join(" ")},label:{valType:"string",editType:"plot",description:"Sets the text label to appear on the button."},editType:"plot",description:["Sets the specifications for each buttons.","By default, a range selector comes with no buttons."].join(" ")});t.exports={visible:{valType:"boolean",editType:"plot",description:["Determines whether or not this range selector is visible.","Note that range selectors are only available for x axes of","`type` set to or auto-typed to *date*."].join(" ")},buttons:o,x:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the x position (in normalized coordinates) of the range selector."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot",description:["Sets the range selector's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the y position (in normalized coordinates) of the range selector."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot",description:["Sets the range selector's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},font:n({editType:"plot",description:"Sets the font of the range selector button text."}),bgcolor:{valType:"color",dflt:i.lightLine,editType:"plot",description:"Sets the background color of the range selector buttons."},activecolor:{valType:"color",editType:"plot",description:"Sets the background color of the active range selector button."},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"plot",description:"Sets the color of the border enclosing the range selector."},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot",description:"Sets the width (in px) of the border enclosing the range selector."},editType:"plot"}},12057:t=>{"use strict";t.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},4088:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(46121),a=r(35677),s=r(76927),l=r(12057);function c(t,e,r,i){var o=i.calendar;function a(r,i){return n.coerce(t,e,s.buttons,r,i)}if(a("visible")){var l=a("step");"all"!==l&&(!o||"gregorian"===o||"month"!==l&&"year"!==l?a("stepmode"):e.stepmode="backward",a("count")),a("label")}}t.exports=function(t,e,r,u,h){var d=t.rangeselector||{},f=o.newContainer(e,"rangeselector");function p(t,e){return n.coerce(d,f,s,t,e)}if(p("visible",a(d,f,{name:"buttons",handleItemDefaults:c,calendar:h}).length>0)){var m=function(t,e,r){for(var n=r.filter((function(r){return e[r].anchor===t._id})),i=0,o=0;o{"use strict";var n=r(27941),i=r(25059),o=r(51137),a=r(17499),s=r(40666),l=r(12822),c=l.strTranslate,u=r(80394),h=r(99246),d=r(89701),f=d.LINE_SPACING,p=d.FROM_TL,m=d.FROM_BR,g=r(12057),v=r(98822);function b(t){return t._id}function y(t,e,r){var n=l.ensureSingle(t,"rect","selector-rect",(function(t){t.attr("shape-rendering","crispEdges")}));n.attr({rx:g.rx,ry:g.ry}),n.call(a.stroke,e.bordercolor).call(a.fill,function(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}(e,r)).style("stroke-width",e.borderwidth+"px")}function x(t,e,r,n){var i,o;l.ensureSingle(t,"text","selector-text",(function(t){t.attr("text-anchor","middle")})).call(s.font,e.font).text((i=r,o=n._fullLayout._meta,i.label?o?l.templateString(i.label,o):i.label:"all"===i.step?"all":i.count+i.step.charAt(0))).call((function(t){u.convertToTspans(t,n)}))}t.exports=function(t){var e=t._fullLayout._infolayer.selectAll(".rangeselector").data(function(t){for(var e=h.list(t,"x",!0),r=[],n=0;n{"use strict";var n=r(55622),i=r(12822).titleCase;t.exports=function(t,e){var r=t._name,o={};if("all"===e.step)o[r+".autorange"]=!0;else{var a=function(t,e){var r,o=t.range,a=new Date(t.r2l(o[1])),s=e.step,l=n["utc"+i(s)],c=e.count;switch(e.stepmode){case"backward":r=t.l2r(+l.offset(a,-c));break;case"todate":var u=l.offset(a,-c);r=t.l2r(+l.ceil(u))}return[r,o[1]]}(t,e);o[r+".range[0]"]=a[0],o[r+".range[1]"]=a[1]}return o}},36404:(t,e,r)=>{"use strict";t.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:r(76927)}}},layoutAttributes:r(76927),handleDefaults:r(4088),draw:r(58204)}},40959:(t,e,r)=>{"use strict";var n=r(84226);t.exports={bgcolor:{valType:"color",dflt:n.background,editType:"plot",description:"Sets the background color of the range slider."},bordercolor:{valType:"color",dflt:n.defaultLine,editType:"plot",description:"Sets the border color of the range slider."},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot",description:"Sets the border width of the range slider."},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range slider range is","computed in relation to the input data.","If `range` is provided, then `autorange` is set to *false*."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1},description:["Sets the range of the range slider.","If not set, defaults to the full xaxis range.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot",description:["The height of the range slider as a fraction of the","total plot area height."].join(" ")},visible:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the range slider will be visible.","If visible, perpendicular axes will be set to `fixedrange`"].join(" ")},editType:"calc"}},99224:(t,e,r)=>{"use strict";var n=r(99246).list,i=r(19496).getAutoRange,o=r(92601);t.exports=function(t){for(var e=n(t,"x",!0),r=0;r{"use strict";t.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},4504:(t,e,r)=>{"use strict";var n=r(12822),i=r(46121),o=r(99246),a=r(40959),s=r(73290);t.exports=function(t,e,r){var l=t[r],c=e[r];if(l.rangeslider||e._requestRangeslider[c._id]){n.isPlainObject(l.rangeslider)||(l.rangeslider={});var u,h,d=l.rangeslider,f=i.newContainer(c,"rangeslider");if(_("visible")){_("bgcolor",e.plot_bgcolor),_("bordercolor"),_("borderwidth"),_("thickness"),_("autorange",!c.isValidRange(d.range)),_("range");var p=e._subplots;if(p)for(var m=p.cartesian.filter((function(t){return t.substr(0,t.indexOf("y"))===o.name2id(r)})).map((function(t){return t.substr(t.indexOf("y"),t.length)})),g=n.simpleMap(m,o.id2name),v=0;v{"use strict";var n=r(27941),i=r(25059),o=r(51137),a=r(12822),s=a.strTranslate,l=r(40666),c=r(17499),u=r(6883),h=r(29592),d=r(99246),f=r(19846),p=r(76292),m=r(92601);function g(t){return"number"==typeof t.clientX?t.clientX:t.touches&&t.touches.length>0?t.touches[0].clientX:0}function v(t,e,r,n){var i=a.ensureSingle(t,"rect",m.bgClassName,(function(t){t.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),o=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,u=-n._offsetShift,h=l.crispRound(e,n.borderwidth);i.attr({width:n._width+o,height:n._height+o,transform:s(u,u),"stroke-width":h}).call(c.stroke,n.bordercolor).call(c.fill,n.bgcolor)}function b(t,e,r,n){var i=e._fullLayout;a.ensureSingleById(i._topdefs,"clipPath",n._clipId,(function(t){t.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function y(t,e,r,i){var s,c=e.calcdata,u=t.selectAll("g."+m.rangePlotClassName).data(r._subplotsWith,a.identity);u.enter().append("g").attr("class",(function(t){return m.rangePlotClassName+" "+t})).call(l.setClipUrl,i._clipId,e),u.order(),u.exit().remove(),u.each((function(t,a){var l=n.select(this),u=0===a,f=d.getFromId(e,t,"y"),p=f._name,m=i[p],g={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:i.range.slice(),calendar:r.calendar},width:i._width,height:i._height,margin:{t:0,b:0,l:0,r:0}},_context:e._context};r.rangebreaks&&(g.layout.xaxis.rangebreaks=r.rangebreaks),g.layout[p]={type:f.type,domain:[0,1],range:"match"!==m.rangemode?m.range.slice():f.range.slice(),calendar:f.calendar},f.rangebreaks&&(g.layout[p].rangebreaks=f.rangebreaks),o.supplyDefaults(g);var v=g._fullLayout.xaxis,b=g._fullLayout[p];v.clearCalc(),v.setScale(),b.clearCalc(),b.setScale();var y={id:t,plotgroup:l,xaxis:v,yaxis:b,isRangePlot:!0};u?s=y:(y.mainplot="xy",y.mainplotinfo=s),h.rangePlot(e,y,function(t,e){for(var r=[],n=0;n=n.max)e=N[r+1];else if(t=n.pmax)e=N[r+1];else if(tr._length||b+_<0)return;u=v+_,f=b+_;break;case l:if(x="col-resize",v+_>r._length)return;u=v+_,f=b;break;case c:if(x="col-resize",b+_<0)return;u=v,f=b+_;break;default:x="ew-resize",u=m,f=m+_}if(f{"use strict";var n=r(99246),i=r(80394),o=r(92601),a=r(89701).LINE_SPACING,s=o.name;function l(t){var e=t&&t[s];return e&&e.visible}e.isVisible=l,e.makeData=function(t){var e=n.list({_fullLayout:t},"x",!0),r=t.margin,i=[];if(!t._has("gl2d"))for(var o=0;o{"use strict";var n=r(12822),i=r(40959),o=r(73290),a=r(93729);t.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},i,{yaxis:o})}}},layoutAttributes:r(40959),handleDefaults:r(4504),calcAutorange:r(99224),draw:r(19260),isVisible:a.isVisible,makeData:a.makeData,autoMarginOpts:a.autoMarginOpts}},73290:t=>{"use strict";t.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc",description:["Determines whether or not the range of this axis in","the rangeslider use the same value than in the main plot","when zooming in/out.","If *auto*, the autorange will be used.","If *fixed*, the `range` is used.","If *match*, the current range of the corresponding y-axis on the main subplot is used."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Sets the range of this axis for the rangeslider."].join(" ")},editType:"calc"}},65586:(t,e,r)=>{"use strict";var n=r(77061),i=r(98387).line,o=r(68057).T,a=r(98260).extendFlat,s=r(62309).overrideAll,l=r(46121).templatedArray,c=r(53644);t.exports=s(l("selection",{type:{valType:"enumerated",values:["rect","path"],description:["Specifies the selection type to be drawn.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`) and (`x0`,`y1`).","If *path*, draw a custom SVG path using `path`."].join(" ")},xref:a({},n.xref,{description:["Sets the selection's x coordinate axis.",c.axisRefDescription("x","left","right")].join(" ")}),yref:a({},n.yref,{description:["Sets the selection's x coordinate axis.",c.axisRefDescription("y","bottom","top")].join(" ")}),x0:{valType:"any",description:"Sets the selection's starting x position."},x1:{valType:"any",description:"Sets the selection's end x position."},y0:{valType:"any",description:"Sets the selection's starting y position."},y1:{valType:"any",description:"Sets the selection's end y position."},path:{valType:"string",editType:"arraydraw",description:["For `type` *path* - a valid SVG path similar to `shapes.path` in data coordinates.","Allowed segments are: M, L and Z."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw",description:"Sets the opacity of the selection."},line:{color:i.color,width:a({},i.width,{min:1,dflt:1}),dash:a({},o,{dflt:"dot"})}}),"arraydraw","from-root")},76814:t=>{"use strict";t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},8037:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(65586),s=r(23223);function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}var l=o("path"),c="path"!==o("type",l?"path":"rect");c&&delete e.path,o("opacity"),o("line.color"),o("line.width"),o("line.dash");for(var u=["x","y"],h=0;h<2;h++){var d,f,p,m=u[h],g={_fullLayout:r},v=i.coerceRef(t,e,g,m);if((d=i.getFromId(g,v))._selectionIndices.push(e._index),p=s.rangeToShapePosition(d),f=s.shapePositionToRange(d),c){var b=m+"0",y=m+"1",x=t[b],_=t[y];t[b]=f(t[b],!0),t[y]=f(t[y],!0),i.coercePosition(e,g,o,v,b),i.coercePosition(e,g,o,v,y);var w=e[b],k=e[y];void 0!==w&&void 0!==k&&(e[b]=p(w),e[y]=p(k),t[b]=x,t[y]=_)}}c&&n.noneOrAll(t,e,["x0","x1","y0","y1"])}t.exports=function(t,e){o(t,e,{name:"selections",handleItemDefaults:l});for(var r=e.selections,n=0;n{"use strict";var n=r(59952).readPaths,i=r(49244),o=r(8867).clearOutlineControllers,a=r(17499),s=r(40666),l=r(46121).arrayEditor,c=r(23223),u=c.getPathString;function h(t){var e=t._fullLayout;for(var r in o(t),e._selectionLayer.selectAll("path").remove(),e._plots){var n=e._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var i=0;i=0;A--){var M=r.append("path").attr(g).style("opacity",A?.1:v).call(a.stroke,y).call(a.fill,b).call(s.dashLine,A?"solid":_,A?4+x:x);if(p(M,t,o),w){var T=l(t.layout,"selections",o);M.style({cursor:"move"});var S={element:M.node(),plotinfo:f,gd:t,editHelpers:T,isActiveSelection:!0},C=n(c,t);i(C,M,S)}else M.style("pointer-events",A?"all":"none");k[A]=M}var E=k[0];k[1].node().addEventListener("click",(function(){return function(t,e){if(d(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeSelectionIndex)return void m(t);t._fullLayout._activeSelectionIndex=r,t._fullLayout._deactivateSelection=m,h(t)}}}(t,E)}))}(t._fullLayout._selectionLayer)}function p(t,e,r){var n=r.xref+r.yref;s.setClipUrl(t,"clip"+e._fullLayout._uid+n,e)}function m(t){d(t)&&t._fullLayout._activeSelectionIndex>=0&&(o(t),delete t._fullLayout._activeSelectionIndex,h(t))}t.exports={draw:h,drawOne:f,activateLastSelection:function(t){if(d(t)){var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=m,h(t)}}}},21422:(t,e,r)=>{"use strict";var n=r(68057).T,i=r(98260).extendFlat;t.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none",description:["Describes how a new selection is created.","If `immediate`, a new selection is created after first mouse up.","If `gradual`, a new selection is not created after first mouse.","By adding to and subtracting from the initial selection,","this option allows declaring extra outlines of the selection."].join(" ")},line:{color:{valType:"color",editType:"none",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:1,dflt:1,editType:"none",description:"Sets the line width (in px)."},dash:i({},n,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none",description:"Sets the color filling the active selection' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none",description:"Sets the opacity of the active selection."},editType:"none"}}},80857:t=>{"use strict";t.exports=function(t,e,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},63750:(t,e,r)=>{"use strict";var n=r(14295).selectMode,i=r(8867).clearOutline,o=r(59952),a=o.readPaths,s=o.writePaths,l=o.fixDatesForPaths;t.exports=function(t,e){if(t.length){var r=t[0][0];if(r){var o=r.getAttribute("d"),c=e.gd,u=c._fullLayout.newselection,h=e.plotinfo,d=h.xaxis,f=h.yaxis,p=e.isActiveSelection,m=e.dragmode,g=(c.layout||{}).selections||[];if(!n(m)&&void 0!==p){var v=c._fullLayout._activeSelectionIndex;if(v{"use strict";var n=r(12822).strTranslate;function i(t,e){switch(t.type){case"log":return t.p2d(e);case"date":return t.p2r(e,0,t.calendar);default:return t.p2r(e)}}t.exports={p2r:i,r2p:function(t,e){switch(t.type){case"log":return t.d2p(e);case"date":return t.r2p(e,0,t.calendar);default:return t.r2p(e)}},axValue:function(t){var e="y"===t._id.charAt(0)?1:0;return function(r){return i(t,r[e])}},getTransform:function(t){return n(t.xaxis._offset,t.yaxis._offset)}}},70059:(t,e,r)=>{"use strict";var n=r(70445),i=r(80191);t.exports={moduleType:"component",name:"selections",layoutAttributes:r(65586),supplyLayoutDefaults:r(8037),supplyDrawNewSelectionDefaults:r(80857),includeBasePlot:r(39859)("selections"),draw:n.draw,drawOne:n.drawOne,reselect:i.reselect,prepSelect:i.prepSelect,clearOutline:i.clearOutline,clearSelectionsCache:i.clearSelectionsCache,selectOnClick:i.selectOnClick}},80191:(t,e,r)=>{"use strict";var n=r(48439),i=r(53824),o=r(25059),a=r(40666).dashStyle,s=r(17499),l=r(70410),c=r(66811).makeEventData,u=r(14295),h=u.freeMode,d=u.rectMode,f=u.drawMode,p=u.openMode,m=u.selectMode,g=r(23223),v=r(6583),b=r(49244),y=r(8867).clearOutline,x=r(59952),_=x.handleEllipse,w=x.readPaths,k=r(81941).newShapes,A=r(63750),M=r(70445).activateLastSelection,T=r(12822),S=T.sorterAsc,C=r(92620),E=r(76324),L=r(99246).getFromId,z=r(86748),O=r(39004).redrawReglTraces,D=r(76814),I=D.MINSELECT,R=C.filter,F=C.tester,P=r(38554),N=P.p2r,j=P.axValue,B=P.getTransform;function U(t){return void 0!==t.subplot}function G(t,e,r,n,i,o,a){var s,l,c,u,h,d,f,m,g,v=e._hoverdata,y=e._fullLayout.clickmode.indexOf("event")>-1,x=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(v)){q(t,e,o);var _=function(t,e){var r,n,i=t[0],o=-1,a=[];for(n=0;n0?function(t,e){var r,n,i,o=[];for(i=0;i0&&o.push(r);if(1===o.length&&o[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(i=0;i1)return!1;if((n+=e.selectedpoints.length)>1)return!1}return 1===n}(s)&&(d=J(_))){for(a&&a.remove(),g=0;g=0})(i)&&i._fullLayout._deactivateShape(i),function(t){return t._fullLayout._activeSelectionIndex>=0}(i)&&i._fullLayout._deactivateSelection(i);var a=i._fullLayout._zoomlayer,s=f(r),l=m(r);if(s||l){var c,u,h=a.selectAll(".select-outline-"+n.id);h&&i._fullLayout._outlining&&(s&&(c=k(h,t)),c&&o.call("_guiRelayout",i,{shapes:c}),l&&!U(t)&&(u=A(h,t)),u&&(i._fullLayout._noEmitSelectedAtStart=!0,o.call("_guiRelayout",i,{selections:u}).then((function(){e&&M(i)}))),i._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=t.selectionDefs=[],n.selection.mergedPolygons=t.mergedPolygons=[]}function Z(t){return t._id}function X(t,e,r,n){if(!t.calcdata)return[];var i,o,a,s=[],l=e.map(Z),c=r.map(Z);for(a=0;a0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function K(t,e,r){var n,i;for(n=0;n-1&&e;if(!o&&e){var et=at(t,!0);if(et.length){var nt=et[0].xref,ft=et[0].yref;if(nt&&ft){var pt=ct(et);ut([L(t,nt,"x"),L(t,ft,"y")])(Q,pt)}}t._fullLayout._noEmitSelectedAtStart?t._fullLayout._noEmitSelectedAtStart=!1:tt&&ht(t,Q),d._reselect=!1}if(!o&&d._deselect){var mt=d._deselect;(function(t,e,r){for(var n=0;n=0)A._fullLayout._deactivateShape(A);else if(!y){var r=M.clickmode;E.done(Tt).then((function(){if(E.clear(Tt),2===t){for(xt.remove(),J=0;J-1&&G(e,A,n.xaxes,n.yaxes,n.subplot,n,xt),"event"===r&&ht(A,void 0);l.click(A,e,z.id)})).catch(T.error)}},n.doneFn=function(){At.remove(),E.done(Tt).then((function(){E.clear(Tt),!S&&$&&n.selectionDefs&&($.subtract=yt,n.selectionDefs.push($),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,Z)),(S||y)&&Y(n,S),n.doneFnCompleted&&n.doneFnCompleted(St),x&&ht(A,ot)})).catch(T.error)}},clearOutline:y,clearSelectionsCache:Y,selectOnClick:G}},39677:(t,e,r)=>{"use strict";var n=r(77061),i=r(75058),o=r(98387).line,a=r(68057).T,s=r(98260).extendFlat,l=r(46121).templatedArray,c=r(53644),u=r(3520),h=r(24131).LF,d=r(12086);t.exports=l("shape",{visible:s({},u.visible,{editType:"calc+arraydraw",description:["Determines whether or not this shape is visible.","If *legendonly*, the shape is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether or not this","shape is shown in the legend."].join(" ")},legend:s({},u.legend,{editType:"calc+arraydraw",description:["Sets the reference to a legend to show this shape in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")}),legendgroup:s({},u.legendgroup,{editType:"calc+arraydraw",description:["Sets the legend group for this shape.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")}),legendgrouptitle:{text:s({},u.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:i({editType:"calc+arraydraw",description:["Sets this legend group's title font."].join(" ")}),editType:"calc+arraydraw"},legendrank:s({},u.legendrank,{editType:"calc+arraydraw",description:["Sets the legend rank for this shape.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items.","When having unranked or equal rank items shapes would be displayed after traces","i.e. according to their order in data and layout."].join(" ")}),legendwidth:s({},u.legendwidth,{editType:"calc+arraydraw",description:"Sets the width (in px or fraction) of the legend for this shape."}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw",description:["Specifies the shape type to be drawn.","If *line*, a line is drawn from (`x0`,`y0`) to (`x1`,`y1`)","with respect to the axes' sizing mode.","If *circle*, a circle is drawn from","((`x0`+`x1`)/2, (`y0`+`y1`)/2))","with radius","(|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|)","with respect to the axes' sizing mode.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`)","with respect to the axes' sizing mode.","If *path*, draw a custom SVG path using `path`.","with respect to the axes' sizing mode."].join(" ")},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw",description:["Specifies whether shapes are drawn below gridlines (*below*),","between gridlines and traces (*between*) or above traces (*above*)."].join(" ")},xref:s({},n.xref,{description:["Sets the shape's x coordinate axis.",c.axisRefDescription("x","left","right")].join(" ")}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the x axis.","If set to *scaled*, `x0`, `x1` and x coordinates within `path` refer to","data values on the x axis or a fraction of the plot area's width","(`xref` set to *paper*).","If set to *pixel*, `xanchor` specifies the x position in terms","of data or plot fraction but `x0`, `x1` and x coordinates within `path`","are pixels relative to `xanchor`. This way, the shape can have","a fixed width while maintaining a position relative to data or","plot fraction."].join(" ")},xanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `xsizemode` set to *pixel*.","Specifies the anchor point on the x axis to which `x0`, `x1`","and x coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `xsizemode` not set to *pixel*."].join(" ")},x0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting x position.","See `type` and `xsizemode` for more info."].join(" ")},x1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end x position.","See `type` and `xsizemode` for more info."].join(" ")},yref:s({},n.yref,{description:["Sets the shape's y coordinate axis.",c.axisRefDescription("y","bottom","top")].join(" ")}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the y axis.","If set to *scaled*, `y0`, `y1` and y coordinates within `path` refer to","data values on the y axis or a fraction of the plot area's height","(`yref` set to *paper*).","If set to *pixel*, `yanchor` specifies the y position in terms","of data or plot fraction but `y0`, `y1` and y coordinates within `path`","are pixels relative to `yanchor`. This way, the shape can have","a fixed height while maintaining a position relative to data or","plot fraction."].join(" ")},yanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `ysizemode` set to *pixel*.","Specifies the anchor point on the y axis to which `y0`, `y1`","and y coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `ysizemode` not set to *pixel*."].join(" ")},y0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting y position.","See `type` and `ysizemode` for more info."].join(" ")},y1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end y position.","See `type` and `ysizemode` for more info."].join(" ")},path:{valType:"string",editType:"calc+arraydraw",description:["For `type` *path* - a valid SVG path with the pixel values","replaced by data values in `xsizemode`/`ysizemode` being *scaled*","and taken unmodified as pixels relative to `xanchor` and `yanchor`","in case of *pixel* size mode.","There are a few restrictions / quirks","only absolute instructions, not relative. So the allowed segments","are: M, L, H, V, Q, C, T, S, and Z","arcs (A) are not allowed because radius rx and ry are relative.","In the future we could consider supporting relative commands,","but we would have to decide on how to handle date and log axes.","Note that even as is, Q and C Bezier paths that are smooth on","linear axes may not be smooth on log, and vice versa.",'no chained "polybezier" commands - specify the segment type for',"each one.","On category axes, values are numbers scaled to the serial numbers","of categories because using the categories themselves there would","be no way to describe fractional positions","On data axes: because space and T are both normal components of path","strings, we can't use either to separate date from time parts.","Therefore we'll use underscore for this purpose:","2015-02-21_13:45:56.789"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the shape."},line:{color:s({},o.color,{editType:"arraydraw"}),width:s({},o.width,{editType:"calc+arraydraw"}),dash:s({},a,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color filling the shape's interior. Only applies to closed shapes."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw",description:["Determines which regions of complex paths constitute the interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether the shape could be activated for edit or not.","Has no effect when the older editable shapes mode is enabled via","`config.editable` or `config.edits.shapePosition`."].join(" ")},label:{text:{valType:"string",dflt:"",editType:"arraydraw",description:["Sets the text to display with shape.","It is also used for legend item if `name` is not provided."].join(" ")},texttemplate:h({},{keys:Object.keys(d)}),font:i({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the shape label text font."}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw",description:["Sets the position of the label text relative to the shape.","Supported values for rectangles, circles and paths are","*top left*, *top center*, *top right*, *middle left*,","*middle center*, *middle right*, *bottom left*, *bottom center*,","and *bottom right*.","Supported values for lines are *start*, *middle*, and *end*.","Default: *middle center* for rectangles, circles, and paths; *middle* for lines."].join(" ")},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw",description:["Sets the angle at which the label text is drawn","with respect to the horizontal. For lines, angle *auto*","is the same angle as the line. For all other shapes,","angle *auto* is horizontal."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the label's horizontal position anchor","This anchor binds the specified `textposition` to the *left*, *center*","or *right* of the label text.","For example, if `textposition` is set to *top right* and","`xanchor` to *right* then the right-most portion of the","label text lines up with the right-most edge of the","shape."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw",description:["Sets the label's vertical position anchor","This anchor binds the specified `textposition` to the *top*, *middle*","or *bottom* of the label text.","For example, if `textposition` is set to *top right* and","`yanchor` to *top* then the top-most portion of the","label text lines up with the top-most edge of the","shape."].join(" ")},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw",description:"Sets padding (in px) between edge of label and edge of shape."},editType:"arraydraw"},editType:"arraydraw"})},37358:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(6583),a=r(23223);function s(t){return c(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function l(t){return c(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function c(t,e,r,i,s,l){var c=t/2,u=l;if("pixel"===e){var h=s?a.extractPathCoords(s,l?o.paramIsY:o.paramIsX):[r,i],d=n.aggNums(Math.max,null,h),f=n.aggNums(Math.min,null,h),p=f<0?Math.abs(f)+c:c,m=d>0?d+c:c;return{ppad:c,ppadplus:u?p:m,ppadminus:u?m:p}}return{ppad:c}}function u(t,e,r,n,i){var s="category"===t.type||"multicategory"===t.type?t.r2c:t.d2c;if(void 0!==e)return[s(e),s(r)];if(n){var l,c,u,h,d=1/0,f=-1/0,p=n.match(o.segmentRE);for("date"===t.type&&(s=a.decodeDate(s)),l=0;lf&&(f=h)));return f>=d?[d,f]:void 0}}t.exports=function(t){var e=t._fullLayout,r=n.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var a=0;a{"use strict";t.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},12138:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(35677),a=r(39677),s=r(23223);function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}if(e._isShape=!0,o("visible")){o("showlegend")&&(o("legend"),o("legendwidth"),o("legendgroup"),o("legendgrouptitle.text"),n.coerceFont(o,"legendgrouptitle.font"),o("legendrank"));var l=o("path"),c=o("type",l?"path":"rect"),u="path"!==c;u&&delete e.path,o("editable"),o("layer"),o("opacity"),o("fillcolor"),o("fillrule"),o("line.width")&&(o("line.color"),o("line.dash"));for(var h=o("xsizemode"),d=o("ysizemode"),f=["x","y"],p=0;p<2;p++){var m,g,v,b=f[p],y=b+"anchor",x="x"===b?h:d,_={_fullLayout:r},w=i.coerceRef(t,e,_,b,void 0,"paper");if("range"===i.getRefType(w)?((m=i.getFromId(_,w))._shapeIndices.push(e._index),v=s.rangeToShapePosition(m),g=s.shapePositionToRange(m)):g=v=n.identity,u){var k=b+"0",A=b+"1",M=t[k],T=t[A];t[k]=g(t[k],!0),t[A]=g(t[A],!0),"pixel"===x?(o(k,0),o(A,10)):(i.coercePosition(e,_,o,w,k,.25),i.coercePosition(e,_,o,w,A,.75)),e[k]=v(e[k]),e[A]=v(e[A]),t[k]=M,t[A]=T}if("pixel"===x){var S=t[y];t[y]=g(t[y],!0),i.coercePosition(e,_,o,w,y,.25),e[y]=v(e[y]),t[y]=S}}u&&n.noneOrAll(t,e,["x0","x1","y0","y1"]);var C,E,L="line"===c;if(u&&(C=o("label.texttemplate")),C||(E=o("label.text")),E||C){o("label.textangle");var z=o("label.textposition",L?"middle":"middle center");o("label.xanchor"),o("label.yanchor",function(t,e){return t?"bottom":-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle"}(L,z)),o("label.padding"),n.coerceFont(o,"label.font",r.font)}}}t.exports=function(t,e){o(t,e,{name:"shapes",handleItemDefaults:l})}},64620:(t,e,r)=>{"use strict";var n=r(12822),i=r(75815),o=r(80394),a=r(40666),s=r(59952).readPaths,l=r(23223),c=l.getPathString,u=r(12086),h=r(89701).FROM_TL;t.exports=function(t,e,r,d){if(d.selectAll(".shape-label").remove(),r.label.text||r.label.texttemplate){var f;if(r.label.texttemplate){var p={};if("path"!==r.type){var m=i.getFromId(t,r.xref),g=i.getFromId(t,r.yref);for(var v in u){var b=u[v](r,m,g);void 0!==b&&(p[v]=b)}}f=n.texttemplateStringForShapes(r.label.texttemplate,{},t._fullLayout._d3locale,p)}else f=r.label.text;var y,x,_,w,k={"data-index":e},A=r.label.font,M=d.append("g").attr(k).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(f);if(r.path){var T=c(t,r),S=s(T,t);y=1/0,_=1/0,x=-1/0,w=-1/0;for(var C=0;C=t?e-n:n-e,-180/Math.PI*Math.atan2(i,o)}(y,_,x,w):0),M.call((function(e){return e.call(a.font,A).attr({}),o.convertToTspans(e,t),e}));var U=function(t,e,r,n,i,o,a){var s,l,c,u,d=i.label.textposition,f=i.label.textangle,p=i.label.padding,m=i.type,g=Math.PI/180*o,v=Math.sin(g),b=Math.cos(g),y=i.label.xanchor,x=i.label.yanchor;if("line"===m){"start"===d?(s=t,l=e):"end"===d?(s=r,l=n):(s=(t+r)/2,l=(e+n)/2),"auto"===y&&(y="start"===d?"auto"===f?r>t?"left":rt?"right":rt?"right":rt?"left":r{"use strict";var n=r(12822).strTranslate,i=r(19846),o=r(14295),a=o.drawMode,s=o.selectMode,l=r(25059),c=r(17499),u=r(81436),h=u.i000,d=u.i090,f=u.i180,p=u.i270,m=r(8867).clearOutlineControllers,g=r(59952),v=g.pointsOnRectangle,b=g.pointsOnEllipse,y=g.writePaths,x=r(81941).newShapes,_=r(81941).createShapeObj,w=r(63750),k=r(64620);function A(t,e){var r,n,i,o=t[e][1],a=t[e][2],s=t.length;return n=t[r=(e+1)%s][1],i=t[r][2],n===o&&i===a&&(n=t[r=(e+2)%s][1],i=t[r][2]),[r,n,i]}t.exports=function t(e,r,o,u){u||(u=0);var g=o.gd;function M(){t(e,r,o,u++),(b(e[0])||o.hasText)&&T({redrawing:!0})}function T(t){var e={};void 0!==o.isActiveShape&&(o.isActiveShape=!1,e=x(r,o)),void 0!==o.isActiveSelection&&(o.isActiveSelection=!1,e=w(r,o),g._fullLayout._reselect=!0),Object.keys(e).length&&l.call((t||{}).redrawing?"relayout":"_guiRelayout",g,e)}var S,C,E,L,z,O=g._fullLayout._zoomlayer,D=o.dragmode,I=a(D),R=s(D);if((I||R)&&(g._fullLayout._outlining=!0),m(g),r.attr("d",y(e)),u||!o.isActiveShape&&!o.isActiveSelection||(z=function(t,e){for(var r=0;r1&&(2!==t.length||"Z"!==t[1][0])&&(0===L&&(t[0][0]="M"),e[E]=t,M(),T())}}()}}function G(t,r){!function(t,r){if(e.length)for(var n=0;n{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=r(75815),s=r(59952).readPaths,l=r(49244),c=r(64620),u=r(8867).clearOutlineControllers,h=r(17499),d=r(40666),f=r(46121).arrayEditor,p=r(19846),m=r(76292),g=r(6583),v=r(23223),b=v.getPathString;function y(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove(),e._shapeUpperLayer.selectAll("text").remove(),e._shapeLowerLayer.selectAll("text").remove(),e._plots){var n=e._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var i=0;i_?(T=f,L="y0",S=_,z="y1"):(T=_,L="y1",S=f,z="y0"),tt(n),nt(l,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l="";"paper"===n||o.autorange||(l+=n),"paper"===i||s.autorange||(l+=i),d.setClipUrl(t,l?"clip"+r._fullLayout._uid+l:null,r)}(e,r,t),Q.moveFn="move"===R?et:rt,Q.altKey=n.altKey)},doneFn:function(){x(t)||(m(e),it(l),k(e,t,r),i.call("_guiRelayout",t,u.getUpdateObj()))},clickFn:function(){x(t)||it(l)}};function tt(r){if(x(t))R=null;else if(B)R="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=Q.element.getBoundingClientRect(),i=n.right-n.left,o=n.bottom-n.top,a=r.clientX-n.left,s=r.clientY-n.top,l=!U&&i>F&&o>P&&!r.shiftKey?p.getCursor(a/i,1-s/o):"move";m(e,l),R=l.split("-")[0]}}function et(n,i){if("path"===r.type){var o=function(t){return t},a=o,u=o;N?G("xanchor",r.xanchor=$(w+n)):(a=function(t){return $(Z(t)+n)},H&&"date"===H.type&&(a=v.encodeDate(a))),j?G("yanchor",r.yanchor=J(M+i)):(u=function(t){return J(X(t)+i)},q&&"date"===q.type&&(u=v.encodeDate(u))),G("path",r.path=A(I,a,u))}else N?G("xanchor",r.xanchor=$(w+n)):(G("x0",r.x0=$(h+n)),G("x1",r.x1=$(y+n))),j?G("yanchor",r.yanchor=J(M+i)):(G("y0",r.y0=J(f+i)),G("y1",r.y1=J(_+i)));e.attr("d",b(t,r)),nt(l,r),c(t,s,r,V)}function rt(n,i){if(U){var o=function(t){return t},a=o,u=o;N?G("xanchor",r.xanchor=$(w+n)):(a=function(t){return $(Z(t)+n)},H&&"date"===H.type&&(a=v.encodeDate(a))),j?G("yanchor",r.yanchor=J(M+i)):(u=function(t){return J(X(t)+i)},q&&"date"===q.type&&(u=v.encodeDate(u))),G("path",r.path=A(I,a,u))}else if(B){if("resize-over-start-point"===R){var d=h+n,p=j?f-i:f+i;G("x0",r.x0=N?d:$(d)),G("y0",r.y0=j?p:J(p))}else if("resize-over-end-point"===R){var m=y+n,g=j?_-i:_+i;G("x1",r.x1=N?m:$(m)),G("y1",r.y1=j?g:J(g))}}else{var x=function(t){return-1!==R.indexOf(t)},k=x("n"),W=x("s"),Y=x("w"),K=x("e"),Q=k?T+i:T,tt=W?S+i:S,et=Y?C+n:C,rt=K?E+n:E;j&&(k&&(Q=T-i),W&&(tt=S-i)),(!j&&tt-Q>P||j&&Q-tt>P)&&(G(L,r[L]=j?Q:J(Q)),G(z,r[z]=j?tt:J(tt))),rt-et>F&&(G(O,r[O]=N?et:$(et)),G(D,r[D]=N?rt:$(rt)))}e.attr("d",b(t,r)),nt(l,r),c(t,s,r,V)}function nt(t,e){(N||j)&&function(){var r="path"!==e.type,n=t.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var i=Z(N?e.xanchor:o.midRange(r?[e.x0,e.x1]:v.extractPathCoords(e.path,g.paramIsX))),a=X(j?e.yanchor:o.midRange(r?[e.y0,e.y1]:v.extractPathCoords(e.path,g.paramIsY)));if(i=v.roundPositionForSharpStrokeRendering(i,1),a=v.roundPositionForSharpStrokeRendering(a,1),N&&j){var s="M"+(i-1-1)+","+(a-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(N){var l="M"+(i-1-1)+","+(a-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var c="M"+(i-9-1)+","+(a-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function it(t){t.selectAll(".visual-cue").remove()}p.init(Q),K.node().onmousemove=tt}(t,P,u,e,r,R):!0===u.editable&&P.style("pointer-events",D||h.opacity(E)*C<=.5?"stroke":"all");P.node().addEventListener("click",(function(){return function(t,e){if(_(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void M(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=M,y(t)}}}(t,P)}))}u._input&&!0===u.visible&&("above"===u.layer?T(t._fullLayout._shapeUpperLayer):"paper"===u.xref||"paper"===u.yref?T(t._fullLayout._shapeLowerLayer):"between"===u.layer?T(w.shapelayerBetween):w._hadPlotinfo?T((w.mainplotinfo||w).shapelayer):T(t._fullLayout._shapeLowerLayer))}function k(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");d.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function A(t,e,r){return t.replace(g.segmentRE,(function(t){var n=0,i=t.charAt(0),o=g.paramIsX[i],a=g.paramIsY[i],s=g.numParams[i];return i+t.substr(1).replace(g.paramRE,(function(t){return n>=s||(o[n]?t=e(t):a[n]&&(t=r(t)),n++),t}))}))}function M(t){_(t)&&t._fullLayout._activeShapeIndex>=0&&(u(t),delete t._fullLayout._activeShapeIndex,y(t))}t.exports={draw:y,drawOne:w,eraseActiveShape:function(t){if(_(t)){u(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e{"use strict";var n=r(62309).overrideAll,i=r(3520),o=r(75058),a=r(68057).T,s=r(98260).extendFlat,l=r(24131).LF,c=r(12086);t.exports=n({newshape:{visible:s({},i.visible,{description:["Determines whether or not new shape is visible.","If *legendonly*, the shape is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")}),showlegend:{valType:"boolean",dflt:!1,description:["Determines whether or not new","shape is shown in the legend."].join(" ")},legend:s({},i.legend,{description:["Sets the reference to a legend to show new shape in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")}),legendgroup:s({},i.legendgroup,{description:["Sets the legend group for new shape.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")}),legendgrouptitle:{text:s({},i.legendgrouptitle.text,{}),font:o({description:["Sets this legend group's title font."].join(" ")})},legendrank:s({},i.legendrank,{description:["Sets the legend rank for new shape.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items."].join(" ")}),legendwidth:s({},i.legendwidth,{description:"Sets the width (in px or fraction) of the legend for new shape."}),line:{color:{valType:"color",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:0,dflt:4,description:"Sets the line width (in px)."},dash:s({},a,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:["Sets the color filling new shapes' interior.","Please note that if using a fillcolor with alpha greater than half,","drag inside the active shape starts moving the shape underneath,","otherwise a new shape could be started over."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",description:["Determines the path's interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:"Sets the opacity of new shapes."},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",description:["Specifies whether new shapes are drawn below gridlines (*below*),","between gridlines and traces (*between*) or above traces (*above*)."].join(" ")},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",description:["When `dragmode` is set to *drawrect*, *drawline* or *drawcircle*","this limits the drag to be horizontal, vertical or diagonal.","Using *diagonal* there is no limit e.g. in drawing lines in any direction.","*ortho* limits the draw to be either horizontal or vertical.","*horizontal* allows horizontal extend.","*vertical* allows vertical extend."].join(" ")},name:s({},i.name,{description:["Sets new shape name.","The name appears as the legend item."].join(" ")}),label:{text:{valType:"string",dflt:"",description:["Sets the text to display with the new shape.","It is also used for legend item if `name` is not provided."].join(" ")},texttemplate:l({newshape:!0},{keys:Object.keys(c)}),font:o({description:"Sets the new shape label text font."}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],description:["Sets the position of the label text relative to the new shape.","Supported values for rectangles, circles and paths are","*top left*, *top center*, *top right*, *middle left*,","*middle center*, *middle right*, *bottom left*, *bottom center*,","and *bottom right*.","Supported values for lines are *start*, *middle*, and *end*.","Default: *middle center* for rectangles, circles, and paths; *middle* for lines."].join(" ")},textangle:{valType:"angle",dflt:"auto",description:["Sets the angle at which the label text is drawn","with respect to the horizontal. For lines, angle *auto*","is the same angle as the line. For all other shapes,","angle *auto* is horizontal."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",description:["Sets the label's horizontal position anchor","This anchor binds the specified `textposition` to the *left*, *center*","or *right* of the label text.","For example, if `textposition` is set to *top right* and","`xanchor` to *right* then the right-most portion of the","label text lines up with the right-most edge of the","new shape."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets the label's vertical position anchor","This anchor binds the specified `textposition` to the *top*, *middle*","or *bottom* of the label text.","For example, if `textposition` is set to *top right* and","`yanchor` to *top* then the top-most portion of the","label text lines up with the top-most edge of the","new shape."].join(" ")},padding:{valType:"number",dflt:3,min:0,description:"Sets padding (in px) between edge of label and edge of new shape."}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,description:"Sets the opacity of the active shape."}}},"none","from-root")},81436:t=>{"use strict";t.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},24815:(t,e,r)=>{"use strict";var n=r(17499),i=r(12822);t.exports=function(t,e,r){if(r("newshape.visible"),r("newshape.name"),r("newshape.showlegend"),r("newshape.legend"),r("newshape.legendwidth"),r("newshape.legendgroup"),r("newshape.legendgrouptitle.text"),i.coerceFont(r,"newshape.legendgrouptitle.font"),r("newshape.legendrank"),r("newshape.drawdirection"),r("newshape.layer"),r("newshape.fillcolor"),r("newshape.fillrule"),r("newshape.opacity"),r("newshape.line.width")){var o=(t||{}).plot_bgcolor||"#FFF";r("newshape.line.color",n.contrast(o)),r("newshape.line.dash")}var a="drawline"===t.dragmode,s=r("newshape.label.text"),l=r("newshape.label.texttemplate");if(s||l){r("newshape.label.textangle");var c=r("newshape.label.textposition",a?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",function(t,e){return t?"bottom":-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle"}(a,c)),r("newshape.label.padding"),i.coerceFont(r,"newshape.label.font",e.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}},59952:(t,e,r)=>{"use strict";var n=r(37974),i=r(81436),o=i.CIRCLE_SIDES,a=i.SQRT2,s=r(38554),l=s.p2r,c=s.r2p,u=[0,3,4,5,6,1,2],h=[0,3,4,1,2];function d(t,e){return Math.abs(t-e)<=1e-6}function f(t,e){var r=e[1]-t[1],n=e[2]-t[2];return Math.sqrt(r*r+n*n)}e.writePaths=function(t){var e=t.length;if(!e)return"M0,0Z";for(var r="",n=0;n0&&l{"use strict";var n=r(14295),i=n.drawMode,o=n.openMode,a=r(81436),s=a.i000,l=a.i090,c=a.i180,u=a.i270,h=a.cos45,d=a.sin45,f=r(38554),p=f.p2r,m=f.r2p,g=r(8867).clearOutline,v=r(59952),b=v.readPaths,y=v.writePaths,x=v.ellipseOver,_=v.fixDatesForPaths;function w(t,e,r){var n,i=t[0][0],a=e.gd,f=i.getAttribute("d"),g=a._fullLayout.newshape,v=e.plotinfo,w=e.isActiveShape,k=v.xaxis,A=v.yaxis,M=!!v.domain||!v.xaxis,T=!!v.domain||!v.yaxis,S=o(r),C=b(f,a,v,w),E={editable:!0,visible:g.visible,name:g.name,showlegend:g.showlegend,legend:g.legend,legendwidth:g.legendwidth,legendgroup:g.legendgroup,legendgrouptitle:{text:g.legendgrouptitle.text,font:g.legendgrouptitle.font},legendrank:g.legendrank,label:g.label,xref:M?"paper":k._id,yref:T?"paper":A._id,layer:g.layer,opacity:g.opacity,line:{color:g.line.color,width:g.line.width,dash:g.line.dash}};if(S||(E.fillcolor=g.fillcolor,E.fillrule=g.fillrule),1===C.length&&(n=C[0]),n&&5===n.length&&"drawrect"===r)E.type="rect",E.x0=n[0][1],E.y0=n[0][2],E.x1=n[2][1],E.y1=n[2][2];else if(n&&"drawline"===r)E.type="line",E.x0=n[0][1],E.y0=n[0][2],E.x1=n[1][1],E.y1=n[1][2];else if(n&&"drawcircle"===r){E.type="circle";var L=n[s][1],z=n[l][1],O=n[c][1],D=n[u][1],I=n[s][2],R=n[l][2],F=n[c][2],P=n[u][2],N=v.xaxis&&("date"===v.xaxis.type||"log"===v.xaxis.type),j=v.yaxis&&("date"===v.yaxis.type||"log"===v.yaxis.type);N&&(L=m(v.xaxis,L),z=m(v.xaxis,z),O=m(v.xaxis,O),D=m(v.xaxis,D)),j&&(I=m(v.yaxis,I),R=m(v.yaxis,R),F=m(v.yaxis,F),P=m(v.yaxis,P));var B=(z+D)/2,U=(I+F)/2,G=x({x0:B,y0:U,x1:B+(D-z+O-L)/2*h,y1:U+(P-R+F-I)/2*d});N&&(G.x0=p(v.xaxis,G.x0),G.x1=p(v.xaxis,G.x1)),j&&(G.y0=p(v.yaxis,G.y0),G.y1=p(v.yaxis,G.y1)),E.x0=G.x0,E.y0=G.y0,E.x1=G.x1,E.y1=G.y1}else E.type="path",k&&A&&_(C,k,A),E.path=y(C),n=null;return E}t.exports={newShapes:function(t,e){if(t.length&&t[0][0]){var r=e.gd,n=e.isActiveShape,o=e.dragmode,a=(r.layout||{}).shapes||[];if(!i(o)&&void 0!==n){var s=r._fullLayout._activeShapeIndex;if(s{"use strict";t.exports={clearOutlineControllers:function(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".outline-controllers").remove()},clearOutline:function(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".select-outline").remove(),t._fullLayout._outlining=!1}}},23223:(t,e,r)=>{"use strict";var n=r(6583),i=r(12822),o=r(75815);e.rangeToShapePosition=function(t){return"log"===t.type?t.r2d:function(t){return t}},e.shapePositionToRange=function(t){return"log"===t.type?t.d2r:function(t){return t}},e.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},e.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},e.extractPathCoords=function(t,e,r){var o=[];return t.match(n.segmentRE).forEach((function(t){var a=e[t.charAt(0)].drawn;if(void 0!==a){var s=t.substr(1).match(n.paramRE);if(s&&!(s.lengthf&&(t="X"),t}));return o>f&&(p=p.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+t)),u+p}))}(r,s,c);if("pixel"===r.xsizemode){var x=s(r.xanchor);u=x+r.x0,h=x+r.x1}else u=s(r.x0),h=s(r.x1);if("pixel"===r.ysizemode){var _=c(r.yanchor);d=_-r.y0,f=_-r.y1}else d=c(r.y0),f=c(r.y1);if("line"===p)return"M"+u+","+d+"L"+h+","+f;if("rect"===p)return"M"+u+","+d+"H"+h+"V"+f+"H"+u+"Z";var w=(u+h)/2,k=(d+f)/2,A=Math.abs(w-u),M=Math.abs(k-d),T="A"+A+","+M,S=w+A+","+k;return"M"+S+T+" 0 1,1 "+w+","+(k-M)+T+" 0 0,1 "+S+"Z"}},60166:(t,e,r)=>{"use strict";var n=r(71422);t.exports={moduleType:"component",name:"shapes",layoutAttributes:r(39677),supplyLayoutDefaults:r(12138),supplyDrawNewShapeDefaults:r(24815),includeBasePlot:r(39859)("shapes"),calcAutorange:r(37358),draw:n.draw,drawOne:n.drawOne}},12086:t=>{"use strict";function e(t,e){return e?e.d2l(t):t}function r(t,e){return e?e.l2d(t):t}function n(t,r){return e(t.x1,r)-e(t.x0,r)}function i(t,r,n){return e(t.y1,n)-e(t.y0,n)}t.exports={x0:function(t){return t.x0},x1:function(t){return t.x1},y0:function(t){return t.y0},y1:function(t){return t.y1},slope:function(t,e,r){return"line"!==t.type?void 0:i(t,0,r)/n(t,e)},dx:n,dy:i,width:function(t,e){return Math.abs(n(t,e))},height:function(t,e,r){return Math.abs(i(t,0,r))},length:function(t,e,r){return"line"!==t.type?void 0:Math.sqrt(Math.pow(n(t,e),2)+Math.pow(i(t,0,r),2))},xcenter:function(t,n){return r((e(t.x1,n)+e(t.x0,n))/2,n)},ycenter:function(t,n,i){return r((e(t.y1,i)+e(t.y0,i))/2,i)}}},8421:(t,e,r)=>{"use strict";var n=r(75058),i=r(85538),o=r(98260).extendDeepAll,a=r(62309).overrideAll,s=r(46367),l=r(46121).templatedArray,c=r(92911),u=l("step",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not this step is included in the slider."].join(" ")},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called when the slider value is changed.","If the `skip` method is used, the API slider will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","slider events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on slide."].join(" ")},label:{valType:"string",description:"Sets the text label to appear on the slider"},value:{valType:"string",description:["Sets the value of the slider step, used to refer to the step programatically.","Defaults to the slider label if not provided."].join(" ")},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_sliderchange` method and executing the API command manually without losing","the benefit of the slider automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}});t.exports=a(l("slider",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not the slider is visible."].join(" ")},active:{valType:"number",min:0,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this slider length","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the slider","This measure excludes the padding of both ends.","That is, the slider's length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the x position (in normalized coordinates) of the slider."},pad:o(i({editType:"arraydraw"}),{description:"Set the padding of the slider component along each side."},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",description:["Sets the slider's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the y position (in normalized coordinates) of the slider."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the slider's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},transition:{duration:{valType:"number",min:0,dflt:150,description:"Sets the duration of the slider transition"},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out",description:"Sets the easing function of the slider transition"}},currentvalue:{visible:{valType:"boolean",dflt:!0,description:["Shows the currently-selected value above the slider."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",description:["The alignment of the value readout relative to the length of the slider."].join(" ")},offset:{valType:"number",dflt:10,description:["The amount of space, in pixels, between the current value label","and the slider."].join(" ")},prefix:{valType:"string",description:"When currentvalue.visible is true, this sets the prefix of the label."},suffix:{valType:"string",description:"When currentvalue.visible is true, this sets the suffix of the label."},font:n({description:"Sets the font of the current value label text."})},font:n({description:"Sets the font of the slider step labels."}),activebgcolor:{valType:"color",dflt:c.gripBgActiveColor,description:["Sets the background color of the slider grip","while dragging."].join(" ")},bgcolor:{valType:"color",dflt:c.railBgColor,description:"Sets the background color of the slider."},bordercolor:{valType:"color",dflt:c.railBorderColor,description:"Sets the color of the border enclosing the slider."},borderwidth:{valType:"number",min:0,dflt:c.railBorderWidth,description:"Sets the width (in px) of the border enclosing the slider."},ticklen:{valType:"number",min:0,dflt:c.tickLength,description:"Sets the length in pixels of step tick marks"},tickcolor:{valType:"color",dflt:c.tickColor,description:"Sets the color of the border enclosing the slider."},tickwidth:{valType:"number",min:0,dflt:1,description:"Sets the tick width (in px)."},minorticklen:{valType:"number",min:0,dflt:c.minorTickLength,description:"Sets the length in pixels of minor step tick marks"}}),"arraydraw","from-root")},92911:t=>{"use strict";t.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},60626:(t,e,r)=>{"use strict";var n=r(12822),i=r(35677),o=r(8421),a=r(92911).name,s=o.steps;function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}for(var s=i(t,e,{name:"steps",handleItemDefaults:c}),l=0,u=0;u{"use strict";var n=r(27941),i=r(51137),o=r(17499),a=r(40666),s=r(12822),l=s.strTranslate,c=r(80394),u=r(46121).arrayEditor,h=r(92911),d=r(89701),f=d.LINE_SPACING,p=d.FROM_TL,m=d.FROM_BR;function g(t){return h.autoMarginIdRoot+t._index}function v(t){return t._index}function b(t,e){var r=a.tester.selectAll("g."+h.labelGroupClass).data(e._visibleSteps);r.enter().append("g").classed(h.labelGroupClass,!0);var o=0,l=0;r.each((function(t){var r=_(n.select(this),{step:t},e).node();if(r){var i=a.bBox(r);l=Math.max(l,i.height),o=Math.max(o,i.width)}})),r.remove();var u=e._dims={};u.inputAreaWidth=Math.max(h.railWidth,h.gripHeight);var d=t._fullLayout._size;u.lx=d.l+d.w*e.x,u.ly=d.t+d.h*(1-e.y),"fraction"===e.lenmode?u.outerLength=Math.round(d.w*e.len):u.outerLength=e.len,u.inputAreaStart=0,u.inputAreaLength=Math.round(u.outerLength-e.pad.l-e.pad.r);var f=(u.inputAreaLength-2*h.stepInset)/(e._stepCount-1),v=o+h.labelPadding;if(u.labelStride=Math.max(1,Math.ceil(v/f)),u.labelHeight=l,u.currentValueMaxWidth=0,u.currentValueHeight=0,u.currentValueTotalHeight=0,u.currentValueMaxLines=1,e.currentvalue.visible){var b=a.tester.append("g");r.each((function(t){var r=y(b,e,t.label),n=r.node()&&a.bBox(r.node())||{width:0,height:0},i=c.lineCount(r);u.currentValueMaxWidth=Math.max(u.currentValueMaxWidth,Math.ceil(n.width)),u.currentValueHeight=Math.max(u.currentValueHeight,Math.ceil(n.height)),u.currentValueMaxLines=Math.max(u.currentValueMaxLines,i)})),u.currentValueTotalHeight=u.currentValueHeight+e.currentvalue.offset,b.remove()}u.height=u.currentValueTotalHeight+h.tickOffset+e.ticklen+h.labelOffset+u.labelHeight+e.pad.t+e.pad.b;var x="left";s.isRightAnchor(e)&&(u.lx-=u.outerLength,x="right"),s.isCenterAnchor(e)&&(u.lx-=u.outerLength/2,x="center");var w="top";s.isBottomAnchor(e)&&(u.ly-=u.height,w="bottom"),s.isMiddleAnchor(e)&&(u.ly-=u.height/2,w="middle"),u.outerLength=Math.ceil(u.outerLength),u.height=Math.ceil(u.height),u.lx=Math.round(u.lx),u.ly=Math.round(u.ly);var k={y:e.y,b:u.height*m[w],t:u.height*p[w]};"fraction"===e.lenmode?(k.l=0,k.xl=e.x-e.len*p[x],k.r=0,k.xr=e.x+e.len*m[x]):(k.x=e.x,k.l=u.outerLength*p[x],k.r=u.outerLength*m[x]),i.autoMargin(t,g(e),k)}function y(t,e,r){if(e.currentvalue.visible){var n,i,o=e._dims;switch(e.currentvalue.xanchor){case"right":n=o.inputAreaLength-h.currentValueInset-o.currentValueMaxWidth,i="left";break;case"center":n=.5*o.inputAreaLength,i="middle";break;default:n=h.currentValueInset,i="left"}var l=s.ensureSingle(t,"text",h.labelClass,(function(t){t.attr({"text-anchor":i,"data-notex":1})})),u=e.currentvalue.prefix?e.currentvalue.prefix:"";if("string"==typeof r)u+=r;else{var d=e.steps[e.active].label,p=e._gd._fullLayout._meta;p&&(d=s.templateString(d,p)),u+=d}e.currentvalue.suffix&&(u+=e.currentvalue.suffix),l.call(a.font,e.currentvalue.font).text(u).call(c.convertToTspans,e._gd);var m=c.lineCount(l),g=(o.currentValueMaxLines+1-m)*e.currentvalue.font.size*f;return c.positionText(l,n,g),l}}function x(t,e,r){s.ensureSingle(t,"rect",h.gripRectClass,(function(n){n.call(M,e,t,r).style("pointer-events","all")})).attr({width:h.gripWidth,height:h.gripHeight,rx:h.gripRadius,ry:h.gripRadius}).call(o.stroke,r.bordercolor).call(o.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function _(t,e,r){var n=s.ensureSingle(t,"text",h.labelClass,(function(t){t.attr({"text-anchor":"middle","data-notex":1})})),i=e.step.label,o=r._gd._fullLayout._meta;return o&&(i=s.templateString(i,o)),n.call(a.font,r.font).text(i).call(c.convertToTspans,r._gd),n}function w(t,e){var r=s.ensureSingle(t,"g",h.labelsClass),i=e._dims,o=r.selectAll("g."+h.labelGroupClass).data(i.labelSteps);o.enter().append("g").classed(h.labelGroupClass,!0),o.exit().remove(),o.each((function(t){var r=n.select(this);r.call(_,t,e),a.setTranslate(r,C(e,t.fraction),h.tickOffset+e.ticklen+e.font.size*f+h.labelOffset+i.currentValueTotalHeight)}))}function k(t,e,r,n,i){var o=Math.round(n*(r._stepCount-1)),a=r._visibleSteps[o]._index;a!==r.active&&A(t,e,r,a,!0,i)}function A(t,e,r,n,o,a){var s=r.active;r.active=n,u(t.layout,h.name,r).applyUpdate("active",n);var l=r.steps[r.active];e.call(S,r,a),e.call(y,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:o,previousActive:s}),l&&l.method&&o&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=o,e._nextMethod.doTransition=a):(e._nextMethod={step:l,doCallback:o,doTransition:a},e._nextMethodRaf=window.requestAnimationFrame((function(){var r=e._nextMethod.step;r.method&&(r.execute&&i.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)}))))}function M(t,e,r){if(!e._context.staticPlot){var i=r.node(),a=n.select(e);t.on("mousedown",l),t.on("touchstart",l)}function s(){return r.data()[0]}function l(){var t=s();e.emit("plotly_sliderstart",{slider:t});var l=r.select("."+h.gripRectClass);n.event.stopPropagation(),n.event.preventDefault(),l.call(o.fill,t.activebgcolor);var c=E(t,n.mouse(i)[0]);function u(){var t=s(),o=E(t,n.mouse(i)[0]);k(e,r,t,o,!1)}function d(){var t=s();t._dragging=!1,l.call(o.fill,t.bgcolor),a.on("mouseup",null),a.on("mousemove",null),a.on("touchend",null),a.on("touchmove",null),e.emit("plotly_sliderend",{slider:t,step:t.steps[t.active]})}k(e,r,t,c,!0),t._dragging=!0,a.on("mousemove",u),a.on("touchmove",u),a.on("mouseup",d),a.on("touchend",d)}}function T(t,e){var r=t.selectAll("rect."+h.tickRectClass).data(e._visibleSteps),i=e._dims;r.enter().append("rect").classed(h.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each((function(t,r){var s=r%i.labelStride==0,l=n.select(this);l.attr({height:s?e.ticklen:e.minorticklen}).call(o.fill,e.tickcolor),a.setTranslate(l,C(e,r/(e._stepCount-1))-.5*e.tickwidth,(s?h.tickOffset:h.minorTickOffset)+i.currentValueTotalHeight)}))}function S(t,e,r){for(var n=t.select("rect."+h.gripRectClass),i=0,o=0;o0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform",l(a-.5*h.gripWidth,e._dims.currentValueTotalHeight))}}function C(t,e){var r=t._dims;return r.inputAreaStart+h.stepInset+(r.inputAreaLength-2*h.stepInset)*Math.min(1,Math.max(0,e))}function E(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-h.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*h.stepInset-2*r.inputAreaStart)))}function L(t,e,r){var n=r._dims,i=s.ensureSingle(t,"rect",h.railTouchRectClass,(function(n){n.call(M,e,t,r).style("pointer-events","all")}));i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,h.tickOffset+r.ticklen+n.labelHeight)}).call(o.fill,r.bgcolor).attr("opacity",0),a.setTranslate(i,0,n.currentValueTotalHeight)}function z(t,e){var r=e._dims,n=r.inputAreaLength-2*h.railInset,i=s.ensureSingle(t,"rect",h.railRectClass);i.attr({width:n,height:h.railWidth,rx:h.railRadius,ry:h.railRadius,"shape-rendering":"crispEdges"}).call(o.stroke,e.bordercolor).call(o.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),a.setTranslate(i,h.railInset,.5*(r.inputAreaWidth-h.railWidth)+r.currentValueTotalHeight)}t.exports=function(t){var e=t._context.staticPlot,r=t._fullLayout,o=function(t,e){for(var r=t[h.name],n=[],i=0;i0?[0]:[]);function l(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,g(e))}if(s.enter().append("g").classed(h.containerClassName,!0).style("cursor",e?null:"ew-resize"),s.exit().each((function(){n.select(this).selectAll("g."+h.groupClassName).each(l)})).remove(),0!==o.length){var c=s.selectAll("g."+h.groupClassName).data(o,v);c.enter().append("g").classed(h.groupClassName,!0),c.exit().each(l).remove();for(var u=0;u{"use strict";var n=r(92911);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(8421),supplyLayoutDefaults:r(60626),draw:r(23350)}},6883:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=r(51137),a=r(25059),s=r(12822),l=s.strTranslate,c=r(40666),u=r(17499),h=r(80394),d=r(11891),f=r(89701).OPPOSITE_SIDE,p=/ [XY][0-9]* /;t.exports={draw:function(t,e,r){var m,g=r.propContainer,v=r.propName,b=r.placeholder,y=r.traceIndex,x=r.avoid||{},_=r.attributes,w=r.transform,k=r.containerGroup,A=t._fullLayout,M=1,T=!1,S=g.title,C=(S&&S.text?S.text:"").trim(),E=S&&S.font?S.font:{},L=E.family,z=E.size,O=E.color,D=E.weight,I=E.style,R=E.variant;"title.text"===v?m="titleText":-1!==v.indexOf("axis")?m="axisTitleText":v.indexOf(!0)&&(m="colorbarTitleText");var F=t._context.edits[m];""===C?M=0:C.replace(p," % ")===b.replace(p," % ")&&(M=.2,T=!0,F||(C="")),r._meta?C=s.templateString(C,r._meta):A._meta&&(C=s.templateString(C,A._meta));var P,N=C||F;k||(k=s.ensureSingle(A._infolayer,"g","g-"+e),P=A._hColorbarMoveTitle);var j=k.selectAll("text").data(N?[0]:[]);if(j.enter().append("text"),j.text(C).attr("class",e),j.exit().remove(),!N)return k;function B(t){s.syncOrAsync([U,G],t)}function U(e){var r;return!w&&P&&(w={}),w?(r="",w.rotate&&(r+="rotate("+[w.rotate,_.x,_.y]+")"),(w.offset||P)&&(r+=l(0,(w.offset||0)-(P||0)))):r=null,e.attr("transform",r),e.style({"font-family":L,"font-size":n.round(z,2)+"px",fill:u.rgb(O),opacity:M*u.opacity(O),"font-weight":D,"font-style":I,"font-variant":R}).attr(_).call(h.convertToTspans,t),o.previousPromises(t)}function G(e){var r=n.select(e.node().parentNode);if(x&&x.selection&&x.side&&C){r.attr("transform",null);var o=f[x.side],a="left"===x.side||"top"===x.side?-1:1,u=i(x.pad)?x.pad:2,h=c.bBox(r.node()),d={t:0,b:0,l:0,r:0},p=t._fullLayout._reservedMargin;for(var m in p)for(var v in p[m]){var b=p[m][v];d[v]=Math.max(d[v],b)}var y={left:d.l,top:d.t,right:A.width-d.r,bottom:A.height-d.b},_=x.maxShift||a*(y[x.side]-h[x.side]),w=0;if(_<0)w=_;else{var k=x.offsetLeft||0,M=x.offsetTop||0;h.left-=k,h.right-=k,h.top-=M,h.bottom-=M,x.selection.each((function(){var t=c.bBox(this);s.bBoxIntersect(h,t,u)&&(w=Math.max(w,a*(t[x.side]-h[o])+u))})),w=Math.min(_,w),g._titleScoot=Math.abs(w)}if(w>0||_<0){var T={left:[-w,0],right:[w,0],top:[0,-w],bottom:[0,w]}[x.side];r.attr("transform",l(T[0],T[1]))}}}return j.call(B),F&&(C?j.on(".opacity",null):(M=0,T=!0,j.text(b).on("mouseover.opacity",(function(){n.select(this).transition().duration(d.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(d.HIDE_PLACEHOLDER).style("opacity",0)}))),j.call(h.makeEditable,{gd:t}).on("edit",(function(e){void 0!==y?a.call("_guiRestyle",t,v,e,y):a.call("_guiRelayout",t,v,e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(B)})).on("input",(function(t){this.text(t||" ").call(h.positionText,_.x,_.y)}))),j.classed("js-placeholder",T),k}}},40658:(t,e,r)=>{"use strict";var n=r(75058),i=r(84226),o=r(98260).extendFlat,a=r(62309).overrideAll,s=r(85538),l=r(46121).templatedArray,c=l("button",{visible:{valType:"boolean",description:"Determines whether or not this button is visible."},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called on click.","If the `skip` method is used, the API updatemenu will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","updatemenu events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on click."].join(" ")},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets a 2nd set of `args`,","these arguments values are passed to the Plotly","method set in `method` when clicking this button while in the active state.","Use this to create toggle buttons."].join(" ")},label:{valType:"string",dflt:"",description:"Sets the text label to appear on the button."},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_buttonclicked` method and executing the API command manually without losing","the benefit of the updatemenu automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}});t.exports=a(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean",description:["Determines whether or not the update menu is visible."].join(" ")},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown",description:["Determines whether the buttons are accessible via a dropdown menu","or whether the buttons are stacked horizontally or vertically"].join(" ")},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down",description:["Determines the direction in which the buttons are laid out, whether","in a dropdown menu or a row/column of buttons. For `left` and `up`,","the buttons will still appear in left-to-right or top-to-bottom order","respectively."].join(" ")},active:{valType:"integer",min:-1,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},showactive:{valType:"boolean",dflt:!0,description:"Highlights active dropdown item or active button if true."},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05,description:"Sets the x position (in normalized coordinates) of the update menu."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right",description:["Sets the update menu's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:1,description:"Sets the y position (in normalized coordinates) of the update menu."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the update menu's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},pad:o(s({editType:"arraydraw"}),{description:"Sets the padding around the buttons or dropdown menu."}),font:n({description:"Sets the font of the update menu button text."}),bgcolor:{valType:"color",description:"Sets the background color of the update menu buttons."},bordercolor:{valType:"color",dflt:i.borderLine,description:"Sets the color of the border enclosing the update menu."},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw",description:"Sets the width (in px) of the border enclosing the update menu."}}),"arraydraw","from-root")},13518:t=>{"use strict";t.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},42757:(t,e,r)=>{"use strict";var n=r(12822),i=r(35677),o=r(40658),a=r(13518).name,s=o.buttons;function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}a("visible",i(t,e,{name:"buttons",handleItemDefaults:c}).length>0)&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),n.noneOrAll(t,e,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),n.coerceFont(a,"font",r.font),a("bgcolor",r.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function c(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}t.exports=function(t,e){i(t,e,{name:a,handleItemDefaults:l})}},86925:(t,e,r)=>{"use strict";var n=r(27941),i=r(51137),o=r(17499),a=r(40666),s=r(12822),l=r(80394),c=r(46121).arrayEditor,u=r(89701).LINE_SPACING,h=r(13518),d=r(90633);function f(t){return t._index}function p(t,e){return+t.attr(h.menuIndexAttrName)===e._index}function m(t,e,r,n,i,o,a,s){e.active=a,c(t.layout,h.name,e).applyUpdate("active",a),"buttons"===e.type?v(t,n,null,null,e):"dropdown"===e.type&&(i.attr(h.menuIndexAttrName,"-1"),g(t,n,i,o,e),s||v(t,n,i,o,e))}function g(t,e,r,n,i){var o=s.ensureSingle(e,"g",h.headerClassName,(function(t){t.style("pointer-events","all")})),l=i._dims,c=i.active,u=i.buttons[c]||h.blankHeaderOpts,d={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},f={width:l.headerWidth,height:l.headerHeight};o.call(b,i,u,t).call(T,i,d,f),s.ensureSingle(e,"text",h.headerArrowClassName,(function(t){t.attr("text-anchor","end").call(a.font,i.font).text(h.arrowSymbol[i.direction])})).attr({x:l.headerWidth-h.arrowOffsetX+i.pad.l,y:l.headerHeight/2+h.textOffsetY+i.pad.t}),o.on("click",(function(){r.call(S,String(p(r,i)?-1:i._index)),v(t,e,r,n,i)})),o.on("mouseover",(function(){o.call(w)})),o.on("mouseout",(function(){o.call(k,i)})),a.setTranslate(e,l.lx,l.ly)}function v(t,e,r,o,a){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(h.menuIndexAttrName)}(r)&&"buttons"!==a.type?[]:a.buttons,c="dropdown"===a.type?h.dropdownButtonClassName:h.buttonClassName,u=r.selectAll("g."+c).data(s.filterVisible(l)),d=u.enter().append("g").classed(c,!0),f=u.exit();"dropdown"===a.type?(d.attr("opacity","0").transition().attr("opacity","1"),f.transition().attr("opacity","0").remove()):f.remove();var p=0,g=0,v=a._dims,y=-1!==["up","down"].indexOf(a.direction);"dropdown"===a.type&&(y?g=v.headerHeight+h.gapButtonHeader:p=v.headerWidth+h.gapButtonHeader),"dropdown"===a.type&&"up"===a.direction&&(g=-h.gapButtonHeader+h.gapButton-v.openHeight),"dropdown"===a.type&&"left"===a.direction&&(p=-h.gapButtonHeader+h.gapButton-v.openWidth);var x={x:v.lx+p+a.pad.l,y:v.ly+g+a.pad.t,yPad:h.gapButton,xPad:h.gapButton,index:0},A={l:x.x+a.borderwidth,t:x.y+a.borderwidth};u.each((function(s,l){var c=n.select(this);c.call(b,a,s,t).call(T,a,x),c.on("click",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&a.active===l?(m(t,a,0,e,r,o,-1),i.executeAPICommand(t,s.method,s.args2)):(m(t,a,0,e,r,o,l),i.executeAPICommand(t,s.method,s.args))),t.emit("plotly_buttonclicked",{menu:a,button:s,active:a.active}))})),c.on("mouseover",(function(){c.call(w)})),c.on("mouseout",(function(){c.call(k,a),u.call(_,a)}))})),u.call(_,a),y?(A.w=Math.max(v.openWidth,v.headerWidth),A.h=x.y-A.t):(A.w=x.x-A.l,A.h=Math.max(v.openHeight,v.headerHeight)),A.direction=a.direction,o&&(u.size()?function(t,e,r,n,i,o){var a,s,l,c=i.direction,u="up"===c||"down"===c,d=i._dims,f=i.active;if(u)for(s=0,l=0;l0?[0]:[]);if(a.enter().append("g").classed(h.containerClassName,!0).style("cursor","pointer"),a.exit().each((function(){n.select(this).selectAll("g."+h.headerGroupClassName).each(o)})).remove(),0!==r.length){var l=a.selectAll("g."+h.headerGroupClassName).data(r,f);l.enter().append("g").classed(h.headerGroupClassName,!0);for(var c=s.ensureSingle(a,"g",h.dropdownButtonGroupClassName,(function(t){t.style("pointer-events","all")})),u=0;u{"use strict";var n=r(13518);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(40658),supplyLayoutDefaults:r(42757),draw:r(86925)}},90633:(t,e,r)=>{"use strict";t.exports=s;var n=r(27941),i=r(17499),o=r(40666),a=r(12822);function s(t,e,r){this.gd=t,this.container=e,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}s.barWidth=2,s.barLength=20,s.barRadius=2,s.barPad=1,s.barColor="#808BA4",s.prototype.enable=function(t,e,r){var a=this.gd._fullLayout,l=a.width,c=a.height;this.position=t;var u,h,d,f,p=this.position.l,m=this.position.w,g=this.position.t,v=this.position.h,b=this.position.direction,y="down"===b,x="left"===b,_="up"===b,w=m,k=v;y||x||"right"===b||_||(this.position.direction="down",y=!0),y||_?(h=(u=p)+w,y?(d=g,k=(f=Math.min(d+k,c))-d):k=(f=g+k)-(d=Math.max(f-k,0))):(f=(d=g)+k,x?w=(h=p+w)-(u=Math.max(h-w,0)):(u=p,w=(h=Math.min(u+w,l))-u)),this._box={l:u,t:d,w,h:k};var A=m>w,M=s.barLength+2*s.barPad,T=s.barWidth+2*s.barPad,S=p,C=g+v;C+T>c&&(C=c-T);var E=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);E.exit().on(".drag",null).remove(),E.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),A?(this.hbar=E.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:C,width:M,height:T}),this._hbarXMin=S+M/2,this._hbarTranslateMax=w-M):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=v>k,z=s.barWidth+2*s.barPad,O=s.barLength+2*s.barPad,D=p+m,I=g;D+z>l&&(D=l-z);var R=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),L?(this.vbar=R.attr({rx:s.barRadius,ry:s.barRadius,x:D,y:I,width:z,height:O}),this._vbarYMin=I+O/2,this._vbarTranslateMax=k-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var F=this.id,P=u-.5,N=L?h+z+.5:h+.5,j=d-.5,B=A?f+T+.5:f+.5,U=a._topdefs.selectAll("#"+F).data(A||L?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",F).append("rect"),A||L?(this._clipRect=U.select("rect").attr({x:Math.floor(P),y:Math.floor(j),width:Math.ceil(N)-Math.floor(P),height:Math.ceil(B)-Math.floor(j)}),this.container.call(o.setClipUrl,F,this.gd),this.bg.attr({x:p,y:g,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),A||L){var G=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(G);var V=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(V),L&&this.vbar.on(".drag",null).call(V)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,i=r+this._hbarTranslateMax;t=(a.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var o=e+this._vbarYMin,s=o+this._vbarTranslateMax;e=(a.constrain(n.event.y,o,s)-o)/(s-o)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=a.constrain(t||0,0,r),e=a.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(o.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(o.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(o.setTranslate,t,e+s*this._vbarTranslateMax)}}},89701:t=>{"use strict";t.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},53644:t=>{"use strict";t.exports={axisRefDescription:function(t,e,r){return["If set to a",t,"axis id (e.g. *"+t+"* or","*"+t+"2*), the `"+t+"` position refers to a",t,"coordinate. If set to *paper*, the `"+t+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+r+"). If set to a",t,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",e,"of the domain of that axis: e.g.,","*"+t+"2 domain* refers to the domain of the second",t," axis and a",t,"position of 0.5 refers to the","point between the",e,"and the",r,"of the domain of the","second",t,"axis."].join(" ")}}},77201:t=>{"use strict";t.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},55697:t=>{"use strict";t.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},24134:t=>{"use strict";t.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},11891:t=>{"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},32994:t=>{"use strict";t.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},25853:(t,e)=>{"use strict";e.xmlns="http://www.w3.org/2000/xmlns/",e.svg="http://www.w3.org/2000/svg",e.xlink="http://www.w3.org/1999/xlink",e.svgAttrs={xmlns:e.svg,"xmlns:xlink":e.xlink}},7623:(t,e,r)=>{"use strict";e.version=r(88566).version,r(60613),r(1146);for(var n=r(25059),i=e.register=n.register,o=r(41103),a=Object.keys(o),s=0;s{"use strict";t.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:["",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},66379:(t,e)=>{"use strict";e.isLeftAnchor=function(t){return"left"===t.xanchor||"auto"===t.xanchor&&t.x<=1/3},e.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},e.isRightAnchor=function(t){return"right"===t.xanchor||"auto"===t.xanchor&&t.x>=2/3},e.isTopAnchor=function(t){return"top"===t.yanchor||"auto"===t.yanchor&&t.y>=2/3},e.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3},e.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3}},59804:(t,e,r)=>{"use strict";var n=r(31918),i=n.mod,o=n.modHalf,a=Math.PI,s=2*a;function l(t){return Math.abs(t[1]-t[0])>s-1e-14}function c(t,e){return o(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0](n=i(n,s))&&(n+=s);var o=i(t,s),a=o+s;return o>=r&&o<=n||a>=r&&a<=n}function h(t,e,r,n,i,o,c){i=i||0,o=o||0;var u,h,d,f,p,m=l([r,n]);function g(t,e){return[t*Math.cos(e)+i,o-t*Math.sin(e)]}m?(u=0,h=a,d=s):r=i&&t<=o);var i,o},pathArc:function(t,e,r,n,i){return h(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return h(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,o){return h(t,e,r,n,i,o,1)}}},98507:(t,e,r)=>{"use strict";var n=r(44514).decode,i=r(12517),o=Array.isArray,a=ArrayBuffer,s=DataView;function l(t){return a.isView(t)&&!(t instanceof s)}function c(t){return o(t)||l(t)}e.isTypedArray=l,e.isArrayOrTypedArray=c,e.isArray1D=function(t){return!c(t[0])},e.ensureArray=function(t,e){return o(t)||(t=[]),t.length=e,t};var u={u1c:"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,i1:"undefined"==typeof Int8Array?void 0:Int8Array,u1:"undefined"==typeof Uint8Array?void 0:Uint8Array,i2:"undefined"==typeof Int16Array?void 0:Int16Array,u2:"undefined"==typeof Uint16Array?void 0:Uint16Array,i4:"undefined"==typeof Int32Array?void 0:Int32Array,u4:"undefined"==typeof Uint32Array?void 0:Uint32Array,f4:"undefined"==typeof Float32Array?void 0:Float32Array,f8:"undefined"==typeof Float64Array?void 0:Float64Array};function h(t){return t.constructor===ArrayBuffer}function d(t,e,r){if(c(t)){if(c(t[0])){for(var n=r,i=0;i{"use strict";var n=r(7370),i=r(32994).BADNUM,o=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;t.exports=function(t){return"string"==typeof t&&(t=t.replace(o,"")),n(t)?Number(t):i}},86748:t=>{"use strict";t.exports=function(t){var e=t._fullLayout;e._glcanvas&&e._glcanvas.size()&&e._glcanvas.each((function(t){t.regl&&t.regl.clear({color:!0,depth:!0})}))}},11704:t=>{"use strict";t.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}},5365:(t,e,r)=>{"use strict";var n=r(7370),i=r(18106),o=r(3520),a=r(78920),s=r(17499),l=r(11891).DESELECTDIM,c=r(91355),u=r(46233).counter,h=r(31918).modHalf,d=r(98507).isArrayOrTypedArray,f=r(98507).isTypedArraySpec,p=r(98507).decodeTypedArraySpec;function m(t,r){var n=e.valObjectMeta[r.valType];if(r.arrayOk&&d(t))return!0;if(n.validateFunction)return n.validateFunction(t,r);var i={},o=i,a={set:function(t){o=t}};return n.coerceFunction(t,a,i,r),o!==i}e.valObjectMeta={data_array:{description:["An {array} of data.","The value must represent an {array} or it will be ignored,","but this array can be provided in several forms:","(1) a regular {array} object","(2) a typed array (e.g. Float32Array)","(3) an object with keys dtype, bdata, and optionally shape.","In this 3rd form, dtype is one of","*f8*, *f4*.","*i4*, *u4*,","*i2*, *u2*,","*i1*, *u1* or *u1c* for Uint8ClampedArray.","In addition to shorthand `dtype` above one could also use the following forms:","*float64*, *float32*,","*int32*, *uint32*,","*int16*, *uint16*,","*int8*, *uint8* or *uint8c* for Uint8ClampedArray.","`bdata` is either a base64-encoded string or the ArrayBuffer of","an integer or float typed array.","For either multi-dimensional arrays you must also","provide its dimensions separated by comma via `shape`.","For example using `dtype`: *f4* and `shape`: *5,100* you can","declare a 2-D array that has 5 rows and 100 columns","containing float32 values i.e. 4 bits per value.","`shape` is optional for one dimensional arrays."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(t,e,r){e.set(d(t)?t:f(t)?p(t):r)}},enumerated:{description:["Enumerated value type. The available values are listed","in `values`."].join(" "),requiredOpts:["values"],otherOpts:["dflt","coerceNumber","arrayOk"],coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),-1===n.values.indexOf(t)?e.set(r):e.set(t)},validateFunction:function(t,e){e.coerceNumber&&(t=+t);for(var r=e.values,n=0;ni.max?e.set(r):e.set(+t)}},integer:{description:["An integer or an integer inside a string.","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)}},string:{description:["A string value.","Numbers are converted to strings except for attributes with","`strict` set to true."].join(" "),requiredOpts:[],otherOpts:["dflt","noBlank","strict","arrayOk","values"],coerceFunction:function(t,e,r,n){if("string"!=typeof t){var i="number"==typeof t;!0!==n.strict&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{description:["A string describing color.","Supported formats:","- hex (e.g. '#d3d3d3')","- rgb (e.g. 'rgb(255, 0, 0)')","- rgba (e.g. 'rgb(255, 0, 0, 0.5)')","- hsl (e.g. 'hsl(0, 100%, 50%)')","- hsv (e.g. 'hsv(0, 100%, 100%)')","- named colors (full list: http://www.w3.org/TR/css3-color/#svg-color)"].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(t,e,r){i(t).isValid()?e.set(t):e.set(r)}},colorlist:{description:["A list of colors.","Must be an {array} containing valid colors."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every((function(t){return i(t).isValid()}))?e.set(t):e.set(r)}},colorscale:{description:["A Plotly colorscale either picked by a name:","(any of",Object.keys(a.scales).join(", "),")","customized as an {array} of 2-element {arrays} where","the first element is the normalized color level value","(starting at *0* and ending at *1*),","and the second item is a valid color string."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(t,e,r){e.set(a.get(t,r))}},angle:{description:["A number (in degree) between -180 and 180."].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(t,e,r){"auto"===t?e.set("auto"):n(t)?e.set(h(+t,360)):e.set(r)}},subplotid:{description:["An id string of a subplot type (given by dflt), optionally","followed by an integer >1. e.g. if dflt='geo', we can have","'geo', 'geo2', 'geo3', ..."].join(" "),requiredOpts:["dflt"],otherOpts:["regex"],coerceFunction:function(t,e,r,n){var i=n.regex||u(r);"string"==typeof t&&i.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||"string"==typeof t&&!!u(r).test(t)}},flaglist:{description:["A string representing a combination of flags","(order does not matter here).","Combine any of the available `flags` with *+*.","(e.g. ('lines+markers')).","Values in `extras` cannot be combined."].join(" "),requiredOpts:["flags"],otherOpts:["dflt","extras","arrayOk"],coerceFunction:function(t,e,r,n){if(-1===(n.extras||[]).indexOf(t))if("string"==typeof t){for(var i=t.split("+"),o=0;o{"use strict";var n,i,o=r(79969).DC,a=r(7370),s=r(64347),l=r(31918).mod,c=r(32994),u=c.BADNUM,h=c.ONEDAY,d=c.ONEHOUR,f=c.ONEMIN,p=c.ONESEC,m=c.EPOCHJD,g=r(25059),v=r(79969).aL,b=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,y=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,x=(new Date).getFullYear()-70;function _(t){return t&&g.componentsRegistry.calendars&&"string"==typeof t&&"gregorian"!==t}function w(t,e){return String(t+Math.pow(10,e)).substr(1)}e.dateTick0=function(t,r){var n=function(t,e){return _(t)?e?g.getComponentMethod("calendars","CANONICAL_SUNDAY")[t]:g.getComponentMethod("calendars","CANONICAL_TICK")[t]:e?"2000-01-02":"2000-01-01"}(t,!!r);if(r<2)return n;var i=e.dateTime2ms(n,t);return i+=h*(r-1),e.ms2DateTime(i,0,t)},e.dfltRange=function(t){return _(t)?g.getComponentMethod("calendars","DFLTRANGE")[t]:["2000-01-01","2001-01-01"]},e.isJSDate=function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.getTime},e.dateTime2ms=function(t,r){if(e.isJSDate(t)){var o=t.getTimezoneOffset()*f,a=(t.getUTCMinutes()-t.getMinutes())*f+(t.getUTCSeconds()-t.getSeconds())*p+(t.getUTCMilliseconds()-t.getMilliseconds());if(a){var s=3*f;o=o-s/2+l(a-o+s/2,s)}return(t=Number(t)-o)>=n&&t<=i?t:u}if("string"!=typeof t&&"number"!=typeof t)return u;t=String(t);var c=_(r),v=t.charAt(0);!c||"G"!==v&&"g"!==v||(t=t.substr(1),r="");var w=c&&"chinese"===r.substr(0,7),k=t.match(w?y:b);if(!k)return u;var A=k[1],M=k[3]||"1",T=Number(k[5]||1),S=Number(k[7]||0),C=Number(k[9]||0),E=Number(k[11]||0);if(c){if(2===A.length)return u;var L;A=Number(A);try{var z=g.getComponentMethod("calendars","getCal")(r);if(w){var O="i"===M.charAt(M.length-1);M=parseInt(M,10),L=z.newDate(A,z.toMonthIndex(A,M,O),T)}else L=z.newDate(A,Number(M),T)}catch(t){return u}return L?(L.toJD()-m)*h+S*d+C*f+E*p:u}A=2===A.length?(Number(A)+2e3-x)%100+x:Number(A),M-=1;var D=new Date(Date.UTC(2e3,M,T,S,C));return D.setUTCFullYear(A),D.getUTCMonth()!==M||D.getUTCDate()!==T?u:D.getTime()+E*p},n=e.MIN_MS=e.dateTime2ms("-9999"),i=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(t,r){return e.dateTime2ms(t,r)!==u};var k=90*h,A=3*d,M=5*f;function T(t,e,r,n,i){if((e||r||n||i)&&(t+=" "+w(e,2)+":"+w(r,2),(n||i)&&(t+=":"+w(n,2),i))){for(var o=4;i%10==0;)o-=1,i/=10;t+="."+w(i,o)}return t}e.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=n&&t<=i))return u;e||(e=0);var o,a,s,c,b,y,x=Math.floor(10*l(t+.05,1)),w=Math.round(t-x/10);if(_(r)){var S=Math.floor(w/h)+m,C=Math.floor(l(t,h));try{o=g.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(t){o=v("G%Y-%m-%d")(new Date(w))}if("-"===o.charAt(0))for(;o.length<11;)o="-0"+o.substr(1);else for(;o.length<10;)o="0"+o;a=e=n+h&&t<=i-h))return u;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return T(o("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},e.cleanDate=function(t,r,n){if(t===u)return r;if(e.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(_(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",t),r;if(!(t=e.ms2DateTimeLocal(+t))&&void 0!==r)return r}else if(!e.isDateTime(t,n))return s.error("unrecognized date",t),r;return t};var S=/%\d?f/g,C=/%h/g,E={1:"1",2:"1",3:"2",4:"2"};function L(t,e,r,n){t=t.replace(S,(function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(e+.05));if(t=t.replace(C,(function(){return E[r("%q")(i)]})),_(n))try{t=g.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(i)}var z=[59,59.9,59.99,59.999,59.9999];e.formatDate=function(t,e,r,n,i,o){if(i=_(i)&&i,!e)if("y"===r)e=o.year;else if("m"===r)e=o.month;else{if("d"!==r)return function(t,e){var r=l(t+.05,h),n=w(Math.floor(r/d),2)+":"+w(l(Math.floor(r/f),60),2);if("M"!==e){a(e)||(e=0);var i=(100+Math.min(l(t/p,60),z[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(t,r)+"\n"+L(o.dayMonthYear,t,n,i);e=o.dayMonth+"\n"+o.year}return L(e,t,n,i)};var O=3*h;e.incrementMonth=function(t,e,r){r=_(r)&&r;var n=l(t,h);if(t=Math.round(t-n),r)try{var i=Math.round(t/h)+m,o=g.getComponentMethod("calendars","getCal")(r),a=o.fromJD(i);return e%12?o.add(a,e,"m"):o.add(a,e/12,"y"),(a.toJD()-m)*h+n}catch(e){s.error("invalid ms "+t+" in calendar "+r)}var c=new Date(t+O);return c.setUTCMonth(c.getUTCMonth()+e)+n-O},e.findExactDates=function(t,e){for(var r,n,i=0,o=0,s=0,l=0,c=_(e)&&g.getComponentMethod("calendars","getCal")(e),u=0;u{"use strict";var n=r(27941),i=r(64347),o=r(75717),a=r(79538);function s(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function l(t,e,r){var n="plotly.js-style-"+t,o=document.getElementById(n);o||((o=document.createElement("style")).setAttribute("id",n),o.appendChild(document.createTextNode("")),document.head.appendChild(o));var a=o.sheet;a.insertRule?a.insertRule(e+"{"+r+"}",0):a.addRule?a.addRule(e,r,0):i.warn("addStyleRule failed")}function c(t){var e=window.getComputedStyle(t,null),r=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform");return"none"===r?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map((function(t){return+t}))}function u(t){for(var e=[];h(t);)e.push(t),t=t.parentNode;return e}function h(t){return t&&(t instanceof Element||t instanceof HTMLElement)}t.exports={getGraphDiv:function(t){var e;if("string"==typeof t){if(null===(e=document.getElementById(t)))throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null==t)throw new Error("DOM element provided is null or undefined");return t},isPlotDiv:function(t){var e=n.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")},removeElement:s,addStyleRule:function(t,e){l("global",t,e)},addRelatedStyleRule:l,deleteRelatedStyleRule:function(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&s(r)},getFullTransformMatrix:function(t){var e=u(t),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.forEach((function(t){var e=c(t);if(e){var n=o.convertCssMatrix(e);r=a.multiply(r,r,n)}})),r},getElementTransformMatrix:c,getElementAndAncestors:u,equalDomRects:function(t,e){return t&&e&&t.top===e.top&&t.left===e.left&&t.right===e.right&&t.bottom===e.bottom}}},16677:(t,e,r)=>{"use strict";var n=r(86626).EventEmitter,i={init:function(t){if(t._ev instanceof n)return t;var e=new n,r=new n;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(n,i){"undefined"!=typeof jQuery&&jQuery(t).trigger(n,i),e.emit(n,i),r.emit(n,i)},t},triggerHandler:function(t,e,r){var n,i;"undefined"!=typeof jQuery&&(n=jQuery(t).triggerHandler(e,r));var o=t._ev;if(!o)return n;var a,s=o._events[e];if(!s)return n;function l(t){return t.listener?(o.removeListener(e,t.listener),t.fired?void 0:(t.fired=!0,t.listener.apply(o,[r]))):t.apply(o,[r])}for(s=Array.isArray(s)?s:[s],a=0;a{"use strict";var n=r(12517),i=Array.isArray;function o(t,e,r,a){var s,l,c,u,h,d,f,p=t[0],m=t.length;if(2===m&&i(p)&&i(t[1])&&0===p.length){if(f=function(t,e){var r,n;for(r=0;r{"use strict";t.exports=function(t){for(var e={},r=[],n=0,i=0;i{"use strict";function e(t){return!0===t.visible}function r(t){var e=t[0].trace;return!0===e.visible&&0!==e._length}t.exports=function(t){for(var n,i=(n=t,Array.isArray(n)&&Array.isArray(n[0])&&n[0][0]&&n[0][0].trace?r:e),o=[],a=0;a{"use strict";var n,i,o,a=r(31918).mod;function s(t,e,r,n,i,o,a,s){var l=r-t,c=i-t,u=a-i,h=n-e,d=o-e,f=s-o,p=l*f-u*h;if(0===p)return null;var m=(c*f-u*d)/p,g=(c*h-l*d)/p;return g<0||g>1||m<0||m>1?null:{x:t+l*m,y:e+h*m}}function l(t,e,r,n,i){var o=n*t+i*e;if(o<0)return n*n+i*i;if(o>r){var a=n-t,s=i-e;return a*a+s*s}var l=n*e-i*t;return l*l/r}e.segmentsIntersect=s,e.segmentDistance=function(t,e,r,n,i,o,a,c){if(s(t,e,r,n,i,o,a,c))return 0;var u=r-t,h=n-e,d=a-i,f=c-o,p=u*u+h*h,m=d*d+f*f,g=Math.min(l(u,h,p,i-t,o-e),l(u,h,p,a-t,c-e),l(d,f,m,t-i,e-o),l(d,f,m,r-i,n-o));return Math.sqrt(g)},e.getTextLocation=function(t,e,r,s){if(t===i&&s===o||(n={},i=t,o=s),n[r])return n[r];var l=t.getPointAtLength(a(r-s/2,e)),c=t.getPointAtLength(a(r+s/2,e)),u=Math.atan((c.y-l.y)/(c.x-l.x)),h=t.getPointAtLength(a(r,e)),d={x:(4*h.x+l.x+c.x)/6,y:(4*h.y+l.y+c.y)/6,theta:u};return n[r]=d,d},e.clearLocationCache=function(){i=null},e.getVisibleSegment=function(t,e,r){var n,i,o=e.left,a=e.right,s=e.top,l=e.bottom,c=0,u=t.getTotalLength(),h=u;function d(e){var r=t.getPointAtLength(e);0===e?n=r:e===u&&(i=r);var c=r.xa?r.x-a:0,h=r.yl?r.y-l:0;return Math.sqrt(c*c+h*h)}for(var f=d(c);f;){if((c+=f+r)>h)return;f=d(c)}for(f=d(h);f;){if(c>(h-=f+r))return;f=d(h)}return{min:c,max:h,len:h-c,total:u,isClosed:0===c&&h===u&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},e.findPointOnPath=function(t,e,r,n){for(var i,o,a,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,h=0,d=0,f=s;h0?f=i:d=i,h++}return o}},25069:(t,e,r)=>{"use strict";var n=r(7370),i=r(18106),o=r(34463),a=r(80755),s=r(84226).defaultLine,l=r(98507).isArrayOrTypedArray,c=o(s);function u(t,e){var r=t;return r[3]*=e,r}function h(t){if(n(t))return c;var e=o(t);return e.length?e:c}function d(t){return n(t)?t:1}t.exports={formatColor:function(t,e,r){var n=t.color;n&&n._inputArray&&(n=n._inputArray);var i,s,f,p,m,g=l(n),v=l(e),b=a.extractOpts(t),y=[];if(i=void 0!==b.colorscale?a.makeColorScaleFuncFromTrace(t):h,s=g?function(t,e){return void 0===t[e]?c:o(i(t[e]))}:h,f=v?function(t,e){return void 0===t[e]?1:d(t[e])}:d,g||v)for(var x=0;x{"use strict";t.exports=function(t){return t}},98803:t=>{"use strict";t.exports=function(t,e){if(!e)return t;var r=1/Math.abs(e),n=r>1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var o=String(e).length;if(i>=String(t).length+o){var a=parseFloat(n).toPrecision(12);-1===a.indexOf("e+")&&(n=+a)}}return n}},12822:(t,e,r)=>{"use strict";var n=r(27941),i=r(79969).aL,o=r(31830).GP,a=r(7370),s=r(32994),l=s.FP_SAFE,c=-l,u=s.BADNUM,h=t.exports={};h.adjustFormat=function(t){return!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t)?t:"0.f"===t?"~f":/^\d%/.test(t)?"~%":/^\ds/.test(t)?"~s":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?"~"+t:t};var d={};h.warnBadFormat=function(t){var e=String(t);d[e]||(d[e]=1,h.warn('encountered bad format: "'+e+'"'))},h.noFormat=function(t){return String(t)},h.numberFormat=function(t){var e;try{e=o(h.adjustFormat(t))}catch(e){return h.warnBadFormat(t),h.noFormat}return e},h.nestedProperty=r(91355),h.keyedContainer=r(68588),h.relativeAttr=r(21904),h.isPlainObject=r(12517),h.toLogRange=r(61814),h.relinkPrivateKeys=r(45905);var f=r(98507);h.isArrayBuffer=f.isArrayBuffer,h.isTypedArray=f.isTypedArray,h.isArrayOrTypedArray=f.isArrayOrTypedArray,h.isArray1D=f.isArray1D,h.ensureArray=f.ensureArray,h.concat=f.concat,h.maxRowLength=f.maxRowLength,h.minRowLength=f.minRowLength;var p=r(31918);h.mod=p.mod,h.modHalf=p.modHalf;var m=r(5365);h.valObjectMeta=m.valObjectMeta,h.coerce=m.coerce,h.coerce2=m.coerce2,h.coerceFont=m.coerceFont,h.coercePattern=m.coercePattern,h.coerceHoverinfo=m.coerceHoverinfo,h.coerceSelectionMarkerOpacity=m.coerceSelectionMarkerOpacity,h.validate=m.validate;var g=r(41095);h.dateTime2ms=g.dateTime2ms,h.isDateTime=g.isDateTime,h.ms2DateTime=g.ms2DateTime,h.ms2DateTimeLocal=g.ms2DateTimeLocal,h.cleanDate=g.cleanDate,h.isJSDate=g.isJSDate,h.formatDate=g.formatDate,h.incrementMonth=g.incrementMonth,h.dateTick0=g.dateTick0,h.dfltRange=g.dfltRange,h.findExactDates=g.findExactDates,h.MIN_MS=g.MIN_MS,h.MAX_MS=g.MAX_MS;var v=r(45380);h.findBin=v.findBin,h.sorterAsc=v.sorterAsc,h.sorterDes=v.sorterDes,h.distinctVals=v.distinctVals,h.roundUp=v.roundUp,h.sort=v.sort,h.findIndexOfMin=v.findIndexOfMin,h.sortObjectKeys=r(54747);var b=r(6749);h.aggNums=b.aggNums,h.len=b.len,h.mean=b.mean,h.median=b.median,h.midRange=b.midRange,h.variance=b.variance,h.stdev=b.stdev,h.interp=b.interp;var y=r(75717);h.init2dArray=y.init2dArray,h.transposeRagged=y.transposeRagged,h.dot=y.dot,h.translationMatrix=y.translationMatrix,h.rotationMatrix=y.rotationMatrix,h.rotationXYMatrix=y.rotationXYMatrix,h.apply3DTransform=y.apply3DTransform,h.apply2DTransform=y.apply2DTransform,h.apply2DTransform2=y.apply2DTransform2,h.convertCssMatrix=y.convertCssMatrix,h.inverseTransformMatrix=y.inverseTransformMatrix;var x=r(59804);h.deg2rad=x.deg2rad,h.rad2deg=x.rad2deg,h.angleDelta=x.angleDelta,h.angleDist=x.angleDist,h.isFullCircle=x.isFullCircle,h.isAngleInsideSector=x.isAngleInsideSector,h.isPtInsideSector=x.isPtInsideSector,h.pathArc=x.pathArc,h.pathSector=x.pathSector,h.pathAnnulus=x.pathAnnulus;var _=r(66379);h.isLeftAnchor=_.isLeftAnchor,h.isCenterAnchor=_.isCenterAnchor,h.isRightAnchor=_.isRightAnchor,h.isTopAnchor=_.isTopAnchor,h.isMiddleAnchor=_.isMiddleAnchor,h.isBottomAnchor=_.isBottomAnchor;var w=r(8994);h.segmentsIntersect=w.segmentsIntersect,h.segmentDistance=w.segmentDistance,h.getTextLocation=w.getTextLocation,h.clearLocationCache=w.clearLocationCache,h.getVisibleSegment=w.getVisibleSegment,h.findPointOnPath=w.findPointOnPath;var k=r(98260);h.extendFlat=k.extendFlat,h.extendDeep=k.extendDeep,h.extendDeepAll=k.extendDeepAll,h.extendDeepNoArrays=k.extendDeepNoArrays;var A=r(64347);h.log=A.log,h.warn=A.warn,h.error=A.error;var M=r(46233);h.counterRegex=M.counter;var T=r(76324);h.throttle=T.throttle,h.throttleDone=T.done,h.clearThrottle=T.clear;var S=r(16822);function C(t){var e={};for(var r in t)for(var n=t[r],i=0;il||t=e)&&a(t)&&t>=0&&t%1==0},h.noop=r(51648),h.identity=r(75250),h.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},h.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},h.simpleMap=function(t,e,r,n,i){for(var o=t.length,a=new Array(o),s=0;s=Math.pow(2,r)?i>10?(h.warn("randstr failed uniqueness"),l):t(e,r,n,(i||0)+1):l},h.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},h.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,o,a=t.length,s=2*a,l=2*e-1,c=new Array(l),u=new Array(a);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=a&&(i=s-1-i),o+=t[i]*c[n];u[r]=o}return u},h.syncOrAsync=function(t,e,r){var n;function i(){return h.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},h.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},h.noneOrAll=function(t,e,r){if(t){var n,i=!1,o=!0;for(n=0;n0?e:0}))},h.fillArray=function(t,e,r,n){if(n=n||h.identity,h.isArrayOrTypedArray(t))for(var i=0;i1?i+a[1]:"";if(o&&(a.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+o+"$2");return s+l},h.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var R=/^\w*$/;h.templateString=function(t,e){var r={};return t.replace(h.TEMPLATE_STRING_REGEX,(function(t,n){var i;return R.test(n)?i=e[n]:(r[n]=r[n]||h.nestedProperty(e,n).get,i=r[n]()),h.isValidTextValue(i)?i:""}))};var F={max:10,count:0,name:"hovertemplate"};h.hovertemplateString=function(){return U.apply(F,arguments)};var P={max:10,count:0,name:"texttemplate"};h.texttemplateString=function(){return U.apply(P,arguments)};var N=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,j={max:10,count:0,name:"texttemplate",parseMultDiv:!0};h.texttemplateStringForShapes=function(){return U.apply(j,arguments)};var B=/^[:|\|]/;function U(t,e,r){var n=this,o=arguments;e||(e={});var a={};return t.replace(h.TEMPLATE_STRING_REGEX,(function(t,s,l){var c="_xother"===s||"_yother"===s,u="_xother_"===s||"_yother_"===s,d="xother_"===s||"yother_"===s,f="xother"===s||"yother"===s||c||d||u,p=s;(c||u)&&(p=p.substring(1)),(d||u)&&(p=p.substring(0,p.length-1));var m,g,v,b=null,y=null;if(n.parseMultDiv){var x=function(t){var e=t.match(N);return e?{key:e[1],op:e[2],number:Number(e[3])}:{key:t,op:null,number:null}}(p);p=x.key,b=x.op,y=x.number}if(f){if(void 0===(m=e[p]))return""}else for(v=3;v=48&&a<=57,c=s>=48&&s<=57;if(l&&(n=10*n+a-48),c&&(i=10*i+s-48),!l||!c){if(n!==i)return n-i;if(a!==s)return a-s}}return i-n};var G=2e9;h.seedPseudoRandom=function(){G=2e9},h.pseudoRandom=function(){var t=G;return G=(69069*G+1)%4294967296,Math.abs(G-t)<429496729?h.pseudoRandom():G/4294967296},h.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=h.extractOption(t,e,"htx","hovertext");if(h.isValidTextValue(i))return n(i);var o=h.extractOption(t,e,"tx","text");return h.isValidTextValue(o)?n(o):void 0},h.isValidTextValue=function(t){return t||0===t},h.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+"%",n=0;n1&&(c=1):c=0,h.strTranslate(i-c*(r+a),o-c*(n+s))+h.strScale(c)+(l?"rotate("+l+(e?"":" "+r+" "+n)+")":"")},h.setTransormAndDisplay=function(t,e){t.attr("transform",h.getTextTransform(e)),t.style("display",e.scale?null:"none")},h.ensureUniformFontSize=function(t,e){var r=h.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},h.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)},h.bigFont=function(t){return Math.round(1.2*t)};var V=h.getFirefoxVersion(),H=null!==V&&V<86;h.getPositionFromD3Event=function(){return H?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},12517:t=>{"use strict";t.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}},68588:(t,e,r)=>{"use strict";var n=r(91355),i=/^\w*$/;t.exports=function(t,e,r,o){var a,s,l;r=r||"name",o=o||"value";var c={};e&&e.length?(l=n(t,e),s=l.get()):s=t,e=e||"";var u={};if(s)for(a=0;a2)return c[e]=2|c[e],d.set(t,null);if(h){for(a=e;a{"use strict";var n=r(25059);t.exports=function(t,e){for(var r=t._context.locale,i=0;i<2;i++){for(var o=t._context.locales,a=0;a<2;a++){var s=(o[r]||{}).dictionary;if(s){var l=s[e];if(l)return l}o=n.localeRegistry}var c=r.split("-")[0];if(c===r)break;r=c}return e}},64347:(t,e,r)=>{"use strict";var n=r(58389).dfltConfig,i=r(39382),o=t.exports={};o.log=function(){var t;if(n.logging>1){var e=["LOG:"];for(t=0;t1){var r=[];for(t=0;t"),"long")}},o.warn=function(){var t;if(n.logging>0){var e=["WARN:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}},o.error=function(){var t;if(n.logging>0){var e=["ERROR:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}}},51915:(t,e,r)=>{"use strict";var n=r(27941);t.exports=function(t,e,r){var i=t.selectAll("g."+r.replace(/\s/g,".")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",r),i.order();var o=t.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(t){t[0][o]=n.select(this)})),i}},75717:(t,e,r)=>{"use strict";var n=r(79538);e.init2dArray=function(t,e){for(var r=new Array(t),n=0;n{"use strict";t.exports={mod:function(t,e){var r=t%e;return r<0?r+e:r},modHalf:function(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}}},91355:(t,e,r)=>{"use strict";var n=r(7370),i=r(98507).isArrayOrTypedArray;function o(t,e){return function(){var r,n,a,s,l,c=t;for(s=0;s{"use strict";t.exports=function(){}},39382:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=[];t.exports=function(t,e){if(-1===o.indexOf(t)){o.push(t);var r=1e3;i(e)?r=e:"long"===e&&(r=3e3);var a=n.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0),a.selectAll(".notifier-note").data(o).enter().append("div").classed("notifier-note",!0).style("opacity",0).each((function(t){var i=n.select(this);i.append("button").classed("notifier-close",!0).html("×").on("click",(function(){i.transition().call(s)}));for(var o=i.append("p"),a=t.split(//g),l=0;l{"use strict";var n=r(76292),i="data-savedcursor";t.exports=function(t,e){var r=t.attr(i);if(e){if(!r){for(var o=(t.attr("class")||"").split(" "),a=0;a{"use strict";var n=r(75717).dot,i=r(32994).BADNUM,o=t.exports={};o.tester=function(t){var e,r=t.slice(),n=r[0][0],o=n,a=r[0][1],s=a;for(r[r.length-1][0]===r[0][0]&&r[r.length-1][1]===r[0][1]||r.push(r[0]),e=1;eo||c===i||cs||e&&l(t))}:function(t,e){var l=t[0],c=t[1];if(l===i||lo||c===i||cs)return!1;var u,h,d,f,p,m=r.length,g=r[0][0],v=r[0][1],b=0;for(u=1;uMath.max(h,g)||c>Math.max(d,v)))if(cu||Math.abs(n(a,d))>i)return!0;return!1},o.filter=function(t,e){var r=[t[0]],n=0,i=0;function a(a){t.push(a);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c1&&a(t.pop()),{addPt:a,raw:t,filtered:r}}},41246:(t,e,r)=>{"use strict";var n=r(91203),i=r(83029);t.exports=function(t,e,o){var a=t._fullLayout,s=!0;return a._glcanvas.each((function(n){if(n.regl)n.regl.preloadCachedCode(o);else if(!n.pick||a._has("parcoords")){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.g.devicePixelRatio,extensions:e||[],cachedCode:o||{}})}catch(t){s=!1}n.regl||(s=!1),s&&this.addEventListener("webglcontextlost",(function(e){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:e,layer:n.key})}),!1)}})),s||n({container:a._glcontainer.node()}),s}},31406:(t,e,r)=>{"use strict";var n=r(7370),i=r(12431);t.exports=function(t){var e;if("string"!=typeof(e=t&&t.hasOwnProperty("userAgent")?t.userAgent:function(){var t;return"undefined"!=typeof navigator&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),t}()))return!0;var r=i({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!r)for(var o=e.split(" "),a=1;a-1;s--){var l=o[s];if("Version/"===l.substr(0,8)){var c=l.substr(8).split(".")[0];if(n(c)&&(c=+c),c>=13)return!0}}return r}},65280:t=>{"use strict";t.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;n{"use strict";var n=r(12822),i=r(58389).dfltConfig,o={add:function(t,e,r,n,o){var a,s;t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},s=t.undoQueue.index,t.autoplay?t.undoQueue.inSequence||(t.autoplay=!1):(!t.undoQueue.sequence||t.undoQueue.beginSequence?(a={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(s,t.undoQueue.queue.length-s,a),t.undoQueue.index+=1):a=t.undoQueue.queue[s-1],t.undoQueue.beginSequence=!1,a&&(a.undo.calls.unshift(e),a.undo.args.unshift(r),a.redo.calls.push(n),a.redo.args.push(o)),t.undoQueue.queue.length>i.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r{"use strict";e.counter=function(t,e,r,n){var i=(e||"")+(r?"":"$"),o=!1===n?"":"^";return"xy"===t?new RegExp(o+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(o+t+"([2-9]|[1-9][0-9]+)?"+i)}},21904:t=>{"use strict";var e=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,r=/^[^\.\[\]]+$/;t.exports=function(t,n){for(;n;){var i=t.match(e);if(i)t=i[1];else{if(!t.match(r))throw new Error("bad relativeAttr call:"+[t,n]);t=""}if("^"!==n.charAt(0))break;n=n.slice(1)}return t&&"["!==n.charAt(0)?t+"."+n:t+n}},45905:(t,e,r)=>{"use strict";var n=r(98507).isArrayOrTypedArray,i=r(12517);t.exports=function t(e,r){for(var o in r){var a=r[o],s=e[o];if(s!==a)if("_"===o.charAt(0)||"function"==typeof a){if(o in e)continue;e[o]=a}else if(n(a)&&n(s)&&i(a[0])){if("customdata"===o||"ids"===o)continue;for(var l=Math.min(a.length,s.length),c=0;c{"use strict";var n=r(7370),i=r(64347),o=r(75250),a=r(32994).BADNUM,s=1e-9;function l(t,e){return te}function h(t,e){return t>=e}e.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-s)-1:Math.floor((t-e.start)/e.size+s);var o,a,d=0,f=e.length,p=0,m=f>1?(e[f-1]-e[0])/(f-1):1;for(a=m>=0?r?l:c:r?h:u,t+=m*s*(r?-1:1)*(m>=0?1:-1);d90&&i.log("Long binary search..."),d-1},e.sorterAsc=function(t,e){return t-e},e.sorterDes=function(t,e){return e-t},e.distinctVals=function(t){var r,n=t.slice();for(n.sort(e.sorterAsc),r=n.length-1;r>-1&&n[r]===a;r--);for(var i,o=n[r]-n[0]||1,s=o/(r||1)/1e4,l=[],c=0;c<=r;c++){var u=n[c],h=u-i;void 0===i?(l.push(u),i=u):h>s&&(o=Math.min(o,h),l.push(u),i=u)}return{vals:l,minDiff:o}},e.roundUp=function(t,e,r){for(var n,i=0,o=e.length-1,a=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;i0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},e.findIndexOfMin=function(t,e){e=e||o;for(var r,n=1/0,i=0;i{"use strict";t.exports=function(t,e){(t.attr("class")||"").split(" ").forEach((function(e){0===e.indexOf("cursor-")&&t.classed(e,!1)})),e&&t.classed("cursor-"+e,!0)}},91203:(t,e,r)=>{"use strict";var n=r(17499),i=function(){};t.exports=function(t){for(var e in t)"function"==typeof t[e]&&(t[e]=i);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var r=document.createElement("div");r.className="no-webgl",r.style.cursor="pointer",r.style.fontSize="24px",r.style.color=n.defaults[0],r.style.position="absolute",r.style.left=r.style.top="0px",r.style.width=r.style.height="100%",r.style["background-color"]=n.lightLine,r.style["z-index"]=30;var o=document.createElement("p");return o.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",o.style.position="relative",o.style.top="50%",o.style.left="50%",o.style.height="30%",o.style.width="50%",o.style.margin="-15% 0 0 -25%",r.appendChild(o),t.container.appendChild(r),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}},54747:t=>{"use strict";t.exports=function(t){return Object.keys(t).sort()}},6749:(t,e,r)=>{"use strict";var n=r(7370),i=r(98507).isArrayOrTypedArray;e.aggNums=function(t,r,o,a){var s,l;if((!a||a>o.length)&&(a=o.length),n(r)||(r=!1),i(o[0])){for(l=new Array(a),s=0;st.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},17235:(t,e,r)=>{"use strict";var n=r(34463);t.exports=function(t){return t?n(t):[0,0,0,1]}},80394:(t,e,r)=>{"use strict";var n=r(27941),i=r(12822),o=i.strTranslate,a=r(25853),s=r(89701).LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;e.convertToTspans=function(t,r,g){var S=t.text(),C=!t.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!=typeof MathJax&&S.match(l),z=n.select(t.node().parentNode);if(!z.empty()){var O=t.attr("class")?t.attr("class").split(" ")[0]:"text";return O+="-math",z.selectAll("svg."+O).remove(),z.selectAll("g."+O+"-group").remove(),t.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),C?(r&&r._promises||[]).push(new Promise((function(e){t.style("display","none");var r=parseInt(t.node().style.fontSize,10),a={fontSize:r};!function(t,e,r){var o,a,s,l,d=parseInt((MathJax.version||"").split(".")[0]);if(2===d||3===d){var f=function(){var r="math-output-"+i.randstr({},64),o=(l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":e.fontSize+"px"}).text(t.replace(c,"\\lt ").replace(u,"\\gt "))).node();return 2===d?MathJax.Hub.Typeset(o):MathJax.typeset([o])},p=function(){var e=l.select(2===d?".MathJax_SVG":".MathJax"),o=!e.empty()&&l.select("svg").node();if(o){var a,s=o.getBoundingClientRect();a=2===d?n.select("body").select("#MathJax_SVG_glyphs"):e.select("defs"),r(e,a,s)}else i.log("There was an error in the tex syntax.",t),r();l.remove()};2===d?MathJax.Hub.Queue((function(){return a=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:h},displayAlign:"left"})}),(function(){if("SVG"!==(o=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),f,p,(function(){if("SVG"!==o)return MathJax.Hub.setRenderer(o)}),(function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(a)})):3===d&&(a=i.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=h,"svg"!==(o=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){f(),p(),"svg"!==o&&(MathJax.config.startup.output=o),MathJax.config=a})))}else i.warn("No MathJax version:",MathJax.version)}(C[2],a,(function(n,i,a){z.selectAll("svg."+O).remove(),z.selectAll("g."+O+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node())return D(),void e();var l=z.append("g").classed(O+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var c=a.width,u=a.height;s.attr({class:O,height:u,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var h=t.node().style.fill||"black",d=s.select("g");d.attr({fill:h,stroke:h});var f=d.node().getBoundingClientRect(),p=f.width,m=f.height;(p>c||m>u)&&(s.style("overflow","hidden"),p=(f=s.node().getBoundingClientRect()).width,m=f.height);var v=+t.attr("x"),b=+t.attr("y"),y=-(r||t.node().getBoundingClientRect().height)/4;if("y"===O[0])l.attr({transform:"rotate("+[-90,v,b]+")"+o(-p/2,y-m/2)});else if("l"===O[0])b=y-m/2;else if("a"===O[0]&&0!==O.indexOf("atitle"))v=0,b=y;else{var x=t.attr("text-anchor");v-=p*("middle"===x?.5:"end"===x?1:0),b=b+y-m/2}s.attr({x:v,y:b}),g&&g.call(t,l),e(l)}))}))):D(),t}function D(){z.empty()||(O=t.attr("class")+"-math",z.select("svg."+O).remove()),t.text("").style("white-space","pre");var r=function(t,e){e=e.replace(v," ");var r,o=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(a.svg,"tspan");n.select(e).attr({class:"line",dy:c*s+"em"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var o=1;o doesnt match end tag <"+t+">. Pretending it did match.",e),r=l[l.length-1].node}else i.log("Ignoring unexpected end tag .",e)}x.test(e)?u():(r=t,l=[{node:t}]);for(var C=e.split(b),z=0;z|>|>)/g,h=[["$","$"],["\\(","\\)"]],d={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},f={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},m="​",g=["http:","https:","mailto:","",void 0,":"],v=e.NEWLINES=/(\r\n?|\n)/g,b=/(<[^<>]*>)/,y=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=//i;e.BR_TAG_ALL=//gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,w=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,k=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,A=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function M(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&E(n)}var T=/(^|;)\s*color:/;e.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:["br"],i=t.split(b),o=[],a="",s=0,l=0;l3?o.push(c.substr(0,f-3)+"..."):o.push(c.substr(0,f));break}a=""}}return o.join("")};var S={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},C=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(t){return t.replace(C,(function(t,e){return("#"===e.charAt(0)?function(t){if(!(t>1114111)){var e=String.fromCodePoint;if(e)return e(t);var r=String.fromCharCode;return t<=65535?r(t):r(55232+(t>>10),t%1024+56320)}}("x"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):S[e])||t}))}function L(t){var e=encodeURI(decodeURI(t)),r=document.createElement("a"),n=document.createElement("a");r.href=t,n.href=e;var i=r.protocol,o=n.protocol;return-1!==g.indexOf(i)&&-1!==g.indexOf(o)?e:""}function z(t,e,r){var n,o,a,s=r.horizontalAlign,l=r.verticalAlign||"top",c=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return o="bottom"===l?function(){return c.bottom-n.height}:"middle"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},a="right"===s?function(){return c.right-n.width}:"center"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var t=a()-u.left,e=o()-u.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+"px",left:t+"px","z-index":1e3}),this}}e.convertEntities=E,e.sanitizeHTML=function(t){t=t.replace(v," ");for(var e=document.createElement("p"),r=e,i=[],o=t.split(b),a=0;a{"use strict";var r={};function n(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}e.throttle=function(t,e,i){var o=r[t],a=Date.now();if(!o){for(var s in r)r[s].tso.ts+e?l():o.timer=setTimeout((function(){l(),o.timer=null}),e)},e.done=function(t){var e=r[t];return e&&e.timer?new Promise((function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}})):Promise.resolve()},e.clear=function(t){if(t)n(r[t]),delete r[t];else for(var i in r)e.clear(i)}},61814:(t,e,r)=>{"use strict";var n=r(7370);t.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},10701:t=>{"use strict";t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6048:t=>{"use strict";t.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{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"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},81776:(t,e,r)=>{"use strict";var n=r(25059);t.exports=function(t){for(var e,r,i=n.layoutArrayContainers,o=n.layoutArrayRegexes,a=t.split("[")[0],s=0;s{"use strict";var n=r(98260).extendFlat,i=r(12517),o={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"],description:["trace attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*clearAxisTypes* resets the types of the axes this trace is on, because new data could","cause the automatic axis type detection to change. Log type will not be cleared, as that","is never automatically chosen so must have been user-specified.","*plot* (re)plots but without first clearing `gd.calcdata`.","*style* only calls `module.style` (or module.editStyle) for all trace modules and redraws the legend.","*markerSize* is like *style*, but propagate axis-range changes due to scatter `marker.size`","*colorbars* only redraws colorbars."].join(" ")},a={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"],description:["layout attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*plot* (re)plots but without first clearing `gd.calcdata`.","*legend* only redraws the legend.","*ticks* only redraws axis ticks, labels, and gridlines.","*axrange* minimal sequence when updating axis ranges.","*layoutstyle* reapplies global and SVG cartesian axis styles.","*modebar* just updates the modebar.","*camera* just updates the camera settings for gl3d scenes.","*arraydraw* allows component arrays to invoke the redraw routines just for the","component(s) that changed.","*colorbars* only redraws colorbars."].join(" ")},s=o.flags.slice().concat(["fullReplot"]),l=a.flags.slice().concat("layoutReplot");function c(t){for(var e={},r=0;r{"use strict";var n=r(7370),i=r(17399),o=r(25059),a=r(12822),s=r(51137),l=r(99246),c=r(17499),u=l.cleanId,h=l.getFromTrace,d=o.traceIs;function f(t,e){var r=t[e],n=e.charAt(0);r&&"paper"!==r&&(t[e]=u(r,n,!0))}function p(t){function e(e,r){var n=t[e],i=t.title&&t.title[r];n&&!i&&(t.title||(t.title={}),t.title[r]=t[e],delete t[e])}t&&("string"!=typeof t.title&&"number"!=typeof t.title||(t.title={text:t.title}),e("titlefont","font"),e("titleposition","position"),e("titleside","side"),e("titleoffset","offset"))}function m(t){if(!a.isPlainObject(t))return!1;var e=t.name;return delete t.name,delete t.showlegend,("string"==typeof e||"number"==typeof e)&&String(e)}function g(t,e,r,n){if(r&&!n)return t;if(n&&!r)return e;if(!t.trim())return e;if(!e.trim())return t;var i,o=Math.min(t.length,e.length);for(i=0;i0&&a.log("Clearing previous rejected promises from queue."),t._promises=[]},e.cleanLayout=function(t){var r,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var o=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,h=(s.subplotsRegistry.ternary||{}).attrRegex,d=(s.subplotsRegistry.gl3d||{}).attrRegex,m=Object.keys(t);for(r=0;r3?(D.x=1.02,D.xanchor="left"):D.x<-2&&(D.x=-.02,D.xanchor="right"),D.y>3?(D.y=1.02,D.yanchor="bottom"):D.y<-2&&(D.y=-.02,D.yanchor="top")),p(t),"rotate"===t.dragmode&&(t.dragmode="orbit"),c.clean(t),t.template&&t.template.layout&&e.cleanLayout(t.template.layout),t},e.cleanData=function(t){for(var r=0;r0)return t.substr(0,e)}e.hasParent=function(t,e){for(var r=x(e);r;){if(r in t)return!0;r=x(r)}return!1};var _=["x","y","z"];e.clearAxisTypes=function(t,e,r){for(var n=0;n{"use strict";var n=r(57755);e._doPlot=n._doPlot,e.newPlot=n.newPlot,e.restyle=n.restyle,e.relayout=n.relayout,e.redraw=n.redraw,e.update=n.update,e._guiRestyle=n._guiRestyle,e._guiRelayout=n._guiRelayout,e._guiUpdate=n._guiUpdate,e._storeDirectGUIEdit=n._storeDirectGUIEdit,e.react=n.react,e.extendTraces=n.extendTraces,e.prependTraces=n.prependTraces,e.addTraces=n.addTraces,e.deleteTraces=n.deleteTraces,e.moveTraces=n.moveTraces,e.purge=n.purge,e.addFrames=n.addFrames,e.deleteFrames=n.deleteFrames,e.animate=n.animate,e.setPlotConfig=n.setPlotConfig;var i=r(16822).getGraphDiv,o=r(71422).eraseActiveShape;e.deleteActiveShape=function(t){return o(i(t))},e.toImage=r(42704),e.validate=r(56205),e.downloadImage=r(56787);var a=r(89170);e.makeTemplate=a.makeTemplate,e.validateTemplate=a.validateTemplate},50305:(t,e,r)=>{"use strict";var n=r(12517),i=r(51648),o=r(64347),a=r(45380).sorterAsc,s=r(25059);e.containerArrayMatch=r(81776);var l=e.isAddVal=function(t){return"add"===t||n(t)},c=e.isRemoveVal=function(t){return null===t||"remove"===t};e.applyContainerArrayChanges=function(t,e,r,n,u){var h=e.astr,d=s.getComponentMethod(h,"supplyLayoutDefaults"),f=s.getComponentMethod(h,"draw"),p=s.getComponentMethod(h,"drawOne"),m=n.replot||n.recalc||d===i||f===i,g=t.layout,v=t._fullLayout;if(r[""]){Object.keys(r).length>1&&o.warn("Full array edits are incompatible with other edits",h);var b=r[""][""];if(c(b))e.set(null);else{if(!Array.isArray(b))return o.warn("Unrecognized full array edit value",h,b),!0;e.set(b)}return!m&&(d(g,v),f(t),!0)}var y,x,_,w,k,A,M,T,S=Object.keys(r).map(Number).sort(a),C=e.get(),E=C||[],L=u(v,h).get(),z=[],O=-1,D=E.length;for(y=0;yE.length-(M?0:1))o.warn("index out of range",h,_);else if(void 0!==A)k.length>1&&o.warn("Insertion & removal are incompatible with edits to the same index.",h,_),c(A)?z.push(_):M?("add"===A&&(A={}),E.splice(_,0,A),L&&L.splice(_,0,{})):o.warn("Unrecognized full object edit value",h,_,A),-1===O&&(O=_);else for(x=0;x=0;y--)E.splice(z[y],1),L&&L.splice(z[y],1);if(E.length?C||e.set(E):e.set(null),m)return!1;if(d(g,v),p!==i){var I;if(-1===O)I=S;else{for(D=Math.max(E.length,D),I=[],y=0;y=O);y++)I.push(_);for(y=O;y{"use strict";var n=r(27941),i=r(7370),o=r(56885),a=r(12822),s=a.nestedProperty,l=r(16677),c=r(79385),u=r(25059),h=r(35852),d=r(51137),f=r(75815),p=r(46458),m=r(86130),g=r(40666),v=r(17499),b=r(30977).initInteractions,y=r(25853),x=r(70059).clearOutline,_=r(58389).dfltConfig,w=r(50305),k=r(32862),A=r(39004),M=r(62309),T=r(21197).AX_NAME_PATTERN,S=0;function C(t){var e=t._fullLayout;e._redrawFromAutoMarginCount?e._redrawFromAutoMarginCount--:t.emit("plotly_afterplot")}function E(t,e){try{t._fullLayout._paper.style("background",e)}catch(t){a.error(t)}}function L(t,e){E(t,v.combine(e,"white"))}function z(t,e){if(!t._context){t._context=a.extendDeep({},_);var r=n.select("base");t._context._baseUrl=r.size()&&r.attr("href")?window.location.href.split("#")[0]:""}var i,s,l,c=t._context;if(e){for(s=Object.keys(e),i=0;i=t.data.length||i<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function I(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),D(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&D(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function R(t,e,r,n,o){!function(t,e,r,n){var i=a.isPlainObject(n);if(!Array.isArray(t.data))throw new Error("gd.data must be an array");if(!a.isPlainObject(e))throw new Error("update must be a key:value object");if(void 0===r)throw new Error("indices must be an integer or array of integers");for(var o in D(t,r,"indices"),e){if(!Array.isArray(e[o])||e[o].length!==r.length)throw new Error("attribute "+o+" must be an array of length equal to indices array length");if(i&&(!(o in n)||!Array.isArray(n[o])||n[o].length!==e[o].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(t,e,r,n);for(var l=function(t,e,r,n){var o,l,c,u,h,d=a.isPlainObject(n),f=[];for(var p in Array.isArray(r)||(r=[r]),r=O(r,t.data.length-1),e)for(var m=0;m-1&&-1===r.indexOf("grouptitlefont")?l(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?l(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?l(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&l(r,r.replace("titleoffset","title.offset")):l(r,r.replace("title","title.text"));function l(e,r){t[r]=t[e],delete t[e]}}function V(t,e,r){t=a.getGraphDiv(t),k.clearPromiseQueue(t);var n={};if("string"==typeof e)n[e]=r;else{if(!a.isPlainObject(e))return a.warn("Relayout fail.",e,r),Promise.reject();n=a.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=X(t,n),o=i.flags;o.calc&&(t.calcdata=void 0);var s=[d.previousPromises];o.layoutReplot?s.push(A.layoutReplot):Object.keys(n).length&&(H(t,o,i)||d.supplyDefaults(t),o.legend&&s.push(A.doLegend),o.layoutstyle&&s.push(A.layoutStyles),o.axrange&&W(s,i.rangesAltered),o.ticks&&s.push(A.doTicksRelayout),o.modebar&&s.push(A.doModeBar),o.camera&&s.push(A.doCamera),o.colorbars&&s.push(A.doColorBars),s.push(C)),s.push(d.rehover,d.redrag,d.reselect),c.add(t,V,[t,i.undoit],V,[t,i.redoit]);var l=a.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit("plotly_relayout",i.eventData),t}))}function H(t,e,r){var n,i,o=t._fullLayout;if(!e.axrange)return!1;for(var s in e)if("axrange"!==s&&e[s])return!1;var l=function(t,e){return a.coerce(n,i,m,t,e)},c={};for(var u in r.rangesAltered){var h=f.id2name(u);if(n=t.layout[h],i=o[h],p(n,i,l,c),i._matchGroup)for(var d in i._matchGroup)if(d!==u){var g=o[f.id2name(d)];g.autorange=i.autorange,g.range=i.range.slice(),g._input.range=i.range.slice()}}return!0}function W(t,e){var r=e?function(t){var r=[];for(var n in e){var i=f.getFromId(t,n);if(r.push(n),-1!==(i.ticklabelposition||"").indexOf("inside")&&i._anchorAxis&&r.push(i._anchorAxis._id),i._matchGroup)for(var o in i._matchGroup)e[o]||r.push(o)}return f.draw(t,r,{skipTitle:!0})}:function(t){return f.draw(t,"redraw")};t.push(x,A.doAutoRangeAndConstraints,r,A.drawData,A.finalDraw)}var q=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Y=/^[xyz]axis[0-9]*\.autorange$/,Z=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function X(t,e){var r,n,i,o=t.layout,l=t._fullLayout,c=l._guiEditing,d=j(l._preGUI,c),p=Object.keys(e),m=f.list(t),g=a.extendDeepAll({},e),v={};for(G(e),p=Object.keys(e),n=0;n0&&"string"!=typeof D.parts[R];)R--;var F=D.parts[R],P=D.parts[R-1]+"."+F,B=D.parts.slice(0,R).join("."),U=s(t.layout,B).get(),V=s(l,B).get(),H=D.get();if(void 0!==I){A[O]=I,S[O]="reverse"===F?I:N(H);var W=h.getLayoutValObject(l,D.parts);if(W&&W.impliedEdits&&null!==I)for(var X in W.impliedEdits)C(a.relativeAttr(O,X),W.impliedEdits[X]);if(-1!==["width","height"].indexOf(O))if(I){C("autosize",null);var J="height"===O?"width":"height";C(J,l[J])}else l[O]=t._initialAutoSize[O];else if("autosize"===O)C("width",I?null:l.width),C("height",I?null:l.height);else if(P.match(q))z(P),s(l,B+"._inputRange").set(null);else if(P.match(Y)){z(P),s(l,B+"._inputRange").set(null);var K=s(l,B).get();K._inputDomain&&(K._input.domain=K._inputDomain.slice())}else P.match(Z)&&s(l,B+"._inputDomain").set(null);if("type"===F){E=U;var Q="linear"===V.type&&"log"===I,tt="log"===V.type&&"linear"===I;if(Q||tt){if(E&&E.range)if(V.autorange)Q&&(E.range=E.range[1]>E.range[0]?[1,2]:[2,1]);else{var et=E.range[0],rt=E.range[1];Q?(et<=0&&rt<=0&&C(B+".autorange",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),C(B+".range[0]",Math.log(et)/Math.LN10),C(B+".range[1]",Math.log(rt)/Math.LN10)):(C(B+".range[0]",Math.pow(10,et)),C(B+".range[1]",Math.pow(10,rt)))}else C(B+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[D.parts[0]]&&"radialaxis"===D.parts[1]&&delete l[D.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(t,V,I,C),u.getComponentMethod("images","convertCoords")(t,V,I,C)}else C(B+".autorange",!0),C(B+".range",null);s(l,B+"._inputRange").set(null)}else if(F.match(T)){var nt=s(l,O).get(),it=(I||{}).type;it&&"-"!==it||(it="linear"),u.getComponentMethod("annotations","convertCoords")(t,nt,it,C),u.getComponentMethod("images","convertCoords")(t,nt,it,C)}var ot=w.containerArrayMatch(O);if(ot){r=ot.array,n=ot.index;var at=ot.property,st=W||{editType:"calc"};""!==n&&""===at&&(w.isAddVal(I)?S[O]=null:w.isRemoveVal(I)?S[O]=(s(o,r).get()||[])[n]:a.warn("unrecognized full object value",e)),M.update(_,st),v[r]||(v[r]={});var lt=v[r][n];lt||(lt=v[r][n]={}),lt[at]=I,delete e[O]}else"reverse"===F?(U.range?U.range.reverse():(C(B+".autorange",!0),U.range=[1,0]),V.autorange?_.calc=!0:_.plot=!0):("dragmode"===O&&(!1===I&&!1!==H||!1!==I&&!1===H)||l._has("scatter-like")&&l._has("regl")&&"dragmode"===O&&("lasso"===I||"select"===I)&&"lasso"!==H&&"select"!==H||l._has("gl2d")?_.plot=!0:W?M.update(_,W):_.calc=!0,D.set(I))}}for(r in v)w.applyContainerArrayChanges(t,d(o,r),v[r],_,d)||(_.plot=!0);for(var ct in L){var ut=(E=f.getFromId(t,ct))&&E._constraintGroup;if(ut)for(var ht in _.calc=!0,ut)L[ht]||(f.getFromId(t,ht)._constraintShrinkable=!0)}($(t)||e.height||e.width)&&(_.plot=!0);var dt=l.shapes;for(n=0;n1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function nt(t,e){for(var r=0;r=i.length?i[0]:i[t]:i}function l(t){return Array.isArray(o)?t>=o.length?o[0]:o[t]:o}function c(t,e){var r=0;return function(){if(t&&++r===e)return t()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(o,u){function h(){t.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&function(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,d.transition(t,e.frame.data,e.frame.layout,k.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then((function(){e.onComplete&&e.onComplete()})),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}()};e()}var f,p,m=0;function g(t){return Array.isArray(i)?m>=i.length?t.transitionOpts=i[m]:t.transitionOpts=i[0]:t.transitionOpts=i,m++,t}var v=[],b=null==e,y=Array.isArray(e);if(b||y||!a.isPlainObject(e)){if(b||-1!==["string","number"].indexOf(typeof e))for(f=0;f0&&ww)&&A.push(p);v=A}}v.length>0?function(e){if(0!==e.length){for(var i=0;i=0;n--)if(a.isPlainObject(e[n])){var m=e[n].name,g=(u[m]||p[m]||{}).name,v=e[n].name,b=u[g]||p[g];g&&v&&"number"==typeof v&&b&&S<5&&(S++,a.warn('addFrames: overwriting frame "'+(u[g]||p[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===S&&a.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),p[m]={name:m},f.push({frame:d.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:h+n})}f.sort((function(t,e){return t.index>e.index?-1:t.index=0;n--){if("number"==typeof(i=f[n].frame).name&&a.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;u[i.name="frame "+t._transitionData._counter++];);if(u[i.name]){for(o=0;o=0;r--)n=e[r],o.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:i[n]});var l=d.modifyFrames,u=d.modifyFrames,h=[t,s],f=[t,o];return c&&c.add(t,l,h,u,f),d.modifyFrames(t,o)},e.addTraces=function t(r,n,i){r=a.getGraphDiv(r);var o,s,l=[],u=e.deleteTraces,h=t,d=[r,l],f=[r,n];for(function(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r{"use strict";var e={staticPlot:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are interactive or not.","If *false*, no interactivity, for export or image generation."].join(" ")},typesetMath:{valType:"boolean",dflt:!0,description:["Determines whether math should be typeset or not,","when MathJax (either v2 or v3) is present on the page."].join(" ")},plotlyServerURL:{valType:"string",dflt:"",description:["When set it determines base URL for","the 'Edit in Chart Studio' `showEditInChartStudio`/`showSendToCloud` mode bar button","and the showLink/sendData on-graph link.","To enable sending your data to Chart Studio Cloud, you need to","set both `plotlyServerURL` to 'https://chart-studio.plotly.com' and","also set `showSendToCloud` to true."].join(" ")},editable:{valType:"boolean",dflt:!1,description:["Determines whether the graph is editable or not.","Sets all pieces of `edits`","unless a separate `edits` config item overrides individual parts."].join(" ")},edits:{annotationPosition:{valType:"boolean",dflt:!1,description:["Determines if the main anchor of the annotation is editable.","The main anchor corresponds to the","text (if no arrow) or the arrow (which drags the whole thing leaving","the arrow length & direction unchanged)."].join(" ")},annotationTail:{valType:"boolean",dflt:!1,description:["Has only an effect for annotations with arrows.","Enables changing the length and direction of the arrow."].join(" ")},annotationText:{valType:"boolean",dflt:!1,description:"Enables editing annotation text."},axisTitleText:{valType:"boolean",dflt:!1,description:"Enables editing axis title text."},colorbarPosition:{valType:"boolean",dflt:!1,description:"Enables moving colorbars."},colorbarTitleText:{valType:"boolean",dflt:!1,description:"Enables editing colorbar title text."},legendPosition:{valType:"boolean",dflt:!1,description:"Enables moving the legend."},legendText:{valType:"boolean",dflt:!1,description:"Enables editing the trace name fields from the legend"},shapePosition:{valType:"boolean",dflt:!1,description:"Enables moving shapes."},titleText:{valType:"boolean",dflt:!1,description:"Enables editing the global layout title."}},editSelection:{valType:"boolean",dflt:!0,description:"Enables moving selections."},autosizable:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are plotted with respect to","layout.autosize:true and infer its container size."].join(" ")},responsive:{valType:"boolean",dflt:!1,description:["Determines whether to change the layout size when window is resized.","In v3, this option will be removed and will always be true."].join(" ")},fillFrame:{valType:"boolean",dflt:!1,description:["When `layout.autosize` is turned on, determines whether the graph","fills the container (the default) or the screen (if set to *true*)."].join(" ")},frameMargins:{valType:"number",dflt:0,min:0,max:.5,description:["When `layout.autosize` is turned on, set the frame margins","in fraction of the graph size."].join(" ")},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox",description:["Determines whether mouse wheel or two-finger scroll zooms is enable.","Turned on by default for gl3d, geo and mapbox subplots","(as these subplot types do not have zoombox via pan),","but turned off by default for cartesian subplots.","Set `scrollZoom` to *false* to disable scrolling for all subplots."].join(" ")},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize",description:["Sets the double click interaction mode.","Has an effect only in cartesian plots.","If *false*, double click is disable.","If *reset*, double click resets the axis ranges to their initial values.","If *autosize*, double click set the axis ranges to their autorange values.","If *reset+autosize*, the odd double clicks resets the axis ranges","to their initial values and even double clicks set the axis ranges","to their autorange values."].join(" ")},doubleClickDelay:{valType:"number",dflt:300,min:0,description:["Sets the delay for registering a double-click in ms.","This is the time interval (in ms) between first mousedown and","2nd mouseup to constitute a double-click.","This setting propagates to all on-subplot double clicks","(except for geo and mapbox) and on-legend double clicks."].join(" ")},showAxisDragHandles:{valType:"boolean",dflt:!0,description:["Set to *false* to omit cartesian axis pan/zoom drag handles."].join(" ")},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0,description:["Set to *false* to omit direct range entry at the pan/zoom drag points,","note that `showAxisDragHandles` must be enabled to have an effect."].join(" ")},showTips:{valType:"boolean",dflt:!0,description:["Determines whether or not tips are shown while interacting","with the resulting graphs."].join(" ")},showLink:{valType:"boolean",dflt:!1,description:["Determines whether a link to Chart Studio Cloud is displayed","at the bottom right corner of resulting graphs.","Use with `sendData` and `linkText`."].join(" ")},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0,description:["Sets the text appearing in the `showLink` link."].join(" ")},sendData:{valType:"boolean",dflt:!0,description:["If *showLink* is true, does it contain data","just link to a Chart Studio Cloud file?"].join(" ")},showSources:{valType:"any",dflt:!1,description:["Adds a source-displaying function to show sources on","the resulting graphs."].join(" ")},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover",description:["Determines the mode bar display mode.","If *true*, the mode bar is always visible.","If *false*, the mode bar is always hidden.","If *hover*, the mode bar is visible while the mouse cursor","is on the graph container."].join(" ")},showSendToCloud:{valType:"boolean",dflt:!1,description:['Should we include a ModeBar button, labeled "Edit in Chart Studio",',"that sends this chart to chart-studio.plotly.com (formerly plot.ly) or another plotly server","as specified by `plotlyServerURL` for editing, export, etc? Prior to version 1.43.0","this button was included by default, now it is opt-in using this flag.","Note that this button can (depending on `plotlyServerURL` being set) send your data","to an external server. However that server does not persist your data",'until you arrive at the Chart Studio and explicitly click "Save".'].join(" ")},showEditInChartStudio:{valType:"boolean",dflt:!1,description:["Same as `showSendToCloud`, but use a pencil icon instead of a floppy-disk.","Note that if both `showSendToCloud` and `showEditInChartStudio` are turned,","only `showEditInChartStudio` will be honored."].join(" ")},modeBarButtonsToRemove:{valType:"any",dflt:[],description:["Remove mode bar buttons by name.","See ./components/modebar/buttons.js for the list of names."].join(" ")},modeBarButtonsToAdd:{valType:"any",dflt:[],description:["Add mode bar button using config objects","See ./components/modebar/buttons.js for list of arguments.","To enable predefined modebar buttons e.g. shape drawing, hover and spikelines,","simply provide their string name(s). This could include:","*v1hovermode*, *hoverclosest*, *hovercompare*, *togglehover*, *togglespikelines*,","*drawline*, *drawopenpath*, *drawclosedpath*, *drawcircle*, *drawrect* and *eraseshape*.","Please note that these predefined buttons will only be shown if they are compatible","with all trace types used in a graph."].join(" ")},modeBarButtons:{valType:"any",dflt:!1,description:["Define fully custom mode bar buttons as nested array,","where the outer arrays represents button groups, and","the inner arrays have buttons config objects or names of default buttons","See ./components/modebar/buttons.js for more info."].join(" ")},toImageButtonOptions:{valType:"any",dflt:{},description:["Statically override options for toImage modebar button","allowed keys are format, filename, width, height, scale","see ../components/modebar/buttons.js"].join(" ")},displaylogo:{valType:"boolean",dflt:!0,description:["Determines whether or not the plotly logo is displayed","on the end of the mode bar."].join(" ")},watermark:{valType:"boolean",dflt:!1,description:"watermark the images with the company's logo"},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4,description:["Set the pixel ratio during WebGL image export.","This config option was formerly named `plot3dPixelRatio`","which is now deprecated."].join(" ")},setBackground:{valType:"any",dflt:"transparent",description:["Set function to add the background color (i.e. `layout.paper_color`)","to a different container.","This function take the graph div as first argument and the current background","color as second argument.","Alternatively, set to string *opaque* to ensure there is white behind it."].join(" ")},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/",description:["Set the URL to topojson used in geo charts.","By default, the topojson files are fetched from cdn.plot.ly.","For example, set this option to:","/dist/topojson/","to render geographical feature using the topojson files","that ship with the plotly.js module."].join(" ")},mapboxAccessToken:{valType:"string",dflt:null,description:["Mapbox access token (required to plot mapbox trace types)","If using an Mapbox Atlas server, set this option to ''","so that plotly.js won't attempt to authenticate to the public Mapbox server."].join(" ")},logging:{valType:"integer",min:0,max:2,dflt:1,description:["Turn all console logging on or off (errors will be thrown)","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0,description:["Set on-graph logging (notifier) level","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no on-graph logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},queueLength:{valType:"integer",min:0,dflt:0,description:"Sets the length of the undo/redo queue."},globalTransforms:{valType:"any",dflt:[],description:["Set global transform to be applied to all traces with no","specification needed"].join(" ")},locale:{valType:"string",dflt:"en-US",description:["Which localization should we use?","Should be a string like 'en' or 'en-US'."].join(" ")},locales:{valType:"any",dflt:{},description:["Localization definitions","Locales can be provided either here (specific to one chart) or globally","by registering them as modules.","Should be an object of objects {locale: {dictionary: {...}, format: {...}}}","{"," da: {"," dictionary: {'Reset axes': 'Nulstil aksler', ...},"," format: {months: [...], shortMonths: [...]}"," },"," ...","}","All parts are optional. When looking for translation or format fields, we","look first for an exact match in a config locale, then in a registered","module. If those fail, we strip off any regionalization ('en-US' -> 'en')","and try each (config, registry) again. The final fallback for translation","is untranslated (which is US English) and for formats is the base English","(the only consequence being the last fallback date format %x is DD/MM/YYYY","instead of MM/DD/YYYY). Currently `grouping` and `currency` are ignored","for our automatic number formatting, but can be used in custom formats."].join(" ")}},r={};!function t(e,r){for(var n in e){var i=e[n];i.valType?r[n]=i.dflt:(r[n]||(r[n]={}),t(i,r[n]))}}(e,r),t.exports={configAttributes:e,dfltConfig:r}},35852:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822),o=r(3520),a=r(13195),s=r(53874),l=r(46367),c=r(58389).configAttributes,u=r(62309),h=i.extendDeepAll,d=i.isPlainObject,f=i.isArrayOrTypedArray,p=i.nestedProperty,m=i.valObjectMeta,g="_isSubplotObj",v="_isLinkedToArray",b="_deprecated",y=[g,v,"_arrayAttrRegexps",b];function x(t,e,r){if(!t)return!1;if(t._isLinkedToArray)if(_(e[r]))r++;else if(r=o.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var a=e[r];if(!_(a))return!1;t=o[i][a]}else t=o[i]}else t=o}}return t}function _(t){return t===Math.round(t)&&t>=0}function w(){var t,e,r={};for(t in h(r,a),n.subplotsRegistry)if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else{var u=t._module;if(u||(u=(n.modules[t.type||o.type.dflt]||{})._module),!u)return!1;if(!(i=(r=u.attributes)&&r[a])){var h=u.basePlotModule;h&&h.attributes&&(i=h.attributes[a])}i||(i=o[a])}return x(i,e,s)},e.getLayoutValObject=function(t,e){var r=function(t,e){var r,i,o,s,l=t._basePlotModules;if(l){var c;for(r=0;r{"use strict";var n=r(12822),i=r(3520),o="templateitemname",a={name:{valType:"string",editType:"none",description:["When used in a template, named items are created in the output figure","in addition to any items the figure already has in this array.","You can modify these items in the output figure by making your own","item with `templateitemname` matching this `name`","alongside your modifications (including `visible: false` or","`enabled: false` to hide it).","Has no effect outside of a template."].join(" ")}};function s(t){return t&&"string"==typeof t}function l(t){var e=t.length-1;return"s"!==t.charAt(e)&&n.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}a[o]={valType:"string",editType:"calc",description:["Used to refer to a named item in this array in the template. Named","items from the template will be created even without a matching item","in the input figure, but you can modify one by making an item with","`templateitemname` matching its `name`, alongside your modifications","(including `visible: false` or `enabled: false` to hide it).","If there is no template or no matching item, this item will be","hidden unless you explicitly show it with `visible: true`."].join(" ")},e.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=a.name,e[o]=a[o],e},e.traceTemplater=function(t){var e,r,o={};for(e in t)r=t[e],Array.isArray(r)&&r.length&&(o[e]=0);return{newTrace:function(a){var s={type:e=n.coerce(a,{},i,"type"),_template:null};if(e in o){r=t[e];var l=o[e]%r.length;o[e]++,s._template=r[l]}return s}}},e.newContainer=function(t,e,r){var i=t._template,o=i&&(i[e]||r&&i[r]);return n.isPlainObject(o)||(o=null),t[e]={_template:o}},e.arrayTemplater=function(t,e,r){var n=t._template,i=n&&n[l(e)],a=n&&n[e];Array.isArray(a)&&a.length||(a=[]);var c={};return{newItem:function(t){var e={name:t.name,_input:t},n=e[o]=t[o];if(!s(n))return e._template=i,e;for(var l=0;l=i&&(r._input||{})._templateitemname;s&&(a=i);var l,c=e+"["+a+"]";function u(){l={},s&&(l[c]={},l[c][o]=s)}function h(t,e){s?n.nestedProperty(l[c],t).set(e):l[c+"."+t]=e}function d(){var t=l;return u(),t}return u(),{modifyBase:function(t,e){l[t]=e},modifyItem:h,getUpdateObj:d,applyUpdate:function(e,r){e&&h(e,r);var i=d();for(var o in i)n.nestedProperty(t,o).set(i[o])}}}},39004:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(51137),a=r(12822),s=r(80394),l=r(86748),c=r(17499),u=r(40666),h=r(6883),d=r(45828),f=r(75815),p=r(89701),m=r(69352),g=m.enforce,v=m.clean,b=r(19496).doAutoRange,y="start";function x(t,e,r){for(var n=0;n=t[1]||i[1]<=t[0])&&o[0]e[0])return!0}return!1}function _(t){var r,i,s,l,h,m,g=t._fullLayout,v=g._size,b=v.p,y=f.list(t,"",!0);if(g._paperdiv.style({width:t._context.responsive&&g.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":g.width+"px",height:t._context.responsive&&g.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(u.setSize,g.width,g.height),t._context.setBackground(t,g.paper_bgcolor),e.drawMainTitle(t),d.manage(t),!g._has("cartesian"))return o.previousPromises(t);function _(t,e,r){var n=t._lw/2;return"x"===t._id.charAt(0)?e?"top"===r?e._offset-b-n:e._offset+e._length+b+n:v.t+v.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+b+n:e._offset-b-n:v.l+v.w*(t.position||0)+n%1}for(r=0;r.5?"t":"b",a=t._fullLayout.margin[o],s=0;return"paper"===e.yref?s=r+e.pad.t+e.pad.b:"container"===e.yref&&(s=function(t,e,r,n,i){var o=0;return"middle"===r&&(o+=i/2),"t"===t?("top"===r&&(o+=i),o+=n-e*n):("bottom"===r&&(o+=i),o+=e*n),o}(o,n,i,t._fullLayout.height,r)+e.pad.t+e.pad.b),s>a?s:0}(t,r,g);if(v>0){!function(t,e,r,n){var i="title.automargin",s=t._fullLayout.title,l=s.y>.5?"t":"b",c={x:s.x,y:s.y,t:0,b:0},u={};"paper"===s.yref&&function(t,e,r,n,i){var o="paper"===e.yref?t._fullLayout._size.h:t._fullLayout.height,s=a.isTopAnchor(e)?n:n-i,l="b"===r?o-s:s;return!(a.isTopAnchor(e)&&"t"===r||a.isBottomAnchor(e)&&"b"===r)&&l{"use strict";var n=r(12822),i=n.isPlainObject,o=r(35852),a=r(51137),s=r(3520),l=r(46121),c=r(58389).dfltConfig;function u(t,e){t=n.extendDeep({},t);var r,o,a=Object.keys(t).sort();function s(e,r,n){if(i(r)&&i(e))u(e,r);else if(Array.isArray(r)&&Array.isArray(e)){var a=l.arrayTemplater({_template:t},n);for(o=0;ok?u.push({code:"unused",traceType:b,templateCount:w,dataCount:k}):k>w&&u.push({code:"reused",traceType:b,templateCount:w,dataCount:k})}}else u.push({code:"data"});if(function t(e,r){for(var n in e)if("_"!==n.charAt(0)){var o=e[n],a=m(e,n,r);i(o)?(Array.isArray(e)&&!1===o._template&&o.templateitemname&&u.push({code:"missing",path:a,templateitemname:o.templateitemname}),t(o,a)):Array.isArray(o)&&g(o)&&t(o,a)}}({data:f,layout:d},""),u.length)return u.map(v)}},42704:(t,e,r)=>{"use strict";var n=r(7370),i=r(57755),o=r(51137),a=r(12822),s=r(13078),l=r(48402),c=r(40241),u=r(88566).version,h={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png",description:"Sets the format of exported image."},width:{valType:"number",min:1,description:["Sets the exported image width.","Defaults to the value found in `layout.width`","If set to *null*, the exported image width will match the current graph width."].join(" ")},height:{valType:"number",min:1,description:["Sets the exported image height.","Defaults to the value found in `layout.height`","If set to *null*, the exported image height will match the current graph height."].join(" ")},scale:{valType:"number",min:0,dflt:1,description:["Sets a scaling for the generated image.","If set, all features of a graphs (e.g. text, line width)","are scaled, unlike simply setting","a bigger *width* and *height*."].join(" ")},setBackground:{valType:"any",dflt:!1,description:["Sets the image background mode.","By default, the image background is determined by `layout.paper_bgcolor`,","the *transparent* mode.","One might consider setting `setBackground` to *opaque*","when exporting a *jpeg* image as JPEGs do not support opacity."].join(" ")},imageDataOnly:{valType:"boolean",dflt:!1,description:["Determines whether or not the return value is prefixed by","the image format's corresponding 'data:image;' spec."].join(" ")}};t.exports=function(t,e){var r,d,f,p;function m(t){return!(t in e)||a.validate(e[t],h[t])}if(e=e||{},a.isPlainObject(t)?(r=t.data||[],d=t.layout||{},f=t.config||{},p={}):(t=a.getGraphDiv(t),r=a.extendDeep([],t.data),d=a.extendDeep({},t.layout),f=t._context,p=t._fullLayout||{}),!m("width")&&null!==e.width||!m("height")&&null!==e.height)throw new Error("Height and width should be pixel values.");if(!m("format"))throw new Error("Export format is not "+a.join2(h.format.values,", "," or ")+".");var g={};function v(t,r){return a.coerce(e,g,h,t,r)}var b=v("format"),y=v("width"),x=v("height"),_=v("scale"),w=v("setBackground"),k=v("imageDataOnly"),A=document.createElement("div");A.style.position="absolute",A.style.left="-5000px",document.body.appendChild(A);var M=a.extendFlat({},d);y?M.width=y:null===e.width&&n(p.width)&&(M.width=p.width),x?M.height=x:null===e.height&&n(p.height)&&(M.height=p.height);var T=a.extendFlat({},f,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(A);function C(){return new Promise((function(t){setTimeout(t,s.getDelay(A._fullLayout))}))}function E(){return new Promise((function(t,e){var r=l(A,b,_),n=A._fullLayout.width,h=A._fullLayout.height;function d(){i.purge(A),document.body.removeChild(A)}if("full-json"===b){var f=o.graphJson(A,!1,"keepdata","object",!0,!0);return f.version=u,f=JSON.stringify(f),d(),t(k?f:s.encodeJSON(f))}if(d(),"svg"===b)return t(k?r:s.encodeSVG(r));var p=document.createElement("canvas");p.id=a.randstr(),c({format:b,width:n,height:h,scale:_,canvas:p,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.newPlot(A,r,M,T).then(S).then(C).then(E).then((function(e){t(function(t){return k?t.replace(s.IMAGE_URL_PREFIX,""):t}(e))})).catch((function(t){e(t)}))}))}},56205:(t,e,r)=>{"use strict";var n=r(12822),i=r(51137),o=r(35852),a=r(58389).dfltConfig,s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function u(t,e,r,i,o,a){a=a||[];for(var h=Object.keys(t),d=0;dy.length&&i.push(f("unused",o,v.concat(y.length)));var M,T,S,C,E,L=y.length,z=Array.isArray(A);if(z&&(L=Math.min(L,A.length)),2===x.dimensions)for(T=0;Ty[T].length&&i.push(f("unused",o,v.concat(T,y[T].length)));var O=y[T].length;for(M=0;M<(z?Math.min(O,A[T].length):O);M++)S=z?A[T][M]:A,C=b[T][M],E=y[T][M],n.validate(C,S)?E!==C&&E!==+C&&i.push(f("dynamic",o,v.concat(T,M),C,E)):i.push(f("value",o,v.concat(T,M),C))}else i.push(f("array",o,v.concat(T),b[T]));else for(T=0;T1&&d.push(f("object","layout"))),i.supplyDefaults(p);for(var m=p._fullData,g=r.length,v=0;v{"use strict";t.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"],description:["Describes how a new animate call interacts with currently-running","animations. If `immediate`, current animations are interrupted and","the new animation is started. If `next`, the current frame is allowed","to complete, after which the new animation is started. If `afterall`","all existing frames are animated to completion before the new animation","is started."].join(" ")},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward",description:["The direction in which to play the frames triggered by the animation call"].join(" ")},fromcurrent:{valType:"boolean",dflt:!1,description:["Play frames starting at the current frame instead of the beginning."].join(" ")},frame:{duration:{valType:"number",min:0,dflt:500,description:["The duration in milliseconds of each frame. If greater than the frame","duration, it will be limited to the frame duration."].join(" ")},redraw:{valType:"boolean",dflt:!0,description:["Redraw the plot at completion of the transition. This is desirable","for transitions that include properties that cannot be transitioned,","but may significantly slow down updates that do not require a full","redraw of the plot"].join(" ")}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none",description:["The duration of the transition, in milliseconds. If equal to zero,","updates are synchronous."].join(" ")},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none",description:"The easing function used for the transition"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none",description:["Determines whether the figure's layout or traces smoothly transitions","during updates that make both traces and layout change."].join(" ")}}}},35677:(t,e,r)=>{"use strict";var n=r(12822),i=r(46121);t.exports=function(t,e,r){var o,a,s=r.name,l=r.inclusionAttr||"visible",c=e[s],u=n.isArrayOrTypedArray(t[s])?t[s]:[],h=e[s]=[],d=i.arrayTemplater(e,s,l);for(o=0;o{"use strict";var n=r(75058),i=r(60713);t.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc",description:["Determines whether or not this trace is visible.","If *legendonly*, the trace is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")},showlegend:{valType:"boolean",dflt:!0,editType:"style",description:["Determines whether or not an item corresponding to this","trace is shown in the legend."].join(" ")},legend:{valType:"subplotid",dflt:"legend",editType:"style",description:["Sets the reference to a legend to show this trace in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")},legendgroup:{valType:"string",dflt:"",editType:"style",description:["Sets the legend group for this trace.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style",description:["Sets the title of the legend group."].join(" ")},font:n({editType:"style",description:["Sets this legend group's title font."].join(" ")}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style",description:["Sets the legend rank for this trace.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items.","When having unranked or equal rank items shapes would be displayed after traces","i.e. according to their order in data and layout."].join(" ")},legendwidth:{valType:"number",min:0,editType:"style",description:"Sets the width (in px or fraction) of the legend for this trace."},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style",description:"Sets the opacity of the trace."},name:{valType:"string",editType:"style",description:["Sets the trace name.","The trace name appears as the legend item and on hover."].join(" ")},uid:{valType:"string",editType:"plot",anim:!0,description:["Assign an id to this trace,","Use this to provide object constancy between traces during animations","and transitions."].join(" ")},ids:{valType:"data_array",editType:"calc",anim:!0,description:["Assigns id labels to each datum.","These ids for object constancy of data points during animation.","Should be an array of strings, not numbers or any other type."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data each datum.","This may be useful when listening to hover, click and selection events.","Note that, *scatter* traces also appends customdata items in the markers","DOM elements"].join(" ")},meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information associated with this trace","that can be used in various text attributes.","Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text`","`rangeselector`, `updatemenues` and `sliders` `label` text","all support `meta`.","To access the trace `meta` values in an attribute in the same trace, simply use","`%{meta[i]}` where `i` is the index or key of the `meta`","item in question.","To access trace `meta` in layout attributes, use","`%{data[n[.meta[i]}` where `i` is the index or key of the `meta`","and `n` is the trace index."].join(" ")},selectedpoints:{valType:"any",editType:"calc",description:["Array containing integer indices of selected points.","Has an effect only for traces that support selections.","Note that an empty array means an empty selection where the `unselected`","are turned on for all points, whereas, any other non-array values means no","selection all where the `selected` and `unselected` styles have no effect."].join(" ")},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none",description:["Determines which trace information appear on hover.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:i.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc",description:["The stream id number links a data trace on a plot with a stream.","See https://chart-studio.plotly.com/settings for more details."].join(" ")},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc",description:["Sets the maximum number of points to keep on the plots from an","incoming stream.","If `maxpoints` is set to *50*, only the newest 50 points will","be displayed on the plot."].join(" ")},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc",description:["WARNING: All transforms are deprecated and may be removed from the API in next major version.","An array of operations that manipulate the trace data,","for example filtering or sorting the data arrays."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of some user-driven changes to the trace:","`constraintrange` in `parcoords` traces, as well as some","`editable: true` modifications such as `name` and `colorbar.title`.","Defaults to `layout.uirevision`.","Note that other user-driven trace attribute changes are controlled","by `layout` attributes:","`trace.visible` is controlled by `layout.legend.uirevision`,","`selectedpoints` is controlled by `layout.selectionrevision`,","and `colorbar.(x|y)` (accessible with `config: {editable: true}`)","is controlled by `layout.editrevision`.","Trace changes are tracked by `uid`, which only falls back on trace","index if no `uid` is provided. So if your app can add/remove traces","before the end of the `data` array, such that the same trace has a","different index, you can still preserve user-driven changes if you","give each trace a `uid` that stays with it as it moves."].join(" ")}}},15389:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822),o=i.dateTime2ms,a=i.incrementMonth,s=r(32994).ONEAVGMONTH;t.exports=function(t,e,r,i){if("date"!==e.type)return{vals:i};var l=t[r+"periodalignment"];if(!l)return{vals:i};var c,u=t[r+"period"];if(n(u)){if((u=+u)<=0)return{vals:i}}else if("string"==typeof u&&"M"===u.charAt(0)){var h=+u.substring(1);if(!(h>0&&Math.round(h)===h))return{vals:i};c=h}for(var d=e.calendar,f="start"===l,p="end"===l,m=t[r+"period0"],g=o(m,d)||0,v=[],b=[],y=[],x=i.length,_=0;_M;)A=a(A,-c,d);for(;A<=M;)A=a(A,c,d);k=a(A,-c,d)}else{for(A=g+(w=Math.round((M-g)/u))*u;A>M;)A-=u;for(;A<=M;)A+=u;k=A-u}v[_]=f?k:p?A:(k+A)/2,b[_]=k,y[_]=A}return{vals:v,starts:b,ends:y}}},36187:t=>{"use strict";t.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's x coordinates and","a 2D cartesian x axis.","If *x* (the default value), the x coordinates refer to","`layout.xaxis`.","If *x2*, the x coordinates refer to `layout.xaxis2`, and so on."].join(" ")},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's y coordinates and","a 2D cartesian y axis.","If *y* (the default value), the y coordinates refer to","`layout.yaxis`.","If *y2*, the y coordinates refer to `layout.yaxis2`, and so on."].join(" ")}}},19496:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=r(12822),a=r(32994).FP_SAFE,s=r(25059),l=r(40666),c=r(99246),u=c.getFromId,h=c.isLinked;function d(t,e){var r,n,i=[],a=t._fullLayout,s=p(a,e,0),l=p(a,e,1),c=g(t,e),u=c.min,h=c.max;if(0===u.length||0===h.length)return o.simpleMap(e.range,e.r2l);var d=u[0].val,m=h[0].val;for(r=1;r0&&((M=L-s(x)-l(_))>z?T/M>O&&(w=x,k=_,O=T/M):T/L>O&&(w={val:x.val,nopad:1},k={val:_.val,nopad:1},O=T/L));if(d===m){var D=d-1,I=d+1;if(C)if(0===d)i=[0,1];else{var R=(d>0?h:u).reduce((function(t,e){return Math.max(t,l(e))}),0),F=d/(1-Math.min(.5,R/L));i=d>0?[0,F]:[F,0]}else i=E?[Math.max(0,D),Math.max(1,I)]:[D,I]}else C?(w.val>=0&&(w={val:0,nopad:1}),k.val<=0&&(k={val:0,nopad:1})):E&&(w.val-O*s(w)<0&&(w={val:0,nopad:1}),k.val<=0&&(k={val:1,nopad:1})),O=(k.val-w.val-f(e,x.val,_.val))/(L-s(w)-l(k)),i=[w.val-O*s(w),k.val+O*l(k)];return i=A(i,e),e.limitRange&&e.limitRange(),b&&i.reverse(),o.simpleMap(i,e.l2r||Number)}function f(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),o=0;o0?r.ppadplus:r.ppadminus)||r.ppad||0),S=M((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),C=M(r.vpadplus||r.vpad),E=M(r.vpadminus||r.vpad);if(!k){if(d=1/0,f=-1/0,w)for(n=0;n0&&(d=o),o>f&&o-a&&(d=o),o>f&&o=O;n--)z(n);return{min:p,max:m,opts:r}},concatExtremes:g};var m=3;function g(t,e,r){var n,i,o,a=e._id,s=t._fullData,l=t._fullLayout,c=[],h=[];function d(t,e){for(n=0;n=r&&(c.extrapad||!a)){s=!1;break}i(e,c.val)&&c.pad<=r&&(a||!c.extrapad)&&(t.splice(l,1),l--)}if(s){var u=o&&0===e;t.push({val:e,pad:u?0:r,extrapad:!u&&a})}}function x(t){return i(t)&&Math.abs(t)=e}function k(t,e,r){return void 0===e||void 0===r||(e=t.d2l(e))=c&&(a=c,r=c),s<=c&&(s=c,n=c)}}return r=function(t,e){var r=e.autorangeoptions;return r&&void 0!==r.minallowed&&k(e,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&k(e,r.clipmin,r.clipmax)?Math.max(t,e.d2l(r.clipmin)):t}(r,e),n=function(t,e){var r=e.autorangeoptions;return r&&void 0!==r.maxallowed&&k(e,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&k(e,r.clipmin,r.clipmax)?Math.min(t,e.d2l(r.clipmax)):t}(n,e),[r,n]}},49826:t=>{"use strict";t.exports=function(t,e,r){var n,i;if(r){var o="reversed"===e||"min reversed"===e||"max reversed"===e;n=r[o?1:0],i=r[o?0:1]}var a=t("autorangeoptions.minallowed",null===i?n:void 0),s=t("autorangeoptions.maxallowed",null===n?i:void 0);void 0===a&&t("autorangeoptions.clipmin"),void 0===s&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}},75815:(t,e,r)=>{"use strict";var n=r(27941),i=r(7370),o=r(51137),a=r(25059),s=r(12822),l=s.strTranslate,c=r(80394),u=r(6883),h=r(17499),d=r(40666),f=r(86130),p=r(84696),m=r(32994),g=m.ONEMAXYEAR,v=m.ONEAVGYEAR,b=m.ONEMINYEAR,y=m.ONEMAXQUARTER,x=m.ONEAVGQUARTER,_=m.ONEMINQUARTER,w=m.ONEMAXMONTH,k=m.ONEAVGMONTH,A=m.ONEMINMONTH,M=m.ONEWEEK,T=m.ONEDAY,S=T/2,C=m.ONEHOUR,E=m.ONEMIN,L=m.ONESEC,z=m.MINUS_SIGN,O=m.BADNUM,D={K:"zeroline"},I={K:"gridline",L:"path"},R={K:"minor-gridline",L:"path"},F={K:"tick",L:"path"},P={K:"tick",L:"text"},N={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},j=r(89701),B=j.MID_SHIFT,U=j.CAP_SHIFT,G=j.LINE_SPACING,V=j.OPPOSITE_SIDE,H=t.exports={};H.setConvert=r(30632);var W=r(17821),q=r(99246),Y=q.idSort,Z=q.isLinked;H.id2name=q.id2name,H.name2id=q.name2id,H.cleanId=q.cleanId,H.list=q.list,H.listIds=q.listIds,H.getFromId=q.getFromId,H.getFromTrace=q.getFromTrace;var X=r(19496);H.getAutoRange=X.getAutoRange,H.findExtremes=X.findExtremes;var $=1e-4;function J(t){var e=(t[1]-t[0])*$;return[t[0]-e,t[1]+e]}H.coerceRef=function(t,e,r,n,i,o){var a=n.charAt(n.length-1),l=r._fullLayout._subplots[a+"axis"],c=n+"ref",u={};return i||(i=l[0]||("string"==typeof o?o:o[0])),o||(o=i),l=l.concat(l.map((function(t){return t+" domain"}))),u[c]={valType:"enumerated",values:l.concat(o?"string"==typeof o?[o]:o:[]),dflt:i},s.coerce(t,e,u,c)},H.getRefType=function(t){return void 0===t?t:"paper"===t?"paper":"pixel"===t?"pixel":/( domain)$/.test(t)?"domain":"range"},H.coercePosition=function(t,e,r,n,i,o){var a,l;if("range"!==H.getRefType(n))a=s.ensureNumber,l=r(i,o);else{var c=H.getFromId(e,n);l=r(i,o=c.fraction2r(o)),a=c.cleanPos}t[i]=a(l)},H.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:H.getFromId(e,r).cleanPos)(t)},H.redrawComponents=function(t,e){e=e||H.listIds(t);var r=t._fullLayout;function n(n,i,o,s){for(var l=a.getComponentMethod(n,i),c={},u=0;un&&d2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},H.saveRangeInitial=function(t,e){for(var r=H.list(t,"",!0),n=!1,i=0;i.3*d||u(n)||u(o))){var f=r.dtick/2;t+=t+f.8){var a=Number(r.substr(1));o.exactYears>.8&&a%12==0?t=H.tickIncrement(t,"M6","reverse")+1.5*T:o.exactMonths>.8?t=H.tickIncrement(t,"M1","reverse")+15.5*T:t-=S;var l=H.tickIncrement(t,r);if(l<=n)return l}return t}(b,t,v,c,o)),g=b;g<=u;)g=H.tickIncrement(g,v,!1,o);return{start:e.c2r(b,0,o),end:e.c2r(g,0,o),size:v,_dataSpan:u-c}},H.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var n,o=e.dtick&&i(e._tmin);if(o){var a=H.tickIncrement(e._tmin,e.dtick,!0);n=[e._tmin,.99*a+.01*e._tmin]}else{var l=s.simpleMap(e.range,e.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(t.range=s.simpleMap(n,e.l2r),t._isMinor=!0,H.prepTicks(t,r),o){var c=i(e.dtick),u=i(t.dtick),h=c?e.dtick:+e.dtick.substring(1),d=u?t.dtick:+t.dtick.substring(1);c&&u?et(h,d)?h===2*M&&d===2*T&&(t.dtick=M):h===2*M&&d===3*T?t.dtick=M:h!==M||(e._input.minor||{}).nticks?rt(h/d,2.5)?t.dtick=h/2:t.dtick=h:t.dtick=T:"M"===String(e.dtick).charAt(0)?u?t.dtick="M1":et(h,d)?h>=12&&2===d&&(t.dtick="M3"):t.dtick=e.dtick:"L"===String(t.dtick).charAt(0)?"L"===String(e.dtick).charAt(0)?et(h,d)||(t.dtick=rt(h/d,2.5)?e.dtick/2:e.dtick):t.dtick="D1":"D2"===t.dtick&&+e.dtick>1&&(t.dtick=1)}t.range=e.range}void 0===e.minor._tick0Init&&(t.tick0=e.tick0)},H.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if("auto"===t.tickmode||!t.dtick){var n,o=t.nticks;o||("category"===t.type||"multicategory"===t.type?(n=t.tickfont?s.bigFont(t.tickfont.size||12):15,o=t._length/n):(n="y"===t._id.charAt(0)?40:80,o=s.constrain(t._length/n,4,9)+1),"radialaxis"===t._name&&(o*=2)),t.minor&&"array"!==t.minor.tickmode||"array"===t.tickmode&&(o*=100),t._roughDTick=Math.abs(r[1]-r[0])/o,H.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}"period"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||"M"!==t.dtick.charAt(0))}var n=r(),o=H.getTickFormat(t);if(o){var a=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(o)||(/%[HI]/.test(o)?(e=C,a&&!n&&t.dtick=(D?0:1);I--){var R=!I;I?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var F=I?t:s.extendFlat({},t,t.minor);if(R?H.prepMinorTicks(F,t,e):H.prepTicks(F,e),"array"!==F.tickmode)if("sync"!==F.tickmode){var P=J(u),N=P[0],j=P[1],B=i(F.dtick),U="log"===o&&!(B||"L"===F.dtick.charAt(0)),G=H.tickFirst(F,e);if(I){if(t._tmin=G,G=j:Y<=j;Y=H.tickIncrement(Y,Z,h,a)){if(I&&V++,F.rangebreaks&&!h){if(Y=f)break}if(L.length>p||Y===q)break;q=Y;var X={value:Y};I?(U&&Y!==(0|Y)&&(X.simpleLabel=!0),l>1&&V%l&&(X.skipLabel=!0),L.push(X)):(X.minor=!0,z.push(X))}}else L=[],m=ot(t);else I?(L=[],m=at(t,!R)):(z=[],E=at(t,!R))}if(D&&!("inside"===t.minor.ticks&&"outside"===t.ticks||"outside"===t.minor.ticks&&"inside"===t.ticks)){for(var $=L.map((function(t){return t.value})),K=[],Q=0;Q0?(o=n-1,a=n):(o=n,a=n);var s,l=t[o].value,c=t[a].value,u=Math.abs(c-l),h=r||u,d=0;h>=b?d=u>=b&&u<=g?u:v:r===x&&h>=_?d=u>=_&&u<=y?u:x:h>=A?d=u>=A&&u<=w?u:k:r===M&&h>=M?d=M:h>=T?d=T:r===S&&h>=S?d=S:r===C&&h>=C&&(d=C),d>=u&&(d=u,s=!0);var f=i+d;if(e.rangebreaks&&d>0){for(var p=0,m=0;m<84;m++){var E=(m+.5)/84;e.maskBreaks(i*(1-E)+E*f)!==O&&p++}(d*=p/84)||(t[n].drop=!0),s&&u>M&&(d=u)}(d>0||0===n)&&(t[n].periodX=i+d/2)}}(L,t,t._definedDelta),t.rangebreaks){var it="y"===t._id.charAt(0),st=1;"auto"===t.tickmode&&(st=t.tickfont?t.tickfont.size:12);var lt=NaN;for(r=L.length-1;r>-1;r--)if(L[r].drop)L.splice(r,1);else{L[r].value=Rt(L[r].value,t);var ct=t.c2p(L[r].value);(it?lt>ct-st:ltf||htf&&(ut.periodX=f),ht10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=T&&o<=10||e>=15*T)t._tickround="d";else if(e>=E&&o<=16||e>=C)t._tickround="M";else if(e>=L&&o<=19||e>=E)t._tickround="S";else{var a=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(o,a)-20,t._tickround<0&&(t._tickround=4)}}else if(i(e)||"L"===e.charAt(0)){var s=t.range.map(t.r2d||Number);i(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01),u=void 0===t.minexponent?3:t.minexponent;Math.abs(c)>u&&(bt(t.exponentformat)&&!yt(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function gt(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontColor:n.color}}H.autoTicks=function(t,e,r){var n;function o(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar,0);var a=2*e;if(a>v)e/=v,n=o(10),t.dtick="M"+12*pt(e,n,st);else if(a>k)e/=k,t.dtick="M"+pt(e,1,lt);else if(a>T){if(t.dtick=pt(e,T,t._hasDayOfWeekBreaks?[1,2,7,14]:ut),!r){var l=H.getTickFormat(t),c="period"===t.ticklabelmode;c&&(t._rawTick0=t.tick0),/%[uVW]/.test(l)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),c&&(t._dowTick0=t.tick0)}}else a>C?t.dtick=pt(e,C,lt):a>E?t.dtick=pt(e,E,ct):a>L?t.dtick=pt(e,L,ct):(n=o(10),t.dtick=pt(e,n,st))}else if("log"===t.type){t.tick0=0;var u=s.simpleMap(t.range,t.r2l);if(t._isMinor&&(e*=1.5),e>.7)t.dtick=Math.ceil(e);else if(Math.abs(u[1]-u[0])<1){var h=1.5*Math.abs((u[1]-u[0])/e);e=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/h,n=o(10),t.dtick="L"+pt(e,n,st)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type||"multicategory"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):It(t)?(t.tick0=0,n=1,t.dtick=pt(e,n,ft)):(t.tick0=0,n=o(10),t.dtick=pt(e,n,st));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&"string"!=typeof t.dtick){var d=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(d)}},H.tickIncrement=function(t,e,r,o){var a=r?-1:1;if(i(e))return s.increment(t,a*e);var l=e.charAt(0),c=a*Number(e.substr(1));if("M"===l)return s.incrementMonth(t,c,o);if("L"===l)return Math.log(Math.pow(10,t)+c)/Math.LN10;if("D"===l){var u="D2"===e?dt:ht,h=t+.01*a,d=s.roundUp(s.mod(h,1),u,r);return Math.floor(h)+Math.log(n.round(Math.pow(10,d),1))/Math.LN10}throw"unrecognized dtick "+String(e)},H.tickFirst=function(t,e){var r=t.r2l||Number,o=s.simpleMap(t.range,r,void 0,void 0,e),a=o[1]=0&&r<=t._length?e:null};if(l&&s.isArrayOrTypedArray(t.ticktext)){var f=s.simpleMap(t.range,t.r2l),p=(Math.abs(f[1]-f[0])-(t._lBreaks||0))/1e4;for(o=0;o ")}else t._prevDateHead=l,c+="
"+l;e.text=c}(t,a,r,c):"log"===u?function(t,e,r,n,o){var a=t.dtick,l=e.x,c=t.tickformat,u="string"==typeof a&&a.charAt(0);if("never"===o&&(o=""),n&&"L"!==u&&(a="L3",u="L"),c||"L"===u)e.text=xt(Math.pow(10,l),t,o,n);else if(i(a)||"D"===u&&s.mod(l+.01,1)<.1){var h=Math.round(l),d=Math.abs(h),f=t.exponentformat;"power"===f||bt(f)&&yt(h)?(e.text=0===h?1:1===h?"10":"10"+(h>1?"":z)+d+"",e.fontSize*=1.25):("e"===f||"E"===f)&&d>2?e.text="1"+f+(h>0?"+":z)+d:(e.text=xt(Math.pow(10,l),t,"","fakehover"),"D1"===a&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(a);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if("D1"===t.dtick){var p=String(e.text).charAt(0);"0"!==p&&"1"!==p||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,a,0,c,g):"category"===u?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}(t,a):"multicategory"===u?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],o=void 0===i[1]?"":String(i[1]),a=void 0===i[0]?"":String(i[0]);r?e.text=a+" - "+o:(e.text=o,e.text2=a)}(t,a,r):It(t)?function(t,e,r,n,i){if("radians"!==t.thetaunit||r)e.text=xt(e.x,t,i,n);else{var o=e.x/180;if(0===o)e.text="0";else{var a=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){for(var r=1;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,i=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(o);if(a[1]>=100)e.text=xt(s.deg2rad(e.x),t,i,n);else{var l=e.x<0;1===a[1]?1===a[0]?e.text="π":e.text=a[0]+"π":e.text=["",a[0],"","⁄","",a[1],"","π"].join(""),l&&(e.text=z+e.text)}}}}(t,a,r,c,g):function(t,e,r,n,i){"never"===i?i="":"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=xt(e.x,t,i,n)}(t,a,0,c,g),n||(t.tickprefix&&!m(t.showtickprefix)&&(a.text=t.tickprefix+a.text),t.ticksuffix&&!m(t.showticksuffix)&&(a.text+=t.ticksuffix)),t.labelalias&&t.labelalias.hasOwnProperty(a.text)){var v=t.labelalias[a.text];"string"==typeof v&&(a.text=v)}return("boundaries"===t.tickson||t.showdividers)&&(a.xbnd=[d(a.x-.5),d(a.x+t.dtick-.5)]),a},H.hoverLabelText=function(t,e,r){r&&(t=s.extendFlat({},t,{hoverformat:r}));var n=s.isArrayOrTypedArray(e)?e[0]:e,i=s.isArrayOrTypedArray(e)?e[1]:void 0;if(void 0!==i&&i!==n)return H.hoverLabelText(t,n,r)+" - "+H.hoverLabelText(t,i,r);var o="log"===t.type&&n<=0,a=H.tickText(t,t.c2l(o?-n:n),"hover").text;return o?0===n?"0":z+a:a};var vt=["f","p","n","μ","m","","k","M","G","T"];function bt(t){return"SI"===t||"B"===t}function yt(t){return t>14||t<-15}function xt(t,e,r,n){var o=t<0,a=e._tickround,l=r||e.exponentformat||"B",c=e._tickexponent,u=H.getTickFormat(e),h=e.separatethousands;if(n){var d={exponentformat:l,minexponent:e.minexponent,dtick:"none"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};mt(d),a=(Number(d._tickround)||0)+4,c=d._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,z);var f,p=Math.pow(10,-a)/2;if("none"===l&&(c=0),(t=Math.abs(t))"+f+"
":"B"===l&&9===c?t+="B":bt(l)&&(t+=vt[c/3+5])),o?z+t:t}function _t(t,e){if(t){var r=Object.keys(N).reduce((function(t,r){return-1!==e.indexOf(r)&&N[r].forEach((function(e){t[e]=1})),t}),{});Object.keys(t).forEach((function(e){r[e]||(1===e.length?t[e]=0:delete t[e])}))}}function wt(t,e){for(var r=[],n={},i=0;i1&&r=i.min&&t=0,o=u(t,e[1])<=0;return(r||i)&&(n||o)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":for(e=0;e=a(i)))){r=n;break}break;case"log":for(e=0;e=0&&i.unshift(i.splice(n,1).shift())}}));var a={false:{left:0,right:0}};return s.syncOrAsync(i.map((function(e){return function(){if(e){var n=H.getFromId(t,e);r||(r={}),r.axShifts=a,r.overlayingShiftedAx=o;var i=H.drawOne(t,n,r);return n._shiftPusher&&Nt(n,n._fullDepth||0,a,!0),n._r=n.range.slice(),n._rl=s.simpleMap(n._r,n.r2l),i}}})))},H.drawOne=function(t,e,r){var n,i,l,f=(r=r||{}).axShifts||{},p=r.overlayingShiftedAx||[];e.setScale();var m=t._fullLayout,g=e._id,v=g.charAt(0),b=H.counterLetter(g),y=m._plots[e._mainSubplot];if(y){if(e._shiftPusher=e.autoshift||-1!==p.indexOf(e._id)||-1!==p.indexOf(e.overlaying),e._shiftPusher&"free"===e.anchor){var x=e.linewidth/2||0;"inside"===e.ticks&&(x+=e.ticklen),Nt(e,x,f,!0),Nt(e,e.shift||0,f,!1)}!0===r.skipTitle&&void 0!==e._shift||(e._shift=function(t,e){return t.autoshift?e[t.overlaying][t.side]:t.shift||0}(e,f));var _=y[v+"axislayer"],w=e._mainLinePosition,k=w+=e._shift,A=e._mainMirrorPosition,M=e._vals=H.calcTicks(e),T=[e.mirror,k,A].join("_");for(n=0;n0?r.bottom-u:0,h))));var d=0,f=0;if(e._shiftPusher&&(d=Math.max(h,r.height>0?"l"===l?u-r.left:r.right-u:0),e.title.text!==m._dfltTitle[v]&&(f=(e._titleStandoff||0)+(e._titleScoot||0),"l"===l&&(f+=Mt(e))),e._fullDepth=Math.max(d,f)),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1],g="number"==typeof e._shift?e._shift:0;if("x"===v){if("b"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?u-r.top:0,h),p.reverse()),r.width>0){var y=r.right-(e._offset+e._length);y>0&&(n.xr=1,n.r=y);var x=e._offset-r.left;x>0&&(n.xl=0,n.l=x)}}else if("l"===l?(e._depth=Math.max(r.height>0?u-r.left:0,h),n[l]=e._depth-g):(e._depth=Math.max(r.height>0?r.right-u:0,h),n[l]=e._depth+g,p.reverse()),r.height>0){var _=r.bottom-(e._offset+e._length);_>0&&(n.yb=0,n.b=_);var w=e._offset-r.top;w>0&&(n.yt=1,n.t=w)}n[b]="free"===e.anchor?e.position:e._anchorAxis.domain[p[0]],e.title.text!==m._dfltTitle[v]&&(n[l]+=Mt(e)+(e.title.standoff||0)),e.mirror&&"free"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[c]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[c]+=h),!0===e.mirror||"ticks"===e.mirror?i[b]=e._anchorAxis.domain[p[1]]:"all"!==e.mirror&&"allticks"!==e.mirror||(i[b]=[e._counterDomainMin,e._counterDomainMax][p[1]]))}ht&&(s=a.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),"string"==typeof e.automargin&&(_t(n,e.automargin),_t(i,e.automargin)),o.autoMargin(t,Ct(e),n),o.autoMargin(t,Et(e),i),o.autoMargin(t,Lt(e),s)})),s.syncOrAsync(ct)}}function dt(t){var r=g+(t||"tick");return S[r]||(S[r]=function(t,e,r){var n,i,o,a;if(t._selections[e].size())n=1/0,i=-1/0,o=1/0,a=-1/0,t._selections[e].each((function(){var t=St(this),e=d.bBox(t.node().parentNode);n=Math.min(n,e.top),i=Math.max(i,e.bottom),o=Math.min(o,e.left),a=Math.max(a,e.right)}));else{var s=H.makeLabelFns(t,r);n=i=s.yFn({dx:0,dy:0,fontSize:0}),o=a=s.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:i,left:o,right:a,height:i-n,width:a-o}}(e,r,k)),S[r]}},H.getTickSigns=function(t,e){var r=t._id.charAt(0),n={x:"top",y:"right"}[r],i=t.side===n?1:-1,o=[-1,1,i,-i];return"inside"!==(e?(t.minor||{}).ticks:t.ticks)==("x"===r)&&(o=o.map((function(t){return-t}))),t.side&&o.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),o},H.makeTransTickFn=function(t){return"x"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},H.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||"",r=function(t){return-1!==e.indexOf(t)},n=r("top"),i=r("left"),o=r("right"),a=r("bottom"),s=r("inside"),l=a||i||n||o;if(!l&&!s)return[0,0];var c=t.side,u=l?(t.tickwidth||0)/2:0,h=3,d=t.tickfont?t.tickfont.size:12;return(a||n)&&(u+=d*U,h+=(t.linewidth||0)/2),(i||o)&&(u+=(t.linewidth||0)/2,h+=3),s&&"top"===c&&(h-=d*(1-U)),(i||n)&&(u=-u),"bottom"!==c&&"right"!==c||(h=-h),[l?u:0,s?h:0]}(t),r=e[0],n=e[1];return"x"===t._id.charAt(0)?function(e){return l(r+t._offset+t.l2p(kt(e)),n)}:function(e){return l(n,r+t._offset+t.l2p(kt(e)))}},H.makeTickPath=function(t,e,r,n){n||(n={});var i=n.minor;if(i&&!t.minor)return"";var o=void 0!==n.len?n.len:i?t.minor.ticklen:t.ticklen,a=t._id.charAt(0),s=(t.linewidth||1)/2;return"x"===a?"M0,"+(e+s*r)+"v"+o*r:"M"+(e+s*r)+",0h"+o*r},H.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||"",o=function(t){return-1!==n.indexOf(t)},a=o("top"),l=o("left"),c=o("right"),u=o("bottom")||l||a||c,h=o("inside"),d="inside"===n&&"inside"===t.ticks||!h&&"outside"===t.ticks&&"boundaries"!==t.tickson,f=0,p=0,m=d?t.ticklen:0;if(h?m*=-1:u&&(m=0),d&&(f+=m,r)){var g=s.deg2rad(r);f=m*Math.cos(g)+1,p=m*Math.sin(g)}t.showticklabels&&(d||t.showline)&&(f+=.2*t.tickfont.size);var v,b,y,x,_,w={labelStandoff:f+=(t.linewidth||1)/2*(h?-1:1),labelShift:p},k=0,A=t.side,M=t._id.charAt(0),T=t.tickangle;if("x"===M)x=(_=!h&&"bottom"===A||h&&"top"===A)?1:-1,h&&(x*=-1),v=p*x,b=e+f*x,y=_?1:-.2,90===Math.abs(T)&&(h?y+=B:y=-90===T&&"bottom"===A?U:90===T&&"top"===A?B:.5,k=B/2*(T/90)),w.xFn=function(t){return t.dx+v+k*t.fontSize},w.yFn=function(t){return t.dy+b+t.fontSize*y},w.anchorFn=function(t,e){if(u){if(l)return"end";if(c)return"start"}return i(e)&&0!==e&&180!==e?e*x<0!==h?"end":"start":"middle"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side!==h?-n:0};else if("y"===M){if(x=(_=!h&&"left"===A||h&&"right"===A)?1:-1,h&&(x*=-1),v=f,b=p*x,y=0,h||90!==Math.abs(T)||(y=-90===T&&"left"===A||90===T&&"right"===A?U:.5),h){var S=i(T)?+T:0;if(0!==S){var C=s.deg2rad(S);k=Math.abs(Math.sin(C))*U*x,y=0}}w.xFn=function(t){return t.dx+e-(v+t.fontSize*y)*x+k*t.fontSize},w.yFn=function(t){return t.dy+b+t.fontSize*B},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?"middle":_?"end":"start"},w.heightFn=function(e,r,n){return"right"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},H.drawTicks=function(t,e,r){r=r||{};var i=e._id+"tick",o=[].concat(e.minor&&e.minor.ticks?r.vals.filter((function(t){return t.minor&&!t.noTick})):[]).concat(e.ticks?r.vals.filter((function(t){return!t.minor&&!t.noTick})):[]),a=r.layer.selectAll("path."+i).data(o,At);a.exit().remove(),a.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(t){return h.stroke(n.select(this),t.minor?e.minor.tickcolor:e.tickcolor)})).style("stroke-width",(function(r){return d.crispRound(t,r.minor?e.minor.tickwidth:e.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),Pt(e,[F]),a.attr("transform",r.transFn)},H.drawGrid=function(t,e,r){if(r=r||{},"sync"!==e.tickmode){var i=e._id+"grid",o=e.minor&&e.minor.showgrid,a=o?r.vals.filter((function(t){return t.minor})):[],s=e.showgrid?r.vals.filter((function(t){return!t.minor})):[],l=r.counterAxis;if(l&&H.shouldShowZeroLine(t,e,l))for(var c="array"===e.tickmode,u=0;u=0;v--){var b=v?m:g;if(b){var y=b.selectAll("path."+i).data(v?s:a,At);y.exit().remove(),y.enter().append("path").classed(i,1).classed("crisp",!1!==r.crisp),y.attr("transform",r.transFn).attr("d",r.path).each((function(t){return h.stroke(n.select(this),t.minor?e.minor.gridcolor:e.gridcolor||"#ddd")})).style("stroke-dasharray",(function(t){return d.dashStyle(t.minor?e.minor.griddash:e.griddash,t.minor?e.minor.gridwidth:e.gridwidth)})).style("stroke-width",(function(t){return(t.minor?p:e._gw)+"px"})).style("display",null),"function"==typeof r.path&&y.attr("d",r.path)}}Pt(e,[I,R])}},H.drawZeroLine=function(t,e,r){r=r||r;var n=e._id+"zl",i=H.shouldShowZeroLine(t,e,r.counterAxis),o=r.layer.selectAll("path."+n).data(i?[{x:0,id:e._id}]:[]);o.exit().remove(),o.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(t,e){return Y(t.id,e.id)}))})),o.attr("transform",r.transFn).attr("d",r.path).call(h.stroke,e.zerolinecolor||h.defaultLine).style("stroke-width",d.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),Pt(e,[D])},H.drawLabels=function(t,e,r){r=r||{};var o=t._fullLayout,a=e._id,u=r.cls||a+"tick",h=r.vals.filter((function(t){return t.text})),f=r.labelFns,p=r.secondary?0:e.tickangle,m=(e._prevTickAngles||{})[u],g=r.layer.selectAll("g."+u).data(e.showticklabels?h:[],At),v=[];function b(t,o){t.each((function(t){var a=n.select(this),s=a.select(".text-math-group"),u=f.anchorFn(t,o),h=r.transFn.call(a.node(),t)+(i(o)&&0!=+o?" rotate("+o+","+f.xFn(t)+","+(f.yFn(t)-t.fontSize/2)+")":""),p=c.lineCount(a),m=G*t.fontSize,g=f.heightFn(t,i(o)?+o:0,(p-1)*m);if(g&&(h+=l(0,g)),s.empty()){var v=a.select("text");v.attr({transform:h,"text-anchor":u}),v.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var b=d.bBox(s.node()).width*{end:-.5,start:.5}[u];s.attr("transform",h+l(b,0))}}))}g.enter().append("g").classed(u,1).append("text").attr("text-anchor","middle").each((function(e){var r=n.select(this),i=t._promises.length;r.call(c.positionText,f.xFn(e),f.yFn(e)).call(d.font,{family:e.font,size:e.fontSize,color:e.fontColor,weight:e.fontWeight,style:e.fontStyle,variant:e.fontVariant}).text(e.text).call(c.convertToTspans,t),t._promises[i]?v.push(t._promises.pop().then((function(){b(r,p)}))):b(r,p)})),Pt(e,[P]),g.exit().remove(),r.repositionOnUpdate&&g.each((function(t){n.select(this).select("text").call(c.positionText,f.xFn(t),f.yFn(t))})),e._adjustTickLabelsOverflow=function(){var r=e.ticklabeloverflow;if(r&&"allow"!==r){var i=-1!==r.indexOf("hide"),a="x"===e._id.charAt(0),l=0,c=a?t._fullLayout.width:t._fullLayout.height;if(-1!==r.indexOf("domain")){var u=s.simpleMap(e.range,e.r2l);l=e.l2p(u[0])+e._offset,c=e.l2p(u[1])+e._offset}var h=Math.min(l,c),f=Math.max(l,c),p=e.side,m=1/0,v=-1/0;for(var b in g.each((function(t){var r=n.select(this);if(r.select(".text-math-group").empty()){var o=d.bBox(r.node()),s=0;a?(o.right>f||o.leftf||o.top+(e.tickangle?0:t.fontSize/4)e["_visibleLabelMin_"+r._id]?l.style("display","none"):"tick"!==t.K||i||l.style("display",null)}))}))}))}))},b(g,m+1?m:p);var y=null;e._selections&&(e._selections[u]=g);var x=[function(){return v.length&&Promise.all(v)}];e.automargin&&o._redrawFromAutoMarginCount&&90===m?(y=m,x.push((function(){b(g,m)}))):x.push((function(){if(b(g,p),h.length&&e.autotickangles&&("log"!==e.type||"D"!==String(e.dtick).charAt(0))){y=e.autotickangles[0];var t,n=0,i=[],o=1;g.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),a=St(this),s=d.bBox(a.node());o=Math.max(o,c.lineCount(a)),i.push({top:0,bottom:10,height:10,left:r-s.width/2,right:r+s.width/2+2,width:s.width+2})}));var a=("boundaries"===e.tickson||e.showdividers)&&!r.secondary,l=h.length,u=Math.abs((h[l-1].x-h[0].x)*e._m)/(l-1),f=a?u/2:u,m=a?e.ticklen:1.25*n*o,v=f/Math.sqrt(Math.pow(f,2)+Math.pow(m,2)),x=e.autotickangles.map((function(t){return t*Math.PI/180})),_=x.find((function(t){return Math.abs(Math.cos(t))<=v}));void 0===_&&(_=x.reduce((function(t,e){return Math.abs(Math.cos(t))B*j&&(z=j,C[S]=E[S]=O[S])}var U=Math.abs(z-L);U-A>0?A*=1+A/(U-=A):A=0,"y"!==e._id.charAt(0)&&(A=-A),C[T]=w.p2r(w.r2p(E[T])+M*A),"min"===w.autorange||"max reversed"===w.autorange?(C[0]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0):"max"!==w.autorange&&"min reversed"!==w.autorange||(C[1]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0),o._insideTickLabelsUpdaterange[w._name+".range"]=C}var V=s.syncOrAsync(x);return V&&V.then&&t._promises.push(V),V},H.getPxPosition=function(t,e){var r,n=t._fullLayout._size,i=e._id.charAt(0),o=e.side;return"free"!==e.anchor?r=e._anchorAxis:"x"===i?r={_offset:n.t+(1-(e.position||0))*n.h,_length:0}:"y"===i&&(r={_offset:n.l+(e.position||0)*n.w+e._shift,_length:0}),"top"===o||"left"===o?r._offset:"bottom"===o||"right"===o?r._offset+r._length:void 0},H.shouldShowZeroLine=function(t,e,r){var n=s.simpleMap(e.range,e.r2l);return n[0]*n[1]<=0&&e.zeroline&&("linear"===e.type||"-"===e.type)&&!(e.rangebreaks&&e.maskBreaks(0)===O)&&(Tt(e,0)||!function(t,e,r,n){var i=r._mainAxis;if(i){var o=t._fullLayout,a=e._id.charAt(0),s=H.counterLetter(e._id),l=e._offset+(Math.abs(n[0])1)for(n=1;n{"use strict";var n=r(7370),i=r(12822),o=r(32994).BADNUM,a=i.isArrayOrTypedArray,s=i.isDateTime,l=i.cleanNumber,c=Math.round;function u(t,e){return e?n(t):"number"==typeof t}function h(t){return Math.max(1,(t-1)/1e3)}t.exports=function(t,e,r){var i=t,d=r.noMultiCategory;if(a(i)&&!i.length)return"-";if(!d&&function(t){return a(t[0])&&a(t[1])}(i))return"multicategory";if(d&&Array.isArray(i[0])){for(var f=[],p=0;p2*a}(i,e))return"date";var g="strict"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=h(r),i=0,a=0,s={},u=0;u2*i}(i,g)?"category":function(t,e){for(var r=t.length,n=0;n{"use strict";var n=r(7370),i=r(25059),o=r(12822),a=r(46121),s=r(35677),l=r(86130),c=r(49342),u=r(8736),h=r(84411),d=r(12213),f=r(33322),p=r(65412),m=r(46458),g=r(30632),v=r(21197).WEEKDAY_PATTERN,b=r(21197).HOUR_PATTERN;function y(t,e,r){function i(r,n){return o.coerce(t,e,l.rangebreaks,r,n)}if(i("enabled")){var a=i("bounds");if(a&&a.length>=2){var s,c,u="";if(2===a.length)for(s=0;s<2;s++)if(c=_(a[s])){u=v;break}var h=i("pattern",u);if(h===v)for(s=0;s<2;s++)(c=_(a[s]))&&(e.bounds[s]=a[s]=c-1);if(h)for(s=0;s<2;s++)switch(c=a[s],h){case v:if(!n(c))return void(e.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(e.enabled=!1);e.bounds[s]=a[s]=c;break;case b:if(!n(c))return void(e.enabled=!1);if((c=+c)<0||c>24)return void(e.enabled=!1);e.bounds[s]=a[s]=c}if(!1===r.autorange){var d=r.range;if(d[0]d[1])return void(e.enabled=!1)}else if(a[0]>d[0]&&a[1]{"use strict";var n=r(77201),i=n.FORMAT_LINK,o=n.DATE_FORMAT_LINK;function a(t,e){return["Sets the "+t+" formatting rule"+(e?"for `"+e+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+i+"."].join(" ")}function s(t,e){return a(t,e)+[" And for dates see: "+o+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}t.exports={axisHoverFormat:function(t,e){return{valType:"string",dflt:"",editType:"none",description:(e?a:s)("hover text",t)+["By default the values are formatted using "+(e?"generic number format":"`"+t+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:a,descriptionWithDates:s}},99246:(t,e,r)=>{"use strict";var n=r(25059),i=r(21197);function o(t,e){if(e&&e.length)for(var r=0;rn?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},e.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(" ")[0]},e.isLinked=function(t,e){return o(e,t._axisMatchGroups)||o(e,t._axisConstraintGroups)}},33322:(t,e,r)=>{"use strict";var n=r(98507).isTypedArraySpec;t.exports=function(t,e,r,i){if("category"===e.type){var o,a=t.categoryarray,s=Array.isArray(a)&&a.length>0||n(a);s&&(o="array");var l,c=r("categoryorder",o);"array"===c&&(l=r("categoryarray")),s||"array"!==c||(c=e.categoryorder="trace"),"trace"===c?e._initialCategories=[]:"array"===c?e._initialCategories=l.slice():(l=function(t,e){var r,n,i,o=e.dataAttr||t._id.charAt(0),a={};if(e.axData)r=e.axData;else for(r=[],n=0;n{"use strict";var n=r(7370),i=r(12822),o=r(32994),a=o.ONEDAY,s=o.ONEWEEK;e.dtick=function(t,e){var r="log"===e,i="date"===e,o="category"===e,s=i?a:1;if(!t)return s;if(n(t))return(t=Number(t))<=0?s:o?Math.max(1,Math.round(t)):i?Math.max(.1,t):t;if("string"!=typeof t||!i&&!r)return s;var l=t.charAt(0),c=t.substr(1);return(c=n(c)?Number(c):0)<=0||!(i&&"M"===l&&c===Math.round(c)||r&&"L"===l||r&&"D"===l&&(1===c||2===c))?s:t},e.tick0=function(t,e,r,o){return"date"===e?i.cleanDate(t,i.dateTick0(r,o%s==0?1:0)):"D1"!==o&&"D2"!==o?n(t)?Number(t):0:void 0}},21197:(t,e,r)=>{"use strict";var n=r(46233).counter;t.exports={idRegex:{x:n("x","( domain)?"),y:n("y","( domain)?")},attrRegex:n("[xy]axis"),xAxisMatch:n("xaxis"),yAxisMatch:n("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},69352:(t,e,r)=>{"use strict";var n=r(12822),i=r(19496),o=r(99246).id2name,a=r(86130),s=r(92578),l=r(30632),c=r(32994).ALMOST_EQUAL,u=r(89701).FROM_BL;function h(t,e,r){var i=r.axIds,s=r.layoutOut,l=r.hasImage,c=s._axisConstraintGroups,u=s._axisMatchGroups,h=e._id,m=h.charAt(0),g=((s._splomAxes||{})[m]||{})[h]||{},v=e._id,b="x"===v.charAt(0);function y(r,i){return n.coerce(t,e,a,r,i)}e._matchGroup=null,e._constraintGroup=null,y("constrain",l?"domain":"range"),n.coerce(t,e,{constraintoward:{valType:"enumerated",values:b?["left","center","right"]:["bottom","middle","top"],dflt:b?"center":"middle"}},"constraintoward");var x,_,w=e.type,k=[];for(x=0;xn?i.substr(n):o.substr(r))+a:i+o+t*e:a}function g(t,e){for(var r=e._size,n=r.h/r.w,i={},o=Object.keys(t),a=0;ac*y)||k)for(r=0;rD&&Pz&&(z=P);d/=(z-L)/(2*O),L=l.l2r(L),z=l.l2r(z),l.range=l._input.range=S{"use strict";var n=r(27941),i=r(12822),o=i.numberFormat,a=r(18106),s=r(17520),l=r(25059),c=i.strTranslate,u=r(80394),h=r(17499),d=r(40666),f=r(70410),p=r(75815),m=r(76292),g=r(19846),v=r(14295),b=v.selectingOrDrawing,y=v.freeMode,x=r(89701).FROM_TL,_=r(86748),w=r(39004).redrawReglTraces,k=r(51137),A=r(99246).getFromId,M=r(70059).prepSelect,T=r(70059).clearOutline,S=r(70059).selectOnClick,C=r(92578),E=r(21197),L=E.MINDRAG,z=E.MINZOOM,O=!0;function D(t,e,r,n){var o=i.ensureSingle(t.draglayer,e,r,(function(e){e.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",t.id)}));return o.call(m,n),o.node()}function I(t,e,r,i,o,a,s){var l=D(t,"rect",e,r);return n.select(l).call(d.setRect,i,o,a,s),l}function R(t,e){for(var r=0;r=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function j(t,e,r,n,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",c(r,n)).attr("d",i+"Z")}function B(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:h.background,stroke:h.defaultLine,"stroke-width":1,opacity:0}).attr("transform",c(e,r)).attr("d","M0,0Z")}function U(t,e,r,n,i,o){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),G(t,e,i,o)}function G(t,e,r,n){r||(t.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function V(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function H(t){O&&t.data&&t._context.showTips&&(i.notifier(i._(t,"Double-click to zoom back out"),"long"),O=!1)}function W(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,z)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function q(t,e,r,n,o){for(var a,s,l,c,u=!1,h={},d={},f=(o||{}).xaHash,p=(o||{}).yaHash,m=0;m=0)i._fullLayout._deactivateShape(i);else{var a=i._fullLayout.clickmode;if(V(i),2!==t||vt||Ht(),gt)a.indexOf("select")>-1&&S(r,i,$,J,e.id,zt),a.indexOf("event")>-1&&f.click(i,r,e.id);else if(1===t&&vt){var s=m?D:O,c="s"===m||"w"===v?0:1,h=s._name+".range["+c+"]",d=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return"date"===t.type?n:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,o("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,o("."+String(r)+"g")(n))}(s,c),p="left",g="middle";if(s.fixedrange)return;m?(g="n"===m?"top":"bottom","right"===s.side&&(p="right")):"e"===v&&(p="right"),i._context.showAxisRangeEntryBoxes&&n.select(xt).call(u.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(d),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:p,verticalAlign:g}).on("edit",(function(t){var e=s.d2r(t);void 0!==e&&l.call("_guiRelayout",i,h,e)}))}}}function It(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(tt,ft*e+_t)),i=Math.max(0,Math.min(et,pt*r+wt)),o=Math.abs(n-_t),a=Math.abs(i-wt);function s(){St="",kt.r=kt.l,kt.t=kt.b,Et.attr("d","M0,0Z")}if(kt.l=Math.min(_t,n),kt.r=Math.max(_t,n),kt.t=Math.min(wt,i),kt.b=Math.max(wt,i),rt.isSubplotConstrained)o>z||a>z?(St="xy",o/tt>a/et?(a=o*et/tt,wt>i?kt.t=wt-a:kt.b=wt+a):(o=a*tt/et,_t>n?kt.l=_t-o:kt.r=_t+o),Et.attr("d",W(kt))):s();else if(nt.isSubplotConstrained)if(o>z||a>z){St="xy";var l=Math.min(kt.l/tt,(et-kt.b)/et),c=Math.max(kt.r/tt,(et-kt.t)/et);kt.l=l*tt,kt.r=c*tt,kt.b=(1-l)*et,kt.t=(1-c)*et,Et.attr("d",W(kt))}else s();else!ot||a0){var u;if(nt.isSubplotConstrained||!it&&1===ot.length){for(u=0;u<$.length;u++)$[u].range=$[u]._r.slice(),C($[u],1-r/et);a=(e=r*tt/et)/2}if(nt.isSubplotConstrained||!ot&&1===it.length){for(u=0;u1&&(void 0!==o.maxallowed&&st===(o.range[0]1&&(void 0!==a.maxallowed&<===(a.range[0]{"use strict";var n=r(27941),i=r(70410),o=r(19846),a=r(76292),s=r(45731).makeDragBox,l=r(21197).DRAGGERSIZE;e.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot)n.select(t).selectAll(".drag").remove();else if(r._has("cartesian")||r._has("splom")){Object.keys(r._plots||{}).sort((function(t,e){if((r._plots[t].mainplot&&!0)===(r._plots[e].mainplot&&!0)){var n=t.split("y"),i=e.split("y");return n[0]===i[0]?Number(n[1]||1)-Number(i[1]||1):Number(n[0]||1)-Number(i[0]||1)}return r._plots[t].mainplot?1:-1})).forEach((function(e){var n=r._plots[e],a=n.xaxis,c=n.yaxis;if(!n.mainplot){var u=s(t,n,a._offset,c._offset,a._length,c._length,"ns","ew");u.onmousemove=function(r){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===e&&t._fullLayout._plots[e]&&i.hover(t,r,e)},i.hover(t,r,e),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=e},u.onmouseout=function(e){t._dragging||(t._fullLayout._hoversubplot=null,o.unhover(t,e))},t._context.showAxisDragHandles&&(s(t,n,a._offset-l,c._offset-l,l,l,"n","w"),s(t,n,a._offset+a._length,c._offset-l,l,l,"n","e"),s(t,n,a._offset-l,c._offset+c._length,l,l,"s","w"),s(t,n,a._offset+a._length,c._offset+c._length,l,l,"s","e"))}if(t._context.showAxisDragHandles){if(e===a._mainSubplot){var h=a._mainLinePosition;"top"===a.side&&(h-=l),s(t,n,a._offset+.1*a._length,h,.8*a._length,l,"","ew"),s(t,n,a._offset,h,.1*a._length,l,"","w"),s(t,n,a._offset+.9*a._length,h,.1*a._length,l,"","e")}if(e===c._mainSubplot){var d=c._mainLinePosition;"right"!==c.side&&(d-=l),s(t,n,d,c._offset+.1*c._length,l,.8*c._length,"ns",""),s(t,n,d,c._offset+.9*c._length,l,.1*c._length,"s",""),s(t,n,d,c._offset,l,.1*c._length,"n","")}}}));var a=r._hoverlayer.node();a.onmousemove=function(e){e.target=t._fullLayout._lasthover,i.hover(t,e,r._hoversubplot)},a.onclick=function(e){e.target=t._fullLayout._lasthover,i.click(t,e)},a.onmousedown=function(e){t._fullLayout._lasthover.onmousedown(e)},e.updateFx(t)}},e.updateFx=function(t){var e=t._fullLayout,r="pan"===e.dragmode?"move":"crosshair";a(e._draggers,r)}},39859:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822),o=r(99246);t.exports=function(t){return function(e,r){var a=e[t];if(Array.isArray(a))for(var s=n.subplotsRegistry.cartesian,l=s.idRegex,c=r._subplots,u=c.xaxis,h=c.yaxis,d=c.cartesian,f=r._has("cartesian")||r._has("gl2d"),p=0;p{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=r(51137),s=r(40666),l=r(47388).eV,c=r(99246),u=r(21197),h=r(25853),d=o.ensureSingle;function f(t,e,r){return o.ensureSingle(t,e,r,(function(t){t.datum(r)}))}function p(t,e,r,a,c){for(var h,d,f,p=u.traceLayerClasses,m=t._fullLayout,g=m._modules,v={},b=0;b{"use strict";var n=r(75058),i=r(84226),o=r(68057).T,a=r(98260).extendFlat,s=r(46121).templatedArray,l=r(60393).descriptionWithDates,c=r(32994).ONEDAY,u=r(21197),h=u.HOUR_PATTERN,d=u.WEEKDAY_PATTERN,f={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0},description:["Sets the tick mode for this axis.","If *auto*, the number of ticks is set via `nticks`.","If *linear*, the placement of the ticks is determined by","a starting position `tick0` and a tick step `dtick`","(*linear* is the default value if `tick0` and `dtick` are provided).","If *array*, the placement of the ticks is set via `tickvals`","and the tick text is `ticktext`.","(*array* is the default value if `tickvals` is provided)."].join(" ")},p=a({},f,{values:f.values.slice().concat(["sync"]),description:[f.description,"If *sync*, the number of ticks will sync with the overlayed axis","set by `overlaying` property."].join(" ")});function m(t){return{valType:"integer",min:0,dflt:t?5:0,editType:"ticks",description:["Specifies the maximum number of ticks for the particular axis.","The actual number of ticks will be chosen automatically to be","less than or equal to `nticks`.","Has an effect only if `tickmode` is set to *auto*."].join(" ")}}var g={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the placement of the first tick on this axis.","Use with `dtick`.","If the axis `type` is *log*, then you must take the log of your starting tick","(e.g. to set the starting tick to 100, set the `tick0` to 2)","except when `dtick`=*L* (see `dtick` for more info).","If the axis `type` is *date*, it should be a date string, like date data.","If the axis `type` is *category*, it should be a number, using the scale where","each category is assigned a serial number from zero in the order it appears."].join(" ")},v={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the step in-between ticks on this axis. Use with `tick0`.","Must be a positive number, or special strings available to *log* and *date* axes.","If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n","is the tick number. For example,","to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1.","To set tick marks at 1, 100, 10000, ... set dtick to 2.","To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433.","*log* has several special values; *L*, where `f` is a positive number,","gives ticks linearly spaced in value (but not position).","For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc.","To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5).","`tick0` is ignored for *D1* and *D2*.","If the axis `type` is *date*, then you must convert the time to milliseconds.","For example, to set the interval between ticks to one day,","set `dtick` to 86400000.0.","*date* also has special values *M* gives ticks spaced by a number of months.","`n` must be a positive integer.","To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*.","To set ticks every 4 years, set `dtick` to *M48*"].join(" ")},b={valType:"data_array",editType:"ticks",description:["Sets the values at which ticks on this axis appear.","Only has an effect if `tickmode` is set to *array*.","Used with `ticktext`."].join(" ")},y={valType:"enumerated",values:["outside","inside",""],editType:"ticks",description:["Determines whether ticks are drawn or not.","If **, this axis' ticks are not drawn.","If *outside* (*inside*), this axis' are drawn outside (inside)","the axis lines."].join(" ")};function x(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick length (in px)."};return t||(e.dflt=5),e}function _(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick width (in px)."};return t||(e.dflt=1),e}var w={valType:"color",dflt:i.defaultLine,editType:"ticks",description:"Sets the tick color."},k={valType:"color",dflt:i.lightLine,editType:"ticks",description:"Sets the color of the grid lines."};function A(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the width (in px) of the grid lines."};return t||(e.dflt=1),e}var M=a({},o,{editType:"ticks"}),T={valType:"boolean",editType:"ticks",description:["Determines whether or not grid lines are drawn.","If *true*, the grid lines are drawn at every tick mark."].join(" ")};t.exports={visible:{valType:"boolean",editType:"plot",description:["A single toggle to hide the axis while preserving interaction like dragging.","Default is true when a cheater plot is present on the axis, otherwise","false"].join(" ")},color:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:["Sets default for all colors associated with this axis","all at once: line, font, tick, and grid colors.","Grid color is lightened by blending this with the plot background","Individual pieces can override this."].join(" ")},title:{text:{valType:"string",editType:"ticks",description:["Sets the title of this axis.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:n({editType:"ticks",description:["Sets this axis' title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),standoff:{valType:"number",min:0,editType:"ticks",description:["Sets the standoff distance (in px) between the axis labels and the title text","The default value is a function of the axis tick labels, the title `font.size`","and the axis `linewidth`.","Note that the axis title position is always constrained within the margins,","so the actual standoff distance is always less than the set or default value.","By setting `standoff` and turning on `automargin`, plotly.js will push the","margins to fit the axis title at given standoff distance."].join(" ")},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0,description:["Sets the axis type.","By default, plotly attempts to determined the axis type","by looking into the data of the traces that referenced","the axis in question."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","Defaults to layout.autotypenumbers."].join(" ")},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range of this axis is","computed in relation to the input data.","See `rangemode` for more info.","If `range` is provided and it has a value for both the","lower and upper bound, `autorange` is set to *false*.","Using *min* applies autorange only to set the minimum.","Using *max* applies autorange only to set the maximum.","Using *min reversed* applies autorange only to set the minimum on a reversed axis.","Using *max reversed* applies autorange only to set the maximum on a reversed axis.","Using *reversed* applies autorange on both ends and reverses the axis direction."].join(" ")},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange minimum."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange maximum."].join(" ")},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange minimum if it goes beyond this value.","Has no effect when `autorangeoptions.minallowed` is provided."].join(" ")},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange maximum if it goes beyond this value.","Has no effect when `autorangeoptions.maxallowed` is provided."].join(" ")},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Ensure this value is included in autorange."].join(" ")},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot",description:["If *normal*, the range is computed in relation to the extrema","of the input data.","If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data.","Applies only to linear axes."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0,description:["Sets the range of this axis.","If the axis `type` is *log*, then you must take the log of your","desired range (e.g. to set the range from 1 to 100,","set the range from 0 to 2).","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears.","Leaving either or both elements `null` impacts the default `autorange`."].join(" ")},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the minimum range of this axis."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the maximum range of this axis."].join(" ")},fixedrange:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not this axis is zoom-able.","If true, then zoom is disabled."].join(" ")},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Could be used to set the desired inside range of this axis","(excluding the labels) when `ticklabelposition` of","the anchored axis has *inside*.","Not implemented for axes with `type` *log*.","This would be ignored when `range` is provided."].join(" ")},scaleanchor:{valType:"enumerated",values:[u.idRegex.x.toString(),u.idRegex.y.toString(),!1],editType:"plot",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","changes together with the range of the corresponding axis","such that the scale of pixels per unit is in a constant ratio.","Both axes are still zoomable, but when you zoom one, the other will","zoom the same amount, keeping a fixed midpoint.","`constrain` and `constraintoward` determine how we enforce the constraint.","You can chain these, ie `yaxis: {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}`","but you can only link axes of the same `type`.","The linked axis can have the opposite letter (to constrain the aspect ratio)","or the same letter (to match scales across subplots).","Loops (`yaxis: {scaleanchor: *x*}, xaxis: {scaleanchor: *y*}` or longer) are redundant","and the last constraint encountered will be ignored to avoid possible","inconsistent constraints via `scaleratio`.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Setting `false` allows to remove a default constraint (occasionally,","you may need to prevent a default `scaleanchor` constraint from",'being applied, eg. when having an image trace `yaxis: {scaleanchor: "x"}`',"is set automatically in order for pixels to be rendered as squares,","setting `yaxis: {scaleanchor: false}` allows to remove the constraint)."].join(" ")},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot",description:["If this axis is linked to another by `scaleanchor`, this determines the pixel","to unit scale ratio. For example, if this value is 10, then every unit on","this axis spans 10 times the number of pixels as a unit on the linked axis.","Use this for example to create an elevation profile where the vertical scale","is exaggerated a fixed amount with respect to the horizontal."].join(" ")},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines how that happens:","by increasing the *range*, or by decreasing the *domain*.","Default is *domain* for axes containing image traces, *range* otherwise."].join(" ")},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines which direction we push","the originally specified plot area. Options are *left*, *center* (default),","and *right* for x axes, and *top*, *middle* (default), and *bottom* for y axes."].join(" ")},matches:{valType:"enumerated",values:[u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"calc",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","will match the range of the corresponding axis in data-coordinates space.","Moreover, matching axes share auto-range values, category lists and","histogram auto-bins.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Moreover, note that matching axes must have the same `type`."].join(" ")},rangebreaks:s("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this axis rangebreak is enabled or disabled.","Please note that `rangebreaks` only work for *date* axis type."].join(" ")},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc",description:["Sets the lower and upper bounds of this axis rangebreak.","Can be used with `pattern`."].join(" ")},pattern:{valType:"enumerated",values:[d,h,""],editType:"calc",description:["Determines a pattern on the time line that generates breaks.","If *"+d+"* - days of the week in English e.g. 'Sunday' or `sun`","(matching is case-insensitive and considers only the first three characters),","as well as Sunday-based integers between 0 and 6.","If *"+h+"* - hour (24-hour clock) as decimal numbers between 0 and 24.","for more info.","Examples:","- { pattern: '"+d+"', bounds: [6, 1] }"," or simply { bounds: ['sat', 'mon'] }"," breaks from Saturday to Monday (i.e. skips the weekends).","- { pattern: '"+h+"', bounds: [17, 8] }"," breaks from 5pm to 8am (i.e. skips non-work hours)."].join(" ")},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"},description:["Sets the coordinate values corresponding to the rangebreaks.","An alternative to `bounds`.","Use `dvalue` to set the size of the values along the axis."].join(" ")},dvalue:{valType:"number",editType:"calc",min:0,dflt:c,description:["Sets the size of each `values` item.","The default is one day in milliseconds."].join(" ")},editType:"calc"}),tickmode:p,nticks:m(),tick0:g,dtick:v,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks",description:["Sets the spacing between tick labels as compared to the spacing between ticks.","A value of 1 (default) means each tick gets a label.","A value of 2 means shows every 2nd label.","A larger value n means only every nth tick is labeled.","`tick0` determines which labels are shown.","Not implemented for axes with `type` *log* or *multicategory*, or when `tickmode` is *array*."].join(" ")},tickvals:b,ticktext:{valType:"data_array",editType:"ticks",description:["Sets the text displayed at the ticks position via `tickvals`.","Only has an effect if `tickmode` is set to *array*.","Used with `tickvals`."].join(" ")},ticks:y,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks",description:["Determines where ticks and grid lines are drawn with respect to their","corresponding tick labels.","Only has an effect for axes of `type` *category* or *multicategory*.","When set to *boundaries*, ticks and grid lines are drawn half a category","to the left/bottom of labels."].join(" ")},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks",description:["Determines where tick labels are drawn with respect to their","corresponding ticks and grid lines.","Only has an effect for axes of `type` *date*","When set to *period*, tick labels are drawn in the middle of the period","between ticks."].join(" ")},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc",description:["Determines where tick labels are drawn with respect to the axis","Please note that","top or bottom has no effect on x axes or when `ticklabelmode` is set to *period*.","Similarly","left or right has no effect on y axes or when `ticklabelmode` is set to *period*.","Has no effect on *multicategory* axes or when `tickson` is set to *boundaries*.","When used on axes linked by `matches` or `scaleanchor`,","no extra padding for inside labels would be added by autorange,","so that the scales could match."].join(" ")},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc",description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","Otherwise on *category* and *multicategory* axes the default is *allow*.","In other cases the default is *hide past div*."].join(" ")},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle",description:["Determines if the axis lines or/and ticks are mirrored to","the opposite side of the plotting area.","If *true*, the axis lines are mirrored.","If *ticks*, the axis lines and ticks are mirrored.","If *false*, mirroring is disable.","If *all*, axis lines are mirrored on all shared-axes subplots.","If *allticks*, axis lines and ticks are mirrored","on all shared-axes subplots."].join(" ")},ticklen:x(),tickwidth:_(),tickcolor:w,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks",description:"Determines whether or not the tick labels are drawn."},labelalias:{valType:"any",dflt:!1,editType:"ticks",description:["Replacement text for specific tick or hover labels.","For example using {US: 'USA', CA: 'Canada'} changes US to USA","and CA to Canada. The labels we would have shown must match","the keys exactly, after adding any tickprefix or ticksuffix.","For negative numbers the minus sign symbol used (U+2212) is wider than the regular ascii dash.","That means you need to use −1 instead of -1.","labelalias can be used with any axis type, and both keys (if needed)","and values (if desired) can include html-like tags or MathJax."].join(" ")},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks",description:["Determines whether long tick labels automatically grow the figure","margins."].join(" ")},showspikes:{valType:"boolean",dflt:!1,editType:"modebar",description:["Determines whether or not spikes (aka droplines) are drawn for this axis.","Note: This only takes affect when hovermode = closest"].join(" ")},spikecolor:{valType:"color",dflt:null,editType:"none",description:"Sets the spike color. If undefined, will use the series color"},spikethickness:{valType:"number",dflt:3,editType:"none",description:"Sets the width (in px) of the zero line."},spikedash:a({},o,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none",description:["Determines the drawing mode for the spike line","If *toaxis*, the line is drawn from the data point to the axis the ","series is plotted on.","If *across*, the line is drawn across the entire plot area, and","supercedes *toaxis*.","If *marker*, then a marker dot is drawn on the axis the series is","plotted on"].join(" ")},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none",description:"Determines whether spikelines are stuck to the cursor or to the closest datapoints."},tickfont:n({editType:"ticks",description:"Sets the tick font."}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks",description:["Sets the angle of the tick labels with respect to the horizontal.","For example, a `tickangle` of -90 draws the tick labels","vertically."].join(" ")},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks",description:["When `tickangle` is set to *auto*, it will be set to the first","angle in this array that is large enough to prevent label","overlap."].join(" ")},tickprefix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label prefix."},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all tick labels are displayed with a prefix.","If *first*, only the first tick is displayed with a prefix.","If *last*, only the last tick is displayed with a suffix.","If *none*, tick prefixes are hidden."].join(" ")},ticksuffix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label suffix."},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:"Same as `showtickprefix` but for tick suffixes."},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all exponents are shown besides their significands.","If *first*, only the exponent of the first tick is shown.","If *last*, only the exponent of the last tick is shown.","If *none*, no exponents appear."].join(" ")},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks",description:["Determines a formatting rule for the tick exponents.","For example, consider the number 1,000,000,000.","If *none*, it appears as 1,000,000,000.","If *e*, 1e+9.","If *E*, 1E+9.","If *power*, 1x10^9 (with 9 in a super script).","If *SI*, 1G.","If *B*, 1B."].join(" ")},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks",description:["Hide SI prefix for 10^n if |n| is below this number.","This only has an effect when `tickformat` is *SI* or *B*."].join(" ")},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks",description:['If "true", even 4-digit integers are separated'].join(" ")},tickformat:{valType:"string",dflt:"",editType:"ticks",description:l("tick label")},tickformatstops:s("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not this stop is used.","If `false`, this stop is ignored even within its `dtickrange`."].join(" ")},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks",description:["range [*min*, *max*], where *min*, *max* - dtick values","which describe some zoom level, it is possible to omit *min*","or *max* value by passing *null*"].join(" ")},value:{valType:"string",dflt:"",editType:"ticks",description:["string - dtickformat for described zoom level, the same as *tickformat*"].join(" ")},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:l("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle",description:["Determines whether or not a line bounding this axis is drawn."].join(" ")},linecolor:{valType:"color",dflt:i.defaultLine,editType:"layoutstyle",description:"Sets the axis line color."},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle",description:"Sets the width (in px) of the axis line."},showgrid:T,gridcolor:k,gridwidth:A(),griddash:M,zeroline:{valType:"boolean",editType:"ticks",description:["Determines whether or not a line is drawn at along the 0 value","of this axis.","If *true*, the zero line is drawn on top of the grid lines."].join(" ")},zerolinecolor:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:"Sets the line color of the zero line."},zerolinewidth:{valType:"number",dflt:1,editType:"ticks",description:"Sets the width (in px) of the zero line."},showdividers:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not a dividers are drawn","between the category levels of this axis.","Only has an effect on *multicategory* axes."].join(" ")},dividercolor:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:["Sets the color of the dividers","Only has an effect on *multicategory* axes."].join(" ")},dividerwidth:{valType:"number",dflt:1,editType:"ticks",description:["Sets the width (in px) of the dividers","Only has an effect on *multicategory* axes."].join(" ")},anchor:{valType:"enumerated",values:["free",u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"plot",description:["If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to","the corresponding opposite-letter axis.","If set to *free*, this axis' position is determined by `position`."].join(" ")},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot",description:["Determines whether a x (y) axis is positioned","at the *bottom* (*left*) or *top* (*right*)","of the plotting area."].join(" ")},overlaying:{valType:"enumerated",values:["free",u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"plot",description:["If set a same-letter axis id, this axis is overlaid on top of","the corresponding same-letter axis, with traces and axes visible for both","axes.","If *false*, this axis does not overlay any same-letter axes.","In this case, for axes with overlapping domains only the highest-numbered","axis will be visible."].join(" ")},minor:{tickmode:f,nticks:m("minor"),tick0:g,dtick:v,tickvals:b,ticks:y,ticklen:x("minor"),tickwidth:_("minor"),tickcolor:w,gridcolor:k,gridwidth:A("minor"),griddash:M,showgrid:T,editType:"ticks"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot",description:["Sets the layer on which this axis is displayed.","If *above traces*, this axis is displayed above all the subplot's traces","If *below traces*, this axis is displayed below all the subplot's traces,","but above the grid lines.","Useful when used together with scatter-like traces with `cliponaxis`","set to *false* to show markers and/or text nodes above this axis."].join(" ")},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot",description:["Sets the domain of this axis (in plot fraction)."].join(" ")},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot",description:["Sets the position of this axis in the plotting space","(in normalized coordinates).","Only has an effect if `anchor` is set to *free*."].join(" ")},autoshift:{valType:"boolean",dflt:!1,editType:"plot",description:["Automatically reposition the axis to avoid","overlap with other axes with the same `overlaying` value.","This repositioning will account for any `shift` amount applied to other","axes on the same side with `autoshift` is set to true.","Only has an effect if `anchor` is set to *free*."].join(" ")},shift:{valType:"number",editType:"plot",description:["Moves the axis a given number of pixels from where it would have been otherwise.","Accepts both positive and negative values, which will shift the axis either right","or left, respectively.","If `autoshift` is set to true, then this defaults to a padding of -3 if `side` is set to *left*.","and defaults to +3 if `side` is set to *right*. Defaults to 0 if `autoshift` is set to false.","Only has an effect if `anchor` is set to *free*."].join(" ")},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","median ascending","median descending"],dflt:"trace",editType:"calc",description:["Specifies the ordering logic for the case of categorical variables.","By default, plotly uses *trace*, which specifies the order that is present in the data supplied.","Set `categoryorder` to *category ascending* or *category descending* if order should be determined by","the alphanumerical order of the category names.","Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category","is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to","the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.","Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the","numerical order of the values.","Similarly, the order can be determined by the min, max, sum, mean or median of all the values."].join(" ")},categoryarray:{valType:"data_array",editType:"calc",description:["Sets the order in which categories on this axis appear.","Only has an effect if `categoryorder` is set to *array*.","Used with `categoryorder`."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `range`,","`autorange`, and `title` if in `editable: true` configuration.","Defaults to `layout.uirevision`."].join(" ")},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks",description:["Obsolete.","Set `tickmode` to *auto* for old `autotick` *true* behavior.","Set `tickmode` to *linear* for `autotick` *false*."].join(" ")},title:{valType:"string",editType:"ticks",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the axis' title, please use `title.text` now."].join(" ")},titlefont:n({editType:"ticks",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}}},36741:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(66811).isUnifiedHover,a=r(85400),s=r(46121),l=r(13195),c=r(86130),u=r(25119),h=r(91200),d=r(69352),f=r(52869),p=r(99246),m=p.id2name,g=p.name2id,v=r(21197).AX_ID_PATTERN,b=r(25059),y=b.traceIs,x=b.getComponentMethod;function _(t,e,r){Array.isArray(t[e])?t[e].push(r):t[e]=[r]}t.exports=function(t,e,r){var b,w,k=e.autotypenumbers,A={},M={},T={},S={},C={},E={},L={},z={},O={},D={};for(b=0;b{"use strict";var n=r(18106).mix,i=r(84226),o=r(12822);t.exports=function(t,e,r,a){var s=(a=a||{}).dfltColor;function l(r,n){return o.coerce2(t,e,a.attributes,r,n)}var c=l("linecolor",s),u=l("linewidth");r("showline",a.showLine||!!c||!!u)||(delete e.linecolor,delete e.linewidth);var h=l("gridcolor",n(s,a.bgColor,a.blend||i.lightFraction).toRgbString()),d=l("gridwidth"),f=l("griddash");if(r("showgrid",a.showGrid||!!h||!!d||!!f)||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),a.hasMinor){var p=l("minor.gridcolor",n(e.gridcolor,a.bgColor,67).toRgbString()),m=l("minor.gridwidth",e.gridwidth||1),g=l("minor.griddash",e.griddash||"solid");r("minor.showgrid",!!p||!!m||!!g)||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!a.noZeroLine){var v=l("zerolinecolor",s),b=l("zerolinewidth");r("zeroline",a.showGrid||!!v||!!b)||(delete e.zerolinecolor,delete e.zerolinewidth)}}},52869:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822);t.exports=function(t,e,r,o){var a,s,l,c,u,h,d=o.counterAxes||[],f=o.overlayableAxes||[],p=o.letter,m=o.grid,g=o.overlayingDomain;m&&(s=m._domains[p][m._axisMap[e._id]],a=m._anchors[e._id],s&&(l=m[p+"side"].split(" ")[0],c=m.domain[p]["right"===l||"top"===l?1:0])),s=s||[0,1],a=a||(n(t.position)?"free":d[0]||"free"),l=l||("x"===p?"bottom":"left"),c=c||0,u=0,h=!1;var v=i.coerce(t,e,{anchor:{valType:"enumerated",values:["free"].concat(d),dflt:a}},"anchor"),b=i.coerce(t,e,{side:{valType:"enumerated",values:"x"===p?["bottom","top"]:["left","right"],dflt:l}},"side");"free"===v&&("y"===p&&(r("autoshift")&&(c="left"===b?g[0]:g[1],h=!e.automargin||e.automargin,u="left"===b?-3:3),r("shift",u)),r("position",c)),r("automargin",h);var y=!1;if(f.length&&(y=i.coerce(t,e,{overlaying:{valType:"enumerated",values:[!1].concat(f),dflt:!1}},"overlaying")),!y){var x=r("domain",s);x[0]>x[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s),"sync"===e.tickmode&&(e.tickmode="auto")}return r("layer"),e}},12213:(t,e,r)=>{"use strict";var n=r(95768);t.exports=function(t,e,r,i,o){o||(o={});var a=o.tickSuffixDflt,s=n(t);r("tickprefix")&&r("showtickprefix",s),r("ticksuffix",a)&&r("showticksuffix",s)}},46458:(t,e,r)=>{"use strict";var n=r(49826);t.exports=function(t,e,r,i){var o=e._template||{},a=e.type||o.type||"-";r("minallowed"),r("maxallowed");var s,l=r("range");l||i.noInsiderange||"log"===a||(!(s=r("insiderange"))||null!==s[0]&&null!==s[1]||(e.insiderange=!1,s=void 0),s&&(l=r("range",s)));var c,u=e.getAutorangeDflt(l,i),h=r("autorange",u);!l||(null!==l[0]||null!==l[1])&&(null!==l[0]&&null!==l[1]||"reversed"!==h&&!0!==h)&&(null===l[0]||"min"!==h&&"max reversed"!==h)&&(null===l[1]||"max"!==h&&"min reversed"!==h)||(l=void 0,delete e.range,e.autorange=!0,c=!0),c||(h=r("autorange",u=e.getAutorangeDflt(l,i))),h&&(n(r,h,l),"linear"!==a&&"-"!==a||r("rangemode")),e.cleanRange()}},92578:(t,e,r)=>{"use strict";var n=r(89701).FROM_BL;t.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||"center"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],o=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(o+(i[0]-o)*e),t.l2r(o+(i[1]-o)*e)],t.setScale()}},30632:(t,e,r)=>{"use strict";var n=r(27941),i=r(79969).aL,o=r(12822),a=o.numberFormat,s=r(7370),l=o.cleanNumber,c=o.ms2DateTime,u=o.dateTime2ms,h=o.ensureNumber,d=o.isArrayOrTypedArray,f=r(32994),p=f.FP_SAFE,m=f.BADNUM,g=f.LOG_CLIP,v=f.ONEWEEK,b=f.ONEDAY,y=f.ONEHOUR,x=f.ONEMIN,_=f.ONESEC,w=r(99246),k=r(21197),A=k.HOUR_PATTERN,M=k.WEEKDAY_PATTERN;function T(t){return Math.pow(10,t)}function S(t){return null!=t}t.exports=function(t,e){e=e||{};var r=t._id||"x",f=r.charAt(0);function C(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-2*g*Math.abs(n-i))}return m}function E(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var a=u(e,n||t.calendar);if(a===m){if(!s(e))return m;e=+e;var l=Math.floor(10*o.mod(e+.05,1)),c=Math.round(e-l/10);a=u(new Date(c))+l/10}return a}function L(e,r,n){return c(e,r,n||t.calendar)}function z(e){return t._categories[Math.round(e)]}function O(e){if(S(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push("number"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return m}function D(e){if(t._categoriesMap)return t._categoriesMap[e]}function I(t){var e=D(t);return void 0!==e?e:s(t)?+t:void 0}function R(t){return s(t)?+t:D(t)}function F(t,e,r){return n.round(r+e*t,2)}function P(t,e,r){return(t-r)/e}var N=function(e){return s(e)?F(e,t._m,t._b):m},j=function(e){return P(e,t._m,t._b)};if(t.rangebreaks){var B="y"===f;N=function(e){if(!s(e))return m;var r=t._rangebreaks.length;if(!r)return F(e,t._m,t._b);var n=B;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,o=i*e,a=0,l=0;lu)){a=o<(c+u)/2?l:l+1;break}a=l+1}var h=t._B[a]||0;return isFinite(h)?F(e,t._m2,h):0},j=function(e){var r=t._rangebreaks.length;if(!r)return P(e,t._m,t._b);for(var n=0,i=0;it._rangebreaks[i].pmax&&(n=i+1);return P(e,t._m2,t._B[n])}}t.c2l="log"===t.type?C:h,t.l2c="log"===t.type?T:h,t.l2p=N,t.p2l=j,t.c2p="log"===t.type?function(t,e){return N(C(t,e))}:N,t.p2c="log"===t.type?function(t){return T(j(t))}:j,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=h,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=j,t.cleanPos=h):"log"===t.type?(t.d2r=t.d2l=function(t,e){return C(l(t),e)},t.r2d=t.r2c=function(t){return T(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=h,t.c2r=C,t.l2d=T,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return T(j(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=j,t.cleanPos=h):"date"===t.type?(t.d2r=t.r2d=o.identity,t.d2c=t.r2c=t.d2l=t.r2l=E,t.c2d=t.c2r=t.l2d=t.l2r=L,t.d2p=t.r2p=function(e,r,n){return t.l2p(E(e,0,n))},t.p2d=t.p2r=function(t,e,r){return L(j(t),e,r)},t.cleanPos=function(e){return o.cleanDate(e,m,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=O,t.r2d=t.c2d=t.l2d=z,t.d2r=t.d2l_noadd=I,t.r2c=function(e){var r=R(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=h,t.r2l=R,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return z(j(t))},t.r2p=t.d2p,t.p2r=j,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:h(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=z,t.d2r=t.d2l_noadd=I,t.r2c=function(e){var r=I(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=D,t.l2r=t.c2r=h,t.r2l=I,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return z(j(t))},t.r2p=t.d2p,t.p2r=j,t.cleanPos=function(t){return Array.isArray(t)||"string"==typeof t&&""!==t?t:h(t)},t.setupMultiCategory=function(n){var i,a,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var c in l)if(c!==r){var u=e[w.id2name(c)];s=s.concat(u._traceIndices)}var h=[[0,{}],[0,{}]],p=[];for(i=0;il[1]&&(i[s?0:1]=n),i[0]===i[1]){var c=t.l2r(r),u=t.l2r(n);if(void 0!==r){var h=c+1;void 0!==n&&(h=Math.min(h,u)),i[s?1:0]=h}if(void 0!==n){var d=u+1;void 0!==r&&(d=Math.max(d,c)),i[s?0:1]=d}}}},t.cleanRange=function(e,r){t._cleanRange(e,r),t.limitRange(e)},t._cleanRange=function(e,r){r||(r={}),e||(e="range");var n,i,a=o.nestedProperty(t,e).get();if(i=(i="date"===t.type?o.dfltRange(t.calendar):"y"===f?k.DFLTRANGEY:"realaxis"===t._name?[0,1]:r.dfltRange||k.DFLTRANGEX).slice(),"tozero"!==t.rangemode&&"nonnegative"!==t.rangemode||(i[0]=0),a&&2===a.length){var l=null===a[0],c=null===a[1];for("date"!==t.type||t.autorange||(a[0]=o.cleanDate(a[0],m,t.calendar),a[1]=o.cleanDate(a[1],m,t.calendar)),n=0;n<2;n++)if("date"===t.type){if(!o.isDateTime(a[n],t.calendar)){t[e]=i;break}if(t.r2l(a[0])===t.r2l(a[1])){var u=o.constrain(t.r2l(a[0]),o.MIN_MS+1e3,o.MAX_MS-1e3);a[0]=t.l2r(u-1e3),a[1]=t.l2r(u+1e3);break}}else{if(!s(a[n])){if(l||c||!s(a[1-n])){t[e]=i;break}a[n]=a[1-n]*(n?10:.1)}if(a[n]<-p?a[n]=-p:a[n]>p&&(a[n]=p),a[0]===a[1]){var h=Math.max(1,Math.abs(1e-6*a[0]));a[0]-=h,a[1]+=h}}}else o.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=w.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var o=r&&t._r?"_r":"range",a=t.calendar;t.cleanRange(o);var s,l,c=t.r2l(t[o][0],a),u=t.r2l(t[o][1],a),h="y"===f;if(h?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks&&(t._rangebreaks=t.locateBreaks(Math.min(c,u),Math.max(c,u)),t._rangebreaks.length)){for(s=0;su&&(d=!d),d&&t._rangebreaks.reverse();var p=d?-1:1;for(t._m2=p*t._length/(Math.abs(u-c)-t._lBreaks),t._B.push(-t._m2*(h?u:c)),s=0;si&&(i+=7,ai&&(i+=24,a=n&&a=n&&e=s.min&&(ts.max&&(s.max=n),i=!1)}i&&c.push({min:t,max:n})}};for(n=0;n{"use strict";t.exports=function(t){var e=["showexponent","showtickprefix","showticksuffix"].filter((function(e){return void 0!==t[e]}));if(e.every((function(r){return t[r]===t[e[0]]}))||1===e.length)return t[e[0]]}},84411:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499).contrast,o=r(86130),a=r(95768),s=r(35677);function l(t,e){function r(r,i){return n.coerce(t,e,o.tickformatstops,r,i)}r("enabled")&&(r("dtickrange"),r("value"))}t.exports=function(t,e,r,c,u){u||(u={});var h=r("labelalias");n.isPlainObject(h)||delete e.labelalias;var d=a(t);if(r("showticklabels")){var f=u.font||{},p=e.color,m=-1!==(e.ticklabelposition||"").indexOf("inside")?i(u.bgColor):p&&p!==o.color.dflt?p:f.color;if(n.coerceFont(r,"tickfont",{family:f.family,weight:f.weight,style:f.style,variant:f.variant,size:f.size,color:m}),u.noTicklabelstep||"multicategory"===c||"log"===c||r("ticklabelstep"),!u.noAng){var g=r("tickangle");u.noAutotickangles||"auto"!==g||r("autotickangles")}if("category"!==c){var v=r("tickformat");s(t,e,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:l}),e.tickformatstops.length||delete e.tickformatstops,u.noExp||v||"date"===c||(r("showexponent",d),r("exponentformat"),r("minexponent"),r("separatethousands"))}}}},8736:(t,e,r)=>{"use strict";var n=r(12822),i=r(86130);t.exports=function(t,e,r,o){var a=o.isMinor,s=a?t.minor||{}:t,l=a?e.minor:e,c=a?i.minor:i,u=a?"minor.":"",h=n.coerce2(s,l,c,"ticklen",a?.6*(e.ticklen||5):void 0),d=n.coerce2(s,l,c,"tickwidth",a?e.tickwidth||1:void 0),f=n.coerce2(s,l,c,"tickcolor",(a?e.tickcolor:void 0)||l.color);r(u+"ticks",!a&&o.outerTicks||h||d||f?"outside":"")||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}},49342:(t,e,r)=>{"use strict";var n=r(84696),i=r(12822).isArrayOrTypedArray,o=r(98507).isTypedArraySpec,a=r(98507).decodeTypedArraySpec;t.exports=function(t,e,r,s,l){l||(l={});var c=l.isMinor,u=c?t.minor||{}:t,h=c?e.minor:e,d=c?"minor.":"";function f(t){var e=u[t];return o(e)&&(e=a(e)),void 0!==e?e:(h._template||{})[t]}var p=f("tick0"),m=f("dtick"),g=f("tickvals"),v=r(d+"tickmode",i(g)?"array":m?"linear":"auto");if("auto"===v||"sync"===v)r(d+"nticks");else if("linear"===v){var b=h.dtick=n.dtick(m,s);h.tick0=n.tick0(p,s,e.calendar,b)}else"multicategory"!==s&&(void 0===r(d+"tickvals")?h.tickmode="auto":c||r("ticktext"))}},88313:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=r(40666),s=r(75815);t.exports=function(t,e,r,l){var c=t._fullLayout;if(0!==e.length){var u,h,d,f;l&&(u=l());var p=n.ease(r.easing);return t._transitionData._interruptCallbacks.push((function(){return window.cancelAnimationFrame(f),f=null,function(){for(var r={},n=0;nr.duration?(function(){for(var r={},n=0;n rect").call(a.setTranslate,0,0).call(a.setScale,1,1),t.plot.call(a.setTranslate,e._offset,r._offset).call(a.setScale,1,1);var n=t.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(a.setPointGroupScale,1,1),n.selectAll(".textpoint").call(a.setTextPointsScale,1,1),n.call(a.hideOutsideRangePoints,t)}function g(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,c=i._length,u=l._length,h=!!e.xr1,d=!!e.yr1,f=[];if(h){var p=o.simpleMap(e.xr0,i.r2l),m=o.simpleMap(e.xr1,i.r2l),g=p[1]-p[0],v=m[1]-m[0];f[0]=(p[0]*(1-r)+r*m[0]-p[0])/(p[1]-p[0])*c,f[2]=c*(1-r+r*v/g),i.range[0]=i.l2r(p[0]*(1-r)+r*m[0]),i.range[1]=i.l2r(p[1]*(1-r)+r*m[1])}else f[0]=0,f[2]=c;if(d){var b=o.simpleMap(e.yr0,l.r2l),y=o.simpleMap(e.yr1,l.r2l),x=b[1]-b[0],_=y[1]-y[0];f[1]=(b[1]*(1-r)+r*y[1]-b[1])/(b[0]-b[1])*u,f[3]=u*(1-r+r*_/x),l.range[0]=i.l2r(b[0]*(1-r)+r*y[0]),l.range[1]=l.l2r(b[1]*(1-r)+r*y[1])}else f[1]=0,f[3]=u;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var w=h?c/f[2]:1,k=d?u/f[3]:1,A=h?f[0]:0,M=d?f[1]:0,T=h?f[0]/f[2]*c:0,S=d?f[1]/f[3]*u:0,C=i._offset-T,E=l._offset-S;n.clipRect.call(a.setTranslate,A,M).call(a.setScale,1/w,1/k),n.plot.call(a.setTranslate,C,E).call(a.setScale,w,k),a.setPointGroupScale(n.zoomScalePts,1/w,1/k),a.setTextPointsScale(n.zoomScaleTxt,1/w,1/k)}s.redrawComponents(t)}},25119:(t,e,r)=>{"use strict";var n=r(25059).traceIs,i=r(17821);function o(t){return{v:"x",h:"y"}[t.orientation||"v"]}function a(t,e){var r=o(t),i=n(t,"box-violin"),a=n(t._fullInput||{},"candlestick");return i&&!a&&e===r&&void 0===t[r]&&void 0===t[r+"0"]}t.exports=function(t,e,r,s){r("autotypenumbers",s.autotypenumbersDflt),"-"===r("type",(s.splomStash||{}).type)&&(function(t,e){if("-"===t.type){var r,s=t._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var c=function(t,e,r){for(var n=0;n0&&(i["_"+r+"axes"]||{})[e])return i;if((i[r+"axis"]||r)===e){if(a(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}(e,s,l);if(c)if("histogram"!==c.type||l!=={v:"y",h:"x"}[c.orientation||"v"]){var u=l+"calendar",h=c[u],d={noMultiCategory:!n(c,"cartesian")||n(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&l==={h:"x",v:"y"}[c.orientation||"v"]&&(d.noMultiCategory=!0),d.autotypenumbers=t.autotypenumbers,a(c,l)){var f=o(c),p=[];for(r=0;r{"use strict";var n=r(25059),i=r(12822);function o(t,e,r){var n,o,a,s=!1;if("data"===e.type)n=t._fullData[null!==e.traces?e.traces[0]:0];else{if("layout"!==e.type)return!1;n=t._fullLayout}return o=i.nestedProperty(n,e.prop).get(),(a=r[e.type]=r[e.type]||{}).hasOwnProperty(e.prop)&&a[e.prop]!==o&&(s=!0),a[e.prop]=o,{changed:s,value:o}}function a(t,e){var r=[],n=e[0],o={};if("string"==typeof n)o[n]=e[1];else{if(!i.isPlainObject(n))return r;o=n}return l(o,(function(t,e,n){r.push({type:"layout",prop:t,value:n})}),"",0),r}function s(t,e){var r,n,o,a,s=[];if(n=e[0],o=e[1],r=e[2],a={},"string"==typeof n)a[n]=o;else{if(!i.isPlainObject(n))return s;a=n,void 0===r&&(r=o)}return void 0===r&&(r=null),l(a,(function(e,n,i){var o,a;if(Array.isArray(i)){a=i.slice();var l=Math.min(a.length,t.data.length);r&&(l=Math.min(l,r.length)),o=[];for(var c=0;c0?".":"")+o;i.isPlainObject(a)?l(a,e,s,n+1):e(s,o,a)}}))}e.manageCommandObserver=function(t,r,n,a){var s={},l=!0;r&&r._commandObserver&&(s=r._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=e.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(r&&r._commandObserver){if(c)return s;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,s}if(c){o(t,c,s.cache),s.check=function(){if(l){var e=o(t,c,s.cache);return e.changed&&a&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(a({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;h{"use strict";var n=r(98260).extendFlat;e.u=function(t,e){e=e||{};var r={valType:"info_array",editType:(t=t||{}).editType,items:[{valType:"number",min:0,max:1,editType:t.editType},{valType:"number",min:0,max:1,editType:t.editType}],dflt:[0,1]},i=t.name?t.name+" ":"",o=t.trace?"trace ":"subplot ",a=e.description?" "+e.description:"",s={x:n({},r,{description:["Sets the horizontal domain of this ",i,o,"(in plot fraction).",a].join("")}),y:n({},r,{description:["Sets the vertical domain of this ",i,o,"(in plot fraction).",a].join("")}),editType:t.editType};return t.noGridCell||(s.row={valType:"integer",min:0,dflt:0,editType:t.editType,description:["If there is a layout grid, use the domain ","for this row in the grid for this ",i,o,".",a].join("")},s.column={valType:"integer",min:0,dflt:0,editType:t.editType,description:["If there is a layout grid, use the domain ","for this column in the grid for this ",i,o,".",a].join("")}),s},e.N=function(t,e,r,n){var i=n&&n.x||[0,1],o=n&&n.y||[0,1],a=e.grid;if(a){var s=r("domain.column");void 0!==s&&(s{"use strict";t.exports=function(t){var e=t.variantValues,r=t.editType,n=t.colorEditType;void 0===n&&(n=r);var i={family:{valType:"string",noBlank:!0,strict:!0,editType:r,description:["HTML font family - the typeface that will be applied by the web browser.","The web browser will only be able to apply a font if it is available on the system","which it operates. Provide multiple font families, separated by commas, to indicate","the preference in which to apply fonts if they aren't available on the system.","The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server,","where only a select number of","fonts are installed and supported.","These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*,","*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,","*PT Sans Narrow*, *Raleway*, *Times New Roman*."].join(" ")},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:{editType:r,valType:"enumerated",values:["normal","bold"],dflt:"normal",description:["Sets the weight (or boldness) of the font."].join(" ")},style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal",description:["Sets whether a font should be styled with a normal or italic face from its family."].join(" ")},variant:t.noFontVariant?void 0:{editType:r,valType:"enumerated",values:e||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal",description:["Sets the variant of the font."].join(" ")},editType:r,description:""+(t.description||"")};return t.autoSize&&(i.size.dflt="auto"),t.autoColor&&(i.color.dflt="auto"),t.arrayOk&&(i.family.arrayOk=!0,i.weight.arrayOk=!0,i.style.arrayOk=!0,i.variant.arrayOk=!0,i.size.arrayOk=!0,i.color.arrayOk=!0),i}},53874:t=>{"use strict";t.exports={_isLinkedToArray:"frames_entry",group:{valType:"string",description:["An identifier that specifies the group to which the frame belongs,","used by animate to select a subset of frames."].join(" ")},name:{valType:"string",description:"A label by which to identify the frame"},traces:{valType:"any",description:["A list of trace indices that identify the respective traces in the","data attribute"].join(" ")},baseframe:{valType:"string",description:["The name of the frame into which this frame's properties are merged","before applying. This is used to unify properties and avoid needing","to specify the same values for the same properties in multiple frames."].join(" ")},data:{valType:"any",description:["A list of traces this frame modifies. The format is identical to the","normal trace definition."].join(" ")},layout:{valType:"any",description:["Layout properties which this frame modifies. The format is identical","to the normal layout definition."].join(" ")}}},47388:(t,e,r)=>{"use strict";var n=r(25059),i=r(21197).SUBPLOT_PATTERN;e.eV=function(t,e,r){var i,o=[],a=[];if(!(i="string"==typeof e?n.getModule(e).plot:"function"==typeof e?e:e.plot))return[o,t];for(var s=r,l=0;l{"use strict";var n=r(62309).overrideAll,i=r(53572),o=r(85833),a=r(47388).KO,s=r(12822),l=r(25853),c="gl3d",u="scene";e.name=c,e.attr=u,e.idRoot=u,e.idRegex=e.attrRegex=s.counterRegex("scene"),e.attributes=r(816),e.layoutAttributes=r(41019),e.baseLayoutAttrOverrides=n({hoverlabel:i.hoverlabel},"plot","nested"),e.supplyLayoutDefaults=r(13351),e.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots[c],i=0;i{"use strict";t.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's 3D coordinate system and","a 3D scene.","If *scene* (the default value), the (x,y,z) coordinates refer to","`layout.scene`.","If *scene2*, the (x,y,z) coordinates refer to `layout.scene2`,","and so on."].join(" ")}}},82854:(t,e,r)=>{"use strict";var n=r(17499),i=r(86130),o=r(98260).extendFlat,a=r(62309).overrideAll;t.exports=a({visible:i.visible,showspikes:{valType:"boolean",dflt:!0,description:["Sets whether or not spikes starting from","data points to this axis' wall are shown on hover."].join(" ")},spikesides:{valType:"boolean",dflt:!0,description:["Sets whether or not spikes extending from the","projection data points to this axis' wall boundaries","are shown on hover."].join(" ")},spikethickness:{valType:"number",min:0,dflt:2,description:"Sets the thickness (in px) of the spikes."},spikecolor:{valType:"color",dflt:n.defaultLine,description:"Sets the color of the spikes."},showbackground:{valType:"boolean",dflt:!1,description:["Sets whether or not this axis' wall","has a background color."].join(" ")},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)",description:"Sets the background color of this axis' wall."},showaxeslabels:{valType:"boolean",dflt:!0,description:"Sets whether or not this axis is labeled"},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:{text:i.title.text,font:i.title.font},type:o({},i.type,{values:["-","linear","log","date","category"]}),autotypenumbers:i.autotypenumbers,autorange:i.autorange,autorangeoptions:{minallowed:i.autorangeoptions.minallowed,maxallowed:i.autorangeoptions.maxallowed,clipmin:i.autorangeoptions.clipmin,clipmax:i.autorangeoptions.clipmax,include:i.autorangeoptions.include,editType:"plot"},rangemode:i.rangemode,minallowed:i.minallowed,maxallowed:i.maxallowed,range:o({},i.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:i.minor.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,mirror:i.mirror,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,labelalias:i.labelalias,tickfont:i.tickfont,tickangle:i.tickangle,tickprefix:i.tickprefix,showtickprefix:i.showtickprefix,ticksuffix:i.ticksuffix,showticksuffix:i.showticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:i.showline,linecolor:i.linecolor,linewidth:i.linewidth,showgrid:i.showgrid,gridcolor:o({},i.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:i.gridwidth,zeroline:i.zeroline,zerolinecolor:i.zerolinecolor,zerolinewidth:i.zerolinewidth,_deprecated:{title:i._deprecated.title,titlefont:i._deprecated.titlefont}},"plot","from-root")},20049:(t,e,r)=>{"use strict";var n=r(18106).mix,i=r(12822),o=r(46121),a=r(82854),s=r(25119),l=r(91200),c=["xaxis","yaxis","zaxis"],u=13600/187;t.exports=function(t,e,r){var h,d;function f(t,e){return i.coerce(h,d,a,t,e)}for(var p=0;p{"use strict";var n=r(17235),i=r(12822),o=["xaxis","yaxis","zaxis"];function a(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}a.prototype.merge=function(t,e){for(var r=this,a=0;a<3;++a){var s=e[o[a]];s.visible?(r.labels[a]=t._meta?i.templateString(s.title.text,t._meta):s.title.text,"font"in s.title&&(s.title.font.color&&(r.labelColor[a]=n(s.title.font.color)),s.title.font.family&&(r.labelFont[a]=s.title.font.family),s.title.font.size&&(r.labelSize[a]=s.title.font.size),s.title.font.weight&&(r.labelFontWeight[a]=s.title.font.weight),s.title.font.style&&(r.labelFontStyle[a]=s.title.font.style),s.title.font.variant&&(r.labelFontVariant[a]=s.title.font.variant)),"showline"in s&&(r.lineEnable[a]=s.showline),"linecolor"in s&&(r.lineColor[a]=n(s.linecolor)),"linewidth"in s&&(r.lineWidth[a]=s.linewidth),"showgrid"in s&&(r.gridEnable[a]=s.showgrid),"gridcolor"in s&&(r.gridColor[a]=n(s.gridcolor)),"gridwidth"in s&&(r.gridWidth[a]=s.gridwidth),"log"===s.type?r.zeroEnable[a]=!1:"zeroline"in s&&(r.zeroEnable[a]=s.zeroline),"zerolinecolor"in s&&(r.zeroLineColor[a]=n(s.zerolinecolor)),"zerolinewidth"in s&&(r.zeroLineWidth[a]=s.zerolinewidth),"ticks"in s&&s.ticks?r.lineTickEnable[a]=!0:r.lineTickEnable[a]=!1,"ticklen"in s&&(r.lineTickLength[a]=r._defaultLineTickLength[a]=s.ticklen),"tickcolor"in s&&(r.lineTickColor[a]=n(s.tickcolor)),"tickwidth"in s&&(r.lineTickWidth[a]=s.tickwidth),"tickangle"in s&&(r.tickAngle[a]="auto"===s.tickangle?-3600:Math.PI*-s.tickangle/180),"showticklabels"in s&&(r.tickEnable[a]=s.showticklabels),"tickfont"in s&&(s.tickfont.color&&(r.tickColor[a]=n(s.tickfont.color)),s.tickfont.family&&(r.tickFont[a]=s.tickfont.family),s.tickfont.size&&(r.tickSize[a]=s.tickfont.size),s.tickfont.weight&&(r.tickFontWeight[a]=s.tickfont.weight),s.tickfont.style&&(r.tickFontStyle[a]=s.tickfont.style),s.tickfont.variant&&(r.tickFontVariant[a]=s.tickfont.variant)),"mirror"in s?-1!==["ticks","all","allticks"].indexOf(s.mirror)?(r.lineTickMirror[a]=!0,r.lineMirror[a]=!0):!0===s.mirror?(r.lineTickMirror[a]=!1,r.lineMirror[a]=!0):(r.lineTickMirror[a]=!1,r.lineMirror[a]=!1):r.lineMirror[a]=!1,"showbackground"in s&&!1!==s.showbackground?(r.backgroundEnable[a]=!0,r.backgroundColor[a]=n(s.backgroundcolor)):r.backgroundEnable[a]=!1):(r.tickEnable[a]=!1,r.labelEnable[a]=!1,r.lineEnable[a]=!1,r.lineTickEnable[a]=!1,r.gridEnable[a]=!1,r.zeroEnable[a]=!1,r.backgroundEnable[a]=!1)}},t.exports=function(t,e){var r=new a;return r.merge(t,e),r}},13351:(t,e,r)=>{"use strict";var n=r(12822),i=r(17499),o=r(25059),a=r(84313),s=r(20049),l=r(41019),c=r(47388).KO,u="gl3d";function h(t,e,r,n){for(var a=r("bgcolor"),l=i.combine(a,n.paper_bgcolor),h=["up","center","eye"],d=0;d.999&&(g="turntable"):g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",n.getDfltFromLayout("hovermode"))}t.exports=function(t,e,r){var i=e._basePlotModules.length>1;a(t,e,r,{type:u,attributes:l,handleDefaults:h,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},41019:(t,e,r)=>{"use strict";var n=r(82854),i=r(40365).u,o=r(98260).extendFlat,a=r(12822).counterRegex;function s(t,e,r){return{x:{valType:"number",dflt:t,editType:"camera"},y:{valType:"number",dflt:e,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}t.exports={_arrayAttrRegexps:[a("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:o(s(0,0,1),{description:["Sets the (x,y,z) components of the 'up' camera vector.","This vector determines the up direction of this scene","with respect to the page.","The default is *{x: 0, y: 0, z: 1}* which means that","the z axis points up."].join(" ")}),center:o(s(0,0,0),{description:["Sets the (x,y,z) components of the 'center' camera vector","This vector determines the translation (x,y,z) space","about the center of this scene.","By default, there is no such translation."].join(" ")}),eye:o(s(1.25,1.25,1.25),{description:["Sets the (x,y,z) components of the 'eye' camera vector.","This vector determines the view point about the origin","of this scene."].join(" ")}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc",description:["Sets the projection type. The projection type could be","either *perspective* or *orthographic*. The default is","*perspective*."].join(" ")},editType:"calc"},editType:"camera"},domain:i({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0},description:["If *cube*, this scene's axes are drawn as a cube,","regardless of the axes' ranges.","If *data*, this scene's axes are drawn","in proportion with the axes' ranges.","If *manual*, this scene's axes are drawn","in proportion with the input of *aspectratio*","(the default behavior if *aspectratio* is provided).","If *auto*, this scene's axes are drawn","using the results of *data* except when one axis","is more than four times the size of the two others,","where in that case the results of *cube* are used."].join(" ")},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"},description:["Sets this scene's axis aspectratio."].join(" ")},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot",description:["Determines the mode of drag interactions for this scene."].join(" ")},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions for this scene."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in camera attributes.","Defaults to `layout.uirevision`."].join(" ")},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera",description:"Obsolete. Use `camera` instead."}}}},63306:(t,e,r)=>{"use strict";var n=r(17235),i=["xaxis","yaxis","zaxis"];function o(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}o.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[i[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=n(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},t.exports=function(t){var e=new o;return e.merge(t),e}},1285:(t,e,r)=>{"use strict";t.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[o[c]];if(u._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/t.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=r[c].lo/t.dataScale[c],u.range[1]=r[c].hi/t.dataScale[c],u._m=1/(t.dataScale[c]*r[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var h=u.tickmode;if("auto"===u.tickmode){u.tickmode="linear";var d=u.nticks||i.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/d)}for(var f=n.calcTicks(u,{msUTC:!0}),p=0;p/g," "));l[c]=f,u.tickmode=h}}for(e.ticks=l,c=0;c<3;++c)for(a[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]),p=0;p<2;++p)e.bounds[p][c]=t.glplot.bounds[p][c];t.contourLevels=function(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),o=0;o{"use strict";function e(t,e){var r,n,i=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)i[n]+=t[4*r+n]*e[r];return i}t.exports=function(t,r){return e(t.projection,e(t.view,e(t.model,[r[0],r[1],r[2],1])))}},85833:(t,e,r)=>{"use strict";var n,i,o=r(31845).gl_plot3d,a=o.createCamera,s=o.createScene,l=r(62945),c=r(17520),u=r(25059),h=r(12822),d=h.preserveDrawingBuffer(),f=r(75815),p=r(70410),m=r(17235),g=r(91203),v=r(40747),b=r(82678),y=r(63306),x=r(1285),_=r(19496).applyAutorangeOptions,w=!1;function k(t,e){var r=document.createElement("div"),n=t.container;this.graphDiv=t.graphDiv;var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.style.position="absolute",i.style.top=i.style.left="0px",i.style.width=i.style.height="100%",i.style["z-index"]=20,i.style["pointer-events"]="none",r.appendChild(i),this.svgContainer=i,r.id=t.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=e,this.id=t.id||"scene",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=b(e,e[this.id]),this.spikeOptions=y(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=this.pixelRatio||t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=u.getComponentMethod("annotations3d","convert"),this.drawAnnotations=u.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var A=k.prototype;A.prepareOptions=function(){var t=this,e={canvas:t.canvas,gl:t.gl,glOptions:{preserveDrawingBuffer:d,premultipliedAlpha:!0,antialias:!0},container:t.container,axes:t.axesOptions,spikes:t.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:t.camera,pixelRatio:t.pixelRatio};if(t.staticMode){if(!(i||(n=document.createElement("canvas"),i=l({canvas:n,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error("error creating static canvas/context for image server");e.gl=i,e.canvas=n}return e};var M=!0;A.tryCreatePlot=function(){var t=this,e=t.prepareOptions(),r=!0;try{t.glplot=s(e)}catch(n){if(t.staticMode||!M||d)r=!1;else{h.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{d=e.glOptions.preserveDrawingBuffer=!0,t.glplot=s(e)}catch(t){d=e.glOptions.preserveDrawingBuffer=!1,r=!1}}}return M=!1,r},A.initializeGLCamera=function(){var t=this,e=t.fullSceneLayout.camera,r="orthographic"===e.projection.type;t.camera=a(t.container,{center:[e.center.x,e.center.y,e.center.z],eye:[e.eye.x,e.eye.y,e.eye.z],up:[e.up.x,e.up.y,e.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})},A.initializeGLPlot=function(){var t=this;if(t.initializeGLCamera(),!t.tryCreatePlot())return g(t);t.traces={},t.make4thDimension();var e=t.graphDiv,r=e.layout,n=function(){var e={};return t.isCameraChanged(r)&&(e[t.id+".camera"]=t.getCamera()),t.isAspectChanged(r)&&(e[t.id+".aspectratio"]=t.glplot.getAspectratio(),"manual"!==r[t.id].aspectmode&&(t.fullSceneLayout.aspectmode=r[t.id].aspectmode=e[t.id+".aspectmode"]="manual")),e},i=function(t){if(!1!==t.fullSceneLayout.dragmode){var e=n();t.saveLayout(r),t.graphDiv.emit("plotly_relayout",e)}};return t.glplot.canvas&&(t.glplot.canvas.addEventListener("mouseup",(function(){i(t)})),t.glplot.canvas.addEventListener("touchstart",(function(){w=!0})),t.glplot.canvas.addEventListener("wheel",(function(r){if(e._context._scrollZoom.gl3d){if(t.camera._ortho){var n=r.deltaX>r.deltaY?1.1:1/1.1,o=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*o.x,y:n*o.y,z:n*o.z})}i(t)}}),!!c&&{passive:!1}),t.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit("plotly_relayouting",e)}})),t.staticMode||t.glplot.canvas.addEventListener("webglcontextlost",(function(r){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},A.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var o=r._fullLayout._invScaleX,a=r._fullLayout._invScaleY,s=i.width*o,l=i.height*a;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),x(e),e.glplot.axes.update(e.axesOptions);for(var c=Object.keys(e.traces),u=null,d=e.glplot.selection,m=0;m")):"isosurface"===t.type||"volume"===t.type?(A.valueLabel=f.hoverLabelText(e._mockAxis,e._mockAxis.d2l(d.traceCoordinate[3]),t.valuehoverformat),C.push("value: "+A.valueLabel),d.textLabel&&C.push(d.textLabel),y=C.join("
")):y=d.textLabel;var E={x:d.traceCoordinate[0],y:d.traceCoordinate[1],z:d.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:k};p.appendArrayPointValue(E,_,k),t._module.eventData&&(E=_._module.eventData(E,d,_,{},k));var L={points:[E]};if(e.fullSceneLayout.hovermode){var z=[];p.loneHover({trace:_,x:(.5+.5*b[0]/b[3])*s,y:(.5-.5*b[1]/b[3])*l,xLabel:A.xLabel,yLabel:A.yLabel,zLabel:A.zLabel,text:y,name:u.name,color:p.castHoverOption(_,k,"bgcolor")||u.color,borderColor:p.castHoverOption(_,k,"bordercolor"),fontFamily:p.castHoverOption(_,k,"font.family"),fontSize:p.castHoverOption(_,k,"font.size"),fontColor:p.castHoverOption(_,k,"font.color"),nameLength:p.castHoverOption(_,k,"namelength"),textAlign:p.castHoverOption(_,k,"align"),hovertemplate:h.castOption(_,k,"hovertemplate"),hovertemplateLabels:h.extendFlat({},E,A),eventData:[E]},{container:n,gd:r,inOut_bbox:z}),E.bbox=z[0]}d.distance<5&&(d.buttons||w)?r.emit("plotly_click",L):r.emit("plotly_hover",L),this.oldEventData=L}else p.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},A.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):h.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(e)};var T=["xaxis","yaxis","zaxis"];function S(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var o=T[i],a=o.charAt(0),s=n[o],l=e[a],c=e[a+"calendar"],u=e["_"+a+"length"];if(h.isArrayOrTypedArray(l))for(var d,f=0;f<(u||l.length);f++)if(h.isArrayOrTypedArray(l[f]))for(var p=0;pv[1][a])v[0][a]=-1,v[1][a]=1;else{var O=v[1][a]-v[0][a];v[0][a]-=O/32,v[1][a]+=O/32}if(x=[v[0][a],v[1][a]],x=_(x,l),v[0][a]=x[0],v[1][a]=x[1],l.isReversed()){var D=v[0][a];v[0][a]=v[1][a],v[1][a]=D}}else x=l.range,v[0][a]=l.r2l(x[0]),v[1][a]=l.r2l(x[1]);v[0][a]===v[1][a]&&(v[0][a]-=1,v[1][a]+=1),b[a]=v[1][a]-v[0][a],l.range=[v[0][a],v[1][a]],l.limitRange(),n.glplot.setBounds(a,{min:l.range[0]*f[a],max:l.range[1]*f[a]})}var I=u.aspectmode;if("cube"===I)g=[1,1,1];else if("manual"===I){var R=u.aspectratio;g=[R.x,R.y,R.z]}else{if("auto"!==I&&"data"!==I)throw new Error("scene.js aspectRatio was not one of the enumerated types");var F=[1,1,1];for(a=0;a<3;++a){var P=y[c=(l=u[T[a]]).type];F[a]=Math.pow(P.acc,1/P.count)/f[a]}g="data"===I||Math.max.apply(null,F)/Math.min.apply(null,F)<=4?F:[1,1,1]}u.aspectratio.x=h.aspectratio.x=g[0],u.aspectratio.y=h.aspectratio.y=g[1],u.aspectratio.z=h.aspectratio.z=g[2],n.glplot.setAspectratio(u.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:u.aspectratio.x,y:u.aspectratio.y,z:u.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=u.aspectmode);var N=u.domain||null,j=e._size||null;if(N&&j){var B=n.container.style;B.position="absolute",B.left=j.l+N.x[0]*j.w+"px",B.top=j.t+(1-N.y[1])*j.h+"px",B.width=j.w*(N.x[1]-N.x[0])+"px",B.height=j.h*(N.y[1]-N.y[0])+"px"}n.glplot.redraw()}},A.destroy=function(){var t=this;t.glplot&&(t.camera.mouseListener.enabled=!1,t.container.removeEventListener("wheel",t.camera.wheelListener),t.camera=null,t.glplot.dispose(),t.container.parentNode.removeChild(t.container),t.glplot=null)},A.getCamera=function(){var t,e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),{up:{x:(t=e.camera).up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]},projection:{type:!0===t._ortho?"orthographic":"perspective"}}},A.setViewport=function(t){var e,r=this,n=t.camera;r.camera.lookAt.apply(this,[[(e=n).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]),r.glplot.setAspectratio(t.aspectratio),"orthographic"===n.projection.type!==r.camera._ortho&&(r.glplot.redraw(),r.glplot.clearRGBA(),r.glplot.dispose(),r.initializeGLPlot())},A.isCameraChanged=function(t){var e=this.getCamera(),r=h.nestedProperty(t,this.id+".camera").get();function n(t,e,r,n){var i=["up","center","eye"],o=["x","y","z"];return e[i[r]]&&t[i[r]][o[n]]===e[i[r]][o[n]]}var i=!1;if(void 0===r)i=!0;else{for(var o=0;o<3;o++)for(var a=0;a<3;a++)if(!n(e,r,o,a)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},A.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=h.nestedProperty(t,this.id+".aspectratio").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},A.saveLayout=function(t){var e,r,n,i,o,a,s=this,l=s.fullLayout,c=s.isCameraChanged(t),d=s.isAspectChanged(t),f=c||d;if(f){var p={};c&&(e=s.getCamera(),n=(r=h.nestedProperty(t,s.id+".camera")).get(),p[s.id+".camera"]=n),d&&(i=s.glplot.getAspectratio(),a=(o=h.nestedProperty(t,s.id+".aspectratio")).get(),p[s.id+".aspectratio"]=a),u.call("_storeDirectGUIEdit",t,l._preGUI,p),c&&(r.set(e),h.nestedProperty(l,s.id+".camera").set(e)),d&&(o.set(i),h.nestedProperty(l,s.id+".aspectratio").set(i),s.glplot.redraw())}return f},A.updateFx=function(t,e){var r=this,n=r.camera;if(n)if("orbit"===t)n.mode="orbit",n.keyBindingMode="rotate";else if("turntable"===t){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,o=i._fullLayout,a=r.fullSceneLayout.camera,s=a.up.x,l=a.up.y,c=a.up.z;if(c/Math.sqrt(s*s+l*l+c*c)<.999){var d=r.id+".camera.up",f={x:0,y:0,z:1},p={};p[d]=f;var m=i.layout;u.call("_storeDirectGUIEdit",m,o._preGUI,p),a.up=f,h.nestedProperty(m,d).set(f)}}else n.keyBindingMode=t;r.fullSceneLayout.hovermode=e},A.toImage=function(t){var e=this;t||(t="png"),e.staticMode&&e.container.appendChild(n),e.glplot.redraw();var r=e.glplot.gl,i=r.drawingBufferWidth,o=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var a=new Uint8Array(i*o*4);r.readPixels(0,0,i,o,r.RGBA,r.UNSIGNED_BYTE,a),function(t,e,r){for(var n=0,i=r-1;n0)for(var s=255/a,l=0;l<3;++l)t[o+l]=Math.min(s*t[o+l],255)}}(a,i,o);var s=document.createElement("canvas");s.width=i,s.height=o;var l,c=s.getContext("2d",{willReadFrequently:!0}),u=c.createImageData(i,o);switch(u.data.set(a),c.putImageData(u,0,0),t){case"jpeg":l=s.toDataURL("image/jpeg");break;case"webp":l=s.toDataURL("image/webp");break;default:l=s.toDataURL("image/png")}return e.staticMode&&e.container.removeChild(n),l},A.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[T[t]];f.setConvert(e,this.fullLayout),e.setScale=h.noop}},A.make4thDimension=function(){var t=this,e=t.graphDiv._fullLayout;t._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},f.setConvert(t._mockAxis,e)},t.exports=k},13195:(t,e,r)=>{"use strict";var n=r(75058),i=r(46367),o=r(84226),a=r(18360),s=r(21422),l=r(85538),c=r(98260).extendFlat,u=n({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});u.family.dflt='"Open Sans", verdana, arial, sans-serif',u.size.dflt=12,u.color.dflt=o.defaultLine,t.exports={font:u,title:{text:{valType:"string",editType:"layoutstyle",description:["Sets the plot's title.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:n({editType:"layoutstyle",description:["Sets the title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle",description:["Sets the x position with respect to `xref` in normalized","coordinates from *0* (left) to *1* (right)."].join(" ")},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle",description:["Sets the y position with respect to `yref` in normalized","coordinates from *0* (bottom) to *1* (top).","*auto* places the baseline of the title onto the","vertical center of the top margin."].join(" ")},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle",description:["Sets the title's horizontal alignment with respect to its x position.","*left* means that the title starts at x,","*right* means that the title ends at x","and *center* means that the title's center is at x.","*auto* divides `xref` by three and calculates the `xanchor`","value automatically based on the value of `x`."].join(" ")},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle",description:["Sets the title's vertical alignment with respect to its y position.","*top* means that the title's cap line is at y,","*bottom* means that the title's baseline is at y","and *middle* means that the title's midline is at y.","*auto* divides `yref` by three and calculates the `yanchor`","value automatically based on the value of `y`."].join(" ")},pad:c(l({editType:"layoutstyle"}),{description:["Sets the padding of the title.","Each padding value only applies when the corresponding","`xanchor`/`yanchor` value is set accordingly. E.g. for left","padding to take effect, `xanchor` must be set to *left*.","The same rule applies if `xanchor`/`yanchor` is determined automatically.","Padding is muted if the respective anchor value is *middle*/*center*."].join(" ")}),automargin:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether the title can automatically push the figure margins.","If `yref='paper'` then the margin will expand to ensure that the title doesn’t","overlap with the edges of the container. If `yref='container'` then the margins","will ensure that the title doesn’t overlap with the plot area, tick labels,","and axis titles. If `automargin=true` and the margins need to be expanded,","then y will be set to a default 1 and yanchor will be set to an appropriate","default to ensure that minimal margin space is needed. Note that when `yref='paper'`,","only 1 or 0 are allowed y values. Invalid values will be reset to the default 1."].join(" ")},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot",description:["Determines how the font size for various text","elements are uniformed between each trace type.","If the computed text sizes were smaller than","the minimum size defined by `uniformtext.minsize`","using *hide* option hides the text; and","using *show* option shows the text without further downscaling.","Please note that if the size defined by `minsize` is greater than","the font size defined by trace, then the `minsize` is used."].join(" ")},minsize:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the minimum text size between traces of the same type."].join(" ")},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none",description:["Determines whether or not a layout width or height","that has been left undefined by the user","is initialized on each relayout.","Note that, regardless of this attribute,","an undefined layout width or height","is always initialized on the first call to plot."].join(" ")},width:{valType:"number",min:10,dflt:700,editType:"plot",description:["Sets the plot's width (in px)."].join(" ")},height:{valType:"number",min:10,dflt:450,editType:"plot",description:["Sets the plot's height (in px)."].join(" ")},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum width of the plot with margin.automargin applied (in px)"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum height of the plot with margin.automargin applied (in px)"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the left margin (in px)."},r:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the right margin (in px)."},t:{valType:"number",min:0,dflt:100,editType:"plot",description:"Sets the top margin (in px)."},b:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the bottom margin (in px)."},pad:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the amount of padding (in px)","between the plotting area and the axis lines"].join(" ")},autoexpand:{valType:"boolean",dflt:!0,editType:"plot",description:["Turns on/off margin expansion computations.","Legends, colorbars, updatemenus, sliders, axis rangeselector and rangeslider","are allowed to push the margins by defaults."].join(" ")},editType:"plot"},computed:{valType:"any",editType:"none",description:["Placeholder for exporting automargin-impacting values namely","`margin.t`, `margin.b`, `margin.l` and `margin.r` in *full-json* mode."].join(" ")},paper_bgcolor:{valType:"color",dflt:o.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:o.background,editType:"layoutstyle",description:["Sets the background color of the plotting area in-between x and y axes."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","This is the default value; however it could be overridden for individual axes."].join(" ")},separators:{valType:"string",editType:"plot",description:["Sets the decimal and thousand separators.","For example, *. * puts a '.' before decimals and a space","between thousands. In English locales, dflt is *.,* but","other locales may alter this default."].join(" ")},hidesources:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether or not a text link citing the data source is","placed at the bottom-right cored of the figure.","Has only an effect only on graphs that have been generated via","forked graphs from the Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise)."].join(" ")},showlegend:{valType:"boolean",editType:"legend",description:["Determines whether or not a legend is drawn.","Default is `true` if there is a trace to show and any of these:","a) Two or more traces would by default be shown in the legend.","b) One pie trace is shown in the legend.","c) One trace is explicitly given with `showlegend: true`."].join(" ")},colorway:{valType:"colorlist",dflt:o.defaults,editType:"calc",description:"Sets the default trace colors."},datarevision:{valType:"any",editType:"calc",description:["If provided, a changed value tells `Plotly.react` that","one or more data arrays has changed. This way you can modify","arrays in-place rather than making a complete new copy for an","incremental change.","If NOT provided, `Plotly.react` assumes that data arrays are","being treated as immutable, thus any data array with a","different identity from its predecessor contains new data."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Used to allow user interactions with the plot to persist after","`Plotly.react` calls that are unaware of these interactions.","If `uirevision` is omitted, or if it is given and it changed from","the previous `Plotly.react` call, the exact new figure is used.","If `uirevision` is truthy and did NOT change, any attribute","that has been affected by user interactions and did not receive a","different value in the new figure will keep the interaction value.","`layout.uirevision` attribute serves as the default for","`uirevision` attributes in various sub-containers. For finer","control you can set these sub-attributes directly. For example,","if your app separately controls the data on the x and y axes you","might set `xaxis.uirevision=*time*` and `yaxis.uirevision=*cost*`.","Then if only the y data is changed, you can update","`yaxis.uirevision=*quantity*` and the y axis range will reset but","the x axis range will retain any user-driven zoom."].join(" ")},editrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in `editable: true`","configuration, other than trace names and axis titles.","Defaults to `layout.uirevision`."].join(" ")},selectionrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in selected points","from all traces."].join(" ")},template:{valType:"any",editType:"calc",description:["Default attributes to be applied to the plot. Templates can be","created from existing plots using `Plotly.makeTemplate`, or","created manually. They should be objects with format:","`{layout: layoutTemplate, data: {[type]: [traceTemplate, ...]}, ...}`","`layoutTemplate` and `traceTemplate` are objects matching the","attribute structure of `layout` and a data trace. ","Trace templates are applied cyclically to traces of each type.","Container arrays (eg `annotations`) have special handling:","An object ending in `defaults` (eg `annotationdefaults`) is applied","to each array item. But if an item has a `templateitemname` key","we look in the template array for an item with matching `name` and","apply that instead. If no matching `name` is found we mark the item","invisible. Any named template item not referenced is appended to","the end of the array, so you can use this for a watermark annotation","or a logo image, for example. To omit one of these items on the plot,","make an item with matching `templateitemname` and `visible: false`."].join(" ")},newshape:a.newshape,activeshape:a.activeshape,newselection:s.newselection,activeselection:s.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information that can be used in various `text` attributes.","Attributes such as the graph, axis and colorbar `title.text`, annotation `text`","`trace.name` in legend items, `rangeselector`, `updatemenus` and `sliders` `label` text","all support `meta`. One can access `meta` fields using template strings:","`%{meta[i]}` where `i` is the index of the `meta`","item in question.","`meta` can also be an object for example `{key: value}` which can be accessed","%{meta[key]}."].join(" ")},transition:c({},i.transition,{description:["Sets transition options used during Plotly.react updates."].join(" "),editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the contents of the title, please use `title.text` now."].join(" ")},titlefont:n({editType:"layoutstyle",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}}},85538:t=>{"use strict";t.exports=function(t){var e=t.editType;return{t:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) along the top of the component."},r:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) on the right side of the component."},b:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) along the bottom of the component."},l:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) on the left side of the component."},editType:e}}},51137:(t,e,r)=>{"use strict";var n=r(27941),i=r(79969).de,o=r(31830).OE,a=r(7370),s=r(44514),l=r(25059),c=r(35852),u=r(46121),h=r(12822),d=r(17499),f=r(32994).BADNUM,p=r(99246),m=r(8867).clearOutline,g=r(49114),v=r(46367),b=r(53874),y=r(47388).eV,x=h.relinkPrivateKeys,_=h._,w=t.exports={};h.extendFlat(w,l),w.attributes=r(3520),w.attributes.type.values=w.allTypes,w.fontAttrs=r(75058),w.layoutAttributes=r(13195);var k=w.transformsRegistry,A=r(74036);w.executeAPICommand=A.executeAPICommand,w.computeAPICommandBindings=A.computeAPICommandBindings,w.manageCommandObserver=A.manageCommandObserver,w.hasSimpleAPICommandBindings=A.hasSimpleAPICommandBindings,w.redrawText=function(t){return t=h.getGraphDiv(t),new Promise((function(e){setTimeout((function(){t._fullLayout&&(l.getComponentMethod("annotations","draw")(t),l.getComponentMethod("legend","draw")(t),l.getComponentMethod("colorbar","draw")(t),e(w.previousPromises(t)))}),300)}))},w.resize=function(t){var e;t=h.getGraphDiv(t);var r=new Promise((function(r,n){t&&!h.isHidden(t)||n(new Error("Resize must be passed a displayed plot div element.")),t._redrawTimer&&clearTimeout(t._redrawTimer),t._resolveResize&&(e=t._resolveResize),t._resolveResize=r,t._redrawTimer=setTimeout((function(){if(!t.layout||t.layout.width&&t.layout.height||h.isHidden(t))r(t);else{delete t.layout.width,delete t.layout.height;var e=t.changed;t.autoplay=!0,l.call("relayout",t,{autosize:!0}).then((function(){t.changed=e,t._resolveResize===r&&(delete t._resolveResize,r(t))}))}}),100)}));return e&&e(r),r},w.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then((function(){t._promises=[]}))},w.addLinks=function(t){if(t._context.showLink||t._context.showSources){var e=t._fullLayout,r=h.ensureSingle(e._paper,"text","js-plot-link-container",(function(t){t.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:d.defaultLine,"pointer-events":"all"}).each((function(){var t=n.select(this);t.append("tspan").classed("js-link-to-tool",!0),t.append("tspan").classed("js-link-spacer",!0),t.append("tspan").classed("js-sourcelinks",!0)}))})),i=r.node(),o={y:e._paper.attr("height")-9};document.body.contains(i)&&i.getComputedTextLength()>=e.width-20?(o["text-anchor"]="start",o.x=5):(o["text-anchor"]="end",o.x=e._paper.attr("width")-7),r.attr(o);var a=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",(function(){w.sendDataToCloud(t)}));else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}(t,a),s.text(a.text()&&l.text()?" - ":"")}},w.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit("plotly_beforeexport");var r=n.select(t).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=w.graphJson(t,!1,"keepdata"),i.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var M=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],T=["year","month","dayMonth","dayMonthYear"];function S(t,e){var r=t._context.locale;r||(r="en-US");var n=!1,i={};function o(t){for(var r=!0,o=0;o1&&I.length>1){for(l.getComponentMethod("grid","sizeDefaults")(c,s),a=0;a15&&I.length>15&&0===s.shapes.length&&0===s.images.length,w.linkSubplots(d,s,u,n),w.cleanPlot(d,s,u,n);var j=!(!n._has||!n._has("gl2d")),B=!(!s._has||!s._has("gl2d")),U=!(!n._has||!n._has("cartesian"))||j,G=!(!s._has||!s._has("cartesian"))||B;U&&!G?n._bgLayer.remove():G&&!U&&(s._shouldCreateBgLayer=!0),n._zoomlayer&&!t._dragging&&m({_fullLayout:n}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i0){var u=1-2*s;n=Math.round(u*n),i=Math.round(u*i)}}var d=w.layoutAttributes.width.min,f=w.layoutAttributes.height.min;n1,m=!e.height&&Math.abs(r.height-i)>1;(m||p)&&(p&&(r.width=n),m&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(t,e,r,n){var i,o,a,s=l.componentsRegistry,c=e._basePlotModules,u=l.subplotsRegistry.cartesian;for(i in s)(a=s[i]).includeBasePlot&&a.includeBasePlot(t,e);for(var d in c.length||c.push(u),e._has("cartesian")&&(l.getComponentMethod("grid","contentDefaults")(t,e),u.finalizeSubplots(t,e)),e._subplots)e._subplots[d].sort(h.subplotSort);for(o=0;o1&&(r.l/=v,r.r/=v)}if(f){var b=(r.t+r.b)/f;b>1&&(r.t/=b,r.b/=b)}var y=void 0!==r.xl?r.xl:r.x,x=void 0!==r.xr?r.xr:r.x,_=void 0!==r.yt?r.yt:r.y,k=void 0!==r.yb?r.yb:r.y;p[e]={l:{val:y,size:r.l+g},r:{val:x,size:r.r+g},b:{val:k,size:r.b+g},t:{val:_,size:r.t+g}},m[e]=1}else delete p[e],delete m[e];if(!n._replotting)return w.doAutoMargin(t)}},w.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),O(e);var i=e._size,o=e.margin,s={t:0,b:0,l:0,r:0},c=h.extendFlat({},i),u=o.l,d=o.r,f=o.t,m=o.b,g=e._pushmargin,v=e._pushmarginIds,b=e.minreducedwidth,y=e.minreducedheight;if(!1!==o.autoexpand){for(var x in g)v[x]||delete g[x];var _=t._fullLayout._reservedMargin;for(var k in _)for(var A in _[k]){var M=_[k][A];s[A]=Math.max(s[A],M)}for(var T in g.base={l:{val:0,size:u},r:{val:1,size:d},t:{val:1,size:f},b:{val:0,size:m}},s){var S=0;for(var C in g)"base"!==C&&a(g[C][T].size)&&(S=g[C][T].size>S?g[C][T].size:S);var E=Math.max(0,o[T]-S);s[T]=Math.max(0,s[T]-E)}for(var L in g){var z=g[L].l||{},D=g[L].b||{},I=z.val,R=z.size,F=D.val,P=D.size,N=r-s.r-s.l,j=n-s.t-s.b;for(var B in g){if(a(R)&&g[B].r){var U=g[B].r.val,G=g[B].r.size;if(U>I){var V=(R*U+(G-N)*I)/(U-I),H=(G*(1-I)+(R-N)*(1-U))/(U-I);V+H>u+d&&(u=V,d=H)}}if(a(P)&&g[B].t){var W=g[B].t.val,q=g[B].t.size;if(W>F){var Y=(P*W+(q-j)*F)/(W-F),Z=(q*(1-F)+(P-j)*(1-W))/(W-F);Y+Z>m+f&&(m=Y,f=Z)}}}}}var X=h.constrain(r-o.l-o.r,2,b),$=h.constrain(n-o.t-o.b,2,y),J=Math.max(0,r-X),K=Math.max(0,n-$);if(J){var Q=(u+d)/J;Q>1&&(u/=Q,d/=Q)}if(K){var tt=(m+f)/K;tt>1&&(m/=tt,f/=tt)}if(i.l=Math.round(u)+s.l,i.r=Math.round(d)+s.r,i.t=Math.round(f)+s.t,i.b=Math.round(m)+s.b,i.p=Math.round(o.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&(w.didMarginChange(c,i)||function(t){if("_redrawFromAutoMarginCount"in t._fullLayout)return!1;var e=p.list(t,"",!0);for(var r in e)if(e[r].autoshift||e[r].shift)return!0;return!1}(t))){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var et=3*(1+Object.keys(v).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return l.call("redraw",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit("plotly_transitioninterrupted",[])}));var o=0,a=0;function s(){return o++,function(){var e;a++,n||a!==o||(e=i,t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return l.call("redraw",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])})).then(e)))}}r.runFn(s),setTimeout(s())}))}],o=h.syncOrAsync(i,t);return o&&o.then||(o=Promise.resolve()),o.then((function(){return t}))}w.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},w.graphJson=function(t,e,r,n,i,o){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&w.supplyDefaults(t);var a=i?t._fullData:t.data,l=i?t._fullLayout:t.layout,c=(t._transitionData||{})._frames;function u(t,e){if("function"==typeof t)return e?"_function_":null;if(h.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(o){if(-1===["_","["].indexOf(o.charAt(0)))if("function"!=typeof t[o]){if("keepdata"===r){if("src"===o.substr(o.length-3))return}else if("keepstream"===r){if("string"==typeof(n=t[o+"src"])&&n.indexOf(":")>0&&!h.isPlainObject(t.stream))return}else if("keepall"!==r&&"string"==typeof(n=t[o+"src"])&&n.indexOf(":")>0)return;i[o]=u(t[o],e)}else e&&(i[o]="_function")})),i}var o=Array.isArray(t),a=h.isTypedArray(t);if((o||a)&&t.dtype&&t.shape){var l=t.bdata;return u({dtype:t.dtype,shape:t.shape,bdata:h.isArrayBuffer(l)?s.encode(l):l},e)}return o?t.map((function(t){return u(t,e)})):a?h.simpleMap(t,h.identity):h.isJSDate(t)?h.ms2DateTimeLocal(+t):t}var d={data:(a||[]).map((function(t){var r=u(t);return e&&delete r.fit,r}))};if(!e&&(d.layout=u(l),i)){var f=l._size;d.layout.computed={margin:{b:f.b,l:f.l,r:f.r,t:f.t}}}return c&&(d.frames=u(c)),o&&(d.config=u(t._context,!0)),"object"===n?d:JSON.stringify(d)},w.modifyFrames=function(t,e){var r,n,i,o=t._transitionData._frames,a=t._transitionData._frameHash;for(r=0;r=0;o--)if(l[o].enabled){r._indexToPoints=l[o]._indexToPoints;break}n&&n.calc&&(a=n.calc(t,r))}Array.isArray(a)&&a[0]||(a=[{x:f,y:f}]),a[0].t||(a[0].t={}),a[0].trace=r,d[e]=a}}for(F(a,s,u),i=0;i{"use strict";var n=r(12822),i=r(46121),o=r(40365).N;t.exports=function(t,e,r,a){var s,l,c=a.type,u=a.attributes,h=a.handleDefaults,d=a.partition||"x",f=e._subplots[c],p=f.length,m=p&&f[0].replace(/\d+$/,"");function g(t,e){return n.coerce(s,l,u,t,e)}for(var v=0;v{"use strict";var n=r(77201),i=n.FORMAT_LINK,o=n.DATE_FORMAT_LINK;function a(t){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(t&&t.supportOther?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),'Numbers are formatted using d3-format\'s syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".',i,"for details on the formatting syntax.",'Dates are formatted using d3-time-format\'s syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".',o,"for details on the date formatting syntax."].join(" ")}function s(t){var e=t.description?" "+t.description:"",r=t.keys||[];if(r.length>0){for(var n=[],i=0;i` is displayed in the secondary box, for example "{fullData.name}".',"To hide the secondary box completely, use an empty tag ``."].join(" ")};return!1!==t.arrayOk&&(n.arrayOk=!0),n},e.ay=function(t,e){t=t||{};var r=s(e=e||{}),n={valType:"string",dflt:"",editType:t.editType||"calc",description:["Template string used for rendering the information text that appear on points.","Note that this will override `textinfo`.",a(),"Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",r].join(" ")};return!1!==t.arrayOk&&(n.arrayOk=!0),n},e.LF=function(t,e){e=e||{};var r=(t=t||{}).newshape?"new ":"",n=s(e);return{valType:"string",dflt:"",editType:t.editType||"arraydraw",description:["Template string used for rendering the "+r+"shape's label.","Note that this will override `text`.",["Variables are inserted using %{variable},",'for example "x0: %{x0}".','Numbers are formatted using d3-format\'s syntax %{variable:d3-format}, for example "Price: %{x0:$.2f}". See',i,"for details on the formatting syntax.",'Dates are formatted using d3-time-format\'s syntax %{variable|d3-time-format}, for example "Day: %{x0|%m %b %Y}". See',o,"for details on the date formatting syntax.","A single multiplication or division operation may be applied to numeric variables, and combined with",'d3 number formatting, for example "Length in cm: %{x0*2.54}", "%{slope*60:.1f} meters per second."',"For log axes, variable values are given in log units.","For date axes, x/y coordinate variables and center variables use datetimes, while all other variable values use values in ms."].join(" "),n].join(" ")}}},25059:(t,e,r)=>{"use strict";var n=r(64347),i=r(51648),o=r(65280),a=r(12517),s=r(16822).addStyleRule,l=r(98260),c=r(3520),u=r(13195),h=l.extendFlat,d=l.extendDeepAll;function f(t){var r=t.name,i=t.categories,o=t.meta;if(e.modules[r])n.log("Type "+r+" already registered");else{e.subplotsRegistry[t.basePlotModule.name]||function(t){var r=t.name;if(e.subplotsRegistry[r])n.log("Plot type "+r+" already registered.");else for(var i in v(t),e.subplotsRegistry[r]=t,e.componentsRegistry)x(i,t.name)}(t.basePlotModule);for(var a={},l=0;l{"use strict";var n=r(25059),i=r(12822),o=i.extendFlat,a=i.extendDeep;function s(t){var e;switch(t){case"themes__thumb":e={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":e={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:e={}}return e}t.exports=function(t,e){var r,i,l=t.data,c=t.layout,u=a([],l),h=a({},c,s(e.tileClass)),d=t._context||{};if(e.width&&(h.width=e.width),e.height&&(h.height=e.height),"thumbnail"===e.tileClass||"themes__thumb"===e.tileClass){h.annotations=[];var f=Object.keys(h);for(r=0;r-1&&(h[f[r]].title={text:""});for(r=0;r{"use strict";var n=r(12822),i=r(42704),o=r(11148),a=r(13078);t.exports=function(t,e){var r;return n.isPlainObject(t)||(r=n.getGraphDiv(t)),(e=e||{}).format=e.format||"png",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise((function(s,l){r&&r._snapshotInProgress&&l(new Error("Snapshotting already in progress.")),n.isIE()&&"svg"!==e.format&&l(new Error(a.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var c=i(t,e),u=e.filename||t.fn||"newplot";u+="."+e.format.replace("-","."),c.then((function(t){return r&&(r._snapshotInProgress=!1),o(t,u,e.format)})).then((function(t){s(t)})).catch((function(t){r&&(r._snapshotInProgress=!1),l(t)}))}))}},11148:(t,e,r)=>{"use strict";var n=r(12822),i=r(13078);t.exports=function(t,e,r){var o=document.createElement("a"),a="download"in o;return new Promise((function(s,l){var c,u;if(n.isIE())return c=i.createBlob(t,"svg"),window.navigator.msSaveBlob(c,e),c=null,s(e);if(a)return c=i.createBlob(t,r),u=i.createObjectURL(c),o.href=u,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),i.revokeObjectURL(u),c=null,s(e);if(n.isSafari()){var h="svg"===r?",":";base64,";return i.octetStream(h+encodeURIComponent(t)),s(e)}l(new Error("download error"))}))}},13078:(t,e,r)=>{"use strict";var n=r(25059);e.getDelay=function(t){return t._has&&(t._has("gl3d")||t._has("gl2d")||t._has("mapbox"))?500:0},e.getRedrawFunc=function(t){return function(){n.getComponentMethod("colorbar","draw")(t)}},e.encodeSVG=function(t){return"data:image/svg+xml,"+encodeURIComponent(t)},e.encodeJSON=function(t){return"data:application/json,"+encodeURIComponent(t)};var i=window.URL||window.webkitURL;e.createObjectURL=function(t){return i.createObjectURL(t)},e.revokeObjectURL=function(t){return i.revokeObjectURL(t)},e.createBlob=function(t,e){if("svg"===e)return new window.Blob([t],{type:"image/svg+xml;charset=utf-8"});if("full-json"===e)return new window.Blob([t],{type:"application/json;charset=utf-8"});var r=function(t){for(var e=t.length,r=new ArrayBuffer(e),n=new Uint8Array(r),i=0;i{"use strict";var n=r(13078),i={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:r(5041),toSVG:r(48402),svgToImg:r(40241),toImage:r(91117),downloadImage:r(56787)};t.exports=i},40241:(t,e,r)=>{"use strict";var n=r(12822),i=r(86626).EventEmitter,o=r(13078);t.exports=function(t){var e=t.emitter||new i,r=new Promise((function(i,a){var s=window.Image,l=t.svg,c=t.format||"png";if(n.isIE()&&"svg"!==c){var u=new Error(o.MSG_IE_BAD_FORMAT);return a(u),t.promise?r:e.emit("error",u)}var h,d,f=t.canvas,p=t.scale||1,m=t.width||300,g=t.height||150,v=p*m,b=p*g,y=f.getContext("2d",{willReadFrequently:!0}),x=new s;"svg"===c||n.isSafari()?d=o.encodeSVG(l):(h=o.createBlob(l,"svg"),d=o.createObjectURL(h)),f.width=v,f.height=b,x.onload=function(){var r;switch(h=null,o.revokeObjectURL(d),"svg"!==c&&y.drawImage(x,0,0,v,b),c){case"jpeg":r=f.toDataURL("image/jpeg");break;case"png":r=f.toDataURL("image/png");break;case"webp":r=f.toDataURL("image/webp");break;case"svg":r=d;break;default:var n="Image format is not jpeg, png, svg or webp.";if(a(new Error(n)),!t.promise)return e.emit("error",n)}i(r),t.promise||e.emit("success",r)},x.onerror=function(r){if(h=null,o.revokeObjectURL(d),a(r),!t.promise)return e.emit("error",r)},x.src=d}));return t.promise?r:e}},91117:(t,e,r)=>{"use strict";var n=r(86626).EventEmitter,i=r(25059),o=r(12822),a=r(13078),s=r(5041),l=r(48402),c=r(40241);t.exports=function(t,e){var r=new n,u=s(t,{format:"png"}),h=u.gd;h.style.position="absolute",h.style.left="-5000px",document.body.appendChild(h);var d=a.getRedrawFunc(h);return i.call("_doPlot",h,u.data,u.layout,u.config).then(d).then((function(){var t=a.getDelay(h._fullLayout);setTimeout((function(){var t=l(h),n=document.createElement("canvas");n.id=o.randstr(),(r=c({format:e.format,width:h._fullLayout.width,height:h._fullLayout.height,canvas:n,emitter:r,svg:t})).clean=function(){h&&document.body.removeChild(h)}}),t)})).catch((function(t){r.emit("error",t)})),r}},48402:(t,e,r)=>{"use strict";var n=r(27941),i=r(12822),o=r(40666),a=r(17499),s=r(25853),l=/"/g,c="TOBESTRIPPED",u=new RegExp('("'+c+")|("+c+'")',"g");t.exports=function(t,e,r){var h,d=t._fullLayout,f=d._paper,p=d._toppaper,m=d.width,g=d.height;f.insert("rect",":first-child").call(o.setRect,0,0,m,g).call(a.fill,d.paper_bgcolor);var v=d._basePlotModules||[];for(h=0;h")?"":e.html(t).text()}));return e.remove(),r}(w)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(u,"'"),i.isIE()&&(w=(w=(w=w.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),w}},77881:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822).isArrayOrTypedArray,o=r(32994).BADNUM,a=r(25059),s=r(75815),l=r(69352).getAxisGroup,c=r(53481);function u(t,e,r,a,u){if(a.length){var x,_,w,k;switch(function(t,e){var r,o;for(r=0;rh+c||!n(u))}for(var f=0;f{"use strict";t.exports=i;var n=r(12822).distinctVals;function i(t,e){this.traces=t,this.sepNegVal=e.sepNegVal,this.overlapNoMerge=e.overlapNoMerge;for(var r=1/0,i=e.posAxis._id.charAt(0),o=[],a=0;a{"use strict";var n=r(40666),i=r(17499);t.exports=function(t,e,r,o){var a=r.marker.pattern;a&&a.shape?n.pointStyle(t,r,o,e):i.fill(t,e.color)}},17269:(t,e,r)=>{"use strict";var n=r(12822);function i(t){return-1!==t.indexOf("e")?t.replace(/[.]?0+e/,"e"):-1!==t.indexOf(".")?t.replace(/[.]?0+$/,""):t}e.formatPiePercent=function(t,e){var r=i((100*t).toPrecision(3));return n.numSeparate(r,e)+"%"},e.formatPieValue=function(t,e){var r=i(t.toPrecision(10));return n.numSeparate(r,e)},e.getFirstFilled=function(t,e){if(n.isArrayOrTypedArray(t))for(var r=0;r{"use strict";var n=r(17499),i=r(17269).castOption,o=r(44380);t.exports=function(t,e,r,a){var s=r.marker.line,l=i(s.color,e.pts)||n.defaultLine,c=i(s.width,e.pts)||0;t.call(o,e,r,a).style("stroke-width",c).call(n.stroke,l)}},55508:(t,e,r)=>{"use strict";var n=r(12822);t.exports=function(t,e){for(var r=0;r{"use strict";var n=r(60393).axisHoverFormat,i=r(24131).ay,o=r(24131).rb,a=r(89322),s=r(75058),l=r(68057).T,c=r(68057).k,u=r(40666),h=r(32565),d=r(98260).extendFlat,f=r(43591);function p(t){return{valType:"any",dflt:0,editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the period positioning in milliseconds or *M* on the "+t+" axis.","Special values in the form of *M* could be used to declare","the number of months. In this case `n` must be a positive integer."].join(" ")}}function m(t){return{valType:"any",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the base for period positioning in milliseconds or date string on the "+t+" axis.","When `"+t+"period` is round number of weeks,","the `"+t+"period0` by default would be on a Sunday i.e. 2000-01-02,","otherwise it would be at 2000-01-01."].join(" ")}}function g(t){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the alignment of data points on the "+t+" axis."].join(" ")}}t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the x coordinates."},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `x`.","Builds a linear space of x coordinates.","Use with `dx`","where `x0` is the starting coordinate and `dx` the step."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the x coordinate step.","See `x0` for more info."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the y coordinates."},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `y`.","Builds a linear space of y coordinates.","Use with `dy`","where `y0` is the starting coordinate and `dy` the step."].join(" ")},dy:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the y coordinate step.","See `y0` for more info."].join(" ")},xperiod:p("x"),yperiod:p("y"),xperiod0:m("x0"),yperiod0:m("y0"),xperiodalignment:g("x"),yperiodalignment:g("y"),xhoverformat:n("x"),yhoverformat:n("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","offsetgroup where bars of the same position coordinate will line up."].join(" ")},alignmentgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","alignmentgroup. This controls whether bars compute their positional","range dependently or independently."].join(" ")},stackgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several scatter traces (on the same subplot) to the same","stackgroup in order to add their y values (or their x values if","`orientation` is *h*). If blank or omitted this trace will not be","stacked. Stacking also turns `fill` on by default, using *tonexty*","(*tonextx*) if `orientation` is *h* (*v*) and sets the default","`mode` to *lines* irrespective of point count.","You can only stack on a numeric (linear or log) axis.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},orientation:{valType:"enumerated",values:["v","h"],editType:"calc",description:["Only relevant in the following cases:","1. when `scattermode` is set to *group*.","2. when `stackgroup` is used, and only the first","`orientation` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`. Sets the","stacking direction. With *v* (*h*), the y (x) values of subsequent","traces are added. Also affects the default value of `fill`."].join(" ")},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`groupnorm` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Sets the normalization for the sum of this `stackgroup`.","With *fraction*, the value of each trace at each location is","divided by the sum of all trace values at that location.","*percent* is the same but multiplied by 100 to show percentages.","If there are multiple subplots, or multiple `stackgroup`s on one","subplot, each will be normalized within its own set."].join(" ")},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`stackgaps` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Determines how we handle locations at which other traces in this","group have data but this one does not.","With *infer zero* we insert a zero at these locations.","With *interpolate* we linearly interpolate between existing","values, and extrapolate a constant beyond the existing values."].join(" ")},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},texttemplate:i({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc",description:["Determines the drawing mode for this scatter trace.","If the provided `mode` includes *text* then the `text` elements","appear at the coordinates. Otherwise, the `text` elements","appear on hover.","If there are less than "+h.PTS_LINESONLY+" points","and the trace is not stacked","then the default is *lines+markers*. Otherwise, *lines*."].join(" ")},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style",description:["Do the hover effects highlight individual points (markers or","line points) or do they highlight filled regions?","If the fill is *toself* or *tonext* and there are no markers","or text, then the default is *fills*, otherwise it is *points*."].join(" ")},hovertemplate:o({},{keys:h.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0,description:"Sets the line color."},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0,description:"Sets the line width (in px)."},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","With *spline* the lines are drawn using spline interpolation.","The other available values correspond to step-wise line shapes."].join(" ")},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot",description:["Has an effect only if `shape` is set to *spline*","Sets the amount of smoothing.","*0* corresponds to no smoothing (equivalent to a *linear* shape)."].join(" ")},dash:d({},l,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot",description:["Sets the line back off from the end point of the nth line segment (in px).","This option is useful e.g. to avoid overlap with arrowhead markers.","With *auto* the lines would trim before markers if `marker.angleref` is set to *previous*."].join(" ")},simplify:{valType:"boolean",dflt:!0,editType:"plot",description:["Simplifies lines by removing nearly-collinear points. When transitioning","lines, it may be desirable to disable this so that the number of points","along the resulting SVG path is unaffected."].join(" ")},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the provided data arrays are connected."].join(" ")},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines whether or not markers and text nodes","are clipped about the subplot axes.","To show markers and text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc",description:["Sets the area to fill with a solid color.","Defaults to *none* unless this trace is stacked, then it gets","*tonexty* (*tonextx*) if `orientation` is *v* (*h*)","Use with `fillcolor` if not *none*.","*tozerox* and *tozeroy* fill to x=0 and y=0 respectively.","*tonextx* and *tonexty* fill between the endpoints of this","trace and the endpoints of the trace before it, connecting those","endpoints with straight lines (to make a stacked area graph);","if there is no trace before it, they behave like *tozerox* and","*tozeroy*.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},fillcolor:f(!0),fillgradient:d({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc",description:["Sets the type/orientation of the color gradient for the fill.","Defaults to *none*."].join(" ")},start:{valType:"number",editType:"calc",description:["Sets the gradient start value.","It is given as the absolute position on the axis determined by","the orientiation. E.g., if orientation is *horizontal*, the","gradient will be horizontal and start from the x-position","given by start. If omitted, the gradient starts at the lowest","value of the trace along the respective axis.","Ignored if orientation is *radial*."].join(" ")},stop:{valType:"number",editType:"calc",description:["Sets the gradient end value.","It is given as the absolute position on the axis determined by","the orientiation. E.g., if orientation is *horizontal*, the","gradient will be horizontal and end at the x-position","given by end. If omitted, the gradient ends at the highest","value of the trace along the respective axis.","Ignored if orientation is *radial*."].join(" ")},colorscale:{valType:"colorscale",editType:"style",description:["Sets the fill gradient colors as a color scale.","The color scale is interpreted as a gradient","applied in the direction specified by *orientation*,","from the lowest to the highest value of the scatter","plot along that axis, or from the center to the most","distant point from it, if orientation is *radial*."].join(" ")},editType:"calc",description:["Sets a fill gradient.","If not specified, the fillcolor is used instead."].join(" ")}),fillpattern:c,marker:d({symbol:{valType:"enumerated",values:u.symbolList,dflt:"circle",arrayOk:!0,editType:"style",description:["Sets the marker symbol type.","Adding 100 is equivalent to appending *-open* to a symbol name.","Adding 200 is equivalent to appending *-dot* to a symbol name.","Adding 300 is equivalent to appending *-open-dot*","or *dot-open* to a symbol name."].join(" ")},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0,description:"Sets the marker opacity."},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1,description:["Sets the marker angle in respect to `angleref`."].join(" ")},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1,description:["Sets the reference for marker angle.","With *previous*, angle 0 points along the line from the previous point to this one.","With *up*, angle 0 points toward the top of the screen."].join(" ")},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0,description:["Moves the marker away from the data point in the direction of `angle` (in px).","This can be useful for example if you have another marker at this","location and you want to point an arrowhead marker at it."].join(" ")},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0,description:"Sets the marker size (in px)."},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets a maximum number of points to be drawn on the graph.","*0* corresponds to no limit."].join(" ")},sizeref:{valType:"number",dflt:1,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the scale factor used to determine the rendered size of","marker points. Use with `sizemin` and `sizemode`."].join(" ")},sizemin:{valType:"number",min:0,dflt:0,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the minimum size (in px) of the rendered marker points."].join(" ")},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the rule for which the data in `size` is converted","to pixels."].join(" ")},line:d({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0,description:"Sets the width (in px) of the lines bounding the marker points."},editType:"calc"},a("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc",description:["Sets the type of gradient used to fill the markers"].join(" ")},color:{valType:"color",arrayOk:!0,editType:"calc",description:["Sets the final color of the gradient fill:","the center color for radial, the right for horizontal,","or the bottom for vertical."].join(" ")},editType:"calc"},editType:"calc"},a("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of selected points."},color:{valType:"color",editType:"style",description:"Sets the marker color of selected points."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of selected points."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of selected points."},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of unselected points, applied only when a selection exists."},color:{valType:"color",editType:"style",description:"Sets the marker color of unselected points, applied only when a selection exists."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of unselected points, applied only when a selection exists."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of unselected points, applied only when a selection exists."},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc",description:["Sets the positions of the `text` elements","with respects to the (x,y) coordinates."].join(" ")},textfont:s({editType:"calc",colorEditType:"style",arrayOk:!0,description:"Sets the text font."}),zorder:{valType:"integer",dflt:0,editType:"plot",description:["Sets the layer on which this trace is displayed, relative to","other SVG traces on the same subplot. SVG traces with higher `zorder`","appear in front of those with lower `zorder`."].join(" ")}}},93459:(t,e,r)=>{"use strict";var n=r(7370),i=r(12822),o=r(75815),a=r(15389),s=r(32994).BADNUM,l=r(677),c=r(45065),u=r(55508),h=r(58146);function d(t,e,r,n,i,a,s){var c=e._length,u=t._fullLayout,h=r._id,d=n._id,f=u._firstScatter[m(e)]===e.uid,p=(g(e,u,r,n)||{}).orientation,v=e.fill;r._minDtick=0,n._minDtick=0;var b={padded:!0},y={padded:!0};s&&(b.ppad=y.ppad=s);var x=c<2||i[0]!==i[c-1]||a[0]!==a[c-1];x&&("tozerox"===v||"tonextx"===v&&(f||"h"===p))?b.tozero=!0:(e.error_y||{}).visible||"tonexty"!==v&&"tozeroy"!==v&&(l.hasMarkers(e)||l.hasText(e))||(b.padded=!1,b.ppad=0),x&&("tozeroy"===v||"tonexty"===v&&(f||"v"===p))?y.tozero=!0:"tonextx"!==v&&"tozerox"!==v||(y.padded=!1),h&&(e._extremes[h]=o.findExtremes(r,i,b)),d&&(e._extremes[d]=o.findExtremes(n,a,y))}function f(t,e){if(l.hasMarkers(t)){var r,n=t.marker,a=1.6*(t.marker.sizeref||1);if(r="area"===t.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/a),3)}:function(t){return Math.max((t||0)/a,3)},i.isArrayOrTypedArray(n.size)){var s={type:"linear"};o.setConvert(s);for(var c=s.makeCalcdata(t.marker,"size"),u=new Array(e),h=0;hl&&L[v].gap;)v--;for(y=L[v].s,m=L.length-1;m>v;m--)L[m].s=y;for(;l{"use strict";var n=r(12822);t.exports=function(t,e){n.isArrayOrTypedArray(e.selectedpoints)&&n.tagSelected(t,e)}},45065:(t,e,r)=>{"use strict";var n=r(42226).hasColorscale,i=r(62182),o=r(677);t.exports=function(t,e){o.hasLines(e)&&n(e,"line")&&i(t,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),o.hasMarkers(e)&&(n(e,"marker")&&i(t,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),n(e,"marker.line")&&i(t,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}},32565:t=>{"use strict";t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},30888:(t,e,r)=>{"use strict";var n=r(93459),i=r(77881).setGroupPositions;function o(t,e,r,n,i,o,a){i[n]=!0;var s={i:null,gap:!0,s:0};if(s[a]=r,t.splice(e,0,s),e&&r===t[e-1][a]){var l=t[e-1];s.s=l.s,s.i=l.i,s.gap=l.gap}else o&&(s.s=function(t,e,r,n){var i=t[e-1],o=t[e+1];return o?i?i.s+(o.s-i.s)*(r-i[n])/(o[n]-i[n]):o.s:i.s}(t,e,r,a));e||(t[0].t=t[1].t,t[0].trace=t[1].trace,delete t[1].t,delete t[1].trace)}t.exports=function(t,e){"group"===t._fullLayout.scattermode&&function(t,e){for(var r=e.xaxis,n=e.yaxis,o=t._fullLayout,a=t._fullData,s=t.calcdata,l=[],c=[],u=0;uS[h]&&h{"use strict";var n=r(12822),i=r(28104),o=r(98387);t.exports=function(t,e){var r,a,s;function l(t){return n.coerce(a._input,a,o,t)}if("group"===e.scattermode)for(s=0;s=0;h--){var d=t[h];if("scatter"===d.type&&d.xaxis===c.xaxis&&d.yaxis===c.yaxis){d.opacity=void 0;break}}}}}},28724:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059),o=r(98387),a=r(32565),s=r(677),l=r(56666),c=r(45952),u=r(82349),h=r(86277),d=r(51725),f=r(32335),p=r(46574),m=r(12261),g=r(12822).coercePattern;t.exports=function(t,e,r,v){function b(r,i){return n.coerce(t,e,o,r,i)}var y=l(t,e,v,b);if(y||(e.visible=!1),e.visible){c(t,e,v,b),b("xhoverformat"),b("yhoverformat"),b("zorder");var x=u(t,e,v,b);"group"===v.scattermode&&void 0===e.orientation&&b("orientation","v");var _=!x&&y{"use strict";t.exports=function(t){return{valType:"color",editType:"style",anim:!0,description:["Sets the fill color.","Defaults to a half-transparent variant of the line color,","marker color, or marker line color, whichever is available."+(t?" If fillgradient is specified, fillcolor is ignored except for setting the background color of the hover label, if any.":"")].join(" ")}}},12261:(t,e,r)=>{"use strict";var n=r(17499),i=r(12822).isArrayOrTypedArray;t.exports=function(t,e,r,o,a){a||(a={});var s,l=!1;if(e.marker){var c=e.marker.color,u=(e.marker.line||{}).color;c&&!i(c)?l=c:u&&!i(u)&&(l=u)}if(a.moduleHasFillgradient&&"none"!==o("fillgradient.type")){o("fillgradient.start"),o("fillgradient.stop");var h=o("fillgradient.colorscale");h&&(s=function(t){for(var e=n.interpolate(t[0][1],t[1][1],.5),r=2;r{"use strict";var n=r(75815);t.exports=function(t,e,r){var i={},o={_fullLayout:r},a=n.getFromTrace(o,e,"x"),s=n.getFromTrace(o,e,"y"),l=t.orig_x;void 0===l&&(l=t.x);var c=t.orig_y;return void 0===c&&(c=t.y),i.xLabel=n.tickText(a,a.c2l(l),!0).text,i.yLabel=n.tickText(s,s.c2l(c),!0).text,i}},90566:(t,e,r)=>{"use strict";var n=r(17499),i=r(677);t.exports=function(t,e){var r,o;if("lines"===t.mode)return(r=t.line.color)&&n.opacity(r)?r:t.fillcolor;if("none"===t.mode)return t.fill?t.fillcolor:"";var a=e.mcc||(t.marker||{}).color,s=e.mlcc||((t.marker||{}).line||{}).color;return(o=a&&n.opacity(a)?a:s&&n.opacity(s)&&(e.mlw||((t.marker||{}).line||{}).width)?s:"")?n.opacity(o)<.3?n.addOpacity(o,.3):o:(r=(t.line||{}).color)&&n.opacity(r)&&i.hasLines(t)&&t.line.width?r:t.fillcolor}},28104:(t,e,r)=>{"use strict";var n=r(69352).getAxisGroup;t.exports=function(t,e,r,i){var o=e.orientation,a=e[{v:"x",h:"y"}[o]+"axis"],s=n(r,a)+o,l=r._alignmentOpts||{},c=i("alignmentgroup"),u=l[s];u||(u=l[s]={});var h=u[c];h?h.traces.push(e):h=u[c]={traces:[e],alignmentIndex:Object.keys(u).length,offsetGroups:{}};var d=i("offsetgroup"),f=h.offsetGroups,p=f[d];d&&(p||(p=f[d]={offsetIndex:Object.keys(f).length}),e._offsetIndex=p.offsetIndex)}},2686:(t,e,r)=>{"use strict";var n=r(12822),i=r(70410),o=r(25059),a=r(90566),s=r(17499),l=n.fillText;t.exports=function(t,e,r,c){var u=t.cd,h=u[0].trace,d=t.xa,f=t.ya,p=d.c2p(e),m=f.c2p(r),g=[p,m],v=h.hoveron||"",b=-1!==h.mode.indexOf("markers")?3:.5,y=!!h.xperiodalignment,x=!!h.yperiodalignment;if(-1!==v.indexOf("points")){var _=function(t){var e=Math.max(b,t.mrc||0),r=d.c2p(t.x)-p,n=f.c2p(t.y)-m;return Math.max(Math.sqrt(r*r+n*n)-e,1-b/e)},w=i.getDistanceFunction(c,(function(t){if(y){var e=d.c2p(t.xStart),r=d.c2p(t.xEnd);return p>=Math.min(e,r)&&p<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,o=Math.abs(d.c2p(t.x)-p);return o=Math.min(e,r)&&m<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,o=Math.abs(f.c2p(t.y)-m);return or!=(c=i[n][1])>=r&&(a=i[n-1][0],s=i[n][0],c-l&&(o=a+(s-a)*(r-l)/(c-l),h=Math.min(h,o),p=Math.max(p,o)));return{x0:h=Math.max(h,0),x1:p=Math.min(p,d._length),y0:r,y1:r}}(h._polygons);null===O&&(O={x0:g[0],x1:g[0],y0:g[1],y1:g[1]});var D=s.defaultLine;return s.opacity(h.fillcolor)?D=h.fillcolor:s.opacity((h.line||{}).color)&&(D=h.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:O.x0,x1:O.x1,y0:O.y0,y1:O.y1,color:D,hovertemplate:!1}),delete t.index,h.text&&!n.isArrayOrTypedArray(h.text)?t.text=String(h.text):t.text=h.name,[t]}}},56384:(t,e,r)=>{"use strict";var n=r(677);t.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:r(98387),layoutAttributes:r(49114),supplyDefaults:r(28724),crossTraceDefaults:r(30415),supplyLayoutDefaults:r(25229),calc:r(93459).calc,crossTraceCalc:r(30888),arraysToCalcdata:r(55508),plot:r(54461),colorbar:r(89927),formatLabels:r(23315),style:r(21905).style,styleOnSelect:r(21905).styleOnSelect,hoverPoints:r(2686),selectPoints:r(96414),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:r(29592),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{description:["The scatter trace type encompasses line charts, scatter charts, text charts, and bubble charts.","The data visualized as scatter point or lines is set in `x` and `y`.","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}}},49114:t=>{"use strict";t.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc",description:["Determines how scatter points at the same location coordinate","are displayed on the graph.","With *group*, the scatter points are plotted next to one another","centered around the shared location.","With *overlay*, the scatter points are plotted over one another,","you might need to reduce *opacity* to see multiple scatter points."].join(" ")},scattergap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between scatter points of","adjacent location coordinates.","Defaults to `bargap`."].join(" ")}}},25229:(t,e,r)=>{"use strict";var n=r(12822),i=r(49114);t.exports=function(t,e){var r,o="group"===e.barmode;"group"===e.scattermode&&("scattergap",r=o?e.bargap:.2,n.coerce(t,e,i,"scattergap",r))}},51725:(t,e,r)=>{"use strict";var n=r(12822).isArrayOrTypedArray,i=r(42226).hasColorscale,o=r(94461);t.exports=function(t,e,r,a,s,l){l||(l={});var c=(t.marker||{}).color;c&&c._inputArray&&(c=c._inputArray),s("line.color",r),i(t,"line")?o(t,e,a,s,{prefix:"line.",cLetter:"c"}):s("line.color",!n(c)&&c||r),s("line.width"),l.noDash||s("line.dash"),l.backoff&&s("line.backoff")}},22980:(t,e,r)=>{"use strict";var n=r(40666),i=r(32994),o=i.BADNUM,a=i.LOG_CLIP,s=a+.5,l=a-.5,c=r(12822),u=c.segmentsIntersect,h=c.constrain,d=r(32565);t.exports=function(t,e){var r,i,a,f,p,m,g,v,b,y,x,_,w,k,A,M,T,S,C=e.trace||{},E=e.xaxis,L=e.yaxis,z="log"===E.type,O="log"===L.type,D=E._length,I=L._length,R=e.backoff,F=C.marker,P=e.connectGaps,N=e.baseTolerance,j=e.shape,B="linear"===j,U=C.fill&&"none"!==C.fill,G=[],V=d.minTolerance,H=t.length,W=new Array(H),q=0;function Y(r){var n=t[r];if(!n)return!1;var i=e.linearized?E.l2p(n.x):E.c2p(n.x),a=e.linearized?L.l2p(n.y):L.c2p(n.y);if(i===o){if(z&&(i=E.c2p(n.x,!0)),i===o)return!1;O&&a===o&&(i*=Math.abs(E._m*I*(E._m>0?s:l)/(L._m*D*(L._m>0?s:l)))),i*=1e3}if(a===o){if(O&&(a=L.c2p(n.y,!0)),a===o)return!1;a*=1e3}return[i,a]}function Z(t,e,r,n){var i=r-t,o=n-e,a=.5-t,s=.5-e,l=i*i+o*o,c=i*a+o*s;if(c>0&&cat||t[1]lt)return[h(t[0],ot,at),h(t[1],st,lt)]}function ht(t,e){return t[0]===e[0]&&(t[0]===ot||t[0]===at)||t[1]===e[1]&&(t[1]===st||t[1]===lt)||void 0}function dt(t,e,r){return function(n,i){var o=ut(n),a=ut(i),s=[];if(o&&a&&ht(o,a))return s;o&&s.push(o),a&&s.push(a);var l=2*c.constrain((n[t]+i[t])/2,e,r)-((o||n)[t]+(a||i)[t]);return l&&((o&&a?l>0==o[t]>a[t]?o:a:o||a)[t]+=l),s}}function ft(t){var e=t[0],r=t[1],n=e===W[q-1][0],i=r===W[q-1][1];if(!n||!i)if(q>1){var o=e===W[q-2][0],a=r===W[q-2][1];n&&(e===ot||e===at)&&o?a?q--:W[q-1]=t:i&&(r===st||r===lt)&&a?o?q--:W[q-1]=t:W[q++]=t}else W[q++]=t}function pt(t){W[q-1][0]!==t[0]&&W[q-1][1]!==t[1]&&ft([Q,tt]),ft(t),et=null,Q=tt=0}"linear"===j||"spline"===j?nt=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var o=ct[i],a=u(t[0],t[1],e[0],e[1],o[0],o[1],o[2],o[3]);a&&(!n||Math.abs(a.x-r[0][0])>1||Math.abs(a.y-r[0][1])>1)&&(a=[a.x,a.y],n&&$(a,t)<$(r[0],t)?r.unshift(a):r.push(a),n++)}return r}:"hv"===j||"vh"===j?nt=function(t,e){var r=[],n=ut(t),i=ut(e);return n&&i&&ht(n,i)||(n&&r.push(n),i&&r.push(i)),r}:"hvh"===j?nt=dt(0,ot,at):"vhv"===j&&(nt=dt(1,st,lt));var mt=c.isArrayOrTypedArray(F);function gt(e){if(e&&R&&(e.i=r,e.d=t,e.trace=C,e.marker=mt?F[e.i]:F,e.backoff=R),T=e[0]/D,S=e[1]/I,J=e[0]at?at:0,K=e[1]lt?lt:0,J||K){if(q)if(et){var n=nt(et,e);n.length>1&&(pt(n[0]),W[q++]=n[1])}else rt=nt(W[q-1],e)[0],W[q++]=rt;else W[q++]=[J||e[0],K||e[1]];var i=W[q-1];J&&K&&(i[0]!==J||i[1]!==K)?(et&&(Q!==J&&tt!==K?ft(Q&&tt?(o=et,s=(a=e)[0]-o[0],l=(a[1]-o[1])/s,(o[1]*a[0]-a[1]*o[0])/s>0?[l>0?ot:at,lt]:[l>0?at:ot,st]):[Q||J,tt||K]):Q&&tt&&ft([Q,tt])),ft([J,K])):Q-J&&tt-K&&ft([J||Q,K||tt]),et=e,Q=J,tt=K}else et&&pt(nt(et,e)[0]),W[q++]=e;var o,a,s,l}for(r=0;rX(m,vt))break;a=m,(w=b[0]*v[0]+b[1]*v[1])>x?(x=w,f=m,g=!1):w<_&&(_=w,p=m,g=!0)}if(g?(gt(f),a!==p&>(p)):(p!==i&>(p),a!==f&>(f)),gt(a),r>=t.length||!m)break;gt(m),i=m}}else gt(f)}et&&ft([Q||et[0],tt||et[1]]),G.push(W.slice(0,q))}var bt=j.slice(j.length-1);if(R&&"h"!==bt&&"v"!==bt){for(var yt=!1,xt=-1,_t=[],wt=0;wt{"use strict";t.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},57931:t=>{"use strict";var e={tonextx:1,tonexty:1,tonext:1};t.exports=function(t,r,n){var i,o,a,s,l,c={},u=!1,h=-1,d=0,f=-1;for(o=0;o=0?l=f:(l=f=d,d++),l{"use strict";var n=r(7370);t.exports=function(t,e){e||(e=2);var r=t.marker,i=r.sizeref||1,o=r.sizemin||0,a="area"===r.sizemode?function(t){return Math.sqrt(t/i)}:function(t){return t/i};return function(t){var r=a(t/e);return n(r)&&r>0?Math.max(r,o):0}}},89927:t=>{"use strict";t.exports={container:"marker",min:"cmin",max:"cmax"}},86277:(t,e,r)=>{"use strict";var n=r(17499),i=r(42226).hasColorscale,o=r(94461),a=r(677);t.exports=function(t,e,r,s,l,c){var u=a.isBubble(t),h=(t.line||{}).color;c=c||{},h&&(r=h),l("marker.symbol"),l("marker.opacity",u?.7:1),l("marker.size"),c.noAngle||(l("marker.angle"),c.noAngleRef||l("marker.angleref"),c.noStandOff||l("marker.standoff")),l("marker.color",r),i(t,"marker")&&o(t,e,s,l,{prefix:"marker.",cLetter:"c"}),c.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),c.noLine||(l("marker.line.color",h&&!Array.isArray(h)&&e.marker.color!==h?h:u?n.background:n.defaultLine),i(t,"marker.line")&&o(t,e,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",u?1:0)),u&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),c.gradient&&"none"!==l("marker.gradient.type")&&l("marker.gradient.color")}},45952:(t,e,r)=>{"use strict";var n=r(12822).dateTick0,i=r(32994).ONEWEEK;function o(t,e){return n(e,t%i==0?1:0)}t.exports=function(t,e,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var a=n("xperiod");a&&(n("xperiod0",o(a,e.xcalendar)),n("xperiodalignment"))}if(i.y){var s=n("yperiod");s&&(n("yperiod0",o(s,e.ycalendar)),n("yperiodalignment"))}}},54461:(t,e,r)=>{"use strict";var n=r(27941),i=r(25059),o=r(12822),a=o.ensureSingle,s=o.identity,l=r(40666),c=r(677),u=r(22980),h=r(57931),d=r(92620).tester;function f(t,e,r,h,f,p,m){var g,v=t._context.staticPlot;!function(t,e,r,i,a){var s=r.xaxis,l=r.yaxis,u=n.extent(o.simpleMap(s.range,s.r2c)),h=n.extent(o.simpleMap(l.range,l.r2c)),d=i[0].trace;if(c.hasMarkers(d)){var f=d.marker.maxdisplayed;if(0!==f){var p=i.filter((function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=h[0]&&t.y<=h[1]})),m=Math.ceil(p.length/f),g=0;a.forEach((function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return b?t.transition():t}var x=r.xaxis,_=r.yaxis,w=h[0].trace,k=w.line,A=n.select(p),M=a(A,"g","errorbars"),T=a(A,"g","lines"),S=a(A,"g","points"),C=a(A,"g","text");if(i.getComponentMethod("errorbars","plot")(t,M,r,m),!0===w.visible){var E,L;y(A).style("opacity",w.opacity);var z,O,D=w.fill.charAt(w.fill.length-1);"x"!==D&&"y"!==D&&(D=""),"y"===D?(z=1,O=_.c2p(0,!0)):"x"===D&&(z=0,O=x.c2p(0,!0)),h[0][r.isRangePlot?"nodeRangePlot3":"node3"]=A;var I,R,F="",P=[],N=w._prevtrace,j=null,B=null;N&&(F=N._prevRevpath||"",L=N._nextFill,P=N._ownPolygons,j=N._fillsegments,B=N._fillElement);var U,G,V,H,W,q,Y="",Z="",X=[];w._polygons=[];var $=[],J=[],K=o.noop;if(E=w._ownFill,c.hasLines(w)||"none"!==w.fill){L&&L.datum(h),-1!==["hv","vh","hvh","vhv"].indexOf(k.shape)?(U=l.steps(k.shape),G=l.steps(k.shape.split("").reverse().join(""))):U=G="spline"===k.shape?function(t){var e=t[t.length-1];return t.length>1&&t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),k.smoothing):l.smoothopen(t,k.smoothing)}:function(t){return"M"+t.join("L")},V=function(t){return G(t.reverse())},J=u(h,{xaxis:x,yaxis:_,trace:w,connectGaps:w.connectgaps,baseTolerance:Math.max(k.width||1,3)/4,shape:k.shape,backoff:k.backoff,simplify:k.simplify,fill:w.fill}),$=new Array(J.length);var Q=0;for(g=0;g0,g=h(t,e,r);(u=i.selectAll("g.trace").data(g,(function(t){return t[0].trace.uid}))).enter().append("g").attr("class",(function(t){return"trace scatter trace"+t[0].trace.uid})).style("stroke-miterlimit",2),u.order(),function(t,e,r){e.each((function(e){var i=a(n.select(this),"g","fills");l.setClipUrl(i,r.layerClipId,t);var o=e[0].trace,c=[];o._ownfill&&c.push("_ownFill"),o._nexttrace&&c.push("_nextFill");var u=i.selectAll("g").data(c,s);u.enter().append("g"),u.exit().each((function(t){o[t]=null})).remove(),u.order().each((function(t){o[t]=a(n.select(this),"path","js-fill")}))}))}(t,u,e),m?(c&&(d=c()),n.transition().duration(o.duration).ease(o.easing).each("end",(function(){d&&d()})).each("interrupt",(function(){d&&d()})).each((function(){i.selectAll("g.trace").each((function(r,n){f(t,n,e,r,g,this,o)}))}))):u.each((function(r,n){f(t,n,e,r,g,this,o)})),p&&u.exit().remove(),i.selectAll("path:not([d])").remove()}},96414:(t,e,r)=>{"use strict";var n=r(677);t.exports=function(t,e){var r,i,o,a,s=t.cd,l=t.xaxis,c=t.yaxis,u=[],h=s[0].trace;if(!n.hasMarkers(h)&&!n.hasText(h))return[];if(!1===e)for(r=0;r{"use strict";var e=["orientation","groupnorm","stackgaps"];t.exports=function(t,r,n,i){var o=n._scatterStackOpts,a=i("stackgroup");if(a){var s=r.xaxis+r.yaxis,l=o[s];l||(l=o[s]={});var c=l[a],u=!1;c?c.traces.push(r):(c=l[a]={traceIndices:[],traces:[r]},u=!0);for(var h={orientation:r.x&&!r.y?"h":"v"},d=0;d{"use strict";var n=r(27941),i=r(40666),o=r(25059);function a(t,e,r){i.pointStyle(t.selectAll("path.point"),e,r)}function s(t,e,r){i.textPointStyle(t.selectAll("text"),e,r)}t.exports={style:function(t){var e=n.select(t).selectAll("g.trace.scatter");e.style("opacity",(function(t){return t[0].trace.opacity})),e.selectAll("g.points").each((function(e){a(n.select(this),e.trace||e[0].trace,t)})),e.selectAll("g.text").each((function(e){s(n.select(this),e.trace||e[0].trace,t)})),e.selectAll("g.trace path.js-line").call(i.lineGroupStyle),e.selectAll("g.trace path.js-fill").call(i.fillGroupStyle,t,!1),o.getComponentMethod("errorbars","style")(e)},stylePoints:a,styleText:s,styleOnSelect:function(t,e,r){var n=e[0].trace;n.selectedpoints?(i.selectedPointStyle(r.selectAll("path.point"),n),i.selectedTextStyle(r.selectAll("text"),n)):(a(r,n,t),s(r,n,t))}}},677:(t,e,r)=>{"use strict";var n=r(12822),i=r(98507).isTypedArraySpec;t.exports={hasLines:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf("lines")},hasMarkers:function(t){return t.visible&&(t.mode&&-1!==t.mode.indexOf("markers")||"splom"===t.type)},hasText:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf("text")},isBubble:function(t){var e=t.marker;return n.isPlainObject(e)&&(n.isArrayOrTypedArray(e.size)||i(e.size))}}},46574:(t,e,r)=>{"use strict";var n=r(12822);t.exports=function(t,e,r,i,o){o=o||{},i("textposition"),n.coerceFont(i,"textfont",o.font||r.font,o),o.noSelect||(i("selected.textfont.color"),i("unselected.textfont.color"))}},56666:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059);t.exports=function(t,e,r,o){var a,s=o("x"),l=o("y");if(i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],r),s){var c=n.minRowLength(s);l?a=Math.min(c,n.minRowLength(l)):(a=c,o("y0"),o("dy"))}else{if(!l)return 0;a=n.minRowLength(l),o("x0"),o("dx")}return e._length=a,a}},42674:(t,e,r)=>{"use strict";var n=r(98387),i=r(75058),o=r(89322),a=r(60393).axisHoverFormat,s=r(24131).rb,l=r(24131).ay,c=r(3520),u=r(55697),h=r(24134),d=r(98260).extendFlat,f=r(62309).overrideAll,p=r(54747),m=n.line,g=n.marker,v=g.line,b=d({width:m.width,dash:{valType:"enumerated",values:p(u),dflt:"solid",description:"Sets the dash style of the lines."}},o("line"));function y(t){return{show:{valType:"boolean",dflt:!1,description:["Sets whether or not projections are shown along the",t,"axis."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:"Sets the projection color."},scale:{valType:"number",min:0,max:10,dflt:2/3,description:["Sets the scale factor determining the size of the","projection marker points."].join(" ")}}}var x=t.exports=f({x:n.x,y:n.y,z:{valType:"data_array",description:"Sets the z coordinates."},text:d({},n.text,{description:["Sets text elements associated with each (x,y,z) triplet.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y,z) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")}),texttemplate:l({},{}),hovertext:d({},n.hovertext,{description:["Sets text elements associated with each (x,y,z) triplet.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y,z) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),hovertemplate:s(),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),mode:d({},n.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1,description:["If *-1*, the scatter points are not fill with a surface","If *0*, *1*, *2*, the scatter points are filled with","a Delaunay surface about the x, y, z respectively."].join(" ")},surfacecolor:{valType:"color",description:"Sets the surface fill color."},projection:{x:y("x"),y:y("y"),z:y("z")},connectgaps:n.connectgaps,line:b,marker:d({symbol:{valType:"enumerated",values:p(h),dflt:"circle",arrayOk:!0,description:"Sets the marker symbol type."},size:d({},g.size,{dflt:8}),sizeref:g.sizeref,sizemin:g.sizemin,sizemode:g.sizemode,opacity:d({},g.opacity,{arrayOk:!1,description:["Sets the marker opacity.","Note that the marker opacity for scatter3d traces","must be a scalar value for performance reasons.","To set a blending opacity value","(i.e. which is not transparent), set *marker.color*","to an rgba color and use its alpha channel."].join(" ")}),colorbar:g.colorbar,line:d({width:d({},v.width,{arrayOk:!1})},o("marker.line"))},o("marker")),textposition:d({},n.textposition,{dflt:"top center"}),textfont:i({editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"],description:"Sets the text font."}),opacity:c.opacity,hoverinfo:d({},c.hoverinfo)},"calc","nested");x.x.editType=x.y.editType=x.z.editType="calc+clearAxisTypes"},34670:(t,e,r)=>{"use strict";var n=r(55508),i=r(45065);t.exports=function(t,e){var r=[{x:!1,y:!1,trace:e,t:{}}];return n(r,e),i(t,e),r}},35650:(t,e,r)=>{"use strict";var n=r(25059);function i(t,e,r,i){if(!e||!e.visible)return null;for(var o=n.getComponentMethod("errorbars","makeComputeError")(e),a=new Array(t.length),s=0;s0){var d=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=d),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,d)}}else a[s]=[-l[0]*r,l[1]*r]}return a}t.exports=function(t,e,r){var n=[i(t.x,t.error_x,e[0],r.xaxis),i(t.y,t.error_y,e[1],r.yaxis),i(t.z,t.error_z,e[2],r.zaxis)],o=function(t){for(var e=0;e{"use strict";var n=r(31845).gl_line3d,i=r(31845).gl_scatter3d,o=r(31845).gl_error3d,a=r(31845).gl_mesh3d,s=r(31845).delaunay_triangulate,l=r(12822),c=r(17235),u=r(25069).formatColor,h=r(43710),d=r(55697),f=r(24134),p=r(75815),m=r(66811).appendArrayPointValue,g=r(35650);function v(t,e){this.scene=t,this.uid=e,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var b=v.prototype;function y(t){return null==t?0:t.indexOf("left")>-1?-1:t.indexOf("right")>-1?1:0}function x(t){return null==t?0:t.indexOf("top")>-1?-1:t.indexOf("bottom")>-1?1:0}function _(t,e){return e(4*t)}function w(t){return f[t]}function k(t,e,r,n,i){var o=null;if(l.isArrayOrTypedArray(t)){o=[];for(var a=0;a=0){var C=function(t,e,r){var n,i=(r+1)%3,o=(r+2)%3,a=[],l=[];for(n=0;n{"use strict";var n=r(25059),i=r(12822),o=r(677),a=r(86277),s=r(51725),l=r(46574),c=r(42674);t.exports=function(t,e,r,u){function h(r,n){return i.coerce(t,e,c,r,n)}var d=function(t,e,r,i){var o=0,a=r("x"),s=r("y"),l=r("z");return n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],i),a&&s&&l&&(o=Math.min(a.length,s.length,l.length),e._length=e._xlength=e._ylength=e._zlength=o),o}(t,e,h,u);if(d){h("text"),h("hovertext"),h("hovertemplate"),h("xhoverformat"),h("yhoverformat"),h("zhoverformat"),h("mode"),o.hasMarkers(e)&&a(t,e,r,u,h,{noSelect:!0,noAngle:!0}),o.hasLines(e)&&(h("connectgaps"),s(t,e,r,u,h)),o.hasText(e)&&(h("texttemplate"),l(t,e,u,h,{noSelect:!0}));var f=(e.line||{}).color,p=(e.marker||{}).color;h("surfaceaxis")>=0&&h("surfacecolor",f||p);for(var m=["x","y","z"],g=0;g<3;++g){var v="projection."+m[g];h(v+".show")&&(h(v+".opacity"),h(v+".scale"))}var b=n.getComponentMethod("errorbars","supplyDefaults");b(t,e,f||p||r,{axis:"z"}),b(t,e,f||p||r,{axis:"y",inherit:"z"}),b(t,e,f||p||r,{axis:"x",inherit:"z"})}else e.visible=!1}},46443:(t,e,r)=>{"use strict";t.exports={plot:r(37031),attributes:r(42674),markerSymbols:r(24134),supplyDefaults:r(49957),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:r(34670),moduleType:"trace",name:"scatter3d",basePlotModule:r(98030),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{hrName:"scatter_3d",description:["The data visualized as scatter point or lines in 3D dimension","is set in `x`, `y`, `z`.","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","Projections are achieved via `projection`.","Surface fills are achieved via `surfaceaxis`."].join(" ")}}},77982:(t,e,r)=>{"use strict";var n=r(3520),i=r(75058),o=r(43591),a=r(98387),s=r(60393).axisHoverFormat,l=r(89322),c=r(54747),u=r(98260).extendFlat,h=r(62309).overrideAll,d=r(49538).DASHES,f=a.line,p=a.marker,m=p.line,g=t.exports=h({x:a.x,x0:a.x0,dx:a.dx,y:a.y,y0:a.y0,dy:a.dy,xperiod:a.xperiod,yperiod:a.yperiod,xperiod0:a.xperiod0,yperiod0:a.yperiod0,xperiodalignment:a.xperiodalignment,yperiodalignment:a.yperiodalignment,xhoverformat:s("x"),yhoverformat:s("y"),text:a.text,hovertext:a.hovertext,textposition:a.textposition,textfont:i({editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"],description:"Sets the text font."}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],description:["Determines the drawing mode for this scatter trace."].join(" ")},line:{color:f.color,width:f.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","The values correspond to step-wise line shapes."].join(" ")},dash:{valType:"enumerated",values:c(d),dflt:"solid",description:"Sets the style of the lines."}},marker:u({},l("marker"),{symbol:p.symbol,angle:p.angle,size:p.size,sizeref:p.sizeref,sizemin:p.sizemin,sizemode:p.sizemode,opacity:p.opacity,colorbar:p.colorbar,line:u({},l("marker.line"),{width:m.width})}),connectgaps:a.connectgaps,fill:u({},a.fill,{dflt:"none"}),fillcolor:o(),selected:{marker:a.selected.marker,textfont:a.selected.textfont},unselected:{marker:a.unselected.marker,textfont:a.unselected.textfont},opacity:n.opacity},"calc","nested");g.x.editType=g.y.editType=g.x0.editType=g.y0.editType="calc+clearAxisTypes",g.hovertemplate=a.hovertemplate,g.texttemplate=a.texttemplate},78737:(t,e,r)=>{"use strict";var n=r(88625);t.exports={moduleType:"trace",name:"scattergl",basePlotModule:r(29592),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:r(77982),supplyDefaults:r(51465),crossTraceDefaults:r(30415),colorbar:r(89927),formatLabels:r(18948),calc:r(54874),hoverPoints:n.hoverPoints,selectPoints:r(76787),meta:{hrName:"scatter_gl",description:["The data visualized as scatter point or lines is set in `x` and `y`","using the WebGL plotting engine.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to a numerical arrays."].join(" ")}}},54874:(t,e,r)=>{"use strict";var n=r(4832),i=r(12822),o=r(99246),a=r(19496).findExtremes,s=r(15389),l=r(93459),c=l.calcMarkerSize,u=l.calcAxisExpansion,h=l.setFirstScatter,d=r(45065),f=r(77064),p=r(7111),m=r(32994).BADNUM,g=r(49538).TOO_MANY_POINTS;function v(t,e,r){var n=t._extremes[e._id],i=a(e,r._bnds,{padded:!0});n.min=n.min.concat(i.min),n.max=n.max.concat(i.max)}t.exports=function(t,e){var r,a=t._fullLayout,l=e._xA=o.getFromId(t,e.xaxis,"x"),b=e._yA=o.getFromId(t,e.yaxis,"y"),y=a._plots[e.xaxis+e.yaxis],x=e._length,_=x>=g,w=2*x,k={},A=l.makeCalcdata(e,"x"),M=b.makeCalcdata(e,"y"),T=s(e,l,"x",A),S=s(e,b,"y",M),C=T.vals,E=S.vals;e._x=C,e._y=E,e.xperiodalignment&&(e._origX=A,e._xStarts=T.starts,e._xEnds=T.ends),e.yperiodalignment&&(e._origY=M,e._yStarts=S.starts,e._yEnds=S.ends);var L=new Array(w),z=new Array(x);for(r=0;r1&&i.extendFlat(s.line,f.linePositions(t,r,n)),s.errorX||s.errorY){var l=f.errorBarPositions(t,r,n,o,a);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}return s.text&&(i.extendFlat(s.text,{positions:n},f.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},f.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},f.textPosition(t,r,s.text,s.markerUnsel))),s}(t,0,e,L,C,E),I=p(t,y);return h(a,e),_?D.marker&&(O=D.marker.sizeAvg||Math.max(D.marker.size,3)):O=c(e,x),u(t,e,l,b,C,E,O),D.errorX&&v(e,l,D.errorX),D.errorY&&v(e,b,D.errorY),D.fill&&!I.fill2d&&(I.fill2d=!0),D.marker&&!I.scatter2d&&(I.scatter2d=!0),D.line&&!I.line2d&&(I.line2d=!0),!D.errorX&&!D.errorY||I.error2d||(I.error2d=!0),D.text&&!I.glText&&(I.glText=!0),D.marker&&(D.marker.snap=x),I.lineOptions.push(D.line),I.errorXOptions.push(D.errorX),I.errorYOptions.push(D.errorY),I.fillOptions.push(D.fill),I.markerOptions.push(D.marker),I.markerSelectedOptions.push(D.markerSel),I.markerUnselectedOptions.push(D.markerUnsel),I.textOptions.push(D.text),I.textSelectedOptions.push(D.textSel),I.textUnselectedOptions.push(D.textUnsel),I.selectBatch.push([]),I.unselectBatch.push([]),k._scene=I,k.index=I.count,k.x=C,k.y=E,k.positions=L,I.count++,[{x:!1,y:!1,t:k,trace:e}]}},49538:t=>{"use strict";t.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},77064:(t,e,r)=>{"use strict";var n=r(7370),i=r(77622),o=r(34463),a=r(25059),s=r(12822),l=s.isArrayOrTypedArray,c=r(40666),u=r(99246),h=r(25069).formatColor,d=r(677),f=r(43710),p=r(91886),m=r(49538),g=r(11891).DESELECTDIM,v={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},b=r(66811).appendArrayPointValue;function y(t,e){var r,i=t._fullLayout,o=e._length,a=e.textfont,c=e.textposition,u=l(c)?c:[c],h=a.color,d=a.size,f=a.family,p=a.weight,m=a.style,g=a.variant,v={},y=t._context.plotGlPixelRatio,x=e.texttemplate;if(x){v.text=[];var _=i._d3locale,w=Array.isArray(x),k=w?Math.min(x.length,o):o,A=w?function(t){return x[t]}:function(){return x};for(r=0;rm.TOO_MANY_POINTS||d.hasMarkers(e)?"rect":"round";if(c&&e.connectgaps){var h=n[0],f=n[1];for(i=0;i1?c[i]:c[0]:c,m=l(u)?u.length>1?u[i]:u[0]:u,g=v[p],b=v[m],y=h?h/.8+1:0,x=-b*y-.5*b;a.offset[i]=[g*y/f,x/f]}}return a}}},51465:(t,e,r)=>{"use strict";var n=r(12822),i=r(25059),o=r(91886),a=r(77982),s=r(32565),l=r(677),c=r(56666),u=r(45952),h=r(86277),d=r(51725),f=r(12261),p=r(46574);t.exports=function(t,e,r,m){function g(r,i){return n.coerce(t,e,a,r,i)}var v=!!t.marker&&o.isOpenSymbol(t.marker.symbol),b=l.isBubble(t),y=c(t,e,m,g);if(y){u(t,e,m,g),g("xhoverformat"),g("yhoverformat");var x=y{"use strict";var n=r(12822),i=r(17499),o=r(11891).DESELECTDIM;t.exports={styleTextSelection:function(t){var e,r,a=t[0],s=a.trace,l=a.t,c=l._scene,u=l.index,h=c.selectBatch[u],d=c.unselectBatch[u],f=c.textOptions[u],p=c.textSelectedOptions[u]||{},m=c.textUnselectedOptions[u]||{},g=n.extendFlat({},f);if(h.length||d.length){var v=p.color,b=m.color,y=f.color,x=n.isArrayOrTypedArray(y);for(g.color=new Array(s._length),e=0;e{"use strict";var n=r(23315);t.exports=function(t,e,r){var i=t.i;return"x"in t||(t.x=e._x[i]),"y"in t||(t.y=e._y[i]),n(t,e,r)}},91886:(t,e,r)=>{"use strict";var n=r(49538);e.isOpenSymbol=function(t){return"string"==typeof t?n.OPEN_RE.test(t):t%200>100},e.isDotSymbol=function(t){return"string"==typeof t?n.DOT_RE.test(t):t>200}},88625:(t,e,r)=>{"use strict";var n=r(25059),i=r(12822),o=r(90566);function a(t,e,r,a){var s=t.xa,l=t.ya,c=t.distance,u=t.dxy,h=t.index,d={pointNumber:h,x:e[h],y:r[h]};d.tx=i.isArrayOrTypedArray(a.text)?a.text[h]:a.text,d.htx=Array.isArray(a.hovertext)?a.hovertext[h]:a.hovertext,d.data=Array.isArray(a.customdata)?a.customdata[h]:a.customdata,d.tp=Array.isArray(a.textposition)?a.textposition[h]:a.textposition;var f=a.textfont;f&&(d.ts=i.isArrayOrTypedArray(f.size)?f.size[h]:f.size,d.tc=i.isArrayOrTypedArray(f.color)?f.color[h]:f.color,d.tf=Array.isArray(f.family)?f.family[h]:f.family,d.tw=Array.isArray(f.weight)?f.weight[h]:f.weight,d.ty=Array.isArray(f.style)?f.style[h]:f.style,d.tv=Array.isArray(f.variant)?f.variant[h]:f.variant);var p=a.marker;p&&(d.ms=i.isArrayOrTypedArray(p.size)?p.size[h]:p.size,d.mo=i.isArrayOrTypedArray(p.opacity)?p.opacity[h]:p.opacity,d.mx=i.isArrayOrTypedArray(p.symbol)?p.symbol[h]:p.symbol,d.ma=i.isArrayOrTypedArray(p.angle)?p.angle[h]:p.angle,d.mc=i.isArrayOrTypedArray(p.color)?p.color[h]:p.color);var m=p&&p.line;m&&(d.mlc=Array.isArray(m.color)?m.color[h]:m.color,d.mlw=i.isArrayOrTypedArray(m.width)?m.width[h]:m.width);var g=p&&p.gradient;g&&"none"!==g.type&&(d.mgt=Array.isArray(g.type)?g.type[h]:g.type,d.mgc=Array.isArray(g.color)?g.color[h]:g.color);var v=s.c2p(d.x,!0),b=l.c2p(d.y,!0),y=d.mrc||1,x=a.hoverlabel;x&&(d.hbg=Array.isArray(x.bgcolor)?x.bgcolor[h]:x.bgcolor,d.hbc=Array.isArray(x.bordercolor)?x.bordercolor[h]:x.bordercolor,d.hts=i.isArrayOrTypedArray(x.font.size)?x.font.size[h]:x.font.size,d.htc=Array.isArray(x.font.color)?x.font.color[h]:x.font.color,d.htf=Array.isArray(x.font.family)?x.font.family[h]:x.font.family,d.hnl=i.isArrayOrTypedArray(x.namelength)?x.namelength[h]:x.namelength);var _=a.hoverinfo;_&&(d.hi=Array.isArray(_)?_[h]:_);var w=a.hovertemplate;w&&(d.ht=Array.isArray(w)?w[h]:w);var k={};k[t.index]=d;var A=a._origX,M=a._origY,T=i.extendFlat({},t,{color:o(a,d),x0:v-y,x1:v+y,xLabelVal:A?A[h]:d.x,y0:b-y,y1:b+y,yLabelVal:M?M[h]:d.y,cd:k,distance:c,spikeDistance:u,hovertemplate:d.ht});return d.htx?T.text=d.htx:d.tx?T.text=d.tx:a.text&&(T.text=a.text),i.fillText(d,a,T),n.getComponentMethod("errorbars","hoverInfo")(d,a,T),T}t.exports={hoverPoints:function(t,e,r,n){var i,o,s,l,c,u,h,d,f,p,m=t.cd,g=m[0].t,v=m[0].trace,b=t.xa,y=t.ya,x=g.x,_=g.y,w=b.c2p(e),k=y.c2p(r),A=t.distance;if(g.tree){var M=b.p2c(w-A),T=b.p2c(w+A),S=y.p2c(k-A),C=y.p2c(k+A);i="x"===n?g.tree.range(Math.min(M,T),Math.min(y._rl[0],y._rl[1]),Math.max(M,T),Math.max(y._rl[0],y._rl[1])):g.tree.range(Math.min(M,T),Math.min(S,C),Math.max(M,T),Math.max(S,C))}else i=g.ids;var E=A;if("x"===n){var L=!!v.xperiodalignment,z=!!v.yperiodalignment;for(u=0;u=Math.min(O,D)&&w<=Math.max(O,D)?0:1/0}if(h=Math.min(I,R)&&k<=Math.max(I,R)?0:1/0}p=Math.sqrt(h*h+d*d),s=i[u]}}}else for(u=i.length-1;u>-1;u--)l=x[o=i[u]],c=_[o],h=b.c2p(l)-w,d=y.c2p(c)-k,(f=Math.sqrt(h*h+d*d)){"use strict";var n=r(78737);n.plot=r(96360),t.exports=n},96360:(t,e,r)=>{"use strict";var n=r(51645),i=r(98331),o=r(86373),a=r(69499),s=r(12822),l=r(14295).selectMode,c=r(41246),u=r(677),h=r(57931),d=r(4673).styleTextSelection,f={};function p(t,e,r,n){var i=t._size,o=t.width*n,a=t.height*n,s=i.l*n,l=i.b*n,c=i.r*n,u=i.t*n,h=i.w*n,d=i.h*n;return[s+e.domain[0]*h,l+r.domain[0]*d,o-c-(1-e.domain[1])*h,a-u-(1-r.domain[1])*d]}(t.exports=function(t,e,r){if(r.length){var m,g,v=t._fullLayout,b=e._scene,y=e.xaxis,x=e.yaxis;if(b)if(c(t,["ANGLE_instanced_arrays","OES_element_index_uint"],f)){var _=b.count,w=v._glcanvas.data()[0].regl;if(h(t,e,r),b.dirty){if(!b.line2d&&!b.error2d||b.scatter2d||b.fill2d||b.glText||w.clear({}),!0===b.error2d&&(b.error2d=o(w)),!0===b.line2d&&(b.line2d=i(w)),!0===b.scatter2d&&(b.scatter2d=n(w)),!0===b.fill2d&&(b.fill2d=i(w)),!0===b.glText)for(b.glText=new Array(_),m=0;m<_;m++)b.glText[m]=new a(w);if(b.glText){if(_>b.glText.length){var k=_-b.glText.length;for(m=0;mr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t})),b.line2d.update(b.lineOptions)),b.error2d){var M=(b.errorXOptions||[]).concat(b.errorYOptions||[]);b.error2d.update(M)}b.scatter2d&&b.scatter2d.update(b.markerOptions),b.fillOrder=s.repeat(null,_),b.fill2d&&(b.fillOptions=b.fillOptions.map((function(t,e){var n=r[e];if(t&&n&&n[0]&&n[0].trace){var i,o,a=n[0],s=a.trace,l=a.t,c=b.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(b.fillOrder[e]=u);var h,d,f=[],p=c&&c.positions||l.positions;if("tozeroy"===s.fill){for(h=0;hh&&isNaN(p[d+1]);)d-=2;0!==p[h+1]&&(f=[p[h],0]),f=f.concat(p.slice(h,d+2)),0!==p[d+1]&&(f=f.concat([p[d],0]))}else if("tozerox"===s.fill){for(h=0;hh&&isNaN(p[d]);)d-=2;0!==p[h]&&(f=[0,p[h+1]]),f=f.concat(p.slice(h,d+2)),0!==p[d]&&(f=f.concat([0,p[d+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(f=[],i=0,t.splitNull=!0,o=0;o-1;for(m=0;m<_;m++){var E=r[m][0],L=E.trace,z=E.t,O=z.index,D=L._length,I=z.x,R=z.y;if(L.selectedpoints||S||C){if(S||(S=!0),L.selectedpoints){var F=b.selectBatch[O]=s.selIndices2selPoints(L),P={};for(g=0;g{"use strict";var n=r(12822);t.exports=function(t,e){var r=e._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},o={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return e._scene||((r=e._scene={}).init=function(){n.extendFlat(r,o,i)},r.init(),r.update=function(t){var e=n.repeat(t,r.count);if(r.fill2d&&r.fill2d.update(e),r.scatter2d&&r.scatter2d.update(e),r.line2d&&r.line2d.update(e),r.error2d&&r.error2d.update(e.concat(e)),r.select2d&&r.select2d.update(e),r.glText)for(var i=0;i{"use strict";var n=r(677),i=r(4673).styleTextSelection;t.exports=function(t,e){var r=t.cd,o=t.xaxis,a=t.yaxis,s=[],l=r[0].trace,c=r[0].t,u=l._length,h=c.x,d=c.y,f=c._scene,p=c.index;if(!f)return s;var m=n.hasText(l),g=n.hasMarkers(l),v=!g&&!m;if(!0!==l.visible||v)return s;var b=[],y=[];if(!1!==e&&!e.degenerate)for(var x=0;x{"use strict";e.version="2.32.0"},31845:(t,e,r)=>{var n=r(39807);!function(){var e={1964:function(t,e,r){t.exports={alpha_shape:r(3502),convex_hull:r(7352),delaunay_triangulate:r(7642),gl_cone3d:r(6405),gl_error3d:r(9165),gl_heatmap2d:r(2510),gl_line3d:r(5714),gl_mesh3d:r(7201),gl_plot2d:r(1850),gl_plot3d:r(4100),gl_pointcloud2d:r(4696),gl_scatter3d:r(8418),gl_select_box:r(3161),gl_spikes2d:r(4098),gl_streamtube3d:r(7815),gl_surface3d:r(9499),ndarray:r(9618),ndarray_linear_interpolate:r(4317)}},4793:function(t,e,r){"use strict";function n(t,e){for(var r=0;rd)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,p.prototype),e}function p(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return v(t)}return m(t,e,r)}function m(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!p.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|_(t,e),n=f(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(et(t,Uint8Array)){var e=new Uint8Array(t);return y(e.buffer,e.byteOffset,e.byteLength)}return b(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(t));if(et(t,ArrayBuffer)||t&&et(t.buffer,ArrayBuffer))return y(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(et(t,SharedArrayBuffer)||t&&et(t.buffer,SharedArrayBuffer)))return y(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return p.from(n,e,r);var i=function(t){if(p.isBuffer(t)){var e=0|x(t.length),r=f(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||rt(t.length)?f(0):b(t):"Buffer"===t.type&&Array.isArray(t.data)?b(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return p.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(t))}function g(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function v(t){return g(t),f(t<0?0:0|x(t))}function b(t){for(var e=t.length<0?0:0|x(t.length),r=f(e),n=0;n=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return 0|t}function _(t,e){if(p.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||et(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+l(t));var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Q(t).length;default:if(i)return n?-1:K(t).length;e=(""+e).toLowerCase(),i=!0}}function w(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return F(this,e,r);case"utf8":case"utf-8":return O(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return z(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function k(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function A(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),rt(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=p.from(e,n)),p.isBuffer(e))return 0===e.length?-1:M(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):M(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function M(t,e,r,n,i){var o,a=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var u=-1;for(o=r;os&&(r=s-l),o=r;o>=0;o--){for(var h=!0,d=0;di&&(n=i):n=i;var o,a=e.length;for(n>a/2&&(n=a/2),o=0;o>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function z(t,e,r){return 0===e&&r===t.length?c.fromByteArray(t):c.fromByteArray(t.slice(e,r))}function O(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:o>223?3:o>191?2:1;if(i+s<=r){var l=void 0,c=void 0,u=void 0,h=void 0;switch(s){case 1:o<128&&(a=o);break;case 2:128==(192&(l=t[i+1]))&&(h=(31&o)<<6|63&l)>127&&(a=h);break;case 3:l=t[i+1],c=t[i+2],128==(192&l)&&128==(192&c)&&(h=(15&o)<<12|(63&l)<<6|63&c)>2047&&(h<55296||h>57343)&&(a=h);break;case 4:l=t[i+1],c=t[i+2],u=t[i+3],128==(192&l)&&128==(192&c)&&128==(192&u)&&(h=(15&o)<<18|(63&l)<<12|(63&c)<<6|63&u)>65535&&h<1114112&&(a=h)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return function(t){var e=t.length;if(e<=D)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn.length?(p.isBuffer(o)||(o=p.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else{if(!p.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},p.byteLength=_,p.prototype._isBuffer=!0,p.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;er&&(t+=" ... "),""},h&&(p.prototype[h]=p.prototype.inspect),p.prototype.compare=function(t,e,r,n,i){if(et(t,Uint8Array)&&(t=p.from(t,t.offset,t.byteLength)),!p.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+l(t));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),c=this.slice(n,i),u=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return T(this,t,e,r);case"utf8":case"utf-8":return S(this,t,e,r);case"ascii":case"latin1":case"binary":return C(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,r,n,i,o){if(!p.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function B(t,e,r,n,i){Z(e,n,i,t,r,7);var o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;var a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function U(t,e,r,n,i){Z(e,n,i,t,r,7);var o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;var a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function G(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function V(t,e,r,n,i){return e=+e,r>>>=0,i||G(t,0,r,4),u.write(t,e,r,n,23,4),r+4}function H(t,e,r,n,i){return e=+e,r>>>=0,i||G(t,0,r,8),u.write(t,e,r,n,52,8),r+8}p.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||N(t,e,this.length);for(var n=this[t],i=1,o=0;++o>>=0,e>>>=0,r||N(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},p.prototype.readUint8=p.prototype.readUInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),this[t]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]|this[t+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]<<8|this[t+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},p.prototype.readBigUInt64LE=it((function(t){X(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);var n=e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24),i=this[++t]+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+r*Math.pow(2,24);return BigInt(n)+(BigInt(i)<>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);var n=e*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t],i=this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+r;return(BigInt(n)<>>=0,e>>>=0,r||N(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},p.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},p.prototype.readInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},p.prototype.readInt16LE=function(t,e){t>>>=0,e||N(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},p.prototype.readInt16BE=function(t,e){t>>>=0,e||N(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},p.prototype.readInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},p.prototype.readInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},p.prototype.readBigInt64LE=it((function(t){X(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);var n=this[t+4]+this[t+5]*Math.pow(2,8)+this[t+6]*Math.pow(2,16)+(r<<24);return(BigInt(n)<>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);var n=(e<<24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t];return(BigInt(n)<>>=0,e||N(t,4,this.length),u.read(this,t,!0,23,4)},p.prototype.readFloatBE=function(t,e){return t>>>=0,e||N(t,4,this.length),u.read(this,t,!1,23,4)},p.prototype.readDoubleLE=function(t,e){return t>>>=0,e||N(t,8,this.length),u.read(this,t,!0,52,8)},p.prototype.readDoubleBE=function(t,e){return t>>>=0,e||N(t,8,this.length),u.read(this,t,!1,52,8)},p.prototype.writeUintLE=p.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||j(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,n||j(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},p.prototype.writeUint8=p.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,255,0),this[e]=255&t,e+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},p.prototype.writeBigUInt64LE=it((function(t){return B(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeBigUInt64BE=it((function(t){return U(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>>=0,!n){var i=Math.pow(2,8*r-1);j(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a|0)-s&255;return e+r},p.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},p.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},p.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},p.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},p.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},p.prototype.writeBigInt64LE=it((function(t){return B(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeBigInt64BE=it((function(t){return U(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeFloatLE=function(t,e,r){return V(this,t,e,!0,r)},p.prototype.writeFloatBE=function(t,e,r){return V(this,t,e,!1,r)},p.prototype.writeDoubleLE=function(t,e,r){return H(this,t,e,!0,r)},p.prototype.writeDoubleBE=function(t,e,r){return H(this,t,e,!1,r)},p.prototype.copy=function(t,e,r,n){if(!p.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o=n+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function Z(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(o+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(o+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(o+1)-1).concat(s):">= ".concat(e).concat(s," and <= ").concat(r).concat(s),new W.ERR_OUT_OF_RANGE("value",a,t)}!function(t,e,r){X(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||$(e,t.length-(r+1))}(n,i,o)}function X(t,e){if("number"!=typeof t)throw new W.ERR_INVALID_ARG_TYPE(e,"number",t)}function $(t,e,r){if(Math.floor(t)!==t)throw X(t,r),new W.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new W.ERR_BUFFER_OUT_OF_BOUNDS;throw new W.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(e),t)}q("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),q("ERR_INVALID_ARG_TYPE",(function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(l(e))}),TypeError),q("ERR_OUT_OF_RANGE",(function(t,e,r){var n='The value of "'.concat(t,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>Math.pow(2,32)?i=Y(String(r)):"bigint"==typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=Y(i)),i+="n"),n+" It must be ".concat(e,". Received ").concat(i)}),RangeError);var J=/[^+/0-9A-Za-z-_]/g;function K(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Q(t){return c.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(J,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function tt(t,e,r,n){var i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function et(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function rt(t){return t!=t}var nt=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}();function it(t){return"undefined"==typeof BigInt?ot:t}function ot(){throw new Error("BigInt not supported")}},9216:function(t){"use strict";t.exports=i,t.exports.isMobile=i,t.exports.default=i;var e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(t){t||(t={});var i=t.ua;if(i||"undefined"==typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"==typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!=typeof i)return!1;var o=e.test(i)&&!r.test(i)||!!t.tablet&&n.test(i);return!o&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(o=!0),o}},6296:function(t,e,r){"use strict";t.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],c=t.mode||"turntable",u=n(),h=i(),d=o();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),d.setDistanceLimits(l[0],l[1]),d.lookAt(0,e,r,s),new a({turntable:u,orbit:h,matrix:d},c)};var n=r(7261),i=r(9977),o=r(4192);function a(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map((function(e){return t[e]})),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=a.prototype;s.flush=function(t){for(var e=this._controllerList,r=0;r0?a-4:a;for(r=0;r>16&255,c[u++]=e>>8&255,c[u++]=255&e;return 2===l&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[u++]=255&e),1===l&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[u++]=e>>8&255,c[u++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,n){for(var i,o,a=[],s=e;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},3865:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},1318:function(t){"use strict";t.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},8697:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},7842:function(t,e,r){"use strict";var n=r(6330),i=r(1533),o=r(2651),a=r(4387),s=r(869),l=r(8697);t.exports=function t(e,r){if(n(e))return r?l(e,t(r)):[e[0].clone(),e[1].clone()];var c,u,h=0;if(i(e))c=e.clone();else if("string"==typeof e)c=a(e);else{if(0===e)return[o(0),o(1)];if(e===Math.floor(e))c=o(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),h-=256;c=o(e)}}if(n(r))c.mul(r[1]),u=r[0].clone();else if(i(r))u=r.clone();else if("string"==typeof r)u=a(r);else if(r)if(r===Math.floor(r))u=o(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),h+=256;u=o(r)}else u=o(1);return h>0?c=c.ushln(h):h<0&&(u=u.ushln(-h)),s(c,u)}},6330:function(t,e,r){"use strict";var n=r(1533);t.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},5716:function(t,e,r){"use strict";var n=r(6859);t.exports=function(t){return t.cmp(new n(0))}},1369:function(t,e,r){"use strict";var n=r(5716);t.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var o=0;o20?52:r+32}},1533:function(t,e,r){"use strict";r(6859),t.exports=function(t){return t&&"object"==typeof t&&Boolean(t.words)}},2651:function(t,e,r){"use strict";var n=r(6859),i=r(2361);t.exports=function(t){var e=i.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},869:function(t,e,r){"use strict";var n=r(2651),i=r(5716);t.exports=function(t,e){var r=i(t),o=i(e);if(0===r)return[n(0),n(1)];if(0===o)return[n(0),n(0)];o<0&&(t=t.neg(),e=e.neg());var a=t.gcd(e);return a.cmpn(1)?[t.div(a),e.div(a)]:[t,e]}},4387:function(t,e,r){"use strict";var n=r(6859);t.exports=function(t){return new n(t)}},6504:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},7721:function(t,e,r){"use strict";var n=r(5716);t.exports=function(t){return n(t[0])*n(t[1])}},5572:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},946:function(t,e,r){"use strict";var n=r(1369),i=r(4025);t.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var o=e.abs().divmod(r.abs()),a=o.div,s=n(a),l=o.mod,c=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=i(s)+4;return c*(s+(d=n(l.ushln(u).divRound(r)))*Math.pow(2,-u))}var h=r.bitLength()-l.bitLength()+53,d=n(l.ushln(h).divRound(r));return h<1023?c*d*Math.pow(2,-h):c*(d*=Math.pow(2,-1023))*Math.pow(2,1023-h)}},2478:function(t){"use strict";function e(t,e,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)>=0?(o=a,i=a-1):n=a+1}return o}function r(t,e,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)>0?(o=a,i=a-1):n=a+1}return o}function n(t,e,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)<0?(o=a,n=a+1):i=a-1}return o}function i(t,e,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=t[a];(void 0!==r?r(s,e):s-e)<=0?(o=a,n=a+1):i=a-1}return o}function o(t,e,r,n,i){for(;n<=i;){var o=n+i>>>1,a=t[o],s=void 0!==r?r(a,e):a-e;if(0===s)return o;s<=0?n=o+1:i=o-1}return-1}function a(t,e,r,n,i,o){return"function"==typeof r?o(t,e,r,void 0===n?0:0|n,void 0===i?t.length-1:0|i):o(t,e,void 0,void 0===r?0:0|r,void 0===n?t.length-1:0|n)}t.exports={ge:function(t,r,n,i,o){return a(t,r,n,i,o,e)},gt:function(t,e,n,i,o){return a(t,e,n,i,o,r)},lt:function(t,e,r,i,o){return a(t,e,r,i,o,n)},le:function(t,e,r,n,o){return a(t,e,r,n,o,i)},eq:function(t,e,r,n,i){return a(t,e,r,n,i,o)}}},8828:function(t,e){"use strict";function r(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},6859:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(7790).Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=l(t,e,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,l=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,l=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,h=67108863&l,d=Math.min(c,e.length-1),f=Math.max(0,c-t.length+1);f<=d;f++){var p=c-f|0;u+=(a=(i=0|t.words[p])*(o=0|e.words[f])+h)/67108864|0,h=67108863&a}r.words[c]=0|h,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?u[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=h[t],f=d[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(t);r=(p=p.idivn(f)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,l="le"===e,c=new t(o),u=this.clone();if(l){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,f=0|a[1],p=8191&f,m=f>>>13,g=0|a[2],v=8191&g,b=g>>>13,y=0|a[3],x=8191&y,_=y>>>13,w=0|a[4],k=8191&w,A=w>>>13,M=0|a[5],T=8191&M,S=M>>>13,C=0|a[6],E=8191&C,L=C>>>13,z=0|a[7],O=8191&z,D=z>>>13,I=0|a[8],R=8191&I,F=I>>>13,P=0|a[9],N=8191&P,j=P>>>13,B=0|s[0],U=8191&B,G=B>>>13,V=0|s[1],H=8191&V,W=V>>>13,q=0|s[2],Y=8191&q,Z=q>>>13,X=0|s[3],$=8191&X,J=X>>>13,K=0|s[4],Q=8191&K,tt=K>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,ut=0|s[8],ht=8191&ut,dt=ut>>>13,ft=0|s[9],pt=8191&ft,mt=ft>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(c+(n=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,G))+Math.imul(d,U)|0))<<13)|0;c=((o=Math.imul(d,G))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,G))+Math.imul(m,U)|0,o=Math.imul(m,G);var vt=(c+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(d,H)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=(i=Math.imul(v,G))+Math.imul(b,U)|0,o=Math.imul(b,G),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var bt=(c+(n=n+Math.imul(h,Y)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(d,Y)|0))<<13)|0;c=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(x,U),i=(i=Math.imul(x,G))+Math.imul(_,U)|0,o=Math.imul(_,G),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var yt=(c+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,J)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(k,U),i=(i=Math.imul(k,G))+Math.imul(A,U)|0,o=Math.imul(A,G),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,J)|0;var xt=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(d,Q)|0))<<13)|0;c=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,G))+Math.imul(S,U)|0,o=Math.imul(S,G),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(d,rt)|0))<<13)|0;c=((o=o+Math.imul(d,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(E,U),i=(i=Math.imul(E,G))+Math.imul(L,U)|0,o=Math.imul(L,G),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(S,H)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var wt=(c+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(d,ot)|0))<<13)|0;c=((o=o+Math.imul(d,at)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,G))+Math.imul(D,U)|0,o=Math.imul(D,G),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,W)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var kt=(c+(n=n+Math.imul(h,lt)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(d,lt)|0))<<13)|0;c=((o=o+Math.imul(d,ct)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(R,U),i=(i=Math.imul(R,G))+Math.imul(F,U)|0,o=Math.imul(F,G),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(D,H)|0,o=o+Math.imul(D,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,J)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var At=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,dt)|0)+Math.imul(d,ht)|0))<<13)|0;c=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,U),i=(i=Math.imul(N,G))+Math.imul(j,U)|0,o=Math.imul(j,G),n=n+Math.imul(R,H)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(F,H)|0,o=o+Math.imul(F,W)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,dt)|0;var Mt=(c+(n=n+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,mt)|0)+Math.imul(d,pt)|0))<<13)|0;c=((o=o+Math.imul(d,mt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(N,H),i=(i=Math.imul(N,W))+Math.imul(j,H)|0,o=Math.imul(j,W),n=n+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(F,Y)|0,o=o+Math.imul(F,Z)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(v,ht)|0,i=(i=i+Math.imul(v,dt)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,dt)|0;var Tt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,Y),i=(i=Math.imul(N,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,J)|0)+Math.imul(F,$)|0,o=o+Math.imul(F,J)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,ct)|0,n=n+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,dt)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,dt)|0;var St=(c+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,$),i=(i=Math.imul(N,J))+Math.imul(j,$)|0,o=Math.imul(j,J),n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(F,Q)|0,o=o+Math.imul(F,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(D,rt)|0,o=o+Math.imul(D,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,n=n+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,ct)|0,n=n+Math.imul(k,ht)|0,i=(i=i+Math.imul(k,dt)|0)+Math.imul(A,ht)|0,o=o+Math.imul(A,dt)|0;var Ct=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,tt))+Math.imul(j,Q)|0,o=Math.imul(j,tt),n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(F,rt)|0,o=o+Math.imul(F,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0,n=n+Math.imul(T,ht)|0,i=(i=i+Math.imul(T,dt)|0)+Math.imul(S,ht)|0,o=o+Math.imul(S,dt)|0;var Et=(c+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(A,pt)|0))<<13)|0;c=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(j,rt)|0,o=Math.imul(j,nt),n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,at)|0)+Math.imul(F,ot)|0,o=o+Math.imul(F,at)|0,n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,ct)|0,n=n+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,dt)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,dt)|0;var Lt=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(N,ot),i=(i=Math.imul(N,at))+Math.imul(j,ot)|0,o=Math.imul(j,at),n=n+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,ct)|0)+Math.imul(F,lt)|0,o=o+Math.imul(F,ct)|0,n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,dt)|0)+Math.imul(D,ht)|0,o=o+Math.imul(D,dt)|0;var zt=(c+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(L,pt)|0))<<13)|0;c=((o=o+Math.imul(L,mt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,n=Math.imul(N,lt),i=(i=Math.imul(N,ct))+Math.imul(j,lt)|0,o=Math.imul(j,ct),n=n+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,dt)|0)+Math.imul(F,ht)|0,o=o+Math.imul(F,dt)|0;var Ot=(c+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(D,pt)|0))<<13)|0;c=((o=o+Math.imul(D,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(N,ht),i=(i=Math.imul(N,dt))+Math.imul(j,ht)|0,o=Math.imul(j,dt);var Dt=(c+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,mt)|0)+Math.imul(F,pt)|0))<<13)|0;c=((o=o+Math.imul(F,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var It=(c+(n=Math.imul(N,pt))|0)+((8191&(i=(i=Math.imul(N,mt))+Math.imul(j,pt)|0))<<13)|0;return c=((o=Math.imul(j,mt))+(i>>>13)|0)+(It>>>26)|0,It&=67108863,l[0]=gt,l[1]=vt,l[2]=bt,l[3]=yt,l[4]=xt,l[5]=_t,l[6]=wt,l[7]=kt,l[8]=At,l[9]=Mt,l[10]=Tt,l[11]=St,l[12]=Ct,l[13]=Et,l[14]=Lt,l[15]=zt,l[16]=Ot,l[17]=Dt,l[18]=It,0!==c&&(l[19]=c,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?f(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==u||c>=i);c--){var h=0|this.words[c];this.words[c]=u<<26-o|h>>>o,u=h&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==e){(s=new o(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var d=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,h);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=d)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):this.negative&t.negative?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),l=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),h=e.clone();!e.isZero();){for(var d=0,f=1;!(e.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(h)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(l)):(r.isub(e),s.isub(i),l.isub(a))}return{a:s,b:l,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),l=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;!(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var h=0,d=1;!(r.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(y,b),y.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new x;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return v[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(!(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,i),d=this.pow(t,i.addn(1).iushrn(1)),f=this.pow(t,i),p=a;0!==f.cmp(s);){for(var m=f,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var c=e.words[n],u=l-1;u>=0;u--){var h=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4==++s||0===n&&0===u)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}l=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,k),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},6204:function(t){"use strict";t.exports=function(t){var e,r,n,i=t.length,o=0;for(e=0;e>>1;if(!(u<=0)){var h,d=i.mallocDouble(2*u*s),f=i.mallocInt32(s);if((s=l(t,u,d,f))>0){if(1===u&&n)o.init(s),h=o.sweepComplete(u,r,0,s,d,f,0,s,d,f);else{var p=i.mallocDouble(2*u*c),m=i.mallocInt32(c);(c=l(e,u,p,m))>0&&(o.init(s+c),h=1===u?o.sweepBipartite(u,r,0,s,d,f,0,c,p,m):a(u,r,n,s,d,f,c,p,m),i.free(p),i.free(m))}i.free(d),i.free(f)}return h}}}function u(t,e){n.push([t,e])}},2455:function(t,e){"use strict";function r(t){return t?function(t,e,r,n,i,o,a,s,l,c,u){return i-n>l-s?function(t,e,r,n,i,o,a,s,l,c,u){for(var h=2*t,d=n,f=h*n;dc-l?n?function(t,e,r,n,i,o,a,s,l,c,u){for(var h=2*t,d=n,f=h*n;d0;){var I=(O-=1)*x,R=w[I],F=w[I+1],P=w[I+2],N=w[I+3],j=w[I+4],B=w[I+5],U=O*_,G=k[U],V=k[U+1],H=1&B,W=!!(16&B),q=u,Y=S,Z=E,X=L;if(H&&(q=E,Y=L,Z=u,X=S),!(2&B&&F>=(P=g(t,R,F,P,q,Y,V))||4&B&&(F=v(t,R,F,P,q,Y,G))>=P)){var $=P-F,J=j-N;if(W){if(t*$*($+J)=p0)&&!(p1>=hi)"),m=u("lo===p0"),g=u("lo>>1,d=2*t,f=h,p=s[d*h+e];c=y?(f=b,p=y):v>=_?(f=g,p=v):(f=x,p=_):y>=_?(f=b,p=y):_>=v?(f=g,p=v):(f=x,p=_);for(var w=d*(u-1),k=d*f,A=0;Ar&&i[h+e]>c;--u,h-=a){for(var d=h,f=h+a,p=0;pd;++d,l+=s)if(i[l+h]===a)if(u===d)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var m=o[d];o[d]=o[u],o[u++]=m}return u},"lod;++d,l+=s)if(i[l+h]f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var m=o[d];o[d]=o[u],o[u++]=m}return u},"lo<=p0":function(t,e,r,n,i,o,a){for(var s=2*t,l=s*r,c=l,u=r,h=t+e,d=r;n>d;++d,l+=s)if(i[l+h]<=a)if(u===d)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var m=o[d];o[d]=o[u],o[u++]=m}return u},"hi<=p0":function(t,e,r,n,i,o,a){for(var s=2*t,l=s*r,c=l,u=r,h=t+e,d=r;n>d;++d,l+=s)if(i[l+h]<=a)if(u===d)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var m=o[d];o[d]=o[u],o[u++]=m}return u},"lof;++f,l+=s){var p=i[l+h],m=i[l+d];if(pg;++g){var v=i[l+g];i[l+g]=i[c],i[c++]=v}var b=o[f];o[f]=o[u],o[u++]=b}}return u},"lo<=p0&&p0<=hi":function(t,e,r,n,i,o,a){for(var s=2*t,l=s*r,c=l,u=r,h=e,d=t+e,f=r;n>f;++f,l+=s){var p=i[l+h],m=i[l+d];if(p<=a&&a<=m)if(u===f)u+=1,c+=s;else{for(var g=0;s>g;++g){var v=i[l+g];i[l+g]=i[c],i[c++]=v}var b=o[f];o[f]=o[u],o[u++]=b}}return u},"!(lo>=p0)&&!(p1>=hi)":function(t,e,r,n,i,o,a,s){for(var l=2*t,c=l*r,u=c,h=r,d=e,f=t+e,p=r;n>p;++p,c+=l){var m=i[c+d],g=i[c+f];if(!(m>=a||s>=g))if(h===p)h+=1,u+=l;else{for(var v=0;l>v;++v){var b=i[c+v];i[c+v]=i[u],i[u++]=b}var y=o[p];o[p]=o[h],o[h++]=y}}return h}}},1811:function(t){"use strict";t.exports=function(t,n){n<=4*e?r(0,n-1,t):c(0,n-1,t)};var e=32;function r(t,e,r){for(var n=2*(t+1),i=t+1;i<=e;++i){for(var o=r[n++],a=r[n++],s=i,l=n-2;s-- >t;){var c=r[l-2],u=r[l-1];if(cr[e+1])}function l(t,e,r,n){var i=n[t*=2];return i>1,g=m-d,v=m+d,b=f,y=g,x=m,_=v,w=p,k=t+1,A=u-1,M=0;s(b,y,h)&&(M=b,b=y,y=M),s(_,w,h)&&(M=_,_=w,w=M),s(b,x,h)&&(M=b,b=x,x=M),s(y,x,h)&&(M=y,y=x,x=M),s(b,_,h)&&(M=b,b=_,_=M),s(x,_,h)&&(M=x,x=_,_=M),s(y,w,h)&&(M=y,y=w,w=M),s(y,x,h)&&(M=y,y=x,x=M),s(_,w,h)&&(M=_,_=w,w=M);for(var T=h[2*y],S=h[2*y+1],C=h[2*_],E=h[2*_+1],L=2*b,z=2*x,O=2*w,D=2*f,I=2*m,R=2*p,F=0;F<2;++F){var P=h[L+F],N=h[z+F],j=h[O+F];h[D+F]=P,h[I+F]=N,h[R+F]=j}i(g,t,h),i(v,u,h);for(var B=k;B<=A;++B)if(l(B,T,S,h))B!==k&&n(B,k,h),++k;else if(!l(B,C,E,h))for(;;){if(l(A,C,E,h)){l(A,T,S,h)?(o(B,k,A,h),++k,--A):(n(B,A,h),--A);break}if(--A>>1;o(p,S);var C=0,E=0;for(k=0;k=a)m(u,h,E--,L=L-a|0);else if(L>=0)m(l,c,C--,L);else if(L<=-a){L=-L-a|0;for(var z=0;z>>1;o(p,C);var E=0,L=0,z=0;for(A=0;A>1==p[2*A+3]>>1&&(D=2,A+=1),O<0){for(var I=-(O>>1)-1,R=0;R>1)-1,0===D?m(l,c,E--,I):1===D?m(u,h,L--,I):2===D&&m(d,f,z--,I)}},scanBipartite:function(t,e,r,n,i,s,u,h,d,f,v,b){var y=0,x=2*t,_=e,w=e+t,k=1,A=1;n?A=a:k=a;for(var M=i;M>>1;o(p,E);var L=0;for(M=0;M=a?(O=!n,T-=a):(O=!!n,T-=1),O)g(l,c,L++,T);else{var D=b[T],I=x*T,R=v[I+e+1],F=v[I+e+1+t];t:for(var P=0;P>>1;o(p,k);var A=0;for(y=0;y=a)l[A++]=x-a;else{var T=f[x-=1],S=g*x,C=d[S+e+1],E=d[S+e+1+t];t:for(var L=0;L=0;--L)if(l[L]===x){for(I=L+1;I0;){for(var f=r.pop(),p=(u=-1,h=-1,l=a[s=r.pop()],1);p=0||(e.flip(s,f),i(t,e,r,u,s,h),i(t,e,r,s,h,u),i(t,e,r,h,f,u),i(t,e,r,f,u,h))}}},5023:function(t,e,r){"use strict";var n,i=r(2478);function o(t,e,r,n,i,o,a){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=o,this.boundary=a}function a(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}t.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,i=0;i0||l.length>0;){for(;s.length>0;){var f=s.pop();if(c[f]!==-i){c[f]=i,u[f];for(var p=0;p<3;++p){var m=d[3*f+p];m>=0&&0===c[m]&&(h[3*f+p]?l.push(m):(s.push(m),c[m]=i))}}}var g=l;l=s,s=g,l.length=0,i=-i}var v=function(t,e,r){for(var n=0,i=0;i1&&i(r[d[f-2]],r[d[f-1]],o)>0;)t.push([d[f-1],d[f-2],a]),f-=1;d.length=f,d.push(a);var p=h.upperIds;for(f=p.length;f>1&&i(r[p[f-2]],r[p[f-1]],o)<0;)t.push([p[f-2],p[f-1],a]),f-=1;p.length=f,p.push(a)}}function u(t,e){var r;return(r=t.a[0]p[0]&&i.push(new a(p,f,2,l),new a(f,p,1,l))}i.sort(s);for(var m=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),g=[new o([m,1],[m,0],-1,[],[],[],[])],v=[],b=(l=0,i.length);l=0}}(),o.removeTriangle=function(t,e,r){var n=this.stars;a(n[t],e,r),a(n[e],r,t),a(n[r],t,e)},o.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},o.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;ne[2]?1:0)}function v(t,e,r){if(0!==t.length){if(e)for(var n=0;n=0;--o){var y=e[u=(S=n[o])[0]],x=y[0],_=y[1],w=t[x],k=t[_];if((w[0]-k[0]||w[1]-k[1])<0){var A=x;x=_,_=A}y[0]=x;var M,T=y[1]=S[1];for(i&&(M=y[2]);o>0&&n[o-1][0]===u;){var S,C=(S=n[--o])[1];i?e.push([T,C,M]):e.push([T,C]),T=C}i?e.push([T,_,M]):e.push([T,_])}return d}(t,e,d,m,r),b=p(t,g);return v(e,b,r),!!b||d.length>0||m.length>0}},3637:function(t,e,r){"use strict";t.exports=function(t,e,r,n){var o=s(e,t),h=s(n,r),d=u(o,h);if(0===a(d))return null;var f=u(h,s(t,r)),p=i(f,d),m=c(o,p);return l(t,m)};var n=r(6504),i=r(8697),o=r(5572),a=r(7721),s=r(544),l=r(2653),c=r(8987);function u(t,e){return o(n(t[0],e[1]),n(t[1],e[0]))}},3642:function(t){t.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},6729:function(t,e,r){"use strict";var n=r(3642),i=r(395);function o(t){return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function a(t){for(var e,r="#",n=0;n<3;++n)r+=("00"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function s(t){return"rgba("+t.join(",")+")"}t.exports=function(t){var e,r,l,c,u,h,d,f,p,m;if(t||(t={}),f=(t.nshades||72)-1,d=t.format||"hex",(h=t.colormap)||(h="jet"),"string"==typeof h){if(h=h.toLowerCase(),!n[h])throw Error(h+" not a supported colorscale");u=n[h]}else{if(!Array.isArray(h))throw Error("unsupported colormap option",h);u=h.slice()}if(u.length>f+1)throw new Error(h+" map requires nshades to be at least size "+u.length);p=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1],e=u.map((function(t){return Math.round(t.index*f)})),p[0]=Math.min(Math.max(p[0],0),1),p[1]=Math.min(Math.max(p[1],0),1);var g=u.map((function(t,e){var r=u[e].index,n=u[e].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1||(n[3]=p[0]+(p[1]-p[0])*r),n})),v=[];for(m=0;m0||l(t,e,o)?-1:1:0===s?c>0||l(t,e,r)?1:-1:i(c-s)}var h=n(t,e,r);return h>0?a>0&&n(t,e,o)>0?1:-1:h<0?a>0||n(t,e,o)>0?1:-1:n(t,e,o)>0||l(t,e,r)?1:-1};var n=r(3250),i=r(8572),o=r(9362),a=r(5382),s=r(8210);function l(t,e,r){var n=o(t[0],-e[0]),i=o(t[1],-e[1]),l=o(r[0],-e[0]),c=o(r[1],-e[1]),u=s(a(n,l),a(i,c));return u[u.length-1]>=0}},8572:function(t){"use strict";t.exports=function(t){return t<0?-1:t>0?1:0}},8507:function(t){t.exports=function(t,n){var i=t.length,o=t.length-n.length;if(o)return o;switch(i){case 0:return 0;case 1:return t[0]-n[0];case 2:return t[0]+t[1]-n[0]-n[1]||e(t[0],t[1])-e(n[0],n[1]);case 3:var a=t[0]+t[1],s=n[0]+n[1];if(o=a+t[2]-(s+n[2]))return o;var l=e(t[0],t[1]),c=e(n[0],n[1]);return e(l,t[2])-e(c,n[2])||e(l+t[2],a)-e(c+n[2],s);case 4:var u=t[0],h=t[1],d=t[2],f=t[3],p=n[0],m=n[1],g=n[2],v=n[3];return u+h+d+f-(p+m+g+v)||e(u,h,d,f)-e(p,m,g,v,p)||e(u+h,u+d,u+f,h+d,h+f,d+f)-e(p+m,p+g,p+v,m+g,m+v,g+v)||e(u+h+d,u+h+f,u+d+f,h+d+f)-e(p+m+g,p+m+v,p+g+v,m+g+v);default:for(var b=t.slice().sort(r),y=n.slice().sort(r),x=0;xt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}},4750:function(t,e,r){"use strict";t.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var i=new Array(r),o=e[r-1],a=0;a=e[l]&&(s+=1);o[a]=s}}return t}(n(o,!0),r)}};var n=r(8954),i=r(3952)},4769:function(t){"use strict";t.exports=function(t,e,r,n,i,o){var a=i-1,s=i*i,l=a*a,c=(1+2*i)*l,u=i*l,h=s*(3-2*i),d=s*a;if(t.length){o||(o=new Array(t.length));for(var f=t.length-1;f>=0;--f)o[f]=c*t[f]+u*e[f]+h*r[f]+d*n[f];return o}return c*t+u*e+h*r+d*n},t.exports.derivative=function(t,e,r,n,i,o){var a=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(t.length){o||(o=new Array(t.length));for(var u=t.length-1;u>=0;--u)o[u]=a*t[u]+s*e[u]+l*r[u]+c*n[u];return o}return a*t+s*e+l*r[u]+c*n}},7642:function(t,e,r){"use strict";var n=r(8954),i=r(1682);function o(t,e){this.point=t,this.index=e}function a(t,e){for(var r=t.point,n=e.point,i=r.length,o=0;o=2)return!1;t[r]=n}return!0})):_.filter((function(t){for(var e=0;e<=s;++e){var r=v[t[e]];if(r<0)return!1;t[e]=r}return!0})),1&s)for(u=0;u<_.length;++u)d=(x=_[u])[0],x[0]=x[1],x[1]=d;return _}},2361:function(t){var e=!1;if("undefined"!=typeof Float64Array){var r=new Float64Array(1),n=new Uint32Array(r.buffer);r[0]=1,e=!0,1072693248===n[1]?(t.exports=function(t){return r[0]=t,[n[0],n[1]]},t.exports.pack=function(t,e){return n[0]=t,n[1]=e,r[0]},t.exports.lo=function(t){return r[0]=t,n[0]},t.exports.hi=function(t){return r[0]=t,n[1]}):1072693248===n[0]?(t.exports=function(t){return r[0]=t,[n[1],n[0]]},t.exports.pack=function(t,e){return n[1]=t,n[0]=e,r[0]},t.exports.lo=function(t){return r[0]=t,n[1]},t.exports.hi=function(t){return r[0]=t,n[0]}):e=!1}if(!e){var i=new Buffer(8);t.exports=function(t){return i.writeDoubleLE(t,0,!0),[i.readUInt32LE(0,!0),i.readUInt32LE(4,!0)]},t.exports.pack=function(t,e){return i.writeUInt32LE(t,0,!0),i.writeUInt32LE(e,4,!0),i.readDoubleLE(0,!0)},t.exports.lo=function(t){return i.writeDoubleLE(t,0,!0),i.readUInt32LE(0,!0)},t.exports.hi=function(t){return i.writeDoubleLE(t,0,!0),i.readUInt32LE(4,!0)}}t.exports.sign=function(e){return t.exports.hi(e)>>>31},t.exports.exponent=function(e){return(t.exports.hi(e)<<1>>>21)-1023},t.exports.fraction=function(e){var r=t.exports.lo(e),n=t.exports.hi(e),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},t.exports.denormalized=function(e){return!(2146435072&t.exports.hi(e))}},1338:function(t){"use strict";function e(t,r,n){var i=0|t[n];if(i<=0)return[];var o,a=new Array(i);if(n===t.length-1)for(o=0;o0)return function(t,e){var r,n;for(r=new Array(t),n=0;n=r-1){d=l.length-1;var p=t-e[r-1];for(f=0;f=r-1)for(var u=s.length-1,h=(e[r-1],0);h=0;--r)if(t[--e])return!1;return!0},s.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t0;--h)n.push(o(l[h-1],c[h-1],arguments[h])),i.push(0)}},s.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t1e-6?1/s:0;this._time.push(t);for(var d=r;d>0;--d){var f=o(c[d-1],u[d-1],arguments[d]);n.push(f),i.push((f-n[a++])*h)}}},s.set=function(t){var e=this.dimension;if(!(t0;--l)r.push(o(a[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var n=this._state,i=this._velocity,a=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=t-e,h=u>1e-6?1/u:0;this._time.push(t);for(var d=r;d>0;--d){var f=arguments[d];n.push(o(l[d-1],c[d-1],n[a++]+f)),i.push(f*h)}}},s.idle=function(t){var e=this.lastT();if(!(t=0;--h)n.push(o(l[h],c[h],n[a]+u*i[a])),i.push(0),a+=1}}},3840:function(t){"use strict";function e(t,e,r,n,i,o){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=o}function r(t){return new e(t._color,t.key,t.value,t.left,t.right,t._count)}function n(t,r){return new e(t,r.key,r.value,r.left,r.right,r._count)}function i(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function o(t,e){this._compare=t,this.root=e}t.exports=function(t){return new o(t||f,null)};var a=o.prototype;function s(t,e){var r;return e.left&&(r=s(t,e.left))?r:(r=t(e.key,e.value))||(e.right?s(t,e.right):void 0)}function l(t,e,r,n){if(e(t,n.key)<=0){var i;if(n.left&&(i=l(t,e,r,n.left)))return i;if(i=r(n.key,n.value))return i}if(n.right)return l(t,e,r,n.right)}function c(t,e,r,n,i){var o,a=r(t,i.key),s=r(e,i.key);if(a<=0){if(i.left&&(o=c(t,e,r,n,i.left)))return o;if(s>0&&(o=n(i.key,i.value)))return o}if(s>0&&i.right)return c(t,e,r,n,i.right)}function u(t,e){this.tree=t,this._stack=e}Object.defineProperty(a,"keys",{get:function(){var t=[];return this.forEach((function(e,r){t.push(e)})),t}}),Object.defineProperty(a,"values",{get:function(){var t=[];return this.forEach((function(e,r){t.push(r)})),t}}),Object.defineProperty(a,"length",{get:function(){return this.root?this.root._count:0}}),a.insert=function(t,r){for(var a=this._compare,s=this.root,l=[],c=[];s;){var u=a(t,s.key);l.push(s),c.push(u),s=u<=0?s.left:s.right}l.push(new e(0,t,r,null,null,1));for(var h=l.length-2;h>=0;--h)s=l[h],c[h]<=0?l[h]=new e(s._color,s.key,s.value,l[h+1],s.right,s._count+1):l[h]=new e(s._color,s.key,s.value,s.left,l[h+1],s._count+1);for(h=l.length-1;h>1;--h){var d=l[h-1];if(s=l[h],1===d._color||1===s._color)break;var f=l[h-2];if(f.left===d)if(d.left===s){if(!(p=f.right)||0!==p._color){f._color=0,f.left=d.right,d._color=1,d.right=f,l[h-2]=d,l[h-1]=s,i(f),i(d),h>=3&&((m=l[h-3]).left===f?m.left=d:m.right=d);break}d._color=1,f.right=n(1,p),f._color=0,h-=1}else{if(!(p=f.right)||0!==p._color){d.right=s.left,f._color=0,f.left=s.right,s._color=1,s.left=d,s.right=f,l[h-2]=s,l[h-1]=d,i(f),i(d),i(s),h>=3&&((m=l[h-3]).left===f?m.left=s:m.right=s);break}d._color=1,f.right=n(1,p),f._color=0,h-=1}else if(d.right===s){if(!(p=f.left)||0!==p._color){f._color=0,f.right=d.left,d._color=1,d.left=f,l[h-2]=d,l[h-1]=s,i(f),i(d),h>=3&&((m=l[h-3]).right===f?m.right=d:m.left=d);break}d._color=1,f.left=n(1,p),f._color=0,h-=1}else{var p;if(!(p=f.left)||0!==p._color){var m;d.left=s.right,f._color=0,f.right=s.left,s._color=1,s.right=d,s.left=f,l[h-2]=s,l[h-1]=d,i(f),i(d),i(s),h>=3&&((m=l[h-3]).right===f?m.right=s:m.left=s);break}d._color=1,f.left=n(1,p),f._color=0,h-=1}}return l[0]._color=1,new o(a,l[0])},a.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return s(t,this.root);case 2:return l(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return c(e,r,this._compare,t,this.root)}},Object.defineProperty(a,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new u(this,t)}}),Object.defineProperty(a,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new u(this,t)}}),a.at=function(t){if(t<0)return new u(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t=e.right._count)break;e=e.right}return new u(this,[])},a.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var o=e(t,r.key);n.push(r),o<=0&&(i=n.length),r=o<=0?r.left:r.right}return n.length=i,new u(this,n)},a.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var o=e(t,r.key);n.push(r),o<0&&(i=n.length),r=o<0?r.left:r.right}return n.length=i,new u(this,n)},a.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var o=e(t,r.key);n.push(r),o>0&&(i=n.length),r=o<=0?r.left:r.right}return n.length=i,new u(this,n)},a.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var o=e(t,r.key);n.push(r),o>=0&&(i=n.length),r=o<0?r.left:r.right}return n.length=i,new u(this,n)},a.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new u(this,n);r=i<=0?r.left:r.right}return new u(this,[])},a.remove=function(t){var e=this.find(t);return e?e.remove():this},a.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var h=u.prototype;function d(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function f(t,e){return te?1:0}Object.defineProperty(h,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(h,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),h.clone=function(){return new u(this.tree,this._stack.slice())},h.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var a=new Array(t.length),s=t[t.length-1];a[a.length-1]=new e(s._color,s.key,s.value,s.left,s.right,s._count);for(var l=t.length-2;l>=0;--l)(s=t[l]).left===t[l+1]?a[l]=new e(s._color,s.key,s.value,a[l+1],s.right,s._count):a[l]=new e(s._color,s.key,s.value,s.left,a[l+1],s._count);if((s=a[a.length-1]).left&&s.right){var c=a.length;for(s=s.left;s.right;)a.push(s),s=s.right;var u=a[c-1];for(a.push(new e(s._color,u.key,u.value,s.left,s.right,s._count)),a[c-1].key=s.key,a[c-1].value=s.value,l=a.length-2;l>=c;--l)s=a[l],a[l]=new e(s._color,s.key,s.value,s.left,a[l+1],s._count);a[c-1].left=a[c]}if(0===(s=a[a.length-1])._color){var h=a[a.length-2];for(h.left===s?h.left=null:h.right===s&&(h.right=null),a.pop(),l=0;l=0;--l){if(e=t[l],0===l)return void(e._color=1);if((o=t[l-1]).left===e){if((a=o.right).right&&0===a.right._color)return s=(a=o.right=r(a)).right=r(a.right),o.right=a.left,a.left=o,a.right=s,a._color=o._color,e._color=1,o._color=1,s._color=1,i(o),i(a),l>1&&((c=t[l-2]).left===o?c.left=a:c.right=a),void(t[l-1]=a);if(a.left&&0===a.left._color)return s=(a=o.right=r(a)).left=r(a.left),o.right=s.left,a.left=s.right,s.left=o,s.right=a,s._color=o._color,o._color=1,a._color=1,e._color=1,i(o),i(a),i(s),l>1&&((c=t[l-2]).left===o?c.left=s:c.right=s),void(t[l-1]=s);if(1===a._color){if(0===o._color)return o._color=1,void(o.right=n(0,a));o.right=n(0,a);continue}a=r(a),o.right=a.left,a.left=o,a._color=o._color,o._color=0,i(o),i(a),l>1&&((c=t[l-2]).left===o?c.left=a:c.right=a),t[l-1]=a,t[l]=o,l+11&&((c=t[l-2]).right===o?c.right=a:c.left=a),void(t[l-1]=a);if(a.right&&0===a.right._color)return s=(a=o.left=r(a)).right=r(a.right),o.left=s.right,a.right=s.left,s.right=o,s.left=a,s._color=o._color,o._color=1,a._color=1,e._color=1,i(o),i(a),i(s),l>1&&((c=t[l-2]).right===o?c.right=s:c.left=s),void(t[l-1]=s);if(1===a._color){if(0===o._color)return o._color=1,void(o.left=n(0,a));o.left=n(0,a);continue}var c;a=r(a),o.left=a.right,a.right=o,a._color=o._color,o._color=0,i(o),i(a),l>1&&((c=t[l-2]).right===o?c.right=a:c.left=a),t[l-1]=a,t[l]=o,l+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(h,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(h,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),h.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(h,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),h.update=function(t){var r=this._stack;if(0===r.length)throw new Error("Can't update empty node!");var n=new Array(r.length),i=r[r.length-1];n[n.length-1]=new e(i._color,i.key,t,i.left,i.right,i._count);for(var a=r.length-2;a>=0;--a)(i=r[a]).left===r[a+1]?n[a]=new e(i._color,i.key,i.value,n[a+1],i.right,i._count):n[a]=new e(i._color,i.key,i.value,i.left,n[a+1],i._count);return new o(this.tree._compare,n[0])},h.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(h,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},3837:function(t,e,r){"use strict";t.exports=function(t,e){var r=new u(t);return r.update(e),r};var n=r(4935),i=r(501),o=r(5304),a=r(6429),s=r(6444),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function c(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function u(t){this.gl=t,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=o(t)}var h=u.prototype;function d(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}h.update=function(t){function e(e,r,n){if(n in t){var i,o=t[n],a=this[n];(e?Array.isArray(o)&&Array.isArray(o[0]):Array.isArray(o))?this[n]=i=[r(o[0]),r(o[1]),r(o[2])]:this[n]=i=[r(o),r(o),r(o)];for(var s=0;s<3;++s)if(i[s]!==a[s])return!0}return!1}t=t||{};var r,o=e.bind(this,!1,Number),a=e.bind(this,!1,Boolean),l=e.bind(this,!1,String),c=e.bind(this,!0,(function(t){if(Array.isArray(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]})),u=!1,h=!1;if("bounds"in t)for(var d=t.bounds,f=0;f<2;++f)for(var p=0;p<3;++p)d[f][p]!==this.bounds[f][p]&&(h=!0),this.bounds[f][p]=d[f][p];if("ticks"in t)for(r=t.ticks,u=!0,this.autoTicks=!1,f=0;f<3;++f)this.tickSpacing[f]=0;else o("tickSpacing")&&(this.autoTicks=!0,h=!0);if(this._firstInit&&("ticks"in t||"tickSpacing"in t||(this.autoTicks=!0),h=!0,u=!0,this._firstInit=!1),h&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),u=!0),u){for(f=0;f<3;++f)r[f].sort((function(t,e){return t.x-e.x}));s.equal(r,this.ticks)?u=!1:this.ticks=r}a("tickEnable"),l("tickFont")&&(u=!0),l("tickFontStyle")&&(u=!0),l("tickFontWeight")&&(u=!0),l("tickFontVariant")&&(u=!0),o("tickSize"),o("tickAngle"),o("tickPad"),c("tickColor");var m=l("labels");l("labelFont")&&(m=!0),l("labelFontStyle")&&(m=!0),l("labelFontWeight")&&(m=!0),l("labelFontVariant")&&(m=!0),a("labelEnable"),o("labelSize"),o("labelPad"),c("labelColor"),a("lineEnable"),a("lineMirror"),o("lineWidth"),c("lineColor"),a("lineTickEnable"),a("lineTickMirror"),o("lineTickLength"),o("lineTickWidth"),c("lineTickColor"),a("gridEnable"),o("gridWidth"),c("gridColor"),a("zeroEnable"),c("zeroLineColor"),o("zeroLineWidth"),a("backgroundEnable"),c("backgroundColor");var g=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],v=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(m||u)&&this._text.update(this.bounds,this.labels,g,this.ticks,v):this._text=n(this.gl,this.bounds,this.labels,g,this.ticks,v),this._lines&&u&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var f=[new d,new d,new d];function p(t,e,r,n,i){for(var o=t.primalOffset,a=t.primalMinor,s=t.mirrorOffset,l=t.mirrorMinor,c=n[e],u=0;u<3;++u)if(e!==u){var h=o,d=s,f=a,p=l;c&1<0?(f[u]=-1,p[u]=0):(f[u]=0,p[u]=1)}}var m=[0,0,0],g={model:l,view:l,projection:l,_ortho:!1};h.isOpaque=function(){return!0},h.isTransparent=function(){return!1},h.drawTransparent=function(t){};var v=[0,0,0],b=[0,0,0],y=[0,0,0];h.draw=function(t){t=t||g;for(var e=this.gl,r=t.model||l,n=t.view||l,i=t.projection||l,o=this.bounds,s=t._ortho||!1,u=a(r,n,i,o,s),h=u.cubeEdges,d=u.axis,x=n[12],_=n[13],w=n[14],k=n[15],A=(s?2:1)*this.pixelRatio*(i[3]*x+i[7]*_+i[11]*w+i[15]*k)/e.drawingBufferHeight,M=0;M<3;++M)this.lastCubeProps.cubeEdges[M]=h[M],this.lastCubeProps.axis[M]=d[M];var T=f;for(M=0;M<3;++M)p(f[M],M,this.bounds,h,d);e=this.gl;var S,C,E,L=m;for(M=0;M<3;++M)this.backgroundEnable[M]?L[M]=d[M]:L[M]=0;for(this._background.draw(r,n,i,o,L,this.backgroundColor),this._lines.bind(r,n,i,this),M=0;M<3;++M){var z=[0,0,0];d[M]>0?z[M]=o[1][M]:z[M]=o[0][M];for(var O=0;O<2;++O){var D=(M+1+O)%3,I=(M+1+(1^O))%3;this.gridEnable[D]&&this._lines.drawGrid(D,I,this.bounds,z,this.gridColor[D],this.gridWidth[D]*this.pixelRatio)}for(O=0;O<2;++O)D=(M+1+O)%3,I=(M+1+(1^O))%3,this.zeroEnable[I]&&Math.min(o[0][I],o[1][I])<=0&&Math.max(o[0][I],o[1][I])>=0&&this._lines.drawZero(D,I,this.bounds,z,this.zeroLineColor[I],this.zeroLineWidth[I]*this.pixelRatio)}for(M=0;M<3;++M){this.lineEnable[M]&&this._lines.drawAxisLine(M,this.bounds,T[M].primalOffset,this.lineColor[M],this.lineWidth[M]*this.pixelRatio),this.lineMirror[M]&&this._lines.drawAxisLine(M,this.bounds,T[M].mirrorOffset,this.lineColor[M],this.lineWidth[M]*this.pixelRatio);var R=c(v,T[M].primalMinor),F=c(b,T[M].mirrorMinor),P=this.lineTickLength;for(O=0;O<3;++O){var N=A/r[5*O];R[O]*=P[O]*N,F[O]*=P[O]*N}this.lineTickEnable[M]&&this._lines.drawAxisTicks(M,T[M].primalOffset,R,this.lineTickColor[M],this.lineTickWidth[M]*this.pixelRatio),this.lineTickMirror[M]&&this._lines.drawAxisTicks(M,T[M].mirrorOffset,F,this.lineTickColor[M],this.lineTickWidth[M]*this.pixelRatio)}function j(t){(E=[0,0,0])[t]=1}function B(t,e,r){var n=(t+1)%3,i=(t+2)%3,o=e[n],a=e[i],s=r[n],l=r[i];o>0&&l>0||o>0&&l<0||o<0&&l>0||o<0&&l<0?j(n):(a>0&&s>0||a>0&&s<0||a<0&&s>0||a<0&&s<0)&&j(i)}for(this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio),M=0;M<3;++M){var U=T[M].primalMinor,G=T[M].mirrorMinor,V=c(y,T[M].primalOffset);for(O=0;O<3;++O)this.lineTickEnable[M]&&(V[O]+=A*U[O]*Math.max(this.lineTickLength[O],0)/r[5*O]);var H=[0,0,0];if(H[M]=1,this.tickEnable[M]){for(-3600===this.tickAngle[M]?(this.tickAngle[M]=0,this.tickAlign[M]="auto"):this.tickAlign[M]=-1,C=1,"auto"===(S=[this.tickAlign[M],.5,C])[0]?S[0]=0:S[0]=parseInt(""+S[0]),E=[0,0,0],B(M,U,G),O=0;O<3;++O)V[O]+=A*U[O]*this.tickPad[O]/r[5*O];this._text.drawTicks(M,this.tickSize[M],this.tickAngle[M],V,this.tickColor[M],H,E,S)}if(this.labelEnable[M]){for(C=0,E=[0,0,0],this.labels[M].length>4&&(j(M),C=1),"auto"===(S=[this.labelAlign[M],.5,C])[0]?S[0]=0:S[0]=parseInt(""+S[0]),O=0;O<3;++O)V[O]+=A*U[O]*this.labelPad[O]/r[5*O];V[M]+=.5*(o[0][M]+o[1][M]),this._text.drawLabel(M,this.labelSize[M],this.labelAngle[M],V,this.labelColor[M],[0,0,0],E,S)}}this._text.unbind()},h.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},5304:function(t,e,r){"use strict";t.exports=function(t){for(var e=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,h=[0,0,0],d=[0,0,0],f=-1;f<=1;f+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),h[l]=f,d[l]=f;for(var p=-1;p<=1;p+=2){h[c]=p;for(var m=-1;m<=1;m+=2)h[u]=m,e.push(h[0],h[1],h[2],d[0],d[1],d[2]),s+=1}var g=c;c=u,u=g}var v=n(t,new Float32Array(e)),b=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),y=i(t,[{buffer:v,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:t.FLOAT,size:3,offset:12,stride:24}],b),x=o(t);return x.attributes.position.location=0,x.attributes.normal.location=1,new a(t,v,y,x)};var n=r(2762),i=r(8116),o=r(1879).bg;function a(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}var s=a.prototype;s.draw=function(t,e,r,n,i,o){for(var a=!1,s=0;s<3;++s)a=a||i[s];if(a){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:o},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},6429:function(t,e,r){"use strict";t.exports=function(t,e,r,o,f){i(s,e,t),i(s,r,s);for(var b=0,y=0;y<2;++y){u[2]=o[y][2];for(var x=0;x<2;++x){u[1]=o[x][1];for(var _=0;_<2;++_)u[0]=o[_][0],d(l[b],u,s),b+=1}}var w=-1;for(y=0;y<8;++y){for(var k=l[y][3],A=0;A<3;++A)c[y][A]=l[y][A]/k;f&&(c[y][2]*=-1),k<0&&(w<0||c[y][2]C&&(w|=1<C&&(w|=1<c[y][1])&&(F=y);var P=-1;for(y=0;y<3;++y)(j=F^1<c[N][0]&&(N=j))}var B=m;B[0]=B[1]=B[2]=0,B[n.log2(P^F)]=F&P,B[n.log2(F^N)]=F&N;var U=7^N;U===w||U===R?(U=7^P,B[n.log2(N^U)]=U&N):B[n.log2(P^U)]=U&P;var G=g,V=w;for(M=0;M<3;++M)G[M]=V&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);e.Q=function(t){return i(t,s,l,null,[{name:"position",type:"vec3"}])};var c=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);e.bg=function(t){return i(t,c,u,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(t,e,r){"use strict";t.exports=function(t,e,r,n,a,l){var c=i(t),h=o(t,[{buffer:c,size:3}]),d=s(t);d.attributes.position.location=0;var f=new u(t,d,c,h);return f.update(e,r,n,a,l),f};var i=r(2762),o=r(8116),a=r(4359),s=r(1879).Q,l=window||n.global||{},c=l.__TEXT_CACHE||{};function u(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}l.__TEXT_CACHE={};var h=u.prototype,d=[0,0];h.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,d[0]=this.gl.drawingBufferWidth,d[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=d},h.unbind=function(){this.vao.unbind()},h.update=function(t,e,r,n,i){var o=[];function s(t,e,r,n,i,s){var l=[r.style,r.weight,r.variant,r.family].join("_"),u=c[l];u||(u=c[l]={});var h=u[e];h||(h=u[e]=function(t,e){try{return a(t,e)}catch(e){return console.warn('error vectorizing text:"'+t+'" error:',e),{cells:[],positions:[]}}}(e,{triangles:!0,font:r.family,fontStyle:r.style,fontWeight:r.weight,fontVariant:r.variant,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var d=(n||12)/12,f=h.positions,p=h.cells,m=0,g=p.length;m=0;--b){var y=f[v[b]];o.push(d*y[0],-d*y[1],t)}}for(var l=[0,0,0],u=[0,0,0],h=[0,0,0],d=[0,0,0],f={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},p=0;p<3;++p){h[p]=o.length/3|0,s(.5*(t[0][p]+t[1][p]),e[p],r[p],12,1.25,f),d[p]=(o.length/3|0)-h[p],l[p]=o.length/3|0;for(var m=0;m=0&&(i=r.length-n-1);var o=Math.pow(10,i),a=Math.round(t*e*o),s=a+"";if(s.indexOf("e")>=0)return s;var l=a/o,c=a%o;a<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=""+l;if(a<0&&(u="-"+u),i){for(var h=""+c;h.length=t[0][i];--a)o.push({x:a*e[i],text:r(e[i],a)});n.push(o)}return n},e.equal=function(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,o,i),r}function u(t,e){for(var r=n.malloc(t.length,e),i=t.length,o=0;o=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,t.data,e):this.length=c(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var s=n.malloc(t.size,r),l=o(s,t.shape);i.assign(l,t),this.length=c(this.gl,this.type,this.length,this.usage,e<0?s:s.subarray(0,t.size),e),n.free(s)}}else if(Array.isArray(t)){var h;h=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(t,"uint16"):u(t,"float32"),this.length=c(this.gl,this.type,this.length,this.usage,e<0?h:h.subarray(0,t.length),e),n.free(h)}else if("object"==typeof t&&"number"==typeof t.length)this.length=c(this.gl,this.type,this.length,this.usage,t,e);else{if("number"!=typeof t&&void 0!==t)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(t|=0)<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},t.exports=function(t,e,r,n){if(r=r||t.ARRAY_BUFFER,n=n||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(n!==t.DYNAMIC_DRAW&&n!==t.STATIC_DRAW&&n!==t.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var i=t.createBuffer(),o=new s(t,r,i,0,n);return o.update(e),o}},6405:function(t,e,r){"use strict";var n=r(2931);t.exports=function(t,e){var r=t.positions,i=t.vectors,o={positions:[],vertexIntensity:[],vertexIntensityBounds:t.vertexIntensityBounds,vectors:[],cells:[],coneOffset:t.coneOffset,colormap:t.colormap};if(0===t.positions.length)return e&&(e[0]=[0,0,0],e[1]=[0,0,0]),o;for(var a=0,s=1/0,l=-1/0,c=1/0,u=-1/0,h=1/0,d=-1/0,f=null,p=null,m=[],g=1/0,v=!1,b="raw"===t.coneSizemode,y=0;ya&&(a=n.length(_)),y&&!b){var w=2*n.distance(f,x)/(n.length(p)+n.length(_));w?(g=Math.min(g,w),v=!1):v=!0}v||(f=x,p=_),m.push(_)}var k=[s,c,h],A=[l,u,d];e&&(e[0]=k,e[1]=A),0===a&&(a=1);var M=1/a;isFinite(g)||(g=1),o.vectorScale=g;var T=t.coneSize||(b?1:.5);t.absoluteConeSize&&(T=t.absoluteConeSize*M),o.coneScale=T,y=0;for(var S=0;y=1},f.isTransparent=function(){return this.opacity<1},f.pickSlots=1,f.setPickBase=function(t){this.pickId=t},f.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,"lightPosition"in t&&(this.lightPosition=t.lightPosition),"opacity"in t&&(this.opacity=t.opacity),"ambient"in t&&(this.ambientLight=t.ambient),"diffuse"in t&&(this.diffuseLight=t.diffuse),"specular"in t&&(this.specularLight=t.specular),"roughness"in t&&(this.roughness=t.roughness),"fresnel"in t&&(this.fresnel=t.fresnel),void 0!==t.tubeScale&&(this.tubeScale=t.tubeScale),void 0!==t.vectorScale&&(this.vectorScale=t.vectorScale),void 0!==t.coneScale&&(this.coneScale=t.coneScale),void 0!==t.coneOffset&&(this.coneOffset=t.coneOffset),t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=u({colormap:t,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],o=0;o<3;++o)r[4*n+o]=i[o];r[4*n+3]=255*i[3]}return c(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions,i=t.vectors;if(n&&r&&i){var o=[],a=[],s=[],l=[],h=[];this.cells=r,this.positions=n,this.vectors=i;var d=t.meshColor||[1,1,1,1],f=t.vertexIntensity,p=1/0,m=-1/0;if(f)if(t.vertexIntensityBounds)p=+t.vertexIntensityBounds[0],m=+t.vertexIntensityBounds[1];else for(var g=0;g0){var m=this.triShader;m.bind(),m.uniforms=c,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},f.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||h,n=t.view||h,i=t.projection||h,o=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],a=0;a<3;++a)o[0][a]=Math.max(o[0][a],this.clipBounds[0][a]),o[1][a]=Math.min(o[1][a],this.clipBounds[1][a]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:o,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},f.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3),i={position:n,dataCoordinate:n,index:Math.floor(r[1]/48)};return"cone"===this.traceType?i.index=Math.floor(r[1]/48):"streamtube"===this.traceType&&(i.intensity=this.intensity[r[1]],i.velocity=this.vectors[r[1]].slice(0,3),i.divergence=this.vectors[r[1]][3],i.index=e),i},f.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()},t.exports=function(t,e,r){var s=r.shaders;1===arguments.length&&(t=(e=t).gl);var l=function(t,e){var r=n(t,e.meshShader.vertex,e.meshShader.fragment,null,e.meshShader.attributes);return r.attributes.position.location=0,r.attributes.color.location=2,r.attributes.uv.location=3,r.attributes.vector.location=4,r}(t,s),u=function(t,e){var r=n(t,e.pickShader.vertex,e.pickShader.fragment,null,e.pickShader.attributes);return r.attributes.position.location=0,r.attributes.id.location=1,r.attributes.vector.location=4,r}(t,s),h=a(t,c(new Uint8Array([255,255,255,255]),[1,1,4]));h.generateMipmap(),h.minFilter=t.LINEAR_MIPMAP_LINEAR,h.magFilter=t.LINEAR;var f=i(t),p=i(t),m=i(t),g=i(t),v=i(t),b=new d(t,h,l,u,f,p,v,m,g,o(t,[{buffer:f,type:t.FLOAT,size:4},{buffer:v,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:m,type:t.FLOAT,size:4},{buffer:g,type:t.FLOAT,size:2},{buffer:p,type:t.FLOAT,size:4}]),r.traceType||"cone");return b.update(e),b}},614:function(t,e,r){var n=r(3236),i=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, coneScale, coneOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),o=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),a=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float vectorScale, coneScale, coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * view * conePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);e.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(t){t.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(t,e,r){var n=r(737);t.exports=function(t){return n[t]}},9165:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl,r=n(e),a=i(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),l=o(e);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(e,r,a,l);return c.update(t),c};var n=r(2762),i=r(8116),o=r(3436),a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function c(t,e){for(var r=0;r<3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||a,i=r.projection=t.projection||a;r.model=t.model||a,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var o=n[12],s=n[13],l=n[14],c=n[15],u=(t._ortho?2:1)*this.pixelRatio*(i[3]*o+i[7]*s+i[11]*l+i[15]*c)/e.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)e.lineWidth(this.lineWidth[h]*this.pixelRatio),r.capSize=this.capSize[h]*u,this.lineCount[h]&&e.drawArrays(e.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var u=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var o=[0,0,0];o[(n+e)%3]=i,r.push(o)}t[e]=r}return t}();function h(t,e,r,n){for(var i=u[n],o=0;o0&&((f=u.slice())[s]+=p[1][s],i.push(u[0],u[1],u[2],m[0],m[1],m[2],m[3],0,0,0,f[0],f[1],f[2],m[0],m[1],m[2],m[3],0,0,0),c(this.bounds,f),a+=2+h(i,f,m,s))}this.lineCount[s]=a-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},3436:function(t,e,r){"use strict";var n=r(3236),i=r(9405),o=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}"]),a=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);t.exports=function(t){return i(t,o,a,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(t,e,r){"use strict";var n=r(7766);t.exports=function(t,e,r,n){i||(i=t.FRAMEBUFFER_UNSUPPORTED,o=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,a=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=t.getExtension("WEBGL_draw_buffers");if(!l&&c&&function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),o=0;ou||r<0||r>u)throw new Error("gl-fbo: Parameters are too large for FBO");var h=1;if("color"in(n=n||{})){if((h=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(h>1){if(!c)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(h>t.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+h+" draw buffers")}}var d=t.UNSIGNED_BYTE,f=t.getExtension("OES_texture_float");if(n.float&&h>0){if(!f)throw new Error("gl-fbo: Context does not support floating point textures");d=t.FLOAT}else n.preferFloat&&h>0&&f&&(d=t.FLOAT);var m=!0;"depth"in n&&(m=!!n.depth);var g=!1;return"stencil"in n&&(g=!!n.stencil),new p(t,e,r,d,h,m,g,c)};var i,o,a,s,l=null;function c(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function u(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function h(t){switch(t){case i:throw new Error("gl-fbo: Framebuffer unsupported");case o:throw new Error("gl-fbo: Framebuffer incomplete attachment");case a:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function d(t,e,r,i,o,a){if(!i)return null;var s=n(t,e,r,o,i);return s.magFilter=t.NEAREST,s.minFilter=t.NEAREST,s.mipSamples=1,s.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,a,t.TEXTURE_2D,s.handle,0),s}function f(t,e,r,n,i){var o=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,o),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,i,t.RENDERBUFFER,o),o}function p(t,e,r,n,i,o,a,s){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var p=0;p1&&s.drawBuffersWEBGL(l[a]);var b=r.getExtension("WEBGL_depth_texture");b?p?t.depth=d(r,i,o,b.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m&&(t.depth=d(r,i,o,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):m&&p?t._depth_rb=f(r,i,o,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m?t._depth_rb=f(r,i,o,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):p&&(t._depth_rb=f(r,i,o,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var y=r.checkFramebufferStatus(r.FRAMEBUFFER);if(y!==r.FRAMEBUFFER_COMPLETE){for(t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null),v=0;vi||r<0||r>i)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var o=c(n),a=0;a>8*f&255;this.pickOffset=r,i.bind();var p=i.uniforms;p.viewTransform=t,p.pickOffset=e,p.shape=this.shape;var m=i.attributes;return this.positionBuffer.bind(),m.position.pointer(),this.weightBuffer.bind(),m.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),m.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,a),r+this.shape[0]*this.shape[1]}}}(),h.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var o=r-n,a=this.xData,s=this.yData;return{object:this,pointId:o,dataCoord:[a[o%this.shape[0]],s[o/this.shape[0]|0]]}},h.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||i(e[0]),a=t.y||i(e[1]),s=t.z||new Float32Array(e[0]*e[1]),l=!1!==t.zsmooth;this.xData=r,this.yData=a;var c,u,h,f,p=t.colorLevels||[0],m=t.colorValues||[0,0,0,1],g=p.length,v=this.bounds;l?(c=v[0]=r[0],u=v[1]=a[0],h=v[2]=r[r.length-1],f=v[3]=a[a.length-1]):(c=v[0]=r[0]+(r[1]-r[0])/2,u=v[1]=a[0]+(a[1]-a[0])/2,h=v[2]=r[r.length-1]+(r[r.length-1]-r[r.length-2])/2,f=v[3]=a[a.length-1]+(a[a.length-1]-a[a.length-2])/2);var b=1/(h-c),y=1/(f-u),x=e[0],_=e[1];this.shape=[x,_];var w=(l?(x-1)*(_-1):x*_)*(d.length>>>1);this.numVertices=w;for(var k=o.mallocUint8(4*w),A=o.mallocFloat32(2*w),M=o.mallocUint8(2*w),T=o.mallocUint32(w),S=0,C=l?x-1:x,E=l?_-1:_,L=0;L max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\n// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl\nvec4 packFloat(float v) {\n float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n float e = floor(log2(av));\n float m = av * pow(2.0, -e) - 1.0;\n\n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n\n //Unpack exponent\n float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0;\n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];e.createShader=function(t){return i(t,o,a,null,l)},e.createPickShader=function(t){return i(t,o,s,null,l)}},5714:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl||t.scene&&t.scene.gl,r=h(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var a=d(e);a.attributes.position.location=0,a.attributes.nextPosition.location=1,a.attributes.arcLength.location=2,a.attributes.lineWidth.location=3,a.attributes.color.location=4;for(var s=n(e),l=i(e,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),u=c(new Array(1024),[256,1,4]),f=0;f<1024;++f)u.data[f]=255;var p=o(e,u);p.wrap=e.REPEAT;var m=new v(e,r,a,s,l,p);return m.update(t),m};var n=r(2762),i=r(8116),o=r(7766),a=new Uint8Array(4),s=new Float32Array(a.buffer),l=r(2478),c=r(9618),u=r(7319),h=u.createShader,d=u.createPickShader,f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function m(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function g(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function v(t,e,r,n,i,o){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=o,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var b=v.prototype;b.isTransparent=function(){return this.hasAlpha},b.isOpaque=function(){return!this.hasAlpha},b.pickSlots=1,b.setPickBase=function(t){this.pickId=t},b.drawTransparent=b.draw=function(t){if(this.vertexCount){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||f,view:t.view||f,projection:t.projection||f,clipBounds:m(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},b.drawPick=function(t){if(this.vertexCount){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||f,view:t.view||f,projection:t.projection||f,pickId:this.pickId,clipBounds:m(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},b.update=function(t){var e,r;this.dirty=!0;var n=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),this.hasAlpha=!1,"opacity"in t&&(this.opacity=+t.opacity,this.opacity<1&&(this.hasAlpha=!0));var i=[],o=[],a=[],s=0,u=0,h=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],d=t.position||t.positions;if(d){var f=t.color||t.colors||[0,0,0,1],m=t.lineWidth||1,g=!1;t:for(e=1;e0){for(var w=0;w<24;++w)i.push(i[i.length-12]);u+=2,g=!0}continue t}h[0][r]=Math.min(h[0][r],x[r],_[r]),h[1][r]=Math.max(h[1][r],x[r],_[r])}Array.isArray(f[0])?(v=f.length>e-1?f[e-1]:f.length>0?f[f.length-1]:[0,0,0,1],b=f.length>e?f[e]:f.length>0?f[f.length-1]:[0,0,0,1]):v=b=f,3===v.length&&(v=[v[0],v[1],v[2],1]),3===b.length&&(b=[b[0],b[1],b[2],1]),!this.hasAlpha&&v[3]<1&&(this.hasAlpha=!0),y=Array.isArray(m)?m.length>e-1?m[e-1]:m.length>0?m[m.length-1]:[0,0,0,1]:m;var k=s;if(s+=p(x,_),g){for(r=0;r<2;++r)i.push(x[0],x[1],x[2],_[0],_[1],_[2],k,y,v[0],v[1],v[2],v[3]);u+=2,g=!1}i.push(x[0],x[1],x[2],_[0],_[1],_[2],k,y,v[0],v[1],v[2],v[3],x[0],x[1],x[2],_[0],_[1],_[2],k,-y,v[0],v[1],v[2],v[3],_[0],_[1],_[2],x[0],x[1],x[2],s,-y,b[0],b[1],b[2],b[3],_[0],_[1],_[2],x[0],x[1],x[2],s,y,b[0],b[1],b[2],b[3]),u+=4}}if(this.buffer.update(i),o.push(s),a.push(d[d.length-1].slice()),this.bounds=h,this.vertexCount=u,this.points=a,this.arcLength=o,"dashes"in t){var A=t.dashes.slice();for(A.unshift(0),e=1;e1.0001)return null;v+=g[h]}return Math.abs(v-1)>.001?null:[d,s(t,g),g]}},840:function(t,e,r){var n=r(3236),i=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvec4 project(vec3 p) {\n return projection * view * model * vec4(p, 1.0);\n}\n\nvoid main() {\n gl_Position = project(position);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * vec4(position , 1.0);\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n f_color = color;\n f_data = position;\n f_uv = uv;\n}\n"]),o=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),a=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}"]),h=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),f=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);e.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:u,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:d,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:f,fragment:p,attributes:[{name:"position",type:"vec3"}]}},7201:function(t,e,r){"use strict";var n=r(9405),i=r(2762),o=r(8116),a=r(7766),s=r(8406),l=r(6760),c=r(7608),u=r(9618),h=r(6729),d=r(7765),f=r(1888),p=r(840),m=r(7626),g=p.meshShader,v=p.wireShader,b=p.pointShader,y=p.pickShader,x=p.pointPickShader,_=p.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(t,e,r,n,i,o,a,s,l,c,u,h,d,f,p,m,g,v,b,y,x,_,k,A,M,T,S){this.gl=t,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=o,this.pointPickShader=a,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=d,this.triangleUVs=h,this.triangleIds=c,this.triangleVAO=f,this.triangleCount=0,this.lineWidth=1,this.edgePositions=p,this.edgeColors=g,this.edgeUVs=v,this.edgeIds=m,this.edgeVAO=b,this.edgeCount=0,this.pointPositions=y,this.pointColors=_,this.pointUVs=k,this.pointSizes=A,this.pointIds=x,this.pointVAO=M,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=T,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var A=k.prototype;function M(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}function T(t){var e=n(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function S(t){var e=n(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function C(t){var e=n(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function E(t){var e=n(t,_.vertex,_.fragment);return e.attributes.position.location=0,e}A.isOpaque=function(){return!this.hasAlpha},A.isTransparent=function(){return this.hasAlpha},A.pickSlots=1,A.setPickBase=function(t){this.pickId=t},A.highlight=function(t){if(t&&this.contourEnable){for(var e=d(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,o=r.length,a=f.mallocFloat32(6*o),s=0,l=0;l0&&((h=this.triShader).bind(),h.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((h=this.lineShader).bind(),h.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((h=this.pointShader).bind(),h.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((h=this.contourShader).bind(),h.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},A.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,o=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],a=0;a<3;++a)o[0][a]=Math.max(o[0][a],this.clipBounds[0][a]),o[1][a]=Math.min(o[1][a],this.clipBounds[1][a]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:o,pickId:this.pickId/255};(s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},A.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),o=0;oi[A]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=g[t],r.uniforms.angle=v[t],o.drawArrays(o.TRIANGLES,i[A],i[M]-i[A]))),b[t]&&k&&(u[1^t]-=T*f*y[t],r.uniforms.dataAxis=h,r.uniforms.screenOffset=u,r.uniforms.color=x[t],r.uniforms.angle=_[t],o.drawArrays(o.TRIANGLES,w,k)),u[1^t]=T*s[2+(1^t)]-1,p[t+2]&&(u[1^t]+=T*f*m[t+2],Ai[A]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=g[t+2],r.uniforms.angle=v[t+2],o.drawArrays(o.TRIANGLES,i[A],i[M]-i[A]))),b[t+2]&&k&&(u[1^t]+=T*f*y[t+2],r.uniforms.dataAxis=h,r.uniforms.screenOffset=u,r.uniforms.color=x[t+2],r.uniforms.angle=_[t+2],o.drawArrays(o.TRIANGLES,w,k))}),m.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,o=r.screenBox,a=r.titleCenter,s=r.titleAngle,l=r.titleColor,c=r.pixelRatio;if(this.titleCount){for(var u=0;u<2;++u)e[u]=2*(a[u]*c-o[u])/(o[2+u]-o[u])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),m.bind=(d=[0,0],f=[0,0],p=[0,0],function(){var t=this.plot,e=this.shader,r=t._tickBounds,n=t.dataBox,i=t.screenBox,o=t.viewBox;e.bind();for(var a=0;a<2;++a){var s=r[a],l=r[a+2]-s,c=.5*(n[a+2]+n[a]),u=n[a+2]-n[a],h=o[a],m=o[a+2]-h,g=i[a],v=i[a+2]-g;f[a]=2*l/u*m/v,d[a]=2*(s-c)/u*m/v}p[1]=2*t.pixelRatio/(i[3]-i[1]),p[0]=p[1]*(i[3]-i[1])/(i[2]-i[0]),e.uniforms.dataScale=f,e.uniforms.dataShift=d,e.uniforms.textScale=p,this.vbo.bind(),e.attributes.textCoordinate.pointer()}),m.update=function(t){var e,r,n,i,a,s=[],l=t.ticks,c=t.bounds;for(a=0;a<2;++a){var u=[Math.floor(s.length/3)],h=[-1/0],d=l[a];for(e=0;e=0){var m=e[p]-n[p]*(e[p+2]-e[p])/(n[p+2]-n[p]);0===p?a.drawLine(m,e[1],m,e[3],f[p],d[p]):a.drawLine(e[0],m,e[2],m,f[p],d[p])}}for(p=0;p=0;--t)this.objects[t].dispose();for(this.objects.length=0,t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},c.removeObject=function(t){for(var e=this.objects,r=0;rMath.abs(e))c.rotate(o,0,0,-t*r*Math.PI*p.rotateSpeed/window.innerWidth);else if(!p._ortho){var a=-p.zoomSpeed*i*e/window.innerHeight*(o-c.lastT())/20;c.pan(o,0,0,h*(Math.exp(a)-1))}}}),!0)},p.enableMouseListeners(),p};var n=r(3025),i=r(6296),o=r(351),a=r(8512),s=r(24),l=r(7520)},799:function(t,e,r){var n=r(3236),i=r(9405),o=n(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),a=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);t.exports=function(t){return i(t,o,a,null,[{name:"position",type:"vec2"}])}},4100:function(t,e,r){"use strict";var n=r(4437),i=r(3837),o=r(5445),a=r(4449),s=r(3589),l=r(2260),c=r(7169),u=r(351),h=r(4772),d=r(4040),f=r(799),p=r(9216)({tablet:!0,featureDetect:!0});function m(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function g(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e<0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}return e>0?(r=Math.round(Math.pow(10,e)),Math.ceil(t/r)*r):Math.ceil(t)}function v(t){return"boolean"!=typeof t||t}t.exports={createScene:function(t){(t=t||{}).camera=t.camera||{};var e=t.canvas;e||(e=document.createElement("canvas"),t.container?t.container.appendChild(e):document.body.appendChild(e));var r=t.gl;if(r||(t.glOptions&&(p=!!t.glOptions.preserveDrawingBuffer),r=function(t,e){var r=null;try{(r=t.getContext("webgl",e))||(r=t.getContext("experimental-webgl",e))}catch(t){return null}return r}(e,t.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:p})),!r)throw new Error("webgl not supported");var b=t.bounds||[[-10,-10,-10],[10,10,10]],y=new m,x=l(r,r.drawingBufferWidth,r.drawingBufferHeight,{preferFloat:!p}),_=f(r),w=t.cameraObject&&!0===t.cameraObject._ortho||t.camera.projection&&"orthographic"===t.camera.projection.type||!1,k={eye:t.camera.eye||[2,0,0],center:t.camera.center||[0,0,0],up:t.camera.up||[0,1,0],zoomMin:t.camera.zoomMax||.1,zoomMax:t.camera.zoomMin||100,mode:t.camera.mode||"turntable",_ortho:w},A=t.axes||{},M=i(r,A);M.enable=!A.disable;var T=t.spikes||{},S=a(r,T),C=[],E=[],L=[],z=[],O=!0,D=!0,I={view:null,projection:new Array(16),model:new Array(16),_ortho:!1},R=(D=!0,[r.drawingBufferWidth,r.drawingBufferHeight]),F=t.cameraObject||n(e,k),P={gl:r,contextLost:!1,pixelRatio:t.pixelRatio||1,canvas:e,selection:y,camera:F,axes:M,axesPixels:null,spikes:S,bounds:b,objects:C,shape:R,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:v(t.autoResize),autoBounds:v(t.autoBounds),autoScale:!!t.autoScale,autoCenter:v(t.autoCenter),clipToBounds:v(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:I,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(t){this.aspect[0]=t.x,this.aspect[1]=t.y,this.aspect[2]=t.z,D=!0},setBounds:function(t,e){this.bounds[0][t]=e.min,this.bounds[1][t]=e.max},setClearColor:function(t){this.clearColor=t},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},N=[r.drawingBufferWidth/P.pixelRatio|0,r.drawingBufferHeight/P.pixelRatio|0];function j(){if(!P._stopped&&P.autoResize){var t=e.parentNode,r=1,n=1;t&&t!==document.body?(r=t.clientWidth,n=t.clientHeight):(r=window.innerWidth,n=window.innerHeight);var i=0|Math.ceil(r*P.pixelRatio),o=0|Math.ceil(n*P.pixelRatio);if(i!==e.width||o!==e.height){e.width=i,e.height=o;var a=e.style;a.position=a.position||"absolute",a.left="0px",a.top="0px",a.width=r+"px",a.height=n+"px",O=!0}}}function B(){for(var t=C.length,e=z.length,n=0;n0&&0===L[e-1];)L.pop(),z.pop().dispose()}function U(){if(P.contextLost)return!0;r.isContextLost()&&(P.contextLost=!0,P.mouseListener.enabled=!1,P.selection.object=null,P.oncontextloss&&P.oncontextloss())}P.autoResize&&j(),window.addEventListener("resize",j),P.update=function(t){P._stopped||(t=t||{},O=!0,D=!0)},P.add=function(t){P._stopped||(t.axes=M,C.push(t),E.push(-1),O=!0,D=!0,B())},P.remove=function(t){if(!P._stopped){var e=C.indexOf(t);e<0||(C.splice(e,1),E.pop(),O=!0,D=!0,B())}},P.dispose=function(){if(!P._stopped&&(P._stopped=!0,window.removeEventListener("resize",j),e.removeEventListener("webglcontextlost",U),P.mouseListener.enabled=!1,!P.contextLost)){M.dispose(),S.dispose();for(var t=0;ty.distance)continue;for(var c=0;c 1.0) {\n discard;\n }\n baseColor = mix(borderColor, color, step(radius, centerFraction));\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n }\n}\n"]),e.pickVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n"]),e.pickFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n"])},4696:function(t,e,r){"use strict";var n=r(9405),i=r(2762),o=r(1888),a=r(6640);function s(t,e,r,n,i){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}t.exports=function(t,e){var r=t.gl,o=new s(t,i(r),i(r),n(r,a.pointVertex,a.pointFragment),n(r,a.pickVertex,a.pickFragment));return o.update(e),t.addObject(o),o};var l,c,u=s.prototype;u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},u.update=function(t){var e;function r(e,r){return e in t?t[e]:r}t=t||{},this.sizeMin=r("sizeMin",.5),this.sizeMax=r("sizeMax",20),this.color=r("color",[1,0,0,1]).slice(),this.areaRatio=r("areaRatio",1),this.borderColor=r("borderColor",[0,0,0,1]).slice(),this.blend=r("blend",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,a=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,s=t.positions,l=i?s:o.mallocFloat32(s.length),c=a?t.idToIndex:o.mallocInt32(n);if(i||l.set(s),!a)for(l.set(s),e=0;e>>1;for(r=0;r=e[0]&&o<=e[2]&&a>=e[1]&&a<=e[3]&&n++}return n}(this.points,i),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/o,l[4]=2/a,l[6]=-2*i[0]/o-1,l[7]=-2*i[1]/a-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=u<5,r.uniforms.pointSize=u,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),e&&(c[0]=255&t,c[1]=t>>8&255,c[2]=t>>16&255,c[3]=t>>24&255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=c,this.pickOffset=t);var h=n.getParameter(n.BLEND),d=n.getParameter(n.DITHER);return h&&!this.blend&&n.disable(n.BLEND),d&&n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),h&&!this.blend&&n.enable(n.BLEND),d&&n.enable(n.DITHER),t+this.pointCount}),u.draw=u.unifiedDraw,u.drawPick=u.unifiedDraw,u.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var o=r-n,a=this.points;return{object:this,pointId:o,dataCoord:[a[2*o],a[2*o+1]]}}},783:function(t){t.exports=function(t,e,r,n){var i,o,a,s,l,c=e[0],u=e[1],h=e[2],d=e[3],f=r[0],p=r[1],m=r[2],g=r[3];return(o=c*f+u*p+h*m+d*g)<0&&(o=-o,f=-f,p=-p,m=-m,g=-g),1-o>1e-6?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-n)*i)/a,l=Math.sin(n*i)/a):(s=1-n,l=n),t[0]=s*c+l*f,t[1]=s*u+l*p,t[2]=s*h+l*m,t[3]=s*d+l*g,t}},5964:function(t){"use strict";t.exports=function(t){return t||0===t?t.toString():""}},9366:function(t,e,r){"use strict";var n=r(4359);t.exports=function(t,e,r){var o=[e.style,e.weight,e.variant,e.family].join("_"),a=i[o];if(a||(a=i[o]={}),t in a)return a[t];var s={textAlign:"center",textBaseline:"middle",lineHeight:1,font:e.family,fontStyle:e.style,fontWeight:e.weight,fontVariant:e.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},l=n(t,s);s.triangles=!1;var c,u,h=n(t,s);if(r&&1!==r){for(c=0;c max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),a=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * view * model * vec4(position, 1);\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),c=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),u=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],h={vertex:o,fragment:l,attributes:u},d={vertex:a,fragment:l,attributes:u},f={vertex:s,fragment:l,attributes:u},p={vertex:o,fragment:c,attributes:u},m={vertex:a,fragment:c,attributes:u},g={vertex:s,fragment:c,attributes:u};function v(t,e){var r=n(t,e),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}e.createPerspective=function(t){return v(t,h)},e.createOrtho=function(t){return v(t,d)},e.createProject=function(t){return v(t,f)},e.createPickPerspective=function(t){return v(t,p)},e.createPickOrtho=function(t){return v(t,m)},e.createPickProject=function(t){return v(t,g)}},8418:function(t,e,r){"use strict";var n=r(5219),i=r(2762),o=r(8116),a=r(1888),s=r(6760),l=r(1283),c=r(9366),u=r(5964),h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function d(t,e){var r=t[0],n=t[1],i=t[2],o=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*i+e[12]*o,t[1]=e[1]*r+e[5]*n+e[9]*i+e[13]*o,t[2]=e[2]*r+e[6]*n+e[10]*i+e[14]*o,t[3]=e[3]*r+e[7]*n+e[11]*i+e[15]*o,t}function f(t,e,r,n){return d(n,n),d(n,n),d(n,n)}function p(t,e){this.index=t,this.dataCoordinate=this.position=e}function m(t){return!0===t||t>1?1:t}function g(t,e,r,n,i,o,a,s,l,c,u,h){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=o,this.glyphBuffer=a,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=h,this.points=[],this._selectResult=new p(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}t.exports=function(t){var e=t.gl,r=l.createPerspective(e),n=l.createOrtho(e),a=l.createProject(e),s=l.createPickPerspective(e),c=l.createPickOrtho(e),u=l.createPickProject(e),h=i(e),d=i(e),f=i(e),p=i(e),m=new g(e,r,n,a,h,d,f,p,o(e,[{buffer:h,size:3,type:e.FLOAT},{buffer:d,size:4,type:e.FLOAT},{buffer:f,size:2,type:e.FLOAT},{buffer:p,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),s,c,u);return m.update(t),m};var v=g.prototype;v.pickSlots=1,v.setPickBase=function(t){this.pickId=t},v.isTransparent=function(){if(this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectHasAlpha)return!0;return!1},v.isOpaque=function(){if(!this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&!this.projectHasAlpha)return!0;return!1};var b=[0,0],y=[0,0,0],x=[0,0,0],_=[0,0,0,1],w=[0,0,0,1],k=h.slice(),A=[0,0,0],M=[[0,0,0],[0,0,0]];function T(t){return t[0]=t[1]=t[2]=0,t}function S(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function C(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}var E=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function L(t,e,r,n,i,o,a){var l=r.gl;if((o===r.projectHasAlpha||a)&&function(t,e,r,n){var i,o=e.axesProject,a=e.gl,l=t.uniforms,c=r.model||h,u=r.view||h,d=r.projection||h,p=e.axesBounds,m=function(t){for(var e=M,r=0;r<2;++r)for(var n=0;n<3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);i=e.axes&&e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],b[0]=2/a.drawingBufferWidth,b[1]=2/a.drawingBufferHeight,t.bind(),l.view=u,l.projection=d,l.screenSize=b,l.highlightId=e.highlightId,l.highlightScale=e.highlightScale,l.clipBounds=m,l.pickGroup=e.pickId/255,l.pixelRatio=n;for(var g=0;g<3;++g)if(o[g]){l.scale=e.projectScale[g],l.opacity=e.projectOpacity[g];for(var v=k,E=0;E<16;++E)v[E]=0;for(E=0;E<4;++E)v[5*E]=1;v[5*g]=0,i[g]<0?v[12+g]=p[0][g]:v[12+g]=p[1][g],s(v,c,v),l.model=v;var L=(g+1)%3,z=(g+2)%3,O=T(y),D=T(x);O[L]=1,D[z]=1;var I=f(0,0,0,S(_,O)),R=f(0,0,0,S(w,D));if(Math.abs(I[1])>Math.abs(R[1])){var F=I;I=R,R=F,F=O,O=D,D=F;var P=L;L=z,z=P}I[0]<0&&(O[L]=-1),R[1]>0&&(D[z]=-1);var N=0,j=0;for(E=0;E<4;++E)N+=Math.pow(c[4*L+E],2),j+=Math.pow(c[4*z+E],2);O[L]/=Math.sqrt(N),D[z]/=Math.sqrt(j),l.axes[0]=O,l.axes[1]=D,l.fragClipBounds[0]=C(A,m[0],g,-1e8),l.fragClipBounds[1]=C(A,m[1],g,1e8),e.vao.bind(),e.vao.draw(a.TRIANGLES,e.vertexCount),e.lineWidth>0&&(a.lineWidth(e.lineWidth*n),e.vao.draw(a.LINES,e.lineVertexCount,e.vertexCount)),e.vao.unbind()}}(e,r,n,i),o===r.hasAlpha||a){t.bind();var c=t.uniforms;c.model=n.model||h,c.view=n.view||h,c.projection=n.projection||h,b[0]=2/l.drawingBufferWidth,b[1]=2/l.drawingBufferHeight,c.screenSize=b,c.highlightId=r.highlightId,c.highlightScale=r.highlightScale,c.fragClipBounds=E,c.clipBounds=r.axes.bounds,c.opacity=r.opacity,c.pickGroup=r.pickId/255,c.pixelRatio=i,r.vao.bind(),r.vao.draw(l.TRIANGLES,r.vertexCount),r.lineWidth>0&&(l.lineWidth(r.lineWidth*i),r.vao.draw(l.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function z(t,e,r,i){var o;o=Array.isArray(t)?e=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},v.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},v.update=function(t){if("perspective"in(t=t||{})&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if("projectScale"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in t){Array.isArray(t.projectOpacity)?this.projectOpacity=t.projectOpacity.slice():(r=+t.projectOpacity,this.projectOpacity=[r,r,r]);for(var n=0;n<3;++n)this.projectOpacity[n]=m(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in t&&(this.opacity=m(t.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,o,s=t.position,l={family:t.font||"normal",style:t.fontStyle||"normal",weight:t.fontWeight||"normal",variant:t.fontVariant||"normal"},c=t.alignment||[0,0];if(2===c.length)i=c[0],o=c[1];else for(i=[],o=[],n=0;n0){var D=0,I=y,R=[0,0,0,1],F=[0,0,0,1],P=Array.isArray(f)&&Array.isArray(f[0]),N=Array.isArray(v)&&Array.isArray(v[0]);t:for(n=0;n<_;++n){for(b+=1,w=s[n],k=0;k<3;++k){if(isNaN(w[k])||!isFinite(w[k]))continue t;h[k]=Math.max(h[k],w[k]),u[k]=Math.min(u[k],w[k])}A=(j=z(d,n,l,this.pixelRatio)).mesh,M=j.lines,T=j.bounds;var j,B=j.visible;if(B)if(Array.isArray(f)){if(3===(U=P?n0?1-T[0][0]:q<0?1+T[1][0]:1,Y*=Y>0?1-T[0][1]:Y<0?1+T[1][1]:1],X=A.cells||[],$=A.positions||[];for(k=0;k0){var v=r*u;a.drawBox(h-v,d-v,f+v,d+v,o),a.drawBox(h-v,p-v,f+v,p+v,o),a.drawBox(h-v,d-v,h+v,p+v,o),a.drawBox(f-v,d-v,f+v,p+v,o)}}}},s.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},3589:function(t,e,r){"use strict";t.exports=function(t,e){var r=e[0],o=e[1];return new l(t,n(t,r,o,{}),i.mallocUint8(r*o*4))};var n=r(2260),i=r(1888),o=r(9618),a=r(8828).nextPow2;function s(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function l(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}var c=l.prototype;Object.defineProperty(c,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(t){if(this.gl){this.fbo.shape=t;var e=this.fbo.shape[0],r=this.fbo.shape[1];if(r*e*4>this.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(a(r*e*4)),o=0;or)for(t=r;te)for(t=e;t=0){for(var k=0|w.type.charAt(w.type.length-1),A=new Array(k),M=0;M=0;)T+=1;_[b]=T}var S=new Array(r.length);function C(){d.program=a.program(f,d._vref,d._fref,x,_);for(var t=0;t=0){if((p=d.charCodeAt(d.length-1)-48)<2||p>4)throw new n("","Invalid data type for attribute "+h+": "+d);s(t,e,f[0],i,p,o,h)}else{if(!(d.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+h+": "+d);var p;if((p=d.charCodeAt(d.length-1)-48)<2||p>4)throw new n("","Invalid data type for attribute "+h+": "+d);l(t,e,f,i,p,o,h)}}}return o};var n=r(8866);function i(t,e,r,n,i,o){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=o}var o=i.prototype;o.pointer=function(t,e,r,n){var i=this,o=i._gl,a=i._locations[i._index];o.vertexAttribPointer(a,i._dimension,t||o.FLOAT,!!e,r||0,n||0),o.enableVertexAttribArray(a)},o.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(o,"location",{get:function(){return this._locations[this._index]},set:function(t){return t!==this._locations[this._index]&&(this._locations[this._index]=0|t,this._wrapper.program=null),0|t}});var a=[function(t,e,r){return void 0===r.length?t.vertexAttrib1f(e,r):t.vertexAttrib1fv(e,r)},function(t,e,r,n){return void 0===r.length?t.vertexAttrib2f(e,r,n):t.vertexAttrib2fv(e,r)},function(t,e,r,n,i){return void 0===r.length?t.vertexAttrib3f(e,r,n,i):t.vertexAttrib3fv(e,r)},function(t,e,r,n,i,o){return void 0===r.length?t.vertexAttrib4f(e,r,n,i,o):t.vertexAttrib4fv(e,r)}];function s(t,e,r,n,o,s,l){var c=a[o],u=new i(t,e,r,n,o,c);Object.defineProperty(s,l,{set:function(e){return t.disableVertexAttribArray(n[r]),c(t,n[r],e),e},get:function(){return u},enumerable:!0})}function l(t,e,r,n,i,o,a){for(var l=new Array(i),c=new Array(i),u=0;u4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+b);t["uniformMatrix"+v+"fv"](s[h],!1,d);break}throw new i("","Unknown uniform data type for "+name+": "+b)}if((v=b.charCodeAt(b.length-1)-48)<2||v>4)throw new i("","Invalid data type");switch(b.charAt(0)){case"b":case"i":t["uniform"+v+"iv"](s[h],d);break;case"v":t["uniform"+v+"fv"](s[h],d);break;default:throw new i("","Unrecognized data type for vector "+name+": "+b)}}}}}}function c(t,e){if("object"!=typeof e)return[[t,e]];var r=[];for(var n in e){var i=e[n],o=t;parseInt(n)+""===n?o+="["+n+"]":o+="."+n,"object"==typeof i?r.push.apply(r,c(o,i)):r.push([o,i])}return r}function u(t,e,n){if("object"==typeof n){var c=h(n);Object.defineProperty(t,e,{get:o(c),set:l(n),enumerable:!0,configurable:!1})}else s[n]?Object.defineProperty(t,e,{get:(u=n,function(t,e,r){return t.getUniform(e.program,r[u])}),set:l(n),enumerable:!0,configurable:!1}):t[e]=function(t){switch(t){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var e=t.indexOf("vec");if(0<=e&&e<=1&&t.length===4+e){if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new i("","Invalid data type");return"b"===t.charAt(0)?a(r,!1):a(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r;if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+t);return a(r*r,0)}throw new i("","Unknown uniform data type for "+name+": "+t)}}(r[n].type);var u}function h(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r1){s[0]in o||(o[s[0]]=[]),o=o[s[0]];for(var l=1;l1)for(var l=0;l 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, tubeScale;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),o=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),a=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * view * tubePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);e.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},e.pickShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(t,e,r){"use strict";var n=r(2931),i=r(9970),o=["xyz","xzy","yxz","yzx","zxy","zyx"],a=function(t,e){var r,n=t.length;for(r=0;re)return r-1}return r},s=function(t,e,r){return tr?r:t},l=function(t){var e=1/0;t.sort((function(t,e){return t-e}));for(var r=t.length,n=1;nh-1||b>d-1||y>f-1)return n.create();var x,_,w,k,A,M,T=o[0][p],S=o[0][v],C=o[1][m],E=o[1][b],L=o[2][g],z=(l-T)/(S-T),O=(c-C)/(E-C),D=(u-L)/(o[2][y]-L);switch(isFinite(z)||(z=.5),isFinite(O)||(O=.5),isFinite(D)||(D=.5),r.reversedX&&(p=h-1-p,v=h-1-v),r.reversedY&&(m=d-1-m,b=d-1-b),r.reversedZ&&(g=f-1-g,y=f-1-y),r.filled){case 5:A=g,M=y,w=m*f,k=b*f,x=p*f*d,_=v*f*d;break;case 4:A=g,M=y,x=p*f,_=v*f,w=m*f*h,k=b*f*h;break;case 3:w=m,k=b,A=g*d,M=y*d,x=p*d*f,_=v*d*f;break;case 2:w=m,k=b,x=p*d,_=v*d,A=g*d*h,M=y*d*h;break;case 1:x=p,_=v,A=g*h,M=y*h,w=m*h*f,k=b*h*f;break;default:x=p,_=v,w=m*h,k=b*h,A=g*h*d,M=y*h*d}var I=i[x+w+A],R=i[x+w+M],F=i[x+k+A],P=i[x+k+M],N=i[_+w+A],j=i[_+w+M],B=i[_+k+A],U=i[_+k+M],G=n.create(),V=n.create(),H=n.create(),W=n.create();n.lerp(G,I,N,z),n.lerp(V,R,j,z),n.lerp(H,F,B,z),n.lerp(W,P,U,z);var q=n.create(),Y=n.create();n.lerp(q,G,H,O),n.lerp(Y,V,W,O);var Z=n.create();return n.lerp(Z,q,Y,D),Z}(e,t,f)},m=t.getDivergence||function(t,e){var r=n.create(),i=1e-4;n.add(r,t,[i,0,0]);var o=p(r);n.subtract(o,o,e),n.scale(o,o,1/i),n.add(r,t,[0,i,0]);var a=p(r);n.subtract(a,a,e),n.scale(a,a,1/i),n.add(r,t,[0,0,i]);var s=p(r);return n.subtract(s,s,e),n.scale(s,s,1/i),n.add(r,o,a),n.add(r,r,s),r},g=[],v=e[0][0],b=e[0][1],y=e[0][2],x=e[1][0],_=e[1][1],w=e[1][2],k=function(t){var e=t[0],r=t[1],n=t[2];return!(ex||r_||nw)},A=10*n.distance(e[0],e[1])/c,M=A*A,T=1,S=0,C=r.length;C>1&&(T=function(t){for(var e=[],r=[],n=[],i={},o={},a={},s=t.length,c=0;cS&&(S=P),R.push(P),g.push({points:z,velocities:O,divergences:R});for(var N=0;N<100*c&&z.lengthM&&n.scale(j,j,A/Math.sqrt(B)),n.add(j,j,L),D=p(j),n.squaredDistance(I,j)-M>-1e-4*M&&(z.push(j),I=j,O.push(D),F=m(j,D),P=n.length(F),isFinite(P)&&P>S&&(S=P),R.push(P)),L=j}}var U=function(t,e,r,o){for(var a=0,s=0;s0)for(k=0;k<8;k++){var A=(k+1)%8;c.push(d[k],f[k],f[A],f[A],d[A],d[k]),h.push(b,v,v,v,b,b),p.push(m,g,g,g,m,m);var M=c.length;u.push([M-6,M-5,M-4],[M-3,M-2,M-1])}var T=d;d=f,f=T;var S=b;b=v,v=S;var C=m;m=g,g=C}return{positions:c,cells:u,vectors:h,vertexIntensity:p}}(t,r,o,a)})),h=[],d=[],f=[],p=[];for(s=0;s max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (\n kill > 0.0 ||\n vColor.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n ) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color — in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);e.createShader=function(t){var e=n(t,o,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},e.createPickShader=function(t){var e=n(t,o,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},e.createContourShader=function(t){var e=n(t,s,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},e.createPickContourShader=function(t){var e=n(t,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},9499:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl,r=b(e),n=x(e),s=y(e),l=_(e),c=i(e),u=o(e,[{buffer:c,size:4,stride:w,offset:0},{buffer:c,size:3,stride:w,offset:16},{buffer:c,size:3,stride:w,offset:28}]),h=i(e),d=o(e,[{buffer:h,size:4,stride:20,offset:0},{buffer:h,size:1,stride:20,offset:16}]),f=i(e),p=o(e,[{buffer:f,size:2,type:e.FLOAT}]),m=a(e,1,S,e.RGBA,e.UNSIGNED_BYTE);m.minFilter=e.LINEAR,m.magFilter=e.LINEAR;var g=new C(e,[0,0],[[0,0,0],[0,0,0]],r,n,c,u,m,s,l,h,d,f,p,[0,0,0]),v={levels:[[],[],[]]};for(var k in t)v[k]=t[k];return v.colormap=v.colormap||"jet",g.update(v),g};var n=r(8828),i=r(2762),o=r(8116),a=r(7766),s=r(1888),l=r(6729),c=r(5298),u=r(9994),h=r(9618),d=r(3711),f=r(6760),p=r(7608),m=r(2478),g=r(6199),v=r(990),b=v.createShader,y=v.createContourShader,x=v.createPickShader,_=v.createPickContourShader,w=40,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],A=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],M=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function T(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}!function(){for(var t=0;t<3;++t){var e=M[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();var S=256;function C(t,e,r,n,i,o,a,l,c,u,d,f,p,m,g){this.gl=t,this.shape=e,this.bounds=r,this.objectOffset=g,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=o,this._vao=a,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=d,this._contourVAO=f,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new T([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=p,this._dynamicVAO=m,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[h(s.mallocFloat(1024),[0,0]),h(s.mallocFloat(1024),[0,0]),h(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var E=C.prototype;E.genColormap=function(t,e){var r=!1,n=u([l({colormap:t,nshades:S,format:"rgba"}).map((function(t,n){var i=e?function(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}(n/255,e):t[3];return i<1&&(r=!0),[t[0],t[1],t[2],255*i]}))]);return c.divseq(n,255),this.hasAlphaScale=r,n},E.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},E.isOpaque=function(){return!this.isTransparent()},E.pickSlots=1,E.setPickBase=function(t){this.pickId=t};var L=[0,0,0],z={showSurface:!1,showContour:!1,projections:[k.slice(),k.slice(),k.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function O(t,e){var r,n,i,o=e.axes&&e.axes.lastCubeProps.axis||L,a=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(a=a||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=z.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(o[r]>0)][r],f(l,t.model,l);var c=z.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)c[i][n]=t.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return z.showSurface=a,z.showContour=s,z}var D={model:k,view:k,projection:k,inverseModel:k.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},I=k.slice(),R=[1,0,0,0,1,0,0,0,1];function F(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=D;n.model=t.model||k,n.view=t.view||k,n.projection=t.projection||k,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.objectOffset=this.objectOffset,n.contourColor=this.contourColor[0],n.inverseModel=p(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var o=n.clipBounds[i],a=0;a<3;++a)o[a]=Math.min(Math.max(this.clipBounds[i][a],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=R,n.vertexColor=this.vertexColor;var s=I;for(f(s,n.view,n.model),f(s,n.projection,s),p(s,s),i=0;i<3;++i)n.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i<3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i<3;++i){var c=s[12+i];for(a=0;a<3;++a)c+=s[4*a+i]*this.lightPosition[a];n.lightPosition[i]=c/l}var u=O(n,this);if(u.showSurface){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=u.projections[i],this._shader.uniforms.clipBounds=u.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour){var h=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,h.bind(),h.uniforms=n;var d=this._contourVAO;for(d.bind(),i=0;i<3;++i)for(h.uniforms.permutation=M[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),a=0;a>4)/16)/255,i=Math.floor(n),o=n-i,a=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(a),l=a-s;i+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var h=u?o:1-o,d=0;d<2;++d)for(var f=i+u,p=s+d,g=h*(d?l:1-l),v=0;v<3;++v)c[v]+=this._field[v].get(f,p)*g;for(var b=this._pickResult.level,y=0;y<3;++y)if(b[y]=m.le(this.contourLevels[y],c[y]),b[y]<0)this.contourLevels[y].length>0&&(b[y]=0);else if(b[y]Math.abs(_-c[y])&&(b[y]+=1)}for(r.index[0]=o<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=a/e[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},E.padField=function(t,e){var r=e.shape.slice(),n=t.shape.slice();c.assign(t.lo(1,1).hi(r[0],r[1]),e),c.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),c.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),c.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),c.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))},E.update=function(t){t=t||{},this.objectOffset=t.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in t&&(this.contourWidth=N(t.contourWidth,Number)),"showContour"in t&&(this.showContour=N(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=N(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=B(t.contourColor)),"contourProject"in t&&(this.contourProject=N(t.contourProject,(function(t){return N(t,Boolean)}))),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=B(t.dynamicColor)),"dynamicTint"in t&&(this.dynamicTint=N(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=N(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"opacityscale"in t&&(this.opacityscale=t.opacityscale),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0),"colormap"in t&&this._colorMap.setPixels(this.genColormap(t.colormap,this.opacityscale));var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var i=(e.shape[0]+2)*(e.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=h(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),this.padField(this._field[2],e),this.shape=e.shape.slice();for(var o=this.shape,a=0;a<2;++a)this._field[2].size>this._field[a].data.length&&(s.freeFloat(this._field[a].data),this._field[a].data=s.mallocFloat(this._field[2].size)),this._field[a]=h(this._field[a].data,[o[0]+2,o[1]+2]);if(t.coords){var l=t.coords;if(!Array.isArray(l)||3!==l.length)throw new Error("gl-surface: invalid coordinates for x/y");for(a=0;a<2;++a){var c=l[a];for(v=0;v<2;++v)if(c.shape[v]!==o[v])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[a],c)}}else if(t.ticks){var u=t.ticks;if(!Array.isArray(u)||2!==u.length)throw new Error("gl-surface: invalid ticks");for(a=0;a<2;++a){var f=u[a];if((Array.isArray(f)||f.length)&&(f=h(f)),f.shape[0]!==o[a])throw new Error("gl-surface: invalid tick length");var p=h(f.data,o);p.stride[a]=f.stride[0],p.stride[1^a]=0,this.padField(this._field[a],p)}}else{for(a=0;a<2;++a){var m=[0,0];m[a]=1,this._field[a]=h(this._field[a].data,[o[0]+2,o[1]+2],m,0)}this._field[0].set(0,0,0);for(var v=0;v0){for(var yt=0;yt<5;++yt)K.pop();U-=1}continue t}K.push(nt[0],nt[1],at[0],at[1],nt[2]),U+=1}}rt.push(U)}this._contourOffsets[Q]=et,this._contourCounts[Q]=rt}var xt=s.mallocFloat(K.length);for(a=0;as||a[1]<0||a[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=p(a,e.stride.slice()),c=0;"float32"===r?c=t.FLOAT:"float64"===r?(c=t.FLOAT,l=!1,r="float32"):"uint8"===r?c=t.UNSIGNED_BYTE:(c=t.UNSIGNED_BYTE,l=!1,r="uint8");var h,f,g=0;if(2===a.length)g=t.LUMINANCE,a=[a[0],a[1],1],e=n(e.data,a,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==a.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===a[2])g=t.ALPHA;else if(2===a[2])g=t.LUMINANCE_ALPHA;else if(3===a[2])g=t.RGB;else{if(4!==a[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=t.RGBA}}c!==t.FLOAT||t.getExtension("OES_texture_float")||(c=t.UNSIGNED_BYTE,l=!1);var v=e.size;if(l)h=0===e.offset&&e.data.length===v?e.data:e.data.subarray(e.offset,e.offset+v);else{var b=[a[2],a[2]*a[0],1];f=o.malloc(v,r);var y=n(f,a,b,0);"float32"!==r&&"float64"!==r||c!==t.UNSIGNED_BYTE?i.assign(y,e):u(y,e),h=f.subarray(0,v)}var x=m(t);return t.texImage2D(t.TEXTURE_2D,0,g,a[0],a[1],0,g,c,h),l||o.free(f),new d(t,x,a[0],a[1],g,c)}(t,e)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var a=null,s=null,l=null;function c(t){return"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&t instanceof ImageData}var u=function(t,e){i.muls(t,e,255)};function h(t,e,r){var n=t.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(e<0||e>i||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function d(t,e,r,n,i,o){this.gl=t,this.handle=e,this.format=i,this.type=o,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var a=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return a._wrapS},set:function(t){return a.wrapS=t}},{get:function(){return a._wrapT},set:function(t){return a.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return a._shape[0]},set:function(t){return a.width=t}},{get:function(){return a._shape[1]},set:function(t){return a.height=t}}]),this._shapeVector=l}var f=d.prototype;function p(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function m(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function g(t,e,r,n,i){var o=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>o||r<0||r>o)throw new Error("gl-texture2d: Invalid texture shape");if(i===t.FLOAT&&!t.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var a=m(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new d(t,a,e,r,n,i)}Object.defineProperties(f,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&a.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&a.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(l.indexOf(t[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return h(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return h(this,t|=0,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,h(this,this._shape[0],t),t}}}),f.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},f.dispose=function(){this.gl.deleteTexture(this.handle)},f.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},f.setPixels=function(t,e,r,a){var s=this.gl;this.bind(),Array.isArray(e)?(a=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),a=a||0;var l=c(t)?t:t.raw;if(l)this._mipLevels.indexOf(a)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(a)):s.texSubImage2D(s.TEXTURE_2D,a,e,r,this.format,this.type,l);else{if(!(t.shape&&t.stride&&t.data))throw new Error("gl-texture2d: Unsupported data type");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>a||r+t.shape[0]>this._shape[0]>>>a||e<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(t,e,r,a,s,l,c,h){var d=h.dtype,f=h.shape.slice();if(f.length<2||f.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var m=0,g=0,v=p(f,h.stride.slice());if("float32"===d?m=t.FLOAT:"float64"===d?(m=t.FLOAT,v=!1,d="float32"):"uint8"===d?m=t.UNSIGNED_BYTE:(m=t.UNSIGNED_BYTE,v=!1,d="uint8"),2===f.length)g=t.LUMINANCE,f=[f[0],f[1],1],h=n(h.data,f,[h.stride[0],h.stride[1],1],h.offset);else{if(3!==f.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===f[2])g=t.ALPHA;else if(2===f[2])g=t.LUMINANCE_ALPHA;else if(3===f[2])g=t.RGB;else{if(4!==f[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=t.RGBA}f[2]}if(g!==t.LUMINANCE&&g!==t.ALPHA||s!==t.LUMINANCE&&s!==t.ALPHA||(g=s),g!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var b=h.size,y=c.indexOf(a)<0;if(y&&c.push(a),m===l&&v)0===h.offset&&h.data.length===b?y?t.texImage2D(t.TEXTURE_2D,a,s,f[0],f[1],0,s,l,h.data):t.texSubImage2D(t.TEXTURE_2D,a,e,r,f[0],f[1],s,l,h.data):y?t.texImage2D(t.TEXTURE_2D,a,s,f[0],f[1],0,s,l,h.data.subarray(h.offset,h.offset+b)):t.texSubImage2D(t.TEXTURE_2D,a,e,r,f[0],f[1],s,l,h.data.subarray(h.offset,h.offset+b));else{var x;x=l===t.FLOAT?o.mallocFloat32(b):o.mallocUint8(b);var _=n(x,f,[f[2],f[2]*f[0],1]);m===t.FLOAT&&l===t.UNSIGNED_BYTE?u(_,h):i.assign(_,h),y?t.texImage2D(t.TEXTURE_2D,a,s,f[0],f[1],0,s,l,x.subarray(0,b)):t.texSubImage2D(t.TEXTURE_2D,a,e,r,f[0],f[1],s,l,x.subarray(0,b)),l===t.FLOAT?o.freeFloat32(x):o.freeUint8(x)}}(s,e,r,a,this.format,this.type,this._mipLevels,t)}}},1433:function(t){"use strict";t.exports=function(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(s)};var n=r(2825),i=r(3536),o=r(244)},9226:function(t){t.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},3126:function(t){t.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},3990:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},1091:function(t){t.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},5911:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[0],s=r[1],l=r[2];return t[0]=i*l-o*s,t[1]=o*a-n*l,t[2]=n*s-i*a,t}},5455:function(t,e,r){t.exports=r(7056)},7056:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}},4008:function(t,e,r){t.exports=r(6690)},6690:function(t){t.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}},244:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},2613:function(t){t.exports=1e-6},9922:function(t,e,r){t.exports=function(t,e){var r=t[0],i=t[1],o=t[2],a=e[0],s=e[1],l=e[2];return Math.abs(r-a)<=n*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=n*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-l)<=n*Math.max(1,Math.abs(o),Math.abs(l))};var n=r(2613)},9265:function(t){t.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},2681:function(t){t.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},5137:function(t,e,r){t.exports=function(t,e,r,i,o,a){var s,l;for(e||(e=3),r||(r=0),l=i?Math.min(i*e+r,t.length):t.length,s=r;s0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}},7636:function(t){t.exports=function(t,e){e=e||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*e,t}},6894:function(t){t.exports=function(t,e,r,n){var i=r[1],o=r[2],a=e[1]-i,s=e[2]-o,l=Math.sin(n),c=Math.cos(n);return t[0]=e[0],t[1]=i+a*c-s*l,t[2]=o+a*l+s*c,t}},109:function(t){t.exports=function(t,e,r,n){var i=r[0],o=r[2],a=e[0]-i,s=e[2]-o,l=Math.sin(n),c=Math.cos(n);return t[0]=i+s*l+a*c,t[1]=e[1],t[2]=o+s*c-a*l,t}},8692:function(t){t.exports=function(t,e,r,n){var i=r[0],o=r[1],a=e[0]-i,s=e[1]-o,l=Math.sin(n),c=Math.cos(n);return t[0]=i+a*c-s*l,t[1]=o+a*l+s*c,t[2]=e[2],t}},2447:function(t){t.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},6621:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}},8489:function(t){t.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}},1463:function(t){t.exports=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}},6141:function(t,e,r){t.exports=r(2953)},5486:function(t,e,r){t.exports=r(3066)},2953:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return r*r+n*n+i*i}},3066:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}},2229:function(t,e,r){t.exports=r(6843)},6843:function(t){t.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}},492:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2];return t[0]=n*r[0]+i*r[3]+o*r[6],t[1]=n*r[1]+i*r[4]+o*r[7],t[2]=n*r[2]+i*r[5]+o*r[8],t}},5673:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[3]*n+r[7]*i+r[11]*o+r[15];return a=a||1,t[0]=(r[0]*n+r[4]*i+r[8]*o+r[12])/a,t[1]=(r[1]*n+r[5]*i+r[9]*o+r[13])/a,t[2]=(r[2]*n+r[6]*i+r[10]*o+r[14])/a,t}},264:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*o-l*i,h=c*i+l*n-a*o,d=c*o+a*i-s*n,f=-a*n-s*i-l*o;return t[0]=u*c+f*-a+h*-l-d*-s,t[1]=h*c+f*-s+d*-a-u*-l,t[2]=d*c+f*-l+u*-s-h*-a,t}},4361:function(t){t.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}},2335:function(t){t.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},2933:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},7536:function(t){t.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},4691:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+o*o)}},1373:function(t){t.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}},3750:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},3390:function(t){t.exports=function(t,e,r,n){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=n,i}},9970:function(t,e,r){t.exports={create:r(7536),clone:r(2335),fromValues:r(3390),copy:r(2933),set:r(4578),add:r(4361),subtract:r(6860),multiply:r(3576),divide:r(1373),min:r(2334),max:r(160),scale:r(9288),scaleAndAdd:r(4844),distance:r(4691),squaredDistance:r(7960),length:r(6808),squaredLength:r(483),negate:r(1498),inverse:r(4494),normalize:r(5177),dot:r(3750),lerp:r(2573),random:r(9131),transformMat4:r(5352),transformQuat:r(4041)}},4494:function(t){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},6808:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)}},2573:function(t){t.exports=function(t,e,r,n){var i=e[0],o=e[1],a=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=o+n*(r[1]-o),t[2]=a+n*(r[2]-a),t[3]=s+n*(r[3]-s),t}},160:function(t){t.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}},2334:function(t){t.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}},3576:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}},1498:function(t){t.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},5177:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=r*r+n*n+i*i+o*o;return a>0&&(a=1/Math.sqrt(a),t[0]=r*a,t[1]=n*a,t[2]=i*a,t[3]=o*a),t}},9131:function(t,e,r){var n=r(5177),i=r(9288);t.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),n(t,t),i(t,t,e),t}},9288:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}},4844:function(t){t.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}},4578:function(t){t.exports=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}},7960:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return r*r+n*n+i*i+o*o}},483:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}},6860:function(t){t.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}},5352:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*a,t[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*a,t[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*a,t[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*a,t}},4041:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*o-l*i,h=c*i+l*n-a*o,d=c*o+a*i-s*n,f=-a*n-s*i-l*o;return t[0]=u*c+f*-a+h*-l-d*-s,t[1]=h*c+f*-s+d*-a-u*-l,t[2]=d*c+f*-l+u*-s-h*-a,t[3]=e[3],t}},1848:function(t,e,r){var n=r(4905),i=r(6468);t.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r0)continue;r=t.slice(0,1).join("")}return j(r),z+=r.length,(S=S.slice(r.length)).length}}function q(){return/[^a-fA-F0-9]/.test(e)?(j(S.join("")),T=l,A):(S.push(e),r=e,A+1)}function Y(){return"."===e||/[eE]/.test(e)?(S.push(e),T=m,r=e,A+1):"x"===e&&1===S.length&&"0"===S[0]?(T=_,S.push(e),r=e,A+1):/[^\d]/.test(e)?(j(S.join("")),T=l,A):(S.push(e),r=e,A+1)}function Z(){return"f"===e&&(S.push(e),r=e,A+=1),/[eE]/.test(e)?(S.push(e),r=e,A+1):("-"!==e&&"+"!==e||!/[eE]/.test(r))&&/[^\d]/.test(e)?(j(S.join("")),T=l,A):(S.push(e),r=e,A+1)}function X(){if(/[^\d\w_]/.test(e)){var t=S.join("");return T=N[t]?b:P[t]?v:g,j(S.join("")),T=l,A}return S.push(e),r=e,A+1}};var n=r(620),i=r(7827),o=r(6852),a=r(7932),s=r(3508),l=999,c=9999,u=0,h=1,d=2,f=3,p=4,m=5,g=6,v=7,b=8,y=9,x=10,_=11,w=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3508:function(t,e,r){var n=r(6852);n=n.slice().filter((function(t){return!/^(gl\_|texture)/.test(t)})),t.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(t){t.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(t,e,r){var n=r(620);t.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(t){t.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(t){t.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(t,e,r){var n=r(5874);t.exports=function(t,e){var r=n(e),i=[];return(i=i.concat(r(t))).concat(r(null))}},3236:function(t){t.exports=function(t){"string"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n>1,u=-7,h=r?i-1:0,d=r?-1:1,f=t[e+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+t[e+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+t[e+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=c}return(f?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(e*l-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[r+f]=255&s,f+=p,s/=256,i-=8);for(a=a<0;t[r+f]=255&a,f+=p,a/=256,c-=8);t[r+f-p]|=128*m}},8954:function(t,e,r){"use strict";t.exports=function(t,e){var r=t.length;if(0===r)throw new Error("Must have at least d+1 points");var i=t[0].length;if(r<=i)throw new Error("Must input at least d+1 points");var a=t.slice(0,i+1),s=n.apply(void 0,a);if(0===s)throw new Error("Input not in general position");for(var l=new Array(i+1),u=0;u<=i;++u)l[u]=u;s<0&&(l[0]=1,l[1]=0);var h=new o(l,new Array(i+1),!1),d=h.adjacent,f=new Array(i+2);for(u=0;u<=i;++u){for(var p=l.slice(),m=0;m<=i;++m)m===u&&(p[m]=-1);var g=p[0];p[0]=p[1],p[1]=g;var v=new o(p,new Array(i+1),!0);d[u]=v,f[u]=v}for(f[i+1]=h,u=0;u<=i;++u){p=d[u].vertices;var b=d[u].adjacent;for(m=0;m<=i;++m){var y=p[m];if(y<0)b[m]=h;else for(var x=0;x<=i;++x)d[x].vertices.indexOf(y)<0&&(b[m]=d[x])}}var _=new c(i,a,f),w=!!e;for(u=i+1;u0;)for(var s=(t=a.pop()).adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var u=c.vertices,h=0;h<=r;++h){var d=u[h];i[h]=d<0?e:o[d]}var f=this.orient();if(f>0)return c;c.lastVisited=-n,0===f&&a.push(c)}}return null},u.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,o=this.tuple,a=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[a];t:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=n;++u)o[u]=i[l[u]];for(s.lastVisited=r,u=0;u<=n;++u){var h=c[u];if(!(h.lastVisited>=r)){var d=o[u];o[u]=t;var f=this.orient();if(o[u]=d,f<0){s=h;continue t}h.boundary?h.lastVisited=-r:h.lastVisited=r}}return}return s},u.addPeaks=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,h=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,c.push(e);for(var d=[];h.length>0;){var f=(e=h.pop()).vertices,p=e.adjacent,m=f.indexOf(r);if(!(m<0))for(var g=0;g<=n;++g)if(g!==m){var v=p[g];if(v.boundary&&!(v.lastVisited>=r)){var b=v.vertices;if(v.lastVisited!==-r){for(var y=0,x=0;x<=n;++x)b[x]<0?(y=x,l[x]=t):l[x]=i[b[x]];if(this.orient()>0){b[y]=r,v.boundary=!1,c.push(v),h.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var _=v.adjacent,w=f.slice(),k=p.slice(),A=new o(w,k,!0);u.push(A);var M=_.indexOf(e);if(!(M<0))for(_[M]=A,k[m]=v,w[g]=-1,k[g]=e,p[g]=A,A.flip(),x=0;x<=n;++x){var T=w[x];if(!(T<0||T===r)){for(var S=new Array(n-1),C=0,E=0;E<=n;++E){var L=w[E];L<0||E===x||(S[C++]=L)}d.push(new a(S,A,x))}}}}}for(d.sort(s),g=0;g+1=0?a[l++]=s[u]:c=1&u;if(c===(1&t)){var h=a[0];a[0]=a[1],a[1]=h}e.push(a)}}return e}},3352:function(t,e,r){"use strict";var n=r(2478);function i(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}t.exports=function(t){return t&&0!==t.length?new v(g(t)):new v(null)};var o=i.prototype;function a(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function s(t,e){var r=g(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function l(t,e){var r=t.intervals([]);r.push(e),s(t,r)}function c(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?0:(r.splice(n,1),s(t,r),1)}function u(t,e,r){for(var n=0;n=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function d(t,e){for(var r=0;r>1],o=[],a=[],s=[];for(r=0;r3*(e+1)?l(this,t):this.left.insert(t):this.left=g([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?l(this,t):this.right.insert(t):this.right=g([t]);else{var r=n.ge(this.leftPoints,t,p),i=n.ge(this.rightPoints,t,m);this.leftPoints.splice(r,0,t),this.rightPoints.splice(i,0,t)}},o.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1)?c(this,t):2===(s=this.left.remove(t))?(this.left=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?c(this,t):2===(s=this.right.remove(t))?(this.right=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(1===this.count)return this.leftPoints[0]===t?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var r=this,i=this.left;i.right;)r=i,i=i.right;if(r===this)i.right=this.right;else{var o=this.left,s=this.right;r.count-=i.count,r.right=i.left,i.left=o,i.right=s}a(this,i),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?a(this,this.left):a(this,this.right);return 1}for(o=n.ge(this.leftPoints,t,p);othis.mid?this.right&&(r=this.right.queryPoint(t,e))?r:h(this.rightPoints,t,e):d(this.leftPoints,e);var r},o.queryInterval=function(t,e,r){var n;return tthis.mid&&this.right&&(n=this.right.queryInterval(t,e,r))?n:ethis.mid?h(this.rightPoints,t,r):d(this.leftPoints,r)};var b=v.prototype;b.insert=function(t){this.root?this.root.insert(t):this.root=new i(t[0],null,null,[t],[t])},b.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),0!==e}return!1},b.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},b.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(b,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},7762:function(t){"use strict";t.exports=function(t){for(var e=new Array(t),r=0;r13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},395:function(t){t.exports=function(t,e,r){return t*(1-r)+e*r}},2652:function(t,e,r){var n=r(4335),i=r(6864),o=r(1903),a=r(9921),s=r(7608),l=r(5665),c={length:r(1387),normalize:r(3536),dot:r(244),cross:r(5911)},u=i(),h=i(),d=[0,0,0,0],f=[[0,0,0],[0,0,0],[0,0,0]],p=[0,0,0];function m(t,e,r,n,i){t[0]=e[0]*n+r[0]*i,t[1]=e[1]*n+r[1]*i,t[2]=e[2]*n+r[2]*i}t.exports=function(t,e,r,i,g,v){if(e||(e=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),g||(g=[0,0,0,1]),v||(v=[0,0,0,1]),!n(u,t))return!1;if(o(h,u),h[3]=0,h[7]=0,h[11]=0,h[15]=1,Math.abs(a(h)<1e-8))return!1;var b,y,x,_,w,k,A,M=u[3],T=u[7],S=u[11],C=u[12],E=u[13],L=u[14],z=u[15];if(0!==M||0!==T||0!==S){if(d[0]=M,d[1]=T,d[2]=S,d[3]=z,!s(h,h))return!1;l(h,h),b=g,x=h,_=(y=d)[0],w=y[1],k=y[2],A=y[3],b[0]=x[0]*_+x[4]*w+x[8]*k+x[12]*A,b[1]=x[1]*_+x[5]*w+x[9]*k+x[13]*A,b[2]=x[2]*_+x[6]*w+x[10]*k+x[14]*A,b[3]=x[3]*_+x[7]*w+x[11]*k+x[15]*A}else g[0]=g[1]=g[2]=0,g[3]=1;if(e[0]=C,e[1]=E,e[2]=L,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(f,u),r[0]=c.length(f[0]),c.normalize(f[0],f[0]),i[0]=c.dot(f[0],f[1]),m(f[1],f[1],f[0],1,-i[0]),r[1]=c.length(f[1]),c.normalize(f[1],f[1]),i[0]/=r[1],i[1]=c.dot(f[0],f[2]),m(f[2],f[2],f[0],1,-i[1]),i[2]=c.dot(f[1],f[2]),m(f[2],f[2],f[1],1,-i[2]),r[2]=c.length(f[2]),c.normalize(f[2],f[2]),i[1]/=r[2],i[2]/=r[2],c.cross(p,f[1],f[2]),c.dot(f[0],p)<0)for(var O=0;O<3;O++)r[O]*=-1,f[O][0]*=-1,f[O][1]*=-1,f[O][2]*=-1;return v[0]=.5*Math.sqrt(Math.max(1+f[0][0]-f[1][1]-f[2][2],0)),v[1]=.5*Math.sqrt(Math.max(1-f[0][0]+f[1][1]-f[2][2],0)),v[2]=.5*Math.sqrt(Math.max(1-f[0][0]-f[1][1]+f[2][2],0)),v[3]=.5*Math.sqrt(Math.max(1+f[0][0]+f[1][1]+f[2][2],0)),f[2][1]>f[1][2]&&(v[0]=-v[0]),f[0][2]>f[2][0]&&(v[1]=-v[1]),f[1][0]>f[0][1]&&(v[2]=-v[2]),!0}},4335:function(t){t.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},7442:function(t,e,r){var n=r(6658),i=r(7182),o=r(2652),a=r(9921),s=r(8648),l=h(),c=h(),u=h();function h(){return{translate:d(),scale:d(1),skew:d(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function d(t){return[t||0,t||0,t||0]}t.exports=function(t,e,r,h){if(0===a(e)||0===a(r))return!1;var d=o(e,l.translate,l.scale,l.skew,l.perspective,l.quaternion),f=o(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!d||!f||(n(u.translate,l.translate,c.translate,h),n(u.skew,l.skew,c.skew,h),n(u.scale,l.scale,c.scale,h),n(u.perspective,l.perspective,c.perspective,h),s(u.quaternion,l.quaternion,c.quaternion,h),i(t,u.translate,u.scale,u.skew,u.perspective,u.quaternion),0))}},7182:function(t,e,r){var n={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)},i=(n.create(),n.create());t.exports=function(t,e,r,o,a,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=a[0],t[7]=a[1],t[11]=a[2],t[15]=a[3],n.identity(i),0!==o[2]&&(i[9]=o[2],n.multiply(t,t,i)),0!==o[1]&&(i[9]=0,i[8]=o[1],n.multiply(t,t,i)),0!==o[0]&&(i[8]=0,i[4]=o[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},4192:function(t,e,r){"use strict";var n=r(2478),i=r(7442),o=r(7608),a=r(5567),s=r(2408),l=r(7089),c=r(6582),u=r(7656),h=(r(2504),r(3536)),d=[0,0,0];function f(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}t.exports=function(t){return new f((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var p=f.prototype;p.recalcMatrix=function(t){var e=this._time,r=n.le(e,t),a=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===e.length-1)for(var l=16*r,c=0;c<16;++c)a[c]=s[l++];else{var u=e[r+1]-e[r],d=(l=16*r,this.prevMatrix),f=!0;for(c=0;c<16;++c)d[c]=s[l++];var p=this.nextMatrix;for(c=0;c<16;++c)p[c]=s[l++],f=f&&d[c]===p[c];if(u<1e-6||f)for(c=0;c<16;++c)a[c]=d[c];else i(a,d,p,(t-e[r])/u)}var m=this.computedUp;m[0]=a[1],m[1]=a[5],m[2]=a[9],h(m,m);var g=this.computedInverse;o(g,a);var v=this.computedEye,b=g[15];v[0]=g[12]/b,v[1]=g[13]/b,v[2]=g[14]/b;var y=this.computedCenter,x=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)y[c]=v[c]-a[2+4*c]*x}},p.idle=function(t){if(!(t1&&n(t[a[u-2]],t[a[u-1]],c)<=0;)u-=1,a.pop();for(a.push(l),u=s.length;u>1&&n(t[s[u-2]],t[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}r=new Array(s.length+a.length-2);for(var h=0,d=(i=0,a.length);i0;--f)r[h++]=s[f];return r};var n=r(3250)[3]},351:function(t,e,r){"use strict";t.exports=function(t,e){e||(e=t,t=window);var r=0,i=0,o=0,a={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==a.alt,a.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==a.shift,a.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==a.control,a.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==a.meta,a.meta=!!t.metaKey),e}function c(t,s){var c=n.x(s),u=n.y(s);"buttons"in s&&(t=0|s.buttons),(t!==r||c!==i||u!==o||l(s))&&(r=0|t,i=c||0,o=u||0,e&&e(r,i,o,a))}function u(t){c(0,t)}function h(){(r||i||o||a.shift||a.alt||a.meta||a.control)&&(i=o=0,r=0,a.shift=a.alt=a.control=a.meta=!1,e&&e(0,0,0,a))}function d(t){l(t)&&e&&e(r,i,o,a)}function f(t){0===n.buttons(t)?c(0,t):c(r,t)}function p(t){c(r|n.buttons(t),t)}function m(t){c(r&~n.buttons(t),t)}function g(){s||(s=!0,t.addEventListener("mousemove",f),t.addEventListener("mousedown",p),t.addEventListener("mouseup",m),t.addEventListener("mouseleave",u),t.addEventListener("mouseenter",u),t.addEventListener("mouseout",u),t.addEventListener("mouseover",u),t.addEventListener("blur",h),t.addEventListener("keyup",d),t.addEventListener("keydown",d),t.addEventListener("keypress",d),t!==window&&(window.addEventListener("blur",h),window.addEventListener("keyup",d),window.addEventListener("keydown",d),window.addEventListener("keypress",d)))}g();var v={element:t};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(e){e?g():s&&(s=!1,t.removeEventListener("mousemove",f),t.removeEventListener("mousedown",p),t.removeEventListener("mouseup",m),t.removeEventListener("mouseleave",u),t.removeEventListener("mouseenter",u),t.removeEventListener("mouseout",u),t.removeEventListener("mouseover",u),t.removeEventListener("blur",h),t.removeEventListener("keyup",d),t.removeEventListener("keydown",d),t.removeEventListener("keypress",d),t!==window&&(window.removeEventListener("blur",h),window.removeEventListener("keyup",d),window.removeEventListener("keydown",d),window.removeEventListener("keypress",d)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return o},enumerable:!0},mods:{get:function(){return a},enumerable:!0}}),v};var n=r(4687)},24:function(t){var e={left:0,top:0};t.exports=function(t,r,n){r=r||t.currentTarget||t.srcElement,Array.isArray(n)||(n=[0,0]);var i,o=t.clientX||0,a=t.clientY||0,s=(i=r)===window||i===document||i===document.body?e:i.getBoundingClientRect();return n[0]=o-s.left,n[1]=a-s.top,n}},4687:function(t,e){"use strict";function r(t){return t.target||t.srcElement||window}e.buttons=function(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1< 0"),"function"!=typeof t.vertex&&e("Must specify vertex creation function"),"function"!=typeof t.cell&&e("Must specify cell creation function"),"function"!=typeof t.phase&&e("Must specify phase function");for(var a=t.getters||[],s=new Array(o),l=0;l=0?s[l]=!0:s[l]=!1;return function(t,e,r,o,a,s){var l=[s,a].join(",");return(0,i[l])(t,e,r,n.mallocUint32,n.freeUint32)}(t.vertex,t.cell,t.phase,0,r,s)};var i={"false,0,1":function(t,e,r,n,i){return function(o,a,s,l){var c,u=0|o.shape[0],h=0|o.shape[1],d=o.data,f=0|o.offset,p=0|o.stride[0],m=0|o.stride[1],g=f,v=0|-p,b=0,y=0|-m,x=0,_=-p-m|0,w=0,k=0|p,A=m-p*u|0,M=0,T=0,S=0,C=2*u|0,E=n(C),L=n(C),z=0,O=0,D=-1,I=-1,R=0,F=0|-u,P=0|u,N=0,j=-u-1|0,B=u-1|0,U=0,G=0,V=0;for(M=0;M0){if(T=1,E[z++]=r(d[g],a,s,l),g+=k,u>0)for(M=1,c=d[g],O=E[z]=r(c,a,s,l),R=E[z+D],N=E[z+F],U=E[z+j],O===R&&O===N&&O===U||(b=d[g+v],x=d[g+y],w=d[g+_],t(M,T,c,b,x,w,O,R,N,U,a,s,l),G=L[z]=S++),z+=1,g+=k,M=2;M0)for(M=1,c=d[g],O=E[z]=r(c,a,s,l),R=E[z+D],N=E[z+F],U=E[z+j],O===R&&O===N&&O===U||(b=d[g+v],x=d[g+y],w=d[g+_],t(M,T,c,b,x,w,O,R,N,U,a,s,l),G=L[z]=S++,U!==N&&e(L[z+F],G,x,w,N,U,a,s,l)),z+=1,g+=k,M=2;M0){if(M=1,E[z++]=r(d[g],a,s,l),g+=k,h>0)for(T=1,c=d[g],O=E[z]=r(c,a,s,l),N=E[z+F],R=E[z+D],U=E[z+j],O===N&&O===R&&O===U||(b=d[g+v],x=d[g+y],w=d[g+_],t(M,T,c,b,x,w,O,N,R,U,a,s,l),G=L[z]=S++),z+=1,g+=k,T=2;T0)for(T=1,c=d[g],O=E[z]=r(c,a,s,l),N=E[z+F],R=E[z+D],U=E[z+j],O===N&&O===R&&O===U||(b=d[g+v],x=d[g+y],w=d[g+_],t(M,T,c,b,x,w,O,N,R,U,a,s,l),G=L[z]=S++,U!==N&&e(L[z+F],G,w,b,U,N,a,s,l)),z+=1,g+=k,T=2;T2&&o[1]>2&&n(i.pick(-1,-1).lo(1,1).hi(o[0]-2,o[1]-2),t.pick(-1,-1,0).lo(1,1).hi(o[0]-2,o[1]-2),t.pick(-1,-1,1).lo(1,1).hi(o[0]-2,o[1]-2)),o[1]>2&&(r(i.pick(0,-1).lo(1).hi(o[1]-2),t.pick(0,-1,1).lo(1).hi(o[1]-2)),e(t.pick(0,-1,0).lo(1).hi(o[1]-2))),o[1]>2&&(r(i.pick(o[0]-1,-1).lo(1).hi(o[1]-2),t.pick(o[0]-1,-1,1).lo(1).hi(o[1]-2)),e(t.pick(o[0]-1,-1,0).lo(1).hi(o[1]-2))),o[0]>2&&(r(i.pick(-1,0).lo(1).hi(o[0]-2),t.pick(-1,0,0).lo(1).hi(o[0]-2)),e(t.pick(-1,0,1).lo(1).hi(o[0]-2))),o[0]>2&&(r(i.pick(-1,o[1]-1).lo(1).hi(o[0]-2),t.pick(-1,o[1]-1,0).lo(1).hi(o[0]-2)),e(t.pick(-1,o[1]-1,1).lo(1).hi(o[0]-2))),t.set(0,0,0,0),t.set(0,0,1,0),t.set(o[0]-1,0,0,0),t.set(o[0]-1,0,1,0),t.set(0,o[1]-1,0,0),t.set(0,o[1]-1,1,0),t.set(o[0]-1,o[1]-1,0,0),t.set(o[0]-1,o[1]-1,1,0),t}}t.exports=function(t,e,r){return Array.isArray(r)||(r=n(e.dimension,"string"==typeof r?r:"clamp")),0===e.size?t:0===e.dimension?(t.set(0),t):function(t){var e=t.join();if(o=u[e])return o;for(var r=t.length,n=[h,d],i=1;i<=r;++i)n.push(f(i));var o=p.apply(void 0,n);return u[e]=o,o}(r)(t,e)}},4317:function(t){"use strict";function e(t,e){var r=Math.floor(e),n=e-r,i=0<=r&&r0;){y<64?(l=y,y=0):(l=64,y-=64);for(var x=0|t[1];x>0;){x<64?(c=x,x=0):(c=64,x-=64),n=v+y*h+x*d,a=b+y*p+x*m;var _=0,w=0,k=0,A=f,M=h-u*f,T=d-l*h,S=g,C=p-u*g,E=m-l*p;for(k=0;k0;){m<64?(l=m,m=0):(l=64,m-=64);for(var g=0|t[0];g>0;){g<64?(s=g,g=0):(s=64,g-=64),n=f+m*u+g*c,a=p+m*d+g*h;var v=0,b=0,y=u,x=c-l*u,_=d,w=h-l*d;for(b=0;b0;){b<64?(c=b,b=0):(c=64,b-=64);for(var y=0|t[0];y>0;){y<64?(s=y,y=0):(s=64,y-=64);for(var x=0|t[1];x>0;){x<64?(l=x,x=0):(l=64,x-=64),n=g+b*d+y*u+x*h,a=v+b*m+y*f+x*p;var _=0,w=0,k=0,A=d,M=u-c*d,T=h-s*u,S=m,C=f-c*m,E=p-s*f;for(k=0;kr;){v=0,b=m-a;e:for(g=0;gx)break e;b+=h,v+=d}for(v=m,b=m-a,g=0;g>1,H=V-B,W=V+B,q=U,Y=H,Z=V,X=W,$=G,J=i+1,K=o-1,Q=!0,tt=0,et=0,rt=0,nt=h,it=e(nt),ot=e(nt);M=l*q,T=l*Y,j=s;t:for(A=0;A0){g=q,q=Y,Y=g;break t}if(rt<0)break t;j+=f}M=l*X,T=l*$,j=s;t:for(A=0;A0){g=X,X=$,$=g;break t}if(rt<0)break t;j+=f}M=l*q,T=l*Z,j=s;t:for(A=0;A0){g=q,q=Z,Z=g;break t}if(rt<0)break t;j+=f}M=l*Y,T=l*Z,j=s;t:for(A=0;A0){g=Y,Y=Z,Z=g;break t}if(rt<0)break t;j+=f}M=l*q,T=l*X,j=s;t:for(A=0;A0){g=q,q=X,X=g;break t}if(rt<0)break t;j+=f}M=l*Z,T=l*X,j=s;t:for(A=0;A0){g=Z,Z=X,X=g;break t}if(rt<0)break t;j+=f}M=l*Y,T=l*$,j=s;t:for(A=0;A0){g=Y,Y=$,$=g;break t}if(rt<0)break t;j+=f}M=l*Y,T=l*Z,j=s;t:for(A=0;A0){g=Y,Y=Z,Z=g;break t}if(rt<0)break t;j+=f}M=l*X,T=l*$,j=s;t:for(A=0;A0){g=X,X=$,$=g;break t}if(rt<0)break t;j+=f}for(M=l*q,T=l*Y,S=l*Z,C=l*X,E=l*$,L=l*U,z=l*V,O=l*G,N=0,j=s,A=0;A0)){if(rt<0){for(M=l*x,T=l*J,S=l*K,j=s,A=0;A0)for(;;){for(_=s+K*l,N=0,A=0;A0)){for(_=s+K*l,N=0,A=0;AG){t:for(;;){for(_=s+J*l,N=0,j=s,A=0;A1&&n?s(r,n[0],n[1]):s(r)}(t,e,l);return n(l,c)}},446:function(t,e,r){"use strict";var n=r(7640),i={};t.exports=function(t){var e=t.order,r=t.dtype,o=[e,r].join(":"),a=i[o];return a||(i[o]=a=n(e,r)),a(t),t}},9618:function(t,e,r){var n=r(7163),i="undefined"!=typeof Float64Array;function o(t,e){return t[0]-e[0]}function a(){var t,e=this.stride,r=new Array(e.length);for(t=0;t=0&&(e+=o*(r=0|t),i-=r),new n(this.data,i,o,e)},i.step=function(t){var e=this.shape[0],r=this.stride[0],i=this.offset,o=0,a=Math.ceil;return"number"==typeof t&&((o=0|t)<0?(i+=r*(e-1),e=a(-e/o)):e=a(e/o),r*=o),new n(this.data,e,r,i)},i.transpose=function(t){t=void 0===t?0:0|t;var e=this.shape,r=this.stride;return new n(this.data,e[t],r[t],this.offset)},i.pick=function(t){var r=[],n=[],i=this.offset;return"number"==typeof t&&t>=0?i=i+this.stride[0]*t|0:(r.push(this.shape[0]),n.push(this.stride[0])),(0,e[r.length+1])(this.data,r,n,i)},function(t,e,r,i){return new n(t,e[0],r[0],i)}},2:function(t,e,r){function n(t,e,r,n,i,o){this.data=t,this.shape=[e,r],this.stride=[n,i],this.offset=0|o}var i=n.prototype;return i.dtype=t,i.dimension=2,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(i,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),i.set=function(e,r,n){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r,n):this.data[this.offset+this.stride[0]*e+this.stride[1]*r]=n},i.get=function(e,r){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r):this.data[this.offset+this.stride[0]*e+this.stride[1]*r]},i.index=function(t,e){return this.offset+this.stride[0]*t+this.stride[1]*e},i.hi=function(t,e){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,this.stride[0],this.stride[1],this.offset)},i.lo=function(t,e){var r=this.offset,i=0,o=this.shape[0],a=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"==typeof t&&t>=0&&(r+=s*(i=0|t),o-=i),"number"==typeof e&&e>=0&&(r+=l*(i=0|e),a-=i),new n(this.data,o,a,s,l,r)},i.step=function(t,e){var r=this.shape[0],i=this.shape[1],o=this.stride[0],a=this.stride[1],s=this.offset,l=0,c=Math.ceil;return"number"==typeof t&&((l=0|t)<0?(s+=o*(r-1),r=c(-r/l)):r=c(r/l),o*=l),"number"==typeof e&&((l=0|e)<0?(s+=a*(i-1),i=c(-i/l)):i=c(i/l),a*=l),new n(this.data,r,i,o,a,s)},i.transpose=function(t,e){t=void 0===t?0:0|t,e=void 0===e?1:0|e;var r=this.shape,i=this.stride;return new n(this.data,r[t],r[e],i[t],i[e],this.offset)},i.pick=function(t,r){var n=[],i=[],o=this.offset;return"number"==typeof t&&t>=0?o=o+this.stride[0]*t|0:(n.push(this.shape[0]),i.push(this.stride[0])),"number"==typeof r&&r>=0?o=o+this.stride[1]*r|0:(n.push(this.shape[1]),i.push(this.stride[1])),(0,e[n.length+1])(this.data,n,i,o)},function(t,e,r,i){return new n(t,e[0],e[1],r[0],r[1],i)}},3:function(t,e,r){function n(t,e,r,n,i,o,a,s){this.data=t,this.shape=[e,r,n],this.stride=[i,o,a],this.offset=0|s}var i=n.prototype;return i.dtype=t,i.dimension=3,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(i,"order",{get:function(){var t=Math.abs(this.stride[0]),e=Math.abs(this.stride[1]),r=Math.abs(this.stride[2]);return t>e?e>r?[2,1,0]:t>r?[1,2,0]:[1,0,2]:t>r?[2,0,1]:r>e?[0,1,2]:[0,2,1]}}),i.set=function(e,r,n,i){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n,i):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n]=i},i.get=function(e,r,n){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n]},i.index=function(t,e,r){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r},i.hi=function(t,e,r){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,this.stride[0],this.stride[1],this.stride[2],this.offset)},i.lo=function(t,e,r){var i=this.offset,o=0,a=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.stride[0],u=this.stride[1],h=this.stride[2];return"number"==typeof t&&t>=0&&(i+=c*(o=0|t),a-=o),"number"==typeof e&&e>=0&&(i+=u*(o=0|e),s-=o),"number"==typeof r&&r>=0&&(i+=h*(o=0|r),l-=o),new n(this.data,a,s,l,c,u,h,i)},i.step=function(t,e,r){var i=this.shape[0],o=this.shape[1],a=this.shape[2],s=this.stride[0],l=this.stride[1],c=this.stride[2],u=this.offset,h=0,d=Math.ceil;return"number"==typeof t&&((h=0|t)<0?(u+=s*(i-1),i=d(-i/h)):i=d(i/h),s*=h),"number"==typeof e&&((h=0|e)<0?(u+=l*(o-1),o=d(-o/h)):o=d(o/h),l*=h),"number"==typeof r&&((h=0|r)<0?(u+=c*(a-1),a=d(-a/h)):a=d(a/h),c*=h),new n(this.data,i,o,a,s,l,c,u)},i.transpose=function(t,e,r){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r;var i=this.shape,o=this.stride;return new n(this.data,i[t],i[e],i[r],o[t],o[e],o[r],this.offset)},i.pick=function(t,r,n){var i=[],o=[],a=this.offset;return"number"==typeof t&&t>=0?a=a+this.stride[0]*t|0:(i.push(this.shape[0]),o.push(this.stride[0])),"number"==typeof r&&r>=0?a=a+this.stride[1]*r|0:(i.push(this.shape[1]),o.push(this.stride[1])),"number"==typeof n&&n>=0?a=a+this.stride[2]*n|0:(i.push(this.shape[2]),o.push(this.stride[2])),(0,e[i.length+1])(this.data,i,o,a)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],r[0],r[1],r[2],i)}},4:function(t,e,r){function n(t,e,r,n,i,o,a,s,l,c){this.data=t,this.shape=[e,r,n,i],this.stride=[o,a,s,l],this.offset=0|c}var i=n.prototype;return i.dtype=t,i.dimension=4,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(e,r,n,i,o){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i,o):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]=o},i.get=function(e,r,n,i){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]},i.index=function(t,e,r,n){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r+this.stride[3]*n},i.hi=function(t,e,r,i){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},i.lo=function(t,e,r,i){var o=this.offset,a=0,s=this.shape[0],l=this.shape[1],c=this.shape[2],u=this.shape[3],h=this.stride[0],d=this.stride[1],f=this.stride[2],p=this.stride[3];return"number"==typeof t&&t>=0&&(o+=h*(a=0|t),s-=a),"number"==typeof e&&e>=0&&(o+=d*(a=0|e),l-=a),"number"==typeof r&&r>=0&&(o+=f*(a=0|r),c-=a),"number"==typeof i&&i>=0&&(o+=p*(a=0|i),u-=a),new n(this.data,s,l,c,u,h,d,f,p,o)},i.step=function(t,e,r,i){var o=this.shape[0],a=this.shape[1],s=this.shape[2],l=this.shape[3],c=this.stride[0],u=this.stride[1],h=this.stride[2],d=this.stride[3],f=this.offset,p=0,m=Math.ceil;return"number"==typeof t&&((p=0|t)<0?(f+=c*(o-1),o=m(-o/p)):o=m(o/p),c*=p),"number"==typeof e&&((p=0|e)<0?(f+=u*(a-1),a=m(-a/p)):a=m(a/p),u*=p),"number"==typeof r&&((p=0|r)<0?(f+=h*(s-1),s=m(-s/p)):s=m(s/p),h*=p),"number"==typeof i&&((p=0|i)<0?(f+=d*(l-1),l=m(-l/p)):l=m(l/p),d*=p),new n(this.data,o,a,s,l,c,u,h,d,f)},i.transpose=function(t,e,r,i){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r,i=void 0===i?3:0|i;var o=this.shape,a=this.stride;return new n(this.data,o[t],o[e],o[r],o[i],a[t],a[e],a[r],a[i],this.offset)},i.pick=function(t,r,n,i){var o=[],a=[],s=this.offset;return"number"==typeof t&&t>=0?s=s+this.stride[0]*t|0:(o.push(this.shape[0]),a.push(this.stride[0])),"number"==typeof r&&r>=0?s=s+this.stride[1]*r|0:(o.push(this.shape[1]),a.push(this.stride[1])),"number"==typeof n&&n>=0?s=s+this.stride[2]*n|0:(o.push(this.shape[2]),a.push(this.stride[2])),"number"==typeof i&&i>=0?s=s+this.stride[3]*i|0:(o.push(this.shape[3]),a.push(this.stride[3])),(0,e[o.length+1])(this.data,o,a,s)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],e[3],r[0],r[1],r[2],r[3],i)}},5:function(t,e,r){function n(t,e,r,n,i,o,a,s,l,c,u,h){this.data=t,this.shape=[e,r,n,i,o],this.stride=[a,s,l,c,u],this.offset=0|h}var i=n.prototype;return i.dtype=t,i.dimension=5,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(e,r,n,i,o,a){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o,a):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o]=a},i.get=function(e,r,n,i,o){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o]},i.index=function(t,e,r,n,i){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r+this.stride[3]*n+this.stride[4]*i},i.hi=function(t,e,r,i,o){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,"number"!=typeof o||o<0?this.shape[4]:0|o,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},i.lo=function(t,e,r,i,o){var a=this.offset,s=0,l=this.shape[0],c=this.shape[1],u=this.shape[2],h=this.shape[3],d=this.shape[4],f=this.stride[0],p=this.stride[1],m=this.stride[2],g=this.stride[3],v=this.stride[4];return"number"==typeof t&&t>=0&&(a+=f*(s=0|t),l-=s),"number"==typeof e&&e>=0&&(a+=p*(s=0|e),c-=s),"number"==typeof r&&r>=0&&(a+=m*(s=0|r),u-=s),"number"==typeof i&&i>=0&&(a+=g*(s=0|i),h-=s),"number"==typeof o&&o>=0&&(a+=v*(s=0|o),d-=s),new n(this.data,l,c,u,h,d,f,p,m,g,v,a)},i.step=function(t,e,r,i,o){var a=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.shape[3],u=this.shape[4],h=this.stride[0],d=this.stride[1],f=this.stride[2],p=this.stride[3],m=this.stride[4],g=this.offset,v=0,b=Math.ceil;return"number"==typeof t&&((v=0|t)<0?(g+=h*(a-1),a=b(-a/v)):a=b(a/v),h*=v),"number"==typeof e&&((v=0|e)<0?(g+=d*(s-1),s=b(-s/v)):s=b(s/v),d*=v),"number"==typeof r&&((v=0|r)<0?(g+=f*(l-1),l=b(-l/v)):l=b(l/v),f*=v),"number"==typeof i&&((v=0|i)<0?(g+=p*(c-1),c=b(-c/v)):c=b(c/v),p*=v),"number"==typeof o&&((v=0|o)<0?(g+=m*(u-1),u=b(-u/v)):u=b(u/v),m*=v),new n(this.data,a,s,l,c,u,h,d,f,p,m,g)},i.transpose=function(t,e,r,i,o){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r,i=void 0===i?3:0|i,o=void 0===o?4:0|o;var a=this.shape,s=this.stride;return new n(this.data,a[t],a[e],a[r],a[i],a[o],s[t],s[e],s[r],s[i],s[o],this.offset)},i.pick=function(t,r,n,i,o){var a=[],s=[],l=this.offset;return"number"==typeof t&&t>=0?l=l+this.stride[0]*t|0:(a.push(this.shape[0]),s.push(this.stride[0])),"number"==typeof r&&r>=0?l=l+this.stride[1]*r|0:(a.push(this.shape[1]),s.push(this.stride[1])),"number"==typeof n&&n>=0?l=l+this.stride[2]*n|0:(a.push(this.shape[2]),s.push(this.stride[2])),"number"==typeof i&&i>=0?l=l+this.stride[3]*i|0:(a.push(this.shape[3]),s.push(this.stride[3])),"number"==typeof o&&o>=0?l=l+this.stride[4]*o|0:(a.push(this.shape[4]),s.push(this.stride[4])),(0,e[a.length+1])(this.data,a,s,l)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],e[3],e[4],r[0],r[1],r[2],r[3],r[4],i)}}};function l(t,e){var r=-1===e?"T":String(e),n=s[r];return-1===e?n(t):0===e?n(t,c[t][0]):n(t,c[t],a)}var c={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};t.exports=function(t,e,r,o){if(void 0===t)return(0,c.array[0])([]);"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var a=e.length;if(void 0===r){r=new Array(a);for(var s=a-1,u=1;s>=0;--s)r[s]=u,u*=e[s]}if(void 0===o)for(o=0,s=0;s>>0;t.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e<0?-i:i;var r=n.hi(t),a=n.lo(t);return e>t==t>0?a===o?(r+=1,a=0):a+=1:0===a?(a=o,r-=1):a-=1,n.pack(a,r)}},8406:function(t,e){e.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),o=void 0===r?1e-6:r,a=0;ao){var x=i[c],_=1/Math.sqrt(g*b);for(y=0;y<3;++y){var w=(y+1)%3,k=(y+2)%3;x[y]+=_*(v[w]*m[k]-v[k]*m[w])}}}for(a=0;ao)for(_=1/Math.sqrt(A),y=0;y<3;++y)x[y]*=_;else for(y=0;y<3;++y)x[y]=0}return i},e.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),o=void 0===r?1e-6:r,a=0;ao?1/Math.sqrt(f):0,c=0;c<3;++c)d[c]*=f;i[a]=d}return i}},4081:function(t){"use strict";t.exports=function(t,e,r,n,i,o,a,s,l,c){var u=e+o+c;if(h>0){var h=Math.sqrt(u+1);t[0]=.5*(a-l)/h,t[1]=.5*(s-n)/h,t[2]=.5*(r-o)/h,t[3]=.5*h}else{var d=Math.max(e,o,c);h=Math.sqrt(2*d-u+1),e>=d?(t[0]=.5*h,t[1]=.5*(i+r)/h,t[2]=.5*(s+n)/h,t[3]=.5*(a-l)/h):o>=d?(t[0]=.5*(r+i)/h,t[1]=.5*h,t[2]=.5*(l+a)/h,t[3]=.5*(s-n)/h):(t[0]=.5*(n+s)/h,t[1]=.5*(a+l)/h,t[2]=.5*h,t[3]=.5*(r-i)/h)}return t}},9977:function(t,e,r){"use strict";t.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),u(r=[].slice.call(r,0,4),r);var i=new h(r,e,Math.log(n));return i.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&i.lookAt(0,t.eye,t.center,t.up),i};var n=r(9215),i=r(6582),o=r(7399),a=r(7608),s=r(4081);function l(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function c(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function u(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=c(r,n,i,o);a>1e-6?(t[0]=r/a,t[1]=n/a,t[2]=i/a,t[3]=o/a):(t[0]=t[1]=t[2]=0,t[3]=1)}function h(t,e,r){this.radius=n([r]),this.center=n(e),this.rotation=n(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var d=h.prototype;d.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},d.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;u(e,e);var r=this.computedMatrix;o(r,e);var n=this.computedCenter,i=this.computedEye,a=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],a[0]=r[1],a[1]=r[5],a[2]=r[9];for(var l=0;l<3;++l){for(var c=0,h=0;h<3;++h)c+=r[l+4*h]*i[h];r[12+l]=-c}},d.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r},d.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},d.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},d.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,o=i[1],a=i[5],s=i[9],c=l(o,a,s);o/=c,a/=c,s/=c;var u=i[0],h=i[4],d=i[8],f=u*o+h*a+d*s,p=l(u-=o*f,h-=a*f,d-=s*f);u/=p,h/=p,d/=p;var m=i[2],g=i[6],v=i[10],b=m*o+g*a+v*s,y=m*u+g*h+v*d,x=l(m-=b*o+y*u,g-=b*a+y*h,v-=b*s+y*d);m/=x,g/=x,v/=x;var _=u*e+o*r,w=h*e+a*r,k=d*e+s*r;this.center.move(t,_,w,k);var A=Math.exp(this.computedRadius[0]);A=Math.max(1e-4,A+n),this.radius.set(t,Math.log(A))},d.rotate=function(t,e,r,n){this.recalcMatrix(t),e=e||0,r=r||0;var i=this.computedMatrix,o=i[0],a=i[4],s=i[8],u=i[1],h=i[5],d=i[9],f=i[2],p=i[6],m=i[10],g=e*o+r*u,v=e*a+r*h,b=e*s+r*d,y=-(p*b-m*v),x=-(m*g-f*b),_=-(f*v-p*g),w=Math.sqrt(Math.max(0,1-Math.pow(y,2)-Math.pow(x,2)-Math.pow(_,2))),k=c(y,x,_,w);k>1e-6?(y/=k,x/=k,_/=k,w/=k):(y=x=_=0,w=1);var A=this.computedRotation,M=A[0],T=A[1],S=A[2],C=A[3],E=M*w+C*y+T*_-S*x,L=T*w+C*x+S*y-M*_,z=S*w+C*_+M*x-T*y,O=C*w-M*y-T*x-S*_;if(n){y=f,x=p,_=m;var D=Math.sin(n)/l(y,x,_);y*=D,x*=D,_*=D,O=O*(w=Math.cos(e))-(E=E*w+O*y+L*_-z*x)*y-(L=L*w+O*x+z*y-E*_)*x-(z=z*w+O*_+E*x-L*y)*_}var I=c(E,L,z,O);I>1e-6?(E/=I,L/=I,z/=I,O/=I):(E=L=z=0,O=1),this.rotation.set(t,E,L,z,O)},d.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var o=this.computedMatrix;i(o,e,r,n);var a=this.computedRotation;s(a,o[0],o[1],o[2],o[4],o[5],o[6],o[8],o[9],o[10]),u(a,a),this.rotation.set(t,a[0],a[1],a[2],a[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-e[c],2);this.radius.set(t,.5*Math.log(Math.max(l,1e-6))),this.center.set(t,r[0],r[1],r[2])},d.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},d.setMatrix=function(t,e){var r=this.computedRotation;s(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),u(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;a(n,e);var i=n[15];if(Math.abs(i)>1e-6){var o=n[12]/i,l=n[13]/i,c=n[14]/i;this.recalcMatrix(t);var h=Math.exp(this.computedRadius[0]);this.center.set(t,o-n[2]*h,l-n[6]*h,c-n[10]*h),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},d.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},d.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},d.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},d.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},d.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},1371:function(t,e,r){"use strict";var n=r(3233);t.exports=function(t,e,r){return n(r=void 0!==r?r+"":" ",e)+t}},3202:function(t){t.exports=function(t,e){e||(e=[0,""]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},3088:function(t,e,r){"use strict";t.exports=function(t,e){for(var r=0|e.length,i=t.length,o=[new Array(r),new Array(r)],a=0;a0){a=o[u][r][0],l=u;break}s=a[1^l];for(var h=0;h<2;++h)for(var d=o[h][r],f=0;f0&&(a=p,s=m,l=h)}return i||a&&c(a,l),s}function h(t,r){var i=o[r][t][0],a=[t];c(i,r);for(var s=i[1^r];;){for(;s!==t;)a.push(s),s=u(a[a.length-2],s,!1);if(o[0][t].length+o[1][t].length===0)break;var l=a[a.length-1],h=t,d=a[1],f=u(l,h,!0);if(n(e[l],e[h],e[d],e[f])<0)break;a.push(t),s=u(l,h)}return a}function d(t,e){return e[1]===e[e.length-1]}for(a=0;a0;){o[0][a].length;var m=h(a,f);d(0,m)?p.push.apply(p,m):(p.length>0&&l.push(p),p=m)}p.length>0&&l.push(p)}return l};var n=r(3140)},5609:function(t,e,r){"use strict";t.exports=function(t,e){for(var r=n(t,e.length),i=new Array(e.length),o=new Array(e.length),a=[],s=0;s0;){i[f=a.pop()]=!1;var c=r[f];for(s=0;s0}))).length,g=new Array(m),v=new Array(m);for(f=0;f0;){var N=F.pop(),j=C[N];l(j,(function(t,e){return t-e}));var B,U=j.length,G=P[N];for(0===G&&(B=[V=p[N]]),f=0;f=0||(P[H]=1^G,F.push(H),0===G&&(R(V=p[H])||(V.reverse(),B.push(V))))}0===G&&r.push(B)}return r};var n=r(3134),i=r(3088),o=r(5085),a=r(5250),s=r(8210),l=r(1682),c=r(5609);function u(t,e){for(var r=new Array(t),n=0;n0&&e[i]===r[0]))return 1;o=t[i-1]}for(var s=1;o;){var l=o.key,c=n(r,l[0],l[1]);if(l[0][0]0))return 0;s=-1,o=o.right}else if(c>0)o=o.left;else{if(!(c<0))return 0;s=1,o=o.right}}return s}}(v.slabs,v.coordinates);return 0===o.length?b:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(l(o),b)};var n=r(3250)[3],i=r(4209),o=r(3352),a=r(2478);function s(){return!0}function l(t){for(var e={},r=0;r=c?(A=1,b=c+2*d+p):b=d*(A=-d/c)+p):(A=0,f>=0?(M=0,b=p):-f>=h?(M=1,b=h+2*f+p):b=f*(M=-f/h)+p);else if(M<0)M=0,d>=0?(A=0,b=p):-d>=c?(A=1,b=c+2*d+p):b=d*(A=-d/c)+p;else{var T=1/k;b=(A*=T)*(c*A+u*(M*=T)+2*d)+M*(u*A+h*M+2*f)+p}else A<0?(x=h+f)>(y=u+d)?(_=x-y)>=(w=c-2*u+h)?(A=1,M=0,b=c+2*d+p):b=(A=_/w)*(c*A+u*(M=1-A)+2*d)+M*(u*A+h*M+2*f)+p:(A=0,x<=0?(M=1,b=h+2*f+p):f>=0?(M=0,b=p):b=f*(M=-f/h)+p):M<0?(x=c+d)>(y=u+f)?(_=x-y)>=(w=c-2*u+h)?(M=1,A=0,b=h+2*f+p):b=(A=1-(M=_/w))*(c*A+u*M+2*d)+M*(u*A+h*M+2*f)+p:(M=0,x<=0?(A=1,b=c+2*d+p):d>=0?(A=0,b=p):b=d*(A=-d/c)+p):(_=h+f-u-d)<=0?(A=0,M=1,b=h+2*f+p):_>=(w=c-2*u+h)?(A=1,M=0,b=c+2*d+p):b=(A=_/w)*(c*A+u*(M=1-A)+2*d)+M*(u*A+h*M+2*f)+p;var S=1-A-M;for(l=0;l0){var c=t[r-1];if(0===n(s,c)&&o(c)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},3233:function(t){"use strict";var e,r="";t.exports=function(t,n){if("string"!=typeof t)throw new TypeError("expected a string");if(1===n)return t;if(2===n)return t+t;var i=t.length*n;if(e!==t||void 0===e)e=t,r="";else if(r.length>=i)return r.substr(0,i);for(;i>r.length&&n>1;)1&n&&(r+=t),n>>=1,t+=t;return r=(r+=t).substr(0,i)}},3025:function(t,e,r){t.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(t){"use strict";t.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,i=e-2;i>=0;--i){var o=r;(l=(s=t[i])-((r=o+s)-o))&&(t[--n]=r,r=l)}var a=0;for(i=n;i0){if(o<=0)return a;n=i+o}else{if(!(i<0))return a;if(o>=0)return a;n=-(i+o)}var s=33306690738754716e-32*n;return a>=s||a<=-s?a:h(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],o=e[0]-n[0],a=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],c=r[1]-n[1],u=t[2]-n[2],h=e[2]-n[2],f=r[2]-n[2],p=o*c,m=a*l,g=a*s,v=i*c,b=i*l,y=o*s,x=u*(p-m)+h*(g-v)+f*(b-y),_=7771561172376103e-31*((Math.abs(p)+Math.abs(m))*Math.abs(u)+(Math.abs(g)+Math.abs(v))*Math.abs(h)+(Math.abs(b)+Math.abs(y))*Math.abs(f));return x>_||-x>_?x:d(t,e,r,n)}];function p(t){var e=f[t.length];return e||(e=f[t.length]=u(t.length)),e.apply(void 0,t)}function m(t,e,r,n,i,o,a){return function(e,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return n(e,r);case 3:return i(e,r,s);case 4:return o(e,r,s,l);case 5:return a(e,r,s,l,c)}for(var u=new Array(arguments.length),h=0;h0&&a>0||o<0&&a<0)return!1;var s=n(r,t,e),l=n(i,t,e);return!(s>0&&l>0||s<0&&l<0)&&(0!==o||0!==a||0!==s||0!==l||function(t,e,r,n){for(var i=0;i<2;++i){var o=t[i],a=e[i],s=Math.min(o,a),l=Math.max(o,a),c=r[i],u=n[i],h=Math.min(c,u);if(Math.max(c,u)=n?(i=h,(l+=1)=n?(i=h,(l+=1)>1,c=e[2*l+1];if(c===o)return l;o>1,c=e[2*l+1];if(c===o)return l;o>1,c=e[2*l+1];if(c===o)return l;o0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},2014:function(t,e,r){"use strict";var n=r(3105),i=r(4623);function o(t,e){var r=t.length,n=t.length-e.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return(s=t[0]+t[1]-e[0]-e[1])||i(t[0],t[1])-i(e[0],e[1]);case 3:var o=t[0]+t[1],a=e[0]+e[1];if(s=o+t[2]-(a+e[2]))return s;var s,l=i(t[0],t[1]),c=i(e[0],e[1]);return(s=i(l,t[2])-i(c,e[2]))||i(l+t[2],o)-i(c+e[2],a);default:var u=t.slice(0);u.sort();var h=e.slice(0);h.sort();for(var d=0;d>1,s=o(t[a],e);s<=0?(0===s&&(i=a),r=a+1):s>0&&(n=a-1)}return i}function u(t,e){for(var r=new Array(t.length),i=0,a=r.length;i=t.length||0!==o(t[g],s)););}return r}function h(t,e){if(e<0)return[];for(var r=[],i=(1<>>u&1&&c.push(i[u]);e.push(c)}return s(e)},e.skeleton=h,e.boundary=function(t){for(var e=[],r=0,n=t.length;r>1:(t>>1)-1}function y(t){for(var e=v(t);;){var r=e,n=2*t+1,i=2*(t+1),o=t;if(n0;){var r=b(t);if(!(r>=0&&e0){var t=A[0];return g(0,T-1),T-=1,y(0),t}return-1}function w(t,e){var r=A[t];return c[r]===e?t:(c[r]=-1/0,x(t),_(),c[r]=e,x((T+=1)-1))}function k(t){if(!u[t]){u[t]=!0;var e=s[t],r=l[t];s[r]>=0&&(s[r]=e),l[e]>=0&&(l[e]=r),M[e]>=0&&w(M[e],m(e)),M[r]>=0&&w(M[r],m(r))}}var A=[],M=new Array(o);for(h=0;h>1;h>=0;--h)y(h);for(;;){var S=_();if(S<0||c[S]>r)break;k(S)}var C=[];for(h=0;h=0&&r>=0&&e!==r){var n=M[e],i=M[r];n!==i&&L.push([n,i])}})),i.unique(i.normalize(L)),{positions:C,edges:L}};var n=r(3250),i=r(2014)},1303:function(t,e,r){"use strict";t.exports=function(t,e){var r,o,a,s;if(e[0][0]e[1][0]))return i(e,t);r=e[1],o=e[0]}if(t[0][0]t[1][0]))return-i(t,e);a=t[1],s=t[0]}var l=n(r,o,s),c=n(r,o,a);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=n(s,a,o),c=n(s,a,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return o[0]-s[0]};var n=r(3250);function i(t,e){var r,i,o,a;if(e[0][0]e[1][0])){var s=Math.min(t[0][1],t[1][1]),l=Math.max(t[0][1],t[1][1]),c=Math.min(e[0][1],e[1][1]),u=Math.max(e[0][1],e[1][1]);return lu?s-u:l-u}r=e[1],i=e[0]}t[0][1]0)if(e[0]!==a[1][0])r=t,t=t.right;else{if(l=c(t.right,e))return l;t=t.left}else{if(e[0]!==a[1][0])return t;var l;if(l=c(t.right,e))return l;t=t.left}}return r}function u(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function h(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}s.prototype.castUp=function(t){var e=n.le(this.coordinates,t[0]);if(e<0)return-1;this.slabs[e];var r=c(this.slabs[e],t),i=-1;if(r&&(i=r.value),this.coordinates[e]===t[0]){var s=null;if(r&&(s=r.key),e>0){var u=c(this.slabs[e-1],t);u&&(s?a(u.key,s)>0&&(s=u.key,i=u.value):(i=u.value,s=u.key))}var h=this.horizontal[e];if(h.length>0){var d=n.ge(h,t[1],l);if(d=h.length)return i;f=h[d]}}if(f.start)if(s){var p=o(s[0],s[1],[t[0],f.y]);s[0][0]>s[1][0]&&(p=-p),p>0&&(i=f.index)}else i=f.index;else f.y!==t[1]&&(i=f.index)}}}return i}},5202:function(t,e,r){"use strict";var n=r(1944),i=r(8210);function o(t,e){var r=i(n(t,e),[e[e.length-1]]);return r[r.length-1]}function a(t,e,r,n){var i=-e/(n-e);i<0?i=0:i>1&&(i=1);for(var o=1-i,a=t.length,s=new Array(a),l=0;l0||i>0&&u<0){var h=a(s,u,l,i);r.push(h),n.push(h.slice())}u<0?n.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=u}return{positive:r,negative:n}},t.exports.positive=function(t,e){for(var r=[],n=o(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(a(i,c,s,n)),c>=0&&r.push(s.slice()),n=c}return r},t.exports.negative=function(t,e){for(var r=[],n=o(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(a(i,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},3387:function(t,e,r){var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return function(t,e){var r,n,a,s,l,c,u,h,d,f=1,p=t.length,m="";for(n=0;n=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?m+=r:(!i.number.test(s.type)||h&&!s.sign?d="":(d=h?"+":"-",r=r.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(d+r).length,l=s.width&&u>0?c.repeat(u):"",m+=s.align?d+r+l:"0"===c?d+l+r:l+d+r)}return m}(function(t){if(s[t])return s[t];for(var e,r=t,n=[],o=0;r;){if(null!==(e=i.text.exec(r)))n.push(e[0]);else if(null!==(e=i.modulo.exec(r)))n.push("%");else{if(null===(e=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var a=[],l=e[2],c=[];if(null===(c=i.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=i.key_access.exec(l)))a.push(c[1]);else{if(null===(c=i.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}e[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}r=r.substring(e[0].length)}return s[t]=n}(t),arguments)}function a(t,e){return o.apply(null,[t].concat(e||[]))}var s=Object.create(null);e.sprintf=o,e.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(n=function(){return{sprintf:o,vsprintf:a}}.call(e,r,e,t))||(t.exports=n))}()},3711:function(t,e,r){"use strict";t.exports=function(t,e){if(t.dimension<=0)return{positions:[],cells:[]};if(1===t.dimension)return function(t,e){for(var r=i(t,e),n=r.length,o=new Array(n),a=new Array(n),s=0;sn|0},vertex:function(t,e,r,n,i,o,a,s,l,c,u,h,d){var f=(0|a)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==f&&15!==f)switch(f){case 0:case 15:u.push([t-.5,e-.5]);break;case 1:u.push([t-.25-.25*(n+r-2*d)/(r-n),e-.25-.25*(i+r-2*d)/(r-i)]);break;case 2:u.push([t-.75-.25*(-n-r+2*d)/(n-r),e-.25-.25*(o+n-2*d)/(n-o)]);break;case 3:u.push([t-.5,e-.5-.5*(i+r+o+n-4*d)/(r-i+n-o)]);break;case 4:u.push([t-.25-.25*(o+i-2*d)/(i-o),e-.75-.25*(-i-r+2*d)/(i-r)]);break;case 5:u.push([t-.5-.5*(n+r+o+i-4*d)/(r-n+i-o),e-.5]);break;case 6:u.push([t-.5-.25*(-n-r+o+i)/(n-r+i-o),e-.5-.25*(-i-r+o+n)/(i-r+n-o)]);break;case 7:u.push([t-.75-.25*(o+i-2*d)/(i-o),e-.75-.25*(o+n-2*d)/(n-o)]);break;case 8:u.push([t-.75-.25*(-o-i+2*d)/(o-i),e-.75-.25*(-o-n+2*d)/(o-n)]);break;case 9:u.push([t-.5-.25*(n+r+-o-i)/(r-n+o-i),e-.5-.25*(i+r+-o-n)/(r-i+o-n)]);break;case 10:u.push([t-.5-.5*(-n-r-o-i+4*d)/(n-r+o-i),e-.5]);break;case 11:u.push([t-.25-.25*(-o-i+2*d)/(o-i),e-.75-.25*(i+r-2*d)/(r-i)]);break;case 12:u.push([t-.5,e-.5-.5*(-i-r-o-n+4*d)/(i-r+o-n)]);break;case 13:u.push([t-.75-.25*(n+r-2*d)/(r-n),e-.25-.25*(-o-n+2*d)/(o-n)]);break;case 14:u.push([t-.25-.25*(-n-r+2*d)/(n-r),e-.25-.25*(-i-r+2*d)/(i-r)])}},cell:function(t,e,r,n,i,o,a,s,l){i?s.push([t,e]):s.push([e,t])}});return function(t,e){var r=[],i=[];return n(t,r,i,e),{positions:r,cells:i}}}},a={}},529:function(t,e,r){"use strict";t.exports=function t(e,r,n){var o=(n=n||{}).fontStyle||"normal",s=n.fontWeight||"normal",l=n.fontVariant||"normal",c=[o,s,l,e].join("_"),u=a[c];u||(u=a[c]={" ":{data:new Float32Array(0),shape:.2}});var h=u[r];if(!h)if(r.length<=1||!/\d/.test(r))h=u[r]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),i=0,o=0,a=0;a0&&(m+=.02);var v=new Float32Array(p),b=0,y=-.5*m;for(g=0;gMath.max(r,n)?i[2]=1:r>Math.max(e,n)?i[0]=1:i[1]=1;for(var o=0,a=0,l=0;l<3;++l)o+=t[l]*t[l],a+=i[l]*t[l];for(l=0;l<3;++l)i[l]-=a/o*t[l];return s(i,i),i}function d(t,e,r,i,o,a,s,l){this.center=n(r),this.up=n(i),this.right=n(o),this.radius=n([a]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var f=d.prototype;f.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},f.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},f.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,n=0,i=0,o=0;o<3;++o)i+=e[o]*r[o],n+=e[o]*e[o];var l=Math.sqrt(n),u=0;for(o=0;o<3;++o)r[o]-=e[o]*i/n,u+=r[o]*r[o],e[o]/=l;var h=Math.sqrt(u);for(o=0;o<3;++o)r[o]/=h;var d=this.computedToward;a(d,e,r),s(d,d);var f=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(p),v=Math.sin(p),b=Math.cos(m),y=Math.sin(m),x=this.computedCenter,_=g*b,w=v*b,k=y,A=-g*y,M=-v*y,T=b,S=this.computedEye,C=this.computedMatrix;for(o=0;o<3;++o){var E=_*r[o]+w*d[o]+k*e[o];C[4*o+1]=A*r[o]+M*d[o]+T*e[o],C[4*o+2]=E,C[4*o+3]=0}var L=C[1],z=C[5],O=C[9],D=C[2],I=C[6],R=C[10],F=z*R-O*I,P=O*D-L*R,N=L*I-z*D,j=c(F,P,N);for(F/=j,P/=j,N/=j,C[0]=F,C[4]=P,C[8]=N,o=0;o<3;++o)S[o]=x[o]+C[2+4*o]*f;for(o=0;o<3;++o){u=0;for(var B=0;B<3;++B)u+=C[o+4*B]*S[B];C[12+o]=-u}C[15]=1},f.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var p=[0,0,0];f.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;p[0]=i[2],p[1]=i[6],p[2]=i[10];for(var a=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)i[4*c]=a[c],i[4*c+1]=s[c],i[4*c+2]=l[c];for(o(i,i,n,p),c=0;c<3;++c)a[c]=i[4*c],s[c]=i[4*c+1];this.up.set(t,a[0],a[1],a[2]),this.right.set(t,s[0],s[1],s[2])}},f.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,o=(Math.exp(this.computedRadius[0]),i[1]),a=i[5],s=i[9],l=c(o,a,s);o/=l,a/=l,s/=l;var u=i[0],h=i[4],d=i[8],f=u*o+h*a+d*s,p=c(u-=o*f,h-=a*f,d-=s*f),m=(u/=p)*e+o*r,g=(h/=p)*e+a*r,v=(d/=p)*e+s*r;this.center.move(t,m,g,v);var b=Math.exp(this.computedRadius[0]);b=Math.max(1e-4,b+n),this.radius.set(t,Math.log(b))},f.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},f.setMatrix=function(t,e,r,n){var o=1;"number"==typeof r&&(o=0|r),(o<0||o>3)&&(o=1);var a=(o+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[o],l=e[o+4],h=e[o+8];if(n){var d=Math.abs(s),f=Math.abs(l),p=Math.abs(h),m=Math.max(d,f,p);d===m?(s=s<0?-1:1,l=h=0):p===m?(h=h<0?-1:1,s=l=0):(l=l<0?-1:1,s=h=0)}else{var g=c(s,l,h);s/=g,l/=g,h/=g}var v,b,y=e[a],x=e[a+4],_=e[a+8],w=y*s+x*l+_*h,k=c(y-=s*w,x-=l*w,_-=h*w),A=l*(_/=k)-h*(x/=k),M=h*(y/=k)-s*_,T=s*x-l*y,S=c(A,M,T);if(A/=S,M/=S,T/=S,this.center.jump(t,H,W,q),this.radius.idle(t),this.up.jump(t,s,l,h),this.right.jump(t,y,x,_),2===o){var C=e[1],E=e[5],L=e[9],z=C*y+E*x+L*_,O=C*A+E*M+L*T;v=F<0?-Math.PI/2:Math.PI/2,b=Math.atan2(O,z)}else{var D=e[2],I=e[6],R=e[10],F=D*s+I*l+R*h,P=D*y+I*x+R*_,N=D*A+I*M+R*T;v=Math.asin(u(F)),b=Math.atan2(N,P)}this.angle.jump(t,b,v),this.recalcMatrix(t);var j=e[2],B=e[6],U=e[10],G=this.computedMatrix;i(G,e);var V=G[15],H=G[12]/V,W=G[13]/V,q=G[14]/V,Y=Math.exp(this.computedRadius[0]);this.center.jump(t,H-j*Y,W-B*Y,q-U*Y)},f.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},f.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},f.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},f.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},f.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],o=n[1],a=n[2],s=c(i,o,a);if(!(s<1e-6)){i/=s,o/=s,a/=s;var l=e[0]-r[0],h=e[1]-r[1],d=e[2]-r[2],f=c(l,h,d);if(!(f<1e-6)){l/=f,h/=f,d/=f;var p=this.computedRight,m=p[0],g=p[1],v=p[2],b=i*m+o*g+a*v,y=c(m-=b*i,g-=b*o,v-=b*a);if(!(y<.01&&(y=c(m=o*d-a*h,g=a*l-i*d,v=i*h-o*l))<1e-6)){m/=y,g/=y,v/=y,this.up.set(t,i,o,a),this.right.set(t,m,g,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(f));var x=o*v-a*g,_=a*m-i*v,w=i*g-o*m,k=c(x,_,w),A=i*l+o*h+a*d,M=m*l+g*h+v*d,T=(x/=k)*l+(_/=k)*h+(w/=k)*d,S=Math.asin(u(A)),C=Math.atan2(T,M),E=this.angle._state,L=E[E.length-1],z=E[E.length-2];L%=2*Math.PI;var O=Math.abs(L+2*Math.PI-C),D=Math.abs(L-C),I=Math.abs(L-2*Math.PI-C);O0?r.pop():new ArrayBuffer(t)}function p(t){return new Uint8Array(f(t),0,t)}function m(t){return new Uint16Array(f(2*t),0,t)}function g(t){return new Uint32Array(f(4*t),0,t)}function v(t){return new Int8Array(f(t),0,t)}function b(t){return new Int16Array(f(2*t),0,t)}function y(t){return new Int32Array(f(4*t),0,t)}function x(t){return new Float32Array(f(4*t),0,t)}function _(t){return new Float64Array(f(8*t),0,t)}function w(t){return a?new Uint8ClampedArray(f(t),0,t):p(t)}function k(t){return s?new BigUint64Array(f(8*t),0,t):null}function A(t){return l?new BigInt64Array(f(8*t),0,t):null}function M(t){return new DataView(f(t),0,t)}function T(t){t=n.nextPow2(t);var e=n.log2(t),r=h[e];return r.length>0?r.pop():new o(t)}e.free=function(t){if(o.isBuffer(t))h[n.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|n.log2(e);u[r].push(t)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(t){d(t.buffer)},e.freeArrayBuffer=d,e.freeBuffer=function(t){h[n.log2(t.length)].push(t)},e.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return f(t);switch(e){case"uint8":return p(t);case"uint16":return m(t);case"uint32":return g(t);case"int8":return v(t);case"int16":return b(t);case"int32":return y(t);case"float":case"float32":return x(t);case"double":case"float64":return _(t);case"uint8_clamped":return w(t);case"bigint64":return A(t);case"biguint64":return k(t);case"buffer":return T(t);case"data":case"dataview":return M(t);default:return null}return null},e.mallocArrayBuffer=f,e.mallocUint8=p,e.mallocUint16=m,e.mallocUint32=g,e.mallocInt8=v,e.mallocInt16=b,e.mallocInt32=y,e.mallocFloat32=e.mallocFloat=x,e.mallocFloat64=e.mallocDouble=_,e.mallocUint8Clamped=w,e.mallocBigUint64=k,e.mallocBigInt64=A,e.mallocDataView=M,e.mallocBuffer=T,e.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,h[t].length=0}},1755:function(t){"use strict";function e(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e0&&(o=n.size),n.lineSpacing&&n.lineSpacing>0&&(a=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts)),r.font=[n.fontStyle,n.fontVariant,n.fontWeight,o+"px",n.font].filter((function(t){return t})).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",w(function(t,e,r,n,o,a){r=r.replace(/\n/g,""),r=!0===a.breaklines?r.replace(/\/g,"\n"):r.replace(/\/g," ");var s="",l=[];for(k=0;k-1?parseInt(t[1+i]):0,l=o>-1?parseInt(r[1+o]):0;s!==l&&(n=n.replace(P(),"?px "),T*=Math.pow(.75,l-s),n=n.replace("?px ",P())),M+=.25*E*(l-s)}if(!0===a.superscripts){var c=t.indexOf(p),h=r.indexOf(p),f=c>-1?parseInt(t[1+c]):0,m=h>-1?parseInt(r[1+h]):0;f!==m&&(n=n.replace(P(),"?px "),T*=Math.pow(.75,m-f),n=n.replace("?px ",P())),M-=.25*E*(m-f)}if(!0===a.bolds){var g=t.indexOf(u)>-1,b=r.indexOf(u)>-1;!g&&b&&(n=y?n.replace("italic ","italic bold "):"bold "+n),g&&!b&&(n=n.replace("bold ",""))}if(!0===a.italics){var y=t.indexOf(d)>-1,x=r.indexOf(d)>-1;!y&&x&&(n="italic "+n),y&&!x&&(n=n.replace("italic ",""))}e.font=n}for(w=0;w",o="",a=i.length,s=o.length,l=e[0]===p||e[0]===v,c=0,u=-s;c>-1&&-1!==(c=r.indexOf(i,c))&&-1!==(u=r.indexOf(o,c+a))&&!(u<=c);){for(var h=c;h=u)n[h]=null,r=r.substr(0,h)+" "+r.substr(h+1);else if(null!==n[h]){var d=n[h].indexOf(e[0]);-1===d?n[h]+=e:l&&(n[h]=n[h].substr(0,d+1)+(1+parseInt(n[h][d+1]))+n[h].substr(d+2))}var f=c+a,m=r.substr(f,u-f).indexOf(i);c=-1!==m?m:u+s}return n}function x(t,e){var r=n(t,128);return e?o(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function _(t,e,r,n){var i=x(t,n),o=function(t,e,r){for(var n=e.textAlign||"start",i=e.textBaseline||"alphabetic",o=[1<<30,1<<30],a=[0,0],s=t.length,l=0;l=0?e[o]:i}))},has___:{value:y((function(e){var n=b(e);return n?r in n:t.indexOf(e)>=0}))},set___:{value:y((function(n,i){var o,a=b(n);return a?a[r]=i:(o=t.indexOf(n))>=0?e[o]=i:(o=t.length,e[o]=i,t[o]=n),this}))},delete___:{value:y((function(n){var i,o,a=b(n);return a?r in a&&delete a[r]:!((i=t.indexOf(n))<0||(o=t.length-1,t[i]=void 0,e[i]=e[o],t[i]=t[o],t.length=o,e.length=o,0))}))}})};m.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof r?function(){function n(){this instanceof m||x();var t,n=new r,i=void 0,o=!1;return t=e?function(t,e){return n.set(t,e),n.has(t)||(i||(i=new m),i.set(t,e)),this}:function(t,e){if(o)try{n.set(t,e)}catch(r){i||(i=new m),i.set___(t,e)}else n.set(t,e);return this},Object.create(m.prototype,{get___:{value:y((function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)}))},has___:{value:y((function(t){return n.has(t)||!!i&&i.has___(t)}))},set___:{value:y(t)},delete___:{value:y((function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e}))},permitHostObjects___:{value:y((function(t){if(t!==g)throw new Error("bogus call to permitHostObjects___");o=!0}))}})}e&&"undefined"!=typeof Proxy&&(Proxy=void 0),n.prototype=m.prototype,t.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),t.exports=m)}function g(t){t.permitHostObjects___&&t.permitHostObjects___(g)}function v(t){return!(t.substr(0,8)==l&&"___"===t.substr(t.length-3))}function b(t){if(t!==Object(t))throw new TypeError("Not an object: "+t);var e=t[c];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return a(t,c,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function y(t){return t.prototype=null,Object.freeze(t)}function x(){f||"undefined"==typeof console||(f=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},236:function(t,e,r){var n=r(8284);t.exports=function(){var t={};return function(e){if(("object"!=typeof e||null===e)&&"function"!=typeof e)throw new Error("Weakmap-shim: Key must be object");var r=e.valueOf(t);return r&&r.identity===t?r:n(e,t)}}},8284:function(t){t.exports=function(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}},606:function(t,e,r){var n=r(236);t.exports=function(){var t=n();return{get:function(e,r){var n=t(e);return n.hasOwnProperty("value")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return"value"in t(e)},delete:function(e){return delete t(e).value}}}},3349:function(t){"use strict";t.exports=function(t){var e={};return function(r,n,i){var o=r.dtype,a=r.order,s=[o,a.join()].join(),l=e[s];return l||(e[s]=l=t([o,a])),l(r.shape.slice(0),r.data,r.stride,0|r.offset,n,i)}}(function(){return function(t,e,r,n,i,o){var a=t[0],s=r[0],l=[0],c=s;n|=0;var u=0,h=s;for(u=0;u=0!=f>=0&&i.push(l[0]+.5+.5*(d+f)/(d-f)),n+=h,++l[0]}}}.bind(void 0,{funcName:"zeroCrossings"}))},781:function(t,e,r){"use strict";t.exports=function(t,e){var r=[];return e=+e||0,n(t.hi(t.shape[0]-1),r,e),r};var n=r(3349)},7790:function(){}},r={};function i(t){var n=r[t];if(void 0!==n)return n.exports;var o=r[t]={id:t,loaded:!1,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t};var o=i(1964);t.exports=o}()},53824:t=>{t.exports=function(t,e,r,n){var i=t[0],o=t[1],a=!1;void 0===r&&(r=0),void 0===n&&(n=e.length);for(var s=n-r,l=0,c=s-1;lo!=f>o&&i<(d-u)*(o-h)/(f-h)+u&&(a=!a)}return a}},48439:(t,e,r)=>{var n,i=r(89528),o=r(45505),a=r(25645),s=r(31997),l=r(94638),c=r(52148),u=!1,h=o();function d(t,e,r){var i=n.segments(t),o=n.segments(e),a=r(n.combine(i,o));return n.polygon(a)}n={buildLog:function(t){return!0===t?u=i():!1===t&&(u=!1),!1!==u&&u.list},epsilon:function(t){return h.epsilon(t)},segments:function(t){var e=a(!0,h,u);return t.regions.forEach(e.addRegion),{segments:e.calculate(t.inverted),inverted:t.inverted}},combine:function(t,e){return{combined:a(!1,h,u).calculate(t.segments,t.inverted,e.segments,e.inverted),inverted1:t.inverted,inverted2:e.inverted}},selectUnion:function(t){return{segments:l.union(t.combined,u),inverted:t.inverted1||t.inverted2}},selectIntersect:function(t){return{segments:l.intersect(t.combined,u),inverted:t.inverted1&&t.inverted2}},selectDifference:function(t){return{segments:l.difference(t.combined,u),inverted:t.inverted1&&!t.inverted2}},selectDifferenceRev:function(t){return{segments:l.differenceRev(t.combined,u),inverted:!t.inverted1&&t.inverted2}},selectXor:function(t){return{segments:l.xor(t.combined,u),inverted:t.inverted1!==t.inverted2}},polygon:function(t){return{regions:s(t.segments,h,u),inverted:t.inverted}},polygonFromGeoJSON:function(t){return c.toPolygon(n,t)},polygonToGeoJSON:function(t){return c.fromPolygon(n,h,t)},union:function(t,e){return d(t,e,n.selectUnion)},intersect:function(t,e){return d(t,e,n.selectIntersect)},difference:function(t,e){return d(t,e,n.selectDifference)},differenceRev:function(t,e){return d(t,e,n.selectDifferenceRev)},xor:function(t,e){return d(t,e,n.selectXor)}},"object"==typeof window&&(window.PolyBool=n),t.exports=n},89528:t=>{t.exports=function(){var t,e=0,r=!1;function n(e,r){return t.list.push({type:e,data:r?JSON.parse(JSON.stringify(r)):void 0}),t}return t={list:[],segmentId:function(){return e++},checkIntersection:function(t,e){return n("check",{seg1:t,seg2:e})},segmentChop:function(t,e){return n("div_seg",{seg:t,pt:e}),n("chop",{seg:t,pt:e})},statusRemove:function(t){return n("pop_seg",{seg:t})},segmentUpdate:function(t){return n("seg_update",{seg:t})},segmentNew:function(t,e){return n("new_seg",{seg:t,primary:e})},segmentRemove:function(t){return n("rem_seg",{seg:t})},tempStatus:function(t,e,r){return n("temp_status",{seg:t,above:e,below:r})},rewind:function(t){return n("rewind",{seg:t})},status:function(t,e,r){return n("status",{seg:t,above:e,below:r})},vert:function(e){return e===r?t:(r=e,n("vert",{x:e}))},log:function(t){return"string"!=typeof t&&(t=JSON.stringify(t,!1," ")),n("log",{txt:t})},reset:function(){return n("reset")},selected:function(t){return n("selected",{segs:t})},chainStart:function(t){return n("chain_start",{seg:t})},chainRemoveHead:function(t,e){return n("chain_rem_head",{index:t,pt:e})},chainRemoveTail:function(t,e){return n("chain_rem_tail",{index:t,pt:e})},chainNew:function(t,e){return n("chain_new",{pt1:t,pt2:e})},chainMatch:function(t){return n("chain_match",{index:t})},chainClose:function(t){return n("chain_close",{index:t})},chainAddHead:function(t,e){return n("chain_add_head",{index:t,pt:e})},chainAddTail:function(t,e){return n("chain_add_tail",{index:t,pt:e})},chainConnect:function(t,e){return n("chain_con",{index1:t,index2:e})},chainReverse:function(t){return n("chain_rev",{index:t})},chainJoin:function(t,e){return n("chain_join",{index1:t,index2:e})},done:function(){return n("done")}}}},45505:t=>{t.exports=function(t){"number"!=typeof t&&(t=1e-10);var e={epsilon:function(e){return"number"==typeof e&&(t=e),t},pointAboveOrOnLine:function(e,r,n){var i=r[0],o=r[1],a=n[0],s=n[1],l=e[0];return(a-i)*(e[1]-o)-(s-o)*(l-i)>=-t},pointBetween:function(e,r,n){var i=e[1]-r[1],o=n[0]-r[0],a=e[0]-r[0],s=n[1]-r[1],l=a*o+i*s;return!(l-t)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])t!=a-i>t&&(o-c)*(i-u)/(a-u)+c-n>t&&(s=!s),o=c,a=u}return s}};return e}},52148:t=>{var e={toPolygon:function(t,e){function r(e){if(e.length<=0)return t.segments({inverted:!1,regions:[]});function r(e){var r=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[r]})}for(var n=r(e[0]),i=1;i{var n=r(68871);t.exports=function(t,e,r){function i(t,e,n){return{id:r?r.segmentId():-1,start:t,end:e,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var o=n.create();function a(t,r){o.insertBefore(t,(function(n){return i=t.isStart,o=t.pt,a=r,s=n.isStart,l=n.pt,c=n.other.pt,(0!==(u=e.pointsCompare(o,l))?u:e.pointsSame(a,c)?0:i!==s?i?1:-1:e.pointAboveOrOnLine(a,s?l:c,s?c:l)?1:-1)<0;var i,o,a,s,l,c,u}))}function s(t,e){var r=function(t,e){var r=n.node({isStart:!0,pt:t.start,seg:t,primary:e,other:null,status:null});return a(r,t.end),r}(t,e);return function(t,e,r){var i=n.node({isStart:!1,pt:e.end,seg:e,primary:r,other:t,status:null});t.other=i,a(i,t.pt)}(r,t,e),r}function l(t,e){var n=i(e,t.seg.end,t.seg);return function(t,e){r&&r.segmentChop(t.seg,e),t.other.remove(),t.seg.end=e,t.other.pt=e,a(t.other,t.pt)}(t,e),s(n,t.primary)}function c(i,a){var s=n.create();function c(t){return s.findTransition((function(r){var n,i,o,a,s,l;return n=t,i=r.ev,o=n.seg.start,a=n.seg.end,s=i.seg.start,l=i.seg.end,(e.pointsCollinear(o,s,l)?e.pointsCollinear(a,s,l)||e.pointAboveOrOnLine(a,s,l)?1:-1:e.pointAboveOrOnLine(o,s,l)?1:-1)>0}))}function u(t,n){var i=t.seg,o=n.seg,a=i.start,s=i.end,c=o.start,u=o.end;r&&r.checkIntersection(i,o);var h=e.linesIntersect(a,s,c,u);if(!1===h){if(!e.pointsCollinear(a,s,c))return!1;if(e.pointsSame(a,u)||e.pointsSame(s,c))return!1;var d=e.pointsSame(a,c),f=e.pointsSame(s,u);if(d&&f)return n;var p=!d&&e.pointBetween(a,c,u),m=!f&&e.pointBetween(s,c,u);if(d)return m?l(n,s):l(t,u),n;p&&(f||(m?l(n,s):l(t,u)),l(n,a))}else 0===h.alongA&&(-1===h.alongB?l(t,c):0===h.alongB?l(t,h.pt):1===h.alongB&&l(t,u)),0===h.alongB&&(-1===h.alongA?l(n,a):0===h.alongA?l(n,h.pt):1===h.alongA&&l(n,s));return!1}for(var h=[];!o.isEmpty();){var d=o.getHead();if(r&&r.vert(d.pt[0]),d.isStart){r&&r.segmentNew(d.seg,d.primary);var f=c(d),p=f.before?f.before.ev:null,m=f.after?f.after.ev:null;function g(){if(p){var t=u(d,p);if(t)return t}return!!m&&u(d,m)}r&&r.tempStatus(d.seg,!!p&&p.seg,!!m&&m.seg);var v,b,y=g();if(y)t?(b=null===d.seg.myFill.below||d.seg.myFill.above!==d.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above):y.seg.otherFill=d.seg.myFill,r&&r.segmentUpdate(y.seg),d.other.remove(),d.remove();if(o.getHead()!==d){r&&r.rewind(d.seg);continue}t?(b=null===d.seg.myFill.below||d.seg.myFill.above!==d.seg.myFill.below,d.seg.myFill.below=m?m.seg.myFill.above:i,d.seg.myFill.above=b?!d.seg.myFill.below:d.seg.myFill.below):null===d.seg.otherFill&&(v=m?d.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:d.primary?a:i,d.seg.otherFill={above:v,below:v}),r&&r.status(d.seg,!!p&&p.seg,!!m&&m.seg),d.other.status=f.insert(n.node({ev:d}))}else{var x=d.status;if(null===x)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(x.prev)&&s.exists(x.next)&&u(x.prev.ev,x.next.ev),r&&r.statusRemove(x.ev.seg),x.remove(),!d.primary){var _=d.seg.myFill;d.seg.myFill=d.seg.otherFill,d.seg.otherFill=_}h.push(d.seg)}o.getHead().remove()}return r&&r.done(),h}return t?{addRegion:function(t){for(var n,i,o,a=t[t.length-1],l=0;l{t.exports={create:function(){var t={root:{root:!0,next:null},exists:function(e){return null!==e&&e!==t.root},isEmpty:function(){return null===t.root.next},getHead:function(){return t.root.next},insertBefore:function(e,r){for(var n=t.root,i=t.root.next;null!==i;){if(r(i))return e.prev=i.prev,e.next=i,i.prev.next=e,void(i.prev=e);n=i,i=i.next}n.next=e,e.prev=n,e.next=null},findTransition:function(e){for(var r=t.root,n=t.root.next;null!==n&&!e(n);)r=n,n=n.next;return{before:r===t.root?null:r,after:n,insert:function(t){return t.prev=r,t.next=n,r.next=t,null!==n&&(n.prev=t),t}}}};return t},node:function(t){return t.prev=null,t.next=null,t.remove=function(){t.prev.next=t.next,t.next&&(t.next.prev=t.prev),t.prev=null,t.next=null},t}}},31997:t=>{t.exports=function(t,e,r){var n=[],i=[];return t.forEach((function(t){var o=t.start,a=t.end;if(e.pointsSame(o,a))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{r&&r.chainStart(t);for(var s={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},c=s,u=0;u{function e(t,e,r){var n=[];return t.forEach((function(t){var i=(t.myFill.above?8:0)+(t.myFill.below?4:0)+(t.otherFill&&t.otherFill.above?2:0)+(t.otherFill&&t.otherFill.below?1:0);0!==e[i]&&n.push({id:r?r.segmentId():-1,start:t.start,end:t.end,myFill:{above:1===e[i],below:2===e[i]},otherFill:null})})),r&&r.selected(n),n}var r={union:function(t,r){return e(t,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(t,r){return e(t,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(t,r){return e(t,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(t,r){return e(t,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(t,r){return e(t,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};t.exports=r},97905:t=>{"use strict";t.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},39807:t=>{var e,r,n=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var s,l=[],c=!1,u=-1;function h(){c&&s&&(c=!1,s.length?l=s.concat(l):u=-1,l.length&&d())}function d(){if(!c){var t=a(h);c=!0;for(var e=l.length;e;){for(s=l,l=[];++u1)for(var r=1;r{"use strict";var n=r(25359),i=r(34463),o=r(6313),a=r(9994),s=r(34597),l=r(97e3),c=r(91101),u=c.float32,h=c.fract32;t.exports=function(t,e){if("function"==typeof t?(e||(e={}),e.regl=t):e=t,e.length&&(e.positions=e),!(t=e.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var r,c,f,p,m,g,v=t._gl,b={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},y=[];return p=t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),c=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),f=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),m=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=t.buffer({usage:"static",type:"float",data:d}),k(e),r=t({vert:"\n\t\tprecision highp float;\n\n\t\tattribute vec2 position, positionFract;\n\t\tattribute vec4 error;\n\t\tattribute vec4 color;\n\n\t\tattribute vec2 direction, lineOffset, capOffset;\n\n\t\tuniform vec4 viewport;\n\t\tuniform float lineWidth, capSize;\n\t\tuniform vec2 scale, scaleFract, translate, translateFract;\n\n\t\tvarying vec4 fragColor;\n\n\t\tvoid main() {\n\t\t\tfragColor = color / 255.;\n\n\t\t\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\n\n\t\t\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\n\n\t\t\tvec2 position = position + dxy;\n\n\t\t\tvec2 pos = (position + translate) * scale\n\t\t\t\t+ (positionFract + translateFract) * scale\n\t\t\t\t+ (position + translate) * scaleFract\n\t\t\t\t+ (positionFract + translateFract) * scaleFract;\n\n\t\t\tpos += pixelOffset / viewport.zw;\n\n\t\t\tgl_Position = vec4(pos * 2. - 1., 0, 1);\n\t\t}\n\t\t",frag:"\n\t\tprecision highp float;\n\n\t\tvarying vec4 fragColor;\n\n\t\tuniform float opacity;\n\n\t\tvoid main() {\n\t\t\tgl_FragColor = fragColor;\n\t\t\tgl_FragColor.a *= opacity;\n\t\t}\n\t\t",uniforms:{range:t.prop("range"),lineWidth:t.prop("lineWidth"),capSize:t.prop("capSize"),opacity:t.prop("opacity"),scale:t.prop("scale"),translate:t.prop("translate"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{color:{buffer:p,offset:function(t,e){return 4*e.offset},divisor:1},position:{buffer:c,offset:function(t,e){return 8*e.offset},divisor:1},positionFract:{buffer:f,offset:function(t,e){return 8*e.offset},divisor:1},error:{buffer:m,offset:function(t,e){return 16*e.offset},divisor:1},direction:{buffer:g,stride:24,offset:0},lineOffset:{buffer:g,stride:24,offset:8},capOffset:{buffer:g,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:t.prop("viewport")},viewport:t.prop("viewport"),stencil:!1,instances:t.prop("count"),count:d.length}),s(x,{update:k,draw:_,destroy:A,regl:t,gl:v,canvas:v.canvas,groups:y}),x;function x(t){t?k(t):null===t&&A(),_()}function _(e){if("number"==typeof e)return w(e);e&&!Array.isArray(e)&&(e=[e]),t._refresh(),y.forEach((function(t,r){t&&(e&&(e[r]?t.draw=!0:t.draw=!1),t.draw?w(r):t.draw=!0)}))}function w(t){"number"==typeof t&&(t=y[t]),null!=t&&t&&t.count&&t.color&&t.opacity&&t.positions&&t.positions.length>1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function k(t){if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(x.groups=y=t.map((function(t,c){var u=y[c];return t?("function"==typeof t?t={after:t}:"number"==typeof t[0]&&(t={positions:t}),t=a(t,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),u||(y[c]=u={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},b,t)),o(u,t,[{lineWidth:function(t){return.5*+t},capSize:function(t){return.5*+t},opacity:parseFloat,errors:function(t){return t=l(t),r+=t.length,t},positions:function(t,r){return t=l(t,"float64"),r.count=Math.floor(t.length/2),r.bounds=n(t,2),r.offset=e,e+=r.count,t}},{color:function(t,e){var r=e.count;if(t||(t="transparent"),!Array.isArray(t)||"number"==typeof t[0]){var n=t;t=Array(r);for(var o=0;o{"use strict";var n=r(34463),i=r(25359),o=r(34597),a=r(9994),s=r(97e3),l=r(31587),c=r(2433),u=r(91101),h=u.float32,d=u.fract32,f=r(41456),p=r(94698),m=r(72268);function g(t,e){if(!(this instanceof g))return new g(t,e);if("function"==typeof t?(e||(e={}),e.regl=t):e=t,e.length&&(e.positions=e),!(t=e.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=t._gl,this.regl=t,this.passes=[],this.shaders=g.shaders.has(t)?g.shaders.get(t):g.shaders.set(t,g.createShaders(t)).get(t),this.update(e)}t.exports=g,g.dashMult=2,g.maxPatternLength=256,g.precisionThreshold=3e6,g.maxPoints=1e4,g.maxLines=2048,g.shaders=new f,g.createShaders=function(t){var e,r=t.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),n={primitive:"triangle strip",instances:t.prop("count"),count:4,offset:0,uniforms:{miterMode:function(t,e){return"round"===e.join?2:1},miterLimit:t.prop("miterLimit"),scale:t.prop("scale"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),translate:t.prop("translate"),thickness:t.prop("thickness"),dashTexture:t.prop("dashTexture"),opacity:t.prop("opacity"),pixelRatio:t.context("pixelRatio"),id:t.prop("id"),dashLength:t.prop("dashLength"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]},depth:t.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:function(t,e){return!e.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:t.prop("viewport")},viewport:t.prop("viewport")},i=t(o({vert:"\nprecision highp float;\n\nattribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;\nattribute vec4 color;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {\n\t// the order is important\n\treturn position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n}\n\nvoid main() {\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineOffset = lineTop * 2. - 1.;\n\n\tvec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);\n\ttangent = normalize(diff * scale * viewport.zw);\n\tvec2 normal = vec2(-tangent.y, tangent.x);\n\n\tvec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart\n\t\t+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd\n\n\t\t+ thickness * normal * .5 * lineOffset / viewport.zw;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n}\n",frag:"\nprecision highp float;\n\nuniform float dashLength, pixelRatio, thickness, opacity, id;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvoid main() {\n\tfloat alpha = 1.;\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n",attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},n));try{e=t(o({cull:{enable:!0,face:"back"},vert:"\nprecision highp float;\n\nattribute vec2 aCoord, bCoord, nextCoord, prevCoord;\nattribute vec4 aColor, bColor;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, translate;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\nuniform float miterLimit, miterMode;\n\nvarying vec4 fragColor;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 tangent;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nconst float REVERSE_THRESHOLD = -.875;\nconst float MIN_DIFF = 1e-6;\n\n// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead\n// TODO: precalculate dot products, normalize things beforehead etc.\n// TODO: refactor to rectangular algorithm\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nbool isNaN( float val ){\n return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n}\n\nvoid main() {\n\tvec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;\n\n vec2 adjustedScale;\n adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;\n adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;\n\n vec2 scaleRatio = adjustedScale * viewport.zw;\n\tvec2 normalWidth = thickness / scaleRatio;\n\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineBot = 1. - lineTop;\n\n\tfragColor = (lineStart * aColor + lineEnd * bColor) / 255.;\n\n\tif (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;\n\n\tif (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);\n\tif (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);\n\n\n\tvec2 prevDiff = aCoord - prevCoord;\n\tvec2 currDiff = bCoord - aCoord;\n\tvec2 nextDiff = nextCoord - bCoord;\n\n\tvec2 prevTangent = normalize(prevDiff * scaleRatio);\n\tvec2 currTangent = normalize(currDiff * scaleRatio);\n\tvec2 nextTangent = normalize(nextDiff * scaleRatio);\n\n\tvec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);\n\tvec2 currNormal = vec2(-currTangent.y, currTangent.x);\n\tvec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);\n\n\tvec2 startJoinDirection = normalize(prevTangent - currTangent);\n\tvec2 endJoinDirection = normalize(currTangent - nextTangent);\n\n\t// collapsed/unidirectional segment cases\n\t// FIXME: there should be more elegant solution\n\tvec2 prevTanDiff = abs(prevTangent - currTangent);\n\tvec2 nextTanDiff = abs(nextTangent - currTangent);\n\tif (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {\n\t\tstartJoinDirection = currNormal;\n\t}\n\tif (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {\n\t\tendJoinDirection = currNormal;\n\t}\n\tif (aCoord == bCoord) {\n\t\tendJoinDirection = startJoinDirection;\n\t\tcurrNormal = prevNormal;\n\t\tcurrTangent = prevTangent;\n\t}\n\n\ttangent = currTangent;\n\n\t//calculate join shifts relative to normals\n\tfloat startJoinShift = dot(currNormal, startJoinDirection);\n\tfloat endJoinShift = dot(currNormal, endJoinDirection);\n\n\tfloat startMiterRatio = abs(1. / startJoinShift);\n\tfloat endMiterRatio = abs(1. / endJoinShift);\n\n\tvec2 startJoin = startJoinDirection * startMiterRatio;\n\tvec2 endJoin = endJoinDirection * endMiterRatio;\n\n\tvec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;\n\tstartTopJoin = sign(startJoinShift) * startJoin * .5;\n\tstartBotJoin = -startTopJoin;\n\n\tendTopJoin = sign(endJoinShift) * endJoin * .5;\n\tendBotJoin = -endTopJoin;\n\n\tvec2 aTopCoord = aCoord + normalWidth * startTopJoin;\n\tvec2 bTopCoord = bCoord + normalWidth * endTopJoin;\n\tvec2 aBotCoord = aCoord + normalWidth * startBotJoin;\n\tvec2 bBotCoord = bCoord + normalWidth * endBotJoin;\n\n\t//miter anti-clipping\n\tfloat baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));\n\tfloat abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));\n\n\t//prevent close to reverse direction switch\n\tbool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) < length(normalWidth * currNormal);\n\tbool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) < length(normalWidth * currNormal);\n\n\tif (prevReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);\n\t\taBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\taTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n",frag:"\nprecision highp float;\n\nuniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n",attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch(t){e=i}return{fill:t({primitive:"triangle",elements:function(t,e){return e.triangles},offset:0,vert:"\nprecision highp float;\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n",frag:"\nprecision highp float;\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n",uniforms:{scale:t.prop("scale"),color:t.prop("fill"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),translate:t.prop("translate"),opacity:t.prop("opacity"),pixelRatio:t.context("pixelRatio"),id:t.prop("id"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{position:{buffer:t.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:i,miter:e}},g.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},g.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];e.length&&(t=this).update.apply(t,e),this.draw()},g.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length?e:this.passes).forEach((function(e,r){var n;if(e&&Array.isArray(e))return(n=t).draw.apply(n,e);"number"==typeof e&&(e=t.passes[e]),e&&e.count>1&&e.opacity&&(t.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&t.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>g.precisionThreshold||e.scale[1]*e.viewport.height>g.precisionThreshold||"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=g.maxPoints)?t.shaders.rect(e):t.shaders.miter(e)))})),this},g.prototype.update=function(t){var e=this;if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var r=this.regl,u=this.gl;if(t.forEach((function(t,f){var v=e.passes[f];if(void 0!==t)if(null!==t){if("number"==typeof t[0]&&(t={positions:t}),t=a(t,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),v||(e.passes[f]=v={id:f,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:r.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},t=o({},g.defaults,t)),null!=t.thickness&&(v.thickness=parseFloat(t.thickness)),null!=t.opacity&&(v.opacity=parseFloat(t.opacity)),null!=t.miterLimit&&(v.miterLimit=parseFloat(t.miterLimit)),null!=t.overlay&&(v.overlay=!!t.overlay,f=R}));(O=O.slice(0,F)).push(R)}for(var P=function(t){var e=A.slice(2*I,2*O[t]).concat(R?A.slice(2*R):[]),r=(v.hole||[]).map((function(e){return e-R+(O[t]-I)})),n=l(e,r);n=n.map((function(e){return e+I+(e+I{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r 1.0 + delta) {\n\t\tdiscard;\n\t}\n\n\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n\tfloat borderRadius = fragBorderRadius;\n\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n\tcolor.a *= alpha * opacity;\n\tgl_FragColor = color;\n}\n"]),l.vert=h(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\n// `invariant` effectively turns off optimizations for the position.\n// We need this because -fast-math on M1 Macs is re-ordering\n// floating point operations in a way that causes floating point\n// precision limits to put points in the wrong locations.\ninvariant gl_Position;\n\nuniform bool constPointSize;\nuniform float pixelRatio;\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\nuniform sampler2D paletteTexture;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(paletteTexture,\n vec2(\n (id.x + .5) / paletteSize.x,\n (id.y + .5) / paletteSize.y\n )\n );\n}\n\nvoid main() {\n // ignore inactive points\n if (isActive == 0.) return;\n\n vec2 position = vec2(x, y);\n vec2 positionFract = vec2(xFract, yFract);\n\n vec4 color = getColor(colorId);\n vec4 borderColor = getColor(borderColorId);\n\n float size = size * maxSize / 255.;\n float borderSize = borderSize * maxSize / 255.;\n\n gl_PointSize = (size + borderSize) * pointSizeScale;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0., 1.);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),m&&(l.frag=l.frag.replace("smoothstep","smoothStep"),s.frag=s.frag.replace("smoothstep","smoothStep")),this.drawCircle=t(l)}y.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},y.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},y.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;nn)?e.tree=c(t,{bounds:h}):n&&n.length&&(e.tree=n),e.tree){var d={primitive:"points",usage:"static",data:e.tree,type:"uint32"};e.elements?e.elements(d):e.elements=a.elements(d)}var f=g.float32(t);return i({data:f,usage:"dynamic"}),o({data:g.fract32(t,f),usage:"dynamic"}),l({data:new Uint8Array(u),type:"uint8",usage:"stream"}),t}},{marker:function(e,r,n){var i=r.activation;if(i.forEach((function(t){return t&&t.destroy&&t.destroy()})),i.length=0,e&&"number"!=typeof e[0]){for(var o=[],s=0,l=Math.min(e.length,r.count);s=0)return o;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)e=t;else{e=new Uint8Array(t.length);for(var a=0,s=t.length;a4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},y.prototype.updatePalette=function(t){if(!this.tooManyColors){var e=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*t.length/e);if(n>1)for(var i=.25*(t=t.slice()).length%e;i>>=e))<<3,(e|=r=(15<(t>>>=r))<<2)|(r=(3<(t>>>=r))<<1)|t>>>r>>1}function l(){function t(t){t:{for(var e=16;268435456>=e;e*=16)if(t<=e){t=e;break t}t=0}return 0<(e=r[s(t)>>2]).length?e.pop():new ArrayBuffer(t)}function e(t){r[s(t.byteLength)>>2].push(t)}var r=a(8,(function(){return[]}));return{alloc:t,free:e,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(t){e(t.buffer)}}}function c(t){return!!t&&"object"==typeof t&&Array.isArray(t.shape)&&Array.isArray(t.stride)&&"number"==typeof t.offset&&t.shape.length===t.stride.length&&(Array.isArray(t.data)||K(t.data))}function u(t,e,r,n,i,o){for(var a=0;a(i=s)&&(i=n.buffer.byteLength,5123===h?i>>=1:5125===h&&(i>>=2)),n.vertCount=i,i=a,0>a&&(i=4,1===(a=n.buffer.dimension)&&(i=0),2===a&&(i=1),3===a&&(i=4)),n.primType=i}function a(t){n.elementsCount--,delete s[t.id],t.buffer.destroy(),t.buffer=null}var s={},l=0,u={uint8:5121,uint16:5123};e.oes_element_index_uint&&(u.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var h=[];return{create:function(t,e){function s(t){if(t)if("number"==typeof t)l(t),h.primType=4,h.vertCount=0|t,h.type=5121;else{var e=null,r=35044,n=-1,i=-1,a=0,d=0;Array.isArray(t)||K(t)||c(t)?e=t:("data"in t&&(e=t.data),"usage"in t&&(r=nt[t.usage]),"primitive"in t&&(n=st[t.primitive]),"count"in t&&(i=0|t.count),"type"in t&&(d=u[t.type]),"length"in t?a=0|t.length:(a=i,5123===d||5122===d?a*=2:5125!==d&&5124!==d||(a*=4))),o(h,e,r,n,i,a,d)}else l(),h.primType=4,h.vertCount=0,h.type=5121;return s}var l=r.create(null,34963,!0),h=new i(l._buffer);return n.elementsCount++,s(t),s._reglType="elements",s._elements=h,s.subdata=function(t,e){return l.subdata(t,e),s},s.destroy=function(){a(h)},s},createStream:function(t){var e=h.pop();return e||(e=new i(r.create(null,34963,!0,!1)._buffer)),o(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){h.push(t)},getElements:function(t){return"function"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){Q(s).forEach(a)}}}function v(t){for(var e=$.allocType(5123,t.length),r=0;r>>31<<15,i=(o<<1>>>24)-127,o=o>>13&1023;e[r]=-24>i?n:-14>i?n+(o+1024>>-14-i):15>=i,r.height>>=i,f(r,n[i]),t.mipmask|=1<e;++e)t.images[e]=null;return t}function L(t){for(var e=t.images,r=0;re){for(var r=0;r=--this.refCount&&P(this)}}),a.profile&&(o.getTotalTextureSize=function(){var t=0;return Object.keys(ct).forEach((function(e){t+=ct[e].stats.size})),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;z.call(r);var o=E();return"number"==typeof t?T(o,0|t,"number"==typeof e?0|e:0|t):t?(O(r,t),S(o,t)):T(o,1,1),r.genMipmaps&&(o.mipmask=(o.width<<1)-1),i.mipmask=o.mipmask,l(i,o),i.internalformat=o.internalformat,n.width=o.width,n.height=o.height,R(i),C(o,3553),D(r,3553),F(),L(o),a.profile&&(i.stats.size=M(i.internalformat,i.type,o.width,o.height,r.genMipmaps,!1)),n.format=X[i.internalformat],n.type=J[i.type],n.mag=rt[r.magFilter],n.min=nt[r.minFilter],n.wrapS=it[r.wrapS],n.wrapT=it[r.wrapT],n}var i=new I(3553);return ct[i.id]=i,o.textureCount++,n(e,r),n.subimage=function(t,e,r,o){e|=0,r|=0,o|=0;var a=m();return l(a,i),a.width=0,a.height=0,f(a,t),a.width=a.width||(i.width>>o)-e,a.height=a.height||(i.height>>o)-r,R(i),p(a,3553,e,r,o),F(),g(a),n},n.resize=function(e,r){var o=0|e,s=0|r||o;if(o===i.width&&s===i.height)return n;n.width=i.width=o,n.height=i.height=s,R(i);for(var l=0;i.mipmask>>l;++l){var c=o>>l,u=s>>l;if(!c||!u)break;t.texImage2D(3553,l,i.format,c,u,0,i.format,i.type,null)}return F(),a.profile&&(i.stats.size=M(i.internalformat,i.type,o,s,!1,!1)),n},n._reglType="texture2d",n._texture=i,a.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,n,i,s,c){function h(t,e,r,n,i,o){var s,c=d.texInfo;for(z.call(c),s=0;6>s;++s)v[s]=E();if("number"!=typeof t&&t){if("object"==typeof t)if(e)S(v[0],t),S(v[1],e),S(v[2],r),S(v[3],n),S(v[4],i),S(v[5],o);else if(O(c,t),u(d,t),"faces"in t)for(t=t.faces,s=0;6>s;++s)l(v[s],d),S(v[s],t[s]);else for(s=0;6>s;++s)S(v[s],t)}else for(t=0|t||1,s=0;6>s;++s)T(v[s],t,t);for(l(d,v[0]),d.mipmask=c.genMipmaps?(v[0].width<<1)-1:v[0].mipmask,d.internalformat=v[0].internalformat,h.width=v[0].width,h.height=v[0].height,R(d),s=0;6>s;++s)C(v[s],34069+s);for(D(c,34067),F(),a.profile&&(d.stats.size=M(d.internalformat,d.type,h.width,h.height,c.genMipmaps,!0)),h.format=X[d.internalformat],h.type=J[d.type],h.mag=rt[c.magFilter],h.min=nt[c.minFilter],h.wrapS=it[c.wrapS],h.wrapT=it[c.wrapT],s=0;6>s;++s)L(v[s]);return h}var d=new I(34067);ct[d.id]=d,o.cubeCount++;var v=Array(6);return h(e,r,n,i,s,c),h.subimage=function(t,e,r,n,i){r|=0,n|=0,i|=0;var o=m();return l(o,d),o.width=0,o.height=0,f(o,e),o.width=o.width||(d.width>>i)-r,o.height=o.height||(d.height>>i)-n,R(d),p(o,34069+t,r,n,i),F(),g(o),h},h.resize=function(e){if((e|=0)!==d.width){h.width=d.width=e,h.height=d.height=e,R(d);for(var r=0;6>r;++r)for(var n=0;d.mipmask>>n;++n)t.texImage2D(34069+r,n,d.format,e>>n,e>>n,0,d.format,d.type,null);return F(),a.profile&&(d.stats.size=M(d.internalformat,d.type,h.width,h.height,!1,!0)),h}},h._reglType="textureCube",h._texture=d,a.profile&&(h.stats=d.stats),h.destroy=function(){d.decRef()},h},clear:function(){for(var e=0;er;++r)if(e.mipmask&1<>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;6>n;++n)t.texImage2D(34069+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);D(e.texInfo,e.target)}))},refresh:function(){for(var e=0;ei;++i){for(c=0;ct;++t)r[t].resize(n);return e.width=e.height=n,e},_reglType:"framebufferCube",destroy:function(){r.forEach((function(t){t.destroy()}))}})},clear:function(){Q(A).forEach(g)},restore:function(){y.cur=null,y.next=null,y.dirty=!0,Q(A).forEach((function(e){e.framebuffer=t.createFramebuffer(),v(e)}))}})}function C(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function E(t,e,r,n,i,o,a){function s(){this.id=++h,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var t=e.oes_vertex_array_object;this.vao=t?t.createVertexArrayOES():null,d[this.id]=this,this.buffers=[]}var l=r.maxAttributes,u=Array(l);for(r=0;r=d.byteLength?l.subdata(d):(l.destroy(),r.buffers[s]=null)),r.buffers[s]||(l=r.buffers[s]=i.create(u,34962,!1,!0)),h.buffer=i.getBuffer(l),h.size=0|h.buffer.dimension,h.normalized=!1,h.type=h.buffer.dtype,h.offset=0,h.stride=0,h.divisor=0,h.state=1,t[s]=1):i.getBuffer(u)?(h.buffer=i.getBuffer(u),h.size=0|h.buffer.dimension,h.normalized=!1,h.type=h.buffer.dtype,h.offset=0,h.stride=0,h.divisor=0,h.state=1):i.getBuffer(u.buffer)?(h.buffer=i.getBuffer(u.buffer),h.size=0|(+u.size||h.buffer.dimension),h.normalized=!!u.normalized||!1,h.type="type"in u?rt[u.type]:h.buffer.dtype,h.offset=0|(u.offset||0),h.stride=0|(u.stride||0),h.divisor=0|(u.divisor||0),h.state=1):"x"in u&&(h.x=+u.x||0,h.y=+u.y||0,h.z=+u.z||0,h.w=+u.w||0,h.state=2)}for(l=0;lt&&(t=e.stats.uniformsCount)})),t},r.getMaxAttributesCount=function(){var t=0;return d.forEach((function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)})),t}),{clear:function(){var e=t.deleteShader.bind(t);Q(c).forEach(e),c={},Q(u).forEach(e),u={},d.forEach((function(e){t.deleteProgram(e.program)})),d.length=0,h={},r.shaderCount=0},program:function(e,n,i,o){var a=h[n];a||(a=h[n]={});var f=a[e];if(f&&(f.refCount++,!o))return f;var p=new s(n,e);return r.shaderCount++,l(p,i,o),f||(a[e]=p),d.push(p),W(p,{destroy:function(){if(p.refCount--,0>=p.refCount){t.deleteProgram(p.program);var e=d.indexOf(p);d.splice(e,1),r.shaderCount--}0>=a[p.vertId].refCount&&(t.deleteShader(u[p.vertId]),delete u[p.vertId],delete h[p.fragId][p.vertId]),Object.keys(h[p.fragId]).length||(t.deleteShader(c[p.fragId]),delete c[p.fragId],delete h[p.fragId])}})},restore:function(){c={},u={};for(var t=0;t>>e|t<<32-e}function D(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function I(t){return Array.prototype.slice.call(t)}function R(t){return I(t).join("")}function F(t){function e(){var t=[],e=[];return W((function(){t.push.apply(t,I(arguments))}),{def:function(){var r="v"+i++;return e.push(r),0>>4&15)+"0123456789abcdef".charAt(15&e);return r}(function(t){for(var e=Array(t.length>>2),r=0;r>5]|=(255&t.charCodeAt(r/8))<<24-r%32;var n,i,o,a,s,l,c,u,h,d,f,p=8*t.length;for(t=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],r=Array(64),e[p>>5]|=128<<24-p%32,e[15+(p+64>>9<<4)]=p,u=0;uh;h++){var m;16>h?r[h]=e[h+u]:(d=h,f=D(f=O(f=r[h-2],17)^O(f,19)^f>>>10,r[h-7]),m=O(m=r[h-15],7)^O(m,18)^m>>>3,r[d]=D(D(f,m),r[h-16])),d=D(D(D(D(c,d=O(d=a,6)^O(d,11)^O(d,25)),a&s^~a&l),Tt[h]),r[h]),f=D(c=O(c=p,2)^O(c,13)^O(c,22),p&n^p&i^n&i),c=l,l=s,s=a,a=D(o,d),o=i,i=n,n=p,p=D(d,f)}t[0]=D(p,t[0]),t[1]=D(n,t[1]),t[2]=D(i,t[2]),t[3]=D(o,t[3]),t[4]=D(a,t[4]),t[5]=D(s,t[5]),t[6]=D(l,t[6]),t[7]=D(c,t[7])}for(e="",r=0;r<32*t.length;r+=8)e+=String.fromCharCode(t[r>>5]>>>24-r%32&255);return e}(function(t){for(var e,r,n="",i=-1;++i=e&&56320<=r&&57343>=r&&(e=65536+((1023&e)<<10)+(1023&r),i++),127>=e?n+=String.fromCharCode(e):2047>=e?n+=String.fromCharCode(192|e>>>6&31,128|63&e):65535>=e?n+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):2097151>=e&&(n+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return n}(r))),n[e])?n[e].apply(null,a):(r=Function.apply(null,o.concat(r)),n&&(n[e]=r),r.apply(null,a))}}}function P(t){return Array.isArray(t)||K(t)||c(t)}function N(t){return t.sort((function(t,e){return"viewport"===t?-1:"viewport"===e?1:t"+e+"?"+i+".constant["+e+"]:0;"})).join(""),"}}else{","if(",s,"(",i,".buffer)){",u,"=",o,".createStream(",34962,",",i,".buffer);","}else{",u,"=",o,".getBuffer(",i,".buffer);","}",h,'="type" in ',i,"?",a.glTypes,"[",i,".type]:",u,".dtype;",l.normalized,"=!!",i,".normalized;"),n("size"),n("offset"),n("stride"),n("divisor"),r("}}"),r.exit("if(",l.isStream,"){",o,".destroyStream(",u,");","}"),l}))})),a}function T(t,e,n,i,o){function s(t){var e=c[t];e&&(d[t]=e)}var l=function(t,e){if("string"==typeof(r=t.static).frag&&"string"==typeof r.vert){if(0>1)",s],");")}function e(){r(l,".drawArraysInstancedANGLE(",[p,m,g,s],");")}f&&"null"!==f?b?t():(r("if(",f,"){"),t(),r("}else{"),e(),r("}")):e()}function a(){function t(){r(u+".drawElements("+[p,g,v,m+"<<(("+v+"-5121)>>1)"]+");")}function e(){r(u+".drawArrays("+[p,m,g]+");")}f&&"null"!==f?b?t():(r("if(",f,"){"),t(),r("}else{"),e(),r("}")):e()}var s,l,c=t.shared,u=c.gl,h=c.draw,d=n.draw,f=function(){var i=d.elements,o=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(o=r),i=i.append(t,o),d.elementsActive&&o("if("+i+")"+u+".bindBuffer(34963,"+i+".buffer.buffer);")):(i=o.def(),o(i,"=",h,".","elements",";","if(",i,"){",u,".bindBuffer(",34963,",",i,".buffer.buffer);}","else if(",c.vao,".currentVAO){",i,"=",t.shared.elements+".getElements("+c.vao,".currentVAO.elements);",et?"":"if("+i+")"+u+".bindBuffer(34963,"+i+".buffer.buffer);","}")),i}(),p=i("primitive"),m=i("offset"),g=function(){var i=d.count,o=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(o=r),i=i.append(t,o)):i=o.def(h,".","count"),i}();if("number"==typeof g){if(0===g)return}else r("if(",g,"){"),r.exit("}");Q&&(s=i("instances"),l=t.instancing);var v=f+".type",b=d.elements&&B(d.elements)&&!d.vaoActive;Q&&("number"!=typeof s||0<=s)?"string"==typeof s?(r("if(",s,">0){"),o(),r("}else if(",s,"<0){"),a(),r("}")):o():a()}function V(t,e,r,n,i){return i=(e=_()).proc("body",i),Q&&(e.instancing=i.def(e.shared.extensions,".angle_instanced_arrays")),t(e,i,r,n),e.compile().body}function H(t,e,r,n){z(t,e),r.useVAO?r.drawVAO?e(t.shared.vao,".setVAO(",r.drawVAO.append(t,e),");"):e(t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"):(e(t.shared.vao,".setVAO(null);"),D(t,e,r,n.attributes,(function(){return!0}))),I(t,e,r,n.uniforms,(function(){return!0}),!1),R(t,e,e,r)}function q(t,e,r,n){function i(){return!0}t.batchId="a1",z(t,e),D(t,e,r,n.attributes,i),I(t,e,r,n.uniforms,i,!1),R(t,e,e,r)}function Z(t,e,r,n){function i(t){return t.contextDep&&a||t.propDep}function o(t){return!i(t)}z(t,e);var a=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var c=t.scope(),u=t.scope();e(c.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",u,"}",c.exit),r.needsContext&&S(t,u,r.context),r.needsFramebuffer&&C(t,u,r.framebuffer),L(t,u,r.state,i),r.profile&&i(r.profile)&&O(t,u,r,!1,!0),n?(r.useVAO?r.drawVAO?i(r.drawVAO)?u(t.shared.vao,".setVAO(",r.drawVAO.append(t,u),");"):c(t.shared.vao,".setVAO(",r.drawVAO.append(t,c),");"):c(t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"):(c(t.shared.vao,".setVAO(null);"),D(t,c,r,n.attributes,o),D(t,u,r,n.attributes,i)),I(t,c,r,n.uniforms,o,!1),I(t,u,r,n.uniforms,i,!0),R(t,c,u,r)):(e=t.global.def("{}"),n=r.shader.progVar.append(t,u),l=u.def(n,".id"),c=u.def(e,"[",l,"]"),u(t.shared.gl,".useProgram(",n,".program);","if(!",c,"){",c,"=",e,"[",l,"]=",t.link((function(e){return V(q,t,r,e,2)})),"(",n,");}",c,".call(this,a0[",s,"],",s,");"))}function X(t,r){function n(e){var n=r.shader[e];n&&(n=n.append(t,i),isNaN(n)?i.set(o.shader,"."+e,n):i.set(o.shader,"."+e,t.link(n,{stable:!0})))}var i=t.proc("scope",3);t.batchId="a2";var o=t.shared,a=o.current;if(S(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),N(Object.keys(r.state)).forEach((function(e){var n=r.state[e],a=n.append(t,i);b(a)?a.forEach((function(r,n){isNaN(r)?i.set(t.next[e],"["+n+"]",r):i.set(t.next[e],"["+n+"]",t.link(r,{stable:!0}))})):B(n)?i.set(o.next,"."+e,t.link(a,{stable:!0})):i.set(o.next,"."+e,a)})),O(t,i,r,!0,!0),["elements","offset","count","instances","primitive"].forEach((function(e){var n=r.draw[e];n&&(n=n.append(t,i),isNaN(n)?i.set(o.draw,"."+e,n):i.set(o.draw,"."+e,t.link(n),{stable:!0}))})),Object.keys(r.uniforms).forEach((function(n){var a=r.uniforms[n].append(t,i);Array.isArray(a)&&(a="["+a.map((function(e){return isNaN(e)?e:t.link(e,{stable:!0})}))+"]"),i.set(o.uniforms,"["+t.link(e.id(n),{stable:!0})+"]",a)})),Object.keys(r.attributes).forEach((function(e){var n=r.attributes[e].append(t,i),o=t.scopeAttrib(e);Object.keys(new J).forEach((function(t){i.set(o,"."+t,n[t])}))})),r.scopeVAO){var s=r.scopeVAO.append(t,i);isNaN(s)?i.set(o.vao,".targetVAO",s):i.set(o.vao,".targetVAO",t.link(s,{stable:!0}))}n("vert"),n("frag"),0=--this.refCount&&a(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(u).forEach((function(e){t+=u[e].stats.size})),t}),{create:function(e,r){function a(e,r){var n=0,o=0,u=32854;if("object"==typeof e&&e?("shape"in e?(n=0|(o=e.shape)[0],o=0|o[1]):("radius"in e&&(n=o=0|e.radius),"width"in e&&(n=0|e.width),"height"in e&&(o=0|e.height)),"format"in e&&(u=s[e.format])):"number"==typeof e?(n=0|e,o="number"==typeof r?0|r:n):e||(n=o=1),n!==c.width||o!==c.height||u!==c.format)return a.width=c.width=n,a.height=c.height=o,c.format=u,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,u,n,o),i.profile&&(c.stats.size=wt[c.format]*c.width*c.height),a.format=l[c.format],a}var c=new o(t.createRenderbuffer());return u[c.id]=c,n.renderbufferCount++,a(e,r),a.resize=function(e,r){var n=0|e,o=0|r||n;return n===c.width&&o===c.height||(a.width=c.width=n,a.height=c.height=o,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,c.format,n,o),i.profile&&(c.stats.size=wt[c.format]*c.width*c.height)),a},a._reglType="renderbuffer",a._renderbuffer=c,i.profile&&(a.stats=c.stats),a.destroy=function(){c.decRef()},a},clear:function(){Q(u).forEach(a)},restore:function(){Q(u).forEach((function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)})),t.bindRenderbuffer(36161,null)}}},At=[];At[6408]=4,At[6407]=3;var Mt=[];Mt[5121]=1,Mt[5126]=4,Mt[36193]=2;var Tt=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],St=["x","y","z","w"],Ct="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Et={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Lt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},zt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ot={cw:2304,ccw:2305},Dt=new j(!1,!1,!1,(function(){}));return function(t){function e(){if(0===$.length)k&&k.update(),et=null;else{et=Z.next(e),h();for(var t=$.length-1;0<=t;--t){var r=$[t];r&&r(O,null,0)}p.flush(),k&&k.update()}}function r(){!et&&0<$.length&&(et=Z.next(e))}function n(){et&&(Z.cancel(e),et=null)}function i(t){t.preventDefault(),n(),K.forEach((function(t){t()}))}function a(t){p.getError(),b.restore(),P.restore(),I.restore(),N.restore(),j.restore(),B.restore(),F.restore(),k&&k.restore(),U.procs.refresh(),r(),Q.forEach((function(t){t()}))}function s(t){function e(t,e){var r={},n={};return Object.keys(t).forEach((function(i){var o=t[i];if(Y.isDynamic(o))n[i]=Y.unbox(o,i);else{if(e&&Array.isArray(o))for(var a=0;a=$.length&&n()}}}}function u(){var t=G.viewport,e=G.scissor_box;t[0]=t[1]=e[0]=e[1]=0,O.viewportWidth=O.framebufferWidth=O.drawingBufferWidth=t[2]=e[2]=p.drawingBufferWidth,O.viewportHeight=O.framebufferHeight=O.drawingBufferHeight=t[3]=e[3]=p.drawingBufferHeight}function h(){O.tick+=1,O.time=f(),u(),U.procs.poll()}function d(){N.refresh(),u(),U.procs.refresh(),k&&k.update()}function f(){return(X()-A)/1e3}if(!(t=o(t)))return null;var p=t.gl,v=p.getContextAttributes();p.isContextLost();var b=function(t,e){function r(e){var r;e=e.toLowerCase();try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},i=0;ie;++e)rt(W({framebuffer:t.framebuffer.faces[e]},t),l);else rt(t,l);else l(0,t)},prop:Y.define.bind(null,1),context:Y.define.bind(null,2),this:Y.define.bind(null,3),draw:s({}),buffer:function(t){return I.create(t,34962,!1,!1)},elements:function(t){return R.create(t,!1)},texture:N.create2D,cube:N.createCube,renderbuffer:j.create,framebuffer:B.create,framebufferCube:B.createCube,vao:F.createVAO,attributes:v,frame:c,on:function(t,e){var r;switch(t){case"frame":return c(e);case"lost":r=K;break;case"restore":r=Q;break;case"destroy":r=tt}return r.push(e),{cancel:function(){for(var t=0;t{"use strict";var n=r(59412),i=r(43362),o=r(20419)(),a=r(55572),s=r(48744),l=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new s("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||l(e)!==e)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in t&&a){var u=a(t,"length");u&&!u.configurable&&(n=!1),u&&!u.writable&&(c=!1)}return(n||c||!r)&&(o?i(t,"length",e,!0,!0):i(t,"length",e)),t}},46492:(t,e,r)=>{"use strict";var n=r(2214);t.exports=function(t,e,r){if(null==t)throw Error("First argument should be a string");if(null==e)throw Error("Separator should be a string or a RegExp");r?("string"==typeof r||Array.isArray(r))&&(r={ignore:r}):r={},null==r.escape&&(r.escape=!0),null==r.ignore?r.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:("string"==typeof r.ignore&&(r.ignore=[r.ignore]),r.ignore=r.ignore.map((function(t){return 1===t.length&&(t+=t),t})));var i=n.parse(t,{flat:!0,brackets:r.ignore}),o=i[0].split(e);if(r.escape){for(var a=[],s=0;s{"use strict";var n=r(37974),i=r(97883),o=r(25058),a=r(12611);t.exports=function(t){if(Array.isArray(t)&&1===t.length&&"string"==typeof t[0]&&(t=t[0]),"string"==typeof t){if(!a(t))throw Error("String is not an SVG path.");t=n(t)}if(!Array.isArray(t))throw Error("Argument should be a string or an array of path segments.");if(t=i(t),!(t=o(t)).length)return[0,0,0,0];for(var e=[1/0,1/0,-1/0,-1/0],r=0,s=t.length;re[2]&&(e[2]=l[c+0]),l[c+1]>e[3]&&(e[3]=l[c+1]);return e}},77622:(t,e,r)=>{"use strict";var n,i=r(75798),o=r(37974),a=r(61085),s=r(12611),l=r(25875),c=document.createElement("canvas"),u=c.getContext("2d");t.exports=function(t,e){if(!s(t))throw Error("Argument should be valid svg path string");var r,h;e||(e={}),e.shape?(r=e.shape[0],h=e.shape[1]):(r=c.width=e.w||e.width||200,h=c.height=e.h||e.height||200);var d=Math.min(r,h),f=e.stroke||0,p=e.viewbox||e.viewBox||i(t),m=[r/(p[2]-p[0]),h/(p[3]-p[1])],g=Math.min(m[0]||0,m[1]||0)/2;if(u.fillStyle="black",u.fillRect(0,0,r,h),u.fillStyle="white",f&&("number"!=typeof f&&(f=1),u.strokeStyle=f>0?"white":"black",u.lineWidth=Math.abs(f)),u.translate(.5*r,.5*h),u.scale(g,g),function(){if(null!=n)return n;var t=document.createElement("canvas").getContext("2d");if(t.canvas.width=t.canvas.height=1,!window.Path2D)return n=!1;var e=new Path2D("M0,0h1v1h-1v-1Z");t.fillStyle="black",t.fill(e);var r=t.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var v=new Path2D(t);u.fill(v),f&&u.stroke(v)}else{var b=o(t);a(u,b),u.fill(),f&&u.stroke()}return u.setTransform(1,0,0,1,0,0),l(u,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*d})}},91101:t=>{"use strict";t.exports=r,t.exports.float32=t.exports.float=r,t.exports.fract32=t.exports.fract=function(t,e){if(t.length){if(t instanceof Float32Array)return new Float32Array(t.length);e instanceof Float32Array||(e=r(t));for(var n=0,i=e.length;n{"use strict";var n=r(3202);t.exports=a;var i=96;function o(t,e){var r=n(getComputedStyle(t).getPropertyValue(e));return r[0]*a(r[1],t)}function a(t,e){switch(e=e||document.body,t=(t||"px").trim().toLowerCase(),e!==window&&e!==document||(e=document.body),t){case"%":return e.clientHeight/100;case"ch":case"ex":return function(t,e){var r=document.createElement("div");r.style["font-size"]="128"+t,e.appendChild(r);var n=o(r,"font-size")/128;return e.removeChild(r),n}(t,e);case"em":return o(e,"font-size");case"rem":return o(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return i;case"cm":return i/2.54;case"mm":return i/25.4;case"pt":return i/72;case"pc":return i/6}return 1}},98479:(t,e,r)=>{"use strict";var n=r(38251);t.exports=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(t){return!1}return!n(t)}},55351:(t,e,r)=>{"use strict";var n=r(36181),i=r(50406);t.exports=function(t,e,r){r&&r.errorMessage&&(t=n(r.errorMessage));var o=t.indexOf("%v"),a=o>-1?i(e):null;if(r&&r.name){var s,l,c,u,h=t.indexOf("%n");if(h>-1)return o>-1?(h>o?(s=a,c=o,l=r.name,u=h):(s=r.name,c=h,l=a,u=o),t.slice(0,c)+s+t.slice(c+2,u)+l+t.slice(u+2)):t.slice(0,h)+r.name+t.slice(h+2)}return o>-1?t.slice(0,o)+a+t.slice(o+2):t}},81114:(t,e,r)=>{"use strict";var n=r(59738),i=r(55351);t.exports=function(t,e,r){if(r&&!n(t)){if("default"in r)return r.default;if(r.isOptional)return null}var o=new(r&&r.Error||TypeError)(i(e,t,r));throw r&&r.errorCode&&(o.code=r.errorCode),o}},74165:t=>{"use strict";t.exports=function(t){try{return t.toString()}catch(e){try{return String(t)}catch(t){return null}}}},50406:(t,e,r)=>{"use strict";var n=r(74165),i=/[\n\r\u2028\u2029]/g;t.exports=function(t){var e=n(t);return null===e?"":(e.length>100&&(e=e.slice(0,99)+"…"),e=e.replace(i,(function(t){switch(t){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})))}},10818:(t,e,r)=>{"use strict";var n=r(59738),i={object:!0,function:!0,undefined:!0};t.exports=function(t){return!!n(t)&&hasOwnProperty.call(i,typeof t)}},4216:(t,e,r)=>{"use strict";var n=r(81114),i=r(15034);t.exports=function(t){if(i(t))return t;var e=arguments[1],r=e&&e.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return n(t,r,e)}},15034:(t,e,r)=>{"use strict";var n=r(98479),i=/^\s*class[\s{/}]/,o=Function.prototype.toString;t.exports=function(t){return!!n(t)&&!i.test(o.call(t))}},38251:(t,e,r)=>{"use strict";var n=r(10818);t.exports=function(t){if(!n(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}}},36181:(t,e,r)=>{"use strict";var n=r(59738),i=r(10818),o=Object.prototype.toString;t.exports=function(t){if(!n(t))return null;if(i(t)){var e=t.toString;if("function"!=typeof e)return null;if(e===o)return null}try{return""+t}catch(t){return null}}},10040:(t,e,r)=>{"use strict";var n=r(81114),i=r(59738);t.exports=function(t){if(i(t))return t;var e=arguments[1],r=e&&e.name?"Expected a value for %n, received %v":"Cannot use %v";return n(t,r,e)}},59738:t=>{"use strict";t.exports=function(t){return null!=t}},31888:(t,e,r)=>{"use strict";var n=r(88828),i=r(31338),o=r(65500).hp;r.g.__TYPEDARRAY_POOL||(r.g.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var a="undefined"!=typeof Uint8ClampedArray,s="undefined"!=typeof BigUint64Array,l="undefined"!=typeof BigInt64Array,c=r.g.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=i([32,0])),c.BIGUINT64||(c.BIGUINT64=i([32,0])),c.BIGINT64||(c.BIGINT64=i([32,0])),c.BUFFER||(c.BUFFER=i([32,0]));var u=c.DATA,h=c.BUFFER;function d(t){if(t){var e=t.length||t.byteLength,r=n.log2(e);u[r].push(t)}}function f(t){t=n.nextPow2(t);var e=n.log2(t),r=u[e];return r.length>0?r.pop():new ArrayBuffer(t)}function p(t){return new Uint8Array(f(t),0,t)}function m(t){return new Uint16Array(f(2*t),0,t)}function g(t){return new Uint32Array(f(4*t),0,t)}function v(t){return new Int8Array(f(t),0,t)}function b(t){return new Int16Array(f(2*t),0,t)}function y(t){return new Int32Array(f(4*t),0,t)}function x(t){return new Float32Array(f(4*t),0,t)}function _(t){return new Float64Array(f(8*t),0,t)}function w(t){return a?new Uint8ClampedArray(f(t),0,t):p(t)}function k(t){return s?new BigUint64Array(f(8*t),0,t):null}function A(t){return l?new BigInt64Array(f(8*t),0,t):null}function M(t){return new DataView(f(t),0,t)}function T(t){t=n.nextPow2(t);var e=n.log2(t),r=h[e];return r.length>0?r.pop():new o(t)}e.free=function(t){if(o.isBuffer(t))h[n.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|n.log2(e);u[r].push(t)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(t){d(t.buffer)},e.freeArrayBuffer=d,e.freeBuffer=function(t){h[n.log2(t.length)].push(t)},e.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return f(t);switch(e){case"uint8":return p(t);case"uint16":return m(t);case"uint32":return g(t);case"int8":return v(t);case"int16":return b(t);case"int32":return y(t);case"float":case"float32":return x(t);case"double":case"float64":return _(t);case"uint8_clamped":return w(t);case"bigint64":return A(t);case"biguint64":return k(t);case"buffer":return T(t);case"data":case"dataview":return M(t);default:return null}return null},e.mallocArrayBuffer=f,e.mallocUint8=p,e.mallocUint16=m,e.mallocUint32=g,e.mallocInt8=v,e.mallocInt16=b,e.mallocInt32=y,e.mallocFloat32=e.mallocFloat=x,e.mallocFloat64=e.mallocDouble=_,e.mallocUint8Clamped=w,e.mallocBigUint64=k,e.mallocBigInt64=A,e.mallocDataView=M,e.mallocBuffer=T,e.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,h[t].length=0}},51183:t=>{var e=/[\'\"]/;t.exports=function(t){return t?(e.test(t.charAt(0))&&(t=t.substr(1)),e.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}},6313:t=>{"use strict";t.exports=function(t,e,r){Array.isArray(r)||(r=[].slice.call(arguments,2));for(var n=0,i=r.length;n{t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},41071:(t,e,r)=>{"use strict";var n=r(68007),i=r(74205),o=r(17478),a=r(94179);function s(t){return t.call.bind(t)}var l="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,u=s(Object.prototype.toString),h=s(Number.prototype.valueOf),d=s(String.prototype.valueOf),f=s(Boolean.prototype.valueOf);if(l)var p=s(BigInt.prototype.valueOf);if(c)var m=s(Symbol.prototype.valueOf);function g(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function v(t){return"[object Map]"===u(t)}function b(t){return"[object Set]"===u(t)}function y(t){return"[object WeakMap]"===u(t)}function x(t){return"[object WeakSet]"===u(t)}function _(t){return"[object ArrayBuffer]"===u(t)}function w(t){return"undefined"!=typeof ArrayBuffer&&(_.working?_(t):t instanceof ArrayBuffer)}function k(t){return"[object DataView]"===u(t)}function A(t){return"undefined"!=typeof DataView&&(k.working?k(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=i,e.isTypedArray=a,e.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},e.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):a(t)||A(t)},e.isUint8Array=function(t){return"Uint8Array"===o(t)},e.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===o(t)},e.isUint16Array=function(t){return"Uint16Array"===o(t)},e.isUint32Array=function(t){return"Uint32Array"===o(t)},e.isInt8Array=function(t){return"Int8Array"===o(t)},e.isInt16Array=function(t){return"Int16Array"===o(t)},e.isInt32Array=function(t){return"Int32Array"===o(t)},e.isFloat32Array=function(t){return"Float32Array"===o(t)},e.isFloat64Array=function(t){return"Float64Array"===o(t)},e.isBigInt64Array=function(t){return"BigInt64Array"===o(t)},e.isBigUint64Array=function(t){return"BigUint64Array"===o(t)},v.working="undefined"!=typeof Map&&v(new Map),e.isMap=function(t){return"undefined"!=typeof Map&&(v.working?v(t):t instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),e.isSet=function(t){return"undefined"!=typeof Set&&(b.working?b(t):t instanceof Set)},y.working="undefined"!=typeof WeakMap&&y(new WeakMap),e.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(y.working?y(t):t instanceof WeakMap)},x.working="undefined"!=typeof WeakSet&&x(new WeakSet),e.isWeakSet=function(t){return x(t)},_.working="undefined"!=typeof ArrayBuffer&&_(new ArrayBuffer),e.isArrayBuffer=w,k.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&k(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=A;var M="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function T(t){return"[object SharedArrayBuffer]"===u(t)}function S(t){return void 0!==M&&(void 0===T.working&&(T.working=T(new M)),T.working?T(t):t instanceof M)}function C(t){return g(t,h)}function E(t){return g(t,d)}function L(t){return g(t,f)}function z(t){return l&&g(t,p)}function O(t){return c&&g(t,m)}e.isSharedArrayBuffer=S,e.isAsyncFunction=function(t){return"[object AsyncFunction]"===u(t)},e.isMapIterator=function(t){return"[object Map Iterator]"===u(t)},e.isSetIterator=function(t){return"[object Set Iterator]"===u(t)},e.isGeneratorObject=function(t){return"[object Generator]"===u(t)},e.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===u(t)},e.isNumberObject=C,e.isStringObject=E,e.isBooleanObject=L,e.isBigIntObject=z,e.isSymbolObject=O,e.isBoxedPrimitive=function(t){return C(t)||E(t)||L(t)||z(t)||O(t)},e.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(w(t)||S(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))},11276:(t,e,r)=>{var n=r(39807),i=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&e._extend(n,r),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),d(n,t,n.depth)}function u(t,e){var r=c.styles[e];return r?"["+c.colors[r][0]+"m"+t+"["+c.colors[r][1]+"m":t}function h(t,e){return t}function d(t,r,n){if(t.customInspect&&r&&M(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=d(t,i,n)),i}var o=function(t,e){if(x(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):v(e)?t.stylize("null","null"):void 0}(t,r);if(o)return o;var a=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),A(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(r);if(0===a.length){if(M(r)){var l=r.name?": "+r.name:"";return t.stylize("[Function"+l+"]","special")}if(_(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return t.stylize(Date.prototype.toString.call(r),"date");if(A(r))return f(r)}var c,u="",h=!1,w=["{","}"];return m(r)&&(h=!0,w=["[","]"]),M(r)&&(u=" [Function"+(r.name?": "+r.name:"")+"]"),_(r)&&(u=" "+RegExp.prototype.toString.call(r)),k(r)&&(u=" "+Date.prototype.toUTCString.call(r)),A(r)&&(u=" "+f(r)),0!==a.length||h&&0!=r.length?n<0?_(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=h?function(t,e,r,n,i){for(var o=[],a=0,s=e.length;a60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(c,u,w)):w[0]+u+w[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,n,i,o){var a,s,l;if((l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),E(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(l.value)<0?(s=v(r)?d(t,l.value,null):d(t,l.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").slice(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function m(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function v(t){return null===t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function x(t){return void 0===t}function _(t){return w(t)&&"[object RegExp]"===T(t)}function w(t){return"object"==typeof t&&null!==t}function k(t){return w(t)&&"[object Date]"===T(t)}function A(t){return w(t)&&("[object Error]"===T(t)||t instanceof Error)}function M(t){return"function"==typeof t}function T(t){return Object.prototype.toString.call(t)}function S(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!a[t])if(s.test(t)){var r=n.pid;a[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else a[t]=function(){};return a[t]},e.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(41071),e.isArray=m,e.isBoolean=g,e.isNull=v,e.isNullOrUndefined=function(t){return null==t},e.isNumber=b,e.isString=y,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=x,e.isRegExp=_,e.types.isRegExp=_,e.isObject=w,e.isDate=k,e.types.isDate=k,e.isError=A,e.types.isNativeError=A,e.isFunction=M,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(26900);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function E(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log("%s - %s",(r=[S((t=new Date).getHours()),S(t.getMinutes()),S(t.getSeconds())].join(":"),[t.getDate(),C[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(9715),e._extend=function(t,e){if(!e||!w(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var L="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function z(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(L&&t[L]){var e;if("function"!=typeof(e=t[L]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,L,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o{var n=r(64487);t.exports=function(t){return n("webgl",t)}},17478:(t,e,r)=>{"use strict";var n=r(85573),i=r(75208),o=r(61398),a=r(24310),s=r(55572),l=a("Object.prototype.toString"),c=r(15541)(),u="undefined"==typeof globalThis?r.g:globalThis,h=i(),d=a("String.prototype.slice"),f=Object.getPrototypeOf,p=a("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r-1?e:"Object"===e&&function(t){var e=!1;return n(m,(function(r,n){if(!e)try{r(t),e=d(n,1)}catch(t){}})),e}(t)}return s?function(t){var e=!1;return n(m,(function(r,n){if(!e)try{"$"+r(t)===n&&(e=d(n,1))}catch(t){}})),e}(t):null}},32688:(t,e,r)=>{"use strict";const n=r(12028);n.register([r(94646),r(72010)]),t.exports=n},90170:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n='\n'},85072:t=>{"use strict";var e=[];function r(t){for(var r=-1,n=0;n{"use strict";var e={};t.exports=function(t,r){var n=function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},10540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},55056:(t,e,r)=>{"use strict";t.exports=function(t){var e=r.nc;e&&t.setAttribute("nonce",e)}},97825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(r){!function(t,e,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var i=void 0!==r.layer;i&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,i&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,r)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},41113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},88862:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(34961),i=r.n(n);class o{constructor(t,e){this._element=t,this._parent=null,this._visible=!1,this._horizontal=this._element.classList.contains("horizontal"),this._property=this._horizontal?"width":"height";const r=this._element.dataset.bsParent;r&&(this._parent=e.querySelector(r),i()(this._parent,"this._parent")),this._element.addEventListener("transitionend",(t=>{t.target===t.currentTarget&&t.propertyName===this._property&&(this._element.classList.replace("collapsing","collapse"),this._visible&&(this._element.classList.add("show"),this._element.style.removeProperty(this._property)))}))}hide(){if(this._visible){const t=this._element.getBoundingClientRect()[this._property];this._element.style.setProperty(this._property,`${t}px`),this._element.classList.replace("collapse","collapsing"),this._element.classList.remove("show"),this._element.offsetHeight,this._element.style.removeProperty(this._property),this._visible=!1,this._parent&&u.get(this._parent)===this&&u.set(this._parent,null)}}show(){var t;if(!this._visible){this._parent&&(null===(t=u.get(this._parent))||void 0===t||t.hide(),u.set(this._parent,this));const e=this._horizontal?"scrollWidth":"scrollHeight";this._element.classList.replace("collapse","collapsing"),this._element.style.setProperty(this._property,"0");const r=this._element[e];this._element.style.setProperty(this._property,`${r}px`),this._visible=!0}}toggle(t=!this._visible){t?this.show():this.hide()}addTrigger(t){t.addEventListener("click",(t=>{t.preventDefault(),this.toggle()}))}static initialize(t=document.body){for(const e of t.querySelectorAll("[data-bs-toggle]"))if(e instanceof HTMLElement&&"bsTarget"in e.dataset){const r=t.querySelector(e.dataset.bsTarget);r&&s(r,t).addTrigger(e)}}}const a=new WeakMap,s=(l=a,c=(t,e)=>new o(t,e),(t,...e)=>{l.has(t)||l.set(t,c(t,...e));const r=l.get(t);return i()(r,"value"),r});var l,c;const u=new WeakMap},17136:(t,e,r)=>{"use strict";function n(t){return t.map((t=>[t[0],`rgb(${t[1][0]}, ${t[1][1]}, ${t[1][2]})`]))}r.d(e,{s:()=>i});const i={inferno:n([[0,[0,0,3]],[.0159,[1,1,9]],[.0317,[3,2,18]],[.0476,[6,4,27]],[.0635,[10,7,35]],[.0794,[15,9,45]],[.0952,[20,11,54]],[.1111,[26,11,64]],[.127,[32,12,74]],[.1429,[39,11,82]],[.1587,[46,10,90]],[.1746,[53,9,96]],[.1905,[60,9,101]],[.2063,[67,10,104]],[.2222,[74,11,106]],[.2381,[80,13,108]],[.254,[88,16,109]],[.2698,[95,18,110]],[.2857,[101,21,110]],[.3016,[107,23,110]],[.3175,[114,25,109]],[.3333,[120,28,109]],[.3492,[126,30,108]],[.3651,[133,32,106]],[.381,[139,34,105]],[.3968,[145,37,103]],[.4127,[152,39,101]],[.4286,[158,41,99]],[.4444,[164,44,96]],[.4603,[171,46,93]],[.4762,[177,49,90]],[.4921,[183,52,86]],[.5079,[190,56,82]],[.5238,[196,60,78]],[.5397,[201,63,74]],[.5556,[207,68,70]],[.5714,[212,72,65]],[.5873,[217,77,61]],[.6032,[221,82,56]],[.619,[226,87,51]],[.6349,[230,92,46]],[.6508,[233,98,42]],[.6667,[237,104,37]],[.6825,[240,111,31]],[.6984,[242,117,26]],[.7143,[245,124,21]],[.7302,[247,131,16]],[.746,[248,138,11]],[.7619,[250,147,6]],[.7778,[251,155,6]],[.7937,[251,162,8]],[.8095,[251,170,14]],[.8254,[251,177,22]],[.8413,[251,185,30]],[.8571,[250,193,40]],[.873,[248,201,49]],[.8889,[247,209,60]],[.9048,[245,217,72]],[.9206,[243,224,86]],[.9365,[241,232,100]],[.9524,[241,238,116]],[.9683,[242,244,133]],[.9841,[246,250,149]],[1,[252,254,164]]]),magma:n([[0,[0,0,3]],[.0159,[1,1,9]],[.0317,[3,3,17]],[.0476,[6,5,25]],[.0635,[10,7,34]],[.0794,[14,10,42]],[.0952,[18,13,51]],[.1111,[23,15,60]],[.127,[28,16,70]],[.1429,[34,17,80]],[.1587,[40,17,89]],[.1746,[47,16,98]],[.1905,[53,15,106]],[.2063,[60,15,113]],[.2222,[67,15,117]],[.2381,[74,16,121]],[.254,[82,18,124]],[.2698,[88,21,126]],[.2857,[94,23,127]],[.3016,[101,26,128]],[.3175,[107,28,128]],[.3333,[113,31,129]],[.3492,[119,33,129]],[.3651,[126,36,129]],[.381,[132,38,129]],[.3968,[138,40,129]],[.4127,[145,42,128]],[.4286,[151,44,127]],[.4444,[158,46,126]],[.4603,[164,48,125]],[.4762,[171,51,124]],[.4921,[177,53,122]],[.5079,[185,55,120]],[.5238,[192,58,117]],[.5397,[198,60,115]],[.5556,[205,63,112]],[.5714,[211,66,109]],[.5873,[217,70,106]],[.6032,[222,74,103]],[.619,[228,78,100]],[.6349,[232,84,97]],[.6508,[237,89,95]],[.6667,[240,96,93]],[.6825,[243,103,91]],[.6984,[246,110,91]],[.7143,[248,117,92]],[.7302,[249,125,93]],[.746,[251,132,96]],[.7619,[252,142,99]],[.7778,[253,149,103]],[.7937,[253,157,107]],[.8095,[253,164,112]],[.8254,[254,172,117]],[.8413,[254,179,123]],[.8571,[254,187,128]],[.873,[254,194,134]],[.8889,[254,201,141]],[.9048,[253,209,147]],[.9206,[253,216,154]],[.9365,[253,223,161]],[.9524,[252,230,168]],[.9683,[252,238,176]],[.9841,[252,245,183]],[1,[251,252,191]]]),plasma:n([[0,[12,7,134]],[.0159,[24,6,139]],[.0317,[33,5,143]],[.0476,[41,5,147]],[.0635,[49,4,150]],[.0794,[56,4,153]],[.0952,[63,3,156]],[.1111,[69,3,158]],[.127,[76,2,161]],[.1429,[82,1,163]],[.1587,[89,1,164]],[.1746,[95,0,166]],[.1905,[101,0,167]],[.2063,[108,0,168]],[.2222,[114,0,168]],[.2381,[120,1,168]],[.254,[127,3,167]],[.2698,[133,6,166]],[.2857,[139,9,164]],[.3016,[144,14,163]],[.3175,[150,18,160]],[.3333,[155,23,158]],[.3492,[160,27,155]],[.3651,[165,31,151]],[.381,[170,36,148]],[.3968,[175,40,144]],[.4127,[180,45,141]],[.4286,[184,50,137]],[.4444,[188,54,133]],[.4603,[192,59,129]],[.4762,[196,63,126]],[.4921,[200,68,122]],[.5079,[205,73,117]],[.5238,[209,78,114]],[.5397,[212,82,110]],[.5556,[215,87,107]],[.5714,[219,91,103]],[.5873,[222,96,100]],[.6032,[225,101,96]],[.619,[228,106,93]],[.6349,[231,110,90]],[.6508,[234,115,86]],[.6667,[236,120,83]],[.6825,[239,125,79]],[.6984,[241,130,76]],[.7143,[243,135,72]],[.7302,[245,141,69]],[.746,[247,146,65]],[.7619,[249,153,61]],[.7778,[250,159,58]],[.7937,[251,164,54]],[.8095,[252,170,51]],[.8254,[253,176,48]],[.8413,[253,182,45]],[.8571,[253,188,42]],[.873,[253,195,40]],[.8889,[252,201,38]],[.9048,[251,208,36]],[.9206,[250,214,36]],[.9365,[248,221,36]],[.9524,[246,228,37]],[.9683,[244,234,38]],[.9841,[242,241,38]],[1,[239,248,33]]]),viridis:n([[0,[68,1,84]],[.0159,[69,6,90]],[.0317,[70,12,95]],[.0476,[71,18,101]],[.0635,[71,24,106]],[.0794,[72,29,111]],[.0952,[72,34,115]],[.1111,[71,39,119]],[.127,[71,44,123]],[.1429,[70,49,126]],[.1587,[69,54,129]],[.1746,[67,59,131]],[.1905,[66,64,133]],[.2063,[64,68,135]],[.2222,[62,73,137]],[.2381,[60,77,138]],[.254,[58,83,139]],[.2698,[56,87,140]],[.2857,[54,91,140]],[.3016,[52,95,141]],[.3175,[50,99,141]],[.3333,[48,103,141]],[.3492,[46,107,142]],[.3651,[45,111,142]],[.381,[43,115,142]],[.3968,[42,119,142]],[.4127,[40,122,142]],[.4286,[39,126,142]],[.4444,[37,130,142]],[.4603,[36,134,141]],[.4762,[34,137,141]],[.4921,[33,141,140]],[.5079,[31,146,140]],[.5238,[31,150,139]],[.5397,[30,153,138]],[.5556,[30,157,136]],[.5714,[31,161,135]],[.5873,[32,165,133]],[.6032,[35,168,131]],[.619,[38,172,129]],[.6349,[42,176,126]],[.6508,[47,179,123]],[.6667,[53,183,120]],[.6825,[59,186,117]],[.6984,[66,190,113]],[.7143,[73,193,109]],[.7302,[81,196,104]],[.746,[89,199,100]],[.7619,[100,203,93]],[.7778,[109,206,88]],[.7937,[119,208,82]],[.8095,[129,211,76]],[.8254,[139,213,70]],[.8413,[149,215,63]],[.8571,[159,217,56]],[.873,[170,219,50]],[.8889,[181,221,43]],[.9048,[191,223,36]],[.9206,[202,224,30]],[.9365,[212,225,26]],[.9524,[223,227,24]],[.9683,[233,228,25]],[.9841,[243,229,30]],[1,[253,231,36]]]),cividis:n([[0,[0,34,77]],[.0159,[0,37,84]],[.0317,[0,40,91]],[.0476,[0,42,98]],[.0635,[0,45,105]],[.0794,[0,48,112]],[.0952,[4,50,112]],[.1111,[17,53,111]],[.127,[26,56,111]],[.1429,[33,59,110]],[.1587,[39,61,109]],[.1746,[44,64,109]],[.1905,[49,67,108]],[.2063,[54,70,108]],[.2222,[58,72,107]],[.2381,[63,75,107]],[.254,[68,79,107]],[.2698,[72,81,107]],[.2857,[76,84,108]],[.3016,[79,87,108]],[.3175,[83,90,108]],[.3333,[87,93,109]],[.3492,[90,95,109]],[.3651,[94,98,110]],[.381,[97,101,111]],[.3968,[101,104,112]],[.4127,[104,107,113]],[.4286,[108,109,114]],[.4444,[111,112,115]],[.4603,[115,115,116]],[.4762,[118,118,118]],[.4921,[121,121,119]],[.5079,[126,125,120]],[.5238,[130,128,120]],[.5397,[133,131,120]],[.5556,[137,134,120]],[.5714,[141,137,120]],[.5873,[145,140,119]],[.6032,[149,143,119]],[.619,[153,146,118]],[.6349,[157,149,117]],[.6508,[161,152,116]],[.6667,[165,155,115]],[.6825,[169,158,114]],[.6984,[173,162,113]],[.7143,[177,165,112]],[.7302,[181,168,110]],[.746,[185,171,109]],[.7619,[190,176,106]],[.7778,[195,179,104]],[.7937,[199,182,102]],[.8095,[203,186,100]],[.8254,[207,189,97]],[.8413,[212,193,94]],[.8571,[216,196,91]],[.873,[220,200,88]],[.8889,[225,204,84]],[.9048,[229,207,80]],[.9206,[234,211,76]],[.9365,[238,215,71]],[.9524,[243,218,66]],[.9683,[248,222,59]],[.9841,[253,226,52]],[1,[253,231,55]]]),seismic:n([[0,[0,0,77]],[.0159,[0,0,88]],[.0317,[0,0,99]],[.0476,[0,0,111]],[.0635,[0,0,122]],[.0794,[0,0,133]],[.0952,[0,0,144]],[.1111,[0,0,156]],[.127,[0,0,167]],[.1429,[0,0,178]],[.1587,[0,0,189]],[.1746,[0,0,200]],[.1905,[0,0,212]],[.2063,[0,0,223]],[.2222,[0,0,234]],[.2381,[0,0,245]],[.254,[5,5,255]],[.2698,[21,21,255]],[.2857,[37,37,255]],[.3016,[53,53,255]],[.3175,[69,69,255]],[.3333,[85,85,255]],[.3492,[101,101,255]],[.3651,[117,117,255]],[.381,[134,134,255]],[.3968,[150,150,255]],[.4127,[166,166,255]],[.4286,[182,182,255]],[.4444,[198,198,255]],[.4603,[214,214,255]],[.4762,[230,230,255]],[.4921,[246,246,255]],[.5079,[255,246,246]],[.5238,[255,230,230]],[.5397,[255,214,214]],[.5556,[255,198,198]],[.5714,[255,182,182]],[.5873,[255,166,166]],[.6032,[255,150,150]],[.619,[255,134,134]],[.6349,[255,117,117]],[.6508,[255,101,101]],[.6667,[255,85,85]],[.6825,[255,69,69]],[.6984,[255,53,53]],[.7143,[255,37,37]],[.7302,[255,21,21]],[.746,[255,5,5]],[.7619,[248,0,0]],[.7778,[240,0,0]],[.7937,[232,0,0]],[.8095,[224,0,0]],[.8254,[216,0,0]],[.8413,[208,0,0]],[.8571,[200,0,0]],[.873,[192,0,0]],[.8889,[184,0,0]],[.9048,[176,0,0]],[.9206,[168,0,0]],[.9365,[160,0,0]],[.9524,[152,0,0]],[.9683,[144,0,0]],[.9841,[136,0,0]],[1,[128,0,0]]]),brg:n([[0,[0,0,255]],[.0159,[8,0,248]],[.0317,[16,0,240]],[.0476,[24,0,232]],[.0635,[32,0,224]],[.0794,[40,0,216]],[.0952,[48,0,208]],[.1111,[56,0,200]],[.127,[64,0,192]],[.1429,[72,0,184]],[.1587,[80,0,176]],[.1746,[88,0,168]],[.1905,[96,0,160]],[.2063,[104,0,152]],[.2222,[112,0,144]],[.2381,[120,0,136]],[.254,[131,0,125]],[.2698,[139,0,117]],[.2857,[147,0,109]],[.3016,[155,0,101]],[.3175,[163,0,93]],[.3333,[171,0,85]],[.3492,[179,0,77]],[.3651,[187,0,69]],[.381,[195,0,61]],[.3968,[203,0,53]],[.4127,[211,0,45]],[.4286,[219,0,37]],[.4444,[227,0,29]],[.4603,[235,0,21]],[.4762,[243,0,13]],[.4921,[251,0,5]],[.5079,[251,5,0]],[.5238,[243,13,0]],[.5397,[235,21,0]],[.5556,[227,29,0]],[.5714,[219,37,0]],[.5873,[211,45,0]],[.6032,[203,53,0]],[.619,[195,61,0]],[.6349,[187,69,0]],[.6508,[179,77,0]],[.6667,[171,85,0]],[.6825,[163,93,0]],[.6984,[155,101,0]],[.7143,[147,109,0]],[.7302,[139,117,0]],[.746,[131,125,0]],[.7619,[120,136,0]],[.7778,[112,144,0]],[.7937,[104,152,0]],[.8095,[96,160,0]],[.8254,[88,168,0]],[.8413,[80,176,0]],[.8571,[72,184,0]],[.873,[64,192,0]],[.8889,[56,200,0]],[.9048,[48,208,0]],[.9206,[40,216,0]],[.9365,[32,224,0]],[.9524,[24,232,0]],[.9683,[16,240,0]],[.9841,[8,248,0]],[1,[0,255,0]]]),bwr:n([[0,[0,0,255]],[.01587,[8,8,255]],[.03175,[16,16,255]],[.04762,[24,24,255]],[.06349,[32,32,255]],[.07937,[40,40,255]],[.09524,[48,48,255]],[.1111,[56,56,255]],[.127,[64,64,255]],[.1429,[72,72,255]],[.1587,[80,80,255]],[.1746,[89,89,255]],[.1905,[97,97,255]],[.2063,[105,105,255]],[.2222,[113,113,255]],[.2381,[121,121,255]],[.254,[129,129,255]],[.2698,[137,137,255]],[.2857,[145,145,255]],[.3016,[153,153,255]],[.3175,[161,161,255]],[.3333,[170,170,255]],[.3492,[178,178,255]],[.3651,[186,186,255]],[.381,[194,194,255]],[.3968,[202,202,255]],[.4127,[210,210,255]],[.4286,[218,218,255]],[.4444,[226,226,255]],[.4603,[234,234,255]],[.4762,[242,242,255]],[.4921,[250,250,255]],[.5079,[255,250,250]],[.5238,[254,242,242]],[.5397,[255,234,234]],[.5556,[255,226,226]],[.5714,[255,218,218]],[.5873,[254,210,210]],[.6032,[255,202,202]],[.619,[255,194,194]],[.6349,[255,186,186]],[.6508,[254,178,178]],[.6667,[255,170,170]],[.6825,[255,161,161]],[.6984,[255,153,153]],[.7143,[254,145,145]],[.7302,[255,137,137]],[.746,[255,129,129]],[.7619,[255,121,121]],[.7778,[255,113,113]],[.7937,[255,105,105]],[.8095,[255,97,97]],[.8254,[255,89,89]],[.8413,[255,80,80]],[.8571,[255,72,72]],[.873,[255,64,64]],[.8889,[255,56,56]],[.9048,[255,48,48]],[.9206,[255,40,40]],[.9365,[255,32,32]],[.9524,[255,24,24]],[.9683,[255,16,16]],[.9841,[255,8,8]],[1,[255,0,0]]]),rwg:n([[0,[200,0,0]],[.01587,[201,8,8]],[.03175,[203,16,16]],[.04762,[205,24,24]],[.06349,[206,32,32]],[.07937,[208,40,40]],[.09524,[210,48,48]],[.1111,[212,56,56]],[.127,[213,64,64]],[.1429,[215,72,72]],[.1587,[217,80,80]],[.1746,[219,89,89]],[.1905,[220,97,97]],[.2063,[222,105,105]],[.2222,[224,113,113]],[.2381,[226,121,121]],[.254,[227,129,129]],[.2698,[229,137,137]],[.2857,[231,145,145]],[.3016,[233,153,153]],[.3175,[234,161,161]],[.3333,[236,170,170]],[.3492,[238,178,178]],[.3651,[240,186,186]],[.381,[241,194,194]],[.3968,[243,202,202]],[.4127,[245,210,210]],[.4286,[247,218,218]],[.4444,[248,226,226]],[.4603,[250,234,234]],[.4762,[252,242,242]],[.4921,[254,250,250]],[.5079,[250,252,250]],[.5238,[242,248,242]],[.5397,[234,244,234]],[.5556,[226,240,226]],[.5714,[218,236,218]],[.5873,[210,232,210]],[.6032,[202,228,202]],[.619,[194,224,194]],[.6349,[186,220,186]],[.6508,[178,216,178]],[.6667,[170,212,170]],[.6825,[161,208,161]],[.6984,[153,204,153]],[.7143,[145,200,145]],[.7302,[137,196,137]],[.746,[129,192,129]],[.7619,[121,188,121]],[.7778,[113,184,113]],[.7937,[105,180,105]],[.8095,[97,176,97]],[.8254,[89,172,89]],[.8413,[80,168,80]],[.8571,[72,164,72]],[.873,[64,160,64]],[.8889,[56,156,56]],[.9048,[48,152,48]],[.9206,[40,148,40]],[.9365,[32,144,32]],[.9524,[24,140,24]],[.9683,[16,136,16]],[.9841,[8,132,8]],[1,[0,128,0]]]),"twilight (periodic)":n([[0,[225,216,226]],[.0159,[221,217,224]],[.0317,[214,214,220]],[.0476,[205,210,216]],[.0635,[194,205,211]],[.0794,[182,199,207]],[.0952,[170,193,203]],[.1111,[158,187,200]],[.127,[147,180,198]],[.1429,[137,172,196]],[.1587,[128,165,195]],[.1746,[119,156,193]],[.1905,[112,149,192]],[.2063,[107,141,191]],[.2222,[102,132,189]],[.2381,[99,124,187]],[.254,[97,115,185]],[.2698,[96,106,183]],[.2857,[95,97,180]],[.3016,[94,87,176]],[.3175,[94,78,171]],[.3333,[93,67,164]],[.3492,[92,57,157]],[.3651,[90,48,149]],[.381,[88,39,139]],[.3968,[84,31,127]],[.4127,[79,25,114]],[.4286,[73,21,100]],[.4444,[66,18,87]],[.4603,[59,17,75]],[.4762,[54,16,65]],[.4921,[50,17,58]],[.5079,[49,18,55]],[.5238,[55,17,56]],[.5397,[62,17,60]],[.5556,[70,18,64]],[.5714,[80,20,68]],[.5873,[90,22,72]],[.6032,[101,25,75]],[.619,[111,28,78]],[.6349,[122,32,79]],[.6508,[131,37,80]],[.6667,[141,44,80]],[.6825,[150,50,79]],[.6984,[157,58,79]],[.7143,[164,66,79]],[.7302,[170,75,80]],[.746,[176,84,81]],[.7619,[181,93,83]],[.7778,[186,102,87]],[.7937,[190,112,91]],[.8095,[193,121,96]],[.8254,[196,131,104]],[.8413,[199,142,113]],[.8571,[201,152,123]],[.873,[203,162,135]],[.8889,[206,171,148]],[.9048,[209,180,161]],[.9206,[212,189,175]],[.9365,[216,197,188]],[.9524,[219,205,201]],[.9683,[222,211,212]],[.9841,[224,215,220]],[1,[225,216,225]]]),"twilight dark (periodic)":n([[0,[47,19,55]],[.0159,[51,17,61]],[.0317,[56,16,70]],[.0476,[62,17,81]],[.0635,[69,19,93]],[.0794,[76,22,107]],[.0952,[82,27,120]],[.1111,[86,34,133]],[.127,[89,43,144]],[.1429,[91,52,153]],[.1587,[93,62,161]],[.1746,[93,73,168]],[.1905,[94,83,173]],[.2063,[94,92,178]],[.2222,[95,101,181]],[.2381,[96,110,184]],[.254,[98,119,186]],[.2698,[101,128,188]],[.2857,[104,136,190]],[.3016,[109,145,191]],[.3175,[115,153,193]],[.3333,[124,161,194]],[.3492,[132,169,195]],[.3651,[142,176,197]],[.381,[152,183,199]],[.3968,[164,190,202]],[.4127,[176,196,205]],[.4286,[188,202,209]],[.4444,[199,208,214]],[.4603,[210,213,218]],[.4762,[217,216,222]],[.4921,[223,217,225]],[.5079,[225,216,223]],[.5238,[223,213,216]],[.5397,[221,208,207]],[.5556,[217,201,195]],[.5714,[214,193,181]],[.5873,[210,185,168]],[.6032,[207,176,154]],[.619,[204,167,141]],[.6349,[202,157,129]],[.6508,[200,147,118]],[.6667,[197,136,108]],[.6825,[195,126,100]],[.6984,[192,116,93]],[.7143,[188,107,89]],[.7302,[184,97,85]],[.746,[179,88,82]],[.7619,[173,79,80]],[.7778,[167,70,79]],[.7937,[161,62,79]],[.8095,[154,54,79]],[.8254,[146,47,79]],[.8413,[136,40,80]],[.8571,[127,34,80]],[.873,[117,30,79]],[.8889,[106,26,77]],[.9048,[95,23,74]],[.9206,[85,21,70]],[.9365,[75,19,66]],[.9524,[66,17,61]],[.9683,[58,17,58]],[.9841,[52,17,55]],[1,[47,20,54]]]),"hsv (periodic)":n([[0,[165,38,38]],[.0159,[172,57,45]],[.0317,[179,76,52]],[.0476,[187,94,59]],[.0635,[194,113,66]],[.0794,[201,132,73]],[.0952,[208,151,80]],[.1111,[215,170,87]],[.127,[222,189,94]],[.1429,[229,208,102]],[.1587,[236,227,109]],[.1746,[237,239,113]],[.1905,[223,237,110]],[.2063,[208,234,106]],[.2222,[193,230,103]],[.2381,[177,227,99]],[.254,[158,222,95]],[.2698,[143,219,91]],[.2857,[127,215,88]],[.3016,[112,212,84]],[.3175,[97,208,81]],[.3333,[81,205,77]],[.3492,[77,204,85]],[.3651,[78,205,98]],[.381,[79,207,111]],[.3968,[80,208,124]],[.4127,[82,209,137]],[.4286,[83,210,150]],[.4444,[84,211,163]],[.4603,[85,213,176]],[.4762,[86,214,189]],[.4921,[87,215,202]],[.5079,[88,214,215]],[.5238,[81,195,208]],[.5397,[74,176,201]],[.5556,[67,157,194]],[.5714,[60,138,187]],[.5873,[52,120,180]],[.6032,[45,101,173]],[.619,[38,82,166]],[.6349,[31,63,159]],[.6508,[24,44,152]],[.6667,[17,25,145]],[.6825,[17,14,141]],[.6984,[33,17,144]],[.7143,[48,20,148]],[.7302,[63,24,152]],[.746,[79,28,155]],[.7619,[98,32,160]],[.7778,[113,36,163]],[.7937,[129,39,167]],[.8095,[144,43,170]],[.8254,[159,46,174]],[.8413,[173,49,176]],[.8571,[177,50,168]],[.873,[176,48,155]],[.8889,[175,47,142]],[.9048,[174,46,129]],[.9206,[172,45,116]],[.9365,[171,44,103]],[.9524,[170,42,90]],[.9683,[169,41,77]],[.9841,[168,40,64]],[1,[166,39,51]]])}},50112:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});class n{constructor(t){this._element=t,this._activeElement=null,this._open=!1;const e=document.createElement("div");document.body.appendChild(e),this.shadow=e.attachShadow({mode:"open"}),this.shadow.appendChild(this._element),this._backdrop=document.createElement("div"),this._backdrop.classList.add("modal-backdrop","fade"),this._element.addEventListener("click",(t=>{t.target===t.currentTarget&&this.close()}));for(const t of this._element.querySelectorAll('[data-bs-dismiss="modal"]'))t.addEventListener("click",(()=>{this.close()}));document.addEventListener("keydown",(t=>{"Escape"===t.key&&(t.preventDefault(),this.close())})),this._element.addEventListener("transitionend",(t=>{t.target!==t.currentTarget||this._open||this._element.style.setProperty("display","none")})),this._backdrop.addEventListener("transitionend",(()=>{this._open||(this._backdrop.remove(),this._activeElement&&this._activeElement instanceof HTMLElement&&this._activeElement.focus(),this._activeElement=null)}))}close(){this._backdrop.classList.remove("show"),this._element.classList.remove("show"),this._open=!1}open(){this._element.getRootNode().appendChild(this._backdrop),this._element.style.setProperty("display","block"),this._element.offsetHeight,this._backdrop.classList.add("show"),this._element.classList.add("show"),this._activeElement=i(),this._activeElement&&this._activeElement instanceof HTMLElement&&this._activeElement.blur(),this._open=!0}toggle(t=!this.open){t?this.open():this.close()}remove(){this.shadow.host.remove()}}function i(t=document){const e=t.activeElement;return(null==e?void 0:e.shadowRoot)?i(e.shadowRoot):e}},45127:(t,e,r)=>{"use strict";r.d(e,{Je:()=>s,W2:()=>l,qP:()=>a});var n=r(34961),i=r.n(n),o=r(91683);function a(t,e=""){return r=>{if(!t.includes(r))throw Error(`invalid property '${r}' for ${e}, are you sure the settings correspond to the current dataset?`)}}class s{constructor(t,e){this.type=t,this._value=e,this._previous_value=e,this._boundList=[],this.validate=()=>{},this.onchange=[],Object.preventExtensions(this)}get value(){return this._value}set value(t){this._update(t.toString(),"JS")}changed(t){for(const t of this._boundList)if("multival"===t.attribute){const e=this._value.split(","),r=t.element;for(const t of r.options)t.selected=e.includes(t.value)}else t.element[t.attribute]=this._value;for(const e of this.onchange)e(this._value,t)}reset(){this.value=this._previous_value}bind(t,e){let r;if("string"==typeof t&&(t=(0,o.VT)(t)),"multival"===e){r=t=>{i()(null!==t.target,"event.target !== null");const e=t.target,r=Array.from(e.options).filter((t=>t.selected)).map((t=>t.value));this._update(r.toString(),"DOM")};const e=this._value.split(",");for(const r of t.options)r.selected=e.includes(r.value)}else r=t=>{i()(null!==t.target,"event.target !== null"),this._update(t.target[e].toString(),"DOM")},t[e]=this._value;t.addEventListener("change",r),this._boundList.push({element:t,attribute:e,listener:r})}disable(){for(const t of this._boundList){const e=t.element;"disabled"in e&&(e.disabled=!0)}}enable(){for(const t of this._boundList){const e=t.element;"disabled"in e&&(e.disabled=!1)}}unbindAll(){for(const t of this._boundList)t.element.removeEventListener("change",t.listener);this._boundList=[]}_update(t,e){const r=function(t,e){if("string"===t)return e;if("int"===t)return parseInt(e,10);if("number"===t)return parseFloat(e);if("boolean"===t){if("false"===e)return!1;if("true"===e)return!0;throw Error(`invalid value for boolean: ${e}`)}throw Error(`unknown type '${t}' passed to parse`)}(this.type,t);this._value!==r&&(this.validate(r),this._previous_value=this.value,this._value=r,this.changed(e))}}class l{saveSettings(){const t={};return this.foreachOption(((e,r)=>{i()(e.length>=1,"keys.length >= 1");const n=r.value;if(void 0!==n||null!==n||!Number.isNaN(n)){let r=t;for(const t of e.slice(0,e.length-1))t in r||(r[t]={}),r=r[t];r[e[e.length-1]]=n}})),t}applySettings(t){const e=JSON.parse(JSON.stringify(t));this.foreachOption(((t,r)=>{i()(t.length>=1,"keys.length >= 1");let n,a=e;for(const e of t.slice(0,t.length-1)){if(!(e in a))return;n=a,a=a[e]}const s=t[t.length-1];if(s in a){const e=a[s];if(null==e||Number.isNaN(e))return void(0,o.R4)(`ignored setting '${s}' with invalid value '${e}'`);r.value=e,delete a[s],void 0!==n&&0===Object.keys(a).length&&(i()(t.length>=2,"keys.length >= 2"),delete n[t[t.length-2]])}})),0!==Object.keys(e).length&&(0,o.R4)(`ignored unknown settings '${JSON.stringify(e)}'`)}onSettingChange(t){this.foreachOption(((e,r)=>{r.onchange.push((r=>t(e,r)))}))}foreachOption(t){c(this,t,[])}}function c(t,e,r=[]){if(r.length>10)throw Error("setting object is too deep");for(const n in t){if(n.startsWith("_"))continue;const i=r.concat([n]),o=t[n];o instanceof s?e(i,o):"object"==typeof o&&null!==o&&c(o,e,i)}}},59838:(t,e,r)=>{"use strict";r.d(e,{O:()=>h});var n=r(34961),i=r.n(n),o=r(88862),a=r(50112),s=r(45127),l=r(91683),c=r(17136),u=r(90170);class h extends s.W2{constructor(t,e,r=[]){super(),this.bonds=new s.Je("boolean",!0),this.atoms=new s.Je("boolean",!0),this.spaceFilling=new s.Je("boolean",!1),this.atomLabels=new s.Je("boolean",!1),this.shape=new s.Je("string",""),this.unitCell=new s.Je("boolean",!1),this.rotation=new s.Je("boolean",!1),this.supercell=[new s.Je("int",1),new s.Je("int",1),new s.Je("int",1)];const n=t=>{if(!(Number.isInteger(t)&&t>0))throw Error("supercell count should be a positive integer")};this.supercell[0].validate=n,this.supercell[1].validate=n,this.supercell[2].validate=n,this.axes=new s.Je("string","off"),this.axes.validate=(0,s.qP)(["off","abc","xyz"],"axes"),this.keepOrientation=new s.Je("boolean",!1),this.playbackDelay=new s.Je("number",700),this.environments={activated:new s.Je("boolean",!0),bgColor:new s.Je("string","grey"),bgStyle:new s.Je("string","ball-stick"),center:new s.Je("boolean",!1),cutoff:new s.Je("number",4)},this.color={property:new s.Je("string","element"),min:new s.Je("number",0),max:new s.Je("number",0),transform:new s.Je("string","linear"),palette:new s.Je("string","bwr")},r.includes("element")?this.color.property.validate=(0,s.qP)(r,"color"):this.color.property.validate=(0,s.qP)(r.concat(["element"]),"color"),this.color.transform.validate=(0,s.qP)(["linear","log","sqrt","inverse"],"transform"),this.color.palette.validate=(0,s.qP)(Object.keys(c.s),"palette"),this.environments.bgColor.validate=(0,s.qP)(["grey","CPK","property"],"background atoms coloring"),this.environments.bgStyle.validate=(0,s.qP)(["ball-stick","licorice","hide"],"background atoms style"),this.environments.cutoff.validate=t=>{if(t<0)throw Error("cutoff should be a positive number")},this._positionSettingsModal=e;const{openModal:i,modal:o}=this._createSettingsHTML();this._modal=o,this._modal.shadow.adoptedStyleSheets=t.getRootNode().adoptedStyleSheets,this._openModal=i,t.appendChild(this._openModal),this._bind(r)}getModalElement(t){return(0,l.VT)(t,this._modal.shadow)}get modal(){return this._modal}remove(){this._modal.remove(),this._openModal.remove()}applySettings(t){"packedCell"in t&&(!1!==t.packedCell&&(0,l.R4)("packedCell option has been removed, but it is set to true in the settings"),delete t.packedCell),super.applySettings(t)}_createSettingsHTML(){const t=document.createElement("template");t.innerHTML=`\n
${u.A}
\n `;const e=t.content.firstChild;t.innerHTML='\n';const r=t.content.querySelector(".modal");i()(null!==r&&r instanceof HTMLElement,"modalElement !== null && modalElement instanceof HTMLElement");const n=r.querySelector(".modal-dialog");i()(null!==n&&n instanceof HTMLElement,"modalDialog !== null && modalDialog instanceof HTMLElement"),e.addEventListener("click",(()=>{if(null===n.getAttribute("data-initial-modal-positions-set")){n.setAttribute("data-initial-modal-positions-set","true"),n.parentNode.style.display="block";const{top:t,left:e}=this._positionSettingsModal(n.getBoundingClientRect());n.style.width=n.offsetWidth/1.5+"px",n.style.minWidth="500px",n.style.margin="0",n.style.position="fixed",n.style.top=`${t}px`,n.style.left=`${e}px`}s.open()})),(0,l.eB)(n,".modal-header"),r.addEventListener("keydown",(t=>t.stopPropagation()));const s=new a.A(r);return o.A.initialize(r),{modal:s,openModal:e}}_bind(t){this.atomLabels.bind(this.getModalElement("atom-labels"),"checked");const e=this.getModalElement("shapes");this.shape.bind(e,"multival"),this.spaceFilling.bind(this.getModalElement("space-filling"),"checked"),this.bonds.bind(this.getModalElement("bonds"),"checked"),this.atoms.bind(this.getModalElement("atoms"),"checked"),this.rotation.bind(this.getModalElement("rotation"),"checked"),this.unitCell.bind(this.getModalElement("unit-cell"),"checked"),this.supercell[0].bind(this.getModalElement("supercell-a"),"value"),this.supercell[1].bind(this.getModalElement("supercell-b"),"value"),this.supercell[2].bind(this.getModalElement("supercell-c"),"value");const r=this.getModalElement("atom-color-property");r.options.length=0,t.includes("element")||r.options.add(new Option("element","element"));for(const e of t)r.options.add(new Option(e,e));this.color.property.bind(r,"value"),this.color.transform.bind(this.getModalElement("atom-color-transform"),"value"),this.color.min.bind(this.getModalElement("atom-color-min"),"value"),this.color.max.bind(this.getModalElement("atom-color-max"),"value");const n=this.getModalElement("atom-color-palette");n.options.length=0;for(const t in c.s)n.options.add(new Option(t,t));this.color.palette.bind(n,"value"),this.axes.bind(this.getModalElement("axes"),"value"),this.keepOrientation.bind(this.getModalElement("keep-orientation"),"checked"),this.playbackDelay.bind(this.getModalElement("playback-delay"),"value"),this.environments.activated.bind(this.getModalElement("env-activated"),"checked"),this.environments.bgColor.bind(this.getModalElement("env-bg-color"),"value"),this.environments.bgStyle.bind(this.getModalElement("env-bg-style"),"value"),this.environments.cutoff.bind(this.getModalElement("env-cutoff"),"value"),this.environments.center.bind(this.getModalElement("env-center"),"checked")}}},14761:(t,e,r)=>{"use strict";r.d(e,{C1:()=>b,N2:()=>k,Nh:()=>_,T:()=>x,i3:()=>y,iy:()=>v});var n=r(34961),i=r.n(n),o=r(37821);function a(t,e){return{x:t.x+e.x,y:t.y+e.y,z:t.z+e.z}}function s(t,e){return{x:t.x-e.x,y:t.y-e.y,z:t.z-e.z}}function l(t,e){return{x:t.x*e,y:t.y*e,z:t.z*e}}function c(t,e){return t.x*e.x+t.y*e.y+t.z*e.z}function u(t,e){return{x:t.y*e.z-t.z*e.y,y:t.z*e.x-t.x*e.z,z:t.x*e.y-t.y*e.x}}function h(t,e,r){const n=new o.Quaternion(t.x,t.y,t.z,0);return n.multiplyQuaternions(e.clone(),n),n.multiply(e.clone().inverse()),a({x:n.x,y:n.y,z:n.z},r)}function d(t,e){const r=[],n=[];for(let e=0;e1e-6)throw Error(`orientation must be normalized to 1 for "${e}" shapes`);return""}function g(t){return"number"==typeof t&&Number.isInteger(t)&&t>=0}class v extends f{constructor(t){super(t),this.radius=(t.radius||1)*this.scale}static validateParameters(t){return"radius"in t?"orientation"in t?'"orientation" has no effect on a sphere shape':"number"!=typeof t.radius?'"radius" must be a number in "sphere" shape':"":'"radius" is required for "sphere" shapes'}outputTo3Dmol(t,e=20){const r=p([this.radius,this.radius,this.radius],e),n=r.vertices,i=r.indices,o=[],s=[];for(const t of n){const e=a(t,this.position);o.push(e);const r={x:t.x/Math.pow(this.radius,2),y:t.y/Math.pow(this.radius,2),z:t.z/Math.pow(this.radius,2)};s.push(r)}return{vertexArr:o,normalArr:s,faceArr:i,color:t}}}class b extends f{constructor(t){super(t),i()(t.semiaxes,"data.semiaxes"),this.semiaxes=[this.scale*t.semiaxes[0],this.scale*t.semiaxes[1],this.scale*t.semiaxes[2]]}static validateParameters(t){if(!("semiaxes"in t))return'"semiaxes" is required for "ellipsoid" shapes';if(!Array.isArray(t.semiaxes)||3!==t.semiaxes.length)return'"semiaxes" must be an array with 3 elements for "ellipsoid" shapes';const[e,r,n]=t.semiaxes;if("number"!=typeof e||"number"!=typeof r||"number"!=typeof n)return'"semiaxes" elements must be numbers for "ellipsoid" shapes';if("orientation"in t){const e=m(t.orientation,"ellipsoid");if(""!==e)return e}return""}outputTo3Dmol(t,e=20){const r=p(this.semiaxes,e),n=r.vertices,i=r.indices,o=[],a=[];for(const t of n){const e=h(t,this.orientation,this.position);o.push(e);const r=h({x:t.x/Math.pow(this.semiaxes[0],2),y:t.y/Math.pow(this.semiaxes[1],2),z:t.z/Math.pow(this.semiaxes[2],2)},this.orientation,{x:0,y:0,z:0});a.push(r)}return{vertexArr:o,normalArr:a,faceArr:i,color:t}}}class y extends f{constructor(t){super(t),i()(t.vector,"data.vector"),this.vector=[this.scale*t.vector[0],this.scale*t.vector[1],this.scale*t.vector[2]],this.baseRadius=this.scale*(t.baseRadius||.1),this.headRadius=this.scale*(t.headRadius||.15),this.headLength=this.scale*(t.headLength||.2)}static validateParameters(t){if(!("vector"in t))return'"vector" is required for "arrow" shapes';if(!Array.isArray(t.vector)||3!==t.vector.length)return'"vector" must be an array with 3 elements for "vector" shapes';const[e,r,n]=t.vector;return"number"!=typeof e||"number"!=typeof r||"number"!=typeof n?'"vector" elements must be numbers for "vector" shapes':"orientation"in t?'"orientation" cannot be used on "arrow" shapes. define "vector" instead':""}outputTo3Dmol(t,e=20){const r=function(t,e,r,n,i=20){const[o,s,h]=t,d={x:o,y:s,z:h},f=Math.sqrt(o*o+s*s+h*h);n>f&&(n=f);const p={x:d.x*(1-n/f),y:d.y*(1-n/f),z:d.z*(1-n/f)},m=l(d,1/f);let g;g=0!==m.x||0!==m.y?{x:0,y:0,z:1}:{x:0,y:1,z:0};let v=a(g,l(m,-c(g,m)));v=l(v,1/Math.sqrt(c(v,v)));const b=u(v,m),y=[];for(let t=0;t=w&&(r.addCustom(t),t.vertexArr.length=0,Array.isArray(t.normalArr)&&(t.normalArr.length=0),Array.isArray(t.faceArr)&&(t.faceArr.length=0),Array.isArray(t.color)&&(t.color.length=0)),t.faceArr&&e.faceArr&&t.vertexArr){const r=null!==(n=t.vertexArr.length)&&void 0!==n?n:0,i=e.faceArr.map((t=>t+r));t.faceArr.push(...i)}if(t.vertexArr&&e.vertexArr&&(null===(i=t.vertexArr)||void 0===i||i.push(...e.vertexArr)),t.normalArr&&e.normalArr&&(null===(o=t.normalArr)||void 0===o||o.push(...e.normalArr)),e.vertexArr&&Array.isArray(t.color)){const r=e.color&&!Array.isArray(e.color)?e.color:16777215,n=Array(null!==(a=e.vertexArr.length)&&void 0!==a?a:0).fill(r);t.color.push(...n)}}},79352:(t,e,r)=>{"use strict";r.d(e,{MoleculeViewer:()=>v});var n=r(34961),i=r.n(n),o=r(37821);const a={H:.37,He:.32,Li:1.34,Be:.9,B:.82,C:.77,N:.75,O:.73,F:.71,Ne:.69,Na:1.54,Mg:1.3,Al:1.18,Si:1.11,P:1.06,S:1.02,Cl:.99,Ar:.97,K:1.96,Ca:1.74,Sc:1.44,Ti:1.56,V:1.25,Mn:1.39,Fe:1.25,Co:1.26,Ni:1.21,Cu:1.38,Zn:1.31,Ga:1.26,Ge:1.22,Se:1.16,Br:1.14,Kr:1.1,Rb:2.11,Sr:1.92,Y:1.62,Zr:1.48,Nb:1.37,Mo:1.45,Tc:1.56,Ru:1.26,Rh:1.35,Pd:1.31,Ag:1.53,Cd:1.48,In:1.44,Sn:1.41,Sb:1.38,Te:1.35,I:1.33,Xe:1.3,Cs:2.25,Ba:1.98,Lu:1.6,Hf:1.5,Ta:1.38,W:1.46,Re:1.59,Os:1.44,Ir:1.37,Pt:1.28,Au:1.44,Hg:1.49,Tl:1.48,Pb:1.47,Bi:1.46,Rn:1.45};function s(t){return a[t]||1.6}function l(t,e){if("X"===t.elem||"X"===e.elem)return!1;let r=s(t.elem)+s(e.elem);r+=.25,r*=r;let n=t.x-e.x;if(n*=n,n>r)return!1;let i=t.y-e.y;if(i*=i,i>r)return!1;let o=t.z-e.z;if(o*=o,o>r)return!1;const a=n+i+o;return!(isNaN(a)||a<.5||a>r)}function c(t,e){for(let r=0;r-1&&-1===navigator.userAgent.indexOf("CriOS")&&-1===navigator.userAgent.indexOf("FxiOS");function g(){return m?.87:.7}class v{constructor(t,e){const r=(0,h.V6)(t),n=document.createElement("div");r.appendChild(n),n.style.setProperty("height","100%"),this._shadow=n.attachShadow({mode:"open"}),this._root=document.createElement("div"),this._shadow.appendChild(this._root),this._root.style.position="relative",this._root.style.width="100%",this._root.style.height="100%";const a=o.createViewer(this._root,{antialias:!0,defaultcolors:o.elementColors.Jmol,backgroundColor:"0xffffff",backgroundAlpha:0,disableFog:!0,orthographic:!0});if(void 0===a)throw Error("unable to create WebGL canvas");this._viewer=a,this.onselect=()=>{},this._cellInfo=document.createElement("span"),this._cellInfo.classList.add("chsp-cell-info","chsp-hide-if-no-cell","badge","bg-light","text-dark"),this._root.appendChild(this._cellInfo);const s=new CSSStyleSheet,l=new CSSStyleSheet,c=new CSSStyleSheet,u=new CSSStyleSheet;this._styles={noCell:s,noEnvs:l,noShape:c,noProperties:u},this._shadow.adoptedStyleSheets=[...r.getRootNode().adoptedStyleSheets,s,l,c,u],this._options=new f.O(this._root,(t=>this.positionSettingsModal(t)),e),this._options.modal.shadow.adoptedStyleSheets=[...this._options.modal.shadow.adoptedStyleSheets,s,l,c,u],this._colorReset=this._options.getModalElement("atom-color-reset"),this._colorMoreOptions=this._options.getModalElement("atom-color-more-options"),this._colorMoreOptions.disabled=!0,this._connectOptions(),this._trajectoryOptions=this._options.getModalElement("trajectory-settings-group"),this.positionSettingsModal=t=>{const e=this._root.getBoundingClientRect();return{left:e.left+e.width/2-t.width/2,top:e.top+20}},this._root.addEventListener("wheel",(t=>{if(t.isTrusted){t.preventDefault(),t.stopImmediatePropagation();const e=new Event("wheel");Object.assign(e,{ctrlKey:!0,detail:t.detail,wheelDelta:t.wheelDelta,pageX:t.pageX,pageY:t.pageY}),i()(t.target,"event.target"),t.target.dispatchEvent(e)}}),{capture:!0}),window.addEventListener("resize",(()=>this.resize())),window.requestAnimationFrame((()=>{window.dispatchEvent(new Event("resize"))}))}refreshOptions(t,e){const r=this._options.modal.shadow.adoptedStyleSheets;this._options.remove(),this._options=new f.O(this._root,(t=>this.positionSettingsModal(t)),e),this._options.modal.shadow.adoptedStyleSheets=r,this._colorReset=this._options.getModalElement("atom-color-reset"),this._colorMoreOptions=this._options.getModalElement("atom-color-more-options"),this._trajectoryOptions=this._options.getModalElement("trajectory-settings-group"),this._colorReset.disabled=!0,this._colorMoreOptions.disabled=!0,this._connectOptions(),t?this._options.environments.activated.enable():this._options.environments.activated.disable()}remove(){null!==this._root.parentElement&&(this._root.parentElement.innerHTML=""),this._options.remove()}resize(){this._viewer.resize(),this._updateColorBar()}natoms(){return void 0===this._current?void 0:this._current.structure.size}set environments(t){this._environments=t}load(t,e,r={},n){let a,s,l,c,h;if(this.resize(),this._properties=e,void 0!==this._highlighted&&(a=this._defaultCutoff(this._highlighted.center)),this._environments=r.environments,s=void 0===r.keepOrientation?this._options.keepOrientation.value:r.keepOrientation,void 0===r.supercell?[l,c,h]=[this._options.supercell[0].value,this._options.supercell[1].value,this._options.supercell[2].value]:([l,c,h]=r.supercell,this._options.supercell[0].value=l,this._options.supercell[1].value=c,this._options.supercell[2].value=h),void 0===this._initialSupercell&&(this._initialSupercell=[l,c,h],this._resetSupercell.innerHTML=`reset ${l}x${c}x${h} supercell`),void 0===t.cell?this._styles.noCell.replaceSync(".chsp-hide-if-no-cell { display: none; }"):this._styles.noCell.replaceSync(""),this._showSupercellInfo(),void 0!==r.trajectory&&r.trajectory?this._trajectoryOptions.style.display="block":this._trajectoryOptions.style.display="none",this._options.unitCell.value&&void 0!==this._current&&this._viewer.removeUnitCell(this._current.model),this._viewer.removeAllModels(),void 0!==this._current)for(const t of this._current.atomLabels)this._viewer.removeLabel(t);void 0!==this._highlighted&&(this._viewer.removeModel(this._highlighted.model),this._highlighted=void 0),this._current={model:this._viewer.addModel(),structure:t,atomLabels:[]},function(t,e){if(void 0!==e.cell){const r=e.cell,n=new o.Matrix3(r[0],r[3],r[6],r[1],r[4],r[7],r[2],r[5],r[8]);t.setCrystMatrix(n)}const r=[];for(let t=0;t{n&&n()}))}_setEnvironmentInteractions(){if(void 0===this._environments)return;const t=this._environments.filter((t=>void 0!==t)).map((t=>t.center));for(const t of this._viewer.selectedAtoms({}))t.clickable=!1,t.hoverable=!1;i()(void 0!==this._current,"this._current !== undefined"),this._viewer.setClickable({model:this._current.model,index:t},!0,(t=>this._selectAtom(t))),this._setHoverable(t)}highlight(t){let e;void 0!==this._highlighted&&(e=this._defaultCutoff(this._highlighted.center)),this._changeHighlighted(t,e),this._updateStyle();const r=this._options.environments.center.value;void 0!==this._highlighted&&r&&(this._options.keepOrientation.value||this._resetView(),this._centerView()),this._viewer.render()}applySettings(t){this._options.applySettings(t)}saveSettings(){return this._options.saveSettings()}onSettingChange(t){this._options.onSettingChange(t)}exportPNG(){return this._viewer.pngURI()}_setHoverable(t){i()(void 0!==this._current,"this._current !== undefined"),this._viewer.setHoverDuration(0);const e=this.natoms();i()(void 0!==e,"n_atoms !== undefined");const r=new Map;this._viewer.setHoverable({model:this._current.model,index:t},!0,(t=>{if(i()(void 0!==t.index,"atom.index !== undefined"),void 0!==r.get(t.index))return;const e=this._viewer.addModel();e.addAtoms([t]),e.setStyle({},this._centralStyle(.3));const n=e.selectedAtoms({});n[0].clickable=!1,n[0].hoverable=!1,r.set(t.index,e),this._viewer.render()}),(t=>{i()(void 0!==t.index,"atom.index !== undefined");const e=r.get(t.index);void 0!==e&&(this._viewer.removeModel(e),r.delete(t.index),this._viewer.render())}))}_connectOptions(){const t=()=>{this._updateStyle(),this._viewer.render()};this._options.spaceFilling.onchange.push(t),this._options.bonds.onchange.push(t),this._options.atoms.onchange.push(t),this._options.atomLabels.onchange.push((t=>{if(void 0!==this._current)if(t){i()(0===this._current.atomLabels.length,"this._current.atomLabels.length === 0");const t=this._current.structure;for(let e=0;ethis._addAxes(t))),this._options.rotation.onchange.push((t=>{t?this._viewer.spin("vy"):this._viewer.spin(!1)})),this._options.unitCell.onchange.push((t=>{void 0!==this._current&&(t?this._viewer.addUnitCell(this._current.model,{box:{color:"black"},astyle:{hidden:!0},bstyle:{hidden:!0},cstyle:{hidden:!0}}):this._viewer.removeUnitCell(this._current.model),this._viewer.render())})),this._options.shape.onchange.push((()=>{void 0!==this._current&&(this._updateStyle(),this._viewer.render())}));const e=()=>{if(this._showSupercellInfo(),void 0===this._current)return;const t=this._current.model.selectedAtoms({});this._current.model.removeAtoms(t.splice(this._current.structure.size));const e=this._options.supercell[0].value,r=this._options.supercell[1].value,n=this._options.supercell[2].value;if(1===e&&1===r&&1===n||this._viewer.replicateUnitCell(this._options.supercell[0].value,this._options.supercell[1].value,this._options.supercell[2].value,this._current.model),u(this._current.model.selectedAtoms({})),void 0!==this._highlighted){const t=this._defaultCutoff(this._highlighted.center);this._changeHighlighted(this._highlighted.center,t)}this._environmentsEnabled()&&this._setEnvironmentInteractions(),this._updateStyle(),this._viewer.render()};this._options.supercell[0].onchange.push(e),this._options.supercell[1].onchange.push(e),this._options.supercell[2].onchange.push(e),this._options.environments.bgColor.onchange.push(t),this._options.environments.bgStyle.onchange.push(t),this._options.environments.cutoff.onchange.push((()=>{if(void 0!==this._highlighted){const t=this._defaultCutoff(this._highlighted.center);this._changeHighlighted(this._highlighted.center,t)}t()})),this._options.environments.center.onchange.push((t=>{this._options.keepOrientation.value||this._resetView(),t&&this._centerView(),this._viewer.render()})),this._options.environments.activated.onchange.push((e=>{if(this._enableEnvironmentSettings(e),e){i()(void 0!==this._lastHighlighted,"this._lastHighlighted !== undefined"),this._options.environments.cutoff.value=this._lastHighlighted.cutoff;const t=this._lastHighlighted.center,e=this._defaultCutoff(t);this._changeHighlighted(t,e)}else i()(void 0!==this._highlighted,"this._highlighted !== undefined"),this._viewer.removeModel(this._highlighted.model),this._lastHighlighted={center:this._highlighted.center,cutoff:this._options.environments.cutoff.value};t()})),this._options.color.property.onchange.push((()=>{const e=this._options.color.property.value;if("element"!==e){this._options.color.transform.enable(),this._options.color.transform.value="linear",this._options.color.min.enable(),this._options.color.max.enable(),this._colorReset.disabled=!1,this._colorMoreOptions.disabled=!1,this._options.color.palette.enable();const t=this._colorValues(e,"linear");t.some((t=>null===t))&&(0,h.R4)("The selected structure has undefined properties for some atoms, these atoms will be colored in light gray.");const{max:r,min:n}=(0,h.GI)(t);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=r,this._options.color.min.value=n,this._setScaleStep([n,r])}else this._options.color.transform.disable(),this._options.color.min.disable(),this._options.color.max.disable(),this._options.getModalElement("atom-color-extra").classList.contains("show")&&this._colorMoreOptions.click(),this._colorReset.disabled=!0,this._colorMoreOptions.disabled=!0,this._options.color.palette.disable(),this._viewer.setColorByElement({},o.elementColors.Jmol);this._updateColorBar(),t()}));const r=e=>{const r=this._options.color.min.value,n=this._options.color.max.value;if(r>n)return(0,h.R4)("The inserted min and max values in color are such that min > max! The last inserted value was reset."),void("min"===e?this._options.color.min.reset():this._options.color.max.reset());this._setScaleStep([r,n]),this._updateColorBar(),t()};this._options.color.transform.onchange.push((()=>{const e=this._options.color.property.value;i()("element"!==e,"property !== 'element'");const r=this._options.color.transform.value,n=this._colorValues(e,r),{min:o,max:a}=(0,h.GI)(n);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=a,this._options.color.min.value=o,this._setScaleStep([o,a]),this._updateColorBar(),t()})),this._options.color.min.onchange.push((()=>{r("min"),t()})),this._options.color.max.onchange.push((()=>{r("max"),t()})),this._colorReset.addEventListener("click",(()=>{const e=JSON.parse(JSON.stringify(this._properties))[this._options.color.property.value].filter((t=>!isNaN(Number(t)))),[r,n]=[Math.min(...e),Math.max(...e)];this._options.color.min.value=r,this._options.color.max.value=n,this._setScaleStep([r,n]),this._updateColorBar(),t()})),this._options.color.palette.onchange.push((()=>{this._updateColorBar(),t()})),this._resetEnvCutoff=this._options.getModalElement("env-reset"),this._resetEnvCutoff.onclick=()=>{i()(void 0!==this._highlighted,"this._highlighted !== undefined"),this._options.environments.cutoff.value=this._defaultCutoff(this._highlighted.center),t()},this._options.getModalElement("align-x").onclick=()=>this._viewAlong([1,0,0]),this._options.getModalElement("align-y").onclick=()=>this._viewAlong([0,1,0]),this._options.getModalElement("align-z").onclick=()=>this._viewAlong([0,0,1]),this._options.getModalElement("align-a").onclick=()=>{if(void 0===this._current||void 0===this._current.structure.cell)return;const t=this._current.structure.cell,e=[t[0],t[1],t[2]];this._viewAlong(e)},this._options.getModalElement("align-b").onclick=()=>{if(void 0===this._current||void 0===this._current.structure.cell)return;const t=this._current.structure.cell,e=[t[3],t[4],t[5]];this._viewAlong(e)},this._options.getModalElement("align-c").onclick=()=>{if(void 0===this._current||void 0===this._current.structure.cell)return;const t=this._current.structure.cell,e=[t[6],t[7],t[8]];this._viewAlong(e)},this._resetSupercell=this._options.getModalElement("reset-supercell"),this._resetSupercell.onclick=()=>{i()(void 0!==this._initialSupercell,"this._initialSupercell !== undefined"),this._options.supercell[0].value=this._initialSupercell[0],this._options.supercell[1].value=this._initialSupercell[1],this._options.supercell[2].value=this._initialSupercell[2]},this._root.ondblclick=()=>{this._resetView(),this._options.environments.center.value&&this._centerView(),this._viewer.render()}}_selectAtom(t){i()(void 0!==t.serial,"atom.serial !== undefined"),this.onselect(t.serial)}_updateStyle(){void 0!==this._current&&(""!==this._options.shape.value&&this._addShapes(),this._environmentsEnabled()?(i()(void 0!==this._highlighted,"this._highlighted !== undefined"),this._current.model.setStyle({},this._hiddenStyle()),this._current.model.setStyle({index:this._highlighted.center},this._centralStyle(.4),!0),this._highlighted.model.setStyle({},this._mainStyle())):this._current.model.setStyle({},this._mainStyle()))}_addAxes(t){if(void 0!==this._axes&&(this._viewer.removeShape(this._axes[0].arrow),this._viewer.removeLabel(this._axes[0].label),this._viewer.removeShape(this._axes[1].arrow),this._viewer.removeLabel(this._axes[1].label),this._viewer.removeShape(this._axes[2].arrow),this._viewer.removeLabel(this._axes[2].label),this._axes=void 0),"off"===t);else if("xyz"===t)this._axes=[this._addLabeledArrow([2,0,0],"red","X"),this._addLabeledArrow([0,2,0],"green","Y"),this._addLabeledArrow([0,0,2],"blue","Z")];else if("abc"===t){if(void 0===this._current||void 0===this._current.structure.cell)return;const t=this._current.structure.cell,e=[t[0],t[1],t[2]],r=[t[3],t[4],t[5]],n=[t[6],t[7],t[8]];this._axes=[this._addLabeledArrow(e,"red","A"),this._addLabeledArrow(r,"green","B"),this._addLabeledArrow(n,"blue","C")]}this._viewer.render()}_addShapes(){if(void 0===this._current)return;if(""===this._options.shape.value)return;this._viewer.removeAllShapes(),this._options.unitCell.value&&this._viewer.addUnitCell(this._current.model,{box:{color:"black"},astyle:{hidden:!0},bstyle:{hidden:!0},cstyle:{hidden:!0}}),this._addAxes(this._options.axes.value),i()(0===this._current.atomLabels.length,"this._current.atomLabels.length === 0");const t=this._current.structure;i()(!(void 0===t.shapes),"!(structure.shapes === undefined)");const e=this._options.shape.value.split(","),r={vertexArr:[],normalArr:[],faceArr:[],color:[]},n=this._colorFunction(),a={};for(const s of e){if(""===s)continue;i()(s in t.shapes,"shape in structure.shapes");const e=t.shapes[s];let l=this._options.supercell[0].value,c=this._options.supercell[1].value,u=this._options.supercell[2].value,h=this._current.structure.cell;void 0===h&&(h=[1,0,0,0,1,0,0,0,1],(l>1||c>1||u>1)&&(l=1,c=1,u=1));for(let s=0;s0&&this._viewer.addCustom(r),this._viewer.render()}_mainStyle(){const t={};return this._options.atoms.value&&(t.sphere={scale:this._options.spaceFilling.value?1:.22,colorfunc:this._colorFunction()}),this._options.bonds.value&&(t.stick={radius:.15,colorfunc:this._colorFunction()}),t}_colorValues(t,e){i()(void 0!==this._properties,"this._properties !== undefined"),i()(Object.keys(this._properties).includes(t),"Object.keys(this._properties).includes(property)");let r=JSON.parse(JSON.stringify(this._properties[t])),n=t=>t;return"log"===e?n=Math.log10:"sqrt"===e?n=Math.sqrt:"inverse"===e&&(n=t=>1/t),r=r.map((t=>null===t||isNaN(t)?t:n(t))),r}_colorFunction(){if(void 0===this._properties)return;const t=this._options.color.property.value;if("element"===t)return;const e=this._options.color.transform.value,r=this._colorValues(t,e),n=this._options.color.min.value,a=this._options.color.max.value,s=p.s[this._options.color.palette.value],l=[];for(let t=0;t{i()(void 0!==t.serial,"atom.serial !== undefined");const e=r[t.serial];return null===e?14540253:isNaN(e)?2236962:Number.isFinite(n)&&Number.isFinite(a)?c.valueToHex(e):2236962}}_hiddenStyle(){const t={},e=this._options.environments.bgStyle.value;"hide"===e||("licorice"===e||"ball-stick"===e?(t.stick={radius:.149,opacity:g(),hidden:!this._options.bonds.value},"ball-stick"===e&&""===this._options.shape.value&&(t.sphere={scale:this._options.spaceFilling.value?.999:.219,opacity:g()})):(0,h.HB)());const r=this._options.environments.bgColor.value;return"CPK"===r||("grey"===r?(void 0!==t.stick&&(t.stick.color=8421504),void 0!==t.sphere&&(t.sphere.color=8421504)):"property"===r?(void 0!==t.stick&&(t.stick={radius:.149,opacity:g(),hidden:!this._options.bonds.value,colorfunc:this._colorFunction()}),void 0!==t.sphere&&(t.sphere={scale:this._options.spaceFilling.value?.999:.219,opacity:g(),colorfunc:this._colorFunction()})):(0,h.HB)()),t}_centralStyle(t){return{sphere:{scale:t,color:"green",opacity:g()}}}_showSupercellInfo(){const t=this._options.supercell[0].value,e=this._options.supercell[1].value,r=this._options.supercell[2].value;this._cellInfo.innerText=1!==t||1!==e||1!==r?`${t}x${e}x${r} supercell`:""}_environmentsEnabled(){return void 0!==this._highlighted&&!this._resetEnvCutoff.disabled}_enableEnvironmentSettings(t){const e=this._options.getModalElement("env-activated").nextElementSibling;i()(null!==e,"toggle !== null");const r=this._resetEnvCutoff;if(t){if(this._environmentsEnabled())return;r.disabled=!1,e.innerText="Disable",this._options.environments.cutoff.enable(),this._options.environments.bgStyle.enable(),this._options.environments.bgColor.enable()}else{if(!this._environmentsEnabled())return;r.disabled=!0,e.innerText="Enable",this._options.environments.cutoff.disable(),this._options.environments.bgStyle.disable(),this._options.environments.bgColor.disable()}}_defaultCutoff(t){i()(void 0!==this._environments,"this._environments !== undefined");const e=this._environments[t];return i()(void 0!==e,"environment !== undefined"),e.cutoff}_changeHighlighted(t,e){if(void 0!==this._highlighted&&this._viewer.removeModel(this._highlighted.model),void 0===t)this._options.environments.cutoff.value=0,this._highlighted=void 0;else{if(void 0===this._environments)throw Error("can not highlight an atom without having a list of environments");const r=this._environments[t];if(void 0===r)throw Error(`can not highlight atom ${t}: it is not part of the list of environments`);const n=this._options.environments.cutoff.value;void 0!==e&&e!==n||(this._options.environments.cutoff.value=r.cutoff);const i={or:[{index:t},{within:{distance:this._options.environments.cutoff.value,sel:{index:t}}}]};this._highlighted={model:this._viewer.createModelFrom(i),center:t},this._highlighted.model.setStyle({},this._mainStyle())}}_resetView(){this._viewer.zoomTo(),this._viewer.zoom(2),this._viewer.setSlab(-1e3,1e3)}_centerView(){void 0!==this._highlighted&&void 0!==this._current&&this._viewer.center({index:this._highlighted.center,model:this._current.model})}_viewAlong(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]),r=Math.acos(t[2]/e),n=[t[1]/e*Math.sin(r/2),-t[0]/e*Math.sin(r/2),0,Math.cos(r/2)],i=this._viewer.getView();i[4]=n[0],i[5]=n[1],i[6]=n[2],i[7]=n[3],this._viewer.setView(i)}_addLabeledArrow(t,e,r){const n=new o.Vector3(t[0],t[1],t[2]);return{arrow:this._viewer.addArrow({start:new o.Vector3(0,0,0),end:n,radius:.1,color:e,midpos:-1}),label:this._viewer.addLabel(r,{position:n,inFront:!0,fontColor:"black",fontSize:14,showBackground:!1})}}_setScaleStep(t){if(void 0!==t){const e=Math.round((t[1]-t[0])/20*Math.pow(10,10))/Math.pow(10,10),r=this._options.getModalElement("atom-color-min"),n=this._options.getModalElement("atom-color-max");r.step=`${e}`,n.step=`${e}`}}_colorTitle(){let t=this._options.color.property.value;switch(this._options.color.transform.value){case"inverse":t=`(${t})⁻¹`;break;case"log":t=`log10(${t})`;break;case"sqrt":t=`√(${t})`}return t}_addColorBar(){var t,e;const r=this._options.color.palette.value,n=this._colorTitle(),a=null===(t=this._viewer.container)||void 0===t?void 0:t.clientWidth,s=null===(e=this._viewer.container)||void 0===e?void 0:e.clientHeight;i()(void 0!==a&&void 0!==s,"viewerWidth !== undefined && viewerHeight !== undefined");const l=s-80,c=document.createElement("canvas");c.width=20,c.height=l;const u=p.s[r],h=c.getContext("2d");if(!h)throw new Error("Could not get 2D context from canvas");const d=h.createLinearGradient(0,l,0,0);for(let t=0;t0){if(t<1e4&&t>.009){if(Number.isInteger(t))return t.toString();{let e=t.toFixed(3).substring(0,4);return"."===e[3]&&(e=e.substring(0,3)),e}}return t.toExponential(0).replace("+","")}if(t>-1e3&&t<-.09){if(Number.isInteger(t))return t.toString();{let e=t.toFixed(3).substring(0,4);return"."===e[3]&&(e=e.substring(0,3)),e}}return t.toExponential(0).replace("+","")}},91683:(t,e,r)=>{"use strict";r.d(e,{eK:()=>l,GI:()=>m,El:()=>b,HL:()=>f,Nl:()=>h,VT:()=>d,V6:()=>v,o:()=>p,Lz:()=>u,eB:()=>o,R4:()=>s,HB:()=>g});var n=r(34961),i=r.n(n);function o(t,e){const r=t.querySelector(e);if(null===r)throw Error(`no element matching '${e}'`);const n=e=>{const r=t.dragOffset;i()(void 0!==r,"offset !== undefined");const n=e.clientX-r.x,o=e.clientY-r.y;t.style.left=`${n}px`,t.style.top=`${o}px`},o=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",o)};r.addEventListener("mousedown",(e=>{const r=e;t.dragOffset={x:r.clientX-t.offsetLeft,y:r.clientY-t.offsetTop},t.style.left=`${t.offsetLeft}px`,t.style.top=`${t.offsetTop}px`,t.style.width=`${t.offsetWidth}px`,t.style.margin="0",t.style.position="absolute",document.addEventListener("mousemove",n,!1),document.addEventListener("mouseup",o,!1)}),!1)}const a=[t=>console.warn(t)];function s(t){for(const e of a)e(t)}function l(t){a.push(t)}const c=["red","yellow","green","blue","orange","aqua","purple","teal","silver"];function u(t){for(const e of c)if(!t.includes(e))return e;throw Error("required more colors than available")}function h(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}function d(t,e=document){let r;if(r=e instanceof HTMLElement?e.querySelector(`#${t}`):e.getElementById(t),null===r)throw Error(`unable to get element with id ${t}`);return r}function f(t){return{[Symbol.iterator]:function*(){let e=0;for(const r of t)yield[e,r],e++}}}function p(t,e){i()(t.size>=1,"map.size >= 1");const r=t.keys(),n=r.next().value;return void 0!==e&&n===e?(i()(t.size>=2,"map.size >= 2"),r.next().value):n}function m(t){let e=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(const n of t)null!==n&&(n>e&&isFinite(n)&&(e=n),n>>1,t[r]===e)return r;t[r]{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%272%27 fill=%27%23fff%27/%3e%3c/svg%3e"},35782:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%2386b7fe%27/%3e%3c/svg%3e"},54718:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%23fff%27/%3e%3c/svg%3e"},57154:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27rgba%280, 0, 0, 0.25%29%27/%3e%3c/svg%3e"},35372:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27 width=%2712%27 height=%2712%27 fill=%27none%27 stroke=%27%23dc3545%27%3e%3ccircle cx=%276%27 cy=%276%27 r=%274.5%27/%3e%3cpath stroke-linejoin=%27round%27 d=%27M5.8 3.6h.4L6 6.5z%27/%3e%3ccircle cx=%276%27 cy=%278.2%27 r=%27.6%27 fill=%27%23dc3545%27 stroke=%27none%27/%3e%3c/svg%3e"},57249:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23000%27%3e%3cpath d=%27M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z%27/%3e%3c/svg%3e"},88832:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%230c63e4%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},67830:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23212529%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},75932:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z%27/%3e%3c/svg%3e"},11144:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},35531:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3e%3cpath fill=%27none%27 stroke=%27%23343a40%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e"},14274:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27M6 10h8%27/%3e%3c/svg%3e"},45419:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27m6 10 3 3 6-6%27/%3e%3c/svg%3e"},17914:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%280, 0, 0, 0.55%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e"},36366:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%28255, 255, 255, 0.55%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e"},48487:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 8 8%27%3e%3cpath fill=%27%23198754%27 d=%27M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z%27/%3e%3c/svg%3e"},75208:(t,e,r)=>{"use strict";var n=r(97905),i="undefined"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=k(t,360),e=k(e,100),r=k(r,100),0===e)n=i=o=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=a(l,s,t+1/3),i=a(l,s,t),o=a(l,s,t-1/3)}return{r:255*n,g:255*i,b:255*o}}(n.h,a,l),c=!0,u="hsl"),n.hasOwnProperty("a")&&(o=n.a)),o=w(o),{ok:c,format:n.format||u,r:Math.min(255,Math.max(i.r,0)),g:Math.min(255,Math.max(i.g,0)),b:Math.min(255,Math.max(i.b,0)),a:o};var h,d,f}(i);this._originalInput=i,this._r=a.r,this._g=a.g,this._b=a.b,this._a=a.a,this._roundA=Math.round(100*this._a)/100,this._format=o.format||a.format,this._gradientType=o.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=a.ok}function i(t,e,r){t=k(t,255),e=k(e,255),r=k(r,255);var n,i,o=Math.max(t,e,r),a=Math.min(t,e,r),s=(o+a)/2;if(o==a)n=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case t:n=(e-r)/l+(e>1)+720)%360;--e;)i.h=(i.h+o)%360,a.push(n(i));return a}function y(t,e){e=e||6;for(var r=n(t).toHsv(),i=r.h,o=r.s,a=r.v,s=[],l=1/e;e--;)s.push(n({h:i,s:o,v:a})),a=(a+l)%1;return s}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,n=this.toRgb();return t=n.r/255,e=n.g/255,r=n.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=w(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=o(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=o(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),n=Math.round(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=i(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),n=Math.round(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return a(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var o=[T(Math.round(t).toString(16)),T(Math.round(e).toString(16)),T(Math.round(r).toString(16)),T(C(n))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*k(this._r,255))+"%",g:Math.round(100*k(this._g,255))+"%",b:Math.round(100*k(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*k(this._r,255))+"%, "+Math.round(100*k(this._g,255))+"%, "+Math.round(100*k(this._b,255))+"%)":"rgba("+Math.round(100*k(this._r,255))+"%, "+Math.round(100*k(this._g,255))+"%, "+Math.round(100*k(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(_[a(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+s(this._r,this._g,this._b,this._a),r=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var o=n(t);r="#"+s(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return n(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(h,arguments)},brighten:function(){return this._applyModification(d,arguments)},darken:function(){return this._applyModification(f,arguments)},desaturate:function(){return this._applyModification(l,arguments)},saturate:function(){return this._applyModification(c,arguments)},greyscale:function(){return this._applyModification(u,arguments)},spin:function(){return this._applyModification(p,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(b,arguments)},complement:function(){return this._applyCombination(m,arguments)},monochromatic:function(){return this._applyCombination(y,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(g,[3])},tetrad:function(){return this._applyCombination(g,[4])}},n.fromRatio=function(e,r){if("object"==t(e)){var i={};for(var o in e)e.hasOwnProperty(o)&&(i[o]="a"===o?e[o]:S(e[o]));e=i}return n(e,r)},n.equals=function(t,e){return!(!t||!e)&&n(t).toRgbString()==n(e).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},n.mix=function(t,e,r){r=0===r?0:r||50;var i=n(t).toRgb(),o=n(e).toRgb(),a=r/100;return n({r:(o.r-i.r)*a+i.r,g:(o.g-i.g)*a+i.g,b:(o.b-i.b)*a+i.b,a:(o.a-i.a)*a+i.a})},n.readability=function(t,e){var r=n(t),i=n(e);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)},n.isReadable=function(t,e,r){var i,o,a,s,l,c=n.readability(t,e);switch(o=!1,(a=r,"AA"!==(s=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==s&&(s="AA"),"small"!==(l=(a.size||"small").toLowerCase())&&"large"!==l&&(l="small"),i={level:s,size:l}).level+i.size){case"AAsmall":case"AAAlarge":o=c>=4.5;break;case"AAlarge":o=c>=3;break;case"AAAsmall":o=c>=7}return o},n.mostReadable=function(t,e,r){var i,o,a,s,l=null,c=0;o=(r=r||{}).includeFallbackColors,a=r.level,s=r.size;for(var u=0;uc&&(c=i,l=n(e[u]));return n.isReadable(t,l,{level:a,size:s})||!o?l:(r.includeFallbackColors=!1,n.mostReadable(t,["#fff","#000"],r))};var x=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},_=n.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(x);function w(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function k(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function A(t){return Math.min(1,Math.max(0,t))}function M(t){return parseInt(t,16)}function T(t){return 1==t.length?"0"+t:""+t}function S(t){return t<=1&&(t=100*t+"%"),t}function C(t){return Math.round(255*parseFloat(t)).toString(16)}function E(t){return M(t)/255}var L,z,O,D=(z="[\\s|\\(]+("+(L="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+L+")[,|\\s]+("+L+")\\s*\\)?",O="[\\s|\\(]+("+L+")[,|\\s]+("+L+")[,|\\s]+("+L+")[,|\\s]+("+L+")\\s*\\)?",{CSS_UNIT:new RegExp(L),rgb:new RegExp("rgb"+z),rgba:new RegExp("rgba"+O),hsl:new RegExp("hsl"+z),hsla:new RegExp("hsla"+O),hsv:new RegExp("hsv"+z),hsva:new RegExp("hsva"+O),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function I(t){return!!D.CSS_UNIT.exec(t)}return n}()},23648:t=>{"use strict";t.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:t=>{"use strict";t.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:t=>{"use strict";t.exports=JSON.parse('["normal","italic","oblique"]')},99803:t=>{"use strict";t.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:t=>{"use strict";t.exports=JSON.parse('["inherit","initial","unset"]')},94316:t=>{"use strict";t.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={id:t,exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var r in e)__webpack_require__.o(e,r)&&!__webpack_require__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.b=document.baseURI||self.location.href,__webpack_require__.nc=void 0;var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DefaultVisualizer:()=>Sn,EnvironmentIndexer:()=>a,EnvironmentInfo:()=>x,MapVisualizer:()=>En,MetadataPanel:()=>Zr,MoleculeViewer:()=>on.MoleculeViewer,PropertiesMap:()=>P,StructureOptions:()=>cn.O,StructureVisualizer:()=>Cn,ViewersGrid:()=>sn,addWarningHandler:()=>s.eK,version:()=>Ln});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{decode:()=>U,encode:()=>H,format:()=>W,parse:()=>it});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{Any:()=>st,Cc:()=>lt,Cf:()=>ct,P:()=>ot,S:()=>at,Z:()=>ut});var r={};__webpack_require__.r(r),__webpack_require__.d(r,{arrayReplaceAt:()=>Ft,assign:()=>Rt,escapeHtml:()=>Zt,escapeRE:()=>$t,fromCodePoint:()=>Nt,has:()=>It,isMdAsciiPunct:()=>te,isPunctChar:()=>Qt,isSpace:()=>Jt,isString:()=>Ot,isValidEntityCode:()=>Pt,isWhiteSpace:()=>Kt,lib:()=>re,normalizeReference:()=>ee,unescapeAll:()=>Vt,unescapeMd:()=>Gt});var n={};__webpack_require__.r(n),__webpack_require__.d(n,{parseLinkDestination:()=>ie,parseLinkLabel:()=>ne,parseLinkTitle:()=>oe}),__webpack_require__(86643);var i=__webpack_require__(34961),o=__webpack_require__.n(i);class a{constructor(t,e){if(this._structures=t,this._environments=e,this._activeStructures=[],this._activeAtoms=Array.from({length:this._structures.length}).map((()=>[])),void 0!==this._environments){for(const t of this._environments)this._activeAtoms[t.structure].push(t.center);for(let t=0;t0){this._activeStructures.push(t);for(let r=0;rt-e));for(let t=0;tt-e))}fromEnvironment(t,e){if("structure"===e)return{environment:t,structure:t};o()(void 0!==this._environments,"this._environments !== undefined"),o()(t\n
\n \n `;const n=r.content.firstChild;t.appendChild(n),this._valid=[],this._slider=n.querySelector("input"),this._play=n.querySelector(".chsp-play-button"),this._play.onclick=()=>{this._play.classList.toggle("chsp-playing"),this.startPlayback((()=>this._play.classList.contains("chsp-playing")))},this._slider.onchange=()=>this.onchange(),this.onchange=()=>{},this.startPlayback=()=>{}}reset(t){this._valid=t,this._slider.value="0",this._slider.max=""+(this._valid.length-1)}update(t){const e=(0,s.El)(this._valid,t);o()(-1!==e,"position !== -1"),this._slider.value=e.toString()}value(){return this._valid[parseInt(this._slider.value,10)]}}function p(t,e,r,n,i,o){const a={xref:"paper",yref:"paper",xaxis:{title:i,titlefont:{size:12},showgrid:!1,zeroline:!1,showline:!0,nticks:5},yaxis:{title:o,titlefont:{size:12},showgrid:!1,showline:!0,zeroline:!1,nticks:4},showlegend:!1,x:.2,legend:{y:.5},margin:{l:n/6,r:0,b:n/6,t:0,pad:0},width:n,height:n/1.35,tracetoggle:!1},s=[{x:t,y:e,type:"scatter",mode:"lines"}];c().newPlot(r,s,a,{displayModeBar:!1,responsive:!0,staticPlot:!1})}class m{constructor(t,e,r,n,i){const o=document.createElement("template");o.innerHTML=`
\n
\n \n \n \n
\n
`;const a=o.content.firstChild;t.appendChild(a),this._root=t,this._header=a.querySelector("th"),this._target=e,this._properties=[];const s=a.querySelector("tbody");for(const t in n){const e=document.createElement("tr"),r=document.createElement("td"),o=n[t].units;let a=t;void 0!==o&&(a+=`/${o}`);const l=n[t].description;if(void 0!==l){r.innerHTML='';const t=r.firstChild;t.innerText=a,t.setAttribute("title",l)}else r.innerText=a;e.appendChild(r);const c=document.createElement("td");e.appendChild(c),s.appendChild(e);const u=n[t].parameters;if(void 0===u)this._properties.push({cell:c,values:n[t].values});else if(i&&"string"==typeof u[0]){let e=u[0];const o=i[u[0]].units;void 0!==o&&(e+=`/${o}`);const s=document.createElement("div");s.style.display="block",s.style.width="100%",c.appendChild(s),this._properties.push({cell:c,values:n[t].values,parameter:i[u[0]].values,xlabel:e,ylabel:a});const l=document.createElement("button");l.classList.add("btn","btn-secondary","btn-sm","chsp-toggle-plot-btn"),l.textContent="Show/Hide",l.onclick=()=>{"block"===s.style.display?s.style.display="none":s.style.display="block"},r.appendChild(l)}}this.show({environment:0,structure:0,atom:0})}show(t){let e,r;"structure"===this._target?(e=t.structure+1,r=t.structure):(o()("atom"===this._target,"this._target === 'atom'"),o()(void 0!==t.atom,"indexes.atom !== undefined"),e=t.atom+1,r=t.environment),this._header.innerText=`Properties for ${this._target} ${e}`;for(const t of this._properties)if(Array.isArray(t.values[r])){const e=this._root.offsetWidth/1.5;o()(null!==t.cell.firstElementChild,"s.cell.firstElementChild !== null"),p(t.parameter,t.values[r],t.cell.firstElementChild,e,t.xlabel,t.ylabel)}else t.cell.innerText=t.values[r].toString()}}const g='\n\n \n \n \n \n \n\n\x3c!--Icon taken from www.icons8.com and edited in Inkscape--\x3e\n';var v=__webpack_require__(48654),b=__webpack_require__(62621);function y(t,e){const r={};for(const n in t)Object.hasOwnProperty.call(t,n)&&e(t[n])&&(r[n]=t[n]);return r}class x{constructor(t,e,r,n,i){this.onchange=()=>{},this.playbackDelay=700;const o=(0,s.V6)(t),a=document.createElement("div");o.appendChild(a),this._shadow=a.attachShadow({mode:"open"}),this._shadow.adoptedStyleSheets=[v.A,b.A,u],this._root=document.createElement("div"),this._shadow.appendChild(this._root),this._indexer=r,this._target=n,this._properties=e,this._parameters=i,this._structure={number:document.createElement("input"),slider:new f(document.createElement("div"),"structure"),table:new m(document.createElement("div"),"structure","structure",e,i)},this._renderTargetPart()}switchTarget(t){this._target=t,this._renderTargetPart()}show(t){const e=this._indexes().structure;if(this._structure.number.value=`${t.structure+1}`,this._structure.slider.update(t.structure),this._structure.table.show(t),t.structure!==e&&void 0!==this._atom){const e=this._indexer.activeAtoms(t.structure);this._atom.number.value=`${e[0]+1}`,this._atom.slider.reset(e)}if(void 0!==t.atom)if(void 0===this._atom){if(0!==t.atom)throw Error("Invalid state: got an atomic number to update, but I am displaying only structures")}else this._atom.number.value=`${t.atom+1}`,this._atom.slider.update(t.atom),this._atom.table.show(t)}remove(){this._shadow.host.remove()}_renderTargetPart(){this._root.innerHTML=this._getMainHTMLStructure();const t=y(this._properties,(t=>"structure"===t.target));if(this._structure=this._createStructure(t,this._parameters),"atom"===this._target){const t=y(this._properties,(t=>"atom"===t.target));this._atom=this._createAtom(t,this._parameters)}else this._atom=void 0;d.A.initialize(this._root)}_getMainHTMLStructure(){const t="atom"===this._target?`\n `:"
";return`\n
\n
\n \n ${t}\n
`}_createStructure(t,e){const r=new f(this._root,"structure");r.reset(this._indexer.activeStructures()),r.startPlayback=t=>{setTimeout((()=>{if(t()){const e=this._findNextValidIndex(this._indexes().structure,this._indexer.structuresCount(),(t=>this._indexer.fromStructure(t,this._target)));void 0!==e&&(this.show(this._indexer.fromStructure(e,this._target)),this.onchange(this._indexes()),r.startPlayback(t))}}),this.playbackDelay)},r.onchange=()=>{const t=this._structure.slider.value();if(void 0!==this._atom){const e=this._indexer.activeAtoms(t);if(0===e.length)return void(0,s.R4)(`Cannot change to structure ${t+1}, which does not contain any active atoms`);this._atom.number.value=`${e[0]+1}`,this._atom.number.max=`${e.length}`,this._atom.slider.reset(e)}const e=this._indexes();o()(void 0!==e,"indexes !== undefined"),this._structure.table.show(e),this._structure.number.value=`${e.structure+1}`,void 0!==this._atom&&this._atom.table.show(e),this.onchange(e)};const n=this._root.children[0];o()("div"===n.tagName.toLowerCase(),"tableRoot.tagName.toLowerCase() === 'div'");const i=new m(n,"structure","structure",t,e),a=this._createNumberInput(".chsp-info-structure-btn .chsp-info-number",this._indexer.structuresCount().toString(),(t=>{if(isNaN(t)||t<0||t>=parseInt(a.max,10))a.value=`${this._structure.slider.value()+1}`;else if(-1===(0,s.El)(this._indexer.activeStructures(),t))a.value=`${this._structure.slider.value()+1}`;else{if(this._structure.slider.update(t),void 0!==this._atom){const e=this._indexer.activeAtoms(t);this._atom.number.value=`${e[0]+1}`,this._atom.number.max=`${e.length}`,this._atom.slider.reset(e)}const e=this._indexes();this._structure.table.show(e),void 0!==this._atom&&this._atom.table.show(e),this.onchange(e)}}));return{number:a,slider:r,table:i}}_createAtom(t,e){const r=new f(this._root,"atom");r.reset(this._indexer.activeAtoms(this._structure.slider.value())),r.startPlayback=t=>{setTimeout((()=>{if(t()){const e=this._indexes();o()(void 0!==e.atom,"current.atom !== undefined");const n=this._findNextValidIndex(e.atom,this._indexer.atomsCount(e.structure),(t=>this._indexer.fromStructureAtom(this._target,e.structure,t)));void 0!==n&&(this.show(this._indexer.fromStructureAtom(this._target,e.structure,n)),this.onchange(this._indexes()),r.startPlayback(t))}}),this.playbackDelay)},r.onchange=()=>{o()(void 0!==this._atom,"this._atom !== undefined");const t=this._indexes();if(void 0!==t)o()(void 0!==t.atom,"indexes.atom !== undefined"),this._atom.table.show(t),this._atom.number.value=`${t.atom+1}`,this.onchange(t);else{const t=this._structure.slider.value(),e=this._atom.slider.value();(0,s.R4)(`Environment for atom ${e} in structure ${t} is not part of this dataset`)}};const n=this._root.children[0];o()("div"===n.tagName.toLowerCase(),"tableRoot.tagName.toLowerCase() === 'div'");const i=new m(n,"atom","atom",t,e),a=this._createNumberInput(".chsp-info-atom-btn .chsp-info-number",this._indexer.atomsCount(this._structure.slider.value()).toString(),(t=>{o()(void 0!==this._atom,"this._atom !== undefined");const e=this._indexer.activeAtoms(this._structure.slider.value());if(isNaN(t)||t<0||t>=parseInt(a.max,10))a.value=`${this._atom.slider.value()+1}`;else if(-1===(0,s.El)(e,t))a.value=`${this._atom.slider.value()+1}`;else{this._atom.slider.update(t);const e=this._indexes();this._atom.table.show(e),this.onchange(e)}}));return{number:a,slider:r,table:i}}_findNextValidIndex(t,e,r){let n=0;for(;n<=e;){if(void 0!==r(t=(t+1)%e))return t;n++}}_createNumberInput(t,e,r){const n=this._root.querySelector(t);return n.max=e,n.onchange=()=>r(parseInt(n.value,10)-1),n.onclick=t=>t.stopPropagation(),n}_indexes(){const t=this._structure.slider.value();let e;if(void 0!==this._atom){const r=this._atom.slider.value();e=this._indexer.fromStructureAtom(this._target,t,r)}else o()("atom"!==this._target,"this._target !== 'atom'"),e=this._indexer.fromStructureAtom(this._target,t);return o()(void 0!==e,"indexes !== undefined"),e}}class _{constructor(){this._values=[]}get(t){let e=this._values.findIndex((e=>e===t));return-1===e&&(e=this._values.length,this._values.push(t)),e}string(t){if(t>=this._values.length)throw Error("requested unknown string from interner");return this._values[t]}strings(){return this._values}}function w(t,e){const r=typeof e.values[0];if("number"===r)return{values:e.values,units:e.units};if("string"===r){const r=new _,n=[];for(const i of e.values){const e=r.get(i);if(n.push(e),e>20)throw Error(`the '${t}' property contains more than 50 different values, it can not be interpreted as categories`)}return{string:r,values:n,units:e.units}}if(!Array.isArray(e.values[0]))throw Error(`unexpected property type '${r}'`)}function k(t,e){let r,n;for(const i in e)if(void 0!==r){if(e[i].values.length!==r)throw Error(`${t} property '${i}' do not have the same size as the first property '${n}': expected ${r}, got ${e[i].values.length}`)}else r=e[i].values.length,n=i}class A{constructor(t){this.structure={},this.atom={},this.maxSymbols=-1;for(const e in t){let r;try{r=w(e,t[e])}catch(t){(0,s.R4)(`warning: ${t.message}`);continue}void 0!==r&&(this[t[e].target][e]=r,void 0!==r.string&&(this.maxSymbols=Math.max(this.maxSymbols,r.string.strings().length)))}k("structure",this.structure),k("atom",this.atom)}}class M{constructor(t,e,r,n=!0){const i=document.createElement("div");i.classList.add("chsp-pin-marker","chsp-map-pin-marker"),i.id=`chsp-selected-${t}`,i.style.backgroundColor=e,this.marker=i,this.toggleVisible(n),this.color=e,this.current=r}update(t){isFinite(t.x)&&isFinite(t.y)?(this.marker.style.top=`${t.y}px`,this.marker.style.right=`${t.x}px`):this.toggleVisible(!1)}select(t){return this.current!==t.environment&&(this.current=t.environment,!0)}activate(){this.marker.classList.toggle("chsp-active-pin",!0)}deactivate(){this.marker.classList.toggle("chsp-active-pin",!1)}remove(){o()(null!==this.marker.parentNode,"this.marker.parentNode !== null"),this.marker.parentNode.removeChild(this.marker)}toggleVisible(t){this.marker.style.display=t?"block":"none"}}var T=__webpack_require__(50112),S=__webpack_require__(45127),C=__webpack_require__(17136),E=__webpack_require__(90170);const L=["circle","square","diamond","cross","x"];function z(t){return L[t%L.length]}class O extends S.W2{constructor(t){o()(t.length>0,"validProperties.length > 0"),super(),this.max=new S.Je("number",NaN),this.min=new S.Je("number",NaN),this.property=new S.Je("string",t[0]),this.scale=new S.Je("string","linear"),this.property.validate=(0,S.qP)(t,"axis"),this.scale.validate=(0,S.qP)(["linear","log"],"axis scale")}disable(){this.max.disable(),this.min.disable(),this.scale.disable()}enable(){this.max.enable(),this.min.enable(),this.scale.enable()}}class D extends S.W2{constructor(t,e,r,n={}){super();const i=Object.keys(e);if(i.length<2)throw new Error("Cannot show a map because the dataset contains fewer than two properties.");this.x=new O(i),this.y=new O(i),this.z=new O(i.concat([""])),this.symbol=new S.Je("string","");const o=[""];for(const t in e)void 0!==e[t].string&&o.push(t);this.symbol.validate=(0,S.qP)(o,"symbol"),this.palette=new S.Je("string","inferno"),this.palette.validate=(0,S.qP)(Object.keys(C.s),"palette"),this.color={mode:new S.Je("string","linear"),property:new S.Je("string",""),min:new S.Je("number",NaN),max:new S.Je("number",NaN)},this.color.property.validate=(0,S.qP)(i.concat([""]),"color"),this.color.mode.validate=(0,S.qP)(["linear","log","sqrt","inverse"],"mode"),this.size={factor:new S.Je("number",50),mode:new S.Je("string","linear"),property:new S.Je("string","")},this.size.property.validate=(0,S.qP)(i.concat([""]),"size"),this.size.factor.validate=t=>{if(t<1||t>100)throw Error(`size factor must be between 0 and 100, got ${t}`)},this.size.mode.validate=(0,S.qP)(["linear","log","sqrt","inverse","flip-linear","proportional"],"mode"),this.markerOutline=new S.Je("boolean",!0),this.joinPoints=new S.Je("boolean",!1),this.x.property.value=i[0],this.y.property.value=i[1],this.z.property.value="",i.length>2?this.color.property.value=i[2]:this.color.property.value="",this._positionSettingsModal=r;const{openModal:a,modal:s}=this._createSettingsHTML();this._modal=s,this._openModal=a,t.appendChild(this._openModal),this._bind(e),this.applySettings(n)}getModalElement(t){return(0,s.VT)(t,this._modal.shadow)}applySettings(t){if("size"in t){const e=t.size;"mode"in e&&"constant"===e.mode&&(delete e.mode,e.property="")}if("color"in t){const e=t.color;"scale"in e&&(e.mode=e.scale,delete e.scale)}super.applySettings(t)}remove(){this._modal.remove(),this._openModal.remove()}is3D(){return""!==this.z.property.value}hasColors(){return""!==this.color.property.value}hovertemplate(){if(this.hasColors()){let t=this.color.property.value;switch(this.color.mode.value){case"inverse":t=`(${t})-1`;break;case"log":t=`log(${t})`;break;case"sqrt":t=`sqrt(${t})`}return t+": %{marker.color:.2f}"}return"%{x:.2f}, %{y:.2f}"}calculateColors(t){let e=this.color.mode.value;const{min:r,max:n}=(0,s.GI)(t);return n===r&&(e="fixed"),t.map((t=>{let r=.5;switch(e){case"inverse":r=1/t;break;case"log":r=Math.log10(t);break;case"sqrt":r=Math.sqrt(t);break;case"linear":r=1*t;break;default:r=.5}return isNaN(r)?"#aaaaaa":r}))}calculateSizes(t){const e=(t=>{const e=Math.log(1/6),r=(Math.log(6)-e)/99;return Math.exp(e+r*(t-1))})(this.size.factor.value);let r=this.size.mode.value;const{min:n,max:i}=(0,s.GI)(t),o=this.is3D()?800:300,a=n>0?n:1e-6*(i-n),l=t.map((t=>{let s=.3;switch(i===n?r="fixed":s=(t-n)/(i-n),r){case"proportional":s=t/Math.abs(i);break;case"inverse":s=a/t;break;case"log":s=Math.log(t/a)/Math.log(i/a);break;case"sqrt":s=Math.sqrt(t/Math.abs(i));break;case"linear":s*=1;break;case"flip-linear":s=1-s;break;default:s=.3-.1}return s+=.1,o*s*e}));return l.some((t=>isNaN(t)||t<0))?((0,s.R4)(`After applying the selected scaling mode ${r}, some point sizesevaluated to invalid values. These points will be displayed at the minimum size.`),l.map((t=>isNaN(t)?.1*o*e:t))):l}getSymbols(t){o()(void 0!==t.string,"property.string !== undefined");const e=t.string.strings().length;return this.is3D()?(e>L.length&&(0,s.R4)(`${e} symbols are required, but we only have ${L.length}. Some symbols will be repeated`),t.values.map(z)):t.values}_createSettingsHTML(){const t=document.createElement("template");t.innerHTML=`\n
${E.A}
\n `;const e=t.content.firstChild;t.innerHTML='\n';const r=t.content.querySelector(".modal");o()(null!==r&&r instanceof HTMLElement,"modalElement !== null && modalElement instanceof HTMLElement");const n=r.querySelector(".modal-dialog");o()(null!==n&&n instanceof HTMLElement,"modalDialog !== null && modalDialog instanceof HTMLElement"),(0,s.eB)(n,".modal-header");const i=new T.A(r);return i.shadow.adoptedStyleSheets=[v.A,b.A],d.A.initialize(r),e.addEventListener("click",(()=>{if(null===n.getAttribute("data-initial-modal-positions-set")){n.setAttribute("data-initial-modal-positions-set","true"),n.parentNode.style.display="block",n.style.width=n.offsetWidth/1.5+"px",n.style.minWidth="500px",n.style.margin="0",n.style.position="fixed";const{top:t,left:e}=this._positionSettingsModal(n.getBoundingClientRect());n.style.top=`${t}px`,n.style.left=`${e}px`}i.open()})),r.addEventListener("keydown",(t=>{t.stopPropagation()})),{openModal:e,modal:i}}_bind(t){const e=this.getModalElement("map-x-property");e.options.length=0;for(const r in t)e.options.add(new Option(r,r));this.x.property.bind(e,"value"),this.x.min.bind(this.getModalElement("map-x-min"),"value"),this.x.max.bind(this.getModalElement("map-x-max"),"value"),this.x.scale.bind(this.getModalElement("map-x-scale"),"value");const r=this.getModalElement("map-y-property");r.options.length=0;for(const e in t)r.options.add(new Option(e,e));this.y.property.bind(r,"value"),this.y.min.bind(this.getModalElement("map-y-min"),"value"),this.y.max.bind(this.getModalElement("map-y-max"),"value"),this.y.scale.bind(this.getModalElement("map-y-scale"),"value");const n=this.getModalElement("map-z-property");n.options.length=0,n.options.add(new Option("none",""));for(const e in t)n.options.add(new Option(e,e));this.z.property.bind(n,"value"),this.z.min.bind(this.getModalElement("map-z-min"),"value"),this.z.max.bind(this.getModalElement("map-z-max"),"value"),this.z.scale.bind(this.getModalElement("map-z-scale"),"value");const i=this.getModalElement("map-color-property");i.options.length=0,i.options.add(new Option("fixed",""));for(const e in t)i.options.add(new Option(e,e));this.color.property.bind(i,"value"),this.color.mode.bind(this.getModalElement("map-color-transform"),"value"),this.color.min.bind(this.getModalElement("map-color-min"),"value"),this.color.max.bind(this.getModalElement("map-color-max"),"value");const o=this.getModalElement("map-color-palette");o.length=0;for(const t in C.s)o.options.add(new Option(t,t));this.palette.bind(o,"value");const a=this.getModalElement("map-symbol-property");a.options.length=0,a.options.add(new Option("fixed",""));for(const e in t)void 0!==t[e].string&&a.options.add(new Option(e,e));this.symbol.bind(a,"value");const s=this.getModalElement("map-size-property");s.options.length=0,s.options.add(new Option("fixed",""));for(const e in t)s.options.add(new Option(e,e));this.size.property.bind(s,"value"),this.size.factor.bind(this.getModalElement("map-size-factor"),"value"),this.size.mode.bind(this.getModalElement("map-size-transform"),"value"),this.markerOutline.bind(this.getModalElement("map-marker-outline"),"checked"),this.joinPoints.bind(this.getModalElement("map-join-points"),"checked")}colorScale(){return C.s[this.palette.value]}setLogLabel(t,e){const r=this.getModalElement(`map-${e}-min-label`),n=this.getModalElement(`map-${e}-max-label`);"log"===t.scale.value?(r.innerHTML="min: 10^",n.innerHTML="max: 10^"):(r.innerHTML="min:",n.innerHTML="max:")}}const I='\n\n \n \n\n\x3c!--Icon taken from www.uxwing.com and edited in Inkscape--\x3e\n\n';const R={coloraxis:{cmax:0,cmin:0,colorbar:{len:1,thickness:20,title:{text:"",side:"right",font:{size:15}},y:0,yanchor:"bottom"},colorscale:[],showscale:!0},hovermode:"closest",legend:{itemclick:!1,itemdoubleclick:!1,tracegroupgap:5,y:1,yanchor:"top"},margin:{b:50,l:50,r:50,t:50},scene:{camera:{projection:{type:"orthographic"}},xaxis:{showspikes:!1,title:""},yaxis:{showspikes:!1,title:""},zaxis:{showspikes:!1,title:""}},showlegend:!0,xaxis:{range:void 0,title:"",type:"linear",zeroline:!1},yaxis:{range:void 0,title:"",type:"linear",zeroline:!1},zaxis:{range:void 0,title:"",type:"linear",zeroline:!1}},F={displayModeBar:!0,displaylogo:!1,responsive:!0,scrollZoom:!0,modeBarButtonsToRemove:["hoverClosestCartesian","hoverCompareCartesian","toggleSpikelines","autoScale2d","zoomIn2d","zoomOut2d","select2d","lasso2d","hoverClosest3d","tableRotation","resetCameraLastSave3d","toImage"],modeBarButtonsToAdd:[[{name:"Download PNG",icon:{width:400,height:447,path:N(I)},click:function(t){c().downloadImage(t,{filename:"chemiscope-map",format:"png",width:Math.max(t._fullLayout.width,600),height:Math.max(t._fullLayout.width,600)}).catch((t=>setTimeout((()=>{throw t}))))}}],[{name:"Download SVG",icon:{width:400,height:447,path:N('\n\n \n \n \n\x3c!--Icon taken from www.uxwing.com and edited in Inkscape--\x3e\n\n')},click:function(t){c().downloadImage(t,{filename:"chemiscope-map",format:"svg",width:Math.max(t._fullLayout.width,600),height:Math.max(t._fullLayout.height,600)}).catch((t=>setTimeout((()=>{throw t}))))}}]]};class P{constructor(t,e,r,n,i){this._getAxisRange=(t,e,r)=>{const n=!isNaN(t),i=!isNaN(e);if(n&&i){if(t<=e)return[t,e];(0,s.R4)(`The inserted min and max values in ${r} are such that min > max!The default values will be used.`)}return[n?t:void 0,i?e:void 0]},this._indexer=r,this._target=n,this.onselect=()=>{},this.activeChanged=()=>{},this._selected=new Map;const o=(0,s.V6)(t),a=document.createElement("div");a.style.setProperty("height","100%"),o.appendChild(a),this._shadow=a.attachShadow({mode:"open"}),this._root=document.createElement("div"),this._root.style.setProperty("height","100%"),this._shadow.appendChild(this._root),""===this._root.style.position&&(this._root.style.position="relative"),this._plot=document.createElement("div"),this._plot.style.width="100%",this._plot.style.height="100%",this._root.appendChild(this._plot),this._data=new A(i);const l=this._getCurrentProperties();var c;this._options=new D(this._root,l,(t=>this.positionSettingsModal(t)),e),this._colorReset=this._options.getModalElement("map-color-reset"),this._connectSettings(),this.positionSettingsModal=t=>{const e=this._root.getBoundingClientRect();return{left:e.left+e.width/2-t.width/2,top:e.top+20}},this._createPlot(),this._shadow.adoptedStyleSheets=[v.A,b.A,u,(c=this._plot,h(c._fullLayout._modeBar._uid))]}switchTarget(t){return e=this,r=void 0,i=function*(){if(t!==this._target){if(this._target=t,this._handleMarkers(),void 0!==this._active){const t=this._selected.get(this._active);void 0!==t&&this.onselect(this._indexer.fromEnvironment(t.current,this._target))}this._setupMapOptions(),this._connectSettings(),yield this._react(this._getTraces(),this._getLayout())}},new((n=void 0)||(n=Promise))((function(t,o){function a(t){try{l(i.next(t))}catch(t){o(t)}}function s(t){try{l(i.throw(t))}catch(t){o(t)}}function l(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,s)}l((i=i.apply(e,r||[])).next())}));var e,r,n,i}_handleMarkers(){var t;for(const[e,r]of this._selected.entries()){if("structure"===this._target)r.current=this._indexer.fromEnvironment(r.current,"atom").structure;else{const e=null===(t=this._indexer.fromStructure(r.current,"atom"))||void 0===t?void 0:t.environment;o()(void 0!==e,"environment !== undefined"),r.current=e}this._selected.set(e,r)}}remove(){var t;this._shadow.host.remove(),this._options.remove(),null===(t=document.getElementById("js-plotly-tester"))||void 0===t||t.remove(),this._plotFix.disable()}select(t){if(void 0===this._active)throw Error("tries to update selected environment, but there is no active marker");if(void 0===t.environment){const e=this._indexer.fromStructureAtom(this._target,t.structure,t.atom);if(void 0===e){const e=void 0===t.atom?"":` / atom ${t.atom}`;throw Error(`can not find the environnement for structure ${t.structure}`+e)}t=e}const e=this._selected.get(this._active);o()(void 0!==e,"data !== undefined"),e.select(t)&&this._updateMarkers()}setActive(t){if(void 0!==this._active){const t=this._selected.get(this._active);o()(void 0!==t,"oldData !== undefined"),t.deactivate()}this._active=t;const e=this._selected.get(this._active);o()(void 0!==e,"data !== undefined"),e.activate(),this._is3D()&&this._restyle({"marker.size":this._sizes(1)},1)}addMarker(t,e,r){o()(!this._selected.has(t),"!this._selected.has(guid)");const n=new M(t,e,r.environment);this._root.appendChild(n.marker),n.marker.onclick=()=>{this.setActive(t),this.activeChanged(t,this._indexer.fromEnvironment(n.current,this._target))},this._selected.set(t,n),this._updateMarkers([n]),this.setActive(t)}removeMarker(t){this._active===t&&(1===this._selected.size?this._active=void 0:this.setActive((0,s.o)(this._selected,t)));const e=this._selected.get(t);o()(void 0!==e,"data !== undefined"),e.remove(),this._selected.delete(t),this._updateMarkers()}applySettings(t){this._options.applySettings(t)}saveSettings(){return this._options.saveSettings()}onSettingChange(t){this._options.onSettingChange(t)}_getTraces(){const t=this._is3D()?"scatter3d":"scattergl",e=[{name:"",type:t,x:this._coordinates(this._options.x,0)[0],y:this._coordinates(this._options.y,0)[0],z:this._coordinates(this._options.z,0)[0],hovertemplate:this._options.hovertemplate(),marker:{color:this._colors(0)[0],coloraxis:"coloraxis",line:{color:"black",width:this._options.markerOutline.value?.5:0},opacity:1,size:this._sizes(0)[0],sizemode:"area",symbol:this._symbols(0)[0]},line:{color:"black",width:.5,dash:"solid"},mode:this._options.joinPoints.value?"lines+markers":"markers",showlegend:!1},{name:"selected",type:t,x:[],y:[],z:[],hoverinfo:"none",marker:{color:[],line:{color:[],width:2},opacity:1,size:[],sizemode:"area"},mode:"markers",showlegend:!1}],r=this._legendNames().slice(2),n=this._showlegend().slice(2);o()(r.length===n.length,"legendNames.length === showlegend.length");const i=r.length;this._data.maxSymbols>0&&(r.length=this._data.maxSymbols,r.fill("",i),n.length=this._data.maxSymbols,n.fill(!1,i));for(let i=0;i{t&&Object.keys(t).length>1&&(this._options.remove(),this._options=new D(this._root,this._getCurrentProperties(),(t=>this.positionSettingsModal(t)),{}))};"atom"!==this._target?t(this._data.structure):t(this._data.atom)}_getCurrentProperties(){const t=this._data[this._target],e=Object.keys(t);if(e.length<2){if("structure"===this._target&&!this._indexer.hasEnvironments()&&Object.keys(this._data.atom).length>=2)throw Error("could not find enough structure properties to display, but there are atom properties. Please provide the environment list to display them");let t="we need at least two properties to plot in the map";throw 0===e.length?t+=", we have none":t+=`, we have only one: '${e[0]}'`,Error(t)}return t}_restyle(t,e){c().restyle(this._plot,t,e).catch((t=>setTimeout((()=>{throw t}))))}_relayout(t){c().relayout(this._plot,t).catch((t=>setTimeout((()=>{throw t}))))}_react(t,e){return new Promise(((r,n)=>{c().react(this._plot,t,e).then((()=>{r()})).catch((t=>{setTimeout((()=>{n(t)}))}))}))}_connectSettings(){const t=t=>{"log"===t.scale.value&&(0,s.GI)(this._coordinates(t,0)[0]).min<0&&t.min.value<=0&&(0,s.R4)("This property contains negative values. Note that taking the log will discard them.")};this._options.x.property.onchange.push((()=>{t(this._options.x);const e=this._coordinates(this._options.x);this._restyle({x:e},[0,1]),this._relayout({"scene.xaxis.title":this._title(this._options.x.property.value),"xaxis.title":this._title(this._options.x.property.value)}),this._is3D()?this._relayout({"scene.xaxis.autorange":!0}):this._relayout({"xaxis.autorange":!0}),this._setScaleStep(this._getBounds().x,"x")})),this._options.x.scale.onchange.push((()=>{t(this._options.x),this._options.setLogLabel(this._options.x,"x"),this._is3D()?this._relayout({"scene.xaxis.type":this._options.x.scale.value}):this._relayout({"xaxis.type":this._options.x.scale.value})}));const e=(e,r,n)=>(i,o)=>{if("JS"===o)return;const a=r.min.value,l=r.max.value;if(a>l)return(0,s.R4)(`The inserted min and max values in ${e} are such that min > max! The last inserted value was reset.`),void("min"===n?r.min.reset():r.max.reset());t(r),this._is3D()?this._relayout({[`scene.${e}.range`]:[a,l]}):this._relayout({[`${e}.range`]:[a,l]})};if(this._options.x.min.onchange.push(e("xaxis",this._options.x,"min")),this._options.x.max.onchange.push(e("xaxis",this._options.x,"max")),this._options.y.property.onchange.push((()=>{t(this._options.y);const e=this._coordinates(this._options.y);this._restyle({y:e},[0,1]),this._relayout({"scene.yaxis.title":this._title(this._options.y.property.value),"yaxis.title":this._title(this._options.y.property.value)}),this._is3D()?this._relayout({"scene.yaxis.autorange":!0}):this._relayout({"yaxis.autorange":!0}),this._setScaleStep(this._getBounds().y,"y")})),this._options.y.scale.onchange.push((()=>{t(this._options.y),this._options.setLogLabel(this._options.y,"y"),this._is3D()?this._relayout({"scene.yaxis.type":this._options.y.scale.value}):this._relayout({"yaxis.type":this._options.y.scale.value})})),this._options.y.min.onchange.push(e("yaxis",this._options.y,"min")),this._options.y.max.onchange.push(e("yaxis",this._options.y,"max")),""===this._options.z.property.value?this._options.z.disable():this._options.z.enable(),this._options.z.property.onchange.push((()=>{t(this._options.z);const e="scatter3d"===this._plot._fullData[0].type;if(""===this._options.z.property.value)return void(e&&this._switch2D());e||this._switch3D();const r=this._coordinates(this._options.z);this._restyle({z:r},[0,1]),this._relayout({"scene.zaxis.title":this._title(this._options.z.property.value),"scene.zaxis.autorange":!0}),this._is3D()&&this._setScaleStep(this._getBounds().z,"z")})),this._options.z.scale.onchange.push((()=>{t(this._options.z),this._options.setLogLabel(this._options.z,"z"),""!==this._options.z.property.value&&this._relayout({"scene.zaxis.type":this._options.z.scale.value})})),this._options.z.min.onchange.push(e("zaxis",this._options.z,"min")),this._options.z.max.onchange.push(e("zaxis",this._options.z,"max")),this._options.hasColors()){const t=(t,e)=>{const[r,n]=this._getAxisRange(t,e,"map.color"),i=void 0!==r,o=void 0!==n,a=()=>{const t=this._colors(0)[0];return(0,s.GI)(t)};if(i||o){const{min:r,max:n}=a();return{min:i?t:r,max:o?e:n}}return a()},{min:e,max:r}=t(this._options.color.min.value,this._options.color.max.value);this._options.color.min.value=e,this._options.color.max.value=r,this._setScaleStep([e,r],"color")}else this._options.color.min.value=0,this._options.color.max.value=0;this._options.color.property.onchange.push((()=>{if(this._options.hasColors()){this._options.color.mode.enable(),this._options.color.min.enable(),this._options.color.max.enable(),this._colorReset.disabled=!1;const t=this._colors(0)[0];if(n(t,"property")){const{min:e,max:r}=(0,s.GI)(t);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=r,this._options.color.min.value=e,this._setScaleStep([e,r],"color"),this._relayout({"coloraxis.colorbar.title.text":this._colorTitle(),"coloraxis.showscale":!0})}}else this._options.color.mode.disable(),this._options.color.min.disable(),this._options.color.max.disable(),this._colorReset.disabled=!0,this._options.color.min.value=0,this._options.color.max.value=0,this._relayout({"coloraxis.colorbar.title.text":void 0,"coloraxis.showscale":!1});this._restyle({hovertemplate:this._options.hovertemplate(),"marker.color":this._colors(0)},[0])}));const r=t=>{const e=this._options.color.min.value,r=this._options.color.max.value;if(e>r)return(0,s.R4)("The inserted min and max values in color are such that min > max! The last inserted value was reset."),void("min"===t?this._options.color.min.reset():this._options.color.max.reset());this._relayout({"coloraxis.cmax":r,"coloraxis.cmin":e,"coloraxis.colorscale":this._options.colorScale()})},n=(t,e)=>{const r=this._options.color.mode.value;let n="";"log"===r||"sqrt"===r?n="<= 0":"inverse"===r&&(n="== 0");const i=t.every((t=>isNaN(t))),o=t.some((t=>isNaN(t)));return i?((0,s.R4)(`The selected property contains only values ${n}. To display this property, select an appropriate color scale. The ${e} will be set to its last value.`),"property"===e?this._options.color.property.reset():this._options.color.mode.reset(),!1):!o||((0,s.R4)(`The selected property contains some values ${n}. These values will be colored in grey.`),!0)};this._options.color.mode.onchange.push((()=>{const t=this._colors(0)[0];if(n(t,"color scale")){const{min:e,max:r}=(0,s.GI)(t);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=r,this._options.color.min.value=e,this._setScaleStep([e,r],"color"),this._relayout({"coloraxis.colorbar.title.text":this._colorTitle(),"coloraxis.showscale":!0}),this._restyle({hovertemplate:this._options.hovertemplate(),"marker.color":this._colors(0)},[0])}})),this._options.color.min.onchange.push((()=>{r("min")})),this._options.color.max.onchange.push((()=>{r("max")})),this._colorReset.onclick=()=>{const t=this._colors(0)[0],{min:e,max:r}=(0,s.GI)(t);this._options.color.min.value=e,this._options.color.max.value=r,this._relayout({"coloraxis.cmax":r,"coloraxis.cmin":e,"coloraxis.colorscale":this._options.colorScale()})},this._options.color.property.enable(),this._options.hasColors()?(this._options.color.mode.enable(),this._options.color.min.enable(),this._options.color.max.enable(),this._colorReset.disabled=!1):(this._options.color.min.disable(),this._options.color.max.disable(),this._colorReset.disabled=!0),this._options.palette.onchange.push((()=>{this._relayout({"coloraxis.colorscale":this._options.colorScale()})})),this._options.symbol.onchange.push((()=>{this._restyle({"marker.symbol":this._symbols()},[0,1]),this._restyle({name:this._legendNames(),showlegend:this._showlegend()}),this._relayout({"coloraxis.colorbar.len":this._colorbarLen()})})),""===this._options.size.property.value?this._options.size.mode.disable():this._options.size.mode.enable(),this._options.size.property.onchange.push((()=>{""!==this._options.size.property.value?this._options.size.mode.enable():this._options.size.mode.disable(),this._restyle({"marker.size":this._sizes(0)},0)})),this._options.size.factor.onchange.push((()=>{this._restyle({"marker.size":this._sizes(0)},0)})),this._options.size.mode.onchange.push((()=>{this._restyle({"marker.size":this._sizes(0)},0)})),this._options.markerOutline.onchange.push((()=>{const t=this._options.markerOutline.value?.5:0;this._restyle({"marker.line.width":t},[0])})),this._options.joinPoints.onchange.push((()=>{const t=this._options.joinPoints.value?"lines+markers":"markers";this._restyle({mode:t},[0])}))}_createPlot(){this._plot.innerHTML="";const t=this._getTraces(),e=this._getLayout();c().newPlot(this._plot,t,e,F).then((()=>{window.requestAnimationFrame((()=>{window.dispatchEvent(new Event("resize"))}))})).catch((t=>setTimeout((()=>{throw t})))),this._plot.classList.add("chsp-map"),this._plotFix=function(t){let e=null;const r=t=>{t.isTrusted&&t.target&&(t.preventDefault(),t.stopPropagation(),e={data:t instanceof MouseEvent?{buttons:t.buttons,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey}:{buttons:1,clientX:t.touches[0].clientX,clientY:t.touches[0].clientY,ctrlKey:t.ctrlKey},target:t.target})},n=t=>{if(e&&t.target){t.preventDefault(),t.stopImmediatePropagation();const r=new Event("mousedown",{composed:!0});Object.assign(r,Object.assign(Object.assign({},e.data),{clientX:e.data.clientX-50,clientY:e.data.clientY-50}));const n=e.target;e=null,n.dispatchEvent(r);const i=new Event("mouseup",{bubbles:!0,composed:!0});t.target.dispatchEvent(i)}},i=t=>{if(e){t.preventDefault(),t.stopImmediatePropagation();const r=t instanceof MouseEvent?t:t.changedTouches[0];if(Math.abs(r.clientX-e.data.clientX)>5||Math.abs(r.clientY-e.data.clientY)>5){const t=new Event("mousedown",{composed:!0});Object.assign(t,e.data);const r=e.target;e=null,r.dispatchEvent(t)}}};let o=!1;const a=()=>{o=!0,t.addEventListener("mousedown",r,{capture:!0}),document.addEventListener("mouseup",n),document.addEventListener("mousemove",i),t.addEventListener("touchstart",r,{capture:!0}),document.addEventListener("touchmove",i,{passive:!1}),document.addEventListener("touchend",n,{passive:!1})},s=()=>{o=!1,t.removeEventListener("mousedown",r,{capture:!0}),document.removeEventListener("mouseup",n),document.removeEventListener("mousemove",i),t.removeEventListener("touchstart",r,{capture:!0}),document.removeEventListener("touchmove",i),document.removeEventListener("touchend",n)};return t.on("plotly_restyle",(([t])=>{"type"in t&&(o&&"scatter3d"===t.type&&s(),o||"scattergl"!==t.type||a())})),"scattergl"===t._fullData[0].type&&a(),{disable:s,enable:a}}(this._plot),this._plot.on("plotly_click",(t=>{if(t.event&&2===t.event.detail)return;let e=t.points[0].pointNumber;if(this._is3D()&&"selected"===t.points[0].data.name)for(const[r,[n,i]]of(0,s.HL)(this._selected.entries()))if(t.points[0].pointNumber===r){e=i.current,this._active!==n&&(this.setActive(n),this.activeChanged(n,this._indexer.fromEnvironment(i.current,this._target)));break}const r=this._indexer.fromEnvironment(e,this._target);this.select(r),this.onselect(r)})),this._plot.on("plotly_afterplot",(()=>this._afterplot())),this._updateMarkers();const r=this._getBounds();this._setScaleStep(r.x,"x"),this._setScaleStep(r.y,"y"),void 0!==r.z&&this._setScaleStep(r.z,"z"),this._plot.addEventListener("wheel",(()=>{}))}_getLayout(){const t=JSON.parse(JSON.stringify(R));return t.xaxis.title=this._title(this._options.x.property.value),t.yaxis.title=this._title(this._options.y.property.value),t.xaxis.type=this._options.x.scale.value,t.yaxis.type=this._options.y.scale.value,t.scene.xaxis.title=this._title(this._options.x.property.value),t.scene.yaxis.title=this._title(this._options.y.property.value),t.scene.zaxis.title=this._title(this._options.z.property.value),t.coloraxis.colorscale=this._options.colorScale(),t.coloraxis.cmin=this._options.color.min.value,t.coloraxis.cmax=this._options.color.max.value,t.coloraxis.colorbar.title.text=this._colorTitle(),t.coloraxis.colorbar.len=this._colorbarLen(),t.coloraxis.showscale=this._options.hasColors(),t.xaxis.range=this._getAxisRange(this._options.x.min.value,this._options.x.max.value,"map.x"),t.yaxis.range=this._getAxisRange(this._options.y.min.value,this._options.y.max.value,"map.y"),t.zaxis.range=this._getAxisRange(this._options.z.min.value,this._options.z.max.value,"map.z"),t}_property(t){const e=this._data[this._target][t];if(void 0===e)throw Error(`unknown property '${t}' requested in map`);return e}_coordinates(t,e){if(""===t.property.value)return this._selectTrace(void 0,void 0,e);const r=this._property(t.property.value).values,n=[];for(const t of this._selected.values())this._is3D()?n.push(r[t.current]):n.push(NaN);return this._selectTrace(r,n,e)}_title(t){let e=t;if(""!==t){const r=this._property(t).units;void 0!==r&&(e=t+` / ${r}`)}return e}_colorTitle(){let t=this._title(this._options.color.property.value);switch(this._options.color.mode.value){case"inverse":t=`(${t})-1`;break;case"log":t=`log10(${t})`;break;case"sqrt":t=`√(${t})`}return t}_colors(t){let e;e=this._options.hasColors()?this._property(this._options.color.property.value).values:new Array(this._property(this._options.x.property.value).values.length).fill(.5);const r=this._options.calculateColors(e),n=[];for(const t of this._selected.values())n.push(t.color);return this._selectTrace(r,n,t)}_sizes(t){let e;e=""!==this._options.size.property.value?this._property(this._options.size.property.value).values:new Array(this._property(this._options.x.property.value).values.length).fill(1);const r=this._options.calculateSizes(e),n=[];if(this._is3D())for(const t of this._selected.keys())t===this._active?n.push(1e3):n.push(500);return this._selectTrace(r,n,t)}_symbols(t){if(""===this._options.symbol.value)return this._selectTrace("circle","circle",t);const e=this._property(this._options.symbol.value),r=this._options.getSymbols(e),n=[];for(const t of this._selected.values())n.push(r[t.current]);return this._selectTrace(r,n,t)}_showlegend(){const t=[!1,!1];if(""!==this._options.symbol.value){for(let e=0;e{t.min.value=isNaN(t.min.value)?e:t.min.value,t.max.value=isNaN(t.max.value)?r:t.max.value};e(this._options.x,t.x),e(this._options.y,t.y),void 0!==t.z&&e(this._options.z,t.z),this._is3D()||this._updateMarkers()}_updateMarkers(t){if(void 0===t&&(t=Array.from(this._selected.values())),this._is3D())t.forEach((t=>t.toggleVisible(!1))),this._restyle({"marker.color":this._colors(1),"marker.size":this._sizes(1),"marker.symbol":this._symbols(1),x:this._coordinates(this._options.x,1),y:this._coordinates(this._options.y,1),z:this._coordinates(this._options.z,1)},1);else{const e=this._coordinates(this._options.x,0)[0],r=this._coordinates(this._options.y,0)[0],n=this._plot.getBoundingClientRect().width;for(const i of t){let t=e[i.current],o=r[i.current];"log"===this._options.x.scale.value&&(t=Math.log10(t)),"log"===this._options.y.scale.value&&(o=Math.log10(o)),t=n-this._pixelCoordinate(t,"x"),o=this._pixelCoordinate(o,"y");const a=this._getBounds(),s=n-this._pixelCoordinate(a.x[1],"x"),l=n-this._pixelCoordinate(a.x[0],"x"),c=this._pixelCoordinate(a.y[1],"y"),u=this._pixelCoordinate(a.y[0],"y"),h=(t,e,r)=>t+10>e&&t-10=55296&&t<=57343?"���":String.fromCharCode(t),n+=6;continue}}if(240==(248&o)&&n+91114111?e+="����":(t-=65536,e+=String.fromCharCode(55296+(t>>10),56320+(1023&t))),n+=9;continue}}e+="�"}}return e}))}B.defaultChars=";/?:@&=+$,#",B.componentChars="";const U=B,G={};function V(t,e,r){"string"!=typeof e&&(r=e,e=V.defaultChars),void 0===r&&(r=!0);const n=function(t){let e=G[t];if(e)return e;e=G[t]=[];for(let t=0;t<128;t++){const r=String.fromCharCode(t);/^[0-9a-z]$/i.test(r)?e.push(r):e.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2))}for(let r=0;r=55296&&a<=57343){if(a>=55296&&a<=56319&&e+1=56320&&r<=57343){i+=encodeURIComponent(t[e]+t[e+1]),e++;continue}}i+="%EF%BF%BD"}else i+=encodeURIComponent(t[e])}return i}V.defaultChars=";/?:@&=+$,-_.!~*'()#",V.componentChars="-_.!~*'()";const H=V;function W(t){let e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&-1!==t.hostname.indexOf(":")?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",e+=t.search||"",e+=t.hash||"",e}function q(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const Y=/^([a-z0-9.+-]+:)/i,Z=/:[0-9]*$/,X=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,$=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),J=["'"].concat($),K=["%","/","?",";","#"].concat(J),Q=["/","?","#"],tt=/^[+a-z0-9A-Z_-]{0,63}$/,et=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,rt={javascript:!0,"javascript:":!0},nt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};q.prototype.parse=function(t,e){let r,n,i,o=t;if(o=o.trim(),!e&&1===t.split("#").length){const t=X.exec(o);if(t)return this.pathname=t[1],t[2]&&(this.search=t[2]),this}let a=Y.exec(o);if(a&&(a=a[0],r=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(e||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i="//"===o.substr(0,2),!i||a&&rt[a]||(o=o.substr(2),this.slashes=!0)),!rt[a]&&(i||a&&!nt[a])){let t,e,r=-1;for(let t=0;t127?n+="x":n+=r[t];if(!n.match(tt)){const n=t.slice(0,e),i=t.slice(e+1),a=r.match(et);a&&(n.push(a[1]),i.unshift(a[2])),i.length&&(o=i.join(".")+o),this.hostname=n.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),a&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=o.indexOf("#");-1!==s&&(this.hash=o.substr(s),o=o.slice(0,s));const l=o.indexOf("?");return-1!==l&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),nt[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this},q.prototype.parseHost=function(t){let e=Z.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};const it=function(t,e){if(t&&t instanceof q)return t;const r=new q;return r.parse(t,e),r},ot=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,at=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,st=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,lt=/[\0-\x1F\x7F-\x9F]/,ct=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,ut=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,ht=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((t=>t.charCodeAt(0)))),dt=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((t=>t.charCodeAt(0))));var ft;const pt=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),mt=null!==(ft=String.fromCodePoint)&&void 0!==ft?ft:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t),e};var gt,vt,bt,yt,xt;function _t(t){return t>=gt.ZERO&&t<=gt.NINE}!function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"}(gt||(gt={})),function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"}(vt||(vt={})),function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"}(bt||(bt={})),(xt=yt||(yt={}))[xt.Legacy=0]="Legacy",xt[xt.Strict=1]="Strict",xt[xt.Attribute=2]="Attribute";class wt{constructor(t,e,r){this.decodeTree=t,this.emitCodePoint=e,this.errors=r,this.state=bt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=yt.Strict}startEntity(t){this.decodeMode=t,this.state=bt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,e){switch(this.state){case bt.EntityStart:return t.charCodeAt(e)===gt.NUM?(this.state=bt.NumericStart,this.consumed+=1,this.stateNumericStart(t,e+1)):(this.state=bt.NamedEntity,this.stateNamedEntity(t,e));case bt.NumericStart:return this.stateNumericStart(t,e);case bt.NumericDecimal:return this.stateNumericDecimal(t,e);case bt.NumericHex:return this.stateNumericHex(t,e);case bt.NamedEntity:return this.stateNamedEntity(t,e)}}stateNumericStart(t,e){return e>=t.length?-1:(32|t.charCodeAt(e))===gt.LOWER_X?(this.state=bt.NumericHex,this.consumed+=1,this.stateNumericHex(t,e+1)):(this.state=bt.NumericDecimal,this.stateNumericDecimal(t,e))}addToNumericResult(t,e,r,n){if(e!==r){const i=r-e;this.result=this.result*Math.pow(n,i)+parseInt(t.substr(e,i),n),this.consumed+=i}}stateNumericHex(t,e){const r=e;for(;e=gt.UPPER_A&&n<=gt.UPPER_F||n>=gt.LOWER_A&&n<=gt.LOWER_F)))return this.addToNumericResult(t,r,e,16),this.emitNumericEntity(i,3);e+=1}var n;return this.addToNumericResult(t,r,e,16),-1}stateNumericDecimal(t,e){const r=e;for(;e=55296&&t<=57343||t>1114111?65533:null!==(e=pt.get(t))&&void 0!==e?e:t}(this.result),this.consumed),this.errors&&(t!==gt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,e){const{decodeTree:r}=this;let n=r[this.treeIndex],i=(n&vt.VALUE_LENGTH)>>14;for(;e=gt.UPPER_A&&t<=gt.UPPER_Z||t>=gt.LOWER_A&&t<=gt.LOWER_Z||_t(t)}(o)))?0:this.emitNotTerminatedNamedEntity();if(n=r[this.treeIndex],i=(n&vt.VALUE_LENGTH)>>14,0!==i){if(a===gt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==yt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}var o;return-1}emitNotTerminatedNamedEntity(){var t;const{result:e,decodeTree:r}=this,n=(r[e]&vt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,n,this.consumed),null===(t=this.errors)||void 0===t||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,e,r){const{decodeTree:n}=this;return this.emitCodePoint(1===e?n[t]&~vt.VALUE_LENGTH:n[t+1],r),3===e&&this.emitCodePoint(n[t+2],r),r}end(){var t;switch(this.state){case bt.NamedEntity:return 0===this.result||this.decodeMode===yt.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case bt.NumericDecimal:return this.emitNumericEntity(0,2);case bt.NumericHex:return this.emitNumericEntity(0,3);case bt.NumericStart:return null===(t=this.errors)||void 0===t||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case bt.EntityStart:return 0}}}function kt(t){let e="";const r=new wt(t,(t=>e+=mt(t)));return function(t,n){let i=0,o=0;for(;(o=t.indexOf("&",o))>=0;){e+=t.slice(i,o),r.startEntity(n);const a=r.write(t,o+1);if(a<0){i=o+r.end();break}i=o+a,o=0===a?i+1:i}const a=e+t.slice(i);return e="",a}}function At(t,e,r,n){const i=(e&vt.BRANCH_LENGTH)>>7,o=e&vt.JUMP_TABLE;if(0===i)return 0!==o&&n===o?r:-1;if(o){const e=n-o;return e<0||e>=i?-1:t[r+e]-1}let a=r,s=a+i-1;for(;a<=s;){const e=a+s>>>1,r=t[e];if(rn))return t[e+i];s=e-1}}return-1}const Mt=kt(ht);function Tt(t,e=yt.Legacy){return Mt(t,e)}function St(t){for(let e=1;e'"]/g,Ct),Et(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),Et(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),function(t){t[t.XML=0]="XML",t[t.HTML=1]="HTML"}(Lt||(Lt={})),function(t){t[t.UTF8=0]="UTF8",t[t.ASCII=1]="ASCII",t[t.Extensive=2]="Extensive",t[t.Attribute=3]="Attribute",t[t.Text=4]="Text"}(zt||(zt={}));const Dt=Object.prototype.hasOwnProperty;function It(t,e){return Dt.call(t,e)}function Rt(t){return Array.prototype.slice.call(arguments,1).forEach((function(e){if(e){if("object"!=typeof e)throw new TypeError(e+"must be object");Object.keys(e).forEach((function(r){t[r]=e[r]}))}})),t}function Ft(t,e,r){return[].concat(t.slice(0,e),r,t.slice(e+1))}function Pt(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||!(65535&~t&&65534!=(65535&t))||t>=0&&t<=8||11===t||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function Nt(t){if(t>65535){const e=55296+((t-=65536)>>10),r=56320+(1023&t);return String.fromCharCode(e,r)}return String.fromCharCode(t)}const jt=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Bt=new RegExp(jt.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),Ut=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Gt(t){return t.indexOf("\\")<0?t:t.replace(jt,"$1")}function Vt(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(Bt,(function(t,e,r){return e||function(t,e){if(35===e.charCodeAt(0)&&Ut.test(e)){const r="x"===e[1].toLowerCase()?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return Pt(r)?Nt(r):t}const r=Tt(t);return r!==t?r:t}(t,r)}))}const Ht=/[&<>"]/,Wt=/[&<>"]/g,qt={"&":"&","<":"<",">":">",'"':"""};function Yt(t){return qt[t]}function Zt(t){return Ht.test(t)?t.replace(Wt,Yt):t}const Xt=/[.?*+^$[\]\\(){}|-]/g;function $t(t){return t.replace(Xt,"\\$&")}function Jt(t){switch(t){case 9:case 32:return!0}return!1}function Kt(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Qt(t){return ot.test(t)||at.test(t)}function te(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function ee(t){return t=t.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}const re={mdurl:t,ucmicro:e};function ne(t,e,r){let n,i,o,a;const s=t.posMax,l=t.pos;for(t.pos=e+1,n=1;t.pos32))return o;if(41===n){if(0===a)break;a--}i++}return e===i||0!==a||(o.str=Vt(t.slice(e,i)),o.pos=i,o.ok=!0),o}function oe(t,e,r,n){let i,o=e;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)a.str=n.str,a.marker=n.marker;else{if(o>=r)return a;let n=t.charCodeAt(o);if(34!==n&&39!==n&&40!==n)return a;e++,o++,40===n&&(n=41),a.marker=n}for(;o"+Zt(o.content)+""},ae.code_block=function(t,e,r,n,i){const o=t[e];return""+Zt(t[e].content)+"\n"},ae.fence=function(t,e,r,n,i){const o=t[e],a=o.info?Vt(o.info).trim():"";let s,l="",c="";if(a){const t=a.split(/(\s+)/g);l=t[0],c=t.slice(2).join("")}if(s=r.highlight&&r.highlight(o.content,l,c)||Zt(o.content),0===s.indexOf("${s}\n`}return`
${s}
\n`},ae.image=function(t,e,r,n,i){const o=t[e];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,r,n),i.renderToken(t,e,r)},ae.hardbreak=function(t,e,r){return r.xhtmlOut?"
\n":"
\n"},ae.softbreak=function(t,e,r){return r.breaks?r.xhtmlOut?"
\n":"
\n":"\n"},ae.text=function(t,e){return Zt(t[e].content)},ae.html_block=function(t,e){return t[e].content},ae.html_inline=function(t,e){return t[e].content},se.prototype.renderAttrs=function(t){let e,r,n;if(!t.attrs)return"";for(n="",e=0,r=t.attrs.length;e\n":">",i},se.prototype.renderInline=function(t,e,r){let n="";const i=this.rules;for(let o=0,a=t.length;o=0&&(r=this.attrs[e][1]),r},he.prototype.attrJoin=function(t,e){const r=this.attrIndex(t);r<0?this.attrPush([t,e]):this.attrs[r][1]=this.attrs[r][1]+" "+e};const de=he;function fe(t,e,r){this.src=t,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=e}fe.prototype.Token=de;const pe=fe,me=/\r\n?|\n/g,ge=/\0/g;function ve(t){return/^<\/a\s*>/i.test(t)}const be=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,ye=/\((c|tm|r)\)/i,xe=/\((c|tm|r)\)/gi,_e={c:"©",r:"®",tm:"™"};function we(t,e){return _e[e.toLowerCase()]}function ke(t){let e=0;for(let r=t.length-1;r>=0;r--){const n=t[r];"text"!==n.type||e||(n.content=n.content.replace(xe,we)),"link_open"===n.type&&"auto"===n.info&&e--,"link_close"===n.type&&"auto"===n.info&&e++}}function Ae(t){let e=0;for(let r=t.length-1;r>=0;r--){const n=t[r];"text"!==n.type||e||be.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===n.type&&"auto"===n.info&&e--,"link_close"===n.type&&"auto"===n.info&&e++}}const Me=/['"]/,Te=/['"]/g;function Se(t,e,r){return t.slice(0,e)+r+t.slice(e+1)}function Ce(t,e){let r;const n=[];for(let i=0;i=0&&!(n[r].level<=a);r--);if(n.length=r+1,"text"!==o.type)continue;let s=o.content,l=0,c=s.length;t:for(;l=0)p=s.charCodeAt(u.index-1);else for(r=i-1;r>=0&&"softbreak"!==t[r].type&&"hardbreak"!==t[r].type;r--)if(t[r].content){p=t[r].content.charCodeAt(t[r].content.length-1);break}let m=32;if(l=48&&p<=57&&(d=h=!1),h&&d&&(h=g,d=v),h||d){if(d)for(r=n.length-1;r>=0;r--){let h=n[r];if(n[r].level=0;a--){const s=i[a];if("link_close"!==s.type){if("html_inline"===s.type&&(r=s.content,/^\s]/i.test(r)&&o>0&&o--,ve(s.content)&&o++),!(o>0)&&"text"===s.type&&t.md.linkify.test(s.content)){const r=s.content;let o=t.md.linkify.match(r);const l=[];let c=s.level,u=0;o.length>0&&0===o[0].index&&a>0&&"text_special"===i[a-1].type&&(o=o.slice(1));for(let e=0;eu){const e=new t.Token("text","",0);e.content=r.slice(u,s),e.level=c,l.push(e)}const h=new t.Token("link_open","a",1);h.attrs=[["href",i]],h.level=c++,h.markup="linkify",h.info="auto",l.push(h);const d=new t.Token("text","",0);d.content=a,d.level=c,l.push(d);const f=new t.Token("link_close","a",-1);f.level=--c,f.markup="linkify",f.info="auto",l.push(f),u=o[e].lastIndex}if(u=0;e--)"inline"===t.tokens[e].type&&(ye.test(t.tokens[e].content)&&ke(t.tokens[e].children),be.test(t.tokens[e].content)&&Ae(t.tokens[e].children))}],["smartquotes",function(t){if(t.md.options.typographer)for(let e=t.tokens.length-1;e>=0;e--)"inline"===t.tokens[e].type&&Me.test(t.tokens[e].content)&&Ce(t.tokens[e].children,t)}],["text_join",function(t){let e,r;const n=t.tokens,i=n.length;for(let t=0;t0&&this.level++,this.tokens.push(n),n},Oe.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},Oe.prototype.skipEmptyLines=function(t){for(let e=this.lineMax;te;)if(!Jt(this.src.charCodeAt(--t)))return t+1;return t},Oe.prototype.skipChars=function(t,e){for(let r=this.src.length;tr;)if(e!==this.src.charCodeAt(--t))return t+1;return t},Oe.prototype.getLines=function(t,e,r,n){if(t>=e)return"";const i=new Array(e-t);for(let o=0,a=t;ar?new Array(t-r+1).join(" ")+this.src.slice(c,l):this.src.slice(c,l)}return i.join("")},Oe.prototype.Token=de;const De=Oe;function Ie(t,e){const r=t.bMarks[e]+t.tShift[e],n=t.eMarks[e];return t.src.slice(r,n)}function Re(t){const e=[],r=t.length;let n=0,i=t.charCodeAt(n),o=!1,a=0,s="";for(;n=n)return-1;let o=t.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=n)return-1;if(o=t.src.charCodeAt(i++),!(o>=48&&o<=57)){if(41===o||46===o)break;return-1}if(i-r>=10)return-1}return i`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",je="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Be=new RegExp("^(?:"+Ne+"|"+je+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|]*>|)"),Ue=new RegExp("^(?:"+Ne+"|"+je+")"),Ge=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(Ue.source+"\\s*$"),/^$/,!1]],Ve=[["table",function(t,e,r,n){if(e+2>r)return!1;let i=e+1;if(t.sCount[i]=4)return!1;let o=t.bMarks[i]+t.tShift[i];if(o>=t.eMarks[i])return!1;const a=t.src.charCodeAt(o++);if(124!==a&&45!==a&&58!==a)return!1;if(o>=t.eMarks[i])return!1;const s=t.src.charCodeAt(o++);if(124!==s&&45!==s&&58!==s&&!Jt(s))return!1;if(45===a&&Jt(s))return!1;for(;o=4)return!1;c=Re(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop();const h=c.length;if(0===h||h!==u.length)return!1;if(n)return!0;const d=t.parentType;t.parentType="table";const f=t.md.block.ruler.getRules("blockquote"),p=[e,0];t.push("table_open","table",1).map=p,t.push("thead_open","thead",1).map=[e,e+1],t.push("tr_open","tr",1).map=[e,e+1];for(let e=0;e=4)break;if(c=Re(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop(),g+=h-c.length,g>65536)break;i===e+2&&(t.push("tbody_open","tbody",1).map=m=[e+2,0]),t.push("tr_open","tr",1).map=[i,i+1];for(let e=0;e=4))break;n++,i=n}t.line=i;const o=t.push("code_block","code",0);return o.content=t.getLines(e,i,4+t.blkIndent,!1)+"\n",o.map=[e,t.line],!0}],["fence",function(t,e,r,n){let i=t.bMarks[e]+t.tShift[e],o=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(i+3>o)return!1;const a=t.src.charCodeAt(i);if(126!==a&&96!==a)return!1;let s=i;i=t.skipChars(i,a);let l=i-s;if(l<3)return!1;const c=t.src.slice(s,i),u=t.src.slice(i,o);if(96===a&&u.indexOf(String.fromCharCode(a))>=0)return!1;if(n)return!0;let h=e,d=!1;for(;!(h++,h>=r||(i=s=t.bMarks[h]+t.tShift[h],o=t.eMarks[h],i=4||(i=t.skipChars(i,a),i-s=4)return!1;if(62!==t.src.charCodeAt(i))return!1;if(n)return!0;const s=[],l=[],c=[],u=[],h=t.md.block.ruler.getRules("blockquote"),d=t.parentType;t.parentType="blockquote";let f,p=!1;for(f=e;f=o)break;if(62===t.src.charCodeAt(i++)&&!e){let e,r,n=t.sCount[f]+1;32===t.src.charCodeAt(i)?(i++,n++,r=!1,e=!0):9===t.src.charCodeAt(i)?(e=!0,(t.bsCount[f]+n)%4==3?(i++,n++,r=!1):r=!0):e=!1;let a=n;for(s.push(t.bMarks[f]),t.bMarks[f]=i;i=o,l.push(t.bsCount[f]),t.bsCount[f]=t.sCount[f]+1+(e?1:0),c.push(t.sCount[f]),t.sCount[f]=a-n,u.push(t.tShift[f]),t.tShift[f]=i-t.bMarks[f];continue}if(p)break;let n=!1;for(let e=0,i=h.length;e";const v=[e,0];g.map=v,t.md.block.tokenize(t,e,f),t.push("blockquote_close","blockquote",-1).markup=">",t.lineMax=a,t.parentType=d,v[1]=t.line;for(let r=0;r=4)return!1;let o=t.bMarks[e]+t.tShift[e];const a=t.src.charCodeAt(o++);if(42!==a&&45!==a&&95!==a)return!1;let s=1;for(;o=4)return!1;if(t.listIndent>=0&&t.sCount[l]-t.listIndent>=4&&t.sCount[l]=t.blkIndent&&(f=!0),(d=Pe(t,l))>=0){if(u=!0,a=t.bMarks[l]+t.tShift[l],h=Number(t.src.slice(a,d-1)),f&&1!==h)return!1}else{if(!((d=Fe(t,l))>=0))return!1;u=!1}if(f&&t.skipSpaces(d)>=t.eMarks[l])return!1;if(n)return!0;const p=t.src.charCodeAt(d-1),m=t.tokens.length;u?(s=t.push("ordered_list_open","ol",1),1!==h&&(s.attrs=[["start",h]])):s=t.push("bullet_list_open","ul",1);const g=[l,0];s.map=g,s.markup=String.fromCharCode(p);let v=!1;const b=t.md.block.ruler.getRules("list"),y=t.parentType;for(t.parentType="list";l=i?1:n-e,f>4&&(f=1);const m=e+f;s=t.push("list_item_open","li",1),s.markup=String.fromCharCode(p);const g=[l,0];s.map=g,u&&(s.info=t.src.slice(a,d-1));const y=t.tight,x=t.tShift[l],_=t.sCount[l],w=t.listIndent;if(t.listIndent=t.blkIndent,t.blkIndent=m,t.tight=!0,t.tShift[l]=h-t.bMarks[l],t.sCount[l]=n,h>=i&&t.isEmpty(l+1)?t.line=Math.min(t.line+2,r):t.md.block.tokenize(t,l,r,!0),t.tight&&!v||(c=!1),v=t.line-l>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=w,t.tShift[l]=x,t.sCount[l]=_,t.tight=y,s=t.push("list_item_close","li",-1),s.markup=String.fromCharCode(p),l=t.line,g[1]=l,l>=r)break;if(t.sCount[l]=4)break;let k=!1;for(let e=0,n=b.length;e=4)return!1;if(91!==t.src.charCodeAt(i))return!1;function s(e){const r=t.lineMax;if(e>=r||t.isEmpty(e))return null;let n=!1;if(t.sCount[e]-t.blkIndent>3&&(n=!0),t.sCount[e]<0&&(n=!0),!n){const n=t.md.block.ruler.getRules("reference"),i=t.parentType;t.parentType="reference";let o=!1;for(let i=0,a=n.length;i=4)return!1;if(!t.md.options.html)return!1;if(60!==t.src.charCodeAt(i))return!1;let a=t.src.slice(i,o),s=0;for(;s=4)return!1;let a=t.src.charCodeAt(i);if(35!==a||i>=o)return!1;let s=1;for(a=t.src.charCodeAt(++i);35===a&&i6||ii&&Jt(t.src.charCodeAt(l-1))&&(o=l),t.line=e+1;const c=t.push("heading_open","h"+String(s),1);c.markup="########".slice(0,s),c.map=[e,t.line];const u=t.push("inline","",0);return u.content=t.src.slice(i,o).trim(),u.map=[e,t.line],u.children=[],t.push("heading_close","h"+String(s),-1).markup="########".slice(0,s),!0},["paragraph","reference","blockquote"]],["lheading",function(t,e,r){const n=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;const i=t.parentType;t.parentType="paragraph";let o,a=0,s=e+1;for(;s3)continue;if(t.sCount[s]>=t.blkIndent){let e=t.bMarks[s]+t.tShift[s];const r=t.eMarks[s];if(e=r))){a=61===o?1:2;break}}if(t.sCount[s]<0)continue;let e=!1;for(let i=0,o=n.length;i3)continue;if(t.sCount[o]<0)continue;let e=!1;for(let i=0,a=n.length;i=r))&&!(t.sCount[a]=o){t.line=r;break}const e=t.line;let l=!1;for(let o=0;o=t.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");t.tight=!s,t.isEmpty(t.line-1)&&(s=!0),a=t.line,a0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(i),n},qe.prototype.scanDelims=function(t,e){const r=this.posMax,n=this.src.charCodeAt(t),i=t>0?this.src.charCodeAt(t-1):32;let o=t;for(;o?@[]^_`{|}~-".split("").forEach((function(t){$e[t.charCodeAt(0)]=1}));const Ke={tokenize:function(t,e){const r=t.pos,n=t.src.charCodeAt(r);if(e)return!1;if(126!==n)return!1;const i=t.scanDelims(t.pos,!0);let o=i.length;const a=String.fromCharCode(n);if(o<2)return!1;let s;o%2&&(s=t.push("text","",0),s.content=a,o--);for(let e=0;e=0;r--){const n=e[r];if(95!==n.marker&&42!==n.marker)continue;if(-1===n.end)continue;const i=e[n.end],o=r>0&&e[r-1].end===n.end+1&&e[r-1].marker===n.marker&&e[r-1].token===n.token-1&&e[n.end+1].token===i.token+1,a=String.fromCharCode(n.marker),s=t.tokens[n.token];s.type=o?"strong_open":"em_open",s.tag=o?"strong":"em",s.nesting=1,s.markup=o?a+a:a,s.content="";const l=t.tokens[i.token];l.type=o?"strong_close":"em_close",l.tag=o?"strong":"em",l.nesting=-1,l.markup=o?a+a:a,l.content="",o&&(t.tokens[e[r-1].token].content="",t.tokens[e[n.end+1].token].content="",r--)}}const tr={tokenize:function(t,e){const r=t.pos,n=t.src.charCodeAt(r);if(e)return!1;if(95!==n&&42!==n)return!1;const i=t.scanDelims(t.pos,42===n);for(let e=0;e\x00-\x20]*)$/,nr=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,ir=/^&([a-z][a-z0-9]{1,31});/i;function or(t){const e={},r=t.length;if(!r)return;let n=0,i=-2;const o=[];for(let a=0;as;l-=o[l]+1){const e=t[l];if(e.marker===r.marker&&e.open&&e.end<0){let n=!1;if((e.close||r.open)&&(e.length+r.length)%3==0&&(e.length%3==0&&r.length%3==0||(n=!0)),!n){const n=l>0&&!t[l-1].open?o[l-1]+1:0;o[a]=a-l+n,o[l]=n,r.open=!1,e.end=a,e.close=!1,c=-1,i=-2;break}}}-1!==c&&(e[r.marker][(r.open?3:0)+(r.length||0)%3]=c)}}const ar=[["text",function(t,e){let r=t.pos;for(;r0)return!1;const r=t.pos;if(r+3>t.posMax)return!1;if(58!==t.src.charCodeAt(r))return!1;if(47!==t.src.charCodeAt(r+1))return!1;if(47!==t.src.charCodeAt(r+2))return!1;const n=t.pending.match(Xe);if(!n)return!1;const i=n[1],o=t.md.linkify.matchAtStart(t.src.slice(r-i.length));if(!o)return!1;let a=o.url;if(a.length<=i.length)return!1;a=a.replace(/\*+$/,"");const s=t.md.normalizeLink(a);if(!t.md.validateLink(s))return!1;if(!e){t.pending=t.pending.slice(0,-i.length);const e=t.push("link_open","a",1);e.attrs=[["href",s]],e.markup="linkify",e.info="auto",t.push("text","",0).content=t.md.normalizeLinkText(a);const r=t.push("link_close","a",-1);r.markup="linkify",r.info="auto"}return t.pos+=a.length-i.length,!0}],["newline",function(t,e){let r=t.pos;if(10!==t.src.charCodeAt(r))return!1;const n=t.pending.length-1,i=t.posMax;if(!e)if(n>=0&&32===t.pending.charCodeAt(n))if(n>=1&&32===t.pending.charCodeAt(n-1)){let e=n-1;for(;e>=1&&32===t.pending.charCodeAt(e-1);)e--;t.pending=t.pending.slice(0,e),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(r++;r=n)return!1;let i=t.src.charCodeAt(r);if(10===i){for(e||t.push("hardbreak","br",0),r++;r=55296&&i<=56319&&r+1=56320&&e<=57343&&(o+=t.src[r+1],r++)}const a="\\"+o;if(!e){const e=t.push("text_special","",0);i<256&&0!==$e[i]?e.content=o:e.content=a,e.markup=a,e.info="escape"}return t.pos=r+1,!0}],["backticks",function(t,e){let r=t.pos;if(96!==t.src.charCodeAt(r))return!1;const n=r;r++;const i=t.posMax;for(;r=h)return!1;if(l=p,i=t.md.helpers.parseLinkDestination(t.src,p,t.posMax),i.ok){for(a=t.md.normalizeLink(i.str),t.md.validateLink(a)?p=i.pos:a="",l=p;p=h||41!==t.src.charCodeAt(p))&&(c=!0),p++}if(c){if(void 0===t.env.references)return!1;if(p=0?n=t.src.slice(l,p++):p=f+1):p=f+1,n||(n=t.src.slice(d,f)),o=t.env.references[ee(n)],!o)return t.pos=u,!1;a=o.href,s=o.title}if(!e){t.pos=d,t.posMax=f;const e=[["href",a]];t.push("link_open","a",1).attrs=e,s&&e.push(["title",s]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)}return t.pos=p,t.posMax=h,!0}],["image",function(t,e){let r,n,i,o,a,s,l,c,u="";const h=t.pos,d=t.posMax;if(33!==t.src.charCodeAt(t.pos))return!1;if(91!==t.src.charCodeAt(t.pos+1))return!1;const f=t.pos+2,p=t.md.helpers.parseLinkLabel(t,t.pos+1,!1);if(p<0)return!1;if(o=p+1,o=d)return!1;for(c=o,s=t.md.helpers.parseLinkDestination(t.src,o,t.posMax),s.ok&&(u=t.md.normalizeLink(s.str),t.md.validateLink(u)?o=s.pos:u=""),c=o;o=d||41!==t.src.charCodeAt(o))return t.pos=h,!1;o++}else{if(void 0===t.env.references)return!1;if(o=0?i=t.src.slice(c,o++):o=p+1):o=p+1,i||(i=t.src.slice(f,p)),a=t.env.references[ee(i)],!a)return t.pos=h,!1;u=a.href,l=a.title}if(!e){n=t.src.slice(f,p);const e=[];t.md.inline.parse(n,t.md,t.env,e);const r=t.push("image","img",0),i=[["src",u],["alt",""]];r.attrs=i,r.children=e,r.content=n,l&&i.push(["title",l])}return t.pos=o,t.posMax=d,!0}],["autolink",function(t,e){let r=t.pos;if(60!==t.src.charCodeAt(r))return!1;const n=t.pos,i=t.posMax;for(;;){if(++r>=i)return!1;const e=t.src.charCodeAt(r);if(60===e)return!1;if(62===e)break}const o=t.src.slice(n+1,r);if(rr.test(o)){const r=t.md.normalizeLink(o);if(!t.md.validateLink(r))return!1;if(!e){const e=t.push("link_open","a",1);e.attrs=[["href",r]],e.markup="autolink",e.info="auto",t.push("text","",0).content=t.md.normalizeLinkText(o);const n=t.push("link_close","a",-1);n.markup="autolink",n.info="auto"}return t.pos+=o.length+2,!0}if(er.test(o)){const r=t.md.normalizeLink("mailto:"+o);if(!t.md.validateLink(r))return!1;if(!e){const e=t.push("link_open","a",1);e.attrs=[["href",r]],e.markup="autolink",e.info="auto",t.push("text","",0).content=t.md.normalizeLinkText(o);const n=t.push("link_close","a",-1);n.markup="autolink",n.info="auto"}return t.pos+=o.length+2,!0}return!1}],["html_inline",function(t,e){if(!t.md.options.html)return!1;const r=t.posMax,n=t.pos;if(60!==t.src.charCodeAt(n)||n+2>=r)return!1;const i=t.src.charCodeAt(n+1);if(33!==i&&63!==i&&47!==i&&!function(t){const e=32|t;return e>=97&&e<=122}(i))return!1;const o=t.src.slice(n).match(Be);if(!o)return!1;if(!e){const e=t.push("html_inline","",0);e.content=o[0],a=e.content,/^\s]/i.test(a)&&t.linkLevel++,function(t){return/^<\/a\s*>/i.test(t)}(e.content)&&t.linkLevel--}var a;return t.pos+=o[0].length,!0}],["entity",function(t,e){const r=t.pos,n=t.posMax;if(38!==t.src.charCodeAt(r))return!1;if(r+1>=n)return!1;if(35===t.src.charCodeAt(r+1)){const n=t.src.slice(r).match(nr);if(n){if(!e){const e="x"===n[1][0].toLowerCase()?parseInt(n[1].slice(1),16):parseInt(n[1],10),r=t.push("text_special","",0);r.content=Pt(e)?Nt(e):Nt(65533),r.markup=n[0],r.info="entity"}return t.pos+=n[0].length,!0}}else{const n=t.src.slice(r).match(ir);if(n){const r=Tt(n[0]);if(r!==n[0]){if(!e){const e=t.push("text_special","",0);e.content=r,e.markup=n[0],e.info="entity"}return t.pos+=n[0].length,!0}}}return!1}]],sr=[["balance_pairs",function(t){const e=t.tokens_meta,r=t.tokens_meta.length;or(t.delimiters);for(let t=0;t0&&n++,"text"===i[e].type&&e+1=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;a||t.pos++,o[e]=t.pos},lr.prototype.tokenize=function(t){const e=this.ruler.getRules(""),r=e.length,n=t.posMax,i=t.md.options.maxNesting;for(;t.pos=t.pos)throw new Error("inline rule didn't increment state.pos");break}if(a){if(t.pos>=n)break}else t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()},lr.prototype.parse=function(t,e,r,n){const i=new this.State(t,e,r,n);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let t=0;t=3&&":"===t[e-3]||e>=3&&"/"===t[e-3]?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,r){const n=t.slice(e);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},gr="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",vr="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function br(t){const e=t.re=function(t){const e={};t=t||{},e.src_Any=st.source,e.src_Cc=lt.source,e.src_Z=ut.source,e.src_P=ot.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");return e.src_pseudo_letter="(?:(?![><|]|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|[><|]|"+e.src_ZPCc+")(?!"+(t["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy='(^|[><|]|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}(t.__opts__),r=t.__tlds__.slice();function n(t){return t.replace("%TLDS%",e.src_tlds)}t.onCompile(),t.__tlds_replaced__||r.push(gr),r.push(e.src_xn),e.src_tlds=r.join("|"),e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");const i=[];function o(t,e){throw new Error('(LinkifyIt) Invalid schema "'+t+'": '+e)}t.__compiled__={},Object.keys(t.__schemas__).forEach((function(e){const r=t.__schemas__[e];if(null===r)return;const n={validate:null,link:null};if(t.__compiled__[e]=n,"[object Object]"===hr(r))return"[object RegExp]"!==hr(r.validate)?dr(r.validate)?n.validate=r.validate:o(e,r):n.validate=function(t){return function(e,r){const n=e.slice(r);return t.test(n)?n.match(t)[0].length:0}}(r.validate),void(dr(r.normalize)?n.normalize=r.normalize:r.normalize?o(e,r):n.normalize=function(t,e){e.normalize(t)});!function(t){return"[object String]"===hr(t)}(r)?o(e,r):i.push(e)})),i.forEach((function(e){t.__compiled__[t.__schemas__[e]]&&(t.__compiled__[e].validate=t.__compiled__[t.__schemas__[e]].validate,t.__compiled__[e].normalize=t.__compiled__[t.__schemas__[e]].normalize)})),t.__compiled__[""]={validate:null,normalize:function(t,e){e.normalize(t)}};const a=Object.keys(t.__compiled__).filter((function(e){return e.length>0&&t.__compiled__[e]})).map(fr).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+a+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+a+")","ig"),t.re.schema_at_start=RegExp("^"+t.re.schema_search.source,"i"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),function(t){t.__index__=-1,t.__text_cache__=""}(t)}function yr(t,e){const r=t.__index__,n=t.__last_index__,i=t.__text_cache__.slice(r,n);this.schema=t.__schema__.toLowerCase(),this.index=r+e,this.lastIndex=n+e,this.raw=i,this.text=i,this.url=i}function xr(t,e){const r=new yr(t,e);return t.__compiled__[r.schema].normalize(r,t),r}function _r(t,e){if(!(this instanceof _r))return new _r(t,e);var r;e||(r=t,Object.keys(r||{}).reduce((function(t,e){return t||pr.hasOwnProperty(e)}),!1)&&(e=t,t={})),this.__opts__=ur({},pr,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=ur({},mr,t),this.__compiled__={},this.__tlds__=vr,this.__tlds_replaced__=!1,this.re={},br(this)}_r.prototype.add=function(t,e){return this.__schemas__[t]=e,br(this),this},_r.prototype.set=function(t){return this.__opts__=ur(this.__opts__,t),this},_r.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let e,r,n,i,o,a,s,l,c;if(this.re.schema_test.test(t))for(s=this.re.schema_search,s.lastIndex=0;null!==(e=s.exec(t));)if(i=this.testSchemaAt(t,e[2],s.lastIndex),i){this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&null!==(n=t.match(this.re.email_fuzzy))&&(o=n.index+n[1].length,a=n.index+n[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a))),this.__index__>=0},_r.prototype.pretest=function(t){return this.re.pretest.test(t)},_r.prototype.testSchemaAt=function(t,e,r){return this.__compiled__[e.toLowerCase()]?this.__compiled__[e.toLowerCase()].validate(t,r,this):0},_r.prototype.match=function(t){const e=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(e.push(xr(this,r)),r=this.__last_index__);let n=r?t.slice(r):t;for(;this.test(n);)e.push(xr(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return e.length?e:null},_r.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const e=this.re.schema_at_start.exec(t);if(!e)return null;const r=this.testSchemaAt(t,e[2],e[0].length);return r?(this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+r,xr(this,0)):null},_r.prototype.tlds=function(t,e){return t=Array.isArray(t)?t:[t],e?(this.__tlds__=this.__tlds__.concat(t).sort().filter((function(t,e,r){return t!==r[e-1]})).reverse(),br(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,br(this),this)},_r.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),"mailto:"!==t.schema||/^mailto:/i.test(t.url)||(t.url="mailto:"+t.url)},_r.prototype.onCompile=function(){};const wr=_r,kr=2147483647,Ar=36,Mr=/^xn--/,Tr=/[^\0-\x7F]/,Sr=/[\x2E\u3002\uFF0E\uFF61]/g,Cr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Er=Math.floor,Lr=String.fromCharCode;function zr(t){throw new RangeError(Cr[t])}function Or(t,e){const r=t.split("@");let n="";r.length>1&&(n=r[0]+"@",t=r[1]);const i=function(t,e){const r=[];let n=t.length;for(;n--;)r[n]=e(t[n]);return r}((t=t.replace(Sr,".")).split("."),e).join(".");return n+i}function Dr(t){const e=[];let r=0;const n=t.length;for(;r=55296&&i<=56319&&r>1,t+=Er(t/e);t>455;n+=Ar)t=Er(t/35);return Er(n+36*t/(t+38))},Fr=function(t){const e=[],r=t.length;let n=0,i=128,o=72,a=t.lastIndexOf("-");a<0&&(a=0);for(let r=0;r=128&&zr("not-basic"),e.push(t.charCodeAt(r));for(let l=a>0?a+1:0;l=r&&zr("invalid-input");const a=(s=t.charCodeAt(l++))>=48&&s<58?s-48+26:s>=65&&s<91?s-65:s>=97&&s<123?s-97:Ar;a>=Ar&&zr("invalid-input"),a>Er((kr-n)/e)&&zr("overflow"),n+=a*e;const c=i<=o?1:i>=o+26?26:i-o;if(aEr(kr/u)&&zr("overflow"),e*=u}const c=e.length+1;o=Rr(n-a,c,0==a),Er(n/c)>kr-i&&zr("overflow"),i+=Er(n/c),n%=c,e.splice(n++,0,i)}var s;return String.fromCodePoint(...e)},Pr=function(t){const e=[],r=(t=Dr(t)).length;let n=128,i=0,o=72;for(const r of t)r<128&&e.push(Lr(r));const a=e.length;let s=a;for(a&&e.push("-");s=n&&eEr((kr-i)/l)&&zr("overflow"),i+=(r-n)*l,n=r;for(const r of t)if(rkr&&zr("overflow"),r===n){let t=i;for(let r=Ar;;r+=Ar){const n=r<=o?1:r>=o+26?26:r-o;if(tString.fromCodePoint(...t)},decode:Fr,encode:Pr,toASCII:function(t){return Or(t,(function(t){return Tr.test(t)?"xn--"+Pr(t):t}))},toUnicode:function(t){return Or(t,(function(t){return Mr.test(t)?Fr(t.slice(4).toLowerCase()):t}))}},jr={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},Br=/^(vbscript|javascript|file|data):/,Ur=/^data:image\/(gif|png|jpeg|webp);/;function Gr(t){const e=t.trim().toLowerCase();return!Br.test(e)||Ur.test(e)}const Vr=["http:","https:","mailto:"];function Hr(t){const e=it(t,!0);if(e.hostname&&(!e.protocol||Vr.indexOf(e.protocol)>=0))try{e.hostname=Nr.toASCII(e.hostname)}catch(t){}return H(W(e))}function Wr(t){const e=it(t,!0);if(e.hostname&&(!e.protocol||Vr.indexOf(e.protocol)>=0))try{e.hostname=Nr.toUnicode(e.hostname)}catch(t){}return U(W(e),U.defaultChars+"%")}function qr(t,e){if(!(this instanceof qr))return new qr(t,e);e||Ot(t)||(e=t||{},t="default"),this.inline=new cr,this.block=new We,this.core=new ze,this.renderer=new le,this.linkify=new wr,this.validateLink=Gr,this.normalizeLink=Hr,this.normalizeLinkText=Wr,this.utils=r,this.helpers=Rt({},n),this.options={},this.configure(t),e&&this.set(e)}qr.prototype.set=function(t){return Rt(this.options,t),this},qr.prototype.configure=function(t){const e=this;if(Ot(t)){const e=t;if(!(t=jr[e]))throw new Error('Wrong `markdown-it` preset "'+e+'", check name')}if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach((function(r){t.components[r].rules&&e[r].ruler.enableOnly(t.components[r].rules),t.components[r].rules2&&e[r].ruler2.enableOnly(t.components[r].rules2)})),this},qr.prototype.enable=function(t,e){let r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){r=r.concat(this[e].ruler.enable(t,!0))}),this),r=r.concat(this.inline.ruler2.enable(t,!0));const n=t.filter((function(t){return r.indexOf(t)<0}));if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},qr.prototype.disable=function(t,e){let r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){r=r.concat(this[e].ruler.disable(t,!0))}),this),r=r.concat(this.inline.ruler2.disable(t,!0));const n=t.filter((function(t){return r.indexOf(t)<0}));if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},qr.prototype.use=function(t){const e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},qr.prototype.parse=function(t,e){if("string"!=typeof t)throw new Error("Input data should be a String");const r=new this.core.State(t,this,e);return this.core.process(r),r.tokens},qr.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},qr.prototype.parseInline=function(t,e){const r=new this.core.State(t,this,e);return r.inlineMode=!0,this.core.process(r),r.tokens},qr.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};const Yr=qr;class Zr{constructor(t,e){e.name=e.name.replace(//g,">");const r=(0,s.V6)(t),n=document.createElement("div");n.style.setProperty("height","100%"),r.appendChild(n),this._shadow=n.attachShadow({mode:"open"}),this._shadow.adoptedStyleSheets=[v.A,b.A],this._name=document.createElement("div"),this._shadow.appendChild(this._name),this._name.innerHTML=`
\n ${e.name} \n
${g}
\n
`;const i=document.createElement("template");i.innerHTML=function(t){const e=Yr({html:!1,linkify:!0,typographer:!0});let r="No description for this dataset.";void 0!==t.description&&(r=t.description);let n="No authors for this dataset.";if(void 0!==t.authors){n='
    ';for(const r of t.authors)n+=`
  • ${e.render(r).slice(3,-5)}
  • `;n+="
"}let i="No references for this dataset.";if(void 0!==t.references){i="
    ";for(const r of t.references)i+=`
  • ${e.render(r)}
  • `;i+="
"}return``}(e);const o=i.content.firstChild;this._modal=new T.A(o),this._modal.shadow.adoptedStyleSheets=[v.A,b.A],this._name.onclick=()=>this._modal.open(),o.addEventListener("keydown",(t=>{t.stopPropagation()}))}remove(){this._modal.remove(),this._shadow.host.remove()}}var Xr=__webpack_require__(14761);function $r(t){if("object"!=typeof t)throw Error("the dataset must be a JavaScript object");if(!("meta"in t))throw Error('missing "meta" key in the dataset');if("object"!=typeof t.meta||null===t.meta)throw Error('"meta" must be an object in the dataset');if(function(t){if(!("name"in t))throw Error('missing "meta.name" key in the dataset');if("string"!=typeof t.name)throw Error('"meta.name" must be a string in the dataset');if("description"in t&&"string"!=typeof t.description)throw Error('"meta.description" should be a string in the dataset');if("authors"in t){if(!Array.isArray(t.authors))throw Error('"meta.authors" must be an array in the dataset');for(const e of t.authors)if("string"!=typeof e)throw Error('"meta.authors" must be an array of strings in the dataset')}if("references"in t){if(!Array.isArray(t.references))throw Error('"meta.references" must be an array in the dataset');for(const e of t.references)if("string"!=typeof e)throw Error('"meta.references" must be an array of strings in the dataset')}}(t.meta),!("structures"in t))throw Error('missing "structures" key in the dataset');if(!Array.isArray(t.structures))throw Error('"structures" must be an array in the dataset');const[e,r]=function(t){let e=0;for(let r=0;r=e.length)throw Error(`out of bounds 'structure' for environment ${r}: index is ${n.structure}, we have ${e.length} structures`);if(!("center"in n)||"number"!=typeof n.center)throw Error(`missing 'center' for environment ${r}`);const i=e[n.structure].size;if(!tn(n.center)||n.center>=i)throw Error(`out of bounds 'center' for environment ${r}: index is ${n.center}, we have ${i} atoms in structure ${n.structure}`);if(!("cutoff"in n)||"number"!=typeof n.cutoff)throw Error(`missing 'cutoff' for environment ${r}`)}}(t.environments,t.structures)}if("shapes"in t){const r=function(t,e,r){if("object"!=typeof t||null===t)return"'shapes' must be an object";for(const[n,i]of Object.entries(t)){const t=i;if(!("kind"in t))return`missing "kind" in shape ${n}`;if("string"!=typeof t.kind)return`shapes 'kind' must be a string for shape ${n}`;if(!("parameters"in t))return`missing "parameters" in shape ${n}`;const o=t.parameters;if("structure"in o){const t=o.structure;if(!Array.isArray(t))return`'structure' parameters should be an array in shape ${n}`;if(t.length!==e)return`'structure' parameters in shape ${n} contain ${t.length} entries, but there are ${e} structures.`}if("atom"in o){const t=o.atom;if(!Array.isArray(t))return`'atom' parameters should be an array in shape ${n}`;if(t.length!==r)return`'atom' parameters in shape ${n} contain ${t.length} entries, but there are ${r} environments.`}}return""}(t.shapes,e,n);if(""!==r)throw Error("Error checking shape definitions: "+r);const i=function(t,e){let r=0;for(let n=0;n0&&o.values.length!==a)throw Error(`wrong size for 'properties['${i}'].values': expected ${a}, got ${o.values.length}`);const s=typeof o.values[0];if("string"!==s&&"number"!==s&&!en(o.values))throw Error(`'properties['${i}'].values' should contain string or number or an array of numbers`);for(const t of o.values)if(typeof t!==s)throw Error(`'properties['${i}'].values' should be of a single type`);if(en(o.values)){if(!n)throw Error(`'parameters' should be provided for multidimensional properties '${i}'`);const t=o.parameters;if(!nn(t))throw Error(`'properties['${i}'].parameters' should be an array of strings`);if(1!==t.length)throw Error(`'properties['${i}'].parameters' should contain a single parameter`);for(const e of t)if(!(e in n))throw Error(`parameter '${e}' of 'properties['${i}']' does not appear in the list provided parameters`);const e=o.values[0];for(const r of t){const t=n[r].values;if(e.length!==t.length)throw Error(`'properties['${i}'].values' and 'parameters['${r}'].values' should have the same length`)}if(!rn(o.values))throw Error(`'properties['${i}].values' should contain arrays of the same length`)}if("description"in o&&"string"!=typeof o.description)throw Error(`'properties['${i}'].description' should contain a string`);if("units"in o&&"string"!=typeof o.units)throw Error(`'properties['${i}'].units' should contain a string`)}}(t.properties,e,n,t.parameters)}function Jr(t){var e;const r=null===(e=t.settings)||void 0===e?void 0:e.target;if(void 0!==r){if("atom"===r&&void 0===t.environments)throw new Error('To use "atom" target, a list of environments should be provided');return r}const n=Object.values(t.properties).filter((t=>"atom"===t.target));return void 0!==t.environments&&n.length>0?"atom":"structure"}function Kr(t,e){return"sphere"===t?Xr.iy.validateParameters(e):"ellipsoid"===t?Xr.C1.validateParameters(e):"arrow"===t?Xr.i3.validateParameters(e):"cylinder"===t?Xr.T.validateParameters(e):"custom"===t?Xr.Nh.validateParameters(e):""}function Qr(t){if("object"!=typeof t||null===t)throw Error("the structure must be a JavaScript object");if(!("size"in t)||"number"!=typeof t.size||!tn(t.size))return'missing "size"';for(const e of["names","x","y","z"]){if(!(e in t))return`missing "${e}"`;const r=t[e];if(!Array.isArray(r))return`"${e}" must be an array`;if(t.size>0&&r.length!==t.size)return`wrong size for "${e}", expected ${t.size}, got ${r.length}`}return!("cell"in t)||Array.isArray(t.cell)&&9===t.cell.length?"":'"cell" must be an array of size 9'}function tn(t){return Number.isInteger(t)&&t>=0}function en(t){let e=!0;for(const r of t)e=Array.isArray(r)&&e;return e}function rn(t){const e=t[0];let r=!0;for(const n of t)r=n.length===e.length&&r;return r}function nn(t){if(Array.isArray(t)){let e=!0;for(const r of t)e="string"==typeof r&&e;return e}return!1}var on=__webpack_require__(79352),an=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function s(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}l((n=n.apply(t,e||[])).next())}))};class sn{constructor(t,e,r,n,i,o,a=9){if(this._target=n,this._structures=r,void 0===i)this._properties={};else{const t=y(i,(t=>Object.values(t.values).every((t=>"number"==typeof t)))),e=y(t,(t=>"atom"===t.target));this._properties=Object.fromEntries(Object.entries(e).map((([t,e])=>[t,e.values])))}if(this._resolvedStructures=new Array(r.length),this._indexer=e,this._calculatedEnvironments=function(t,e){if(void 0===e)return;const r=Array.from({length:t.length}).map(((e,r)=>Array.from({length:t[r].size})));for(let t=0;t{if(""!==Qr(e))throw Error(`got custom data for this structure, but no custom loadStructure callback\nthe object was ${JSON.stringify(e)}`);return e},this._cellsData=new Map,this.onselect=()=>{},this.onremove=()=>{},this.oncreate=()=>{},this.activeChanged=()=>{},this.delayChanged=()=>{},this._onSettingChangeCallbacks=[],a>9)throw Error("chemiscope only supports up to 9 structure viewers in the grid");this._maxViewers=a;const l=(0,s.V6)(t),c=document.createElement("div");c.style.setProperty("height","100%"),l.appendChild(c),this._shadow=c.attachShadow({mode:"open"}),this._shadow.adoptedStyleSheets=[v.A,b.A],this._root=document.createElement("div"),this._root.id="grid-root",this._root.className="chsp-structure-viewer-grid",this._shadow.appendChild(this._root),this._setupGrid(1),this._active=(0,s.o)(this._cellsData),this.setActive(this._active)}_getById(t){return(0,s.VT)(t,this._shadow)}get active(){return this._active}pinned(){const t=[];for(const e of this._cellsData.values())t.push(e.current);return t}show(t){this._showInViewer(this.active,t).catch((t=>{throw t}))}addViewer(){const t=this._setupGrid(this._cellsData.size+1);if(0===t.length)return{guid:void 0,color:""};o()(1===t.length,"newGUIDs.length === 1");const e=t[0],r=this._cellsData.get(e);o()(void 0!==r,"newData !== undefined");for(const t of this._onSettingChangeCallbacks)r.viewer.onSettingChange(((r,n)=>{let i=0;for(const t of this._cellsData.keys()){if(e===t)break;i+=1}r.unshift(i.toString()),t(r,n)}));return{guid:e,color:r.color}}removeViewer(t){o()(this._cellsData.size>1,"this._cellsData.size > 1"),this._active===t&&this.setActive((0,s.o)(this._cellsData,t));const e=this._cellsData.get(t);o()(void 0!==e,"data !== undefined"),e.viewer.remove(),this._getById(`gi-${t}`).remove(),this._cellsData.delete(t)}remove(){for(const t of this._cellsData.values())t.viewer.remove();this._shadow.host.remove()}setActive(t){const e=(t,e)=>{const r=this._getById(`chsp-activate-${t}`);r.classList.toggle("chsp-active-pin",e),o()(null!==r.parentElement,"button.parentElement !== null");const n=r.parentElement.querySelector(".chsp-tooltip");o()(null!==n,"tooltip !== null"),n.innerHTML=e?"Active viewer":"Choose as active",this._getById(`gi-${t}`).classList.toggle("chsp-structure-viewer-cell-active",e)},r=this._cellsData.get(this._active);o()(void 0!==r,"current !== undefined"),e(this._active,!1),this._active=t;const n=this._cellsData.get(this._active);o()(void 0!==n,"newData !== undefined"),n.viewer._options.playbackDelay.onchange.push((t=>{this.delayChanged(t)})),this.delayChanged(n.viewer._options.playbackDelay.value),e(this._active,!0)}set positionSettingsModal(t){this._positionSettingsModal=t;for(const e of this._cellsData.values())e.viewer.positionSettingsModal=t}applySettings(t){if(0!==t.length){o()(t.length===this._cellsData.size,"settings.length === this._cellsData.size");for(const[e,r]of(0,s.HL)(this._cellsData.values()))r.viewer.applySettings(t[e])}}saveSettings(){const t=[];for(const e of this._cellsData.values())t.push(e.viewer.saveSettings());return t}onSettingChange(t){for(const e of this._cellsData.keys()){const r=this._cellsData.get(e);o()(void 0!==r,"data !== undefined"),r.viewer.onSettingChange(((r,n)=>{(r=JSON.parse(JSON.stringify(r))).unshift(this._getCurrentPositionInGrid(e).toString()),t(r,n)}))}this._onSettingChangeCallbacks.push(t)}switchTarget(t){return an(this,void 0,void 0,(function*(){this._target=t,this._updateEnvironments("atom"===this._target);const e=Array.from(this._cellsData.entries()).map((([t,e])=>this._refreshCell(t,e,"atom"===this._target)));yield Promise.all(e)}))}_updateEnvironments(t){if(this._environments=t?this._calculatedEnvironments:void 0,t){o()(void 0!==this._environments,"this._environments !== undefined");for(const t of this._cellsData.values())t.viewer.environments=this._environments[t.current.structure]}}_refreshCell(t,e,r){return an(this,void 0,void 0,(function*(){e.current.atom=r?this._indexer.fromEnvironment(e.current.environment,this._target).atom:void 0,this._cellsData.set(t,e);const n=this._properties?Object.keys(this._properties):[];e.viewer.refreshOptions(r,n),yield this._loadViewer(e.viewer,e.current.structure,e.current.atom)}))}_duplicate(t){return an(this,void 0,void 0,(function*(){const e=this._cellsData.get(t);o()(void 0!==e,"data !== undefined");const r=this.addViewer().guid;if(void 0===r)return;const n=this._cellsData.get(r);return o()(void 0!==n,"newData !== undefined"),yield this._showInViewer(r,e.current),n.viewer.applySettings(e.viewer.saveSettings()),this.setActive(r),n}))}_structure(t){if(void 0===this._resolvedStructures[t]){const e=this.loadStructure(t,this._structures[t]),r=Qr(e);if(""!==r)throw Error(`got invalid object as structure: ${r}\n the object was ${JSON.stringify(e)}`);this._resolvedStructures[t]=e}return this._resolvedStructures[t]}_propertiesForStructure(t){const e={};if(void 0!==this._environments){const r=this._environments[t];for(const t in this._properties){const n=this._properties[t];e[t]=[];for(const i of r)void 0!==i?e[t].push(n[i.index]):e[t].push(void 0)}return e}}_showInViewer(t,e){return an(this,void 0,void 0,(function*(){const r=this._cellsData.get(t);o()(void 0!==r,"data !== undefined");const n=r.viewer;r.current.structure!==e.structure&&(yield this._loadViewer(n,e.structure,e.atom),r.current=e),n.highlight("atom"===this._target?e.atom:void 0),r.current=e}))}_loadViewer(t,e,r){return new Promise((n=>{const i={trajectory:!0};void 0!==this._environments&&(i.environments=this._environments[e],"atom"===this._target&&(i.highlight=r)),t.load(this._structure(e),this._propertiesForStructure(e),i,(()=>{n()}))}))}_getNextColor(){const t=[];for(const e of this._cellsData.values())t.push(e.color);return(0,s.Lz)(t)}_setupCell(t,e,r){const n=`gi-${t}`;let i=this._root.querySelector(`#${n}`),a="";if(null===i){i=document.createElement("div"),i.id=n,i.classList.add("chsp-structure-viewer-cell","grid-item"),i.style.gridColumn=`${e}`,i.style.gridRow=`${r}`,a=this._getNextColor();const l=document.createElement("template");l.innerHTML=`\n
\n WILL BE FILLED LATER\n `;const c=l.content.firstChild;c.onclick=()=>{this.setActive(t);const e=this._cellsData.get(this._active);o()(void 0!==e,"data !== undefined"),this.activeChanged(t,e.current)},i.appendChild(c),l.innerHTML='\n \n\n Remove viewer\n ';const u=l.content.firstChild;u.onclick=()=>{1!==this._cellsData.size?(this.onremove(t),this.removeViewer(t),this._setupGrid(this._cellsData.size)):(0,s.R4)("can not remove the last viewer from the grid")},i.appendChild(u),l.innerHTML='\n \n\n Duplicate viewer\n ';const h=l.content.firstChild;h.onclick=()=>an(this,void 0,void 0,(function*(){const e=yield this._duplicate(t);void 0!==e&&this.oncreate(this.active,e.color,e.current)})),i.appendChild(h),l.innerHTML=`\n ${I}\n Download PNG\n `;const d=l.content.firstChild;return d.onclick=()=>{const e=this._cellsData.get(t);o()(void 0!==e,"data !== undefined");const r=e.viewer,n=e.current.structure;if(void 0!==e.current.atom){const t=e.current.atom;ln(r.exportPNG(),`chemiscope-structure-${n+1}-atom-${t+1}.png`)}else ln(r.exportPNG(),`chemiscope-structure-${n+1}.png`)},i.appendChild(d),this._root.appendChild(i),a}return i.style.gridColumn=`${e}`,i.style.gridRow=`${r}`,""}_setupGrid(t){const e=[];if(t<1)return(0,s.R4)("Cannot delete last molecular viewer."),e;if(t>this._maxViewers)return(0,s.R4)(`Viewer grid cannot contain more than ${this._maxViewers} viewers.`),e;const r=this.bestGridArrangement(t);if(this._cellsData.size>t){(0,s.R4)(`Eliminating last ${this._cellsData.size-t} viewers.`);let e=0;for(const r of this._cellsData.keys())e>=t&&this.removeViewer(r),e+=1}let n=1,i=1;const a=this._cellsData.keys();for(let l=0;l=this._cellsData.size?(0,s.Nl)():a.next().value;let c=this._setupCell(t,i,n);if(""===c&&(c=this._getNextColor()),i++,i>r.columns&&(n++,i=1),!this._cellsData.has(t)){const r=this._properties?Object.keys(this._properties):[],n=new on.MoleculeViewer(this._getById(`gi-${t}`),r);n.onselect=e=>{if("atom"!==this._target||this._active!==t)return;const r=this._cellsData.get(this._active);o()(void 0!==r,"data !== undefined");const i=n.natoms();o()(void 0!==i,"natoms !== undefined");const a=this._indexer.fromStructureAtom(this._target,r.current.structure,e%i);void 0!==a&&(n.highlight(e),this.onselect(a))};const i={atom:void 0,structure:-1,environment:-1};this._cellsData.set(t,{color:c,current:i,viewer:n}),void 0!==this._positionSettingsModal&&(n.positionSettingsModal=this._positionSettingsModal),e.push(t)}}for(const t of this._cellsData.values())t.viewer.resize();return e}bestGridArrangement(t){switch(t){case 1:case 2:return{rows:t,columns:1};case 3:case 4:return{rows:2,columns:2};case 5:case 6:return{rows:3,columns:2};case 8:case 7:case 9:return{rows:3,columns:3};default:throw Error("reached unreachable code: too many viewer in the grid")}}_getCurrentPositionInGrid(t){let e=0;for(const r of this._cellsData.keys()){if(t===r)break;e+=1}return e}}function ln(t,e){const r=document.createElement("a");r.download=e,r.href=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),r.remove()}var cn=__webpack_require__(59838);class un{constructor(t,e){this._containerElement=(0,s.V6)(t);const r=document.createElement("div");this._containerElement.appendChild(r),this._shadow=r.attachShadow({mode:"open"}),this._shadow.adoptedStyleSheets=[v.A,b.A],this._toggleContainer=this._createToggleElement("atom"===e),this._shadow.appendChild(this._toggleContainer),this._containerElement.style.setProperty("height",`calc(100% - ${this._toggleContainer.offsetHeight}px)`),this.onchange=()=>{}}_createToggleElement(t){const e=document.createElement("div");return e.innerHTML=`\n
\n \x3c!-- Spinner --\x3e\n \n\n \x3c!-- Buttons --\x3e\n
\n \n \n
\n
\n `,e.querySelector("#structure-btn").onclick=()=>this._select("structure"),e.querySelector("#atom-btn").onclick=()=>this._select("atom"),e.firstElementChild}_select(t){const e="atom"===t;this._toggleContainer.querySelector("#structure-btn").classList.toggle("active",!e),this._toggleContainer.querySelector("#atom-btn").classList.toggle("active",e),this.onchange(t)}loader(t){this._toggleContainer.querySelector("#chsp-target-spinner").style.display=t?"inline-block":"none",this._toggleContainer.querySelectorAll(".btn-outline-secondary").forEach((e=>{t?e.setAttribute("disabled","true"):e.removeAttribute("disabled")}))}remove(){this._shadow.host.remove(),this._containerElement.style.setProperty("height","100%")}}var hn=__webpack_require__(85072),dn=__webpack_require__.n(hn),fn=__webpack_require__(97825),pn=__webpack_require__.n(fn),mn=__webpack_require__(77659),gn=__webpack_require__.n(mn),vn=__webpack_require__(55056),bn=__webpack_require__.n(vn),yn=__webpack_require__(10540),xn=__webpack_require__.n(yn),_n=__webpack_require__(41113),wn=__webpack_require__.n(_n),kn=__webpack_require__(5018),An={};An.styleTagTransform=wn(),An.setAttributes=bn(),An.insert=gn().bind(null,"head"),An.domAPI=pn(),An.insertStyleElement=xn(),dn()(kn.A,An),kn.A&&kn.A.locals&&kn.A.locals;function Mn(t,e){if("object"!=typeof t)throw Error("the configuration must be a JavaScript object");for(const r of e)if(!(r in t)||!("string"==typeof t[r]||t[r]instanceof HTMLElement))throw Error(`missing "${r}" key in chemiscope configuration`);if("settings"in t){if("object"!=typeof t.settings||null===t.settings)throw Error('"settings" must be an object in chemiscope configuration');Tn(t.settings)}if("loadStructure"in t&&void 0!==t.loadStructure&&!((r=t.loadStructure)&&r.constructor&&r.call&&r.apply))throw Error('"loadStructure" should be a function in chemiscope config');var r;if("maxStructureViewers"in t&&"number"!=typeof t.maxStructureViewers)throw Error('"maxStructureViewers" should be a number in chemiscope config')}function Tn(t){const e=(t,e)=>{if("object"!=typeof e||null===e)throw Error(`"settings.${t}" must be an object`)},r=(t,e)=>{if(!(Array.isArray(e)&&e.length>0))throw Error(`"settings.${t}" must be an array containing at least one element`)};for(const n in t)if("map"===n)e(n,t.map);else if("structure"===n){r(n,t.structure);for(const r of t.structure)e("structure entry",r)}else if("pinned"===n){r(n,t.pinned);for(const e of t.pinned)if(!(Number.isInteger(e)&&e>=0))throw Error('"settings.pinned" must be an array of number')}else{if("target"!==n)throw Error(`invalid key "${n}" in settings`);if(!["atom","structure"].includes(t.target))throw Error('"settings.target" should be either "atom" or "structure"')}}class Sn{static load(t,e){return new Promise((r=>{r(new Sn(t,e))}))}constructor(t,e){var r;this._target="structure",Mn(t,["meta","map","info","structure"]),$r(e),this._dataset=e,this._pinned=[],this._target=Jr(e),this._indexer=new a(e.structures,e.environments),this.meta=new Zr(t.meta,e.meta),this.structure=new sn(t.structure,this._indexer,e.structures,this._target,e.properties,e.environments,t.maxStructureViewers),void 0!==t.loadStructure&&(this.structure.loadStructure=t.loadStructure),this.structure.activeChanged=(t,e)=>{this.map.setActive(t),this.info.show(e)},this.structure.onselect=t=>{this.map.select(t),this.info.show(t)},this.structure.onremove=t=>{this.map.removeMarker(t);const e=this._pinned.indexOf(t);o()(e>-1,"index > -1"),this._pinned.splice(e,1)},this.structure.oncreate=(t,e,r)=>{this.map.addMarker(t,e,r),this.info.show(r),this._pinned.push(t)},this.map=new P(t.map,zn(e.settings),this._indexer,this._target,e.properties),this.map.onselect=t=>{this.info.show(t),this.structure.show(t)},this.map.activeChanged=(t,e)=>{this.info.show(e),this.structure.setActive(t)};const n="atom"===this._target?"structure":"atom",i=Object.values(e.properties).filter((t=>t.target===n));void 0!==e.environments&&i.length>1&&(this._toggle=new un(t.map,this._target),this._toggle.onchange=t=>this._switchTarget(t)),this.info=new x(t.info,e.properties,this._indexer,this._target,e.parameters),this.info.onchange=t=>{this.map.select(t),this.structure.show(t)},this.structure.delayChanged=t=>{this.info.playbackDelay=t};let l={environment:0,structure:0,atom:0};if(void 0!==e.environments&&(l=this._indexer.fromEnvironment(0,this._target)),e.settings&&e.settings.pinned){if(!Array.isArray(e.settings.pinned)||"number"!=typeof e.settings.pinned[0])throw Error("settings.pinned must be an array of numbers");l=this._indexer.fromEnvironment(e.settings.pinned[0],this._target)}const c=this.structure.active;this.map.addMarker(c,(0,s.Lz)([]),l),this._pinned.push(c),this.structure.show(l),this.info.show(l),void 0!==e.settings&&(delete e.settings.map,this.applySettings(e.settings)),void 0!==this._toggle&&(null===(r=e.settings)||void 0===r?void 0:r.target)&&this._switchTarget(this._target,!0)}_switchTarget(t,e=!1){(e||this._target!==t)&&(o()(void 0!==this._toggle,"this._toggle !== undefined"),this._toggle.loader(!0),this._target=t,setTimeout((()=>{return t=this,e=void 0,n=function*(){var t;try{this.info.switchTarget(this._target),yield this.map.switchTarget(this._target),yield this.structure.switchTarget(this._target)}finally{null===(t=this._toggle)||void 0===t||t.loader(!1)}},new((r=void 0)||(r=Promise))((function(i,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function s(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}l((n=n.apply(t,e||[])).next())}));var t,e,r,n}),0))}remove(){var t;this.map.remove(),this.meta.remove(),this.info.remove(),this.structure.remove(),null===(t=this._toggle)||void 0===t||t.remove()}saveSettings(){return{target:this._target,map:this.map.saveSettings(),pinned:this.structure.pinned().map((t=>"atom"===this._target?t.environment:t.structure)),structure:this.structure.saveSettings()}}applySettings(t){if(Tn(t),void 0!==t.map&&this.map.applySettings(t.map),void 0!==t.pinned){if(!Array.isArray(t.pinned))throw Error("settings.pinned must be an array");for(const t of this._pinned.slice(1))this.map.removeMarker(t),this.structure.removeViewer(t);if(this._pinned=[this._pinned[0]],o()(t.pinned.length>0,"settings.pinned.length > 0"),"number"!=typeof t.pinned[0])throw Error("settings.pinned must be an array of numbers");const e=this._indexer.fromEnvironment(t.pinned[0],this._target);this.map.select(e),this.info.show(e),this.structure.show(e);for(const e of t.pinned.slice(1)){if("number"!=typeof e)throw Error("settings.pinned must be an array of numbers");const{guid:t,color:r}=this.structure.addViewer();if(void 0===t)throw Error("too many environments in 'pinned' setting");const n=this._indexer.fromEnvironment(e,this._target);this.map.addMarker(t,r,n),this.map.setActive(t),this._pinned.push(t),this.info.show(n),this.structure.setActive(t),this.structure.show(n)}}void 0!==t.structure&&this.structure.applySettings(t.structure)}onSettingChange(t){this.map.onSettingChange(((e,r)=>{(e=JSON.parse(JSON.stringify(e))).unshift("map"),t(e,r)})),this.structure.onSettingChange(((e,r)=>{(e=JSON.parse(JSON.stringify(e))).unshift("structure"),t(e,r)}))}dataset(t=!1){const e=JSON.parse(JSON.stringify(this._dataset,((t,e)=>"number"==typeof e&&isNaN(e)?"***NaN***":e)),((t,e)=>"***NaN***"===e?NaN:e));if(t){e.structures=[];for(let t=0;t{r(new Cn(t,e))}))}constructor(t,e){Mn(t,["meta","info","structure"]),$r(e),this._target=Jr(e),this._indexer=new a(e.structures,e.environments),this.meta=new Zr(t.meta,e.meta),this.structure=new sn(t.structure,this._indexer,e.structures,this._target,e.properties,e.environments,1),void 0!==t.loadStructure&&(this.structure.loadStructure=t.loadStructure),this.structure.activeChanged=(t,e)=>{this.info.show(e)},this.structure.onselect=t=>{this.info.show(t)},this.structure.oncreate=(t,e,r)=>{this.info.show(r)},this.info=new x(t.info,e.properties,this._indexer,this._target),this.info.onchange=t=>{this.structure.show(t)},this.structure.delayChanged=t=>{this.info.playbackDelay=t};let r={environment:0,structure:0,atom:0};if(void 0!==e.environments&&(r=this._indexer.fromEnvironment(0,this._target)),e.settings&&e.settings.pinned){if(!Array.isArray(e.settings.pinned)||"number"!=typeof e.settings.pinned[0])throw Error("settings.pinned must be an array of numbers");r=this._indexer.fromEnvironment(e.settings.pinned[0],this._target)}this.structure.show(r),this.info.show(r),void 0!==e.settings&&this.applySettings(e.settings)}remove(){this.meta.remove(),this.info.remove(),this.structure.remove()}applySettings(t){Tn(t),void 0!==t.structure&&this.structure.applySettings(t.structure)}saveSettings(){return{target:this._target,pinned:this.structure.pinned().map((t=>t.environment)),structure:this.structure.saveSettings()}}onSettingChange(t){this.structure.onSettingChange(((e,r)=>{(e=JSON.parse(JSON.stringify(e))).unshift("structure"),t(e,r)}))}}class En{static load(t,e){return new Promise((r=>{r(new En(t,e))}))}constructor(t,e){let r;this._target="structure",Mn(t,["meta","map","info"]),$r(e);for(const t in e.properties){const n=e.properties[t];"atom"===n.target?(0,s.R4)("unsupported per-atom property in a map-only viewer"):(o()("structure"===n.target,"property.target === 'structure'"),r=n.values.length)}this._indexer=new a(new Array(r).fill({size:1,data:0})),this.meta=new Zr(t.meta,e.meta),this.map=new P(t.map,zn(e.settings),this._indexer,this._target,e.properties),this.map.onselect=t=>{this.info.show(t)},this.map.activeChanged=(t,e)=>{this.info.show(e)},this.info=new x(t.info,e.properties,this._indexer,this._target),this.info.onchange=t=>{this.map.select(t)};let n={environment:0,structure:0,atom:0};if(void 0!==e.environments&&(n=this._indexer.fromEnvironment(0,this._target)),e.settings&&e.settings.pinned){if(!Array.isArray(e.settings.pinned)||"number"!=typeof e.settings.pinned[0])throw Error("settings.pinned must be an array of numbers");n=this._indexer.fromEnvironment(e.settings.pinned[0],this._target)}this.map.addMarker("map-0","red",n),this.info.show(n)}remove(){this.meta.remove(),this.info.remove(),this.map.remove()}saveSettings(){return{target:this._target,map:this.map.saveSettings()}}applySettings(t){Tn(t),void 0!==t.map&&this.map.applySettings(zn(t))}onSettingChange(t){this.map.onSettingChange(((e,r)=>{(e=JSON.parse(JSON.stringify(e))).unshift("map"),t(e,r)}))}}function Ln(){return"v0.7.3-19-gd4dd109"}function zn(t){if(void 0===t)return{};if("map"in t){const e=t.map;if("object"==typeof e){if(null===e)throw Error("invalid settings for map, should not be null");return e}throw Error(`invalid type '${typeof e}' for map, should be an object`)}return{}}})(),__webpack_exports__})())); \ No newline at end of file diff --git a/molecule-viewer.min.js b/molecule-viewer.min.js index 243de5ae7..2b1d86d5f 100644 --- a/molecule-viewer.min.js +++ b/molecule-viewer.min.js @@ -1,2 +1,2 @@ /*! For license information please see molecule-viewer.min.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Chemiscope=t():e.Chemiscope=t()}(self,(()=>(()=>{var __webpack_modules__={37821:function(module,__unused_webpack_exports,__webpack_require__){var process=__webpack_require__(39807),factory;factory=()=>(()=>{var __webpack_modules__={"./node_modules/iobuffer/lib-esm/IOBuffer.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{IOBuffer:()=>o});var i=r("./node_modules/iobuffer/lib-esm/text.browser.js");const s=(()=>{const e=new Uint8Array(4);return!((new Uint32Array(e.buffer)[0]=1)&e[0])})(),n={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class o{constructor(e=8192,t={}){let r=!1;"number"==typeof e?e=new ArrayBuffer(e):(r=!0,this.lastWrittenByte=e.byteLength);const i=t.offset?t.offset>>>0:0,s=e.byteLength-i;let n=i;(ArrayBuffer.isView(e)||e instanceof o)&&(e.byteLength!==e.buffer.byteLength&&(n=e.byteOffset+i),e=e.buffer),this.lastWrittenByte=r?s:0,this.buffer=e,this.length=s,this.byteLength=s,this.byteOffset=n,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,n,s),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const e=this._marks.pop();if(void 0===e)throw new Error("Mark stack empty");return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){const t=2*(this.offset+e),r=new Uint8Array(t);r.set(new Uint8Array(this.buffer)),this.buffer=r.buffer,this.length=this.byteLength=t,this._data=new DataView(this.buffer)}return this}readBoolean(){return 0!==this.readUint8()}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,"uint8")}readArray(e,t){const r=n[t].BYTES_PER_ELEMENT*e,i=this.byteOffset+this.offset,o=this.buffer.slice(i,i+r);if(this.littleEndian===s&&"uint8"!==t&&"int8"!==t){const e=new Uint8Array(this.buffer.slice(i,i+r));e.reverse();const s=new n[t](e.buffer);return this.offset+=r,s.reverse(),s}const a=new n[t](o);return this.offset+=r,a}readInt16(){const e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){const e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){const e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){const e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){const e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){const e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){const e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){const e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let t="";for(let r=0;rthis.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}},"./node_modules/iobuffer/lib-esm/text-encoding-polyfill.js":function(){"use strict";!function(e){if(e.TextEncoder&&e.TextDecoder)return!1;function t(e="utf-8"){if("utf-8"!==e)throw new RangeError(`Failed to construct 'TextEncoder': The encoding label provided ('${e}') is invalid.`)}function r(e="utf-8",t={fatal:!1}){if("utf-8"!==e)throw new RangeError(`Failed to construct 'TextDecoder': The encoding label provided ('${e}') is invalid.`);if(t.fatal)throw new Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}Object.defineProperty(t.prototype,"encoding",{value:"utf-8"}),t.prototype.encode=function(e,t={stream:!1}){if(t.stream)throw new Error("Failed to encode: the 'stream' option is unsupported.");let r=0;const i=e.length;let s=0,n=Math.max(32,i+(i>>1)+7),o=new Uint8Array(n>>3<<3);for(;r=55296&&t<=56319){if(r=55296&&t<=56319)continue}if(s+4>o.length){n+=8,n*=1+r/e.length*2,n=n>>3<<3;const t=new Uint8Array(n);t.set(o),o=t}if(4294967168&t){if(4294965248&t)if(4294901760&t){if(4292870144&t)continue;o[s++]=t>>18&7|240,o[s++]=t>>12&63|128,o[s++]=t>>6&63|128}else o[s++]=t>>12&15|224,o[s++]=t>>6&63|128;else o[s++]=t>>6&31|192;o[s++]=63&t|128}else o[s++]=t}return o.slice(0,s)},Object.defineProperty(r.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(r.prototype,"fatal",{value:!1}),Object.defineProperty(r.prototype,"ignoreBOM",{value:!1}),r.prototype.decode=function(e,t={stream:!1}){if(t.stream)throw new Error("Failed to decode: the 'stream' option is unsupported.");const r=new Uint8Array(e);let i=0;const s=r.length,n=[];for(;i65535&&(t-=65536,n.push(t>>>10&1023|55296),t=56320|1023&t),n.push(t)}}else n.push(e)}return String.fromCharCode.apply(null,n)},e.TextEncoder=t,e.TextDecoder=r}("undefined"!=typeof window?window:"undefined"!=typeof self?self:this)},"./node_modules/iobuffer/lib-esm/text.browser.js":(e,t,r)=>{"use strict";function i(e,t="utf8"){return new TextDecoder(t).decode(e)}r.r(t),r.d(t,{decode:()=>i,encode:()=>n}),r("./node_modules/iobuffer/lib-esm/text-encoding-polyfill.js");const s=new TextEncoder;function n(e){return s.encode(e)}},"./node_modules/netcdfjs/lib-esm/data.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{nonRecord:()=>s,record:()=>n});var i=r("./node_modules/netcdfjs/lib-esm/types.js");function s(e,t){const r=(0,i.str2num)(t.type),s=t.size/(0,i.num2bytes)(r),n=new Array(s);for(let t=0;t{"use strict";r.r(t),r.d(t,{header:()=>h});var i=r("./node_modules/netcdfjs/lib-esm/types.js"),s=r("./node_modules/netcdfjs/lib-esm/utils.js");const n=0,o=10,a=11,l=12,c=0;function h(e,t){const r={version:t},l={length:e.readUint32()},h=function(e){const t={};let r,i;const a=e.readUint32();let l;if(a===n)return(0,s.notNetcdf)(e.readUint32()!==n,"wrong empty tag for list of dimensions"),[];{(0,s.notNetcdf)(a!==o,"wrong tag for list of dimensions");const t=e.readUint32();l=new Array(t);for(let n=0;n6,`non valid type ${p}`);const f=e.readUint32();let m=e.readUint32();2===r&&((0,s.notNetcdf)(m>0,"offsets larger than 4GB not supported"),m=e.readUint32());let g=!1;void 0!==t&&h[0]===t&&(c+=f,g=!0),l[o]={name:n,dimensions:h,attributes:d,type:(0,i.num2str)(p),size:f,offset:m,record:g}}}return{variables:l,recordStep:c}}(e,l?.id,t);return Array.isArray(d)||(r.variables=d.variables,l.recordStep=d.recordStep),r.recordDimension=l,r}function u(e){const t=e.readUint32();let r;if(t===n)return(0,s.notNetcdf)(e.readUint32()!==n,"wrong empty tag for list of attributes"),[];{(0,s.notNetcdf)(t!==l,"wrong tag for list of attributes");const n=e.readUint32();r=new Array(n);for(let t=0;t6,`non valid type ${o}`);const a=e.readUint32(),l=(0,i.readType)(e,o,a);(0,s.padding)(e),r[t]={name:n,type:(0,i.num2str)(o),value:l}}}return r}},"./node_modules/netcdfjs/lib-esm/index.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{NetCDFReader:()=>i.NetCDFReader});var i=r("./node_modules/netcdfjs/lib-esm/parser.js")},"./node_modules/netcdfjs/lib-esm/parser.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{NetCDFReader:()=>l});var i=r("./node_modules/iobuffer/lib-esm/IOBuffer.js"),s=r("./node_modules/netcdfjs/lib-esm/data.js"),n=r("./node_modules/netcdfjs/lib-esm/header.js"),o=r("./node_modules/netcdfjs/lib-esm/toString.js"),a=r("./node_modules/netcdfjs/lib-esm/utils.js");class l{constructor(e){this.toString=o.toString;const t=new i.IOBuffer(e);t.setBigEndian(),(0,a.notNetcdf)("CDF"!==t.readChars(3),"should start with CDF");const r=t.readByte();(0,a.notNetcdf)(r>2,"unknown version"),this.header=(0,n.header)(t,r),this.buffer=t}get version(){return 1===this.header.version?"classic format":"64-bit offset format"}get recordDimension(){return this.header.recordDimension}get dimensions(){return this.header.dimensions}get globalAttributes(){return this.header.globalAttributes}getAttribute(e){const t=this.globalAttributes.find((t=>t.name===e));return t?t.value:null}getDataVariableAsString(e){const t=this.getDataVariable(e);return t?t.join(""):null}get variables(){return this.header.variables}getDataVariable(e){let t;if(t="string"==typeof e?this.header.variables.find((t=>t.name===e)):e,void 0===t)throw new Error("Not a valid NetCDF v3.x file: variable not found");return this.buffer.seek(t.offset),t.record?(0,s.record)(this.buffer,t,this.header.recordDimension):(0,s.nonRecord)(this.buffer,t)}dataVariableExists(e){return void 0!==this.header.variables.find((t=>t.name===e))}attributeExists(e){return void 0!==this.globalAttributes.find((t=>t.name===e))}}},"./node_modules/netcdfjs/lib-esm/toString.js":(e,t,r)=>{"use strict";function i(){const e=[];e.push("DIMENSIONS");for(const t of this.dimensions)e.push(` ${t.name.padEnd(30)} = size: ${t.size}`);e.push(""),e.push("GLOBAL ATTRIBUTES");for(const t of this.globalAttributes)e.push(` ${t.name.padEnd(30)} = ${t.value}`);const t=JSON.parse(JSON.stringify(this.variables));e.push(""),e.push("VARIABLES:");for(const r of t){r.value=this.getDataVariable(r);let t=JSON.stringify(r.value);t.length>50&&(t=t.substring(0,50)),isNaN(r.value.length)||(t+=` (length: ${r.value.length})`),e.push(` ${r.name.padEnd(30)} = ${t}`)}return e.join("\n")}r.r(t),r.d(t,{toString:()=>i})},"./node_modules/netcdfjs/lib-esm/types.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{num2bytes:()=>n,num2str:()=>s,readType:()=>l,str2num:()=>o});const i={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6};function s(e){switch(Number(e)){case i.BYTE:return"byte";case i.CHAR:return"char";case i.SHORT:return"short";case i.INT:return"int";case i.FLOAT:return"float";case i.DOUBLE:return"double";default:return"undefined"}}function n(e){switch(Number(e)){case i.BYTE:case i.CHAR:return 1;case i.SHORT:return 2;case i.INT:case i.FLOAT:return 4;case i.DOUBLE:return 8;default:return-1}}function o(e){switch(String(e)){case"byte":return i.BYTE;case"char":return i.CHAR;case"short":return i.SHORT;case"int":return i.INT;case"float":return i.FLOAT;case"double":return i.DOUBLE;default:return-1}}function a(e,t){if(1!==e){const r=new Array(e);for(let i=0;i{"use strict";function i(e,t){if(e)throw new TypeError(`Not a valid NetCDF v3.x file: ${t}`)}function s(e){e.offset%4!=0&&e.skip(4-e.offset%4)}function n(e){const t=e.readUint32(),r=e.readChars(t);return s(e),r}r.r(t),r.d(t,{notNetcdf:()=>i,padding:()=>s,readName:()=>n})},"./src/WebGL/shaders/lib/basic/basic.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="uniform mat4 viewMatrix;\nuniform float opacity;\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\nvoid main() {\n gl_FragColor = vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}"},"./src/WebGL/shaders/lib/basic/basic.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\n\nattribute vec3 position;\nattribute vec3 color;\n\nvarying vec3 vColor;\n\nvoid main() {\n\n vColor = color;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix * mvPosition;\n\n}"},"./src/WebGL/shaders/lib/instanced/instanced.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="uniform mat4 viewMatrix;\nuniform float opacity;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLightFront;\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\n\n #ifndef WIREFRAME\n gl_FragColor.xyz *= vLightFront;\n #endif\n\n gl_FragColor = gl_FragColor * vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n}\n\n\n"},"./src/WebGL/shaders/lib/instanced/instanced.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 offset;\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute float radius;\n\nvarying vec3 vColor;\nvarying vec3 vLightFront;\n\nvoid main() {\n\n vColor = color;\n\n vec3 objectNormal = normal;\n vec3 transformedNormal = normalMatrix * objectNormal;\n vec4 mvPosition = modelViewMatrix * vec4( position * radius + offset, 1.0 );\n\n vLightFront = vec3( 0.0 );\n\n transformedNormal = normalize( transformedNormal );\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n\n vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\n\n gl_Position = projectionMatrix * mvPosition;\n}\n\n"},"./src/WebGL/shaders/lib/lambert/lambert.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="uniform mat4 viewMatrix;\nuniform float opacity;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLightFront;\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\n\n #ifndef WIREFRAME\n gl_FragColor.xyz *= vLightFront;\n #endif\n\n gl_FragColor = gl_FragColor * vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n}"},"./src/WebGL/shaders/lib/lambert/lambert.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec3 vColor;\nvarying vec3 vLightFront;\n\nvoid main() {\n\n vColor = color;\n\n vec3 objectNormal = normal;\n vec3 transformedNormal = normalMatrix * objectNormal;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\n vLightFront = vec3( 0.0 );\n\n transformedNormal = normalize( transformedNormal );\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n\n vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\n\n gl_Position = projectionMatrix * mvPosition;\n}"},"./src/WebGL/shaders/lib/lambertdouble/lambertdouble.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform mat4 viewMatrix;\nuniform float opacity;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLightFront;\nvarying vec3 vLightBack;\n\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\n\n #ifndef WIREFRAME\n if ( gl_FrontFacing )\n gl_FragColor.xyz *= vLightFront;\n else\n gl_FragColor.xyz *= vLightBack;\n #endif\n\n gl_FragColor = gl_FragColor * vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n}\n\n\n"},"./src/WebGL/shaders/lib/lambertdouble/lambertdouble.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec3 vColor;\nvarying vec3 vLightFront;\nvarying vec3 vLightBack;\n\nvoid main() {\n\n vColor = color;\n\n vec3 objectNormal = normal;\n vec3 transformedNormal = normalMatrix * objectNormal;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\n vLightFront = vec3( 0.0 );\n vLightBack = vec3( 0.0 );\n\n transformedNormal = normalize( transformedNormal );\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n vec3 directionalLightWeightingBack = vec3( max( -dotProduct, 0.0 ) );\n\n vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\n vLightBack += directionalLightColor[ 0 ] * directionalLightWeightingBack;\n\n gl_Position = projectionMatrix * mvPosition;\n}\n\n"},"./src/WebGL/shaders/lib/outline/outline.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform float opacity;\nuniform vec3 outlineColor;\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n gl_FragColor = vec4( outlineColor, 1 );\n}\n\n\n"},"./src/WebGL/shaders/lib/outline/outline.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float outlineWidth;\nuniform float outlinePushback;\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvoid main() {\n\n vec4 norm = modelViewMatrix*vec4(normalize(normal),0.0);\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n mvPosition.xy += norm.xy*outlineWidth;\n gl_Position = projectionMatrix * mvPosition;\n mvPosition.z -= outlinePushback; //go backwards in model space\n vec4 pushpos = projectionMatrix*mvPosition; //project to get z in projection space, I'm probably missing some simple math to do the same thing..\n gl_Position.z = gl_Position.w*pushpos.z/pushpos.w;\n}\n\n"},"./src/WebGL/shaders/lib/screen/screen.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="uniform sampler2D colormap;\nvarying highp vec2 vTexCoords;\nuniform vec2 dimensions;\n//DEFINEFRAGCOLOR\nvoid main (void) {\n gl_FragColor = texture2D(colormap, vTexCoords);\n}\n "},"./src/WebGL/shaders/lib/screen/screen.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="attribute vec2 vertexPosition;\nvarying highp vec2 vTexCoords;\nconst vec2 scale = vec2(0.5, 0.5);\n\nvoid main() {\n vTexCoords = vertexPosition * scale + scale; // scale vertex attribute to [0,1] range\n gl_Position = vec4(vertexPosition, 0.0, 1.0);\n}\n "},"./src/WebGL/shaders/lib/screenaa/screenaa.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="uniform sampler2D colormap;\nvarying highp vec2 vTexCoords;\nuniform vec2 dimensions;\n\n// Basic FXAA implementation based on the code on geeks3d.com \n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#define FXAA_SPAN_MAX 8.0\n\nvec4 applyFXAA(vec2 fragCoord, sampler2D tex)\n{\n vec4 color;\n vec2 inverseVP = vec2(1.0 / dimensions.x, 1.0 / dimensions.y);\n vec3 rgbNW = texture2D(tex, fragCoord + vec2(-1.0, -1.0) * inverseVP).xyz;\n vec3 rgbNE = texture2D(tex, fragCoord + vec2(1.0, -1.0) * inverseVP).xyz;\n vec3 rgbSW = texture2D(tex, fragCoord + vec2(-1.0, 1.0) * inverseVP).xyz;\n vec3 rgbSE = texture2D(tex, fragCoord + vec2(1.0, 1.0) * inverseVP).xyz;\n vec3 rgbM = texture2D(tex, fragCoord * inverseVP).xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n\n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord + dir * -0.5).xyz +\n texture2D(tex, fragCoord + dir * 0.5).xyz);\n\n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, 1.0);\n else\n color = vec4(rgbB, 1.0);\n return color;\n}\n//DEFINEFRAGCOLOR\nvoid main (void) {\n gl_FragColor = applyFXAA(vTexCoords, colormap);\n}\n "},"./src/WebGL/shaders/lib/screenaa/screenaa.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="attribute vec2 vertexPosition;\nvarying highp vec2 vTexCoords;\nconst vec2 scale = vec2(0.5, 0.5);\n\nvoid main() {\n vTexCoords = vertexPosition * scale + scale; // scale vertex attribute to [0,1] range\n gl_Position = vec4(vertexPosition, 0.0, 1.0);\n}\n "},"./src/WebGL/shaders/lib/sphereimposter/sphereimposter.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\nuniform mat4 viewMatrix;\nuniform float opacity;\nuniform mat4 projectionMatrix;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\nuniform float uDepth;\nuniform vec3 directionalLightColor[ 1 ];\n\nvarying vec3 vColor;\nvarying vec2 mapping;\nvarying float rval;\nvarying vec3 vLight;\nvarying vec3 center;\n\n//DEFINEFRAGCOLOR\n\nvoid main() {\n float lensqr = dot(mapping,mapping);\n float rsqr = rval*rval;\n if(lensqr > rsqr)\n discard;\n float z = sqrt(rsqr-lensqr);\n vec3 cameraPos = center+ vec3(mapping.x,mapping.y,z);\n vec4 clipPos = projectionMatrix * vec4(cameraPos, 1.0);\n float ndcDepth = clipPos.z / clipPos.w;\n gl_FragDepthEXT = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n vec3 norm = normalize(vec3(mapping.x,mapping.y,z));\n float dotProduct = dot( norm, vLight );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n vec3 vLight = directionalLightColor[ 0 ] * directionalLightWeighting;\n gl_FragColor = vec4(vLight*vColor, opacity*opacity );\n float fogFactor = smoothstep( fogNear, fogFar, gl_FragDepthEXT/gl_FragCoord.w );\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n\n}\n\n"},"./src/WebGL/shaders/lib/sphereimposter/sphereimposter.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec2 mapping;\nvarying vec3 vColor;\nvarying float rval;\nvarying vec3 vLight;\nvarying vec3 center;\n\nvoid main() {\n\n vColor = color;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n center = mvPosition.xyz;\n vec4 projPosition = projectionMatrix * mvPosition;\n vec4 adjust = projectionMatrix* vec4(normal,0.0); adjust.z = 0.0; adjust.w = 0.0;\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vLight = normalize( lDirection.xyz );\n mapping = normal.xy;\n rval = abs(normal.x);\n gl_Position = projPosition+adjust;\n\n}\n"},"./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform float opacity;\nuniform vec3 outlineColor;\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\nuniform mat4 projectionMatrix;\nvarying vec2 mapping;\nvarying float rval;\nvarying vec3 center;\n\nuniform float outlinePushback;\n\n//DEFINEFRAGCOLOR\n\nvoid main() {\n float lensqr = dot(mapping,mapping);\n float rsqr = rval*rval;\n if(lensqr > rsqr)\n discard;\n float z = sqrt(rsqr-lensqr);\n vec3 cameraPos = center+ vec3(mapping.x,mapping.y,z-outlinePushback);\n vec4 clipPos = projectionMatrix * vec4(cameraPos, 1.0);\n float ndcDepth = clipPos.z / clipPos.w;\n gl_FragDepthEXT = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n gl_FragColor = vec4(outlineColor, 1 );\n}\n\n\n"},"./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float outlineWidth;\nuniform float outlinePushback;\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec2 mapping;\nvarying float rval;\nvarying vec3 center;\n\nvoid main() {\n\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n center = mvPosition.xyz;\n vec4 projPosition = projectionMatrix * mvPosition;\n vec2 norm = normal.xy + vec2(sign(normal.x)*outlineWidth,sign(normal.y)*outlineWidth);\n vec4 adjust = projectionMatrix* vec4(norm,normal.z,0.0); adjust.z = 0.0; adjust.w = 0.0;\n mapping = norm.xy;\n rval = abs(norm.x);\n gl_Position = projPosition+adjust;\n}\n\n"},"./src/WebGL/shaders/lib/sprite/sprite.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform vec3 color;\nuniform sampler2D map;\nuniform float opacity;\n\nuniform int fogType;\nuniform vec3 fogColor;\nuniform float fogDensity;\nuniform float fogNear;\nuniform float fogFar;\nuniform float alphaTest;\n\nvarying vec2 vUV;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n vec4 texture = texture2D(map, vUV);\n\n if (texture.a < alphaTest) discard;\n\n gl_FragColor = vec4(color * texture.xyz, texture.a * opacity);\n\n if (fogType > 0) {\n\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n float fogFactor = 0.0;\n\n if (fogType == 1) {\n fogFactor = smoothstep(fogNear, fogFar, depth);\n }\n\n else {\n const float LOG2 = 1.442695;\n float fogFactor = exp2(- fogDensity * fogDensity * depth * depth * LOG2);\n fogFactor = 1.0 - clamp(fogFactor, 0.0, 1.0);\n }\n\n gl_FragColor = mix(gl_FragColor, vec4(fogColor, gl_FragColor.w), fogFactor);\n\n }\n}\n\n"},"./src/WebGL/shaders/lib/sprite/sprite.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform int useScreenCoordinates;\nuniform vec3 screenPosition;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float rotation;\nuniform vec2 scale;\nuniform vec2 alignment;\nuniform vec2 uvOffset;\nuniform vec2 uvScale;\n\nattribute vec2 position;\nattribute vec2 uv;\n\nvarying vec2 vUV;\n\nvoid main() {\n\n vUV = uvOffset + uv * uvScale;\n\n vec2 alignedPosition = position + alignment;\n\n vec2 rotatedPosition;\n rotatedPosition.x = ( cos(rotation) * alignedPosition.x - sin(rotation) * alignedPosition.y ) * scale.x;\n rotatedPosition.y = ( sin(rotation) * alignedPosition.x + cos(rotation) * alignedPosition.y ) * scale.y;\n\n vec4 finalPosition;\n\n if(useScreenCoordinates != 0) {\n finalPosition = vec4(screenPosition.xy + rotatedPosition, screenPosition.z, 1.0);\n }\n\n else {\n finalPosition = projectionMatrix * modelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0); finalPosition /= finalPosition.w;\n finalPosition.xy += rotatedPosition; \n }\n\n gl_Position = finalPosition;\n\n}\n\n"},"./src/WebGL/shaders/lib/stickimposter/stickimposter.partial.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i=" float dotProduct = dot( norm, vLight );\n vec3 light = vec3( max( dotProduct, 0.0 ) );\n gl_FragColor = vec4(light*color, opacity*opacity );\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}"},"./src/WebGL/shaders/lib/stickimposter/stickimposter.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute float radius;\n\nvarying vec3 vColor;\nvarying vec3 vLight;\nvarying vec3 cposition;\nvarying vec3 p1;\nvarying vec3 p2;\nvarying float r;\n\nvoid main() {\n\n vColor = color; vColor.z = abs(vColor.z); //z indicates which vertex and so would vary\n r = abs(radius);\n vec4 to = modelViewMatrix*vec4(normal, 1.0); //normal is other point of cylinder\n vec4 pt = modelViewMatrix*vec4(position, 1.0);\n vec4 mvPosition = pt;\n p1 = pt.xyz; p2 = to.xyz;\n vec3 norm = to.xyz-pt.xyz;\n float mult = 1.1; //slop to account for perspective of sphere\n if(length(p1) > length(p2)) { //billboard at level of closest point\n mvPosition = to;\n }\n vec3 n = normalize(mvPosition.xyz);\n//intersect with the plane defined by the camera looking at the billboard point\n if(color.z >= 0.0) { //p1\n if(projectionMatrix[3][3] == 0.0) { //perspective\n vec3 pnorm = normalize(p1);\n float t = dot(mvPosition.xyz-p1,n)/dot(pnorm,n);\n mvPosition.xyz = p1+t*pnorm; \n } else { //orthographic\n mvPosition.xyz = p1;\n }\n } else {\n if(projectionMatrix[3][3] == 0.0) { //perspective\n vec3 pnorm = normalize(p2);\n float t = dot(mvPosition.xyz-p2,n)/dot(pnorm,n);\n mvPosition.xyz = p2+t*pnorm;\n } else { //orthographic\n mvPosition.xyz = p2;\n } \n mult *= -1.0;\n }\n vec3 cr = normalize(cross(mvPosition.xyz,norm))*radius;\n vec3 doublecr = normalize(cross(mvPosition.xyz,cr))*radius;\n mvPosition.xyz += mult*(cr + doublecr).xyz;\n cposition = mvPosition.xyz;\n gl_Position = projectionMatrix * mvPosition;\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vLight = normalize( lDirection.xyz )*directionalLightColor[0]; //not really sure this is right, but color is always white so..\n}\n\n"},"./src/WebGL/shaders/lib/stickimposteroutline/stickimposteroutline.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\nuniform vec3 outlineColor;\nuniform float outlineWidth;\nuniform float outlinePushback;\n\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute float radius;\n\nvarying vec3 vColor;\nvarying vec3 vLight;\nvarying vec3 cposition;\nvarying vec3 p1;\nvarying vec3 p2;\nvarying float r;\n\nvoid main() {\n\n vColor = outlineColor;\n float rad = radius+sign(radius)*outlineWidth;\n r = abs(rad);\n vec4 to = modelViewMatrix*vec4(normal, 1.0); //normal is other point of cylinder\n vec4 pt = modelViewMatrix*vec4(position, 1.0);\n//pushback\n to.xyz += normalize(to.xyz)*outlinePushback;\n pt.xyz += normalize(pt.xyz)*outlinePushback;\n\n vec4 mvPosition = pt;\n p1 = pt.xyz; p2 = to.xyz;\n vec3 norm = to.xyz-pt.xyz;\n float mult = 1.1; //slop to account for perspective of sphere\n if(length(p1) > length(p2)) { //billboard at level of closest point\n mvPosition = to;\n }\n vec3 n = normalize(mvPosition.xyz);\n//intersect with the plane defined by the camera looking at the billboard point\n if(color.z >= 0.0) { //p1\n vec3 pnorm = normalize(p1);\n float t = dot(mvPosition.xyz-p1,n)/dot(pnorm,n);\n mvPosition.xyz = p1+t*pnorm;\n } else {\n vec3 pnorm = normalize(p2);\n float t = dot(mvPosition.xyz-p2,n)/dot(pnorm,n);\n mvPosition.xyz = p2+t*pnorm;\n mult *= -1.0;\n }\n vec3 cr = normalize(cross(mvPosition.xyz,norm))*rad;\n vec3 doublecr = normalize(cross(mvPosition.xyz,cr))*rad;\n mvPosition.xy += mult*(cr + doublecr).xy;\n cposition = mvPosition.xyz;\n gl_Position = projectionMatrix * mvPosition;\n vLight = vec3(1.0,1.0,1.0);\n}\n\n"},"./src/WebGL/shaders/lib/volumetric/volumetric.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\nuniform highp sampler3D data;\nuniform highp sampler2D colormap;\nuniform highp sampler2D depthmap;\n\n\nuniform mat4 textmat;\nuniform mat4 projinv;\nuniform mat4 projectionMatrix;\n\nuniform float step;\nuniform float subsamples;\nuniform float maxdepth;\nuniform float transfermin;\nuniform float transfermax;\nin vec4 mvPosition;\nout vec4 color;\nvoid main(void) {\n\n vec4 pos = mvPosition;\n bool seengood = false;\n float i = 0.0;\n color = vec4(1,1,1,0);\n float increment = 1.0/subsamples;\n float maxsteps = (maxdepth*subsamples/step);\n//there's probably a better way to do this..\n//calculate farthest possible point in model coordinates\n vec4 maxpos = vec4(pos.x,pos.y,pos.z-maxdepth,1.0);\n// convert to projection\n maxpos = projectionMatrix*maxpos;\n vec4 startp = projectionMatrix*pos;\n// homogonize\n maxpos /= maxpos.w;\n startp /= startp.w;\n//take x,y from start and z from max\n maxpos = vec4(startp.x,startp.y,maxpos.z,1.0);\n//convert back to model space\n maxpos = projinv*maxpos;\n maxpos /= maxpos.w;\n float incr = step/subsamples;\n//get depth from depthmap\n//startp is apparently [-1,1]\n vec2 tpos = startp.xy/2.0+0.5;\n float depth = texture(depthmap, tpos).r;\n//compute vector between start and end\n vec4 direction = maxpos-pos;\n for( i = 0.0; i <= maxsteps; i++) {\n vec4 pt = (pos+(i/maxsteps)*direction);\n vec4 ppt = projectionMatrix*pt;\n float ptdepth = ppt.z/ppt.w;\n ptdepth = ((gl_DepthRange.diff * ptdepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n if(ptdepth > depth) break;\n pt = textmat*pt;\n// pt /= pt.w;\n if(pt.x >= -0.01 && pt.y >= -0.01 && pt.z >= -0.01 && pt.x <= 1.01 && pt.y <= 1.01 && pt.z <= 1.01) {\n seengood = true;\n } else if(seengood) {\n break;\n }\n if( pt.x < -0.01 || pt.x > 1.01 || pt.y < -0.01 || pt.y > 1.01 || pt.z < -0.01 || pt.z > 1.01 ){\n color.a = 0.0;\n continue;\n }\n else {\n float val = texture(data, pt.zyx).r;\n if(isinf(val)) continue; //masked out\n float cval = (val-transfermin)/(transfermax-transfermin); //scale to texture 0-1 range\n vec4 val_color = texture(colormap, vec2(cval,0.5));\n color.rgb = color.rgb*color.a + (1.0-color.a)*val_color.a*val_color.rgb;\n color.a += (1.0 - color.a) * val_color.a; \n if(color.a > 0.0) color.rgb /= color.a;\n// color = vec4(pt.x, pt.y, pt.z, 1.0);\n }\n// color = vec4(pt.x, pt.y, pt.z, 0.0)\n }\n}\n\n "},"./src/WebGL/shaders/lib/volumetric/volumetric.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\n\nin vec3 position;\nout vec4 mvPosition;\nvoid main() {\n\n mvPosition = modelViewMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix*mvPosition;\n}\n"},"./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="uniform float opacity;\nuniform mat4 projectionMatrix;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLight;\nvarying vec3 vColor;\nvarying vec3 cposition;\nvarying vec3 p1;\nvarying vec3 p2;\nvarying float r;\n\n//DEFINEFRAGCOLOR\n\n//cylinder-ray intersection testing taken from http://mrl.nyu.edu/~dzorin/cg05/lecture12.pdf\n//also useful: http://stackoverflow.com/questions/9595300/cylinder-impostor-in-glsl\n//with a bit more care (caps) this could be a general cylinder imposter (see also outline)\nvoid main() {\n vec3 color = abs(vColor);\n vec3 pos = cposition;\n vec3 p = pos; //ray point\n vec3 v = vec3(0.0,0.0,-1.0); //ray normal - orthographic\n if(projectionMatrix[3][3] == 0.0) v = normalize(pos); //ray normal - perspective\n vec3 pa = p1; //cyl start\n vec3 va = normalize(p2-p1); //cyl norm\n vec3 tmp1 = v-(dot(v,va)*va);\n vec3 deltap = p-pa;\n float A = dot(tmp1,tmp1);\n if(A == 0.0) discard;\n vec3 tmp2 = deltap-(dot(deltap,va)*va);\n float B = 2.0*dot(tmp1, tmp2);\n float C = dot(tmp2,tmp2)-r*r;\n//quadratic equation!\n float det = (B*B) - (4.0*A*C);\n if(det < 0.0) discard;\n float sqrtDet = sqrt(det);\n float posT = (-B+sqrtDet)/(2.0*A);\n float negT = (-B-sqrtDet)/(2.0*A);\n float intersectionT = min(posT,negT);\n vec3 qi = p+v*intersectionT;\n float dotp1 = dot(va,qi-p1);\n float dotp2 = dot(va,qi-p2);\n vec3 norm;\n if( dotp1 < 0.0 || dotp2 > 0.0) { //(p-c)^2 + 2(p-c)vt +v^2+t^2 - r^2 = 0\n vec3 cp;\n if( dotp1 < 0.0) { \n// if(vColor.x < 0.0 ) discard; //color sign bit indicates if we should cap or not\n cp = p1;\n } else {\n// if(vColor.y < 0.0 ) discard;\n cp = p2;\n }\n vec3 diff = p-cp;\n A = dot(v,v);\n B = dot(diff,v)*2.0;\n C = dot(diff,diff)-r*r;\n det = (B*B) - (4.0*C);\n if(det < 0.0) discard;\n sqrtDet = sqrt(det);\n posT = (-B+sqrtDet)/(2.0);\n negT = (-B-sqrtDet)/(2.0);\n float t = min(posT,negT);\n qi = p+v*t; \n norm = normalize(qi-cp); \n } else {\n norm = normalize(qi-(dotp1*va + p1));\n }\n vec4 clipPos = projectionMatrix * vec4(qi, 1.0);\n float ndcDepth = clipPos.z / clipPos.w;\n float depth = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n gl_FragDepthEXT = depth;"},"./src/GLDraw.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{CAP:()=>i,GLDraw:()=>s});var i,s,n=r("./src/WebGL/math/index.ts");!function(e){e[e.NONE=0]="NONE",e[e.FLAT=1]="FLAT",e[e.ROUND=2]="ROUND"}(i||(i={})),function(e){function t(e,t,r){var i,s,n,o,a,l=Math.hypot(e,t);l<1e-4?(s=0,n=1):(s=-e/l,n=t/l),t=-s*e+n*t,(i=Math.hypot(t,r))<1e-4?(o=0,a=1):(o=r/i,a=t/i);var c=new Float32Array(9);return c[0]=n,c[1]=s,c[2]=0,c[3]=-s*a,c[4]=n*a,c[5]=o,c[6]=s*o,c[7]=-n*o,c[8]=a,c}var r=new class{constructor(){this.cache={};let e,t=[],r=Math.pow(2,4),i=2,s=Math.pow(2,i),o=r/s;for(t[0]=new n.Vector3(-1,0,0),t[o]=new n.Vector3(0,0,1),t[2*o]=new n.Vector3(1,0,0),t[3*o]=new n.Vector3(0,0,-1),i=3;i<=4;i++){for(s=Math.pow(2,i-1),o=r/s,e=0;e{"use strict";r.r(t),r.d(t,{GLModel:()=>f});var i=r("./src/WebGL/index.ts"),s=r("./src/WebGL/shapes/index.ts"),n=r("./src/WebGL/math/index.ts"),o=r("./src/colors.ts"),a=r("./src/GLDraw.ts"),l=r("./src/glcartoon.ts"),c=r("./src/utilities.ts"),h=r("./src/Gradient.ts"),u=r("./src/parsers/index.ts"),d=r("./node_modules/netcdfjs/lib-esm/index.js"),p=r("./src/parsers/utils/assignBonds.ts");class f{static sameObj(e,t){return e&&t?JSON.stringify(e)==JSON.stringify(t):e==t}constructor(e,t){this.atoms=[],this.frames=[],this.box=null,this.atomdfs=null,this.id=0,this.hidden=!1,this.molObj=null,this.renderedMolObj=null,this.lastColors=null,this.modelData={},this.modelDatas=null,this.idMatrix=new n.Matrix4,this.dontDuplicateAtoms=!0,this.defaultColor=o.elementColors.defaultColor,this.defaultStickRadius=.25,this.options=t||{},this.ElementColors=this.options.defaultcolors?this.options.defaultcolors:o.elementColors.defaultColors,this.defaultSphereRadius=this.options.defaultSphereRadius?this.options.defaultSphereRadius:1.5,this.defaultCartoonQuality=this.options.cartoonQuality?this.options.cartoonQuality:10,this.id=e}getRadiusFromStyle(e,t){var r=this.defaultSphereRadius;if(void 0!==t.radius)r=t.radius;else if(f.vdwRadii[e.elem])r=f.vdwRadii[e.elem];else if(e.elem.length>1){let t=e.elem;t=t[0].toUpperCase()+t[1].toLowerCase(),f.vdwRadii[t]&&(r=f.vdwRadii[t])}return void 0!==t.scale&&(r*=t.scale),r}drawAtomCross(e,t){if(e.style.cross){var r=e.style.cross;if(!r.hidden){var s=r.linewidth||f.defaultlineWidth;t[s]||(t[s]=new i.Geometry);var o=t[s].updateGeoGroup(6),a=this.getRadiusFromStyle(e,r),l=[[a,0,0],[-a,0,0],[0,a,0],[0,-a,0],[0,0,a],[0,0,-a]],h=e.clickable||e.hoverable;h&&void 0===e.intersectionShape&&(e.intersectionShape={sphere:[],cylinder:[],line:[]});for(var u=(0,c.getColorFromStyle)(e,r),d=o.vertexArray,p=o.colorArray,m=0;m<6;m++){var g=3*o.vertices;if(o.vertices++,d[g]=e.x+l[m][0],d[g+1]=e.y+l[m][1],d[g+2]=e.z+l[m][2],p[g]=u.r,p[g+1]=u.g,p[g+2]=u.b,h){var v=new n.Vector3(l[m][0],l[m][1],l[m][2]);v.multiplyScalar(.1),v.set(v.x+e.x,v.y+e.y,v.z+e.z),e.intersectionShape.line.push(v)}}}}}getGoodCross(e,t,r,i){for(var s=null,o=-1,a=0,l=e.bonds.length;ao&&(s=u,(o=c)>.1))return s}return s}getSideBondV(e,t,r){var i,s,o,a,l=new n.Vector3(e.x,e.y,e.z),c=new n.Vector3(t.x,t.y,t.z).clone(),h=null;if(c.sub(l),1===e.bonds.length)1===t.bonds.length?(h=c.clone(),Math.abs(h.x)>1e-4?h.y+=1:h.x+=1):(i=(r+1)%t.bonds.length,s=t.bonds[i],(o=this.atoms[s]).index==e.index&&(i=(i+1)%t.bonds.length,s=t.bonds[i],o=this.atoms[s]),(a=new n.Vector3(o.x,o.y,o.z).clone()).sub(l),(h=a.clone()).cross(c));else if((h=this.getGoodCross(e,t,l,c)).lengthSq()<.01){var u=this.getGoodCross(t,e,l,c);null!=u&&(h=u)}return h.lengthSq()<.01&&(h=c.clone(),Math.abs(h.x)>1e-4?h.y+=1:h.x+=1),h.cross(c),h.normalize(),h}addLine(e,t,r,i,s,n){e[r]=i.x,e[r+1]=i.y,e[r+2]=i.z,t[r]=n.r,t[r+1]=n.g,t[r+2]=n.b,e[r+3]=s.x,e[r+4]=s.y,e[r+5]=s.z,t[r+3]=n.r,t[r+4]=n.g,t[r+5]=n.b}drawBondLines(e,t,r){if(e.style.line){var s=e.style.line;if(!s.hidden){var a,l,h,u,d=s.linewidth||f.defaultlineWidth;r[d]||(r[d]=new i.Geometry);for(var p=r[d].updateGeoGroup(6*e.bonds.length),m=p.vertexArray,g=p.colorArray,v=0;v=b.index)){var y=new n.Vector3(e.x,e.y,e.z),_=new n.Vector3(b.x,b.y,b.z),w=y.clone().add(_).multiplyScalar(.5),x=!1,S=e.clickable||e.hoverable,A=b.clickable||b.hoverable;(S||A)&&(S&&(void 0===e.intersectionShape&&(e.intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]}),e.intersectionShape.line.push(y),e.intersectionShape.line.push(w)),A&&(void 0===b.intersectionShape&&(b.intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]}),b.intersectionShape.line.push(w),b.intersectionShape.line.push(_)));var C=(0,c.getColorFromStyle)(e,e.style.line),M=(0,c.getColorFromStyle)(b,b.style.line);if(e.bondStyles&&e.bondStyles[v]){var L=e.bondStyles[v];if(!L.iswire)continue;L.singleBond&&(x=!0),void 0!==L.color1&&(C=o.CC.color(L.color1)),void 0!==L.color2&&(M=o.CC.color(L.color2))}var E,z,k=3*p.vertices;if(e.bondOrder[v]>1&&e.bondOrder[v]<4&&!x){var O=this.getSideBondV(e,b,v),T=_.clone();T.sub(y),2==e.bondOrder[v]?(O.multiplyScalar(.1),(a=y.clone()).add(O),(l=y.clone()).sub(O),(h=a.clone()).add(T),(u=l.clone()).add(T),C==M?(p.vertices+=4,this.addLine(m,g,k,a,h,C),this.addLine(m,g,k+6,l,u,C)):(p.vertices+=8,T.multiplyScalar(.5),(E=a.clone()).add(T),(z=l.clone()).add(T),this.addLine(m,g,k,a,E,C),this.addLine(m,g,k+6,E,h,M),this.addLine(m,g,k+12,l,z,C),this.addLine(m,g,k+18,z,u,M))):3==e.bondOrder[v]&&(O.multiplyScalar(.1),(a=y.clone()).add(O),(l=y.clone()).sub(O),(h=a.clone()).add(T),(u=l.clone()).add(T),C==M?(p.vertices+=6,this.addLine(m,g,k,y,_,C),this.addLine(m,g,k+6,a,h,C),this.addLine(m,g,k+12,l,u,C)):(p.vertices+=12,T.multiplyScalar(.5),(E=a.clone()).add(T),(z=l.clone()).add(T),this.addLine(m,g,k,y,w,C),this.addLine(m,g,k+6,w,_,M),this.addLine(m,g,k+12,a,E,C),this.addLine(m,g,k+18,E,h,M),this.addLine(m,g,k+24,l,z,C),this.addLine(m,g,k+30,z,u,M)))}else C==M?(p.vertices+=2,this.addLine(m,g,k,y,_,C)):(p.vertices+=4,this.addLine(m,g,k,y,w,C),this.addLine(m,g,k+6,w,_,M))}}}}}drawAtomSphere(e,t){if(e.style.sphere){var r=e.style.sphere;if(!r.hidden){var i=(0,c.getColorFromStyle)(e,r),o=this.getRadiusFromStyle(e,r);if((!0===e.clickable||e.hoverable)&&void 0!==e.intersectionShape){var l=new n.Vector3(e.x,e.y,e.z);e.intersectionShape.sphere.push(new s.Sphere(l,o))}a.GLDraw.drawSphere(t,e,o,i)}}}drawAtomClickSphere(e){if(e.style.clicksphere){var t=e.style.clicksphere;if(!t.hidden){var r=this.getRadiusFromStyle(e,t);if((!0===e.clickable||e.hoverable)&&void 0!==e.intersectionShape){var i=new n.Vector3(e.x,e.y,e.z);e.intersectionShape.sphere.push(new s.Sphere(i,r))}}}}drawAtomInstanced(e,t){if(e.style.sphere){var r=e.style.sphere;if(!r.hidden){var i=this.getRadiusFromStyle(e,r),o=(0,c.getColorFromStyle)(e,r),a=t.updateGeoGroup(1),l=a.vertices,h=3*l,u=a.vertexArray,d=a.colorArray,p=a.radiusArray;if(u[h]=e.x,u[h+1]=e.y,u[h+2]=e.z,d[h]=o.r,d[h+1]=o.g,d[h+2]=o.b,p[l]=i,(!0===e.clickable||e.hoverable)&&void 0!==e.intersectionShape){var f=new n.Vector3(e.x,e.y,e.z);e.intersectionShape.sphere.push(new s.Sphere(f,i))}a.vertices+=1}}}drawSphereImposter(e,t,r,i){var s,n=e.updateGeoGroup(4),o=n.vertices,a=3*o,l=n.vertexArray,c=n.colorArray;for(s=0;s<4;s++)l[a+3*s]=t.x,l[a+3*s+1]=t.y,l[a+3*s+2]=t.z;var h=n.normalArray;for(s=0;s<4;s++)c[a+3*s]=i.r,c[a+3*s+1]=i.g,c[a+3*s+2]=i.b;h[a+0]=-r,h[a+1]=r,h[a+2]=0,h[a+3]=-r,h[a+4]=-r,h[a+5]=0,h[a+6]=r,h[a+7]=-r,h[a+8]=0,h[a+9]=r,h[a+10]=r,h[a+11]=0,n.vertices+=4;var u=n.faceArray,d=n.faceidx;u[d+0]=o,u[d+1]=o+1,u[d+2]=o+2,u[d+3]=o+2,u[d+4]=o+3,u[d+5]=o,n.faceidx+=6}drawAtomImposter(e,t){if(e.style.sphere){var r=e.style.sphere;if(!r.hidden){var i=this.getRadiusFromStyle(e,r),o=(0,c.getColorFromStyle)(e,r);if((!0===e.clickable||e.hoverable)&&void 0!==e.intersectionShape){var a=new n.Vector3(e.x,e.y,e.z);e.intersectionShape.sphere.push(new s.Sphere(a,i))}this.drawSphereImposter(t,e,i,o)}}}calculateDashes(e,t,r,i,s){var o=Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)+Math.pow(e.z-t.z,2));r=Math.max(r,0),s=Math.max(s,0)+2*r,(i=Math.max(i,.001))+s>o&&(i=o,s=0);var a,l=Math.floor((o-i)/(i+s))+1;s=(o-l*i)/l;for(var c=new n.Vector3(e.x,e.y,e.z),h=new n.Vector3((t.x-e.x)/(o/s),(t.y-e.y)/(o/s),(t.z-e.z)/(o/s)),u=new n.Vector3((t.x-e.x)/(o/i),(t.y-e.y)/(o/i),(t.z-e.z)/(o/i)),d=[],p=0;p{var t=r.imposter?f.drawStickImposter:a.GLDraw.drawCylinder;return!I&&e>=1?t:(e,r,i,s,n,o=0,a=0,l=.1,c=.25)=>{this.calculateDashes(r,i,s,l,c).forEach((r=>{t(e,r.from,r.to,s,n,o,a)}))}};for(p=0;p3){if(e.bondOrder[p]<1&&(O*=e.bondOrder[p]),!B.capDrawn&&B.bonds.length<4&&(D=2),R!=N?(S=(new n.Vector3).addVectors(U,V).multiplyScalar(.5),G(r,U,S,O,R,F,0,z,k),G(r,S,V,O,N,0,D,z,k)):G(r,U,V,O,R,F,D,z,k),u=e.clickable||e.hoverable,d=B.clickable||B.hoverable,u||d){if(S||(S=(new n.Vector3).addVectors(U,V).multiplyScalar(.5)),u){var W=new s.Cylinder(U,S,O),H=new s.Sphere(U,O);e.intersectionShape.cylinder.push(W),e.intersectionShape.sphere.push(H)}if(d){var q=new s.Cylinder(V,S,O),Y=new s.Sphere(V,O);B.intersectionShape.cylinder.push(q),B.intersectionShape.sphere.push(Y)}}}else if(e.bondOrder[p]>1){var Z=0,X=0;O!=M&&(Z=2,X=2);var $,K,J,Q,ee,te=V.clone(),re=null;te.sub(U),re=this.getSideBondV(e,B,p),2==e.bondOrder[p]?($=O*L,re.multiplyScalar(1.5*$),(K=U.clone()).add(re),(J=U.clone()).sub(re),(Q=K.clone()).add(te),(ee=J.clone()).add(te),R!=N?(S=(new n.Vector3).addVectors(K,Q).multiplyScalar(.5),A=(new n.Vector3).addVectors(J,ee).multiplyScalar(.5),G(r,K,S,$,R,Z,0),G(r,S,Q,$,N,0,X),G(r,J,A,$,R,Z,0),G(r,A,ee,$,N,0,X)):(G(r,K,Q,$,R,Z,X),G(r,J,ee,$,R,Z,X)),u=e.clickable||e.hoverable,d=B.clickable||B.hoverable,(u||d)&&(S||(S=(new n.Vector3).addVectors(K,Q).multiplyScalar(.5)),A||(A=(new n.Vector3).addVectors(J,ee).multiplyScalar(.5)),u&&(v=new s.Cylinder(K,S,$),b=new s.Cylinder(J,A,$),e.intersectionShape.cylinder.push(v),e.intersectionShape.cylinder.push(b)),d&&(_=new s.Cylinder(Q,S,$),w=new s.Cylinder(ee,A,$),B.intersectionShape.cylinder.push(_),B.intersectionShape.cylinder.push(w)))):3==e.bondOrder[p]&&($=O*E,re.cross(te),re.normalize(),re.multiplyScalar(3*$),(K=U.clone()).add(re),(J=U.clone()).sub(re),(Q=K.clone()).add(te),(ee=J.clone()).add(te),R!=N?(S=(new n.Vector3).addVectors(K,Q).multiplyScalar(.5),A=(new n.Vector3).addVectors(J,ee).multiplyScalar(.5),C=(new n.Vector3).addVectors(U,V).multiplyScalar(.5),G(r,K,S,$,R,Z,0),G(r,S,Q,$,N,0,X),G(r,U,C,$,R,F,0),G(r,C,V,$,N,0,D),G(r,J,A,$,R,Z,0),G(r,A,ee,$,N,0,X)):(G(r,K,Q,$,R,Z,X),G(r,U,V,$,R,F,D),G(r,J,ee,$,R,Z,X)),u=e.clickable||e.hoverable,d=B.clickable||B.hoverable,(u||d)&&(S||(S=(new n.Vector3).addVectors(K,Q).multiplyScalar(.5)),A||(A=(new n.Vector3).addVectors(J,ee).multiplyScalar(.5)),C||(C=(new n.Vector3).addVectors(U,V).multiplyScalar(.5)),u&&(v=new s.Cylinder(K.clone(),S.clone(),$),b=new s.Cylinder(J.clone(),A.clone(),$),y=new s.Cylinder(U.clone(),C.clone(),$),e.intersectionShape.cylinder.push(v),e.intersectionShape.cylinder.push(b),e.intersectionShape.cylinder.push(y)),d&&(_=new s.Cylinder(Q.clone(),S.clone(),$),w=new s.Cylinder(ee.clone(),A.clone(),$),x=new s.Cylinder(V.clone(),C.clone(),$),B.intersectionShape.cylinder.push(_),B.intersectionShape.cylinder.push(w),B.intersectionShape.cylinder.push(x))))}}}var ie=!1,se=0,ne=!1;for(p=0;p0&&(ie=!0):0==se&&(e.bonds.length>0||h.showNonBonded)&&(ie=!0),ie&&(O=M,r.imposter?this.drawSphereImposter(r.sphereGeometry,e,O,R):a.GLDraw.drawSphere(r,e,O,R))}}}createMolObj(e,t){t=t||{};var r,s,n,c,h=new i.Object3D,u=[],d={},p={},f=this.drawAtomSphere,m=null,g=null;t.supportsImposters?(f=this.drawAtomImposter,(m=new i.Geometry(!0)).imposter=!0,(g=new i.Geometry(!0,!0)).imposter=!0,g.sphereGeometry=new i.Geometry(!0),g.sphereGeometry.imposter=!0,g.drawnCaps={}):t.supportsAIA?(f=this.drawAtomInstanced,(m=new i.Geometry(!1,!0,!0)).instanced=!0,g=new i.Geometry(!0)):(m=new i.Geometry(!0),g=new i.Geometry(!0));var v,b={},y=[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(r=0,n=e.length;ry[1]&&(y[1]=_.resi)),u.push(_))}}if(u.length>0&&(0,l.drawCartoon)(h,u,y,this.defaultCartoonQuality),m&&m.vertices>0){m.initTypedArrays();var w=null,x=null;m.imposter?w=new i.SphereImposterMaterial({ambient:0,vertexColors:!0,reflectivity:0}):m.instanced?(x=new i.Geometry(!0),a.GLDraw.drawSphere(x,{x:0,y:0,z:0},1,new o.Color(.5,.5,.5)),x.initTypedArrays(),w=new i.InstancedMaterial({sphereMaterial:new i.MeshLambertMaterial({ambient:0,vertexColors:!0,reflectivity:0}),sphere:x})):w=new i.MeshLambertMaterial({ambient:0,vertexColors:!0,reflectivity:0}),b.sphere<1&&b.sphere>=0&&(w.transparent=!0,w.opacity=b.sphere),x=new i.Mesh(m,w),h.add(x)}if(g.vertices>0){var S=null,A=null,C=g.sphereGeometry;C&&void 0!==C.vertices&&0!=C.vertices||(C=null),g.initTypedArrays(),C&&C.initTypedArrays();var M={ambient:0,vertexColors:!0,reflectivity:0};g.imposter?(S=new i.StickImposterMaterial(M),A=new i.SphereImposterMaterial(M)):(S=new i.MeshLambertMaterial(M),A=new i.MeshLambertMaterial(M),S.wireframe&&(g.setUpWireframe(),C&&C.setUpWireframe())),b.stick<1&&b.stick>=0&&(S.transparent=!0,S.opacity=b.stick,A.transparent=!0,A.opacity=b.stick);var L=new i.Mesh(g,S);if(h.add(L),C){var E=new i.Mesh(C,A);h.add(E)}}for(r in d)if(d.hasOwnProperty(r)){v=r;var z=new i.LineBasicMaterial({linewidth:v,vertexColors:!0});b.line<1&&b.line>=0&&(z.transparent=!0,z.opacity=b.line),d[r].initTypedArrays();var k=new i.Line(d[r],z,i.LineStyle.LinePieces);h.add(k)}for(r in p)if(p.hasOwnProperty(r)){v=r;var O=new i.LineBasicMaterial({linewidth:v,vertexColors:!0});b.cross<1&&b.cross>=0&&(O.transparent=!0,O.opacity=b.cross),p[r].initTypedArrays();var T=new i.Line(p[r],O,i.LineStyle.LinePieces);h.add(T)}if(this.dontDuplicateAtoms&&this.modelData.symmetries&&this.modelData.symmetries.length>0){var I,F=new i.Object3D;for(I=0;Ir?t-i:t}adjustCoordinatesToBox(){if(this.box&&this.atomdfs)for(var e=this.box[0],t=this.box[1],r=this.box[2],i=.9*e,s=.9*t,n=.9*r,o=0;o=r)&&(e=r-1),null!=i.frames.url){var o=i.frames.url;(0,c.getbin)(o+"/traj/frame/"+e+"/"+i.frames.path,void 0,"POST",void 0).then((function(e){for(var t=new Float32Array(e,44),r=0,n=0;n=i&&e<=s)return!0}}return!1}static deepCopyAndCache(e,t){if("object"!=typeof e||null==e)return e;if(e.__cache_created)return e;const r={};for(const i in e){const s=e[i];if(Array.isArray(s)){r[i]=[];for(let e=0;e=i[0][0]&&o<=i[1][0]&&a>=i[0][1]&&a<=i[1][1]&&l>=i[0][2]&&l<=i[1][2]&&(o>=r[0][0]&&o<=r[1][0]&&a>=r[0][1]&&a<=r[1][1]&&l>=r[0][2]&&l<=r[1][2]||n.push(this.atoms[e]))}return n}static getFloat(e){return"number"==typeof e?e:parseFloat(e)}selectedAtoms(e,t){var r=[];e=f.deepCopyAndCache(e||{},this),t||(t=this.atoms);for(var i=t.length,s=0;s0&&r.push(i[e])}}if(e.hasOwnProperty("within")&&e.within.hasOwnProperty("sel")&&e.within.hasOwnProperty("distance")){var a=this.selectedAtoms(e.within.sel,this.atoms),l={};const t=f.getFloat(e.within.distance),i=t*t;for(let e=0;e0&&(l[t]=1)}var c=[];if(e.within.invert)for(let e=0;e0;)if(t=d.pop(),p=t.chain,m=t.resi,void 0===u[t.index]){u[t.index]=!0;for(var g=0;g0&&(this.molObj=null)}else console.log("Callback is not a function")}setHoverable(e,t,r,i){if(t=!!t,r=(0,c.makeFunction)(r),i=(0,c.makeFunction)(i),null!==r)if(null!==i){var s=this.selectedAtoms(e,this.atoms),n=s.length;for(let e=0;e0&&(this.molObj=null)}else console.log("Unhover_callback is not a function");else console.log("Hover_callback is not a function")}enableContextMenu(e,t){var r;t=!!t;var i=this.selectedAtoms(e,this.atoms),s=i.length;for(r=0;r0&&(this.molObj=null)}setColorByElement(e,t){if(null===this.molObj||!f.sameObj(t,this.lastColors)){this.lastColors=t;var r=this.selectedAtoms(e,r);r.length>0&&(this.molObj=null);for(var i=0;i0&&(this.molObj=null),"string"==typeof r&&void 0!==h.Gradient.builtinGradients[r]&&(r=new h.Gradient.builtinGradients[r]),i||(i=r.range()),i||(i=(0,c.getPropertyRange)(o,t)),s=0;s0&&(this.molObj=null);for(let e=0;e=s)continue;let o={b:r,e:s},a=n.bondOrder[e];1!=a&&(o.o=a),t.b.push(o)}}return t}globj(e,t){(null===this.molObj||t.regen)&&(this.molObj=this.createMolObj(this.atoms,t),this.renderedMolObj&&(e.remove(this.renderedMolObj),this.renderedMolObj=null),this.renderedMolObj=this.molObj.clone(),this.hidden&&(this.renderedMolObj.setVisible(!1),this.molObj.setVisible(!1)),e.add(this.renderedMolObj))}exportVRML(){return this.createMolObj(this.atoms,{supportsImposters:!1,supportsAIA:!1}).vrml()}removegl(e){this.renderedMolObj&&(void 0!==this.renderedMolObj.geometry&&this.renderedMolObj.geometry.dispose(),void 0!==this.renderedMolObj.material&&this.renderedMolObj.material.dispose(),e.remove(this.renderedMolObj),this.renderedMolObj=null),this.molObj=null}hide(){this.hidden=!0,this.renderedMolObj&&this.renderedMolObj.setVisible(!1),this.molObj&&this.molObj.setVisible(!1)}show(){this.hidden=!1,this.renderedMolObj&&this.renderedMolObj.setVisible(!0),this.molObj&&this.molObj.setVisible(!0)}addPropertyLabels(e,t,r,i){for(var s=this.selectedAtoms(t,s),n=(0,c.deepCopy)(i),o=0;oMOLECULE/gm)?"mol2":e.match(/^data_/gm)&&e.match(/^loop_/gm)?"cif":e.match(/^HETATM/gm)||e.match(/^ATOM/gm)?"pdb":e.match(/ITEM: TIMESTEP/gm)?"lammpstrj":e.match(/^.*\n.*\n.\s*(\d+)\s+(\d+)/gm)?"sdf":e.match(/^%VERSION\s+VERSION_STAMP/gm)?"prmtop":"xyz",console.log("Best guess: "+t))),(0,u.Parsers[t])(e,r)}}f.defaultAtomStyle={line:{}},f.defaultlineWidth=1,f.vdwRadii={H:1.2,He:1.4,Li:1.82,Be:1.53,B:1.92,C:1.7,N:1.55,O:1.52,F:1.47,Ne:1.54,Na:2.27,Mg:1.73,Al:1.84,Si:2.1,P:1.8,S:1.8,Cl:1.75,Ar:1.88,K:2.75,Ca:2.31,Ni:1.63,Cu:1.4,Zn:1.39,Ga:1.87,Ge:2.11,As:1.85,Se:1.9,Br:1.85,Kr:2.02,Rb:3.03,Sr:2.49,Pd:1.63,Ag:1.72,Cd:1.58,In:1.93,Sn:2.17,Sb:2.06,Te:2.06,I:1.98,Xe:2.16,Cs:3.43,Ba:2.68,Pt:1.75,Au:1.66,Hg:1.55,Tl:1.96,Pb:2.02,Bi:2.07,Po:1.97,At:2.02,Rn:2.2,Fr:3.48,Ra:2.83,U:1.86},f.ignoredKeys=new Set(["props","invert","model","frame","byres","expand","within","and","or","not"])},"./src/GLShape.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{GLShape:()=>d,splitMesh:()=>p});var i=r("./src/WebGL/index.ts"),s=r("./src/WebGL/shapes/index.ts"),n=r("./src/WebGL/math/index.ts"),o=r("./src/colors.ts"),a=r("./src/ProteinSurface4.ts"),l=r("./src/VolumeData.ts"),c=r("./src/GLDraw.ts"),h=r("./src/glcartoon.ts"),u=r("./src/utilities.ts");class d{static finalizeGeo(e){var t=e.updateGeoGroup(0);t.vertices>0&&t.truncateArrayBuffers(!0,!0)}static updateColor(e,t){var r,i,s;t=t||o.CC.color(t),e.colorsNeedUpdate=!0,t.constructor!==Array&&(r=t.r,i=t.g,s=t.b);for(let n in e.geometryGroups){let o=e.geometryGroups[n],a=o.colorArray;for(let e=0,n=o.vertices;e0?h/e:(e+h)/e}d.multiplyScalar(c);var p=new n.Vector3(i.x,i.y,i.z).add(d),f=d.clone().negate();let m=new n.Vector3(i.x,i.y,i.z);e.intersectionShape.cylinder.push(new s.Cylinder(m,p.clone(),a)),e.intersectionShape.sphere.push(new s.Sphere(m,a));var g=[];g[0]=d.clone(),Math.abs(g[0].x)>1e-4?g[0].y+=1:g[0].x+=1,g[0].cross(d),g[0].normalize(),g[4]=g[0].clone(),g[4].crossVectors(g[0],d),g[4].normalize(),g[8]=g[0].clone().negate(),g[12]=g[4].clone().negate(),g[2]=g[0].clone().add(g[4]).normalize(),g[6]=g[4].clone().add(g[8]).normalize(),g[10]=g[8].clone().add(g[12]).normalize(),g[14]=g[12].clone().add(g[0]).normalize(),g[1]=g[0].clone().add(g[2]).normalize(),g[3]=g[2].clone().add(g[4]).normalize(),g[5]=g[4].clone().add(g[6]).normalize(),g[7]=g[6].clone().add(g[8]).normalize(),g[9]=g[8].clone().add(g[10]).normalize(),g[11]=g[10].clone().add(g[12]).normalize(),g[13]=g[12].clone().add(g[14]).normalize(),g[15]=g[14].clone().add(g[0]).normalize();var v,b,y,_,w,x,S,A,C,M,L,E,z,k,O,T,I,F,D,R,P,G,B=u.vertices,j=u.vertexArray,N=u.faceArray,U=u.normalArray,V=u.lineArray;for(b=0,y=g.length;b0){var Y=j[v-3],Z=j[v-2],X=j[v-1],$=new n.Vector3(Y,Z,X),K=new n.Vector3(o.x,o.y,o.z),J=p.clone(),Q=new n.Vector3(q.x,q.y,q.z);e.intersectionShape.triangle.push(new s.Triangle(Q,K,$)),e.intersectionShape.triangle.push(new s.Triangle($.clone(),J,Q.clone()))}}u.vertices+=48,j[v=3*u.vertices]=i.x,j[v+1]=i.y,j[v+2]=i.z,j[v+3]=p.x,j[v+4]=p.y,j[v+5]=p.z,j[v+6]=o.x,j[v+7]=o.y,j[v+8]=o.z,u.vertices+=3;var ee=u.vertices-3,te=u.vertices-2,re=u.vertices-1,ie=3*ee,se=3*te,ne=3*re;for(b=0,y=g.length-1;ba&&(a=h),u>l&&(l=u),d>c&&(c=d)}e.center.set((a+s)/2,(l+n)/2,(c+o)/2),e.radius=e.center.distanceTo({x:a,y:l,z:c}),e.box={min:{x:s,y:n,z:o},max:{x:a,y:l,z:c}}}static addCustomGeo(e,t,r,i,o){var a,l,c,h,u,p,f,m,g,v=t.addGeoGroup(),b=r.vertexArr,y=r.normalArr,_=r.faceArr;v.vertices=b.length,v.faceidx=_.length;var w=v.vertexArray,x=v.colorArray;for(i.constructor!==Array&&(m=i.r,g=i.g,h=i.b),p=0,f=v.vertices;pc?(u.fromCap=0,u.toCap=2):(u.fromCap=2,u.toCap=2),this.addCylinder(u)}}addLine(e){var t,r;t=e.start?new n.Vector3(e.start.x||0,e.start.y||0,e.start.z||0):new n.Vector3(0,0,0),e.end?void 0===(r=new n.Vector3(e.end.x,e.end.y||0,e.end.z||0)).x&&(r.x=3):r=new n.Vector3(3,0,0);var i=this.geo.updateGeoGroup(2),s=i.vertices,o=3*s,a=i.vertexArray;a[o]=t.x,a[o+1]=t.y,a[o+2]=t.z,a[o+3]=r.x,a[o+4]=r.y,a[o+5]=r.z,i.vertices+=2;var l=i.lineArray,c=i.lineidx;l[c]=s,l[c+1]=s+1,i.lineidx+=2;var h=new n.Vector3;this.components.push({centroid:h.addVectors(t,r).multiplyScalar(.5)}),i=this.geo.updateGeoGroup(0),d.updateBoundingFromPoints(this.boundingSphere,this.components,i.vertexArray,i.vertices)}addArrow(e){if(e.start?e.start=new n.Vector3(e.start.x||0,e.start.y||0,e.start.z||0):e.start=new n.Vector3(0,0,0),e.dir instanceof n.Vector3&&"number"==typeof e.length){var t=e.dir.clone().multiplyScalar(e.length).add(e.start);e.end=t}else e.end?(e.end=new n.Vector3(e.end.x,e.end.y||0,e.end.z||0),void 0===e.end.x&&(e.end.x=3)):e.end=new n.Vector3(3,0,0);e.radius=e.radius||.1,e.radiusRatio=e.radiusRatio||1.618034,e.mid=0=0?g[s]-l:l-g[s])>0&&(v[s]|=d.ISDONE);var b=[],y=[];a.MarchingCube.march(v,b,y,{fulltable:!0,voxel:c,unitCube:e.unit,origin:e.origin,matrix:e.matrix,nX:u,nY:p,nZ:f}),!c&&h>0&&a.MarchingCube.laplacianSmooth(h,b,y);var _=[],w=[],x=[];if(t.selectedRegion&&void 0===t.coords&&(t.coords=t.selectedRegion),void 0===t.coords&&void 0!==t.selection&&(i?t.coords=i.selectedAtoms(t.selection):console.log("addIsosurface needs viewer is selection provided.")),void 0!==t.coords){var S=t.coords[0].x,A=t.coords[0].y,C=t.coords[0].z,M=t.coords[0].x,L=t.coords[0].y,E=t.coords[0].z;for(let e=0;eS?S=t.coords[e].x:t.coords[e].xA?A=t.coords[e].y:t.coords[e].yC?C=t.coords[e].z:t.coords[e].zM&&b[e].xL&&b[e].yE&&b[e].z=64e3&&(t.push({vertexArr:[],normalArr:[],faceArr:[]}),e.colorArr&&(t.colorArr=[]),s++)}return t}d.ISDONE=2,d.drawCustom=function(e,t,r){var i=r,s=i.vertexArr,n=i.faceArr;0!==s.length&&0!==n.length||console.warn("Error adding custom shape component: No vertices and/or face indices supplied!");var a=r.color;void 0===a&&(a=e.color),a=o.CC.color(a);for(var l=p(i),c=0,h=l.length;c{"use strict";r.r(t),r.d(t,{GLViewer:()=>m,createStereoViewer:()=>b,createViewer:()=>g,createViewerGrid:()=>v});var i=r("./src/WebGL/index.ts"),s=r("./src/WebGL/math/index.ts"),n=r("./src/colors.ts"),o=r("./src/utilities.ts"),a=r("./src/Gradient.ts"),l=r("./src/GLModel.ts"),c=r("./src/Label.ts"),h=r("./src/GLShape.ts"),u=r("./src/VolumeData.ts"),d=r("./src/ProteinSurface4.ts"),p=r("./src/VolumetricRender.ts"),f=r("./node_modules/upng-js/UPNG.js");class m{getWidth(){let e=this.container,t=e.offsetWidth;if(0==t&&"none"===e.style.display){let r=e.style.position,i=e.style.visibility;e.style.display="block",e.style.visibility="hidden",e.style.position="absolute",t=e.offsetWidth,e.style.display="none",e.style.visibility=i,e.style.position=r}return t}getHeight(){let e=this.container,t=e.offsetHeight;if(0==t&&"none"===e.style.display){let r=e.style.position,i=e.style.visibility;e.style.display="block",e.style.visibility="hidden",e.style.position="absolute",t=e.offsetHeight,e.style.display="none",e.style.visibility=i,e.style.position=r}return t}setupRenderer(){this.renderer=new i.Renderer({antialias:this.config.antialias,preserveDrawingBuffer:!0,premultipliedAlpha:!1,id:this.config.id,row:this.config.row,col:this.config.col,rows:this.config.rows,cols:this.config.cols,canvas:this.config.canvas,containerWidth:this.WIDTH,containerHeight:this.HEIGHT}),this.renderer.domElement.style.width="100%",this.renderer.domElement.style.height="100%",this.renderer.domElement.style.padding="0",this.renderer.domElement.style.position="absolute",this.renderer.domElement.style.top="0px",this.renderer.domElement.style.left="0px",this.renderer.domElement.style.zIndex="0"}initializeScene(){this.scene=new i.Scene,this.scene.fog=new i.Fog(this.bgColor,100,200),this.modelGroup=new i.Object3D,this.rotationGroup=new i.Object3D,this.rotationGroup.useQuaternion=!0,this.rotationGroup.quaternion=new s.Quaternion(0,0,0,1),this.rotationGroup.add(this.modelGroup),this.scene.add(this.rotationGroup);var e=new i.Light(16777215);e.position=new s.Vector3(.2,.2,1).normalize(),e.intensity=1,this.scene.add(e)}initContainer(e){this.container=e,this.WIDTH=this.getWidth(),this.HEIGHT=this.getHeight(),this.ASPECT=this.renderer.getAspect(this.WIDTH,this.HEIGHT),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.container.append(this.renderer.domElement),this.glDOM=this.renderer.domElement,this.nomouse||(this.glDOM.addEventListener("mousedown",this._handleMouseDown.bind(this),{passive:!1}),this.glDOM.addEventListener("touchstart",this._handleMouseDown.bind(this),{passive:!1}),this.glDOM.addEventListener("wheel",this._handleMouseScroll.bind(this),{passive:!1}),this.glDOM.addEventListener("mousemove",this._handleMouseMove.bind(this),{passive:!1}),this.glDOM.addEventListener("touchmove",this._handleMouseMove.bind(this),{passive:!1}),this.glDOM.addEventListener("contextmenu",this._handleContextMenu.bind(this),{passive:!1}))}decAnim(){this.animated--,this.animated<0&&(this.animated=0)}incAnim(){this.animated++}nextSurfID(){var e=0;for(let r in this.surfaces)if(this.surfaces.hasOwnProperty(r)){var t=parseInt(r);isNaN(t)||t>e&&(e=t)}return e+1}setSlabAndFog(){let e=this.camera.position.z-this.rotationGroup.position.z;e<1&&(e=1),this.camera.near=e+this.slabNear,this.camera.near<1&&(this.camera.near=1),this.camera.far=e+this.slabFar,this.camera.near+1>this.camera.far&&(this.camera.far=this.camera.near+1),this.camera.fov=this.fov,this.camera.right=e*Math.tan(Math.PI/180*this.fov),this.camera.left=-this.camera.right,this.camera.top=this.camera.right/this.ASPECT,this.camera.bottom=-this.camera.top,this.camera.updateProjectionMatrix(),this.scene.fog.near=this.camera.near+this.fogStart*(this.camera.far-this.camera.near),this.scene.fog.far=this.camera.far,this.config.disableFog&&(this.scene.fog.near=this.scene.fog.far)}show(e){if(this.renderer.setViewport(),this.scene&&(this.setSlabAndFog(),this.renderer.render(this.scene,this.camera),this.viewChangeCallback&&this.viewChangeCallback(this._viewer.getView()),!e&&this.linkedViewers.length>0))for(var t=this._viewer.getView(),r=0;r0){let t=this.CAMERA_Z-this.config.lowerZoomLimit;e>t&&(e=t)}if(this.config.upperZoomLimit&&this.config.upperZoomLimit>0){let t=this.CAMERA_Z-this.config.upperZoomLimit;ethis.CAMERA_Z-1&&(e=this.CAMERA_Z-1),e}static slerp(e,t,r){if(1==r)return t.clone();if(0==r)return e.clone();let i=e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w;if(i>.9995){let i=new s.Quaternion(e.x+r*(t.x-e.x),e.y+r*(t.y-e.y),e.z+r*(t.z-e.z),e.w+r*(t.w-e.w));return i.normalize(),i}i<0&&(t=t.clone().multiplyScalar(-1),i=-i),i>1?i=1:i<-1&&(i=-1);var n=Math.acos(i)*r,o=t.clone();o.sub(e.clone().multiplyScalar(i)),o.normalize();var a=Math.cos(n),l=Math.sin(n),c=new s.Quaternion(e.x*a+o.x*l,e.y*a+o.y*l,e.z*a+o.z*l,e.w*a+o.w*l);return c.normalize(),c}constructor(e,t={}){if(this.nomouse=!1,this.glDOM=null,this.models=[],this.surfaces={},this.shapes=[],this.labels=[],this.clickables=[],this.hoverables=[],this.contextMenuEnabledObjects=[],this.current_hover=null,this.hoverDuration=500,this.longTouchDuration=1e3,this.viewer_frame=0,this.viewChangeCallback=null,this.stateChangeCallback=null,this.NEAR=1,this.FAR=800,this.CAMERA_Z=150,this.fov=20,this.linkedViewers=[],this.renderer=null,this.control_all=!1,this.scene=null,this.rotationGroup=null,this.modelGroup=null,this.fogStart=.4,this.slabNear=-50,this.slabFar=50,this.cq=new s.Quaternion(0,0,0,1),this.dq=new s.Quaternion(0,0,0,1),this.animated=0,this.animationTimers=new Set,this.isDragging=!1,this.mouseStartX=0,this.mouseStartY=0,this.touchDistanceStart=0,this.touchHold=!1,this.currentModelPos=0,this.cz=0,this.cslabNear=0,this.cslabFar=0,this.userContextMenuHandler=null,this.config=t,this.callback=this.config.callback,this.defaultcolors=this.config.defaultcolors,this.defaultcolors||(this.defaultcolors=n.elementColors.defaultColors),this.nomouse=this.config.nomouse,this.bgColor=0,this.config.backgroundColor=this.config.backgroundColor||"#ffffff",void 0!==this.config.backgroundColor&&(this.bgColor=n.CC.color(this.config.backgroundColor).getHex()),this.config.backgroundAlpha=null==this.config.backgroundAlpha?1:this.config.backgroundAlpha,this.camerax=0,void 0!==this.config.camerax&&(this.camerax=parseFloat(this.config.camerax)),this._viewer=this,this.container=e,null!=this.config.hoverDuration&&(this.hoverDuration=this.config.hoverDuration),void 0===this.config.antialias&&(this.config.antialias=!0),void 0===this.config.cartoonQuality&&(this.config.cartoonQuality=10),this.WIDTH=this.getWidth(),this.HEIGHT=this.getHeight(),this.setupRenderer(),this.row=null==this.config.row?0:this.config.row,this.col=null==this.config.col?0:this.config.col,this.cols=this.config.cols,this.rows=this.config.rows,this.viewers=this.config.viewers,this.control_all=this.config.control_all,this.ASPECT=this.renderer.getAspect(this.WIDTH,this.HEIGHT),this.camera=new i.Camera(this.fov,this.ASPECT,this.NEAR,this.FAR,this.config.orthographic),this.camera.position=new s.Vector3(this.camerax,0,this.CAMERA_Z),this.lookingAt=new s.Vector3,this.camera.lookAt(this.lookingAt),this.raycaster=new i.Raycaster(new s.Vector3(0,0,0),new s.Vector3(0,0,0)),this.projector=new i.Projector,this.initializeScene(),this.renderer.setClearColorHex(this.bgColor,this.config.backgroundAlpha),this.scene.fog.color=n.CC.color(this.bgColor),document.body.addEventListener("mouseup",this._handleMouseUp.bind(this)),document.body.addEventListener("touchend",this._handleMouseUp.bind(this)),this.initContainer(this.container),this.config.style&&this.setViewStyle(this.config),window.addEventListener("resize",this.resize.bind(this)),void 0!==window.ResizeObserver&&(this.divwatcher=new window.ResizeObserver(this.resize.bind(this)),this.divwatcher.observe(this.container)),void 0!==window.IntersectionObserver){let e=(e,t)=>{e.forEach((e=>{e.isIntersecting&&this.resize()}))};this.intwatcher=new window.IntersectionObserver(e),this.intwatcher.observe(this.container)}try{"function"==typeof this.callback&&this.callback(this)}catch(e){console.log("error with glviewer callback: "+e)}}targetedObjects(e,t,r){var i={x:e,y:t,z:-1};return Array.isArray(r)||(r=this.selectedAtoms(r)),0==r.length?[]:(this.raycaster.setFromCamera(i,this.camera),this.raycaster.intersectObjects(this.modelGroup,r))}modelToScreen(e){let t=!1;Array.isArray(e)||(e=[e],t=!0);let r=this.renderer.getXRatio(),i=this.renderer.getYRatio(),n=this.col,o=this.row,a=n*(this.WIDTH/r),l=(i-o-1)*(this.HEIGHT/i),c=[],h=this.canvasOffset();return e.forEach((e=>{let t=new s.Vector3(e.x,e.y,e.z);t.applyMatrix4(this.modelGroup.matrixWorld),this.projector.projectVector(t,this.camera);let n=this.WIDTH/r*(t.x+1)/2+h.left+a,o=-this.HEIGHT/i*(t.y-1)/2+h.top+l;c.push({x:n,y:o})})),t&&(c=c[0]),c}screenOffsetToModel(e,t,r){var i=e/this.WIDTH,n=t/this.HEIGHT,o=void 0===r?this.rotationGroup.position.z:r,a=this.rotationGroup.quaternion,l=new s.Vector3(0,0,o);return this.projector.projectVector(l,this.camera),l.x+=2*i,l.y-=2*n,this.projector.unprojectVector(l,this.camera),l.z=0,l.applyQuaternion(a),l}screenToModelDistance(e,t){let r=this.canvasOffset(),i=new s.Vector3(t.x,t.y,t.z);i.applyMatrix4(this.modelGroup.matrixWorld);let n=i.clone();this.projector.projectVector(i,this.camera);let o=new s.Vector3(2*(e.x-r.left)/this.WIDTH-1,2*(e.y-r.top)/-this.HEIGHT+1,i.z);return this.projector.unprojectVector(o,this.camera),o.distanceTo(n)}setViewChangeCallback(e){"function"!=typeof e&&null!=e||(this.viewChangeCallback=e)}setStateChangeCallback(e){"function"!=typeof e&&null!=e||(this.stateChangeCallback=e)}getConfig(){return this.config}setConfig(e){this.config=e}getInternalState(){var e={models:[],surfaces:[],shapes:[],labels:[]};for(let t=0;t{t.getCanvas().toBlob((function(t){t.arrayBuffer().then(e)}),"image/png")}))),i+=1,i==e&&(t.viewChangeCallback=s,Promise.all(n).then((e=>{let i=[];for(let t=0;t0&&(this.hoverTimeout=setTimeout((function(){o.handleHoverSelection(n.x,n.y,e)}),this.hoverDuration)),this.isDragging)){e.targetTouches&&(e.targetTouches.length>1||1===e.targetTouches.length&&!this.closeEnoughForClick(e))&&clearTimeout(this.longTouchTimeout);var l=(t-this.mouseStartX)/this.WIDTH,c=(r-this.mouseStartY)/this.HEIGHT;0!=this.touchDistanceStart&&e.targetTouches&&2==e.targetTouches.length?(a=2,c=2*(this.calcTouchDistance(e)-this.touchDistanceStart)/(this.WIDTH+this.HEIGHT)):e.targetTouches&&3==e.targetTouches.length&&(a=1),l*=i,c*=s;var h,u=Math.hypot(l,c);if(3==a||3==this.mouseButton&&e.ctrlKey)this.slabNear=this.cslabNear+100*l,this.slabFar=this.cslabFar-100*c;else if(2==a||3==this.mouseButton||e.shiftKey)(h=.85*(this.CAMERA_Z-this.rotationGroup.position.z))<80&&(h=80),this.rotationGroup.position.z=this.cz+c*h,this.rotationGroup.position.z=this.adjustZoomToLimits(this.rotationGroup.position.z);else if(1==a||2==this.mouseButton||e.ctrlKey){var d=this.screenOffsetToModel(i*(t-this.mouseStartX),s*(r-this.mouseStartY));this.modelGroup.position.addVectors(this.currentModelPos,d)}else if((0===a||1==this.mouseButton)&&0!==u){var p=Math.sin(u*Math.PI)/u;this.dq.x=Math.cos(u*Math.PI),this.dq.y=0,this.dq.z=p*l,this.dq.w=-p*c,this.rotationGroup.quaternion.set(1,0,0,0),this.rotationGroup.quaternion.multiply(this.dq),this.rotationGroup.quaternion.multiply(this.cq)}this.show()}}_handleContextMenu(e){if(e.preventDefault(),this.closeEnoughForClick(e)){var t=this.mouseStartX,r=this.mouseStartY,i=this.canvasOffset();let n=this.mouseXY(t,r),o=n.x,a=n.y,l=this.targetedObjects(o,a,this.contextMenuEnabledObjects);var s=null;l.length&&(s=l[0].clickable),i=this.canvasOffset(),t=this.mouseStartX-i.left,r=this.mouseStartY-i.top,this.userContextMenuHandler&&(this.userContextMenuHandler(s,t,r,l,e),this.isDragging=!1)}}setContainer(e){let t=(0,o.getElement)(e)||this.container;return this.initContainer(t),this}setBackgroundColor(e,t){(void 0===t||t<0||t>1)&&(t=1);var r=n.CC.color(e);return this.scene.fog.color=r,this.bgColor=r.getHex(),this.renderer.setClearColorHex(r.getHex(),t),this.show(),this}setProjection(e){this.camera.ortho="orthographic"===e,this.setSlabAndFog()}setViewStyle(e){if("outline"===e.style){var t={};e.color&&(t.color=n.CC.color(e.color)),e.width&&(t.width=e.width),this.renderer.enableOutline(t)}else this.renderer.disableOutline();return this}updateSize(){this.renderer.setSize(this.WIDTH,this.HEIGHT),this.ASPECT=this.renderer.getAspect(this.WIDTH,this.HEIGHT),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.camera.aspect=this.ASPECT,this.camera.updateProjectionMatrix()}setWidth(e){return this.WIDTH=e||this.WIDTH,this.updateSize(),this}setHeight(e){return this.HEIGHT=e||this.HEIGHT,this.updateSize(),this}resize(){this.WIDTH=this.getWidth(),this.HEIGHT=this.getHeight();let e=!1;if(console.log("resize "+this.container.id),console.log("lost "+this.renderer.isLost()+" w"+this.WIDTH+" h"+this.HEIGHT),this.renderer.isLost()&&this.WIDTH>0&&this.HEIGHT>0){let t=!1,r=this.container.querySelector("canvas");r&&r!=this.renderer.getCanvas()?this.config.canvas=r:(r.remove(),this.config&&null!=this.config.canvas&&(delete this.config.canvas,t=!0)),this.setupRenderer(),this.initContainer(this.container),this.renderer.setClearColorHex(this.bgColor,this.config.backgroundAlpha),e=!0,t&&(this.config.canvas=this.renderer.getCanvas()),console.log("regen "+e+" resetcanvas "+t)}if(0==this.WIDTH||0==this.HEIGHT?this.animated&&this._viewer.pauseAnimate():this.animated&&this._viewer.resumeAnimate(),this.updateSize(),e){let e=this.renderer.supportedExtensions();if(e.regen=!0,this.viewers)for(let t=0,r=this.viewers.length;t=0&&(this.modelGroup.remove(this.labels[r].sprite),(this.viewer_frame<0||this.labels[r].frame==this.viewer_frame)&&this.modelGroup.add(this.labels[r].sprite));for(r in this.surfaces)if(this.surfaces.hasOwnProperty(r)){var o=this.surfaces[r];for(s=0;s1||1==o[s].symmetries.length&&!o[s].symmetries[s].isIdentity()){var c,h=new i.Object3D;for(c=0;c0?this.animateMotion(t,r,this.modelGroup.position,this.adjustZoomToLimits(s),this.rotationGroup.quaternion,this.lookingAt):(this.rotationGroup.position.z=this.adjustZoomToLimits(s),this.show()),this}translate(e,t,r=0,i=!1){var n=e/this.WIDTH,o=t/this.HEIGHT,a=new s.Vector3(0,0,-this.CAMERA_Z);this.projector.projectVector(a,this.camera),a.x-=n,a.y-=o,this.projector.unprojectVector(a,this.camera),a.z=0;var l=this.lookingAt.clone().add(a);return r>0?this.animateMotion(r,i,this.modelGroup.position,this.rotationGroup.position.z,this.rotationGroup.quaternion,l):(this.lookingAt=l,this.camera.lookAt(this.lookingAt),this.show()),this}translateScene(e,t,r=0,i=!1){var s=this.screenOffsetToModel(e,t),n=this.modelGroup.position.clone().add(s);return r>0?this.animateMotion(r,i,this.modelGroup.position,this.rotationGroup.position.z,this.rotationGroup.quaternion,this.lookingAt):(this.modelGroup.position=n,this.show()),this}fitSlab(e){e=e||{};var t=this.getAtomsFromSel(e),r=(0,o.getExtent)(t),i=r[1][0]-r[0][0],s=r[1][1]-r[0][1],n=r[1][2]-r[0][2],a=Math.hypot(i,s,n);return a<5&&(a=5),this.slabNear=-a/1.9,this.slabFar=a/2,this}center(e={},t=0,r=!1){var i,n,a=this.getAtomsFromSel(e),l=(0,o.getExtent)(a);(0,o.isEmptyObject)(e)?(this.shapes.forEach((e=>{if(e&&e.boundingSphere&&e.boundingSphere.center){var t=e.boundingSphere.center,r=e.boundingSphere.radius;r>0?(a.push(new s.Vector3(t.x+r,t.y,t.z)),a.push(new s.Vector3(t.x-r,t.y,t.z)),a.push(new s.Vector3(t.x,t.y+r,t.z)),a.push(new s.Vector3(t.x,t.y-r,t.z)),a.push(new s.Vector3(t.x,t.y,t.z+r)),a.push(new s.Vector3(t.x,t.y,t.z-r))):a.push(t)}})),l=(0,o.getExtent)(a),i=a,n=l):(i=this.getAtomsFromSel({}),n=(0,o.getExtent)(i));var c=new s.Vector3(l[2][0],l[2][1],l[2][2]),h=n[1][0]-n[0][0],u=n[1][1]-n[0][1],d=n[1][2]-n[0][2],p=Math.hypot(h,u,d);p<5&&(p=5),this.slabNear=-p/1.9,this.slabFar=p/2,h=l[1][0]-l[0][0],u=l[1][1]-l[0][1],d=l[1][2]-l[0][2],(p=Math.hypot(h,u,d))<5&&(p=5);for(var f=25,m=0;mf&&(f=g)}p=2*Math.sqrt(f);var v=c.clone().multiplyScalar(-1);return t>0?this.animateMotion(t,r,v,this.rotationGroup.position.z,this.rotationGroup.quaternion,this.lookingAt):(this.modelGroup.position=v,this.show()),this}zoomTo(e={},t=0,r=!1){let i=this.getAtomsFromSel(e),n=(0,o.getExtent)(i),a=n;if((0,o.isEmptyObject)(e)){let e=i&&i.length;if(this.shapes.forEach((e=>{if(e&&e.boundingSphere)if(e.boundingSphere.box){let t=e.boundingSphere.box;i.push(new s.Vector3(t.min.x,t.min.y,t.min.z)),i.push(new s.Vector3(t.max.x,t.max.y,t.max.z))}else if(e.boundingSphere.center){var t=e.boundingSphere.center,r=e.boundingSphere.radius;r>0?(i.push(new s.Vector3(t.x+r,t.y,t.z)),i.push(new s.Vector3(t.x-r,t.y,t.z)),i.push(new s.Vector3(t.x,t.y+r,t.z)),i.push(new s.Vector3(t.x,t.y-r,t.z)),i.push(new s.Vector3(t.x,t.y,t.z+r)),i.push(new s.Vector3(t.x,t.y,t.z-r))):i.push(t)}})),a=(0,o.getExtent)(i),!e)for(let e=0;e<3;e++)n[2][e]=(a[0][e]+a[1][e])/2}else{let e=this.getAtomsFromSel({});a=(0,o.getExtent)(e)}var l=new s.Vector3(n[2][0],n[2][1],n[2][2]),c=a[1][0]-a[0][0],h=a[1][1]-a[0][1],u=a[1][2]-a[0][2],d=Math.hypot(c,h,u);d<5&&(d=5),this.slabNear=-d/1.9,this.slabFar=d/2,0===Object.keys(e).length&&(this.slabNear=Math.min(2*-d,-50),this.slabFar=Math.max(2*d,50));var p=this.config.minimumZoomToDistance||5;c=n[1][0]-n[0][0],h=n[1][1]-n[0][1],u=n[1][2]-n[0][2],(d=Math.hypot(c,h,u))f&&(f=g)}d=2*Math.sqrt(f);var v=l.clone().multiplyScalar(-1),b=-(.5*d/Math.tan(Math.PI/180*this.camera.fov/2)-this.CAMERA_Z);return b=this.adjustZoomToLimits(b),t>0?this.animateMotion(t,r,v,b,this.rotationGroup.quaternion,this.lookingAt):(this.modelGroup.position=v,this.rotationGroup.position.z=b,this.show()),this}setSlab(e,t){this.slabNear=e,this.slabFar=t}getSlab(){return{near:this.slabNear,far:this.slabFar}}addLabel(e,t={},r,i=!1){if(r){var s=(0,o.getExtent)(this.getAtomsFromSel(r));t.position={x:s[2][0],y:s[2][1],z:s[2][2]}}var n=new c.Label(e,t);return n.setContext(),this.modelGroup.add(n.sprite),this.labels.push(n),i||this.show(),n}addResLabels(e,t,r=!1){let i=this.labels.length;return this.applyToModels("addResLabels",e,this,t,r),this.show(),this.labels.slice(i)}addPropertyLabels(e,t,r){return this.applyToModels("addPropertyLabels",e,t,this,r),this.show(),this}removeLabel(e){for(var t=0;t0&&void 0===this.shapes[this.shapes.length-1];)this.shapes.pop();return this}removeAllShapes(){for(var e=0;e-1e-4&&n.x<1.0001&&n.y>-1e-4&&n.y<1.0001&&n.z>-1e-4&&n.z<1.0001)}}for(let n=0;nn){e.start=r,e.end=i,t.addLine(e);break}u.addVectors(r,c),e.start=r,e.end=u,t.addLine(e),r=u.clone(),d+=o,u.addVectors(r,h),r=u.clone(),d+=a}return t.finalize(),t}addCustom(e){e=e||{};var t=new h.GLShape(e);return t.shapePosition=this.shapes.length,t.addCustom(e),this.shapes.push(t),t.finalize(),t}addVolumetricData(e,t,r={}){var i=new u.VolumeData(e,t);return r.hasOwnProperty("transferfn")?this.addVolumetricRender(i,r):this.addIsosurface(i,r)}addIsosurface(e,t={},r){var i=new h.GLShape(t);return i.shapePosition=this.shapes.length,i.addIsosurface(e,t,r,this),this.shapes.push(i),i}addVolumetricRender(e,t){t=t||{};var r=new p.GLVolumetricRender(e,t,this);return r.shapePosition=this.shapes.length,this.shapes.push(r),r}hasVolumetricRender(){return this.renderer.supportsVolumetric()}enableFog(e){e?this.scene.fog=new i.Fog(this.bgColor,100,200):(this.config.disableFog=!0,this.show())}setFrame(e){this.viewer_frame=e;let t=this;return new Promise((function(r){var i=t.models.map((function(r){return r.setFrame(e,t)}));Promise.all(i).then((function(){r()}))}))}getFrame(){return this.viewer_frame}getNumFrames(){var e=0;for(let t=0;te&&(e=this.models[t].getNumFrames());for(let t=0;t=e&&(e=this.shapes[t].frame+1);for(let t=0;t=e&&(e=this.labels[t].frame+1);return e}animate(e){this.incAnim();var t=100,r="forward",i=1/0;(e=e||{}).interval&&(t=e.interval),e.loop&&(r=e.loop),e.reps&&(i=e.reps);var s=this.getNumFrames(),n=this,a=0;e.startFrame&&(a=e.startFrame%s);var l=1;e.step&&(i/=l=e.step);var c,h,u=0,d=s*i,p=new Date,f=function(e){p=new Date,"forward"==e?n.setFrame(a).then((function(){a=(a+l)%s,c()})):"backward"==e?n.setFrame(s-1-a).then((function(){a=(a+l)%s,c()})):n.setFrame(a).then((function(){l*=(a+=l)%(s-1)==0?-1:1,c()}))};return c=function(){if(n.render(),n.getCanvas().isConnected)if(++u>=d||!n.isAnimated())h.cancel(),n.animationTimers.delete(h),n.decAnim();else{var e=t-((new Date).getTime()-p.getTime());e=e>0?e:0,n.animationTimers.delete(h),h=new o.PausableTimer(f,e,r),n.animationTimers.add(h)}else n.stopAnimate()},h=new o.PausableTimer(f,0,r),this.animationTimers.add(h),this}stopAnimate(){return this.animated=0,this.animationTimers.forEach((function(e){e.cancel()})),this.animationTimers=new Set,this}pauseAnimate(){return this.animationTimers.forEach((function(e){e.pause()})),this}resumeAnimate(){return this.animationTimers.forEach((function(e){e.resume()})),this}isAnimated(){return this.animated>0}getModelOpt(e){return e&&!e.defaultcolors?(e.defaultcolors=this.defaultcolors,e.cartoonQuality=e.cartoonQuality||this.config.cartoonQuality):void 0===e&&(e={defaultcolors:this.defaultcolors,cartoonQuality:this.config.cartoonQuality}),e}addModel(e,t="",r){r=this.getModelOpt(r);var i=new l.GLModel(this.models.length,r);return i.addMolData(e,t,r),this.models.push(i),i}addModels(e,t,r){(r=this.getModelOpt(r)).multimodel=!0,r.frames=!0;for(var i=l.GLModel.parseMolData(e,t,r),s=0;s0&&void 0===this.models[this.models.length-1];)this.models.pop();return this}}removeAllModels(){for(var e=0;et[1][0]||i.yt[1][1]||i.zt[1][2]||r.push(i))}return r}static volume(e){return(e[1][0]-e[0][0])*(e[1][1]-e[0][1])*(e[1][2]-e[0][2])}carveUpExtent(e,t,r){let i=[],s={};for(let e=0,r=t.length;ei&&r>s?0:i>r&&i>s?1:2;var n=o(e),l=o(e),c=(e[1][t]-e[0][t])/2+e[0][t];n[1][t]=c,l[0][t]=c;var h=a(n),u=a(l);return h.concat(u)},l=a(e);for(let e=0,s=l.length;e0)for(let e=0,t=u.length;e1||1==x.length&&!x[0].isIdentity()){w=!0;break}}var S=function(e,r,i){var s;b=l?m.shallowCopy(f.getAtomsFromSel(l)):i;var n=(0,o.getExtent)(i,!0);if(t.map&&t.map.prop){var c=t.map.prop;let e=(0,a.getGradient)(t.map.scheme||t.map.gradient||new a.Gradient.RWB),r=e.range();r||(r=(0,o.getPropertyRange)(i,c)),t.colorscheme={prop:c,gradient:e}}for(let e=0,i=r.length;e0){var _=(0,o.getExtent)(b,!0);y.sort((function(e,t){var r=function(e,t){var r=e.extent,i=r[1][0]-r[0][0],s=r[1][1]-r[0][1],n=r[1][2]-r[0][2],o=i-t[2][0];o*=o;var a=s-t[2][1];a*=a;var l=n-t[2][2];return o+a+l*l};return r(e,_)-r(t,_)}))}var w=[];for(let e=0,t=r.length;e0&&(A.push({geo:new i.Geometry(!0),mat:p,done:!1,finished:!1,symmetries:this.models[_].getSymmetries()}),E.push(S(A[A.length-1],M[_],L[_])));C=Promise.all(E)}else A.push({geo:new i.Geometry(!0),mat:p,done:!1,finished:!1,symmetries:[new s.Matrix4]}),C=S(A[A.length-1],v,y);return this.surfaces[u]=A,C.surfid=u,c&&"function"==typeof c?(C.then((function(e){c(e)})),u):C}setSurfaceMaterialStyle(e,t){if((0,o.adjustVolumeStyle)(t),this.surfaces[e]){var r=this.surfaces[e];r.style=t;for(var s=0;s0?this.camera.position.x=r*Math.tan(Math.PI/180*t):this.camera.position.x=-r*Math.tan(Math.PI/180*t),this.camera.lookAt(new s.Vector3(0,0,this.rotationGroup.position.z)),this.camera.position.x}setDefaultCartoonQuality(e){this.config.cartoonQuality=e}}function g(e,t){if(e=(0,o.getElement)(e)){t=t||{};try{return new m(e,t)}catch(e){throw"error creating viewer: "+e}}}function v(e,t={},r={}){if(e=(0,o.getElement)(e)){var i=[],s=document.createElement("canvas");r.rows=t.rows,r.cols=t.cols,r.control_all=null!=t.control_all&&t.control_all,e.appendChild(s);try{for(var n=0;n{"use strict";r.r(t),r.d(t,{CustomLinear:()=>h,Gradient:()=>d,GradientType:()=>s,ROYGB:()=>l,RWB:()=>a,Sinebow:()=>c,builtinGradients:()=>u,getGradient:()=>o,normalizeValue:()=>n});var i=r("./src/colors.ts");class s{}function n(e,t,r){return t>=e?(rt&&(r=t),{lo:e,hi:t,val:r}):(r>e&&(r=e),r=2?(this.max=e[1],this.min=e[0]):e&&t&&!Array.isArray(e)&&(this.min=e,this.max=t)}range(){return void 0!==this.min&&void 0!==this.max?[this.min,this.max]:null}valueToHex(e,t){var r,i;if(e=this.mult*e,t?(r=t[0],i=t[1]):(r=this.min,i=this.max),void 0===e)return 16777215;var s=n(r,i,e);r=s.lo;var o,a=i=s.hi;return(e=s.val)<(a=t&&void 0!==t[2]?t[2]:void 0!==this.mid?this.mid:(r+i)/2)?16711680+256*(o=Math.floor(255*Math.sqrt((e-r)/(a-r))))+o:e>a?65536*(o=Math.floor(255*Math.sqrt(1-(e-a)/(i-a))))+256*o+255:16777215}}class l extends s{constructor(e,t){super(),this.gradient="ROYGB",this.mult=1,this.min=e,this.max=t,void 0===t&&Array.isArray(e)&&e.length>=2?(this.max=e[1],this.min=e[0]):e&&t&&!Array.isArray(e)&&(this.min=e,this.max=t)}valueToHex(e,t){var r,i;if(e=this.mult*e,t?(r=t[0],i=t[1]):(r=this.min,i=this.max),void 0===e)return 16777215;var s=n(r,i,e),o=((r=s.lo)+(i=s.hi))/2,a=(r+o)/2,l=(o+i)/2;return(e=s.val)=2&&(this.max=e[1],this.min=e[0]),t=2?(this.max=e[1],this.min=e[0],s=t):(this.min=e,this.max=t,s=r),s)for(let e of s)this.colors.push(i.CC.color(e));else this.colors.push(i.CC.color(0))}range(){return void 0!==this.min&&void 0!==this.max?[this.min,this.max]:null}valueToHex(e,t){var r,s;if(t?(r=t[0],s=t[1]):(r=this.min,s=this.max),void 0===e)return 16777215;var o=n(r,s,e);r=o.lo,s=o.hi,e=o.val;let a=this.colors.length,l=(s-r)/a,c=Math.min(Math.floor((e-r)/l),a-1),h=Math.min(c+1,a-1),u=(e-r-c*l)/l,d=this.colors[c],p=this.colors[h];return new i.Color(d.r+u*(p.r-d.r),d.g+u*(p.g-d.g),d.b+u*(p.b-d.b)).getHex()}}const u={rwb:a,RWB:a,roygb:l,ROYGB:l,sinebow:c,linear:h};class d extends s{valueToHex(e,t){return 0}range(){return null}}d.RWB=a,d.ROYGB=l,d.Sinebow=c,d.CustomLinear=h,d.builtinGradients=u,d.normalizeValue=n,d.getGradient=o},"./src/Label.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Label:()=>l,LabelCount:()=>o});var i=r("./src/WebGL/index.ts"),s=r("./src/Gradient.ts"),n=r("./src/colors.ts");let o=0;function a(e,t,r){var i=r;return void 0!==e&&(e instanceof n.Color?i=e.scaled():void 0!==(i=n.CC.color(e)).scaled&&(i=i.scaled())),void 0!==t&&(i.a=parseFloat(t)),i}class l{constructor(e,t){this.id=o++,this.stylespec=t||{},this.canvas=document.createElement("canvas"),this.canvas.width=134,this.canvas.height=35,this.context=this.canvas.getContext("2d"),this.sprite=new i.Sprite,this.text=e,this.frame=this.stylespec.frame}getStyle(){return this.stylespec}setContext(){var e=this.stylespec,t=void 0!==e.useScreen&&e.useScreen,r=e.showBackground;"0"!==r&&"false"!==r||(r=!1),void 0===r&&(r=!0);var n=e.font?e.font:"sans-serif",o=parseInt(e.fontSize)?parseInt(e.fontSize):18,l=a(e.fontColor,e.fontOpacity,{r:255,g:255,b:255,a:1}),c=e.padding?e.padding:4,h=e.borderThickness?e.borderThickness:0,u=a(e.backgroundColor,e.backgroundOpacity,{r:0,g:0,b:0,a:1}),d=a(e.borderColor,e.borderOpacity,u),p=e.position?e.position:{x:-10,y:1,z:1},f=void 0===e.inFront||e.inFront;"false"!==f&&"0"!==f||(f=!1);var m=e.alignment||i.SpriteAlignment.topLeft;"string"==typeof m&&m in i.SpriteAlignment&&(m=i.SpriteAlignment[m]);var g="";e.bold&&(g="bold "),this.context.font=g+o+"px "+n;var v=this.context.measureText(this.text).width;r||(h=0);var b=v+2.5*h+2*c,y=1.25*o+2*h+2*c;if(e.backgroundImage){var _=e.backgroundImage,w=e.backgroundWidth?e.backgroundWidth:_.width,x=e.backgroundHeight?e.backgroundHeight:_.height;w>b&&(b=w),x>y&&(y=x)}if(this.canvas.width=b,this.canvas.height=y,this.context.clearRect(0,0,this.canvas.width,this.canvas.height),g="",e.bold&&(g="bold "),this.context.font=g+o+"px "+n,this.context.fillStyle="rgba("+u.r+","+u.g+","+u.b+","+u.a+")",this.context.strokeStyle="rgba("+d.r+","+d.g+","+d.b+","+d.a+")",e.backgroundGradient){let t=this.context.createLinearGradient(0,y/2,b,y/2),r=s.Gradient.getGradient(e.backgroundGradient),i=r.range(),n=-1,o=1;i&&(n=i[0],o=i[1]);let l=o-n;for(let e=0;e<1.01;e+=.1){let i=a(r.valueToHex(n+l*e)),s="rgba("+i.r+","+i.g+","+i.b+","+i.a+")";t.addColorStop(e,s)}this.context.fillStyle=t}this.context.lineWidth=h,r&&function(e,t,r,i,s,n,o){e.beginPath(),e.moveTo(t+6,r),e.lineTo(t+i-6,r),e.quadraticCurveTo(t+i,r,t+i,r+6),e.lineTo(t+i,r+s-6),e.quadraticCurveTo(t+i,r+s,t+i-6,r+s),e.lineTo(t+6,r+s),e.quadraticCurveTo(t,r+s,t,r+s-6),e.lineTo(t,r+6),e.quadraticCurveTo(t,r,t+6,r),e.closePath(),e.fill(),o&&e.stroke()}(this.context,h,h,b-2*h,y-2*h,0,h>0),e.backgroundImage&&this.context.drawImage(_,0,0,b,y),this.context.fillStyle="rgba("+l.r+","+l.g+","+l.b+","+l.a+")",this.context.fillText(this.text,h+c,o+h+c,v);var S=new i.Texture(this.canvas);S.needsUpdate=!0,this.sprite.material=new i.SpriteMaterial({map:S,useScreenCoordinates:t,alignment:m,depthTest:!f,screenOffset:e.screenOffset||null}),this.sprite.scale.set(1,1,1),this.sprite.position.set(p.x,p.y,p.z)}dispose(){void 0!==this.sprite.material.map&&this.sprite.material.map.dispose(),void 0!==this.sprite.material&&this.sprite.material.dispose()}}},"./src/ProteinSurface4.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{MarchingCube:()=>l,MarchingCubeInitializer:()=>a,PointGrid:()=>c,ProteinSurface:()=>h,SurfaceType:()=>i,setSyncSurface:()=>o,syncSurface:()=>n});var i,s=r("./src/WebGL/math/index.ts");!function(e){e[e.VDW=1]="VDW",e[e.MS=2]="MS",e[e.SAS=3]="SAS",e[e.SES=4]="SES"}(i||(i={}));var n=!1;function o(e){n=e}(window.navigator.userAgent.indexOf("MSIE ")>=0||window.navigator.userAgent.indexOf("Trident/")>=0)&&(n=!0);class a{constructor(){this.ISDONE=2,this.edgeTable=new Uint32Array([0,0,0,0,0,0,0,2816,0,0,0,1792,0,3328,3584,3840,0,0,0,138,0,21,0,134,0,0,0,652,0,2067,3865,3600,0,0,0,42,0,0,0,294,0,0,21,28,0,3875,1049,3360,0,168,162,170,0,645,2475,2210,0,687,293,172,4010,3747,3497,3232,0,0,0,0,0,69,0,900,0,0,0,1792,138,131,1608,1920,0,81,0,2074,84,85,84,86,0,81,0,3676,330,1105,1881,1616,0,0,0,42,0,69,0,502,0,0,21,3580,138,2035,1273,1520,2816,104,2337,106,840,581,367,102,2816,3695,3429,3180,1898,1635,1385,1120,0,0,0,0,0,0,0,3910,0,0,69,588,42,2083,41,2880,0,0,0,1722,0,2293,4095,3830,0,255,757,764,2538,2291,3065,2800,0,0,81,338,0,3925,1119,3414,84,855,85,340,2130,2899,89,2384,1792,712,194,1162,4036,3781,3535,3270,708,719,197,204,3018,2755,2505,2240,0,0,0,0,168,420,168,1958,162,162,676,2988,170,163,680,928,3328,3096,3328,3642,52,53,1855,1590,2340,2111,2869,2620,298,51,825,560,3584,3584,3090,3482,1668,1941,1183,1430,146,2975,2069,2460,154,915,153,400,3840,3592,3329,3082,1796,1541,1295,1030,2818,2575,2309,2060,778,515,265,0]),this.triTable=[[],[],[],[],[],[],[],[11,9,8],[],[],[],[8,10,9],[],[10,8,11],[9,11,10],[8,10,9,8,11,10],[],[],[],[1,7,3],[],[4,2,0],[],[2,1,7],[],[],[],[2,7,3,2,9,7],[],[1,4,11,1,0,4],[3,8,0,11,9,4,11,10,9],[4,11,9,11,10,9],[],[],[],[5,3,1],[],[],[],[2,5,8,2,1,5],[],[],[2,4,0],[3,2,4],[],[0,9,1,8,10,5,8,11,10],[3,4,0,3,10,4],[5,8,10,8,11,10],[],[3,5,7],[7,1,5],[1,7,3,1,5,7],[],[9,2,0,9,7,2],[0,3,8,1,7,11,1,5,7],[11,1,7,1,5,7],[],[9,1,0,5,3,2,5,7,3],[8,2,5,8,0,2],[2,5,3,5,7,3],[3,9,1,3,8,9,7,11,10,7,10,5],[9,1,0,10,7,11,10,5,7],[3,8,0,7,10,5,7,11,10],[11,5,7,11,10,5],[],[],[],[],[],[0,6,2],[],[7,2,9,7,9,8],[],[],[],[8,10,9],[7,1,3],[7,1,0],[6,9,3,6,10,9],[7,10,8,10,9,8],[],[6,0,4],[],[11,1,4,11,3,1],[2,4,6],[2,0,4,2,4,6],[2,4,6],[1,4,2,4,6,2],[],[6,0,4],[],[2,11,3,6,9,4,6,10,9],[8,6,1,8,1,3],[10,0,6,0,4,6],[8,0,3,9,6,10,9,4,6],[10,4,6,10,9,4],[],[],[],[5,3,1],[],[0,6,2],[],[7,4,8,5,2,1,5,6,2],[],[],[2,4,0],[7,4,8,2,11,3,10,5,6],[7,1,3],[5,6,10,0,9,1,8,7,4],[5,6,10,7,0,3,7,4,0],[10,5,6,4,8,7],[9,11,8],[3,5,6],[0,5,11,0,11,8],[6,3,5,3,1,5],[3,9,6,3,8,9],[9,6,0,6,2,0],[0,3,8,2,5,6,2,1,5],[1,6,2,1,5,6],[9,11,8],[1,0,9,6,10,5,11,3,2],[6,10,5,2,8,0,2,11,8],[3,2,11,10,5,6],[10,5,6,9,3,8,9,1,3],[0,9,1,5,6,10],[8,0,3,10,5,6],[10,5,6],[],[],[],[],[],[],[],[1,10,2,9,11,6,9,8,11],[],[],[6,0,2],[3,6,9,3,2,6],[3,5,1],[0,5,1,0,11,5],[0,3,5],[6,9,11,9,8,11],[],[],[],[4,5,9,7,1,10,7,3,1],[],[11,6,7,2,4,5,2,0,4],[11,6,7,8,0,3,1,10,2,9,4,5],[6,7,11,1,10,2,9,4,5],[],[4,1,0,4,5,1,6,7,3,6,3,2],[9,4,5,0,6,7,0,2,6],[4,5,9,6,3,2,6,7,3],[6,7,11,5,3,8,5,1,3],[6,7,11,4,1,0,4,5,1],[4,5,9,3,8,0,11,6,7],[9,4,5,7,11,6],[],[],[0,6,4],[8,6,4,8,1,6],[],[0,10,2,0,9,10,4,8,11,4,11,6],[10,2,1,6,0,3,6,4,0],[10,2,1,11,4,8,11,6,4],[4,2,6],[1,0,9,2,4,8,2,6,4],[2,4,0,2,6,4],[8,2,4,2,6,4],[11,4,1,11,6,4],[0,9,1,4,11,6,4,8,11],[3,6,0,6,4,0],[8,6,4,8,11,6],[10,8,9],[6,3,9,6,7,3],[6,7,1],[10,7,1,7,3,1],[7,11,6,8,10,2,8,9,10],[11,6,7,10,0,9,10,2,0],[2,1,10,7,11,6,8,0,3],[1,10,2,6,7,11],[7,2,6,7,9,2],[1,0,9,3,6,7,3,2,6],[7,0,6,0,2,6],[2,7,3,2,6,7],[7,11,6,3,9,1,3,8,9],[9,1,0,11,6,7],[0,3,8,11,6,7],[11,6,7],[],[],[],[],[5,3,7],[8,5,2,8,7,5],[5,3,7],[1,10,2,5,8,7,5,9,8],[1,7,5],[1,7,5],[9,2,7,9,7,5],[11,3,2,8,5,9,8,7,5],[1,3,7,1,7,5],[0,7,1,7,5,1],[9,3,5,3,7,5],[9,7,5,9,8,7],[8,10,11],[3,4,10,3,10,11],[8,10,11],[5,9,4,1,11,3,1,10,11],[2,4,5],[5,2,4,2,0,4],[0,3,8,5,9,4,10,2,1],[2,1,10,9,4,5],[2,8,5,2,11,8],[3,2,11,1,4,5,1,0,4],[9,4,5,8,2,11,8,0,2],[11,3,2,9,4,5],[8,5,3,5,1,3],[5,0,4,5,1,0],[3,8,0,4,5,9],[9,4,5],[11,9,10],[11,9,10],[1,11,4,1,10,11],[8,7,4,11,1,10,11,3,1],[2,7,9,2,9,10],[4,8,7,0,10,2,0,9,10],[2,1,10,0,7,4,0,3,7],[10,2,1,8,7,4],[1,7,4],[3,2,11,4,8,7,9,1,0],[11,4,2,4,0,2],[2,11,3,7,4,8],[4,1,7,1,3,7],[1,0,9,8,7,4],[3,4,0,3,7,4],[8,7,4],[8,9,10,8,10,11],[3,9,11,9,10,11],[0,10,8,10,11,8],[10,3,1,10,11,3],[2,8,10,8,9,10],[9,2,0,9,10,2],[8,0,3,1,10,2],[10,2,1],[1,11,9,11,8,9],[11,3,2,0,9,1],[11,0,2,11,8,0],[11,3,2],[8,1,3,8,9,1],[9,1,0],[8,0,3],[]],this.edgeTable2=[0,265,515,778,2060,2309,2575,2822,1030,1295,1541,1804,3082,3331,3593,3840,400,153,915,666,2460,2197,2975,2710,1430,1183,1941,1692,3482,3219,3993,3728,560,825,51,314,2620,2869,2111,2358,1590,1855,1077,1340,3642,3891,3129,3376,928,681,419,170,2988,2725,2479,2214,1958,1711,1445,1196,4010,3747,3497,3232,2240,2505,2755,3018,204,453,719,966,3270,3535,3781,4044,1226,1475,1737,1984,2384,2137,2899,2650,348,85,863,598,3414,3167,3925,3676,1370,1107,1881,1616,2800,3065,2291,2554,764,1013,255,502,3830,4095,3317,3580,1786,2035,1273,1520,2912,2665,2403,2154,876,613,367,102,3942,3695,3429,3180,1898,1635,1385,1120,1120,1385,1635,1898,3180,3429,3695,3942,102,367,613,876,2154,2403,2665,2912,1520,1273,2035,1786,3580,3317,4095,3830,502,255,1013,764,2554,2291,3065,2800,1616,1881,1107,1370,3676,3925,3167,3414,598,863,85,348,2650,2899,2137,2384,1984,1737,1475,1226,4044,3781,3535,3270,966,719,453,204,3018,2755,2505,2240,3232,3497,3747,4010,1196,1445,1711,1958,2214,2479,2725,2988,170,419,681,928,3376,3129,3891,3642,1340,1077,1855,1590,2358,2111,2869,2620,314,51,825,560,3728,3993,3219,3482,1692,1941,1183,1430,2710,2975,2197,2460,666,915,153,400,3840,3593,3331,3082,1804,1541,1295,1030,2822,2575,2309,2060,778,515,265,0],this.triTable2=[[],[8,3,0],[9,0,1],[8,3,1,8,1,9],[11,2,3],[11,2,0,11,0,8],[11,2,3,0,1,9],[2,1,11,1,9,11,11,9,8],[10,1,2],[8,3,0,1,2,10],[9,0,2,9,2,10],[3,2,8,2,10,8,8,10,9],[10,1,3,10,3,11],[1,0,10,0,8,10,10,8,11],[0,3,9,3,11,9,9,11,10],[8,10,9,8,11,10],[8,4,7],[3,0,4,3,4,7],[1,9,0,8,4,7],[9,4,1,4,7,1,1,7,3],[2,3,11,7,8,4],[7,11,4,11,2,4,4,2,0],[3,11,2,4,7,8,9,0,1],[2,7,11,2,1,7,1,4,7,1,9,4],[10,1,2,8,4,7],[2,10,1,0,4,7,0,7,3],[4,7,8,0,2,10,0,10,9],[2,7,3,2,9,7,7,9,4,2,10,9],[8,4,7,11,10,1,11,1,3],[11,4,7,1,4,11,1,11,10,1,0,4],[3,8,0,7,11,4,11,9,4,11,10,9],[7,11,4,4,11,9,11,10,9],[9,5,4],[3,0,8,4,9,5],[5,4,0,5,0,1],[4,8,5,8,3,5,5,3,1],[11,2,3,9,5,4],[9,5,4,8,11,2,8,2,0],[3,11,2,1,5,4,1,4,0],[8,5,4,2,5,8,2,8,11,2,1,5],[2,10,1,9,5,4],[0,8,3,5,4,9,10,1,2],[10,5,2,5,4,2,2,4,0],[3,4,8,3,2,4,2,5,4,2,10,5],[5,4,9,1,3,11,1,11,10],[0,9,1,4,8,5,8,10,5,8,11,10],[3,4,0,3,10,4,4,10,5,3,11,10],[4,8,5,5,8,10,8,11,10],[9,5,7,9,7,8],[0,9,3,9,5,3,3,5,7],[8,0,7,0,1,7,7,1,5],[1,7,3,1,5,7],[11,2,3,8,9,5,8,5,7],[9,2,0,9,7,2,2,7,11,9,5,7],[0,3,8,2,1,11,1,7,11,1,5,7],[2,1,11,11,1,7,1,5,7],[1,2,10,5,7,8,5,8,9],[9,1,0,10,5,2,5,3,2,5,7,3],[5,2,10,8,2,5,8,5,7,8,0,2],[10,5,2,2,5,3,5,7,3],[3,9,1,3,8,9,7,11,10,7,10,5],[9,1,0,10,7,11,10,5,7],[3,8,0,7,10,5,7,11,10],[11,5,7,11,10,5],[11,7,6],[0,8,3,11,7,6],[9,0,1,11,7,6],[7,6,11,3,1,9,3,9,8],[2,3,7,2,7,6],[8,7,0,7,6,0,0,6,2],[1,9,0,3,7,6,3,6,2],[7,6,2,7,2,9,2,1,9,7,9,8],[1,2,10,6,11,7],[2,10,1,7,6,11,8,3,0],[11,7,6,10,9,0,10,0,2],[7,6,11,3,2,8,8,2,10,8,10,9],[6,10,7,10,1,7,7,1,3],[6,10,1,6,1,7,7,1,0,7,0,8],[9,0,3,6,9,3,6,10,9,6,3,7],[6,10,7,7,10,8,10,9,8],[8,4,6,8,6,11],[11,3,6,3,0,6,6,0,4],[0,1,9,4,6,11,4,11,8],[1,9,4,11,1,4,11,3,1,11,4,6],[3,8,2,8,4,2,2,4,6],[2,0,4,2,4,6],[1,9,0,3,8,2,2,8,4,2,4,6],[9,4,1,1,4,2,4,6,2],[10,1,2,11,8,4,11,4,6],[10,1,2,11,3,6,6,3,0,6,0,4],[0,2,10,0,10,9,4,11,8,4,6,11],[2,11,3,6,9,4,6,10,9],[8,4,6,8,6,1,6,10,1,8,1,3],[1,0,10,10,0,6,0,4,6],[8,0,3,9,6,10,9,4,6],[10,4,6,10,9,4],[9,5,4,7,6,11],[4,9,5,3,0,8,11,7,6],[6,11,7,4,0,1,4,1,5],[6,11,7,4,8,5,5,8,3,5,3,1],[4,9,5,6,2,3,6,3,7],[9,5,4,8,7,0,0,7,6,0,6,2],[4,0,1,4,1,5,6,3,7,6,2,3],[7,4,8,5,2,1,5,6,2],[6,11,7,1,2,10,9,5,4],[11,7,6,8,3,0,1,2,10,9,5,4],[11,7,6,10,5,2,2,5,4,2,4,0],[7,4,8,2,11,3,10,5,6],[4,9,5,6,10,7,7,10,1,7,1,3],[5,6,10,0,9,1,8,7,4],[5,6,10,7,0,3,7,4,0],[10,5,6,4,8,7],[5,6,9,6,11,9,9,11,8],[0,9,5,0,5,3,3,5,6,3,6,11],[0,1,5,0,5,11,5,6,11,0,11,8],[11,3,6,6,3,5,3,1,5],[9,5,6,3,9,6,3,8,9,3,6,2],[5,6,9,9,6,0,6,2,0],[0,3,8,2,5,6,2,1,5],[1,6,2,1,5,6],[1,2,10,5,6,9,9,6,11,9,11,8],[1,0,9,6,10,5,11,3,2],[6,10,5,2,8,0,2,11,8],[3,2,11,10,5,6],[10,5,6,9,3,8,9,1,3],[0,9,1,5,6,10],[8,0,3,10,5,6],[10,5,6],[10,6,5],[8,3,0,10,6,5],[0,1,9,5,10,6],[10,6,5,9,8,3,9,3,1],[3,11,2,10,6,5],[6,5,10,2,0,8,2,8,11],[1,9,0,6,5,10,11,2,3],[1,10,2,5,9,6,9,11,6,9,8,11],[1,2,6,1,6,5],[0,8,3,2,6,5,2,5,1],[5,9,6,9,0,6,6,0,2],[9,6,5,3,6,9,3,9,8,3,2,6],[11,6,3,6,5,3,3,5,1],[0,5,1,0,11,5,5,11,6,0,8,11],[0,5,9,0,3,5,3,6,5,3,11,6],[5,9,6,6,9,11,9,8,11],[10,6,5,4,7,8],[5,10,6,7,3,0,7,0,4],[5,10,6,0,1,9,8,4,7],[4,5,9,6,7,10,7,1,10,7,3,1],[7,8,4,2,3,11,10,6,5],[11,6,7,10,2,5,2,4,5,2,0,4],[11,6,7,8,0,3,1,10,2,9,4,5],[6,7,11,1,10,2,9,4,5],[7,8,4,5,1,2,5,2,6],[4,1,0,4,5,1,6,7,3,6,3,2],[9,4,5,8,0,7,0,6,7,0,2,6],[4,5,9,6,3,2,6,7,3],[6,7,11,4,5,8,5,3,8,5,1,3],[6,7,11,4,1,0,4,5,1],[4,5,9,3,8,0,11,6,7],[9,4,5,7,11,6],[10,6,4,10,4,9],[8,3,0,9,10,6,9,6,4],[1,10,0,10,6,0,0,6,4],[8,6,4,8,1,6,6,1,10,8,3,1],[2,3,11,6,4,9,6,9,10],[0,10,2,0,9,10,4,8,11,4,11,6],[10,2,1,11,6,3,6,0,3,6,4,0],[10,2,1,11,4,8,11,6,4],[9,1,4,1,2,4,4,2,6],[1,0,9,3,2,8,2,4,8,2,6,4],[2,4,0,2,6,4],[3,2,8,8,2,4,2,6,4],[1,4,9,11,4,1,11,1,3,11,6,4],[0,9,1,4,11,6,4,8,11],[11,6,3,3,6,0,6,4,0],[8,6,4,8,11,6],[6,7,10,7,8,10,10,8,9],[9,3,0,6,3,9,6,9,10,6,7,3],[6,1,10,6,7,1,7,0,1,7,8,0],[6,7,10,10,7,1,7,3,1],[7,11,6,3,8,2,8,10,2,8,9,10],[11,6,7,10,0,9,10,2,0],[2,1,10,7,11,6,8,0,3],[1,10,2,6,7,11],[7,2,6,7,9,2,2,9,1,7,8,9],[1,0,9,3,6,7,3,2,6],[8,0,7,7,0,6,0,2,6],[2,7,3,2,6,7],[7,11,6,3,9,1,3,8,9],[9,1,0,11,6,7],[0,3,8,11,6,7],[11,6,7],[11,7,5,11,5,10],[3,0,8,7,5,10,7,10,11],[9,0,1,10,11,7,10,7,5],[3,1,9,3,9,8,7,10,11,7,5,10],[10,2,5,2,3,5,5,3,7],[5,10,2,8,5,2,8,7,5,8,2,0],[9,0,1,10,2,5,5,2,3,5,3,7],[1,10,2,5,8,7,5,9,8],[2,11,1,11,7,1,1,7,5],[0,8,3,2,11,1,1,11,7,1,7,5],[9,0,2,9,2,7,2,11,7,9,7,5],[11,3,2,8,5,9,8,7,5],[1,3,7,1,7,5],[8,7,0,0,7,1,7,5,1],[0,3,9,9,3,5,3,7,5],[9,7,5,9,8,7],[4,5,8,5,10,8,8,10,11],[3,0,4,3,4,10,4,5,10,3,10,11],[0,1,9,4,5,8,8,5,10,8,10,11],[5,9,4,1,11,3,1,10,11],[3,8,4,3,4,2,2,4,5,2,5,10],[10,2,5,5,2,4,2,0,4],[0,3,8,5,9,4,10,2,1],[2,1,10,9,4,5],[8,4,5,2,8,5,2,11,8,2,5,1],[3,2,11,1,4,5,1,0,4],[9,4,5,8,2,11,8,0,2],[11,3,2,9,4,5],[4,5,8,8,5,3,5,1,3],[5,0,4,5,1,0],[3,8,0,4,5,9],[9,4,5],[7,4,11,4,9,11,11,9,10],[3,0,8,7,4,11,11,4,9,11,9,10],[11,7,4,1,11,4,1,10,11,1,4,0],[8,7,4,11,1,10,11,3,1],[2,3,7,2,7,9,7,4,9,2,9,10],[4,8,7,0,10,2,0,9,10],[2,1,10,0,7,4,0,3,7],[10,2,1,8,7,4],[2,11,7,2,7,1,1,7,4,1,4,9],[3,2,11,4,8,7,9,1,0],[7,4,11,11,4,2,4,0,2],[2,11,3,7,4,8],[9,1,4,4,1,7,1,3,7],[1,0,9,8,7,4],[3,4,0,3,7,4],[8,7,4],[8,9,10,8,10,11],[0,9,3,3,9,11,9,10,11],[1,10,0,0,10,8,10,11,8],[10,3,1,10,11,3],[3,8,2,2,8,10,8,9,10],[9,2,0,9,10,2],[8,0,3,1,10,2],[10,2,1],[2,11,1,1,11,9,11,8,9],[11,3,2,0,9,1],[11,0,2,11,8,0],[11,3,2],[8,1,3,8,9,1],[9,1,0],[8,0,3],[]]}march(e,t,r,i){let n=!!i.fulltable,o=i.hasOwnProperty("origin")&&i.origin.hasOwnProperty("x")?i.origin:{x:0,y:0,z:0},a=!!i.voxel,l=i.matrix,c=i.nX||0,h=i.nY||0,u=i.nZ||0,d=i.scale||1,p=null;p=i.unitCube?i.unitCube:{x:d,y:d,z:d};let f,m,g=new Int32Array(c*h*u);for(f=0,m=g.length;f>2))+i+((2&t)>>1))*u+s+(1&t)]&this.ISDONE)<=3&&(t.push(t[i]),i=t.length-1,t.push(t[s]),s=t.length-1,t.push(t[n]),n=t.length-1),r.push(i),r.push(s),r.push(n)}}}laplacianSmooth(e,t,r){let i,s,n,o,a,l=new Array(t.length);for(i=0,s=t.length;i1e6&&(this.scaleFactor=this.defaultScaleFactor/2);let i=1/this.scaleFactor*5.5;this.pminx=e[0][0],this.pmaxx=e[1][0],this.pminy=e[0][1],this.pmaxy=e[1][1],this.pminz=e[0][2],this.pmaxz=e[1][2],t?(this.pminx-=this.probeRadius+i,this.pminy-=this.probeRadius+i,this.pminz-=this.probeRadius+i,this.pmaxx+=this.probeRadius+i,this.pmaxy+=this.probeRadius+i,this.pmaxz+=this.probeRadius+i):(this.pminx-=i,this.pminy-=i,this.pminz-=i,this.pmaxx+=i,this.pmaxy+=i,this.pmaxz+=i),this.pminx=Math.floor(this.pminx*this.scaleFactor)/this.scaleFactor,this.pminy=Math.floor(this.pminy*this.scaleFactor)/this.scaleFactor,this.pminz=Math.floor(this.pminz*this.scaleFactor)/this.scaleFactor,this.pmaxx=Math.ceil(this.pmaxx*this.scaleFactor)/this.scaleFactor,this.pmaxy=Math.ceil(this.pmaxy*this.scaleFactor)/this.scaleFactor,this.pmaxz=Math.ceil(this.pmaxz*this.scaleFactor)/this.scaleFactor,this.ptranx=-this.pminx,this.ptrany=-this.pminy,this.ptranz=-this.pminz,this.pLength=Math.ceil(this.scaleFactor*(this.pmaxx-this.pminx))+1,this.pWidth=Math.ceil(this.scaleFactor*(this.pmaxy-this.pminy))+1,this.pHeight=Math.ceil(this.scaleFactor*(this.pmaxz-this.pminz))+1,this.boundingatom(t),this.cutRadius=this.probeRadius*this.scaleFactor,this.vpBits=new Uint8Array(this.pLength*this.pWidth*this.pHeight),this.vpDistance=new Float64Array(this.pLength*this.pWidth*this.pHeight),this.vpAtomID=new Int32Array(this.pLength*this.pWidth*this.pHeight)}boundingatom(e){let t={};for(const r in this.vdwRadii){let i=this.vdwRadii[r];t[r]=e?(i+this.probeRadius)*this.scaleFactor+.5:i*this.scaleFactor+.5;let s=t[r]*t[r];this.widxz[r]=Math.floor(t[r])+1,this.depty[r]=new Int32Array(this.widxz[r]*this.widxz[r]);let n=0;for(let e=0;es)this.depty[r][n]=-1;else{let e=Math.sqrt(s-i);this.depty[r][n]=Math.floor(e)}n++}}}fillvoxels(e,t){for(let e=0,t=this.vpBits.length;e=this.pLength||c>=this.pWidth||h>=this.pHeight)continue;let d=o*a+c*this.pHeight+h;if(this.vpBits[d]&this.INOUT){let o=t[this.vpAtomID[d]];if(o.serial!=e.serial){let t=r+p-Math.floor(.5+this.scaleFactor*(o.x+this.ptranx)),a=i+n-Math.floor(.5+this.scaleFactor*(o.y+this.ptrany)),l=s+f-Math.floor(.5+this.scaleFactor*(o.z+this.ptranz));p*p+n*n+f*f=this.pLength||c>=this.pWidth||h>=this.pHeight)continue;let d=o*a+c*this.pHeight+h;if(this.vpBits[d]&this.ISDONE){let o=t[this.vpAtomID[d]];if(o.serial!=e.serial){let t=i+p-Math.floor(.5+this.scaleFactor*(o.x+this.ptranx)),a=s+r-Math.floor(.5+this.scaleFactor*(o.y+this.ptrany)),l=n+f-Math.floor(.5+this.scaleFactor*(o.z+this.ptranz));p*p+r*r+f*f-1&&o-1&&l-1&&a=a)||(this.vpBits[e]|=this.ISBOUND))}fastoneshell(e,t){let r,i,s,n,o,a,l,c,h,u=[];if(0===e.length)return u;let d={ix:-1,iy:-1,iz:-1},p=this.pWidth*this.pHeight;for(let f=0,m=e.length;f-1&&d.iy-1&&d.iz-1&&(h=d.ix*p+this.pHeight*d.iy+d.iz,this.vpBits[h]&this.INOUT&&!(this.vpBits[h]&this.ISDONE)?(t.set(d.ix,d.iy,s+this.nb[e][2],c),n=d.ix-c.ix,o=d.iy-c.iy,a=d.iz-c.iz,l=n*n+o*o+a*a,this.vpDistance[h]=l,this.vpBits[h]|=this.ISDONE,this.vpBits[h]|=this.ISBOUND,u.push({ix:d.ix,iy:d.iy,iz:d.iz})):this.vpBits[h]&this.INOUT&&this.vpBits[h]&this.ISDONE&&(n=d.ix-c.ix,o=d.iy-c.iy,a=d.iz-c.iz,l=n*n+o*o+a*a,l-1&&d.iy-1&&d.iz-1&&(h=d.ix*p+this.pHeight*d.iy+d.iz,this.vpBits[h]&this.INOUT&&!(this.vpBits[h]&this.ISDONE)?(t.set(d.ix,d.iy,s+this.nb[e][2],c),n=d.ix-c.ix,o=d.iy-c.iy,a=d.iz-c.iz,l=n*n+o*o+a*a,this.vpDistance[h]=l,this.vpBits[h]|=this.ISDONE,this.vpBits[h]|=this.ISBOUND,u.push({ix:d.ix,iy:d.iy,iz:d.iz})):this.vpBits[h]&this.INOUT&&this.vpBits[h]&this.ISDONE&&(n=d.ix-c.ix,o=d.iy-c.iy,a=d.iz-c.iz,l=n*n+o*o+a*a,l-1&&d.iy-1&&d.iz-1&&(h=d.ix*p+this.pHeight*d.iy+d.iz,this.vpBits[h]&this.INOUT&&!(this.vpBits[h]&this.ISDONE)?(t.set(d.ix,d.iy,s+this.nb[e][2],c),n=d.ix-c.ix,o=d.iy-c.iy,a=d.iz-c.iz,l=n*n+o*o+a*a,this.vpDistance[h]=l,this.vpBits[h]|=this.ISDONE,this.vpBits[h]|=this.ISBOUND,u.push({ix:d.ix,iy:d.iy,iz:d.iz})):this.vpBits[h]&this.INOUT&&this.vpBits[h]&this.ISDONE&&(n=d.ix-c.ix,o=d.iy-c.iy,a=d.iz-c.iz,l=n*n+o*o+a*a,l{"use strict";r.r(t),r.d(t,{VolumeData:()=>l});var i=r("./src/utilities.ts"),s=r("./src/WebGL/math/index.ts"),n=r("./src/parsers/VASP.ts"),o=r("./src/parsers/CUBE.ts"),a=r("./node_modules/pako/dist/pako.esm.mjs");class l{constructor(e,t,r){if(this.unit={x:1,y:1,z:1},this.origin={x:0,y:0,z:0},this.size={x:0,y:0,z:0},this.data=new Float32Array([]),this.matrix=null,this.inversematrix=null,this.isbinary=new Set(["ccp4","CCP4"]),this.getCoordinates=function(e){var t=e/(this.size.y*this.size.z),r=e%(this.size.y*this.size.z),i=e%this.size.z;return t*=this.unit.x,r*=this.unit.y,i*=this.unit.z,{x:t+=this.origin.x,y:r+=this.origin.y,z:i+=this.origin.z}},this.vasp=function(e){var t=e.replace(/^\s+/,"").split(/[\n\r]/),r=(0,n.VASP)(e)[0].length;if(0==r)return console.log("No good formating of CHG or CHGCAR file, not atomic information provided in the file."),void(this.data=[]);var i,o=1.889725992,a=parseFloat(t[1]);i=t[2].replace(/^\s+/,"").split(/\s+/);var l=new s.Vector3(parseFloat(i[0]),parseFloat(i[1]),parseFloat(i[2])).multiplyScalar(a*o);i=t[3].replace(/^\s+/,"").split(/\s+/);var c=new s.Vector3(parseFloat(i[0]),parseFloat(i[1]),parseFloat(i[2])).multiplyScalar(a*o);i=t[4].replace(/^\s+/,"").split(/\s+/);var h=new s.Vector3(parseFloat(i[0]),parseFloat(i[1]),parseFloat(i[2])).multiplyScalar(a*o),u=l.x*(c.y*h.z-h.y*c.z)-c.x*(l.y*h.z-h.y*l.z)+h.x*(l.y*c.z-c.y*l.z),d=1/(u=Math.abs(u)/Math.pow(o,3));t.splice(0,8+r+1);var p=t[0].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),f=Math.abs(parseFloat(p[0])),m=Math.abs(parseFloat(p[1])),g=Math.abs(parseFloat(p[2])),v=this.origin=new s.Vector3(0,0,0);this.size={x:f,y:m,z:g},this.unit=new s.Vector3(l.x,c.y,h.z),l=l.multiplyScalar(1/(o*f)),c=c.multiplyScalar(1/(o*m)),h=h.multiplyScalar(1/(o*g)),0==l.y&&0==l.z&&0==c.x&&0==c.z&&0==h.x&&0==h.y||(this.matrix=new s.Matrix4(l.x,c.x,h.x,0,l.y,c.y,h.y,0,l.z,c.z,h.z,0,0,0,0,1),this.matrix=this.matrix.multiplyMatrices(this.matrix,(new s.Matrix4).makeTranslation(v.x,v.y,v.z)),this.origin=new s.Vector3(0,0,0),this.unit=new s.Vector3(1,1,1)),t.splice(0,1);var b=t.join(" "),y=(b=b.replace(/^\s+/,"")).split(/[\s\r]+/);y.splice(f*m*g+1);for(var _=Float32Array.from(y,parseFloat),w=0;w<_.length;w++)_[w]=_[w]*d*.036749309;this.data=_},this.dx=function(e){var t,r=e.split(/[\n\r]+/),i=/gridpositions\s+counts\s+(\d+)\s+(\d+)\s+(\d+)/,n=/^origin\s+(\S+)\s+(\S+)\s+(\S+)/,o=/^delta\s+(\S+)\s+(\S+)\s+(\S+)/,a=/data follows/,l=0;for(l=0;l=this.size.x||t<0||t>=this.size.y||r<0||r>=this.size.z?-1:e*this.size.y*this.size.z+t*this.size.z+r}getVal(e,t,r){let i=this.getIndex(e,t,r);return i<0?0:this.data[i]}cube(e){var t=e.split(/\r?\n/);if(!(t.length<6)){var r=(0,o.CUBE)(e,{}).modelData[0].cryst,i=t[2].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),s=parseFloat(i[0]),n=Math.abs(s);this.origin=r.origin,this.size=r.size,this.unit=r.unit,this.matrix=r.matrix4;var a=6;s<0&&a++;var l=t.splice(n+a).join(" "),c=(l=l.replace(/^\s+/,"")).split(/[\s\r]+/);this.data=Float32Array.from(c,parseFloat)}}ccp4(e){var t={};e=new Int8Array(e);var r=new Int32Array(e.buffer,0,56),i=new Float32Array(e.buffer,0,56),n=new DataView(e.buffer);if(t.MAP=String.fromCharCode(n.getUint8(208),n.getUint8(209),n.getUint8(210),n.getUint8(211)),t.MACHST=[n.getUint8(212),n.getUint8(213)],17===t.MACHST[0]&&17===t.MACHST[1])for(var o=e.byteLength,a=0;a{"use strict";r.r(t),r.d(t,{GLVolumetricRender:()=>l});var i=r("./src/WebGL/shapes/index.ts"),s=r("./src/WebGL/math/index.ts"),n=r("./src/WebGL/index.ts"),o=r("./src/colors.ts"),a=r("./src/GLShape.ts");class l{static interpolateArray(e,t){function r(e,t,r){return e+(t-e)*r}var i=[],s=(e.length-1)/(t-1);i[0]=e[0];for(var n=1;n=0||e.getIndex(h,u,d)>=0)for(let t=a;t=0&&!r[a]&&(t-o.x)*(t-o.x)+(i-o.y)*(i-o.y)+(n-o.z)*(n-o.z){"use strict";r.r(t),r.d(t,{Camera:()=>n});var i=r("./src/WebGL/core/index.ts"),s=r("./src/WebGL/math/index.ts");class n extends i.Object3D{constructor(e=50,t=1,r=.1,i=2e3,n=!1){super(),this.projectionMatrix=new s.Matrix4,this.projectionMatrixInverse=new s.Matrix4,this.matrixWorldInverse=new s.Matrix4,this.fov=e,this.aspect=t,this.near=r,this.far=i;var o=this.position.z;this.right=o*Math.tan(Math.PI/180*e),this.left=-this.right,this.top=this.right/this.aspect,this.bottom=-this.top,this.ortho=!!n,this.updateProjectionMatrix()}lookAt(e){this.matrix.lookAt(this.position,e,this.up),this.rotationAutoUpdate&&(!1===this.useQuaternion&&this.rotation instanceof s.Vector3?this.rotation.setEulerFromRotationMatrix(this.matrix,this.eulerOrder):console.error("Unimplemented math operation."))}updateProjectionMatrix(){this.ortho?this.projectionMatrix.makeOrthographic(this.left,this.right,this.top,this.bottom,this.near,this.far):this.projectionMatrix.makePerspective(this.fov,this.aspect,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)}}},"./src/WebGL/Fog.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Fog:()=>s});var i=r("./src/colors.ts");class s{constructor(e,t=1,r=1e3){this.name="",this.color=new i.Color(e),this.near=t,this.far=r}clone(){return new s(this.color.getHex(),this.near,this.far)}}},"./src/WebGL/Renderer.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Renderer:()=>p});var i=r("./src/WebGL/Camera.ts"),s=r("./src/WebGL/constants/Sides.ts"),n=r("./src/WebGL/constants/TextureConstants.ts"),o=r("./src/WebGL/core/index.ts"),a=r("./src/colors.ts"),l=r("./src/WebGL/materials/index.ts"),c=r("./src/WebGL/math/index.ts"),h=r("./src/WebGL/objects/index.ts"),u=r("./src/WebGL/shaders/index.ts"),d=r("./src/WebGL/SpritePlugin.ts");class p{constructor(e){this.context=null,this.devicePixelRatio=1,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.autoUpdateObjects=!0,this.autoUpdateScene=!0,this.info={memory:{programs:0,geometries:0,textures:0},render:{calls:0,vertices:0,faces:0,points:0}},this._programs=[],this._programs_counter=0,this._webglversion=1,this._currentProgram=null,this._currentMaterialId=-1,this._currentGeometryGroupHash=null,this._currentCamera=null,this._geometryGroupCounter=0,this._oldDoubleSided=-1,this._oldFlipSided=-1,this._oldDepthTest=-1,this._oldDepthWrite=-1,this._oldPolygonOffset=null,this._oldLineWidth=null,this._viewportWidth=0,this._viewportHeight=0,this._currentWidth=0,this._currentHeight=0,this._enabledAttributes={},this._projScreenMatrix=new c.Matrix4,this._vector3=new c.Vector3,this._worldInverse=new c.Matrix4,this._projInverse=new c.Matrix4,this._textureMatrix=new c.Matrix4,this._direction=new c.Vector3,this._lightsNeedUpdate=!0,this._lights={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[],distances:[]},spot:{length:0,colors:[],positions:[],distances:[],directions:[],anglesCos:[],exponents:[]},hemi:{length:0,skyColors:[],groundColors:[],positions:[]}},this.sprites=new d.SpritePlugin,this._screenshader=null,this._vertexattribpos=null,this._screenQuadVBO=null,this._fb=null,this._targetTexture=null,this._depthTexture=null,e=e||{},this.row=e.row,this.col=e.col,this.rows=e.rows,this.cols=e.cols,this._canvas=void 0!==e.canvas?e.canvas:document.createElement("canvas"),this._precision=void 0!==e.precision?e.precision:"highp",this._alpha=void 0===e.alpha||e.alpha,this._premultipliedAlpha=void 0===e.premultipliedAlpha||e.premultipliedAlpha,this._antialias=void 0!==e.antialias&&e.antialias,this._stencil=void 0===e.stencil||e.stencil,this._preserveDrawingBuffer=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,this._clearColor=void 0!==e.clearColor?new a.Color(e.clearColor):new a.Color(0),this._clearAlpha=void 0!==e.clearAlpha?e.clearAlpha:0,this._outlineMaterial=new l.MeshOutlineMaterial(e.outline),this._outlineSphereImposterMaterial=new l.SphereImposterOutlineMaterial(e.outline),this._outlineStickImposterMaterial=new l.StickImposterOutlineMaterial(e.outline),this._outlineEnabled=!!e.outline,this.domElement=this._canvas,this._canvas.id=e.id,0!=e.containerWidth&&0!=e.containerHeight&&(this.initGL(),this.setDefaultGLState(),this.context=this._gl,this.isWebGL1()?this._extInstanced=this._gl.getExtension("ANGLE_instanced_arrays"):this._extInstanced={vertexAttribDivisorANGLE:this._gl.vertexAttribDivisor.bind(this._gl),drawElementsInstancedANGLE:this._gl.drawElementsInstanced.bind(this._gl)},this._extFragDepth=this._gl.getExtension("EXT_frag_depth"),this._extFloatLinear=this._gl.getExtension("OES_texture_float_linear"),this._extColorBufferFloat=this._gl.getExtension("EXT_color_buffer_float"),this.sprites.init(this))}supportedExtensions(){return{supportsAIA:Boolean(this._extInstanced),supportsImposters:Boolean(this._extFragDepth)||!this.isWebGL1(),regen:!1}}getContext(){return this._gl}getCanvas(){return this._canvas}isLost(){return null==this._gl||this._gl.isContextLost()}getPrecision(){return this._precision}setClearColorHex(e,t){this._clearColor.setHex(e),this._clearAlpha=t,this.isLost()||this._gl.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearAlpha)}enableOutline(e){this._outlineMaterial=new l.MeshOutlineMaterial(e),this._outlineSphereImposterMaterial=new l.SphereImposterOutlineMaterial(e),this._outlineStickImposterMaterial=new l.StickImposterOutlineMaterial(e),this._outlineEnabled=!0}disableOutline(){this._outlineEnabled=!1}setViewport(){if(null!=this.rows&&null!=this.cols&&null!=this.row&&null!=this.col){var e=this._canvas.width/this.cols,t=this._canvas.height/this.rows;this._viewportWidth=e,this._viewportHeight=t,this.isLost()||(this._gl.enable(this._gl.SCISSOR_TEST),this._gl.scissor(e*this.col,t*this.row,e,t),this._gl.viewport(e*this.col,t*this.row,e,t))}}setSize(e,t){if(this.devicePixelRatio=void 0!==window.devicePixelRatio?window.devicePixelRatio:1,this._antialias&&this.devicePixelRatio<2&&(this.devicePixelRatio*=2),null!=this.rows&&null!=this.cols&&null!=this.row&&null!=this.col){var r=e/this.cols,i=t/this.rows;this._canvas.width=e*this.devicePixelRatio,this._canvas.height=t*this.devicePixelRatio,this._viewportWidth=r*this.devicePixelRatio,this._viewportHeight=i*this.devicePixelRatio,this._canvas.style.width=e+"px",this._canvas.style.height=t+"px",this.setViewport()}else this._viewportWidth=this._canvas.width=e*this.devicePixelRatio,this._viewportHeight=this._canvas.height=t*this.devicePixelRatio,this._canvas.style.width=e+"px",this._canvas.style.height=t+"px",this.isLost()||this._gl.viewport(0,0,this._gl.drawingBufferWidth,this._gl.drawingBufferHeight);this.initFrameBuffer()}clear(e,t,r){var i=0;(void 0===e||e)&&(i|=this._gl.COLOR_BUFFER_BIT),(void 0===t||t)&&(i|=this._gl.DEPTH_BUFFER_BIT),(void 0===r||r)&&(i|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(i)}clearTarget(e,t,r){this.clear(e,t,r)}setMaterialFaces(e,t){var r=e.side===s.DoubleSide,i=e.side===s.BackSide;e.imposter||(i=t?!i:i),this._oldDoubleSided!==r&&(r?this._gl.disable(this._gl.CULL_FACE):this._gl.enable(this._gl.CULL_FACE),this._oldDoubleSided=r),this._oldFlipSided!==i&&(i?this._gl.frontFace(this._gl.CW):this._gl.frontFace(this._gl.CCW),this._oldFlipSided=i),this._gl.cullFace(this._gl.BACK)}setDepthTest(e){this._oldDepthTest!==e&&(e?this._gl.enable(this._gl.DEPTH_TEST):this._gl.disable(this._gl.DEPTH_TEST),this._oldDepthTest=e)}setDepthWrite(e){this._oldDepthWrite!==e&&(this._gl.depthMask(e),this._oldDepthWrite=e)}setBlending(e){e?(this._gl.enable(this._gl.BLEND),this._gl.blendEquationSeparate(this._gl.FUNC_ADD,this._gl.FUNC_ADD),this._gl.blendFuncSeparate(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA)):this._gl.disable(this._gl.BLEND)}initMaterial(e,t,r,i){var s,n;if(e.addEventListener("dispose",this.onMaterialDispose.bind(this)),n=e.shaderID){var o=u.ShaderLib[n];e.vertexShader=o.vertexShader,e.fragmentShader=o.fragmentShader,e.uniforms=u.ShaderUtils.clone(o.uniforms)}s={wireframe:e.wireframe,fragdepth:e.imposter,volumetric:e.volumetric},e.program=this.buildProgram(e.fragmentShader,e.vertexShader,e.uniforms,s)}renderBuffer(e,t,r,i,s,n){var o,a;if(i.visible&&(o=this.setProgram(e,t,r,i,n,this))){a=o.attributes;var l,c,u=!1,d=i.wireframe?1:0,p=16777215*s.id+2*o.id+d;if(p!==this._currentGeometryGroupHash&&(this._currentGeometryGroupHash=p,u=!0),u&&(this.disableAttributes(),a.position>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,s.__webglVertexBuffer),this.enableAttribute(a.position),this._gl.vertexAttribPointer(a.position,3,this._gl.FLOAT,!1,0,0)),a.color>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,s.__webglColorBuffer),this.enableAttribute(a.color),this._gl.vertexAttribPointer(a.color,3,this._gl.FLOAT,!1,0,0)),a.normal>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,s.__webglNormalBuffer),this.enableAttribute(a.normal),this._gl.vertexAttribPointer(a.normal,3,this._gl.FLOAT,!1,0,0)),a.offset>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,s.__webglOffsetBuffer),this.enableAttribute(a.offset),this._gl.vertexAttribPointer(a.offset,3,this._gl.FLOAT,!1,0,0)),a.radius>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,s.__webglRadiusBuffer),this.enableAttribute(a.radius),this._gl.vertexAttribPointer(a.radius,1,this._gl.FLOAT,!1,0,0))),n instanceof h.Mesh){if("instanced"===i.shaderID){var f=i.sphere.geometryGroups[0];u&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,s.__webglVertexBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,f.vertexArray,this._gl.STATIC_DRAW),this._gl.bindBuffer(this._gl.ARRAY_BUFFER,s.__webglNormalBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,f.normalArray,this._gl.STATIC_DRAW),this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,s.__webglFaceBuffer),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,f.faceArray,this._gl.STATIC_DRAW)),l=f.faceidx,this._extInstanced.vertexAttribDivisorANGLE(a.offset,1),this._extInstanced.vertexAttribDivisorANGLE(a.radius,1),this._extInstanced.vertexAttribDivisorANGLE(a.color,1),this._extInstanced.drawElementsInstancedANGLE(this._gl.TRIANGLES,l,this._gl.UNSIGNED_SHORT,0,s.radiusArray.length),this._extInstanced.vertexAttribDivisorANGLE(a.offset,0),this._extInstanced.vertexAttribDivisorANGLE(a.radius,0),this._extInstanced.vertexAttribDivisorANGLE(a.color,0)}else i.wireframe?(c=s.lineidx,this.setLineWidth(i.wireframeLinewidth),u&&this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,s.__webglLineBuffer),this._gl.drawElements(this._gl.LINES,c,this._gl.UNSIGNED_SHORT,0)):(l=s.faceidx,u&&this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,s.__webglFaceBuffer),this._gl.drawElements(this._gl.TRIANGLES,l,this._gl.UNSIGNED_SHORT,0));this.info.render.calls++,this.info.render.vertices+=l,this.info.render.faces+=l/3}else n instanceof h.Line&&(c=s.vertices,this.setLineWidth(i.linewidth),this._gl.drawArrays(this._gl.LINES,0,c),this.info.render.calls++)}}render(e,t,r){if(t instanceof i.Camera!=0){var s,n,o,a,l,c=e.__lights,h=e.fog;if(this._currentMaterialId=-1,this._lightsNeedUpdate=!0,this.autoUpdateScene&&e.updateMatrixWorld(),void 0===t.parent&&t.updateMatrixWorld(),t.matrixWorldInverse.getInverse(t.matrixWorld),this._projScreenMatrix.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),!this.isLost()){this.autoUpdateObjects&&this.initWebGLObjects(e),this.info.render.calls=0,this.info.render.vertices=0,this.info.render.faces=0,this.info.render.points=0,this._currentWidth=this._viewportWidth,this._currentHeight=this._viewportHeight,this.setViewport(),this.setFrameBuffer(),(this.autoClear||r)&&(this._gl.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearAlpha),this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil));var u=!1;for(s=0,n=(l=e.__webglObjects).length;s=0;--r)e[r].object===t&&e.splice(r,1)}removeInstancesDirect(e,t){for(var r=e.length-1;r>=0;--r)e[r]===t&&e.splice(r,1)}unrollBufferMaterial(e){var t=e.object.material;if(t.volumetric)e.opaque=null,e.transparent=null,e.volumetric=t;else if(t.transparent){if(e.opaque=null,e.volumetric=null,e.transparent=t,!t.wireframe){var r=t.clone();r.opacity=0,e.blank=r}}else e.opaque=t,e.transparent=null,e.volumetric=null}setBuffers(e,t){var r=e.vertexArray,i=e.colorArray;if(void 0!==e.__webglOffsetBuffer?(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,e.__webglOffsetBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,r,t)):(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,e.__webglVertexBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,r,t)),this._gl.bindBuffer(this._gl.ARRAY_BUFFER,e.__webglColorBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,i,t),e.normalArray&&void 0!==e.__webglNormalBuffer){var s=e.normalArray;this._gl.bindBuffer(this._gl.ARRAY_BUFFER,e.__webglNormalBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,s,t)}if(e.radiusArray&&void 0!==e.__webglRadiusBuffer&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,e.__webglRadiusBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,e.radiusArray,t)),e.faceArray&&void 0!==e.__webglFaceBuffer){var n=e.faceArray;this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,e.__webglFaceBuffer),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,n,t)}if(e.lineArray&&void 0!==e.__webglLineBuffer){var o=e.lineArray;this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,e.__webglLineBuffer),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,o,t)}}createMeshBuffers(e){e.radiusArray&&(e.__webglRadiusBuffer=this._gl.createBuffer()),e.useOffset&&(e.__webglOffsetBuffer=this._gl.createBuffer()),e.__webglVertexBuffer=this._gl.createBuffer(),e.__webglNormalBuffer=this._gl.createBuffer(),e.__webglColorBuffer=this._gl.createBuffer(),e.__webglFaceBuffer=this._gl.createBuffer(),e.__webglLineBuffer=this._gl.createBuffer(),this.info.memory.geometries++}createLineBuffers(e){e.__webglVertexBuffer=this._gl.createBuffer(),e.__webglColorBuffer=this._gl.createBuffer(),this.info.memory.geometries++}addBuffer(e,t,r){e.push({buffer:t,object:r,opaque:null,transparent:null})}setupMatrices(e,t){e._modelViewMatrix.multiplyMatrices(t.matrixWorldInverse,e.matrixWorld),e._normalMatrix.getInverse(e._modelViewMatrix),e._normalMatrix.transpose()}filterFallback(e){return this._gl.LINEAR}setTextureParameters(e,t){e==this._gl.TEXTURE_2D?(this._gl.texParameteri(e,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(e,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(e,this._gl.TEXTURE_MAG_FILTER,this.filterFallback(t.magFilter)),this._gl.texParameteri(e,this._gl.TEXTURE_MIN_FILTER,this.filterFallback(t.minFilter))):(this._gl.texParameteri(e,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(e,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(e,this._gl.TEXTURE_WRAP_R,this._gl.CLAMP_TO_EDGE),this._extColorBufferFloat&&this._extFloatLinear?(this._gl.texParameteri(e,this._gl.TEXTURE_MAG_FILTER,this._gl.LINEAR),this._gl.texParameteri(e,this._gl.TEXTURE_MIN_FILTER,this._gl.LINEAR)):(this._gl.texParameteri(e,this._gl.TEXTURE_MAG_FILTER,this._gl.NEAREST),this._gl.texParameteri(e,this._gl.TEXTURE_MIN_FILTER,this._gl.NEAREST)))}paramToGL(e){return e===n.UnsignedByteType?this._gl.UNSIGNED_BYTE:e===n.RGBAFormat?this._gl.RGBA:e===n.NearestFilter?this._gl.NEAREST:0}setupLights(e,t){var r,i,s,n,a,l=this._lights,c=l.directional.colors,h=l.directional.positions,u=0,d=0;for(r=0,i=t.length;r{"use strict";r.r(t),r.d(t,{SpritePlugin:()=>s});var i=r("./src/WebGL/shaders/index.ts");class s{constructor(){this.sprite={vertices:null,faces:null,vertexBuffer:null,elementBuffer:null,program:null,attributes:{},uniforms:null}}init(e){this.gl=e.context,this.renderer=e,this.precision=e.getPrecision(),this.sprite.vertices=new Float32Array(16),this.sprite.faces=new Uint16Array(6);var t=0;this.sprite.vertices[t++]=-1,this.sprite.vertices[t++]=-1,this.sprite.vertices[t++]=0,this.sprite.vertices[t++]=0,this.sprite.vertices[t++]=1,this.sprite.vertices[t++]=-1,this.sprite.vertices[t++]=1,this.sprite.vertices[t++]=0,this.sprite.vertices[t++]=1,this.sprite.vertices[t++]=1,this.sprite.vertices[t++]=1,this.sprite.vertices[t++]=1,this.sprite.vertices[t++]=-1,this.sprite.vertices[t++]=1,this.sprite.vertices[t++]=0,this.sprite.vertices[t++]=1,t=0,this.sprite.faces[t++]=0,this.sprite.faces[t++]=1,this.sprite.faces[t++]=2,this.sprite.faces[t++]=0,this.sprite.faces[t++]=2,this.sprite.faces[t++]=3,this.sprite.vertexBuffer=this.gl.createBuffer(),this.sprite.elementBuffer=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.sprite.vertexBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,this.sprite.vertices,this.gl.STATIC_DRAW),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.sprite.elementBuffer),this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,this.sprite.faces,this.gl.STATIC_DRAW),this.sprite.program=this.createProgram(i.ShaderLib.sprite,this.precision||1),this.sprite.attributes={};const r={};this.sprite.attributes.position=this.gl.getAttribLocation(this.sprite.program,"position"),this.sprite.attributes.uv=this.gl.getAttribLocation(this.sprite.program,"uv"),r.uvOffset=this.gl.getUniformLocation(this.sprite.program,"uvOffset"),r.uvScale=this.gl.getUniformLocation(this.sprite.program,"uvScale"),r.rotation=this.gl.getUniformLocation(this.sprite.program,"rotation"),r.scale=this.gl.getUniformLocation(this.sprite.program,"scale"),r.alignment=this.gl.getUniformLocation(this.sprite.program,"alignment"),r.color=this.gl.getUniformLocation(this.sprite.program,"color"),r.map=this.gl.getUniformLocation(this.sprite.program,"map"),r.opacity=this.gl.getUniformLocation(this.sprite.program,"opacity"),r.useScreenCoordinates=this.gl.getUniformLocation(this.sprite.program,"useScreenCoordinates"),r.screenPosition=this.gl.getUniformLocation(this.sprite.program,"screenPosition"),r.modelViewMatrix=this.gl.getUniformLocation(this.sprite.program,"modelViewMatrix"),r.projectionMatrix=this.gl.getUniformLocation(this.sprite.program,"projectionMatrix"),r.fogType=this.gl.getUniformLocation(this.sprite.program,"fogType"),r.fogDensity=this.gl.getUniformLocation(this.sprite.program,"fogDensity"),r.fogNear=this.gl.getUniformLocation(this.sprite.program,"fogNear"),r.fogFar=this.gl.getUniformLocation(this.sprite.program,"fogFar"),r.fogColor=this.gl.getUniformLocation(this.sprite.program,"fogColor"),r.alphaTest=this.gl.getUniformLocation(this.sprite.program,"alphaTest"),this.sprite.uniforms=r}render(e,t,r,i,s){var o,a,l,c,h,u,d,p,f,m;if(!this.gl)throw new Error("WebGLRenderer not initialized");let g=[];null===(o=null==e?void 0:e.__webglSprites)||void 0===o||o.forEach((e=>{(s&&0==e.material.depthTest||!s&&e.material.depthTest)&&g.push(e)}));let v=g.length;if(!v)return;const b=this.sprite.attributes,y=this.sprite.uniforms;if(!y)throw new Error("Uniforms not defined");var _=.5*r,w=.5*i;this.gl.useProgram(this.sprite.program),this.gl.enableVertexAttribArray(b.position),this.gl.enableVertexAttribArray(b.uv),this.gl.disable(this.gl.CULL_FACE),this.gl.enable(this.gl.BLEND),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.sprite.vertexBuffer),this.gl.vertexAttribPointer(b.position,2,this.gl.FLOAT,!1,16,0),this.gl.vertexAttribPointer(b.uv,2,this.gl.FLOAT,!1,16,8),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.sprite.elementBuffer),this.gl.uniformMatrix4fv(y.projectionMatrix,!1,t.projectionMatrix.elements),this.gl.activeTexture(this.gl.TEXTURE0),this.gl.uniform1i(y.map,0);var x,S=0,A=0,C=e.fog;let M,L,E,z;C?(this.gl.uniform3f(y.fogColor,C.color.r,C.color.g,C.color.b),this.gl.uniform1f(y.fogNear,C.near),this.gl.uniform1f(y.fogFar,C.far),this.gl.uniform1i(y.fogType,1),S=1,A=1):(this.gl.uniform1i(y.fogType,0),S=0,A=0);let k=[];for(x=0;x{"use strict";var i;r.r(t),r.d(t,{Coloring:()=>i}),function(e){e[e.NoColors=0]="NoColors",e[e.FaceColors=1]="FaceColors",e[e.VertexColors=2]="VertexColors"}(i||(i={}))},"./src/WebGL/constants/Shading.ts":(e,t,r)=>{"use strict";var i;r.r(t),r.d(t,{Shading:()=>i}),function(e){e[e.NoShading=0]="NoShading",e[e.FlatShading=1]="FlatShading",e[e.SmoothShading=2]="SmoothShading"}(i||(i={}))},"./src/WebGL/constants/Sides.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{BackSide:()=>s,DoubleSide:()=>n,FrontSide:()=>i});const i=0,s=1,n=2},"./src/WebGL/constants/SpriteAlignment.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{SpriteAlignment:()=>s});var i=r("./src/WebGL/math/index.ts");const s={topLeft:new i.Vector2(1,-1),topCenter:new i.Vector2(0,-1),topRight:new i.Vector2(-1,-1),centerLeft:new i.Vector2(1,0),center:new i.Vector2(0,0),centerRight:new i.Vector2(-1,0),bottomLeft:new i.Vector2(1,1),bottomCenter:new i.Vector2(0,1),bottomRight:new i.Vector2(-1,1)}},"./src/WebGL/constants/TextureConstants.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{ClampToEdgeWrapping:()=>i,FloatType:()=>l,LinearFilter:()=>s,LinearMipMapLinearFilter:()=>o,NearestFilter:()=>n,R32Format:()=>u,RFormat:()=>h,RGBAFormat:()=>c,UnsignedByteType:()=>a});const i=1001,s=1006,n=1007,o=1008,a=1009,l=1010,c=1021,h=1022,u=1023},"./src/WebGL/constants/TextureOperations.ts":(e,t,r)=>{"use strict";var i;r.r(t),r.d(t,{TextureOperations:()=>i}),function(e){e[e.MultiplyOperation=0]="MultiplyOperation",e[e.MixOperation=1]="MixOperation",e[e.AddOperation=2]="AddOperation"}(i||(i={}))},"./src/WebGL/constants/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{BackSide:()=>s.BackSide,ClampToEdgeWrapping:()=>a.ClampToEdgeWrapping,Coloring:()=>i.Coloring,DoubleSide:()=>s.DoubleSide,FloatType:()=>a.FloatType,FrontSide:()=>s.FrontSide,LinearFilter:()=>a.LinearFilter,LinearMipMapLinearFilter:()=>a.LinearMipMapLinearFilter,NearestFilter:()=>a.NearestFilter,R32Format:()=>a.R32Format,RFormat:()=>a.RFormat,RGBAFormat:()=>a.RGBAFormat,Shading:()=>n.Shading,SpriteAlignment:()=>o.SpriteAlignment,TextureOperations:()=>l.TextureOperations,UnsignedByteType:()=>a.UnsignedByteType});var i=r("./src/WebGL/constants/Coloring.ts"),s=r("./src/WebGL/constants/Sides.ts"),n=r("./src/WebGL/constants/Shading.ts"),o=r("./src/WebGL/constants/SpriteAlignment.ts"),a=r("./src/WebGL/constants/TextureConstants.ts"),l=r("./src/WebGL/constants/TextureOperations.ts")},"./src/WebGL/core/EventDispatcher.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{EventDispatcher:()=>i});class i{constructor(){this.listeners={}}dispatchEvent(e){var t=this.listeners[e.type];if(void 0!==t){e.target=this;for(var r=0,i=t.length;r{"use strict";r.r(t),r.d(t,{Geometry:()=>l,GeometryGroup:()=>a,GeometryIDCount:()=>c});var i=r("./src/WebGL/materials/LineBasicMaterial.ts"),s=r("./src/WebGL/core/EventDispatcher.ts"),n=r("./src/WebGL/math/index.ts"),o=r("./src/colors.ts");class a{constructor(e=0){this.vertexArray=null,this.colorArray=null,this.normalArray=null,this.radiusArray=null,this.faceArray=null,this.lineArray=null,this.vertices=0,this.faceidx=0,this.lineidx=0,this.__inittedArrays=!1,this.id=e}setColors(e){var t=this.vertexArray,r=this.colorArray;if(!t)throw new Error("vertex array not initialized");if(!r)throw new Error("color array not initialized");if(t.length==r.length)for(var i=0;i0?this.lineArray=(null==o?void 0:o.subarray(0,this.lineidx))||null:this.lineArray=new Uint16Array(0)):(this.normalArray=new Float32Array(0),this.faceArray=new Uint16Array(0),this.lineArray=new Uint16Array(0)),a&&(this.radiusArray=a.subarray(0,this.vertices)),t&&(this.normalArray&&(this.normalArray=new Float32Array(this.normalArray)),this.faceArray&&(this.faceArray=new Uint16Array(this.faceArray)),this.lineArray&&(this.lineArray=new Uint16Array(this.lineArray)),this.vertexArray&&(this.vertexArray=new Float32Array(this.vertexArray)),this.colorArray&&(this.colorArray=new Float32Array(this.colorArray)),this.radiusArray&&(this.radiusArray=new Float32Array(this.radiusArray))),this.__inittedArrays=!0}}class l extends s.EventDispatcher{constructor(e=!1,t=!1,r=!1){super(),this.name="",this.hasTangents=!1,this.dynamic=!0,this.verticesNeedUpdate=!1,this.elementsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.buffersNeedUpdate=!1,this.imposter=!1,this.instanced=!1,this.geometryGroups=[],this.groups=0,this.id=c++,this.mesh=e,this.radii=t,this.offset=r}updateGeoGroup(e=0){var t,r=this.groups>0?this.geometryGroups[this.groups-1]:null;return(!r||r.vertices+e>((null===(t=null==r?void 0:r.vertexArray)||void 0===t?void 0:t.length)||0)/3)&&(r=this.addGeoGroup()),r}vrml(e,t){for(var r="",i=this.geometryGroups.length,s=0;s{"use strict";r.r(t),r.d(t,{Light:()=>l,Object3D:()=>o,Object3DIDCount:()=>n,Scene:()=>a});var i=r("./src/WebGL/math/index.ts"),s=r("./src/colors.ts");let n=0;class o{constructor(){this.id=n++,this.name="",this.children=[],this.position=new i.Vector3,this.rotation=new i.Vector3,this.matrix=new i.Matrix4,this.matrixWorld=new i.Matrix4,this.quaternion=new i.Quaternion,this.eulerOrder="XYZ",this.up=new i.Vector3(0,1,0),this.scale=new i.Vector3(1,1,1),this.matrixAutoUpdate=!0,this.matrixWorldNeedsUpdate=!0,this.rotationAutoUpdate=!0,this.useQuaternion=!1,this.visible=!0}lookAt(e){this.matrix.lookAt(e,this.position,this.up),this.rotationAutoUpdate&&(!0===this.useQuaternion?console.error("Unimplemented math operation."):this.rotation instanceof i.Vector3&&this.rotation.setEulerFromRotationMatrix(this.matrix,this.eulerOrder))}add(e){if(e!==this){e.parent=this,this.children.push(e);for(var t=this;void 0!==t.parent;)t=t.parent;void 0!==t&&t instanceof a&&t.__addObject(e)}else console.error("Can't add $3Dmol.Object3D to itself")}remove(e){var t=this.children.indexOf(e);if(-1!==t){e.parent=void 0,this.children.splice(t,1);for(var r=this;void 0!==r.parent;)r=r.parent;void 0!==r&&r instanceof a&&r.__removeObject(e)}}vrml(e){e||(e=" ");var t=2*Math.atan2(this.quaternion.lengthxyz(),this.quaternion.w),r=0,i=0,s=0;if(0!=t){let e=Math.sin(t/2);r=this.quaternion.x/e,i=this.quaternion.y/e,s=this.quaternion.z/e}var n=e+"Transform {\n"+e+" center "+this.position.x+" "+this.position.y+" "+this.position.z+"\n"+e+" rotation "+r+" "+i+" "+s+" "+t+"\n"+e+" children [\n";this.geometry&&(n+=this.geometry.vrml(e,this.material));for(var o=0;o{"use strict";r.r(t),r.d(t,{Projector:()=>s});const i=new(r("./src/WebGL/math/index.ts").Matrix4);class s{static unprojectVector(e,t){return t.projectionMatrixInverse.getInverse(t.projectionMatrix),i.multiplyMatrices(t.matrixWorld,t.projectionMatrixInverse),e.applyProjection(i)}static projectVector(e,t){return t.matrixWorldInverse.getInverse(t.matrixWorld),i.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),e.applyProjection(i)}projectVector(e,t){return s.projectVector(e,t)}unprojectVector(e,t){return s.unprojectVector(e,t)}}},"./src/WebGL/core/Raycaster.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Raycaster:()=>a,intersectObject:()=>v});var i=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/shapes/index.ts");const n=(e,t)=>e.distance-t.distance,o=new i.Matrix4;class a{constructor(e,t,r,s){this.precision=1e-4,this.linePrecision=.2,this.ray=new i.Ray(e,t),this.ray.direction.lengthSq()>0&&this.ray.direction.normalize(),this.near=s||0,this.far=r||1/0}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.ortho?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld)):(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,e.z),t.projectionMatrixInverse.getInverse(t.projectionMatrix),o.multiplyMatrices(t.matrixWorld,t.projectionMatrixInverse),this.ray.direction.applyProjection(o),this.ray.direction.sub(this.ray.origin).normalize())}intersectObjects(e,t){for(var r=[],i=0,s=t.length;iMath.min(Math.max(e,-1),1);var c=new s.Sphere,h=new s.Cylinder,u=new s.Triangle,d=new i.Vector3,p=new i.Vector3,f=new i.Vector3,m=new i.Vector3,g=new i.Vector3;function v(e,t,r,i){if(g.getPositionFromMatrix(e.matrixWorld),void 0===t.intersectionShape)return i;var n,o,a,v,b,y,_,w,x,S,A,C,M,L,E=t.intersectionShape,z=r.linePrecision,k=(z*=e.matrixWorld.getMaxScaleOnAxis())*z;if(void 0!==t.boundingSphere&&t.boundingSphere instanceof s.Sphere&&(c.copy(t.boundingSphere),c.applyMatrix4(e.matrixWorld),!r.ray.isIntersectionSphere(c)))return i;for(n=0,o=E.triangle.length;n=0)continue;if(d.subVectors(u.a,r.ray.origin),(_=a.dot(d)/v)<0)continue;p.copy(r.ray.direction).multiplyScalar(_).add(r.ray.origin),p.sub(u.a),f.copy(u.b).sub(u.a),m.copy(u.c).sub(u.a);var O=f.dot(m),T=f.lengthSq(),I=m.lengthSq();if((C=(T*p.dot(m)-O*p.dot(f))/(T*I-O*O))<0||C>1)continue;if((A=(p.dot(f)-C*O)/T)<0||A>1||A+C>1)continue;i.push({clickable:t,distance:_})}for(n=0,o=E.cylinder.length;nh.lengthSq()||C<0)continue;i.push({clickable:t,distance:_})}}for(n=0,o=E.line.length;n{"use strict";r.r(t),r.d(t,{Texture:()=>a,TextureIdCount:()=>l});var i=r("./src/WebGL/constants/TextureConstants.ts"),s=r("./src/WebGL/math/index.ts"),n=r("./src/WebGL/core/EventDispatcher.ts"),o=r("./src/WebGL/core/UVMapping.ts");class a extends n.EventDispatcher{constructor(e,t){super(),this.id=l++,this.name="",this.image=e,this.mapping=new o.UVMapping,this.wrapS=i.ClampToEdgeWrapping,this.wrapT=i.ClampToEdgeWrapping,this.anisotropy=1,t?(this.format=i.RFormat,this.type=i.FloatType,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.magFilter=i.NearestFilter,this.minFilter=i.NearestFilter):(this.format=i.RGBAFormat,this.type=i.UnsignedByteType,this.offset=new s.Vector2(0,0),this.repeat=new s.Vector2(1,1),this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.magFilter=i.LinearFilter,this.minFilter=i.LinearMipMapLinearFilter),this.needsUpdate=!1,this.onUpdate=null}clone(e=new a){return e.image=this.image,e.mapping=this.mapping,e.wrapS=this.wrapS,e.wrapT=this.wrapT,e.magFilter=this.magFilter,e.minFilter=this.minFilter,e.anisotropy=this.anisotropy,e.format=this.format,e.type=this.type,e.offset.copy(this.offset),e.repeat.copy(this.repeat),e.premultiplyAlpha=this.premultiplyAlpha,e.flipY=this.flipY,e.unpackAlignment=this.unpackAlignment,e}dispose(){this.dispatchEvent({type:"dispose"})}}let l=0},"./src/WebGL/core/UVMapping.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{UVMapping:()=>i});class i{}},"./src/WebGL/core/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{EventDispatcher:()=>i.EventDispatcher,Geometry:()=>s.Geometry,GeometryGroup:()=>s.GeometryGroup,GeometryIDCount:()=>s.GeometryIDCount,Light:()=>n.Light,Object3D:()=>n.Object3D,Object3DIDCount:()=>n.Object3DIDCount,Projector:()=>o.Projector,Raycaster:()=>a.Raycaster,Scene:()=>n.Scene,Texture:()=>l.Texture,TextureIdCount:()=>l.TextureIdCount,UVMapping:()=>c.UVMapping,intersectObject:()=>a.intersectObject});var i=r("./src/WebGL/core/EventDispatcher.ts"),s=r("./src/WebGL/core/Geometry.ts"),n=r("./src/WebGL/core/Object3D.ts"),o=r("./src/WebGL/core/Projector.ts"),a=r("./src/WebGL/core/Raycaster.ts"),l=r("./src/WebGL/core/Texture.ts"),c=r("./src/WebGL/core/UVMapping.ts")},"./src/WebGL/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{BackSide:()=>i.BackSide,Camera:()=>h.Camera,ClampToEdgeWrapping:()=>i.ClampToEdgeWrapping,Coloring:()=>i.Coloring,Cylinder:()=>c.Cylinder,DoubleSide:()=>i.DoubleSide,EventDispatcher:()=>s.EventDispatcher,FloatType:()=>i.FloatType,Fog:()=>u.Fog,FrontSide:()=>i.FrontSide,Geometry:()=>s.Geometry,GeometryGroup:()=>s.GeometryGroup,GeometryIDCount:()=>s.GeometryIDCount,ImposterMaterial:()=>n.ImposterMaterial,InstancedMaterial:()=>n.InstancedMaterial,Light:()=>s.Light,Line:()=>a.Line,LineBasicMaterial:()=>n.LineBasicMaterial,LineStyle:()=>a.LineStyle,LinearFilter:()=>i.LinearFilter,LinearMipMapLinearFilter:()=>i.LinearMipMapLinearFilter,Material:()=>n.Material,MaterialIdCount:()=>n.MaterialIdCount,Matrix3:()=>o.Matrix3,Matrix4:()=>o.Matrix4,Mesh:()=>a.Mesh,MeshDoubleLambertMaterial:()=>n.MeshDoubleLambertMaterial,MeshLambertMaterial:()=>n.MeshLambertMaterial,MeshOutlineMaterial:()=>n.MeshOutlineMaterial,NearestFilter:()=>i.NearestFilter,Object3D:()=>s.Object3D,Object3DIDCount:()=>s.Object3DIDCount,Projector:()=>s.Projector,Quaternion:()=>o.Quaternion,R32Format:()=>i.R32Format,RFormat:()=>i.RFormat,RGBAFormat:()=>i.RGBAFormat,Ray:()=>o.Ray,Raycaster:()=>s.Raycaster,Renderer:()=>d.Renderer,Scene:()=>s.Scene,ShaderLib:()=>l.ShaderLib,ShaderUtils:()=>l.ShaderUtils,Shading:()=>i.Shading,Sphere:()=>c.Sphere,SphereImposterMaterial:()=>n.SphereImposterMaterial,SphereImposterOutlineMaterial:()=>n.SphereImposterOutlineMaterial,Sprite:()=>a.Sprite,SpriteAlignment:()=>i.SpriteAlignment,SpriteMaterial:()=>n.SpriteMaterial,SpritePlugin:()=>p.SpritePlugin,StickImposterMaterial:()=>n.StickImposterMaterial,StickImposterOutlineMaterial:()=>n.StickImposterOutlineMaterial,Texture:()=>s.Texture,TextureIdCount:()=>s.TextureIdCount,TextureOperations:()=>i.TextureOperations,Triangle:()=>c.Triangle,UVMapping:()=>s.UVMapping,UnsignedByteType:()=>i.UnsignedByteType,Vector2:()=>o.Vector2,Vector3:()=>o.Vector3,VolumetricMaterial:()=>n.VolumetricMaterial,basic:()=>l.basic,clamp:()=>o.clamp,clone:()=>l.clone,conversionMatrix3:()=>o.conversionMatrix3,degToRad:()=>o.degToRad,instanced:()=>l.instanced,intersectObject:()=>s.intersectObject,lambert:()=>l.lambert,lambertdouble:()=>l.lambertdouble,outline:()=>l.outline,screen:()=>l.screen,screenaa:()=>l.screenaa,sphereimposter:()=>l.sphereimposter,sphereimposteroutline:()=>l.sphereimposteroutline,sprite:()=>l.sprite,stickimposter:()=>l.stickimposter,stickimposteroutline:()=>l.stickimposteroutline,volumetric:()=>l.volumetric});var i=r("./src/WebGL/constants/index.ts"),s=r("./src/WebGL/core/index.ts"),n=r("./src/WebGL/materials/index.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/WebGL/objects/index.ts"),l=r("./src/WebGL/shaders/index.ts"),c=r("./src/WebGL/shapes/index.ts"),h=r("./src/WebGL/Camera.ts"),u=r("./src/WebGL/Fog.ts"),d=r("./src/WebGL/Renderer.ts"),p=r("./src/WebGL/SpritePlugin.ts")},"./src/WebGL/materials/ImposterMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{ImposterMaterial:()=>l});var i=r("./src/WebGL/constants/Coloring.ts"),s=r("./src/WebGL/constants/Shading.ts"),n=r("./src/colors.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/WebGL/materials/Material.ts");class l extends a.Material{constructor(e){super(),this.color=new n.Color(16777215),this.ambient=new n.Color(1048575),this.emissive=new n.Color(0),this.imposter=!0,this.wrapAround=!1,this.wrapRGB=new o.Vector3(1,1,1),this.map=void 0,this.lightMap=null,this.specularMap=null,this.envMap=null,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.shading=s.Shading.SmoothShading,this.shaderID=null,this.vertexColors=i.Coloring.NoColors,this.skinning=!1,this.setValues(e)}clone(e=new l){return super.clone.call(this,e),e.color.copy(this.color),e.ambient.copy(this.ambient),e.emissive.copy(this.emissive),e.wrapAround=this.wrapAround,e.wrapRGB.copy(this.wrapRGB),e.map=this.map,e.lightMap=this.lightMap,e.specularMap=this.specularMap,e.envMap=this.envMap,e.combine=this.combine,e.reflectivity=this.reflectivity,e.refractionRatio=this.refractionRatio,e.fog=this.fog,e.shading=this.shading,e.shaderID=this.shaderID,e.vertexColors=this.vertexColors,e.skinning=this.skinning,e.morphTargets=this.morphTargets,e.morphNormals=this.morphNormals,e}}},"./src/WebGL/materials/InstancedMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{InstancedMaterial:()=>l});var i=r("./src/WebGL/constants/Coloring.ts"),s=r("./src/WebGL/constants/Shading.ts"),n=r("./src/colors.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/WebGL/materials/Material.ts");class l extends a.Material{constructor(e){super(),this.color=new n.Color(16777215),this.ambient=new n.Color(1048575),this.emissive=new n.Color(0),this.wrapAround=!1,this.wrapRGB=new o.Vector3(1,1,1),this.map=void 0,this.lightMap=null,this.specularMap=null,this.envMap=null,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.shading=s.Shading.SmoothShading,this.shaderID="instanced",this.vertexColors=i.Coloring.NoColors,this.skinning=!1,this.sphere=null,this.setValues(e)}clone(e=new l){return super.clone.call(this,e),e.color.copy(this.color),e.ambient.copy(this.ambient),e.emissive.copy(this.emissive),e.wrapAround=this.wrapAround,e.wrapRGB.copy(this.wrapRGB),e.map=this.map,e.lightMap=this.lightMap,e.specularMap=this.specularMap,e.envMap=this.envMap,e.combine=this.combine,e.reflectivity=this.reflectivity,e.refractionRatio=this.refractionRatio,e.fog=this.fog,e.shading=this.shading,e.shaderID=this.shaderID,e.vertexColors=this.vertexColors,e.skinning=this.skinning,e.morphTargets=this.morphTargets,e.morphNormals=this.morphNormals,e.sphere=this.sphere,e}}},"./src/WebGL/materials/LineBasicMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{LineBasicMaterial:()=>n});var i=r("./src/colors.ts"),s=r("./src/WebGL/materials/Material.ts");class n extends s.Material{constructor(e){super(),this.color=new i.Color(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.vertexColors=!1,this.fog=!0,this.shaderID="basic",this.setValues(e)}clone(e=new n){return super.clone.call(this,e),e.color.copy(this.color),e}}},"./src/WebGL/materials/Material.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Material:()=>a,MaterialIdCount:()=>l});var i=r("./src/WebGL/constants/Sides.ts"),s=r("./src/WebGL/core/index.ts"),n=r("./src/WebGL/math/index.ts"),o=r("./src/colors.ts");class a extends s.EventDispatcher{constructor(){super(...arguments),this.id=l++,this.name="",this.side=i.FrontSide,this.opacity=1,this.transparent=!1,this.depthTest=!0,this.depthWrite=!0,this.stencilTest=!0,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.alphaTest=0,this.visible=!0,this.needsUpdate=!0,this.outline=!1,this.wireframe=!1}setValues(e={}){if(void 0!==e)for(var t in e){var r=e[t];if(void 0!==r){if(t in this){var i=this[t];i instanceof o.Color&&r instanceof o.Color?i.copy(r):i instanceof o.Color?i.set(r):i instanceof n.Vector3&&r instanceof n.Vector3?i.copy(r):this[t]=r}}else console.warn("$3Dmol.Material: '"+t+"' parameter is undefined.")}}clone(e=new a){return e.name=this.name,e.side=this.side,e.opacity=this.opacity,e.transparent=this.transparent,e.depthTest=this.depthTest,e.depthWrite=this.depthWrite,e.stencilTest=this.stencilTest,e.polygonOffset=this.polygonOffset,e.polygonOffsetFactor=this.polygonOffsetFactor,e.polygonOffsetUnits=this.polygonOffsetUnits,e.alphaTest=this.alphaTest,e.overdraw=this.overdraw,e.visible=this.visible,e}dispose(){this.dispatchEvent({type:"dispose"})}}let l=0},"./src/WebGL/materials/MeshDoubleLambertMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{MeshDoubleLambertMaterial:()=>n});var i=r("./src/WebGL/constants/Sides.ts"),s=r("./src/WebGL/materials/MeshLambertMaterial.ts");class n extends s.MeshLambertMaterial{constructor(e){super(e),this.shaderID="lambertdouble",this.side=i.DoubleSide,this.outline=!1}clone(e=new n){return super.clone.call(this,e),e}}},"./src/WebGL/materials/MeshLambertMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{MeshLambertMaterial:()=>l});var i=r("./src/WebGL/constants/Coloring.ts"),s=r("./src/WebGL/constants/Shading.ts"),n=r("./src/WebGL/materials/Material.ts"),o=r("./src/colors.ts"),a=r("./src/WebGL/math/index.ts");class l extends n.Material{constructor(e){super(),this.color=new o.Color(16777215),this.ambient=new o.Color(1048575),this.emissive=new o.Color(0),this.wrapAround=!1,this.wrapRGB=new a.Vector3(1,1,1),this.map=void 0,this.lightMap=null,this.specularMap=null,this.envMap=null,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.shading=s.Shading.SmoothShading,this.shaderID="lambert",this.vertexColors=i.Coloring.NoColors,this.skinning=!1,this.setValues(e)}clone(e=new l){return super.clone.call(this,e),e.color.copy(this.color),e.ambient.copy(this.ambient),e.emissive.copy(this.emissive),e.wrapAround=this.wrapAround,e.wrapRGB.copy(this.wrapRGB),e.map=this.map,e.lightMap=this.lightMap,e.specularMap=this.specularMap,e.envMap=this.envMap,e.combine=this.combine,e.reflectivity=this.reflectivity,e.refractionRatio=this.refractionRatio,e.fog=this.fog,e.shading=this.shading,e.shaderID=this.shaderID,e.vertexColors=this.vertexColors,e.skinning=this.skinning,e.morphTargets=this.morphTargets,e.morphNormals=this.morphNormals,e}}},"./src/WebGL/materials/MeshOutlineMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{MeshOutlineMaterial:()=>n});var i=r("./src/colors.ts"),s=r("./src/WebGL/materials/Material.ts");class n extends s.Material{constructor(e){super(),e=e||{},this.fog=!0,this.shaderID="outline",this.wireframe=!1,this.outlineColor=e.color||new i.Color(0,0,0),this.outlineWidth=e.width||.1,this.outlinePushback=e.pushback||1}clone(e=new n){return super.clone.call(this,e),e.fog=this.fog,e.shaderID=this.shaderID,e.wireframe=this.wireframe,e}}},"./src/WebGL/materials/SphereImposterMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{SphereImposterMaterial:()=>s});var i=r("./src/WebGL/materials/ImposterMaterial.ts");class s extends i.ImposterMaterial{constructor(e){super(e),this.shaderID="sphereimposter",this.setValues(e)}clone(e=new s){return super.clone.call(this,e),e}}},"./src/WebGL/materials/SphereImposterOutlineMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{SphereImposterOutlineMaterial:()=>n});var i=r("./src/colors.ts"),s=r("./src/WebGL/materials/ImposterMaterial.ts");class n extends s.ImposterMaterial{constructor(e){super(e),e=e||{},this.shaderID="sphereimposteroutline",this.outlineColor=e.color||new i.Color(0,0,0),this.outlineWidth=e.width||.1,this.outlinePushback=e.pushback||1,this.setValues(e)}clone(e=new n){return super.clone.call(this,e),e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.outlinePushback=this.outlinePushback,e}}},"./src/WebGL/materials/SpriteMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{SpriteMaterial:()=>l});var i=r("./src/WebGL/constants/SpriteAlignment.ts"),s=r("./src/WebGL/core/Texture.ts"),n=r("./src/colors.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/WebGL/materials/Material.ts");class l extends a.Material{constructor(e){super(),this.color=new n.Color(16777215),this.map=new s.Texture,this.useScreenCoordinates=!0,this.fog=!1,this.uvOffset=new o.Vector2(0,0),this.uvScale=new o.Vector2(1,1),this.depthTest=!this.useScreenCoordinates,this.sizeAttenuation=!this.useScreenCoordinates,this.screenOffset=this.screenOffset,this.scaleByViewPort=!this.sizeAttenuation,this.alignment=i.SpriteAlignment.center.clone(),this.setValues(e),void 0===(e=e||{}).depthTest&&(this.depthTest=!this.useScreenCoordinates),void 0===e.sizeAttenuation&&(this.sizeAttenuation=!this.useScreenCoordinates),void 0===e.scaleByViewPort&&(this.scaleByViewPort=!this.sizeAttenuation)}clone(e=new l){return super.clone.call(this,e),e.color.copy(this.color),e.map=this.map,e.useScreenCoordinates=this.useScreenCoordinates,e.screenOffset=this.screenOffset,e.sizeAttenuation=this.sizeAttenuation,e.scaleByViewport=this.scaleByViewPort,e.alignment.copy(this.alignment),e.uvOffset.copy(this.uvOffset),e}}},"./src/WebGL/materials/StickImposterMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{StickImposterMaterial:()=>s});var i=r("./src/WebGL/materials/ImposterMaterial.ts");class s extends i.ImposterMaterial{constructor(e){super(e),this.shaderID="stickimposter",this.setValues(e)}clone(e=new s){return super.clone.call(this,e),e}}},"./src/WebGL/materials/StickImposterOutlineMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{StickImposterOutlineMaterial:()=>n});var i=r("./src/colors.ts"),s=r("./src/WebGL/materials/ImposterMaterial.ts");class n extends s.ImposterMaterial{constructor(e={}){super(e),this.shaderID="stickimposteroutline",this.outlineColor=new i.Color(0,0,0),this.outlineWidth=.1,this.outlinePushback=1,e.color&&(this.outlineColor=e.color),e.width&&(this.outlineWidth=e.width),e.pushback&&(this.outlinePushback=e.pushback),this.setValues(e)}clone(e=new n){return super.clone.call(this,e),e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.outlinePushback=this.outlinePushback,e}}},"./src/WebGL/materials/VolumetricMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{VolumetricMaterial:()=>o});var i=r("./src/WebGL/constants/Sides.ts"),s=r("./src/colors.ts"),n=r("./src/WebGL/materials/Material.ts");class o extends n.Material{constructor(e){super(),this.transparent=!1,this.volumetric=!0,this.color=new s.Color(16777215),this.transferfn=null,this.map=void 0,this.extent=[],this.maxdepth=100,this.unit=0,this.texmatrix=null,this.transfermin=-1,this.transfermax=1,this.subsamples=5,this.shaderID="volumetric",this.side=i.FrontSide,this.setValues(e)}clone(e=new o){return super.clone.call(this,e),e.transparent=this.transparent,e.volumetric=this.volumetric,e.color=this.color,e.transferfn=this.transferfn,e.map=this.map,e.extent=this.extent,e.maxdepth=this.maxdepth,e.unit=this.unit,e.texmatrix=this.texmatrix,e.transfermin=this.transfermin,e.transfermax=this.transfermax,e.subsamples=this.subsamples,e.shaderID=this.shaderID,e.side=this.side,e}}},"./src/WebGL/materials/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{ImposterMaterial:()=>i.ImposterMaterial,InstancedMaterial:()=>s.InstancedMaterial,LineBasicMaterial:()=>n.LineBasicMaterial,Material:()=>o.Material,MaterialIdCount:()=>o.MaterialIdCount,MeshDoubleLambertMaterial:()=>a.MeshDoubleLambertMaterial,MeshLambertMaterial:()=>l.MeshLambertMaterial,MeshOutlineMaterial:()=>c.MeshOutlineMaterial,SphereImposterMaterial:()=>h.SphereImposterMaterial,SphereImposterOutlineMaterial:()=>u.SphereImposterOutlineMaterial,SpriteMaterial:()=>d.SpriteMaterial,StickImposterMaterial:()=>p.StickImposterMaterial,StickImposterOutlineMaterial:()=>f.StickImposterOutlineMaterial,VolumetricMaterial:()=>m.VolumetricMaterial});var i=r("./src/WebGL/materials/ImposterMaterial.ts"),s=r("./src/WebGL/materials/InstancedMaterial.ts"),n=r("./src/WebGL/materials/LineBasicMaterial.ts"),o=r("./src/WebGL/materials/Material.ts"),a=r("./src/WebGL/materials/MeshDoubleLambertMaterial.ts"),l=r("./src/WebGL/materials/MeshLambertMaterial.ts"),c=r("./src/WebGL/materials/MeshOutlineMaterial.ts"),h=r("./src/WebGL/materials/SphereImposterMaterial.ts"),u=r("./src/WebGL/materials/SphereImposterOutlineMaterial.ts"),d=r("./src/WebGL/materials/SpriteMaterial.ts"),p=r("./src/WebGL/materials/StickImposterMaterial.ts"),f=r("./src/WebGL/materials/StickImposterOutlineMaterial.ts"),m=r("./src/WebGL/materials/VolumetricMaterial.ts")},"./src/WebGL/math/Quaternion.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Quaternion:()=>i});class i{constructor(e,t,r,i){this.x=e||0,this.y=t||0,this.z=r||0,this.w=void 0!==i?i:1}set(e,t,r,i){return this.x=e,this.y=t,this.z=r,this.w=i,this}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this}conjugate(){return this.x*=-1,this.y*=-1,this.z*=-1,this}inverse(){return this.conjugate().normalize()}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}lengthxyz(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}normalize(){let e=this.length();return 0===e?(this.x=0,this.y=0,this.z=0,this.w=1):(e=1/e,this.x*=e,this.y*=e,this.z*=e,this.w*=e),this}multiply(e){return this.multiplyQuaternions(this,e)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}multiplyQuaternions(e,t){const r=e.x,i=e.y,s=e.z,n=e.w,o=t.x,a=t.y,l=t.z,c=t.w;return this.x=r*c+n*o+i*l-s*a,this.y=i*c+n*a+s*o-r*l,this.z=s*c+n*l+r*a-i*o,this.w=n*c-r*o-i*a-s*l,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}clone(){return new i(this.x,this.y,this.z,this.w)}setFromEuler(e){const t=Math.cos(e.x/2),r=Math.cos(e.y/2),i=Math.cos(e.z/2),s=Math.sin(e.x/2),n=Math.sin(e.y/2),o=Math.sin(e.z/2);return this.x=s*r*i+t*n*o,this.y=t*n*i-s*r*o,this.z=t*r*o+s*n*i,this.w=t*r*i-s*n*o,this}}},"./src/WebGL/math/Vector2.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Vector2:()=>i});class i{constructor(e,t){this.x=e||0,this.y=t||0}set(e,t){return this.x=e,this.y=t,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}copy(e){return this.x=e.x,this.y=e.y,this}clone(){return new i(this.x,this.y)}}},"./src/WebGL/math/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Matrix3:()=>l.Matrix3,Matrix4:()=>l.Matrix4,Quaternion:()=>i.Quaternion,Ray:()=>l.Ray,Vector2:()=>s.Vector2,Vector3:()=>l.Vector3,clamp:()=>n.clamp,conversionMatrix3:()=>o.conversionMatrix3,degToRad:()=>a.degToRad});var i=r("./src/WebGL/math/Quaternion.ts"),s=r("./src/WebGL/math/Vector2.ts"),n=r("./src/WebGL/math/utils/clamp.ts"),o=r("./src/WebGL/math/utils/conversionMatrix3.ts"),a=r("./src/WebGL/math/utils/degToRad.ts"),l=r("./src/WebGL/math/math.ts")},"./src/WebGL/math/math.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Matrix3:()=>d,Matrix4:()=>h,Ray:()=>p,Vector3:()=>u});var i,s,n,o,a,l=r("./src/WebGL/math/utils/degToRad.ts"),c=r("./src/WebGL/math/utils/clamp.ts");class h{constructor(e=1,t=0,r=0,i=0,s=0,n=1,o=0,a=0,l=0,c=0,h=1,u=0,d=0,p=0,f=0,m=1){void 0!==e&&"number"!=typeof e?this.elements=new Float32Array(e):(this.elements=new Float32Array(16),this.elements[0]=e,this.elements[4]=t,this.elements[8]=r,this.elements[12]=i,this.elements[1]=s,this.elements[5]=n,this.elements[9]=o,this.elements[13]=a,this.elements[2]=l,this.elements[6]=c,this.elements[10]=h,this.elements[14]=u,this.elements[3]=d,this.elements[7]=p,this.elements[11]=f,this.elements[15]=m)}makeScale(e,t,r){throw new Error("Method not implemented.")}set(e,t,r,i,s,n,o,a,l,c,h,u,d,p,f,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=r,g[12]=i,g[1]=s,g[5]=n,g[9]=o,g[13]=a,g[2]=l,g[6]=c,g[10]=h,g[14]=u,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}copy(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15]),this}matrix3FromTopLeft(){const e=this.elements;return new d(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10])}setRotationFromEuler(e,t){const r=this.elements,{x:i,y:s,z:n}=e,o=Math.cos(i),a=Math.sin(i),l=Math.cos(s),c=Math.sin(s),h=Math.cos(n),u=Math.sin(n);if(void 0===t||"XYZ"===t){const e=o*h,t=o*u,i=a*h,s=a*u;r[0]=l*h,r[4]=-l*u,r[8]=c,r[1]=t+i*c,r[5]=e-s*c,r[9]=-a*l,r[2]=s-e*c,r[6]=i+t*c,r[10]=o*l}else console.error(`Error with matrix4 setRotationFromEuler. Order: ${t}`);return this}setRotationFromQuaternion(e){const t=this.elements,{x:r,y:i,z:s,w:n}=e,o=r+r,a=i+i,l=s+s,c=r*o,h=r*a,u=r*l,d=i*a,p=i*l,f=s*l,m=n*o,g=n*a,v=n*l;return t[0]=1-(d+f),t[4]=h-v,t[8]=u+g,t[1]=h+v,t[5]=1-(c+f),t[9]=p-m,t[2]=u-g,t[6]=p+m,t[10]=1-(c+d),this}multiplyMatrices(e,t){const r=e.elements,i=t.elements,s=this.elements,n=r[0],o=r[4],a=r[8],l=r[12],c=r[1],h=r[5],u=r[9],d=r[13],p=r[2],f=r[6],m=r[10],g=r[14],v=r[3],b=r[7],y=r[11],_=r[15],w=i[0],x=i[4],S=i[8],A=i[12],C=i[1],M=i[5],L=i[9],E=i[13],z=i[2],k=i[6],O=i[10],T=i[14],I=i[3],F=i[7],D=i[11],R=i[15];return s[0]=n*w+o*C+a*z+l*I,s[4]=n*x+o*M+a*k+l*F,s[8]=n*S+o*L+a*O+l*D,s[12]=n*A+o*E+a*T+l*R,s[1]=c*w+h*C+u*z+d*I,s[5]=c*x+h*M+u*k+d*F,s[9]=c*S+h*L+u*O+d*D,s[13]=c*A+h*E+u*T+d*R,s[2]=p*w+f*C+m*z+g*I,s[6]=p*x+f*M+m*k+g*F,s[10]=p*S+f*L+m*O+g*D,s[14]=p*A+f*E+m*T+g*R,s[3]=v*w+b*C+y*z+_*I,s[7]=v*x+b*M+y*k+_*F,s[11]=v*S+b*L+y*O+_*D,s[15]=v*A+b*E+y*T+_*R,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}makeTranslation(e,t,r){return this.set(1,0,0,e,0,1,0,t,0,0,1,r,0,0,0,1),this}snap(e){e||(e=4);const t=Math.pow(10,4),r=this.elements;for(let e=0;e<16;e++){const i=Math.round(r[e]);i===Math.round(r[e]*t)/t&&(r[e]=i)}return this}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e){const t=this.elements;return t[12]=e.x,t[13]=e.y,t[14]=e.z,this}translate(e){const t=this.elements;return t[12]+=e.x,t[13]+=e.y,t[14]+=e.z,this}getInverse(e,t){const r=this.elements,i=e.elements,s=i[0],n=i[4],o=i[8],a=i[12],l=i[1],c=i[5],h=i[9],u=i[13],d=i[2],p=i[6],f=i[10],m=i[14],g=i[3],v=i[7],b=i[11],y=i[15];r[0]=h*m*v-u*f*v+u*p*b-c*m*b-h*p*y+c*f*y,r[4]=a*f*v-o*m*v-a*p*b+n*m*b+o*p*y-n*f*y,r[8]=o*u*v-a*h*v+a*c*b-n*u*b-o*c*y+n*h*y,r[12]=a*h*p-o*u*p-a*c*f+n*u*f+o*c*m-n*h*m,r[1]=u*f*g-h*m*g-u*d*b+l*m*b+h*d*y-l*f*y,r[5]=o*m*g-a*f*g+a*d*b-s*m*b-o*d*y+s*f*y,r[9]=a*h*g-o*u*g-a*l*b+s*u*b+o*l*y-s*h*y,r[13]=o*u*d-a*h*d+a*l*f-s*u*f-o*l*m+s*h*m,r[2]=c*m*g-u*p*g+u*d*v-l*m*v-c*d*y+l*p*y,r[6]=a*p*g-n*m*g-a*d*v+s*m*v+n*d*y-s*p*y,r[10]=n*u*g-a*c*g+a*l*v-s*u*v-n*l*y+s*c*y,r[14]=a*c*d-n*u*d-a*l*p+s*u*p+n*l*m-s*c*m,r[3]=h*p*g-c*f*g-h*d*v+l*f*v+c*d*b-l*p*b,r[7]=n*f*g-o*p*g+o*d*v-s*f*v-n*d*b+s*p*b,r[11]=o*c*g-n*h*g-o*l*v+s*h*v+n*l*b-s*c*b,r[15]=n*h*d-o*c*d+o*l*p-s*h*p-n*l*f+s*c*f;const _=s*r[0]+l*r[4]+d*r[8]+g*r[12];if(0===_){const e="Matrix4.getInverse(): can't invert matrix, determinant is 0";if(t)throw new Error(e);return console.warn(e),this.identity(),this}return this.multiplyScalar(1/_),this}isReflected(){const e=this.elements,t=e[0],r=e[4],i=e[8],s=e[1],n=e[5],o=e[9],a=e[2],l=e[6],c=e[10];return t*n*c+s*l*i+a*r*o-a*n*i-s*r*c-t*l*o<0}scale(e){const t=this.elements,{x:r}=e,{y:i}=e,{z:s}=e;return t[0]*=r,t[4]*=i,t[8]*=s,t[1]*=r,t[5]*=i,t[9]*=s,t[2]*=r,t[6]*=i,t[10]*=s,t[3]*=r,t[7]*=i,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,Math.max(r,i)))}makeFrustum(e,t,r,i,s,n){const o=this.elements,a=2*s/(t-e),l=2*s/(i-r),c=(t+e)/(t-e),h=(i+r)/(i-r),u=-(n+s)/(n-s),d=-2*n*s/(n-s);return o[0]=a,o[4]=0,o[8]=c,o[12]=0,o[1]=0,o[5]=l,o[9]=h,o[13]=0,o[2]=0,o[6]=0,o[10]=u,o[14]=d,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makePerspective(e,t,r,i){const s=r*Math.tan((0,l.degToRad)(.5*e)),n=-s,o=n*t,a=s*t;return this.makeFrustum(o,a,n,s,r,i)}makeOrthographic(e,t,r,i,s,n){const o=this.elements,a=1/(t-e),l=1/(r-i),c=1/(n-s),h=(t+e)*a,u=(r+i)*l,d=(n+s)*c;return o[0]=2*a,o[4]=0,o[8]=0,o[12]=-h,o[1]=0,o[5]=2*l,o[9]=0,o[13]=-u,o[2]=0,o[6]=0,o[10]=-2*c,o[14]=-d,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}isEqual(e){const t=e.elements,r=this.elements;return r[0]===t[0]&&r[4]===t[4]&&r[8]===t[8]&&r[12]===t[12]&&r[1]===t[1]&&r[5]===t[5]&&r[9]===t[9]&&r[13]===t[13]&&r[2]===t[2]&&r[6]===t[6]&&r[10]===t[10]&&r[14]===t[14]&&r[3]===t[3]&&r[7]===t[7]&&r[11]===t[11]&&r[15]===t[15]}clone(){const e=this.elements;return new h(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])}isIdentity(){const e=this.elements;return 1===e[0]&&0===e[4]&&0===e[8]&&0===e[12]&&0===e[1]&&1===e[5]&&0===e[9]&&0===e[13]&&0===e[2]&&0===e[6]&&1===e[10]&&0===e[14]&&0===e[3]&&0===e[7]&&0===e[11]&&1===e[15]}isNearlyIdentity(e){return this.clone().snap(e).isIdentity()}getScale(e){const t=this.elements;return e=e||new u,n.set(t[0],t[1],t[2]),o.set(t[4],t[5],t[6]),a.set(t[8],t[9],t[10]),e.x=n.length(),e.y=o.length(),e.z=a.length(),e}lookAt(e,t,r){const i=this.elements;return a.subVectors(e,t).normalize(),0===a.length()&&(a.z=1),n.crossVectors(r,a).normalize(),0===n.length()&&(a.x+=1e-4,n.crossVectors(r,a).normalize()),o.crossVectors(a,n),i[0]=n.x,i[4]=o.x,i[8]=a.x,i[1]=n.y,i[5]=o.y,i[9]=a.y,i[2]=n.z,i[6]=o.z,i[10]=a.z,this}compose(e,t,r){const n=this.elements;return i.identity(),i.setRotationFromQuaternion(t),s.makeScale(r.x,r.y,r.z),this.multiplyMatrices(i,s),n[12]=e.x,n[13]=e.y,n[14]=e.z,this}}i=new h,s=new h;class u{constructor(e,t,r){this.x=e||0,this.y=t||0,this.z=r||0,this.atomid=void 0}set(e,t,r){return this.x=e,this.y=t,this.z=r,this}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}divideScalar(e){return 0!==e?(this.x/=e,this.y/=e,this.z/=e):(this.x=0,this.y=0,this.z=0),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return t*t+r*r+i*i}applyMatrix3(e){const{x:t}=this,{y:r}=this,{z:i}=this,s=e.elements;return this.x=s[0]*t+s[3]*r+s[6]*i,this.y=s[1]*t+s[4]*r+s[7]*i,this.z=s[2]*t+s[5]*r+s[8]*i,this}applyMatrix4(e){const{x:t}=this,{y:r}=this,{z:i}=this,s=e.elements;return this.x=s[0]*t+s[4]*r+s[8]*i+s[12],this.y=s[1]*t+s[5]*r+s[9]*i+s[13],this.z=s[2]*t+s[6]*r+s[10]*i+s[14],this}applyProjection(e){const{x:t}=this,{y:r}=this,{z:i}=this,s=e.elements,n=s[3]*t+s[7]*r+s[11]*i+s[15];return this.x=(s[0]*t+s[4]*r+s[8]*i+s[12])/n,this.y=(s[1]*t+s[5]*r+s[9]*i+s[13])/n,this.z=(s[2]*t+s[6]*r+s[10]*i+s[14])/n,this}applyQuaternion(e){const{x:t}=this,{y:r}=this,{z:i}=this,s=e.x,n=e.y,o=e.z,a=e.w,l={};l.x=2*(r*o-i*n),l.y=2*(i*s-t*o),l.z=2*(t*n-r*s);const c={};return c.x=l.y*o-l.z*n,c.y=l.z*s-l.x*o,c.z=l.x*n-l.y*s,this.x=t+a*l.x+c.x,this.y=r+a*l.y+c.y,this.z=i+a*l.z+c.z,this}negate(){return this.multiplyScalar(-1)}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}normalize(){return this.divideScalar(this.length())}cross(e){const{x:t}=this,{y:r}=this,{z:i}=this;return this.x=r*e.z-i*e.y,this.y=i*e.x-t*e.z,this.z=t*e.y-r*e.x,this}crossVectors(e,t){return this.x=e.y*t.z-e.z*t.y,this.y=e.z*t.x-e.x*t.z,this.z=e.x*t.y-e.y*t.x,this}equals(e){return this.x==e.x&&this.y==e.y&&this.z==e.z}getPositionFromMatrix(e){return this.x=e.elements[12],this.y=e.elements[13],this.z=e.elements[14],this}setEulerFromRotationMatrix(e,t){const r=e.elements,i=r[0],s=r[4],n=r[8],o=r[5],a=r[9],l=r[6],h=r[10];return void 0===t||"XYZ"===t?(this.y=Math.asin((0,c.clamp)(n,-1,1)),Math.abs(n)<.99999?(this.x=Math.atan2(-a,h),this.z=Math.atan2(-s,i)):(this.x=Math.atan2(l,o),this.z=0)):console.error(`Error with vector's setEulerFromRotationMatrix: Unknown order: ${t}`),this}rotateAboutVector(e,t){e.normalize();const r=Math.cos(t),i=Math.sin(t),s=this.clone().multiplyScalar(r),n=e.clone().cross(this).multiplyScalar(i),o=e.clone().multiplyScalar(e.clone().dot(this)).multiplyScalar(1-r),a=s.add(n).add(o);return this.x=a.x,this.y=a.y,this.z=a.z,this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}transformDirection(e){const{x:t}=this,{y:r}=this,{z:i}=this,s=e.elements;return this.x=s[0]*t+s[4]*r+s[8]*i,this.y=s[1]*t+s[5]*r+s[9]*i,this.z=s[2]*t+s[6]*r+s[10]*i,this.normalize()}clone(){return new u(this.x,this.y,this.z)}unproject(e){const t=i;return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}n=new u,o=new u,a=new u;class d{constructor(e=1,t=0,r=0,i=0,s=1,n=0,o=0,a=0,l=1){this.elements=new Float32Array(9),this.set(e,t,r,i,s,n,o,a,l)}set(e,t,r,i,s,n,o,a,l){const c=this.elements;return c[0]=e,c[3]=t,c[6]=r,c[1]=i,c[4]=s,c[7]=n,c[2]=o,c[5]=a,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=e.elements;this.set(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8])}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}getInverse3(e){const t=e.elements,r=this.elements;r[0]=t[4]*t[8]-t[5]*t[7],r[3]=t[6]*t[5]-t[3]*t[8],r[6]=t[3]*t[7]-t[6]*t[4],r[1]=t[7]*t[2]-t[1]*t[8],r[4]=t[0]*t[8]-t[6]*t[2],r[7]=t[1]*t[6]-t[0]*t[7],r[2]=t[1]*t[5]-t[2]*t[4],r[5]=t[2]*t[3]-t[0]*t[5],r[8]=t[0]*t[4]-t[1]*t[3];const i=t[0]*r[0]+t[3]*r[1]+t[6]*r[2];return this.multiplyScalar(1/i),this}getInverse(e,t){const r=e.elements,i=this.elements;i[0]=r[10]*r[5]-r[6]*r[9],i[1]=-r[10]*r[1]+r[2]*r[9],i[2]=r[6]*r[1]-r[2]*r[5],i[3]=-r[10]*r[4]+r[6]*r[8],i[4]=r[10]*r[0]-r[2]*r[8],i[5]=-r[6]*r[0]+r[2]*r[4],i[6]=r[9]*r[4]-r[5]*r[8],i[7]=-r[9]*r[0]+r[1]*r[8],i[8]=r[5]*r[0]-r[1]*r[4];const s=r[0]*i[0]+r[1]*i[3]+r[2]*i[6];if(0===s){const e="Matrix3.getInverse(): can't invert matrix, determinant is 0";if(t)throw new Error(e);return console.warn(e),this.identity(),this}return this.multiplyScalar(1/s),this}getDeterminant(){const e=this.elements;return e[0]*e[4]*e[8]+e[1]*e[5]*e[6]+e[2]*e[3]*e[7]-e[2]*e[4]*e[6]-e[1]*e[3]*e[8]-e[0]*e[5]*e[7]}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}clone(){const e=this.elements;return new d(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])}getMatrix4(){const e=this.elements;return new h(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0)}}class p{constructor(e,t){this.origin=void 0!==e?e:new u,this.direction=void 0!==t?t:new u}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return(t||new u).copy(this.direction).multiplyScalar(e).add(this.origin)}recast(e){const t=n;return this.origin.copy(this.at(e,t)),this}closestPointToPoint(e,t){const r=t||new u;r.subVectors(e,this.origin);const i=r.dot(this.direction);return r.copy(this.direction).multiplyScalar(i).add(this.origin)}distanceToPoint(e){const t=n,r=t.subVectors(e,this.origin).dot(this.direction);return t.copy(this.direction).multiplyScalar(r).add(this.origin),t.distanceTo(e)}isIntersectionCylinder(){}isIntersectionSphere(e){return this.distanceToPoint(e.center)<=e.radius}isIntersectionPlane(e){return 0!==e.normal.dot(this.direction)||0===e.distanceToPoint(this.origin)}distanceToPlane(e){const t=e.normal.dot(this.direction);return 0===t?0===e.distanceToPoint(this.origin)?0:void 0:-(this.origin.dot(e.normal)+e.constant)/t}intersectPlane(e,t){const r=this.distanceToPlane(e);if(void 0!==r)return this.at(r,t)}applyMatrix4(e){return this.direction.add(this.origin).applyMatrix4(e),this.origin.applyMatrix4(e),this.direction.sub(this.origin),this}clone(){return(new p).copy(this)}}},"./src/WebGL/math/utils/clamp.ts":(e,t,r)=>{"use strict";function i(e,t,r){return Math.min(Math.max(e,t),r)}r.r(t),r.d(t,{clamp:()=>i})},"./src/WebGL/math/utils/conversionMatrix3.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{conversionMatrix3:()=>s});var i=r("./src/WebGL/math/math.ts");function s(e,t,r,s,n,o){s=s*Math.PI/180,n=n*Math.PI/180,o=o*Math.PI/180;const a=e=>e*e,l=Math.cos(s),c=Math.cos(n),h=Math.cos(o),u=Math.sin(o);return new i.Matrix3(e,t*h,r*c,0,t*u,r*(l-c*h)/u,0,0,r*Math.sqrt(1-a(l)-a(c)-a(h)+2*l*c*h)/u)}},"./src/WebGL/math/utils/degToRad.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{degToRad:()=>s});const i=Math.PI/180;function s(e){return e*i}},"./src/WebGL/objects/Line.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Line:()=>o,LineStyle:()=>i});var i,s=r("./src/WebGL/materials/index.ts"),n=r("./src/WebGL/core/index.ts");!function(e){e[e.LineStrip=0]="LineStrip",e[e.LinePieces=1]="LinePieces"}(i||(i={}));class o extends n.Object3D{constructor(e,t=new s.LineBasicMaterial({color:16777215*Math.random()}),r=i.LineStrip){super(),this.geometry=e,this.material=t,this.type=r}clone(e=new o(this.geometry,this.material,this.type)){return super.clone.call(this,e),e}}},"./src/WebGL/objects/Mesh.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Mesh:()=>s});var i=r("./src/WebGL/core/index.ts");class s extends i.Object3D{constructor(e,t){super(),this.geometry=e,this.material=t}clone(e){return void 0===e&&(e=new s(this.geometry,this.material)),super.clone.call(this,e),e}}},"./src/WebGL/objects/Sprite.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Sprite:()=>n});var i=r("./src/WebGL/materials/index.ts"),s=r("./src/WebGL/core/index.ts");class n extends s.Object3D{constructor(e=new i.SpriteMaterial){super(),this.material=e,this.rotation3d=this.rotation,this.rotation=0}updateMatrix(){this.matrix.setPosition(this.position),this.rotation3d.set(0,0,this.rotation),this.matrix.setRotationFromEuler(this.rotation3d),1===this.scale.x&&1===this.scale.y||this.matrix.scale(this.scale),this.matrixWorldNeedsUpdate=!0}clone(e=new n(this.material)){return s.Object3D.prototype.clone.call(this,e),e}}},"./src/WebGL/objects/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Line:()=>i.Line,LineStyle:()=>i.LineStyle,Mesh:()=>s.Mesh,Sprite:()=>n.Sprite});var i=r("./src/WebGL/objects/Line.ts"),s=r("./src/WebGL/objects/Mesh.ts"),n=r("./src/WebGL/objects/Sprite.ts")},"./src/WebGL/shaders/ShaderType.ts":(e,t,r)=>{"use strict";r.r(t)},"./src/WebGL/shaders/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{ShaderLib:()=>i.ShaderLib,ShaderUtils:()=>s.ShaderUtils,basic:()=>i.basic,clone:()=>s.clone,instanced:()=>i.instanced,lambert:()=>i.lambert,lambertdouble:()=>i.lambertdouble,outline:()=>i.outline,screen:()=>i.screen,screenaa:()=>i.screenaa,sphereimposter:()=>i.sphereimposter,sphereimposteroutline:()=>i.sphereimposteroutline,sprite:()=>i.sprite,stickimposter:()=>i.stickimposter,stickimposteroutline:()=>i.stickimposteroutline,volumetric:()=>i.volumetric});var i=r("./src/WebGL/shaders/lib/index.ts"),s=r("./src/WebGL/shaders/utils/index.ts");r("./src/WebGL/shaders/ShaderType.ts")},"./src/WebGL/shaders/lib/basic/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{basic:()=>n});var i=r("./src/WebGL/shaders/lib/basic/uniforms.ts"),s=r("./src/WebGL/shaders/lib/basic/basic.frag");const n={vertexShader:r("./src/WebGL/shaders/lib/basic/basic.vert").default.replace("#define GLSLIFY 1",""),fragmentShader:s.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/basic/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3}}},"./src/WebGL/shaders/lib/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{ShaderLib:()=>g,basic:()=>i.basic,instanced:()=>s.instanced,lambert:()=>n.lambert,lambertdouble:()=>o.lambertdouble,outline:()=>a.outline,screen:()=>l.screen,screenaa:()=>c.screenaa,sphereimposter:()=>h.sphereimposter,sphereimposteroutline:()=>u.sphereimposteroutline,sprite:()=>d.sprite,stickimposter:()=>p.stickimposter,stickimposteroutline:()=>f.stickimposteroutline,volumetric:()=>m.volumetric});var i=r("./src/WebGL/shaders/lib/basic/index.ts"),s=r("./src/WebGL/shaders/lib/instanced/index.ts"),n=r("./src/WebGL/shaders/lib/lambert/index.ts"),o=r("./src/WebGL/shaders/lib/lambertdouble/index.ts"),a=r("./src/WebGL/shaders/lib/outline/index.ts"),l=r("./src/WebGL/shaders/lib/screen/index.ts"),c=r("./src/WebGL/shaders/lib/screenaa/index.ts"),h=r("./src/WebGL/shaders/lib/sphereimposter/index.ts"),u=r("./src/WebGL/shaders/lib/sphereimposteroutline/index.ts"),d=r("./src/WebGL/shaders/lib/sprite/index.ts"),p=r("./src/WebGL/shaders/lib/stickimposter/index.ts"),f=r("./src/WebGL/shaders/lib/stickimposteroutline/index.ts"),m=r("./src/WebGL/shaders/lib/volumetric/index.ts");const g={basic:i.basic,instanced:s.instanced,lambert:n.lambert,lambertdouble:o.lambertdouble,outline:a.outline,screen:l.screen,screenaa:c.screenaa,sphereimposter:h.sphereimposter,sphereimposteroutline:u.sphereimposteroutline,sprite:d.sprite,stickimposter:p.stickimposter,stickimposteroutline:f.stickimposteroutline,volumetric:m.volumetric}},"./src/WebGL/shaders/lib/instanced/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{instanced:()=>o});var i=r("./src/WebGL/shaders/lib/instanced/uniforms.ts"),s=r("./src/WebGL/shaders/lib/instanced/instanced.frag"),n=r("./src/WebGL/shaders/lib/instanced/instanced.vert");const o={fragmentShader:s.default.replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/instanced/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/lambert/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{lambert:()=>o});var i=r("./src/WebGL/shaders/lib/lambert/uniforms.ts"),s=r("./src/WebGL/shaders/lib/lambert/lambert.frag"),n=r("./src/WebGL/shaders/lib/lambert/lambert.vert");const o={fragmentShader:s.default.replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/lambert/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/lambertdouble/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{lambertdouble:()=>o});var i=r("./src/WebGL/shaders/lib/lambertdouble/uniforms.ts"),s=r("./src/WebGL/shaders/lib/lambertdouble/lambertdouble.frag"),n=r("./src/WebGL/shaders/lib/lambertdouble/lambertdouble.vert");const o={fragmentShader:s.default.replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/lambertdouble/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/outline/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{outline:()=>o});var i=r("./src/WebGL/shaders/lib/outline/uniforms.ts"),s=r("./src/WebGL/shaders/lib/outline/outline.frag"),n=r("./src/WebGL/shaders/lib/outline/outline.vert");const o={fragmentShader:s.default.replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/outline/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>s});var i=r("./src/colors.ts");const s={opacity:{type:"f",value:1},outlineColor:{type:"c",value:new i.Color(0,0,0)},fogColor:{type:"c",value:new i.Color(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},outlineWidth:{type:"f",value:.1},outlinePushback:{type:"f",value:1}}},"./src/WebGL/shaders/lib/screen/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{screen:()=>o});var i=r("./src/WebGL/shaders/lib/screen/uniforms.ts"),s=r("./src/WebGL/shaders/lib/screen/screen.frag"),n=r("./src/WebGL/shaders/lib/screen/screen.vert");const o={fragmentShader:s.default.replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/screen/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={}},"./src/WebGL/shaders/lib/screenaa/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{screenaa:()=>o});var i=r("./src/WebGL/shaders/lib/screenaa/uniforms.ts"),s=r("./src/WebGL/shaders/lib/screenaa/screenaa.frag"),n=r("./src/WebGL/shaders/lib/screenaa/screenaa.vert");const o={fragmentShader:s.default.replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/screenaa/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={}},"./src/WebGL/shaders/lib/sphereimposter/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{sphereimposter:()=>n});var i=r("./src/WebGL/shaders/lib/sphereimposter/uniforms.ts"),s=r("./src/WebGL/shaders/lib/sphereimposter/sphereimposter.frag");const n={vertexShader:r("./src/WebGL/shaders/lib/sphereimposter/sphereimposter.vert").default.replace("#define GLSLIFY 1",""),fragmentShader:s.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/sphereimposter/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/sphereimposteroutline/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{sphereimposteroutline:()=>o});var i=r("./src/WebGL/shaders/lib/sphereimposteroutline/uniforms.ts"),s=r("./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.frag"),n=r("./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.vert");const o={fragmentShader:s.default.replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/sphereimposteroutline/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>s});var i=r("./src/colors.ts");const s={opacity:{type:"f",value:1},outlineColor:{type:"c",value:new i.Color(0,0,0)},fogColor:{type:"c",value:new i.Color(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},outlineWidth:{type:"f",value:.1},outlinePushback:{type:"f",value:1}}},"./src/WebGL/shaders/lib/sprite/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{sprite:()=>o});var i=r("./src/WebGL/shaders/lib/sprite/uniforms.ts"),s=r("./src/WebGL/shaders/lib/sprite/sprite.frag"),n=r("./src/WebGL/shaders/lib/sprite/sprite.vert");const o={fragmentShader:s.default.replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/sprite/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={}},"./src/WebGL/shaders/lib/stickimposter/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{stickimposter:()=>a});var i=r("./src/WebGL/shaders/lib/stickimposter/uniforms.ts"),s=r("./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag"),n=r("./src/WebGL/shaders/lib/stickimposter/stickimposter.partial.frag"),o=r("./src/WebGL/shaders/lib/stickimposter/stickimposter.vert");const a={fragmentShader:[s.default,n.default].join("\n").replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/stickimposter/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/stickimposteroutline/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{stickimposteroutline:()=>o});var i=r("./src/WebGL/shaders/lib/stickimposteroutline/uniforms.ts"),s=r("./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag"),n=r("./src/WebGL/shaders/lib/stickimposteroutline/stickimposteroutline.vert");const o={fragmentShader:(s.default+"gl_FragColor = vec4(color,1.0);}").replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/stickimposteroutline/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>s});var i=r("./src/colors.ts");const s={opacity:{type:"f",value:1},fogColor:{type:"c",value:new i.Color(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},outlineColor:{type:"c",value:new i.Color(0,0,0)},outlineWidth:{type:"f",value:.1},outlinePushback:{type:"f",value:1}}},"./src/WebGL/shaders/lib/volumetric/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{volumetric:()=>o});var i=r("./src/WebGL/shaders/lib/volumetric/uniforms.ts"),s=r("./src/WebGL/shaders/lib/volumetric/volumetric.frag"),n=r("./src/WebGL/shaders/lib/volumetric/volumetric.vert");const o={fragmentShader:s.default.replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/volumetric/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},data:{type:"i",value:3},colormap:{type:"i",value:4},depthmap:{type:"i",value:5},step:{type:"f",value:1},maxdepth:{type:"f",value:100},subsamples:{type:"f",value:5},textmat:{type:"mat4",value:[]},projinv:{type:"mat4",value:[]},transfermin:{type:"f",value:-.2},transfermax:{type:"f",value:.2}}},"./src/WebGL/shaders/utils/clone.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{clone:()=>s});var i=r("./src/colors.ts");function s(e){let t={};for(const s in e){t[s]={},t[s].type=e[s].type;var r=e[s].value;r instanceof i.Color?t[s].value=r.clone():"number"==typeof r?t[s].value=r:r instanceof Array?t[s].value=[]:console.error("Error copying shader uniforms from ShaderLib: unknown type for uniform")}return t}},"./src/WebGL/shaders/utils/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{ShaderUtils:()=>n,clone:()=>i.clone});var i=r("./src/WebGL/shaders/utils/clone.ts"),s=r("./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag");const n={clone:i.clone,stickimposterFragmentShader:s.default}},"./src/WebGL/shapes/Cylinder.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Cylinder:()=>n});var i=r("./src/WebGL/math/index.ts");let s=new i.Vector3;class n{constructor(e=new i.Vector3,t=new i.Vector3,r=0){this.c1=e,this.c2=t,this.radius=r,this.direction=(new i.Vector3).subVectors(this.c2,this.c1).normalize()}copy(e){return this.c1.copy(e.c1),this.c2.copy(e.c2),this.direction.copy(e.direction),this.radius=e.radius,this}lengthSq(){return s.subVectors(this.c2,this.c1).lengthSq()}applyMatrix4(e){return this.direction.add(this.c1).applyMatrix4(e),this.c1.applyMatrix4(e),this.c2.applyMatrix4(e),this.direction.sub(this.c1).normalize(),this.radius=this.radius*e.getMaxScaleOnAxis(),this}}},"./src/WebGL/shapes/Sphere.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Sphere:()=>s});var i=r("./src/WebGL/math/index.ts");class s{constructor(e={x:0,y:0,z:0},t=0){this.center=new i.Vector3(e.x,e.y,e.z),this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new s).copy(this)}}},"./src/WebGL/shapes/Triangle.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Triangle:()=>n});var i=r("./src/WebGL/math/index.ts");const s=new i.Vector3;class n{constructor(e=new i.Vector3,t=new i.Vector3,r=new i.Vector3){this.a=e,this.b=t,this.c=r}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}applyMatrix4(e){return this.a.applyMatrix4(e),this.b.applyMatrix4(e),this.c.applyMatrix4(e),this}getNormal(){var e=this.a.clone();return e.sub(this.b),s.subVectors(this.c,this.b),e.cross(s),e.normalize(),e}}},"./src/WebGL/shapes/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Cylinder:()=>s.Cylinder,Sphere:()=>i.Sphere,Triangle:()=>n.Triangle});var i=r("./src/WebGL/shapes/Sphere.ts"),s=r("./src/WebGL/shapes/Cylinder.ts"),n=r("./src/WebGL/shapes/Triangle.ts")},"./src/autoload.ts":(__unused_webpack_module,__nested_webpack_exports__,__nested_webpack_require_891473__)=>{"use strict";__nested_webpack_require_891473__.r(__nested_webpack_exports__),__nested_webpack_require_891473__.d(__nested_webpack_exports__,{autoinit:()=>autoinit,autoload:()=>autoload,processing_autoinit:()=>processing_autoinit,viewers:()=>viewers});var _GLViewer__WEBPACK_IMPORTED_MODULE_0__=__nested_webpack_require_891473__("./src/GLViewer.ts"),_ProteinSurface4__WEBPACK_IMPORTED_MODULE_1__=__nested_webpack_require_891473__("./src/ProteinSurface4.ts"),_utilities__WEBPACK_IMPORTED_MODULE_2__=__nested_webpack_require_891473__("./src/utilities.ts"),_colors__WEBPACK_IMPORTED_MODULE_3__=__nested_webpack_require_891473__("./src/colors.ts"),autoinit=!1,processing_autoinit=!1,viewers={};function autoload(viewer,callback){var i,dataname,type;if(null!=document.querySelector(".viewer_3Dmoljs")&&(autoinit=!0),autoinit){processing_autoinit=!0,viewer=null!=viewer?viewer:null;var nviewers=0;document.querySelectorAll(".viewer_3Dmoljs").forEach((viewerdiv=>{var datauri=[],datatypes=[],uri="";"static"==viewerdiv.style.position&&(viewerdiv.style.position="relative");var UI=null;if(type=null,viewerdiv.dataset.pdb)datauri.push("https://files.rcsb.org/view/"+viewerdiv.dataset.pdb+".pdb"),datatypes.push("pdb");else if(viewerdiv.dataset.cid)datatypes.push("sdf"),datauri.push("https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"+viewerdiv.dataset.cid+"/SDF?record_type=3d");else if(viewerdiv.dataset.href||viewerdiv.dataset.url){uri=viewerdiv.dataset.href?viewerdiv.dataset.href:viewerdiv.dataset.url,datauri.push(uri),type=uri.substring(uri.lastIndexOf(".")+1),datatypes.push(type);var molName=uri.substring(uri.lastIndexOf("/")+1,uri.lastIndexOf("."));"/"==molName&&(molName=uri.substring(uri.lastIndexOf("/")+1)),viewerdiv.dataset[datatypes[datatypes.length-1]]=molName}let divdata=viewerdiv.dataset;for(i in divdata)"pdb"===i.substring(0,3)&&"pdb"!==i?(datauri.push("https://files.rcsb.org/view/"+divdata[i]+".pdb"),datatypes.push("pdb")):"href"===i.substring(0,4)&&"href"!==i?(uri=divdata[i],datauri.push(uri),datatypes.push(uri.substring(uri.lastIndexOf(".")+1))):"cid"===i.substring(0,3)&&"cid"!==i&&(datauri.push("https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"+divdata[i]+"/SDF?record_type=3d"),datatypes.push("sdf"));var options={};viewerdiv.dataset.options&&(options=(0,_utilities__WEBPACK_IMPORTED_MODULE_2__.specStringToObject)(viewerdiv.dataset.options));var bgcolor=_colors__WEBPACK_IMPORTED_MODULE_3__.CC.color(viewerdiv.dataset.backgroundcolor),bgalpha=viewerdiv.dataset.backgroundalpha;bgalpha=null==bgalpha?1:parseFloat(bgalpha);var style={line:{}};viewerdiv.dataset.style&&(style=(0,_utilities__WEBPACK_IMPORTED_MODULE_2__.specStringToObject)(viewerdiv.dataset.style));var select={};viewerdiv.dataset.select&&(select=(0,_utilities__WEBPACK_IMPORTED_MODULE_2__.specStringToObject)(viewerdiv.dataset.select));var selectstylelist=[],surfaces=[],labels=[],zoomto={},spin=null,d=viewerdiv.dataset,stylere=/style(.+)/,surfre=/surface(.*)/,reslabre=/labelres(.*)/,keys=[];for(dataname in d)Object.prototype.hasOwnProperty.call(d,dataname)&&keys.push(dataname);for(keys.sort(),i=0;i{UI.loadSurface("VDW",t,r,e)})):e.addSurface(_ProteinSurface4__WEBPACK_IMPORTED_MODULE_1__.SurfaceType.VDW,r,t,t)}for(i=0;ifunction(moldata){uri=datauri[i];var type=viewerdiv.dataset.type||viewerdiv.dataset.datatype||datatypes[i];if(glviewer.addModel(moldata,type,options),UI){var modelName=viewerdiv.dataset[datatypes[i]];UI.setModelTitle(modelName)}if(i+=1,i{"complete"===document.readyState&&autoload()}},"./src/colors.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{CC:()=>s,Color:()=>i,builtinColorSchemes:()=>u,chains:()=>h,elementColors:()=>l,htmlColors:()=>n,residues:()=>c,ssColors:()=>o});class i{constructor(e,t,r){return this.r=0,this.g=0,this.b=0,arguments.length>1&&"number"==typeof e?(this.r=e||0,this.g=t||0,this.b=r||0,this):this.set(e||0)}set(e){return e instanceof i?e.clone():("number"==typeof e?this.setHex(e):"object"==typeof e&&(this.r=(null==e?void 0:e.r)||0,this.g=(null==e?void 0:e.g)||0,this.b=(null==e?void 0:e.b)||0),this)}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this}getHex(){return Math.round(255*this.r)<<16|Math.round(255*this.g)<<8|Math.round(255*this.b)}clone(){return new i(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}scaled(){var e={};return e.r=Math.round(255*this.r),e.g=Math.round(255*this.g),e.b=Math.round(255*this.b),e.a=1,e}}class s{static color(e){if(!e)return s.cache[0];if(e instanceof i)return e;if("number"==typeof e&&void 0!==s.cache[e])return s.cache[e];if(e&&Array.isArray(e))return e.map(s.color);let t=s.getHex(e),r=new i(t);return s.cache[t]=r,r}static getHex(e){var t;if(Array.isArray(e))return e.map(s.getHex);if("string"==typeof e){let r=e;if(!isNaN(parseInt(r)))return parseInt(r);if(r=r.trim(),4==r.length&&"#"==r[0]&&(r="#"+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]),7==r.length&&"#"==r[0])return parseInt(r.substring(1),16);let i=s.rgbRegEx.exec(r);if(i){""!=i[1]&&console.log("WARNING: Opacity value in rgba ignored. Specify separately as opacity attribute.");let e=0;for(let t=2;t<5;t++){e*=256;let r=i[t].endsWith("%")?255*parseFloat(i[t])/100:parseFloat(i[t]);e+=Math.round(r)}return e}return(null===(t=null===window||void 0===window?void 0:window.$3Dmol)||void 0===t?void 0:t.htmlColors[e.toLowerCase()])||0}return e}}s.rgbRegEx=/rgb(a?)\(\s*([^ ,\)\t]+)\s*,\s*([^ ,\)\t]+)\s*,\s*([^ ,\)\t]+)/i,s.cache={0:new i(0)};const n={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,darkgrey:11119017,darkgreen:25600,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,grey:8421504,green:32768,greenyellow:11403055,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,lightgrey:13882323,lightgreen:9498256,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},o={pyMol:{h:16711680,s:16776960,c:65280},Jmol:{h:16711808,s:16762880,c:16777215}},a={H:16777215,He:16761035,HE:16761035,Li:11674146,LI:11674146,B:65280,C:13158600,N:9408511,O:15728640,F:14329120,Na:255,NA:255,Mg:2263842,MG:2263842,Al:8421520,AL:8421520,Si:14329120,SI:14329120,P:16753920,S:16762930,Cl:65280,CL:65280,Ca:8421520,CA:8421520,Ti:8421520,TI:8421520,Cr:8421520,CR:8421520,Mn:8421520,MN:8421520,Fe:16753920,FE:16753920,Ni:10824234,NI:10824234,Cu:10824234,CU:10824234,Zn:10824234,ZN:10824234,Br:10824234,BR:10824234,Ag:8421520,AG:8421520,I:10494192,Ba:16753920,BA:16753920,Au:14329120,AU:14329120},l={defaultColor:16716947,Jmol:{H:16777215,He:14286847,HE:14286847,Li:13402367,LI:13402367,Be:12779264,BE:12779264,B:16758197,C:9474192,N:3166456,O:16715021,F:9494608,Ne:11789301,NE:11789301,Na:11230450,NA:11230450,Mg:9109248,MG:9109248,Al:12560038,AL:12560038,Si:1578e4,SI:1578e4,P:16744448,S:16777008,Cl:2093087,CL:2093087,Ar:8442339,AR:8442339,K:9388244,Ca:4062976,CA:4062976,Sc:15132390,SC:15132390,Ti:12567239,TI:12567239,V:10921643,Cr:9083335,CR:9083335,Mn:10255047,MN:10255047,Fe:14706227,FE:14706227,Co:15765664,CO:15765664,Ni:5296208,NI:5296208,Cu:13140019,CU:13140019,Zn:8224944,ZN:8224944,Ga:12750735,GA:12750735,Ge:6721423,GE:6721423,As:12419299,AS:12419299,Se:16752896,SE:16752896,Br:10889513,BR:10889513,Kr:6076625,KR:6076625,Rb:7351984,RB:7351984,Sr:65280,SR:65280,Y:9764863,Zr:9756896,ZR:9756896,Nb:7586505,NB:7586505,Mo:5551541,MO:5551541,Tc:3907230,TC:3907230,Ru:2396047,RU:2396047,Rh:687500,RH:687500,Pd:27013,PD:27013,Ag:12632256,AG:12632256,Cd:16767375,CD:16767375,In:10909043,IN:10909043,Sn:6717568,SN:6717568,Sb:10380213,SB:10380213,Te:13924864,TE:13924864,I:9699476,Xe:4366e3,XE:4366e3,Cs:5707663,CS:5707663,Ba:51456,BA:51456,La:7394559,LA:7394559,Ce:16777159,CE:16777159,Pr:14286791,PR:14286791,Nd:13107143,ND:13107143,Pm:10747847,PM:10747847,Sm:9437127,SM:9437127,Eu:6422471,EU:6422471,Gd:4587463,GD:4587463,Tb:3211207,TB:3211207,Dy:2097095,DY:2097095,Ho:65436,HO:65436,Er:58997,ER:58997,Tm:54354,TM:54354,Yb:48952,YB:48952,Lu:43812,LU:43812,Hf:5096191,HF:5096191,Ta:5089023,TA:5089023,W:2200790,Re:2522539,RE:2522539,Os:2516630,OS:2516630,Ir:1528967,IR:1528967,Pt:13684960,PT:13684960,Au:16765219,AU:16765219,Hg:12105936,HG:12105936,Tl:10900557,TL:10900557,Pb:5724513,PB:5724513,Bi:10375093,BI:10375093,Po:11230208,PO:11230208,At:7688005,AT:7688005,Rn:4358806,RN:4358806,Fr:4325478,FR:4325478,Ra:32e3,RA:32e3,Ac:7384058,AC:7384058,Th:47871,TH:47871,Pa:41471,PA:41471,U:36863,Np:33023,NP:33023,Pu:27647,PU:27647,Am:5528818,AM:5528818,Cm:7888099,CM:7888099,Bk:9064419,BK:9064419,Cf:10565332,CF:10565332,Es:11739092,ES:11739092,Fm:11739066,FM:11739066,Md:11734438,MD:11734438,No:12389767,NO:12389767,Lr:13041766,LR:13041766,Rf:13369433,RF:13369433,Db:13697103,DB:13697103,Sg:14221381,SG:14221381,Bh:14680120,BH:14680120,Hs:15073326,HS:15073326,Mt:15400998,MT:15400998},rasmol:a,defaultColors:Object.assign({},a),greenCarbon:Object.assign(Object.assign({},a),{C:65280}),cyanCarbon:Object.assign(Object.assign({},a),{C:65535}),magentaCarbon:Object.assign(Object.assign({},a),{C:16711935}),yellowCarbon:Object.assign(Object.assign({},a),{C:16776960}),whiteCarbon:Object.assign(Object.assign({},a),{C:16777215}),orangeCarbon:Object.assign(Object.assign({},a),{C:16753920}),purpleCarbon:Object.assign(Object.assign({},a),{C:8388736}),blueCarbon:Object.assign(Object.assign({},a),{C:255})},c={amino:{ALA:13158600,ARG:1334015,ASN:56540,ASP:15075850,CYS:15132160,GLN:56540,GLU:15075850,GLY:15461355,HIS:8553170,ILE:1016335,LEU:1016335,LYS:1334015,MET:15132160,PHE:3289770,PRO:14456450,SER:16422400,THR:16422400,TRP:11819700,TYR:3289770,VAL:1016335,ASX:16738740,GLX:16738740},shapely:{ALA:9240460,ARG:124,ASN:16743536,ASP:10485826,CYS:16777072,GLN:16731212,GLU:6684672,GLY:16777215,HIS:7368959,ILE:19456,LEU:4546117,LYS:4671416,MET:12099650,PHE:5459026,PRO:5395026,SER:16740418,THR:12078080,TRP:5195264,TYR:9203788,VAL:16747775,ASX:16711935,GLX:16711935},nucleic:{A:10526975,G:16740464,I:8454143,C:16747595,T:10551200,U:16744576}},h={atom:{A:12636415,B:11599792,C:16761032,D:16777088,E:16761087,F:11596016,G:16765040,H:15761536,I:16113331,J:49151,K:13458524,L:6737322,M:10145074,N:15631086,O:52945,P:65407,Q:3978097,R:139,S:12433259,T:25600,U:8388608,V:8421376,W:8388736,X:32896,Y:12092939,Z:11674146},hetatm:{A:9478351,B:8441752,C:13602992,D:13619056,E:13603023,F:8437952,G:13607008,H:12603504,I:12955267,J:42959,K:11881548,L:5682578,M:9090346,N:12481214,O:46753,P:53103,Q:3447649,R:187,S:10854235,T:37888,U:11534336,V:11579392,W:11534512,X:45232,Y:15250963,Z:12726834}},u={ssPyMol:{prop:"ss",map:o.pyMol},ssJmol:{prop:"ss",map:o.Jmol},Jmol:{prop:"elem",map:l.Jmol},amino:{prop:"resn",map:c.amino},shapely:{prop:"resn",map:c.shapely},nucleic:{prop:"resn",map:c.nucleic},chain:{prop:"chain",map:h.atom},rasmol:{prop:"elem",map:l.rasmol},default:{prop:"elem",map:l.defaultColors},greenCarbon:{prop:"elem",map:l.greenCarbon},chainHetatm:{prop:"chain",map:h.hetatm},cyanCarbon:{prop:"elem",map:l.cyanCarbon},magentaCarbon:{prop:"elem",map:l.magentaCarbon},purpleCarbon:{prop:"elem",map:l.purpleCarbon},whiteCarbon:{prop:"elem",map:l.whiteCarbon},orangeCarbon:{prop:"elem",map:l.orangeCarbon},yellowCarbon:{prop:"elem",map:l.yellowCarbon},blueCarbon:{prop:"elem",map:l.blueCarbon}}},"./src/glcartoon.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{drawCartoon:()=>M,subdivide_spline:()=>h});var i=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/shapes/index.ts"),n=r("./src/WebGL/index.ts"),o=r("./src/Gradient.ts"),a=r("./src/colors.ts"),l=r("./src/GLDraw.ts"),c=r("./src/utilities.ts");function h(e,t){var r,s,n,o,a,l,c,h,u,d=[],p=e;for((p=[]).push(e[0]),r=1,s=e.length-1;r0){var g=[s,s+1,s-1,s-2],v=u.faceidx;f[v]=g[0],f[v+1]=g[1],f[v+2]=g[3],f[v+3]=g[1],f[v+4]=g[2],f[v+5]=g[3],u.faceidx+=6}u.vertices+=2}}function v(e,t,r,i,n,o,l){l&&"default"!==l||(l="rectangle"),"edged"===l?function(e,t,r,i,n){if(!(t.length<2)){var o,l;if(o=t[0],l=t[t.length-1],o=h(o,i),l=h(l,i),!n)return g(e,o,l,r);var c,u,d,p,f,m,v,b,y,_,w,x,S,A,C,M,L,E,z,k,O,T,I=[],F=[[0,2,-6,-8],[-4,-2,6,4],[7,-1,-5,3],[-3,5,1,-7]];for(S=0,A=o.length;S0){var R=void 0!==x&&void 0!==w&&x.serial!==w.serial;for(C=0;C<4;C++){var P=[m+F[C][0],m+F[C][1],m+F[C][2],m+F[C][3]];if(T[b=z.faceidx]=P[0],T[b+1]=P[1],T[b+2]=P[3],T[b+3]=P[1],T[b+4]=P[2],T[b+5]=P[3],z.faceidx+=6,w.clickable||x.clickable||w.hoverable||x.hoverable){var G=I[P[3]].clone(),B=I[P[0]].clone(),j=I[P[2]].clone(),N=I[P[1]].clone();if(G.atom=I[P[3]].atom||null,j.atom=I[P[2]].atom||null,B.atom=I[P[0]].atom||null,N.atom=I[P[1]].atom||null,R){var U=G.clone().add(B).multiplyScalar(.5),V=j.clone().add(N).multiplyScalar(.5),W=G.clone().add(N).multiplyScalar(.5);C%2==0?((x.clickable||x.hoverable)&&(M=new s.Triangle(U,W,G),L=new s.Triangle(V,j,W),E=new s.Triangle(W,j,G),x.intersectionShape.triangle.push(M),x.intersectionShape.triangle.push(L),x.intersectionShape.triangle.push(E)),(w.clickable||w.hoverable)&&(M=new s.Triangle(B,N,W),L=new s.Triangle(N,V,W),E=new s.Triangle(B,W,U),w.intersectionShape.triangle.push(M),w.intersectionShape.triangle.push(L),w.intersectionShape.triangle.push(E))):((w.clickable||w.hoverable)&&(M=new s.Triangle(U,W,G),L=new s.Triangle(V,j,W),E=new s.Triangle(W,j,G),w.intersectionShape.triangle.push(M),w.intersectionShape.triangle.push(L),w.intersectionShape.triangle.push(E)),(x.clickable||x.hoverable)&&(M=new s.Triangle(B,N,W),L=new s.Triangle(N,V,W),E=new s.Triangle(B,W,U),x.intersectionShape.triangle.push(M),x.intersectionShape.triangle.push(L),x.intersectionShape.triangle.push(E)))}else(w.clickable||w.hoverable)&&(M=new s.Triangle(B,N,G),L=new s.Triangle(N,j,G),w.intersectionShape.triangle.push(M),w.intersectionShape.triangle.push(L))}}}z.vertices+=8,x=w}var H=I.length-8;for(k=(z=e.updateGeoGroup(8)).vertexArray,O=z.colorArray,T=z.faceArray,v=3*(m=z.vertices),b=z.faceidx,S=0;S<4;S++){I.push(I[2*S]),I.push(I[H+2*S]);var q=I[2*S],Y=I[H+2*S];k[v+6*S]=q.x,k[v+1+6*S]=q.y,k[v+2+6*S]=q.z,k[v+3+6*S]=Y.x,k[v+4+6*S]=Y.y,k[v+5+6*S]=Y.z,O[v+6*S]=y.r,O[v+1+6*S]=y.g,O[v+2+6*S]=y.b,O[v+3+6*S]=y.r,O[v+4+6*S]=y.g,O[v+5+6*S]=y.b}H+=8,M=[m,m+2,m+6,m+4],L=[m+1,m+5,m+7,m+3],T[b]=M[0],T[b+1]=M[1],T[b+2]=M[3],T[b+3]=M[1],T[b+4]=M[2],T[b+5]=M[3],T[b+6]=L[0],T[b+7]=L[1],T[b+8]=L[3],T[b+9]=L[1],T[b+10]=L[2],T[b+11]=L[3],z.faceidx+=12,z.vertices+=8}}(e,t,r,i,n):"rectangle"!==l&&"oval"!==l&&"parabola"!==l||function(e,t,r,i,n,o,l){var c,u,d,p,f,m,v,b,y,_;if((d=t.length)<2||t[0].length<2)return;for(c=0;c0&&(c-=1,o=!0),z=Math.round(c*(r.length-1)/p),E=a.CC.color(r[z]),y=v,_=b,v=[],b=[],f=[],void 0!==t[0][c].atom&&(L=t[0][c].atom,"oval"===l?m=w:"rectangle"===l?m=x:"parabola"===l&&(m=S)),m||(m=x),u=0;u0&&!o){for(u=0;u<2*d;u++)I=[A+F[u][0],A+F[u][1],A+F[u][2],A+F[u][3]],T[M=D.faceidx]=I[0],T[M+1]=I[1],T[M+2]=I[3],T[M+3]=I[1],T[M+4]=I[2],T[M+5]=I[3],D.faceidx+=6;if(L.clickable||L.hoverable){var G=[];for(u in G.push(new s.Triangle(y[0],v[0],v[d-1])),G.push(new s.Triangle(y[0],v[d-1],y[d-1])),G.push(new s.Triangle(y[d-1],v[d-1],b[d-1])),G.push(new s.Triangle(y[d-1],b[d-1],_[d-1])),G.push(new s.Triangle(b[0],_[0],_[d-1])),G.push(new s.Triangle(b[d-1],b[0],_[d-1])),G.push(new s.Triangle(v[0],y[0],_[0])),G.push(new s.Triangle(b[0],v[0],_[0])),G)L.intersectionShape.triangle.push(G[u])}}D.vertices+=2*d}for(k=D.vertexArray,O=D.colorArray,T=D.faceArray,C=3*(A=D.vertices),M=D.faceidx,c=0;c=0&&r<1&&(o.transparent=!0,o.opacity=r),o.outline=i;var a=new n.Mesh(t,o);e.add(a)}}function w(e,t,r,s,n,o,a,l,c){var h,m,g,v,b,y;if(s&&n&&a){var _=n.sub(s);_.normalize();var w=l[c];for(m=c+1;m0&&v(V,H,W,d,k,0,H.style);var r=[],i=null;if(t){for(O=0;O0&&v(V,H,W,d,k,0,H.style),H=[],O=0;O{"use strict";r.r(t),r.d(t,{CAP:()=>m.CAP,CC:()=>s.CC,Color:()=>s.Color,CustomLinear:()=>i.CustomLinear,Cylinder:()=>c.Cylinder,GLDraw:()=>m.GLDraw,GLModel:()=>v.GLModel,GLShape:()=>f.GLShape,GLViewer:()=>b.GLViewer,GLVolumetricRender:()=>p.GLVolumetricRender,Gradient:()=>i.Gradient,GradientType:()=>i.GradientType,Label:()=>n.Label,LabelCount:()=>n.LabelCount,MarchingCube:()=>u.MarchingCube,MarchingCubeInitializer:()=>u.MarchingCubeInitializer,Matrix3:()=>l.Matrix3,Matrix4:()=>l.Matrix4,Parsers:()=>a.Parsers,PausableTimer:()=>h.PausableTimer,PointGrid:()=>u.PointGrid,ProteinSurface:()=>u.ProteinSurface,Quaternion:()=>l.Quaternion,ROYGB:()=>i.ROYGB,RWB:()=>i.RWB,Ray:()=>l.Ray,Sinebow:()=>i.Sinebow,Sphere:()=>c.Sphere,SurfaceType:()=>u.SurfaceType,Triangle:()=>c.Triangle,Vector2:()=>l.Vector2,Vector3:()=>l.Vector3,VolumeData:()=>d.VolumeData,adjustVolumeStyle:()=>h.adjustVolumeStyle,applyPartialCharges:()=>o.applyPartialCharges,autoinit:()=>y.autoinit,autoload:()=>y.autoload,base64ToArray:()=>h.base64ToArray,bondLength:()=>a.bondLength,builtinColorSchemes:()=>s.builtinColorSchemes,builtinGradients:()=>i.builtinGradients,chains:()=>s.chains,clamp:()=>l.clamp,conversionMatrix3:()=>l.conversionMatrix3,createStereoViewer:()=>b.createStereoViewer,createViewer:()=>b.createViewer,createViewerGrid:()=>b.createViewerGrid,deepCopy:()=>h.deepCopy,degToRad:()=>l.degToRad,download:()=>h.download,drawCartoon:()=>g.drawCartoon,elementColors:()=>s.elementColors,extend:()=>h.extend,get:()=>h.get,getAtomProperty:()=>h.getAtomProperty,getColorFromStyle:()=>h.getColorFromStyle,getElement:()=>h.getElement,getExtent:()=>h.getExtent,getGradient:()=>i.getGradient,getPropertyRange:()=>h.getPropertyRange,getbin:()=>h.getbin,htmlColors:()=>s.htmlColors,inflateString:()=>h.inflateString,isEmptyObject:()=>h.isEmptyObject,isNumeric:()=>h.isNumeric,makeFunction:()=>h.makeFunction,mergeGeos:()=>h.mergeGeos,normalizeValue:()=>i.normalizeValue,partialCharges:()=>o.partialCharges,processing_autoinit:()=>y.processing_autoinit,residues:()=>s.residues,setBondLength:()=>a.setBondLength,setSyncSurface:()=>u.setSyncSurface,specStringToObject:()=>h.specStringToObject,splitMesh:()=>f.splitMesh,ssColors:()=>s.ssColors,subdivide_spline:()=>g.subdivide_spline,syncSurface:()=>u.syncSurface,viewers:()=>y.viewers});var i=r("./src/Gradient.ts"),s=r("./src/colors.ts"),n=r("./src/Label.ts"),o=r("./src/partialCharges.ts"),a=r("./src/parsers/index.ts"),l=r("./src/WebGL/math/index.ts"),c=r("./src/WebGL/shapes/index.ts"),h=r("./src/utilities.ts"),u=r("./src/ProteinSurface4.ts"),d=r("./src/VolumeData.ts"),p=r("./src/VolumetricRender.ts"),f=r("./src/GLShape.ts"),m=r("./src/GLDraw.ts"),g=r("./src/glcartoon.ts"),v=r("./src/GLModel.ts"),b=r("./src/GLViewer.ts"),y=r("./src/autoload.ts");r("./src/specs.ts"),window&&(window.$3Dmol=t)},"./src/parsers/BCIF.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{BCIF:()=>f});var i=r("./src/utilities.ts"),s=r("./src/parsers/utils/computeSecondaryStructure.ts"),n=r("./src/parsers/utils/processSymmetries.ts"),o=r("./src/parsers/cifutils/category.ts"),a=r("./src/parsers/utils/assignPDBBonds.ts"),l=r("./src/WebGL/index.ts"),c=r("./src/parsers/utils/isEmpty.ts"),h=r("./src/vendor/mmtf.js");class u{constructor(e){if(this.C={},e){let t=e.getField("comp_id"),r=e.getField("atom_id_1"),i=e.getField("atom_id_2"),s=e.getField("value_order");for(let e=0;e0&&(n.bonds.push(o.index),o.bonds.push(n.index),n.bondOrder.push(a),o.bondOrder.push(a))}}for(let e of t.C){let t=e[0],r=e[1],i=e[2],s=this.geta(t),n=this.geta(r);null!=s&&null!=n&&(s.bonds.push(n.index),n.bonds.push(s.index),s.bondOrder.push(i),n.bondOrder.push(i))}}}function f(e,t){var r=!t.keepH,f=t.altLoc?t.altLoc:"A",m=!t.noComputeSecondaryStructure;const g=!t.doAssembly,v=void 0===t.assignBonds||t.assignBonds;if("string"==typeof e)try{e=(0,i.base64ToArray)(e)}catch(t){e=(new TextEncoder).encode(e)}else e=new Uint8Array(e);var b=h.decodeMsgpack(e);31==b&&(e=(0,i.inflateString)(e,!1),b=h.decodeMsgpack(e));var y=[],_=y.modelData=[],w=b.dataBlocks.length;if(0==w)return y;t.multimodel||(w=1);for(let e=0;e1&&("1"==e[1]?r.ssbegin=!0:"2"==e[1]&&(r.ssend=!0))}}}t.multimodel&&e{"use strict";function i(e,t){var r=[[]];"string"==typeof e&&(e=JSON.parse(e));for(var i=e.m,s=i[0].a,n=i[0].b,o=i[0].s,a=void 0!==t&&void 0!==t.parseStyle?t.parseStyle:void 0!==o,l=r[r.length-1].length,c=0;ci})},"./src/parsers/CIF.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{CIF:()=>l});var i=r("./src/parsers/utils/computeSecondaryStructure.ts"),s=r("./src/parsers/utils/processSymmetries.ts"),n=r("./src/WebGL/index.ts"),o=r("./src/parsers/utils/assignPDBBonds.ts");const a=function(e,t,r,i){return new n.Vector3(t,r,i).applyMatrix3(e)};function l(e,t={}){const r=[],l=!t.doAssembly,c=r.modelData=[],h=void 0===t.assignBonds||t.assignBonds;function u(e,t){const r=[];let i=0,s=0;for(;s-1){let t=m.split("");t[e]="_",m=(m=t.join("")).substring(0,e)+"_"+m.substring(e+1)}}p.push(m)}}let g=0;for(;g{"use strict";r.r(t),r.d(t,{CUBE:()=>o});var i=r("./src/WebGL/index.ts"),s=r("./src/parsers/utils/assignBonds.ts"),n=r("./src/parsers/utils/anumToSymbol.ts");function o(e,t){t=t||{};const r=[[]];let o=e.split(/\r?\n/);const a=void 0===t.assignBonds||t.assignBonds;if(o.length<6)return r;let l=o[2].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");const c=Math.abs(parseFloat(l[0]));let h={origin:void 0,size:void 0,unit:void 0,matrix4:void 0,matrix:void 0};const u=h.origin=new i.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3]));l=o[3].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),l=o[3].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");const d=l[0]>0?.529177:1;u.multiplyScalar(d);const p=Math.abs(l[0]),f=new i.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])).multiplyScalar(d);l=o[4].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");const m=Math.abs(l[0]),g=new i.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])).multiplyScalar(d);l=o[5].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");const v=Math.abs(l[0]),b=new i.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])).multiplyScalar(d);if(h.size={x:p,y:m,z:v},h.unit=new i.Vector3(f.x,g.y,b.z),0!=f.y||0!=f.z||0!=g.x||0!=g.z||0!=b.x||0!=b.y){h.matrix4=new i.Matrix4(f.x,g.x,b.x,0,f.y,g.y,b.y,0,f.z,g.z,b.z,0,0,0,0,1);let e=(new i.Matrix4).makeTranslation(u.x,u.y,u.z);h.matrix4=h.matrix4.multiplyMatrices(e,h.matrix4),h.matrix=h.matrix4.matrix3FromTopLeft(),h.origin=new i.Vector3(0,0,0),h.unit=new i.Vector3(1,1,1)}r.modelData=[{cryst:h}],o=o.splice(6,c);for(var y=r[r.length-1].length,_=y+o.length,w=y;w<_;++w){var x={};x.serial=w;var S=o[w-y].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");x.elem=n.anumToSymbol[S[0]],x.x=parseFloat(S[2])*d,x.y=parseFloat(S[3])*d,x.z=parseFloat(S[4])*d,x.hetflag=!0,x.bonds=[],x.bondOrder=[],x.properties={},r[r.length-1].push(x)}if(a)for(let e=0;e{"use strict";r.r(t),r.d(t,{GRO:()=>n});var i=r("./src/parsers/utils/assignPDBBonds.ts"),s=r("./src/parsers/utils/atomNameToElem.ts");function n(e,t){const r=[],n=e.split(/\r?\n|\r/);for(;n.length>0;){const e=parseInt(n[1]);if(n.length<3||isNaN(e)||e<=0||n.length44&&(o.dx=10*parseFloat(r.slice(44,52)),o.dy=10*parseFloat(r.slice(52,60)),o.dz=10*parseFloat(r.slice(60,68))),t[e]=o}if(n.length<=i+3){const e=n[i++].trim().split(/\s+/);if(3===e.length){for(let t=0;t<3;t++)e[t]=(10*parseFloat(e[t])).toString();r.box=e}}n.splice(0,++i)}for(let e=0;e{"use strict";r.r(t),r.d(t,{LAMMPSTRJ:()=>n});var i=r("./src/parsers/utils/assignBonds.ts");const s={id:"serial",type:"atom",element:"elem",q:"charge",radius:"radius",x:"x",xu:"x",xs:"x",xsu:"x",y:"y",yu:"y",ys:"y",ysu:"y",z:"z",zu:"z",zs:"z",zsu:"z"};function n(e,t){const r=[],n=e.split(/\r?\n|\r/);let o=0,a=0,l=0;for(;l{"use strict";r.r(t),r.d(t,{MMTFparser:()=>u});var i=r("./src/utilities.ts"),s=r("./src/WebGL/index.ts"),n=r("./src/parsers/utils/computeSecondaryStructure.ts"),o=r("./src/parsers/utils/processSymmetries.ts"),a=r("./src/vendor/mmtf.js"),l=function(e){return String.fromCharCode.apply(null,e).replace(/\0/g,"")},c=function(e){return 0==e||2==e||4==e?"h":3==e?"s":"c"};let h=new Set(["D-SACCHARIDE","D-SACCHARIDE 1,4 AND 1,4 LINKING","D-SACCHARIDE 1,4 AND 1,6 LINKING","L-SACCHARIDE","L-SACCHARIDE 1,4 AND 1,4 LINKING","L-SACCHARIDE 1,4 AND 1,6 LINKING","NON-POLYMER","OTHER","PEPTIDE-LIKE","SACCHARIDE"]);function u(e,t){var r=!t.keepH,u=t.altLoc?t.altLoc:"A",d=!!t.noSecondaryStructure,p=!t.noComputeSecondaryStructure,f=!t.doAssembly,m=t.assemblyIndex?t.assemblyIndex:0;e="string"==typeof e?(0,i.base64ToArray)(e):new Uint8Array(e);var g,v,b,y,_,w,x=a.decode(e),S=[[]],A=S.modelData=[],C=0,M=0,L=0,E=x.secStructList,z=x.bFactorList,k=x.altLocList,O=x.occupancyList,T=x.bondAtomList,I=x.bondOrderList,F=x.numModels;if(0==F)return S;t.multimodel||(F=1);var D=[];if(!f&&x.bioAssemblyList&&x.bioAssemblyList.length>0){var R=x.bioAssemblyList[m].transformList;for(g=0,w=R.length;g{e.chainIndexList.forEach((t=>{j[t]="polymer"==e.type}))}));var N=0;for(_=0;_=E.length||c(E[te]!=ee))&&(Q=!0)}var re=x.groupIdList[M],ie=X.groupName;let e=X.chemCompType;var se=L;let t=h.has(e)||!j[C];for(b=0;b<$;++b){var ne=X.elementList[b];if(r&&"H"==ne)L+=1;else{var oe="";z&&(oe=z[L]);var ae="";k&&k[L]&&(ae=String.fromCharCode(k[L]));var le="";if(O&&(le=O[L]),""==ae||ae==u||"*"==u){var ce=x.atomIdList[L],he=X.atomNameList[b],ue=0;X.atomChargeList&&(ue=X.atomChargeList[b]);var de=x.xCoordList[L],pe=x.yCoordList[L],fe=x.zCoordList[L];W[L]=V.length,V.push({resn:ie,x:de,y:pe,z:fe,elem:ne,hetflag:t,chain:q,resi:re,icode:ae,rescode:re+(" "!=ae?"^"+ae:""),serial:ce,altLoc:ae,index:L,atom:he,bonds:[],ss:c(K),ssbegin:J,ssend:Q,bondOrder:[],properties:{charge:ue,occupancy:le},b:oe}),L+=1}else L+=1}}var me=X.bondAtomList;for(b=0,y=X.bondOrderList.length;b=L){N=e;break}let s=W[t],n=W[r],o=V[s],a=V[n];o&&a&&(o.bonds.push(n),o.bondOrder.push(i),a.bonds.push(s),a.bondOrder.push(i))}t.multimodel&&(t.onemol||S.push([]))}if(!f)for(let e=0;e{"use strict";r.r(t),r.d(t,{MOL2:()=>s});let i={"C.1":"C",C1:"C","C.2":"C",C2:"C","C.3":"C",C3:"C","C.ar":"C",Car:"C","C.cat":"C",Ccat:"C","H.spc":"H",Hspc:"H","H.t3p":"H",Ht3p:"H","N.1":"N",N1:"N","N.2":"N",N2:"N","N.3":"N",N3:"N","N.4":"N",N4:"N","N.am":"N",Nam:"N","N.ar":"N",Nar:"N","N.p13":"N",Np13:"N","O.2":"O",O2:"O","O.3":"O",O3:"O","O.co2":"O",Oco2:"O","O.spc":"O",Ospc:"O","O.t3p":"O",Ot3p:"O","P.3":"P",P3:"P","S.2":"S",S2:"S","S.3":"S",S3:"S","S.o":"S",So:"S","S.o2":"S",So2:"S"};function s(e,t){var r=[[]],s=!1;void 0!==t.keepH&&(s=!t.keepH);var n=e.search(/@MOLECULE/),o=e.search(/@ATOM/);if(-1==n||-1==o)return r;for(var a=e.substring(n).split(/\r?\n|\r/);a.length>0;){var l=[],c=a[2].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),h=parseInt(c[0]),u=0;c.length>1&&(u=parseInt(c[1]));var d,p=4;for(d=3;dATOM"==a[d]){p=d+1;break}var f=r[r.length-1].length,m=f+h;for(d=f;dBOND"==a[p++]){w=!0;break}if(w&&u)for(d=0;d{"use strict";r.r(t),r.d(t,{PDB:()=>s});var i=r("./src/parsers/utils/getSinglePDB.ts");function s(e,t){t=t||{};var r=[],s={};r.modelData=[];for(var n=e.split(/\r?\n|\r/);n.length>0;){var o=(0,i.getSinglePDB)(n,t,s),a=o[0],l=o[1];if(n=o[2],0!=a.length){if(t.multimodel&&t.onemol&&r.length>0)for(var c=r[0].length,h=0;h{"use strict";r.r(t),r.d(t,{PQR:()=>n});var i=r("./src/parsers/utils/assignPDBBonds.ts"),s=r("./src/parsers/utils/computeSecondaryStructure.ts");function n(e,t){var r=[[]],n=!t.noSecondaryStructure;r.modelData=[{symmetries:[]}];var o,a=[],l=e.split(/\r?\n|\r/);for(let e=0;e1&&t[1].toUpperCase()!=t[1]&&(v=t.substring(0,2)),h="H"==o[0],a[e]=r[r.length-1].length,r[r.length-1].push({resn:i,x:d,y:p,z:f,elem:v,hetflag:h,chain:s,resi:n,serial:e,atom:t,bonds:[],ss:"c",bondOrder:[],properties:{charge:m,partialCharge:m,radius:g},pdbline:o})}else if("CONECT"==c){var b=parseInt(o.substring(6,11)),y=r[r.length-1][a[b]];for(let e=0;e<4;e++){var _=parseInt(o.substring([11,16,21,26][e],[11,16,21,26][e]+5)),w=r[r.length-1][a[_]];void 0!==y&&void 0!==w&&(y.bonds.push(a[_]),y.bondOrder.push(1))}}}for(let e=0;e{"use strict";function i(e){var t,r=[],i=0,s=e.split(/\r?\n|\r/);if(!(s.length>0&&s[0].includes("VERSION")))return[];var n=s.filter((function(e){return e.includes("POINTERS")||e.includes("ATOM_NAME")||e.includes("CHARGE")||e.includes("RADII")||e.includes("BONDS_INC_HYDROGEN")||e.includes("BONDS_WITHOUT_HYDROGEN")})),o=h("POINTERS");if(-1==o)return[];var a=u(o),l=parseInt(s[o+1].slice(0,a[1]));if(isNaN(l)||l<=0)return[];if(-1==(o=h("ATOM_NAME")))return[];var c=(a=u(o))[0];for(let e=0;e0){for(;!s[t].includes("FORMAT");)t++;return t}return-1}function u(e){var t=s[e].match(/\((\d*)\S*/),r=s[e].match(/[a-zA-Z](\d*)\)\s*/);return null==r&&(r=s[e].match(/[a-zA-Z](\d*)\.\d*\)\s*/)),[t[1],r[1]]}return[r]}r.r(t),r.d(t,{PRMTOP:()=>i})},"./src/parsers/SDF.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{SDF:()=>n});var i=function(e,t){var r=[[]],i=!1;for(void 0!==t.keepH&&(i=!t.keepH);e.length>0&&!(e.length<4);){var s=parseInt(e[3].substring(0,3));if(isNaN(s)||s<=0)break;var n=parseInt(e[3].substring(3,6)),o=4;if(e.length<4+s+n)break;var a,l,c=[],h=r[r.length-1].length,u=h+s;for(a=h;a0&&!(e.length<8)&&e[4].startsWith("M V30 BEGIN CTAB")&&e[5].startsWith("M V30 COUNTS")&&!(e[5].length<14);){var s=e[5].substring(13).match(/\S+/g);if(s.length<2)break;var n=parseInt(s[0]);if(isNaN(n)||n<=0)break;var o=parseInt(s[1]),a=7;if(e.length<8+n+o)break;var l,c=[],h=r[r.length-1].length,u=h+n;for(l=h;l4){var p={},f=d[1].replace(/ /g,"");p.atom=p.elem=f[0].toUpperCase()+f.substring(1).toLowerCase(),"H"===p.elem&&i||(p.serial=l,c[l]=r[r.length-1].length,p.x=parseFloat(d[2]),p.y=parseFloat(d[3]),p.z=parseFloat(d[4]),p.hetflag=!0,p.bonds=[],p.bondOrder=[],p.properties={},p.index=r[r.length-1].length,r[r.length-1].push(p))}}if("M V30 END ATOM"!==e[a])break;if(a++,0===o||"M V30 BEGIN BOND"!==e[a])break;for(a++,l=0;l3){var g=c[parseInt(m[2])-1+h],v=c[parseInt(m[3])-1+h],b=parseFloat(m[1]);void 0!==g&&void 0!==v&&(r[r.length-1][g].bonds.push(v),r[r.length-1][g].bondOrder.push(b),r[r.length-1][v].bonds.push(g),r[r.length-1][v].bondOrder.push(b))}}if(!t.multimodel)break;for(t.onemol||r.push([]);"$$$$"!==e[a]&&a3&&n[3].length>38&&(r=n[3].substring(34,39)),"V2000"===r?i(n,t):"V3000"===r?s(n,t):[[""]]}},"./src/parsers/VASP.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{VASP:()=>n});var i=r("./src/WebGL/index.ts"),s=r("./src/parsers/utils/assignBonds.ts");function n(e,t={}){var r=[[]],n={};const o=void 0===t.assignBonds||t.assignBonds;var a=e.replace(/^\s+/,"").split(/\r?\n/);if(a.length<3)return r;if(!a[1].match(/\d+/))return console.log("Warning: second line of the vasp structure file must be a number"),r;if(n.length=parseFloat(a[1]),n.length<0)return console.log("Warning: Vasp implementation for negative lattice lengths is not yet available"),r;n.xVec=new Float32Array(a[2].replace(/^\s+/,"").split(/\s+/)),n.yVec=new Float32Array(a[3].replace(/^\s+/,"").split(/\s+/)),n.zVec=new Float32Array(a[4].replace(/^\s+/,"").split(/\s+/));var l=new i.Matrix3(n.xVec[0],n.xVec[1],n.xVec[2],n.yVec[0],n.yVec[1],n.yVec[2],n.zVec[0],n.zVec[1],n.zVec[2]);l.multiplyScalar(n.length),r.modelData=[{symmetries:[],cryst:{matrix:l}}];var c=a[5].replace(/\s+/,"").replace(/\s+$/,"").split(/\s+/),h=new Int16Array(a[6].replace(/^\s+/,"").split(/\s+/)),u=a[7].replace(/\s+/,""),d=!1;if(u.match(/S/)&&(d=!0,u=a[8].replace(/\s+/,"")),u.match(/C/))u="cartesian";else{if(!u.match(/D/))return console.log("Warning: Unknown vasp mode in POSCAR file: mode must be either C(artesian) or D(irect)"),r;u="direct"}if(c.length!=h.length)return console.log("Warning: declaration of atomary species wrong:"),console.log(c),console.log(h),r;d?a.splice(0,9):a.splice(0,8);for(var p=0,f=0,m=c.length;f{"use strict";r.r(t),r.d(t,{XYZ:()=>n});var i=r("./src/WebGL/index.ts"),s=r("./src/parsers/utils/assignBonds.ts");function n(e,t){for(var r=[[]],n=void 0===(t=t||{}).assignBonds||t.assignBonds,o=e.split(/\r?\n|\r/);o.length>0&&!(o.length<3);){var a=parseInt(o[0]);if(isNaN(a)||a<=0)break;if(o.length1){var c=new Float32Array(l[1].split(/\s+/)),h=new i.Matrix3(c[0],c[3],c[6],c[1],c[4],c[7],c[2],c[5],c[8]);r.modelData=[{cryst:{matrix:h}}]}for(var u=2,d=r[r.length-1].length,p=d+a,f=d;f=7&&(g.dx=parseFloat(m[4]),g.dy=parseFloat(m[5]),g.dz=parseFloat(m[6]))}if(!t.multimodel)break;r.push([]),o.splice(0,u)}if(n)for(let e=0;e{"use strict";r.r(t),r.d(t,{Category:()=>s});var i=r("./src/parsers/cifutils/decoder.ts");function s(e){const t=Object.create(null),r=Object.create(null);for(const r of e.columns)t[r.name]=r;return{rowCount:e.rowCount,name:e.name.substring(1),fieldNames:e.columns.map((e=>e.name)),getField(e){const s=t[e];if(s)return r[e]||(r[e]=(0,i.decode)(s.data)),r[e]}}}},"./src/parsers/cifutils/decoder.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>n});var i=r("./src/parsers/cifutils/encoding.ts");const s=13330===new Uint16Array(new Uint8Array([18,52]).buffer)[0];function n(e){let t=e.data;for(let r=e.encoding.length-1;r>=0;r--)t=o(t,e.encoding[r]);return t}function o(e,t){switch(t.kind){case"ByteArray":switch(t.type){case i.Encoding.IntDataType.Uint8:return e;case i.Encoding.IntDataType.Int8:return function(e){return new Int8Array(e.buffer,e.byteOffset)}(e);case i.Encoding.IntDataType.Int16:return function(e){return c(e,2,Int16Array)}(e);case i.Encoding.IntDataType.Uint16:return function(e){return c(e,2,Uint16Array)}(e);case i.Encoding.IntDataType.Int32:return function(e){return c(e,4,Int32Array)}(e);case i.Encoding.IntDataType.Uint32:return function(e){return c(e,4,Uint32Array)}(e);case i.Encoding.FloatDataType.Float32:return function(e){return c(e,4,Float32Array)}(e);case i.Encoding.FloatDataType.Float64:return function(e){return c(e,8,Float64Array)}(e);default:throw new Error("unreachable")}case"FixedPoint":return function(e,t){const r=e.length,i=l(t.srcType,r),s=1/t.factor;for(let t=0;t{"use strict";r.r(t),r.d(t,{Encoding:()=>s,VERSION:()=>i});const i="0.3.0";var s;!function(e){let t,r;!function(e){e[e.Int8=1]="Int8",e[e.Int16=2]="Int16",e[e.Int32=3]="Int32",e[e.Uint8=4]="Uint8",e[e.Uint16=5]="Uint16",e[e.Uint32=6]="Uint32"}(t=e.IntDataType||(e.IntDataType={})),function(e){e[e.Float32=32]="Float32",e[e.Float64=33]="Float64"}(r=e.FloatDataType||(e.FloatDataType={})),e.getDataType=function(t){let r;return r=t instanceof Int8Array?e.IntDataType.Int8:t instanceof Int16Array?e.IntDataType.Int16:t instanceof Int32Array?e.IntDataType.Int32:t instanceof Uint8Array?e.IntDataType.Uint8:t instanceof Uint16Array?e.IntDataType.Uint16:t instanceof Uint32Array?e.IntDataType.Uint32:t instanceof Float32Array?e.FloatDataType.Float32:t instanceof Float64Array?e.FloatDataType.Float64:e.IntDataType.Int32,r},e.isSignedIntegerDataType=function(e){if(e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array)return!0;for(let t=0,r=e.length;t{"use strict";r.r(t),r.d(t,{Parsers:()=>b,bondLength:()=>v.bondLength,setBondLength:()=>v.setBondLength});var i=r("./src/parsers/VASP.ts"),s=r("./src/parsers/CUBE.ts"),n=r("./src/parsers/XYZ.ts"),o=r("./src/parsers/SDF.ts"),a=r("./src/parsers/CDJSON.ts"),l=r("./src/parsers/CIF.ts"),c=r("./src/parsers/MOL2.ts"),h=r("./src/parsers/PDB.ts"),u=r("./src/parsers/PQR.ts"),d=r("./src/parsers/MMTF.ts"),p=r("./src/parsers/PRMTOP.ts"),f=r("./src/parsers/GRO.ts"),m=r("./src/parsers/LAMMPSTRJ.ts"),g=r("./src/parsers/BCIF.ts"),v=r("./src/parsers/utils/bondLength.ts");const b={vasp:i.VASP,VASP:i.VASP,cube:s.CUBE,CUBE:s.CUBE,xyz:n.XYZ,XYZ:n.XYZ,sdf:o.SDF,SDF:o.SDF,json:a.CDJSON,cdjson:a.CDJSON,CDJSON:a.CDJSON,mcif:l.CIF,cif:l.CIF,CIF:l.CIF,mol2:c.MOL2,MOL2:c.MOL2,pdb:h.PDB,PDB:h.PDB,pdbqt:h.PDB,PDBQT:h.PDB,pqr:u.PQR,PQR:u.PQR,mmtf:d.MMTFparser,MMTF:d.MMTFparser,prmtop:p.PRMTOP,PRMTOP:p.PRMTOP,gro:f.GRO,GRO:f.GRO,lammpstrj:m.LAMMPSTRJ,LAMMPSTRJ:m.LAMMPSTRJ,bcif:g.BCIF,BCIF:g.BCIF}},"./src/parsers/utils/anumToSymbol.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{anumToSymbol:()=>i});const i={1:"H",2:"He",3:"Li",4:"Be",5:"B",6:"C",7:"N",8:"O",9:"F",10:"Ne",11:"Na",12:"Mg",13:"Al",14:"Si",15:"P",16:"S",17:"Cl",18:"Ar",19:"K",20:"Ca",21:"Sc",22:"Ti",23:"V",24:"Cr",25:"Mn",26:"Fe",27:"Co",28:"Ni",29:"Cu",30:"Zn",31:"Ga",32:"Ge",33:"As",34:"Se",35:"Br",36:"Kr",37:"Rb",38:"Sr",39:"Y",40:"Zr",41:"Nb",42:"Mo",43:"Tc",44:"Ru",45:"Rh",46:"Pd",47:"Ag",48:"Cd",49:"In",50:"Sn",51:"Sb",52:"Te",53:"I",54:"Xe",55:"Cs",56:"Ba",71:"Lu",72:"Hf",73:"Ta",74:"W",75:"Re",76:"Os",77:"Ir",78:"Pt",79:"Au",80:"Hg",81:"Tl",82:"Pb",83:"Bi",84:"Po",85:"At",86:"Rn",87:"Fr",88:"Ra",104:"Rf",105:"Db",106:"Sg",107:"Bh",108:"Hs",109:"Mt",110:"Ds",111:"Rg",112:"Cn",113:"Nh",114:"Fl",115:"Mc",116:"Lv",117:"Ts",118:"Og",57:"La",58:"Ce",59:"Pr",60:"Nd",61:"Pm",62:"Sm",63:"Eu",64:"Gd",65:"Tb",66:"Dy",67:"Ho",68:"Er",69:"Tm",70:"Yb",89:"Ac",90:"Th",91:"Pa",92:"U",93:"Np",94:"Pu",95:"Am",96:"Cm",97:"Bk",98:"Cf",99:"Es",100:"Fm",101:"Md",102:"No"}},"./src/parsers/utils/areConnected.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{areConnected:()=>n});var i=r("./src/parsers/utils/bondLength.ts");const s=new Set(["Na","K","Ca","Mg","Mn","Sr"]);function n(e,t,r){if(r&&r.unboundCations&&(s.has(e.elem)||s.has(t.elem)))return!1;let n=(0,i.bondLength)(e.elem)+(0,i.bondLength)(t.elem);n+=.25,n*=n;let o=e.x-t.x;if(o*=o,o>n)return!1;let a=e.y-t.y;if(a*=a,a>n)return!1;let l=e.z-t.z;if(l*=l,l>n)return!1;const c=o+a+l;return!(isNaN(c)||c<.5||c>n||e.altLoc!==t.altLoc&&""!==e.altLoc.trim()&&""!==t.altLoc.trim())}},"./src/parsers/utils/assignBackboneHBonds.ts":(e,t,r)=>{"use strict";function i(e,t){const r=t||3.2,i=r*r,s=[];for(let t=0,r=e.length;tr)break;if(e.atom==n.atom)continue;const a=Math.abs(e.y-n.y);if(a>r)continue;const l=Math.abs(e.x-n.x);if(l>r)continue;const c=l*l+a*a+t*t;c>i||e.chain==n.chain&&Math.abs(e.resi-n.resi)<4||(ci})},"./src/parsers/utils/assignBonds.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{assignBonds:()=>o});var i=r("./src/parsers/utils/areConnected.ts");const s=[{x:0,y:0,z:1},{x:0,y:1,z:-1},{x:0,y:1,z:0},{x:0,y:1,z:1},{x:1,y:-1,z:-1},{x:1,y:-1,z:0},{x:1,y:-1,z:1},{x:1,y:0,z:-1},{x:1,y:0,z:0},{x:1,y:0,z:1},{x:1,y:1,z:-1},{x:1,y:1,z:0},{x:1,y:1,z:1}],n=4.95;function o(e,t){for(let t=0,r=e.length;t{"use strict";r.r(t),r.d(t,{assignPDBBonds:()=>o});var i=r("./src/parsers/utils/areConnected.ts"),s=r("./src/parsers/utils/assignBonds.ts"),n=r("./src/parsers/utils/standardResidues.ts");function o(e,t){const r=[],o=[];for(let t=0,i=e.length;t1)break;(0,i.areConnected)(s,e,t)&&(-1===s.bonds.indexOf(e.index)&&(s.bonds.push(e.index),s.bondOrder.push(1),e.bonds.push(s.index),e.bondOrder.push(1)),s.resi!==e.resi&&(a=!0))}}}},"./src/parsers/utils/atomNameToElem.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{atomNameToElem:()=>s});var i=r("./src/parsers/utils/bondLength.ts");function s(e,t){let r=e.replace(/ /g,"");return r.length>0&&"H"===r[0]&&"Hg"!==r&&"He"!==r&&"Hf"!==r&&"Hs"!==r&&"Ho"!==r&&(r="H"),r.length>1&&(r=r[0].toUpperCase()+r.substring(1).toLowerCase(),void 0===i.bondTable[r]?r=r[0]:t&&("Ca"===r||"Cd"===r)&&(r="C")),r}},"./src/parsers/utils/bondLength.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{bondLength:()=>s,bondTable:()=>i,setBondLength:()=>n});let i={H:.37,He:.32,Li:1.34,Be:.9,B:.82,C:.77,N:.75,O:.73,F:.71,Ne:.69,Na:1.54,Mg:1.3,Al:1.18,Si:1.11,P:1.06,S:1.02,Cl:.99,Ar:.97,K:1.96,Ca:1.74,Sc:1.44,Ti:1.56,V:1.25,Mn:1.39,Fe:1.25,Co:1.26,Ni:1.21,Cu:1.38,Zn:1.31,Ga:1.26,Ge:1.22,Se:1.16,Br:1.14,Kr:1.1,Rb:2.11,Sr:1.92,Y:1.62,Zr:1.48,Nb:1.37,Mo:1.45,Tc:1.56,Ru:1.26,Rh:1.35,Pd:1.31,Ag:1.53,Cd:1.48,In:1.44,Sn:1.41,Sb:1.38,Te:1.35,I:1.33,Xe:1.3,Cs:2.25,Ba:1.98,Lu:1.6,Hf:1.5,Ta:1.38,W:1.46,Re:1.59,Os:1.44,Ir:1.37,Pt:1.28,Au:1.44,Hg:1.49,Tl:1.48,Pb:1.47,Bi:1.46,Rn:1.45};function s(e){return i[e]||1.6}function n(e,t){t<0&&(t=0),i[e]=t}},"./src/parsers/utils/computeSecondaryStructure.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{computeSecondaryStructure:()=>s});var i=r("./src/parsers/utils/assignBackboneHBonds.ts");function s(e,t){(0,i.assignBackboneHBonds)(e,t);const r={};let s,n,o,a,l,c;for(s=0,n=e.length;s{"use strict";r.r(t),r.d(t,{getSinglePDB:()=>u});var i=r("./src/WebGL/index.ts"),s=r("./src/parsers/utils/atomNameToElem.ts"),n=r("./src/parsers/utils/bondLength.ts"),o=r("./src/parsers/utils/computeSecondaryStructure.ts"),a=r("./src/parsers/utils/isEmpty.ts"),l=r("./src/parsers/utils/processSymmetries.ts"),c=r("./src/parsers/utils/assignPDBBonds.ts"),h=r("./src/parsers/utils/validateBonds.ts");function u(e,t,r){const u=[],d=void 0===t.assignBonds||t.assignBonds,p=!t.keepH,f=!!t.noSecondaryStructure,m=!t.noComputeSecondaryStructure,g=!t.doAssembly,v=t.altLoc?t.altLoc:"A",b={symmetries:[],cryst:void 0};let y,_=[];const w=[];let x;const S={};for(let t=0;t=4?1:r}}else S[n]=1,0!=t.bonds.length&&t.bonds[t.bonds.length-1]===s||(t.bonds.push(s),t.bondOrder.push(1))}}else if("HELIX "===o){a=x.substring(19,20),l=parseInt(x.substring(21,25)),c=parseInt(x.substring(33,37)),a in r||(r[a]={}),r[a][l]="h1";for(let e=l+1;e1&&("1"==e[1]?t.ssbegin=!0:"2"==e[1]&&(t.ssend=!0))}}return[u,b,_]}},"./src/parsers/utils/isEmpty.ts":(e,t,r)=>{"use strict";function i(e){for(const t in e)return!1;return!0}r.r(t),r.d(t,{isEmpty:()=>i})},"./src/parsers/utils/processSymmetries.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{processSymmetries:()=>s});var i=r("./src/WebGL/index.ts");function s(e,t,r,s){const n=!r.duplicateAssemblyAtoms,o=t.length;let a=o,l=-1,c=null,h=null;(r.normalizeAssembly||r.wrapAtoms)&&s&&(c=(0,i.conversionMatrix3)(s.a,s.b,s.c,s.alpha,s.beta,s.gamma),h=new i.Matrix3,h.getInverse3(c));let u=function(e){let t=e.clone().applyMatrix3(h);const r=[t.x,t.y,t.z],s=[0,0,0];for(let e=0;e<3;e++){for(;r[e]<-.001;)r[e]+=1,s[e]+=1;for(;r[e]>1.001;)r[e]-=1,s[e]-=1}const n=new i.Vector3(s[0],s[1],s[2]);return n.applyMatrix3(c),n};if(r.normalizeAssembly&&s)for(let r=0;r.001&&(l=r),e[r].translate(n)}if(n){if(e.length>1)for(let r=0;r=0){const r=new i.Vector3;for(let i=0;i{"use strict";r.r(t),r.d(t,{standardResidues:()=>i});const i=new Set(["ABU","ACD","ALA","ALB","ALI","ARG","AR0","ASN","ASP","ASX","BAS","CYS","CYH","CYX","CSS","CSH","GLN","GLU","GLX","GLY","HIS","HIE","HID","HIP","HYP","ILE","ILU","LEU","LYS","MET","PCA","PGA","PHE","PR0","PRO","PRZ","SER","THR","TRP","TYR","VAL","A","1MA","C","5MC","OMC","G","1MG","2MG","M2G","7MG","OMG","YG","I","T","U","+U","H2U","5MU","PSU","ACE","F0R","H2O","HOH","WAT"])},"./src/parsers/utils/validateBonds.ts":(e,t,r)=>{"use strict";function i(e,t){for(let r=0,i=e.length;ri})},"./src/partialCharges.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{applyPartialCharges:()=>s,partialCharges:()=>i});const i={"ALA:N":-.15,"ALA:CA":.1,"ALA:CB":0,"ALA:C":.6,"ALA:O":-.55,"ARG:N":-.15,"ARG:CA":.1,"ARG:CB":0,"ARG:CG":0,"ARG:CD":.1,"ARG:NE":-.1,"ARG:CZ":.5,"ARG:NH1":.25,"ARG:NH2":.25,"ARG:C":.6,"ARG:O":-.55,"ASN:N":-.15,"ASN:CA":.1,"ASN:CB":0,"ASN:CG":.55,"ASN:OD1":-.55,"ASN:ND2":0,"ASN:C":.6,"ASN:O":-.55,"ASP:N":-.15,"ASP:CA":.1,"ASP:CB":0,"ASP:CG":.14,"ASP:OD1":-.57,"ASP:OD2":-.57,"ASP:C":.6,"ASP:O":-.55,"CYS:N":-.15,"CYS:CA":.1,"CYS:CB":.19,"CYS:SG":-.19,"CYS:C":.6,"CYS:O":-.55,"GLN:N":-.15,"GLN:CA":.1,"GLN:CB":0,"GLN:CG":0,"GLN:CD":.55,"GLN:OE1":-.55,"GLN:NE2":0,"GLN:C":.6,"GLN:O":-.55,"GLU:N":-.15,"GLU:CA":.1,"GLU:CB":0,"GLU:CG":0,"GLU:CD":.14,"GLU:OE1":-.57,"GLU:OE2":-.57,"GLU:C":.6,"GLU:O":-.55,"GLY:N":-.15,"GLY:CA":.1,"GLY:C":.6,"GLY:O":-.55,"HIS:N":-.15,"HIS:CA":.1,"HIS:CB":0,"HIS:CG":.1,"HIS:ND1":-.1,"HIS:CD2":.1,"HIS:NE2":-.4,"HIS:CE1":.3,"HIS:C":.6,"HIS:O":-.55,"ILE:N":-.15,"ILE:CA":.1,"ILE:CB":0,"ILE:CG2":0,"ILE:CG1":0,"ILE:CD":0,"ILE:C":.6,"ILE:O":-.55,"LEU:N":-.15,"LEU:CA":.1,"LEU:CB":0,"LEU:CG":0,"LEU:CD1":0,"LEU:CD2":0,"LEU:C":.6,"LEU:O":-.55,"LYS:N":-.15,"LYS:CA":.1,"LYS:CB":0,"LYS:CG":0,"LYS:CD":0,"LYS:CE":.25,"LYS:NZ":.75,"LYS:C":.6,"LYS:O":-.55,"MET:N":-.15,"MET:CA":.1,"MET:CB":0,"MET:CG":.06,"MET:SD":-.12,"MET:CE":.06,"MET:C":.6,"MET:O":-.55,"PHE:N":-.15,"PHE:CA":.1,"PHE:CB":0,"PHE:CG":0,"PHE:CD1":0,"PHE:CD2":0,"PHE:CE1":0,"PHE:CE2":0,"PHE:CZ":0,"PHE:C":.6,"PHE:O":-.55,"PRO:N":-.25,"PRO:CD":.1,"PRO:CA":.1,"PRO:CB":0,"PRO:CG":0,"PRO:C":.6,"PRO:O":-.55,"SER:N":-.15,"SER:CA":.1,"SER:CB":.25,"SER:OG":-.25,"SER:C":.6,"SER:O":-.55,"THR:N":-.15,"THR:CA":.1,"THR:CB":.25,"THR:OG1":-.25,"THR:CG2":0,"THR:C":.6,"THR:O":-.55,"TRP:N":-.15,"TRP:CA":.1,"TRP:CB":0,"TRP:CG":-.03,"TRP:CD2":.1,"TRP:CE2":-.04,"TRP:CE3":-.03,"TRP:CD1":.06,"TRP:NE1":-.06,"TRP:CZ2":0,"TRP:CZ3":0,"TRP:CH2":0,"TRP:C":.6,"TRP:O":-.55,"TYR:N":-.15,"TYR:CA":.1,"TYR:CB":0,"TYR:CG":0,"TYR:CD1":0,"TYR:CE1":0,"TYR:CD2":0,"TYR:CE2":0,"TYR:CZ":.25,"TYR:OH":-.25,"TYR:C":.6,"TYR:O":-.55,"VAL:N":-.15,"VAL:CA":.1,"VAL:CB":0,"VAL:CG1":0,"VAL:CG2":0,"VAL:C":.6,"VAL:O":-.55};function s(e,t){if((!t||void 0===e.partialCharge)&&e.resn&&e.atom){var r=e.resn+":"+e.atom;e.properties.partialCharge=i[r]}}},"./src/specs.ts":(e,t,r)=>{"use strict";r.r(t)},"./src/utilities.ts":(__unused_webpack_module,__nested_webpack_exports__,__nested_webpack_require_1150143__)=>{"use strict";__nested_webpack_require_1150143__.r(__nested_webpack_exports__),__nested_webpack_require_1150143__.d(__nested_webpack_exports__,{PausableTimer:()=>PausableTimer,adjustVolumeStyle:()=>adjustVolumeStyle,base64ToArray:()=>base64ToArray,deepCopy:()=>deepCopy,download:()=>download,extend:()=>extend,get:()=>get,getAtomProperty:()=>getAtomProperty,getColorFromStyle:()=>getColorFromStyle,getElement:()=>getElement,getExtent:()=>getExtent,getPropertyRange:()=>getPropertyRange,getbin:()=>getbin,inflateString:()=>inflateString,isEmptyObject:()=>isEmptyObject,isNumeric:()=>isNumeric,makeFunction:()=>makeFunction,mergeGeos:()=>mergeGeos,specStringToObject:()=>specStringToObject});var _Gradient__WEBPACK_IMPORTED_MODULE_0__=__nested_webpack_require_1150143__("./src/Gradient.ts"),_VolumeData__WEBPACK_IMPORTED_MODULE_1__=__nested_webpack_require_1150143__("./src/VolumeData.ts"),_colors__WEBPACK_IMPORTED_MODULE_2__=__nested_webpack_require_1150143__("./src/colors.ts"),pako__WEBPACK_IMPORTED_MODULE_3__=__nested_webpack_require_1150143__("./node_modules/pako/dist/pako.esm.mjs");function extend(e,t){for(var r in t)t.hasOwnProperty(r)&&void 0!==t[r]&&(e[r]=t[r]);return e}function deepCopy(e){let t,r,i;if(null==e)return{};if("object"!=typeof e||null===e)return e;for(i in t=Array.isArray(e)?[]:{},e)r=e[i],t[i]=deepCopy(r);return t}function isNumeric(e){var t=typeof e;return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))}function isEmptyObject(e){var t;for(t in e)return!1;return!0}function makeFunction(callback){return callback&&"string"==typeof callback&&(callback=eval("("+callback+")")),callback&&"function"!=typeof callback?null:callback}function adjustVolumeStyle(e){e&&(!e.volformat||e.voldata instanceof _VolumeData__WEBPACK_IMPORTED_MODULE_1__.VolumeData||(e.voldata=new _VolumeData__WEBPACK_IMPORTED_MODULE_1__.VolumeData(e.voldata,e.volformat)),e.volscheme&&(e.volscheme=_Gradient__WEBPACK_IMPORTED_MODULE_0__.Gradient.getGradient(e.volscheme)))}function getExtent(e,t){var r,i,s,n,o,a,l,c,h,u,d=!t;if(r=i=s=9999,n=o=a=-9999,l=c=h=u=0,0===e.length)return[[0,0,0],[0,0,0],[0,0,0]];for(var p=0;pf.x?n:f.x,o=o>f.y?o:f.y,a=a>f.z?a:f.z,f.symmetries&&d))for(var m=0;mf.symmetries[m].x?n:f.symmetries[m].x,o=o>f.symmetries[m].y?o:f.symmetries[m].y,a=a>f.symmetries[m].z?a:f.symmetries[m].z}return[[r,i,s],[n,o,a],[l/u,c/u,h/u]]}function getPropertyRange(e,t){for(var r=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,s=0,n=e.length;si&&(i=o))}return isFinite(r)||isFinite(i)?isFinite(r)?isFinite(i)||(i=r):r=i:r=i=0,[r,i]}class PausableTimer{constructor(e,t,r){this.total_time_run=0,this.fn=e,this.arg=r,this.countdown=t,this.start_time=(new Date).getTime(),this.ident=setTimeout(e,t,r)}cancel(){clearTimeout(this.ident)}pause(){clearTimeout(this.ident),this.total_time_run=(new Date).getTime()-this.start_time}resume(){this.ident=setTimeout(this.fn,Math.max(0,this.countdown-this.total_time_run),this.arg)}}function base64ToArray(e){for(var t=window.atob(e),r=t.length,i=new Uint8Array(r),s=0;s=0?parseFloat(e):parseInt(e):"true"===e||"false"!==e&&e},r={};if("all"===(e=e.replace(/%7E/g,"~")))return r;for(var i=e.split(";"),s=0;se.text()));return t?r.then(t):r}function getbin(e,t,r,i){var s;return s="POST"==r?fetch(e,{method:"POST",body:i}).then((e=>checkStatus(e))).then((e=>e.arrayBuffer())):fetch(e).then((e=>checkStatus(e))).then((e=>e.arrayBuffer())),t?s.then(t):s}function download(e,t,r,i){var s="",n="",o="",a=null,l=t.addModel();if(e.indexOf(":")<0&&(e=4==e.length?"pdb:"+e:isNaN(e)?"url:"+e:"cid:"+e),"mmtf:"==e.substring(0,5)&&(console.log("WARNING: MMTF now deprecated. Reverting to bcif."),e="bcif:"+e.slice(5)),"bcif:"===e.substring(0,5))e=e.substring(5).toUpperCase(),o="https://models.rcsb.org/"+e+".bcif.gz",r&&void 0===r.noComputeSecondaryStructure&&(r.noComputeSecondaryStructure=!0),a=new Promise((function(e){getbin(o).then((function(i){l.addMolData(i,"bcif.gz",r),t.zoomTo(),t.render(),e(l)}),(function(){console.log("fetch of "+o+" failed.")}))}));else{if("pdb:"===e.substring(0,4)){if(s="bcif",r&&r.format&&(s=r.format),r&&void 0===r.noComputeSecondaryStructure&&(r.noComputeSecondaryStructure=!0),!(e=e.substring(4).toUpperCase()).match(/^[1-9][A-Za-z0-9]{3}$/))return void alert("Wrong PDB ID");"bcif"==s?o="https://models.rcsb.org/"+e.toUpperCase()+".bcif.gz":(n=r&&r.pdbUri?r.pdbUri:"https://files.rcsb.org/view/",o=n+e+"."+s)}else if("cid:"==e.substring(0,4)){if(s="sdf",!(e=e.substring(4)).match(/^[0-9]+$/))return void alert("Wrong Compound ID");o="https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"+e+"/SDF?record_type=3d"}else"url:"==e.substring(0,4)&&(o=e.substring(4),s=o);var c=function(e){l.addMolData(e,s,r),t.zoomTo(),t.render()};a=new Promise((function(t){"bcif"==s?getbin(o).then((function(e){c(e),t(l)})).catch((function(){n=r&&r.pdbUri?r.pdbUri:"https://files.rcsb.org/view/",o=n+e+".pdb",s="pdb",console.log("falling back to pdb format"),get(o).then((function(e){c(e),t(l)})).catch((function(e){c(""),t(l),console.log("fetch of "+o+" failed: "+e.statusText)}))})):get(o).then((function(e){c(e),t(l)})).catch((function(e){c(""),t(l),console.log("fetch of "+o+" failed: "+e.statusText)}))}))}return i?(a.then((function(e){i(e)})),l):a}function getColorFromStyle(e,t){let r=t.colorscheme;if(void 0!==_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r])r=_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r];else if("string"==typeof r&&r.endsWith("Carbon")){let e=r.substring(0,r.lastIndexOf("Carbon")).toLowerCase();if(void 0!==_colors__WEBPACK_IMPORTED_MODULE_2__.htmlColors[e]){let t=Object.assign({},_colors__WEBPACK_IMPORTED_MODULE_2__.elementColors.defaultColors);t.C=_colors__WEBPACK_IMPORTED_MODULE_2__.htmlColors[e],_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r]={prop:"elem",map:t},r=_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r]}}let i=e.color;if(void 0!==t.color&&"spectrum"!=t.color&&(i=t.color),void 0!==r){let n,o;if(void 0!==_colors__WEBPACK_IMPORTED_MODULE_2__.elementColors[r])r=_colors__WEBPACK_IMPORTED_MODULE_2__.elementColors[r],void 0!==r[e[r.prop]]&&(i=r.map[e[r.prop]]);else if(void 0!==r[e[r.prop]])i=r.map[e[r.prop]];else if(void 0!==r.prop&&void 0!==r.gradient){n=r.prop;var s=r.gradient;s instanceof _Gradient__WEBPACK_IMPORTED_MODULE_0__.GradientType||(s=(0,_Gradient__WEBPACK_IMPORTED_MODULE_0__.getGradient)(r));let t=s.range()||[-1,1];o=getAtomProperty(e,n),null!=o&&(i=s.valueToHex(o,t))}else void 0!==r.prop&&void 0!==r.map?(n=r.prop,o=getAtomProperty(e,n),void 0!==r.map[o]&&(i=r.map[o])):void 0!==t.colorscheme[e.elem]?i=t.colorscheme[e.elem]:console.log("Could not interpret colorscheme "+r)}else void 0!==t.colorfunc&&(i=t.colorfunc(e));return _colors__WEBPACK_IMPORTED_MODULE_2__.CC.color(i)}function getElement(e){let t=e;return"string"==typeof e?t=document.querySelector("#"+e):"object"==typeof e&&e.get&&(t=e.get(0)),t}function inflateString(e,t=!0){let r;return r="string"==typeof e?(new TextEncoder).encode(e):new Uint8Array(e),(0,pako__WEBPACK_IMPORTED_MODULE_3__.inflate)(r,{to:t?"string":null})}},"./node_modules/upng-js/UPNG.js":(e,t,r)=>{var i;i={},e.exports=i,function(e,t){e.toRGBA8=function(t){var r=t.width,i=t.height;if(null==t.tabs.acTL)return[e.toRGBA8.decodeImage(t.data,r,i,t).buffer];var s=[];null==t.frames[0].data&&(t.frames[0].data=t.data);for(var n,o=new Uint8Array(r*i*4),a=0;a>3)]>>7-(7&f)&1);l[M]=_[L],l[M+1]=_[L+1],l[M+2]=_[L+2],l[M+3]=E>2)]>>6-((3&f)<<1)&3),l[M]=_[L],l[M+1]=_[L+1],l[M+2]=_[L+2],l[M+3]=E>1)]>>4-((1&f)<<2)&15),l[M]=_[L],l[M+1]=_[L+1],l[M+2]=_[L+2],l[M+3]=E>3]>>7-(7&f)&1))==255*g?0:255;c[f]=O<<24|z<<16|z<<8|z}if(2==u)for(f=0;f>2]>>6-((3&f)<<1)&3))==85*g?0:255,c[f]=O<<24|z<<16|z<<8|z;if(4==u)for(f=0;f>1]>>4-((1&f)<<2)&15))==17*g?0:255,c[f]=O<<24|z<<16|z<<8|z;if(8==u)for(f=0;f>3,a=Math.ceil(i*n/8),l=new Uint8Array(s*a),c=0,h=[0,0,4,0,2,0,1],u=[0,4,0,2,0,1,0],d=[8,8,8,4,4,2,2],p=[8,8,4,4,2,2,1],f=0;f<7;){for(var m=d[f],g=p[f],v=0,b=0,y=h[f];y>3])>>7-(7&C)&1,l[S*a+(A>>3)]|=M<<7-(3&A)),2==n&&(M=(M=t[C>>3])>>6-(7&C)&3,l[S*a+(A>>2)]|=M<<6-((3&A)<<1)),4==n&&(M=(M=t[C>>3])>>4-(7&C)&15,l[S*a+(A>>1)]|=M<<4-((1&A)<<2)),n>=8)for(var L=S*a+A*o,E=0;E>3)+E];C+=n,A+=g}x++,S+=m}v*b!=0&&(c+=b*(1+w)),f+=1}return l},e.decode._getBPP=function(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth},e.decode._filterZero=function(t,r,i,s,n){var o=e.decode._getBPP(r),a=Math.ceil(s*o/8),l=e.decode._paeth;o=Math.ceil(o/8);for(var c=0;c>1)&255;if(4==d)for(p=o;p>1)&255;for(p=o;p>1)&255}if(4==d){for(p=0;p>8&255,e[t+1]=255&r},readUint:function(e,t){return 16777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3])},writeUint:function(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r},readASCII:function(e,t,r){for(var i="",s=0;s=0&&a>=0?(u=p*t+f<<2,d=(a+p)*s+o+f<<2):(u=(-a+p)*t-o+f<<2,d=p*s+f<<2),0==l)i[d]=e[u],i[d+1]=e[u+1],i[d+2]=e[u+2],i[d+3]=e[u+3];else if(1==l){var m=e[u+3]*(1/255),g=e[u]*m,v=e[u+1]*m,b=e[u+2]*m,y=i[d+3]*(1/255),_=i[d]*y,w=i[d+1]*y,x=i[d+2]*y,S=1-m,A=m+y*S,C=0==A?0:1/A;i[d+3]=255*A,i[d+0]=(g+_*S)*C,i[d+1]=(v+w*S)*C,i[d+2]=(b+x*S)*C}else if(2==l)m=e[u+3],g=e[u],v=e[u+1],b=e[u+2],y=i[d+3],_=i[d],w=i[d+1],x=i[d+2],m==y&&g==_&&v==w&&b==x?(i[d]=0,i[d+1]=0,i[d+2]=0,i[d+3]=0):(i[d]=g,i[d+1]=v,i[d+2]=b,i[d+3]=m);else if(3==l){if(m=e[u+3],g=e[u],v=e[u+1],b=e[u+2],y=i[d+3],_=i[d],w=i[d+1],x=i[d+2],m==y&&g==_&&v==w&&b==x)continue;if(m<220&&y>20)return!1}return!0},e.encode=function(t,r,i,s,n,o){null==s&&(s=0),null==o&&(o=!1);for(var a=new Uint8Array(t[0].byteLength*t.length+100),l=[137,80,78,71,13,10,26,10],c=0;c<8;c++)a[c]=l[c];var h=8,u=e._bin,d=e.crc.crc,p=u.writeUint,f=u.writeUshort,m=u.writeASCII,g=e.encode.compressPNG(t,r,i,s,o);p(a,h,13),m(a,h+=4,"IHDR"),p(a,h+=4,r),p(a,h+=4,i),a[h+=4]=g.depth,a[++h]=g.ctype,a[++h]=0,a[++h]=0,a[++h]=0,p(a,++h,d(a,h-17,17)),p(a,h+=4,1),m(a,h+=4,"sRGB"),a[h+=4]=1,p(a,++h,d(a,h-5,5)),h+=4;var v=t.length>1;if(v&&(p(a,h,8),m(a,h+=4,"acTL"),p(a,h+=4,t.length),p(a,h+=4,0),p(a,h+=4,d(a,h-12,12)),h+=4),3==g.ctype){for(p(a,h,3*(M=g.plte.length)),m(a,h+=4,"PLTE"),h+=4,c=0;c>8&255,x=y>>16&255;a[h+b+0]=_,a[h+b+1]=w,a[h+b+2]=x}if(p(a,h+=3*M,d(a,h-3*M-4,3*M+4)),h+=4,g.gotAlpha){for(p(a,h,M),m(a,h+=4,"tRNS"),h+=4,c=0;c>24&255;p(a,h+=M,d(a,h-M-4,M+4)),h+=4}}for(var S=0,A=0;A=300))break}}var w=!!m&&n,x=v.length;x<=256&&0==o&&(l=x<=2?1:x<=4?2:x<=16?4:8,n&&(l=8),m=!0);var S=[];for(u=0;uB&&(B=U),Nj&&(j=N));var V=-1==B?1:(B-P+1)*(j-G+1);V>1)]|=g[C[q+U]]<<4-4*(1&U);else if(2==l)for(U=0;U>2)]|=g[C[q+U]]<<6-2*(3&U);else if(1==l)for(U=0;U>3)]|=g[C[q+U]]<<7-1*(7&U)}A=W,a=3,c=1}else if(0==m&&1==t.length){W=new Uint8Array(E*z*3);var Y=E*z;for(f=0;f5e5)||2!=l&&3!=l&&4!=l){for(var c=0;c>1)+256&255;if(4==o)for(h=n;h>1)&255;for(h=n;h>1)&255}if(4==o){for(h=0;h>>1:r>>>=1;e[t]=r}return e}(),update:function(t,r,i,s){for(var n=0;n>>8;return t},crc:function(t,r,i){return 4294967295^e.crc.update(4294967295,t,r,i)}},e.quantize=function(t,r,i){for(var s=[],n=0,o=0;om&&(m=f[o].est.L,g=o);if(m<.001)break;var v=f[g],b=e.quantize.splitPixels(a,l,v.i0,v.i1,v.est.e,v.est.eMq255),y={i0:v.i0,i1:b,bst:null,est:null,tdst:0,left:null,right:null};y.bst=e.quantize.stats(a,y.i0,y.i1),y.est=e.quantize.estats(y.bst);var _={i0:b,i1:v.i1,bst:null,est:null,tdst:0,left:null,right:null};for(_.bst={R:[],m:[],N:v.bst.N-y.bst.N},o=0;o<16;o++)_.bst.R[o]=v.bst.R[o]-y.bst.R[o];for(o=0;o<4;o++)_.bst.m[o]=v.bst.m[o]-y.bst.m[o];_.est=e.quantize.estats(_.bst),v.left=y,v.right=_,f[g]=y,f.push(_)}f.sort((function(e,t){return t.bst.N-e.bst.N}));for(var w=0;w>2]=k.est.rgba}s[w]=A.buffer}return{bufs:s,plte:f}},e.quantize.getNearest=function(t,r,i,s,n){if(null==t.left)return t.tdst=e.quantize.dist(t.est.q,r,i,s,n),t;var o=e.quantize.planeDst(t.est,r,i,s,n),a=t.left,l=t.right;o>0&&(a=t.right,l=t.left);var c=e.quantize.getNearest(a,r,i,s,n);if(c.tdst<=o*o)return c;var h=e.quantize.getNearest(l,r,i,s,n);return h.tdsto;)s-=4;if(i>=s)break;var l=r[i>>2];r[i>>2]=r[s>>2],r[s>>2]=l,i+=4,s-=4}for(;a(t,i,n)>o;)i-=4;return i+4},e.quantize.vecDot=function(e,t,r){return e[t]*r[0]+e[t+1]*r[1]+e[t+2]*r[2]+e[t+3]*r[3]},e.quantize.stats=function(e,t,r){for(var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],s=[0,0,0,0],n=r-t>>2,o=t;o>>0}},e.M4={multVec:function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]]},dot:function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},sml:function(e,t){return[e*t[0],e*t[1],e*t[2],e*t[3]]}},e.encode.alphaMul=function(e,t){for(var r=new Uint8Array(e.length),i=e.length>>2,s=0;s{"use strict";var i={};(0,r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js").assign)(i,r("./node_modules/upng-js/node_modules/pako/lib/deflate.js"),r("./node_modules/upng-js/node_modules/pako/lib/inflate.js"),r("./node_modules/upng-js/node_modules/pako/lib/zlib/constants.js")),e.exports=i},"./node_modules/upng-js/node_modules/pako/lib/deflate.js":(e,t,r)=>{"use strict";var i=r("./node_modules/upng-js/node_modules/pako/lib/zlib/deflate.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),n=r("./node_modules/upng-js/node_modules/pako/lib/utils/strings.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/zstream.js"),l=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=s.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=i.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==r)throw new Error(o[r]);if(t.header&&i.deflateSetHeader(this.strm,t.header),t.dictionary){var h;if(h="string"==typeof t.dictionary?n.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(r=i.deflateSetDictionary(this.strm,h)))throw new Error(o[r]);this._dict_set=!0}}function h(e,t){var r=new c(t);if(r.push(e,!0),r.err)throw r.msg||o[r.err];return r.result}c.prototype.push=function(e,t){var r,o,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;o=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=n.string2buf(e):"[object ArrayBuffer]"===l.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new s.Buf8(c),a.next_out=0,a.avail_out=c),1!==(r=i.deflate(a,o))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(n.buf2binstring(s.shrinkBuf(a.output,a.next_out))):this.onData(s.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==r);return 4===o?(r=i.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==o||(this.onEnd(0),a.avail_out=0,!0)},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=c,t.deflate=h,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,h(e,t)}},"./node_modules/upng-js/node_modules/pako/lib/inflate.js":(e,t,r)=>{"use strict";var i=r("./node_modules/upng-js/node_modules/pako/lib/zlib/inflate.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),n=r("./node_modules/upng-js/node_modules/pako/lib/utils/strings.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/zlib/constants.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js"),l=r("./node_modules/upng-js/node_modules/pako/lib/zlib/zstream.js"),c=r("./node_modules/upng-js/node_modules/pako/lib/zlib/gzheader.js"),h=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=i.inflateInit2(this.strm,t.windowBits);if(r!==o.Z_OK)throw new Error(a[r]);if(this.header=new c,i.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=n.string2buf(t.dictionary):"[object ArrayBuffer]"===h.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=i.inflateSetDictionary(this.strm,t.dictionary))!==o.Z_OK))throw new Error(a[r])}function d(e,t){var r=new u(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}u.prototype.push=function(e,t){var r,a,l,c,u,d=this.strm,p=this.options.chunkSize,f=this.options.dictionary,m=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof e?d.input=n.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new s.Buf8(p),d.next_out=0,d.avail_out=p),(r=i.inflate(d,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&f&&(r=i.inflateSetDictionary(this.strm,f)),r===o.Z_BUF_ERROR&&!0===m&&(r=o.Z_OK,m=!1),r!==o.Z_STREAM_END&&r!==o.Z_OK)return this.onEnd(r),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&r!==o.Z_STREAM_END&&(0!==d.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(l=n.utf8border(d.output,d.next_out),c=d.next_out-l,u=n.buf2string(d.output,l),d.next_out=c,d.avail_out=p-c,c&&s.arraySet(d.output,d.output,l,c,0),this.onData(u)):this.onData(s.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(m=!0)}while((d.avail_in>0||0===d.avail_out)&&r!==o.Z_STREAM_END);return r===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(r=i.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),d.avail_out=0,!0)},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){e===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=u,t.inflate=d,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},t.ungzip=d},"./node_modules/upng-js/node_modules/pako/lib/utils/common.js":(e,t)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var s in r)i(r,s)&&(e[s]=r[s])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var s={arraySet:function(e,t,r,i,s){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+i),s);else for(var n=0;n{"use strict";var i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),s=!0,n=!0;try{String.fromCharCode.apply(null,[0])}catch(e){s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){n=!1}for(var o=new i.Buf8(256),a=0;a<256;a++)o[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&n||!e.subarray&&s))return String.fromCharCode.apply(null,i.shrinkBuf(e,t));for(var r="",o=0;o>>6,t[o++]=128|63&r):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|63&r):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|63&r);return t},t.buf2binstring=function(e){return l(e,e.length)},t.binstring2buf=function(e){for(var t=new i.Buf8(e.length),r=0,s=t.length;r4)c[i++]=65533,r+=n-1;else{for(s&=2===n?31:3===n?15:7;n>1&&r1?c[i++]=65533:s<65536?c[i++]=s:(s-=65536,c[i++]=55296|s>>10&1023,c[i++]=56320|1023&s)}return l(c,i)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+o[e[r]]>t?r:t}},"./node_modules/upng-js/node_modules/pako/lib/zlib/adler32.js":e=>{"use strict";e.exports=function(e,t,r,i){for(var s=65535&e,n=e>>>16&65535,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{n=n+(s=s+t[i++]|0)|0}while(--o);s%=65521,n%=65521}return s|n<<16}},"./node_modules/upng-js/node_modules/pako/lib/zlib/constants.js":e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},"./node_modules/upng-js/node_modules/pako/lib/zlib/crc32.js":e=>{"use strict";var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,i,s){var n=t,o=s+i;e^=-1;for(var a=s;a>>8^n[255&(e^r[a])];return~e}},"./node_modules/upng-js/node_modules/pako/lib/zlib/deflate.js":(e,t,r)=>{"use strict";var i,s=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),n=r("./node_modules/upng-js/node_modules/pako/lib/zlib/trees.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/zlib/adler32.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/crc32.js"),l=r("./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js"),c=-2,h=258,u=262,d=103,p=113,f=666;function m(e,t){return e.msg=l[t],t}function g(e){return(e<<1)-(e>4?9:0)}function v(e){for(var t=e.length;--t>=0;)e[t]=0}function b(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(s.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function y(e,t){n._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,b(e.strm)}function _(e,t){e.pending_buf[e.pending++]=t}function w(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function x(e,t){var r,i,s=e.max_chain_length,n=e.strstart,o=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-u?e.strstart-(e.w_size-u):0,c=e.window,d=e.w_mask,p=e.prev,f=e.strstart+h,m=c[n+o-1],g=c[n+o];e.prev_length>=e.good_match&&(s>>=2),a>e.lookahead&&(a=e.lookahead);do{if(c[(r=t)+o]===g&&c[r+o-1]===m&&c[r]===c[n]&&c[++r]===c[n+1]){n+=2,r++;do{}while(c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&no){if(e.match_start=t,o=i,i>=a)break;m=c[n+o-1],g=c[n+o]}}}while((t=p[t&d])>l&&0!=--s);return o<=e.lookahead?o:e.lookahead}function S(e){var t,r,i,n,l,c,h,d,p,f,m=e.w_size;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-u)){s.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=r=e.hash_size;do{i=e.head[--t],e.head[t]=i>=m?i-m:0}while(--r);t=r=m;do{i=e.prev[--t],e.prev[t]=i>=m?i-m:0}while(--r);n+=m}if(0===e.strm.avail_in)break;if(c=e.strm,h=e.window,d=e.strstart+e.lookahead,p=n,f=void 0,(f=c.avail_in)>p&&(f=p),r=0===f?0:(c.avail_in-=f,s.arraySet(h,c.input,c.next_in,f,d),1===c.state.wrap?c.adler=o(c.adler,h,f,d):2===c.state.wrap&&(c.adler=a(c.adler,h,f,d)),c.next_in+=f,c.total_in+=f,f),e.lookahead+=r,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(i=n._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){s=e.strstart+e.lookahead-3,i=n._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=s&&(e.ins_h=(e.ins_h<15&&(a=2,i-=16),n<1||n>9||8!==r||i<8||i>15||t<0||t>9||o<0||o>4)return m(e,c);8===i&&(i=9);var l=new L;return e.state=l,l.strm=e,l.wrap=a,l.gzhead=null,l.w_bits=i,l.w_size=1<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(S(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+r;if((0===e.strstart||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,y(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-u&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(y(e,!1),e.strm.avail_out),1)})),new M(4,4,8,4,A),new M(4,5,16,8,A),new M(4,6,32,32,A),new M(4,4,16,16,C),new M(8,16,32,32,C),new M(8,16,128,128,C),new M(8,32,128,256,C),new M(32,128,258,1024,C),new M(32,258,258,4096,C)],t.deflateInit=function(e,t){return k(e,t,8,15,8,0)},t.deflateInit2=k,t.deflateReset=z,t.deflateResetKeep=E,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,0):c},t.deflate=function(e,t){var r,s,o,l;if(!e||!e.state||t>5||t<0)return e?m(e,c):c;if(s=e.state,!e.output||!e.input&&0!==e.avail_in||s.status===f&&4!==t)return m(e,0===e.avail_out?-5:c);if(s.strm=e,r=s.last_flush,s.last_flush=t,42===s.status)if(2===s.wrap)e.adler=0,_(s,31),_(s,139),_(s,8),s.gzhead?(_(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),_(s,255&s.gzhead.time),_(s,s.gzhead.time>>8&255),_(s,s.gzhead.time>>16&255),_(s,s.gzhead.time>>24&255),_(s,9===s.level?2:s.strategy>=2||s.level<2?4:0),_(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(_(s,255&s.gzhead.extra.length),_(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(e.adler=a(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69):(_(s,0),_(s,0),_(s,0),_(s,0),_(s,0),_(s,9===s.level?2:s.strategy>=2||s.level<2?4:0),_(s,3),s.status=p);else{var u=8+(s.w_bits-8<<4)<<8;u|=(s.strategy>=2||s.level<2?0:s.level<6?1:6===s.level?2:3)<<6,0!==s.strstart&&(u|=32),u+=31-u%31,s.status=p,w(s,u),0!==s.strstart&&(w(s,e.adler>>>16),w(s,65535&e.adler)),e.adler=1}if(69===s.status)if(s.gzhead.extra){for(o=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>o&&(e.adler=a(e.adler,s.pending_buf,s.pending-o,o)),b(e),o=s.pending,s.pending!==s.pending_buf_size));)_(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>o&&(e.adler=a(e.adler,s.pending_buf,s.pending-o,o)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=73)}else s.status=73;if(73===s.status)if(s.gzhead.name){o=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>o&&(e.adler=a(e.adler,s.pending_buf,s.pending-o,o)),b(e),o=s.pending,s.pending===s.pending_buf_size)){l=1;break}l=s.gzindexo&&(e.adler=a(e.adler,s.pending_buf,s.pending-o,o)),0===l&&(s.gzindex=0,s.status=91)}else s.status=91;if(91===s.status)if(s.gzhead.comment){o=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>o&&(e.adler=a(e.adler,s.pending_buf,s.pending-o,o)),b(e),o=s.pending,s.pending===s.pending_buf_size)){l=1;break}l=s.gzindexo&&(e.adler=a(e.adler,s.pending_buf,s.pending-o,o)),0===l&&(s.status=d)}else s.status=d;if(s.status===d&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&b(e),s.pending+2<=s.pending_buf_size&&(_(s,255&e.adler),_(s,e.adler>>8&255),e.adler=0,s.status=p)):s.status=p),0!==s.pending){if(b(e),0===e.avail_out)return s.last_flush=-1,0}else if(0===e.avail_in&&g(t)<=g(r)&&4!==t)return m(e,-5);if(s.status===f&&0!==e.avail_in)return m(e,-5);if(0!==e.avail_in||0!==s.lookahead||0!==t&&s.status!==f){var x=2===s.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(S(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=n._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(s,t):3===s.strategy?function(e,t){for(var r,i,s,o,a=e.window;;){if(e.lookahead<=h){if(S(e),e.lookahead<=h&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=a[s=e.strstart-1])===a[++s]&&i===a[++s]&&i===a[++s]){o=e.strstart+h;do{}while(i===a[++s]&&i===a[++s]&&i===a[++s]&&i===a[++s]&&i===a[++s]&&i===a[++s]&&i===a[++s]&&i===a[++s]&&se.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=n._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=n._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(s,t):i[s.level].func(s,t);if(3!==x&&4!==x||(s.status=f),1===x||3===x)return 0===e.avail_out&&(s.last_flush=-1),0;if(2===x&&(1===t?n._tr_align(s):5!==t&&(n._tr_stored_block(s,0,0,!1),3===t&&(v(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),b(e),0===e.avail_out))return s.last_flush=-1,0}return 4!==t?0:s.wrap<=0?1:(2===s.wrap?(_(s,255&e.adler),_(s,e.adler>>8&255),_(s,e.adler>>16&255),_(s,e.adler>>24&255),_(s,255&e.total_in),_(s,e.total_in>>8&255),_(s,e.total_in>>16&255),_(s,e.total_in>>24&255)):(w(s,e.adler>>>16),w(s,65535&e.adler)),b(e),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==d&&t!==p&&t!==f?m(e,c):(e.state=null,t===p?m(e,-3):0):c},t.deflateSetDictionary=function(e,t){var r,i,n,a,l,h,u,d,p=t.length;if(!e||!e.state)return c;if(2===(a=(r=e.state).wrap)||1===a&&42!==r.status||r.lookahead)return c;for(1===a&&(e.adler=o(e.adler,t,p,0)),r.wrap=0,p>=r.w_size&&(0===a&&(v(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new s.Buf8(r.w_size),s.arraySet(d,t,p-r.w_size,r.w_size,0),t=d,p=r.w_size),l=e.avail_in,h=e.next_in,u=e.input,e.avail_in=p,e.next_in=0,e.input=t,S(r);r.lookahead>=3;){i=r.strstart,n=r.lookahead-2;do{r.ins_h=(r.ins_h<{"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},"./node_modules/upng-js/node_modules/pako/lib/zlib/inffast.js":e=>{"use strict";e.exports=function(e,t){var r,i,s,n,o,a,l,c,h,u,d,p,f,m,g,v,b,y,_,w,x,S,A,C,M;r=e.state,i=e.next_in,C=e.input,s=i+(e.avail_in-5),n=e.next_out,M=e.output,o=n-(t-e.avail_out),a=n+(e.avail_out-257),l=r.dmax,c=r.wsize,h=r.whave,u=r.wnext,d=r.window,p=r.hold,f=r.bits,m=r.lencode,g=r.distcode,v=(1<>>=_=y>>>24,f-=_,0==(_=y>>>16&255))M[n++]=65535&y;else{if(!(16&_)){if(64&_){if(32&_){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}y=m[(65535&y)+(p&(1<<_)-1)];continue t}for(w=65535&y,(_&=15)&&(f<_&&(p+=C[i++]<>>=_,f-=_),f<15&&(p+=C[i++]<>>=_=y>>>24,f-=_,16&(_=y>>>16&255)){if(x=65535&y,f<(_&=15)&&(p+=C[i++]<l){e.msg="invalid distance too far back",r.mode=30;break e}if(p>>>=_,f-=_,x>(_=n-o)){if((_=x-_)>h&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(S=0,A=d,0===u){if(S+=c-_,_2;)M[n++]=A[S++],M[n++]=A[S++],M[n++]=A[S++],w-=3;w&&(M[n++]=A[S++],w>1&&(M[n++]=A[S++]))}else{S=n-x;do{M[n++]=M[S++],M[n++]=M[S++],M[n++]=M[S++],w-=3}while(w>2);w&&(M[n++]=M[S++],w>1&&(M[n++]=M[S++]))}break}if(64&_){e.msg="invalid distance code",r.mode=30;break e}y=g[(65535&y)+(p&(1<<_)-1)]}}break}}while(i>3,p&=(1<<(f-=w<<3))-1,e.next_in=i,e.next_out=n,e.avail_in=i{"use strict";var i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/zlib/adler32.js"),n=r("./node_modules/upng-js/node_modules/pako/lib/zlib/crc32.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/zlib/inffast.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/inftrees.js"),l=-2,c=12,h=30;function u(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function d(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function p(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new i.Buf32(852),t.distcode=t.distdyn=new i.Buf32(592),t.sane=1,t.back=-1,0):l}function f(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,p(e)):l}function m(e,t){var r,i;return e&&e.state?(i=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?l:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,f(e))):l}function g(e,t){var r,i;return e?(i=new d,e.state=i,i.window=null,0!==(r=m(e,t))&&(e.state=null),r):l}var v,b,y=!0;function _(e){if(y){var t;for(v=new i.Buf32(512),b=new i.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,v,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,b,0,e.work,{bits:5}),y=!1}e.lencode=v,e.lenbits=9,e.distcode=b,e.distbits=5}function w(e,t,r,s){var n,o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(i.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((n=o.wsize-o.wnext)>s&&(n=s),i.arraySet(o.window,t,r-s,n,o.wnext),(s-=n)?(i.arraySet(o.window,t,r-s,s,0),o.wnext=s,o.whave=o.wsize):(o.wnext+=n,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,r.check=n(r.check,G,2,0),b=0,y=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg="incorrect header check",r.mode=h;break}if(8!=(15&b)){e.msg="unknown compression method",r.mode=h;break}if(y-=4,I=8+(15&(b>>>=4)),0===r.wbits)r.wbits=I;else if(I>r.wbits){e.msg="invalid window size",r.mode=h;break}r.dmax=1<>8&1),512&r.flags&&(G[0]=255&b,G[1]=b>>>8&255,r.check=n(r.check,G,2,0)),b=0,y=0,r.mode=3;case 3:for(;y<32;){if(0===g)break e;g--,b+=d[f++]<>>8&255,G[2]=b>>>16&255,G[3]=b>>>24&255,r.check=n(r.check,G,4,0)),b=0,y=0,r.mode=4;case 4:for(;y<16;){if(0===g)break e;g--,b+=d[f++]<>8),512&r.flags&&(G[0]=255&b,G[1]=b>>>8&255,r.check=n(r.check,G,2,0)),b=0,y=0,r.mode=5;case 5:if(1024&r.flags){for(;y<16;){if(0===g)break e;g--,b+=d[f++]<>>8&255,r.check=n(r.check,G,2,0)),b=0,y=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((A=r.length)>g&&(A=g),A&&(r.head&&(I=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),i.arraySet(r.head.extra,d,f,A,I)),512&r.flags&&(r.check=n(r.check,d,A,f)),g-=A,f+=A,r.length-=A),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===g)break e;A=0;do{I=d[f+A++],r.head&&I&&r.length<65536&&(r.head.name+=String.fromCharCode(I))}while(I&&A>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=c;break;case 10:for(;y<32;){if(0===g)break e;g--,b+=d[f++]<>>=7&y,y-=7&y,r.mode=27;break}for(;y<3;){if(0===g)break e;g--,b+=d[f++]<>>=1)){case 0:r.mode=14;break;case 1:if(_(r),r.mode=20,6===t){b>>>=2,y-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=h}b>>>=2,y-=2;break;case 14:for(b>>>=7&y,y-=7&y;y<32;){if(0===g)break e;g--,b+=d[f++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=h;break}if(r.length=65535&b,b=0,y=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(A=r.length){if(A>g&&(A=g),A>v&&(A=v),0===A)break e;i.arraySet(p,d,f,A,m),g-=A,f+=A,v-=A,m+=A,r.length-=A;break}r.mode=c;break;case 17:for(;y<14;){if(0===g)break e;g--,b+=d[f++]<>>=5,y-=5,r.ndist=1+(31&b),b>>>=5,y-=5,r.ncode=4+(15&b),b>>>=4,y-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=h;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,y-=3}for(;r.have<19;)r.lens[B[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,D={bits:r.lenbits},F=a(0,r.lens,0,19,r.lencode,0,r.work,D),r.lenbits=D.bits,F){e.msg="invalid code lengths set",r.mode=h;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,z=65535&P,!((L=P>>>24)<=y);){if(0===g)break e;g--,b+=d[f++]<>>=L,y-=L,r.lens[r.have++]=z;else{if(16===z){for(R=L+2;y>>=L,y-=L,0===r.have){e.msg="invalid bit length repeat",r.mode=h;break}I=r.lens[r.have-1],A=3+(3&b),b>>>=2,y-=2}else if(17===z){for(R=L+3;y>>=L)),b>>>=3,y-=3}else{for(R=L+7;y>>=L)),b>>>=7,y-=7}if(r.have+A>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=h;break}for(;A--;)r.lens[r.have++]=I}}if(r.mode===h)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=h;break}if(r.lenbits=9,D={bits:r.lenbits},F=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,D),r.lenbits=D.bits,F){e.msg="invalid literal/lengths set",r.mode=h;break}if(r.distbits=6,r.distcode=r.distdyn,D={bits:r.distbits},F=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,D),r.distbits=D.bits,F){e.msg="invalid distances set",r.mode=h;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(g>=6&&v>=258){e.next_out=m,e.avail_out=v,e.next_in=f,e.avail_in=g,r.hold=b,r.bits=y,o(e,S),m=e.next_out,p=e.output,v=e.avail_out,f=e.next_in,d=e.input,g=e.avail_in,b=r.hold,y=r.bits,r.mode===c&&(r.back=-1);break}for(r.back=0;E=(P=r.lencode[b&(1<>>16&255,z=65535&P,!((L=P>>>24)<=y);){if(0===g)break e;g--,b+=d[f++]<>k)])>>>16&255,z=65535&P,!(k+(L=P>>>24)<=y);){if(0===g)break e;g--,b+=d[f++]<>>=k,y-=k,r.back+=k}if(b>>>=L,y-=L,r.back+=L,r.length=z,0===E){r.mode=26;break}if(32&E){r.back=-1,r.mode=c;break}if(64&E){e.msg="invalid literal/length code",r.mode=h;break}r.extra=15&E,r.mode=22;case 22:if(r.extra){for(R=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;E=(P=r.distcode[b&(1<>>16&255,z=65535&P,!((L=P>>>24)<=y);){if(0===g)break e;g--,b+=d[f++]<>k)])>>>16&255,z=65535&P,!(k+(L=P>>>24)<=y);){if(0===g)break e;g--,b+=d[f++]<>>=k,y-=k,r.back+=k}if(b>>>=L,y-=L,r.back+=L,64&E){e.msg="invalid distance code",r.mode=h;break}r.offset=z,r.extra=15&E,r.mode=24;case 24:if(r.extra){for(R=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=h;break}r.mode=25;case 25:if(0===v)break e;if(A=S-v,r.offset>A){if((A=r.offset-A)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=h;break}A>r.wnext?(A-=r.wnext,C=r.wsize-A):C=r.wnext-A,A>r.length&&(A=r.length),M=r.window}else M=p,C=m-r.offset,A=r.length;A>v&&(A=v),v-=A,r.length-=A;do{p[m++]=M[C++]}while(--A);0===r.length&&(r.mode=21);break;case 26:if(0===v)break e;p[m++]=r.length,v--,r.mode=21;break;case 27:if(r.wrap){for(;y<32;){if(0===g)break e;g--,b|=d[f++]<{"use strict";var i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),s=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],n=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,l,c,h,u,d){var p,f,m,g,v,b,y,_,w,x=d.bits,S=0,A=0,C=0,M=0,L=0,E=0,z=0,k=0,O=0,T=0,I=null,F=0,D=new i.Buf16(16),R=new i.Buf16(16),P=null,G=0;for(S=0;S<=15;S++)D[S]=0;for(A=0;A=1&&0===D[M];M--);if(L>M&&(L=M),0===M)return c[h++]=20971520,c[h++]=20971520,d.bits=1,0;for(C=1;C0&&(0===e||1!==M))return-1;for(R[1]=0,S=1;S<15;S++)R[S+1]=R[S]+D[S];for(A=0;A852||2===e&&O>592)return 1;for(;;){y=S-z,u[A]b?(_=P[G+u[A]],w=I[F+u[A]]):(_=96,w=0),p=1<>z)+(f-=p)]=y<<24|_<<16|w}while(0!==f);for(p=1<>=1;if(0!==p?(T&=p-1,T+=p):T=0,A++,0==--D[S]){if(S===M)break;S=t[r+u[A]]}if(S>L&&(T&g)!==m){for(0===z&&(z=L),v+=C,k=1<<(E=S-z);E+z852||2===e&&O>592)return 1;c[m=T&g]=L<<24|E<<16|v-h}}return 0!==T&&(c[v+T]=S-z<<24|64<<16),d.bits=L,0}},"./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js":e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},"./node_modules/upng-js/node_modules/pako/lib/zlib/trees.js":(e,t,r)=>{"use strict";var i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js");function s(e){for(var t=e.length;--t>=0;)e[t]=0}var n=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],o=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);s(c);var h=new Array(60);s(h);var u=new Array(512);s(u);var d=new Array(256);s(d);var p=new Array(29);s(p);var f,m,g,v=new Array(30);function b(e,t,r,i,s){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=s,this.has_stree=e&&e.length}function y(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function _(e){return e<256?u[e]:u[256+(e>>>7)]}function w(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function x(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function C(e,t,r){var i,s,n=new Array(16),o=0;for(i=1;i<=15;i++)n[i]=o=o+r[i-1]<<1;for(s=0;s<=t;s++){var a=e[2*s+1];0!==a&&(e[2*s]=A(n[a]++,a))}}function M(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function L(e){e.bi_valid>8?w(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function E(e,t,r,i){var s=2*t,n=2*r;return e[s]>1;r>=1;r--)z(e,n,r);s=l;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],z(e,n,1),i=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=i,n[2*s]=n[2*r]+n[2*i],e.depth[s]=(e.depth[r]>=e.depth[i]?e.depth[r]:e.depth[i])+1,n[2*r+1]=n[2*i+1]=s,e.heap[1]=s++,z(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,i,s,n,o,a,l=t.dyn_tree,c=t.max_code,h=t.stat_desc.static_tree,u=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,f=t.stat_desc.max_length,m=0;for(n=0;n<=15;n++)e.bl_count[n]=0;for(l[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(n=l[2*l[2*(i=e.heap[r])+1]+1]+1)>f&&(n=f,m++),l[2*i+1]=n,i>c||(e.bl_count[n]++,o=0,i>=p&&(o=d[i-p]),a=l[2*i],e.opt_len+=a*(n+o),u&&(e.static_len+=a*(h[2*i+1]+o)));if(0!==m){do{for(n=f-1;0===e.bl_count[n];)n--;e.bl_count[n]--,e.bl_count[n+1]+=2,e.bl_count[f]--,m-=2}while(m>0);for(n=f;0!==n;n--)for(i=e.bl_count[n];0!==i;)(s=e.heap[--r])>c||(l[2*s+1]!==n&&(e.opt_len+=(n-l[2*s+1])*l[2*s],l[2*s+1]=n),i--)}}(e,t),C(n,c,e.bl_count)}function T(e,t,r){var i,s,n=-1,o=t[1],a=0,l=7,c=4;for(0===o&&(l=138,c=3),t[2*(r+1)+1]=65535,i=0;i<=r;i++)s=o,o=t[2*(i+1)+1],++a>=7;i<30;i++)for(v[i]=s<<7,e=0;e<1<0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),O(e,e.l_desc),O(e,e.d_desc),o=function(e){var t;for(T(e,e.dyn_ltree,e.l_desc.max_code),T(e,e.dyn_dtree,e.d_desc.max_code),O(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*l[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),s=e.opt_len+3+7>>>3,(n=e.static_len+3+7>>>3)<=s&&(s=n)):s=n=r+5,r+4<=s&&-1!==t?D(e,t,r,i):4===e.strategy||n===s?(x(e,2+(i?1:0),3),k(e,c,h)):(x(e,4+(i?1:0),3),function(e,t,r,i){var s;for(x(e,t-257,5),x(e,r-1,5),x(e,i-4,4),s=0;s>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(d[r]+256+1)]++,e.dyn_dtree[2*_(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){x(e,2,3),S(e,256,c),function(e){16===e.bi_valid?(w(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},"./node_modules/upng-js/node_modules/pako/lib/zlib/zstream.js":e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},"./src/SurfaceWorker.js":()=>{$3Dmol.workerString=function(){self.onmessage=function(e){var t=e.data,r=t.type;if(r<0)self.atomData=t.atoms,self.volume=t.volume,self.ps=new ProteinSurface;else{var i=self.ps;i.initparm(t.expandedExtent,1!=r,self.volume),i.fillvoxels(self.atomData,t.extendedAtoms),i.buildboundary(),4!==r&&2!==r||(i.fastdistancemap(),i.boundingatom(!1),i.fillvoxelswaals(self.atomData,t.extendedAtoms)),i.marchingcube(r);var s=i.getFacesAndVertices(t.atomsToShow);self.postMessage(s)}}}.toString().replace(/(^.*?\{|\}$)/g,""),$3Dmol.workerString+=";\nfunction _classCallCheck() {};",$3Dmol.workerString+=";\n"+$3Dmol.Vector3.toString(),$3Dmol.workerString+=";\n"+$3Dmol.MarchingCubeInitializer.toString()+";\n\n",$3Dmol.workerString+=";\n"+$3Dmol.PointGrid.toString()+";\n",$3Dmol.workerString+=";\nvar ProteinSurface = "+$3Dmol.ProteinSurface.toString()+";\n",$3Dmol.SurfaceWorker=window.URL?window.URL.createObjectURL(new Blob([$3Dmol.workerString],{type:"text/javascript"})):void 0},"./src/exporter.js":e=>{"object"==typeof e.exports&&(e.exports=window.$3Dmol)},"./src/vendor/mmtf.js":function(e,t){!function(e){"use strict";function t(e,t,r){for(var i=(e.byteLength,0),s=r.length;s>i;i++){var n=r.charCodeAt(i);if(128>n)e.setUint8(t++,n>>>0&127);else if(2048>n)e.setUint8(t++,n>>>6&31|192),e.setUint8(t++,n>>>0&63|128);else if(65536>n)e.setUint8(t++,n>>>12&15|224),e.setUint8(t++,n>>>6&63|128),e.setUint8(t++,n>>>0&63|128);else{if(!(1114112>n))throw new Error("bad codepoint "+n);e.setUint8(t++,n>>>18&7|240),e.setUint8(t++,n>>>12&63|128),e.setUint8(t++,n>>>6&63|128),e.setUint8(t++,n>>>0&63|128)}}}function r(e){for(var t=0,r=0,i=e.length;i>r;r++){var s=e.charCodeAt(r);if(128>s)t+=1;else if(2048>s)t+=2;else if(65536>s)t+=3;else{if(!(1114112>s))throw new Error("bad codepoint "+s);t+=4}}return t}function i(e,s,n){var o=typeof e;if("string"===o){if(32>(a=r(e)))return s.setUint8(n,160|a),t(s,n+1,e),1+a;if(256>a)return s.setUint8(n,217),s.setUint8(n+1,a),t(s,n+2,e),2+a;if(65536>a)return s.setUint8(n,218),s.setUint16(n+1,a),t(s,n+3,e),3+a;if(4294967296>a)return s.setUint8(n,219),s.setUint32(n+1,a),t(s,n+5,e),5+a}if(e instanceof Uint8Array){var a=e.byteLength,l=new Uint8Array(s.buffer);if(256>a)return s.setUint8(n,196),s.setUint8(n+1,a),l.set(e,n+2),2+a;if(65536>a)return s.setUint8(n,197),s.setUint16(n+1,a),l.set(e,n+3),3+a;if(4294967296>a)return s.setUint8(n,198),s.setUint32(n+1,a),l.set(e,n+5),5+a}if("number"===o){if(!isFinite(e))throw new Error("Number not finite: "+e);if(Math.floor(e)!==e)return s.setUint8(n,203),s.setFloat64(n+1,e),9;if(e>=0){if(128>e)return s.setUint8(n,e),1;if(256>e)return s.setUint8(n,204),s.setUint8(n+1,e),2;if(65536>e)return s.setUint8(n,205),s.setUint16(n+1,e),3;if(4294967296>e)return s.setUint8(n,206),s.setUint32(n+1,e),5;throw new Error("Number too big 0x"+e.toString(16))}if(e>=-32)return s.setInt8(n,e),1;if(e>=-128)return s.setUint8(n,208),s.setInt8(n+1,e),2;if(e>=-32768)return s.setUint8(n,209),s.setInt16(n+1,e),3;if(e>=-2147483648)return s.setUint8(n,210),s.setInt32(n+1,e),5;throw new Error("Number too small -0x"+(-e).toString(16).substr(1))}if(null===e)return s.setUint8(n,192),1;if("boolean"===o)return s.setUint8(n,e?195:194),1;if("object"===o){var c=0,h=Array.isArray(e);if(h)a=e.length;else{var u=Object.keys(e);a=u.length}if(16>a?(s.setUint8(n,a|(h?144:128)),c=1):65536>a?(s.setUint8(n,h?220:222),s.setUint16(n+1,a),c=3):4294967296>a&&(s.setUint8(n,h?221:223),s.setUint32(n+1,a),c=5),h)for(var d=0;a>d;d++)c+=i(e[d],s,n+c);else for(d=0;a>d;d++){var p=u[d];c+=i(p,s,n+c),c+=i(e[p],s,n+c)}return c}throw new Error("Unknown type "+o)}function s(e){var t=typeof e;if("string"===t){if(32>(i=r(e)))return 1+i;if(256>i)return 2+i;if(65536>i)return 3+i;if(4294967296>i)return 5+i}if(e instanceof Uint8Array){if(256>(i=e.byteLength))return 2+i;if(65536>i)return 3+i;if(4294967296>i)return 5+i}if("number"===t){if(Math.floor(e)!==e)return 9;if(e>=0){if(128>e)return 1;if(256>e)return 2;if(65536>e)return 3;if(4294967296>e)return 5;throw new Error("Number too big 0x"+e.toString(16))}if(e>=-32)return 1;if(e>=-128)return 2;if(e>=-32768)return 3;if(e>=-2147483648)return 5;throw new Error("Number too small -0x"+e.toString(16).substr(1))}if("boolean"===t||null===e)return 1;if("object"===t){var i,n=0;if(Array.isArray(e)){i=e.length;for(var o=0;i>o;o++)n+=s(e[o])}else{var a=Object.keys(e);for(i=a.length,o=0;i>o;o++){var l=a[o];n+=s(l)+s(e[l])}}if(16>i)return 1+n;if(65536>i)return 3+n;if(4294967296>i)return 5+n;throw new Error("Array or object too long 0x"+i.toString(16))}throw new Error("Unknown type "+t)}function n(e){var t=new ArrayBuffer(s(e));return i(e,new DataView(t),0),new Uint8Array(t)}function o(e,t,r){return t?new e(t.buffer,t.byteOffset,t.byteLength/(r||1)):void 0}function a(e){return o(DataView,e)}function l(e){return o(Uint8Array,e)}function c(e){return o(Int8Array,e)}function h(e){return o(Int32Array,e,4)}function u(e,t){var r=e.length/2;t||(t=new Int16Array(r));for(var i=0,s=0;r>i;++i,s+=2)t[i]=e[s]<<8^e[s+1];return t}function d(e,t){var r=e.length/4;t||(t=new Int32Array(r));for(var i=0,s=0;r>i;++i,s+=4)t[i]=e[s]<<24^e[s+1]<<16^e[s+2]<<8^e[s+3];return t}function p(e,t){var r=e.length;t||(t=new Uint8Array(4*r));for(var i=a(t),s=0;r>s;++s)i.setInt32(4*s,e[s]);return l(t)}function f(e,t,r){var i=e.length,s=1/t;r||(r=new Float32Array(i));for(var n=0;i>n;++n)r[n]=e[n]*s;return r}function m(e,t,r){var i=e.length;r||(r=new Int32Array(i));for(var s=0;i>s;++s)r[s]=Math.round(e[s]*t);return r}function g(e,t){var r,i;if(!t){var s=0;for(r=0,i=e.length;i>r;r+=2)s+=e[r+1];t=new e.constructor(s)}var n=0;for(r=0,i=e.length;i>r;r+=2)for(var o=e[r],a=e[r+1],l=0;a>l;++l)t[n]=o,++n;return t}function v(e){if(0===e.length)return new Int32Array;var t,r,i=2;for(t=1,r=e.length;r>t;++t)e[t-1]!==e[t]&&(i+=2);var s=new Int32Array(i),n=0,o=1;for(t=1,r=e.length;r>t;++t)e[t-1]!==e[t]?(s[n]=e[t-1],s[n+1]=o,o=1,n+=2):++o;return s[n]=e[e.length-1],s[n+1]=o,s}function b(e,t){var r=e.length;t||(t=new e.constructor(r)),r&&(t[0]=e[0]);for(var i=1;r>i;++i)t[i]=e[i]+t[i-1];return t}function y(e,t){var r=e.length;t||(t=new e.constructor(r)),t[0]=e[0];for(var i=1;r>i;++i)t[i]=e[i]-e[i-1];return t}function _(e,t){var r,i,s=e instanceof Int8Array?127:32767,n=-s-1,o=e.length;if(!t){var a=0;for(r=0;o>r;++r)e[r]n&&++a;t=new Int32Array(a)}for(r=0,i=0;o>r;){for(var l=0;e[r]===s||e[r]===n;)l+=e[r],++r;l+=e[r],++r,t[i]=l,++i}return t}function w(e,t,r){return f(_(e,h(r)),t,r)}function x(e,t,r){var i=_(e,h(r));return function(e,t,r){return f(b(e,h(r)),t,r)}(i,t,function(e){return o(Float32Array,e,4)}(i))}function S(e,t,r){return function(e,t){var r,i=t?127:32767,s=-i-1,n=e.length,o=0;for(r=0;n>r;++r)0===(c=e[r])?++o:c>0?(o+=Math.ceil(c/i),c%i==0&&(o+=1)):(o+=Math.ceil(c/s),c%s==0&&(o+=1));var a=t?new Int8Array(o):new Int16Array(o),l=0;for(r=0;n>r;++r){var c;if((c=e[r])>=0)for(;c>=i;)a[l]=i,++l,c-=i;else for(;s>=c;)a[l]=s,++l,c-=s;a[l]=c,++l}return a}(function(e,t,r){return y(m(e,t),r)}(e,t),r)}function A(e,t,r,i){var s=new ArrayBuffer(12+i.byteLength),n=new Uint8Array(s),o=new DataView(s);return o.setInt32(0,e),o.setInt32(4,t),r&&n.set(r,8),n.set(i,12),n}function C(e){return A(2,e.length,void 0,l(e))}function M(e){return A(4,e.length,void 0,p(e))}function L(e,t){return A(5,e.length/t,p([t]),l(e))}function E(e){return A(6,e.length,void 0,p(v(e)))}function z(e){return A(8,e.length,void 0,p(function(e){return v(y(e))}(e)))}function k(e,t){return A(9,e.length,p([t]),p(function(e,t){return v(m(e,t))}(e,t)))}function O(e,t){return A(10,e.length,p([t]),function(e,t){var r=e.length;t||(t=new Uint8Array(2*r));for(var i=a(t),s=0;r>s;++s)i.setInt16(2*s,e[s]);return l(t)}(S(e,t)))}function T(e){var t={};return B.forEach((function(r){void 0!==e[r]&&(t[r]=e[r])})),e.bondAtomList&&(t.bondAtomList=M(e.bondAtomList)),e.bondOrderList&&(t.bondOrderList=C(e.bondOrderList)),t.xCoordList=O(e.xCoordList,1e3),t.yCoordList=O(e.yCoordList,1e3),t.zCoordList=O(e.zCoordList,1e3),e.bFactorList&&(t.bFactorList=O(e.bFactorList,100)),e.atomIdList&&(t.atomIdList=z(e.atomIdList)),e.altLocList&&(t.altLocList=E(e.altLocList)),e.occupancyList&&(t.occupancyList=k(e.occupancyList,100)),t.groupIdList=z(e.groupIdList),t.groupTypeList=M(e.groupTypeList),e.secStructList&&(t.secStructList=C(e.secStructList)),e.insCodeList&&(t.insCodeList=E(e.insCodeList)),e.sequenceIndexList&&(t.sequenceIndexList=z(e.sequenceIndexList)),t.chainIdList=L(e.chainIdList,4),e.chainNameList&&(t.chainNameList=L(e.chainNameList,4)),t}function I(e){function t(e){for(var t={},r=0;e>r;r++)t[n()]=n();return t}function r(t){var r=e.subarray(o,o+t);return o+=t,r}function i(t){var r=e.subarray(o,o+t);o+=t;var i=65535;if(t>i){for(var s=[],n=0;nr;r++)t[r]=n();return t}function n(){var n,l,c=e[o];if(!(128&c))return o++,c;if(128==(240&c))return o++,t(l=15&c);if(144==(240&c))return o++,s(l=15&c);if(160==(224&c))return o++,i(l=31&c);if(!(224&~c))return n=a.getInt8(o),o++,n;switch(c){case 192:return o++,null;case 194:return o++,!1;case 195:return o++,!0;case 196:return l=a.getUint8(o+1),o+=2,r(l);case 197:return l=a.getUint16(o+1),o+=3,r(l);case 198:return l=a.getUint32(o+1),o+=5,r(l);case 202:return n=a.getFloat32(o+1),o+=5,n;case 203:return n=a.getFloat64(o+1),o+=9,n;case 204:return n=e[o+1],o+=2,n;case 205:return n=a.getUint16(o+1),o+=3,n;case 206:return n=a.getUint32(o+1),o+=5,n;case 208:return n=a.getInt8(o+1),o+=2,n;case 209:return n=a.getInt16(o+1),o+=3,n;case 210:return n=a.getInt32(o+1),o+=5,n;case 217:return l=a.getUint8(o+1),o+=2,i(l);case 218:return l=a.getUint16(o+1),o+=3,i(l);case 219:return l=a.getUint32(o+1),o+=5,i(l);case 220:return l=a.getUint16(o+1),o+=3,s(l);case 221:return l=a.getUint32(o+1),o+=5,s(l);case 222:return l=a.getUint16(o+1),o+=3,t(l);case 223:return l=a.getUint32(o+1),o+=5,t(l)}throw new Error("Unknown type 0x"+c.toString(16))}var o=0,a=new DataView(e.buffer);return n()}function F(e,t,r,i){switch(e){case 1:return function(e,t){var r=e.length;t||(t=new Float32Array(r/4));for(var i=a(t),s=a(e),n=0,o=0,l=r/4;l>n;++n,o+=4)i.setFloat32(o,s.getFloat32(o),!0);return t}(t);case 2:return c(t);case 3:return u(t);case 4:return d(t);case 5:return l(t);case 6:return g(d(t),new Uint8Array(r));case 7:return g(d(t));case 8:return function(e,t){return b(g(e),t)}(d(t));case 9:return function(e,t,r){return f(g(e,h(r)),t,r)}(d(t),d(i)[0]);case 10:return x(u(t),d(i)[0]);case 11:return f(u(t),d(i)[0]);case 12:return w(u(t),d(i)[0]);case 13:return w(c(t),d(i)[0]);case 14:return _(u(t));case 15:return _(c(t))}}function D(e,t){var r=(t=t||{}).ignoreFields,i={};return j.forEach((function(t){var s=!!r&&-1!==r.indexOf(t),n=e[t];s||void 0===n||(n instanceof Uint8Array?i[t]=F.apply(null,function(e){var t=a(e),r=t.getInt32(0),i=t.getInt32(4),s=e.subarray(8,12);return[r,e=e.subarray(12),i,s]}(n)):i[t]=n)})),i}function R(e){return String.fromCharCode.apply(null,e).replace(/\0/g,"")}function P(e,t){return e instanceof ArrayBuffer&&(e=new Uint8Array(e)),D(e instanceof Uint8Array?I(e):e,t)}function G(e,t,r,i){var s=new XMLHttpRequest;s.addEventListener("load",(function(){try{var e=P(s.response);r(e)}catch(e){i(e)}}),!0),s.addEventListener("error",i,!0),s.responseType="arraybuffer",s.open("GET",t+e.toUpperCase()),s.send()}var B=["mmtfVersion","mmtfProducer","unitCell","spaceGroup","structureId","title","depositionDate","releaseDate","experimentalMethods","resolution","rFree","rWork","bioAssemblyList","ncsOperatorList","entityList","groupList","numBonds","numAtoms","numGroups","numChains","numModels","groupsPerChain","chainsPerModel"],j=B.concat(["xCoordList","yCoordList","zCoordList","groupIdList","groupTypeList","chainIdList","bFactorList","atomIdList","altLocList","occupancyList","secStructList","insCodeList","sequenceIndexList","chainNameList","bondAtomList","bondOrderList"]),N="//mmtf.rcsb.org/v1.0/",U=N+"full/",V=N+"reduced/";e.encode=function(e){return n(T(e))},e.decode=P,e.traverse=function(e,t,r){var i,s,n,o,a,l,c=(r=r||{}).firstModelOnly,h=t.onModel,u=t.onChain,d=t.onGroup,p=t.onAtom,f=t.onBond,m=0,g=0,v=0,b=0,y=0,_=-1,w=e.chainNameList,x=e.secStructList,S=e.insCodeList,A=e.sequenceIndexList,C=e.atomIdList,M=e.bFactorList,L=e.altLocList,E=e.occupancyList,z=e.bondAtomList,k=e.bondOrderList;for(i=0,s=e.chainsPerModel.length;s>i&&!(c&&m>0);++i){var O=e.chainsPerModel[m];for(h&&h({chainCount:O,modelIndex:m}),n=0;O>n;++n){var T=e.groupsPerChain[g];if(u){var I=R(e.chainIdList.subarray(4*g,4*g+4)),F=null;w&&(F=R(w.subarray(4*g,4*g+4))),u({groupCount:T,chainIndex:g,modelIndex:m,chainId:I,chainName:F})}for(o=0;T>o;++o){var D=e.groupList[e.groupTypeList[v]],P=D.atomNameList.length;if(d){var G=null;x&&(G=x[v]);var B=null;e.insCodeList&&(B=String.fromCharCode(S[v]));var j=null;A&&(j=A[v]),d({atomCount:P,groupIndex:v,chainIndex:g,modelIndex:m,groupId:e.groupIdList[v],groupType:e.groupTypeList[v],groupName:D.groupName,singleLetterCode:D.singleLetterCode,chemCompType:D.chemCompType,secStruct:G,insCode:B,sequenceIndex:j})}for(a=0;P>a;++a){if(p){var N=null;C&&(N=C[b]);var U=null;M&&(U=M[b]);var V=null;L&&(V=String.fromCharCode(L[b]));var W=null;E&&(W=E[b]),p({atomIndex:b,groupIndex:v,chainIndex:g,modelIndex:m,atomId:N,element:D.elementList[a],atomName:D.atomNameList[a],formalCharge:D.formalChargeList[a],xCoord:e.xCoordList[b],yCoord:e.yCoordList[b],zCoord:e.zCoordList[b],bFactor:U,altLoc:V,occupancy:W})}b+=1}if(f){var H=D.bondAtomList;for(a=0,l=D.bondOrderList.length;l>a;++a)f({atomIndex1:b-P+H[2*a],atomIndex2:b-P+H[2*a+1],bondOrder:D.bondOrderList[a]})}v+=1}g+=1}if(y=_+1,_=b-1,f&&z)for(a=0,l=z.length;l>a;a+=2){var q=z[a],Y=z[a+1];(q>=y&&_>=q||Y>=y&&_>=Y)&&f({atomIndex1:q,atomIndex2:Y,bondOrder:k?k[a/2]:null})}m+=1}},e.fetch=function(e,t,r){G(e,U,t,r)},e.fetchReduced=function(e,t,r){G(e,V,t,r)},e.version="v1.0.1",e.fetchUrl=U,e.fetchReducedUrl=V,e.encodeMsgpack=n,e.encodeMmtf=T,e.decodeMsgpack=I,e.decodeMmtf=D}(t)},"./node_modules/pako/dist/pako.esm.mjs":(e,t,r)=>{"use strict";function i(e){let t=e.length;for(;--t>=0;)e[t]=0}r.r(t),r.d(t,{Deflate:()=>xr,Inflate:()=>Mr,constants:()=>kr,default:()=>Or,deflate:()=>Sr,deflateRaw:()=>Ar,gzip:()=>Cr,inflate:()=>Lr,inflateRaw:()=>Er,ungzip:()=>zr});const s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),a=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=new Array(576);i(l);const c=new Array(60);i(c);const h=new Array(512);i(h);const u=new Array(256);i(u);const d=new Array(29);i(d);const p=new Array(30);function f(e,t,r,i,s){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=s,this.has_stree=e&&e.length}let m,g,v;function b(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}i(p);const y=e=>e<256?h[e]:h[256+(e>>>7)],_=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},w=(e,t,r)=>{e.bi_valid>16-r?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<{w(e,r[2*t],r[2*t+1])},S=(e,t)=>{let r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1},A=(e,t,r)=>{const i=new Array(16);let s,n,o=0;for(s=1;s<=15;s++)o=o+r[s-1]<<1,i[s]=o;for(n=0;n<=t;n++){let t=e[2*n+1];0!==t&&(e[2*n]=S(i[t]++,t))}},C=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},M=e=>{e.bi_valid>8?_(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},L=(e,t,r,i)=>{const s=2*t,n=2*r;return e[s]{const i=e.heap[r];let s=r<<1;for(;s<=e.heap_len&&(s{let i,o,a,l,c=0;if(0!==e.sym_next)do{i=255&e.pending_buf[e.sym_buf+c++],i+=(255&e.pending_buf[e.sym_buf+c++])<<8,o=e.pending_buf[e.sym_buf+c++],0===i?x(e,o,t):(a=u[o],x(e,a+256+1,t),l=s[a],0!==l&&(o-=d[a],w(e,o,l)),i--,a=y(i),x(e,a,r),l=n[a],0!==l&&(i-=p[a],w(e,i,l)))}while(c{const r=t.dyn_tree,i=t.stat_desc.static_tree,s=t.stat_desc.has_stree,n=t.stat_desc.elems;let o,a,l,c=-1;for(e.heap_len=0,e.heap_max=573,o=0;o>1;o>=1;o--)E(e,r,o);l=n;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],E(e,r,1),a=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=a,r[2*l]=r[2*o]+r[2*a],e.depth[l]=(e.depth[o]>=e.depth[a]?e.depth[o]:e.depth[a])+1,r[2*o+1]=r[2*a+1]=l,e.heap[1]=l++,E(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const r=t.dyn_tree,i=t.max_code,s=t.stat_desc.static_tree,n=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,l=t.stat_desc.max_length;let c,h,u,d,p,f,m=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(r[2*e.heap[e.heap_max]+1]=0,c=e.heap_max+1;c<573;c++)h=e.heap[c],d=r[2*r[2*h+1]+1]+1,d>l&&(d=l,m++),r[2*h+1]=d,h>i||(e.bl_count[d]++,p=0,h>=a&&(p=o[h-a]),f=r[2*h],e.opt_len+=f*(d+p),n&&(e.static_len+=f*(s[2*h+1]+p)));if(0!==m){do{for(d=l-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[l]--,m-=2}while(m>0);for(d=l;0!==d;d--)for(h=e.bl_count[d];0!==h;)u=e.heap[--c],u>i||(r[2*u+1]!==d&&(e.opt_len+=(d-r[2*u+1])*r[2*u],r[2*u+1]=d),h--)}})(e,t),A(r,c,e.bl_count)},O=(e,t,r)=>{let i,s,n=-1,o=t[1],a=0,l=7,c=4;for(0===o&&(l=138,c=3),t[2*(r+1)+1]=65535,i=0;i<=r;i++)s=o,o=t[2*(i+1)+1],++a{let i,s,n=-1,o=t[1],a=0,l=7,c=4;for(0===o&&(l=138,c=3),i=0;i<=r;i++)if(s=o,o=t[2*(i+1)+1],!(++a{w(e,0+(i?1:0),3),M(e),_(e,r),_(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r};var D={_tr_init:e=>{I||((()=>{let e,t,r,i,a;const b=new Array(16);for(r=0,i=0;i<28;i++)for(d[i]=r,e=0;e<1<>=7;i<30;i++)for(p[i]=a<<7,e=0;e<1<{let s,n,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),k(e,e.l_desc),k(e,e.d_desc),o=(e=>{let t;for(O(e,e.dyn_ltree,e.l_desc.max_code),O(e,e.dyn_dtree,e.d_desc.max_code),k(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*a[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),s=e.opt_len+3+7>>>3,n=e.static_len+3+7>>>3,n<=s&&(s=n)):s=n=r+5,r+4<=s&&-1!==t?F(e,t,r,i):4===e.strategy||n===s?(w(e,2+(i?1:0),3),z(e,l,c)):(w(e,4+(i?1:0),3),((e,t,r,i)=>{let s;for(w(e,t-257,5),w(e,r-1,5),w(e,i-4,4),s=0;s(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=r,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(u[r]+256+1)]++,e.dyn_dtree[2*y(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{w(e,2,3),x(e,256,l),(e=>{16===e.bi_valid?(_(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},R=(e,t,r,i)=>{let s=65535&e,n=e>>>16&65535,o=0;for(;0!==r;){o=r>2e3?2e3:r,r-=o;do{s=s+t[i++]|0,n=n+s|0}while(--o);s%=65521,n%=65521}return s|n<<16};const P=new Uint32Array((()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})());var G=(e,t,r,i)=>{const s=P,n=i+r;e^=-1;for(let r=i;r>>8^s[255&(e^t[r])];return~e},B={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},j={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:N,_tr_stored_block:U,_tr_flush_block:V,_tr_tally:W,_tr_align:H}=D,{Z_NO_FLUSH:q,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:Z,Z_FINISH:X,Z_BLOCK:$,Z_OK:K,Z_STREAM_END:J,Z_STREAM_ERROR:Q,Z_DATA_ERROR:ee,Z_BUF_ERROR:te,Z_DEFAULT_COMPRESSION:re,Z_FILTERED:ie,Z_HUFFMAN_ONLY:se,Z_RLE:ne,Z_FIXED:oe,Z_DEFAULT_STRATEGY:ae,Z_UNKNOWN:le,Z_DEFLATED:ce}=j,he=258,ue=262,de=42,pe=113,fe=666,me=(e,t)=>(e.msg=B[t],t),ge=e=>2*e-(e>4?9:0),ve=e=>{let t=e.length;for(;--t>=0;)e[t]=0},be=e=>{let t,r,i,s=e.w_size;t=e.hash_size,i=t;do{r=e.head[--i],e.head[i]=r>=s?r-s:0}while(--t);t=s,i=t;do{r=e.prev[--i],e.prev[i]=r>=s?r-s:0}while(--t)};let ye=(e,t,r)=>(t<{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))},we=(e,t)=>{V(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,_e(e.strm)},xe=(e,t)=>{e.pending_buf[e.pending++]=t},Se=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Ae=(e,t,r,i)=>{let s=e.avail_in;return s>i&&(s=i),0===s?0:(e.avail_in-=s,t.set(e.input.subarray(e.next_in,e.next_in+s),r),1===e.state.wrap?e.adler=R(e.adler,t,s,r):2===e.state.wrap&&(e.adler=G(e.adler,t,s,r)),e.next_in+=s,e.total_in+=s,s)},Ce=(e,t)=>{let r,i,s=e.max_chain_length,n=e.strstart,o=e.prev_length,a=e.nice_match;const l=e.strstart>e.w_size-ue?e.strstart-(e.w_size-ue):0,c=e.window,h=e.w_mask,u=e.prev,d=e.strstart+he;let p=c[n+o-1],f=c[n+o];e.prev_length>=e.good_match&&(s>>=2),a>e.lookahead&&(a=e.lookahead);do{if(r=t,c[r+o]===f&&c[r+o-1]===p&&c[r]===c[n]&&c[++r]===c[n+1]){n+=2,r++;do{}while(c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&no){if(e.match_start=t,o=i,i>=a)break;p=c[n+o-1],f=c[n+o]}}}while((t=u[t&h])>l&&0!=--s);return o<=e.lookahead?o:e.lookahead},Me=e=>{const t=e.w_size;let r,i,s;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-ue)&&(e.window.set(e.window.subarray(t,t+t-i),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),be(e),i+=t),0===e.strm.avail_in)break;if(r=Ae(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=r,e.lookahead+e.insert>=3)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=ye(e,e.ins_h,e.window[s+1]);e.insert&&(e.ins_h=ye(e,e.ins_h,e.window[s+3-1]),e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead{let r,i,s,n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,o=0,a=e.strm.avail_in;do{if(r=65535,s=e.bi_valid+42>>3,e.strm.avail_outi+e.strm.avail_in&&(r=i+e.strm.avail_in),r>s&&(r=s),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,_e(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(Ae(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(0===o);return a-=e.strm.avail_in,a&&(a>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=a&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_waters&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,s+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),s>e.strm.avail_in&&(s=e.strm.avail_in),s&&(Ae(e.strm,e.window,e.strstart,s),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.high_water>3,s=e.pending_buf_size-s>65535?65535:e.pending_buf_size-s,n=s>e.w_size?e.w_size:s,i=e.strstart-e.block_start,(i>=n||(i||t===X)&&t!==q&&0===e.strm.avail_in&&i<=s)&&(r=i>s?s:i,o=t===X&&0===e.strm.avail_in&&r===i?1:0,U(e,e.block_start,r,o),e.block_start+=r,_e(e.strm)),o?3:1)},Ee=(e,t)=>{let r,i;for(;;){if(e.lookahead=3&&(e.ins_h=ye(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-ue&&(e.match_length=Ce(e,r)),e.match_length>=3)if(i=W(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=ye(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=ye(e,e.ins_h,e.window[e.strstart+1]);else i=W(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(we(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===X?(we(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(we(e,!1),0===e.strm.avail_out)?1:2},ze=(e,t)=>{let r,i,s;for(;;){if(e.lookahead=3&&(e.ins_h=ye(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){s=e.strstart+e.lookahead-3,i=W(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=s&&(e.ins_h=ye(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,i&&(we(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(i=W(e,0,e.window[e.strstart-1]),i&&we(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=W(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===X?(we(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(we(e,!1),0===e.strm.avail_out)?1:2};function ke(e,t,r,i,s){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=i,this.func=s}const Oe=[new ke(0,0,0,0,Le),new ke(4,4,8,4,Ee),new ke(4,5,16,8,Ee),new ke(4,6,32,32,Ee),new ke(4,4,16,16,ze),new ke(8,16,32,32,ze),new ke(8,16,128,128,ze),new ke(8,32,128,256,ze),new ke(32,128,258,1024,ze),new ke(32,258,258,4096,ze)];function Te(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ce,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),ve(this.dyn_ltree),ve(this.dyn_dtree),ve(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),ve(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),ve(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Ie=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==de&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==pe&&t.status!==fe?1:0},Fe=e=>{if(Ie(e))return me(e,Q);e.total_in=e.total_out=0,e.data_type=le;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?de:pe,e.adler=2===t.wrap?0:1,t.last_flush=-2,N(t),K},De=e=>{const t=Fe(e);var r;return t===K&&((r=e.state).window_size=2*r.w_size,ve(r.head),r.max_lazy_match=Oe[r.level].max_lazy,r.good_match=Oe[r.level].good_length,r.nice_match=Oe[r.level].nice_length,r.max_chain_length=Oe[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),t},Re=(e,t,r,i,s,n)=>{if(!e)return Q;let o=1;if(t===re&&(t=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),s<1||s>9||r!==ce||i<8||i>15||t<0||t>9||n<0||n>oe||8===i&&1!==o)return me(e,Q);8===i&&(i=9);const a=new Te;return e.state=a,a.strm=e,a.status=de,a.wrap=o,a.gzhead=null,a.w_bits=i,a.w_size=1<Ie(e)||2!==e.state.wrap?Q:(e.state.gzhead=t,K),Be=(e,t)=>{if(Ie(e)||t>$||t<0)return e?me(e,Q):Q;const r=e.state;if(!e.output||0!==e.avail_in&&!e.input||r.status===fe&&t!==X)return me(e,0===e.avail_out?te:Q);const i=r.last_flush;if(r.last_flush=t,0!==r.pending){if(_e(e),0===e.avail_out)return r.last_flush=-1,K}else if(0===e.avail_in&&ge(t)<=ge(i)&&t!==X)return me(e,te);if(r.status===fe&&0!==e.avail_in)return me(e,te);if(r.status===de&&0===r.wrap&&(r.status=pe),r.status===de){let t=ce+(r.w_bits-8<<4)<<8,i=-1;if(i=r.strategy>=se||r.level<2?0:r.level<6?1:6===r.level?2:3,t|=i<<6,0!==r.strstart&&(t|=32),t+=31-t%31,Se(r,t),0!==r.strstart&&(Se(r,e.adler>>>16),Se(r,65535&e.adler)),e.adler=1,r.status=pe,_e(e),0!==r.pending)return r.last_flush=-1,K}if(57===r.status)if(e.adler=0,xe(r,31),xe(r,139),xe(r,8),r.gzhead)xe(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),xe(r,255&r.gzhead.time),xe(r,r.gzhead.time>>8&255),xe(r,r.gzhead.time>>16&255),xe(r,r.gzhead.time>>24&255),xe(r,9===r.level?2:r.strategy>=se||r.level<2?4:0),xe(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(xe(r,255&r.gzhead.extra.length),xe(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=G(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(xe(r,0),xe(r,0),xe(r,0),xe(r,0),xe(r,0),xe(r,9===r.level?2:r.strategy>=se||r.level<2?4:0),xe(r,3),r.status=pe,_e(e),0!==r.pending)return r.last_flush=-1,K;if(69===r.status){if(r.gzhead.extra){let t=r.pending,i=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+i>r.pending_buf_size;){let s=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+s),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>t&&(e.adler=G(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex+=s,_e(e),0!==r.pending)return r.last_flush=-1,K;t=0,i-=s}let s=new Uint8Array(r.gzhead.extra);r.pending_buf.set(s.subarray(r.gzindex,r.gzindex+i),r.pending),r.pending+=i,r.gzhead.hcrc&&r.pending>t&&(e.adler=G(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let t,i=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>i&&(e.adler=G(e.adler,r.pending_buf,r.pending-i,i)),_e(e),0!==r.pending)return r.last_flush=-1,K;i=0}t=r.gzindexi&&(e.adler=G(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let t,i=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>i&&(e.adler=G(e.adler,r.pending_buf,r.pending-i,i)),_e(e),0!==r.pending)return r.last_flush=-1,K;i=0}t=r.gzindexi&&(e.adler=G(e.adler,r.pending_buf,r.pending-i,i))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(_e(e),0!==r.pending))return r.last_flush=-1,K;xe(r,255&e.adler),xe(r,e.adler>>8&255),e.adler=0}if(r.status=pe,_e(e),0!==r.pending)return r.last_flush=-1,K}if(0!==e.avail_in||0!==r.lookahead||t!==q&&r.status!==fe){let i=0===r.level?Le(r,t):r.strategy===se?((e,t)=>{let r;for(;;){if(0===e.lookahead&&(Me(e),0===e.lookahead)){if(t===q)return 1;break}if(e.match_length=0,r=W(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(we(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===X?(we(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(we(e,!1),0===e.strm.avail_out)?1:2})(r,t):r.strategy===ne?((e,t)=>{let r,i,s,n;const o=e.window;for(;;){if(e.lookahead<=he){if(Me(e),e.lookahead<=he&&t===q)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(s=e.strstart-1,i=o[s],i===o[++s]&&i===o[++s]&&i===o[++s])){n=e.strstart+he;do{}while(i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&se.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=W(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=W(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(we(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===X?(we(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(we(e,!1),0===e.strm.avail_out)?1:2})(r,t):Oe[r.level].func(r,t);if(3!==i&&4!==i||(r.status=fe),1===i||3===i)return 0===e.avail_out&&(r.last_flush=-1),K;if(2===i&&(t===Y?H(r):t!==$&&(U(r,0,0,!1),t===Z&&(ve(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),_e(e),0===e.avail_out))return r.last_flush=-1,K}return t!==X?K:r.wrap<=0?J:(2===r.wrap?(xe(r,255&e.adler),xe(r,e.adler>>8&255),xe(r,e.adler>>16&255),xe(r,e.adler>>24&255),xe(r,255&e.total_in),xe(r,e.total_in>>8&255),xe(r,e.total_in>>16&255),xe(r,e.total_in>>24&255)):(Se(r,e.adler>>>16),Se(r,65535&e.adler)),_e(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?K:J)},je=e=>{if(Ie(e))return Q;const t=e.state.status;return e.state=null,t===pe?me(e,ee):K},Ne=(e,t)=>{let r=t.length;if(Ie(e))return Q;const i=e.state,s=i.wrap;if(2===s||1===s&&i.status!==de||i.lookahead)return Q;if(1===s&&(e.adler=R(e.adler,t,r,0)),i.wrap=0,r>=i.w_size){0===s&&(ve(i.head),i.strstart=0,i.block_start=0,i.insert=0);let e=new Uint8Array(i.w_size);e.set(t.subarray(r-i.w_size,r),0),t=e,r=i.w_size}const n=e.avail_in,o=e.next_in,a=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,Me(i);i.lookahead>=3;){let e=i.strstart,t=i.lookahead-2;do{i.ins_h=ye(i,i.ins_h,i.window[e+3-1]),i.prev[e&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=e,e++}while(--t);i.strstart=e,i.lookahead=2,Me(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,e.next_in=o,e.input=a,e.avail_in=n,i.wrap=s,K};const Ue=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Ve=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const t in r)Ue(r,t)&&(e[t]=r[t])}}return e},We=e=>{let t=0;for(let r=0,i=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;qe[254]=qe[254]=1;var Ye=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,r,i,s,n,o=e.length,a=0;for(s=0;s>>6,t[n++]=128|63&r):r<65536?(t[n++]=224|r>>>12,t[n++]=128|r>>>6&63,t[n++]=128|63&r):(t[n++]=240|r>>>18,t[n++]=128|r>>>12&63,t[n++]=128|r>>>6&63,t[n++]=128|63&r);return t},Ze=(e,t)=>{const r=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let i,s;const n=new Array(2*r);for(s=0,i=0;i4)n[s++]=65533,i+=o-1;else{for(t&=2===o?31:3===o?15:7;o>1&&i1?n[s++]=65533:t<65536?n[s++]=t:(t-=65536,n[s++]=55296|t>>10&1023,n[s++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&He)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let i=0;i{(t=t||e.length)>e.length&&(t=e.length);let r=t-1;for(;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+qe[e[r]]>t?r:t},$e=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ke=Object.prototype.toString,{Z_NO_FLUSH:Je,Z_SYNC_FLUSH:Qe,Z_FULL_FLUSH:et,Z_FINISH:tt,Z_OK:rt,Z_STREAM_END:it,Z_DEFAULT_COMPRESSION:st,Z_DEFAULT_STRATEGY:nt,Z_DEFLATED:ot}=j;function at(e){this.options=Ve({level:st,method:ot,chunkSize:16384,windowBits:15,memLevel:8,strategy:nt},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new $e,this.strm.avail_out=0;let r=Pe(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==rt)throw new Error(B[r]);if(t.header&&Ge(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?Ye(t.dictionary):"[object ArrayBuffer]"===Ke.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,r=Ne(this.strm,e),r!==rt)throw new Error(B[r]);this._dict_set=!0}}function lt(e,t){const r=new at(t);if(r.push(e,!0),r.err)throw r.msg||B[r.err];return r.result}at.prototype.push=function(e,t){const r=this.strm,i=this.options.chunkSize;let s,n;if(this.ended)return!1;for(n=t===~~t?t:!0===t?tt:Je,"string"==typeof e?r.input=Ye(e):"[object ArrayBuffer]"===Ke.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(n===Qe||n===et)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(s=Be(r,n),s===it)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),s=je(this.strm),this.onEnd(s),this.ended=!0,s===rt;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},at.prototype.onData=function(e){this.chunks.push(e)},at.prototype.onEnd=function(e){e===rt&&(this.result=We(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var ct={Deflate:at,deflate:lt,deflateRaw:function(e,t){return(t=t||{}).raw=!0,lt(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,lt(e,t)},constants:j};const ht=16209;var ut=function(e,t){let r,i,s,n,o,a,l,c,h,u,d,p,f,m,g,v,b,y,_,w,x,S,A,C;const M=e.state;r=e.next_in,A=e.input,i=r+(e.avail_in-5),s=e.next_out,C=e.output,n=s-(t-e.avail_out),o=s+(e.avail_out-257),a=M.dmax,l=M.wsize,c=M.whave,h=M.wnext,u=M.window,d=M.hold,p=M.bits,f=M.lencode,m=M.distcode,g=(1<>>24,d>>>=y,p-=y,y=b>>>16&255,0===y)C[s++]=65535&b;else{if(!(16&y)){if(64&y){if(32&y){M.mode=16191;break e}e.msg="invalid literal/length code",M.mode=ht;break e}b=f[(65535&b)+(d&(1<>>=y,p-=y),p<15&&(d+=A[r++]<>>24,d>>>=y,p-=y,y=b>>>16&255,16&y){if(w=65535&b,y&=15,pa){e.msg="invalid distance too far back",M.mode=ht;break e}if(d>>>=y,p-=y,y=s-n,w>y){if(y=w-y,y>c&&M.sane){e.msg="invalid distance too far back",M.mode=ht;break e}if(x=0,S=u,0===h){if(x+=l-y,y<_){_-=y;do{C[s++]=u[x++]}while(--y);x=s-w,S=C}}else if(h2;)C[s++]=S[x++],C[s++]=S[x++],C[s++]=S[x++],_-=3;_&&(C[s++]=S[x++],_>1&&(C[s++]=S[x++]))}else{x=s-w;do{C[s++]=C[x++],C[s++]=C[x++],C[s++]=C[x++],_-=3}while(_>2);_&&(C[s++]=C[x++],_>1&&(C[s++]=C[x++]))}break}if(64&y){e.msg="invalid distance code",M.mode=ht;break e}b=m[(65535&b)+(d&(1<>3,r-=_,p-=_<<3,d&=(1<{const l=a.bits;let c,h,u,d,p,f,m=0,g=0,v=0,b=0,y=0,_=0,w=0,x=0,S=0,A=0,C=null;const M=new Uint16Array(16),L=new Uint16Array(16);let E,z,k,O=null;for(m=0;m<=15;m++)M[m]=0;for(g=0;g=1&&0===M[b];b--);if(y>b&&(y=b),0===b)return s[n++]=20971520,s[n++]=20971520,a.bits=1,0;for(v=1;v0&&(0===e||1!==b))return-1;for(L[1]=0,m=1;m<15;m++)L[m+1]=L[m]+M[m];for(g=0;g852||2===e&&S>592)return 1;for(;;){E=m-w,o[g]+1=f?(z=O[o[g]-f],k=C[o[g]-f]):(z=96,k=0),c=1<>w)+h]=E<<24|z<<16|k}while(0!==h);for(c=1<>=1;if(0!==c?(A&=c-1,A+=c):A=0,g++,0==--M[m]){if(m===b)break;m=t[r+o[g]]}if(m>y&&(A&d)!==u){for(0===w&&(w=y),p+=v,_=m-w,x=1<<_;_+w852||2===e&&S>592)return 1;u=A&d,s[u]=y<<24|_<<16|p-n}}return 0!==A&&(s[p+A]=m-w<<24|64<<16),a.bits=y,0};const{Z_FINISH:vt,Z_BLOCK:bt,Z_TREES:yt,Z_OK:_t,Z_STREAM_END:wt,Z_NEED_DICT:xt,Z_STREAM_ERROR:St,Z_DATA_ERROR:At,Z_MEM_ERROR:Ct,Z_BUF_ERROR:Mt,Z_DEFLATED:Lt}=j,Et=16180,zt=16190,kt=16191,Ot=16192,Tt=16194,It=16199,Ft=16200,Dt=16206,Rt=16209,Pt=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Gt(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Bt=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode16211?1:0},jt=e=>{if(Bt(e))return St;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Et,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,_t},Nt=e=>{if(Bt(e))return St;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,jt(e)},Ut=(e,t)=>{let r;if(Bt(e))return St;const i=e.state;return t<0?(r=0,t=-t):(r=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?St:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,Nt(e))},Vt=(e,t)=>{if(!e)return St;const r=new Gt;e.state=r,r.strm=e,r.window=null,r.mode=Et;const i=Ut(e,t);return i!==_t&&(e.state=null),i};let Wt,Ht,qt=!0;const Yt=e=>{if(qt){Wt=new Int32Array(512),Ht=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(gt(1,e.lens,0,288,Wt,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;gt(2,e.lens,0,32,Ht,0,e.work,{bits:5}),qt=!1}e.lencode=Wt,e.lenbits=9,e.distcode=Ht,e.distbits=5},Zt=(e,t,r,i)=>{let s;const n=e.state;return null===n.window&&(n.wsize=1<=n.wsize?(n.window.set(t.subarray(r-n.wsize,r),0),n.wnext=0,n.whave=n.wsize):(s=n.wsize-n.wnext,s>i&&(s=i),n.window.set(t.subarray(r-i,r-i+s),n.wnext),(i-=s)?(n.window.set(t.subarray(r-i,r),0),n.wnext=i,n.whave=n.wsize):(n.wnext+=s,n.wnext===n.wsize&&(n.wnext=0),n.whave{let r,i,s,n,o,a,l,c,h,u,d,p,f,m,g,v,b,y,_,w,x,S,A=0;const C=new Uint8Array(4);let M,L;const E=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Bt(e)||!e.output||!e.input&&0!==e.avail_in)return St;r=e.state,r.mode===kt&&(r.mode=Ot),o=e.next_out,s=e.output,l=e.avail_out,n=e.next_in,i=e.input,a=e.avail_in,c=r.hold,h=r.bits,u=a,d=l,S=_t;e:for(;;)switch(r.mode){case Et:if(0===r.wrap){r.mode=Ot;break}for(;h<16;){if(0===a)break e;a--,c+=i[n++]<>>8&255,r.check=G(r.check,C,2,0),c=0,h=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",r.mode=Rt;break}if((15&c)!==Lt){e.msg="unknown compression method",r.mode=Rt;break}if(c>>>=4,h-=4,x=8+(15&c),0===r.wbits&&(r.wbits=x),x>15||x>r.wbits){e.msg="invalid window size",r.mode=Rt;break}r.dmax=1<>8&1),512&r.flags&&4&r.wrap&&(C[0]=255&c,C[1]=c>>>8&255,r.check=G(r.check,C,2,0)),c=0,h=0,r.mode=16182;case 16182:for(;h<32;){if(0===a)break e;a--,c+=i[n++]<>>8&255,C[2]=c>>>16&255,C[3]=c>>>24&255,r.check=G(r.check,C,4,0)),c=0,h=0,r.mode=16183;case 16183:for(;h<16;){if(0===a)break e;a--,c+=i[n++]<>8),512&r.flags&&4&r.wrap&&(C[0]=255&c,C[1]=c>>>8&255,r.check=G(r.check,C,2,0)),c=0,h=0,r.mode=16184;case 16184:if(1024&r.flags){for(;h<16;){if(0===a)break e;a--,c+=i[n++]<>>8&255,r.check=G(r.check,C,2,0)),c=0,h=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(p=r.length,p>a&&(p=a),p&&(r.head&&(x=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(i.subarray(n,n+p),x)),512&r.flags&&4&r.wrap&&(r.check=G(r.check,i,p,n)),a-=p,n+=p,r.length-=p),r.length))break e;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===a)break e;p=0;do{x=i[n+p++],r.head&&x&&r.length<65536&&(r.head.name+=String.fromCharCode(x))}while(x&&p>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=kt;break;case 16189:for(;h<32;){if(0===a)break e;a--,c+=i[n++]<>>=7&h,h-=7&h,r.mode=Dt;break}for(;h<3;){if(0===a)break e;a--,c+=i[n++]<>>=1,h-=1,3&c){case 0:r.mode=16193;break;case 1:if(Yt(r),r.mode=It,t===yt){c>>>=2,h-=2;break e}break;case 2:r.mode=16196;break;case 3:e.msg="invalid block type",r.mode=Rt}c>>>=2,h-=2;break;case 16193:for(c>>>=7&h,h-=7&h;h<32;){if(0===a)break e;a--,c+=i[n++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=Rt;break}if(r.length=65535&c,c=0,h=0,r.mode=Tt,t===yt)break e;case Tt:r.mode=16195;case 16195:if(p=r.length,p){if(p>a&&(p=a),p>l&&(p=l),0===p)break e;s.set(i.subarray(n,n+p),o),a-=p,n+=p,l-=p,o+=p,r.length-=p;break}r.mode=kt;break;case 16196:for(;h<14;){if(0===a)break e;a--,c+=i[n++]<>>=5,h-=5,r.ndist=1+(31&c),c>>>=5,h-=5,r.ncode=4+(15&c),c>>>=4,h-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Rt;break}r.have=0,r.mode=16197;case 16197:for(;r.have>>=3,h-=3}for(;r.have<19;)r.lens[E[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},S=gt(0,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,S){e.msg="invalid code lengths set",r.mode=Rt;break}r.have=0,r.mode=16198;case 16198:for(;r.have>>24,v=A>>>16&255,b=65535&A,!(g<=h);){if(0===a)break e;a--,c+=i[n++]<>>=g,h-=g,r.lens[r.have++]=b;else{if(16===b){for(L=g+2;h>>=g,h-=g,0===r.have){e.msg="invalid bit length repeat",r.mode=Rt;break}x=r.lens[r.have-1],p=3+(3&c),c>>>=2,h-=2}else if(17===b){for(L=g+3;h>>=g,h-=g,x=0,p=3+(7&c),c>>>=3,h-=3}else{for(L=g+7;h>>=g,h-=g,x=0,p=11+(127&c),c>>>=7,h-=7}if(r.have+p>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Rt;break}for(;p--;)r.lens[r.have++]=x}}if(r.mode===Rt)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=Rt;break}if(r.lenbits=9,M={bits:r.lenbits},S=gt(1,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,S){e.msg="invalid literal/lengths set",r.mode=Rt;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},S=gt(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,S){e.msg="invalid distances set",r.mode=Rt;break}if(r.mode=It,t===yt)break e;case It:r.mode=Ft;case Ft:if(a>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=n,e.avail_in=a,r.hold=c,r.bits=h,ut(e,d),o=e.next_out,s=e.output,l=e.avail_out,n=e.next_in,i=e.input,a=e.avail_in,c=r.hold,h=r.bits,r.mode===kt&&(r.back=-1);break}for(r.back=0;A=r.lencode[c&(1<>>24,v=A>>>16&255,b=65535&A,!(g<=h);){if(0===a)break e;a--,c+=i[n++]<>y)],g=A>>>24,v=A>>>16&255,b=65535&A,!(y+g<=h);){if(0===a)break e;a--,c+=i[n++]<>>=y,h-=y,r.back+=y}if(c>>>=g,h-=g,r.back+=g,r.length=b,0===v){r.mode=16205;break}if(32&v){r.back=-1,r.mode=kt;break}if(64&v){e.msg="invalid literal/length code",r.mode=Rt;break}r.extra=15&v,r.mode=16201;case 16201:if(r.extra){for(L=r.extra;h>>=r.extra,h-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;A=r.distcode[c&(1<>>24,v=A>>>16&255,b=65535&A,!(g<=h);){if(0===a)break e;a--,c+=i[n++]<>y)],g=A>>>24,v=A>>>16&255,b=65535&A,!(y+g<=h);){if(0===a)break e;a--,c+=i[n++]<>>=y,h-=y,r.back+=y}if(c>>>=g,h-=g,r.back+=g,64&v){e.msg="invalid distance code",r.mode=Rt;break}r.offset=b,r.extra=15&v,r.mode=16203;case 16203:if(r.extra){for(L=r.extra;h>>=r.extra,h-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Rt;break}r.mode=16204;case 16204:if(0===l)break e;if(p=d-l,r.offset>p){if(p=r.offset-p,p>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Rt;break}p>r.wnext?(p-=r.wnext,f=r.wsize-p):f=r.wnext-p,p>r.length&&(p=r.length),m=r.window}else m=s,f=o-r.offset,p=r.length;p>l&&(p=l),l-=p,r.length-=p;do{s[o++]=m[f++]}while(--p);0===r.length&&(r.mode=Ft);break;case 16205:if(0===l)break e;s[o++]=r.length,l--,r.mode=Ft;break;case Dt:if(r.wrap){for(;h<32;){if(0===a)break e;a--,c|=i[n++]<{if(Bt(e))return St;let t=e.state;return t.window&&(t.window=null),e.state=null,_t},Qt=(e,t)=>{if(Bt(e))return St;const r=e.state;return 2&r.wrap?(r.head=t,t.done=!1,_t):St},er=(e,t)=>{const r=t.length;let i,s,n;return Bt(e)?St:(i=e.state,0!==i.wrap&&i.mode!==zt?St:i.mode===zt&&(s=1,s=R(s,t,r,0),s!==i.check)?At:(n=Zt(e,t,r,r),n?(i.mode=16210,Ct):(i.havedict=1,_t)))},tr=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const rr=Object.prototype.toString,{Z_NO_FLUSH:ir,Z_FINISH:sr,Z_OK:nr,Z_STREAM_END:or,Z_NEED_DICT:ar,Z_STREAM_ERROR:lr,Z_DATA_ERROR:cr,Z_MEM_ERROR:hr}=j;function ur(e){this.options=Ve({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new $e,this.strm.avail_out=0;let r=$t(this.strm,t.windowBits);if(r!==nr)throw new Error(B[r]);if(this.header=new tr,Qt(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Ye(t.dictionary):"[object ArrayBuffer]"===rr.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=er(this.strm,t.dictionary),r!==nr)))throw new Error(B[r])}function dr(e,t){const r=new ur(t);if(r.push(e),r.err)throw r.msg||B[r.err];return r.result}ur.prototype.push=function(e,t){const r=this.strm,i=this.options.chunkSize,s=this.options.dictionary;let n,o,a;if(this.ended)return!1;for(o=t===~~t?t:!0===t?sr:ir,"[object ArrayBuffer]"===rr.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),n=Kt(r,o),n===ar&&s&&(n=er(r,s),n===nr?n=Kt(r,o):n===cr&&(n=ar));r.avail_in>0&&n===or&&r.state.wrap>0&&0!==e[r.next_in];)Xt(r),n=Kt(r,o);switch(n){case lr:case cr:case ar:case hr:return this.onEnd(n),this.ended=!0,!1}if(a=r.avail_out,r.next_out&&(0===r.avail_out||n===or))if("string"===this.options.to){let e=Xe(r.output,r.next_out),t=r.next_out-e,s=Ze(r.output,e);r.next_out=t,r.avail_out=i-t,t&&r.output.set(r.output.subarray(e,e+t),0),this.onData(s)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(n!==nr||0!==a){if(n===or)return n=Jt(this.strm),this.onEnd(n),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},ur.prototype.onData=function(e){this.chunks.push(e)},ur.prototype.onEnd=function(e){e===nr&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=We(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var pr={Inflate:ur,inflate:dr,inflateRaw:function(e,t){return(t=t||{}).raw=!0,dr(e,t)},ungzip:dr,constants:j};const{Deflate:fr,deflate:mr,deflateRaw:gr,gzip:vr}=ct,{Inflate:br,inflate:yr,inflateRaw:_r,ungzip:wr}=pr;var xr=fr,Sr=mr,Ar=gr,Cr=vr,Mr=br,Lr=yr,Er=_r,zr=wr,kr=j,Or={Deflate:fr,deflate:mr,deflateRaw:gr,gzip:vr,Inflate:br,inflate:yr,inflateRaw:_r,ungzip:wr,constants:j}}},__webpack_module_cache__={};function __nested_webpack_require_1675243__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__nested_webpack_require_1675243__),r.exports}__nested_webpack_require_1675243__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __nested_webpack_require_1675243__.d(t,{a:t}),t},__nested_webpack_require_1675243__.d=(e,t)=>{for(var r in t)__nested_webpack_require_1675243__.o(t,r)&&!__nested_webpack_require_1675243__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__nested_webpack_require_1675243__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__nested_webpack_require_1675243__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__nested_webpack_require_1675243__("./src/index.ts"),__nested_webpack_require_1675243__("./src/SurfaceWorker.js");var __nested_webpack_exports__=__nested_webpack_require_1675243__("./src/exporter.js");return __nested_webpack_exports__})(),module.exports=factory()},34961:(e,t,r)=>{"use strict";var i=r(39807);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function n(e,t){for(var r=0;r1?r-1:0),s=1;s1?r-1:0),s=1;s1?r-1:0),s=1;s1?r-1:0),s=1;s{"use strict";var i=r(39807);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function n(e){for(var t=1;te.length)&&(r=e.length),e.substring(r-t.length,r)===t}var y="",_="",w="",x="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function A(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,"message",{value:e.message}),r}function C(e){return g(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var M=function(e,t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(M,e);var r,s,a,h,u=(r=M,s=d(),function(){var e,t=f(r);if(s){var i=f(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return l(this,e)});function M(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,M),"object"!==m(e)||null===e)throw new v("options","Object",e);var r=e.message,s=e.operator,n=e.stackStartFn,o=e.actual,a=e.expected,h=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)t=u.call(this,String(r));else if(i.stderr&&i.stderr.isTTY&&(i.stderr&&i.stderr.getColorDepth&&1!==i.stderr.getColorDepth()?(y="",_="",x="",w=""):(y="",_="",x="",w="")),"object"===m(o)&&null!==o&&"object"===m(a)&&null!==a&&"stack"in o&&o instanceof Error&&"stack"in a&&a instanceof Error&&(o=A(o),a=A(a)),"deepStrictEqual"===s||"strictEqual"===s)t=u.call(this,function(e,t,r){var s="",n="",o=0,a="",l=!1,c=C(e),h=c.split("\n"),u=C(t).split("\n"),d=0,p="";if("strictEqual"===r&&"object"===m(e)&&"object"===m(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===h.length&&1===u.length&&h[0]!==u[0]){var f=h[0].length+u[0].length;if(f<=10){if(!("object"===m(e)&&null!==e||"object"===m(t)&&null!==t||0===e&&0===t))return"".concat(S[r],"\n\n")+"".concat(h[0]," !== ").concat(u[0],"\n")}else if("strictEqualObject"!==r&&f<(i.stderr&&i.stderr.isTTY?i.stderr.columns:80)){for(;h[0][d]===u[0][d];)d++;d>2&&(p="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",d),"^"),d=0)}}for(var g=h[h.length-1],v=u[u.length-1];g===v&&(d++<2?a="\n ".concat(g).concat(a):s=g,h.pop(),u.pop(),0!==h.length&&0!==u.length);)g=h[h.length-1],v=u[u.length-1];var A=Math.max(h.length,u.length);if(0===A){var M=c.split("\n");if(M.length>30)for(M[26]="".concat(y,"...").concat(x);M.length>27;)M.pop();return"".concat(S.notIdentical,"\n\n").concat(M.join("\n"),"\n")}d>3&&(a="\n".concat(y,"...").concat(x).concat(a),l=!0),""!==s&&(a="\n ".concat(s).concat(a),s="");var L=0,E=S[r]+"\n".concat(_,"+ actual").concat(x," ").concat(w,"- expected").concat(x),z=" ".concat(y,"...").concat(x," Lines skipped");for(d=0;d1&&d>2&&(k>4?(n+="\n".concat(y,"...").concat(x),l=!0):k>3&&(n+="\n ".concat(u[d-2]),L++),n+="\n ".concat(u[d-1]),L++),o=d,s+="\n".concat(w,"-").concat(x," ").concat(u[d]),L++;else if(u.length1&&d>2&&(k>4?(n+="\n".concat(y,"...").concat(x),l=!0):k>3&&(n+="\n ".concat(h[d-2]),L++),n+="\n ".concat(h[d-1]),L++),o=d,n+="\n".concat(_,"+").concat(x," ").concat(h[d]),L++;else{var O=u[d],T=h[d],I=T!==O&&(!b(T,",")||T.slice(0,-1)!==O);I&&b(O,",")&&O.slice(0,-1)===T&&(I=!1,T+=","),I?(k>1&&d>2&&(k>4?(n+="\n".concat(y,"...").concat(x),l=!0):k>3&&(n+="\n ".concat(h[d-2]),L++),n+="\n ".concat(h[d-1]),L++),o=d,n+="\n".concat(_,"+").concat(x," ").concat(T),s+="\n".concat(w,"-").concat(x," ").concat(O),L+=2):(n+=s,s="",1!==k&&0!==d||(n+="\n ".concat(T),L++))}if(L>20&&d30)for(p[26]="".concat(y,"...").concat(x);p.length>27;)p.pop();t=1===p.length?u.call(this,"".concat(d," ").concat(p[0])):u.call(this,"".concat(d,"\n\n").concat(p.join("\n"),"\n"))}else{var f=C(o),g="",L=S[s];"notDeepEqual"===s||"notEqual"===s?(f="".concat(S[s],"\n\n").concat(f)).length>1024&&(f="".concat(f.slice(0,1021),"...")):(g="".concat(C(a)),f.length>512&&(f="".concat(f.slice(0,509),"...")),g.length>512&&(g="".concat(g.slice(0,509),"...")),"deepEqual"===s||"equal"===s?f="".concat(L,"\n\n").concat(f,"\n\nshould equal\n\n"):g=" ".concat(s," ").concat(g)),t=u.call(this,"".concat(f).concat(g))}return Error.stackTraceLimit=h,t.generatedMessage=!r,Object.defineProperty(c(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=o,t.expected=a,t.operator=s,Error.captureStackTrace&&Error.captureStackTrace(c(t),n),t.stack,t.name="AssertionError",l(t)}return a=M,(h=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return g(this,n(n({},t),{},{customInspect:!1,depth:0}))}}])&&o(a.prototype,h),Object.defineProperty(a,"prototype",{writable:!1}),M}(h(Error),g.custom);e.exports=M},81146:(e,t,r)=>{"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}var o,a,l={};function c(e,t,r){r||(r=Error);var o=function(r){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(h,r);var o,a,l,c=(a=h,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=n(a);if(l){var r=n(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function h(r,i,s){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),n=c.call(this,function(e,r,i){return"string"==typeof t?t:t(e,r,i)}(r,i,s)),n.code=e,n}return o=h,Object.defineProperty(o,"prototype",{writable:!1}),o}(r);l[e]=o}function h(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",(function(e,t,s){var n,a,l,c,u;if(void 0===o&&(o=r(34961)),o("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(a="not ",t.substr(0,4)===a)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))l="The ".concat(e," ").concat(n," ").concat(h(t,"type"));else{var d=("number"!=typeof u&&(u=0),u+1>(c=e).length||-1===c.indexOf(".",u)?"argument":"property");l='The "'.concat(e,'" ').concat(d," ").concat(n," ").concat(h(t,"type"))}return l+". Received type ".concat(i(s))}),TypeError),c("ERR_INVALID_ARG_VALUE",(function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===a&&(a=r(11276));var s=a.inspect(t);return s.length>128&&(s="".concat(s.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(i,". Received ").concat(s)}),TypeError,RangeError),c("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var s;return s=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(i(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(s,".")}),TypeError),c("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),i=0;i0,"At least one arg needs to be specified");var s="The ",n=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),n){case 1:s+="".concat(t[0]," argument");break;case 2:s+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:s+=t.slice(0,n-1).join(", "),s+=", and ".concat(t[n-1]," arguments")}return"".concat(s," must be specified")}),TypeError),e.exports.codes=l},88884:(e,t,r)=>{"use strict";function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,s,n,o,a=[],l=!0,c=!1;try{if(n=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=n.call(r)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(e){c=!0,s=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function I(e){return Object.keys(e).filter(T).concat(h(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function F(e,t){if(e===t)return 0;for(var r=e.length,i=t.length,s=0,n=Math.min(r,i);s{"use strict";var i=r(59412),s=r(61398),n=s(i("String.prototype.indexOf"));e.exports=function(e,t){var r=i(e,!!t);return"function"==typeof r&&n(e,".prototype.")>-1?s(r):r}},61398:(e,t,r)=>{"use strict";var i=r(35366),s=r(59412),n=r(86928),o=r(48744),a=s("%Function.prototype.apply%"),l=s("%Function.prototype.call%"),c=s("%Reflect.apply%",!0)||i.call(l,a),h=r(38232),u=s("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new o("a function is required");var t=c(i,l,arguments);return n(t,1+u(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(i,a,arguments)};h?h(e.exports,"apply",{value:d}):e.exports.apply=d},43362:(e,t,r)=>{"use strict";var i=r(38232),s=r(66367),n=r(48744),o=r(55572);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new n("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new n("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,h=arguments.length>6&&arguments[6],u=!!o&&o(e,t);if(i)i(e,t,{configurable:null===c&&u?u.configurable:!c,enumerable:null===a&&u?u.enumerable:!a,value:r,writable:null===l&&u?u.writable:!l});else{if(!h&&(a||l||c))throw new s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},10781:(e,t,r)=>{"use strict";var i=r(99952),s="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),n=Object.prototype.toString,o=Array.prototype.concat,a=r(43362),l=r(20419)(),c=function(e,t,r,i){if(t in e)if(!0===i){if(e[t]===r)return}else if("function"!=typeof(s=i)||"[object Function]"!==n.call(s)||!i())return;var s;l?a(e,t,r,!0):a(e,t,r)},h=function(e,t){var r=arguments.length>2?arguments[2]:{},n=i(t);s&&(n=o.call(n,Object.getOwnPropertySymbols(t)));for(var a=0;a{"use strict";var i=r(59412)("%Object.defineProperty%",!0)||!1;if(i)try{i({},"a",{value:1})}catch(e){i=!1}e.exports=i},33674:e=>{"use strict";e.exports=EvalError},94234:e=>{"use strict";e.exports=Error},8975:e=>{"use strict";e.exports=RangeError},59299:e=>{"use strict";e.exports=ReferenceError},66367:e=>{"use strict";e.exports=SyntaxError},48744:e=>{"use strict";e.exports=TypeError},63432:e=>{"use strict";e.exports=URIError},85573:(e,t,r)=>{"use strict";var i=r(60245),s=Object.prototype.toString,n=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!i(t))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=r),"[object Array]"===s.call(e)?function(e,t,r){for(var i=0,s=e.length;i{"use strict";var t=Object.prototype.toString,r=Math.max,i=function(e,t){for(var r=[],i=0;i{"use strict";var i=r(5438);e.exports=Function.prototype.bind||i},59412:(e,t,r)=>{"use strict";var i,s=r(94234),n=r(33674),o=r(8975),a=r(59299),l=r(66367),c=r(48744),h=r(63432),u=Function,d=function(e){try{return u('"use strict"; return ('+e+").constructor;")()}catch(e){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(e){p=null}var f=function(){throw new c},m=p?function(){try{return f}catch(e){try{return p(arguments,"callee").get}catch(e){return f}}}():f,g=r(23266)(),v=r(39681)(),b=Object.getPrototypeOf||(v?function(e){return e.__proto__}:null),y={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):i,w={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"==typeof Atomics?i:Atomics,"%BigInt%":"undefined"==typeof BigInt?i:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?i:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":s,"%eval%":eval,"%EvalError%":n,"%Float32Array%":"undefined"==typeof Float32Array?i:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":u,"%GeneratorFunction%":y,"%Int8Array%":"undefined"==typeof Int8Array?i:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?i:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):i,"%JSON%":"object"==typeof JSON?JSON:i,"%Map%":"undefined"==typeof Map?i:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?i:Promise,"%Proxy%":"undefined"==typeof Proxy?i:Proxy,"%RangeError%":o,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?i:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):i,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):i,"%Symbol%":g?Symbol:i,"%SyntaxError%":l,"%ThrowTypeError%":m,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?i:Uint32Array,"%URIError%":h,"%WeakMap%":"undefined"==typeof WeakMap?i:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?i:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?i:WeakSet};if(b)try{null.error}catch(e){var x=b(b(e));w["%Error.prototype%"]=x}var S=function e(t){var r;if("%AsyncFunction%"===t)r=d("async function () {}");else if("%GeneratorFunction%"===t)r=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=d("async function* () {}");else if("%AsyncGenerator%"===t){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if("%AsyncIteratorPrototype%"===t){var s=e("%AsyncGenerator%");s&&b&&(r=b(s.prototype))}return w[t]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=r(35366),M=r(19942),L=C.call(Function.call,Array.prototype.concat),E=C.call(Function.apply,Array.prototype.splice),z=C.call(Function.call,String.prototype.replace),k=C.call(Function.call,String.prototype.slice),O=C.call(Function.call,RegExp.prototype.exec),T=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,I=/\\(\\)?/g,F=function(e,t){var r,i=e;if(M(A,i)&&(i="%"+(r=A[i])[0]+"%"),M(w,i)){var s=w[i];if(s===y&&(s=S(i)),void 0===s&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:i,value:s}}throw new l("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===O(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=k(e,0,1),r=k(e,-1);if("%"===t&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var i=[];return z(e,T,(function(e,t,r,s){i[i.length]=r?z(s,I,"$1"):t||e})),i}(e),i=r.length>0?r[0]:"",s=F("%"+i+"%",t),n=s.name,o=s.value,a=!1,h=s.alias;h&&(i=h[0],E(r,L([0,1],h)));for(var u=1,d=!0;u=r.length){var v=p(o,f);o=(d=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:o[f]}else d=M(o,f),o=o[f];d&&!a&&(w[n]=o)}}return o}},55572:(e,t,r)=>{"use strict";var i=r(59412)("%Object.getOwnPropertyDescriptor%",!0);if(i)try{i([],"length")}catch(e){i=null}e.exports=i},20419:(e,t,r)=>{"use strict";var i=r(38232),s=function(){return!!i};s.hasArrayLengthDefineBug=function(){if(!i)return null;try{return 1!==i([],"length",{value:1}).length}catch(e){return!0}},e.exports=s},39681:e=>{"use strict";var t={__proto__:null,foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof r)}},23266:(e,t,r)=>{"use strict";var i="undefined"!=typeof Symbol&&Symbol,s=r(93272);e.exports=function(){return"function"==typeof i&&"function"==typeof Symbol&&"symbol"==typeof i("foo")&&"symbol"==typeof Symbol("bar")&&s()}},93272:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var s=Object.getOwnPropertyDescriptor(e,t);if(42!==s.value||!0!==s.enumerable)return!1}return!0}},15541:(e,t,r)=>{"use strict";var i=r(93272);e.exports=function(){return i()&&!!Symbol.toStringTag}},19942:(e,t,r)=>{"use strict";var i=Function.prototype.call,s=Object.prototype.hasOwnProperty,n=r(35366);e.exports=n.call(i,s)},9715:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},68007:(e,t,r)=>{"use strict";var i=r(15541)(),s=r(24310)("Object.prototype.toString"),n=function(e){return!(i&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===s(e)},o=function(e){return!!n(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==s(e)&&"[object Function]"===s(e.callee)},a=function(){return n(arguments)}();n.isLegacyArguments=o,e.exports=a?n:o},60245:e=>{"use strict";var t,r,i=Function.prototype.toString,s="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof s&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},s((function(){throw 42}),null,t)}catch(e){e!==r&&(s=null)}else s=null;var n=/^\s*class\b/,o=function(e){try{var t=i.call(e);return n.test(t)}catch(e){return!1}},a=function(e){try{return!o(e)&&(i.call(e),!0)}catch(e){return!1}},l=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,h=!(0 in[,]),u=function(){return!1};if("object"==typeof document){var d=document.all;l.call(d)===l.call(document.all)&&(u=function(e){if((h||!e)&&(void 0===e||"object"==typeof e))try{var t=l.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=s?function(e){if(u(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{s(e,null,t)}catch(e){if(e!==r)return!1}return!o(e)&&a(e)}:function(e){if(u(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return a(e);if(o(e))return!1;var t=l.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},74205:(e,t,r)=>{"use strict";var i,s=Object.prototype.toString,n=Function.prototype.toString,o=/^\s*(?:function)?\*/,a=r(15541)(),l=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(o.test(n.call(e)))return!0;if(!a)return"[object GeneratorFunction]"===s.call(e);if(!l)return!1;if(void 0===i){var t=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(e){}}();i=!!t&&l(t)}return l(e)===i}},87266:e=>{"use strict";e.exports=function(e){return e!=e}},74858:(e,t,r)=>{"use strict";var i=r(61398),s=r(10781),n=r(87266),o=r(29419),a=r(50317),l=i(o(),Number);s(l,{getPolyfill:o,implementation:n,shim:a}),e.exports=l},29419:(e,t,r)=>{"use strict";var i=r(87266);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:i}},50317:(e,t,r)=>{"use strict";var i=r(10781),s=r(29419);e.exports=function(){var e=s();return i(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},94179:(e,t,r)=>{"use strict";var i=r(17478);e.exports=function(e){return!!i(e)}},36560:e=>{"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:e===r||!(!t(e)||!t(r))}},62956:(e,t,r)=>{"use strict";var i=r(10781),s=r(61398),n=r(36560),o=r(43765),a=r(6723),l=s(o(),Object);i(l,{getPolyfill:o,implementation:n,shim:a}),e.exports=l},43765:(e,t,r)=>{"use strict";var i=r(36560);e.exports=function(){return"function"==typeof Object.is?Object.is:i}},6723:(e,t,r)=>{"use strict";var i=r(43765),s=r(10781);e.exports=function(){var e=i();return s(Object,{is:e},{is:function(){return Object.is!==e}}),e}},77908:(e,t,r)=>{"use strict";var i;if(!Object.keys){var s=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=r(12724),a=Object.prototype.propertyIsEnumerable,l=!a.call({toString:null},"toString"),c=a.call((function(){}),"prototype"),h=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&s.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{u(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();i=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===n.call(e),i=o(e),a=t&&"[object String]"===n.call(e),d=[];if(!t&&!r&&!i)throw new TypeError("Object.keys called on a non-object");var f=c&&r;if(a&&e.length>0&&!s.call(e,0))for(var m=0;m0)for(var g=0;g{"use strict";var i=Array.prototype.slice,s=r(12724),n=Object.keys,o=n?function(e){return n(e)}:r(77908),a=Object.keys;o.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return s(e)?a(i.call(e)):a(e)})}else Object.keys=o;return Object.keys||o},e.exports=o},12724:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),i="[object Arguments]"===r;return i||(i="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),i}},99864:(e,t,r)=>{"use strict";var i=r(99952),s=r(93272)(),n=r(24310),o=Object,a=n("Array.prototype.push"),l=n("Object.prototype.propertyIsEnumerable"),c=s?Object.getOwnPropertySymbols:null;e.exports=function(e,t){if(null==e)throw new TypeError("target must be an object");var r=o(e);if(1===arguments.length)return r;for(var n=1;n{"use strict";var i=r(99864);e.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},i=0;i{"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},39807:e=>{var t,r,i=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{r="function"==typeof clearTimeout?clearTimeout:n}catch(e){r=n}}();var a,l=[],c=!1,h=-1;function u(){c&&a&&(c=!1,a.length?l=a.concat(l):h=-1,l.length&&d())}function d(){if(!c){var e=o(u);c=!0;for(var t=l.length;t;){for(a=l,l=[];++h1)for(var r=1;r{"use strict";var i=r(59412),s=r(43362),n=r(20419)(),o=r(55572),a=r(48744),l=i("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||l(t)!==t)throw new a("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,c=!0;if("length"in e&&o){var h=o(e,"length");h&&!h.configurable&&(i=!1),h&&!h.writable&&(c=!1)}return(i||c||!r)&&(n?s(e,"length",t,!0,!0):s(e,"length",t)),e}},26900:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},41071:(e,t,r)=>{"use strict";var i=r(68007),s=r(74205),n=r(17478),o=r(94179);function a(e){return e.call.bind(e)}var l="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,h=a(Object.prototype.toString),u=a(Number.prototype.valueOf),d=a(String.prototype.valueOf),p=a(Boolean.prototype.valueOf);if(l)var f=a(BigInt.prototype.valueOf);if(c)var m=a(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function v(e){return"[object Map]"===h(e)}function b(e){return"[object Set]"===h(e)}function y(e){return"[object WeakMap]"===h(e)}function _(e){return"[object WeakSet]"===h(e)}function w(e){return"[object ArrayBuffer]"===h(e)}function x(e){return"undefined"!=typeof ArrayBuffer&&(w.working?w(e):e instanceof ArrayBuffer)}function S(e){return"[object DataView]"===h(e)}function A(e){return"undefined"!=typeof DataView&&(S.working?S(e):e instanceof DataView)}t.isArgumentsObject=i,t.isGeneratorFunction=s,t.isTypedArray=o,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):o(e)||A(e)},t.isUint8Array=function(e){return"Uint8Array"===n(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===n(e)},t.isUint16Array=function(e){return"Uint16Array"===n(e)},t.isUint32Array=function(e){return"Uint32Array"===n(e)},t.isInt8Array=function(e){return"Int8Array"===n(e)},t.isInt16Array=function(e){return"Int16Array"===n(e)},t.isInt32Array=function(e){return"Int32Array"===n(e)},t.isFloat32Array=function(e){return"Float32Array"===n(e)},t.isFloat64Array=function(e){return"Float64Array"===n(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===n(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===n(e)},v.working="undefined"!=typeof Map&&v(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(v.working?v(e):e instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(b.working?b(e):e instanceof Set)},y.working="undefined"!=typeof WeakMap&&y(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(y.working?y(e):e instanceof WeakMap)},_.working="undefined"!=typeof WeakSet&&_(new WeakSet),t.isWeakSet=function(e){return _(e)},w.working="undefined"!=typeof ArrayBuffer&&w(new ArrayBuffer),t.isArrayBuffer=x,S.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&S(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=A;var C="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function M(e){return"[object SharedArrayBuffer]"===h(e)}function L(e){return void 0!==C&&(void 0===M.working&&(M.working=M(new C)),M.working?M(e):e instanceof C)}function E(e){return g(e,u)}function z(e){return g(e,d)}function k(e){return g(e,p)}function O(e){return l&&g(e,f)}function T(e){return c&&g(e,m)}t.isSharedArrayBuffer=L,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===h(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===h(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===h(e)},t.isGeneratorObject=function(e){return"[object Generator]"===h(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===h(e)},t.isNumberObject=E,t.isStringObject=z,t.isBooleanObject=k,t.isBigIntObject=O,t.isSymbolObject=T,t.isBoxedPrimitive=function(e){return E(e)||z(e)||k(e)||O(e)||T(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(x(e)||L(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},11276:(e,t,r)=>{var i=r(39807),s=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},i=0;i=s)return e;switch(e){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(e){return"[Circular]"}default:return e}})),a=i[r];r=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),g(r)?i.showHidden=r:r&&t._extend(i,r),_(i.showHidden)&&(i.showHidden=!1),_(i.depth)&&(i.depth=2),_(i.colors)&&(i.colors=!1),_(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=h),d(i,e,i.depth)}function h(e,t){var r=c.styles[t];return r?"["+c.colors[r][0]+"m"+e+"["+c.colors[r][1]+"m":e}function u(e,t){return e}function d(e,r,i){if(e.customInspect&&r&&C(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var s=r.inspect(i,e);return y(s)||(s=d(e,s,i)),s}var n=function(e,t){if(_(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}(e,r);if(n)return n;var o=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),A(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return p(r);if(0===o.length){if(C(r)){var l=r.name?": "+r.name:"";return e.stylize("[Function"+l+"]","special")}if(w(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return e.stylize(Date.prototype.toString.call(r),"date");if(A(r))return p(r)}var c,h="",u=!1,x=["{","}"];return m(r)&&(u=!0,x=["[","]"]),C(r)&&(h=" [Function"+(r.name?": "+r.name:"")+"]"),w(r)&&(h=" "+RegExp.prototype.toString.call(r)),S(r)&&(h=" "+Date.prototype.toUTCString.call(r)),A(r)&&(h=" "+p(r)),0!==o.length||u&&0!=r.length?i<0?w(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=u?function(e,t,r,i,s){for(var n=[],o=0,a=t.length;o60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,h,x)):x[0]+h+x[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,i,s,n){var o,a,l;if((l=Object.getOwnPropertyDescriptor(t,s)||{value:t[s]}).get?a=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(a=e.stylize("[Setter]","special")),z(i,s)||(o="["+s+"]"),a||(e.seen.indexOf(l.value)<0?(a=v(r)?d(e,l.value,null):d(e,l.value,r-1)).indexOf("\n")>-1&&(a=n?a.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),_(o)){if(n&&s.match(/^\d+$/))return a;(o=JSON.stringify(""+s)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+a}function m(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function v(e){return null===e}function b(e){return"number"==typeof e}function y(e){return"string"==typeof e}function _(e){return void 0===e}function w(e){return x(e)&&"[object RegExp]"===M(e)}function x(e){return"object"==typeof e&&null!==e}function S(e){return x(e)&&"[object Date]"===M(e)}function A(e){return x(e)&&("[object Error]"===M(e)||e instanceof Error)}function C(e){return"function"==typeof e}function M(e){return Object.prototype.toString.call(e)}function L(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!o[e])if(a.test(e)){var r=i.pid;o[e]=function(){var i=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,i)}}else o[e]=function(){};return o[e]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(41071),t.isArray=m,t.isBoolean=g,t.isNull=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=_,t.isRegExp=w,t.types.isRegExp=w,t.isObject=x,t.isDate=S,t.types.isDate=S,t.isError=A,t.types.isNativeError=A,t.isFunction=C,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(26900);var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function z(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[L((e=new Date).getHours()),L(e.getMinutes()),L(e.getSeconds())].join(":"),[e.getDate(),E[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(9715),t._extend=function(e,t){if(!t||!x(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};var k="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function O(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(k&&e[k]){var t;if("function"!=typeof(t=e[k]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,k,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,i=new Promise((function(e,i){t=e,r=i})),s=[],n=0;n{"use strict";var i=r(85573),s=r(75208),n=r(61398),o=r(24310),a=r(55572),l=o("Object.prototype.toString"),c=r(15541)(),h="undefined"==typeof globalThis?r.g:globalThis,u=s(),d=o("String.prototype.slice"),p=Object.getPrototypeOf,f=o("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1?t:"Object"===t&&function(e){var t=!1;return i(m,(function(r,i){if(!t)try{r(e),t=d(i,1)}catch(e){}})),t}(e)}return a?function(e){var t=!1;return i(m,(function(r,i){if(!t)try{"$"+r(e)===i&&(t=d(i,1))}catch(e){}})),t}(e):null}},90170:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});const i='\n'},88862:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var i=r(34961),s=r.n(i);class n{constructor(e,t){this._element=e,this._parent=null,this._visible=!1,this._horizontal=this._element.classList.contains("horizontal"),this._property=this._horizontal?"width":"height";const r=this._element.dataset.bsParent;r&&(this._parent=t.querySelector(r),s()(this._parent,"this._parent")),this._element.addEventListener("transitionend",(e=>{e.target===e.currentTarget&&e.propertyName===this._property&&(this._element.classList.replace("collapsing","collapse"),this._visible&&(this._element.classList.add("show"),this._element.style.removeProperty(this._property)))}))}hide(){if(this._visible){const e=this._element.getBoundingClientRect()[this._property];this._element.style.setProperty(this._property,`${e}px`),this._element.classList.replace("collapse","collapsing"),this._element.classList.remove("show"),this._element.offsetHeight,this._element.style.removeProperty(this._property),this._visible=!1,this._parent&&h.get(this._parent)===this&&h.set(this._parent,null)}}show(){var e;if(!this._visible){this._parent&&(null===(e=h.get(this._parent))||void 0===e||e.hide(),h.set(this._parent,this));const t=this._horizontal?"scrollWidth":"scrollHeight";this._element.classList.replace("collapse","collapsing"),this._element.style.setProperty(this._property,"0");const r=this._element[t];this._element.style.setProperty(this._property,`${r}px`),this._visible=!0}}toggle(e=!this._visible){e?this.show():this.hide()}addTrigger(e){e.addEventListener("click",(e=>{e.preventDefault(),this.toggle()}))}static initialize(e=document.body){for(const t of e.querySelectorAll("[data-bs-toggle]"))if(t instanceof HTMLElement&&"bsTarget"in t.dataset){const r=e.querySelector(t.dataset.bsTarget);r&&a(r,e).addTrigger(t)}}}const o=new WeakMap,a=(l=o,c=(e,t)=>new n(e,t),(e,...t)=>{l.has(e)||l.set(e,c(e,...t));const r=l.get(e);return s()(r,"value"),r});var l,c;const h=new WeakMap},17136:(e,t,r)=>{"use strict";function i(e){return e.map((e=>[e[0],`rgb(${e[1][0]}, ${e[1][1]}, ${e[1][2]})`]))}r.d(t,{s:()=>s});const s={inferno:i([[0,[0,0,3]],[.0159,[1,1,9]],[.0317,[3,2,18]],[.0476,[6,4,27]],[.0635,[10,7,35]],[.0794,[15,9,45]],[.0952,[20,11,54]],[.1111,[26,11,64]],[.127,[32,12,74]],[.1429,[39,11,82]],[.1587,[46,10,90]],[.1746,[53,9,96]],[.1905,[60,9,101]],[.2063,[67,10,104]],[.2222,[74,11,106]],[.2381,[80,13,108]],[.254,[88,16,109]],[.2698,[95,18,110]],[.2857,[101,21,110]],[.3016,[107,23,110]],[.3175,[114,25,109]],[.3333,[120,28,109]],[.3492,[126,30,108]],[.3651,[133,32,106]],[.381,[139,34,105]],[.3968,[145,37,103]],[.4127,[152,39,101]],[.4286,[158,41,99]],[.4444,[164,44,96]],[.4603,[171,46,93]],[.4762,[177,49,90]],[.4921,[183,52,86]],[.5079,[190,56,82]],[.5238,[196,60,78]],[.5397,[201,63,74]],[.5556,[207,68,70]],[.5714,[212,72,65]],[.5873,[217,77,61]],[.6032,[221,82,56]],[.619,[226,87,51]],[.6349,[230,92,46]],[.6508,[233,98,42]],[.6667,[237,104,37]],[.6825,[240,111,31]],[.6984,[242,117,26]],[.7143,[245,124,21]],[.7302,[247,131,16]],[.746,[248,138,11]],[.7619,[250,147,6]],[.7778,[251,155,6]],[.7937,[251,162,8]],[.8095,[251,170,14]],[.8254,[251,177,22]],[.8413,[251,185,30]],[.8571,[250,193,40]],[.873,[248,201,49]],[.8889,[247,209,60]],[.9048,[245,217,72]],[.9206,[243,224,86]],[.9365,[241,232,100]],[.9524,[241,238,116]],[.9683,[242,244,133]],[.9841,[246,250,149]],[1,[252,254,164]]]),magma:i([[0,[0,0,3]],[.0159,[1,1,9]],[.0317,[3,3,17]],[.0476,[6,5,25]],[.0635,[10,7,34]],[.0794,[14,10,42]],[.0952,[18,13,51]],[.1111,[23,15,60]],[.127,[28,16,70]],[.1429,[34,17,80]],[.1587,[40,17,89]],[.1746,[47,16,98]],[.1905,[53,15,106]],[.2063,[60,15,113]],[.2222,[67,15,117]],[.2381,[74,16,121]],[.254,[82,18,124]],[.2698,[88,21,126]],[.2857,[94,23,127]],[.3016,[101,26,128]],[.3175,[107,28,128]],[.3333,[113,31,129]],[.3492,[119,33,129]],[.3651,[126,36,129]],[.381,[132,38,129]],[.3968,[138,40,129]],[.4127,[145,42,128]],[.4286,[151,44,127]],[.4444,[158,46,126]],[.4603,[164,48,125]],[.4762,[171,51,124]],[.4921,[177,53,122]],[.5079,[185,55,120]],[.5238,[192,58,117]],[.5397,[198,60,115]],[.5556,[205,63,112]],[.5714,[211,66,109]],[.5873,[217,70,106]],[.6032,[222,74,103]],[.619,[228,78,100]],[.6349,[232,84,97]],[.6508,[237,89,95]],[.6667,[240,96,93]],[.6825,[243,103,91]],[.6984,[246,110,91]],[.7143,[248,117,92]],[.7302,[249,125,93]],[.746,[251,132,96]],[.7619,[252,142,99]],[.7778,[253,149,103]],[.7937,[253,157,107]],[.8095,[253,164,112]],[.8254,[254,172,117]],[.8413,[254,179,123]],[.8571,[254,187,128]],[.873,[254,194,134]],[.8889,[254,201,141]],[.9048,[253,209,147]],[.9206,[253,216,154]],[.9365,[253,223,161]],[.9524,[252,230,168]],[.9683,[252,238,176]],[.9841,[252,245,183]],[1,[251,252,191]]]),plasma:i([[0,[12,7,134]],[.0159,[24,6,139]],[.0317,[33,5,143]],[.0476,[41,5,147]],[.0635,[49,4,150]],[.0794,[56,4,153]],[.0952,[63,3,156]],[.1111,[69,3,158]],[.127,[76,2,161]],[.1429,[82,1,163]],[.1587,[89,1,164]],[.1746,[95,0,166]],[.1905,[101,0,167]],[.2063,[108,0,168]],[.2222,[114,0,168]],[.2381,[120,1,168]],[.254,[127,3,167]],[.2698,[133,6,166]],[.2857,[139,9,164]],[.3016,[144,14,163]],[.3175,[150,18,160]],[.3333,[155,23,158]],[.3492,[160,27,155]],[.3651,[165,31,151]],[.381,[170,36,148]],[.3968,[175,40,144]],[.4127,[180,45,141]],[.4286,[184,50,137]],[.4444,[188,54,133]],[.4603,[192,59,129]],[.4762,[196,63,126]],[.4921,[200,68,122]],[.5079,[205,73,117]],[.5238,[209,78,114]],[.5397,[212,82,110]],[.5556,[215,87,107]],[.5714,[219,91,103]],[.5873,[222,96,100]],[.6032,[225,101,96]],[.619,[228,106,93]],[.6349,[231,110,90]],[.6508,[234,115,86]],[.6667,[236,120,83]],[.6825,[239,125,79]],[.6984,[241,130,76]],[.7143,[243,135,72]],[.7302,[245,141,69]],[.746,[247,146,65]],[.7619,[249,153,61]],[.7778,[250,159,58]],[.7937,[251,164,54]],[.8095,[252,170,51]],[.8254,[253,176,48]],[.8413,[253,182,45]],[.8571,[253,188,42]],[.873,[253,195,40]],[.8889,[252,201,38]],[.9048,[251,208,36]],[.9206,[250,214,36]],[.9365,[248,221,36]],[.9524,[246,228,37]],[.9683,[244,234,38]],[.9841,[242,241,38]],[1,[239,248,33]]]),viridis:i([[0,[68,1,84]],[.0159,[69,6,90]],[.0317,[70,12,95]],[.0476,[71,18,101]],[.0635,[71,24,106]],[.0794,[72,29,111]],[.0952,[72,34,115]],[.1111,[71,39,119]],[.127,[71,44,123]],[.1429,[70,49,126]],[.1587,[69,54,129]],[.1746,[67,59,131]],[.1905,[66,64,133]],[.2063,[64,68,135]],[.2222,[62,73,137]],[.2381,[60,77,138]],[.254,[58,83,139]],[.2698,[56,87,140]],[.2857,[54,91,140]],[.3016,[52,95,141]],[.3175,[50,99,141]],[.3333,[48,103,141]],[.3492,[46,107,142]],[.3651,[45,111,142]],[.381,[43,115,142]],[.3968,[42,119,142]],[.4127,[40,122,142]],[.4286,[39,126,142]],[.4444,[37,130,142]],[.4603,[36,134,141]],[.4762,[34,137,141]],[.4921,[33,141,140]],[.5079,[31,146,140]],[.5238,[31,150,139]],[.5397,[30,153,138]],[.5556,[30,157,136]],[.5714,[31,161,135]],[.5873,[32,165,133]],[.6032,[35,168,131]],[.619,[38,172,129]],[.6349,[42,176,126]],[.6508,[47,179,123]],[.6667,[53,183,120]],[.6825,[59,186,117]],[.6984,[66,190,113]],[.7143,[73,193,109]],[.7302,[81,196,104]],[.746,[89,199,100]],[.7619,[100,203,93]],[.7778,[109,206,88]],[.7937,[119,208,82]],[.8095,[129,211,76]],[.8254,[139,213,70]],[.8413,[149,215,63]],[.8571,[159,217,56]],[.873,[170,219,50]],[.8889,[181,221,43]],[.9048,[191,223,36]],[.9206,[202,224,30]],[.9365,[212,225,26]],[.9524,[223,227,24]],[.9683,[233,228,25]],[.9841,[243,229,30]],[1,[253,231,36]]]),cividis:i([[0,[0,34,77]],[.0159,[0,37,84]],[.0317,[0,40,91]],[.0476,[0,42,98]],[.0635,[0,45,105]],[.0794,[0,48,112]],[.0952,[4,50,112]],[.1111,[17,53,111]],[.127,[26,56,111]],[.1429,[33,59,110]],[.1587,[39,61,109]],[.1746,[44,64,109]],[.1905,[49,67,108]],[.2063,[54,70,108]],[.2222,[58,72,107]],[.2381,[63,75,107]],[.254,[68,79,107]],[.2698,[72,81,107]],[.2857,[76,84,108]],[.3016,[79,87,108]],[.3175,[83,90,108]],[.3333,[87,93,109]],[.3492,[90,95,109]],[.3651,[94,98,110]],[.381,[97,101,111]],[.3968,[101,104,112]],[.4127,[104,107,113]],[.4286,[108,109,114]],[.4444,[111,112,115]],[.4603,[115,115,116]],[.4762,[118,118,118]],[.4921,[121,121,119]],[.5079,[126,125,120]],[.5238,[130,128,120]],[.5397,[133,131,120]],[.5556,[137,134,120]],[.5714,[141,137,120]],[.5873,[145,140,119]],[.6032,[149,143,119]],[.619,[153,146,118]],[.6349,[157,149,117]],[.6508,[161,152,116]],[.6667,[165,155,115]],[.6825,[169,158,114]],[.6984,[173,162,113]],[.7143,[177,165,112]],[.7302,[181,168,110]],[.746,[185,171,109]],[.7619,[190,176,106]],[.7778,[195,179,104]],[.7937,[199,182,102]],[.8095,[203,186,100]],[.8254,[207,189,97]],[.8413,[212,193,94]],[.8571,[216,196,91]],[.873,[220,200,88]],[.8889,[225,204,84]],[.9048,[229,207,80]],[.9206,[234,211,76]],[.9365,[238,215,71]],[.9524,[243,218,66]],[.9683,[248,222,59]],[.9841,[253,226,52]],[1,[253,231,55]]]),seismic:i([[0,[0,0,77]],[.0159,[0,0,88]],[.0317,[0,0,99]],[.0476,[0,0,111]],[.0635,[0,0,122]],[.0794,[0,0,133]],[.0952,[0,0,144]],[.1111,[0,0,156]],[.127,[0,0,167]],[.1429,[0,0,178]],[.1587,[0,0,189]],[.1746,[0,0,200]],[.1905,[0,0,212]],[.2063,[0,0,223]],[.2222,[0,0,234]],[.2381,[0,0,245]],[.254,[5,5,255]],[.2698,[21,21,255]],[.2857,[37,37,255]],[.3016,[53,53,255]],[.3175,[69,69,255]],[.3333,[85,85,255]],[.3492,[101,101,255]],[.3651,[117,117,255]],[.381,[134,134,255]],[.3968,[150,150,255]],[.4127,[166,166,255]],[.4286,[182,182,255]],[.4444,[198,198,255]],[.4603,[214,214,255]],[.4762,[230,230,255]],[.4921,[246,246,255]],[.5079,[255,246,246]],[.5238,[255,230,230]],[.5397,[255,214,214]],[.5556,[255,198,198]],[.5714,[255,182,182]],[.5873,[255,166,166]],[.6032,[255,150,150]],[.619,[255,134,134]],[.6349,[255,117,117]],[.6508,[255,101,101]],[.6667,[255,85,85]],[.6825,[255,69,69]],[.6984,[255,53,53]],[.7143,[255,37,37]],[.7302,[255,21,21]],[.746,[255,5,5]],[.7619,[248,0,0]],[.7778,[240,0,0]],[.7937,[232,0,0]],[.8095,[224,0,0]],[.8254,[216,0,0]],[.8413,[208,0,0]],[.8571,[200,0,0]],[.873,[192,0,0]],[.8889,[184,0,0]],[.9048,[176,0,0]],[.9206,[168,0,0]],[.9365,[160,0,0]],[.9524,[152,0,0]],[.9683,[144,0,0]],[.9841,[136,0,0]],[1,[128,0,0]]]),brg:i([[0,[0,0,255]],[.0159,[8,0,248]],[.0317,[16,0,240]],[.0476,[24,0,232]],[.0635,[32,0,224]],[.0794,[40,0,216]],[.0952,[48,0,208]],[.1111,[56,0,200]],[.127,[64,0,192]],[.1429,[72,0,184]],[.1587,[80,0,176]],[.1746,[88,0,168]],[.1905,[96,0,160]],[.2063,[104,0,152]],[.2222,[112,0,144]],[.2381,[120,0,136]],[.254,[131,0,125]],[.2698,[139,0,117]],[.2857,[147,0,109]],[.3016,[155,0,101]],[.3175,[163,0,93]],[.3333,[171,0,85]],[.3492,[179,0,77]],[.3651,[187,0,69]],[.381,[195,0,61]],[.3968,[203,0,53]],[.4127,[211,0,45]],[.4286,[219,0,37]],[.4444,[227,0,29]],[.4603,[235,0,21]],[.4762,[243,0,13]],[.4921,[251,0,5]],[.5079,[251,5,0]],[.5238,[243,13,0]],[.5397,[235,21,0]],[.5556,[227,29,0]],[.5714,[219,37,0]],[.5873,[211,45,0]],[.6032,[203,53,0]],[.619,[195,61,0]],[.6349,[187,69,0]],[.6508,[179,77,0]],[.6667,[171,85,0]],[.6825,[163,93,0]],[.6984,[155,101,0]],[.7143,[147,109,0]],[.7302,[139,117,0]],[.746,[131,125,0]],[.7619,[120,136,0]],[.7778,[112,144,0]],[.7937,[104,152,0]],[.8095,[96,160,0]],[.8254,[88,168,0]],[.8413,[80,176,0]],[.8571,[72,184,0]],[.873,[64,192,0]],[.8889,[56,200,0]],[.9048,[48,208,0]],[.9206,[40,216,0]],[.9365,[32,224,0]],[.9524,[24,232,0]],[.9683,[16,240,0]],[.9841,[8,248,0]],[1,[0,255,0]]]),bwr:i([[0,[0,0,255]],[.01587,[8,8,255]],[.03175,[16,16,255]],[.04762,[24,24,255]],[.06349,[32,32,255]],[.07937,[40,40,255]],[.09524,[48,48,255]],[.1111,[56,56,255]],[.127,[64,64,255]],[.1429,[72,72,255]],[.1587,[80,80,255]],[.1746,[89,89,255]],[.1905,[97,97,255]],[.2063,[105,105,255]],[.2222,[113,113,255]],[.2381,[121,121,255]],[.254,[129,129,255]],[.2698,[137,137,255]],[.2857,[145,145,255]],[.3016,[153,153,255]],[.3175,[161,161,255]],[.3333,[170,170,255]],[.3492,[178,178,255]],[.3651,[186,186,255]],[.381,[194,194,255]],[.3968,[202,202,255]],[.4127,[210,210,255]],[.4286,[218,218,255]],[.4444,[226,226,255]],[.4603,[234,234,255]],[.4762,[242,242,255]],[.4921,[250,250,255]],[.5079,[255,250,250]],[.5238,[254,242,242]],[.5397,[255,234,234]],[.5556,[255,226,226]],[.5714,[255,218,218]],[.5873,[254,210,210]],[.6032,[255,202,202]],[.619,[255,194,194]],[.6349,[255,186,186]],[.6508,[254,178,178]],[.6667,[255,170,170]],[.6825,[255,161,161]],[.6984,[255,153,153]],[.7143,[254,145,145]],[.7302,[255,137,137]],[.746,[255,129,129]],[.7619,[255,121,121]],[.7778,[255,113,113]],[.7937,[255,105,105]],[.8095,[255,97,97]],[.8254,[255,89,89]],[.8413,[255,80,80]],[.8571,[255,72,72]],[.873,[255,64,64]],[.8889,[255,56,56]],[.9048,[255,48,48]],[.9206,[255,40,40]],[.9365,[255,32,32]],[.9524,[255,24,24]],[.9683,[255,16,16]],[.9841,[255,8,8]],[1,[255,0,0]]]),rwg:i([[0,[200,0,0]],[.01587,[201,8,8]],[.03175,[203,16,16]],[.04762,[205,24,24]],[.06349,[206,32,32]],[.07937,[208,40,40]],[.09524,[210,48,48]],[.1111,[212,56,56]],[.127,[213,64,64]],[.1429,[215,72,72]],[.1587,[217,80,80]],[.1746,[219,89,89]],[.1905,[220,97,97]],[.2063,[222,105,105]],[.2222,[224,113,113]],[.2381,[226,121,121]],[.254,[227,129,129]],[.2698,[229,137,137]],[.2857,[231,145,145]],[.3016,[233,153,153]],[.3175,[234,161,161]],[.3333,[236,170,170]],[.3492,[238,178,178]],[.3651,[240,186,186]],[.381,[241,194,194]],[.3968,[243,202,202]],[.4127,[245,210,210]],[.4286,[247,218,218]],[.4444,[248,226,226]],[.4603,[250,234,234]],[.4762,[252,242,242]],[.4921,[254,250,250]],[.5079,[250,252,250]],[.5238,[242,248,242]],[.5397,[234,244,234]],[.5556,[226,240,226]],[.5714,[218,236,218]],[.5873,[210,232,210]],[.6032,[202,228,202]],[.619,[194,224,194]],[.6349,[186,220,186]],[.6508,[178,216,178]],[.6667,[170,212,170]],[.6825,[161,208,161]],[.6984,[153,204,153]],[.7143,[145,200,145]],[.7302,[137,196,137]],[.746,[129,192,129]],[.7619,[121,188,121]],[.7778,[113,184,113]],[.7937,[105,180,105]],[.8095,[97,176,97]],[.8254,[89,172,89]],[.8413,[80,168,80]],[.8571,[72,164,72]],[.873,[64,160,64]],[.8889,[56,156,56]],[.9048,[48,152,48]],[.9206,[40,148,40]],[.9365,[32,144,32]],[.9524,[24,140,24]],[.9683,[16,136,16]],[.9841,[8,132,8]],[1,[0,128,0]]]),"twilight (periodic)":i([[0,[225,216,226]],[.0159,[221,217,224]],[.0317,[214,214,220]],[.0476,[205,210,216]],[.0635,[194,205,211]],[.0794,[182,199,207]],[.0952,[170,193,203]],[.1111,[158,187,200]],[.127,[147,180,198]],[.1429,[137,172,196]],[.1587,[128,165,195]],[.1746,[119,156,193]],[.1905,[112,149,192]],[.2063,[107,141,191]],[.2222,[102,132,189]],[.2381,[99,124,187]],[.254,[97,115,185]],[.2698,[96,106,183]],[.2857,[95,97,180]],[.3016,[94,87,176]],[.3175,[94,78,171]],[.3333,[93,67,164]],[.3492,[92,57,157]],[.3651,[90,48,149]],[.381,[88,39,139]],[.3968,[84,31,127]],[.4127,[79,25,114]],[.4286,[73,21,100]],[.4444,[66,18,87]],[.4603,[59,17,75]],[.4762,[54,16,65]],[.4921,[50,17,58]],[.5079,[49,18,55]],[.5238,[55,17,56]],[.5397,[62,17,60]],[.5556,[70,18,64]],[.5714,[80,20,68]],[.5873,[90,22,72]],[.6032,[101,25,75]],[.619,[111,28,78]],[.6349,[122,32,79]],[.6508,[131,37,80]],[.6667,[141,44,80]],[.6825,[150,50,79]],[.6984,[157,58,79]],[.7143,[164,66,79]],[.7302,[170,75,80]],[.746,[176,84,81]],[.7619,[181,93,83]],[.7778,[186,102,87]],[.7937,[190,112,91]],[.8095,[193,121,96]],[.8254,[196,131,104]],[.8413,[199,142,113]],[.8571,[201,152,123]],[.873,[203,162,135]],[.8889,[206,171,148]],[.9048,[209,180,161]],[.9206,[212,189,175]],[.9365,[216,197,188]],[.9524,[219,205,201]],[.9683,[222,211,212]],[.9841,[224,215,220]],[1,[225,216,225]]]),"twilight dark (periodic)":i([[0,[47,19,55]],[.0159,[51,17,61]],[.0317,[56,16,70]],[.0476,[62,17,81]],[.0635,[69,19,93]],[.0794,[76,22,107]],[.0952,[82,27,120]],[.1111,[86,34,133]],[.127,[89,43,144]],[.1429,[91,52,153]],[.1587,[93,62,161]],[.1746,[93,73,168]],[.1905,[94,83,173]],[.2063,[94,92,178]],[.2222,[95,101,181]],[.2381,[96,110,184]],[.254,[98,119,186]],[.2698,[101,128,188]],[.2857,[104,136,190]],[.3016,[109,145,191]],[.3175,[115,153,193]],[.3333,[124,161,194]],[.3492,[132,169,195]],[.3651,[142,176,197]],[.381,[152,183,199]],[.3968,[164,190,202]],[.4127,[176,196,205]],[.4286,[188,202,209]],[.4444,[199,208,214]],[.4603,[210,213,218]],[.4762,[217,216,222]],[.4921,[223,217,225]],[.5079,[225,216,223]],[.5238,[223,213,216]],[.5397,[221,208,207]],[.5556,[217,201,195]],[.5714,[214,193,181]],[.5873,[210,185,168]],[.6032,[207,176,154]],[.619,[204,167,141]],[.6349,[202,157,129]],[.6508,[200,147,118]],[.6667,[197,136,108]],[.6825,[195,126,100]],[.6984,[192,116,93]],[.7143,[188,107,89]],[.7302,[184,97,85]],[.746,[179,88,82]],[.7619,[173,79,80]],[.7778,[167,70,79]],[.7937,[161,62,79]],[.8095,[154,54,79]],[.8254,[146,47,79]],[.8413,[136,40,80]],[.8571,[127,34,80]],[.873,[117,30,79]],[.8889,[106,26,77]],[.9048,[95,23,74]],[.9206,[85,21,70]],[.9365,[75,19,66]],[.9524,[66,17,61]],[.9683,[58,17,58]],[.9841,[52,17,55]],[1,[47,20,54]]]),"hsv (periodic)":i([[0,[165,38,38]],[.0159,[172,57,45]],[.0317,[179,76,52]],[.0476,[187,94,59]],[.0635,[194,113,66]],[.0794,[201,132,73]],[.0952,[208,151,80]],[.1111,[215,170,87]],[.127,[222,189,94]],[.1429,[229,208,102]],[.1587,[236,227,109]],[.1746,[237,239,113]],[.1905,[223,237,110]],[.2063,[208,234,106]],[.2222,[193,230,103]],[.2381,[177,227,99]],[.254,[158,222,95]],[.2698,[143,219,91]],[.2857,[127,215,88]],[.3016,[112,212,84]],[.3175,[97,208,81]],[.3333,[81,205,77]],[.3492,[77,204,85]],[.3651,[78,205,98]],[.381,[79,207,111]],[.3968,[80,208,124]],[.4127,[82,209,137]],[.4286,[83,210,150]],[.4444,[84,211,163]],[.4603,[85,213,176]],[.4762,[86,214,189]],[.4921,[87,215,202]],[.5079,[88,214,215]],[.5238,[81,195,208]],[.5397,[74,176,201]],[.5556,[67,157,194]],[.5714,[60,138,187]],[.5873,[52,120,180]],[.6032,[45,101,173]],[.619,[38,82,166]],[.6349,[31,63,159]],[.6508,[24,44,152]],[.6667,[17,25,145]],[.6825,[17,14,141]],[.6984,[33,17,144]],[.7143,[48,20,148]],[.7302,[63,24,152]],[.746,[79,28,155]],[.7619,[98,32,160]],[.7778,[113,36,163]],[.7937,[129,39,167]],[.8095,[144,43,170]],[.8254,[159,46,174]],[.8413,[173,49,176]],[.8571,[177,50,168]],[.873,[176,48,155]],[.8889,[175,47,142]],[.9048,[174,46,129]],[.9206,[172,45,116]],[.9365,[171,44,103]],[.9524,[170,42,90]],[.9683,[169,41,77]],[.9841,[168,40,64]],[1,[166,39,51]]])}},50112:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});class i{constructor(e){this._element=e,this._activeElement=null,this._open=!1;const t=document.createElement("div");document.body.appendChild(t),this.shadow=t.attachShadow({mode:"open"}),this.shadow.appendChild(this._element),this._backdrop=document.createElement("div"),this._backdrop.classList.add("modal-backdrop","fade"),this._element.addEventListener("click",(e=>{e.target===e.currentTarget&&this.close()}));for(const e of this._element.querySelectorAll('[data-bs-dismiss="modal"]'))e.addEventListener("click",(()=>{this.close()}));document.addEventListener("keydown",(e=>{"Escape"===e.key&&(e.preventDefault(),this.close())})),this._element.addEventListener("transitionend",(e=>{e.target!==e.currentTarget||this._open||this._element.style.setProperty("display","none")})),this._backdrop.addEventListener("transitionend",(()=>{this._open||(this._backdrop.remove(),this._activeElement&&this._activeElement instanceof HTMLElement&&this._activeElement.focus(),this._activeElement=null)}))}close(){this._backdrop.classList.remove("show"),this._element.classList.remove("show"),this._open=!1}open(){this._element.getRootNode().appendChild(this._backdrop),this._element.style.setProperty("display","block"),this._element.offsetHeight,this._backdrop.classList.add("show"),this._element.classList.add("show"),this._activeElement=s(),this._activeElement&&this._activeElement instanceof HTMLElement&&this._activeElement.blur(),this._open=!0}toggle(e=!this.open){e?this.open():this.close()}remove(){this.shadow.host.remove()}}function s(e=document){const t=e.activeElement;return(null==t?void 0:t.shadowRoot)?s(t.shadowRoot):t}},45127:(e,t,r)=>{"use strict";r.d(t,{Je:()=>a,W2:()=>l,qP:()=>o});var i=r(34961),s=r.n(i),n=r(91683);function o(e,t=""){return r=>{if(!e.includes(r))throw Error(`invalid property '${r}' for ${t}, are you sure the settings correspond to the current dataset?`)}}class a{constructor(e,t){this.type=e,this._value=t,this._previous_value=t,this._boundList=[],this.validate=()=>{},this.onchange=[],Object.preventExtensions(this)}get value(){return this._value}set value(e){this._update(e.toString(),"JS")}changed(e){for(const e of this._boundList)if("multival"===e.attribute){const t=this._value.split(","),r=e.element;for(const e of r.options)e.selected=t.includes(e.value)}else e.element[e.attribute]=this._value;for(const t of this.onchange)t(this._value,e)}reset(){this.value=this._previous_value}bind(e,t){let r;if("string"==typeof e&&(e=(0,n.VT)(e)),"multival"===t){r=e=>{s()(null!==e.target,"event.target !== null");const t=e.target,r=Array.from(t.options).filter((e=>e.selected)).map((e=>e.value));this._update(r.toString(),"DOM")};const t=this._value.split(",");for(const r of e.options)r.selected=t.includes(r.value)}else r=e=>{s()(null!==e.target,"event.target !== null"),this._update(e.target[t].toString(),"DOM")},e[t]=this._value;e.addEventListener("change",r),this._boundList.push({element:e,attribute:t,listener:r})}disable(){for(const e of this._boundList){const t=e.element;"disabled"in t&&(t.disabled=!0)}}enable(){for(const e of this._boundList){const t=e.element;"disabled"in t&&(t.disabled=!1)}}unbindAll(){for(const e of this._boundList)e.element.removeEventListener("change",e.listener);this._boundList=[]}_update(e,t){const r=function(e,t){if("string"===e)return t;if("int"===e)return parseInt(t,10);if("number"===e)return parseFloat(t);if("boolean"===e){if("false"===t)return!1;if("true"===t)return!0;throw Error(`invalid value for boolean: ${t}`)}throw Error(`unknown type '${e}' passed to parse`)}(this.type,e);this._value!==r&&(this.validate(r),this._previous_value=this.value,this._value=r,this.changed(t))}}class l{saveSettings(){const e={};return this.foreachOption(((t,r)=>{s()(t.length>=1,"keys.length >= 1");const i=r.value;if(void 0!==i||null!==i||!Number.isNaN(i)){let r=e;for(const e of t.slice(0,t.length-1))e in r||(r[e]={}),r=r[e];r[t[t.length-1]]=i}})),e}applySettings(e){const t=JSON.parse(JSON.stringify(e));this.foreachOption(((e,r)=>{s()(e.length>=1,"keys.length >= 1");let i,o=t;for(const t of e.slice(0,e.length-1)){if(!(t in o))return;i=o,o=o[t]}const a=e[e.length-1];if(a in o){const t=o[a];if(null==t||Number.isNaN(t))return void(0,n.R4)(`ignored setting '${a}' with invalid value '${t}'`);r.value=t,delete o[a],void 0!==i&&0===Object.keys(o).length&&(s()(e.length>=2,"keys.length >= 2"),delete i[e[e.length-2]])}})),0!==Object.keys(t).length&&(0,n.R4)(`ignored unknown settings '${JSON.stringify(t)}'`)}onSettingChange(e){this.foreachOption(((t,r)=>{r.onchange.push((r=>e(t,r)))}))}foreachOption(e){c(this,e,[])}}function c(e,t,r=[]){if(r.length>10)throw Error("setting object is too deep");for(const i in e){if(i.startsWith("_"))continue;const s=r.concat([i]),n=e[i];n instanceof a?t(s,n):"object"==typeof n&&null!==n&&c(n,t,s)}}},59838:(e,t,r)=>{"use strict";r.d(t,{O:()=>u});var i=r(34961),s=r.n(i),n=r(88862),o=r(50112),a=r(45127),l=r(91683),c=r(17136),h=r(90170);class u extends a.W2{constructor(e,t,r=[]){super(),this.bonds=new a.Je("boolean",!0),this.atoms=new a.Je("boolean",!0),this.spaceFilling=new a.Je("boolean",!1),this.atomLabels=new a.Je("boolean",!1),this.shape=new a.Je("string",""),this.unitCell=new a.Je("boolean",!1),this.rotation=new a.Je("boolean",!1),this.supercell=[new a.Je("int",1),new a.Je("int",1),new a.Je("int",1)];const i=e=>{if(!(Number.isInteger(e)&&e>0))throw Error("supercell count should be a positive integer")};this.supercell[0].validate=i,this.supercell[1].validate=i,this.supercell[2].validate=i,this.axes=new a.Je("string","off"),this.axes.validate=(0,a.qP)(["off","abc","xyz"],"axes"),this.keepOrientation=new a.Je("boolean",!1),this.playbackDelay=new a.Je("number",700),this.environments={activated:new a.Je("boolean",!0),bgColor:new a.Je("string","grey"),bgStyle:new a.Je("string","ball-stick"),center:new a.Je("boolean",!1),cutoff:new a.Je("number",4)},this.color={property:new a.Je("string","element"),min:new a.Je("number",0),max:new a.Je("number",0),transform:new a.Je("string","linear"),palette:new a.Je("string","bwr")},r.includes("element")?this.color.property.validate=(0,a.qP)(r,"color"):this.color.property.validate=(0,a.qP)(r.concat(["element"]),"color"),this.color.transform.validate=(0,a.qP)(["linear","log","sqrt","inverse"],"transform"),this.color.palette.validate=(0,a.qP)(Object.keys(c.s),"palette"),this.environments.bgColor.validate=(0,a.qP)(["grey","CPK","property"],"background atoms coloring"),this.environments.bgStyle.validate=(0,a.qP)(["ball-stick","licorice","hide"],"background atoms style"),this.environments.cutoff.validate=e=>{if(e<0)throw Error("cutoff should be a positive number")},this._positionSettingsModal=t;const{openModal:s,modal:n}=this._createSettingsHTML();this._modal=n,this._modal.shadow.adoptedStyleSheets=e.getRootNode().adoptedStyleSheets,this._openModal=s,e.appendChild(this._openModal),this._bind(r)}getModalElement(e){return(0,l.VT)(e,this._modal.shadow)}get modal(){return this._modal}remove(){this._modal.remove(),this._openModal.remove()}applySettings(e){"packedCell"in e&&(!1!==e.packedCell&&(0,l.R4)("packedCell option has been removed, but it is set to true in the settings"),delete e.packedCell),super.applySettings(e)}_createSettingsHTML(){const e=document.createElement("template");e.innerHTML=`\n
${h.A}
\n `;const t=e.content.firstChild;e.innerHTML='\n';const r=e.content.querySelector(".modal");s()(null!==r&&r instanceof HTMLElement,"modalElement !== null && modalElement instanceof HTMLElement");const i=r.querySelector(".modal-dialog");s()(null!==i&&i instanceof HTMLElement,"modalDialog !== null && modalDialog instanceof HTMLElement"),t.addEventListener("click",(()=>{if(null===i.getAttribute("data-initial-modal-positions-set")){i.setAttribute("data-initial-modal-positions-set","true"),i.parentNode.style.display="block";const{top:e,left:t}=this._positionSettingsModal(i.getBoundingClientRect());i.style.width=i.offsetWidth/1.5+"px",i.style.minWidth="500px",i.style.margin="0",i.style.position="fixed",i.style.top=`${e}px`,i.style.left=`${t}px`}a.open()})),(0,l.eB)(i,".modal-header"),r.addEventListener("keydown",(e=>e.stopPropagation()));const a=new o.A(r);return n.A.initialize(r),{modal:a,openModal:t}}_bind(e){this.atomLabels.bind(this.getModalElement("atom-labels"),"checked");const t=this.getModalElement("shapes");this.shape.bind(t,"multival"),this.spaceFilling.bind(this.getModalElement("space-filling"),"checked"),this.bonds.bind(this.getModalElement("bonds"),"checked"),this.atoms.bind(this.getModalElement("atoms"),"checked"),this.rotation.bind(this.getModalElement("rotation"),"checked"),this.unitCell.bind(this.getModalElement("unit-cell"),"checked"),this.supercell[0].bind(this.getModalElement("supercell-a"),"value"),this.supercell[1].bind(this.getModalElement("supercell-b"),"value"),this.supercell[2].bind(this.getModalElement("supercell-c"),"value");const r=this.getModalElement("atom-color-property");r.options.length=0,e.includes("element")||r.options.add(new Option("element","element"));for(const t of e)r.options.add(new Option(t,t));this.color.property.bind(r,"value"),this.color.transform.bind(this.getModalElement("atom-color-transform"),"value"),this.color.min.bind(this.getModalElement("atom-color-min"),"value"),this.color.max.bind(this.getModalElement("atom-color-max"),"value");const i=this.getModalElement("atom-color-palette");i.options.length=0;for(const e in c.s)i.options.add(new Option(e,e));this.color.palette.bind(i,"value"),this.axes.bind(this.getModalElement("axes"),"value"),this.keepOrientation.bind(this.getModalElement("keep-orientation"),"checked"),this.playbackDelay.bind(this.getModalElement("playback-delay"),"value"),this.environments.activated.bind(this.getModalElement("env-activated"),"checked"),this.environments.bgColor.bind(this.getModalElement("env-bg-color"),"value"),this.environments.bgStyle.bind(this.getModalElement("env-bg-style"),"value"),this.environments.cutoff.bind(this.getModalElement("env-cutoff"),"value"),this.environments.center.bind(this.getModalElement("env-center"),"checked")}}},14761:(e,t,r)=>{"use strict";r.d(t,{C1:()=>b,N2:()=>S,Nh:()=>w,T:()=>_,i3:()=>y,iy:()=>v});var i=r(34961),s=r.n(i),n=r(37821);function o(e,t){return{x:e.x+t.x,y:e.y+t.y,z:e.z+t.z}}function a(e,t){return{x:e.x-t.x,y:e.y-t.y,z:e.z-t.z}}function l(e,t){return{x:e.x*t,y:e.y*t,z:e.z*t}}function c(e,t){return e.x*t.x+e.y*t.y+e.z*t.z}function h(e,t){return{x:e.y*t.z-e.z*t.y,y:e.z*t.x-e.x*t.z,z:e.x*t.y-e.y*t.x}}function u(e,t,r){const i=new n.Quaternion(e.x,e.y,e.z,0);return i.multiplyQuaternions(t.clone(),i),i.multiply(t.clone().inverse()),o({x:i.x,y:i.y,z:i.z},r)}function d(e,t){const r=[],i=[];for(let t=0;t1e-6)throw Error(`orientation must be normalized to 1 for "${t}" shapes`);return""}function g(e){return"number"==typeof e&&Number.isInteger(e)&&e>=0}class v extends p{constructor(e){super(e),this.radius=(e.radius||1)*this.scale}static validateParameters(e){return"radius"in e?"orientation"in e?'"orientation" has no effect on a sphere shape':"number"!=typeof e.radius?'"radius" must be a number in "sphere" shape':"":'"radius" is required for "sphere" shapes'}outputTo3Dmol(e,t=20){const r=f([this.radius,this.radius,this.radius],t),i=r.vertices,s=r.indices,n=[],a=[];for(const e of i){const t=o(e,this.position);n.push(t);const r={x:e.x/Math.pow(this.radius,2),y:e.y/Math.pow(this.radius,2),z:e.z/Math.pow(this.radius,2)};a.push(r)}return{vertexArr:n,normalArr:a,faceArr:s,color:e}}}class b extends p{constructor(e){super(e),s()(e.semiaxes,"data.semiaxes"),this.semiaxes=[this.scale*e.semiaxes[0],this.scale*e.semiaxes[1],this.scale*e.semiaxes[2]]}static validateParameters(e){if(!("semiaxes"in e))return'"semiaxes" is required for "ellipsoid" shapes';if(!Array.isArray(e.semiaxes)||3!==e.semiaxes.length)return'"semiaxes" must be an array with 3 elements for "ellipsoid" shapes';const[t,r,i]=e.semiaxes;if("number"!=typeof t||"number"!=typeof r||"number"!=typeof i)return'"semiaxes" elements must be numbers for "ellipsoid" shapes';if("orientation"in e){const t=m(e.orientation,"ellipsoid");if(""!==t)return t}return""}outputTo3Dmol(e,t=20){const r=f(this.semiaxes,t),i=r.vertices,s=r.indices,n=[],o=[];for(const e of i){const t=u(e,this.orientation,this.position);n.push(t);const r=u({x:e.x/Math.pow(this.semiaxes[0],2),y:e.y/Math.pow(this.semiaxes[1],2),z:e.z/Math.pow(this.semiaxes[2],2)},this.orientation,{x:0,y:0,z:0});o.push(r)}return{vertexArr:n,normalArr:o,faceArr:s,color:e}}}class y extends p{constructor(e){super(e),s()(e.vector,"data.vector"),this.vector=[this.scale*e.vector[0],this.scale*e.vector[1],this.scale*e.vector[2]],this.baseRadius=this.scale*(e.baseRadius||.1),this.headRadius=this.scale*(e.headRadius||.15),this.headLength=this.scale*(e.headLength||.2)}static validateParameters(e){if(!("vector"in e))return'"vector" is required for "arrow" shapes';if(!Array.isArray(e.vector)||3!==e.vector.length)return'"vector" must be an array with 3 elements for "vector" shapes';const[t,r,i]=e.vector;return"number"!=typeof t||"number"!=typeof r||"number"!=typeof i?'"vector" elements must be numbers for "vector" shapes':"orientation"in e?'"orientation" cannot be used on "arrow" shapes. define "vector" instead':""}outputTo3Dmol(e,t=20){const r=function(e,t,r,i,s=20){const[n,a,u]=e,d={x:n,y:a,z:u},p=Math.sqrt(n*n+a*a+u*u);i>p&&(i=p);const f={x:d.x*(1-i/p),y:d.y*(1-i/p),z:d.z*(1-i/p)},m=l(d,1/p);let g;g=0!==m.x||0!==m.y?{x:0,y:0,z:1}:{x:0,y:1,z:0};let v=o(g,l(m,-c(g,m)));v=l(v,1/Math.sqrt(c(v,v)));const b=h(v,m),y=[];for(let e=0;e=x&&(r.addCustom(e),e.vertexArr.length=0,Array.isArray(e.normalArr)&&(e.normalArr.length=0),Array.isArray(e.faceArr)&&(e.faceArr.length=0),Array.isArray(e.color)&&(e.color.length=0)),e.faceArr&&t.faceArr&&e.vertexArr){const r=null!==(i=e.vertexArr.length)&&void 0!==i?i:0,s=t.faceArr.map((e=>e+r));e.faceArr.push(...s)}if(e.vertexArr&&t.vertexArr&&(null===(s=e.vertexArr)||void 0===s||s.push(...t.vertexArr)),e.normalArr&&t.normalArr&&(null===(n=e.normalArr)||void 0===n||n.push(...t.normalArr)),t.vertexArr&&Array.isArray(e.color)){const r=t.color&&!Array.isArray(t.color)?t.color:16777215,i=Array(null!==(o=t.vertexArr.length)&&void 0!==o?o:0).fill(r);e.color.push(...i)}}},91683:(e,t,r)=>{"use strict";r.d(t,{GI:()=>c,VT:()=>l,V6:()=>u,eB:()=>n,R4:()=>a,HB:()=>h});var i=r(34961),s=r.n(i);function n(e,t){const r=e.querySelector(t);if(null===r)throw Error(`no element matching '${t}'`);const i=t=>{const r=e.dragOffset;s()(void 0!==r,"offset !== undefined");const i=t.clientX-r.x,n=t.clientY-r.y;e.style.left=`${i}px`,e.style.top=`${n}px`},n=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",n)};r.addEventListener("mousedown",(t=>{const r=t;e.dragOffset={x:r.clientX-e.offsetLeft,y:r.clientY-e.offsetTop},e.style.left=`${e.offsetLeft}px`,e.style.top=`${e.offsetTop}px`,e.style.width=`${e.offsetWidth}px`,e.style.margin="0",e.style.position="absolute",document.addEventListener("mousemove",i,!1),document.addEventListener("mouseup",n,!1)}),!1)}const o=[e=>console.warn(e)];function a(e){for(const t of o)t(e)}function l(e,t=document){let r;if(r=t instanceof HTMLElement?t.querySelector(`#${e}`):t.getElementById(e),null===r)throw Error(`unable to get element with id ${e}`);return r}function c(e){let t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(const i of e)null!==i&&(i>t&&isFinite(i)&&(t=i),i{"use strict";var i=r(97905),s="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{MoleculeViewer:()=>f});var e=__webpack_require__(34961),t=__webpack_require__.n(e),r=__webpack_require__(37821);const i={H:.37,He:.32,Li:1.34,Be:.9,B:.82,C:.77,N:.75,O:.73,F:.71,Ne:.69,Na:1.54,Mg:1.3,Al:1.18,Si:1.11,P:1.06,S:1.02,Cl:.99,Ar:.97,K:1.96,Ca:1.74,Sc:1.44,Ti:1.56,V:1.25,Mn:1.39,Fe:1.25,Co:1.26,Ni:1.21,Cu:1.38,Zn:1.31,Ga:1.26,Ge:1.22,Se:1.16,Br:1.14,Kr:1.1,Rb:2.11,Sr:1.92,Y:1.62,Zr:1.48,Nb:1.37,Mo:1.45,Tc:1.56,Ru:1.26,Rh:1.35,Pd:1.31,Ag:1.53,Cd:1.48,In:1.44,Sn:1.41,Sb:1.38,Te:1.35,I:1.33,Xe:1.3,Cs:2.25,Ba:1.98,Lu:1.6,Hf:1.5,Ta:1.38,W:1.46,Re:1.59,Os:1.44,Ir:1.37,Pt:1.28,Au:1.44,Hg:1.49,Tl:1.48,Pb:1.47,Bi:1.46,Rn:1.45};function s(e){return i[e]||1.6}function n(e,t){if("X"===e.elem||"X"===t.elem)return!1;let r=s(e.elem)+s(t.elem);r+=.25,r*=r;let i=e.x-t.x;if(i*=i,i>r)return!1;let n=e.y-t.y;if(n*=n,n>r)return!1;let o=e.z-t.z;if(o*=o,o>r)return!1;const a=i+n+o;return!(isNaN(a)||a<.5||a>r)}function o(e,t){for(let r=0;r-1&&-1===navigator.userAgent.indexOf("CriOS")&&-1===navigator.userAgent.indexOf("FxiOS");function p(){return d?.87:.7}class f{constructor(e,i){const s=(0,l.V6)(e),n=document.createElement("div");s.appendChild(n),n.style.setProperty("height","100%"),this._shadow=n.attachShadow({mode:"open"}),this._root=document.createElement("div"),this._shadow.appendChild(this._root),this._root.style.position="relative",this._root.style.width="100%",this._root.style.height="100%";const o=r.createViewer(this._root,{antialias:!0,defaultcolors:r.elementColors.Jmol,backgroundColor:"0xffffff",backgroundAlpha:0,disableFog:!0,orthographic:!0});if(void 0===o)throw Error("unable to create WebGL canvas");this._viewer=o,this.onselect=()=>{},this._cellInfo=document.createElement("span"),this._cellInfo.classList.add("chsp-cell-info","chsp-hide-if-no-cell","badge","bg-light","text-dark"),this._root.appendChild(this._cellInfo);const a=new CSSStyleSheet,c=new CSSStyleSheet,u=new CSSStyleSheet,d=new CSSStyleSheet;this._styles={noCell:a,noEnvs:c,noShape:u,noProperties:d},this._shadow.adoptedStyleSheets=[...s.getRootNode().adoptedStyleSheets,a,c,u,d],this._options=new h.O(this._root,(e=>this.positionSettingsModal(e)),i),this._options.modal.shadow.adoptedStyleSheets=[...this._options.modal.shadow.adoptedStyleSheets,a,c,u,d],this._colorReset=this._options.getModalElement("atom-color-reset"),this._colorMoreOptions=this._options.getModalElement("atom-color-more-options"),this._colorMoreOptions.disabled=!0,this._connectOptions(),this._trajectoryOptions=this._options.getModalElement("trajectory-settings-group"),this.positionSettingsModal=e=>{const t=this._root.getBoundingClientRect();return{left:t.left+t.width/2-e.width/2,top:t.top+20}},this._root.addEventListener("wheel",(e=>{if(e.isTrusted){e.preventDefault(),e.stopImmediatePropagation();const r=new Event("wheel");Object.assign(r,{ctrlKey:!0,detail:e.detail,wheelDelta:e.wheelDelta,pageX:e.pageX,pageY:e.pageY}),t()(e.target,"event.target"),e.target.dispatchEvent(r)}}),{capture:!0}),window.addEventListener("resize",(()=>this.resize())),window.requestAnimationFrame((()=>{window.dispatchEvent(new Event("resize"))}))}refreshOptions(e,t){const r=this._options.modal.shadow.adoptedStyleSheets;this._options.remove(),this._options=new h.O(this._root,(e=>this.positionSettingsModal(e)),t),this._options.modal.shadow.adoptedStyleSheets=r,this._colorReset=this._options.getModalElement("atom-color-reset"),this._colorMoreOptions=this._options.getModalElement("atom-color-more-options"),this._trajectoryOptions=this._options.getModalElement("trajectory-settings-group"),this._colorReset.disabled=!0,this._colorMoreOptions.disabled=!0,this._connectOptions(),e?this._options.environments.activated.enable():this._options.environments.activated.disable()}remove(){null!==this._root.parentElement&&(this._root.parentElement.innerHTML=""),this._options.remove()}resize(){this._viewer.resize(),this._updateColorBar()}natoms(){return void 0===this._current?void 0:this._current.structure.size}set environments(e){this._environments=e}load(e,i,s={},n){let o,l,c,h,u;if(this.resize(),this._properties=i,void 0!==this._highlighted&&(o=this._defaultCutoff(this._highlighted.center)),this._environments=s.environments,l=void 0===s.keepOrientation?this._options.keepOrientation.value:s.keepOrientation,void 0===s.supercell?[c,h,u]=[this._options.supercell[0].value,this._options.supercell[1].value,this._options.supercell[2].value]:([c,h,u]=s.supercell,this._options.supercell[0].value=c,this._options.supercell[1].value=h,this._options.supercell[2].value=u),void 0===this._initialSupercell&&(this._initialSupercell=[c,h,u],this._resetSupercell.innerHTML=`reset ${c}x${h}x${u} supercell`),void 0===e.cell?this._styles.noCell.replaceSync(".chsp-hide-if-no-cell { display: none; }"):this._styles.noCell.replaceSync(""),this._showSupercellInfo(),void 0!==s.trajectory&&s.trajectory?this._trajectoryOptions.style.display="block":this._trajectoryOptions.style.display="none",this._options.unitCell.value&&void 0!==this._current&&this._viewer.removeUnitCell(this._current.model),this._viewer.removeAllModels(),void 0!==this._current)for(const e of this._current.atomLabels)this._viewer.removeLabel(e);void 0!==this._highlighted&&(this._viewer.removeModel(this._highlighted.model),this._highlighted=void 0),this._current={model:this._viewer.addModel(),structure:e,atomLabels:[]},function(e,t){if(void 0!==t.cell){const i=t.cell,s=new r.Matrix3(i[0],i[3],i[6],i[1],i[4],i[7],i[2],i[5],i[8]);e.setCrystMatrix(s)}const i=[];for(let e=0;e{n&&n()}))}_setEnvironmentInteractions(){if(void 0===this._environments)return;const e=this._environments.filter((e=>void 0!==e)).map((e=>e.center));for(const e of this._viewer.selectedAtoms({}))e.clickable=!1,e.hoverable=!1;t()(void 0!==this._current,"this._current !== undefined"),this._viewer.setClickable({model:this._current.model,index:e},!0,(e=>this._selectAtom(e))),this._setHoverable(e)}highlight(e){let t;void 0!==this._highlighted&&(t=this._defaultCutoff(this._highlighted.center)),this._changeHighlighted(e,t),this._updateStyle();const r=this._options.environments.center.value;void 0!==this._highlighted&&r&&(this._options.keepOrientation.value||this._resetView(),this._centerView()),this._viewer.render()}applySettings(e){this._options.applySettings(e)}saveSettings(){return this._options.saveSettings()}onSettingChange(e){this._options.onSettingChange(e)}exportPNG(){return this._viewer.pngURI()}_setHoverable(e){t()(void 0!==this._current,"this._current !== undefined"),this._viewer.setHoverDuration(0);const r=this.natoms();t()(void 0!==r,"n_atoms !== undefined");const i=new Map;this._viewer.setHoverable({model:this._current.model,index:e},!0,(e=>{if(t()(void 0!==e.index,"atom.index !== undefined"),void 0!==i.get(e.index))return;const r=this._viewer.addModel();r.addAtoms([e]),r.setStyle({},this._centralStyle(.3));const s=r.selectedAtoms({});s[0].clickable=!1,s[0].hoverable=!1,i.set(e.index,r),this._viewer.render()}),(e=>{t()(void 0!==e.index,"atom.index !== undefined");const r=i.get(e.index);void 0!==r&&(this._viewer.removeModel(r),i.delete(e.index),this._viewer.render())}))}_connectOptions(){const e=()=>{this._updateStyle(),this._viewer.render()};this._options.spaceFilling.onchange.push(e),this._options.bonds.onchange.push(e),this._options.atoms.onchange.push(e),this._options.atomLabels.onchange.push((e=>{if(void 0!==this._current)if(e){t()(0===this._current.atomLabels.length,"this._current.atomLabels.length === 0");const e=this._current.structure;for(let t=0;tthis._addAxes(e))),this._options.rotation.onchange.push((e=>{e?this._viewer.spin("vy"):this._viewer.spin(!1)})),this._options.unitCell.onchange.push((e=>{void 0!==this._current&&(e?this._viewer.addUnitCell(this._current.model,{box:{color:"black"},astyle:{hidden:!0},bstyle:{hidden:!0},cstyle:{hidden:!0}}):this._viewer.removeUnitCell(this._current.model),this._viewer.render())})),this._options.shape.onchange.push((()=>{void 0!==this._current&&(this._updateStyle(),this._viewer.render())}));const i=()=>{if(this._showSupercellInfo(),void 0===this._current)return;const e=this._current.model.selectedAtoms({});this._current.model.removeAtoms(e.splice(this._current.structure.size));const t=this._options.supercell[0].value,r=this._options.supercell[1].value,i=this._options.supercell[2].value;if(1===t&&1===r&&1===i||this._viewer.replicateUnitCell(this._options.supercell[0].value,this._options.supercell[1].value,this._options.supercell[2].value,this._current.model),a(this._current.model.selectedAtoms({})),void 0!==this._highlighted){const e=this._defaultCutoff(this._highlighted.center);this._changeHighlighted(this._highlighted.center,e)}this._environmentsEnabled()&&this._setEnvironmentInteractions(),this._updateStyle(),this._viewer.render()};this._options.supercell[0].onchange.push(i),this._options.supercell[1].onchange.push(i),this._options.supercell[2].onchange.push(i),this._options.environments.bgColor.onchange.push(e),this._options.environments.bgStyle.onchange.push(e),this._options.environments.cutoff.onchange.push((()=>{if(void 0!==this._highlighted){const e=this._defaultCutoff(this._highlighted.center);this._changeHighlighted(this._highlighted.center,e)}e()})),this._options.environments.center.onchange.push((e=>{this._options.keepOrientation.value||this._resetView(),e&&this._centerView(),this._viewer.render()})),this._options.environments.activated.onchange.push((r=>{if(this._enableEnvironmentSettings(r),r){t()(void 0!==this._lastHighlighted,"this._lastHighlighted !== undefined"),this._options.environments.cutoff.value=this._lastHighlighted.cutoff;const e=this._lastHighlighted.center,r=this._defaultCutoff(e);this._changeHighlighted(e,r)}else t()(void 0!==this._highlighted,"this._highlighted !== undefined"),this._viewer.removeModel(this._highlighted.model),this._lastHighlighted={center:this._highlighted.center,cutoff:this._options.environments.cutoff.value};e()})),this._options.color.property.onchange.push((()=>{const t=this._options.color.property.value;if("element"!==t){this._options.color.transform.enable(),this._options.color.transform.value="linear",this._options.color.min.enable(),this._options.color.max.enable(),this._colorReset.disabled=!1,this._colorMoreOptions.disabled=!1,this._options.color.palette.enable();const e=this._colorValues(t,"linear");e.some((e=>null===e))&&(0,l.R4)("The selected structure has undefined properties for some atoms, these atoms will be colored in light gray.");const{max:r,min:i}=(0,l.GI)(e);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=r,this._options.color.min.value=i,this._setScaleStep([i,r])}else this._options.color.transform.disable(),this._options.color.min.disable(),this._options.color.max.disable(),this._options.getModalElement("atom-color-extra").classList.contains("show")&&this._colorMoreOptions.click(),this._colorReset.disabled=!0,this._colorMoreOptions.disabled=!0,this._options.color.palette.disable(),this._viewer.setColorByElement({},r.elementColors.Jmol);this._updateColorBar(),e()}));const s=t=>{const r=this._options.color.min.value,i=this._options.color.max.value;if(r>i)return(0,l.R4)("The inserted min and max values in color are such that min > max! The last inserted value was reset."),void("min"===t?this._options.color.min.reset():this._options.color.max.reset());this._setScaleStep([r,i]),this._updateColorBar(),e()};this._options.color.transform.onchange.push((()=>{const r=this._options.color.property.value;t()("element"!==r,"property !== 'element'");const i=this._options.color.transform.value,s=this._colorValues(r,i),{min:n,max:o}=(0,l.GI)(s);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=o,this._options.color.min.value=n,this._setScaleStep([n,o]),this._updateColorBar(),e()})),this._options.color.min.onchange.push((()=>{s("min"),e()})),this._options.color.max.onchange.push((()=>{s("max"),e()})),this._colorReset.addEventListener("click",(()=>{const t=JSON.parse(JSON.stringify(this._properties))[this._options.color.property.value].filter((e=>!isNaN(Number(e)))),[r,i]=[Math.min(...t),Math.max(...t)];this._options.color.min.value=r,this._options.color.max.value=i,this._setScaleStep([r,i]),this._updateColorBar(),e()})),this._options.color.palette.onchange.push((()=>{this._updateColorBar(),e()})),this._resetEnvCutoff=this._options.getModalElement("env-reset"),this._resetEnvCutoff.onclick=()=>{t()(void 0!==this._highlighted,"this._highlighted !== undefined"),this._options.environments.cutoff.value=this._defaultCutoff(this._highlighted.center),e()},this._options.getModalElement("align-x").onclick=()=>this._viewAlong([1,0,0]),this._options.getModalElement("align-y").onclick=()=>this._viewAlong([0,1,0]),this._options.getModalElement("align-z").onclick=()=>this._viewAlong([0,0,1]),this._options.getModalElement("align-a").onclick=()=>{if(void 0===this._current||void 0===this._current.structure.cell)return;const e=this._current.structure.cell,t=[e[0],e[1],e[2]];this._viewAlong(t)},this._options.getModalElement("align-b").onclick=()=>{if(void 0===this._current||void 0===this._current.structure.cell)return;const e=this._current.structure.cell,t=[e[3],e[4],e[5]];this._viewAlong(t)},this._options.getModalElement("align-c").onclick=()=>{if(void 0===this._current||void 0===this._current.structure.cell)return;const e=this._current.structure.cell,t=[e[6],e[7],e[8]];this._viewAlong(t)},this._resetSupercell=this._options.getModalElement("reset-supercell"),this._resetSupercell.onclick=()=>{t()(void 0!==this._initialSupercell,"this._initialSupercell !== undefined"),this._options.supercell[0].value=this._initialSupercell[0],this._options.supercell[1].value=this._initialSupercell[1],this._options.supercell[2].value=this._initialSupercell[2]},this._root.ondblclick=()=>{this._resetView(),this._options.environments.center.value&&this._centerView(),this._viewer.render()}}_selectAtom(e){t()(void 0!==e.serial,"atom.serial !== undefined"),this.onselect(e.serial)}_updateStyle(){void 0!==this._current&&(""!==this._options.shape.value&&this._addShapes(),this._environmentsEnabled()?(t()(void 0!==this._highlighted,"this._highlighted !== undefined"),this._current.model.setStyle({},this._hiddenStyle()),this._current.model.setStyle({index:this._highlighted.center},this._centralStyle(.4),!0),this._highlighted.model.setStyle({},this._mainStyle())):this._current.model.setStyle({},this._mainStyle()))}_addAxes(e){if(void 0!==this._axes&&(this._viewer.removeShape(this._axes[0].arrow),this._viewer.removeLabel(this._axes[0].label),this._viewer.removeShape(this._axes[1].arrow),this._viewer.removeLabel(this._axes[1].label),this._viewer.removeShape(this._axes[2].arrow),this._viewer.removeLabel(this._axes[2].label),this._axes=void 0),"off"===e);else if("xyz"===e)this._axes=[this._addLabeledArrow([2,0,0],"red","X"),this._addLabeledArrow([0,2,0],"green","Y"),this._addLabeledArrow([0,0,2],"blue","Z")];else if("abc"===e){if(void 0===this._current||void 0===this._current.structure.cell)return;const e=this._current.structure.cell,t=[e[0],e[1],e[2]],r=[e[3],e[4],e[5]],i=[e[6],e[7],e[8]];this._axes=[this._addLabeledArrow(t,"red","A"),this._addLabeledArrow(r,"green","B"),this._addLabeledArrow(i,"blue","C")]}this._viewer.render()}_addShapes(){if(void 0===this._current)return;if(""===this._options.shape.value)return;this._viewer.removeAllShapes(),this._options.unitCell.value&&this._viewer.addUnitCell(this._current.model,{box:{color:"black"},astyle:{hidden:!0},bstyle:{hidden:!0},cstyle:{hidden:!0}}),this._addAxes(this._options.axes.value),t()(0===this._current.atomLabels.length,"this._current.atomLabels.length === 0");const e=this._current.structure;t()(!(void 0===e.shapes),"!(structure.shapes === undefined)");const i=this._options.shape.value.split(","),s={vertexArr:[],normalArr:[],faceArr:[],color:[]},n=this._colorFunction(),o={};for(const a of i){if(""===a)continue;t()(a in e.shapes,"shape in structure.shapes");const i=e.shapes[a];let l=this._options.supercell[0].value,h=this._options.supercell[1].value,u=this._options.supercell[2].value,d=this._current.structure.cell;void 0===d&&(d=[1,0,0,0,1,0,0,0,1],(l>1||h>1||u>1)&&(l=1,h=1,u=1));for(let a=0;a0&&this._viewer.addCustom(s),this._viewer.render()}_mainStyle(){const e={};return this._options.atoms.value&&(e.sphere={scale:this._options.spaceFilling.value?1:.22,colorfunc:this._colorFunction()}),this._options.bonds.value&&(e.stick={radius:.15,colorfunc:this._colorFunction()}),e}_colorValues(e,r){t()(void 0!==this._properties,"this._properties !== undefined"),t()(Object.keys(this._properties).includes(e),"Object.keys(this._properties).includes(property)");let i=JSON.parse(JSON.stringify(this._properties[e])),s=e=>e;return"log"===r?s=Math.log10:"sqrt"===r?s=Math.sqrt:"inverse"===r&&(s=e=>1/e),i=i.map((e=>null===e||isNaN(e)?e:s(e))),i}_colorFunction(){if(void 0===this._properties)return;const e=this._options.color.property.value;if("element"===e)return;const i=this._options.color.transform.value,s=this._colorValues(e,i),n=this._options.color.min.value,o=this._options.color.max.value,a=u.s[this._options.color.palette.value],l=[];for(let e=0;e{t()(void 0!==e.serial,"atom.serial !== undefined");const r=s[e.serial];return null===r?14540253:isNaN(r)?2236962:Number.isFinite(n)&&Number.isFinite(o)?c.valueToHex(r):2236962}}_hiddenStyle(){const e={},t=this._options.environments.bgStyle.value;"hide"===t||("licorice"===t||"ball-stick"===t?(e.stick={radius:.149,opacity:p(),hidden:!this._options.bonds.value},"ball-stick"===t&&""===this._options.shape.value&&(e.sphere={scale:this._options.spaceFilling.value?.999:.219,opacity:p()})):(0,l.HB)());const r=this._options.environments.bgColor.value;return"CPK"===r||("grey"===r?(void 0!==e.stick&&(e.stick.color=8421504),void 0!==e.sphere&&(e.sphere.color=8421504)):"property"===r?(void 0!==e.stick&&(e.stick={radius:.149,opacity:p(),hidden:!this._options.bonds.value,colorfunc:this._colorFunction()}),void 0!==e.sphere&&(e.sphere={scale:this._options.spaceFilling.value?.999:.219,opacity:p(),colorfunc:this._colorFunction()})):(0,l.HB)()),e}_centralStyle(e){return{sphere:{scale:e,color:"green",opacity:p()}}}_showSupercellInfo(){const e=this._options.supercell[0].value,t=this._options.supercell[1].value,r=this._options.supercell[2].value;this._cellInfo.innerText=1!==e||1!==t||1!==r?`${e}x${t}x${r} supercell`:""}_environmentsEnabled(){return void 0!==this._highlighted&&!this._resetEnvCutoff.disabled}_enableEnvironmentSettings(e){const r=this._options.getModalElement("env-activated").nextElementSibling;t()(null!==r,"toggle !== null");const i=this._resetEnvCutoff;if(e){if(this._environmentsEnabled())return;i.disabled=!1,r.innerText="Disable",this._options.environments.cutoff.enable(),this._options.environments.bgStyle.enable(),this._options.environments.bgColor.enable()}else{if(!this._environmentsEnabled())return;i.disabled=!0,r.innerText="Enable",this._options.environments.cutoff.disable(),this._options.environments.bgStyle.disable(),this._options.environments.bgColor.disable()}}_defaultCutoff(e){t()(void 0!==this._environments,"this._environments !== undefined");const r=this._environments[e];return t()(void 0!==r,"environment !== undefined"),r.cutoff}_changeHighlighted(e,t){if(void 0!==this._highlighted&&this._viewer.removeModel(this._highlighted.model),void 0===e)this._options.environments.cutoff.value=0,this._highlighted=void 0;else{if(void 0===this._environments)throw Error("can not highlight an atom without having a list of environments");const r=this._environments[e];if(void 0===r)throw Error(`can not highlight atom ${e}: it is not part of the list of environments`);const i=this._options.environments.cutoff.value;void 0!==t&&t!==i||(this._options.environments.cutoff.value=r.cutoff);const s={or:[{index:e},{within:{distance:this._options.environments.cutoff.value,sel:{index:e}}}]};this._highlighted={model:this._viewer.createModelFrom(s),center:e},this._highlighted.model.setStyle({},this._mainStyle())}}_resetView(){this._viewer.zoomTo(),this._viewer.zoom(2),this._viewer.setSlab(-1e3,1e3)}_centerView(){void 0!==this._highlighted&&void 0!==this._current&&this._viewer.center({index:this._highlighted.center,model:this._current.model})}_viewAlong(e){const t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]),r=Math.acos(e[2]/t),i=[e[1]/t*Math.sin(r/2),-e[0]/t*Math.sin(r/2),0,Math.cos(r/2)],s=this._viewer.getView();s[4]=i[0],s[5]=i[1],s[6]=i[2],s[7]=i[3],this._viewer.setView(s)}_addLabeledArrow(e,t,i){const s=new r.Vector3(e[0],e[1],e[2]);return{arrow:this._viewer.addArrow({start:new r.Vector3(0,0,0),end:s,radius:.1,color:t,midpos:-1}),label:this._viewer.addLabel(i,{position:s,inFront:!0,fontColor:"black",fontSize:14,showBackground:!1})}}_setScaleStep(e){if(void 0!==e){const t=Math.round((e[1]-e[0])/20*Math.pow(10,10))/Math.pow(10,10),r=this._options.getModalElement("atom-color-min"),i=this._options.getModalElement("atom-color-max");r.step=`${t}`,i.step=`${t}`}}_colorTitle(){let e=this._options.color.property.value;switch(this._options.color.transform.value){case"inverse":e=`(${e})⁻¹`;break;case"log":e=`log10(${e})`;break;case"sqrt":e=`√(${e})`}return e}_addColorBar(){var e,i;const s=this._options.color.palette.value,n=this._colorTitle(),o=null===(e=this._viewer.container)||void 0===e?void 0:e.clientWidth,a=null===(i=this._viewer.container)||void 0===i?void 0:i.clientHeight;t()(void 0!==o&&void 0!==a,"viewerWidth !== undefined && viewerHeight !== undefined");const l=a-80,c=document.createElement("canvas");c.width=20,c.height=l;const h=u.s[s],d=c.getContext("2d");if(!d)throw new Error("Could not get 2D context from canvas");const p=d.createLinearGradient(0,l,0,0);for(let e=0;e0){if(e<1e4&&e>.009){if(Number.isInteger(e))return e.toString();{let t=e.toFixed(3).substring(0,4);return"."===t[3]&&(t=t.substring(0,3)),t}}return e.toExponential(0).replace("+","")}if(e>-1e3&&e<-.09){if(Number.isInteger(e))return e.toString();{let t=e.toFixed(3).substring(0,4);return"."===t[3]&&(t=t.substring(0,3)),t}}return e.toExponential(0).replace("+","")}})(),__webpack_exports__})())); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Chemiscope=t():e.Chemiscope=t()}(self,(()=>(()=>{var __webpack_modules__={37821:function(module,__unused_webpack_exports,__webpack_require__){var process=__webpack_require__(39807),factory;factory=()=>(()=>{var __webpack_modules__={"./node_modules/iobuffer/lib-esm/IOBuffer.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{IOBuffer:()=>o});var i=r("./node_modules/iobuffer/lib-esm/text.browser.js");const s=(()=>{const e=new Uint8Array(4);return!((new Uint32Array(e.buffer)[0]=1)&e[0])})(),n={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class o{constructor(e=8192,t={}){let r=!1;"number"==typeof e?e=new ArrayBuffer(e):(r=!0,this.lastWrittenByte=e.byteLength);const i=t.offset?t.offset>>>0:0,s=e.byteLength-i;let n=i;(ArrayBuffer.isView(e)||e instanceof o)&&(e.byteLength!==e.buffer.byteLength&&(n=e.byteOffset+i),e=e.buffer),this.lastWrittenByte=r?s:0,this.buffer=e,this.length=s,this.byteLength=s,this.byteOffset=n,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,n,s),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const e=this._marks.pop();if(void 0===e)throw new Error("Mark stack empty");return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){const t=2*(this.offset+e),r=new Uint8Array(t);r.set(new Uint8Array(this.buffer)),this.buffer=r.buffer,this.length=this.byteLength=t,this._data=new DataView(this.buffer)}return this}readBoolean(){return 0!==this.readUint8()}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,"uint8")}readArray(e,t){const r=n[t].BYTES_PER_ELEMENT*e,i=this.byteOffset+this.offset,o=this.buffer.slice(i,i+r);if(this.littleEndian===s&&"uint8"!==t&&"int8"!==t){const e=new Uint8Array(this.buffer.slice(i,i+r));e.reverse();const s=new n[t](e.buffer);return this.offset+=r,s.reverse(),s}const a=new n[t](o);return this.offset+=r,a}readInt16(){const e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){const e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){const e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){const e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){const e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){const e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){const e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){const e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let t="";for(let r=0;rthis.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}},"./node_modules/iobuffer/lib-esm/text-encoding-polyfill.js":function(){"use strict";!function(e){if(e.TextEncoder&&e.TextDecoder)return!1;function t(e="utf-8"){if("utf-8"!==e)throw new RangeError(`Failed to construct 'TextEncoder': The encoding label provided ('${e}') is invalid.`)}function r(e="utf-8",t={fatal:!1}){if("utf-8"!==e)throw new RangeError(`Failed to construct 'TextDecoder': The encoding label provided ('${e}') is invalid.`);if(t.fatal)throw new Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}Object.defineProperty(t.prototype,"encoding",{value:"utf-8"}),t.prototype.encode=function(e,t={stream:!1}){if(t.stream)throw new Error("Failed to encode: the 'stream' option is unsupported.");let r=0;const i=e.length;let s=0,n=Math.max(32,i+(i>>1)+7),o=new Uint8Array(n>>3<<3);for(;r=55296&&t<=56319){if(r=55296&&t<=56319)continue}if(s+4>o.length){n+=8,n*=1+r/e.length*2,n=n>>3<<3;const t=new Uint8Array(n);t.set(o),o=t}if(4294967168&t){if(4294965248&t)if(4294901760&t){if(4292870144&t)continue;o[s++]=t>>18&7|240,o[s++]=t>>12&63|128,o[s++]=t>>6&63|128}else o[s++]=t>>12&15|224,o[s++]=t>>6&63|128;else o[s++]=t>>6&31|192;o[s++]=63&t|128}else o[s++]=t}return o.slice(0,s)},Object.defineProperty(r.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(r.prototype,"fatal",{value:!1}),Object.defineProperty(r.prototype,"ignoreBOM",{value:!1}),r.prototype.decode=function(e,t={stream:!1}){if(t.stream)throw new Error("Failed to decode: the 'stream' option is unsupported.");const r=new Uint8Array(e);let i=0;const s=r.length,n=[];for(;i65535&&(t-=65536,n.push(t>>>10&1023|55296),t=56320|1023&t),n.push(t)}}else n.push(e)}return String.fromCharCode.apply(null,n)},e.TextEncoder=t,e.TextDecoder=r}("undefined"!=typeof window?window:"undefined"!=typeof self?self:this)},"./node_modules/iobuffer/lib-esm/text.browser.js":(e,t,r)=>{"use strict";function i(e,t="utf8"){return new TextDecoder(t).decode(e)}r.r(t),r.d(t,{decode:()=>i,encode:()=>n}),r("./node_modules/iobuffer/lib-esm/text-encoding-polyfill.js");const s=new TextEncoder;function n(e){return s.encode(e)}},"./node_modules/netcdfjs/lib-esm/data.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{nonRecord:()=>s,record:()=>n});var i=r("./node_modules/netcdfjs/lib-esm/types.js");function s(e,t){const r=(0,i.str2num)(t.type),s=t.size/(0,i.num2bytes)(r),n=new Array(s);for(let t=0;t{"use strict";r.r(t),r.d(t,{header:()=>c});var i=r("./node_modules/netcdfjs/lib-esm/types.js"),s=r("./node_modules/netcdfjs/lib-esm/utils.js");const n=0,o=10,a=11,l=12,h=0;function c(e,t){const r={version:t},l={length:e.readUint32()},c=function(e){const t={};let r,i;const a=e.readUint32();let l;if(a===n)return(0,s.notNetcdf)(e.readUint32()!==n,"wrong empty tag for list of dimensions"),[];{(0,s.notNetcdf)(a!==o,"wrong tag for list of dimensions");const t=e.readUint32();l=new Array(t);for(let n=0;n6,`non valid type ${p}`);const f=e.readUint32();let m=e.readUint32();2===r&&((0,s.notNetcdf)(m>0,"offsets larger than 4GB not supported"),m=e.readUint32());let g=!1;void 0!==t&&c[0]===t&&(h+=f,g=!0),l[o]={name:n,dimensions:c,attributes:d,type:(0,i.num2str)(p),size:f,offset:m,record:g}}}return{variables:l,recordStep:h}}(e,l?.id,t);return Array.isArray(d)||(r.variables=d.variables,l.recordStep=d.recordStep),r.recordDimension=l,r}function u(e){const t=e.readUint32();let r;if(t===n)return(0,s.notNetcdf)(e.readUint32()!==n,"wrong empty tag for list of attributes"),[];{(0,s.notNetcdf)(t!==l,"wrong tag for list of attributes");const n=e.readUint32();r=new Array(n);for(let t=0;t6,`non valid type ${o}`);const a=e.readUint32(),l=(0,i.readType)(e,o,a);(0,s.padding)(e),r[t]={name:n,type:(0,i.num2str)(o),value:l}}}return r}},"./node_modules/netcdfjs/lib-esm/index.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{NetCDFReader:()=>i.NetCDFReader});var i=r("./node_modules/netcdfjs/lib-esm/parser.js")},"./node_modules/netcdfjs/lib-esm/parser.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{NetCDFReader:()=>l});var i=r("./node_modules/iobuffer/lib-esm/IOBuffer.js"),s=r("./node_modules/netcdfjs/lib-esm/data.js"),n=r("./node_modules/netcdfjs/lib-esm/header.js"),o=r("./node_modules/netcdfjs/lib-esm/toString.js"),a=r("./node_modules/netcdfjs/lib-esm/utils.js");class l{constructor(e){this.toString=o.toString;const t=new i.IOBuffer(e);t.setBigEndian(),(0,a.notNetcdf)("CDF"!==t.readChars(3),"should start with CDF");const r=t.readByte();(0,a.notNetcdf)(r>2,"unknown version"),this.header=(0,n.header)(t,r),this.buffer=t}get version(){return 1===this.header.version?"classic format":"64-bit offset format"}get recordDimension(){return this.header.recordDimension}get dimensions(){return this.header.dimensions}get globalAttributes(){return this.header.globalAttributes}getAttribute(e){const t=this.globalAttributes.find((t=>t.name===e));return t?t.value:null}getDataVariableAsString(e){const t=this.getDataVariable(e);return t?t.join(""):null}get variables(){return this.header.variables}getDataVariable(e){let t;if(t="string"==typeof e?this.header.variables.find((t=>t.name===e)):e,void 0===t)throw new Error("Not a valid NetCDF v3.x file: variable not found");return this.buffer.seek(t.offset),t.record?(0,s.record)(this.buffer,t,this.header.recordDimension):(0,s.nonRecord)(this.buffer,t)}dataVariableExists(e){return void 0!==this.header.variables.find((t=>t.name===e))}attributeExists(e){return void 0!==this.globalAttributes.find((t=>t.name===e))}}},"./node_modules/netcdfjs/lib-esm/toString.js":(e,t,r)=>{"use strict";function i(){const e=[];e.push("DIMENSIONS");for(const t of this.dimensions)e.push(` ${t.name.padEnd(30)} = size: ${t.size}`);e.push(""),e.push("GLOBAL ATTRIBUTES");for(const t of this.globalAttributes)e.push(` ${t.name.padEnd(30)} = ${t.value}`);const t=JSON.parse(JSON.stringify(this.variables));e.push(""),e.push("VARIABLES:");for(const r of t){r.value=this.getDataVariable(r);let t=JSON.stringify(r.value);t.length>50&&(t=t.substring(0,50)),isNaN(r.value.length)||(t+=` (length: ${r.value.length})`),e.push(` ${r.name.padEnd(30)} = ${t}`)}return e.join("\n")}r.r(t),r.d(t,{toString:()=>i})},"./node_modules/netcdfjs/lib-esm/types.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{num2bytes:()=>n,num2str:()=>s,readType:()=>l,str2num:()=>o});const i={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6};function s(e){switch(Number(e)){case i.BYTE:return"byte";case i.CHAR:return"char";case i.SHORT:return"short";case i.INT:return"int";case i.FLOAT:return"float";case i.DOUBLE:return"double";default:return"undefined"}}function n(e){switch(Number(e)){case i.BYTE:case i.CHAR:return 1;case i.SHORT:return 2;case i.INT:case i.FLOAT:return 4;case i.DOUBLE:return 8;default:return-1}}function o(e){switch(String(e)){case"byte":return i.BYTE;case"char":return i.CHAR;case"short":return i.SHORT;case"int":return i.INT;case"float":return i.FLOAT;case"double":return i.DOUBLE;default:return-1}}function a(e,t){if(1!==e){const r=new Array(e);for(let i=0;i{"use strict";function i(e,t){if(e)throw new TypeError(`Not a valid NetCDF v3.x file: ${t}`)}function s(e){e.offset%4!=0&&e.skip(4-e.offset%4)}function n(e){const t=e.readUint32(),r=e.readChars(t);return s(e),r}r.r(t),r.d(t,{notNetcdf:()=>i,padding:()=>s,readName:()=>n})},"./src/WebGL/shaders/lib/basic/basic.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="uniform mat4 viewMatrix;\nuniform float opacity;\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\nvoid main() {\n gl_FragColor = vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}"},"./src/WebGL/shaders/lib/basic/basic.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\n\nattribute vec3 position;\nattribute vec3 color;\n\nvarying vec3 vColor;\n\nvoid main() {\n\n vColor = color;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix * mvPosition;\n\n}"},"./src/WebGL/shaders/lib/instanced/instanced.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="uniform mat4 viewMatrix;\nuniform float opacity;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLightFront;\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\n\n #ifndef WIREFRAME\n gl_FragColor.xyz *= vLightFront;\n #endif\n\n gl_FragColor = gl_FragColor * vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n}\n\n\n"},"./src/WebGL/shaders/lib/instanced/instanced.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 offset;\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute float radius;\n\nvarying vec3 vColor;\nvarying vec3 vLightFront;\n\nvoid main() {\n\n vColor = color;\n\n vec3 objectNormal = normal;\n vec3 transformedNormal = normalMatrix * objectNormal;\n vec4 mvPosition = modelViewMatrix * vec4( position * radius + offset, 1.0 );\n\n vLightFront = vec3( 0.0 );\n\n transformedNormal = normalize( transformedNormal );\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n\n vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\n\n gl_Position = projectionMatrix * mvPosition;\n}\n\n"},"./src/WebGL/shaders/lib/lambert/lambert.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="uniform mat4 viewMatrix;\nuniform float opacity;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLightFront;\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\n\n #ifndef WIREFRAME\n gl_FragColor.xyz *= vLightFront;\n #endif\n\n gl_FragColor = gl_FragColor * vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n}"},"./src/WebGL/shaders/lib/lambert/lambert.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec3 vColor;\nvarying vec3 vLightFront;\n\nvoid main() {\n\n vColor = color;\n\n vec3 objectNormal = normal;\n vec3 transformedNormal = normalMatrix * objectNormal;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\n vLightFront = vec3( 0.0 );\n\n transformedNormal = normalize( transformedNormal );\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n\n vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\n\n gl_Position = projectionMatrix * mvPosition;\n}"},"./src/WebGL/shaders/lib/lambertdouble/lambertdouble.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform mat4 viewMatrix;\nuniform float opacity;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLightFront;\nvarying vec3 vLightBack;\n\nvarying vec3 vColor;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n gl_FragColor = vec4( vec3 ( 1.0 ), opacity );\n\n #ifndef WIREFRAME\n if ( gl_FrontFacing )\n gl_FragColor.xyz *= vLightFront;\n else\n gl_FragColor.xyz *= vLightBack;\n #endif\n\n gl_FragColor = gl_FragColor * vec4( vColor, opacity );\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n}\n\n\n"},"./src/WebGL/shaders/lib/lambertdouble/lambertdouble.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec3 vColor;\nvarying vec3 vLightFront;\nvarying vec3 vLightBack;\n\nvoid main() {\n\n vColor = color;\n\n vec3 objectNormal = normal;\n vec3 transformedNormal = normalMatrix * objectNormal;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\n vLightFront = vec3( 0.0 );\n vLightBack = vec3( 0.0 );\n\n transformedNormal = normalize( transformedNormal );\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n vec3 directionalLightWeightingBack = vec3( max( -dotProduct, 0.0 ) );\n\n vLightFront += directionalLightColor[ 0 ] * directionalLightWeighting;\n vLightBack += directionalLightColor[ 0 ] * directionalLightWeightingBack;\n\n gl_Position = projectionMatrix * mvPosition;\n}\n\n"},"./src/WebGL/shaders/lib/outline/outline.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform float opacity;\nuniform vec3 outlineColor;\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n gl_FragColor = vec4( outlineColor, 1 );\n}\n\n\n"},"./src/WebGL/shaders/lib/outline/outline.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float outlineWidth;\nuniform float outlinePushback;\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvoid main() {\n\n vec4 norm = modelViewMatrix*vec4(normalize(normal),0.0);\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n mvPosition.xy += norm.xy*outlineWidth;\n gl_Position = projectionMatrix * mvPosition;\n mvPosition.z -= outlinePushback; //go backwards in model space\n vec4 pushpos = projectionMatrix*mvPosition; //project to get z in projection space, I'm probably missing some simple math to do the same thing..\n gl_Position.z = gl_Position.w*pushpos.z/pushpos.w;\n}\n\n"},"./src/WebGL/shaders/lib/screen/screen.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="uniform sampler2D colormap;\nvarying highp vec2 vTexCoords;\nuniform vec2 dimensions;\n//DEFINEFRAGCOLOR\nvoid main (void) {\n gl_FragColor = texture2D(colormap, vTexCoords);\n}\n "},"./src/WebGL/shaders/lib/screen/screen.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="attribute vec2 vertexPosition;\nvarying highp vec2 vTexCoords;\nconst vec2 scale = vec2(0.5, 0.5);\n\nvoid main() {\n vTexCoords = vertexPosition * scale + scale; // scale vertex attribute to [0,1] range\n gl_Position = vec4(vertexPosition, 0.0, 1.0);\n}\n "},"./src/WebGL/shaders/lib/screenaa/screenaa.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="uniform sampler2D colormap;\nvarying highp vec2 vTexCoords;\nuniform vec2 dimensions;\n\n// Basic FXAA implementation based on the code on geeks3d.com \n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#define FXAA_SPAN_MAX 8.0\n\nvec4 applyFXAA(vec2 fragCoord, sampler2D tex)\n{\n vec4 color;\n vec2 inverseVP = vec2(1.0 / dimensions.x, 1.0 / dimensions.y);\n vec3 rgbNW = texture2D(tex, fragCoord + vec2(-1.0, -1.0) * inverseVP).xyz;\n vec3 rgbNE = texture2D(tex, fragCoord + vec2(1.0, -1.0) * inverseVP).xyz;\n vec3 rgbSW = texture2D(tex, fragCoord + vec2(-1.0, 1.0) * inverseVP).xyz;\n vec3 rgbSE = texture2D(tex, fragCoord + vec2(1.0, 1.0) * inverseVP).xyz;\n vec3 rgbM = texture2D(tex, fragCoord * inverseVP).xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n\n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord + dir * -0.5).xyz +\n texture2D(tex, fragCoord + dir * 0.5).xyz);\n\n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, 1.0);\n else\n color = vec4(rgbB, 1.0);\n return color;\n}\n//DEFINEFRAGCOLOR\nvoid main (void) {\n gl_FragColor = applyFXAA(vTexCoords, colormap);\n}\n "},"./src/WebGL/shaders/lib/screenaa/screenaa.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="attribute vec2 vertexPosition;\nvarying highp vec2 vTexCoords;\nconst vec2 scale = vec2(0.5, 0.5);\n\nvoid main() {\n vTexCoords = vertexPosition * scale + scale; // scale vertex attribute to [0,1] range\n gl_Position = vec4(vertexPosition, 0.0, 1.0);\n}\n "},"./src/WebGL/shaders/lib/sphereimposter/sphereimposter.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\nuniform mat4 viewMatrix;\nuniform float opacity;\nuniform mat4 projectionMatrix;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\nuniform float uDepth;\nuniform vec3 directionalLightColor[ 1 ];\n\nvarying vec3 vColor;\nvarying vec2 mapping;\nvarying float rval;\nvarying vec3 vLight;\nvarying vec3 center;\n\n//DEFINEFRAGCOLOR\n\nvoid main() {\n float lensqr = dot(mapping,mapping);\n float rsqr = rval*rval;\n if(lensqr > rsqr)\n discard;\n float z = sqrt(rsqr-lensqr);\n vec3 cameraPos = center+ vec3(mapping.x,mapping.y,z);\n vec4 clipPos = projectionMatrix * vec4(cameraPos, 1.0);\n float ndcDepth = clipPos.z / clipPos.w;\n gl_FragDepthEXT = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n vec3 norm = normalize(vec3(mapping.x,mapping.y,z));\n float dotProduct = dot( norm, vLight );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n vec3 vLight = directionalLightColor[ 0 ] * directionalLightWeighting;\n gl_FragColor = vec4(vLight*vColor, opacity*opacity );\n float fogFactor = smoothstep( fogNear, fogFar, gl_FragDepthEXT/gl_FragCoord.w );\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n\n}\n\n"},"./src/WebGL/shaders/lib/sphereimposter/sphereimposter.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec2 mapping;\nvarying vec3 vColor;\nvarying float rval;\nvarying vec3 vLight;\nvarying vec3 center;\n\nvoid main() {\n\n vColor = color;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n center = mvPosition.xyz;\n vec4 projPosition = projectionMatrix * mvPosition;\n vec4 adjust = projectionMatrix* vec4(normal,0.0); adjust.z = 0.0; adjust.w = 0.0;\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vLight = normalize( lDirection.xyz );\n mapping = normal.xy;\n rval = abs(normal.x);\n gl_Position = projPosition+adjust;\n\n}\n"},"./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform float opacity;\nuniform vec3 outlineColor;\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\nuniform mat4 projectionMatrix;\nvarying vec2 mapping;\nvarying float rval;\nvarying vec3 center;\n\nuniform float outlinePushback;\n\n//DEFINEFRAGCOLOR\n\nvoid main() {\n float lensqr = dot(mapping,mapping);\n float rsqr = rval*rval;\n if(lensqr > rsqr)\n discard;\n float z = sqrt(rsqr-lensqr);\n vec3 cameraPos = center+ vec3(mapping.x,mapping.y,z-outlinePushback);\n vec4 clipPos = projectionMatrix * vec4(cameraPos, 1.0);\n float ndcDepth = clipPos.z / clipPos.w;\n gl_FragDepthEXT = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n gl_FragColor = vec4(outlineColor, 1 );\n}\n\n\n"},"./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float outlineWidth;\nuniform float outlinePushback;\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\n\nvarying vec2 mapping;\nvarying float rval;\nvarying vec3 center;\n\nvoid main() {\n\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n center = mvPosition.xyz;\n vec4 projPosition = projectionMatrix * mvPosition;\n vec2 norm = normal.xy + vec2(sign(normal.x)*outlineWidth,sign(normal.y)*outlineWidth);\n vec4 adjust = projectionMatrix* vec4(norm,normal.z,0.0); adjust.z = 0.0; adjust.w = 0.0;\n mapping = norm.xy;\n rval = abs(norm.x);\n gl_Position = projPosition+adjust;\n}\n\n"},"./src/WebGL/shaders/lib/sprite/sprite.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform vec3 color;\nuniform sampler2D map;\nuniform float opacity;\n\nuniform int fogType;\nuniform vec3 fogColor;\nuniform float fogDensity;\nuniform float fogNear;\nuniform float fogFar;\nuniform float alphaTest;\n\nvarying vec2 vUV;\n//DEFINEFRAGCOLOR\n\nvoid main() {\n\n vec4 texture = texture2D(map, vUV);\n\n if (texture.a < alphaTest) discard;\n\n gl_FragColor = vec4(color * texture.xyz, texture.a * opacity);\n\n if (fogType > 0) {\n\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n float fogFactor = 0.0;\n\n if (fogType == 1) {\n fogFactor = smoothstep(fogNear, fogFar, depth);\n }\n\n else {\n const float LOG2 = 1.442695;\n float fogFactor = exp2(- fogDensity * fogDensity * depth * depth * LOG2);\n fogFactor = 1.0 - clamp(fogFactor, 0.0, 1.0);\n }\n\n gl_FragColor = mix(gl_FragColor, vec4(fogColor, gl_FragColor.w), fogFactor);\n\n }\n}\n\n"},"./src/WebGL/shaders/lib/sprite/sprite.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform int useScreenCoordinates;\nuniform vec3 screenPosition;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float rotation;\nuniform vec2 scale;\nuniform vec2 alignment;\nuniform vec2 uvOffset;\nuniform vec2 uvScale;\n\nattribute vec2 position;\nattribute vec2 uv;\n\nvarying vec2 vUV;\n\nvoid main() {\n\n vUV = uvOffset + uv * uvScale;\n\n vec2 alignedPosition = position + alignment;\n\n vec2 rotatedPosition;\n rotatedPosition.x = ( cos(rotation) * alignedPosition.x - sin(rotation) * alignedPosition.y ) * scale.x;\n rotatedPosition.y = ( sin(rotation) * alignedPosition.x + cos(rotation) * alignedPosition.y ) * scale.y;\n\n vec4 finalPosition;\n\n if(useScreenCoordinates != 0) {\n finalPosition = vec4(screenPosition.xy + rotatedPosition, screenPosition.z, 1.0);\n }\n\n else {\n finalPosition = projectionMatrix * modelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0); finalPosition /= finalPosition.w;\n finalPosition.xy += rotatedPosition; \n }\n\n gl_Position = finalPosition;\n\n}\n\n"},"./src/WebGL/shaders/lib/stickimposter/stickimposter.partial.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i=" float dotProduct = dot( norm, vLight );\n vec3 light = vec3( max( dotProduct, 0.0 ) );\n gl_FragColor = vec4(light*color, opacity*opacity );\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}"},"./src/WebGL/shaders/lib/stickimposter/stickimposter.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute float radius;\n\nvarying vec3 vColor;\nvarying vec3 vLight;\nvarying vec3 cposition;\nvarying vec3 p1;\nvarying vec3 p2;\nvarying float r;\n\nvoid main() {\n\n vColor = color; vColor.z = abs(vColor.z); //z indicates which vertex and so would vary\n r = abs(radius);\n vec4 to = modelViewMatrix*vec4(normal, 1.0); //normal is other point of cylinder\n vec4 pt = modelViewMatrix*vec4(position, 1.0);\n vec4 mvPosition = pt;\n p1 = pt.xyz; p2 = to.xyz;\n vec3 norm = to.xyz-pt.xyz;\n float mult = 1.1; //slop to account for perspective of sphere\n if(length(p1) > length(p2)) { //billboard at level of closest point\n mvPosition = to;\n }\n vec3 n = normalize(mvPosition.xyz);\n//intersect with the plane defined by the camera looking at the billboard point\n if(color.z >= 0.0) { //p1\n if(projectionMatrix[3][3] == 0.0) { //perspective\n vec3 pnorm = normalize(p1);\n float t = dot(mvPosition.xyz-p1,n)/dot(pnorm,n);\n mvPosition.xyz = p1+t*pnorm; \n } else { //orthographic\n mvPosition.xyz = p1;\n }\n } else {\n if(projectionMatrix[3][3] == 0.0) { //perspective\n vec3 pnorm = normalize(p2);\n float t = dot(mvPosition.xyz-p2,n)/dot(pnorm,n);\n mvPosition.xyz = p2+t*pnorm;\n } else { //orthographic\n mvPosition.xyz = p2;\n } \n mult *= -1.0;\n }\n vec3 cr = normalize(cross(mvPosition.xyz,norm))*radius;\n vec3 doublecr = normalize(cross(mvPosition.xyz,cr))*radius;\n mvPosition.xyz += mult*(cr + doublecr).xyz;\n cposition = mvPosition.xyz;\n gl_Position = projectionMatrix * mvPosition;\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ 0 ], 0.0 );\n vLight = normalize( lDirection.xyz )*directionalLightColor[0]; //not really sure this is right, but color is always white so..\n}\n\n"},"./src/WebGL/shaders/lib/stickimposteroutline/stickimposteroutline.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 directionalLightColor[ 1 ];\nuniform vec3 directionalLightDirection[ 1 ];\nuniform vec3 outlineColor;\nuniform float outlineWidth;\nuniform float outlinePushback;\n\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute float radius;\n\nvarying vec3 vColor;\nvarying vec3 vLight;\nvarying vec3 cposition;\nvarying vec3 p1;\nvarying vec3 p2;\nvarying float r;\n\nvoid main() {\n\n vColor = outlineColor;\n float rad = radius+sign(radius)*outlineWidth;\n r = abs(rad);\n vec4 to = modelViewMatrix*vec4(normal, 1.0); //normal is other point of cylinder\n vec4 pt = modelViewMatrix*vec4(position, 1.0);\n//pushback\n to.xyz += normalize(to.xyz)*outlinePushback;\n pt.xyz += normalize(pt.xyz)*outlinePushback;\n\n vec4 mvPosition = pt;\n p1 = pt.xyz; p2 = to.xyz;\n vec3 norm = to.xyz-pt.xyz;\n float mult = 1.1; //slop to account for perspective of sphere\n if(length(p1) > length(p2)) { //billboard at level of closest point\n mvPosition = to;\n }\n vec3 n = normalize(mvPosition.xyz);\n//intersect with the plane defined by the camera looking at the billboard point\n if(color.z >= 0.0) { //p1\n vec3 pnorm = normalize(p1);\n float t = dot(mvPosition.xyz-p1,n)/dot(pnorm,n);\n mvPosition.xyz = p1+t*pnorm;\n } else {\n vec3 pnorm = normalize(p2);\n float t = dot(mvPosition.xyz-p2,n)/dot(pnorm,n);\n mvPosition.xyz = p2+t*pnorm;\n mult *= -1.0;\n }\n vec3 cr = normalize(cross(mvPosition.xyz,norm))*rad;\n vec3 doublecr = normalize(cross(mvPosition.xyz,cr))*rad;\n mvPosition.xy += mult*(cr + doublecr).xy;\n cposition = mvPosition.xyz;\n gl_Position = projectionMatrix * mvPosition;\n vLight = vec3(1.0,1.0,1.0);\n}\n\n"},"./src/WebGL/shaders/lib/volumetric/volumetric.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="\nuniform highp sampler3D data;\nuniform highp sampler2D colormap;\nuniform highp sampler2D depthmap;\n\n\nuniform mat4 textmat;\nuniform mat4 projinv;\nuniform mat4 projectionMatrix;\n\nuniform float step;\nuniform float subsamples;\nuniform float maxdepth;\nuniform float transfermin;\nuniform float transfermax;\nin vec4 mvPosition;\nout vec4 color;\nvoid main(void) {\n\n vec4 pos = mvPosition;\n bool seengood = false;\n float i = 0.0;\n color = vec4(1,1,1,0);\n float increment = 1.0/subsamples;\n float maxsteps = (maxdepth*subsamples/step);\n//there's probably a better way to do this..\n//calculate farthest possible point in model coordinates\n vec4 maxpos = vec4(pos.x,pos.y,pos.z-maxdepth,1.0);\n// convert to projection\n maxpos = projectionMatrix*maxpos;\n vec4 startp = projectionMatrix*pos;\n// homogonize\n maxpos /= maxpos.w;\n startp /= startp.w;\n//take x,y from start and z from max\n maxpos = vec4(startp.x,startp.y,maxpos.z,1.0);\n//convert back to model space\n maxpos = projinv*maxpos;\n maxpos /= maxpos.w;\n float incr = step/subsamples;\n//get depth from depthmap\n//startp is apparently [-1,1]\n vec2 tpos = startp.xy/2.0+0.5;\n float depth = texture(depthmap, tpos).r;\n//compute vector between start and end\n vec4 direction = maxpos-pos;\n for( i = 0.0; i <= maxsteps; i++) {\n vec4 pt = (pos+(i/maxsteps)*direction);\n vec4 ppt = projectionMatrix*pt;\n float ptdepth = ppt.z/ppt.w;\n ptdepth = ((gl_DepthRange.diff * ptdepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n if(ptdepth > depth) break;\n pt = textmat*pt;\n// pt /= pt.w;\n if(pt.x >= -0.01 && pt.y >= -0.01 && pt.z >= -0.01 && pt.x <= 1.01 && pt.y <= 1.01 && pt.z <= 1.01) {\n seengood = true;\n } else if(seengood) {\n break;\n }\n if( pt.x < -0.01 || pt.x > 1.01 || pt.y < -0.01 || pt.y > 1.01 || pt.z < -0.01 || pt.z > 1.01 ){\n color.a = 0.0;\n continue;\n }\n else {\n float val = texture(data, pt.zyx).r;\n if(isinf(val)) continue; //masked out\n float cval = (val-transfermin)/(transfermax-transfermin); //scale to texture 0-1 range\n vec4 val_color = texture(colormap, vec2(cval,0.5));\n color.rgb = color.rgb*color.a + (1.0-color.a)*val_color.a*val_color.rgb;\n color.a += (1.0 - color.a) * val_color.a; \n if(color.a > 0.0) color.rgb /= color.a;\n// color = vec4(pt.x, pt.y, pt.z, 1.0);\n }\n// color = vec4(pt.x, pt.y, pt.z, 0.0)\n }\n}\n\n "},"./src/WebGL/shaders/lib/volumetric/volumetric.vert":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\n\nin vec3 position;\nout vec4 mvPosition;\nvoid main() {\n\n mvPosition = modelViewMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix*mvPosition;\n}\n"},"./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const i="uniform float opacity;\nuniform mat4 projectionMatrix;\n\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n\nvarying vec3 vLight;\nvarying vec3 vColor;\nvarying vec3 cposition;\nvarying vec3 p1;\nvarying vec3 p2;\nvarying float r;\n\n//DEFINEFRAGCOLOR\n\n//cylinder-ray intersection testing taken from http://mrl.nyu.edu/~dzorin/cg05/lecture12.pdf\n//also useful: http://stackoverflow.com/questions/9595300/cylinder-impostor-in-glsl\n//with a bit more care (caps) this could be a general cylinder imposter (see also outline)\nvoid main() {\n vec3 color = abs(vColor);\n vec3 pos = cposition;\n vec3 p = pos; //ray point\n vec3 v = vec3(0.0,0.0,-1.0); //ray normal - orthographic\n if(projectionMatrix[3][3] == 0.0) v = normalize(pos); //ray normal - perspective\n vec3 pa = p1; //cyl start\n vec3 va = normalize(p2-p1); //cyl norm\n vec3 tmp1 = v-(dot(v,va)*va);\n vec3 deltap = p-pa;\n float A = dot(tmp1,tmp1);\n if(A == 0.0) discard;\n vec3 tmp2 = deltap-(dot(deltap,va)*va);\n float B = 2.0*dot(tmp1, tmp2);\n float C = dot(tmp2,tmp2)-r*r;\n//quadratic equation!\n float det = (B*B) - (4.0*A*C);\n if(det < 0.0) discard;\n float sqrtDet = sqrt(det);\n float posT = (-B+sqrtDet)/(2.0*A);\n float negT = (-B-sqrtDet)/(2.0*A);\n float intersectionT = min(posT,negT);\n vec3 qi = p+v*intersectionT;\n float dotp1 = dot(va,qi-p1);\n float dotp2 = dot(va,qi-p2);\n vec3 norm;\n if( dotp1 < 0.0 || dotp2 > 0.0) { //(p-c)^2 + 2(p-c)vt +v^2+t^2 - r^2 = 0\n vec3 cp;\n if( dotp1 < 0.0) { \n// if(vColor.x < 0.0 ) discard; //color sign bit indicates if we should cap or not\n cp = p1;\n } else {\n// if(vColor.y < 0.0 ) discard;\n cp = p2;\n }\n vec3 diff = p-cp;\n A = dot(v,v);\n B = dot(diff,v)*2.0;\n C = dot(diff,diff)-r*r;\n det = (B*B) - (4.0*C);\n if(det < 0.0) discard;\n sqrtDet = sqrt(det);\n posT = (-B+sqrtDet)/(2.0);\n negT = (-B-sqrtDet)/(2.0);\n float t = min(posT,negT);\n qi = p+v*t; \n norm = normalize(qi-cp); \n } else {\n norm = normalize(qi-(dotp1*va + p1));\n }\n vec4 clipPos = projectionMatrix * vec4(qi, 1.0);\n float ndcDepth = clipPos.z / clipPos.w;\n float depth = ((gl_DepthRange.diff * ndcDepth) + gl_DepthRange.near + gl_DepthRange.far) / 2.0;\n gl_FragDepthEXT = depth;"},"./src/GLDraw.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{CAP:()=>i,GLDraw:()=>s});var i,s,n=r("./src/WebGL/math/index.ts");!function(e){e[e.NONE=0]="NONE",e[e.FLAT=1]="FLAT",e[e.ROUND=2]="ROUND"}(i||(i={})),function(e){function t(e,t,r){var i,s,n,o,a,l=Math.hypot(e,t);l<1e-4?(s=0,n=1):(s=-e/l,n=t/l),t=-s*e+n*t,(i=Math.hypot(t,r))<1e-4?(o=0,a=1):(o=r/i,a=t/i);var h=new Float32Array(9);return h[0]=n,h[1]=s,h[2]=0,h[3]=-s*a,h[4]=n*a,h[5]=o,h[6]=s*o,h[7]=-n*o,h[8]=a,h}var r=new class{constructor(){this.cache={};let e,t=[],r=Math.pow(2,4),i=2,s=Math.pow(2,i),o=r/s;for(t[0]=new n.Vector3(-1,0,0),t[o]=new n.Vector3(0,0,1),t[2*o]=new n.Vector3(1,0,0),t[3*o]=new n.Vector3(0,0,-1),i=3;i<=4;i++){for(s=Math.pow(2,i-1),o=r/s,e=0;e{"use strict";r.r(t),r.d(t,{GLModel:()=>g});var i=r("./src/WebGL/index.ts"),s=r("./src/WebGL/shapes/index.ts"),n=r("./src/WebGL/math/index.ts"),o=r("./src/colors.ts"),a=r("./src/GLDraw.ts"),l=r("./src/glcartoon.ts"),h=r("./src/utilities.ts"),c=r("./src/Gradient.ts"),u=r("./src/parsers/index.ts"),d=r("./node_modules/netcdfjs/lib-esm/index.js"),p=r("./node_modules/pako/dist/pako.esm.mjs"),f=r("./src/parsers/utils/assignBonds.ts");function m(e){let t;return t="string"==typeof e?(new TextEncoder).encode(e):new Uint8Array(e),(0,p.inflate)(t,{to:"string"})}class g{static sameObj(e,t){return e&&t?JSON.stringify(e)==JSON.stringify(t):e==t}constructor(e,t){this.atoms=[],this.frames=[],this.box=null,this.atomdfs=null,this.id=0,this.hidden=!1,this.molObj=null,this.renderedMolObj=null,this.lastColors=null,this.modelData={},this.modelDatas=null,this.idMatrix=new n.Matrix4,this.dontDuplicateAtoms=!0,this.defaultColor=o.elementColors.defaultColor,this.defaultStickRadius=.25,this.options=t||{},this.ElementColors=this.options.defaultcolors?this.options.defaultcolors:o.elementColors.defaultColors,this.defaultSphereRadius=this.options.defaultSphereRadius?this.options.defaultSphereRadius:1.5,this.defaultCartoonQuality=this.options.cartoonQuality?this.options.cartoonQuality:10,this.id=e}getRadiusFromStyle(e,t){var r=this.defaultSphereRadius;if(void 0!==t.radius)r=t.radius;else if(g.vdwRadii[e.elem])r=g.vdwRadii[e.elem];else if(e.elem.length>1){let t=e.elem;t=t[0].toUpperCase()+t[1].toLowerCase(),g.vdwRadii[t]&&(r=g.vdwRadii[t])}return void 0!==t.scale&&(r*=t.scale),r}drawAtomCross(e,t){if(e.style.cross){var r=e.style.cross;if(!r.hidden){var s=r.linewidth||g.defaultlineWidth;t[s]||(t[s]=new i.Geometry);var o=t[s].updateGeoGroup(6),a=this.getRadiusFromStyle(e,r),l=[[a,0,0],[-a,0,0],[0,a,0],[0,-a,0],[0,0,a],[0,0,-a]],c=e.clickable||e.hoverable;c&&void 0===e.intersectionShape&&(e.intersectionShape={sphere:[],cylinder:[],line:[]});for(var u=(0,h.getColorFromStyle)(e,r),d=o.vertexArray,p=o.colorArray,f=0;f<6;f++){var m=3*o.vertices;if(o.vertices++,d[m]=e.x+l[f][0],d[m+1]=e.y+l[f][1],d[m+2]=e.z+l[f][2],p[m]=u.r,p[m+1]=u.g,p[m+2]=u.b,c){var v=new n.Vector3(l[f][0],l[f][1],l[f][2]);v.multiplyScalar(.1),v.set(v.x+e.x,v.y+e.y,v.z+e.z),e.intersectionShape.line.push(v)}}}}}getGoodCross(e,t,r,i){for(var s=null,o=-1,a=0,l=e.bonds.length;ao&&(s=u,(o=h)>.1))return s}return s}getSideBondV(e,t,r){var i,s,o,a,l=new n.Vector3(e.x,e.y,e.z),h=new n.Vector3(t.x,t.y,t.z).clone(),c=null;if(h.sub(l),1===e.bonds.length)1===t.bonds.length?(c=h.clone(),Math.abs(c.x)>1e-4?c.y+=1:c.x+=1):(i=(r+1)%t.bonds.length,s=t.bonds[i],(o=this.atoms[s]).index==e.index&&(i=(i+1)%t.bonds.length,s=t.bonds[i],o=this.atoms[s]),(a=new n.Vector3(o.x,o.y,o.z).clone()).sub(l),(c=a.clone()).cross(h));else if((c=this.getGoodCross(e,t,l,h)).lengthSq()<.01){var u=this.getGoodCross(t,e,l,h);null!=u&&(c=u)}return c.lengthSq()<.01&&(c=h.clone(),Math.abs(c.x)>1e-4?c.y+=1:c.x+=1),c.cross(h),c.normalize(),c}addLine(e,t,r,i,s,n){e[r]=i.x,e[r+1]=i.y,e[r+2]=i.z,t[r]=n.r,t[r+1]=n.g,t[r+2]=n.b,e[r+3]=s.x,e[r+4]=s.y,e[r+5]=s.z,t[r+3]=n.r,t[r+4]=n.g,t[r+5]=n.b}drawBondLines(e,t,r){if(e.style.line){var s=e.style.line;if(!s.hidden){var a,l,c,u,d=s.linewidth||g.defaultlineWidth;r[d]||(r[d]=new i.Geometry);for(var p=r[d].updateGeoGroup(6*e.bonds.length),f=p.vertexArray,m=p.colorArray,v=0;v=b.index)){var y=new n.Vector3(e.x,e.y,e.z),_=new n.Vector3(b.x,b.y,b.z),w=y.clone().add(_).multiplyScalar(.5),x=!1,S=e.clickable||e.hoverable,A=b.clickable||b.hoverable;(S||A)&&(S&&(void 0===e.intersectionShape&&(e.intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]}),e.intersectionShape.line.push(y),e.intersectionShape.line.push(w)),A&&(void 0===b.intersectionShape&&(b.intersectionShape={sphere:[],cylinder:[],line:[],triangle:[]}),b.intersectionShape.line.push(w),b.intersectionShape.line.push(_)));var C=(0,h.getColorFromStyle)(e,e.style.line),M=(0,h.getColorFromStyle)(b,b.style.line);if(e.bondStyles&&e.bondStyles[v]){var L=e.bondStyles[v];if(!L.iswire)continue;L.singleBond&&(x=!0),void 0!==L.color1&&(C=o.CC.color(L.color1)),void 0!==L.color2&&(M=o.CC.color(L.color2))}var E,z,k=3*p.vertices;if(e.bondOrder[v]>1&&e.bondOrder[v]<4&&!x){var O=this.getSideBondV(e,b,v),T=_.clone();T.sub(y),2==e.bondOrder[v]?(O.multiplyScalar(.1),(a=y.clone()).add(O),(l=y.clone()).sub(O),(c=a.clone()).add(T),(u=l.clone()).add(T),C==M?(p.vertices+=4,this.addLine(f,m,k,a,c,C),this.addLine(f,m,k+6,l,u,C)):(p.vertices+=8,T.multiplyScalar(.5),(E=a.clone()).add(T),(z=l.clone()).add(T),this.addLine(f,m,k,a,E,C),this.addLine(f,m,k+6,E,c,M),this.addLine(f,m,k+12,l,z,C),this.addLine(f,m,k+18,z,u,M))):3==e.bondOrder[v]&&(O.multiplyScalar(.1),(a=y.clone()).add(O),(l=y.clone()).sub(O),(c=a.clone()).add(T),(u=l.clone()).add(T),C==M?(p.vertices+=6,this.addLine(f,m,k,y,_,C),this.addLine(f,m,k+6,a,c,C),this.addLine(f,m,k+12,l,u,C)):(p.vertices+=12,T.multiplyScalar(.5),(E=a.clone()).add(T),(z=l.clone()).add(T),this.addLine(f,m,k,y,w,C),this.addLine(f,m,k+6,w,_,M),this.addLine(f,m,k+12,a,E,C),this.addLine(f,m,k+18,E,c,M),this.addLine(f,m,k+24,l,z,C),this.addLine(f,m,k+30,z,u,M)))}else C==M?(p.vertices+=2,this.addLine(f,m,k,y,_,C)):(p.vertices+=4,this.addLine(f,m,k,y,w,C),this.addLine(f,m,k+6,w,_,M))}}}}}drawAtomSphere(e,t){if(e.style.sphere){var r=e.style.sphere;if(!r.hidden){var i=(0,h.getColorFromStyle)(e,r),o=this.getRadiusFromStyle(e,r);if((!0===e.clickable||e.hoverable)&&void 0!==e.intersectionShape){var l=new n.Vector3(e.x,e.y,e.z);e.intersectionShape.sphere.push(new s.Sphere(l,o))}a.GLDraw.drawSphere(t,e,o,i)}}}drawAtomClickSphere(e){if(e.style.clicksphere){var t=e.style.clicksphere;if(!t.hidden){var r=this.getRadiusFromStyle(e,t);if((!0===e.clickable||e.hoverable)&&void 0!==e.intersectionShape){var i=new n.Vector3(e.x,e.y,e.z);e.intersectionShape.sphere.push(new s.Sphere(i,r))}}}}drawAtomInstanced(e,t){if(e.style.sphere){var r=e.style.sphere;if(!r.hidden){var i=this.getRadiusFromStyle(e,r),o=(0,h.getColorFromStyle)(e,r),a=t.updateGeoGroup(1),l=a.vertices,c=3*l,u=a.vertexArray,d=a.colorArray,p=a.radiusArray;if(u[c]=e.x,u[c+1]=e.y,u[c+2]=e.z,d[c]=o.r,d[c+1]=o.g,d[c+2]=o.b,p[l]=i,(!0===e.clickable||e.hoverable)&&void 0!==e.intersectionShape){var f=new n.Vector3(e.x,e.y,e.z);e.intersectionShape.sphere.push(new s.Sphere(f,i))}a.vertices+=1}}}drawSphereImposter(e,t,r,i){var s,n=e.updateGeoGroup(4),o=n.vertices,a=3*o,l=n.vertexArray,h=n.colorArray;for(s=0;s<4;s++)l[a+3*s]=t.x,l[a+3*s+1]=t.y,l[a+3*s+2]=t.z;var c=n.normalArray;for(s=0;s<4;s++)h[a+3*s]=i.r,h[a+3*s+1]=i.g,h[a+3*s+2]=i.b;c[a+0]=-r,c[a+1]=r,c[a+2]=0,c[a+3]=-r,c[a+4]=-r,c[a+5]=0,c[a+6]=r,c[a+7]=-r,c[a+8]=0,c[a+9]=r,c[a+10]=r,c[a+11]=0,n.vertices+=4;var u=n.faceArray,d=n.faceidx;u[d+0]=o,u[d+1]=o+1,u[d+2]=o+2,u[d+3]=o+2,u[d+4]=o+3,u[d+5]=o,n.faceidx+=6}drawAtomImposter(e,t){if(e.style.sphere){var r=e.style.sphere;if(!r.hidden){var i=this.getRadiusFromStyle(e,r),o=(0,h.getColorFromStyle)(e,r);if((!0===e.clickable||e.hoverable)&&void 0!==e.intersectionShape){var a=new n.Vector3(e.x,e.y,e.z);e.intersectionShape.sphere.push(new s.Sphere(a,i))}this.drawSphereImposter(t,e,i,o)}}}calculateDashes(e,t,r,i,s){var o=Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)+Math.pow(e.z-t.z,2));r=Math.max(r,0),s=Math.max(s,0)+2*r,(i=Math.max(i,.001))+s>o&&(i=o,s=0);var a,l=Math.floor((o-i)/(i+s))+1;s=(o-l*i)/l;for(var h=new n.Vector3(e.x,e.y,e.z),c=new n.Vector3((t.x-e.x)/(o/s),(t.y-e.y)/(o/s),(t.z-e.z)/(o/s)),u=new n.Vector3((t.x-e.x)/(o/i),(t.y-e.y)/(o/i),(t.z-e.z)/(o/i)),d=[],p=0;p{var t=r.imposter?g.drawStickImposter:a.GLDraw.drawCylinder;return!I&&e>=1?t:(e,r,i,s,n,o=0,a=0,l=.1,h=.25)=>{this.calculateDashes(r,i,s,l,h).forEach((r=>{t(e,r.from,r.to,s,n,o,a)}))}};for(p=0;p3){if(e.bondOrder[p]<1&&(O*=e.bondOrder[p]),!j.capDrawn&&j.bonds.length<4&&(D=2),R!=N?(S=(new n.Vector3).addVectors(U,V).multiplyScalar(.5),G(r,U,S,O,R,F,0,z,k),G(r,S,V,O,N,0,D,z,k)):G(r,U,V,O,R,F,D,z,k),u=e.clickable||e.hoverable,d=j.clickable||j.hoverable,u||d){if(S||(S=(new n.Vector3).addVectors(U,V).multiplyScalar(.5)),u){var W=new s.Cylinder(U,S,O),H=new s.Sphere(U,O);e.intersectionShape.cylinder.push(W),e.intersectionShape.sphere.push(H)}if(d){var q=new s.Cylinder(V,S,O),Y=new s.Sphere(V,O);j.intersectionShape.cylinder.push(q),j.intersectionShape.sphere.push(Y)}}}else if(e.bondOrder[p]>1){var Z=0,X=0;O!=M&&(Z=2,X=2);var $,K,J,Q,ee,te=V.clone(),re=null;te.sub(U),re=this.getSideBondV(e,j,p),2==e.bondOrder[p]?($=O*L,re.multiplyScalar(1.5*$),(K=U.clone()).add(re),(J=U.clone()).sub(re),(Q=K.clone()).add(te),(ee=J.clone()).add(te),R!=N?(S=(new n.Vector3).addVectors(K,Q).multiplyScalar(.5),A=(new n.Vector3).addVectors(J,ee).multiplyScalar(.5),G(r,K,S,$,R,Z,0),G(r,S,Q,$,N,0,X),G(r,J,A,$,R,Z,0),G(r,A,ee,$,N,0,X)):(G(r,K,Q,$,R,Z,X),G(r,J,ee,$,R,Z,X)),u=e.clickable||e.hoverable,d=j.clickable||j.hoverable,(u||d)&&(S||(S=(new n.Vector3).addVectors(K,Q).multiplyScalar(.5)),A||(A=(new n.Vector3).addVectors(J,ee).multiplyScalar(.5)),u&&(v=new s.Cylinder(K,S,$),b=new s.Cylinder(J,A,$),e.intersectionShape.cylinder.push(v),e.intersectionShape.cylinder.push(b)),d&&(_=new s.Cylinder(Q,S,$),w=new s.Cylinder(ee,A,$),j.intersectionShape.cylinder.push(_),j.intersectionShape.cylinder.push(w)))):3==e.bondOrder[p]&&($=O*E,re.cross(te),re.normalize(),re.multiplyScalar(3*$),(K=U.clone()).add(re),(J=U.clone()).sub(re),(Q=K.clone()).add(te),(ee=J.clone()).add(te),R!=N?(S=(new n.Vector3).addVectors(K,Q).multiplyScalar(.5),A=(new n.Vector3).addVectors(J,ee).multiplyScalar(.5),C=(new n.Vector3).addVectors(U,V).multiplyScalar(.5),G(r,K,S,$,R,Z,0),G(r,S,Q,$,N,0,X),G(r,U,C,$,R,F,0),G(r,C,V,$,N,0,D),G(r,J,A,$,R,Z,0),G(r,A,ee,$,N,0,X)):(G(r,K,Q,$,R,Z,X),G(r,U,V,$,R,F,D),G(r,J,ee,$,R,Z,X)),u=e.clickable||e.hoverable,d=j.clickable||j.hoverable,(u||d)&&(S||(S=(new n.Vector3).addVectors(K,Q).multiplyScalar(.5)),A||(A=(new n.Vector3).addVectors(J,ee).multiplyScalar(.5)),C||(C=(new n.Vector3).addVectors(U,V).multiplyScalar(.5)),u&&(v=new s.Cylinder(K.clone(),S.clone(),$),b=new s.Cylinder(J.clone(),A.clone(),$),y=new s.Cylinder(U.clone(),C.clone(),$),e.intersectionShape.cylinder.push(v),e.intersectionShape.cylinder.push(b),e.intersectionShape.cylinder.push(y)),d&&(_=new s.Cylinder(Q.clone(),S.clone(),$),w=new s.Cylinder(ee.clone(),A.clone(),$),x=new s.Cylinder(V.clone(),C.clone(),$),j.intersectionShape.cylinder.push(_),j.intersectionShape.cylinder.push(w),j.intersectionShape.cylinder.push(x))))}}}var ie=!1,se=0,ne=!1;for(p=0;p0&&(ie=!0):0==se&&(e.bonds.length>0||c.showNonBonded)&&(ie=!0),ie&&(O=M,r.imposter?this.drawSphereImposter(r.sphereGeometry,e,O,R):a.GLDraw.drawSphere(r,e,O,R))}}}createMolObj(e,t){t=t||{};var r,s,n,h,c=new i.Object3D,u=[],d={},p={},f=this.drawAtomSphere,m=null,g=null;t.supportsImposters?(f=this.drawAtomImposter,(m=new i.Geometry(!0)).imposter=!0,(g=new i.Geometry(!0,!0)).imposter=!0,g.sphereGeometry=new i.Geometry(!0),g.sphereGeometry.imposter=!0,g.drawnCaps={}):t.supportsAIA?(f=this.drawAtomInstanced,(m=new i.Geometry(!1,!0,!0)).instanced=!0,g=new i.Geometry(!0)):(m=new i.Geometry(!0),g=new i.Geometry(!0));var v,b={},y=[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(r=0,n=e.length;ry[1]&&(y[1]=_.resi)),u.push(_))}}if(u.length>0&&(0,l.drawCartoon)(c,u,y,this.defaultCartoonQuality),m&&m.vertices>0){m.initTypedArrays();var w=null,x=null;m.imposter?w=new i.SphereImposterMaterial({ambient:0,vertexColors:!0,reflectivity:0}):m.instanced?(x=new i.Geometry(!0),a.GLDraw.drawSphere(x,{x:0,y:0,z:0},1,new o.Color(.5,.5,.5)),x.initTypedArrays(),w=new i.InstancedMaterial({sphereMaterial:new i.MeshLambertMaterial({ambient:0,vertexColors:!0,reflectivity:0}),sphere:x})):w=new i.MeshLambertMaterial({ambient:0,vertexColors:!0,reflectivity:0}),b.sphere<1&&b.sphere>=0&&(w.transparent=!0,w.opacity=b.sphere),x=new i.Mesh(m,w),c.add(x)}if(g.vertices>0){var S=null,A=null,C=g.sphereGeometry;C&&void 0!==C.vertices&&0!=C.vertices||(C=null),g.initTypedArrays(),C&&C.initTypedArrays();var M={ambient:0,vertexColors:!0,reflectivity:0};g.imposter?(S=new i.StickImposterMaterial(M),A=new i.SphereImposterMaterial(M)):(S=new i.MeshLambertMaterial(M),A=new i.MeshLambertMaterial(M),S.wireframe&&(g.setUpWireframe(),C&&C.setUpWireframe())),b.stick<1&&b.stick>=0&&(S.transparent=!0,S.opacity=b.stick,A.transparent=!0,A.opacity=b.stick);var L=new i.Mesh(g,S);if(c.add(L),C){var E=new i.Mesh(C,A);c.add(E)}}for(r in d)if(d.hasOwnProperty(r)){v=r;var z=new i.LineBasicMaterial({linewidth:v,vertexColors:!0});b.line<1&&b.line>=0&&(z.transparent=!0,z.opacity=b.line),d[r].initTypedArrays();var k=new i.Line(d[r],z,i.LineStyle.LinePieces);c.add(k)}for(r in p)if(p.hasOwnProperty(r)){v=r;var O=new i.LineBasicMaterial({linewidth:v,vertexColors:!0});b.cross<1&&b.cross>=0&&(O.transparent=!0,O.opacity=b.cross),p[r].initTypedArrays();var T=new i.Line(p[r],O,i.LineStyle.LinePieces);c.add(T)}if(this.dontDuplicateAtoms&&this.modelData.symmetries&&this.modelData.symmetries.length>0){var I,F=new i.Object3D;for(I=0;Ir?t-i:t}adjustCoordinatesToBox(){if(this.box&&this.atomdfs)for(var e=this.box[0],t=this.box[1],r=this.box[2],i=.9*e,s=.9*t,n=.9*r,o=0;o=r)&&(e=r-1),null!=i.frames.url){var o=i.frames.url;(0,h.getbin)(o+"/traj/frame/"+e+"/"+i.frames.path,void 0,"POST",void 0).then((function(e){for(var t=new Float32Array(e,44),r=0,n=0;n=i&&e<=s)return!0}}return!1}static deepCopyAndCache(e,t){if("object"!=typeof e||null==e)return e;if(e.__cache_created)return e;const r={};for(const i in e){const s=e[i];if(Array.isArray(s)){r[i]=[];for(let e=0;e=i[0][0]&&o<=i[1][0]&&a>=i[0][1]&&a<=i[1][1]&&l>=i[0][2]&&l<=i[1][2]&&(o>=r[0][0]&&o<=r[1][0]&&a>=r[0][1]&&a<=r[1][1]&&l>=r[0][2]&&l<=r[1][2]||n.push(this.atoms[e]))}return n}static getFloat(e){return"number"==typeof e?e:parseFloat(e)}selectedAtoms(e,t){var r=[];e=g.deepCopyAndCache(e||{},this),t||(t=this.atoms);for(var i=t.length,s=0;s0&&r.push(i[e])}}if(e.hasOwnProperty("within")&&e.within.hasOwnProperty("sel")&&e.within.hasOwnProperty("distance")){var a=this.selectedAtoms(e.within.sel,this.atoms),l={};const t=g.getFloat(e.within.distance),i=t*t;for(let e=0;e0&&(l[t]=1)}var h=[];if(e.within.invert)for(let e=0;e0;)if(t=d.pop(),p=t.chain,f=t.resi,void 0===u[t.index]){u[t.index]=!0;for(var m=0;m0&&(this.molObj=null)}else console.log("Callback is not a function")}setHoverable(e,t,r,i){if(t=!!t,r=(0,h.makeFunction)(r),i=(0,h.makeFunction)(i),null!==r)if(null!==i){var s=this.selectedAtoms(e,this.atoms),n=s.length;for(let e=0;e0&&(this.molObj=null)}else console.log("Unhover_callback is not a function");else console.log("Hover_callback is not a function")}enableContextMenu(e,t){var r;t=!!t;var i=this.selectedAtoms(e,this.atoms),s=i.length;for(r=0;r0&&(this.molObj=null)}setColorByElement(e,t){if(null===this.molObj||!g.sameObj(t,this.lastColors)){this.lastColors=t;var r=this.selectedAtoms(e,r);r.length>0&&(this.molObj=null);for(var i=0;i0&&(this.molObj=null),"string"==typeof r&&void 0!==c.Gradient.builtinGradients[r]&&(r=new c.Gradient.builtinGradients[r]),i||(i=r.range()),i||(i=(0,h.getPropertyRange)(o,t)),s=0;s0&&(this.molObj=null);for(let e=0;e=s)continue;let o={b:r,e:s},a=n.bondOrder[e];1!=a&&(o.o=a),t.b.push(o)}}return t}globj(e,t){(null===this.molObj||t.regen)&&(this.molObj=this.createMolObj(this.atoms,t),this.renderedMolObj&&(e.remove(this.renderedMolObj),this.renderedMolObj=null),this.renderedMolObj=this.molObj.clone(),this.hidden&&(this.renderedMolObj.setVisible(!1),this.molObj.setVisible(!1)),e.add(this.renderedMolObj))}exportVRML(){return this.createMolObj(this.atoms,{supportsImposters:!1,supportsAIA:!1}).vrml()}removegl(e){this.renderedMolObj&&(void 0!==this.renderedMolObj.geometry&&this.renderedMolObj.geometry.dispose(),void 0!==this.renderedMolObj.material&&this.renderedMolObj.material.dispose(),e.remove(this.renderedMolObj),this.renderedMolObj=null),this.molObj=null}hide(){this.hidden=!0,this.renderedMolObj&&this.renderedMolObj.setVisible(!1),this.molObj&&this.molObj.setVisible(!1)}show(){this.hidden=!1,this.renderedMolObj&&this.renderedMolObj.setVisible(!0),this.molObj&&this.molObj.setVisible(!0)}addPropertyLabels(e,t,r,i){for(var s=this.selectedAtoms(t,s),n=(0,h.deepCopy)(i),o=0;oMOLECULE/gm)?"mol2":e.match(/^data_/gm)&&e.match(/^loop_/gm)?"cif":e.match(/^HETATM/gm)||e.match(/^ATOM/gm)?"pdb":e.match(/ITEM: TIMESTEP/gm)?"lammpstrj":e.match(/^.*\n.*\n.\s*(\d+)\s+(\d+)/gm)?"sdf":e.match(/^%VERSION\s+VERSION_STAMP/gm)?"prmtop":"xyz",console.log("Best guess: "+t))),(0,u.Parsers[t])(e,r)}}g.defaultAtomStyle={line:{}},g.defaultlineWidth=1,g.vdwRadii={H:1.2,He:1.4,Li:1.82,Be:1.53,B:1.92,C:1.7,N:1.55,O:1.52,F:1.47,Ne:1.54,Na:2.27,Mg:1.73,Al:1.84,Si:2.1,P:1.8,S:1.8,Cl:1.75,Ar:1.88,K:2.75,Ca:2.31,Ni:1.63,Cu:1.4,Zn:1.39,Ga:1.87,Ge:2.11,As:1.85,Se:1.9,Br:1.85,Kr:2.02,Rb:3.03,Sr:2.49,Pd:1.63,Ag:1.72,Cd:1.58,In:1.93,Sn:2.17,Sb:2.06,Te:2.06,I:1.98,Xe:2.16,Cs:3.43,Ba:2.68,Pt:1.75,Au:1.66,Hg:1.55,Tl:1.96,Pb:2.02,Bi:2.07,Po:1.97,At:2.02,Rn:2.2,Fr:3.48,Ra:2.83,U:1.86},g.ignoredKeys=new Set(["props","invert","model","frame","byres","expand","within","and","or","not"])},"./src/GLShape.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{GLShape:()=>d,splitMesh:()=>p});var i=r("./src/WebGL/index.ts"),s=r("./src/WebGL/shapes/index.ts"),n=r("./src/WebGL/math/index.ts"),o=r("./src/colors.ts"),a=r("./src/ProteinSurface4.ts"),l=r("./src/VolumeData.ts"),h=r("./src/GLDraw.ts"),c=r("./src/glcartoon.ts"),u=r("./src/utilities.ts");class d{static finalizeGeo(e){var t=e.updateGeoGroup(0);t.vertices>0&&t.truncateArrayBuffers(!0,!0)}static updateColor(e,t){var r,i,s;t=t||o.CC.color(t),e.colorsNeedUpdate=!0,t.constructor!==Array&&(r=t.r,i=t.g,s=t.b);for(let n in e.geometryGroups){let o=e.geometryGroups[n],a=o.colorArray;for(let e=0,n=o.vertices;e0?c/e:(e+c)/e}d.multiplyScalar(h);var p=new n.Vector3(i.x,i.y,i.z).add(d),f=d.clone().negate();let m=new n.Vector3(i.x,i.y,i.z);e.intersectionShape.cylinder.push(new s.Cylinder(m,p.clone(),a)),e.intersectionShape.sphere.push(new s.Sphere(m,a));var g=[];g[0]=d.clone(),Math.abs(g[0].x)>1e-4?g[0].y+=1:g[0].x+=1,g[0].cross(d),g[0].normalize(),g[4]=g[0].clone(),g[4].crossVectors(g[0],d),g[4].normalize(),g[8]=g[0].clone().negate(),g[12]=g[4].clone().negate(),g[2]=g[0].clone().add(g[4]).normalize(),g[6]=g[4].clone().add(g[8]).normalize(),g[10]=g[8].clone().add(g[12]).normalize(),g[14]=g[12].clone().add(g[0]).normalize(),g[1]=g[0].clone().add(g[2]).normalize(),g[3]=g[2].clone().add(g[4]).normalize(),g[5]=g[4].clone().add(g[6]).normalize(),g[7]=g[6].clone().add(g[8]).normalize(),g[9]=g[8].clone().add(g[10]).normalize(),g[11]=g[10].clone().add(g[12]).normalize(),g[13]=g[12].clone().add(g[14]).normalize(),g[15]=g[14].clone().add(g[0]).normalize();var v,b,y,_,w,x,S,A,C,M,L,E,z,k,O,T,I,F,D,R,P,G,j=u.vertices,B=u.vertexArray,N=u.faceArray,U=u.normalArray,V=u.lineArray;for(b=0,y=g.length;b0){var Y=B[v-3],Z=B[v-2],X=B[v-1],$=new n.Vector3(Y,Z,X),K=new n.Vector3(o.x,o.y,o.z),J=p.clone(),Q=new n.Vector3(q.x,q.y,q.z);e.intersectionShape.triangle.push(new s.Triangle(Q,K,$)),e.intersectionShape.triangle.push(new s.Triangle($.clone(),J,Q.clone()))}}u.vertices+=48,B[v=3*u.vertices]=i.x,B[v+1]=i.y,B[v+2]=i.z,B[v+3]=p.x,B[v+4]=p.y,B[v+5]=p.z,B[v+6]=o.x,B[v+7]=o.y,B[v+8]=o.z,u.vertices+=3;var ee=u.vertices-3,te=u.vertices-2,re=u.vertices-1,ie=3*ee,se=3*te,ne=3*re;for(b=0,y=g.length-1;ba&&(a=c),u>l&&(l=u),d>h&&(h=d)}e.center.set((a+s)/2,(l+n)/2,(h+o)/2),e.radius=e.center.distanceTo({x:a,y:l,z:h}),e.box={min:{x:s,y:n,z:o},max:{x:a,y:l,z:h}}}static addCustomGeo(e,t,r,i,o){var a,l,h,c,u,p,f,m,g,v=t.addGeoGroup(),b=r.vertexArr,y=r.normalArr,_=r.faceArr;v.vertices=b.length,v.faceidx=_.length;var w=v.vertexArray,x=v.colorArray;for(i.constructor!==Array&&(m=i.r,g=i.g,c=i.b),p=0,f=v.vertices;ph?(u.fromCap=0,u.toCap=2):(u.fromCap=2,u.toCap=2),this.addCylinder(u)}}addLine(e){var t,r;t=e.start?new n.Vector3(e.start.x||0,e.start.y||0,e.start.z||0):new n.Vector3(0,0,0),e.end?void 0===(r=new n.Vector3(e.end.x,e.end.y||0,e.end.z||0)).x&&(r.x=3):r=new n.Vector3(3,0,0);var i=this.geo.updateGeoGroup(2),s=i.vertices,o=3*s,a=i.vertexArray;a[o]=t.x,a[o+1]=t.y,a[o+2]=t.z,a[o+3]=r.x,a[o+4]=r.y,a[o+5]=r.z,i.vertices+=2;var l=i.lineArray,h=i.lineidx;l[h]=s,l[h+1]=s+1,i.lineidx+=2;var c=new n.Vector3;this.components.push({centroid:c.addVectors(t,r).multiplyScalar(.5)}),i=this.geo.updateGeoGroup(0),d.updateBoundingFromPoints(this.boundingSphere,this.components,i.vertexArray,i.vertices)}addArrow(e){if(e.start?e.start=new n.Vector3(e.start.x||0,e.start.y||0,e.start.z||0):e.start=new n.Vector3(0,0,0),e.dir instanceof n.Vector3&&"number"==typeof e.length){var t=e.dir.clone().multiplyScalar(e.length).add(e.start);e.end=t}else e.end?(e.end=new n.Vector3(e.end.x,e.end.y||0,e.end.z||0),void 0===e.end.x&&(e.end.x=3)):e.end=new n.Vector3(3,0,0);e.radius=e.radius||.1,e.radiusRatio=e.radiusRatio||1.618034,e.mid=0=0?m[i]-o:o-m[i])>0&&(g[i]|=d.ISDONE);var v=[],b=[];a.MarchingCube.march(g,v,b,{fulltable:!0,voxel:l,unitCube:e.unit,origin:e.origin,matrix:e.matrix,nX:c,nY:u,nZ:p}),!l&&h>0&&a.MarchingCube.laplacianSmooth(h,v,b);var y=[],_=[],w=[];if(t.selectedRegion&&void 0===t.coords&&(t.coords=t.selectedRegion),void 0!==t.coords){var x=t.coords[0].x,S=t.coords[0].y,A=t.coords[0].z,C=t.coords[0].x,M=t.coords[0].y,L=t.coords[0].z;for(let e=0;ex?x=t.coords[e].x:t.coords[e].xS?S=t.coords[e].y:t.coords[e].yA?A=t.coords[e].z:t.coords[e].zC&&v[e].xM&&v[e].yL&&v[e].z=64e3&&(t.push({vertexArr:[],normalArr:[],faceArr:[]}),e.colorArr&&(t.colorArr=[]),s++)}return t}d.ISDONE=2,d.drawCustom=function(e,t,r){var i=r,s=i.vertexArr,n=i.faceArr;0!==s.length&&0!==n.length||console.warn("Error adding custom shape component: No vertices and/or face indices supplied!");var a=r.color;void 0===a&&(a=e.color),a=o.CC.color(a);for(var l=p(i),h=0,c=l.length;h{"use strict";r.r(t),r.d(t,{GLViewer:()=>m,createStereoViewer:()=>b,createViewer:()=>g,createViewerGrid:()=>v});var i=r("./src/WebGL/index.ts"),s=r("./src/WebGL/math/index.ts"),n=r("./src/colors.ts"),o=r("./src/utilities.ts"),a=r("./src/Gradient.ts"),l=r("./src/GLModel.ts"),h=r("./src/Label.ts"),c=r("./src/GLShape.ts"),u=r("./src/VolumeData.ts"),d=r("./src/ProteinSurface4.ts"),p=r("./src/VolumetricRender.ts"),f=r("./node_modules/upng-js/UPNG.js");class m{getRect(){let e=this.container,t=e.getBoundingClientRect();if(0==t.width&&0==t.height&&"none"===e.style.display){let r=e.style.position,i=e.style.visibility;e.style.display="block",e.style.visibility="hidden",e.style.position="absolute",t=e.getBoundingClientRect(),e.style.display="none",e.style.visibility=i,e.style.position=r}return t}getWidth(){return this.getRect().width}getHeight(){return this.getRect().height}setupRenderer(){this.renderer=new i.Renderer({antialias:this.config.antialias,preserveDrawingBuffer:!0,premultipliedAlpha:!1,id:this.config.id,row:this.config.row,col:this.config.col,rows:this.config.rows,cols:this.config.cols,canvas:this.config.canvas,containerWidth:this.WIDTH||1,containerHeight:this.HEIGHT||1}),this.renderer.domElement.style.width="100%",this.renderer.domElement.style.height="100%",this.renderer.domElement.style.padding="0",this.renderer.domElement.style.position="absolute",this.renderer.domElement.style.top="0px",this.renderer.domElement.style.left="0px",this.renderer.domElement.style.zIndex="0"}initializeScene(){this.scene=new i.Scene,this.scene.fog=new i.Fog(this.bgColor,100,200),this.modelGroup=new i.Object3D,this.rotationGroup=new i.Object3D,this.rotationGroup.useQuaternion=!0,this.rotationGroup.quaternion=new s.Quaternion(0,0,0,1),this.rotationGroup.add(this.modelGroup),this.scene.add(this.rotationGroup);var e=new i.Light(16777215);e.position=new s.Vector3(.2,.2,1).normalize(),e.intensity=1,this.scene.add(e)}initContainer(e){this.container=e,this.WIDTH=this.getWidth(),this.HEIGHT=this.getHeight(),this.ASPECT=this.renderer.getAspect(this.WIDTH,this.HEIGHT),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.container.append(this.renderer.domElement),this.glDOM=this.renderer.domElement,this.nomouse||(this.glDOM.addEventListener("mousedown",this._handleMouseDown.bind(this),{passive:!1}),this.glDOM.addEventListener("touchstart",this._handleMouseDown.bind(this),{passive:!1}),this.glDOM.addEventListener("wheel",this._handleMouseScroll.bind(this),{passive:!1}),this.glDOM.addEventListener("mousemove",this._handleMouseMove.bind(this),{passive:!1}),this.glDOM.addEventListener("touchmove",this._handleMouseMove.bind(this),{passive:!1}),this.glDOM.addEventListener("contextmenu",this._handleContextMenu.bind(this),{passive:!1}))}decAnim(){this.animated--,this.animated<0&&(this.animated=0)}incAnim(){this.animated++}nextSurfID(){var e=0;for(let r in this.surfaces)if(this.surfaces.hasOwnProperty(r)){var t=parseInt(r);isNaN(t)||t>e&&(e=t)}return e+1}setSlabAndFog(){let e=this.camera.position.z-this.rotationGroup.position.z;e<1&&(e=1),this.camera.near=e+this.slabNear,this.camera.near<1&&(this.camera.near=1),this.camera.far=e+this.slabFar,this.camera.near+1>this.camera.far&&(this.camera.far=this.camera.near+1),this.camera.fov=this.fov,this.camera.right=e*Math.tan(Math.PI/180*this.fov),this.camera.left=-this.camera.right,this.camera.top=this.camera.right/this.ASPECT,this.camera.bottom=-this.camera.top,this.camera.updateProjectionMatrix(),this.scene.fog.near=this.camera.near+this.fogStart*(this.camera.far-this.camera.near),this.scene.fog.far=this.camera.far,this.config.disableFog&&(this.scene.fog.near=this.scene.fog.far)}show(e){if(this.renderer.setViewport(),this.scene&&(this.setSlabAndFog(),this.renderer.render(this.scene,this.camera),this.viewChangeCallback&&this.viewChangeCallback(this._viewer.getView()),!e&&this.linkedViewers.length>0))for(var t=this._viewer.getView(),r=0;r0){let t=this.CAMERA_Z-this.config.lowerZoomLimit;e>t&&(e=t)}if(this.config.upperZoomLimit&&this.config.upperZoomLimit>0){let t=this.CAMERA_Z-this.config.upperZoomLimit;ethis.CAMERA_Z-1&&(e=this.CAMERA_Z-1),e}static slerp(e,t,r){if(1==r)return t.clone();if(0==r)return e.clone();let i=e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w;if(i>.9995){let i=new s.Quaternion(e.x+r*(t.x-e.x),e.y+r*(t.y-e.y),e.z+r*(t.z-e.z),e.w+r*(t.w-e.w));return i.normalize(),i}i<0&&(t=t.clone().multiplyScalar(-1),i=-i),i>1?i=1:i<-1&&(i=-1);var n=Math.acos(i)*r,o=t.clone();o.sub(e.clone().multiplyScalar(i)),o.normalize();var a=Math.cos(n),l=Math.sin(n),h=new s.Quaternion(e.x*a+o.x*l,e.y*a+o.y*l,e.z*a+o.z*l,e.w*a+o.w*l);return h.normalize(),h}constructor(e,t={}){this.nomouse=!1,this.glDOM=null,this.models=[],this.surfaces={},this.shapes=[],this.labels=[],this.clickables=[],this.hoverables=[],this.contextMenuEnabledAtoms=[],this.current_hover=null,this.hoverDuration=500,this.viewer_frame=0,this.viewChangeCallback=null,this.stateChangeCallback=null,this.NEAR=1,this.FAR=800,this.CAMERA_Z=150,this.fov=20,this.linkedViewers=[],this.renderer=null,this.control_all=!1,this.scene=null,this.rotationGroup=null,this.modelGroup=null,this.fogStart=.4,this.slabNear=-50,this.slabFar=50,this.cq=new s.Quaternion(0,0,0,1),this.dq=new s.Quaternion(0,0,0,1),this.animated=0,this.animationTimers=new Set,this.isDragging=!1,this.mouseStartX=0,this.mouseStartY=0,this.touchDistanceStart=0,this.touchHold=!1,this.currentModelPos=0,this.cz=0,this.cslabNear=0,this.cslabFar=0,this.userContextMenuHandler=null,this.config=t,this.callback=this.config.callback,this.defaultcolors=this.config.defaultcolors,this.defaultcolors||(this.defaultcolors=n.elementColors.defaultColors),this.nomouse=this.config.nomouse,this.bgColor=0,this.config.backgroundColor=this.config.backgroundColor||"#ffffff",void 0!==this.config.backgroundColor&&(this.bgColor=n.CC.color(this.config.backgroundColor).getHex()),this.config.backgroundAlpha=null==this.config.backgroundAlpha?1:this.config.backgroundAlpha,this.camerax=0,void 0!==this.config.camerax&&(this.camerax=parseFloat(this.config.camerax)),this._viewer=this,this.container=e,null!=this.config.hoverDuration&&(this.hoverDuration=this.config.hoverDuration),void 0===this.config.antialias&&(this.config.antialias=!0),void 0===this.config.cartoonQuality&&(this.config.cartoonQuality=10),this.WIDTH=this.getWidth(),this.HEIGHT=this.getHeight(),this.setupRenderer(),this.row=null==this.config.row?0:this.config.row,this.col=null==this.config.col?0:this.config.col,this.cols=this.config.cols,this.rows=this.config.rows,this.viewers=this.config.viewers,this.control_all=this.config.control_all,this.ASPECT=this.renderer.getAspect(this.WIDTH,this.HEIGHT),this.camera=new i.Camera(this.fov,this.ASPECT,this.NEAR,this.FAR,this.config.orthographic),this.camera.position=new s.Vector3(this.camerax,0,this.CAMERA_Z),this.lookingAt=new s.Vector3,this.camera.lookAt(this.lookingAt),this.raycaster=new i.Raycaster(new s.Vector3(0,0,0),new s.Vector3(0,0,0)),this.projector=new i.Projector,this.initializeScene(),this.renderer.setClearColorHex(this.bgColor,this.config.backgroundAlpha),this.scene.fog.color=n.CC.color(this.bgColor),document.body.addEventListener("mouseup",this._handleMouseUp.bind(this)),document.body.addEventListener("touchend",this._handleMouseUp.bind(this)),this.initContainer(this.container),this.config.style&&this.setViewStyle(this.config),window.addEventListener("resize",this.resize.bind(this)),void 0!==window.ResizeObserver&&(this.divwatcher=new window.ResizeObserver(this.resize.bind(this)),this.divwatcher.observe(this.container));try{"function"==typeof this.callback&&this.callback(this)}catch(e){console.log("error with glviewer callback: "+e)}}targetedObjects(e,t,r){var i={x:e,y:t,z:-1};return Array.isArray(r)||(r=this.selectedAtoms(r)),0==r.length?[]:(this.raycaster.setFromCamera(i,this.camera),this.raycaster.intersectObjects(this.modelGroup,r))}modelToScreen(e){let t=!1;Array.isArray(e)||(e=[e],t=!0);let r=this.renderer.getXRatio(),i=this.renderer.getYRatio(),n=this.col,o=this.row,a=n*(this.WIDTH/r),l=(i-o-1)*(this.HEIGHT/i),h=[],c=this.canvasOffset();return e.forEach((e=>{let t=new s.Vector3(e.x,e.y,e.z);t.applyMatrix4(this.modelGroup.matrixWorld),this.projector.projectVector(t,this.camera);let n=this.WIDTH/r*(t.x+1)/2+c.left+a,o=-this.HEIGHT/i*(t.y-1)/2+c.top+l;h.push({x:n,y:o})})),t&&(h=h[0]),h}screenOffsetToModel(e,t,r){var i=e/this.WIDTH,n=t/this.HEIGHT,o=void 0===r?this.rotationGroup.position.z:r,a=this.rotationGroup.quaternion,l=new s.Vector3(0,0,o);return this.projector.projectVector(l,this.camera),l.x+=2*i,l.y-=2*n,this.projector.unprojectVector(l,this.camera),l.z=0,l.applyQuaternion(a),l}screenToModelDistance(e,t){let r=this.canvasOffset(),i=new s.Vector3(t.x,t.y,t.z);i.applyMatrix4(this.modelGroup.matrixWorld);let n=i.clone();this.projector.projectVector(i,this.camera);let o=new s.Vector3(2*(e.x-r.left)/this.WIDTH-1,2*(e.y-r.top)/-this.HEIGHT+1,i.z);return this.projector.unprojectVector(o,this.camera),o.distanceTo(n)}setViewChangeCallback(e){"function"!=typeof e&&null!=e||(this.viewChangeCallback=e)}setStateChangeCallback(e){"function"!=typeof e&&null!=e||(this.stateChangeCallback=e)}getConfig(){return this.config}setConfig(e){this.config=e}getInternalState(){var e={models:[],surfaces:[],shapes:[],labels:[]};for(let t=0;t{t.getCanvas().toBlob((function(t){t.arrayBuffer().then(e)}),"image/png")}))),i+=1,i==e&&(t.viewChangeCallback=s,Promise.all(n).then((e=>{let i=[];for(let t=0;t0&&(this.hoverTimeout=setTimeout((function(){o.handleHoverSelection(n.x,n.y,e)}),this.hoverDuration)),this.isDragging)){var l=(t-this.mouseStartX)/this.WIDTH,h=(r-this.mouseStartY)/this.HEIGHT;0!=this.touchDistanceStart&&e.targetTouches&&2==e.targetTouches.length?(a=2,h=2*(this.calcTouchDistance(e)-this.touchDistanceStart)/(this.WIDTH+this.HEIGHT)):e.targetTouches&&3==e.targetTouches.length&&(a=1),l*=i,h*=s;var c,u=Math.hypot(l,h);if(3==a||3==this.mouseButton&&e.ctrlKey)this.slabNear=this.cslabNear+100*l,this.slabFar=this.cslabFar-100*h;else if(2==a||3==this.mouseButton||e.shiftKey)(c=.85*(this.CAMERA_Z-this.rotationGroup.position.z))<80&&(c=80),this.rotationGroup.position.z=this.cz+h*c,this.rotationGroup.position.z=this.adjustZoomToLimits(this.rotationGroup.position.z);else if(1==a||2==this.mouseButton||e.ctrlKey){var d=this.screenOffsetToModel(i*(t-this.mouseStartX),s*(r-this.mouseStartY));this.modelGroup.position.addVectors(this.currentModelPos,d)}else if((0===a||1==this.mouseButton)&&0!==u){var p=Math.sin(u*Math.PI)/u;this.dq.x=Math.cos(u*Math.PI),this.dq.y=0,this.dq.z=p*l,this.dq.w=-p*h,this.rotationGroup.quaternion.set(1,0,0,0),this.rotationGroup.quaternion.multiply(this.dq),this.rotationGroup.quaternion.multiply(this.cq)}this.show()}}_handleContextMenu(e){e.preventDefault();var t=this.getX(e),r=this.getY(e);if(t==this.mouseStartX&&r==this.mouseStartY){var i=this.mouseStartX,s=this.mouseStartY,n=this.canvasOffset();let e=this.mouseXY(i,s),t=e.x,r=e.y,a=this.targetedObjects(t,r,this.contextMenuEnabledAtoms);var o=null;a.length&&(o=a[0].clickable),n=this.canvasOffset(),i=this.mouseStartX-n.left,s=this.mouseStartY-n.top,this.userContextMenuHandler&&this.userContextMenuHandler(o,i,s,a)}}setContainer(e){let t=(0,o.getElement)(e)||this.container;return this.initContainer(t),this}setBackgroundColor(e,t){(void 0===t||t<0||t>1)&&(t=1);var r=n.CC.color(e);return this.scene.fog.color=r,this.bgColor=r.getHex(),this.renderer.setClearColorHex(r.getHex(),t),this.show(),this}setProjection(e){this.camera.ortho="orthographic"===e,this.setSlabAndFog()}setViewStyle(e){if("outline"===e.style){var t={};e.color&&(t.color=n.CC.color(e.color)),e.width&&(t.width=e.width),this.renderer.enableOutline(t)}else this.renderer.disableOutline();return this}updateSize(){this.renderer.setSize(this.WIDTH,this.HEIGHT),this.ASPECT=this.renderer.getAspect(this.WIDTH,this.HEIGHT),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.camera.aspect=this.ASPECT,this.camera.updateProjectionMatrix()}setWidth(e){return this.WIDTH=e||this.WIDTH,this.updateSize(),this}setHeight(e){return this.HEIGHT=e||this.HEIGHT,this.updateSize(),this}resize(){this.WIDTH=this.getWidth(),this.HEIGHT=this.getHeight();let e=!1;if(this.renderer.isLost()&&this.WIDTH>0&&this.HEIGHT>0){let t=!1,r=this.container.querySelector("canvas");r&&r!=this.renderer.getCanvas()?this.config.canvas=r:(r.remove(),this.config&&null!=this.config.canvas&&(delete this.config.canvas,t=!0)),this.setupRenderer(),this.initContainer(this.container),e=!0,t&&(this.config.canvas=this.renderer.getCanvas())}if(0==this.WIDTH||0==this.HEIGHT?this.animated&&this._viewer.pauseAnimate():this.animated&&this._viewer.resumeAnimate(),this.updateSize(),e){let e=this.renderer.supportedExtensions();if(e.regen=!0,this.viewers)for(let t=0,r=this.viewers.length;t=0&&(this.modelGroup.remove(this.labels[r].sprite),(this.viewer_frame<0||this.labels[r].frame==this.viewer_frame)&&this.modelGroup.add(this.labels[r].sprite));for(r in this.surfaces)if(this.surfaces.hasOwnProperty(r)){var o=this.surfaces[r];for(s=0;s1||1==o[s].symmetries.length&&!o[s].symmetries[s].isIdentity()){var h,c=new i.Object3D;for(h=0;h0?this.animateMotion(t,r,this.modelGroup.position,this.adjustZoomToLimits(s),this.rotationGroup.quaternion,this.lookingAt):(this.rotationGroup.position.z=this.adjustZoomToLimits(s),this.show()),this}translate(e,t,r=0,i=!1){var n=e/this.WIDTH,o=t/this.HEIGHT,a=new s.Vector3(0,0,-this.CAMERA_Z);this.projector.projectVector(a,this.camera),a.x-=n,a.y-=o,this.projector.unprojectVector(a,this.camera),a.z=0;var l=this.lookingAt.clone().add(a);return r>0?this.animateMotion(r,i,this.modelGroup.position,this.rotationGroup.position.z,this.rotationGroup.quaternion,l):(this.lookingAt=l,this.camera.lookAt(this.lookingAt),this.show()),this}translateScene(e,t,r=0,i=!1){var s=this.screenOffsetToModel(e,t),n=this.modelGroup.position.clone().add(s);return r>0?this.animateMotion(r,i,this.modelGroup.position,this.rotationGroup.position.z,this.rotationGroup.quaternion,this.lookingAt):(this.modelGroup.position=n,this.show()),this}fitSlab(e){e=e||{};var t=this.getAtomsFromSel(e),r=(0,o.getExtent)(t),i=r[1][0]-r[0][0],s=r[1][1]-r[0][1],n=r[1][2]-r[0][2],a=Math.hypot(i,s,n);return a<5&&(a=5),this.slabNear=-a/1.9,this.slabFar=a/2,this}center(e={},t=0,r=!1){var i,n,a=this.getAtomsFromSel(e),l=(0,o.getExtent)(a);(0,o.isEmptyObject)(e)?(this.shapes.forEach((e=>{if(e&&e.boundingSphere&&e.boundingSphere.center){var t=e.boundingSphere.center,r=e.boundingSphere.radius;r>0?(a.push(new s.Vector3(t.x+r,t.y,t.z)),a.push(new s.Vector3(t.x-r,t.y,t.z)),a.push(new s.Vector3(t.x,t.y+r,t.z)),a.push(new s.Vector3(t.x,t.y-r,t.z)),a.push(new s.Vector3(t.x,t.y,t.z+r)),a.push(new s.Vector3(t.x,t.y,t.z-r))):a.push(t)}})),l=(0,o.getExtent)(a),i=a,n=l):(i=this.getAtomsFromSel({}),n=(0,o.getExtent)(i));var h=new s.Vector3(l[2][0],l[2][1],l[2][2]),c=n[1][0]-n[0][0],u=n[1][1]-n[0][1],d=n[1][2]-n[0][2],p=Math.hypot(c,u,d);p<5&&(p=5),this.slabNear=-p/1.9,this.slabFar=p/2,c=l[1][0]-l[0][0],u=l[1][1]-l[0][1],d=l[1][2]-l[0][2],(p=Math.hypot(c,u,d))<5&&(p=5);for(var f=25,m=0;mf&&(f=g)}p=2*Math.sqrt(f);var v=h.clone().multiplyScalar(-1);return t>0?this.animateMotion(t,r,v,this.rotationGroup.position.z,this.rotationGroup.quaternion,this.lookingAt):(this.modelGroup.position=v,this.show()),this}zoomTo(e={},t=0,r=!1){let i=this.getAtomsFromSel(e),n=(0,o.getExtent)(i),a=n;if((0,o.isEmptyObject)(e)){let e=i&&i.length;if(this.shapes.forEach((e=>{if(e&&e.boundingSphere)if(e.boundingSphere.box){let t=e.boundingSphere.box;i.push(new s.Vector3(t.min.x,t.min.y,t.min.z)),i.push(new s.Vector3(t.max.x,t.max.y,t.max.z))}else if(e.boundingSphere.center){var t=e.boundingSphere.center,r=e.boundingSphere.radius;r>0?(i.push(new s.Vector3(t.x+r,t.y,t.z)),i.push(new s.Vector3(t.x-r,t.y,t.z)),i.push(new s.Vector3(t.x,t.y+r,t.z)),i.push(new s.Vector3(t.x,t.y-r,t.z)),i.push(new s.Vector3(t.x,t.y,t.z+r)),i.push(new s.Vector3(t.x,t.y,t.z-r))):i.push(t)}})),a=(0,o.getExtent)(i),!e)for(let e=0;e<3;e++)n[2][e]=(a[0][e]+a[1][e])/2}else{let e=this.getAtomsFromSel({});a=(0,o.getExtent)(e)}var l=new s.Vector3(n[2][0],n[2][1],n[2][2]),h=a[1][0]-a[0][0],c=a[1][1]-a[0][1],u=a[1][2]-a[0][2],d=Math.hypot(h,c,u);d<5&&(d=5),this.slabNear=-d/1.9,this.slabFar=d/2,0===Object.keys(e).length&&(this.slabNear=Math.min(2*-d,-50),this.slabFar=Math.max(2*d,50));var p=this.config.minimumZoomToDistance||5;h=n[1][0]-n[0][0],c=n[1][1]-n[0][1],u=n[1][2]-n[0][2],(d=Math.hypot(h,c,u))f&&(f=g)}d=2*Math.sqrt(f);var v=l.clone().multiplyScalar(-1),b=-(.5*d/Math.tan(Math.PI/180*this.camera.fov/2)-this.CAMERA_Z);return b=this.adjustZoomToLimits(b),t>0?this.animateMotion(t,r,v,b,this.rotationGroup.quaternion,this.lookingAt):(this.modelGroup.position=v,this.rotationGroup.position.z=b,this.show()),this}setSlab(e,t){this.slabNear=e,this.slabFar=t}getSlab(){return{near:this.slabNear,far:this.slabFar}}addLabel(e,t={},r,i=!1){if(r){var s=(0,o.getExtent)(this.getAtomsFromSel(r));t.position={x:s[2][0],y:s[2][1],z:s[2][2]}}var n=new h.Label(e,t);return n.setContext(),this.modelGroup.add(n.sprite),this.labels.push(n),i||this.show(),n}addResLabels(e,t,r=!1){let i=this.labels.length;return this.applyToModels("addResLabels",e,this,t,r),this.show(),this.labels.slice(i)}addPropertyLabels(e,t,r){return this.applyToModels("addPropertyLabels",e,t,this,r),this.show(),this}removeLabel(e){for(var t=0;t0&&void 0===this.shapes[this.shapes.length-1];)this.shapes.pop();return this}removeAllShapes(){for(var e=0;e-1e-4&&n.x<1.0001&&n.y>-1e-4&&n.y<1.0001&&n.z>-1e-4&&n.z<1.0001)}}for(let n=0;nn){e.start=r,e.end=i,t.addLine(e);break}u.addVectors(r,h),e.start=r,e.end=u,t.addLine(e),r=u.clone(),d+=o,u.addVectors(r,c),r=u.clone(),d+=a}return t.finalize(),t}addCustom(e){e=e||{};var t=new c.GLShape(e);return t.shapePosition=this.shapes.length,t.addCustom(e),this.shapes.push(t),t.finalize(),t}addVolumetricData(e,t,r={}){var i=new u.VolumeData(e,t);return r.hasOwnProperty("transferfn")?this.addVolumetricRender(i,r):this.addIsosurface(i,r)}addIsosurface(e,t={},r){var i=new c.GLShape(t);return i.shapePosition=this.shapes.length,i.addIsosurface(e,t,r),this.shapes.push(i),i}addVolumetricRender(e,t){t=t||{};var r=new p.GLVolumetricRender(e,t);return r.shapePosition=this.shapes.length,this.shapes.push(r),r}hasVolumetricRender(){return this.renderer.supportsVolumetric()}enableFog(e){e?this.scene.fog=new i.Fog(this.bgColor,100,200):(this.config.disableFog=!0,this.show())}setFrame(e){this.viewer_frame=e;let t=this;return new Promise((function(r){var i=t.models.map((function(r){return r.setFrame(e,t)}));Promise.all(i).then((function(){r()}))}))}getFrame(){return this.viewer_frame}getNumFrames(){var e=0;for(let t=0;te&&(e=this.models[t].getNumFrames());for(let t=0;t=e&&(e=this.shapes[t].frame+1);for(let t=0;t=e&&(e=this.labels[t].frame+1);return e}animate(e){this.incAnim();var t=100,r="forward",i=0;(e=e||{}).interval&&(t=e.interval),e.loop&&(r=e.loop),e.reps&&(i=e.reps);var s=this.getNumFrames(),n=this,a=0;e.startFrame&&(a=e.startFrame%s);var l=1;e.step&&(i/=l=e.step);var h,c,u=0,d=s*i,p=new Date,f=function(e){p=new Date,"forward"==e?n.setFrame(a).then((function(){a=(a+l)%s,h()})):"backward"==e?n.setFrame(s-1-a).then((function(){a=(a+l)%s,h()})):n.setFrame(a).then((function(){l*=(a+=l)%(s-1)==0?-1:1,h()}))};return h=function(){if(n.render(),n.getCanvas().isConnected)if(++u!=d&&n.isAnimated()){var e=t-((new Date).getTime()-p.getTime());e=e>0?e:0,n.animationTimers.delete(c),c=new o.PausableTimer(f,e,r),n.animationTimers.add(c)}else c.cancel(),n.animationTimers.delete(c),n.decAnim();else n.stopAnimate()},c=new o.PausableTimer(f,0,r),this.animationTimers.add(c),this}stopAnimate(){return this.animated=0,this.animationTimers.forEach((function(e){e.cancel()})),this.animationTimers=new Set,this}pauseAnimate(){return this.animationTimers.forEach((function(e){e.pause()})),this}resumeAnimate(){return this.animationTimers.forEach((function(e){e.resume()})),this}isAnimated(){return this.animated>0}getModelOpt(e){return e&&!e.defaultcolors?(e.defaultcolors=this.defaultcolors,e.cartoonQuality=e.cartoonQuality||this.config.cartoonQuality):void 0===e&&(e={defaultcolors:this.defaultcolors,cartoonQuality:this.config.cartoonQuality}),e}addModel(e,t="",r){r=this.getModelOpt(r);var i=new l.GLModel(this.models.length,r);return i.addMolData(e,t,r),this.models.push(i),i}addModels(e,t,r){(r=this.getModelOpt(r)).multimodel=!0,r.frames=!0;for(var i=l.GLModel.parseMolData(e,t,r),s=0;s0&&void 0===this.models[this.models.length-1];)this.models.pop();return this}}removeAllModels(){for(var e=0;et[1][0]||i.yt[1][1]||i.zt[1][2]||r.push(i))}return r}static volume(e){return(e[1][0]-e[0][0])*(e[1][1]-e[0][1])*(e[1][2]-e[0][2])}carveUpExtent(e,t,r){let i=[],s={};for(let e=0,r=t.length;ei&&r>s?0:i>r&&i>s?1:2;var n=o(e),l=o(e),h=(e[1][t]-e[0][t])/2+e[0][t];n[1][t]=h,l[0][t]=h;var c=a(n),u=a(l);return c.concat(u)},l=a(e);for(let e=0,s=l.length;e0)for(let e=0,t=u.length;e1||1==x.length&&!x[0].isIdentity()){w=!0;break}}var S=function(e,r,i){var s;b=l?m.shallowCopy(f.getAtomsFromSel(l)):i;var n=(0,o.getExtent)(i,!0);if(t.map&&t.map.prop){var h=t.map.prop;let e=(0,a.getGradient)(t.map.scheme||t.map.gradient||new a.Gradient.RWB),r=e.range();r||(r=(0,o.getPropertyRange)(i,h)),t.colorscheme={prop:h,gradient:e}}for(let e=0,i=r.length;e0){var _=(0,o.getExtent)(b,!0);y.sort((function(e,t){var r=function(e,t){var r=e.extent,i=r[1][0]-r[0][0],s=r[1][1]-r[0][1],n=r[1][2]-r[0][2],o=i-t[2][0];o*=o;var a=s-t[2][1];a*=a;var l=n-t[2][2];return o+a+l*l};return r(e,_)-r(t,_)}))}var w=[];for(let e=0,t=r.length;e0&&(A.push({geo:new i.Geometry(!0),mat:p,done:!1,finished:!1,symmetries:this.models[_].getSymmetries()}),E.push(S(A[A.length-1],M[_],L[_])));C=Promise.all(E)}else A.push({geo:new i.Geometry(!0),mat:p,done:!1,finished:!1,symmetries:[new s.Matrix4]}),C=S(A[A.length-1],v,y);return this.surfaces[u]=A,C.surfid=u,h&&"function"==typeof h?(C.then((function(e){h(e)})),u):C}setSurfaceMaterialStyle(e,t){if((0,o.adjustVolumeStyle)(t),this.surfaces[e]){var r=this.surfaces[e];r.style=t;for(var s=0;s0?this.camera.position.x=r*Math.tan(Math.PI/180*t):this.camera.position.x=-r*Math.tan(Math.PI/180*t),this.camera.lookAt(new s.Vector3(0,0,this.rotationGroup.position.z)),this.camera.position.x}setDefaultCartoonQuality(e){this.config.cartoonQuality=e}}function g(e,t){if(e=(0,o.getElement)(e)){t=t||{};try{return new m(e,t)}catch(e){throw"error creating viewer: "+e}}}function v(e,t={},r={}){if(e=(0,o.getElement)(e)){var i=[],s=document.createElement("canvas");r.rows=t.rows,r.cols=t.cols,r.control_all=null!=t.control_all&&t.control_all,e.appendChild(s);try{for(var n=0;n{"use strict";r.r(t),r.d(t,{CustomLinear:()=>c,Gradient:()=>d,GradientType:()=>s,ROYGB:()=>l,RWB:()=>a,Sinebow:()=>h,builtinGradients:()=>u,getGradient:()=>o,normalizeValue:()=>n});var i=r("./src/colors.ts");class s{}function n(e,t,r){return t>=e?(rt&&(r=t),{lo:e,hi:t,val:r}):(r>e&&(r=e),r=2?(this.max=e[1],this.min=e[0]):e&&t&&!Array.isArray(e)&&(this.min=e,this.max=t)}range(){return void 0!==this.min&&void 0!==this.max?[this.min,this.max]:null}valueToHex(e,t){var r,i;if(e=this.mult*e,t?(r=t[0],i=t[1]):(r=this.min,i=this.max),void 0===e)return 16777215;var s=n(r,i,e);r=s.lo;var o,a=i=s.hi;return(e=s.val)<(a=t&&void 0!==t[2]?t[2]:void 0!==this.mid?this.mid:(r+i)/2)?16711680+256*(o=Math.floor(255*Math.sqrt((e-r)/(a-r))))+o:e>a?65536*(o=Math.floor(255*Math.sqrt(1-(e-a)/(i-a))))+256*o+255:16777215}}class l extends s{constructor(e,t){super(),this.gradient="ROYGB",this.mult=1,this.min=e,this.max=t,void 0===t&&Array.isArray(e)&&e.length>=2?(this.max=e[1],this.min=e[0]):e&&t&&!Array.isArray(e)&&(this.min=e,this.max=t)}valueToHex(e,t){var r,i;if(e=this.mult*e,t?(r=t[0],i=t[1]):(r=this.min,i=this.max),void 0===e)return 16777215;var s=n(r,i,e),o=((r=s.lo)+(i=s.hi))/2,a=(r+o)/2,l=(o+i)/2;return(e=s.val)=2&&(this.max=e[1],this.min=e[0]),t=2?(this.max=e[1],this.min=e[0],s=t):(this.min=e,this.max=t,s=r),s)for(let e of s)this.colors.push(i.CC.color(e));else this.colors.push(i.CC.color(0))}range(){return void 0!==this.min&&void 0!==this.max?[this.min,this.max]:null}valueToHex(e,t){var r,s;if(t?(r=t[0],s=t[1]):(r=this.min,s=this.max),void 0===e)return 16777215;var o=n(r,s,e);r=o.lo,s=o.hi,e=o.val;let a=this.colors.length,l=(s-r)/a,h=Math.min(Math.floor((e-r)/l),a-1),c=Math.min(h+1,a-1),u=(e-r-h*l)/l,d=this.colors[h],p=this.colors[c];return new i.Color(d.r+u*(p.r-d.r),d.g+u*(p.g-d.g),d.b+u*(p.b-d.b)).getHex()}}const u={rwb:a,RWB:a,roygb:l,ROYGB:l,sinebow:h,linear:c};class d extends s{valueToHex(e,t){return 0}range(){return null}}d.RWB=a,d.ROYGB=l,d.Sinebow=h,d.CustomLinear=c,d.builtinGradients=u,d.normalizeValue=n,d.getGradient=o},"./src/Label.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Label:()=>l,LabelCount:()=>o});var i=r("./src/WebGL/index.ts"),s=r("./src/Gradient.ts"),n=r("./src/colors.ts");let o=0;function a(e,t,r){var i=r;return void 0!==e&&(e instanceof n.Color?i=e.scaled():void 0!==(i=n.CC.color(e)).scaled&&(i=i.scaled())),void 0!==t&&(i.a=parseFloat(t)),i}class l{constructor(e,t){this.id=o++,this.stylespec=t||{},this.canvas=document.createElement("canvas"),this.canvas.width=134,this.canvas.height=35,this.context=this.canvas.getContext("2d"),this.sprite=new i.Sprite,this.text=e,this.frame=this.stylespec.frame}getStyle(){return this.stylespec}setContext(){var e=this.stylespec,t=void 0!==e.useScreen&&e.useScreen,r=e.showBackground;"0"!==r&&"false"!==r||(r=!1),void 0===r&&(r=!0);var n=e.font?e.font:"sans-serif",o=parseInt(e.fontSize)?parseInt(e.fontSize):18,l=a(e.fontColor,e.fontOpacity,{r:255,g:255,b:255,a:1}),h=e.padding?e.padding:4,c=e.borderThickness?e.borderThickness:0,u=a(e.backgroundColor,e.backgroundOpacity,{r:0,g:0,b:0,a:1}),d=a(e.borderColor,e.borderOpacity,u),p=e.position?e.position:{x:-10,y:1,z:1},f=void 0===e.inFront||e.inFront;"false"!==f&&"0"!==f||(f=!1);var m=e.alignment||i.SpriteAlignment.topLeft;"string"==typeof m&&m in i.SpriteAlignment&&(m=i.SpriteAlignment[m]);var g="";e.bold&&(g="bold "),this.context.font=g+o+"px "+n;var v=this.context.measureText(this.text).width;r||(c=0);var b=v+2.5*c+2*h,y=1.25*o+2*c+2*h;if(e.backgroundImage){var _=e.backgroundImage,w=e.backgroundWidth?e.backgroundWidth:_.width,x=e.backgroundHeight?e.backgroundHeight:_.height;w>b&&(b=w),x>y&&(y=x)}if(this.canvas.width=b,this.canvas.height=y,this.context.clearRect(0,0,this.canvas.width,this.canvas.height),g="",e.bold&&(g="bold "),this.context.font=g+o+"px "+n,this.context.fillStyle="rgba("+u.r+","+u.g+","+u.b+","+u.a+")",this.context.strokeStyle="rgba("+d.r+","+d.g+","+d.b+","+d.a+")",e.backgroundGradient){let t=this.context.createLinearGradient(0,y/2,b,y/2),r=s.Gradient.getGradient(e.backgroundGradient),i=r.range(),n=-1,o=1;i&&(n=i[0],o=i[1]);let l=o-n;for(let e=0;e<1.01;e+=.1){let i=a(r.valueToHex(n+l*e)),s="rgba("+i.r+","+i.g+","+i.b+","+i.a+")";t.addColorStop(e,s)}this.context.fillStyle=t}this.context.lineWidth=c,r&&function(e,t,r,i,s,n,o){e.beginPath(),e.moveTo(t+6,r),e.lineTo(t+i-6,r),e.quadraticCurveTo(t+i,r,t+i,r+6),e.lineTo(t+i,r+s-6),e.quadraticCurveTo(t+i,r+s,t+i-6,r+s),e.lineTo(t+6,r+s),e.quadraticCurveTo(t,r+s,t,r+s-6),e.lineTo(t,r+6),e.quadraticCurveTo(t,r,t+6,r),e.closePath(),e.fill(),o&&e.stroke()}(this.context,c,c,b-2*c,y-2*c,0,c>0),e.backgroundImage&&this.context.drawImage(_,0,0,b,y),this.context.fillStyle="rgba("+l.r+","+l.g+","+l.b+","+l.a+")",this.context.fillText(this.text,c+h,o+c+h,v);var S=new i.Texture(this.canvas);S.needsUpdate=!0,this.sprite.material=new i.SpriteMaterial({map:S,useScreenCoordinates:t,alignment:m,depthTest:!f,screenOffset:e.screenOffset||null}),this.sprite.scale.set(1,1,1),this.sprite.position.set(p.x,p.y,p.z)}dispose(){void 0!==this.sprite.material.map&&this.sprite.material.map.dispose(),void 0!==this.sprite.material&&this.sprite.material.dispose()}}},"./src/ProteinSurface4.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{MarchingCube:()=>l,MarchingCubeInitializer:()=>a,PointGrid:()=>h,ProteinSurface:()=>c,SurfaceType:()=>i,setSyncSurface:()=>o,syncSurface:()=>n});var i,s=r("./src/WebGL/math/index.ts");!function(e){e[e.VDW=1]="VDW",e[e.MS=2]="MS",e[e.SAS=3]="SAS",e[e.SES=4]="SES"}(i||(i={}));var n=!1;function o(e){n=e}(window.navigator.userAgent.indexOf("MSIE ")>=0||window.navigator.userAgent.indexOf("Trident/")>=0)&&(n=!0);class a{constructor(){this.ISDONE=2,this.edgeTable=new Uint32Array([0,0,0,0,0,0,0,2816,0,0,0,1792,0,3328,3584,3840,0,0,0,138,0,21,0,134,0,0,0,652,0,2067,3865,3600,0,0,0,42,0,0,0,294,0,0,21,28,0,3875,1049,3360,0,168,162,170,0,645,2475,2210,0,687,293,172,4010,3747,3497,3232,0,0,0,0,0,69,0,900,0,0,0,1792,138,131,1608,1920,0,81,0,2074,84,85,84,86,0,81,0,3676,330,1105,1881,1616,0,0,0,42,0,69,0,502,0,0,21,3580,138,2035,1273,1520,2816,104,2337,106,840,581,367,102,2816,3695,3429,3180,1898,1635,1385,1120,0,0,0,0,0,0,0,3910,0,0,69,588,42,2083,41,2880,0,0,0,1722,0,2293,4095,3830,0,255,757,764,2538,2291,3065,2800,0,0,81,338,0,3925,1119,3414,84,855,85,340,2130,2899,89,2384,1792,712,194,1162,4036,3781,3535,3270,708,719,197,204,3018,2755,2505,2240,0,0,0,0,168,420,168,1958,162,162,676,2988,170,163,680,928,3328,3096,3328,3642,52,53,1855,1590,2340,2111,2869,2620,298,51,825,560,3584,3584,3090,3482,1668,1941,1183,1430,146,2975,2069,2460,154,915,153,400,3840,3592,3329,3082,1796,1541,1295,1030,2818,2575,2309,2060,778,515,265,0]),this.triTable=[[],[],[],[],[],[],[],[11,9,8],[],[],[],[8,10,9],[],[10,8,11],[9,11,10],[8,10,9,8,11,10],[],[],[],[1,7,3],[],[4,2,0],[],[2,1,7],[],[],[],[2,7,3,2,9,7],[],[1,4,11,1,0,4],[3,8,0,11,9,4,11,10,9],[4,11,9,11,10,9],[],[],[],[5,3,1],[],[],[],[2,5,8,2,1,5],[],[],[2,4,0],[3,2,4],[],[0,9,1,8,10,5,8,11,10],[3,4,0,3,10,4],[5,8,10,8,11,10],[],[3,5,7],[7,1,5],[1,7,3,1,5,7],[],[9,2,0,9,7,2],[0,3,8,1,7,11,1,5,7],[11,1,7,1,5,7],[],[9,1,0,5,3,2,5,7,3],[8,2,5,8,0,2],[2,5,3,5,7,3],[3,9,1,3,8,9,7,11,10,7,10,5],[9,1,0,10,7,11,10,5,7],[3,8,0,7,10,5,7,11,10],[11,5,7,11,10,5],[],[],[],[],[],[0,6,2],[],[7,2,9,7,9,8],[],[],[],[8,10,9],[7,1,3],[7,1,0],[6,9,3,6,10,9],[7,10,8,10,9,8],[],[6,0,4],[],[11,1,4,11,3,1],[2,4,6],[2,0,4,2,4,6],[2,4,6],[1,4,2,4,6,2],[],[6,0,4],[],[2,11,3,6,9,4,6,10,9],[8,6,1,8,1,3],[10,0,6,0,4,6],[8,0,3,9,6,10,9,4,6],[10,4,6,10,9,4],[],[],[],[5,3,1],[],[0,6,2],[],[7,4,8,5,2,1,5,6,2],[],[],[2,4,0],[7,4,8,2,11,3,10,5,6],[7,1,3],[5,6,10,0,9,1,8,7,4],[5,6,10,7,0,3,7,4,0],[10,5,6,4,8,7],[9,11,8],[3,5,6],[0,5,11,0,11,8],[6,3,5,3,1,5],[3,9,6,3,8,9],[9,6,0,6,2,0],[0,3,8,2,5,6,2,1,5],[1,6,2,1,5,6],[9,11,8],[1,0,9,6,10,5,11,3,2],[6,10,5,2,8,0,2,11,8],[3,2,11,10,5,6],[10,5,6,9,3,8,9,1,3],[0,9,1,5,6,10],[8,0,3,10,5,6],[10,5,6],[],[],[],[],[],[],[],[1,10,2,9,11,6,9,8,11],[],[],[6,0,2],[3,6,9,3,2,6],[3,5,1],[0,5,1,0,11,5],[0,3,5],[6,9,11,9,8,11],[],[],[],[4,5,9,7,1,10,7,3,1],[],[11,6,7,2,4,5,2,0,4],[11,6,7,8,0,3,1,10,2,9,4,5],[6,7,11,1,10,2,9,4,5],[],[4,1,0,4,5,1,6,7,3,6,3,2],[9,4,5,0,6,7,0,2,6],[4,5,9,6,3,2,6,7,3],[6,7,11,5,3,8,5,1,3],[6,7,11,4,1,0,4,5,1],[4,5,9,3,8,0,11,6,7],[9,4,5,7,11,6],[],[],[0,6,4],[8,6,4,8,1,6],[],[0,10,2,0,9,10,4,8,11,4,11,6],[10,2,1,6,0,3,6,4,0],[10,2,1,11,4,8,11,6,4],[4,2,6],[1,0,9,2,4,8,2,6,4],[2,4,0,2,6,4],[8,2,4,2,6,4],[11,4,1,11,6,4],[0,9,1,4,11,6,4,8,11],[3,6,0,6,4,0],[8,6,4,8,11,6],[10,8,9],[6,3,9,6,7,3],[6,7,1],[10,7,1,7,3,1],[7,11,6,8,10,2,8,9,10],[11,6,7,10,0,9,10,2,0],[2,1,10,7,11,6,8,0,3],[1,10,2,6,7,11],[7,2,6,7,9,2],[1,0,9,3,6,7,3,2,6],[7,0,6,0,2,6],[2,7,3,2,6,7],[7,11,6,3,9,1,3,8,9],[9,1,0,11,6,7],[0,3,8,11,6,7],[11,6,7],[],[],[],[],[5,3,7],[8,5,2,8,7,5],[5,3,7],[1,10,2,5,8,7,5,9,8],[1,7,5],[1,7,5],[9,2,7,9,7,5],[11,3,2,8,5,9,8,7,5],[1,3,7,1,7,5],[0,7,1,7,5,1],[9,3,5,3,7,5],[9,7,5,9,8,7],[8,10,11],[3,4,10,3,10,11],[8,10,11],[5,9,4,1,11,3,1,10,11],[2,4,5],[5,2,4,2,0,4],[0,3,8,5,9,4,10,2,1],[2,1,10,9,4,5],[2,8,5,2,11,8],[3,2,11,1,4,5,1,0,4],[9,4,5,8,2,11,8,0,2],[11,3,2,9,4,5],[8,5,3,5,1,3],[5,0,4,5,1,0],[3,8,0,4,5,9],[9,4,5],[11,9,10],[11,9,10],[1,11,4,1,10,11],[8,7,4,11,1,10,11,3,1],[2,7,9,2,9,10],[4,8,7,0,10,2,0,9,10],[2,1,10,0,7,4,0,3,7],[10,2,1,8,7,4],[1,7,4],[3,2,11,4,8,7,9,1,0],[11,4,2,4,0,2],[2,11,3,7,4,8],[4,1,7,1,3,7],[1,0,9,8,7,4],[3,4,0,3,7,4],[8,7,4],[8,9,10,8,10,11],[3,9,11,9,10,11],[0,10,8,10,11,8],[10,3,1,10,11,3],[2,8,10,8,9,10],[9,2,0,9,10,2],[8,0,3,1,10,2],[10,2,1],[1,11,9,11,8,9],[11,3,2,0,9,1],[11,0,2,11,8,0],[11,3,2],[8,1,3,8,9,1],[9,1,0],[8,0,3],[]],this.edgeTable2=[0,265,515,778,2060,2309,2575,2822,1030,1295,1541,1804,3082,3331,3593,3840,400,153,915,666,2460,2197,2975,2710,1430,1183,1941,1692,3482,3219,3993,3728,560,825,51,314,2620,2869,2111,2358,1590,1855,1077,1340,3642,3891,3129,3376,928,681,419,170,2988,2725,2479,2214,1958,1711,1445,1196,4010,3747,3497,3232,2240,2505,2755,3018,204,453,719,966,3270,3535,3781,4044,1226,1475,1737,1984,2384,2137,2899,2650,348,85,863,598,3414,3167,3925,3676,1370,1107,1881,1616,2800,3065,2291,2554,764,1013,255,502,3830,4095,3317,3580,1786,2035,1273,1520,2912,2665,2403,2154,876,613,367,102,3942,3695,3429,3180,1898,1635,1385,1120,1120,1385,1635,1898,3180,3429,3695,3942,102,367,613,876,2154,2403,2665,2912,1520,1273,2035,1786,3580,3317,4095,3830,502,255,1013,764,2554,2291,3065,2800,1616,1881,1107,1370,3676,3925,3167,3414,598,863,85,348,2650,2899,2137,2384,1984,1737,1475,1226,4044,3781,3535,3270,966,719,453,204,3018,2755,2505,2240,3232,3497,3747,4010,1196,1445,1711,1958,2214,2479,2725,2988,170,419,681,928,3376,3129,3891,3642,1340,1077,1855,1590,2358,2111,2869,2620,314,51,825,560,3728,3993,3219,3482,1692,1941,1183,1430,2710,2975,2197,2460,666,915,153,400,3840,3593,3331,3082,1804,1541,1295,1030,2822,2575,2309,2060,778,515,265,0],this.triTable2=[[],[8,3,0],[9,0,1],[8,3,1,8,1,9],[11,2,3],[11,2,0,11,0,8],[11,2,3,0,1,9],[2,1,11,1,9,11,11,9,8],[10,1,2],[8,3,0,1,2,10],[9,0,2,9,2,10],[3,2,8,2,10,8,8,10,9],[10,1,3,10,3,11],[1,0,10,0,8,10,10,8,11],[0,3,9,3,11,9,9,11,10],[8,10,9,8,11,10],[8,4,7],[3,0,4,3,4,7],[1,9,0,8,4,7],[9,4,1,4,7,1,1,7,3],[2,3,11,7,8,4],[7,11,4,11,2,4,4,2,0],[3,11,2,4,7,8,9,0,1],[2,7,11,2,1,7,1,4,7,1,9,4],[10,1,2,8,4,7],[2,10,1,0,4,7,0,7,3],[4,7,8,0,2,10,0,10,9],[2,7,3,2,9,7,7,9,4,2,10,9],[8,4,7,11,10,1,11,1,3],[11,4,7,1,4,11,1,11,10,1,0,4],[3,8,0,7,11,4,11,9,4,11,10,9],[7,11,4,4,11,9,11,10,9],[9,5,4],[3,0,8,4,9,5],[5,4,0,5,0,1],[4,8,5,8,3,5,5,3,1],[11,2,3,9,5,4],[9,5,4,8,11,2,8,2,0],[3,11,2,1,5,4,1,4,0],[8,5,4,2,5,8,2,8,11,2,1,5],[2,10,1,9,5,4],[0,8,3,5,4,9,10,1,2],[10,5,2,5,4,2,2,4,0],[3,4,8,3,2,4,2,5,4,2,10,5],[5,4,9,1,3,11,1,11,10],[0,9,1,4,8,5,8,10,5,8,11,10],[3,4,0,3,10,4,4,10,5,3,11,10],[4,8,5,5,8,10,8,11,10],[9,5,7,9,7,8],[0,9,3,9,5,3,3,5,7],[8,0,7,0,1,7,7,1,5],[1,7,3,1,5,7],[11,2,3,8,9,5,8,5,7],[9,2,0,9,7,2,2,7,11,9,5,7],[0,3,8,2,1,11,1,7,11,1,5,7],[2,1,11,11,1,7,1,5,7],[1,2,10,5,7,8,5,8,9],[9,1,0,10,5,2,5,3,2,5,7,3],[5,2,10,8,2,5,8,5,7,8,0,2],[10,5,2,2,5,3,5,7,3],[3,9,1,3,8,9,7,11,10,7,10,5],[9,1,0,10,7,11,10,5,7],[3,8,0,7,10,5,7,11,10],[11,5,7,11,10,5],[11,7,6],[0,8,3,11,7,6],[9,0,1,11,7,6],[7,6,11,3,1,9,3,9,8],[2,3,7,2,7,6],[8,7,0,7,6,0,0,6,2],[1,9,0,3,7,6,3,6,2],[7,6,2,7,2,9,2,1,9,7,9,8],[1,2,10,6,11,7],[2,10,1,7,6,11,8,3,0],[11,7,6,10,9,0,10,0,2],[7,6,11,3,2,8,8,2,10,8,10,9],[6,10,7,10,1,7,7,1,3],[6,10,1,6,1,7,7,1,0,7,0,8],[9,0,3,6,9,3,6,10,9,6,3,7],[6,10,7,7,10,8,10,9,8],[8,4,6,8,6,11],[11,3,6,3,0,6,6,0,4],[0,1,9,4,6,11,4,11,8],[1,9,4,11,1,4,11,3,1,11,4,6],[3,8,2,8,4,2,2,4,6],[2,0,4,2,4,6],[1,9,0,3,8,2,2,8,4,2,4,6],[9,4,1,1,4,2,4,6,2],[10,1,2,11,8,4,11,4,6],[10,1,2,11,3,6,6,3,0,6,0,4],[0,2,10,0,10,9,4,11,8,4,6,11],[2,11,3,6,9,4,6,10,9],[8,4,6,8,6,1,6,10,1,8,1,3],[1,0,10,10,0,6,0,4,6],[8,0,3,9,6,10,9,4,6],[10,4,6,10,9,4],[9,5,4,7,6,11],[4,9,5,3,0,8,11,7,6],[6,11,7,4,0,1,4,1,5],[6,11,7,4,8,5,5,8,3,5,3,1],[4,9,5,6,2,3,6,3,7],[9,5,4,8,7,0,0,7,6,0,6,2],[4,0,1,4,1,5,6,3,7,6,2,3],[7,4,8,5,2,1,5,6,2],[6,11,7,1,2,10,9,5,4],[11,7,6,8,3,0,1,2,10,9,5,4],[11,7,6,10,5,2,2,5,4,2,4,0],[7,4,8,2,11,3,10,5,6],[4,9,5,6,10,7,7,10,1,7,1,3],[5,6,10,0,9,1,8,7,4],[5,6,10,7,0,3,7,4,0],[10,5,6,4,8,7],[5,6,9,6,11,9,9,11,8],[0,9,5,0,5,3,3,5,6,3,6,11],[0,1,5,0,5,11,5,6,11,0,11,8],[11,3,6,6,3,5,3,1,5],[9,5,6,3,9,6,3,8,9,3,6,2],[5,6,9,9,6,0,6,2,0],[0,3,8,2,5,6,2,1,5],[1,6,2,1,5,6],[1,2,10,5,6,9,9,6,11,9,11,8],[1,0,9,6,10,5,11,3,2],[6,10,5,2,8,0,2,11,8],[3,2,11,10,5,6],[10,5,6,9,3,8,9,1,3],[0,9,1,5,6,10],[8,0,3,10,5,6],[10,5,6],[10,6,5],[8,3,0,10,6,5],[0,1,9,5,10,6],[10,6,5,9,8,3,9,3,1],[3,11,2,10,6,5],[6,5,10,2,0,8,2,8,11],[1,9,0,6,5,10,11,2,3],[1,10,2,5,9,6,9,11,6,9,8,11],[1,2,6,1,6,5],[0,8,3,2,6,5,2,5,1],[5,9,6,9,0,6,6,0,2],[9,6,5,3,6,9,3,9,8,3,2,6],[11,6,3,6,5,3,3,5,1],[0,5,1,0,11,5,5,11,6,0,8,11],[0,5,9,0,3,5,3,6,5,3,11,6],[5,9,6,6,9,11,9,8,11],[10,6,5,4,7,8],[5,10,6,7,3,0,7,0,4],[5,10,6,0,1,9,8,4,7],[4,5,9,6,7,10,7,1,10,7,3,1],[7,8,4,2,3,11,10,6,5],[11,6,7,10,2,5,2,4,5,2,0,4],[11,6,7,8,0,3,1,10,2,9,4,5],[6,7,11,1,10,2,9,4,5],[7,8,4,5,1,2,5,2,6],[4,1,0,4,5,1,6,7,3,6,3,2],[9,4,5,8,0,7,0,6,7,0,2,6],[4,5,9,6,3,2,6,7,3],[6,7,11,4,5,8,5,3,8,5,1,3],[6,7,11,4,1,0,4,5,1],[4,5,9,3,8,0,11,6,7],[9,4,5,7,11,6],[10,6,4,10,4,9],[8,3,0,9,10,6,9,6,4],[1,10,0,10,6,0,0,6,4],[8,6,4,8,1,6,6,1,10,8,3,1],[2,3,11,6,4,9,6,9,10],[0,10,2,0,9,10,4,8,11,4,11,6],[10,2,1,11,6,3,6,0,3,6,4,0],[10,2,1,11,4,8,11,6,4],[9,1,4,1,2,4,4,2,6],[1,0,9,3,2,8,2,4,8,2,6,4],[2,4,0,2,6,4],[3,2,8,8,2,4,2,6,4],[1,4,9,11,4,1,11,1,3,11,6,4],[0,9,1,4,11,6,4,8,11],[11,6,3,3,6,0,6,4,0],[8,6,4,8,11,6],[6,7,10,7,8,10,10,8,9],[9,3,0,6,3,9,6,9,10,6,7,3],[6,1,10,6,7,1,7,0,1,7,8,0],[6,7,10,10,7,1,7,3,1],[7,11,6,3,8,2,8,10,2,8,9,10],[11,6,7,10,0,9,10,2,0],[2,1,10,7,11,6,8,0,3],[1,10,2,6,7,11],[7,2,6,7,9,2,2,9,1,7,8,9],[1,0,9,3,6,7,3,2,6],[8,0,7,7,0,6,0,2,6],[2,7,3,2,6,7],[7,11,6,3,9,1,3,8,9],[9,1,0,11,6,7],[0,3,8,11,6,7],[11,6,7],[11,7,5,11,5,10],[3,0,8,7,5,10,7,10,11],[9,0,1,10,11,7,10,7,5],[3,1,9,3,9,8,7,10,11,7,5,10],[10,2,5,2,3,5,5,3,7],[5,10,2,8,5,2,8,7,5,8,2,0],[9,0,1,10,2,5,5,2,3,5,3,7],[1,10,2,5,8,7,5,9,8],[2,11,1,11,7,1,1,7,5],[0,8,3,2,11,1,1,11,7,1,7,5],[9,0,2,9,2,7,2,11,7,9,7,5],[11,3,2,8,5,9,8,7,5],[1,3,7,1,7,5],[8,7,0,0,7,1,7,5,1],[0,3,9,9,3,5,3,7,5],[9,7,5,9,8,7],[4,5,8,5,10,8,8,10,11],[3,0,4,3,4,10,4,5,10,3,10,11],[0,1,9,4,5,8,8,5,10,8,10,11],[5,9,4,1,11,3,1,10,11],[3,8,4,3,4,2,2,4,5,2,5,10],[10,2,5,5,2,4,2,0,4],[0,3,8,5,9,4,10,2,1],[2,1,10,9,4,5],[8,4,5,2,8,5,2,11,8,2,5,1],[3,2,11,1,4,5,1,0,4],[9,4,5,8,2,11,8,0,2],[11,3,2,9,4,5],[4,5,8,8,5,3,5,1,3],[5,0,4,5,1,0],[3,8,0,4,5,9],[9,4,5],[7,4,11,4,9,11,11,9,10],[3,0,8,7,4,11,11,4,9,11,9,10],[11,7,4,1,11,4,1,10,11,1,4,0],[8,7,4,11,1,10,11,3,1],[2,3,7,2,7,9,7,4,9,2,9,10],[4,8,7,0,10,2,0,9,10],[2,1,10,0,7,4,0,3,7],[10,2,1,8,7,4],[2,11,7,2,7,1,1,7,4,1,4,9],[3,2,11,4,8,7,9,1,0],[7,4,11,11,4,2,4,0,2],[2,11,3,7,4,8],[9,1,4,4,1,7,1,3,7],[1,0,9,8,7,4],[3,4,0,3,7,4],[8,7,4],[8,9,10,8,10,11],[0,9,3,3,9,11,9,10,11],[1,10,0,0,10,8,10,11,8],[10,3,1,10,11,3],[3,8,2,2,8,10,8,9,10],[9,2,0,9,10,2],[8,0,3,1,10,2],[10,2,1],[2,11,1,1,11,9,11,8,9],[11,3,2,0,9,1],[11,0,2,11,8,0],[11,3,2],[8,1,3,8,9,1],[9,1,0],[8,0,3],[]]}march(e,t,r,i){let n=!!i.fulltable,o=i.hasOwnProperty("origin")&&i.origin.hasOwnProperty("x")?i.origin:{x:0,y:0,z:0},a=!!i.voxel,l=i.matrix,h=i.nX||0,c=i.nY||0,u=i.nZ||0,d=i.scale||1,p=null;p=i.unitCube?i.unitCube:{x:d,y:d,z:d};let f,m,g=new Int32Array(h*c*u);for(f=0,m=g.length;f>2))+i+((2&t)>>1))*u+s+(1&t)]&this.ISDONE)<=3&&(t.push(t[i]),i=t.length-1,t.push(t[s]),s=t.length-1,t.push(t[n]),n=t.length-1),r.push(i),r.push(s),r.push(n)}}}laplacianSmooth(e,t,r){let i,s,n,o,a,l=new Array(t.length);for(i=0,s=t.length;i1e6&&(this.scaleFactor=this.defaultScaleFactor/2);let i=1/this.scaleFactor*5.5;this.pminx=e[0][0],this.pmaxx=e[1][0],this.pminy=e[0][1],this.pmaxy=e[1][1],this.pminz=e[0][2],this.pmaxz=e[1][2],t?(this.pminx-=this.probeRadius+i,this.pminy-=this.probeRadius+i,this.pminz-=this.probeRadius+i,this.pmaxx+=this.probeRadius+i,this.pmaxy+=this.probeRadius+i,this.pmaxz+=this.probeRadius+i):(this.pminx-=i,this.pminy-=i,this.pminz-=i,this.pmaxx+=i,this.pmaxy+=i,this.pmaxz+=i),this.pminx=Math.floor(this.pminx*this.scaleFactor)/this.scaleFactor,this.pminy=Math.floor(this.pminy*this.scaleFactor)/this.scaleFactor,this.pminz=Math.floor(this.pminz*this.scaleFactor)/this.scaleFactor,this.pmaxx=Math.ceil(this.pmaxx*this.scaleFactor)/this.scaleFactor,this.pmaxy=Math.ceil(this.pmaxy*this.scaleFactor)/this.scaleFactor,this.pmaxz=Math.ceil(this.pmaxz*this.scaleFactor)/this.scaleFactor,this.ptranx=-this.pminx,this.ptrany=-this.pminy,this.ptranz=-this.pminz,this.pLength=Math.ceil(this.scaleFactor*(this.pmaxx-this.pminx))+1,this.pWidth=Math.ceil(this.scaleFactor*(this.pmaxy-this.pminy))+1,this.pHeight=Math.ceil(this.scaleFactor*(this.pmaxz-this.pminz))+1,this.boundingatom(t),this.cutRadius=this.probeRadius*this.scaleFactor,this.vpBits=new Uint8Array(this.pLength*this.pWidth*this.pHeight),this.vpDistance=new Float64Array(this.pLength*this.pWidth*this.pHeight),this.vpAtomID=new Int32Array(this.pLength*this.pWidth*this.pHeight)}boundingatom(e){let t={};for(const r in this.vdwRadii){let i=this.vdwRadii[r];t[r]=e?(i+this.probeRadius)*this.scaleFactor+.5:i*this.scaleFactor+.5;let s=t[r]*t[r];this.widxz[r]=Math.floor(t[r])+1,this.depty[r]=new Int32Array(this.widxz[r]*this.widxz[r]);let n=0;for(let e=0;es)this.depty[r][n]=-1;else{let e=Math.sqrt(s-i);this.depty[r][n]=Math.floor(e)}n++}}}fillvoxels(e,t){for(let e=0,t=this.vpBits.length;e=this.pLength||h>=this.pWidth||c>=this.pHeight)continue;let d=o*a+h*this.pHeight+c;if(this.vpBits[d]&this.INOUT){let o=t[this.vpAtomID[d]];if(o.serial!=e.serial){let t=r+p-Math.floor(.5+this.scaleFactor*(o.x+this.ptranx)),a=i+n-Math.floor(.5+this.scaleFactor*(o.y+this.ptrany)),l=s+f-Math.floor(.5+this.scaleFactor*(o.z+this.ptranz));p*p+n*n+f*f=this.pLength||h>=this.pWidth||c>=this.pHeight)continue;let d=o*a+h*this.pHeight+c;if(this.vpBits[d]&this.ISDONE){let o=t[this.vpAtomID[d]];if(o.serial!=e.serial){let t=i+p-Math.floor(.5+this.scaleFactor*(o.x+this.ptranx)),a=s+r-Math.floor(.5+this.scaleFactor*(o.y+this.ptrany)),l=n+f-Math.floor(.5+this.scaleFactor*(o.z+this.ptranz));p*p+r*r+f*f-1&&o-1&&l-1&&a=a)||(this.vpBits[e]|=this.ISBOUND))}fastoneshell(e,t){let r,i,s,n,o,a,l,h,c,u=[];if(0===e.length)return u;let d={ix:-1,iy:-1,iz:-1},p=this.pWidth*this.pHeight;for(let f=0,m=e.length;f-1&&d.iy-1&&d.iz-1&&(c=d.ix*p+this.pHeight*d.iy+d.iz,this.vpBits[c]&this.INOUT&&!(this.vpBits[c]&this.ISDONE)?(t.set(d.ix,d.iy,s+this.nb[e][2],h),n=d.ix-h.ix,o=d.iy-h.iy,a=d.iz-h.iz,l=n*n+o*o+a*a,this.vpDistance[c]=l,this.vpBits[c]|=this.ISDONE,this.vpBits[c]|=this.ISBOUND,u.push({ix:d.ix,iy:d.iy,iz:d.iz})):this.vpBits[c]&this.INOUT&&this.vpBits[c]&this.ISDONE&&(n=d.ix-h.ix,o=d.iy-h.iy,a=d.iz-h.iz,l=n*n+o*o+a*a,l-1&&d.iy-1&&d.iz-1&&(c=d.ix*p+this.pHeight*d.iy+d.iz,this.vpBits[c]&this.INOUT&&!(this.vpBits[c]&this.ISDONE)?(t.set(d.ix,d.iy,s+this.nb[e][2],h),n=d.ix-h.ix,o=d.iy-h.iy,a=d.iz-h.iz,l=n*n+o*o+a*a,this.vpDistance[c]=l,this.vpBits[c]|=this.ISDONE,this.vpBits[c]|=this.ISBOUND,u.push({ix:d.ix,iy:d.iy,iz:d.iz})):this.vpBits[c]&this.INOUT&&this.vpBits[c]&this.ISDONE&&(n=d.ix-h.ix,o=d.iy-h.iy,a=d.iz-h.iz,l=n*n+o*o+a*a,l-1&&d.iy-1&&d.iz-1&&(c=d.ix*p+this.pHeight*d.iy+d.iz,this.vpBits[c]&this.INOUT&&!(this.vpBits[c]&this.ISDONE)?(t.set(d.ix,d.iy,s+this.nb[e][2],h),n=d.ix-h.ix,o=d.iy-h.iy,a=d.iz-h.iz,l=n*n+o*o+a*a,this.vpDistance[c]=l,this.vpBits[c]|=this.ISDONE,this.vpBits[c]|=this.ISBOUND,u.push({ix:d.ix,iy:d.iy,iz:d.iz})):this.vpBits[c]&this.INOUT&&this.vpBits[c]&this.ISDONE&&(n=d.ix-h.ix,o=d.iy-h.iy,a=d.iz-h.iz,l=n*n+o*o+a*a,l{"use strict";r.r(t),r.d(t,{VolumeData:()=>l});var i=r("./src/utilities.ts"),s=r("./src/WebGL/math/index.ts"),n=r("./src/parsers/VASP.ts"),o=r("./src/parsers/CUBE.ts"),a=r("./node_modules/pako/dist/pako.esm.mjs");class l{constructor(e,t,r){if(this.unit={x:1,y:1,z:1},this.origin={x:0,y:0,z:0},this.size={x:0,y:0,z:0},this.data=new Float32Array([]),this.matrix=null,this.inversematrix=null,this.isbinary=new Set(["ccp4","CCP4"]),this.getCoordinates=function(e){var t=e/(this.size.y*this.size.z),r=e%(this.size.y*this.size.z),i=e%this.size.z;return t*=this.unit.x,r*=this.unit.y,i*=this.unit.z,{x:t+=this.origin.x,y:r+=this.origin.y,z:i+=this.origin.z}},this.vasp=function(e){var t=e.replace(/^\s+/,"").split(/[\n\r]/),r=(0,n.VASP)(e)[0].length;if(0==r)return console.log("No good formating of CHG or CHGCAR file, not atomic information provided in the file."),void(this.data=[]);var i,o=1.889725992,a=parseFloat(t[1]);i=t[2].replace(/^\s+/,"").split(/\s+/);var l=new s.Vector3(parseFloat(i[0]),parseFloat(i[1]),parseFloat(i[2])).multiplyScalar(a*o);i=t[3].replace(/^\s+/,"").split(/\s+/);var h=new s.Vector3(parseFloat(i[0]),parseFloat(i[1]),parseFloat(i[2])).multiplyScalar(a*o);i=t[4].replace(/^\s+/,"").split(/\s+/);var c=new s.Vector3(parseFloat(i[0]),parseFloat(i[1]),parseFloat(i[2])).multiplyScalar(a*o),u=l.x*(h.y*c.z-c.y*h.z)-h.x*(l.y*c.z-c.y*l.z)+c.x*(l.y*h.z-h.y*l.z),d=1/(u=Math.abs(u)/Math.pow(o,3));t.splice(0,8+r+1);var p=t[0].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),f=Math.abs(parseFloat(p[0])),m=Math.abs(parseFloat(p[1])),g=Math.abs(parseFloat(p[2])),v=this.origin=new s.Vector3(0,0,0);this.size={x:f,y:m,z:g},this.unit=new s.Vector3(l.x,h.y,c.z),l=l.multiplyScalar(1/(o*f)),h=h.multiplyScalar(1/(o*m)),c=c.multiplyScalar(1/(o*g)),0==l.y&&0==l.z&&0==h.x&&0==h.z&&0==c.x&&0==c.y||(this.matrix=new s.Matrix4(l.x,h.x,c.x,0,l.y,h.y,c.y,0,l.z,h.z,c.z,0,0,0,0,1),this.matrix=this.matrix.multiplyMatrices(this.matrix,(new s.Matrix4).makeTranslation(v.x,v.y,v.z)),this.origin=new s.Vector3(0,0,0),this.unit=new s.Vector3(1,1,1)),t.splice(0,1);var b=t.join(" "),y=(b=b.replace(/^\s+/,"")).split(/[\s\r]+/);y.splice(f*m*g+1);for(var _=Float32Array.from(y,parseFloat),w=0;w<_.length;w++)_[w]=_[w]*d*.036749309;this.data=_},this.dx=function(e){var t,r=e.split(/[\n\r]+/),i=/gridpositions\s+counts\s+(\d+)\s+(\d+)\s+(\d+)/,n=/^origin\s+(\S+)\s+(\S+)\s+(\S+)/,o=/^delta\s+(\S+)\s+(\S+)\s+(\S+)/,a=/data follows/,l=0;for(l=0;l=this.size.x||t<0||t>=this.size.y||r<0||r>=this.size.z?-1:e*this.size.y*this.size.z+t*this.size.z+r}getVal(e,t,r){let i=this.getIndex(e,t,r);return i<0?0:this.data[i]}cube(e){var t=e.split(/\r?\n/);if(!(t.length<6)){var r=(0,o.CUBE)(e,{}).modelData[0].cryst,i=t[2].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),s=parseFloat(i[0]),n=Math.abs(s);this.origin=r.origin,this.size=r.size,this.unit=r.unit,this.matrix=r.matrix4;var a=6;s<0&&a++;var l=t.splice(n+a).join(" "),h=(l=l.replace(/^\s+/,"")).split(/[\s\r]+/);this.data=Float32Array.from(h,parseFloat)}}ccp4(e){var t={};e=new Int8Array(e);var r=new Int32Array(e.buffer,0,56),i=new Float32Array(e.buffer,0,56),n=new DataView(e.buffer);if(t.MAP=String.fromCharCode(n.getUint8(208),n.getUint8(209),n.getUint8(210),n.getUint8(211)),t.MACHST=[n.getUint8(212),n.getUint8(213)],17===t.MACHST[0]&&17===t.MACHST[1])for(var o=e.byteLength,a=0;a{"use strict";r.r(t),r.d(t,{GLVolumetricRender:()=>l});var i=r("./src/WebGL/shapes/index.ts"),s=r("./src/WebGL/math/index.ts"),n=r("./src/WebGL/index.ts"),o=r("./src/colors.ts"),a=r("./src/GLShape.ts");class l{static interpolateArray(e,t){function r(e,t,r){return e+(t-e)*r}var i=[],s=(e.length-1)/(t-1);i[0]=e[0];for(var n=1;n=0||e.getIndex(c,u,d)>=0)for(let t=a;t=0&&!r[a]&&(t-o.x)*(t-o.x)+(i-o.y)*(i-o.y)+(n-o.z)*(n-o.z){"use strict";r.r(t),r.d(t,{Camera:()=>n});var i=r("./src/WebGL/core/index.ts"),s=r("./src/WebGL/math/index.ts");class n extends i.Object3D{constructor(e=50,t=1,r=.1,i=2e3,n=!1){super(),this.projectionMatrix=new s.Matrix4,this.projectionMatrixInverse=new s.Matrix4,this.matrixWorldInverse=new s.Matrix4,this.fov=e,this.aspect=t,this.near=r,this.far=i;var o=this.position.z;this.right=o*Math.tan(Math.PI/180*e),this.left=-this.right,this.top=this.right/this.aspect,this.bottom=-this.top,this.ortho=!!n,this.updateProjectionMatrix()}lookAt(e){this.matrix.lookAt(this.position,e,this.up),this.rotationAutoUpdate&&(!1===this.useQuaternion&&this.rotation instanceof s.Vector3?this.rotation.setEulerFromRotationMatrix(this.matrix,this.eulerOrder):console.error("Unimplemented math operation."))}updateProjectionMatrix(){this.ortho?this.projectionMatrix.makeOrthographic(this.left,this.right,this.top,this.bottom,this.near,this.far):this.projectionMatrix.makePerspective(this.fov,this.aspect,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)}}},"./src/WebGL/Fog.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Fog:()=>s});var i=r("./src/colors.ts");class s{constructor(e,t=1,r=1e3){this.name="",this.color=new i.Color(e),this.near=t,this.far=r}clone(){return new s(this.color.getHex(),this.near,this.far)}}},"./src/WebGL/Renderer.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Renderer:()=>p});var i=r("./src/WebGL/Camera.ts"),s=r("./src/WebGL/constants/Sides.ts"),n=r("./src/WebGL/constants/TextureConstants.ts"),o=r("./src/WebGL/core/index.ts"),a=r("./src/colors.ts"),l=r("./src/WebGL/materials/index.ts"),h=r("./src/WebGL/math/index.ts"),c=r("./src/WebGL/objects/index.ts"),u=r("./src/WebGL/shaders/index.ts"),d=r("./src/WebGL/SpritePlugin.ts");class p{constructor(e){this.context=null,this.devicePixelRatio=1,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.autoUpdateObjects=!0,this.autoUpdateScene=!0,this.info={memory:{programs:0,geometries:0,textures:0},render:{calls:0,vertices:0,faces:0,points:0}},this._programs=[],this._programs_counter=0,this._webglversion=1,this._currentProgram=null,this._currentMaterialId=-1,this._currentGeometryGroupHash=null,this._currentCamera=null,this._geometryGroupCounter=0,this._oldDoubleSided=-1,this._oldFlipSided=-1,this._oldDepthTest=-1,this._oldDepthWrite=-1,this._oldPolygonOffset=null,this._oldLineWidth=null,this._viewportWidth=0,this._viewportHeight=0,this._currentWidth=0,this._currentHeight=0,this._enabledAttributes={},this._projScreenMatrix=new h.Matrix4,this._vector3=new h.Vector3,this._worldInverse=new h.Matrix4,this._projInverse=new h.Matrix4,this._textureMatrix=new h.Matrix4,this._direction=new h.Vector3,this._lightsNeedUpdate=!0,this._lights={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[],distances:[]},spot:{length:0,colors:[],positions:[],distances:[],directions:[],anglesCos:[],exponents:[]},hemi:{length:0,skyColors:[],groundColors:[],positions:[]}},this.sprites=new d.SpritePlugin,this._screenshader=null,this._vertexattribpos=null,this._screenQuadVBO=null,this._fb=null,this._targetTexture=null,this._depthTexture=null,e=e||{},this.row=e.row,this.col=e.col,this.rows=e.rows,this.cols=e.cols,this._canvas=void 0!==e.canvas?e.canvas:document.createElement("canvas"),this._precision=void 0!==e.precision?e.precision:"highp",this._alpha=void 0===e.alpha||e.alpha,this._premultipliedAlpha=void 0===e.premultipliedAlpha||e.premultipliedAlpha,this._antialias=void 0!==e.antialias&&e.antialias,this._stencil=void 0===e.stencil||e.stencil,this._preserveDrawingBuffer=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,this._clearColor=void 0!==e.clearColor?new a.Color(e.clearColor):new a.Color(0),this._clearAlpha=void 0!==e.clearAlpha?e.clearAlpha:0,this._outlineMaterial=new l.MeshOutlineMaterial(e.outline),this._outlineSphereImposterMaterial=new l.SphereImposterOutlineMaterial(e.outline),this._outlineStickImposterMaterial=new l.StickImposterOutlineMaterial(e.outline),this._outlineEnabled=!!e.outline,this.domElement=this._canvas,this._canvas.id=e.id,this.initGL(),this.setDefaultGLState(),this.context=this._gl,this.isWebGL1()?this._extInstanced=this._gl.getExtension("ANGLE_instanced_arrays"):this._extInstanced={vertexAttribDivisorANGLE:this._gl.vertexAttribDivisor.bind(this._gl),drawElementsInstancedANGLE:this._gl.drawElementsInstanced.bind(this._gl)},this._extFragDepth=this._gl.getExtension("EXT_frag_depth"),this._extFloatLinear=this._gl.getExtension("OES_texture_float_linear"),this._extColorBufferFloat=this._gl.getExtension("EXT_color_buffer_float"),this.sprites.init(this)}supportedExtensions(){return{supportsAIA:Boolean(this._extInstanced),supportsImposters:Boolean(this._extFragDepth)||!this.isWebGL1(),regen:!1}}getContext(){return this._gl}getCanvas(){return this._canvas}isLost(){return this._gl.isContextLost()}getPrecision(){return this._precision}setClearColorHex(e,t){this._clearColor.setHex(e),this._clearAlpha=t,this._gl.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearAlpha)}enableOutline(e){this._outlineMaterial=new l.MeshOutlineMaterial(e),this._outlineSphereImposterMaterial=new l.SphereImposterOutlineMaterial(e),this._outlineStickImposterMaterial=new l.StickImposterOutlineMaterial(e),this._outlineEnabled=!0}disableOutline(){this._outlineEnabled=!1}setViewport(){if(null!=this.rows&&null!=this.cols&&null!=this.row&&null!=this.col){var e=this._canvas.width/this.cols,t=this._canvas.height/this.rows;this._viewportWidth=e,this._viewportHeight=t,this._gl.enable(this._gl.SCISSOR_TEST),this._gl.scissor(e*this.col,t*this.row,e,t),this._gl.viewport(e*this.col,t*this.row,e,t)}}setSize(e,t){if(this.devicePixelRatio=void 0!==window.devicePixelRatio?window.devicePixelRatio:1,this._antialias&&this.devicePixelRatio<2&&(this.devicePixelRatio*=2),null!=this.rows&&null!=this.cols&&null!=this.row&&null!=this.col){var r=e/this.cols,i=t/this.rows;this._canvas.width=e*this.devicePixelRatio,this._canvas.height=t*this.devicePixelRatio,this._viewportWidth=r*this.devicePixelRatio,this._viewportHeight=i*this.devicePixelRatio,this._canvas.style.width=e+"px",this._canvas.style.height=t+"px",this.setViewport()}else this._viewportWidth=this._canvas.width=e*this.devicePixelRatio,this._viewportHeight=this._canvas.height=t*this.devicePixelRatio,this._canvas.style.width=e+"px",this._canvas.style.height=t+"px",this._gl.viewport(0,0,this._gl.drawingBufferWidth,this._gl.drawingBufferHeight);this.initFrameBuffer()}clear(e,t,r){var i=0;(void 0===e||e)&&(i|=this._gl.COLOR_BUFFER_BIT),(void 0===t||t)&&(i|=this._gl.DEPTH_BUFFER_BIT),(void 0===r||r)&&(i|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(i)}clearTarget(e,t,r){this.clear(e,t,r)}setMaterialFaces(e,t){var r=e.side===s.DoubleSide,i=e.side===s.BackSide;e.imposter||(i=t?!i:i),this._oldDoubleSided!==r&&(r?this._gl.disable(this._gl.CULL_FACE):this._gl.enable(this._gl.CULL_FACE),this._oldDoubleSided=r),this._oldFlipSided!==i&&(i?this._gl.frontFace(this._gl.CW):this._gl.frontFace(this._gl.CCW),this._oldFlipSided=i),this._gl.cullFace(this._gl.BACK)}setDepthTest(e){this._oldDepthTest!==e&&(e?this._gl.enable(this._gl.DEPTH_TEST):this._gl.disable(this._gl.DEPTH_TEST),this._oldDepthTest=e)}setDepthWrite(e){this._oldDepthWrite!==e&&(this._gl.depthMask(e),this._oldDepthWrite=e)}setBlending(e){e?(this._gl.enable(this._gl.BLEND),this._gl.blendEquationSeparate(this._gl.FUNC_ADD,this._gl.FUNC_ADD),this._gl.blendFuncSeparate(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA)):this._gl.disable(this._gl.BLEND)}initMaterial(e,t,r,i){var s,n;if(e.addEventListener("dispose",this.onMaterialDispose.bind(this)),n=e.shaderID){var o=u.ShaderLib[n];e.vertexShader=o.vertexShader,e.fragmentShader=o.fragmentShader,e.uniforms=u.ShaderUtils.clone(o.uniforms)}s={wireframe:e.wireframe,fragdepth:e.imposter,volumetric:e.volumetric},e.program=this.buildProgram(e.fragmentShader,e.vertexShader,e.uniforms,s)}renderBuffer(e,t,r,i,s,n){var o,a;if(i.visible&&(o=this.setProgram(e,t,r,i,n,this))){a=o.attributes;var l,h,u=!1,d=i.wireframe?1:0,p=16777215*s.id+2*o.id+d;if(p!==this._currentGeometryGroupHash&&(this._currentGeometryGroupHash=p,u=!0),u&&(this.disableAttributes(),a.position>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,s.__webglVertexBuffer),this.enableAttribute(a.position),this._gl.vertexAttribPointer(a.position,3,this._gl.FLOAT,!1,0,0)),a.color>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,s.__webglColorBuffer),this.enableAttribute(a.color),this._gl.vertexAttribPointer(a.color,3,this._gl.FLOAT,!1,0,0)),a.normal>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,s.__webglNormalBuffer),this.enableAttribute(a.normal),this._gl.vertexAttribPointer(a.normal,3,this._gl.FLOAT,!1,0,0)),a.offset>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,s.__webglOffsetBuffer),this.enableAttribute(a.offset),this._gl.vertexAttribPointer(a.offset,3,this._gl.FLOAT,!1,0,0)),a.radius>=0&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,s.__webglRadiusBuffer),this.enableAttribute(a.radius),this._gl.vertexAttribPointer(a.radius,1,this._gl.FLOAT,!1,0,0))),n instanceof c.Mesh){if("instanced"===i.shaderID){var f=i.sphere.geometryGroups[0];u&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,s.__webglVertexBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,f.vertexArray,this._gl.STATIC_DRAW),this._gl.bindBuffer(this._gl.ARRAY_BUFFER,s.__webglNormalBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,f.normalArray,this._gl.STATIC_DRAW),this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,s.__webglFaceBuffer),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,f.faceArray,this._gl.STATIC_DRAW)),l=f.faceidx,this._extInstanced.vertexAttribDivisorANGLE(a.offset,1),this._extInstanced.vertexAttribDivisorANGLE(a.radius,1),this._extInstanced.vertexAttribDivisorANGLE(a.color,1),this._extInstanced.drawElementsInstancedANGLE(this._gl.TRIANGLES,l,this._gl.UNSIGNED_SHORT,0,s.radiusArray.length),this._extInstanced.vertexAttribDivisorANGLE(a.offset,0),this._extInstanced.vertexAttribDivisorANGLE(a.radius,0),this._extInstanced.vertexAttribDivisorANGLE(a.color,0)}else i.wireframe?(h=s.lineidx,this.setLineWidth(i.wireframeLinewidth),u&&this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,s.__webglLineBuffer),this._gl.drawElements(this._gl.LINES,h,this._gl.UNSIGNED_SHORT,0)):(l=s.faceidx,u&&this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,s.__webglFaceBuffer),this._gl.drawElements(this._gl.TRIANGLES,l,this._gl.UNSIGNED_SHORT,0));this.info.render.calls++,this.info.render.vertices+=l,this.info.render.faces+=l/3}else n instanceof c.Line&&(h=s.vertices,this.setLineWidth(i.linewidth),this._gl.drawArrays(this._gl.LINES,0,h),this.info.render.calls++)}}render(e,t,r){if(t instanceof i.Camera!=0){var s,n,o,a,l,h=e.__lights,c=e.fog;this._currentMaterialId=-1,this._lightsNeedUpdate=!0,this.autoUpdateScene&&e.updateMatrixWorld(),void 0===t.parent&&t.updateMatrixWorld(),t.matrixWorldInverse.getInverse(t.matrixWorld),this._projScreenMatrix.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this.autoUpdateObjects&&this.initWebGLObjects(e),this.info.render.calls=0,this.info.render.vertices=0,this.info.render.faces=0,this.info.render.points=0,this._currentWidth=this._viewportWidth,this._currentHeight=this._viewportHeight,this.setViewport(),this.setFrameBuffer(),(this.autoClear||r)&&(this._gl.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearAlpha),this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil));var u=!1;for(s=0,n=(l=e.__webglObjects).length;s=0;--r)e[r].object===t&&e.splice(r,1)}removeInstancesDirect(e,t){for(var r=e.length-1;r>=0;--r)e[r]===t&&e.splice(r,1)}unrollBufferMaterial(e){var t=e.object.material;if(t.volumetric)e.opaque=null,e.transparent=null,e.volumetric=t;else if(t.transparent){if(e.opaque=null,e.volumetric=null,e.transparent=t,!t.wireframe){var r=t.clone();r.opacity=0,e.blank=r}}else e.opaque=t,e.transparent=null,e.volumetric=null}setBuffers(e,t){var r=e.vertexArray,i=e.colorArray;if(void 0!==e.__webglOffsetBuffer?(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,e.__webglOffsetBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,r,t)):(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,e.__webglVertexBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,r,t)),this._gl.bindBuffer(this._gl.ARRAY_BUFFER,e.__webglColorBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,i,t),e.normalArray&&void 0!==e.__webglNormalBuffer){var s=e.normalArray;this._gl.bindBuffer(this._gl.ARRAY_BUFFER,e.__webglNormalBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,s,t)}if(e.radiusArray&&void 0!==e.__webglRadiusBuffer&&(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,e.__webglRadiusBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,e.radiusArray,t)),e.faceArray&&void 0!==e.__webglFaceBuffer){var n=e.faceArray;this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,e.__webglFaceBuffer),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,n,t)}if(e.lineArray&&void 0!==e.__webglLineBuffer){var o=e.lineArray;this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,e.__webglLineBuffer),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,o,t)}}createMeshBuffers(e){e.radiusArray&&(e.__webglRadiusBuffer=this._gl.createBuffer()),e.useOffset&&(e.__webglOffsetBuffer=this._gl.createBuffer()),e.__webglVertexBuffer=this._gl.createBuffer(),e.__webglNormalBuffer=this._gl.createBuffer(),e.__webglColorBuffer=this._gl.createBuffer(),e.__webglFaceBuffer=this._gl.createBuffer(),e.__webglLineBuffer=this._gl.createBuffer(),this.info.memory.geometries++}createLineBuffers(e){e.__webglVertexBuffer=this._gl.createBuffer(),e.__webglColorBuffer=this._gl.createBuffer(),this.info.memory.geometries++}addBuffer(e,t,r){e.push({buffer:t,object:r,opaque:null,transparent:null})}setupMatrices(e,t){e._modelViewMatrix.multiplyMatrices(t.matrixWorldInverse,e.matrixWorld),e._normalMatrix.getInverse(e._modelViewMatrix),e._normalMatrix.transpose()}filterFallback(e){return this._gl.LINEAR}setTextureParameters(e,t){e==this._gl.TEXTURE_2D?(this._gl.texParameteri(e,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(e,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(e,this._gl.TEXTURE_MAG_FILTER,this.filterFallback(t.magFilter)),this._gl.texParameteri(e,this._gl.TEXTURE_MIN_FILTER,this.filterFallback(t.minFilter))):(this._gl.texParameteri(e,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(e,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(e,this._gl.TEXTURE_WRAP_R,this._gl.CLAMP_TO_EDGE),this._extColorBufferFloat&&this._extFloatLinear?(this._gl.texParameteri(e,this._gl.TEXTURE_MAG_FILTER,this._gl.LINEAR),this._gl.texParameteri(e,this._gl.TEXTURE_MIN_FILTER,this._gl.LINEAR)):(this._gl.texParameteri(e,this._gl.TEXTURE_MAG_FILTER,this._gl.NEAREST),this._gl.texParameteri(e,this._gl.TEXTURE_MIN_FILTER,this._gl.NEAREST)))}paramToGL(e){return e===n.UnsignedByteType?this._gl.UNSIGNED_BYTE:e===n.RGBAFormat?this._gl.RGBA:e===n.NearestFilter?this._gl.NEAREST:0}setupLights(e,t){var r,i,s,n,a,l=this._lights,h=l.directional.colors,c=l.directional.positions,u=0,d=0;for(r=0,i=t.length;r{"use strict";r.r(t),r.d(t,{SpritePlugin:()=>s});var i=r("./src/WebGL/shaders/index.ts");class s{constructor(){this.sprite={vertices:null,faces:null,vertexBuffer:null,elementBuffer:null,program:null,attributes:{},uniforms:null}}init(e){this.gl=e.context,this.renderer=e,this.precision=e.getPrecision(),this.sprite.vertices=new Float32Array(16),this.sprite.faces=new Uint16Array(6);var t=0;this.sprite.vertices[t++]=-1,this.sprite.vertices[t++]=-1,this.sprite.vertices[t++]=0,this.sprite.vertices[t++]=0,this.sprite.vertices[t++]=1,this.sprite.vertices[t++]=-1,this.sprite.vertices[t++]=1,this.sprite.vertices[t++]=0,this.sprite.vertices[t++]=1,this.sprite.vertices[t++]=1,this.sprite.vertices[t++]=1,this.sprite.vertices[t++]=1,this.sprite.vertices[t++]=-1,this.sprite.vertices[t++]=1,this.sprite.vertices[t++]=0,this.sprite.vertices[t++]=1,t=0,this.sprite.faces[t++]=0,this.sprite.faces[t++]=1,this.sprite.faces[t++]=2,this.sprite.faces[t++]=0,this.sprite.faces[t++]=2,this.sprite.faces[t++]=3,this.sprite.vertexBuffer=this.gl.createBuffer(),this.sprite.elementBuffer=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.sprite.vertexBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,this.sprite.vertices,this.gl.STATIC_DRAW),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.sprite.elementBuffer),this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,this.sprite.faces,this.gl.STATIC_DRAW),this.sprite.program=this.createProgram(i.ShaderLib.sprite,this.precision||1),this.sprite.attributes={};const r={};this.sprite.attributes.position=this.gl.getAttribLocation(this.sprite.program,"position"),this.sprite.attributes.uv=this.gl.getAttribLocation(this.sprite.program,"uv"),r.uvOffset=this.gl.getUniformLocation(this.sprite.program,"uvOffset"),r.uvScale=this.gl.getUniformLocation(this.sprite.program,"uvScale"),r.rotation=this.gl.getUniformLocation(this.sprite.program,"rotation"),r.scale=this.gl.getUniformLocation(this.sprite.program,"scale"),r.alignment=this.gl.getUniformLocation(this.sprite.program,"alignment"),r.color=this.gl.getUniformLocation(this.sprite.program,"color"),r.map=this.gl.getUniformLocation(this.sprite.program,"map"),r.opacity=this.gl.getUniformLocation(this.sprite.program,"opacity"),r.useScreenCoordinates=this.gl.getUniformLocation(this.sprite.program,"useScreenCoordinates"),r.screenPosition=this.gl.getUniformLocation(this.sprite.program,"screenPosition"),r.modelViewMatrix=this.gl.getUniformLocation(this.sprite.program,"modelViewMatrix"),r.projectionMatrix=this.gl.getUniformLocation(this.sprite.program,"projectionMatrix"),r.fogType=this.gl.getUniformLocation(this.sprite.program,"fogType"),r.fogDensity=this.gl.getUniformLocation(this.sprite.program,"fogDensity"),r.fogNear=this.gl.getUniformLocation(this.sprite.program,"fogNear"),r.fogFar=this.gl.getUniformLocation(this.sprite.program,"fogFar"),r.fogColor=this.gl.getUniformLocation(this.sprite.program,"fogColor"),r.alphaTest=this.gl.getUniformLocation(this.sprite.program,"alphaTest"),this.sprite.uniforms=r}render(e,t,r,i,s){var o,a,l,h,c,u,d,p,f,m;if(!this.gl)throw new Error("WebGLRenderer not initialized");let g=[];null===(o=null==e?void 0:e.__webglSprites)||void 0===o||o.forEach((e=>{(s&&0==e.material.depthTest||!s&&e.material.depthTest)&&g.push(e)}));let v=g.length;if(!v)return;const b=this.sprite.attributes,y=this.sprite.uniforms;if(!y)throw new Error("Uniforms not defined");var _=.5*r,w=.5*i;this.gl.useProgram(this.sprite.program),this.gl.enableVertexAttribArray(b.position),this.gl.enableVertexAttribArray(b.uv),this.gl.disable(this.gl.CULL_FACE),this.gl.enable(this.gl.BLEND),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.sprite.vertexBuffer),this.gl.vertexAttribPointer(b.position,2,this.gl.FLOAT,!1,16,0),this.gl.vertexAttribPointer(b.uv,2,this.gl.FLOAT,!1,16,8),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.sprite.elementBuffer),this.gl.uniformMatrix4fv(y.projectionMatrix,!1,t.projectionMatrix.elements),this.gl.activeTexture(this.gl.TEXTURE0),this.gl.uniform1i(y.map,0);var x,S=0,A=0,C=e.fog;let M,L,E,z;C?(this.gl.uniform3f(y.fogColor,C.color.r,C.color.g,C.color.b),this.gl.uniform1f(y.fogNear,C.near),this.gl.uniform1f(y.fogFar,C.far),this.gl.uniform1i(y.fogType,1),S=1,A=1):(this.gl.uniform1i(y.fogType,0),S=0,A=0);let k=[];for(x=0;x{"use strict";var i;r.r(t),r.d(t,{Coloring:()=>i}),function(e){e[e.NoColors=0]="NoColors",e[e.FaceColors=1]="FaceColors",e[e.VertexColors=2]="VertexColors"}(i||(i={}))},"./src/WebGL/constants/Shading.ts":(e,t,r)=>{"use strict";var i;r.r(t),r.d(t,{Shading:()=>i}),function(e){e[e.NoShading=0]="NoShading",e[e.FlatShading=1]="FlatShading",e[e.SmoothShading=2]="SmoothShading"}(i||(i={}))},"./src/WebGL/constants/Sides.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{BackSide:()=>s,DoubleSide:()=>n,FrontSide:()=>i});const i=0,s=1,n=2},"./src/WebGL/constants/SpriteAlignment.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{SpriteAlignment:()=>s});var i=r("./src/WebGL/math/index.ts");const s={topLeft:new i.Vector2(1,-1),topCenter:new i.Vector2(0,-1),topRight:new i.Vector2(-1,-1),centerLeft:new i.Vector2(1,0),center:new i.Vector2(0,0),centerRight:new i.Vector2(-1,0),bottomLeft:new i.Vector2(1,1),bottomCenter:new i.Vector2(0,1),bottomRight:new i.Vector2(-1,1)}},"./src/WebGL/constants/TextureConstants.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{ClampToEdgeWrapping:()=>i,FloatType:()=>l,LinearFilter:()=>s,LinearMipMapLinearFilter:()=>o,NearestFilter:()=>n,R32Format:()=>u,RFormat:()=>c,RGBAFormat:()=>h,UnsignedByteType:()=>a});const i=1001,s=1006,n=1007,o=1008,a=1009,l=1010,h=1021,c=1022,u=1023},"./src/WebGL/constants/TextureOperations.ts":(e,t,r)=>{"use strict";var i;r.r(t),r.d(t,{TextureOperations:()=>i}),function(e){e[e.MultiplyOperation=0]="MultiplyOperation",e[e.MixOperation=1]="MixOperation",e[e.AddOperation=2]="AddOperation"}(i||(i={}))},"./src/WebGL/constants/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{BackSide:()=>s.BackSide,ClampToEdgeWrapping:()=>a.ClampToEdgeWrapping,Coloring:()=>i.Coloring,DoubleSide:()=>s.DoubleSide,FloatType:()=>a.FloatType,FrontSide:()=>s.FrontSide,LinearFilter:()=>a.LinearFilter,LinearMipMapLinearFilter:()=>a.LinearMipMapLinearFilter,NearestFilter:()=>a.NearestFilter,R32Format:()=>a.R32Format,RFormat:()=>a.RFormat,RGBAFormat:()=>a.RGBAFormat,Shading:()=>n.Shading,SpriteAlignment:()=>o.SpriteAlignment,TextureOperations:()=>l.TextureOperations,UnsignedByteType:()=>a.UnsignedByteType});var i=r("./src/WebGL/constants/Coloring.ts"),s=r("./src/WebGL/constants/Sides.ts"),n=r("./src/WebGL/constants/Shading.ts"),o=r("./src/WebGL/constants/SpriteAlignment.ts"),a=r("./src/WebGL/constants/TextureConstants.ts"),l=r("./src/WebGL/constants/TextureOperations.ts")},"./src/WebGL/core/EventDispatcher.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{EventDispatcher:()=>i});class i{constructor(){this.listeners={}}dispatchEvent(e){var t=this.listeners[e.type];if(void 0!==t){e.target=this;for(var r=0,i=t.length;r{"use strict";r.r(t),r.d(t,{Geometry:()=>l,GeometryGroup:()=>a,GeometryIDCount:()=>h});var i=r("./src/WebGL/materials/LineBasicMaterial.ts"),s=r("./src/WebGL/core/EventDispatcher.ts"),n=r("./src/WebGL/math/index.ts"),o=r("./src/colors.ts");class a{constructor(e=0){this.vertexArray=null,this.colorArray=null,this.normalArray=null,this.radiusArray=null,this.faceArray=null,this.lineArray=null,this.vertices=0,this.faceidx=0,this.lineidx=0,this.__inittedArrays=!1,this.id=e}setColors(e){var t=this.vertexArray,r=this.colorArray;if(!t)throw new Error("vertex array not initialized");if(!r)throw new Error("color array not initialized");if(t.length==r.length)for(var i=0;i0?this.lineArray=(null==o?void 0:o.subarray(0,this.lineidx))||null:this.lineArray=new Uint16Array(0)):(this.normalArray=new Float32Array(0),this.faceArray=new Uint16Array(0),this.lineArray=new Uint16Array(0)),a&&(this.radiusArray=a.subarray(0,this.vertices)),t&&(this.normalArray&&(this.normalArray=new Float32Array(this.normalArray)),this.faceArray&&(this.faceArray=new Uint16Array(this.faceArray)),this.lineArray&&(this.lineArray=new Uint16Array(this.lineArray)),this.vertexArray&&(this.vertexArray=new Float32Array(this.vertexArray)),this.colorArray&&(this.colorArray=new Float32Array(this.colorArray)),this.radiusArray&&(this.radiusArray=new Float32Array(this.radiusArray))),this.__inittedArrays=!0}}class l extends s.EventDispatcher{constructor(e=!1,t=!1,r=!1){super(),this.name="",this.hasTangents=!1,this.dynamic=!0,this.verticesNeedUpdate=!1,this.elementsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.buffersNeedUpdate=!1,this.imposter=!1,this.instanced=!1,this.geometryGroups=[],this.groups=0,this.id=h++,this.mesh=e,this.radii=t,this.offset=r}updateGeoGroup(e=0){var t,r=this.groups>0?this.geometryGroups[this.groups-1]:null;return(!r||r.vertices+e>((null===(t=null==r?void 0:r.vertexArray)||void 0===t?void 0:t.length)||0)/3)&&(r=this.addGeoGroup()),r}vrml(e,t){for(var r="",i=this.geometryGroups.length,s=0;s{"use strict";r.r(t),r.d(t,{Light:()=>l,Object3D:()=>o,Object3DIDCount:()=>n,Scene:()=>a});var i=r("./src/WebGL/math/index.ts"),s=r("./src/colors.ts");let n=0;class o{constructor(){this.id=n++,this.name="",this.children=[],this.position=new i.Vector3,this.rotation=new i.Vector3,this.matrix=new i.Matrix4,this.matrixWorld=new i.Matrix4,this.quaternion=new i.Quaternion,this.eulerOrder="XYZ",this.up=new i.Vector3(0,1,0),this.scale=new i.Vector3(1,1,1),this.matrixAutoUpdate=!0,this.matrixWorldNeedsUpdate=!0,this.rotationAutoUpdate=!0,this.useQuaternion=!1,this.visible=!0}lookAt(e){this.matrix.lookAt(e,this.position,this.up),this.rotationAutoUpdate&&(!0===this.useQuaternion?console.error("Unimplemented math operation."):this.rotation instanceof i.Vector3&&this.rotation.setEulerFromRotationMatrix(this.matrix,this.eulerOrder))}add(e){if(e!==this){e.parent=this,this.children.push(e);for(var t=this;void 0!==t.parent;)t=t.parent;void 0!==t&&t instanceof a&&t.__addObject(e)}else console.error("Can't add $3Dmol.Object3D to itself")}remove(e){var t=this.children.indexOf(e);if(-1!==t){e.parent=void 0,this.children.splice(t,1);for(var r=this;void 0!==r.parent;)r=r.parent;void 0!==r&&r instanceof a&&r.__removeObject(e)}}vrml(e){e||(e=" ");var t=2*Math.atan2(this.quaternion.lengthxyz(),this.quaternion.w),r=0,i=0,s=0;if(0!=t){let e=Math.sin(t/2);r=this.quaternion.x/e,i=this.quaternion.y/e,s=this.quaternion.z/e}var n=e+"Transform {\n"+e+" center "+this.position.x+" "+this.position.y+" "+this.position.z+"\n"+e+" rotation "+r+" "+i+" "+s+" "+t+"\n"+e+" children [\n";this.geometry&&(n+=this.geometry.vrml(e,this.material));for(var o=0;o{"use strict";r.r(t),r.d(t,{Projector:()=>s});const i=new(r("./src/WebGL/math/index.ts").Matrix4);class s{static unprojectVector(e,t){return t.projectionMatrixInverse.getInverse(t.projectionMatrix),i.multiplyMatrices(t.matrixWorld,t.projectionMatrixInverse),e.applyProjection(i)}static projectVector(e,t){return t.matrixWorldInverse.getInverse(t.matrixWorld),i.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),e.applyProjection(i)}projectVector(e,t){return s.projectVector(e,t)}unprojectVector(e,t){return s.unprojectVector(e,t)}}},"./src/WebGL/core/Raycaster.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Raycaster:()=>a,intersectObject:()=>v});var i=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/shapes/index.ts");const n=(e,t)=>e.distance-t.distance,o=new i.Matrix4;class a{constructor(e,t,r,s){this.precision=1e-4,this.linePrecision=.2,this.ray=new i.Ray(e,t),this.ray.direction.lengthSq()>0&&this.ray.direction.normalize(),this.near=s||0,this.far=r||1/0}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.ortho?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld)):(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,e.z),t.projectionMatrixInverse.getInverse(t.projectionMatrix),o.multiplyMatrices(t.matrixWorld,t.projectionMatrixInverse),this.ray.direction.applyProjection(o),this.ray.direction.sub(this.ray.origin).normalize())}intersectObjects(e,t){for(var r=[],i=0,s=t.length;iMath.min(Math.max(e,-1),1);var h=new s.Sphere,c=new s.Cylinder,u=new s.Triangle,d=new i.Vector3,p=new i.Vector3,f=new i.Vector3,m=new i.Vector3,g=new i.Vector3;function v(e,t,r,i){if(g.getPositionFromMatrix(e.matrixWorld),void 0===t.intersectionShape)return i;var n,o,a,v,b,y,_,w,x,S,A,C,M,L,E=t.intersectionShape,z=r.linePrecision,k=(z*=e.matrixWorld.getMaxScaleOnAxis())*z;if(void 0!==t.boundingSphere&&t.boundingSphere instanceof s.Sphere&&(h.copy(t.boundingSphere),h.applyMatrix4(e.matrixWorld),!r.ray.isIntersectionSphere(h)))return i;for(n=0,o=E.triangle.length;n=0)continue;if(d.subVectors(u.a,r.ray.origin),(_=a.dot(d)/v)<0)continue;p.copy(r.ray.direction).multiplyScalar(_).add(r.ray.origin),p.sub(u.a),f.copy(u.b).sub(u.a),m.copy(u.c).sub(u.a);var O=f.dot(m),T=f.lengthSq(),I=m.lengthSq();if((C=(T*p.dot(m)-O*p.dot(f))/(T*I-O*O))<0||C>1)continue;if((A=(p.dot(f)-C*O)/T)<0||A>1||A+C>1)continue;i.push({clickable:t,distance:_})}for(n=0,o=E.cylinder.length;nc.lengthSq()||C<0)continue;i.push({clickable:t,distance:_})}}for(n=0,o=E.line.length;n{"use strict";r.r(t),r.d(t,{Texture:()=>a,TextureIdCount:()=>l});var i=r("./src/WebGL/constants/TextureConstants.ts"),s=r("./src/WebGL/math/index.ts"),n=r("./src/WebGL/core/EventDispatcher.ts"),o=r("./src/WebGL/core/UVMapping.ts");class a extends n.EventDispatcher{constructor(e,t){super(),this.id=l++,this.name="",this.image=e,this.mapping=new o.UVMapping,this.wrapS=i.ClampToEdgeWrapping,this.wrapT=i.ClampToEdgeWrapping,this.anisotropy=1,t?(this.format=i.RFormat,this.type=i.FloatType,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.magFilter=i.NearestFilter,this.minFilter=i.NearestFilter):(this.format=i.RGBAFormat,this.type=i.UnsignedByteType,this.offset=new s.Vector2(0,0),this.repeat=new s.Vector2(1,1),this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.magFilter=i.LinearFilter,this.minFilter=i.LinearMipMapLinearFilter),this.needsUpdate=!1,this.onUpdate=null}clone(e=new a){return e.image=this.image,e.mapping=this.mapping,e.wrapS=this.wrapS,e.wrapT=this.wrapT,e.magFilter=this.magFilter,e.minFilter=this.minFilter,e.anisotropy=this.anisotropy,e.format=this.format,e.type=this.type,e.offset.copy(this.offset),e.repeat.copy(this.repeat),e.premultiplyAlpha=this.premultiplyAlpha,e.flipY=this.flipY,e.unpackAlignment=this.unpackAlignment,e}dispose(){this.dispatchEvent({type:"dispose"})}}let l=0},"./src/WebGL/core/UVMapping.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{UVMapping:()=>i});class i{}},"./src/WebGL/core/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{EventDispatcher:()=>i.EventDispatcher,Geometry:()=>s.Geometry,GeometryGroup:()=>s.GeometryGroup,GeometryIDCount:()=>s.GeometryIDCount,Light:()=>n.Light,Object3D:()=>n.Object3D,Object3DIDCount:()=>n.Object3DIDCount,Projector:()=>o.Projector,Raycaster:()=>a.Raycaster,Scene:()=>n.Scene,Texture:()=>l.Texture,TextureIdCount:()=>l.TextureIdCount,UVMapping:()=>h.UVMapping,intersectObject:()=>a.intersectObject});var i=r("./src/WebGL/core/EventDispatcher.ts"),s=r("./src/WebGL/core/Geometry.ts"),n=r("./src/WebGL/core/Object3D.ts"),o=r("./src/WebGL/core/Projector.ts"),a=r("./src/WebGL/core/Raycaster.ts"),l=r("./src/WebGL/core/Texture.ts"),h=r("./src/WebGL/core/UVMapping.ts")},"./src/WebGL/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{BackSide:()=>i.BackSide,Camera:()=>c.Camera,ClampToEdgeWrapping:()=>i.ClampToEdgeWrapping,Coloring:()=>i.Coloring,Cylinder:()=>h.Cylinder,DoubleSide:()=>i.DoubleSide,EventDispatcher:()=>s.EventDispatcher,FloatType:()=>i.FloatType,Fog:()=>u.Fog,FrontSide:()=>i.FrontSide,Geometry:()=>s.Geometry,GeometryGroup:()=>s.GeometryGroup,GeometryIDCount:()=>s.GeometryIDCount,ImposterMaterial:()=>n.ImposterMaterial,InstancedMaterial:()=>n.InstancedMaterial,Light:()=>s.Light,Line:()=>a.Line,LineBasicMaterial:()=>n.LineBasicMaterial,LineStyle:()=>a.LineStyle,LinearFilter:()=>i.LinearFilter,LinearMipMapLinearFilter:()=>i.LinearMipMapLinearFilter,Material:()=>n.Material,MaterialIdCount:()=>n.MaterialIdCount,Matrix3:()=>o.Matrix3,Matrix4:()=>o.Matrix4,Mesh:()=>a.Mesh,MeshDoubleLambertMaterial:()=>n.MeshDoubleLambertMaterial,MeshLambertMaterial:()=>n.MeshLambertMaterial,MeshOutlineMaterial:()=>n.MeshOutlineMaterial,NearestFilter:()=>i.NearestFilter,Object3D:()=>s.Object3D,Object3DIDCount:()=>s.Object3DIDCount,Projector:()=>s.Projector,Quaternion:()=>o.Quaternion,R32Format:()=>i.R32Format,RFormat:()=>i.RFormat,RGBAFormat:()=>i.RGBAFormat,Ray:()=>o.Ray,Raycaster:()=>s.Raycaster,Renderer:()=>d.Renderer,Scene:()=>s.Scene,ShaderLib:()=>l.ShaderLib,ShaderUtils:()=>l.ShaderUtils,Shading:()=>i.Shading,Sphere:()=>h.Sphere,SphereImposterMaterial:()=>n.SphereImposterMaterial,SphereImposterOutlineMaterial:()=>n.SphereImposterOutlineMaterial,Sprite:()=>a.Sprite,SpriteAlignment:()=>i.SpriteAlignment,SpriteMaterial:()=>n.SpriteMaterial,SpritePlugin:()=>p.SpritePlugin,StickImposterMaterial:()=>n.StickImposterMaterial,StickImposterOutlineMaterial:()=>n.StickImposterOutlineMaterial,Texture:()=>s.Texture,TextureIdCount:()=>s.TextureIdCount,TextureOperations:()=>i.TextureOperations,Triangle:()=>h.Triangle,UVMapping:()=>s.UVMapping,UnsignedByteType:()=>i.UnsignedByteType,Vector2:()=>o.Vector2,Vector3:()=>o.Vector3,VolumetricMaterial:()=>n.VolumetricMaterial,basic:()=>l.basic,clamp:()=>o.clamp,clone:()=>l.clone,conversionMatrix3:()=>o.conversionMatrix3,degToRad:()=>o.degToRad,instanced:()=>l.instanced,intersectObject:()=>s.intersectObject,lambert:()=>l.lambert,lambertdouble:()=>l.lambertdouble,outline:()=>l.outline,screen:()=>l.screen,screenaa:()=>l.screenaa,sphereimposter:()=>l.sphereimposter,sphereimposteroutline:()=>l.sphereimposteroutline,sprite:()=>l.sprite,stickimposter:()=>l.stickimposter,stickimposteroutline:()=>l.stickimposteroutline,volumetric:()=>l.volumetric});var i=r("./src/WebGL/constants/index.ts"),s=r("./src/WebGL/core/index.ts"),n=r("./src/WebGL/materials/index.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/WebGL/objects/index.ts"),l=r("./src/WebGL/shaders/index.ts"),h=r("./src/WebGL/shapes/index.ts"),c=r("./src/WebGL/Camera.ts"),u=r("./src/WebGL/Fog.ts"),d=r("./src/WebGL/Renderer.ts"),p=r("./src/WebGL/SpritePlugin.ts")},"./src/WebGL/materials/ImposterMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{ImposterMaterial:()=>l});var i=r("./src/WebGL/constants/Coloring.ts"),s=r("./src/WebGL/constants/Shading.ts"),n=r("./src/colors.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/WebGL/materials/Material.ts");class l extends a.Material{constructor(e){super(),this.color=new n.Color(16777215),this.ambient=new n.Color(1048575),this.emissive=new n.Color(0),this.imposter=!0,this.wrapAround=!1,this.wrapRGB=new o.Vector3(1,1,1),this.map=void 0,this.lightMap=null,this.specularMap=null,this.envMap=null,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.shading=s.Shading.SmoothShading,this.shaderID=null,this.vertexColors=i.Coloring.NoColors,this.skinning=!1,this.setValues(e)}clone(e=new l){return super.clone.call(this,e),e.color.copy(this.color),e.ambient.copy(this.ambient),e.emissive.copy(this.emissive),e.wrapAround=this.wrapAround,e.wrapRGB.copy(this.wrapRGB),e.map=this.map,e.lightMap=this.lightMap,e.specularMap=this.specularMap,e.envMap=this.envMap,e.combine=this.combine,e.reflectivity=this.reflectivity,e.refractionRatio=this.refractionRatio,e.fog=this.fog,e.shading=this.shading,e.shaderID=this.shaderID,e.vertexColors=this.vertexColors,e.skinning=this.skinning,e.morphTargets=this.morphTargets,e.morphNormals=this.morphNormals,e}}},"./src/WebGL/materials/InstancedMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{InstancedMaterial:()=>l});var i=r("./src/WebGL/constants/Coloring.ts"),s=r("./src/WebGL/constants/Shading.ts"),n=r("./src/colors.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/WebGL/materials/Material.ts");class l extends a.Material{constructor(e){super(),this.color=new n.Color(16777215),this.ambient=new n.Color(1048575),this.emissive=new n.Color(0),this.wrapAround=!1,this.wrapRGB=new o.Vector3(1,1,1),this.map=void 0,this.lightMap=null,this.specularMap=null,this.envMap=null,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.shading=s.Shading.SmoothShading,this.shaderID="instanced",this.vertexColors=i.Coloring.NoColors,this.skinning=!1,this.sphere=null,this.setValues(e)}clone(e=new l){return super.clone.call(this,e),e.color.copy(this.color),e.ambient.copy(this.ambient),e.emissive.copy(this.emissive),e.wrapAround=this.wrapAround,e.wrapRGB.copy(this.wrapRGB),e.map=this.map,e.lightMap=this.lightMap,e.specularMap=this.specularMap,e.envMap=this.envMap,e.combine=this.combine,e.reflectivity=this.reflectivity,e.refractionRatio=this.refractionRatio,e.fog=this.fog,e.shading=this.shading,e.shaderID=this.shaderID,e.vertexColors=this.vertexColors,e.skinning=this.skinning,e.morphTargets=this.morphTargets,e.morphNormals=this.morphNormals,e.sphere=this.sphere,e}}},"./src/WebGL/materials/LineBasicMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{LineBasicMaterial:()=>n});var i=r("./src/colors.ts"),s=r("./src/WebGL/materials/Material.ts");class n extends s.Material{constructor(e){super(),this.color=new i.Color(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.vertexColors=!1,this.fog=!0,this.shaderID="basic",this.setValues(e)}clone(e=new n){return super.clone.call(this,e),e.color.copy(this.color),e}}},"./src/WebGL/materials/Material.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Material:()=>a,MaterialIdCount:()=>l});var i=r("./src/WebGL/constants/Sides.ts"),s=r("./src/WebGL/core/index.ts"),n=r("./src/WebGL/math/index.ts"),o=r("./src/colors.ts");class a extends s.EventDispatcher{constructor(){super(...arguments),this.id=l++,this.name="",this.side=i.FrontSide,this.opacity=1,this.transparent=!1,this.depthTest=!0,this.depthWrite=!0,this.stencilTest=!0,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.alphaTest=0,this.visible=!0,this.needsUpdate=!0,this.outline=!1,this.wireframe=!1}setValues(e={}){if(void 0!==e)for(var t in e){var r=e[t];if(void 0!==r){if(t in this){var i=this[t];i instanceof o.Color&&r instanceof o.Color?i.copy(r):i instanceof o.Color?i.set(r):i instanceof n.Vector3&&r instanceof n.Vector3?i.copy(r):this[t]=r}}else console.warn("$3Dmol.Material: '"+t+"' parameter is undefined.")}}clone(e=new a){return e.name=this.name,e.side=this.side,e.opacity=this.opacity,e.transparent=this.transparent,e.depthTest=this.depthTest,e.depthWrite=this.depthWrite,e.stencilTest=this.stencilTest,e.polygonOffset=this.polygonOffset,e.polygonOffsetFactor=this.polygonOffsetFactor,e.polygonOffsetUnits=this.polygonOffsetUnits,e.alphaTest=this.alphaTest,e.overdraw=this.overdraw,e.visible=this.visible,e}dispose(){this.dispatchEvent({type:"dispose"})}}let l=0},"./src/WebGL/materials/MeshDoubleLambertMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{MeshDoubleLambertMaterial:()=>n});var i=r("./src/WebGL/constants/Sides.ts"),s=r("./src/WebGL/materials/MeshLambertMaterial.ts");class n extends s.MeshLambertMaterial{constructor(e){super(e),this.shaderID="lambertdouble",this.side=i.DoubleSide,this.outline=!1}clone(e=new n){return super.clone.call(this,e),e}}},"./src/WebGL/materials/MeshLambertMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{MeshLambertMaterial:()=>l});var i=r("./src/WebGL/constants/Coloring.ts"),s=r("./src/WebGL/constants/Shading.ts"),n=r("./src/WebGL/materials/Material.ts"),o=r("./src/colors.ts"),a=r("./src/WebGL/math/index.ts");class l extends n.Material{constructor(e){super(),this.color=new o.Color(16777215),this.ambient=new o.Color(1048575),this.emissive=new o.Color(0),this.wrapAround=!1,this.wrapRGB=new a.Vector3(1,1,1),this.map=void 0,this.lightMap=null,this.specularMap=null,this.envMap=null,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.shading=s.Shading.SmoothShading,this.shaderID="lambert",this.vertexColors=i.Coloring.NoColors,this.skinning=!1,this.setValues(e)}clone(e=new l){return super.clone.call(this,e),e.color.copy(this.color),e.ambient.copy(this.ambient),e.emissive.copy(this.emissive),e.wrapAround=this.wrapAround,e.wrapRGB.copy(this.wrapRGB),e.map=this.map,e.lightMap=this.lightMap,e.specularMap=this.specularMap,e.envMap=this.envMap,e.combine=this.combine,e.reflectivity=this.reflectivity,e.refractionRatio=this.refractionRatio,e.fog=this.fog,e.shading=this.shading,e.shaderID=this.shaderID,e.vertexColors=this.vertexColors,e.skinning=this.skinning,e.morphTargets=this.morphTargets,e.morphNormals=this.morphNormals,e}}},"./src/WebGL/materials/MeshOutlineMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{MeshOutlineMaterial:()=>n});var i=r("./src/colors.ts"),s=r("./src/WebGL/materials/Material.ts");class n extends s.Material{constructor(e){super(),e=e||{},this.fog=!0,this.shaderID="outline",this.wireframe=!1,this.outlineColor=e.color||new i.Color(0,0,0),this.outlineWidth=e.width||.1,this.outlinePushback=e.pushback||1}clone(e=new n){return super.clone.call(this,e),e.fog=this.fog,e.shaderID=this.shaderID,e.wireframe=this.wireframe,e}}},"./src/WebGL/materials/SphereImposterMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{SphereImposterMaterial:()=>s});var i=r("./src/WebGL/materials/ImposterMaterial.ts");class s extends i.ImposterMaterial{constructor(e){super(e),this.shaderID="sphereimposter",this.setValues(e)}clone(e=new s){return super.clone.call(this,e),e}}},"./src/WebGL/materials/SphereImposterOutlineMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{SphereImposterOutlineMaterial:()=>n});var i=r("./src/colors.ts"),s=r("./src/WebGL/materials/ImposterMaterial.ts");class n extends s.ImposterMaterial{constructor(e){super(e),e=e||{},this.shaderID="sphereimposteroutline",this.outlineColor=e.color||new i.Color(0,0,0),this.outlineWidth=e.width||.1,this.outlinePushback=e.pushback||1,this.setValues(e)}clone(e=new n){return super.clone.call(this,e),e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.outlinePushback=this.outlinePushback,e}}},"./src/WebGL/materials/SpriteMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{SpriteMaterial:()=>l});var i=r("./src/WebGL/constants/SpriteAlignment.ts"),s=r("./src/WebGL/core/Texture.ts"),n=r("./src/colors.ts"),o=r("./src/WebGL/math/index.ts"),a=r("./src/WebGL/materials/Material.ts");class l extends a.Material{constructor(e){super(),this.color=new n.Color(16777215),this.map=new s.Texture,this.useScreenCoordinates=!0,this.fog=!1,this.uvOffset=new o.Vector2(0,0),this.uvScale=new o.Vector2(1,1),this.depthTest=!this.useScreenCoordinates,this.sizeAttenuation=!this.useScreenCoordinates,this.screenOffset=this.screenOffset,this.scaleByViewPort=!this.sizeAttenuation,this.alignment=i.SpriteAlignment.center.clone(),this.setValues(e),void 0===(e=e||{}).depthTest&&(this.depthTest=!this.useScreenCoordinates),void 0===e.sizeAttenuation&&(this.sizeAttenuation=!this.useScreenCoordinates),void 0===e.scaleByViewPort&&(this.scaleByViewPort=!this.sizeAttenuation)}clone(e=new l){return super.clone.call(this,e),e.color.copy(this.color),e.map=this.map,e.useScreenCoordinates=this.useScreenCoordinates,e.screenOffset=this.screenOffset,e.sizeAttenuation=this.sizeAttenuation,e.scaleByViewport=this.scaleByViewPort,e.alignment.copy(this.alignment),e.uvOffset.copy(this.uvOffset),e}}},"./src/WebGL/materials/StickImposterMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{StickImposterMaterial:()=>s});var i=r("./src/WebGL/materials/ImposterMaterial.ts");class s extends i.ImposterMaterial{constructor(e){super(e),this.shaderID="stickimposter",this.setValues(e)}clone(e=new s){return super.clone.call(this,e),e}}},"./src/WebGL/materials/StickImposterOutlineMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{StickImposterOutlineMaterial:()=>n});var i=r("./src/colors.ts"),s=r("./src/WebGL/materials/ImposterMaterial.ts");class n extends s.ImposterMaterial{constructor(e={}){super(e),this.shaderID="stickimposteroutline",this.outlineColor=new i.Color(0,0,0),this.outlineWidth=.1,this.outlinePushback=1,e.color&&(this.outlineColor=e.color),e.width&&(this.outlineWidth=e.width),e.pushback&&(this.outlinePushback=e.pushback),this.setValues(e)}clone(e=new n){return super.clone.call(this,e),e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.outlinePushback=this.outlinePushback,e}}},"./src/WebGL/materials/VolumetricMaterial.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{VolumetricMaterial:()=>o});var i=r("./src/WebGL/constants/Sides.ts"),s=r("./src/colors.ts"),n=r("./src/WebGL/materials/Material.ts");class o extends n.Material{constructor(e){super(),this.transparent=!1,this.volumetric=!0,this.color=new s.Color(16777215),this.transferfn=null,this.map=void 0,this.extent=[],this.maxdepth=100,this.unit=0,this.texmatrix=null,this.transfermin=-1,this.transfermax=1,this.subsamples=5,this.shaderID="volumetric",this.side=i.FrontSide,this.setValues(e)}clone(e=new o){return super.clone.call(this,e),e.transparent=this.transparent,e.volumetric=this.volumetric,e.color=this.color,e.transferfn=this.transferfn,e.map=this.map,e.extent=this.extent,e.maxdepth=this.maxdepth,e.unit=this.unit,e.texmatrix=this.texmatrix,e.transfermin=this.transfermin,e.transfermax=this.transfermax,e.subsamples=this.subsamples,e.shaderID=this.shaderID,e.side=this.side,e}}},"./src/WebGL/materials/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{ImposterMaterial:()=>i.ImposterMaterial,InstancedMaterial:()=>s.InstancedMaterial,LineBasicMaterial:()=>n.LineBasicMaterial,Material:()=>o.Material,MaterialIdCount:()=>o.MaterialIdCount,MeshDoubleLambertMaterial:()=>a.MeshDoubleLambertMaterial,MeshLambertMaterial:()=>l.MeshLambertMaterial,MeshOutlineMaterial:()=>h.MeshOutlineMaterial,SphereImposterMaterial:()=>c.SphereImposterMaterial,SphereImposterOutlineMaterial:()=>u.SphereImposterOutlineMaterial,SpriteMaterial:()=>d.SpriteMaterial,StickImposterMaterial:()=>p.StickImposterMaterial,StickImposterOutlineMaterial:()=>f.StickImposterOutlineMaterial,VolumetricMaterial:()=>m.VolumetricMaterial});var i=r("./src/WebGL/materials/ImposterMaterial.ts"),s=r("./src/WebGL/materials/InstancedMaterial.ts"),n=r("./src/WebGL/materials/LineBasicMaterial.ts"),o=r("./src/WebGL/materials/Material.ts"),a=r("./src/WebGL/materials/MeshDoubleLambertMaterial.ts"),l=r("./src/WebGL/materials/MeshLambertMaterial.ts"),h=r("./src/WebGL/materials/MeshOutlineMaterial.ts"),c=r("./src/WebGL/materials/SphereImposterMaterial.ts"),u=r("./src/WebGL/materials/SphereImposterOutlineMaterial.ts"),d=r("./src/WebGL/materials/SpriteMaterial.ts"),p=r("./src/WebGL/materials/StickImposterMaterial.ts"),f=r("./src/WebGL/materials/StickImposterOutlineMaterial.ts"),m=r("./src/WebGL/materials/VolumetricMaterial.ts")},"./src/WebGL/math/Quaternion.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Quaternion:()=>i});class i{constructor(e,t,r,i){this.x=e||0,this.y=t||0,this.z=r||0,this.w=void 0!==i?i:1}set(e,t,r,i){return this.x=e,this.y=t,this.z=r,this.w=i,this}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this}conjugate(){return this.x*=-1,this.y*=-1,this.z*=-1,this}inverse(){return this.conjugate().normalize()}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}lengthxyz(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}normalize(){let e=this.length();return 0===e?(this.x=0,this.y=0,this.z=0,this.w=1):(e=1/e,this.x*=e,this.y*=e,this.z*=e,this.w*=e),this}multiply(e){return this.multiplyQuaternions(this,e)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}multiplyQuaternions(e,t){const r=e.x,i=e.y,s=e.z,n=e.w,o=t.x,a=t.y,l=t.z,h=t.w;return this.x=r*h+n*o+i*l-s*a,this.y=i*h+n*a+s*o-r*l,this.z=s*h+n*l+r*a-i*o,this.w=n*h-r*o-i*a-s*l,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}clone(){return new i(this.x,this.y,this.z,this.w)}setFromEuler(e){const t=Math.cos(e.x/2),r=Math.cos(e.y/2),i=Math.cos(e.z/2),s=Math.sin(e.x/2),n=Math.sin(e.y/2),o=Math.sin(e.z/2);return this.x=s*r*i+t*n*o,this.y=t*n*i-s*r*o,this.z=t*r*o+s*n*i,this.w=t*r*i-s*n*o,this}}},"./src/WebGL/math/Vector2.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Vector2:()=>i});class i{constructor(e,t){this.x=e||0,this.y=t||0}set(e,t){return this.x=e,this.y=t,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}copy(e){return this.x=e.x,this.y=e.y,this}clone(){return new i(this.x,this.y)}}},"./src/WebGL/math/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Matrix3:()=>l.Matrix3,Matrix4:()=>l.Matrix4,Quaternion:()=>i.Quaternion,Ray:()=>l.Ray,Vector2:()=>s.Vector2,Vector3:()=>l.Vector3,clamp:()=>n.clamp,conversionMatrix3:()=>o.conversionMatrix3,degToRad:()=>a.degToRad});var i=r("./src/WebGL/math/Quaternion.ts"),s=r("./src/WebGL/math/Vector2.ts"),n=r("./src/WebGL/math/utils/clamp.ts"),o=r("./src/WebGL/math/utils/conversionMatrix3.ts"),a=r("./src/WebGL/math/utils/degToRad.ts"),l=r("./src/WebGL/math/math.ts")},"./src/WebGL/math/math.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Matrix3:()=>d,Matrix4:()=>c,Ray:()=>p,Vector3:()=>u});var i,s,n,o,a,l=r("./src/WebGL/math/utils/degToRad.ts"),h=r("./src/WebGL/math/utils/clamp.ts");class c{constructor(e=1,t=0,r=0,i=0,s=0,n=1,o=0,a=0,l=0,h=0,c=1,u=0,d=0,p=0,f=0,m=1){void 0!==e&&"number"!=typeof e?this.elements=new Float32Array(e):(this.elements=new Float32Array(16),this.elements[0]=e,this.elements[4]=t,this.elements[8]=r,this.elements[12]=i,this.elements[1]=s,this.elements[5]=n,this.elements[9]=o,this.elements[13]=a,this.elements[2]=l,this.elements[6]=h,this.elements[10]=c,this.elements[14]=u,this.elements[3]=d,this.elements[7]=p,this.elements[11]=f,this.elements[15]=m)}makeScale(e,t,r){throw new Error("Method not implemented.")}set(e,t,r,i,s,n,o,a,l,h,c,u,d,p,f,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=r,g[12]=i,g[1]=s,g[5]=n,g[9]=o,g[13]=a,g[2]=l,g[6]=h,g[10]=c,g[14]=u,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}copy(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15]),this}matrix3FromTopLeft(){const e=this.elements;return new d(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10])}setRotationFromEuler(e,t){const r=this.elements,{x:i,y:s,z:n}=e,o=Math.cos(i),a=Math.sin(i),l=Math.cos(s),h=Math.sin(s),c=Math.cos(n),u=Math.sin(n);if(void 0===t||"XYZ"===t){const e=o*c,t=o*u,i=a*c,s=a*u;r[0]=l*c,r[4]=-l*u,r[8]=h,r[1]=t+i*h,r[5]=e-s*h,r[9]=-a*l,r[2]=s-e*h,r[6]=i+t*h,r[10]=o*l}else console.error(`Error with matrix4 setRotationFromEuler. Order: ${t}`);return this}setRotationFromQuaternion(e){const t=this.elements,{x:r,y:i,z:s,w:n}=e,o=r+r,a=i+i,l=s+s,h=r*o,c=r*a,u=r*l,d=i*a,p=i*l,f=s*l,m=n*o,g=n*a,v=n*l;return t[0]=1-(d+f),t[4]=c-v,t[8]=u+g,t[1]=c+v,t[5]=1-(h+f),t[9]=p-m,t[2]=u-g,t[6]=p+m,t[10]=1-(h+d),this}multiplyMatrices(e,t){const r=e.elements,i=t.elements,s=this.elements,n=r[0],o=r[4],a=r[8],l=r[12],h=r[1],c=r[5],u=r[9],d=r[13],p=r[2],f=r[6],m=r[10],g=r[14],v=r[3],b=r[7],y=r[11],_=r[15],w=i[0],x=i[4],S=i[8],A=i[12],C=i[1],M=i[5],L=i[9],E=i[13],z=i[2],k=i[6],O=i[10],T=i[14],I=i[3],F=i[7],D=i[11],R=i[15];return s[0]=n*w+o*C+a*z+l*I,s[4]=n*x+o*M+a*k+l*F,s[8]=n*S+o*L+a*O+l*D,s[12]=n*A+o*E+a*T+l*R,s[1]=h*w+c*C+u*z+d*I,s[5]=h*x+c*M+u*k+d*F,s[9]=h*S+c*L+u*O+d*D,s[13]=h*A+c*E+u*T+d*R,s[2]=p*w+f*C+m*z+g*I,s[6]=p*x+f*M+m*k+g*F,s[10]=p*S+f*L+m*O+g*D,s[14]=p*A+f*E+m*T+g*R,s[3]=v*w+b*C+y*z+_*I,s[7]=v*x+b*M+y*k+_*F,s[11]=v*S+b*L+y*O+_*D,s[15]=v*A+b*E+y*T+_*R,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}makeTranslation(e,t,r){return this.set(1,0,0,e,0,1,0,t,0,0,1,r,0,0,0,1),this}snap(e){e||(e=4);const t=Math.pow(10,4),r=this.elements;for(let e=0;e<16;e++){const i=Math.round(r[e]);i===Math.round(r[e]*t)/t&&(r[e]=i)}return this}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e){const t=this.elements;return t[12]=e.x,t[13]=e.y,t[14]=e.z,this}translate(e){const t=this.elements;return t[12]+=e.x,t[13]+=e.y,t[14]+=e.z,this}getInverse(e,t){const r=this.elements,i=e.elements,s=i[0],n=i[4],o=i[8],a=i[12],l=i[1],h=i[5],c=i[9],u=i[13],d=i[2],p=i[6],f=i[10],m=i[14],g=i[3],v=i[7],b=i[11],y=i[15];r[0]=c*m*v-u*f*v+u*p*b-h*m*b-c*p*y+h*f*y,r[4]=a*f*v-o*m*v-a*p*b+n*m*b+o*p*y-n*f*y,r[8]=o*u*v-a*c*v+a*h*b-n*u*b-o*h*y+n*c*y,r[12]=a*c*p-o*u*p-a*h*f+n*u*f+o*h*m-n*c*m,r[1]=u*f*g-c*m*g-u*d*b+l*m*b+c*d*y-l*f*y,r[5]=o*m*g-a*f*g+a*d*b-s*m*b-o*d*y+s*f*y,r[9]=a*c*g-o*u*g-a*l*b+s*u*b+o*l*y-s*c*y,r[13]=o*u*d-a*c*d+a*l*f-s*u*f-o*l*m+s*c*m,r[2]=h*m*g-u*p*g+u*d*v-l*m*v-h*d*y+l*p*y,r[6]=a*p*g-n*m*g-a*d*v+s*m*v+n*d*y-s*p*y,r[10]=n*u*g-a*h*g+a*l*v-s*u*v-n*l*y+s*h*y,r[14]=a*h*d-n*u*d-a*l*p+s*u*p+n*l*m-s*h*m,r[3]=c*p*g-h*f*g-c*d*v+l*f*v+h*d*b-l*p*b,r[7]=n*f*g-o*p*g+o*d*v-s*f*v-n*d*b+s*p*b,r[11]=o*h*g-n*c*g-o*l*v+s*c*v+n*l*b-s*h*b,r[15]=n*c*d-o*h*d+o*l*p-s*c*p-n*l*f+s*h*f;const _=s*r[0]+l*r[4]+d*r[8]+g*r[12];if(0===_){const e="Matrix4.getInverse(): can't invert matrix, determinant is 0";if(t)throw new Error(e);return console.warn(e),this.identity(),this}return this.multiplyScalar(1/_),this}isReflected(){const e=this.elements,t=e[0],r=e[4],i=e[8],s=e[1],n=e[5],o=e[9],a=e[2],l=e[6],h=e[10];return t*n*h+s*l*i+a*r*o-a*n*i-s*r*h-t*l*o<0}scale(e){const t=this.elements,{x:r}=e,{y:i}=e,{z:s}=e;return t[0]*=r,t[4]*=i,t[8]*=s,t[1]*=r,t[5]*=i,t[9]*=s,t[2]*=r,t[6]*=i,t[10]*=s,t[3]*=r,t[7]*=i,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,Math.max(r,i)))}makeFrustum(e,t,r,i,s,n){const o=this.elements,a=2*s/(t-e),l=2*s/(i-r),h=(t+e)/(t-e),c=(i+r)/(i-r),u=-(n+s)/(n-s),d=-2*n*s/(n-s);return o[0]=a,o[4]=0,o[8]=h,o[12]=0,o[1]=0,o[5]=l,o[9]=c,o[13]=0,o[2]=0,o[6]=0,o[10]=u,o[14]=d,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makePerspective(e,t,r,i){const s=r*Math.tan((0,l.degToRad)(.5*e)),n=-s,o=n*t,a=s*t;return this.makeFrustum(o,a,n,s,r,i)}makeOrthographic(e,t,r,i,s,n){const o=this.elements,a=1/(t-e),l=1/(r-i),h=1/(n-s),c=(t+e)*a,u=(r+i)*l,d=(n+s)*h;return o[0]=2*a,o[4]=0,o[8]=0,o[12]=-c,o[1]=0,o[5]=2*l,o[9]=0,o[13]=-u,o[2]=0,o[6]=0,o[10]=-2*h,o[14]=-d,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}isEqual(e){const t=e.elements,r=this.elements;return r[0]===t[0]&&r[4]===t[4]&&r[8]===t[8]&&r[12]===t[12]&&r[1]===t[1]&&r[5]===t[5]&&r[9]===t[9]&&r[13]===t[13]&&r[2]===t[2]&&r[6]===t[6]&&r[10]===t[10]&&r[14]===t[14]&&r[3]===t[3]&&r[7]===t[7]&&r[11]===t[11]&&r[15]===t[15]}clone(){const e=this.elements;return new c(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])}isIdentity(){const e=this.elements;return 1===e[0]&&0===e[4]&&0===e[8]&&0===e[12]&&0===e[1]&&1===e[5]&&0===e[9]&&0===e[13]&&0===e[2]&&0===e[6]&&1===e[10]&&0===e[14]&&0===e[3]&&0===e[7]&&0===e[11]&&1===e[15]}isNearlyIdentity(e){return this.clone().snap(e).isIdentity()}getScale(e){const t=this.elements;return e=e||new u,n.set(t[0],t[1],t[2]),o.set(t[4],t[5],t[6]),a.set(t[8],t[9],t[10]),e.x=n.length(),e.y=o.length(),e.z=a.length(),e}lookAt(e,t,r){const i=this.elements;return a.subVectors(e,t).normalize(),0===a.length()&&(a.z=1),n.crossVectors(r,a).normalize(),0===n.length()&&(a.x+=1e-4,n.crossVectors(r,a).normalize()),o.crossVectors(a,n),i[0]=n.x,i[4]=o.x,i[8]=a.x,i[1]=n.y,i[5]=o.y,i[9]=a.y,i[2]=n.z,i[6]=o.z,i[10]=a.z,this}compose(e,t,r){const n=this.elements;return i.identity(),i.setRotationFromQuaternion(t),s.makeScale(r.x,r.y,r.z),this.multiplyMatrices(i,s),n[12]=e.x,n[13]=e.y,n[14]=e.z,this}}i=new c,s=new c;class u{constructor(e,t,r){this.x=e||0,this.y=t||0,this.z=r||0,this.atomid=void 0}set(e,t,r){return this.x=e,this.y=t,this.z=r,this}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}divideScalar(e){return 0!==e?(this.x/=e,this.y/=e,this.z/=e):(this.x=0,this.y=0,this.z=0),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return t*t+r*r+i*i}applyMatrix3(e){const{x:t}=this,{y:r}=this,{z:i}=this,s=e.elements;return this.x=s[0]*t+s[3]*r+s[6]*i,this.y=s[1]*t+s[4]*r+s[7]*i,this.z=s[2]*t+s[5]*r+s[8]*i,this}applyMatrix4(e){const{x:t}=this,{y:r}=this,{z:i}=this,s=e.elements;return this.x=s[0]*t+s[4]*r+s[8]*i+s[12],this.y=s[1]*t+s[5]*r+s[9]*i+s[13],this.z=s[2]*t+s[6]*r+s[10]*i+s[14],this}applyProjection(e){const{x:t}=this,{y:r}=this,{z:i}=this,s=e.elements,n=s[3]*t+s[7]*r+s[11]*i+s[15];return this.x=(s[0]*t+s[4]*r+s[8]*i+s[12])/n,this.y=(s[1]*t+s[5]*r+s[9]*i+s[13])/n,this.z=(s[2]*t+s[6]*r+s[10]*i+s[14])/n,this}applyQuaternion(e){const{x:t}=this,{y:r}=this,{z:i}=this,s=e.x,n=e.y,o=e.z,a=e.w,l={};l.x=2*(r*o-i*n),l.y=2*(i*s-t*o),l.z=2*(t*n-r*s);const h={};return h.x=l.y*o-l.z*n,h.y=l.z*s-l.x*o,h.z=l.x*n-l.y*s,this.x=t+a*l.x+h.x,this.y=r+a*l.y+h.y,this.z=i+a*l.z+h.z,this}negate(){return this.multiplyScalar(-1)}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}normalize(){return this.divideScalar(this.length())}cross(e){const{x:t}=this,{y:r}=this,{z:i}=this;return this.x=r*e.z-i*e.y,this.y=i*e.x-t*e.z,this.z=t*e.y-r*e.x,this}crossVectors(e,t){return this.x=e.y*t.z-e.z*t.y,this.y=e.z*t.x-e.x*t.z,this.z=e.x*t.y-e.y*t.x,this}equals(e){return this.x==e.x&&this.y==e.y&&this.z==e.z}getPositionFromMatrix(e){return this.x=e.elements[12],this.y=e.elements[13],this.z=e.elements[14],this}setEulerFromRotationMatrix(e,t){const r=e.elements,i=r[0],s=r[4],n=r[8],o=r[5],a=r[9],l=r[6],c=r[10];return void 0===t||"XYZ"===t?(this.y=Math.asin((0,h.clamp)(n,-1,1)),Math.abs(n)<.99999?(this.x=Math.atan2(-a,c),this.z=Math.atan2(-s,i)):(this.x=Math.atan2(l,o),this.z=0)):console.error(`Error with vector's setEulerFromRotationMatrix: Unknown order: ${t}`),this}rotateAboutVector(e,t){e.normalize();const r=Math.cos(t),i=Math.sin(t),s=this.clone().multiplyScalar(r),n=e.clone().cross(this).multiplyScalar(i),o=e.clone().multiplyScalar(e.clone().dot(this)).multiplyScalar(1-r),a=s.add(n).add(o);return this.x=a.x,this.y=a.y,this.z=a.z,this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}transformDirection(e){const{x:t}=this,{y:r}=this,{z:i}=this,s=e.elements;return this.x=s[0]*t+s[4]*r+s[8]*i,this.y=s[1]*t+s[5]*r+s[9]*i,this.z=s[2]*t+s[6]*r+s[10]*i,this.normalize()}clone(){return new u(this.x,this.y,this.z)}unproject(e){const t=i;return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}n=new u,o=new u,a=new u;class d{constructor(e=1,t=0,r=0,i=0,s=1,n=0,o=0,a=0,l=1){this.elements=new Float32Array(9),this.set(e,t,r,i,s,n,o,a,l)}set(e,t,r,i,s,n,o,a,l){const h=this.elements;return h[0]=e,h[3]=t,h[6]=r,h[1]=i,h[4]=s,h[7]=n,h[2]=o,h[5]=a,h[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=e.elements;this.set(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8])}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}getInverse3(e){const t=e.elements,r=this.elements;r[0]=t[4]*t[8]-t[5]*t[7],r[3]=t[6]*t[5]-t[3]*t[8],r[6]=t[3]*t[7]-t[6]*t[4],r[1]=t[7]*t[2]-t[1]*t[8],r[4]=t[0]*t[8]-t[6]*t[2],r[7]=t[1]*t[6]-t[0]*t[7],r[2]=t[1]*t[5]-t[2]*t[4],r[5]=t[2]*t[3]-t[0]*t[5],r[8]=t[0]*t[4]-t[1]*t[3];const i=t[0]*r[0]+t[3]*r[1]+t[6]*r[2];return this.multiplyScalar(1/i),this}getInverse(e,t){const r=e.elements,i=this.elements;i[0]=r[10]*r[5]-r[6]*r[9],i[1]=-r[10]*r[1]+r[2]*r[9],i[2]=r[6]*r[1]-r[2]*r[5],i[3]=-r[10]*r[4]+r[6]*r[8],i[4]=r[10]*r[0]-r[2]*r[8],i[5]=-r[6]*r[0]+r[2]*r[4],i[6]=r[9]*r[4]-r[5]*r[8],i[7]=-r[9]*r[0]+r[1]*r[8],i[8]=r[5]*r[0]-r[1]*r[4];const s=r[0]*i[0]+r[1]*i[3]+r[2]*i[6];if(0===s){const e="Matrix3.getInverse(): can't invert matrix, determinant is 0";if(t)throw new Error(e);return console.warn(e),this.identity(),this}return this.multiplyScalar(1/s),this}getDeterminant(){const e=this.elements;return e[0]*e[4]*e[8]+e[1]*e[5]*e[6]+e[2]*e[3]*e[7]-e[2]*e[4]*e[6]-e[1]*e[3]*e[8]-e[0]*e[5]*e[7]}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}clone(){const e=this.elements;return new d(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])}getMatrix4(){const e=this.elements;return new c(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0)}}class p{constructor(e,t){this.origin=void 0!==e?e:new u,this.direction=void 0!==t?t:new u}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return(t||new u).copy(this.direction).multiplyScalar(e).add(this.origin)}recast(e){const t=n;return this.origin.copy(this.at(e,t)),this}closestPointToPoint(e,t){const r=t||new u;r.subVectors(e,this.origin);const i=r.dot(this.direction);return r.copy(this.direction).multiplyScalar(i).add(this.origin)}distanceToPoint(e){const t=n,r=t.subVectors(e,this.origin).dot(this.direction);return t.copy(this.direction).multiplyScalar(r).add(this.origin),t.distanceTo(e)}isIntersectionCylinder(){}isIntersectionSphere(e){return this.distanceToPoint(e.center)<=e.radius}isIntersectionPlane(e){return 0!==e.normal.dot(this.direction)||0===e.distanceToPoint(this.origin)}distanceToPlane(e){const t=e.normal.dot(this.direction);return 0===t?0===e.distanceToPoint(this.origin)?0:void 0:-(this.origin.dot(e.normal)+e.constant)/t}intersectPlane(e,t){const r=this.distanceToPlane(e);if(void 0!==r)return this.at(r,t)}applyMatrix4(e){return this.direction.add(this.origin).applyMatrix4(e),this.origin.applyMatrix4(e),this.direction.sub(this.origin),this}clone(){return(new p).copy(this)}}},"./src/WebGL/math/utils/clamp.ts":(e,t,r)=>{"use strict";function i(e,t,r){return Math.min(Math.max(e,t),r)}r.r(t),r.d(t,{clamp:()=>i})},"./src/WebGL/math/utils/conversionMatrix3.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{conversionMatrix3:()=>s});var i=r("./src/WebGL/math/math.ts");function s(e,t,r,s,n,o){s=s*Math.PI/180,n=n*Math.PI/180,o=o*Math.PI/180;const a=e=>e*e,l=Math.cos(s),h=Math.cos(n),c=Math.cos(o),u=Math.sin(o);return new i.Matrix3(e,t*c,r*h,0,t*u,r*(l-h*c)/u,0,0,r*Math.sqrt(1-a(l)-a(h)-a(c)+2*l*h*c)/u)}},"./src/WebGL/math/utils/degToRad.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{degToRad:()=>s});const i=Math.PI/180;function s(e){return e*i}},"./src/WebGL/objects/Line.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Line:()=>o,LineStyle:()=>i});var i,s=r("./src/WebGL/materials/index.ts"),n=r("./src/WebGL/core/index.ts");!function(e){e[e.LineStrip=0]="LineStrip",e[e.LinePieces=1]="LinePieces"}(i||(i={}));class o extends n.Object3D{constructor(e,t=new s.LineBasicMaterial({color:16777215*Math.random()}),r=i.LineStrip){super(),this.geometry=e,this.material=t,this.type=r}clone(e=new o(this.geometry,this.material,this.type)){return super.clone.call(this,e),e}}},"./src/WebGL/objects/Mesh.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Mesh:()=>s});var i=r("./src/WebGL/core/index.ts");class s extends i.Object3D{constructor(e,t){super(),this.geometry=e,this.material=t}clone(e){return void 0===e&&(e=new s(this.geometry,this.material)),super.clone.call(this,e),e}}},"./src/WebGL/objects/Sprite.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Sprite:()=>n});var i=r("./src/WebGL/materials/index.ts"),s=r("./src/WebGL/core/index.ts");class n extends s.Object3D{constructor(e=new i.SpriteMaterial){super(),this.material=e,this.rotation3d=this.rotation,this.rotation=0}updateMatrix(){this.matrix.setPosition(this.position),this.rotation3d.set(0,0,this.rotation),this.matrix.setRotationFromEuler(this.rotation3d),1===this.scale.x&&1===this.scale.y||this.matrix.scale(this.scale),this.matrixWorldNeedsUpdate=!0}clone(e=new n(this.material)){return s.Object3D.prototype.clone.call(this,e),e}}},"./src/WebGL/objects/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Line:()=>i.Line,LineStyle:()=>i.LineStyle,Mesh:()=>s.Mesh,Sprite:()=>n.Sprite});var i=r("./src/WebGL/objects/Line.ts"),s=r("./src/WebGL/objects/Mesh.ts"),n=r("./src/WebGL/objects/Sprite.ts")},"./src/WebGL/shaders/ShaderType.ts":(e,t,r)=>{"use strict";r.r(t)},"./src/WebGL/shaders/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{ShaderLib:()=>i.ShaderLib,ShaderUtils:()=>s.ShaderUtils,basic:()=>i.basic,clone:()=>s.clone,instanced:()=>i.instanced,lambert:()=>i.lambert,lambertdouble:()=>i.lambertdouble,outline:()=>i.outline,screen:()=>i.screen,screenaa:()=>i.screenaa,sphereimposter:()=>i.sphereimposter,sphereimposteroutline:()=>i.sphereimposteroutline,sprite:()=>i.sprite,stickimposter:()=>i.stickimposter,stickimposteroutline:()=>i.stickimposteroutline,volumetric:()=>i.volumetric});var i=r("./src/WebGL/shaders/lib/index.ts"),s=r("./src/WebGL/shaders/utils/index.ts");r("./src/WebGL/shaders/ShaderType.ts")},"./src/WebGL/shaders/lib/basic/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{basic:()=>n});var i=r("./src/WebGL/shaders/lib/basic/uniforms.ts"),s=r("./src/WebGL/shaders/lib/basic/basic.frag");const n={vertexShader:r("./src/WebGL/shaders/lib/basic/basic.vert").default.replace("#define GLSLIFY 1",""),fragmentShader:s.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/basic/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3}}},"./src/WebGL/shaders/lib/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{ShaderLib:()=>g,basic:()=>i.basic,instanced:()=>s.instanced,lambert:()=>n.lambert,lambertdouble:()=>o.lambertdouble,outline:()=>a.outline,screen:()=>l.screen,screenaa:()=>h.screenaa,sphereimposter:()=>c.sphereimposter,sphereimposteroutline:()=>u.sphereimposteroutline,sprite:()=>d.sprite,stickimposter:()=>p.stickimposter,stickimposteroutline:()=>f.stickimposteroutline,volumetric:()=>m.volumetric});var i=r("./src/WebGL/shaders/lib/basic/index.ts"),s=r("./src/WebGL/shaders/lib/instanced/index.ts"),n=r("./src/WebGL/shaders/lib/lambert/index.ts"),o=r("./src/WebGL/shaders/lib/lambertdouble/index.ts"),a=r("./src/WebGL/shaders/lib/outline/index.ts"),l=r("./src/WebGL/shaders/lib/screen/index.ts"),h=r("./src/WebGL/shaders/lib/screenaa/index.ts"),c=r("./src/WebGL/shaders/lib/sphereimposter/index.ts"),u=r("./src/WebGL/shaders/lib/sphereimposteroutline/index.ts"),d=r("./src/WebGL/shaders/lib/sprite/index.ts"),p=r("./src/WebGL/shaders/lib/stickimposter/index.ts"),f=r("./src/WebGL/shaders/lib/stickimposteroutline/index.ts"),m=r("./src/WebGL/shaders/lib/volumetric/index.ts");const g={basic:i.basic,instanced:s.instanced,lambert:n.lambert,lambertdouble:o.lambertdouble,outline:a.outline,screen:l.screen,screenaa:h.screenaa,sphereimposter:c.sphereimposter,sphereimposteroutline:u.sphereimposteroutline,sprite:d.sprite,stickimposter:p.stickimposter,stickimposteroutline:f.stickimposteroutline,volumetric:m.volumetric}},"./src/WebGL/shaders/lib/instanced/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{instanced:()=>o});var i=r("./src/WebGL/shaders/lib/instanced/uniforms.ts"),s=r("./src/WebGL/shaders/lib/instanced/instanced.frag"),n=r("./src/WebGL/shaders/lib/instanced/instanced.vert");const o={fragmentShader:s.default.replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/instanced/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/lambert/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{lambert:()=>o});var i=r("./src/WebGL/shaders/lib/lambert/uniforms.ts"),s=r("./src/WebGL/shaders/lib/lambert/lambert.frag"),n=r("./src/WebGL/shaders/lib/lambert/lambert.vert");const o={fragmentShader:s.default.replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/lambert/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/lambertdouble/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{lambertdouble:()=>o});var i=r("./src/WebGL/shaders/lib/lambertdouble/uniforms.ts"),s=r("./src/WebGL/shaders/lib/lambertdouble/lambertdouble.frag"),n=r("./src/WebGL/shaders/lib/lambertdouble/lambertdouble.vert");const o={fragmentShader:s.default.replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/lambertdouble/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/outline/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{outline:()=>o});var i=r("./src/WebGL/shaders/lib/outline/uniforms.ts"),s=r("./src/WebGL/shaders/lib/outline/outline.frag"),n=r("./src/WebGL/shaders/lib/outline/outline.vert");const o={fragmentShader:s.default.replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/outline/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>s});var i=r("./src/colors.ts");const s={opacity:{type:"f",value:1},outlineColor:{type:"c",value:new i.Color(0,0,0)},fogColor:{type:"c",value:new i.Color(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},outlineWidth:{type:"f",value:.1},outlinePushback:{type:"f",value:1}}},"./src/WebGL/shaders/lib/screen/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{screen:()=>o});var i=r("./src/WebGL/shaders/lib/screen/uniforms.ts"),s=r("./src/WebGL/shaders/lib/screen/screen.frag"),n=r("./src/WebGL/shaders/lib/screen/screen.vert");const o={fragmentShader:s.default.replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/screen/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={}},"./src/WebGL/shaders/lib/screenaa/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{screenaa:()=>o});var i=r("./src/WebGL/shaders/lib/screenaa/uniforms.ts"),s=r("./src/WebGL/shaders/lib/screenaa/screenaa.frag"),n=r("./src/WebGL/shaders/lib/screenaa/screenaa.vert");const o={fragmentShader:s.default.replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/screenaa/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={}},"./src/WebGL/shaders/lib/sphereimposter/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{sphereimposter:()=>n});var i=r("./src/WebGL/shaders/lib/sphereimposter/uniforms.ts"),s=r("./src/WebGL/shaders/lib/sphereimposter/sphereimposter.frag");const n={vertexShader:r("./src/WebGL/shaders/lib/sphereimposter/sphereimposter.vert").default.replace("#define GLSLIFY 1",""),fragmentShader:s.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/sphereimposter/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/sphereimposteroutline/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{sphereimposteroutline:()=>o});var i=r("./src/WebGL/shaders/lib/sphereimposteroutline/uniforms.ts"),s=r("./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.frag"),n=r("./src/WebGL/shaders/lib/sphereimposteroutline/sphereimposteroutline.vert");const o={fragmentShader:s.default.replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/sphereimposteroutline/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>s});var i=r("./src/colors.ts");const s={opacity:{type:"f",value:1},outlineColor:{type:"c",value:new i.Color(0,0,0)},fogColor:{type:"c",value:new i.Color(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},outlineWidth:{type:"f",value:.1},outlinePushback:{type:"f",value:1}}},"./src/WebGL/shaders/lib/sprite/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{sprite:()=>o});var i=r("./src/WebGL/shaders/lib/sprite/uniforms.ts"),s=r("./src/WebGL/shaders/lib/sprite/sprite.frag"),n=r("./src/WebGL/shaders/lib/sprite/sprite.vert");const o={fragmentShader:s.default.replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/sprite/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={}},"./src/WebGL/shaders/lib/stickimposter/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{stickimposter:()=>a});var i=r("./src/WebGL/shaders/lib/stickimposter/uniforms.ts"),s=r("./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag"),n=r("./src/WebGL/shaders/lib/stickimposter/stickimposter.partial.frag"),o=r("./src/WebGL/shaders/lib/stickimposter/stickimposter.vert");const a={fragmentShader:[s.default,n.default].join("\n").replace("#define GLSLIFY 1",""),vertexShader:o.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/stickimposter/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},directionalLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]}}},"./src/WebGL/shaders/lib/stickimposteroutline/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{stickimposteroutline:()=>o});var i=r("./src/WebGL/shaders/lib/stickimposteroutline/uniforms.ts"),s=r("./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag"),n=r("./src/WebGL/shaders/lib/stickimposteroutline/stickimposteroutline.vert");const o={fragmentShader:(s.default+"gl_FragColor = vec4(color,1.0);}").replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/stickimposteroutline/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>s});var i=r("./src/colors.ts");const s={opacity:{type:"f",value:1},fogColor:{type:"c",value:new i.Color(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},outlineColor:{type:"c",value:new i.Color(0,0,0)},outlineWidth:{type:"f",value:.1},outlinePushback:{type:"f",value:1}}},"./src/WebGL/shaders/lib/volumetric/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{volumetric:()=>o});var i=r("./src/WebGL/shaders/lib/volumetric/uniforms.ts"),s=r("./src/WebGL/shaders/lib/volumetric/volumetric.frag"),n=r("./src/WebGL/shaders/lib/volumetric/volumetric.vert");const o={fragmentShader:s.default.replace("#define GLSLIFY 1",""),vertexShader:n.default.replace("#define GLSLIFY 1",""),uniforms:i.uniforms}},"./src/WebGL/shaders/lib/volumetric/uniforms.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{uniforms:()=>i});const i={opacity:{type:"f",value:1},fogColor:{type:"c",value:new(r("./src/colors.ts").Color)(1,1,1)},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},data:{type:"i",value:3},colormap:{type:"i",value:4},depthmap:{type:"i",value:5},step:{type:"f",value:1},maxdepth:{type:"f",value:100},subsamples:{type:"f",value:5},textmat:{type:"mat4",value:[]},projinv:{type:"mat4",value:[]},transfermin:{type:"f",value:-.2},transfermax:{type:"f",value:.2}}},"./src/WebGL/shaders/utils/clone.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{clone:()=>s});var i=r("./src/colors.ts");function s(e){let t={};for(const s in e){t[s]={},t[s].type=e[s].type;var r=e[s].value;r instanceof i.Color?t[s].value=r.clone():"number"==typeof r?t[s].value=r:r instanceof Array?t[s].value=[]:console.error("Error copying shader uniforms from ShaderLib: unknown type for uniform")}return t}},"./src/WebGL/shaders/utils/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{ShaderUtils:()=>n,clone:()=>i.clone});var i=r("./src/WebGL/shaders/utils/clone.ts"),s=r("./src/WebGL/shaders/utils/stickimposterFragmentShader.partial.frag");const n={clone:i.clone,stickimposterFragmentShader:s.default}},"./src/WebGL/shapes/Cylinder.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Cylinder:()=>n});var i=r("./src/WebGL/math/index.ts");let s=new i.Vector3;class n{constructor(e=new i.Vector3,t=new i.Vector3,r=0){this.c1=e,this.c2=t,this.radius=r,this.direction=(new i.Vector3).subVectors(this.c2,this.c1).normalize()}copy(e){return this.c1.copy(e.c1),this.c2.copy(e.c2),this.direction.copy(e.direction),this.radius=e.radius,this}lengthSq(){return s.subVectors(this.c2,this.c1).lengthSq()}applyMatrix4(e){return this.direction.add(this.c1).applyMatrix4(e),this.c1.applyMatrix4(e),this.c2.applyMatrix4(e),this.direction.sub(this.c1).normalize(),this.radius=this.radius*e.getMaxScaleOnAxis(),this}}},"./src/WebGL/shapes/Sphere.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Sphere:()=>s});var i=r("./src/WebGL/math/index.ts");class s{constructor(e={x:0,y:0,z:0},t=0){this.center=new i.Vector3(e.x,e.y,e.z),this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new s).copy(this)}}},"./src/WebGL/shapes/Triangle.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Triangle:()=>n});var i=r("./src/WebGL/math/index.ts");const s=new i.Vector3;class n{constructor(e=new i.Vector3,t=new i.Vector3,r=new i.Vector3){this.a=e,this.b=t,this.c=r}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}applyMatrix4(e){return this.a.applyMatrix4(e),this.b.applyMatrix4(e),this.c.applyMatrix4(e),this}getNormal(){var e=this.a.clone();return e.sub(this.b),s.subVectors(this.c,this.b),e.cross(s),e.normalize(),e}}},"./src/WebGL/shapes/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Cylinder:()=>s.Cylinder,Sphere:()=>i.Sphere,Triangle:()=>n.Triangle});var i=r("./src/WebGL/shapes/Sphere.ts"),s=r("./src/WebGL/shapes/Cylinder.ts"),n=r("./src/WebGL/shapes/Triangle.ts")},"./src/autoload.ts":(__unused_webpack_module,__nested_webpack_exports__,__nested_webpack_require_886947__)=>{"use strict";__nested_webpack_require_886947__.r(__nested_webpack_exports__),__nested_webpack_require_886947__.d(__nested_webpack_exports__,{autoinit:()=>autoinit,autoload:()=>autoload,processing_autoinit:()=>processing_autoinit,viewers:()=>viewers});var _GLViewer__WEBPACK_IMPORTED_MODULE_0__=__nested_webpack_require_886947__("./src/GLViewer.ts"),_ProteinSurface4__WEBPACK_IMPORTED_MODULE_1__=__nested_webpack_require_886947__("./src/ProteinSurface4.ts"),_utilities__WEBPACK_IMPORTED_MODULE_2__=__nested_webpack_require_886947__("./src/utilities.ts"),_colors__WEBPACK_IMPORTED_MODULE_3__=__nested_webpack_require_886947__("./src/colors.ts"),autoinit=!1,processing_autoinit=!1,viewers={};function autoload(viewer,callback){var i,dataname,type;if(null!=document.querySelector(".viewer_3Dmoljs")&&(autoinit=!0),autoinit){processing_autoinit=!0,viewer=null!=viewer?viewer:null;var nviewers=0;document.querySelectorAll(".viewer_3Dmoljs").forEach((viewerdiv=>{var datauri=[],datatypes=[],uri="";"static"==viewerdiv.style.position&&(viewerdiv.style.position="relative");var UI=null;if(type=null,viewerdiv.dataset.pdb)datauri.push("https://files.rcsb.org/view/"+viewerdiv.dataset.pdb+".pdb"),datatypes.push("pdb");else if(viewerdiv.dataset.cid)datatypes.push("sdf"),datauri.push("https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"+viewerdiv.dataset.cid+"/SDF?record_type=3d");else if(viewerdiv.dataset.href||viewerdiv.dataset.url){uri=viewerdiv.dataset.href?viewerdiv.dataset.href:viewerdiv.dataset.url,datauri.push(uri),type=uri.substring(uri.lastIndexOf(".")+1),datatypes.push(type);var molName=uri.substring(uri.lastIndexOf("/")+1,uri.lastIndexOf("."));"/"==molName&&(molName=uri.substring(uri.lastIndexOf("/")+1)),viewerdiv.dataset[datatypes[datatypes.length-1]]=molName}var divdata=viewerdiv.dataset;for(i in divdata)"pdb"===i.substring(0,3)&&"pdb"!==i?(datauri.push("https://files.rcsb.org/view/"+divdata[i]+".pdb"),datatypes.push("pdb")):"href"===i.substring(0,4)&&"href"!==i?(uri=divdata[i],datauri.push(uri),datatypes.push(uri.substring(uri.lastIndexOf(".")+1))):"cid"===i.substring(0,3)&&"cid"!==i&&(datauri.push("https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"+divdata[i]+"/SDF?record_type=3d"),datatypes.push("sdf"));var options={};viewerdiv.dataset.options&&(options=(0,_utilities__WEBPACK_IMPORTED_MODULE_2__.specStringToObject)(viewerdiv.dataset.options));var bgcolor=_colors__WEBPACK_IMPORTED_MODULE_3__.CC.color(viewerdiv.dataset.backgroundcolor),bgalpha=viewerdiv.dataset.backgroundalpha;bgalpha=null==bgalpha?1:parseFloat(bgalpha);var style={line:{}};viewerdiv.dataset.style&&(style=(0,_utilities__WEBPACK_IMPORTED_MODULE_2__.specStringToObject)(viewerdiv.dataset.style));var select={};viewerdiv.dataset.select&&(select=(0,_utilities__WEBPACK_IMPORTED_MODULE_2__.specStringToObject)(viewerdiv.dataset.select));var selectstylelist=[],surfaces=[],labels=[],zoomto={},spin=null,d=viewerdiv.dataset,stylere=/style(.+)/,surfre=/surface(.*)/,reslabre=/labelres(.*)/,keys=[];for(dataname in d)Object.prototype.hasOwnProperty.call(d,dataname)&&keys.push(dataname);for(keys.sort(),i=0;i{UI.loadSurface("VDW",t,r,e)})):e.addSurface(_ProteinSurface4__WEBPACK_IMPORTED_MODULE_1__.SurfaceType.VDW,r,t,t)}for(i=0;i{"complete"===document.readyState&&autoload()}},"./src/colors.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{CC:()=>s,Color:()=>i,builtinColorSchemes:()=>u,chains:()=>c,elementColors:()=>l,htmlColors:()=>n,residues:()=>h,ssColors:()=>o});class i{constructor(e,t,r){return this.r=0,this.g=0,this.b=0,arguments.length>1&&"number"==typeof e?(this.r=e||0,this.g=t||0,this.b=r||0,this):this.set(e||0)}set(e){return e instanceof i?e.clone():("number"==typeof e?this.setHex(e):"object"==typeof e&&(this.r=(null==e?void 0:e.r)||0,this.g=(null==e?void 0:e.g)||0,this.b=(null==e?void 0:e.b)||0),this)}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this}getHex(){return Math.round(255*this.r)<<16|Math.round(255*this.g)<<8|Math.round(255*this.b)}clone(){return new i(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}scaled(){var e={};return e.r=Math.round(255*this.r),e.g=Math.round(255*this.g),e.b=Math.round(255*this.b),e.a=1,e}}class s{static color(e){if(!e)return s.cache[0];if(e instanceof i)return e;if("number"==typeof e&&void 0!==s.cache[e])return s.cache[e];if(e&&Array.isArray(e))return e.map(s.color);let t=s.getHex(e),r=new i(t);return s.cache[t]=r,r}static getHex(e){var t;if(Array.isArray(e))return e.map(s.getHex);if("string"==typeof e){let r=e;if(!isNaN(parseInt(r)))return parseInt(r);if(r=r.trim(),4==r.length&&"#"==r[0]&&(r="#"+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]),7==r.length&&"#"==r[0])return parseInt(r.substring(1),16);let i=s.rgbRegEx.exec(r);if(i){""!=i[1]&&console.log("WARNING: Opacity value in rgba ignored. Specify separately as opacity attribute.");let e=0;for(let t=2;t<5;t++){e*=256;let r=i[t].endsWith("%")?255*parseFloat(i[t])/100:parseFloat(i[t]);e+=Math.round(r)}return e}return(null===(t=null===window||void 0===window?void 0:window.$3Dmol)||void 0===t?void 0:t.htmlColors[e.toLowerCase()])||0}return e}}s.rgbRegEx=/rgb(a?)\(\s*([^ ,\)\t]+)\s*,\s*([^ ,\)\t]+)\s*,\s*([^ ,\)\t]+)/i,s.cache={0:new i(0)};const n={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,darkgrey:11119017,darkgreen:25600,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,grey:8421504,green:32768,greenyellow:11403055,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,lightgrey:13882323,lightgreen:9498256,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},o={pyMol:{h:16711680,s:16776960,c:65280},Jmol:{h:16711808,s:16762880,c:16777215}},a={H:16777215,He:16761035,HE:16761035,Li:11674146,LI:11674146,B:65280,C:13158600,N:9408511,O:15728640,F:14329120,Na:255,NA:255,Mg:2263842,MG:2263842,Al:8421520,AL:8421520,Si:14329120,SI:14329120,P:16753920,S:16762930,Cl:65280,CL:65280,Ca:8421520,CA:8421520,Ti:8421520,TI:8421520,Cr:8421520,CR:8421520,Mn:8421520,MN:8421520,Fe:16753920,FE:16753920,Ni:10824234,NI:10824234,Cu:10824234,CU:10824234,Zn:10824234,ZN:10824234,Br:10824234,BR:10824234,Ag:8421520,AG:8421520,I:10494192,Ba:16753920,BA:16753920,Au:14329120,AU:14329120},l={defaultColor:16716947,Jmol:{H:16777215,He:14286847,HE:14286847,Li:13402367,LI:13402367,Be:12779264,BE:12779264,B:16758197,C:9474192,N:3166456,O:16715021,F:9494608,Ne:11789301,NE:11789301,Na:11230450,NA:11230450,Mg:9109248,MG:9109248,Al:12560038,AL:12560038,Si:1578e4,SI:1578e4,P:16744448,S:16777008,Cl:2093087,CL:2093087,Ar:8442339,AR:8442339,K:9388244,Ca:4062976,CA:4062976,Sc:15132390,SC:15132390,Ti:12567239,TI:12567239,V:10921643,Cr:9083335,CR:9083335,Mn:10255047,MN:10255047,Fe:14706227,FE:14706227,Co:15765664,CO:15765664,Ni:5296208,NI:5296208,Cu:13140019,CU:13140019,Zn:8224944,ZN:8224944,Ga:12750735,GA:12750735,Ge:6721423,GE:6721423,As:12419299,AS:12419299,Se:16752896,SE:16752896,Br:10889513,BR:10889513,Kr:6076625,KR:6076625,Rb:7351984,RB:7351984,Sr:65280,SR:65280,Y:9764863,Zr:9756896,ZR:9756896,Nb:7586505,NB:7586505,Mo:5551541,MO:5551541,Tc:3907230,TC:3907230,Ru:2396047,RU:2396047,Rh:687500,RH:687500,Pd:27013,PD:27013,Ag:12632256,AG:12632256,Cd:16767375,CD:16767375,In:10909043,IN:10909043,Sn:6717568,SN:6717568,Sb:10380213,SB:10380213,Te:13924864,TE:13924864,I:9699476,Xe:4366e3,XE:4366e3,Cs:5707663,CS:5707663,Ba:51456,BA:51456,La:7394559,LA:7394559,Ce:16777159,CE:16777159,Pr:14286791,PR:14286791,Nd:13107143,ND:13107143,Pm:10747847,PM:10747847,Sm:9437127,SM:9437127,Eu:6422471,EU:6422471,Gd:4587463,GD:4587463,Tb:3211207,TB:3211207,Dy:2097095,DY:2097095,Ho:65436,HO:65436,Er:58997,ER:58997,Tm:54354,TM:54354,Yb:48952,YB:48952,Lu:43812,LU:43812,Hf:5096191,HF:5096191,Ta:5089023,TA:5089023,W:2200790,Re:2522539,RE:2522539,Os:2516630,OS:2516630,Ir:1528967,IR:1528967,Pt:13684960,PT:13684960,Au:16765219,AU:16765219,Hg:12105936,HG:12105936,Tl:10900557,TL:10900557,Pb:5724513,PB:5724513,Bi:10375093,BI:10375093,Po:11230208,PO:11230208,At:7688005,AT:7688005,Rn:4358806,RN:4358806,Fr:4325478,FR:4325478,Ra:32e3,RA:32e3,Ac:7384058,AC:7384058,Th:47871,TH:47871,Pa:41471,PA:41471,U:36863,Np:33023,NP:33023,Pu:27647,PU:27647,Am:5528818,AM:5528818,Cm:7888099,CM:7888099,Bk:9064419,BK:9064419,Cf:10565332,CF:10565332,Es:11739092,ES:11739092,Fm:11739066,FM:11739066,Md:11734438,MD:11734438,No:12389767,NO:12389767,Lr:13041766,LR:13041766,Rf:13369433,RF:13369433,Db:13697103,DB:13697103,Sg:14221381,SG:14221381,Bh:14680120,BH:14680120,Hs:15073326,HS:15073326,Mt:15400998,MT:15400998},rasmol:a,defaultColors:Object.assign({},a),greenCarbon:Object.assign(Object.assign({},a),{C:65280}),cyanCarbon:Object.assign(Object.assign({},a),{C:65535}),magentaCarbon:Object.assign(Object.assign({},a),{C:16711935}),yellowCarbon:Object.assign(Object.assign({},a),{C:16776960}),whiteCarbon:Object.assign(Object.assign({},a),{C:16777215}),orangeCarbon:Object.assign(Object.assign({},a),{C:16753920}),purpleCarbon:Object.assign(Object.assign({},a),{C:8388736}),blueCarbon:Object.assign(Object.assign({},a),{C:255})},h={amino:{ALA:13158600,ARG:1334015,ASN:56540,ASP:15075850,CYS:15132160,GLN:56540,GLU:15075850,GLY:15461355,HIS:8553170,ILE:1016335,LEU:1016335,LYS:1334015,MET:15132160,PHE:3289770,PRO:14456450,SER:16422400,THR:16422400,TRP:11819700,TYR:3289770,VAL:1016335,ASX:16738740,GLX:16738740},shapely:{ALA:9240460,ARG:124,ASN:16743536,ASP:10485826,CYS:16777072,GLN:16731212,GLU:6684672,GLY:16777215,HIS:7368959,ILE:19456,LEU:4546117,LYS:4671416,MET:12099650,PHE:5459026,PRO:5395026,SER:16740418,THR:12078080,TRP:5195264,TYR:9203788,VAL:16747775,ASX:16711935,GLX:16711935},nucleic:{A:10526975,G:16740464,I:8454143,C:16747595,T:10551200,U:16744576}},c={atom:{A:12636415,B:11599792,C:16761032,D:16777088,E:16761087,F:11596016,G:16765040,H:15761536,I:16113331,J:49151,K:13458524,L:6737322,M:10145074,N:15631086,O:52945,P:65407,Q:3978097,R:139,S:12433259,T:25600,U:8388608,V:8421376,W:8388736,X:32896,Y:12092939,Z:11674146},hetatm:{A:9478351,B:8441752,C:13602992,D:13619056,E:13603023,F:8437952,G:13607008,H:12603504,I:12955267,J:42959,K:11881548,L:5682578,M:9090346,N:12481214,O:46753,P:53103,Q:3447649,R:187,S:10854235,T:37888,U:11534336,V:11579392,W:11534512,X:45232,Y:15250963,Z:12726834}},u={ssPyMol:{prop:"ss",map:o.pyMol},ssJmol:{prop:"ss",map:o.Jmol},Jmol:{prop:"elem",map:l.Jmol},amino:{prop:"resn",map:h.amino},shapely:{prop:"resn",map:h.shapely},nucleic:{prop:"resn",map:h.nucleic},chain:{prop:"chain",map:c.atom},rasmol:{prop:"elem",map:l.rasmol},default:{prop:"elem",map:l.defaultColors},greenCarbon:{prop:"elem",map:l.greenCarbon},chainHetatm:{prop:"chain",map:c.hetatm},cyanCarbon:{prop:"elem",map:l.cyanCarbon},magentaCarbon:{prop:"elem",map:l.magentaCarbon},purpleCarbon:{prop:"elem",map:l.purpleCarbon},whiteCarbon:{prop:"elem",map:l.whiteCarbon},orangeCarbon:{prop:"elem",map:l.orangeCarbon},yellowCarbon:{prop:"elem",map:l.yellowCarbon},blueCarbon:{prop:"elem",map:l.blueCarbon}}},"./src/glcartoon.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{drawCartoon:()=>M,subdivide_spline:()=>c});var i=r("./src/WebGL/math/index.ts"),s=r("./src/WebGL/shapes/index.ts"),n=r("./src/WebGL/index.ts"),o=r("./src/Gradient.ts"),a=r("./src/colors.ts"),l=r("./src/GLDraw.ts"),h=r("./src/utilities.ts");function c(e,t){var r,s,n,o,a,l,h,c,u,d=[],p=e;for((p=[]).push(e[0]),r=1,s=e.length-1;r0){var g=[s,s+1,s-1,s-2],v=u.faceidx;f[v]=g[0],f[v+1]=g[1],f[v+2]=g[3],f[v+3]=g[1],f[v+4]=g[2],f[v+5]=g[3],u.faceidx+=6}u.vertices+=2}}function v(e,t,r,i,n,o,l){l&&"default"!==l||(l="rectangle"),"edged"===l?function(e,t,r,i,n,o){if(!(t.length<2)){var l,h;if(l=t[0],h=t[t.length-1],l=c(l,i),h=c(h,i),!n)return g(e,l,h,r);var u,d,p,f,m,v,b,y,_,w,x,S,A,C,M,L,E,z,k,O,T,I,F=[],D=[[0,2,-6,-8],[-4,-2,6,4],[7,-1,-5,3],[-3,5,1,-7]];for(A=0,C=l.length;A0){var P=void 0!==S&&void 0!==x&&S.serial!==x.serial;for(M=0;M<4;M++){var G=[v+D[M][0],v+D[M][1],v+D[M][2],v+D[M][3]];if(I[y=k.faceidx]=G[0],I[y+1]=G[1],I[y+2]=G[3],I[y+3]=G[1],I[y+4]=G[2],I[y+5]=G[3],k.faceidx+=6,x.clickable||S.clickable||x.hoverable||S.hoverable){var j=F[G[3]].clone(),B=F[G[0]].clone(),N=F[G[2]].clone(),U=F[G[1]].clone();if(j.atom=F[G[3]].atom||null,N.atom=F[G[2]].atom||null,B.atom=F[G[0]].atom||null,U.atom=F[G[1]].atom||null,P){var V=j.clone().add(B).multiplyScalar(.5),W=N.clone().add(U).multiplyScalar(.5),H=j.clone().add(U).multiplyScalar(.5);M%2==0?((S.clickable||S.hoverable)&&(L=new s.Triangle(V,H,j),E=new s.Triangle(W,N,H),z=new s.Triangle(H,N,j),S.intersectionShape.triangle.push(L),S.intersectionShape.triangle.push(E),S.intersectionShape.triangle.push(z)),(x.clickable||x.hoverable)&&(L=new s.Triangle(B,U,H),E=new s.Triangle(U,W,H),z=new s.Triangle(B,H,V),x.intersectionShape.triangle.push(L),x.intersectionShape.triangle.push(E),x.intersectionShape.triangle.push(z))):((x.clickable||x.hoverable)&&(L=new s.Triangle(V,H,j),E=new s.Triangle(W,N,H),z=new s.Triangle(H,N,j),x.intersectionShape.triangle.push(L),x.intersectionShape.triangle.push(E),x.intersectionShape.triangle.push(z)),(S.clickable||S.hoverable)&&(L=new s.Triangle(B,U,H),E=new s.Triangle(U,W,H),z=new s.Triangle(B,H,V),S.intersectionShape.triangle.push(L),S.intersectionShape.triangle.push(E),S.intersectionShape.triangle.push(z)))}else(x.clickable||x.hoverable)&&(L=new s.Triangle(B,U,j),E=new s.Triangle(U,N,j),x.intersectionShape.triangle.push(L),x.intersectionShape.triangle.push(E))}}}k.vertices+=8,S=x}var q=F.length-8;for(O=(k=e.updateGeoGroup(8)).vertexArray,T=k.colorArray,I=k.faceArray,b=3*(v=k.vertices),y=k.faceidx,A=0;A<4;A++){F.push(F[2*A]),F.push(F[q+2*A]);var Y=F[2*A],Z=F[q+2*A];O[b+6*A]=Y.x,O[b+1+6*A]=Y.y,O[b+2+6*A]=Y.z,O[b+3+6*A]=Z.x,O[b+4+6*A]=Z.y,O[b+5+6*A]=Z.z,T[b+6*A]=_.r,T[b+1+6*A]=_.g,T[b+2+6*A]=_.b,T[b+3+6*A]=_.r,T[b+4+6*A]=_.g,T[b+5+6*A]=_.b}q+=8,L=[v,v+2,v+6,v+4],E=[v+1,v+5,v+7,v+3],I[y]=L[0],I[y+1]=L[1],I[y+2]=L[3],I[y+3]=L[1],I[y+4]=L[2],I[y+5]=L[3],I[y+6]=E[0],I[y+7]=E[1],I[y+8]=E[3],I[y+9]=E[1],I[y+10]=E[2],I[y+11]=E[3],k.faceidx+=12,k.vertices+=8}}(e,t,r,i,n):"rectangle"!==l&&"oval"!==l&&"parabola"!==l||function(e,t,r,i,n,o,l){var h,u,d,p,f,m,v,b,y,_;if((d=t.length)<2||t[0].length<2)return;for(h=0;h0&&(h-=1,o=!0),z=Math.round(h*(r.length-1)/p),E=a.CC.color(r[z]),y=v,_=b,v=[],b=[],f=[],void 0!==t[0][h].atom&&(L=t[0][h].atom,"oval"===l?m=w:"rectangle"===l?m=x:"parabola"===l&&(m=S)),m||(m=x),u=0;u0&&!o){for(u=0;u<2*d;u++)I=[A+F[u][0],A+F[u][1],A+F[u][2],A+F[u][3]],T[M=D.faceidx]=I[0],T[M+1]=I[1],T[M+2]=I[3],T[M+3]=I[1],T[M+4]=I[2],T[M+5]=I[3],D.faceidx+=6;if(L.clickable||L.hoverable){var G=[];for(u in G.push(new s.Triangle(y[0],v[0],v[d-1])),G.push(new s.Triangle(y[0],v[d-1],y[d-1])),G.push(new s.Triangle(y[d-1],v[d-1],b[d-1])),G.push(new s.Triangle(y[d-1],b[d-1],_[d-1])),G.push(new s.Triangle(b[0],_[0],_[d-1])),G.push(new s.Triangle(b[d-1],b[0],_[d-1])),G.push(new s.Triangle(v[0],y[0],_[0])),G.push(new s.Triangle(b[0],v[0],_[0])),G)L.intersectionShape.triangle.push(G[u])}}D.vertices+=2*d}for(k=D.vertexArray,O=D.colorArray,T=D.faceArray,C=3*(A=D.vertices),M=D.faceidx,h=0;h=0&&r<1&&(o.transparent=!0,o.opacity=r),o.outline=i;var a=new n.Mesh(t,o);e.add(a)}}function w(e,t,r,s,n,o,a,l,h){var c,m,g,v,b,y;if(s&&n&&a){var _=n.sub(s);_.normalize();var w=l[h];for(m=h+1;m0&&v(V,H,W,d,k,0,H.style);var r=[],i=null;if(t){for(O=0;O0&&v(V,H,W,d,k,0,H.style),H=[],O=0;O{"use strict";r.r(t),r.d(t,{CAP:()=>m.CAP,CC:()=>s.CC,Color:()=>s.Color,CustomLinear:()=>i.CustomLinear,Cylinder:()=>h.Cylinder,GLDraw:()=>m.GLDraw,GLModel:()=>v.GLModel,GLShape:()=>f.GLShape,GLViewer:()=>b.GLViewer,GLVolumetricRender:()=>p.GLVolumetricRender,Gradient:()=>i.Gradient,GradientType:()=>i.GradientType,Label:()=>n.Label,LabelCount:()=>n.LabelCount,MarchingCube:()=>u.MarchingCube,MarchingCubeInitializer:()=>u.MarchingCubeInitializer,Matrix3:()=>l.Matrix3,Matrix4:()=>l.Matrix4,Parsers:()=>a.Parsers,PausableTimer:()=>c.PausableTimer,PointGrid:()=>u.PointGrid,ProteinSurface:()=>u.ProteinSurface,Quaternion:()=>l.Quaternion,ROYGB:()=>i.ROYGB,RWB:()=>i.RWB,Ray:()=>l.Ray,Sinebow:()=>i.Sinebow,Sphere:()=>h.Sphere,SurfaceType:()=>u.SurfaceType,Triangle:()=>h.Triangle,Vector2:()=>l.Vector2,Vector3:()=>l.Vector3,VolumeData:()=>d.VolumeData,adjustVolumeStyle:()=>c.adjustVolumeStyle,applyPartialCharges:()=>o.applyPartialCharges,autoinit:()=>y.autoinit,autoload:()=>y.autoload,base64ToArray:()=>c.base64ToArray,bondLength:()=>a.bondLength,builtinColorSchemes:()=>s.builtinColorSchemes,builtinGradients:()=>i.builtinGradients,chains:()=>s.chains,clamp:()=>l.clamp,conversionMatrix3:()=>l.conversionMatrix3,createStereoViewer:()=>b.createStereoViewer,createViewer:()=>b.createViewer,createViewerGrid:()=>b.createViewerGrid,deepCopy:()=>c.deepCopy,degToRad:()=>l.degToRad,download:()=>c.download,drawCartoon:()=>g.drawCartoon,elementColors:()=>s.elementColors,extend:()=>c.extend,get:()=>c.get,getAtomProperty:()=>c.getAtomProperty,getColorFromStyle:()=>c.getColorFromStyle,getElement:()=>c.getElement,getExtent:()=>c.getExtent,getGradient:()=>i.getGradient,getPropertyRange:()=>c.getPropertyRange,getbin:()=>c.getbin,htmlColors:()=>s.htmlColors,isEmptyObject:()=>c.isEmptyObject,isNumeric:()=>c.isNumeric,makeFunction:()=>c.makeFunction,mergeGeos:()=>c.mergeGeos,normalizeValue:()=>i.normalizeValue,partialCharges:()=>o.partialCharges,processing_autoinit:()=>y.processing_autoinit,residues:()=>s.residues,setBondLength:()=>a.setBondLength,setSyncSurface:()=>u.setSyncSurface,specStringToObject:()=>c.specStringToObject,splitMesh:()=>f.splitMesh,ssColors:()=>s.ssColors,subdivide_spline:()=>g.subdivide_spline,syncSurface:()=>u.syncSurface,viewers:()=>y.viewers});var i=r("./src/Gradient.ts"),s=r("./src/colors.ts"),n=r("./src/Label.ts"),o=r("./src/partialCharges.ts"),a=r("./src/parsers/index.ts"),l=r("./src/WebGL/math/index.ts"),h=r("./src/WebGL/shapes/index.ts"),c=r("./src/utilities.ts"),u=r("./src/ProteinSurface4.ts"),d=r("./src/VolumeData.ts"),p=r("./src/VolumetricRender.ts"),f=r("./src/GLShape.ts"),m=r("./src/GLDraw.ts"),g=r("./src/glcartoon.ts"),v=r("./src/GLModel.ts"),b=r("./src/GLViewer.ts"),y=r("./src/autoload.ts");r("./src/specs.ts"),window&&(window.$3Dmol=t)},"./src/parsers/CDJSON.ts":(e,t,r)=>{"use strict";function i(e,t){var r=[[]];"string"==typeof e&&(e=JSON.parse(e));for(var i=e.m,s=i[0].a,n=i[0].b,o=i[0].s,a=void 0!==t&&void 0!==t.parseStyle?t.parseStyle:void 0!==o,l=r[r.length-1].length,h=0;hi})},"./src/parsers/CIF.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{CIF:()=>a});var i=r("./src/parsers/utils/computeSecondaryStructure.ts"),s=r("./src/parsers/utils/processSymmetries.ts"),n=r("./src/WebGL/index.ts"),o=r("./src/parsers/utils/assignPDBBonds.ts");function a(e,t={}){var r=[],a=!t.doAssembly,l=r.modelData=[],h=void 0===t.assignBonds||t.assignBonds;function c(e,t){for(var r=[],i=0,s=0;s-1){let e=f.split("");e[m]="_",f=(f=e.join("")).substring(0,m)+"_"+f.substring(m+1)}}d.push(f)}}for(var g,v,b,y,_=0;_{"use strict";r.r(t),r.d(t,{CUBE:()=>o});var i=r("./src/WebGL/index.ts"),s=r("./src/parsers/utils/assignBonds.ts"),n=r("./src/parsers/utils/anumToSymbol.ts");function o(e,t){t=t||{};var r=[[]],o=e.split(/\r?\n/),a=void 0===t.assignBonds||t.assignBonds;if(o.length<6)return r;var l=o[2].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),h=Math.abs(parseFloat(l[0]));let c={};var u=c.origin=new i.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3]));l=o[3].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");var d=(l=o[3].replace(/^\s+/,"").replace(/\s+/g," ").split(" "))[0]>0?.529177:1;u.multiplyScalar(d);var p=Math.abs(l[0]),f=new i.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])).multiplyScalar(d);l=o[4].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");var m=Math.abs(l[0]),g=new i.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])).multiplyScalar(d);l=o[5].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");var v=Math.abs(l[0]),b=new i.Vector3(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])).multiplyScalar(d);if(c.size={x:p,y:m,z:v},c.unit=new i.Vector3(f.x,g.y,b.z),0!=f.y||0!=f.z||0!=g.x||0!=g.z||0!=b.x||0!=b.y){c.matrix4=new i.Matrix4(f.x,g.x,b.x,0,f.y,g.y,b.y,0,f.z,g.z,b.z,0,0,0,0,1);let e=(new i.Matrix4).makeTranslation(u.x,u.y,u.z);c.matrix4=c.matrix4.multiplyMatrices(e,c.matrix4),c.matrix=c.matrix4.matrix3FromTopLeft(),c.origin=new i.Vector3(0,0,0),c.unit=new i.Vector3(1,1,1)}r.modelData=[{cryst:c}],o=o.splice(6,h);for(var y=r[r.length-1].length,_=y+o.length,w=y;w<_;++w){var x={};x.serial=w;var S=o[w-y].replace(/^\s+/,"").replace(/\s+/g," ").split(" ");x.elem=n.anumToSymbol[S[0]],x.x=parseFloat(S[2])*d,x.y=parseFloat(S[3])*d,x.z=parseFloat(S[4])*d,x.hetflag=!0,x.bonds=[],x.bondOrder=[],x.properties={},r[r.length-1].push(x)}if(a)for(let e=0;e{"use strict";r.r(t),r.d(t,{GRO:()=>n});var i=r("./src/parsers/utils/assignPDBBonds.ts"),s=r("./src/parsers/utils/atomNameToElem.ts");function n(e,t){for(var r=[],n=e.split(/\r?\n|\r/);n.length>0&&!(n.length<3);){var o=parseInt(n[1]);if(isNaN(o)||o<=0)break;if(n.length44&&(p.dx=10*parseFloat(d.slice(44,52)),p.dy=10*parseFloat(d.slice(52,60)),p.dz=10*parseFloat(d.slice(60,68))),a[u]=p}if(n.length<=l+3){var f=n[l++].trim().split(/\s+/);if(3==f.length){for(var m=0;m<3;m++)f[m]=10*parseFloat(f[m]);r.box=f}}n.splice(0,++l)}for(let e=0;e{"use strict";r.r(t),r.d(t,{LAMMPSTRJ:()=>s});var i=r("./src/parsers/utils/assignBonds.ts");function s(e,t){for(var r=[],s={id:"serial",type:"atom",element:"elem",q:"charge",radius:"radius",x:"x",xu:"x",xs:"x",xsu:"x",y:"y",yu:"y",ys:"y",ysu:"y",z:"z",zu:"z",zs:"z",zsu:"z"},n=e.split(/\r?\n|\r/),o=0,a=0,l=0;l{"use strict";r.r(t),r.d(t,{MMTFparser:()=>u});var i=r("./src/utilities.ts"),s=r("./src/WebGL/index.ts"),n=r("./src/parsers/utils/computeSecondaryStructure.ts"),o=r("./src/parsers/utils/processSymmetries.ts"),a=r("./src/vendor/mmtf.js"),l=function(e){return String.fromCharCode.apply(null,e).replace(/\0/g,"")},h=function(e){return 0==e||2==e||4==e?"h":3==e?"s":"c"};let c=new Set(["D-SACCHARIDE","D-SACCHARIDE 1,4 AND 1,4 LINKING","D-SACCHARIDE 1,4 AND 1,6 LINKING","L-SACCHARIDE","L-SACCHARIDE 1,4 AND 1,4 LINKING","L-SACCHARIDE 1,4 AND 1,6 LINKING","NON-POLYMER","OTHER","PEPTIDE-LIKE","SACCHARIDE"]);function u(e,t){var r=!t.keepH,u=t.altLoc?t.altLoc:"A",d=!!t.noSecondaryStructure,p=!t.noComputeSecondaryStructure,f=!t.doAssembly,m=t.assemblyIndex?t.assemblyIndex:0;e="string"==typeof e?(0,i.base64ToArray)(e):new Uint8Array(e);var g,v,b,y,_,w,x=a.decode(e),S=[[]],A=S.modelData=[],C=0,M=0,L=0,E=x.secStructList,z=x.bFactorList,k=x.altLocList,O=x.occupancyList,T=x.bondAtomList,I=x.bondOrderList,F=x.numModels;if(0==F)return S;t.multimodel||(F=1);var D=[];if(!f&&x.bioAssemblyList&&x.bioAssemblyList.length>0){var R=x.bioAssemblyList[m].transformList;for(g=0,w=R.length;g{e.chainIndexList.forEach((t=>{B[t]="polymer"==e.type}))}));var N=0;for(_=0;_=E.length||h(E[te]!=ee))&&(Q=!0)}var re=x.groupIdList[M],ie=X.groupName;let e=X.chemCompType;var se=L;let t=c.has(e)||!B[C];for(b=0;b<$;++b){var ne=X.elementList[b];if(r&&"H"==ne)L+=1;else{var oe="";z&&(oe=z[L]);var ae="";k&&k[L]&&(ae=String.fromCharCode(k[L]));var le="";if(O&&(le=O[L]),""==ae||ae==u||"*"==u){var he=x.atomIdList[L],ce=X.atomNameList[b],ue=0;X.atomChargeList&&(ue=X.atomChargeList[b]);var de=x.xCoordList[L],pe=x.yCoordList[L],fe=x.zCoordList[L];W[L]=V.length,V.push({resn:ie,x:de,y:pe,z:fe,elem:ne,hetflag:t,chain:q,resi:re,icode:ae,rescode:re+(" "!=ae?"^"+ae:""),serial:he,altLoc:ae,index:L,atom:ce,bonds:[],ss:h(K),ssbegin:J,ssend:Q,bondOrder:[],properties:{charge:ue,occupancy:le},b:oe}),L+=1}else L+=1}}var me=X.bondAtomList;for(b=0,y=X.bondOrderList.length;b=L){N=e;break}let s=W[t],n=W[r],o=V[s],a=V[n];o&&a&&(o.bonds.push(n),o.bondOrder.push(i),a.bonds.push(s),a.bondOrder.push(i))}t.multimodel&&(t.onemol||S.push([]))}if(!f)for(let e=0;e{"use strict";r.r(t),r.d(t,{MOL2:()=>s});let i={"C.1":"C",C1:"C","C.2":"C",C2:"C","C.3":"C",C3:"C","C.ar":"C",Car:"C","C.cat":"C",Ccat:"C","H.spc":"H",Hspc:"H","H.t3p":"H",Ht3p:"H","N.1":"N",N1:"N","N.2":"N",N2:"N","N.3":"N",N3:"N","N.4":"N",N4:"N","N.am":"N",Nam:"N","N.ar":"N",Nar:"N","N.p13":"N",Np13:"N","O.2":"O",O2:"O","O.3":"O",O3:"O","O.co2":"O",Oco2:"O","O.spc":"O",Ospc:"O","O.t3p":"O",Ot3p:"O","P.3":"P",P3:"P","S.2":"S",S2:"S","S.3":"S",S3:"S","S.o":"S",So:"S","S.o2":"S",So2:"S"};function s(e,t){var r=[[]],s=!1;void 0!==t.keepH&&(s=!t.keepH);var n=e.search(/@MOLECULE/),o=e.search(/@ATOM/);if(-1==n||-1==o)return r;for(var a=e.substring(n).split(/\r?\n|\r/);a.length>0;){var l=[],h=a[2].replace(/^\s+/,"").replace(/\s+/g," ").split(" "),c=parseInt(h[0]),u=0;h.length>1&&(u=parseInt(h[1]));var d,p=4;for(d=3;dATOM"==a[d]){p=d+1;break}var f=r[r.length-1].length,m=f+c;for(d=f;dBOND"==a[p++]){w=!0;break}if(w&&u)for(d=0;d{"use strict";r.r(t),r.d(t,{PDB:()=>s});var i=r("./src/parsers/utils/getSinglePDB.ts");function s(e,t){t=t||{};var r=[],s={};r.modelData=[];for(var n=e.split(/\r?\n|\r/);n.length>0;){var o=(0,i.getSinglePDB)(n,t,s),a=o[0],l=o[1];if(n=o[2],0!=a.length){if(t.multimodel&&t.onemol&&r.length>0)for(var h=r[0].length,c=0;c{"use strict";r.r(t),r.d(t,{PQR:()=>n});var i=r("./src/parsers/utils/assignPDBBonds.ts"),s=r("./src/parsers/utils/computeSecondaryStructure.ts");function n(e,t){var r=[[]],n=!t.noSecondaryStructure;r.modelData=[{symmetries:[]}];var o,a=[],l=e.split(/\r?\n|\r/);for(let e=0;e1&&t[1].toUpperCase()!=t[1]&&(v=t.substring(0,2)),c="H"==o[0],a[e]=r[r.length-1].length,r[r.length-1].push({resn:i,x:d,y:p,z:f,elem:v,hetflag:c,chain:s,resi:n,serial:e,atom:t,bonds:[],ss:"c",bondOrder:[],properties:{charge:m,partialCharge:m,radius:g},pdbline:o})}else if("CONECT"==h){var b=parseInt(o.substring(6,11)),y=r[r.length-1][a[b]];for(let e=0;e<4;e++){var _=parseInt(o.substring([11,16,21,26][e],[11,16,21,26][e]+5)),w=r[r.length-1][a[_]];void 0!==y&&void 0!==w&&(y.bonds.push(a[_]),y.bondOrder.push(1))}}}for(let e=0;e{"use strict";function i(e){var t,r=[],i=0,s=e.split(/\r?\n|\r/);if(!(s.length>0&&s[0].includes("VERSION")))return[];var n=s.filter((function(e){return e.includes("POINTERS")||e.includes("ATOM_NAME")||e.includes("CHARGE")||e.includes("RADII")||e.includes("BONDS_INC_HYDROGEN")||e.includes("BONDS_WITHOUT_HYDROGEN")})),o=c("POINTERS");if(-1==o)return[];var a=u(o),l=parseInt(s[o+1].slice(0,a[1]));if(isNaN(l)||l<=0)return[];if(-1==(o=c("ATOM_NAME")))return[];var h=(a=u(o))[0];for(let e=0;e0){for(;!s[t].includes("FORMAT");)t++;return t}return-1}function u(e){var t=s[e].match(/\((\d*)\S*/),r=s[e].match(/[a-zA-Z](\d*)\)\s*/);return null==r&&(r=s[e].match(/[a-zA-Z](\d*)\.\d*\)\s*/)),[t[1],r[1]]}return[r]}r.r(t),r.d(t,{PRMTOP:()=>i})},"./src/parsers/SDF.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{SDF:()=>n});var i=function(e,t){var r=[[]],i=!1;for(void 0!==t.keepH&&(i=!t.keepH);e.length>0&&!(e.length<4);){var s=parseInt(e[3].substring(0,3));if(isNaN(s)||s<=0)break;var n=parseInt(e[3].substring(3,6)),o=4;if(e.length<4+s+n)break;var a,l,h=[],c=r[r.length-1].length,u=c+s;for(a=c;a0&&!(e.length<8)&&e[4].startsWith("M V30 BEGIN CTAB")&&e[5].startsWith("M V30 COUNTS")&&!(e[5].length<14);){var s=e[5].substring(13).match(/\S+/g);if(s.length<2)break;var n=parseInt(s[0]);if(isNaN(n)||n<=0)break;var o=parseInt(s[1]),a=7;if(e.length<8+n+o)break;var l,h=[],c=r[r.length-1].length,u=c+n;for(l=c;l4){var p={},f=d[1].replace(/ /g,"");p.atom=p.elem=f[0].toUpperCase()+f.substring(1).toLowerCase(),"H"===p.elem&&i||(p.serial=l,h[l]=r[r.length-1].length,p.x=parseFloat(d[2]),p.y=parseFloat(d[3]),p.z=parseFloat(d[4]),p.hetflag=!0,p.bonds=[],p.bondOrder=[],p.properties={},p.index=r[r.length-1].length,r[r.length-1].push(p))}}if("M V30 END ATOM"!==e[a])break;if(a++,0===o||"M V30 BEGIN BOND"!==e[a])break;for(a++,l=0;l3){var g=h[parseInt(m[2])-1+c],v=h[parseInt(m[3])-1+c],b=parseFloat(m[1]);void 0!==g&&void 0!==v&&(r[r.length-1][g].bonds.push(v),r[r.length-1][g].bondOrder.push(b),r[r.length-1][v].bonds.push(g),r[r.length-1][v].bondOrder.push(b))}}if(!t.multimodel)break;for(t.onemol||r.push([]);"$$$$"!==e[a]&&a3&&n[3].length>38&&(r=n[3].substring(34,39)),"V2000"===r?i(n,t):"V3000"===r?s(n,t):[[""]]}},"./src/parsers/VASP.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{VASP:()=>s});var i=r("./src/WebGL/index.ts");function s(e){var t=[[]],r={},s=e.replace(/^\s+/,"").split(/\r?\n/);if(s.length<3)return t;if(!s[1].match(/\d+/))return console.log("Warning: second line of the vasp structure file must be a number"),t;if(r.length=parseFloat(s[1]),r.length<0)return console.log("Warning: Vasp implementation for negative lattice lengths is not yet available"),t;r.xVec=new Float32Array(s[2].replace(/^\s+/,"").split(/\s+/)),r.yVec=new Float32Array(s[3].replace(/^\s+/,"").split(/\s+/)),r.zVec=new Float32Array(s[4].replace(/^\s+/,"").split(/\s+/));var n=new i.Matrix3(r.xVec[0],r.xVec[1],r.xVec[2],r.yVec[0],r.yVec[1],r.yVec[2],r.zVec[0],r.zVec[1],r.zVec[2]);n.multiplyScalar(r.length),t.modelData=[{symmetries:[],cryst:{matrix:n}}];var o=s[5].replace(/\s+/,"").replace(/\s+$/,"").split(/\s+/),a=new Int16Array(s[6].replace(/^\s+/,"").split(/\s+/)),l=s[7].replace(/\s+/,"");if(l.match(/C/))l="cartesian";else{if(!l.match(/D/))return console.log("Warning: Unknown vasp mode in POSCAR file: mode must be either C(artesian) or D(irect)"),t;l="direct"}if(o.length!=a.length)return console.log("Warning: declaration of atomary species wrong:"),console.log(o),console.log(a),t;s.splice(0,8);for(var h=0,c=0,u=o.length;c{"use strict";r.r(t),r.d(t,{XYZ:()=>n});var i=r("./src/WebGL/index.ts"),s=r("./src/parsers/utils/assignBonds.ts");function n(e,t){for(var r=[[]],n=void 0===(t=t||{}).assignBonds||t.assignBonds,o=e.split(/\r?\n|\r/);o.length>0&&!(o.length<3);){var a=parseInt(o[0]);if(isNaN(a)||a<=0)break;if(o.length1){var h=new Float32Array(l[1].split(/\s+/)),c=new i.Matrix3(h[0],h[3],h[6],h[1],h[4],h[7],h[2],h[5],h[8]);r.modelData=[{cryst:{matrix:c}}]}for(var u=2,d=r[r.length-1].length,p=d+a,f=d;f=7&&(g.dx=parseFloat(m[4]),g.dy=parseFloat(m[5]),g.dz=parseFloat(m[6]))}if(!t.multimodel)break;r.push([]),o.splice(0,u)}if(n)for(let e=0;e{"use strict";r.r(t),r.d(t,{Parsers:()=>v,bondLength:()=>g.bondLength,setBondLength:()=>g.setBondLength});var i=r("./src/parsers/VASP.ts"),s=r("./src/parsers/CUBE.ts"),n=r("./src/parsers/XYZ.ts"),o=r("./src/parsers/SDF.ts"),a=r("./src/parsers/CDJSON.ts"),l=r("./src/parsers/CIF.ts"),h=r("./src/parsers/MOL2.ts"),c=r("./src/parsers/PDB.ts"),u=r("./src/parsers/PQR.ts"),d=r("./src/parsers/MMTF.ts"),p=r("./src/parsers/PRMTOP.ts"),f=r("./src/parsers/GRO.ts"),m=r("./src/parsers/LAMMPSTRJ.ts"),g=r("./src/parsers/utils/bondLength.ts");const v={vasp:i.VASP,VASP:i.VASP,cube:s.CUBE,CUBE:s.CUBE,xyz:n.XYZ,XYZ:n.XYZ,sdf:o.SDF,SDF:o.SDF,json:a.CDJSON,cdjson:a.CDJSON,CDJSON:a.CDJSON,mcif:l.CIF,cif:l.CIF,CIF:l.CIF,mol2:h.MOL2,MOL2:h.MOL2,pdb:c.PDB,PDB:c.PDB,pdbqt:c.PDB,PDBQT:c.PDB,pqr:u.PQR,PQR:u.PQR,mmtf:d.MMTFparser,MMTF:d.MMTFparser,prmtop:p.PRMTOP,PRMTOP:p.PRMTOP,gro:f.GRO,GRO:f.GRO,lammpstrj:m.LAMMPSTRJ,LAMMPSTRJ:m.LAMMPSTRJ}},"./src/parsers/utils/anumToSymbol.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{anumToSymbol:()=>i});const i={1:"H",2:"He",3:"Li",4:"Be",5:"B",6:"C",7:"N",8:"O",9:"F",10:"Ne",11:"Na",12:"Mg",13:"Al",14:"Si",15:"P",16:"S",17:"Cl",18:"Ar",19:"K",20:"Ca",21:"Sc",22:"Ti",23:"V",24:"Cr",25:"Mn",26:"Fe",27:"Co",28:"Ni",29:"Cu",30:"Zn",31:"Ga",32:"Ge",33:"As",34:"Se",35:"Br",36:"Kr",37:"Rb",38:"Sr",39:"Y",40:"Zr",41:"Nb",42:"Mo",43:"Tc",44:"Ru",45:"Rh",46:"Pd",47:"Ag",48:"Cd",49:"In",50:"Sn",51:"Sb",52:"Te",53:"I",54:"Xe",55:"Cs",56:"Ba",71:"Lu",72:"Hf",73:"Ta",74:"W",75:"Re",76:"Os",77:"Ir",78:"Pt",79:"Au",80:"Hg",81:"Tl",82:"Pb",83:"Bi",84:"Po",85:"At",86:"Rn",87:"Fr",88:"Ra",104:"Rf",105:"Db",106:"Sg",107:"Bh",108:"Hs",109:"Mt",110:"Ds",111:"Rg",112:"Cn",113:"Nh",114:"Fl",115:"Mc",116:"Lv",117:"Ts",118:"Og",57:"La",58:"Ce",59:"Pr",60:"Nd",61:"Pm",62:"Sm",63:"Eu",64:"Gd",65:"Tb",66:"Dy",67:"Ho",68:"Er",69:"Tm",70:"Yb",89:"Ac",90:"Th",91:"Pa",92:"U",93:"Np",94:"Pu",95:"Am",96:"Cm",97:"Bk",98:"Cf",99:"Es",100:"Fm",101:"Md",102:"No"}},"./src/parsers/utils/areConnected.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{areConnected:()=>n});var i=r("./src/parsers/utils/bondLength.ts");const s=new Set(["Na","K","Ca","Mg","Mn","Sr"]);function n(e,t,r){if(r&&r.unboundCations&&(s.has(e.elem)||s.has(t.elem)))return!1;let n=(0,i.bondLength)(e.elem)+(0,i.bondLength)(t.elem);n+=.25,n*=n;let o=e.x-t.x;if(o*=o,o>n)return!1;let a=e.y-t.y;if(a*=a,a>n)return!1;let l=e.z-t.z;if(l*=l,l>n)return!1;const h=o+a+l;return!(isNaN(h)||h<.5||h>n||e.altLoc!==t.altLoc&&" "!==e.altLoc&&" "!==t.altLoc)}},"./src/parsers/utils/assignBackboneHBonds.ts":(e,t,r)=>{"use strict";function i(e,t){const r=t||3.2,i=r*r,s=[];for(let t=0,r=e.length;tr)break;if(e.atom==n.atom)continue;const a=Math.abs(e.y-n.y);if(a>r)continue;const l=Math.abs(e.x-n.x);if(l>r)continue;const h=l*l+a*a+t*t;h>i||e.chain==n.chain&&Math.abs(e.resi-n.resi)<4||(hi})},"./src/parsers/utils/assignBonds.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{assignBonds:()=>o});var i=r("./src/parsers/utils/areConnected.ts");const s=[{x:0,y:0,z:1},{x:0,y:1,z:-1},{x:0,y:1,z:0},{x:0,y:1,z:1},{x:1,y:-1,z:-1},{x:1,y:-1,z:0},{x:1,y:-1,z:1},{x:1,y:0,z:-1},{x:1,y:0,z:0},{x:1,y:0,z:1},{x:1,y:1,z:-1},{x:1,y:1,z:0},{x:1,y:1,z:1}],n=4.95;function o(e,t){for(let t=0,r=e.length;t{"use strict";r.r(t),r.d(t,{assignPDBBonds:()=>o});var i=r("./src/parsers/utils/areConnected.ts"),s=r("./src/parsers/utils/assignBonds.ts"),n=r("./src/parsers/utils/standardResidues.ts");function o(e,t){const r=[],o=[];for(let t=0,i=e.length;t1)break;(0,i.areConnected)(s,e,t)&&(-1===s.bonds.indexOf(e.index)&&(s.bonds.push(e.index),s.bondOrder.push(1),e.bonds.push(s.index),e.bondOrder.push(1)),s.resi!==e.resi&&(a=!0))}}}},"./src/parsers/utils/atomNameToElem.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{atomNameToElem:()=>s});var i=r("./src/parsers/utils/bondLength.ts");function s(e,t){let r=e.replace(/ /g,"");return r.length>0&&"H"===r[0]&&"Hg"!==r&&"He"!==r&&"Hf"!==r&&"Hs"!==r&&"Ho"!==r&&(r="H"),r.length>1&&(r=r[0].toUpperCase()+r.substring(1).toLowerCase(),void 0===i.bondTable[r]?r=r[0]:t&&("Ca"===r||"Cd"===r)&&(r="C")),r}},"./src/parsers/utils/bondLength.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{bondLength:()=>s,bondTable:()=>i,setBondLength:()=>n});let i={H:.37,He:.32,Li:1.34,Be:.9,B:.82,C:.77,N:.75,O:.73,F:.71,Ne:.69,Na:1.54,Mg:1.3,Al:1.18,Si:1.11,P:1.06,S:1.02,Cl:.99,Ar:.97,K:1.96,Ca:1.74,Sc:1.44,Ti:1.56,V:1.25,Mn:1.39,Fe:1.25,Co:1.26,Ni:1.21,Cu:1.38,Zn:1.31,Ga:1.26,Ge:1.22,Se:1.16,Br:1.14,Kr:1.1,Rb:2.11,Sr:1.92,Y:1.62,Zr:1.48,Nb:1.37,Mo:1.45,Tc:1.56,Ru:1.26,Rh:1.35,Pd:1.31,Ag:1.53,Cd:1.48,In:1.44,Sn:1.41,Sb:1.38,Te:1.35,I:1.33,Xe:1.3,Cs:2.25,Ba:1.98,Lu:1.6,Hf:1.5,Ta:1.38,W:1.46,Re:1.59,Os:1.44,Ir:1.37,Pt:1.28,Au:1.44,Hg:1.49,Tl:1.48,Pb:1.47,Bi:1.46,Rn:1.45};function s(e){return i[e]||1.6}function n(e,t){t<0&&(t=0),i[e]=t}},"./src/parsers/utils/computeSecondaryStructure.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{computeSecondaryStructure:()=>s});var i=r("./src/parsers/utils/assignBackboneHBonds.ts");function s(e,t){(0,i.assignBackboneHBonds)(e,t);const r={};let s,n,o,a,l,h;for(s=0,n=e.length;s{"use strict";r.r(t),r.d(t,{getSinglePDB:()=>u});var i=r("./src/WebGL/index.ts"),s=r("./src/parsers/utils/atomNameToElem.ts"),n=r("./src/parsers/utils/bondLength.ts"),o=r("./src/parsers/utils/computeSecondaryStructure.ts"),a=r("./src/parsers/utils/isEmpty.ts"),l=r("./src/parsers/utils/processSymmetries.ts"),h=r("./src/parsers/utils/assignPDBBonds.ts"),c=r("./src/parsers/utils/validateBonds.ts");function u(e,t,r){const u=[],d=void 0===t.assignBonds||t.assignBonds,p=!t.keepH,f=!!t.noSecondaryStructure,m=!t.noComputeSecondaryStructure,g=!t.doAssembly,v=t.altLoc?t.altLoc:"A",b={symmetries:[],cryst:void 0};let y,_=[];const w=[];let x;const S={};for(let t=0;t=4?1:r}}else S[n]=1,0!=t.bonds.length&&t.bonds[t.bonds.length-1]===s||(t.bonds.push(s),t.bondOrder.push(1))}}else if("HELIX "===o){a=x.substring(19,20),l=parseInt(x.substring(21,25)),h=parseInt(x.substring(33,37)),a in r||(r[a]={}),r[a][l]="h1";for(let e=l+1;e1&&("1"==e[1]?t.ssbegin=!0:"2"==e[1]&&(t.ssend=!0))}}return[u,b,_]}},"./src/parsers/utils/isEmpty.ts":(e,t,r)=>{"use strict";function i(e){for(const t in e)return!1;return!0}r.r(t),r.d(t,{isEmpty:()=>i})},"./src/parsers/utils/processSymmetries.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{processSymmetries:()=>s});var i=r("./src/WebGL/index.ts");function s(e,t,r,s){const n=!r.duplicateAssemblyAtoms,o=t.length;let a=o,l=-1,h=null,c=null;(r.normalizeAssembly||r.wrapAtoms)&&s&&(h=(0,i.conversionMatrix3)(s.a,s.b,s.c,s.alpha,s.beta,s.gamma),c=new i.Matrix3,c.getInverse3(h));let u=function(e){let t=e.clone().applyMatrix3(c);const r=[t.x,t.y,t.z],s=[0,0,0];for(let e=0;e<3;e++){for(;r[e]<-.001;)r[e]+=1,s[e]+=1;for(;r[e]>1.001;)r[e]-=1,s[e]-=1}const n=new i.Vector3(s[0],s[1],s[2]);return n.applyMatrix3(h),n};if(r.normalizeAssembly&&s)for(let r=0;r.001&&(l=r),e[r].translate(n)}if(n){if(e.length>1)for(let r=0;r=0){const r=new i.Vector3;for(let i=0;i{"use strict";r.r(t),r.d(t,{standardResidues:()=>i});const i=new Set(["ABU","ACD","ALA","ALB","ALI","ARG","AR0","ASN","ASP","ASX","BAS","CYS","CYH","CYX","CSS","CSH","GLN","GLU","GLX","GLY","HIS","HIE","HID","HIP","HYP","ILE","ILU","LEU","LYS","MET","PCA","PGA","PHE","PR0","PRO","PRZ","SER","THR","TRP","TYR","VAL","A","1MA","C","5MC","OMC","G","1MG","2MG","M2G","7MG","OMG","YG","I","T","U","+U","H2U","5MU","PSU","ACE","F0R","H2O","HOH","WAT"])},"./src/parsers/utils/validateBonds.ts":(e,t,r)=>{"use strict";function i(e,t){for(let r=0,i=e.length;ri})},"./src/partialCharges.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{applyPartialCharges:()=>s,partialCharges:()=>i});const i={"ALA:N":-.15,"ALA:CA":.1,"ALA:CB":0,"ALA:C":.6,"ALA:O":-.55,"ARG:N":-.15,"ARG:CA":.1,"ARG:CB":0,"ARG:CG":0,"ARG:CD":.1,"ARG:NE":-.1,"ARG:CZ":.5,"ARG:NH1":.25,"ARG:NH2":.25,"ARG:C":.6,"ARG:O":-.55,"ASN:N":-.15,"ASN:CA":.1,"ASN:CB":0,"ASN:CG":.55,"ASN:OD1":-.55,"ASN:ND2":0,"ASN:C":.6,"ASN:O":-.55,"ASP:N":-.15,"ASP:CA":.1,"ASP:CB":0,"ASP:CG":.14,"ASP:OD1":-.57,"ASP:OD2":-.57,"ASP:C":.6,"ASP:O":-.55,"CYS:N":-.15,"CYS:CA":.1,"CYS:CB":.19,"CYS:SG":-.19,"CYS:C":.6,"CYS:O":-.55,"GLN:N":-.15,"GLN:CA":.1,"GLN:CB":0,"GLN:CG":0,"GLN:CD":.55,"GLN:OE1":-.55,"GLN:NE2":0,"GLN:C":.6,"GLN:O":-.55,"GLU:N":-.15,"GLU:CA":.1,"GLU:CB":0,"GLU:CG":0,"GLU:CD":.14,"GLU:OE1":-.57,"GLU:OE2":-.57,"GLU:C":.6,"GLU:O":-.55,"GLY:N":-.15,"GLY:CA":.1,"GLY:C":.6,"GLY:O":-.55,"HIS:N":-.15,"HIS:CA":.1,"HIS:CB":0,"HIS:CG":.1,"HIS:ND1":-.1,"HIS:CD2":.1,"HIS:NE2":-.4,"HIS:CE1":.3,"HIS:C":.6,"HIS:O":-.55,"ILE:N":-.15,"ILE:CA":.1,"ILE:CB":0,"ILE:CG2":0,"ILE:CG1":0,"ILE:CD":0,"ILE:C":.6,"ILE:O":-.55,"LEU:N":-.15,"LEU:CA":.1,"LEU:CB":0,"LEU:CG":0,"LEU:CD1":0,"LEU:CD2":0,"LEU:C":.6,"LEU:O":-.55,"LYS:N":-.15,"LYS:CA":.1,"LYS:CB":0,"LYS:CG":0,"LYS:CD":0,"LYS:CE":.25,"LYS:NZ":.75,"LYS:C":.6,"LYS:O":-.55,"MET:N":-.15,"MET:CA":.1,"MET:CB":0,"MET:CG":.06,"MET:SD":-.12,"MET:CE":.06,"MET:C":.6,"MET:O":-.55,"PHE:N":-.15,"PHE:CA":.1,"PHE:CB":0,"PHE:CG":0,"PHE:CD1":0,"PHE:CD2":0,"PHE:CE1":0,"PHE:CE2":0,"PHE:CZ":0,"PHE:C":.6,"PHE:O":-.55,"PRO:N":-.25,"PRO:CD":.1,"PRO:CA":.1,"PRO:CB":0,"PRO:CG":0,"PRO:C":.6,"PRO:O":-.55,"SER:N":-.15,"SER:CA":.1,"SER:CB":.25,"SER:OG":-.25,"SER:C":.6,"SER:O":-.55,"THR:N":-.15,"THR:CA":.1,"THR:CB":.25,"THR:OG1":-.25,"THR:CG2":0,"THR:C":.6,"THR:O":-.55,"TRP:N":-.15,"TRP:CA":.1,"TRP:CB":0,"TRP:CG":-.03,"TRP:CD2":.1,"TRP:CE2":-.04,"TRP:CE3":-.03,"TRP:CD1":.06,"TRP:NE1":-.06,"TRP:CZ2":0,"TRP:CZ3":0,"TRP:CH2":0,"TRP:C":.6,"TRP:O":-.55,"TYR:N":-.15,"TYR:CA":.1,"TYR:CB":0,"TYR:CG":0,"TYR:CD1":0,"TYR:CE1":0,"TYR:CD2":0,"TYR:CE2":0,"TYR:CZ":.25,"TYR:OH":-.25,"TYR:C":.6,"TYR:O":-.55,"VAL:N":-.15,"VAL:CA":.1,"VAL:CB":0,"VAL:CG1":0,"VAL:CG2":0,"VAL:C":.6,"VAL:O":-.55};function s(e,t){if((!t||void 0===e.partialCharge)&&e.resn&&e.atom){var r=e.resn+":"+e.atom;e.properties.partialCharge=i[r]}}},"./src/specs.ts":(e,t,r)=>{"use strict";r.r(t)},"./src/utilities.ts":(__unused_webpack_module,__nested_webpack_exports__,__nested_webpack_require_1113028__)=>{"use strict";__nested_webpack_require_1113028__.r(__nested_webpack_exports__),__nested_webpack_require_1113028__.d(__nested_webpack_exports__,{PausableTimer:()=>PausableTimer,adjustVolumeStyle:()=>adjustVolumeStyle,base64ToArray:()=>base64ToArray,deepCopy:()=>deepCopy,download:()=>download,extend:()=>extend,get:()=>get,getAtomProperty:()=>getAtomProperty,getColorFromStyle:()=>getColorFromStyle,getElement:()=>getElement,getExtent:()=>getExtent,getPropertyRange:()=>getPropertyRange,getbin:()=>getbin,isEmptyObject:()=>isEmptyObject,isNumeric:()=>isNumeric,makeFunction:()=>makeFunction,mergeGeos:()=>mergeGeos,specStringToObject:()=>specStringToObject});var _Gradient__WEBPACK_IMPORTED_MODULE_0__=__nested_webpack_require_1113028__("./src/Gradient.ts"),_VolumeData__WEBPACK_IMPORTED_MODULE_1__=__nested_webpack_require_1113028__("./src/VolumeData.ts"),_colors__WEBPACK_IMPORTED_MODULE_2__=__nested_webpack_require_1113028__("./src/colors.ts");function extend(e,t){for(var r in t)t.hasOwnProperty(r)&&void 0!==t[r]&&(e[r]=t[r]);return e}function deepCopy(e){let t,r,i;if(null==e)return{};if("object"!=typeof e||null===e)return e;for(i in t=Array.isArray(e)?[]:{},e)r=e[i],t[i]=deepCopy(r);return t}function isNumeric(e){var t=typeof e;return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))}function isEmptyObject(e){var t;for(t in e)return!1;return!0}function makeFunction(callback){return callback&&"string"==typeof callback&&(callback=eval("("+callback+")")),callback&&"function"!=typeof callback?null:callback}function adjustVolumeStyle(e){e&&(!e.volformat||e.voldata instanceof _VolumeData__WEBPACK_IMPORTED_MODULE_1__.VolumeData||(e.voldata=new _VolumeData__WEBPACK_IMPORTED_MODULE_1__.VolumeData(e.voldata,e.volformat)),e.volscheme&&(e.volscheme=_Gradient__WEBPACK_IMPORTED_MODULE_0__.Gradient.getGradient(e.volscheme)))}function getExtent(e,t){var r,i,s,n,o,a,l,h,c,u,d=!t;if(r=i=s=9999,n=o=a=-9999,l=h=c=u=0,0===e.length)return[[0,0,0],[0,0,0],[0,0,0]];for(var p=0;pf.x?n:f.x,o=o>f.y?o:f.y,a=a>f.z?a:f.z,f.symmetries&&d))for(var m=0;mf.symmetries[m].x?n:f.symmetries[m].x,o=o>f.symmetries[m].y?o:f.symmetries[m].y,a=a>f.symmetries[m].z?a:f.symmetries[m].z}return[[r,i,s],[n,o,a],[l/u,h/u,c/u]]}function getPropertyRange(e,t){for(var r=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,s=0,n=e.length;si&&(i=o))}return isFinite(r)||isFinite(i)?isFinite(r)?isFinite(i)||(i=r):r=i:r=i=0,[r,i]}class PausableTimer{constructor(e,t,r){this.total_time_run=0,this.fn=e,this.arg=r,this.countdown=t,this.start_time=(new Date).getTime(),this.ident=setTimeout(e,t,r)}cancel(){clearTimeout(this.ident)}pause(){clearTimeout(this.ident),this.total_time_run=(new Date).getTime()-this.start_time}resume(){this.ident=setTimeout(this.fn,Math.max(0,this.countdown-this.total_time_run),this.arg)}}function base64ToArray(e){for(var t=window.atob(e),r=t.length,i=new Uint8Array(r),s=0;s=0?parseFloat(e):parseInt(e):"true"===e||"false"!==e&&e},r={};if("all"===(e=e.replace(/%7E/g,"~")))return r;for(var i=e.split(";"),s=0;se.text()));return t?r.then(t):r}function getbin(e,t,r,i){var s;return s="POST"==r?fetch(e,{method:"POST",body:i}).then((e=>checkStatus(e))).then((e=>e.arrayBuffer())):fetch(e).then((e=>checkStatus(e))).then((e=>e.arrayBuffer())),t?s.then(t):s}function download(e,t,r,i){var s="",n="",o="",a="",l=null,h=t.addModel();if(e.indexOf(":")<0&&(e=4==e.length?"pdb:"+e:isNaN(e)?"url:"+e:"cid:"+e),"mmtf:"===e.substring(0,5))n=r&&r.pdbUri?r.pdbUri:"https://mmtf.rcsb.org/v1.0/full/",e=e.substring(5).toUpperCase(),a=n+e,r&&void 0===r.noComputeSecondaryStructure&&(r.noComputeSecondaryStructure=!0),l=new Promise((function(e){getbin(a).then((function(i){h.addMolData(i,"mmtf",r),t.zoomTo(),t.render(),e(h)}),(function(){console.log("fetch of "+a+" failed.")}))}));else{if("pdb:"===e.substring(0,4)){if(s="mmtf",r&&r.format&&(s=r.format),r&&void 0===r.noComputeSecondaryStructure&&(r.noComputeSecondaryStructure=!0),!(e=e.substring(4).toUpperCase()).match(/^[1-9][A-Za-z0-9]{3}$/))return void alert("Wrong PDB ID");"mmtf"==s?(o=r&&r.mmtfUri?r.mmtfUri:"https://mmtf.rcsb.org/v1.0/full/",a=o+e.toUpperCase()):(n=r&&r.pdbUri?r.pdbUri:"https://files.rcsb.org/view/",a=n+e+"."+s)}else if("cid:"==e.substring(0,4)){if(s="sdf",!(e=e.substring(4)).match(/^[0-9]+$/))return void alert("Wrong Compound ID");a="https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/"+e+"/SDF?record_type=3d"}else"url:"==e.substring(0,4)&&(a=e.substring(4),s=a);var c=function(e){h.addMolData(e,s,r),t.zoomTo(),t.render()};l=new Promise((function(t){"mmtf"==s?getbin(a).then((function(e){c(e),t(h)})).catch((function(){n=r&&r.pdbUri?r.pdbUri:"https://files.rcsb.org/view/",a=n+e+".pdb",s="pdb",console.log("falling back to pdb format"),get(a).then((function(e){c(e),t(h)})).catch((function(e){c(""),t(h),console.log("fetch of "+a+" failed: "+e.statusText)}))})):get(a).then((function(e){c(e),t(h)})).catch((function(e){c(""),t(h),console.log("fetch of "+a+" failed: "+e.statusText)}))}))}return i?(l.then((function(e){i(e)})),h):l}function getColorFromStyle(e,t){let r=t.colorscheme;if(void 0!==_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r])r=_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r];else if("string"==typeof r&&r.endsWith("Carbon")){let e=r.substring(0,r.lastIndexOf("Carbon")).toLowerCase();if(void 0!==_colors__WEBPACK_IMPORTED_MODULE_2__.htmlColors[e]){let t=Object.assign({},_colors__WEBPACK_IMPORTED_MODULE_2__.elementColors.defaultColors);t.C=_colors__WEBPACK_IMPORTED_MODULE_2__.htmlColors[e],_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r]={prop:"elem",map:t},r=_colors__WEBPACK_IMPORTED_MODULE_2__.builtinColorSchemes[r]}}let i=e.color;if(void 0!==t.color&&"spectrum"!=t.color&&(i=t.color),void 0!==r){let n,o;if(void 0!==_colors__WEBPACK_IMPORTED_MODULE_2__.elementColors[r])r=_colors__WEBPACK_IMPORTED_MODULE_2__.elementColors[r],void 0!==r[e[r.prop]]&&(i=r.map[e[r.prop]]);else if(void 0!==r[e[r.prop]])i=r.map[e[r.prop]];else if(void 0!==r.prop&&void 0!==r.gradient){n=r.prop;var s=r.gradient;void 0!==_Gradient__WEBPACK_IMPORTED_MODULE_0__.builtinGradients[s]&&(s=new _Gradient__WEBPACK_IMPORTED_MODULE_0__.builtinGradients[s](r.min,r.max,r.mid?r.mid:r.colors));let t=s.range()||[-1,1];o=getAtomProperty(e,n),null!=o&&(i=s.valueToHex(o,t))}else void 0!==r.prop&&void 0!==r.map?(n=r.prop,o=getAtomProperty(e,n),void 0!==r.map[o]&&(i=r.map[o])):void 0!==t.colorscheme[e.elem]?i=t.colorscheme[e.elem]:console.log("Could not interpret colorscheme "+r)}else void 0!==t.colorfunc&&(i=t.colorfunc(e));return _colors__WEBPACK_IMPORTED_MODULE_2__.CC.color(i)}function getElement(e){let t=e;return"string"==typeof e?t=document.querySelector("#"+e):"object"==typeof e&&e.get&&(t=e.get(0)),t}},"./node_modules/upng-js/UPNG.js":(e,t,r)=>{var i;i={},e.exports=i,function(e,t){e.toRGBA8=function(t){var r=t.width,i=t.height;if(null==t.tabs.acTL)return[e.toRGBA8.decodeImage(t.data,r,i,t).buffer];var s=[];null==t.frames[0].data&&(t.frames[0].data=t.data);for(var n,o=new Uint8Array(r*i*4),a=0;a>3)]>>7-(7&f)&1);l[M]=_[L],l[M+1]=_[L+1],l[M+2]=_[L+2],l[M+3]=E>2)]>>6-((3&f)<<1)&3),l[M]=_[L],l[M+1]=_[L+1],l[M+2]=_[L+2],l[M+3]=E>1)]>>4-((1&f)<<2)&15),l[M]=_[L],l[M+1]=_[L+1],l[M+2]=_[L+2],l[M+3]=E>3]>>7-(7&f)&1))==255*g?0:255;h[f]=O<<24|z<<16|z<<8|z}if(2==u)for(f=0;f>2]>>6-((3&f)<<1)&3))==85*g?0:255,h[f]=O<<24|z<<16|z<<8|z;if(4==u)for(f=0;f>1]>>4-((1&f)<<2)&15))==17*g?0:255,h[f]=O<<24|z<<16|z<<8|z;if(8==u)for(f=0;f>3,a=Math.ceil(i*n/8),l=new Uint8Array(s*a),h=0,c=[0,0,4,0,2,0,1],u=[0,4,0,2,0,1,0],d=[8,8,8,4,4,2,2],p=[8,8,4,4,2,2,1],f=0;f<7;){for(var m=d[f],g=p[f],v=0,b=0,y=c[f];y>3])>>7-(7&C)&1,l[S*a+(A>>3)]|=M<<7-(3&A)),2==n&&(M=(M=t[C>>3])>>6-(7&C)&3,l[S*a+(A>>2)]|=M<<6-((3&A)<<1)),4==n&&(M=(M=t[C>>3])>>4-(7&C)&15,l[S*a+(A>>1)]|=M<<4-((1&A)<<2)),n>=8)for(var L=S*a+A*o,E=0;E>3)+E];C+=n,A+=g}x++,S+=m}v*b!=0&&(h+=b*(1+w)),f+=1}return l},e.decode._getBPP=function(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth},e.decode._filterZero=function(t,r,i,s,n){var o=e.decode._getBPP(r),a=Math.ceil(s*o/8),l=e.decode._paeth;o=Math.ceil(o/8);for(var h=0;h>1)&255;if(4==d)for(p=o;p>1)&255;for(p=o;p>1)&255}if(4==d){for(p=0;p>8&255,e[t+1]=255&r},readUint:function(e,t){return 16777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3])},writeUint:function(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r},readASCII:function(e,t,r){for(var i="",s=0;s=0&&a>=0?(u=p*t+f<<2,d=(a+p)*s+o+f<<2):(u=(-a+p)*t-o+f<<2,d=p*s+f<<2),0==l)i[d]=e[u],i[d+1]=e[u+1],i[d+2]=e[u+2],i[d+3]=e[u+3];else if(1==l){var m=e[u+3]*(1/255),g=e[u]*m,v=e[u+1]*m,b=e[u+2]*m,y=i[d+3]*(1/255),_=i[d]*y,w=i[d+1]*y,x=i[d+2]*y,S=1-m,A=m+y*S,C=0==A?0:1/A;i[d+3]=255*A,i[d+0]=(g+_*S)*C,i[d+1]=(v+w*S)*C,i[d+2]=(b+x*S)*C}else if(2==l)m=e[u+3],g=e[u],v=e[u+1],b=e[u+2],y=i[d+3],_=i[d],w=i[d+1],x=i[d+2],m==y&&g==_&&v==w&&b==x?(i[d]=0,i[d+1]=0,i[d+2]=0,i[d+3]=0):(i[d]=g,i[d+1]=v,i[d+2]=b,i[d+3]=m);else if(3==l){if(m=e[u+3],g=e[u],v=e[u+1],b=e[u+2],y=i[d+3],_=i[d],w=i[d+1],x=i[d+2],m==y&&g==_&&v==w&&b==x)continue;if(m<220&&y>20)return!1}return!0},e.encode=function(t,r,i,s,n,o){null==s&&(s=0),null==o&&(o=!1);for(var a=new Uint8Array(t[0].byteLength*t.length+100),l=[137,80,78,71,13,10,26,10],h=0;h<8;h++)a[h]=l[h];var c=8,u=e._bin,d=e.crc.crc,p=u.writeUint,f=u.writeUshort,m=u.writeASCII,g=e.encode.compressPNG(t,r,i,s,o);p(a,c,13),m(a,c+=4,"IHDR"),p(a,c+=4,r),p(a,c+=4,i),a[c+=4]=g.depth,a[++c]=g.ctype,a[++c]=0,a[++c]=0,a[++c]=0,p(a,++c,d(a,c-17,17)),p(a,c+=4,1),m(a,c+=4,"sRGB"),a[c+=4]=1,p(a,++c,d(a,c-5,5)),c+=4;var v=t.length>1;if(v&&(p(a,c,8),m(a,c+=4,"acTL"),p(a,c+=4,t.length),p(a,c+=4,0),p(a,c+=4,d(a,c-12,12)),c+=4),3==g.ctype){for(p(a,c,3*(M=g.plte.length)),m(a,c+=4,"PLTE"),c+=4,h=0;h>8&255,x=y>>16&255;a[c+b+0]=_,a[c+b+1]=w,a[c+b+2]=x}if(p(a,c+=3*M,d(a,c-3*M-4,3*M+4)),c+=4,g.gotAlpha){for(p(a,c,M),m(a,c+=4,"tRNS"),c+=4,h=0;h>24&255;p(a,c+=M,d(a,c-M-4,M+4)),c+=4}}for(var S=0,A=0;A=300))break}}var w=!!m&&n,x=v.length;x<=256&&0==o&&(l=x<=2?1:x<=4?2:x<=16?4:8,n&&(l=8),m=!0);var S=[];for(u=0;uj&&(j=U),NB&&(B=N));var V=-1==j?1:(j-P+1)*(B-G+1);V>1)]|=g[C[q+U]]<<4-4*(1&U);else if(2==l)for(U=0;U>2)]|=g[C[q+U]]<<6-2*(3&U);else if(1==l)for(U=0;U>3)]|=g[C[q+U]]<<7-1*(7&U)}A=W,a=3,h=1}else if(0==m&&1==t.length){W=new Uint8Array(E*z*3);var Y=E*z;for(f=0;f5e5)||2!=l&&3!=l&&4!=l){for(var h=0;h>1)+256&255;if(4==o)for(c=n;c>1)&255;for(c=n;c>1)&255}if(4==o){for(c=0;c>>1:r>>>=1;e[t]=r}return e}(),update:function(t,r,i,s){for(var n=0;n>>8;return t},crc:function(t,r,i){return 4294967295^e.crc.update(4294967295,t,r,i)}},e.quantize=function(t,r,i){for(var s=[],n=0,o=0;om&&(m=f[o].est.L,g=o);if(m<.001)break;var v=f[g],b=e.quantize.splitPixels(a,l,v.i0,v.i1,v.est.e,v.est.eMq255),y={i0:v.i0,i1:b,bst:null,est:null,tdst:0,left:null,right:null};y.bst=e.quantize.stats(a,y.i0,y.i1),y.est=e.quantize.estats(y.bst);var _={i0:b,i1:v.i1,bst:null,est:null,tdst:0,left:null,right:null};for(_.bst={R:[],m:[],N:v.bst.N-y.bst.N},o=0;o<16;o++)_.bst.R[o]=v.bst.R[o]-y.bst.R[o];for(o=0;o<4;o++)_.bst.m[o]=v.bst.m[o]-y.bst.m[o];_.est=e.quantize.estats(_.bst),v.left=y,v.right=_,f[g]=y,f.push(_)}f.sort((function(e,t){return t.bst.N-e.bst.N}));for(var w=0;w>2]=k.est.rgba}s[w]=A.buffer}return{bufs:s,plte:f}},e.quantize.getNearest=function(t,r,i,s,n){if(null==t.left)return t.tdst=e.quantize.dist(t.est.q,r,i,s,n),t;var o=e.quantize.planeDst(t.est,r,i,s,n),a=t.left,l=t.right;o>0&&(a=t.right,l=t.left);var h=e.quantize.getNearest(a,r,i,s,n);if(h.tdst<=o*o)return h;var c=e.quantize.getNearest(l,r,i,s,n);return c.tdsto;)s-=4;if(i>=s)break;var l=r[i>>2];r[i>>2]=r[s>>2],r[s>>2]=l,i+=4,s-=4}for(;a(t,i,n)>o;)i-=4;return i+4},e.quantize.vecDot=function(e,t,r){return e[t]*r[0]+e[t+1]*r[1]+e[t+2]*r[2]+e[t+3]*r[3]},e.quantize.stats=function(e,t,r){for(var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],s=[0,0,0,0],n=r-t>>2,o=t;o>>0}},e.M4={multVec:function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]]},dot:function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},sml:function(e,t){return[e*t[0],e*t[1],e*t[2],e*t[3]]}},e.encode.alphaMul=function(e,t){for(var r=new Uint8Array(e.length),i=e.length>>2,s=0;s{"use strict";var i={};(0,r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js").assign)(i,r("./node_modules/upng-js/node_modules/pako/lib/deflate.js"),r("./node_modules/upng-js/node_modules/pako/lib/inflate.js"),r("./node_modules/upng-js/node_modules/pako/lib/zlib/constants.js")),e.exports=i},"./node_modules/upng-js/node_modules/pako/lib/deflate.js":(e,t,r)=>{"use strict";var i=r("./node_modules/upng-js/node_modules/pako/lib/zlib/deflate.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),n=r("./node_modules/upng-js/node_modules/pako/lib/utils/strings.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/zstream.js"),l=Object.prototype.toString,h=0,c=-1,u=0,d=8;function p(e){if(!(this instanceof p))return new p(e);this.options=s.assign({level:c,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=i.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==h)throw new Error(o[r]);if(t.header&&i.deflateSetHeader(this.strm,t.header),t.dictionary){var f;if(f="string"==typeof t.dictionary?n.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=i.deflateSetDictionary(this.strm,f))!==h)throw new Error(o[r]);this._dict_set=!0}}function f(e,t){var r=new p(t);if(r.push(e,!0),r.err)throw r.msg||o[r.err];return r.result}p.prototype.push=function(e,t){var r,o,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;o=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=n.string2buf(e):"[object ArrayBuffer]"===l.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new s.Buf8(c),a.next_out=0,a.avail_out=c),1!==(r=i.deflate(a,o))&&r!==h)return this.onEnd(r),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(n.buf2binstring(s.shrinkBuf(a.output,a.next_out))):this.onData(s.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==r);return 4===o?(r=i.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===h):2!==o||(this.onEnd(h),a.avail_out=0,!0)},p.prototype.onData=function(e){this.chunks.push(e)},p.prototype.onEnd=function(e){e===h&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=p,t.deflate=f,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,f(e,t)}},"./node_modules/upng-js/node_modules/pako/lib/inflate.js":(e,t,r)=>{"use strict";var i=r("./node_modules/upng-js/node_modules/pako/lib/zlib/inflate.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),n=r("./node_modules/upng-js/node_modules/pako/lib/utils/strings.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/zlib/constants.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js"),l=r("./node_modules/upng-js/node_modules/pako/lib/zlib/zstream.js"),h=r("./node_modules/upng-js/node_modules/pako/lib/zlib/gzheader.js"),c=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=i.inflateInit2(this.strm,t.windowBits);if(r!==o.Z_OK)throw new Error(a[r]);if(this.header=new h,i.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=n.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=i.inflateSetDictionary(this.strm,t.dictionary))!==o.Z_OK))throw new Error(a[r])}function d(e,t){var r=new u(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}u.prototype.push=function(e,t){var r,a,l,h,u,d=this.strm,p=this.options.chunkSize,f=this.options.dictionary,m=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof e?d.input=n.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new s.Buf8(p),d.next_out=0,d.avail_out=p),(r=i.inflate(d,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&f&&(r=i.inflateSetDictionary(this.strm,f)),r===o.Z_BUF_ERROR&&!0===m&&(r=o.Z_OK,m=!1),r!==o.Z_STREAM_END&&r!==o.Z_OK)return this.onEnd(r),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&r!==o.Z_STREAM_END&&(0!==d.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(l=n.utf8border(d.output,d.next_out),h=d.next_out-l,u=n.buf2string(d.output,l),d.next_out=h,d.avail_out=p-h,h&&s.arraySet(d.output,d.output,l,h,0),this.onData(u)):this.onData(s.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(m=!0)}while((d.avail_in>0||0===d.avail_out)&&r!==o.Z_STREAM_END);return r===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(r=i.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),d.avail_out=0,!0)},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){e===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=u,t.inflate=d,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},t.ungzip=d},"./node_modules/upng-js/node_modules/pako/lib/utils/common.js":(e,t)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var s in r)i(r,s)&&(e[s]=r[s])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var s={arraySet:function(e,t,r,i,s){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+i),s);else for(var n=0;n{"use strict";var i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),s=!0,n=!0;try{String.fromCharCode.apply(null,[0])}catch(e){s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){n=!1}for(var o=new i.Buf8(256),a=0;a<256;a++)o[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&n||!e.subarray&&s))return String.fromCharCode.apply(null,i.shrinkBuf(e,t));for(var r="",o=0;o>>6,t[o++]=128|63&r):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|63&r):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|63&r);return t},t.buf2binstring=function(e){return l(e,e.length)},t.binstring2buf=function(e){for(var t=new i.Buf8(e.length),r=0,s=t.length;r4)h[i++]=65533,r+=n-1;else{for(s&=2===n?31:3===n?15:7;n>1&&r1?h[i++]=65533:s<65536?h[i++]=s:(s-=65536,h[i++]=55296|s>>10&1023,h[i++]=56320|1023&s)}return l(h,i)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+o[e[r]]>t?r:t}},"./node_modules/upng-js/node_modules/pako/lib/zlib/adler32.js":e=>{"use strict";e.exports=function(e,t,r,i){for(var s=65535&e,n=e>>>16&65535,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{n=n+(s=s+t[i++]|0)|0}while(--o);s%=65521,n%=65521}return s|n<<16}},"./node_modules/upng-js/node_modules/pako/lib/zlib/constants.js":e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},"./node_modules/upng-js/node_modules/pako/lib/zlib/crc32.js":e=>{"use strict";var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,i,s){var n=t,o=s+i;e^=-1;for(var a=s;a>>8^n[255&(e^r[a])];return~e}},"./node_modules/upng-js/node_modules/pako/lib/zlib/deflate.js":(e,t,r)=>{"use strict";var i,s=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),n=r("./node_modules/upng-js/node_modules/pako/lib/zlib/trees.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/zlib/adler32.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/crc32.js"),l=r("./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js"),h=0,c=0,u=-2,d=2,p=8,f=286,m=30,g=19,v=2*f+1,b=15,y=3,_=258,w=_+y+1,x=42,S=103,A=113,C=666;function M(e,t){return e.msg=l[t],t}function L(e){return(e<<1)-(e>4?9:0)}function E(e){for(var t=e.length;--t>=0;)e[t]=0}function z(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(s.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function k(e,t){n._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,z(e.strm)}function O(e,t){e.pending_buf[e.pending++]=t}function T(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function I(e,t){var r,i,s=e.max_chain_length,n=e.strstart,o=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-w?e.strstart-(e.w_size-w):0,h=e.window,c=e.w_mask,u=e.prev,d=e.strstart+_,p=h[n+o-1],f=h[n+o];e.prev_length>=e.good_match&&(s>>=2),a>e.lookahead&&(a=e.lookahead);do{if(h[(r=t)+o]===f&&h[r+o-1]===p&&h[r]===h[n]&&h[++r]===h[n+1]){n+=2,r++;do{}while(h[++n]===h[++r]&&h[++n]===h[++r]&&h[++n]===h[++r]&&h[++n]===h[++r]&&h[++n]===h[++r]&&h[++n]===h[++r]&&h[++n]===h[++r]&&h[++n]===h[++r]&&no){if(e.match_start=t,o=i,i>=a)break;p=h[n+o-1],f=h[n+o]}}}while((t=u[t&c])>l&&0!=--s);return o<=e.lookahead?o:e.lookahead}function F(e){var t,r,i,n,l,h,c,u,d,p,f=e.w_size;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-w)){s.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=r=e.hash_size;do{i=e.head[--t],e.head[t]=i>=f?i-f:0}while(--r);t=r=f;do{i=e.prev[--t],e.prev[t]=i>=f?i-f:0}while(--r);n+=f}if(0===e.strm.avail_in)break;if(h=e.strm,c=e.window,u=e.strstart+e.lookahead,d=n,p=void 0,(p=h.avail_in)>d&&(p=d),r=0===p?0:(h.avail_in-=p,s.arraySet(c,h.input,h.next_in,p,u),1===h.state.wrap?h.adler=o(h.adler,c,p,u):2===h.state.wrap&&(h.adler=a(h.adler,c,p,u)),h.next_in+=p,h.total_in+=p,p),e.lookahead+=r,e.lookahead+e.insert>=y)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=y&&(e.ins_h=(e.ins_h<=y)if(i=n._tr_tally(e,e.strstart-e.match_start,e.match_length-y),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=y){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=y&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=y-1)),e.prev_length>=y&&e.match_length<=e.prev_length){s=e.strstart+e.lookahead-y,i=n._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-y),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=s&&(e.ins_h=(e.ins_h<15&&(a=2,i-=16),n<1||n>9||r!==p||i<8||i>15||t<0||t>9||o<0||o>4)return M(e,u);8===i&&(i=9);var l=new G;return e.state=l,l.strm=e,l.wrap=a,l.gzhead=null,l.w_bits=i,l.w_size=1<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(F(e),0===e.lookahead&&t===h)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+r;if((0===e.strstart||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,k(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-w&&(k(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(k(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(k(e,!1),e.strm.avail_out),1)})),new P(4,4,8,4,D),new P(4,5,16,8,D),new P(4,6,32,32,D),new P(4,4,16,16,R),new P(8,16,32,32,R),new P(8,16,128,128,R),new P(8,32,128,256,R),new P(32,128,258,1024,R),new P(32,258,258,4096,R)],t.deflateInit=function(e,t){return N(e,t,p,15,8,0)},t.deflateInit2=N,t.deflateReset=B,t.deflateResetKeep=j,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?u:(e.state.gzhead=t,c):u},t.deflate=function(e,t){var r,s,o,l;if(!e||!e.state||t>5||t<0)return e?M(e,u):u;if(s=e.state,!e.output||!e.input&&0!==e.avail_in||s.status===C&&4!==t)return M(e,0===e.avail_out?-5:u);if(s.strm=e,r=s.last_flush,s.last_flush=t,s.status===x)if(2===s.wrap)e.adler=0,O(s,31),O(s,139),O(s,8),s.gzhead?(O(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),O(s,255&s.gzhead.time),O(s,s.gzhead.time>>8&255),O(s,s.gzhead.time>>16&255),O(s,s.gzhead.time>>24&255),O(s,9===s.level?2:s.strategy>=2||s.level<2?4:0),O(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(O(s,255&s.gzhead.extra.length),O(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(e.adler=a(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69):(O(s,0),O(s,0),O(s,0),O(s,0),O(s,0),O(s,9===s.level?2:s.strategy>=2||s.level<2?4:0),O(s,3),s.status=A);else{var d=p+(s.w_bits-8<<4)<<8;d|=(s.strategy>=2||s.level<2?0:s.level<6?1:6===s.level?2:3)<<6,0!==s.strstart&&(d|=32),d+=31-d%31,s.status=A,T(s,d),0!==s.strstart&&(T(s,e.adler>>>16),T(s,65535&e.adler)),e.adler=1}if(69===s.status)if(s.gzhead.extra){for(o=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>o&&(e.adler=a(e.adler,s.pending_buf,s.pending-o,o)),z(e),o=s.pending,s.pending!==s.pending_buf_size));)O(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>o&&(e.adler=a(e.adler,s.pending_buf,s.pending-o,o)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=73)}else s.status=73;if(73===s.status)if(s.gzhead.name){o=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>o&&(e.adler=a(e.adler,s.pending_buf,s.pending-o,o)),z(e),o=s.pending,s.pending===s.pending_buf_size)){l=1;break}l=s.gzindexo&&(e.adler=a(e.adler,s.pending_buf,s.pending-o,o)),0===l&&(s.gzindex=0,s.status=91)}else s.status=91;if(91===s.status)if(s.gzhead.comment){o=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>o&&(e.adler=a(e.adler,s.pending_buf,s.pending-o,o)),z(e),o=s.pending,s.pending===s.pending_buf_size)){l=1;break}l=s.gzindexo&&(e.adler=a(e.adler,s.pending_buf,s.pending-o,o)),0===l&&(s.status=S)}else s.status=S;if(s.status===S&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&z(e),s.pending+2<=s.pending_buf_size&&(O(s,255&e.adler),O(s,e.adler>>8&255),e.adler=0,s.status=A)):s.status=A),0!==s.pending){if(z(e),0===e.avail_out)return s.last_flush=-1,c}else if(0===e.avail_in&&L(t)<=L(r)&&4!==t)return M(e,-5);if(s.status===C&&0!==e.avail_in)return M(e,-5);if(0!==e.avail_in||0!==s.lookahead||t!==h&&s.status!==C){var f=2===s.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(F(e),0===e.lookahead)){if(t===h)return 1;break}if(e.match_length=0,r=n._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(k(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(k(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(k(e,!1),0===e.strm.avail_out)?1:2}(s,t):3===s.strategy?function(e,t){for(var r,i,s,o,a=e.window;;){if(e.lookahead<=_){if(F(e),e.lookahead<=_&&t===h)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=y&&e.strstart>0&&(i=a[s=e.strstart-1])===a[++s]&&i===a[++s]&&i===a[++s]){o=e.strstart+_;do{}while(i===a[++s]&&i===a[++s]&&i===a[++s]&&i===a[++s]&&i===a[++s]&&i===a[++s]&&i===a[++s]&&i===a[++s]&&se.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=y?(r=n._tr_tally(e,1,e.match_length-y),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=n._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(k(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(k(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(k(e,!1),0===e.strm.avail_out)?1:2}(s,t):i[s.level].func(s,t);if(3!==f&&4!==f||(s.status=C),1===f||3===f)return 0===e.avail_out&&(s.last_flush=-1),c;if(2===f&&(1===t?n._tr_align(s):5!==t&&(n._tr_stored_block(s,0,0,!1),3===t&&(E(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),z(e),0===e.avail_out))return s.last_flush=-1,c}return 4!==t?c:s.wrap<=0?1:(2===s.wrap?(O(s,255&e.adler),O(s,e.adler>>8&255),O(s,e.adler>>16&255),O(s,e.adler>>24&255),O(s,255&e.total_in),O(s,e.total_in>>8&255),O(s,e.total_in>>16&255),O(s,e.total_in>>24&255)):(T(s,e.adler>>>16),T(s,65535&e.adler)),z(e),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?c:1)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==x&&69!==t&&73!==t&&91!==t&&t!==S&&t!==A&&t!==C?M(e,u):(e.state=null,t===A?M(e,-3):c):u},t.deflateSetDictionary=function(e,t){var r,i,n,a,l,h,d,p,f=t.length;if(!e||!e.state)return u;if(2===(a=(r=e.state).wrap)||1===a&&r.status!==x||r.lookahead)return u;for(1===a&&(e.adler=o(e.adler,t,f,0)),r.wrap=0,f>=r.w_size&&(0===a&&(E(r.head),r.strstart=0,r.block_start=0,r.insert=0),p=new s.Buf8(r.w_size),s.arraySet(p,t,f-r.w_size,r.w_size,0),t=p,f=r.w_size),l=e.avail_in,h=e.next_in,d=e.input,e.avail_in=f,e.next_in=0,e.input=t,F(r);r.lookahead>=y;){i=r.strstart,n=r.lookahead-(y-1);do{r.ins_h=(r.ins_h<{"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},"./node_modules/upng-js/node_modules/pako/lib/zlib/inffast.js":e=>{"use strict";e.exports=function(e,t){var r,i,s,n,o,a,l,h,c,u,d,p,f,m,g,v,b,y,_,w,x,S,A,C,M;r=e.state,i=e.next_in,C=e.input,s=i+(e.avail_in-5),n=e.next_out,M=e.output,o=n-(t-e.avail_out),a=n+(e.avail_out-257),l=r.dmax,h=r.wsize,c=r.whave,u=r.wnext,d=r.window,p=r.hold,f=r.bits,m=r.lencode,g=r.distcode,v=(1<>>=_=y>>>24,f-=_,0==(_=y>>>16&255))M[n++]=65535&y;else{if(!(16&_)){if(64&_){if(32&_){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}y=m[(65535&y)+(p&(1<<_)-1)];continue t}for(w=65535&y,(_&=15)&&(f<_&&(p+=C[i++]<>>=_,f-=_),f<15&&(p+=C[i++]<>>=_=y>>>24,f-=_,16&(_=y>>>16&255)){if(x=65535&y,f<(_&=15)&&(p+=C[i++]<l){e.msg="invalid distance too far back",r.mode=30;break e}if(p>>>=_,f-=_,x>(_=n-o)){if((_=x-_)>c&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(S=0,A=d,0===u){if(S+=h-_,_2;)M[n++]=A[S++],M[n++]=A[S++],M[n++]=A[S++],w-=3;w&&(M[n++]=A[S++],w>1&&(M[n++]=A[S++]))}else{S=n-x;do{M[n++]=M[S++],M[n++]=M[S++],M[n++]=M[S++],w-=3}while(w>2);w&&(M[n++]=M[S++],w>1&&(M[n++]=M[S++]))}break}if(64&_){e.msg="invalid distance code",r.mode=30;break e}y=g[(65535&y)+(p&(1<<_)-1)]}}break}}while(i>3,p&=(1<<(f-=w<<3))-1,e.next_in=i,e.next_out=n,e.avail_in=i{"use strict";var i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),s=r("./node_modules/upng-js/node_modules/pako/lib/zlib/adler32.js"),n=r("./node_modules/upng-js/node_modules/pako/lib/zlib/crc32.js"),o=r("./node_modules/upng-js/node_modules/pako/lib/zlib/inffast.js"),a=r("./node_modules/upng-js/node_modules/pako/lib/zlib/inftrees.js"),l=0,h=-2,c=1,u=12,d=30,p=852,f=592;function m(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=c,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new i.Buf32(p),t.distcode=t.distdyn=new i.Buf32(f),t.sane=1,t.back=-1,l):h}function b(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,v(e)):h}function y(e,t){var r,i;return e&&e.state?(i=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?h:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,b(e))):h}function _(e,t){var r,i;return e?(i=new g,e.state=i,i.window=null,(r=y(e,t))!==l&&(e.state=null),r):h}var w,x,S=!0;function A(e){if(S){var t;for(w=new i.Buf32(512),x=new i.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,w,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,x,0,e.work,{bits:5}),S=!1}e.lencode=w,e.lenbits=9,e.distcode=x,e.distbits=5}function C(e,t,r,s){var n,o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(i.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((n=o.wsize-o.wnext)>s&&(n=s),i.arraySet(o.window,t,r-s,n,o.wnext),(s-=n)?(i.arraySet(o.window,t,r-s,s,0),o.wnext=s,o.whave=o.wsize):(o.wnext+=n,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,r.check=n(r.check,B,2,0),_=0,w=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&_)<<8)+(_>>8))%31){e.msg="incorrect header check",r.mode=d;break}if(8!=(15&_)){e.msg="unknown compression method",r.mode=d;break}if(w-=4,D=8+(15&(_>>>=4)),0===r.wbits)r.wbits=D;else if(D>r.wbits){e.msg="invalid window size",r.mode=d;break}r.dmax=1<>8&1),512&r.flags&&(B[0]=255&_,B[1]=_>>>8&255,r.check=n(r.check,B,2,0)),_=0,w=0,r.mode=3;case 3:for(;w<32;){if(0===b)break e;b--,_+=p[g++]<>>8&255,B[2]=_>>>16&255,B[3]=_>>>24&255,r.check=n(r.check,B,4,0)),_=0,w=0,r.mode=4;case 4:for(;w<16;){if(0===b)break e;b--,_+=p[g++]<>8),512&r.flags&&(B[0]=255&_,B[1]=_>>>8&255,r.check=n(r.check,B,2,0)),_=0,w=0,r.mode=5;case 5:if(1024&r.flags){for(;w<16;){if(0===b)break e;b--,_+=p[g++]<>>8&255,r.check=n(r.check,B,2,0)),_=0,w=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((M=r.length)>b&&(M=b),M&&(r.head&&(D=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),i.arraySet(r.head.extra,p,g,M,D)),512&r.flags&&(r.check=n(r.check,p,M,g)),b-=M,g+=M,r.length-=M),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===b)break e;M=0;do{D=p[g+M++],r.head&&D&&r.length<65536&&(r.head.name+=String.fromCharCode(D))}while(D&&M>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=u;break;case 10:for(;w<32;){if(0===b)break e;b--,_+=p[g++]<>>=7&w,w-=7&w,r.mode=27;break}for(;w<3;){if(0===b)break e;b--,_+=p[g++]<>>=1)){case 0:r.mode=14;break;case 1:if(A(r),r.mode=20,6===t){_>>>=2,w-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=d}_>>>=2,w-=2;break;case 14:for(_>>>=7&w,w-=7&w;w<32;){if(0===b)break e;b--,_+=p[g++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=d;break}if(r.length=65535&_,_=0,w=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(M=r.length){if(M>b&&(M=b),M>y&&(M=y),0===M)break e;i.arraySet(f,p,g,M,v),b-=M,g+=M,y-=M,v+=M,r.length-=M;break}r.mode=u;break;case 17:for(;w<14;){if(0===b)break e;b--,_+=p[g++]<>>=5,w-=5,r.ndist=1+(31&_),_>>>=5,w-=5,r.ncode=4+(15&_),_>>>=4,w-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=d;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,w-=3}for(;r.have<19;)r.lens[N[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,P={bits:r.lenbits},R=a(0,r.lens,0,19,r.lencode,0,r.work,P),r.lenbits=P.bits,R){e.msg="invalid code lengths set",r.mode=d;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,O=65535&j,!((z=j>>>24)<=w);){if(0===b)break e;b--,_+=p[g++]<>>=z,w-=z,r.lens[r.have++]=O;else{if(16===O){for(G=z+2;w>>=z,w-=z,0===r.have){e.msg="invalid bit length repeat",r.mode=d;break}D=r.lens[r.have-1],M=3+(3&_),_>>>=2,w-=2}else if(17===O){for(G=z+3;w>>=z)),_>>>=3,w-=3}else{for(G=z+7;w>>=z)),_>>>=7,w-=7}if(r.have+M>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=d;break}for(;M--;)r.lens[r.have++]=D}}if(r.mode===d)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=d;break}if(r.lenbits=9,P={bits:r.lenbits},R=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,P),r.lenbits=P.bits,R){e.msg="invalid literal/lengths set",r.mode=d;break}if(r.distbits=6,r.distcode=r.distdyn,P={bits:r.distbits},R=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,P),r.distbits=P.bits,R){e.msg="invalid distances set",r.mode=d;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(b>=6&&y>=258){e.next_out=v,e.avail_out=y,e.next_in=g,e.avail_in=b,r.hold=_,r.bits=w,o(e,S),v=e.next_out,f=e.output,y=e.avail_out,g=e.next_in,p=e.input,b=e.avail_in,_=r.hold,w=r.bits,r.mode===u&&(r.back=-1);break}for(r.back=0;k=(j=r.lencode[_&(1<>>16&255,O=65535&j,!((z=j>>>24)<=w);){if(0===b)break e;b--,_+=p[g++]<>T)])>>>16&255,O=65535&j,!(T+(z=j>>>24)<=w);){if(0===b)break e;b--,_+=p[g++]<>>=T,w-=T,r.back+=T}if(_>>>=z,w-=z,r.back+=z,r.length=O,0===k){r.mode=26;break}if(32&k){r.back=-1,r.mode=u;break}if(64&k){e.msg="invalid literal/length code",r.mode=d;break}r.extra=15&k,r.mode=22;case 22:if(r.extra){for(G=r.extra;w>>=r.extra,w-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;k=(j=r.distcode[_&(1<>>16&255,O=65535&j,!((z=j>>>24)<=w);){if(0===b)break e;b--,_+=p[g++]<>T)])>>>16&255,O=65535&j,!(T+(z=j>>>24)<=w);){if(0===b)break e;b--,_+=p[g++]<>>=T,w-=T,r.back+=T}if(_>>>=z,w-=z,r.back+=z,64&k){e.msg="invalid distance code",r.mode=d;break}r.offset=O,r.extra=15&k,r.mode=24;case 24:if(r.extra){for(G=r.extra;w>>=r.extra,w-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=d;break}r.mode=25;case 25:if(0===y)break e;if(M=S-y,r.offset>M){if((M=r.offset-M)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=d;break}M>r.wnext?(M-=r.wnext,L=r.wsize-M):L=r.wnext-M,M>r.length&&(M=r.length),E=r.window}else E=f,L=v-r.offset,M=r.length;M>y&&(M=y),y-=M,r.length-=M;do{f[v++]=E[L++]}while(--M);0===r.length&&(r.mode=21);break;case 26:if(0===y)break e;f[v++]=r.length,y--,r.mode=21;break;case 27:if(r.wrap){for(;w<32;){if(0===b)break e;b--,_|=p[g++]<{"use strict";var i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js"),s=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],n=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,l,h,c,u,d){var p,f,m,g,v,b,y,_,w,x=d.bits,S=0,A=0,C=0,M=0,L=0,E=0,z=0,k=0,O=0,T=0,I=null,F=0,D=new i.Buf16(16),R=new i.Buf16(16),P=null,G=0;for(S=0;S<=15;S++)D[S]=0;for(A=0;A=1&&0===D[M];M--);if(L>M&&(L=M),0===M)return h[c++]=20971520,h[c++]=20971520,d.bits=1,0;for(C=1;C0&&(0===e||1!==M))return-1;for(R[1]=0,S=1;S<15;S++)R[S+1]=R[S]+D[S];for(A=0;A852||2===e&&O>592)return 1;for(;;){y=S-z,u[A]b?(_=P[G+u[A]],w=I[F+u[A]]):(_=96,w=0),p=1<>z)+(f-=p)]=y<<24|_<<16|w}while(0!==f);for(p=1<>=1;if(0!==p?(T&=p-1,T+=p):T=0,A++,0==--D[S]){if(S===M)break;S=t[r+u[A]]}if(S>L&&(T&g)!==m){for(0===z&&(z=L),v+=C,k=1<<(E=S-z);E+z852||2===e&&O>592)return 1;h[m=T&g]=L<<24|E<<16|v-c}}return 0!==T&&(h[v+T]=S-z<<24|64<<16),d.bits=L,0}},"./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js":e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},"./node_modules/upng-js/node_modules/pako/lib/zlib/trees.js":(e,t,r)=>{"use strict";var i=r("./node_modules/upng-js/node_modules/pako/lib/utils/common.js");function s(e){for(var t=e.length;--t>=0;)e[t]=0}var n=256,o=286,a=30,l=15,h=16,c=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],p=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=new Array(576);s(f);var m=new Array(60);s(m);var g=new Array(512);s(g);var v=new Array(256);s(v);var b=new Array(29);s(b);var y,_,w,x=new Array(a);function S(e,t,r,i,s){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=s,this.has_stree=e&&e.length}function A(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function C(e){return e<256?g[e]:g[256+(e>>>7)]}function M(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function L(e,t,r){e.bi_valid>h-r?(e.bi_buf|=t<>h-e.bi_valid,e.bi_valid+=r-h):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function k(e,t,r){var i,s,n=new Array(l+1),o=0;for(i=1;i<=l;i++)n[i]=o=o+r[i-1]<<1;for(s=0;s<=t;s++){var a=e[2*s+1];0!==a&&(e[2*s]=z(n[a]++,a))}}function O(e){var t;for(t=0;t8?M(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function I(e,t,r,i){var s=2*t,n=2*r;return e[s]>1;r>=1;r--)F(e,n,r);s=h;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],F(e,n,1),i=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=i,n[2*s]=n[2*r]+n[2*i],e.depth[s]=(e.depth[r]>=e.depth[i]?e.depth[r]:e.depth[i])+1,n[2*r+1]=n[2*i+1]=s,e.heap[1]=s++,F(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,i,s,n,o,a,h=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,m=t.stat_desc.max_length,g=0;for(n=0;n<=l;n++)e.bl_count[n]=0;for(h[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(n=h[2*h[2*(i=e.heap[r])+1]+1]+1)>m&&(n=m,g++),h[2*i+1]=n,i>c||(e.bl_count[n]++,o=0,i>=f&&(o=p[i-f]),a=h[2*i],e.opt_len+=a*(n+o),d&&(e.static_len+=a*(u[2*i+1]+o)));if(0!==g){do{for(n=m-1;0===e.bl_count[n];)n--;e.bl_count[n]--,e.bl_count[n+1]+=2,e.bl_count[m]--,g-=2}while(g>0);for(n=m;0!==n;n--)for(i=e.bl_count[n];0!==i;)(s=e.heap[--r])>c||(h[2*s+1]!==n&&(e.opt_len+=(n-h[2*s+1])*h[2*s],h[2*s+1]=n),i--)}}(e,t),k(n,c,e.bl_count)}function P(e,t,r){var i,s,n=-1,o=t[1],a=0,l=7,h=4;for(0===o&&(l=138,h=3),t[2*(r+1)+1]=65535,i=0;i<=r;i++)s=o,o=t[2*(i+1)+1],++a>=7;i0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t=3&&0===e.bl_tree[2*p[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),s=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=s&&(s=o)):s=o=r+5,r+4<=s&&-1!==t?B(e,t,r,i):4===e.strategy||o===s?(L(e,2+(i?1:0),3),D(e,f,m)):(L(e,4+(i?1:0),3),function(e,t,r,i){var s;for(L(e,t-257,5),L(e,r-1,5),L(e,i-4,4),s=0;s>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(v[r]+n+1)]++,e.dyn_dtree[2*C(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){L(e,2,3),E(e,256,f),function(e){16===e.bi_valid?(M(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},"./node_modules/upng-js/node_modules/pako/lib/zlib/zstream.js":e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},"./src/SurfaceWorker.js":()=>{$3Dmol.workerString=function(){self.onmessage=function(e){var t=e.data,r=t.type;if(r<0)self.atomData=t.atoms,self.volume=t.volume,self.ps=new ProteinSurface;else{var i=self.ps;i.initparm(t.expandedExtent,1!=r,self.volume),i.fillvoxels(self.atomData,t.extendedAtoms),i.buildboundary(),4!==r&&2!==r||(i.fastdistancemap(),i.boundingatom(!1),i.fillvoxelswaals(self.atomData,t.extendedAtoms)),i.marchingcube(r);var s=i.getFacesAndVertices(t.atomsToShow);self.postMessage(s)}}}.toString().replace(/(^.*?\{|\}$)/g,""),$3Dmol.workerString+=";\nfunction _classCallCheck() {};",$3Dmol.workerString+=";\n"+$3Dmol.Vector3.toString(),$3Dmol.workerString+=";\n"+$3Dmol.MarchingCubeInitializer.toString()+";\n\n",$3Dmol.workerString+=";\n"+$3Dmol.PointGrid.toString()+";\n",$3Dmol.workerString+=";\nvar ProteinSurface = "+$3Dmol.ProteinSurface.toString()+";\n",$3Dmol.SurfaceWorker=window.URL?window.URL.createObjectURL(new Blob([$3Dmol.workerString],{type:"text/javascript"})):void 0},"./src/exporter.js":e=>{"object"==typeof e.exports&&(e.exports=window.$3Dmol)},"./src/vendor/mmtf.js":function(e,t){!function(e){"use strict";function t(e,t,r){for(var i=(e.byteLength,0),s=r.length;s>i;i++){var n=r.charCodeAt(i);if(128>n)e.setUint8(t++,n>>>0&127);else if(2048>n)e.setUint8(t++,n>>>6&31|192),e.setUint8(t++,n>>>0&63|128);else if(65536>n)e.setUint8(t++,n>>>12&15|224),e.setUint8(t++,n>>>6&63|128),e.setUint8(t++,n>>>0&63|128);else{if(!(1114112>n))throw new Error("bad codepoint "+n);e.setUint8(t++,n>>>18&7|240),e.setUint8(t++,n>>>12&63|128),e.setUint8(t++,n>>>6&63|128),e.setUint8(t++,n>>>0&63|128)}}}function r(e){for(var t=0,r=0,i=e.length;i>r;r++){var s=e.charCodeAt(r);if(128>s)t+=1;else if(2048>s)t+=2;else if(65536>s)t+=3;else{if(!(1114112>s))throw new Error("bad codepoint "+s);t+=4}}return t}function i(e,s,n){var o=typeof e;if("string"===o){if(32>(a=r(e)))return s.setUint8(n,160|a),t(s,n+1,e),1+a;if(256>a)return s.setUint8(n,217),s.setUint8(n+1,a),t(s,n+2,e),2+a;if(65536>a)return s.setUint8(n,218),s.setUint16(n+1,a),t(s,n+3,e),3+a;if(4294967296>a)return s.setUint8(n,219),s.setUint32(n+1,a),t(s,n+5,e),5+a}if(e instanceof Uint8Array){var a=e.byteLength,l=new Uint8Array(s.buffer);if(256>a)return s.setUint8(n,196),s.setUint8(n+1,a),l.set(e,n+2),2+a;if(65536>a)return s.setUint8(n,197),s.setUint16(n+1,a),l.set(e,n+3),3+a;if(4294967296>a)return s.setUint8(n,198),s.setUint32(n+1,a),l.set(e,n+5),5+a}if("number"===o){if(!isFinite(e))throw new Error("Number not finite: "+e);if(Math.floor(e)!==e)return s.setUint8(n,203),s.setFloat64(n+1,e),9;if(e>=0){if(128>e)return s.setUint8(n,e),1;if(256>e)return s.setUint8(n,204),s.setUint8(n+1,e),2;if(65536>e)return s.setUint8(n,205),s.setUint16(n+1,e),3;if(4294967296>e)return s.setUint8(n,206),s.setUint32(n+1,e),5;throw new Error("Number too big 0x"+e.toString(16))}if(e>=-32)return s.setInt8(n,e),1;if(e>=-128)return s.setUint8(n,208),s.setInt8(n+1,e),2;if(e>=-32768)return s.setUint8(n,209),s.setInt16(n+1,e),3;if(e>=-2147483648)return s.setUint8(n,210),s.setInt32(n+1,e),5;throw new Error("Number too small -0x"+(-e).toString(16).substr(1))}if(null===e)return s.setUint8(n,192),1;if("boolean"===o)return s.setUint8(n,e?195:194),1;if("object"===o){var h=0,c=Array.isArray(e);if(c)a=e.length;else{var u=Object.keys(e);a=u.length}if(16>a?(s.setUint8(n,a|(c?144:128)),h=1):65536>a?(s.setUint8(n,c?220:222),s.setUint16(n+1,a),h=3):4294967296>a&&(s.setUint8(n,c?221:223),s.setUint32(n+1,a),h=5),c)for(var d=0;a>d;d++)h+=i(e[d],s,n+h);else for(d=0;a>d;d++){var p=u[d];h+=i(p,s,n+h),h+=i(e[p],s,n+h)}return h}throw new Error("Unknown type "+o)}function s(e){var t=typeof e;if("string"===t){if(32>(i=r(e)))return 1+i;if(256>i)return 2+i;if(65536>i)return 3+i;if(4294967296>i)return 5+i}if(e instanceof Uint8Array){if(256>(i=e.byteLength))return 2+i;if(65536>i)return 3+i;if(4294967296>i)return 5+i}if("number"===t){if(Math.floor(e)!==e)return 9;if(e>=0){if(128>e)return 1;if(256>e)return 2;if(65536>e)return 3;if(4294967296>e)return 5;throw new Error("Number too big 0x"+e.toString(16))}if(e>=-32)return 1;if(e>=-128)return 2;if(e>=-32768)return 3;if(e>=-2147483648)return 5;throw new Error("Number too small -0x"+e.toString(16).substr(1))}if("boolean"===t||null===e)return 1;if("object"===t){var i,n=0;if(Array.isArray(e)){i=e.length;for(var o=0;i>o;o++)n+=s(e[o])}else{var a=Object.keys(e);for(i=a.length,o=0;i>o;o++){var l=a[o];n+=s(l)+s(e[l])}}if(16>i)return 1+n;if(65536>i)return 3+n;if(4294967296>i)return 5+n;throw new Error("Array or object too long 0x"+i.toString(16))}throw new Error("Unknown type "+t)}function n(e){var t=new ArrayBuffer(s(e));return i(e,new DataView(t),0),new Uint8Array(t)}function o(e,t,r){return t?new e(t.buffer,t.byteOffset,t.byteLength/(r||1)):void 0}function a(e){return o(DataView,e)}function l(e){return o(Uint8Array,e)}function h(e){return o(Int8Array,e)}function c(e){return o(Int32Array,e,4)}function u(e,t){var r=e.length/2;t||(t=new Int16Array(r));for(var i=0,s=0;r>i;++i,s+=2)t[i]=e[s]<<8^e[s+1];return t}function d(e,t){var r=e.length/4;t||(t=new Int32Array(r));for(var i=0,s=0;r>i;++i,s+=4)t[i]=e[s]<<24^e[s+1]<<16^e[s+2]<<8^e[s+3];return t}function p(e,t){var r=e.length;t||(t=new Uint8Array(4*r));for(var i=a(t),s=0;r>s;++s)i.setInt32(4*s,e[s]);return l(t)}function f(e,t,r){var i=e.length,s=1/t;r||(r=new Float32Array(i));for(var n=0;i>n;++n)r[n]=e[n]*s;return r}function m(e,t,r){var i=e.length;r||(r=new Int32Array(i));for(var s=0;i>s;++s)r[s]=Math.round(e[s]*t);return r}function g(e,t){var r,i;if(!t){var s=0;for(r=0,i=e.length;i>r;r+=2)s+=e[r+1];t=new e.constructor(s)}var n=0;for(r=0,i=e.length;i>r;r+=2)for(var o=e[r],a=e[r+1],l=0;a>l;++l)t[n]=o,++n;return t}function v(e){if(0===e.length)return new Int32Array;var t,r,i=2;for(t=1,r=e.length;r>t;++t)e[t-1]!==e[t]&&(i+=2);var s=new Int32Array(i),n=0,o=1;for(t=1,r=e.length;r>t;++t)e[t-1]!==e[t]?(s[n]=e[t-1],s[n+1]=o,o=1,n+=2):++o;return s[n]=e[e.length-1],s[n+1]=o,s}function b(e,t){var r=e.length;t||(t=new e.constructor(r)),r&&(t[0]=e[0]);for(var i=1;r>i;++i)t[i]=e[i]+t[i-1];return t}function y(e,t){var r=e.length;t||(t=new e.constructor(r)),t[0]=e[0];for(var i=1;r>i;++i)t[i]=e[i]-e[i-1];return t}function _(e,t){var r,i,s=e instanceof Int8Array?127:32767,n=-s-1,o=e.length;if(!t){var a=0;for(r=0;o>r;++r)e[r]n&&++a;t=new Int32Array(a)}for(r=0,i=0;o>r;){for(var l=0;e[r]===s||e[r]===n;)l+=e[r],++r;l+=e[r],++r,t[i]=l,++i}return t}function w(e,t,r){return f(_(e,c(r)),t,r)}function x(e,t,r){var i=_(e,c(r));return function(e,t,r){return f(b(e,c(r)),t,r)}(i,t,function(e){return o(Float32Array,e,4)}(i))}function S(e,t,r){return function(e,t){var r,i=t?127:32767,s=-i-1,n=e.length,o=0;for(r=0;n>r;++r)0===(h=e[r])?++o:h>0?(o+=Math.ceil(h/i),h%i==0&&(o+=1)):(o+=Math.ceil(h/s),h%s==0&&(o+=1));var a=t?new Int8Array(o):new Int16Array(o),l=0;for(r=0;n>r;++r){var h;if((h=e[r])>=0)for(;h>=i;)a[l]=i,++l,h-=i;else for(;s>=h;)a[l]=s,++l,h-=s;a[l]=h,++l}return a}(function(e,t,r){return y(m(e,t),r)}(e,t),r)}function A(e,t,r,i){var s=new ArrayBuffer(12+i.byteLength),n=new Uint8Array(s),o=new DataView(s);return o.setInt32(0,e),o.setInt32(4,t),r&&n.set(r,8),n.set(i,12),n}function C(e){return A(2,e.length,void 0,l(e))}function M(e){return A(4,e.length,void 0,p(e))}function L(e,t){return A(5,e.length/t,p([t]),l(e))}function E(e){return A(6,e.length,void 0,p(v(e)))}function z(e){return A(8,e.length,void 0,p(function(e){return v(y(e))}(e)))}function k(e,t){return A(9,e.length,p([t]),p(function(e,t){return v(m(e,t))}(e,t)))}function O(e,t){return A(10,e.length,p([t]),function(e,t){var r=e.length;t||(t=new Uint8Array(2*r));for(var i=a(t),s=0;r>s;++s)i.setInt16(2*s,e[s]);return l(t)}(S(e,t)))}function T(e){var t={};return j.forEach((function(r){void 0!==e[r]&&(t[r]=e[r])})),e.bondAtomList&&(t.bondAtomList=M(e.bondAtomList)),e.bondOrderList&&(t.bondOrderList=C(e.bondOrderList)),t.xCoordList=O(e.xCoordList,1e3),t.yCoordList=O(e.yCoordList,1e3),t.zCoordList=O(e.zCoordList,1e3),e.bFactorList&&(t.bFactorList=O(e.bFactorList,100)),e.atomIdList&&(t.atomIdList=z(e.atomIdList)),e.altLocList&&(t.altLocList=E(e.altLocList)),e.occupancyList&&(t.occupancyList=k(e.occupancyList,100)),t.groupIdList=z(e.groupIdList),t.groupTypeList=M(e.groupTypeList),e.secStructList&&(t.secStructList=C(e.secStructList)),e.insCodeList&&(t.insCodeList=E(e.insCodeList)),e.sequenceIndexList&&(t.sequenceIndexList=z(e.sequenceIndexList)),t.chainIdList=L(e.chainIdList,4),e.chainNameList&&(t.chainNameList=L(e.chainNameList,4)),t}function I(e){function t(e){for(var t={},r=0;e>r;r++)t[n()]=n();return t}function r(t){var r=e.subarray(o,o+t);return o+=t,r}function i(t){var r=e.subarray(o,o+t);o+=t;var i=65535;if(t>i){for(var s=[],n=0;nr;r++)t[r]=n();return t}function n(){var n,l,h=e[o];if(!(128&h))return o++,h;if(128==(240&h))return o++,t(l=15&h);if(144==(240&h))return o++,s(l=15&h);if(160==(224&h))return o++,i(l=31&h);if(!(224&~h))return n=a.getInt8(o),o++,n;switch(h){case 192:return o++,null;case 194:return o++,!1;case 195:return o++,!0;case 196:return l=a.getUint8(o+1),o+=2,r(l);case 197:return l=a.getUint16(o+1),o+=3,r(l);case 198:return l=a.getUint32(o+1),o+=5,r(l);case 202:return n=a.getFloat32(o+1),o+=5,n;case 203:return n=a.getFloat64(o+1),o+=9,n;case 204:return n=e[o+1],o+=2,n;case 205:return n=a.getUint16(o+1),o+=3,n;case 206:return n=a.getUint32(o+1),o+=5,n;case 208:return n=a.getInt8(o+1),o+=2,n;case 209:return n=a.getInt16(o+1),o+=3,n;case 210:return n=a.getInt32(o+1),o+=5,n;case 217:return l=a.getUint8(o+1),o+=2,i(l);case 218:return l=a.getUint16(o+1),o+=3,i(l);case 219:return l=a.getUint32(o+1),o+=5,i(l);case 220:return l=a.getUint16(o+1),o+=3,s(l);case 221:return l=a.getUint32(o+1),o+=5,s(l);case 222:return l=a.getUint16(o+1),o+=3,t(l);case 223:return l=a.getUint32(o+1),o+=5,t(l)}throw new Error("Unknown type 0x"+h.toString(16))}var o=0,a=new DataView(e.buffer);return n()}function F(e,t,r,i){switch(e){case 1:return function(e,t){var r=e.length;t||(t=new Float32Array(r/4));for(var i=a(t),s=a(e),n=0,o=0,l=r/4;l>n;++n,o+=4)i.setFloat32(o,s.getFloat32(o),!0);return t}(t);case 2:return h(t);case 3:return u(t);case 4:return d(t);case 5:return l(t);case 6:return g(d(t),new Uint8Array(r));case 7:return g(d(t));case 8:return function(e,t){return b(g(e),t)}(d(t));case 9:return function(e,t,r){return f(g(e,c(r)),t,r)}(d(t),d(i)[0]);case 10:return x(u(t),d(i)[0]);case 11:return f(u(t),d(i)[0]);case 12:return w(u(t),d(i)[0]);case 13:return w(h(t),d(i)[0]);case 14:return _(u(t));case 15:return _(h(t))}}function D(e,t){var r=(t=t||{}).ignoreFields,i={};return B.forEach((function(t){var s=!!r&&-1!==r.indexOf(t),n=e[t];s||void 0===n||(n instanceof Uint8Array?i[t]=F.apply(null,function(e){var t=a(e),r=t.getInt32(0),i=t.getInt32(4),s=e.subarray(8,12);return[r,e=e.subarray(12),i,s]}(n)):i[t]=n)})),i}function R(e){return String.fromCharCode.apply(null,e).replace(/\0/g,"")}function P(e,t){return e instanceof ArrayBuffer&&(e=new Uint8Array(e)),D(e instanceof Uint8Array?I(e):e,t)}function G(e,t,r,i){var s=new XMLHttpRequest;s.addEventListener("load",(function(){try{var e=P(s.response);r(e)}catch(e){i(e)}}),!0),s.addEventListener("error",i,!0),s.responseType="arraybuffer",s.open("GET",t+e.toUpperCase()),s.send()}var j=["mmtfVersion","mmtfProducer","unitCell","spaceGroup","structureId","title","depositionDate","releaseDate","experimentalMethods","resolution","rFree","rWork","bioAssemblyList","ncsOperatorList","entityList","groupList","numBonds","numAtoms","numGroups","numChains","numModels","groupsPerChain","chainsPerModel"],B=j.concat(["xCoordList","yCoordList","zCoordList","groupIdList","groupTypeList","chainIdList","bFactorList","atomIdList","altLocList","occupancyList","secStructList","insCodeList","sequenceIndexList","chainNameList","bondAtomList","bondOrderList"]),N="//mmtf.rcsb.org/v1.0/",U=N+"full/",V=N+"reduced/";e.encode=function(e){return n(T(e))},e.decode=P,e.traverse=function(e,t,r){var i,s,n,o,a,l,h=(r=r||{}).firstModelOnly,c=t.onModel,u=t.onChain,d=t.onGroup,p=t.onAtom,f=t.onBond,m=0,g=0,v=0,b=0,y=0,_=-1,w=e.chainNameList,x=e.secStructList,S=e.insCodeList,A=e.sequenceIndexList,C=e.atomIdList,M=e.bFactorList,L=e.altLocList,E=e.occupancyList,z=e.bondAtomList,k=e.bondOrderList;for(i=0,s=e.chainsPerModel.length;s>i&&!(h&&m>0);++i){var O=e.chainsPerModel[m];for(c&&c({chainCount:O,modelIndex:m}),n=0;O>n;++n){var T=e.groupsPerChain[g];if(u){var I=R(e.chainIdList.subarray(4*g,4*g+4)),F=null;w&&(F=R(w.subarray(4*g,4*g+4))),u({groupCount:T,chainIndex:g,modelIndex:m,chainId:I,chainName:F})}for(o=0;T>o;++o){var D=e.groupList[e.groupTypeList[v]],P=D.atomNameList.length;if(d){var G=null;x&&(G=x[v]);var j=null;e.insCodeList&&(j=String.fromCharCode(S[v]));var B=null;A&&(B=A[v]),d({atomCount:P,groupIndex:v,chainIndex:g,modelIndex:m,groupId:e.groupIdList[v],groupType:e.groupTypeList[v],groupName:D.groupName,singleLetterCode:D.singleLetterCode,chemCompType:D.chemCompType,secStruct:G,insCode:j,sequenceIndex:B})}for(a=0;P>a;++a){if(p){var N=null;C&&(N=C[b]);var U=null;M&&(U=M[b]);var V=null;L&&(V=String.fromCharCode(L[b]));var W=null;E&&(W=E[b]),p({atomIndex:b,groupIndex:v,chainIndex:g,modelIndex:m,atomId:N,element:D.elementList[a],atomName:D.atomNameList[a],formalCharge:D.formalChargeList[a],xCoord:e.xCoordList[b],yCoord:e.yCoordList[b],zCoord:e.zCoordList[b],bFactor:U,altLoc:V,occupancy:W})}b+=1}if(f){var H=D.bondAtomList;for(a=0,l=D.bondOrderList.length;l>a;++a)f({atomIndex1:b-P+H[2*a],atomIndex2:b-P+H[2*a+1],bondOrder:D.bondOrderList[a]})}v+=1}g+=1}if(y=_+1,_=b-1,f&&z)for(a=0,l=z.length;l>a;a+=2){var q=z[a],Y=z[a+1];(q>=y&&_>=q||Y>=y&&_>=Y)&&f({atomIndex1:q,atomIndex2:Y,bondOrder:k?k[a/2]:null})}m+=1}},e.fetch=function(e,t,r){G(e,U,t,r)},e.fetchReduced=function(e,t,r){G(e,V,t,r)},e.version="v1.0.1",e.fetchUrl=U,e.fetchReducedUrl=V,e.encodeMsgpack=n,e.encodeMmtf=T,e.decodeMsgpack=I,e.decodeMmtf=D}(t)},"./node_modules/pako/dist/pako.esm.mjs":(e,t,r)=>{"use strict";function i(e){let t=e.length;for(;--t>=0;)e[t]=0}r.r(t),r.d(t,{Deflate:()=>cr,Inflate:()=>fr,constants:()=>br,default:()=>yr,deflate:()=>ur,deflateRaw:()=>dr,gzip:()=>pr,inflate:()=>mr,inflateRaw:()=>gr,ungzip:()=>vr});const s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),a=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=new Array(576);i(l);const h=new Array(60);i(h);const c=new Array(512);i(c);const u=new Array(256);i(u);const d=new Array(29);i(d);const p=new Array(30);function f(e,t,r,i,s){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=s,this.has_stree=e&&e.length}let m,g,v;function b(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}i(p);const y=e=>e<256?c[e]:c[256+(e>>>7)],_=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},w=(e,t,r)=>{e.bi_valid>16-r?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<{w(e,r[2*t],r[2*t+1])},S=(e,t)=>{let r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1},A=(e,t,r)=>{const i=new Array(16);let s,n,o=0;for(s=1;s<=15;s++)o=o+r[s-1]<<1,i[s]=o;for(n=0;n<=t;n++){let t=e[2*n+1];0!==t&&(e[2*n]=S(i[t]++,t))}},C=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},M=e=>{e.bi_valid>8?_(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},L=(e,t,r,i)=>{const s=2*t,n=2*r;return e[s]{const i=e.heap[r];let s=r<<1;for(;s<=e.heap_len&&(s{let i,o,a,l,h=0;if(0!==e.sym_next)do{i=255&e.pending_buf[e.sym_buf+h++],i+=(255&e.pending_buf[e.sym_buf+h++])<<8,o=e.pending_buf[e.sym_buf+h++],0===i?x(e,o,t):(a=u[o],x(e,a+256+1,t),l=s[a],0!==l&&(o-=d[a],w(e,o,l)),i--,a=y(i),x(e,a,r),l=n[a],0!==l&&(i-=p[a],w(e,i,l)))}while(h{const r=t.dyn_tree,i=t.stat_desc.static_tree,s=t.stat_desc.has_stree,n=t.stat_desc.elems;let o,a,l,h=-1;for(e.heap_len=0,e.heap_max=573,o=0;o>1;o>=1;o--)E(e,r,o);l=n;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],E(e,r,1),a=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=a,r[2*l]=r[2*o]+r[2*a],e.depth[l]=(e.depth[o]>=e.depth[a]?e.depth[o]:e.depth[a])+1,r[2*o+1]=r[2*a+1]=l,e.heap[1]=l++,E(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const r=t.dyn_tree,i=t.max_code,s=t.stat_desc.static_tree,n=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,l=t.stat_desc.max_length;let h,c,u,d,p,f,m=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(r[2*e.heap[e.heap_max]+1]=0,h=e.heap_max+1;h<573;h++)c=e.heap[h],d=r[2*r[2*c+1]+1]+1,d>l&&(d=l,m++),r[2*c+1]=d,c>i||(e.bl_count[d]++,p=0,c>=a&&(p=o[c-a]),f=r[2*c],e.opt_len+=f*(d+p),n&&(e.static_len+=f*(s[2*c+1]+p)));if(0!==m){do{for(d=l-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[l]--,m-=2}while(m>0);for(d=l;0!==d;d--)for(c=e.bl_count[d];0!==c;)u=e.heap[--h],u>i||(r[2*u+1]!==d&&(e.opt_len+=(d-r[2*u+1])*r[2*u],r[2*u+1]=d),c--)}})(e,t),A(r,h,e.bl_count)},O=(e,t,r)=>{let i,s,n=-1,o=t[1],a=0,l=7,h=4;for(0===o&&(l=138,h=3),t[2*(r+1)+1]=65535,i=0;i<=r;i++)s=o,o=t[2*(i+1)+1],++a{let i,s,n=-1,o=t[1],a=0,l=7,h=4;for(0===o&&(l=138,h=3),i=0;i<=r;i++)if(s=o,o=t[2*(i+1)+1],!(++a{w(e,0+(i?1:0),3),M(e),_(e,r),_(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r};var D={_tr_init:e=>{I||((()=>{let e,t,r,i,a;const b=new Array(16);for(r=0,i=0;i<28;i++)for(d[i]=r,e=0;e<1<>=7;i<30;i++)for(p[i]=a<<7,e=0;e<1<{let s,n,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),k(e,e.l_desc),k(e,e.d_desc),o=(e=>{let t;for(O(e,e.dyn_ltree,e.l_desc.max_code),O(e,e.dyn_dtree,e.d_desc.max_code),k(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*a[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),s=e.opt_len+3+7>>>3,n=e.static_len+3+7>>>3,n<=s&&(s=n)):s=n=r+5,r+4<=s&&-1!==t?F(e,t,r,i):4===e.strategy||n===s?(w(e,2+(i?1:0),3),z(e,l,h)):(w(e,4+(i?1:0),3),((e,t,r,i)=>{let s;for(w(e,t-257,5),w(e,r-1,5),w(e,i-4,4),s=0;s(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=r,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(u[r]+256+1)]++,e.dyn_dtree[2*y(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{w(e,2,3),x(e,256,l),(e=>{16===e.bi_valid?(_(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},R=(e,t,r,i)=>{let s=65535&e,n=e>>>16&65535,o=0;for(;0!==r;){o=r>2e3?2e3:r,r-=o;do{s=s+t[i++]|0,n=n+s|0}while(--o);s%=65521,n%=65521}return s|n<<16};const P=new Uint32Array((()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})());var G=(e,t,r,i)=>{const s=P,n=i+r;e^=-1;for(let r=i;r>>8^s[255&(e^t[r])];return~e},j={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},B={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:N,_tr_stored_block:U,_tr_flush_block:V,_tr_tally:W,_tr_align:H}=D,{Z_NO_FLUSH:q,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:Z,Z_FINISH:X,Z_BLOCK:$,Z_OK:K,Z_STREAM_END:J,Z_STREAM_ERROR:Q,Z_DATA_ERROR:ee,Z_BUF_ERROR:te,Z_DEFAULT_COMPRESSION:re,Z_FILTERED:ie,Z_HUFFMAN_ONLY:se,Z_RLE:ne,Z_FIXED:oe,Z_DEFAULT_STRATEGY:ae,Z_UNKNOWN:le,Z_DEFLATED:he}=B,ce=258,ue=262,de=42,pe=113,fe=666,me=(e,t)=>(e.msg=j[t],t),ge=e=>2*e-(e>4?9:0),ve=e=>{let t=e.length;for(;--t>=0;)e[t]=0},be=e=>{let t,r,i,s=e.w_size;t=e.hash_size,i=t;do{r=e.head[--i],e.head[i]=r>=s?r-s:0}while(--t);t=s,i=t;do{r=e.prev[--i],e.prev[i]=r>=s?r-s:0}while(--t)};let ye=(e,t,r)=>(t<{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))},we=(e,t)=>{V(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,_e(e.strm)},xe=(e,t)=>{e.pending_buf[e.pending++]=t},Se=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Ae=(e,t,r,i)=>{let s=e.avail_in;return s>i&&(s=i),0===s?0:(e.avail_in-=s,t.set(e.input.subarray(e.next_in,e.next_in+s),r),1===e.state.wrap?e.adler=R(e.adler,t,s,r):2===e.state.wrap&&(e.adler=G(e.adler,t,s,r)),e.next_in+=s,e.total_in+=s,s)},Ce=(e,t)=>{let r,i,s=e.max_chain_length,n=e.strstart,o=e.prev_length,a=e.nice_match;const l=e.strstart>e.w_size-ue?e.strstart-(e.w_size-ue):0,h=e.window,c=e.w_mask,u=e.prev,d=e.strstart+ce;let p=h[n+o-1],f=h[n+o];e.prev_length>=e.good_match&&(s>>=2),a>e.lookahead&&(a=e.lookahead);do{if(r=t,h[r+o]===f&&h[r+o-1]===p&&h[r]===h[n]&&h[++r]===h[n+1]){n+=2,r++;do{}while(h[++n]===h[++r]&&h[++n]===h[++r]&&h[++n]===h[++r]&&h[++n]===h[++r]&&h[++n]===h[++r]&&h[++n]===h[++r]&&h[++n]===h[++r]&&h[++n]===h[++r]&&no){if(e.match_start=t,o=i,i>=a)break;p=h[n+o-1],f=h[n+o]}}}while((t=u[t&c])>l&&0!=--s);return o<=e.lookahead?o:e.lookahead},Me=e=>{const t=e.w_size;let r,i,s;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-ue)&&(e.window.set(e.window.subarray(t,t+t-i),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),be(e),i+=t),0===e.strm.avail_in)break;if(r=Ae(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=r,e.lookahead+e.insert>=3)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=ye(e,e.ins_h,e.window[s+1]);e.insert&&(e.ins_h=ye(e,e.ins_h,e.window[s+3-1]),e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead{let r,i,s,n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,o=0,a=e.strm.avail_in;do{if(r=65535,s=e.bi_valid+42>>3,e.strm.avail_outi+e.strm.avail_in&&(r=i+e.strm.avail_in),r>s&&(r=s),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,_e(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(Ae(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(0===o);return a-=e.strm.avail_in,a&&(a>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=a&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_waters&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,s+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),s>e.strm.avail_in&&(s=e.strm.avail_in),s&&(Ae(e.strm,e.window,e.strstart,s),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.high_water>3,s=e.pending_buf_size-s>65535?65535:e.pending_buf_size-s,n=s>e.w_size?e.w_size:s,i=e.strstart-e.block_start,(i>=n||(i||t===X)&&t!==q&&0===e.strm.avail_in&&i<=s)&&(r=i>s?s:i,o=t===X&&0===e.strm.avail_in&&r===i?1:0,U(e,e.block_start,r,o),e.block_start+=r,_e(e.strm)),o?3:1)},Ee=(e,t)=>{let r,i;for(;;){if(e.lookahead=3&&(e.ins_h=ye(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-ue&&(e.match_length=Ce(e,r)),e.match_length>=3)if(i=W(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=ye(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=ye(e,e.ins_h,e.window[e.strstart+1]);else i=W(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(we(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===X?(we(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(we(e,!1),0===e.strm.avail_out)?1:2},ze=(e,t)=>{let r,i,s;for(;;){if(e.lookahead=3&&(e.ins_h=ye(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){s=e.strstart+e.lookahead-3,i=W(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=s&&(e.ins_h=ye(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,i&&(we(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(i=W(e,0,e.window[e.strstart-1]),i&&we(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=W(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===X?(we(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(we(e,!1),0===e.strm.avail_out)?1:2};function ke(e,t,r,i,s){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=i,this.func=s}const Oe=[new ke(0,0,0,0,Le),new ke(4,4,8,4,Ee),new ke(4,5,16,8,Ee),new ke(4,6,32,32,Ee),new ke(4,4,16,16,ze),new ke(8,16,32,32,ze),new ke(8,16,128,128,ze),new ke(8,32,128,256,ze),new ke(32,128,258,1024,ze),new ke(32,258,258,4096,ze)];function Te(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=he,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),ve(this.dyn_ltree),ve(this.dyn_dtree),ve(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),ve(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),ve(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Ie=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==de&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==pe&&t.status!==fe?1:0},Fe=e=>{if(Ie(e))return me(e,Q);e.total_in=e.total_out=0,e.data_type=le;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?de:pe,e.adler=2===t.wrap?0:1,t.last_flush=-2,N(t),K},De=e=>{const t=Fe(e);var r;return t===K&&((r=e.state).window_size=2*r.w_size,ve(r.head),r.max_lazy_match=Oe[r.level].max_lazy,r.good_match=Oe[r.level].good_length,r.nice_match=Oe[r.level].nice_length,r.max_chain_length=Oe[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),t},Re=(e,t,r,i,s,n)=>{if(!e)return Q;let o=1;if(t===re&&(t=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),s<1||s>9||r!==he||i<8||i>15||t<0||t>9||n<0||n>oe||8===i&&1!==o)return me(e,Q);8===i&&(i=9);const a=new Te;return e.state=a,a.strm=e,a.status=de,a.wrap=o,a.gzhead=null,a.w_bits=i,a.w_size=1<Re(e,t,he,15,8,ae),deflateInit2:Re,deflateReset:De,deflateResetKeep:Fe,deflateSetHeader:(e,t)=>Ie(e)||2!==e.state.wrap?Q:(e.state.gzhead=t,K),deflate:(e,t)=>{if(Ie(e)||t>$||t<0)return e?me(e,Q):Q;const r=e.state;if(!e.output||0!==e.avail_in&&!e.input||r.status===fe&&t!==X)return me(e,0===e.avail_out?te:Q);const i=r.last_flush;if(r.last_flush=t,0!==r.pending){if(_e(e),0===e.avail_out)return r.last_flush=-1,K}else if(0===e.avail_in&&ge(t)<=ge(i)&&t!==X)return me(e,te);if(r.status===fe&&0!==e.avail_in)return me(e,te);if(r.status===de&&0===r.wrap&&(r.status=pe),r.status===de){let t=he+(r.w_bits-8<<4)<<8,i=-1;if(i=r.strategy>=se||r.level<2?0:r.level<6?1:6===r.level?2:3,t|=i<<6,0!==r.strstart&&(t|=32),t+=31-t%31,Se(r,t),0!==r.strstart&&(Se(r,e.adler>>>16),Se(r,65535&e.adler)),e.adler=1,r.status=pe,_e(e),0!==r.pending)return r.last_flush=-1,K}if(57===r.status)if(e.adler=0,xe(r,31),xe(r,139),xe(r,8),r.gzhead)xe(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),xe(r,255&r.gzhead.time),xe(r,r.gzhead.time>>8&255),xe(r,r.gzhead.time>>16&255),xe(r,r.gzhead.time>>24&255),xe(r,9===r.level?2:r.strategy>=se||r.level<2?4:0),xe(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(xe(r,255&r.gzhead.extra.length),xe(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=G(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(xe(r,0),xe(r,0),xe(r,0),xe(r,0),xe(r,0),xe(r,9===r.level?2:r.strategy>=se||r.level<2?4:0),xe(r,3),r.status=pe,_e(e),0!==r.pending)return r.last_flush=-1,K;if(69===r.status){if(r.gzhead.extra){let t=r.pending,i=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+i>r.pending_buf_size;){let s=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+s),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>t&&(e.adler=G(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex+=s,_e(e),0!==r.pending)return r.last_flush=-1,K;t=0,i-=s}let s=new Uint8Array(r.gzhead.extra);r.pending_buf.set(s.subarray(r.gzindex,r.gzindex+i),r.pending),r.pending+=i,r.gzhead.hcrc&&r.pending>t&&(e.adler=G(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let t,i=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>i&&(e.adler=G(e.adler,r.pending_buf,r.pending-i,i)),_e(e),0!==r.pending)return r.last_flush=-1,K;i=0}t=r.gzindexi&&(e.adler=G(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let t,i=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>i&&(e.adler=G(e.adler,r.pending_buf,r.pending-i,i)),_e(e),0!==r.pending)return r.last_flush=-1,K;i=0}t=r.gzindexi&&(e.adler=G(e.adler,r.pending_buf,r.pending-i,i))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(_e(e),0!==r.pending))return r.last_flush=-1,K;xe(r,255&e.adler),xe(r,e.adler>>8&255),e.adler=0}if(r.status=pe,_e(e),0!==r.pending)return r.last_flush=-1,K}if(0!==e.avail_in||0!==r.lookahead||t!==q&&r.status!==fe){let i=0===r.level?Le(r,t):r.strategy===se?((e,t)=>{let r;for(;;){if(0===e.lookahead&&(Me(e),0===e.lookahead)){if(t===q)return 1;break}if(e.match_length=0,r=W(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(we(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===X?(we(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(we(e,!1),0===e.strm.avail_out)?1:2})(r,t):r.strategy===ne?((e,t)=>{let r,i,s,n;const o=e.window;for(;;){if(e.lookahead<=ce){if(Me(e),e.lookahead<=ce&&t===q)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(s=e.strstart-1,i=o[s],i===o[++s]&&i===o[++s]&&i===o[++s])){n=e.strstart+ce;do{}while(i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&se.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=W(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=W(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(we(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===X?(we(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(we(e,!1),0===e.strm.avail_out)?1:2})(r,t):Oe[r.level].func(r,t);if(3!==i&&4!==i||(r.status=fe),1===i||3===i)return 0===e.avail_out&&(r.last_flush=-1),K;if(2===i&&(t===Y?H(r):t!==$&&(U(r,0,0,!1),t===Z&&(ve(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),_e(e),0===e.avail_out))return r.last_flush=-1,K}return t!==X?K:r.wrap<=0?J:(2===r.wrap?(xe(r,255&e.adler),xe(r,e.adler>>8&255),xe(r,e.adler>>16&255),xe(r,e.adler>>24&255),xe(r,255&e.total_in),xe(r,e.total_in>>8&255),xe(r,e.total_in>>16&255),xe(r,e.total_in>>24&255)):(Se(r,e.adler>>>16),Se(r,65535&e.adler)),_e(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?K:J)},deflateEnd:e=>{if(Ie(e))return Q;const t=e.state.status;return e.state=null,t===pe?me(e,ee):K},deflateSetDictionary:(e,t)=>{let r=t.length;if(Ie(e))return Q;const i=e.state,s=i.wrap;if(2===s||1===s&&i.status!==de||i.lookahead)return Q;if(1===s&&(e.adler=R(e.adler,t,r,0)),i.wrap=0,r>=i.w_size){0===s&&(ve(i.head),i.strstart=0,i.block_start=0,i.insert=0);let e=new Uint8Array(i.w_size);e.set(t.subarray(r-i.w_size,r),0),t=e,r=i.w_size}const n=e.avail_in,o=e.next_in,a=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,Me(i);i.lookahead>=3;){let e=i.strstart,t=i.lookahead-2;do{i.ins_h=ye(i,i.ins_h,i.window[e+3-1]),i.prev[e&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=e,e++}while(--t);i.strstart=e,i.lookahead=2,Me(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,e.next_in=o,e.input=a,e.avail_in=n,i.wrap=s,K},deflateInfo:"pako deflate (from Nodeca project)"};const Ge=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var je={assign:function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const t in r)Ge(r,t)&&(e[t]=r[t])}}return e},flattenChunks:e=>{let t=0;for(let r=0,i=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Ne[254]=Ne[254]=1;var Ue={string2buf:e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,r,i,s,n,o=e.length,a=0;for(s=0;s>>6,t[n++]=128|63&r):r<65536?(t[n++]=224|r>>>12,t[n++]=128|r>>>6&63,t[n++]=128|63&r):(t[n++]=240|r>>>18,t[n++]=128|r>>>12&63,t[n++]=128|r>>>6&63,t[n++]=128|63&r);return t},buf2string:(e,t)=>{const r=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let i,s;const n=new Array(2*r);for(s=0,i=0;i4)n[s++]=65533,i+=o-1;else{for(t&=2===o?31:3===o?15:7;o>1&&i1?n[s++]=65533:t<65536?n[s++]=t:(t-=65536,n[s++]=55296|t>>10&1023,n[s++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Be)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let i=0;i{(t=t||e.length)>e.length&&(t=e.length);let r=t-1;for(;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+Ne[e[r]]>t?r:t}},Ve=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const We=Object.prototype.toString,{Z_NO_FLUSH:He,Z_SYNC_FLUSH:qe,Z_FULL_FLUSH:Ye,Z_FINISH:Ze,Z_OK:Xe,Z_STREAM_END:$e,Z_DEFAULT_COMPRESSION:Ke,Z_DEFAULT_STRATEGY:Je,Z_DEFLATED:Qe}=B;function et(e){this.options=je.assign({level:Ke,method:Qe,chunkSize:16384,windowBits:15,memLevel:8,strategy:Je},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ve,this.strm.avail_out=0;let r=Pe.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==Xe)throw new Error(j[r]);if(t.header&&Pe.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?Ue.string2buf(t.dictionary):"[object ArrayBuffer]"===We.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,r=Pe.deflateSetDictionary(this.strm,e),r!==Xe)throw new Error(j[r]);this._dict_set=!0}}function tt(e,t){const r=new et(t);if(r.push(e,!0),r.err)throw r.msg||j[r.err];return r.result}et.prototype.push=function(e,t){const r=this.strm,i=this.options.chunkSize;let s,n;if(this.ended)return!1;for(n=t===~~t?t:!0===t?Ze:He,"string"==typeof e?r.input=Ue.string2buf(e):"[object ArrayBuffer]"===We.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(n===qe||n===Ye)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(s=Pe.deflate(r,n),s===$e)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),s=Pe.deflateEnd(this.strm),this.onEnd(s),this.ended=!0,s===Xe;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},et.prototype.onData=function(e){this.chunks.push(e)},et.prototype.onEnd=function(e){e===Xe&&(this.result=je.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var rt={Deflate:et,deflate:tt,deflateRaw:function(e,t){return(t=t||{}).raw=!0,tt(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,tt(e,t)},constants:B};const it=16209;var st=function(e,t){let r,i,s,n,o,a,l,h,c,u,d,p,f,m,g,v,b,y,_,w,x,S,A,C;const M=e.state;r=e.next_in,A=e.input,i=r+(e.avail_in-5),s=e.next_out,C=e.output,n=s-(t-e.avail_out),o=s+(e.avail_out-257),a=M.dmax,l=M.wsize,h=M.whave,c=M.wnext,u=M.window,d=M.hold,p=M.bits,f=M.lencode,m=M.distcode,g=(1<>>24,d>>>=y,p-=y,y=b>>>16&255,0===y)C[s++]=65535&b;else{if(!(16&y)){if(64&y){if(32&y){M.mode=16191;break e}e.msg="invalid literal/length code",M.mode=it;break e}b=f[(65535&b)+(d&(1<>>=y,p-=y),p<15&&(d+=A[r++]<>>24,d>>>=y,p-=y,y=b>>>16&255,16&y){if(w=65535&b,y&=15,pa){e.msg="invalid distance too far back",M.mode=it;break e}if(d>>>=y,p-=y,y=s-n,w>y){if(y=w-y,y>h&&M.sane){e.msg="invalid distance too far back",M.mode=it;break e}if(x=0,S=u,0===c){if(x+=l-y,y<_){_-=y;do{C[s++]=u[x++]}while(--y);x=s-w,S=C}}else if(c2;)C[s++]=S[x++],C[s++]=S[x++],C[s++]=S[x++],_-=3;_&&(C[s++]=S[x++],_>1&&(C[s++]=S[x++]))}else{x=s-w;do{C[s++]=C[x++],C[s++]=C[x++],C[s++]=C[x++],_-=3}while(_>2);_&&(C[s++]=C[x++],_>1&&(C[s++]=C[x++]))}break}if(64&y){e.msg="invalid distance code",M.mode=it;break e}b=m[(65535&b)+(d&(1<>3,r-=_,p-=_<<3,d&=(1<{const l=a.bits;let h,c,u,d,p,f,m=0,g=0,v=0,b=0,y=0,_=0,w=0,x=0,S=0,A=0,C=null;const M=new Uint16Array(16),L=new Uint16Array(16);let E,z,k,O=null;for(m=0;m<=15;m++)M[m]=0;for(g=0;g=1&&0===M[b];b--);if(y>b&&(y=b),0===b)return s[n++]=20971520,s[n++]=20971520,a.bits=1,0;for(v=1;v0&&(0===e||1!==b))return-1;for(L[1]=0,m=1;m<15;m++)L[m+1]=L[m]+M[m];for(g=0;g852||2===e&&S>592)return 1;for(;;){E=m-w,o[g]+1=f?(z=O[o[g]-f],k=C[o[g]-f]):(z=96,k=0),h=1<>w)+c]=E<<24|z<<16|k}while(0!==c);for(h=1<>=1;if(0!==h?(A&=h-1,A+=h):A=0,g++,0==--M[m]){if(m===b)break;m=t[r+o[g]]}if(m>y&&(A&d)!==u){for(0===w&&(w=y),p+=v,_=m-w,x=1<<_;_+w852||2===e&&S>592)return 1;u=A&d,s[u]=y<<24|_<<16|p-n}}return 0!==A&&(s[p+A]=m-w<<24|64<<16),a.bits=y,0};const{Z_FINISH:ct,Z_BLOCK:ut,Z_TREES:dt,Z_OK:pt,Z_STREAM_END:ft,Z_NEED_DICT:mt,Z_STREAM_ERROR:gt,Z_DATA_ERROR:vt,Z_MEM_ERROR:bt,Z_BUF_ERROR:yt,Z_DEFLATED:_t}=B,wt=16180,xt=16190,St=16191,At=16192,Ct=16194,Mt=16199,Lt=16200,Et=16206,zt=16209,kt=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Ot(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Tt=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode16211?1:0},It=e=>{if(Tt(e))return gt;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=wt,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,pt},Ft=e=>{if(Tt(e))return gt;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,It(e)},Dt=(e,t)=>{let r;if(Tt(e))return gt;const i=e.state;return t<0?(r=0,t=-t):(r=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?gt:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,Ft(e))},Rt=(e,t)=>{if(!e)return gt;const r=new Ot;e.state=r,r.strm=e,r.window=null,r.mode=wt;const i=Dt(e,t);return i!==pt&&(e.state=null),i};let Pt,Gt,jt=!0;const Bt=e=>{if(jt){Pt=new Int32Array(512),Gt=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ht(1,e.lens,0,288,Pt,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ht(2,e.lens,0,32,Gt,0,e.work,{bits:5}),jt=!1}e.lencode=Pt,e.lenbits=9,e.distcode=Gt,e.distbits=5},Nt=(e,t,r,i)=>{let s;const n=e.state;return null===n.window&&(n.wsize=1<=n.wsize?(n.window.set(t.subarray(r-n.wsize,r),0),n.wnext=0,n.whave=n.wsize):(s=n.wsize-n.wnext,s>i&&(s=i),n.window.set(t.subarray(r-i,r-i+s),n.wnext),(i-=s)?(n.window.set(t.subarray(r-i,r),0),n.wnext=i,n.whave=n.wsize):(n.wnext+=s,n.wnext===n.wsize&&(n.wnext=0),n.whaveRt(e,15),inflateInit2:Rt,inflate:(e,t)=>{let r,i,s,n,o,a,l,h,c,u,d,p,f,m,g,v,b,y,_,w,x,S,A=0;const C=new Uint8Array(4);let M,L;const E=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Tt(e)||!e.output||!e.input&&0!==e.avail_in)return gt;r=e.state,r.mode===St&&(r.mode=At),o=e.next_out,s=e.output,l=e.avail_out,n=e.next_in,i=e.input,a=e.avail_in,h=r.hold,c=r.bits,u=a,d=l,S=pt;e:for(;;)switch(r.mode){case wt:if(0===r.wrap){r.mode=At;break}for(;c<16;){if(0===a)break e;a--,h+=i[n++]<>>8&255,r.check=G(r.check,C,2,0),h=0,c=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg="incorrect header check",r.mode=zt;break}if((15&h)!==_t){e.msg="unknown compression method",r.mode=zt;break}if(h>>>=4,c-=4,x=8+(15&h),0===r.wbits&&(r.wbits=x),x>15||x>r.wbits){e.msg="invalid window size",r.mode=zt;break}r.dmax=1<>8&1),512&r.flags&&4&r.wrap&&(C[0]=255&h,C[1]=h>>>8&255,r.check=G(r.check,C,2,0)),h=0,c=0,r.mode=16182;case 16182:for(;c<32;){if(0===a)break e;a--,h+=i[n++]<>>8&255,C[2]=h>>>16&255,C[3]=h>>>24&255,r.check=G(r.check,C,4,0)),h=0,c=0,r.mode=16183;case 16183:for(;c<16;){if(0===a)break e;a--,h+=i[n++]<>8),512&r.flags&&4&r.wrap&&(C[0]=255&h,C[1]=h>>>8&255,r.check=G(r.check,C,2,0)),h=0,c=0,r.mode=16184;case 16184:if(1024&r.flags){for(;c<16;){if(0===a)break e;a--,h+=i[n++]<>>8&255,r.check=G(r.check,C,2,0)),h=0,c=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(p=r.length,p>a&&(p=a),p&&(r.head&&(x=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(i.subarray(n,n+p),x)),512&r.flags&&4&r.wrap&&(r.check=G(r.check,i,p,n)),a-=p,n+=p,r.length-=p),r.length))break e;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===a)break e;p=0;do{x=i[n+p++],r.head&&x&&r.length<65536&&(r.head.name+=String.fromCharCode(x))}while(x&&p>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=St;break;case 16189:for(;c<32;){if(0===a)break e;a--,h+=i[n++]<>>=7&c,c-=7&c,r.mode=Et;break}for(;c<3;){if(0===a)break e;a--,h+=i[n++]<>>=1,c-=1,3&h){case 0:r.mode=16193;break;case 1:if(Bt(r),r.mode=Mt,t===dt){h>>>=2,c-=2;break e}break;case 2:r.mode=16196;break;case 3:e.msg="invalid block type",r.mode=zt}h>>>=2,c-=2;break;case 16193:for(h>>>=7&c,c-=7&c;c<32;){if(0===a)break e;a--,h+=i[n++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=zt;break}if(r.length=65535&h,h=0,c=0,r.mode=Ct,t===dt)break e;case Ct:r.mode=16195;case 16195:if(p=r.length,p){if(p>a&&(p=a),p>l&&(p=l),0===p)break e;s.set(i.subarray(n,n+p),o),a-=p,n+=p,l-=p,o+=p,r.length-=p;break}r.mode=St;break;case 16196:for(;c<14;){if(0===a)break e;a--,h+=i[n++]<>>=5,c-=5,r.ndist=1+(31&h),h>>>=5,c-=5,r.ncode=4+(15&h),h>>>=4,c-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=zt;break}r.have=0,r.mode=16197;case 16197:for(;r.have>>=3,c-=3}for(;r.have<19;)r.lens[E[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},S=ht(0,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,S){e.msg="invalid code lengths set",r.mode=zt;break}r.have=0,r.mode=16198;case 16198:for(;r.have>>24,v=A>>>16&255,b=65535&A,!(g<=c);){if(0===a)break e;a--,h+=i[n++]<>>=g,c-=g,r.lens[r.have++]=b;else{if(16===b){for(L=g+2;c>>=g,c-=g,0===r.have){e.msg="invalid bit length repeat",r.mode=zt;break}x=r.lens[r.have-1],p=3+(3&h),h>>>=2,c-=2}else if(17===b){for(L=g+3;c>>=g,c-=g,x=0,p=3+(7&h),h>>>=3,c-=3}else{for(L=g+7;c>>=g,c-=g,x=0,p=11+(127&h),h>>>=7,c-=7}if(r.have+p>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=zt;break}for(;p--;)r.lens[r.have++]=x}}if(r.mode===zt)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=zt;break}if(r.lenbits=9,M={bits:r.lenbits},S=ht(1,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,S){e.msg="invalid literal/lengths set",r.mode=zt;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},S=ht(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,S){e.msg="invalid distances set",r.mode=zt;break}if(r.mode=Mt,t===dt)break e;case Mt:r.mode=Lt;case Lt:if(a>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=n,e.avail_in=a,r.hold=h,r.bits=c,st(e,d),o=e.next_out,s=e.output,l=e.avail_out,n=e.next_in,i=e.input,a=e.avail_in,h=r.hold,c=r.bits,r.mode===St&&(r.back=-1);break}for(r.back=0;A=r.lencode[h&(1<>>24,v=A>>>16&255,b=65535&A,!(g<=c);){if(0===a)break e;a--,h+=i[n++]<>y)],g=A>>>24,v=A>>>16&255,b=65535&A,!(y+g<=c);){if(0===a)break e;a--,h+=i[n++]<>>=y,c-=y,r.back+=y}if(h>>>=g,c-=g,r.back+=g,r.length=b,0===v){r.mode=16205;break}if(32&v){r.back=-1,r.mode=St;break}if(64&v){e.msg="invalid literal/length code",r.mode=zt;break}r.extra=15&v,r.mode=16201;case 16201:if(r.extra){for(L=r.extra;c>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;A=r.distcode[h&(1<>>24,v=A>>>16&255,b=65535&A,!(g<=c);){if(0===a)break e;a--,h+=i[n++]<>y)],g=A>>>24,v=A>>>16&255,b=65535&A,!(y+g<=c);){if(0===a)break e;a--,h+=i[n++]<>>=y,c-=y,r.back+=y}if(h>>>=g,c-=g,r.back+=g,64&v){e.msg="invalid distance code",r.mode=zt;break}r.offset=b,r.extra=15&v,r.mode=16203;case 16203:if(r.extra){for(L=r.extra;c>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=zt;break}r.mode=16204;case 16204:if(0===l)break e;if(p=d-l,r.offset>p){if(p=r.offset-p,p>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=zt;break}p>r.wnext?(p-=r.wnext,f=r.wsize-p):f=r.wnext-p,p>r.length&&(p=r.length),m=r.window}else m=s,f=o-r.offset,p=r.length;p>l&&(p=l),l-=p,r.length-=p;do{s[o++]=m[f++]}while(--p);0===r.length&&(r.mode=Lt);break;case 16205:if(0===l)break e;s[o++]=r.length,l--,r.mode=Lt;break;case Et:if(r.wrap){for(;c<32;){if(0===a)break e;a--,h|=i[n++]<{if(Tt(e))return gt;let t=e.state;return t.window&&(t.window=null),e.state=null,pt},inflateGetHeader:(e,t)=>{if(Tt(e))return gt;const r=e.state;return 2&r.wrap?(r.head=t,t.done=!1,pt):gt},inflateSetDictionary:(e,t)=>{const r=t.length;let i,s,n;return Tt(e)?gt:(i=e.state,0!==i.wrap&&i.mode!==xt?gt:i.mode===xt&&(s=1,s=R(s,t,r,0),s!==i.check)?vt:(n=Nt(e,t,r,r),n?(i.mode=16210,bt):(i.havedict=1,pt)))},inflateInfo:"pako inflate (from Nodeca project)"},Vt=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Wt=Object.prototype.toString,{Z_NO_FLUSH:Ht,Z_FINISH:qt,Z_OK:Yt,Z_STREAM_END:Zt,Z_NEED_DICT:Xt,Z_STREAM_ERROR:$t,Z_DATA_ERROR:Kt,Z_MEM_ERROR:Jt}=B;function Qt(e){this.options=je.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ve,this.strm.avail_out=0;let r=Ut.inflateInit2(this.strm,t.windowBits);if(r!==Yt)throw new Error(j[r]);if(this.header=new Vt,Ut.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Ue.string2buf(t.dictionary):"[object ArrayBuffer]"===Wt.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=Ut.inflateSetDictionary(this.strm,t.dictionary),r!==Yt)))throw new Error(j[r])}function er(e,t){const r=new Qt(t);if(r.push(e),r.err)throw r.msg||j[r.err];return r.result}Qt.prototype.push=function(e,t){const r=this.strm,i=this.options.chunkSize,s=this.options.dictionary;let n,o,a;if(this.ended)return!1;for(o=t===~~t?t:!0===t?qt:Ht,"[object ArrayBuffer]"===Wt.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),n=Ut.inflate(r,o),n===Xt&&s&&(n=Ut.inflateSetDictionary(r,s),n===Yt?n=Ut.inflate(r,o):n===Kt&&(n=Xt));r.avail_in>0&&n===Zt&&r.state.wrap>0&&0!==e[r.next_in];)Ut.inflateReset(r),n=Ut.inflate(r,o);switch(n){case $t:case Kt:case Xt:case Jt:return this.onEnd(n),this.ended=!0,!1}if(a=r.avail_out,r.next_out&&(0===r.avail_out||n===Zt))if("string"===this.options.to){let e=Ue.utf8border(r.output,r.next_out),t=r.next_out-e,s=Ue.buf2string(r.output,e);r.next_out=t,r.avail_out=i-t,t&&r.output.set(r.output.subarray(e,e+t),0),this.onData(s)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(n!==Yt||0!==a){if(n===Zt)return n=Ut.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},Qt.prototype.onData=function(e){this.chunks.push(e)},Qt.prototype.onEnd=function(e){e===Yt&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=je.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var tr={Inflate:Qt,inflate:er,inflateRaw:function(e,t){return(t=t||{}).raw=!0,er(e,t)},ungzip:er,constants:B};const{Deflate:rr,deflate:ir,deflateRaw:sr,gzip:nr}=rt,{Inflate:or,inflate:ar,inflateRaw:lr,ungzip:hr}=tr;var cr=rr,ur=ir,dr=sr,pr=nr,fr=or,mr=ar,gr=lr,vr=hr,br=B,yr={Deflate:rr,deflate:ir,deflateRaw:sr,gzip:nr,Inflate:or,inflate:ar,inflateRaw:lr,ungzip:hr,constants:B}}},__webpack_module_cache__={};function __nested_webpack_require_1637606__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__nested_webpack_require_1637606__),r.exports}__nested_webpack_require_1637606__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __nested_webpack_require_1637606__.d(t,{a:t}),t},__nested_webpack_require_1637606__.d=(e,t)=>{for(var r in t)__nested_webpack_require_1637606__.o(t,r)&&!__nested_webpack_require_1637606__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__nested_webpack_require_1637606__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__nested_webpack_require_1637606__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__nested_webpack_require_1637606__("./src/index.ts"),__nested_webpack_require_1637606__("./src/SurfaceWorker.js");var __nested_webpack_exports__=__nested_webpack_require_1637606__("./src/exporter.js");return __nested_webpack_exports__})(),module.exports=factory()},34961:(e,t,r)=>{"use strict";var i=r(39807);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function n(e,t){for(var r=0;r1?r-1:0),s=1;s1?r-1:0),s=1;s1?r-1:0),s=1;s1?r-1:0),s=1;s{"use strict";var i=r(39807);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function n(e){for(var t=1;te.length)&&(r=e.length),e.substring(r-t.length,r)===t}var y="",_="",w="",x="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function A(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,"message",{value:e.message}),r}function C(e){return g(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var M=function(e,t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(M,e);var r,s,a,c,u=(r=M,s=d(),function(){var e,t=f(r);if(s){var i=f(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return l(this,e)});function M(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,M),"object"!==m(e)||null===e)throw new v("options","Object",e);var r=e.message,s=e.operator,n=e.stackStartFn,o=e.actual,a=e.expected,c=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)t=u.call(this,String(r));else if(i.stderr&&i.stderr.isTTY&&(i.stderr&&i.stderr.getColorDepth&&1!==i.stderr.getColorDepth()?(y="",_="",x="",w=""):(y="",_="",x="",w="")),"object"===m(o)&&null!==o&&"object"===m(a)&&null!==a&&"stack"in o&&o instanceof Error&&"stack"in a&&a instanceof Error&&(o=A(o),a=A(a)),"deepStrictEqual"===s||"strictEqual"===s)t=u.call(this,function(e,t,r){var s="",n="",o=0,a="",l=!1,h=C(e),c=h.split("\n"),u=C(t).split("\n"),d=0,p="";if("strictEqual"===r&&"object"===m(e)&&"object"===m(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===c.length&&1===u.length&&c[0]!==u[0]){var f=c[0].length+u[0].length;if(f<=10){if(!("object"===m(e)&&null!==e||"object"===m(t)&&null!==t||0===e&&0===t))return"".concat(S[r],"\n\n")+"".concat(c[0]," !== ").concat(u[0],"\n")}else if("strictEqualObject"!==r&&f<(i.stderr&&i.stderr.isTTY?i.stderr.columns:80)){for(;c[0][d]===u[0][d];)d++;d>2&&(p="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",d),"^"),d=0)}}for(var g=c[c.length-1],v=u[u.length-1];g===v&&(d++<2?a="\n ".concat(g).concat(a):s=g,c.pop(),u.pop(),0!==c.length&&0!==u.length);)g=c[c.length-1],v=u[u.length-1];var A=Math.max(c.length,u.length);if(0===A){var M=h.split("\n");if(M.length>30)for(M[26]="".concat(y,"...").concat(x);M.length>27;)M.pop();return"".concat(S.notIdentical,"\n\n").concat(M.join("\n"),"\n")}d>3&&(a="\n".concat(y,"...").concat(x).concat(a),l=!0),""!==s&&(a="\n ".concat(s).concat(a),s="");var L=0,E=S[r]+"\n".concat(_,"+ actual").concat(x," ").concat(w,"- expected").concat(x),z=" ".concat(y,"...").concat(x," Lines skipped");for(d=0;d1&&d>2&&(k>4?(n+="\n".concat(y,"...").concat(x),l=!0):k>3&&(n+="\n ".concat(u[d-2]),L++),n+="\n ".concat(u[d-1]),L++),o=d,s+="\n".concat(w,"-").concat(x," ").concat(u[d]),L++;else if(u.length1&&d>2&&(k>4?(n+="\n".concat(y,"...").concat(x),l=!0):k>3&&(n+="\n ".concat(c[d-2]),L++),n+="\n ".concat(c[d-1]),L++),o=d,n+="\n".concat(_,"+").concat(x," ").concat(c[d]),L++;else{var O=u[d],T=c[d],I=T!==O&&(!b(T,",")||T.slice(0,-1)!==O);I&&b(O,",")&&O.slice(0,-1)===T&&(I=!1,T+=","),I?(k>1&&d>2&&(k>4?(n+="\n".concat(y,"...").concat(x),l=!0):k>3&&(n+="\n ".concat(c[d-2]),L++),n+="\n ".concat(c[d-1]),L++),o=d,n+="\n".concat(_,"+").concat(x," ").concat(T),s+="\n".concat(w,"-").concat(x," ").concat(O),L+=2):(n+=s,s="",1!==k&&0!==d||(n+="\n ".concat(T),L++))}if(L>20&&d30)for(p[26]="".concat(y,"...").concat(x);p.length>27;)p.pop();t=1===p.length?u.call(this,"".concat(d," ").concat(p[0])):u.call(this,"".concat(d,"\n\n").concat(p.join("\n"),"\n"))}else{var f=C(o),g="",L=S[s];"notDeepEqual"===s||"notEqual"===s?(f="".concat(S[s],"\n\n").concat(f)).length>1024&&(f="".concat(f.slice(0,1021),"...")):(g="".concat(C(a)),f.length>512&&(f="".concat(f.slice(0,509),"...")),g.length>512&&(g="".concat(g.slice(0,509),"...")),"deepEqual"===s||"equal"===s?f="".concat(L,"\n\n").concat(f,"\n\nshould equal\n\n"):g=" ".concat(s," ").concat(g)),t=u.call(this,"".concat(f).concat(g))}return Error.stackTraceLimit=c,t.generatedMessage=!r,Object.defineProperty(h(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=o,t.expected=a,t.operator=s,Error.captureStackTrace&&Error.captureStackTrace(h(t),n),t.stack,t.name="AssertionError",l(t)}return a=M,(c=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return g(this,n(n({},t),{},{customInspect:!1,depth:0}))}}])&&o(a.prototype,c),Object.defineProperty(a,"prototype",{writable:!1}),M}(c(Error),g.custom);e.exports=M},81146:(e,t,r)=>{"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}var o,a,l={};function h(e,t,r){r||(r=Error);var o=function(r){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(c,r);var o,a,l,h=(a=c,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=n(a);if(l){var r=n(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(r,i,s){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),n=h.call(this,function(e,r,i){return"string"==typeof t?t:t(e,r,i)}(r,i,s)),n.code=e,n}return o=c,Object.defineProperty(o,"prototype",{writable:!1}),o}(r);l[e]=o}function c(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}h("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),h("ERR_INVALID_ARG_TYPE",(function(e,t,s){var n,a,l,h,u;if(void 0===o&&(o=r(34961)),o("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(a="not ",t.substr(0,4)===a)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))l="The ".concat(e," ").concat(n," ").concat(c(t,"type"));else{var d=("number"!=typeof u&&(u=0),u+1>(h=e).length||-1===h.indexOf(".",u)?"argument":"property");l='The "'.concat(e,'" ').concat(d," ").concat(n," ").concat(c(t,"type"))}return l+". Received type ".concat(i(s))}),TypeError),h("ERR_INVALID_ARG_VALUE",(function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===a&&(a=r(11276));var s=a.inspect(t);return s.length>128&&(s="".concat(s.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(i,". Received ").concat(s)}),TypeError,RangeError),h("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var s;return s=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(i(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(s,".")}),TypeError),h("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),i=0;i0,"At least one arg needs to be specified");var s="The ",n=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),n){case 1:s+="".concat(t[0]," argument");break;case 2:s+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:s+=t.slice(0,n-1).join(", "),s+=", and ".concat(t[n-1]," arguments")}return"".concat(s," must be specified")}),TypeError),e.exports.codes=l},88884:(e,t,r)=>{"use strict";function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,s,n,o,a=[],l=!0,h=!1;try{if(n=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=n.call(r)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(e){h=!0,s=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(h)throw s}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function I(e){return Object.keys(e).filter(T).concat(c(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function F(e,t){if(e===t)return 0;for(var r=e.length,i=t.length,s=0,n=Math.min(r,i);s{"use strict";var i=r(59412),s=r(61398),n=s(i("String.prototype.indexOf"));e.exports=function(e,t){var r=i(e,!!t);return"function"==typeof r&&n(e,".prototype.")>-1?s(r):r}},61398:(e,t,r)=>{"use strict";var i=r(35366),s=r(59412),n=r(86928),o=r(48744),a=s("%Function.prototype.apply%"),l=s("%Function.prototype.call%"),h=s("%Reflect.apply%",!0)||i.call(l,a),c=r(38232),u=s("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new o("a function is required");var t=h(i,l,arguments);return n(t,1+u(0,e.length-(arguments.length-1)),!0)};var d=function(){return h(i,a,arguments)};c?c(e.exports,"apply",{value:d}):e.exports.apply=d},43362:(e,t,r)=>{"use strict";var i=r(38232),s=r(66367),n=r(48744),o=r(55572);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new n("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new n("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],u=!!o&&o(e,t);if(i)i(e,t,{configurable:null===h&&u?u.configurable:!h,enumerable:null===a&&u?u.enumerable:!a,value:r,writable:null===l&&u?u.writable:!l});else{if(!c&&(a||l||h))throw new s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},10781:(e,t,r)=>{"use strict";var i=r(99952),s="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),n=Object.prototype.toString,o=Array.prototype.concat,a=r(43362),l=r(20419)(),h=function(e,t,r,i){if(t in e)if(!0===i){if(e[t]===r)return}else if("function"!=typeof(s=i)||"[object Function]"!==n.call(s)||!i())return;var s;l?a(e,t,r,!0):a(e,t,r)},c=function(e,t){var r=arguments.length>2?arguments[2]:{},n=i(t);s&&(n=o.call(n,Object.getOwnPropertySymbols(t)));for(var a=0;a{"use strict";var i=r(59412)("%Object.defineProperty%",!0)||!1;if(i)try{i({},"a",{value:1})}catch(e){i=!1}e.exports=i},33674:e=>{"use strict";e.exports=EvalError},94234:e=>{"use strict";e.exports=Error},8975:e=>{"use strict";e.exports=RangeError},59299:e=>{"use strict";e.exports=ReferenceError},66367:e=>{"use strict";e.exports=SyntaxError},48744:e=>{"use strict";e.exports=TypeError},63432:e=>{"use strict";e.exports=URIError},85573:(e,t,r)=>{"use strict";var i=r(60245),s=Object.prototype.toString,n=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!i(t))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=r),"[object Array]"===s.call(e)?function(e,t,r){for(var i=0,s=e.length;i{"use strict";var t=Object.prototype.toString,r=Math.max,i=function(e,t){for(var r=[],i=0;i{"use strict";var i=r(5438);e.exports=Function.prototype.bind||i},59412:(e,t,r)=>{"use strict";var i,s=r(94234),n=r(33674),o=r(8975),a=r(59299),l=r(66367),h=r(48744),c=r(63432),u=Function,d=function(e){try{return u('"use strict"; return ('+e+").constructor;")()}catch(e){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(e){p=null}var f=function(){throw new h},m=p?function(){try{return f}catch(e){try{return p(arguments,"callee").get}catch(e){return f}}}():f,g=r(23266)(),v=r(39681)(),b=Object.getPrototypeOf||(v?function(e){return e.__proto__}:null),y={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):i,w={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"==typeof Atomics?i:Atomics,"%BigInt%":"undefined"==typeof BigInt?i:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?i:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":s,"%eval%":eval,"%EvalError%":n,"%Float32Array%":"undefined"==typeof Float32Array?i:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":u,"%GeneratorFunction%":y,"%Int8Array%":"undefined"==typeof Int8Array?i:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?i:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):i,"%JSON%":"object"==typeof JSON?JSON:i,"%Map%":"undefined"==typeof Map?i:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?i:Promise,"%Proxy%":"undefined"==typeof Proxy?i:Proxy,"%RangeError%":o,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?i:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):i,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):i,"%Symbol%":g?Symbol:i,"%SyntaxError%":l,"%ThrowTypeError%":m,"%TypedArray%":_,"%TypeError%":h,"%Uint8Array%":"undefined"==typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?i:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?i:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?i:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?i:WeakSet};if(b)try{null.error}catch(e){var x=b(b(e));w["%Error.prototype%"]=x}var S=function e(t){var r;if("%AsyncFunction%"===t)r=d("async function () {}");else if("%GeneratorFunction%"===t)r=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=d("async function* () {}");else if("%AsyncGenerator%"===t){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if("%AsyncIteratorPrototype%"===t){var s=e("%AsyncGenerator%");s&&b&&(r=b(s.prototype))}return w[t]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=r(35366),M=r(19942),L=C.call(Function.call,Array.prototype.concat),E=C.call(Function.apply,Array.prototype.splice),z=C.call(Function.call,String.prototype.replace),k=C.call(Function.call,String.prototype.slice),O=C.call(Function.call,RegExp.prototype.exec),T=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,I=/\\(\\)?/g,F=function(e,t){var r,i=e;if(M(A,i)&&(i="%"+(r=A[i])[0]+"%"),M(w,i)){var s=w[i];if(s===y&&(s=S(i)),void 0===s&&!t)throw new h("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:i,value:s}}throw new l("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new h("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new h('"allowMissing" argument must be a boolean');if(null===O(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=k(e,0,1),r=k(e,-1);if("%"===t&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var i=[];return z(e,T,(function(e,t,r,s){i[i.length]=r?z(s,I,"$1"):t||e})),i}(e),i=r.length>0?r[0]:"",s=F("%"+i+"%",t),n=s.name,o=s.value,a=!1,c=s.alias;c&&(i=c[0],E(r,L([0,1],c)));for(var u=1,d=!0;u=r.length){var v=p(o,f);o=(d=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:o[f]}else d=M(o,f),o=o[f];d&&!a&&(w[n]=o)}}return o}},55572:(e,t,r)=>{"use strict";var i=r(59412)("%Object.getOwnPropertyDescriptor%",!0);if(i)try{i([],"length")}catch(e){i=null}e.exports=i},20419:(e,t,r)=>{"use strict";var i=r(38232),s=function(){return!!i};s.hasArrayLengthDefineBug=function(){if(!i)return null;try{return 1!==i([],"length",{value:1}).length}catch(e){return!0}},e.exports=s},39681:e=>{"use strict";var t={__proto__:null,foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof r)}},23266:(e,t,r)=>{"use strict";var i="undefined"!=typeof Symbol&&Symbol,s=r(93272);e.exports=function(){return"function"==typeof i&&"function"==typeof Symbol&&"symbol"==typeof i("foo")&&"symbol"==typeof Symbol("bar")&&s()}},93272:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var s=Object.getOwnPropertyDescriptor(e,t);if(42!==s.value||!0!==s.enumerable)return!1}return!0}},15541:(e,t,r)=>{"use strict";var i=r(93272);e.exports=function(){return i()&&!!Symbol.toStringTag}},19942:(e,t,r)=>{"use strict";var i=Function.prototype.call,s=Object.prototype.hasOwnProperty,n=r(35366);e.exports=n.call(i,s)},9715:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},68007:(e,t,r)=>{"use strict";var i=r(15541)(),s=r(24310)("Object.prototype.toString"),n=function(e){return!(i&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===s(e)},o=function(e){return!!n(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==s(e)&&"[object Function]"===s(e.callee)},a=function(){return n(arguments)}();n.isLegacyArguments=o,e.exports=a?n:o},60245:e=>{"use strict";var t,r,i=Function.prototype.toString,s="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof s&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},s((function(){throw 42}),null,t)}catch(e){e!==r&&(s=null)}else s=null;var n=/^\s*class\b/,o=function(e){try{var t=i.call(e);return n.test(t)}catch(e){return!1}},a=function(e){try{return!o(e)&&(i.call(e),!0)}catch(e){return!1}},l=Object.prototype.toString,h="function"==typeof Symbol&&!!Symbol.toStringTag,c=!(0 in[,]),u=function(){return!1};if("object"==typeof document){var d=document.all;l.call(d)===l.call(document.all)&&(u=function(e){if((c||!e)&&(void 0===e||"object"==typeof e))try{var t=l.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=s?function(e){if(u(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{s(e,null,t)}catch(e){if(e!==r)return!1}return!o(e)&&a(e)}:function(e){if(u(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(h)return a(e);if(o(e))return!1;var t=l.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},74205:(e,t,r)=>{"use strict";var i,s=Object.prototype.toString,n=Function.prototype.toString,o=/^\s*(?:function)?\*/,a=r(15541)(),l=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(o.test(n.call(e)))return!0;if(!a)return"[object GeneratorFunction]"===s.call(e);if(!l)return!1;if(void 0===i){var t=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(e){}}();i=!!t&&l(t)}return l(e)===i}},87266:e=>{"use strict";e.exports=function(e){return e!=e}},74858:(e,t,r)=>{"use strict";var i=r(61398),s=r(10781),n=r(87266),o=r(29419),a=r(50317),l=i(o(),Number);s(l,{getPolyfill:o,implementation:n,shim:a}),e.exports=l},29419:(e,t,r)=>{"use strict";var i=r(87266);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:i}},50317:(e,t,r)=>{"use strict";var i=r(10781),s=r(29419);e.exports=function(){var e=s();return i(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},94179:(e,t,r)=>{"use strict";var i=r(17478);e.exports=function(e){return!!i(e)}},36560:e=>{"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:e===r||!(!t(e)||!t(r))}},62956:(e,t,r)=>{"use strict";var i=r(10781),s=r(61398),n=r(36560),o=r(43765),a=r(6723),l=s(o(),Object);i(l,{getPolyfill:o,implementation:n,shim:a}),e.exports=l},43765:(e,t,r)=>{"use strict";var i=r(36560);e.exports=function(){return"function"==typeof Object.is?Object.is:i}},6723:(e,t,r)=>{"use strict";var i=r(43765),s=r(10781);e.exports=function(){var e=i();return s(Object,{is:e},{is:function(){return Object.is!==e}}),e}},77908:(e,t,r)=>{"use strict";var i;if(!Object.keys){var s=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=r(12724),a=Object.prototype.propertyIsEnumerable,l=!a.call({toString:null},"toString"),h=a.call((function(){}),"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&s.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{u(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();i=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===n.call(e),i=o(e),a=t&&"[object String]"===n.call(e),d=[];if(!t&&!r&&!i)throw new TypeError("Object.keys called on a non-object");var f=h&&r;if(a&&e.length>0&&!s.call(e,0))for(var m=0;m0)for(var g=0;g{"use strict";var i=Array.prototype.slice,s=r(12724),n=Object.keys,o=n?function(e){return n(e)}:r(77908),a=Object.keys;o.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return s(e)?a(i.call(e)):a(e)})}else Object.keys=o;return Object.keys||o},e.exports=o},12724:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),i="[object Arguments]"===r;return i||(i="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),i}},99864:(e,t,r)=>{"use strict";var i=r(99952),s=r(93272)(),n=r(24310),o=Object,a=n("Array.prototype.push"),l=n("Object.prototype.propertyIsEnumerable"),h=s?Object.getOwnPropertySymbols:null;e.exports=function(e,t){if(null==e)throw new TypeError("target must be an object");var r=o(e);if(1===arguments.length)return r;for(var n=1;n{"use strict";var i=r(99864);e.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},i=0;i{"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},39807:e=>{var t,r,i=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{r="function"==typeof clearTimeout?clearTimeout:n}catch(e){r=n}}();var a,l=[],h=!1,c=-1;function u(){h&&a&&(h=!1,a.length?l=a.concat(l):c=-1,l.length&&d())}function d(){if(!h){var e=o(u);h=!0;for(var t=l.length;t;){for(a=l,l=[];++c1)for(var r=1;r{"use strict";var i=r(59412),s=r(43362),n=r(20419)(),o=r(55572),a=r(48744),l=i("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||l(t)!==t)throw new a("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,h=!0;if("length"in e&&o){var c=o(e,"length");c&&!c.configurable&&(i=!1),c&&!c.writable&&(h=!1)}return(i||h||!r)&&(n?s(e,"length",t,!0,!0):s(e,"length",t)),e}},26900:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},41071:(e,t,r)=>{"use strict";var i=r(68007),s=r(74205),n=r(17478),o=r(94179);function a(e){return e.call.bind(e)}var l="undefined"!=typeof BigInt,h="undefined"!=typeof Symbol,c=a(Object.prototype.toString),u=a(Number.prototype.valueOf),d=a(String.prototype.valueOf),p=a(Boolean.prototype.valueOf);if(l)var f=a(BigInt.prototype.valueOf);if(h)var m=a(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function v(e){return"[object Map]"===c(e)}function b(e){return"[object Set]"===c(e)}function y(e){return"[object WeakMap]"===c(e)}function _(e){return"[object WeakSet]"===c(e)}function w(e){return"[object ArrayBuffer]"===c(e)}function x(e){return"undefined"!=typeof ArrayBuffer&&(w.working?w(e):e instanceof ArrayBuffer)}function S(e){return"[object DataView]"===c(e)}function A(e){return"undefined"!=typeof DataView&&(S.working?S(e):e instanceof DataView)}t.isArgumentsObject=i,t.isGeneratorFunction=s,t.isTypedArray=o,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):o(e)||A(e)},t.isUint8Array=function(e){return"Uint8Array"===n(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===n(e)},t.isUint16Array=function(e){return"Uint16Array"===n(e)},t.isUint32Array=function(e){return"Uint32Array"===n(e)},t.isInt8Array=function(e){return"Int8Array"===n(e)},t.isInt16Array=function(e){return"Int16Array"===n(e)},t.isInt32Array=function(e){return"Int32Array"===n(e)},t.isFloat32Array=function(e){return"Float32Array"===n(e)},t.isFloat64Array=function(e){return"Float64Array"===n(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===n(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===n(e)},v.working="undefined"!=typeof Map&&v(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(v.working?v(e):e instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(b.working?b(e):e instanceof Set)},y.working="undefined"!=typeof WeakMap&&y(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(y.working?y(e):e instanceof WeakMap)},_.working="undefined"!=typeof WeakSet&&_(new WeakSet),t.isWeakSet=function(e){return _(e)},w.working="undefined"!=typeof ArrayBuffer&&w(new ArrayBuffer),t.isArrayBuffer=x,S.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&S(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=A;var C="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function M(e){return"[object SharedArrayBuffer]"===c(e)}function L(e){return void 0!==C&&(void 0===M.working&&(M.working=M(new C)),M.working?M(e):e instanceof C)}function E(e){return g(e,u)}function z(e){return g(e,d)}function k(e){return g(e,p)}function O(e){return l&&g(e,f)}function T(e){return h&&g(e,m)}t.isSharedArrayBuffer=L,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===c(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===c(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===c(e)},t.isGeneratorObject=function(e){return"[object Generator]"===c(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===c(e)},t.isNumberObject=E,t.isStringObject=z,t.isBooleanObject=k,t.isBigIntObject=O,t.isSymbolObject=T,t.isBoxedPrimitive=function(e){return E(e)||z(e)||k(e)||O(e)||T(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(x(e)||L(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},11276:(e,t,r)=>{var i=r(39807),s=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},i=0;i=s)return e;switch(e){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(e){return"[Circular]"}default:return e}})),a=i[r];r=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),g(r)?i.showHidden=r:r&&t._extend(i,r),_(i.showHidden)&&(i.showHidden=!1),_(i.depth)&&(i.depth=2),_(i.colors)&&(i.colors=!1),_(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=c),d(i,e,i.depth)}function c(e,t){var r=h.styles[t];return r?"["+h.colors[r][0]+"m"+e+"["+h.colors[r][1]+"m":e}function u(e,t){return e}function d(e,r,i){if(e.customInspect&&r&&C(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var s=r.inspect(i,e);return y(s)||(s=d(e,s,i)),s}var n=function(e,t){if(_(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}(e,r);if(n)return n;var o=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),A(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return p(r);if(0===o.length){if(C(r)){var l=r.name?": "+r.name:"";return e.stylize("[Function"+l+"]","special")}if(w(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return e.stylize(Date.prototype.toString.call(r),"date");if(A(r))return p(r)}var h,c="",u=!1,x=["{","}"];return m(r)&&(u=!0,x=["[","]"]),C(r)&&(c=" [Function"+(r.name?": "+r.name:"")+"]"),w(r)&&(c=" "+RegExp.prototype.toString.call(r)),S(r)&&(c=" "+Date.prototype.toUTCString.call(r)),A(r)&&(c=" "+p(r)),0!==o.length||u&&0!=r.length?i<0?w(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),h=u?function(e,t,r,i,s){for(var n=[],o=0,a=t.length;o60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(h,c,x)):x[0]+c+x[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,i,s,n){var o,a,l;if((l=Object.getOwnPropertyDescriptor(t,s)||{value:t[s]}).get?a=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(a=e.stylize("[Setter]","special")),z(i,s)||(o="["+s+"]"),a||(e.seen.indexOf(l.value)<0?(a=v(r)?d(e,l.value,null):d(e,l.value,r-1)).indexOf("\n")>-1&&(a=n?a.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),_(o)){if(n&&s.match(/^\d+$/))return a;(o=JSON.stringify(""+s)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+a}function m(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function v(e){return null===e}function b(e){return"number"==typeof e}function y(e){return"string"==typeof e}function _(e){return void 0===e}function w(e){return x(e)&&"[object RegExp]"===M(e)}function x(e){return"object"==typeof e&&null!==e}function S(e){return x(e)&&"[object Date]"===M(e)}function A(e){return x(e)&&("[object Error]"===M(e)||e instanceof Error)}function C(e){return"function"==typeof e}function M(e){return Object.prototype.toString.call(e)}function L(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!o[e])if(a.test(e)){var r=i.pid;o[e]=function(){var i=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,i)}}else o[e]=function(){};return o[e]},t.inspect=h,h.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},h.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(41071),t.isArray=m,t.isBoolean=g,t.isNull=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=_,t.isRegExp=w,t.types.isRegExp=w,t.isObject=x,t.isDate=S,t.types.isDate=S,t.isError=A,t.types.isNativeError=A,t.isFunction=C,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(26900);var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function z(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[L((e=new Date).getHours()),L(e.getMinutes()),L(e.getSeconds())].join(":"),[e.getDate(),E[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(9715),t._extend=function(e,t){if(!t||!x(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};var k="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function O(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(k&&e[k]){var t;if("function"!=typeof(t=e[k]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,k,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,i=new Promise((function(e,i){t=e,r=i})),s=[],n=0;n{"use strict";var i=r(85573),s=r(75208),n=r(61398),o=r(24310),a=r(55572),l=o("Object.prototype.toString"),h=r(15541)(),c="undefined"==typeof globalThis?r.g:globalThis,u=s(),d=o("String.prototype.slice"),p=Object.getPrototypeOf,f=o("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1?t:"Object"===t&&function(e){var t=!1;return i(m,(function(r,i){if(!t)try{r(e),t=d(i,1)}catch(e){}})),t}(e)}return a?function(e){var t=!1;return i(m,(function(r,i){if(!t)try{"$"+r(e)===i&&(t=d(i,1))}catch(e){}})),t}(e):null}},90170:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});const i='\n'},88862:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var i=r(34961),s=r.n(i);class n{constructor(e,t){this._element=e,this._parent=null,this._visible=!1,this._horizontal=this._element.classList.contains("horizontal"),this._property=this._horizontal?"width":"height";const r=this._element.dataset.bsParent;r&&(this._parent=t.querySelector(r),s()(this._parent,"this._parent")),this._element.addEventListener("transitionend",(e=>{e.target===e.currentTarget&&e.propertyName===this._property&&(this._element.classList.replace("collapsing","collapse"),this._visible&&(this._element.classList.add("show"),this._element.style.removeProperty(this._property)))}))}hide(){if(this._visible){const e=this._element.getBoundingClientRect()[this._property];this._element.style.setProperty(this._property,`${e}px`),this._element.classList.replace("collapse","collapsing"),this._element.classList.remove("show"),this._element.offsetHeight,this._element.style.removeProperty(this._property),this._visible=!1,this._parent&&c.get(this._parent)===this&&c.set(this._parent,null)}}show(){var e;if(!this._visible){this._parent&&(null===(e=c.get(this._parent))||void 0===e||e.hide(),c.set(this._parent,this));const t=this._horizontal?"scrollWidth":"scrollHeight";this._element.classList.replace("collapse","collapsing"),this._element.style.setProperty(this._property,"0");const r=this._element[t];this._element.style.setProperty(this._property,`${r}px`),this._visible=!0}}toggle(e=!this._visible){e?this.show():this.hide()}addTrigger(e){e.addEventListener("click",(e=>{e.preventDefault(),this.toggle()}))}static initialize(e=document.body){for(const t of e.querySelectorAll("[data-bs-toggle]"))if(t instanceof HTMLElement&&"bsTarget"in t.dataset){const r=e.querySelector(t.dataset.bsTarget);r&&a(r,e).addTrigger(t)}}}const o=new WeakMap,a=(l=o,h=(e,t)=>new n(e,t),(e,...t)=>{l.has(e)||l.set(e,h(e,...t));const r=l.get(e);return s()(r,"value"),r});var l,h;const c=new WeakMap},17136:(e,t,r)=>{"use strict";function i(e){return e.map((e=>[e[0],`rgb(${e[1][0]}, ${e[1][1]}, ${e[1][2]})`]))}r.d(t,{s:()=>s});const s={inferno:i([[0,[0,0,3]],[.0159,[1,1,9]],[.0317,[3,2,18]],[.0476,[6,4,27]],[.0635,[10,7,35]],[.0794,[15,9,45]],[.0952,[20,11,54]],[.1111,[26,11,64]],[.127,[32,12,74]],[.1429,[39,11,82]],[.1587,[46,10,90]],[.1746,[53,9,96]],[.1905,[60,9,101]],[.2063,[67,10,104]],[.2222,[74,11,106]],[.2381,[80,13,108]],[.254,[88,16,109]],[.2698,[95,18,110]],[.2857,[101,21,110]],[.3016,[107,23,110]],[.3175,[114,25,109]],[.3333,[120,28,109]],[.3492,[126,30,108]],[.3651,[133,32,106]],[.381,[139,34,105]],[.3968,[145,37,103]],[.4127,[152,39,101]],[.4286,[158,41,99]],[.4444,[164,44,96]],[.4603,[171,46,93]],[.4762,[177,49,90]],[.4921,[183,52,86]],[.5079,[190,56,82]],[.5238,[196,60,78]],[.5397,[201,63,74]],[.5556,[207,68,70]],[.5714,[212,72,65]],[.5873,[217,77,61]],[.6032,[221,82,56]],[.619,[226,87,51]],[.6349,[230,92,46]],[.6508,[233,98,42]],[.6667,[237,104,37]],[.6825,[240,111,31]],[.6984,[242,117,26]],[.7143,[245,124,21]],[.7302,[247,131,16]],[.746,[248,138,11]],[.7619,[250,147,6]],[.7778,[251,155,6]],[.7937,[251,162,8]],[.8095,[251,170,14]],[.8254,[251,177,22]],[.8413,[251,185,30]],[.8571,[250,193,40]],[.873,[248,201,49]],[.8889,[247,209,60]],[.9048,[245,217,72]],[.9206,[243,224,86]],[.9365,[241,232,100]],[.9524,[241,238,116]],[.9683,[242,244,133]],[.9841,[246,250,149]],[1,[252,254,164]]]),magma:i([[0,[0,0,3]],[.0159,[1,1,9]],[.0317,[3,3,17]],[.0476,[6,5,25]],[.0635,[10,7,34]],[.0794,[14,10,42]],[.0952,[18,13,51]],[.1111,[23,15,60]],[.127,[28,16,70]],[.1429,[34,17,80]],[.1587,[40,17,89]],[.1746,[47,16,98]],[.1905,[53,15,106]],[.2063,[60,15,113]],[.2222,[67,15,117]],[.2381,[74,16,121]],[.254,[82,18,124]],[.2698,[88,21,126]],[.2857,[94,23,127]],[.3016,[101,26,128]],[.3175,[107,28,128]],[.3333,[113,31,129]],[.3492,[119,33,129]],[.3651,[126,36,129]],[.381,[132,38,129]],[.3968,[138,40,129]],[.4127,[145,42,128]],[.4286,[151,44,127]],[.4444,[158,46,126]],[.4603,[164,48,125]],[.4762,[171,51,124]],[.4921,[177,53,122]],[.5079,[185,55,120]],[.5238,[192,58,117]],[.5397,[198,60,115]],[.5556,[205,63,112]],[.5714,[211,66,109]],[.5873,[217,70,106]],[.6032,[222,74,103]],[.619,[228,78,100]],[.6349,[232,84,97]],[.6508,[237,89,95]],[.6667,[240,96,93]],[.6825,[243,103,91]],[.6984,[246,110,91]],[.7143,[248,117,92]],[.7302,[249,125,93]],[.746,[251,132,96]],[.7619,[252,142,99]],[.7778,[253,149,103]],[.7937,[253,157,107]],[.8095,[253,164,112]],[.8254,[254,172,117]],[.8413,[254,179,123]],[.8571,[254,187,128]],[.873,[254,194,134]],[.8889,[254,201,141]],[.9048,[253,209,147]],[.9206,[253,216,154]],[.9365,[253,223,161]],[.9524,[252,230,168]],[.9683,[252,238,176]],[.9841,[252,245,183]],[1,[251,252,191]]]),plasma:i([[0,[12,7,134]],[.0159,[24,6,139]],[.0317,[33,5,143]],[.0476,[41,5,147]],[.0635,[49,4,150]],[.0794,[56,4,153]],[.0952,[63,3,156]],[.1111,[69,3,158]],[.127,[76,2,161]],[.1429,[82,1,163]],[.1587,[89,1,164]],[.1746,[95,0,166]],[.1905,[101,0,167]],[.2063,[108,0,168]],[.2222,[114,0,168]],[.2381,[120,1,168]],[.254,[127,3,167]],[.2698,[133,6,166]],[.2857,[139,9,164]],[.3016,[144,14,163]],[.3175,[150,18,160]],[.3333,[155,23,158]],[.3492,[160,27,155]],[.3651,[165,31,151]],[.381,[170,36,148]],[.3968,[175,40,144]],[.4127,[180,45,141]],[.4286,[184,50,137]],[.4444,[188,54,133]],[.4603,[192,59,129]],[.4762,[196,63,126]],[.4921,[200,68,122]],[.5079,[205,73,117]],[.5238,[209,78,114]],[.5397,[212,82,110]],[.5556,[215,87,107]],[.5714,[219,91,103]],[.5873,[222,96,100]],[.6032,[225,101,96]],[.619,[228,106,93]],[.6349,[231,110,90]],[.6508,[234,115,86]],[.6667,[236,120,83]],[.6825,[239,125,79]],[.6984,[241,130,76]],[.7143,[243,135,72]],[.7302,[245,141,69]],[.746,[247,146,65]],[.7619,[249,153,61]],[.7778,[250,159,58]],[.7937,[251,164,54]],[.8095,[252,170,51]],[.8254,[253,176,48]],[.8413,[253,182,45]],[.8571,[253,188,42]],[.873,[253,195,40]],[.8889,[252,201,38]],[.9048,[251,208,36]],[.9206,[250,214,36]],[.9365,[248,221,36]],[.9524,[246,228,37]],[.9683,[244,234,38]],[.9841,[242,241,38]],[1,[239,248,33]]]),viridis:i([[0,[68,1,84]],[.0159,[69,6,90]],[.0317,[70,12,95]],[.0476,[71,18,101]],[.0635,[71,24,106]],[.0794,[72,29,111]],[.0952,[72,34,115]],[.1111,[71,39,119]],[.127,[71,44,123]],[.1429,[70,49,126]],[.1587,[69,54,129]],[.1746,[67,59,131]],[.1905,[66,64,133]],[.2063,[64,68,135]],[.2222,[62,73,137]],[.2381,[60,77,138]],[.254,[58,83,139]],[.2698,[56,87,140]],[.2857,[54,91,140]],[.3016,[52,95,141]],[.3175,[50,99,141]],[.3333,[48,103,141]],[.3492,[46,107,142]],[.3651,[45,111,142]],[.381,[43,115,142]],[.3968,[42,119,142]],[.4127,[40,122,142]],[.4286,[39,126,142]],[.4444,[37,130,142]],[.4603,[36,134,141]],[.4762,[34,137,141]],[.4921,[33,141,140]],[.5079,[31,146,140]],[.5238,[31,150,139]],[.5397,[30,153,138]],[.5556,[30,157,136]],[.5714,[31,161,135]],[.5873,[32,165,133]],[.6032,[35,168,131]],[.619,[38,172,129]],[.6349,[42,176,126]],[.6508,[47,179,123]],[.6667,[53,183,120]],[.6825,[59,186,117]],[.6984,[66,190,113]],[.7143,[73,193,109]],[.7302,[81,196,104]],[.746,[89,199,100]],[.7619,[100,203,93]],[.7778,[109,206,88]],[.7937,[119,208,82]],[.8095,[129,211,76]],[.8254,[139,213,70]],[.8413,[149,215,63]],[.8571,[159,217,56]],[.873,[170,219,50]],[.8889,[181,221,43]],[.9048,[191,223,36]],[.9206,[202,224,30]],[.9365,[212,225,26]],[.9524,[223,227,24]],[.9683,[233,228,25]],[.9841,[243,229,30]],[1,[253,231,36]]]),cividis:i([[0,[0,34,77]],[.0159,[0,37,84]],[.0317,[0,40,91]],[.0476,[0,42,98]],[.0635,[0,45,105]],[.0794,[0,48,112]],[.0952,[4,50,112]],[.1111,[17,53,111]],[.127,[26,56,111]],[.1429,[33,59,110]],[.1587,[39,61,109]],[.1746,[44,64,109]],[.1905,[49,67,108]],[.2063,[54,70,108]],[.2222,[58,72,107]],[.2381,[63,75,107]],[.254,[68,79,107]],[.2698,[72,81,107]],[.2857,[76,84,108]],[.3016,[79,87,108]],[.3175,[83,90,108]],[.3333,[87,93,109]],[.3492,[90,95,109]],[.3651,[94,98,110]],[.381,[97,101,111]],[.3968,[101,104,112]],[.4127,[104,107,113]],[.4286,[108,109,114]],[.4444,[111,112,115]],[.4603,[115,115,116]],[.4762,[118,118,118]],[.4921,[121,121,119]],[.5079,[126,125,120]],[.5238,[130,128,120]],[.5397,[133,131,120]],[.5556,[137,134,120]],[.5714,[141,137,120]],[.5873,[145,140,119]],[.6032,[149,143,119]],[.619,[153,146,118]],[.6349,[157,149,117]],[.6508,[161,152,116]],[.6667,[165,155,115]],[.6825,[169,158,114]],[.6984,[173,162,113]],[.7143,[177,165,112]],[.7302,[181,168,110]],[.746,[185,171,109]],[.7619,[190,176,106]],[.7778,[195,179,104]],[.7937,[199,182,102]],[.8095,[203,186,100]],[.8254,[207,189,97]],[.8413,[212,193,94]],[.8571,[216,196,91]],[.873,[220,200,88]],[.8889,[225,204,84]],[.9048,[229,207,80]],[.9206,[234,211,76]],[.9365,[238,215,71]],[.9524,[243,218,66]],[.9683,[248,222,59]],[.9841,[253,226,52]],[1,[253,231,55]]]),seismic:i([[0,[0,0,77]],[.0159,[0,0,88]],[.0317,[0,0,99]],[.0476,[0,0,111]],[.0635,[0,0,122]],[.0794,[0,0,133]],[.0952,[0,0,144]],[.1111,[0,0,156]],[.127,[0,0,167]],[.1429,[0,0,178]],[.1587,[0,0,189]],[.1746,[0,0,200]],[.1905,[0,0,212]],[.2063,[0,0,223]],[.2222,[0,0,234]],[.2381,[0,0,245]],[.254,[5,5,255]],[.2698,[21,21,255]],[.2857,[37,37,255]],[.3016,[53,53,255]],[.3175,[69,69,255]],[.3333,[85,85,255]],[.3492,[101,101,255]],[.3651,[117,117,255]],[.381,[134,134,255]],[.3968,[150,150,255]],[.4127,[166,166,255]],[.4286,[182,182,255]],[.4444,[198,198,255]],[.4603,[214,214,255]],[.4762,[230,230,255]],[.4921,[246,246,255]],[.5079,[255,246,246]],[.5238,[255,230,230]],[.5397,[255,214,214]],[.5556,[255,198,198]],[.5714,[255,182,182]],[.5873,[255,166,166]],[.6032,[255,150,150]],[.619,[255,134,134]],[.6349,[255,117,117]],[.6508,[255,101,101]],[.6667,[255,85,85]],[.6825,[255,69,69]],[.6984,[255,53,53]],[.7143,[255,37,37]],[.7302,[255,21,21]],[.746,[255,5,5]],[.7619,[248,0,0]],[.7778,[240,0,0]],[.7937,[232,0,0]],[.8095,[224,0,0]],[.8254,[216,0,0]],[.8413,[208,0,0]],[.8571,[200,0,0]],[.873,[192,0,0]],[.8889,[184,0,0]],[.9048,[176,0,0]],[.9206,[168,0,0]],[.9365,[160,0,0]],[.9524,[152,0,0]],[.9683,[144,0,0]],[.9841,[136,0,0]],[1,[128,0,0]]]),brg:i([[0,[0,0,255]],[.0159,[8,0,248]],[.0317,[16,0,240]],[.0476,[24,0,232]],[.0635,[32,0,224]],[.0794,[40,0,216]],[.0952,[48,0,208]],[.1111,[56,0,200]],[.127,[64,0,192]],[.1429,[72,0,184]],[.1587,[80,0,176]],[.1746,[88,0,168]],[.1905,[96,0,160]],[.2063,[104,0,152]],[.2222,[112,0,144]],[.2381,[120,0,136]],[.254,[131,0,125]],[.2698,[139,0,117]],[.2857,[147,0,109]],[.3016,[155,0,101]],[.3175,[163,0,93]],[.3333,[171,0,85]],[.3492,[179,0,77]],[.3651,[187,0,69]],[.381,[195,0,61]],[.3968,[203,0,53]],[.4127,[211,0,45]],[.4286,[219,0,37]],[.4444,[227,0,29]],[.4603,[235,0,21]],[.4762,[243,0,13]],[.4921,[251,0,5]],[.5079,[251,5,0]],[.5238,[243,13,0]],[.5397,[235,21,0]],[.5556,[227,29,0]],[.5714,[219,37,0]],[.5873,[211,45,0]],[.6032,[203,53,0]],[.619,[195,61,0]],[.6349,[187,69,0]],[.6508,[179,77,0]],[.6667,[171,85,0]],[.6825,[163,93,0]],[.6984,[155,101,0]],[.7143,[147,109,0]],[.7302,[139,117,0]],[.746,[131,125,0]],[.7619,[120,136,0]],[.7778,[112,144,0]],[.7937,[104,152,0]],[.8095,[96,160,0]],[.8254,[88,168,0]],[.8413,[80,176,0]],[.8571,[72,184,0]],[.873,[64,192,0]],[.8889,[56,200,0]],[.9048,[48,208,0]],[.9206,[40,216,0]],[.9365,[32,224,0]],[.9524,[24,232,0]],[.9683,[16,240,0]],[.9841,[8,248,0]],[1,[0,255,0]]]),bwr:i([[0,[0,0,255]],[.01587,[8,8,255]],[.03175,[16,16,255]],[.04762,[24,24,255]],[.06349,[32,32,255]],[.07937,[40,40,255]],[.09524,[48,48,255]],[.1111,[56,56,255]],[.127,[64,64,255]],[.1429,[72,72,255]],[.1587,[80,80,255]],[.1746,[89,89,255]],[.1905,[97,97,255]],[.2063,[105,105,255]],[.2222,[113,113,255]],[.2381,[121,121,255]],[.254,[129,129,255]],[.2698,[137,137,255]],[.2857,[145,145,255]],[.3016,[153,153,255]],[.3175,[161,161,255]],[.3333,[170,170,255]],[.3492,[178,178,255]],[.3651,[186,186,255]],[.381,[194,194,255]],[.3968,[202,202,255]],[.4127,[210,210,255]],[.4286,[218,218,255]],[.4444,[226,226,255]],[.4603,[234,234,255]],[.4762,[242,242,255]],[.4921,[250,250,255]],[.5079,[255,250,250]],[.5238,[254,242,242]],[.5397,[255,234,234]],[.5556,[255,226,226]],[.5714,[255,218,218]],[.5873,[254,210,210]],[.6032,[255,202,202]],[.619,[255,194,194]],[.6349,[255,186,186]],[.6508,[254,178,178]],[.6667,[255,170,170]],[.6825,[255,161,161]],[.6984,[255,153,153]],[.7143,[254,145,145]],[.7302,[255,137,137]],[.746,[255,129,129]],[.7619,[255,121,121]],[.7778,[255,113,113]],[.7937,[255,105,105]],[.8095,[255,97,97]],[.8254,[255,89,89]],[.8413,[255,80,80]],[.8571,[255,72,72]],[.873,[255,64,64]],[.8889,[255,56,56]],[.9048,[255,48,48]],[.9206,[255,40,40]],[.9365,[255,32,32]],[.9524,[255,24,24]],[.9683,[255,16,16]],[.9841,[255,8,8]],[1,[255,0,0]]]),rwg:i([[0,[200,0,0]],[.01587,[201,8,8]],[.03175,[203,16,16]],[.04762,[205,24,24]],[.06349,[206,32,32]],[.07937,[208,40,40]],[.09524,[210,48,48]],[.1111,[212,56,56]],[.127,[213,64,64]],[.1429,[215,72,72]],[.1587,[217,80,80]],[.1746,[219,89,89]],[.1905,[220,97,97]],[.2063,[222,105,105]],[.2222,[224,113,113]],[.2381,[226,121,121]],[.254,[227,129,129]],[.2698,[229,137,137]],[.2857,[231,145,145]],[.3016,[233,153,153]],[.3175,[234,161,161]],[.3333,[236,170,170]],[.3492,[238,178,178]],[.3651,[240,186,186]],[.381,[241,194,194]],[.3968,[243,202,202]],[.4127,[245,210,210]],[.4286,[247,218,218]],[.4444,[248,226,226]],[.4603,[250,234,234]],[.4762,[252,242,242]],[.4921,[254,250,250]],[.5079,[250,252,250]],[.5238,[242,248,242]],[.5397,[234,244,234]],[.5556,[226,240,226]],[.5714,[218,236,218]],[.5873,[210,232,210]],[.6032,[202,228,202]],[.619,[194,224,194]],[.6349,[186,220,186]],[.6508,[178,216,178]],[.6667,[170,212,170]],[.6825,[161,208,161]],[.6984,[153,204,153]],[.7143,[145,200,145]],[.7302,[137,196,137]],[.746,[129,192,129]],[.7619,[121,188,121]],[.7778,[113,184,113]],[.7937,[105,180,105]],[.8095,[97,176,97]],[.8254,[89,172,89]],[.8413,[80,168,80]],[.8571,[72,164,72]],[.873,[64,160,64]],[.8889,[56,156,56]],[.9048,[48,152,48]],[.9206,[40,148,40]],[.9365,[32,144,32]],[.9524,[24,140,24]],[.9683,[16,136,16]],[.9841,[8,132,8]],[1,[0,128,0]]]),"twilight (periodic)":i([[0,[225,216,226]],[.0159,[221,217,224]],[.0317,[214,214,220]],[.0476,[205,210,216]],[.0635,[194,205,211]],[.0794,[182,199,207]],[.0952,[170,193,203]],[.1111,[158,187,200]],[.127,[147,180,198]],[.1429,[137,172,196]],[.1587,[128,165,195]],[.1746,[119,156,193]],[.1905,[112,149,192]],[.2063,[107,141,191]],[.2222,[102,132,189]],[.2381,[99,124,187]],[.254,[97,115,185]],[.2698,[96,106,183]],[.2857,[95,97,180]],[.3016,[94,87,176]],[.3175,[94,78,171]],[.3333,[93,67,164]],[.3492,[92,57,157]],[.3651,[90,48,149]],[.381,[88,39,139]],[.3968,[84,31,127]],[.4127,[79,25,114]],[.4286,[73,21,100]],[.4444,[66,18,87]],[.4603,[59,17,75]],[.4762,[54,16,65]],[.4921,[50,17,58]],[.5079,[49,18,55]],[.5238,[55,17,56]],[.5397,[62,17,60]],[.5556,[70,18,64]],[.5714,[80,20,68]],[.5873,[90,22,72]],[.6032,[101,25,75]],[.619,[111,28,78]],[.6349,[122,32,79]],[.6508,[131,37,80]],[.6667,[141,44,80]],[.6825,[150,50,79]],[.6984,[157,58,79]],[.7143,[164,66,79]],[.7302,[170,75,80]],[.746,[176,84,81]],[.7619,[181,93,83]],[.7778,[186,102,87]],[.7937,[190,112,91]],[.8095,[193,121,96]],[.8254,[196,131,104]],[.8413,[199,142,113]],[.8571,[201,152,123]],[.873,[203,162,135]],[.8889,[206,171,148]],[.9048,[209,180,161]],[.9206,[212,189,175]],[.9365,[216,197,188]],[.9524,[219,205,201]],[.9683,[222,211,212]],[.9841,[224,215,220]],[1,[225,216,225]]]),"twilight dark (periodic)":i([[0,[47,19,55]],[.0159,[51,17,61]],[.0317,[56,16,70]],[.0476,[62,17,81]],[.0635,[69,19,93]],[.0794,[76,22,107]],[.0952,[82,27,120]],[.1111,[86,34,133]],[.127,[89,43,144]],[.1429,[91,52,153]],[.1587,[93,62,161]],[.1746,[93,73,168]],[.1905,[94,83,173]],[.2063,[94,92,178]],[.2222,[95,101,181]],[.2381,[96,110,184]],[.254,[98,119,186]],[.2698,[101,128,188]],[.2857,[104,136,190]],[.3016,[109,145,191]],[.3175,[115,153,193]],[.3333,[124,161,194]],[.3492,[132,169,195]],[.3651,[142,176,197]],[.381,[152,183,199]],[.3968,[164,190,202]],[.4127,[176,196,205]],[.4286,[188,202,209]],[.4444,[199,208,214]],[.4603,[210,213,218]],[.4762,[217,216,222]],[.4921,[223,217,225]],[.5079,[225,216,223]],[.5238,[223,213,216]],[.5397,[221,208,207]],[.5556,[217,201,195]],[.5714,[214,193,181]],[.5873,[210,185,168]],[.6032,[207,176,154]],[.619,[204,167,141]],[.6349,[202,157,129]],[.6508,[200,147,118]],[.6667,[197,136,108]],[.6825,[195,126,100]],[.6984,[192,116,93]],[.7143,[188,107,89]],[.7302,[184,97,85]],[.746,[179,88,82]],[.7619,[173,79,80]],[.7778,[167,70,79]],[.7937,[161,62,79]],[.8095,[154,54,79]],[.8254,[146,47,79]],[.8413,[136,40,80]],[.8571,[127,34,80]],[.873,[117,30,79]],[.8889,[106,26,77]],[.9048,[95,23,74]],[.9206,[85,21,70]],[.9365,[75,19,66]],[.9524,[66,17,61]],[.9683,[58,17,58]],[.9841,[52,17,55]],[1,[47,20,54]]]),"hsv (periodic)":i([[0,[165,38,38]],[.0159,[172,57,45]],[.0317,[179,76,52]],[.0476,[187,94,59]],[.0635,[194,113,66]],[.0794,[201,132,73]],[.0952,[208,151,80]],[.1111,[215,170,87]],[.127,[222,189,94]],[.1429,[229,208,102]],[.1587,[236,227,109]],[.1746,[237,239,113]],[.1905,[223,237,110]],[.2063,[208,234,106]],[.2222,[193,230,103]],[.2381,[177,227,99]],[.254,[158,222,95]],[.2698,[143,219,91]],[.2857,[127,215,88]],[.3016,[112,212,84]],[.3175,[97,208,81]],[.3333,[81,205,77]],[.3492,[77,204,85]],[.3651,[78,205,98]],[.381,[79,207,111]],[.3968,[80,208,124]],[.4127,[82,209,137]],[.4286,[83,210,150]],[.4444,[84,211,163]],[.4603,[85,213,176]],[.4762,[86,214,189]],[.4921,[87,215,202]],[.5079,[88,214,215]],[.5238,[81,195,208]],[.5397,[74,176,201]],[.5556,[67,157,194]],[.5714,[60,138,187]],[.5873,[52,120,180]],[.6032,[45,101,173]],[.619,[38,82,166]],[.6349,[31,63,159]],[.6508,[24,44,152]],[.6667,[17,25,145]],[.6825,[17,14,141]],[.6984,[33,17,144]],[.7143,[48,20,148]],[.7302,[63,24,152]],[.746,[79,28,155]],[.7619,[98,32,160]],[.7778,[113,36,163]],[.7937,[129,39,167]],[.8095,[144,43,170]],[.8254,[159,46,174]],[.8413,[173,49,176]],[.8571,[177,50,168]],[.873,[176,48,155]],[.8889,[175,47,142]],[.9048,[174,46,129]],[.9206,[172,45,116]],[.9365,[171,44,103]],[.9524,[170,42,90]],[.9683,[169,41,77]],[.9841,[168,40,64]],[1,[166,39,51]]])}},50112:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});class i{constructor(e){this._element=e,this._activeElement=null,this._open=!1;const t=document.createElement("div");document.body.appendChild(t),this.shadow=t.attachShadow({mode:"open"}),this.shadow.appendChild(this._element),this._backdrop=document.createElement("div"),this._backdrop.classList.add("modal-backdrop","fade"),this._element.addEventListener("click",(e=>{e.target===e.currentTarget&&this.close()}));for(const e of this._element.querySelectorAll('[data-bs-dismiss="modal"]'))e.addEventListener("click",(()=>{this.close()}));document.addEventListener("keydown",(e=>{"Escape"===e.key&&(e.preventDefault(),this.close())})),this._element.addEventListener("transitionend",(e=>{e.target!==e.currentTarget||this._open||this._element.style.setProperty("display","none")})),this._backdrop.addEventListener("transitionend",(()=>{this._open||(this._backdrop.remove(),this._activeElement&&this._activeElement instanceof HTMLElement&&this._activeElement.focus(),this._activeElement=null)}))}close(){this._backdrop.classList.remove("show"),this._element.classList.remove("show"),this._open=!1}open(){this._element.getRootNode().appendChild(this._backdrop),this._element.style.setProperty("display","block"),this._element.offsetHeight,this._backdrop.classList.add("show"),this._element.classList.add("show"),this._activeElement=s(),this._activeElement&&this._activeElement instanceof HTMLElement&&this._activeElement.blur(),this._open=!0}toggle(e=!this.open){e?this.open():this.close()}remove(){this.shadow.host.remove()}}function s(e=document){const t=e.activeElement;return(null==t?void 0:t.shadowRoot)?s(t.shadowRoot):t}},45127:(e,t,r)=>{"use strict";r.d(t,{Je:()=>a,W2:()=>l,qP:()=>o});var i=r(34961),s=r.n(i),n=r(91683);function o(e,t=""){return r=>{if(!e.includes(r))throw Error(`invalid property '${r}' for ${t}, are you sure the settings correspond to the current dataset?`)}}class a{constructor(e,t){this.type=e,this._value=t,this._previous_value=t,this._boundList=[],this.validate=()=>{},this.onchange=[],Object.preventExtensions(this)}get value(){return this._value}set value(e){this._update(e.toString(),"JS")}changed(e){for(const e of this._boundList)if("multival"===e.attribute){const t=this._value.split(","),r=e.element;for(const e of r.options)e.selected=t.includes(e.value)}else e.element[e.attribute]=this._value;for(const t of this.onchange)t(this._value,e)}reset(){this.value=this._previous_value}bind(e,t){let r;if("string"==typeof e&&(e=(0,n.VT)(e)),"multival"===t){r=e=>{s()(null!==e.target,"event.target !== null");const t=e.target,r=Array.from(t.options).filter((e=>e.selected)).map((e=>e.value));this._update(r.toString(),"DOM")};const t=this._value.split(",");for(const r of e.options)r.selected=t.includes(r.value)}else r=e=>{s()(null!==e.target,"event.target !== null"),this._update(e.target[t].toString(),"DOM")},e[t]=this._value;e.addEventListener("change",r),this._boundList.push({element:e,attribute:t,listener:r})}disable(){for(const e of this._boundList){const t=e.element;"disabled"in t&&(t.disabled=!0)}}enable(){for(const e of this._boundList){const t=e.element;"disabled"in t&&(t.disabled=!1)}}unbindAll(){for(const e of this._boundList)e.element.removeEventListener("change",e.listener);this._boundList=[]}_update(e,t){const r=function(e,t){if("string"===e)return t;if("int"===e)return parseInt(t,10);if("number"===e)return parseFloat(t);if("boolean"===e){if("false"===t)return!1;if("true"===t)return!0;throw Error(`invalid value for boolean: ${t}`)}throw Error(`unknown type '${e}' passed to parse`)}(this.type,e);this._value!==r&&(this.validate(r),this._previous_value=this.value,this._value=r,this.changed(t))}}class l{saveSettings(){const e={};return this.foreachOption(((t,r)=>{s()(t.length>=1,"keys.length >= 1");const i=r.value;if(void 0!==i||null!==i||!Number.isNaN(i)){let r=e;for(const e of t.slice(0,t.length-1))e in r||(r[e]={}),r=r[e];r[t[t.length-1]]=i}})),e}applySettings(e){const t=JSON.parse(JSON.stringify(e));this.foreachOption(((e,r)=>{s()(e.length>=1,"keys.length >= 1");let i,o=t;for(const t of e.slice(0,e.length-1)){if(!(t in o))return;i=o,o=o[t]}const a=e[e.length-1];if(a in o){const t=o[a];if(null==t||Number.isNaN(t))return void(0,n.R4)(`ignored setting '${a}' with invalid value '${t}'`);r.value=t,delete o[a],void 0!==i&&0===Object.keys(o).length&&(s()(e.length>=2,"keys.length >= 2"),delete i[e[e.length-2]])}})),0!==Object.keys(t).length&&(0,n.R4)(`ignored unknown settings '${JSON.stringify(t)}'`)}onSettingChange(e){this.foreachOption(((t,r)=>{r.onchange.push((r=>e(t,r)))}))}foreachOption(e){h(this,e,[])}}function h(e,t,r=[]){if(r.length>10)throw Error("setting object is too deep");for(const i in e){if(i.startsWith("_"))continue;const s=r.concat([i]),n=e[i];n instanceof a?t(s,n):"object"==typeof n&&null!==n&&h(n,t,s)}}},59838:(e,t,r)=>{"use strict";r.d(t,{O:()=>u});var i=r(34961),s=r.n(i),n=r(88862),o=r(50112),a=r(45127),l=r(91683),h=r(17136),c=r(90170);class u extends a.W2{constructor(e,t,r=[]){super(),this.bonds=new a.Je("boolean",!0),this.atoms=new a.Je("boolean",!0),this.spaceFilling=new a.Je("boolean",!1),this.atomLabels=new a.Je("boolean",!1),this.shape=new a.Je("string",""),this.unitCell=new a.Je("boolean",!1),this.rotation=new a.Je("boolean",!1),this.supercell=[new a.Je("int",1),new a.Je("int",1),new a.Je("int",1)];const i=e=>{if(!(Number.isInteger(e)&&e>0))throw Error("supercell count should be a positive integer")};this.supercell[0].validate=i,this.supercell[1].validate=i,this.supercell[2].validate=i,this.axes=new a.Je("string","off"),this.axes.validate=(0,a.qP)(["off","abc","xyz"],"axes"),this.keepOrientation=new a.Je("boolean",!1),this.playbackDelay=new a.Je("number",700),this.environments={activated:new a.Je("boolean",!0),bgColor:new a.Je("string","grey"),bgStyle:new a.Je("string","ball-stick"),center:new a.Je("boolean",!1),cutoff:new a.Je("number",4)},this.color={property:new a.Je("string","element"),min:new a.Je("number",0),max:new a.Je("number",0),transform:new a.Je("string","linear"),palette:new a.Je("string","bwr")},r.includes("element")?this.color.property.validate=(0,a.qP)(r,"color"):this.color.property.validate=(0,a.qP)(r.concat(["element"]),"color"),this.color.transform.validate=(0,a.qP)(["linear","log","sqrt","inverse"],"transform"),this.color.palette.validate=(0,a.qP)(Object.keys(h.s),"palette"),this.environments.bgColor.validate=(0,a.qP)(["grey","CPK","property"],"background atoms coloring"),this.environments.bgStyle.validate=(0,a.qP)(["ball-stick","licorice","hide"],"background atoms style"),this.environments.cutoff.validate=e=>{if(e<0)throw Error("cutoff should be a positive number")},this._positionSettingsModal=t;const{openModal:s,modal:n}=this._createSettingsHTML();this._modal=n,this._modal.shadow.adoptedStyleSheets=e.getRootNode().adoptedStyleSheets,this._openModal=s,e.appendChild(this._openModal),this._bind(r)}getModalElement(e){return(0,l.VT)(e,this._modal.shadow)}get modal(){return this._modal}remove(){this._modal.remove(),this._openModal.remove()}applySettings(e){"packedCell"in e&&(!1!==e.packedCell&&(0,l.R4)("packedCell option has been removed, but it is set to true in the settings"),delete e.packedCell),super.applySettings(e)}_createSettingsHTML(){const e=document.createElement("template");e.innerHTML=`\n
${c.A}
\n `;const t=e.content.firstChild;e.innerHTML='\n';const r=e.content.querySelector(".modal");s()(null!==r&&r instanceof HTMLElement,"modalElement !== null && modalElement instanceof HTMLElement");const i=r.querySelector(".modal-dialog");s()(null!==i&&i instanceof HTMLElement,"modalDialog !== null && modalDialog instanceof HTMLElement"),t.addEventListener("click",(()=>{if(null===i.getAttribute("data-initial-modal-positions-set")){i.setAttribute("data-initial-modal-positions-set","true"),i.parentNode.style.display="block";const{top:e,left:t}=this._positionSettingsModal(i.getBoundingClientRect());i.style.width=i.offsetWidth/1.5+"px",i.style.minWidth="500px",i.style.margin="0",i.style.position="fixed",i.style.top=`${e}px`,i.style.left=`${t}px`}a.open()})),(0,l.eB)(i,".modal-header"),r.addEventListener("keydown",(e=>e.stopPropagation()));const a=new o.A(r);return n.A.initialize(r),{modal:a,openModal:t}}_bind(e){this.atomLabels.bind(this.getModalElement("atom-labels"),"checked");const t=this.getModalElement("shapes");this.shape.bind(t,"multival"),this.spaceFilling.bind(this.getModalElement("space-filling"),"checked"),this.bonds.bind(this.getModalElement("bonds"),"checked"),this.atoms.bind(this.getModalElement("atoms"),"checked"),this.rotation.bind(this.getModalElement("rotation"),"checked"),this.unitCell.bind(this.getModalElement("unit-cell"),"checked"),this.supercell[0].bind(this.getModalElement("supercell-a"),"value"),this.supercell[1].bind(this.getModalElement("supercell-b"),"value"),this.supercell[2].bind(this.getModalElement("supercell-c"),"value");const r=this.getModalElement("atom-color-property");r.options.length=0,e.includes("element")||r.options.add(new Option("element","element"));for(const t of e)r.options.add(new Option(t,t));this.color.property.bind(r,"value"),this.color.transform.bind(this.getModalElement("atom-color-transform"),"value"),this.color.min.bind(this.getModalElement("atom-color-min"),"value"),this.color.max.bind(this.getModalElement("atom-color-max"),"value");const i=this.getModalElement("atom-color-palette");i.options.length=0;for(const e in h.s)i.options.add(new Option(e,e));this.color.palette.bind(i,"value"),this.axes.bind(this.getModalElement("axes"),"value"),this.keepOrientation.bind(this.getModalElement("keep-orientation"),"checked"),this.playbackDelay.bind(this.getModalElement("playback-delay"),"value"),this.environments.activated.bind(this.getModalElement("env-activated"),"checked"),this.environments.bgColor.bind(this.getModalElement("env-bg-color"),"value"),this.environments.bgStyle.bind(this.getModalElement("env-bg-style"),"value"),this.environments.cutoff.bind(this.getModalElement("env-cutoff"),"value"),this.environments.center.bind(this.getModalElement("env-center"),"checked")}}},14761:(e,t,r)=>{"use strict";r.d(t,{C1:()=>b,N2:()=>S,Nh:()=>w,T:()=>_,i3:()=>y,iy:()=>v});var i=r(34961),s=r.n(i),n=r(37821);function o(e,t){return{x:e.x+t.x,y:e.y+t.y,z:e.z+t.z}}function a(e,t){return{x:e.x-t.x,y:e.y-t.y,z:e.z-t.z}}function l(e,t){return{x:e.x*t,y:e.y*t,z:e.z*t}}function h(e,t){return e.x*t.x+e.y*t.y+e.z*t.z}function c(e,t){return{x:e.y*t.z-e.z*t.y,y:e.z*t.x-e.x*t.z,z:e.x*t.y-e.y*t.x}}function u(e,t,r){const i=new n.Quaternion(e.x,e.y,e.z,0);return i.multiplyQuaternions(t.clone(),i),i.multiply(t.clone().inverse()),o({x:i.x,y:i.y,z:i.z},r)}function d(e,t){const r=[],i=[];for(let t=0;t1e-6)throw Error(`orientation must be normalized to 1 for "${t}" shapes`);return""}function g(e){return"number"==typeof e&&Number.isInteger(e)&&e>=0}class v extends p{constructor(e){super(e),this.radius=(e.radius||1)*this.scale}static validateParameters(e){return"radius"in e?"orientation"in e?'"orientation" has no effect on a sphere shape':"number"!=typeof e.radius?'"radius" must be a number in "sphere" shape':"":'"radius" is required for "sphere" shapes'}outputTo3Dmol(e,t=20){const r=f([this.radius,this.radius,this.radius],t),i=r.vertices,s=r.indices,n=[],a=[];for(const e of i){const t=o(e,this.position);n.push(t);const r={x:e.x/Math.pow(this.radius,2),y:e.y/Math.pow(this.radius,2),z:e.z/Math.pow(this.radius,2)};a.push(r)}return{vertexArr:n,normalArr:a,faceArr:s,color:e}}}class b extends p{constructor(e){super(e),s()(e.semiaxes,"data.semiaxes"),this.semiaxes=[this.scale*e.semiaxes[0],this.scale*e.semiaxes[1],this.scale*e.semiaxes[2]]}static validateParameters(e){if(!("semiaxes"in e))return'"semiaxes" is required for "ellipsoid" shapes';if(!Array.isArray(e.semiaxes)||3!==e.semiaxes.length)return'"semiaxes" must be an array with 3 elements for "ellipsoid" shapes';const[t,r,i]=e.semiaxes;if("number"!=typeof t||"number"!=typeof r||"number"!=typeof i)return'"semiaxes" elements must be numbers for "ellipsoid" shapes';if("orientation"in e){const t=m(e.orientation,"ellipsoid");if(""!==t)return t}return""}outputTo3Dmol(e,t=20){const r=f(this.semiaxes,t),i=r.vertices,s=r.indices,n=[],o=[];for(const e of i){const t=u(e,this.orientation,this.position);n.push(t);const r=u({x:e.x/Math.pow(this.semiaxes[0],2),y:e.y/Math.pow(this.semiaxes[1],2),z:e.z/Math.pow(this.semiaxes[2],2)},this.orientation,{x:0,y:0,z:0});o.push(r)}return{vertexArr:n,normalArr:o,faceArr:s,color:e}}}class y extends p{constructor(e){super(e),s()(e.vector,"data.vector"),this.vector=[this.scale*e.vector[0],this.scale*e.vector[1],this.scale*e.vector[2]],this.baseRadius=this.scale*(e.baseRadius||.1),this.headRadius=this.scale*(e.headRadius||.15),this.headLength=this.scale*(e.headLength||.2)}static validateParameters(e){if(!("vector"in e))return'"vector" is required for "arrow" shapes';if(!Array.isArray(e.vector)||3!==e.vector.length)return'"vector" must be an array with 3 elements for "vector" shapes';const[t,r,i]=e.vector;return"number"!=typeof t||"number"!=typeof r||"number"!=typeof i?'"vector" elements must be numbers for "vector" shapes':"orientation"in e?'"orientation" cannot be used on "arrow" shapes. define "vector" instead':""}outputTo3Dmol(e,t=20){const r=function(e,t,r,i,s=20){const[n,a,u]=e,d={x:n,y:a,z:u},p=Math.sqrt(n*n+a*a+u*u);i>p&&(i=p);const f={x:d.x*(1-i/p),y:d.y*(1-i/p),z:d.z*(1-i/p)},m=l(d,1/p);let g;g=0!==m.x||0!==m.y?{x:0,y:0,z:1}:{x:0,y:1,z:0};let v=o(g,l(m,-h(g,m)));v=l(v,1/Math.sqrt(h(v,v)));const b=c(v,m),y=[];for(let e=0;e=x&&(r.addCustom(e),e.vertexArr.length=0,Array.isArray(e.normalArr)&&(e.normalArr.length=0),Array.isArray(e.faceArr)&&(e.faceArr.length=0),Array.isArray(e.color)&&(e.color.length=0)),e.faceArr&&t.faceArr&&e.vertexArr){const r=null!==(i=e.vertexArr.length)&&void 0!==i?i:0,s=t.faceArr.map((e=>e+r));e.faceArr.push(...s)}if(e.vertexArr&&t.vertexArr&&(null===(s=e.vertexArr)||void 0===s||s.push(...t.vertexArr)),e.normalArr&&t.normalArr&&(null===(n=e.normalArr)||void 0===n||n.push(...t.normalArr)),t.vertexArr&&Array.isArray(e.color)){const r=t.color&&!Array.isArray(t.color)?t.color:16777215,i=Array(null!==(o=t.vertexArr.length)&&void 0!==o?o:0).fill(r);e.color.push(...i)}}},91683:(e,t,r)=>{"use strict";r.d(t,{GI:()=>h,VT:()=>l,V6:()=>u,eB:()=>n,R4:()=>a,HB:()=>c});var i=r(34961),s=r.n(i);function n(e,t){const r=e.querySelector(t);if(null===r)throw Error(`no element matching '${t}'`);const i=t=>{const r=e.dragOffset;s()(void 0!==r,"offset !== undefined");const i=t.clientX-r.x,n=t.clientY-r.y;e.style.left=`${i}px`,e.style.top=`${n}px`},n=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",n)};r.addEventListener("mousedown",(t=>{const r=t;e.dragOffset={x:r.clientX-e.offsetLeft,y:r.clientY-e.offsetTop},e.style.left=`${e.offsetLeft}px`,e.style.top=`${e.offsetTop}px`,e.style.width=`${e.offsetWidth}px`,e.style.margin="0",e.style.position="absolute",document.addEventListener("mousemove",i,!1),document.addEventListener("mouseup",n,!1)}),!1)}const o=[e=>console.warn(e)];function a(e){for(const t of o)t(e)}function l(e,t=document){let r;if(r=t instanceof HTMLElement?t.querySelector(`#${e}`):t.getElementById(e),null===r)throw Error(`unable to get element with id ${e}`);return r}function h(e){let t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(const i of e)null!==i&&(i>t&&isFinite(i)&&(t=i),i{"use strict";var i=r(97905),s="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{MoleculeViewer:()=>f});var e=__webpack_require__(34961),t=__webpack_require__.n(e),r=__webpack_require__(37821);const i={H:.37,He:.32,Li:1.34,Be:.9,B:.82,C:.77,N:.75,O:.73,F:.71,Ne:.69,Na:1.54,Mg:1.3,Al:1.18,Si:1.11,P:1.06,S:1.02,Cl:.99,Ar:.97,K:1.96,Ca:1.74,Sc:1.44,Ti:1.56,V:1.25,Mn:1.39,Fe:1.25,Co:1.26,Ni:1.21,Cu:1.38,Zn:1.31,Ga:1.26,Ge:1.22,Se:1.16,Br:1.14,Kr:1.1,Rb:2.11,Sr:1.92,Y:1.62,Zr:1.48,Nb:1.37,Mo:1.45,Tc:1.56,Ru:1.26,Rh:1.35,Pd:1.31,Ag:1.53,Cd:1.48,In:1.44,Sn:1.41,Sb:1.38,Te:1.35,I:1.33,Xe:1.3,Cs:2.25,Ba:1.98,Lu:1.6,Hf:1.5,Ta:1.38,W:1.46,Re:1.59,Os:1.44,Ir:1.37,Pt:1.28,Au:1.44,Hg:1.49,Tl:1.48,Pb:1.47,Bi:1.46,Rn:1.45};function s(e){return i[e]||1.6}function n(e,t){if("X"===e.elem||"X"===t.elem)return!1;let r=s(e.elem)+s(t.elem);r+=.25,r*=r;let i=e.x-t.x;if(i*=i,i>r)return!1;let n=e.y-t.y;if(n*=n,n>r)return!1;let o=e.z-t.z;if(o*=o,o>r)return!1;const a=i+n+o;return!(isNaN(a)||a<.5||a>r)}function o(e,t){for(let r=0;r-1&&-1===navigator.userAgent.indexOf("CriOS")&&-1===navigator.userAgent.indexOf("FxiOS");function p(){return d?.87:.7}class f{constructor(e,i){const s=(0,l.V6)(e),n=document.createElement("div");s.appendChild(n),n.style.setProperty("height","100%"),this._shadow=n.attachShadow({mode:"open"}),this._root=document.createElement("div"),this._shadow.appendChild(this._root),this._root.style.position="relative",this._root.style.width="100%",this._root.style.height="100%";const o=r.createViewer(this._root,{antialias:!0,defaultcolors:r.elementColors.Jmol,backgroundColor:"0xffffff",backgroundAlpha:0,disableFog:!0,orthographic:!0});if(void 0===o)throw Error("unable to create WebGL canvas");this._viewer=o,this.onselect=()=>{},this._cellInfo=document.createElement("span"),this._cellInfo.classList.add("chsp-cell-info","chsp-hide-if-no-cell","badge","bg-light","text-dark"),this._root.appendChild(this._cellInfo);const a=new CSSStyleSheet,h=new CSSStyleSheet,u=new CSSStyleSheet,d=new CSSStyleSheet;this._styles={noCell:a,noEnvs:h,noShape:u,noProperties:d},this._shadow.adoptedStyleSheets=[...s.getRootNode().adoptedStyleSheets,a,h,u,d],this._options=new c.O(this._root,(e=>this.positionSettingsModal(e)),i),this._options.modal.shadow.adoptedStyleSheets=[...this._options.modal.shadow.adoptedStyleSheets,a,h,u,d],this._colorReset=this._options.getModalElement("atom-color-reset"),this._colorMoreOptions=this._options.getModalElement("atom-color-more-options"),this._colorMoreOptions.disabled=!0,this._connectOptions(),this._trajectoryOptions=this._options.getModalElement("trajectory-settings-group"),this.positionSettingsModal=e=>{const t=this._root.getBoundingClientRect();return{left:t.left+t.width/2-e.width/2,top:t.top+20}},this._root.addEventListener("wheel",(e=>{if(e.isTrusted){e.preventDefault(),e.stopImmediatePropagation();const r=new Event("wheel");Object.assign(r,{ctrlKey:!0,detail:e.detail,wheelDelta:e.wheelDelta,pageX:e.pageX,pageY:e.pageY}),t()(e.target,"event.target"),e.target.dispatchEvent(r)}}),{capture:!0}),window.addEventListener("resize",(()=>this.resize())),window.requestAnimationFrame((()=>{window.dispatchEvent(new Event("resize"))}))}refreshOptions(e,t){const r=this._options.modal.shadow.adoptedStyleSheets;this._options.remove(),this._options=new c.O(this._root,(e=>this.positionSettingsModal(e)),t),this._options.modal.shadow.adoptedStyleSheets=r,this._colorReset=this._options.getModalElement("atom-color-reset"),this._colorMoreOptions=this._options.getModalElement("atom-color-more-options"),this._trajectoryOptions=this._options.getModalElement("trajectory-settings-group"),this._colorReset.disabled=!0,this._colorMoreOptions.disabled=!0,this._connectOptions(),e?this._options.environments.activated.enable():this._options.environments.activated.disable()}remove(){null!==this._root.parentElement&&(this._root.parentElement.innerHTML=""),this._options.remove()}resize(){this._viewer.resize(),this._updateColorBar()}natoms(){return void 0===this._current?void 0:this._current.structure.size}set environments(e){this._environments=e}load(e,i,s={},n){let o,l,h,c,u;if(this.resize(),this._properties=i,void 0!==this._highlighted&&(o=this._defaultCutoff(this._highlighted.center)),this._environments=s.environments,l=void 0===s.keepOrientation?this._options.keepOrientation.value:s.keepOrientation,void 0===s.supercell?[h,c,u]=[this._options.supercell[0].value,this._options.supercell[1].value,this._options.supercell[2].value]:([h,c,u]=s.supercell,this._options.supercell[0].value=h,this._options.supercell[1].value=c,this._options.supercell[2].value=u),void 0===this._initialSupercell&&(this._initialSupercell=[h,c,u],this._resetSupercell.innerHTML=`reset ${h}x${c}x${u} supercell`),void 0===e.cell?this._styles.noCell.replaceSync(".chsp-hide-if-no-cell { display: none; }"):this._styles.noCell.replaceSync(""),this._showSupercellInfo(),void 0!==s.trajectory&&s.trajectory?this._trajectoryOptions.style.display="block":this._trajectoryOptions.style.display="none",this._options.unitCell.value&&void 0!==this._current&&this._viewer.removeUnitCell(this._current.model),this._viewer.removeAllModels(),void 0!==this._current)for(const e of this._current.atomLabels)this._viewer.removeLabel(e);void 0!==this._highlighted&&(this._viewer.removeModel(this._highlighted.model),this._highlighted=void 0),this._current={model:this._viewer.addModel(),structure:e,atomLabels:[]},function(e,t){if(void 0!==t.cell){const i=t.cell,s=new r.Matrix3(i[0],i[3],i[6],i[1],i[4],i[7],i[2],i[5],i[8]);e.setCrystMatrix(s)}const i=[];for(let e=0;e{n&&n()}))}_setEnvironmentInteractions(){if(void 0===this._environments)return;const e=this._environments.filter((e=>void 0!==e)).map((e=>e.center));for(const e of this._viewer.selectedAtoms({}))e.clickable=!1,e.hoverable=!1;t()(void 0!==this._current,"this._current !== undefined"),this._viewer.setClickable({model:this._current.model,index:e},!0,(e=>this._selectAtom(e))),this._setHoverable(e)}highlight(e){let t;void 0!==this._highlighted&&(t=this._defaultCutoff(this._highlighted.center)),this._changeHighlighted(e,t),this._updateStyle();const r=this._options.environments.center.value;void 0!==this._highlighted&&r&&(this._options.keepOrientation.value||this._resetView(),this._centerView()),this._viewer.render()}applySettings(e){this._options.applySettings(e)}saveSettings(){return this._options.saveSettings()}onSettingChange(e){this._options.onSettingChange(e)}exportPNG(){return this._viewer.pngURI()}_setHoverable(e){t()(void 0!==this._current,"this._current !== undefined"),this._viewer.setHoverDuration(0);const r=this.natoms();t()(void 0!==r,"n_atoms !== undefined");const i=new Map;this._viewer.setHoverable({model:this._current.model,index:e},!0,(e=>{if(t()(void 0!==e.index,"atom.index !== undefined"),void 0!==i.get(e.index))return;const r=this._viewer.addModel();r.addAtoms([e]),r.setStyle({},this._centralStyle(.3));const s=r.selectedAtoms({});s[0].clickable=!1,s[0].hoverable=!1,i.set(e.index,r),this._viewer.render()}),(e=>{t()(void 0!==e.index,"atom.index !== undefined");const r=i.get(e.index);void 0!==r&&(this._viewer.removeModel(r),i.delete(e.index),this._viewer.render())}))}_connectOptions(){const e=()=>{this._updateStyle(),this._viewer.render()};this._options.spaceFilling.onchange.push(e),this._options.bonds.onchange.push(e),this._options.atoms.onchange.push(e),this._options.atomLabels.onchange.push((e=>{if(void 0!==this._current)if(e){t()(0===this._current.atomLabels.length,"this._current.atomLabels.length === 0");const e=this._current.structure;for(let t=0;tthis._addAxes(e))),this._options.rotation.onchange.push((e=>{e?this._viewer.spin("vy"):this._viewer.spin(!1)})),this._options.unitCell.onchange.push((e=>{void 0!==this._current&&(e?this._viewer.addUnitCell(this._current.model,{box:{color:"black"},astyle:{hidden:!0},bstyle:{hidden:!0},cstyle:{hidden:!0}}):this._viewer.removeUnitCell(this._current.model),this._viewer.render())})),this._options.shape.onchange.push((()=>{void 0!==this._current&&(this._updateStyle(),this._viewer.render())}));const i=()=>{if(this._showSupercellInfo(),void 0===this._current)return;const e=this._current.model.selectedAtoms({});this._current.model.removeAtoms(e.splice(this._current.structure.size));const t=this._options.supercell[0].value,r=this._options.supercell[1].value,i=this._options.supercell[2].value;if(1===t&&1===r&&1===i||this._viewer.replicateUnitCell(this._options.supercell[0].value,this._options.supercell[1].value,this._options.supercell[2].value,this._current.model),a(this._current.model.selectedAtoms({})),void 0!==this._highlighted){const e=this._defaultCutoff(this._highlighted.center);this._changeHighlighted(this._highlighted.center,e)}this._environmentsEnabled()&&this._setEnvironmentInteractions(),this._updateStyle(),this._viewer.render()};this._options.supercell[0].onchange.push(i),this._options.supercell[1].onchange.push(i),this._options.supercell[2].onchange.push(i),this._options.environments.bgColor.onchange.push(e),this._options.environments.bgStyle.onchange.push(e),this._options.environments.cutoff.onchange.push((()=>{if(void 0!==this._highlighted){const e=this._defaultCutoff(this._highlighted.center);this._changeHighlighted(this._highlighted.center,e)}e()})),this._options.environments.center.onchange.push((e=>{this._options.keepOrientation.value||this._resetView(),e&&this._centerView(),this._viewer.render()})),this._options.environments.activated.onchange.push((r=>{if(this._enableEnvironmentSettings(r),r){t()(void 0!==this._lastHighlighted,"this._lastHighlighted !== undefined"),this._options.environments.cutoff.value=this._lastHighlighted.cutoff;const e=this._lastHighlighted.center,r=this._defaultCutoff(e);this._changeHighlighted(e,r)}else t()(void 0!==this._highlighted,"this._highlighted !== undefined"),this._viewer.removeModel(this._highlighted.model),this._lastHighlighted={center:this._highlighted.center,cutoff:this._options.environments.cutoff.value};e()})),this._options.color.property.onchange.push((()=>{const t=this._options.color.property.value;if("element"!==t){this._options.color.transform.enable(),this._options.color.transform.value="linear",this._options.color.min.enable(),this._options.color.max.enable(),this._colorReset.disabled=!1,this._colorMoreOptions.disabled=!1,this._options.color.palette.enable();const e=this._colorValues(t,"linear");e.some((e=>null===e))&&(0,l.R4)("The selected structure has undefined properties for some atoms, these atoms will be colored in light gray.");const{max:r,min:i}=(0,l.GI)(e);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=r,this._options.color.min.value=i,this._setScaleStep([i,r])}else this._options.color.transform.disable(),this._options.color.min.disable(),this._options.color.max.disable(),this._options.getModalElement("atom-color-extra").classList.contains("show")&&this._colorMoreOptions.click(),this._colorReset.disabled=!0,this._colorMoreOptions.disabled=!0,this._options.color.palette.disable(),this._viewer.setColorByElement({},r.elementColors.Jmol);this._updateColorBar(),e()}));const s=t=>{const r=this._options.color.min.value,i=this._options.color.max.value;if(r>i)return(0,l.R4)("The inserted min and max values in color are such that min > max! The last inserted value was reset."),void("min"===t?this._options.color.min.reset():this._options.color.max.reset());this._setScaleStep([r,i]),this._updateColorBar(),e()};this._options.color.transform.onchange.push((()=>{const r=this._options.color.property.value;t()("element"!==r,"property !== 'element'");const i=this._options.color.transform.value,s=this._colorValues(r,i),{min:n,max:o}=(0,l.GI)(s);this._options.color.min.value=Number.NEGATIVE_INFINITY,this._options.color.max.value=o,this._options.color.min.value=n,this._setScaleStep([n,o]),this._updateColorBar(),e()})),this._options.color.min.onchange.push((()=>{s("min"),e()})),this._options.color.max.onchange.push((()=>{s("max"),e()})),this._colorReset.addEventListener("click",(()=>{const t=JSON.parse(JSON.stringify(this._properties))[this._options.color.property.value].filter((e=>!isNaN(Number(e)))),[r,i]=[Math.min(...t),Math.max(...t)];this._options.color.min.value=r,this._options.color.max.value=i,this._setScaleStep([r,i]),this._updateColorBar(),e()})),this._options.color.palette.onchange.push((()=>{this._updateColorBar(),e()})),this._resetEnvCutoff=this._options.getModalElement("env-reset"),this._resetEnvCutoff.onclick=()=>{t()(void 0!==this._highlighted,"this._highlighted !== undefined"),this._options.environments.cutoff.value=this._defaultCutoff(this._highlighted.center),e()},this._options.getModalElement("align-x").onclick=()=>this._viewAlong([1,0,0]),this._options.getModalElement("align-y").onclick=()=>this._viewAlong([0,1,0]),this._options.getModalElement("align-z").onclick=()=>this._viewAlong([0,0,1]),this._options.getModalElement("align-a").onclick=()=>{if(void 0===this._current||void 0===this._current.structure.cell)return;const e=this._current.structure.cell,t=[e[0],e[1],e[2]];this._viewAlong(t)},this._options.getModalElement("align-b").onclick=()=>{if(void 0===this._current||void 0===this._current.structure.cell)return;const e=this._current.structure.cell,t=[e[3],e[4],e[5]];this._viewAlong(t)},this._options.getModalElement("align-c").onclick=()=>{if(void 0===this._current||void 0===this._current.structure.cell)return;const e=this._current.structure.cell,t=[e[6],e[7],e[8]];this._viewAlong(t)},this._resetSupercell=this._options.getModalElement("reset-supercell"),this._resetSupercell.onclick=()=>{t()(void 0!==this._initialSupercell,"this._initialSupercell !== undefined"),this._options.supercell[0].value=this._initialSupercell[0],this._options.supercell[1].value=this._initialSupercell[1],this._options.supercell[2].value=this._initialSupercell[2]},this._root.ondblclick=()=>{this._resetView(),this._options.environments.center.value&&this._centerView(),this._viewer.render()}}_selectAtom(e){t()(void 0!==e.serial,"atom.serial !== undefined"),this.onselect(e.serial)}_updateStyle(){void 0!==this._current&&(""!==this._options.shape.value&&this._addShapes(),this._environmentsEnabled()?(t()(void 0!==this._highlighted,"this._highlighted !== undefined"),this._current.model.setStyle({},this._hiddenStyle()),this._current.model.setStyle({index:this._highlighted.center},this._centralStyle(.4),!0),this._highlighted.model.setStyle({},this._mainStyle())):this._current.model.setStyle({},this._mainStyle()))}_addAxes(e){if(void 0!==this._axes&&(this._viewer.removeShape(this._axes[0].arrow),this._viewer.removeLabel(this._axes[0].label),this._viewer.removeShape(this._axes[1].arrow),this._viewer.removeLabel(this._axes[1].label),this._viewer.removeShape(this._axes[2].arrow),this._viewer.removeLabel(this._axes[2].label),this._axes=void 0),"off"===e);else if("xyz"===e)this._axes=[this._addLabeledArrow([2,0,0],"red","X"),this._addLabeledArrow([0,2,0],"green","Y"),this._addLabeledArrow([0,0,2],"blue","Z")];else if("abc"===e){if(void 0===this._current||void 0===this._current.structure.cell)return;const e=this._current.structure.cell,t=[e[0],e[1],e[2]],r=[e[3],e[4],e[5]],i=[e[6],e[7],e[8]];this._axes=[this._addLabeledArrow(t,"red","A"),this._addLabeledArrow(r,"green","B"),this._addLabeledArrow(i,"blue","C")]}this._viewer.render()}_addShapes(){if(void 0===this._current)return;if(""===this._options.shape.value)return;this._viewer.removeAllShapes(),this._options.unitCell.value&&this._viewer.addUnitCell(this._current.model,{box:{color:"black"},astyle:{hidden:!0},bstyle:{hidden:!0},cstyle:{hidden:!0}}),this._addAxes(this._options.axes.value),t()(0===this._current.atomLabels.length,"this._current.atomLabels.length === 0");const e=this._current.structure;t()(!(void 0===e.shapes),"!(structure.shapes === undefined)");const i=this._options.shape.value.split(","),s={vertexArr:[],normalArr:[],faceArr:[],color:[]},n=this._colorFunction(),o={};for(const a of i){if(""===a)continue;t()(a in e.shapes,"shape in structure.shapes");const i=e.shapes[a];let l=this._options.supercell[0].value,c=this._options.supercell[1].value,u=this._options.supercell[2].value,d=this._current.structure.cell;void 0===d&&(d=[1,0,0,0,1,0,0,0,1],(l>1||c>1||u>1)&&(l=1,c=1,u=1));for(let a=0;a0&&this._viewer.addCustom(s),this._viewer.render()}_mainStyle(){const e={};return this._options.atoms.value&&(e.sphere={scale:this._options.spaceFilling.value?1:.22,colorfunc:this._colorFunction()}),this._options.bonds.value&&(e.stick={radius:.15,colorfunc:this._colorFunction()}),e}_colorValues(e,r){t()(void 0!==this._properties,"this._properties !== undefined"),t()(Object.keys(this._properties).includes(e),"Object.keys(this._properties).includes(property)");let i=JSON.parse(JSON.stringify(this._properties[e])),s=e=>e;return"log"===r?s=Math.log10:"sqrt"===r?s=Math.sqrt:"inverse"===r&&(s=e=>1/e),i=i.map((e=>null===e||isNaN(e)?e:s(e))),i}_colorFunction(){if(void 0===this._properties)return;const e=this._options.color.property.value;if("element"===e)return;const i=this._options.color.transform.value,s=this._colorValues(e,i),n=this._options.color.min.value,o=this._options.color.max.value,a=u.s[this._options.color.palette.value],l=[];for(let e=0;e{t()(void 0!==e.serial,"atom.serial !== undefined");const r=s[e.serial];return null===r?14540253:isNaN(r)?2236962:Number.isFinite(n)&&Number.isFinite(o)?h.valueToHex(r):2236962}}_hiddenStyle(){const e={},t=this._options.environments.bgStyle.value;"hide"===t||("licorice"===t||"ball-stick"===t?(e.stick={radius:.149,opacity:p(),hidden:!this._options.bonds.value},"ball-stick"===t&&""===this._options.shape.value&&(e.sphere={scale:this._options.spaceFilling.value?.999:.219,opacity:p()})):(0,l.HB)());const r=this._options.environments.bgColor.value;return"CPK"===r||("grey"===r?(void 0!==e.stick&&(e.stick.color=8421504),void 0!==e.sphere&&(e.sphere.color=8421504)):"property"===r?(void 0!==e.stick&&(e.stick={radius:.149,opacity:p(),hidden:!this._options.bonds.value,colorfunc:this._colorFunction()}),void 0!==e.sphere&&(e.sphere={scale:this._options.spaceFilling.value?.999:.219,opacity:p(),colorfunc:this._colorFunction()})):(0,l.HB)()),e}_centralStyle(e){return{sphere:{scale:e,color:"green",opacity:p()}}}_showSupercellInfo(){const e=this._options.supercell[0].value,t=this._options.supercell[1].value,r=this._options.supercell[2].value;this._cellInfo.innerText=1!==e||1!==t||1!==r?`${e}x${t}x${r} supercell`:""}_environmentsEnabled(){return void 0!==this._highlighted&&!this._resetEnvCutoff.disabled}_enableEnvironmentSettings(e){const r=this._options.getModalElement("env-activated").nextElementSibling;t()(null!==r,"toggle !== null");const i=this._resetEnvCutoff;if(e){if(this._environmentsEnabled())return;i.disabled=!1,r.innerText="Disable",this._options.environments.cutoff.enable(),this._options.environments.bgStyle.enable(),this._options.environments.bgColor.enable()}else{if(!this._environmentsEnabled())return;i.disabled=!0,r.innerText="Enable",this._options.environments.cutoff.disable(),this._options.environments.bgStyle.disable(),this._options.environments.bgColor.disable()}}_defaultCutoff(e){t()(void 0!==this._environments,"this._environments !== undefined");const r=this._environments[e];return t()(void 0!==r,"environment !== undefined"),r.cutoff}_changeHighlighted(e,t){if(void 0!==this._highlighted&&this._viewer.removeModel(this._highlighted.model),void 0===e)this._options.environments.cutoff.value=0,this._highlighted=void 0;else{if(void 0===this._environments)throw Error("can not highlight an atom without having a list of environments");const r=this._environments[e];if(void 0===r)throw Error(`can not highlight atom ${e}: it is not part of the list of environments`);const i=this._options.environments.cutoff.value;void 0!==t&&t!==i||(this._options.environments.cutoff.value=r.cutoff);const s={or:[{index:e},{within:{distance:this._options.environments.cutoff.value,sel:{index:e}}}]};this._highlighted={model:this._viewer.createModelFrom(s),center:e},this._highlighted.model.setStyle({},this._mainStyle())}}_resetView(){this._viewer.zoomTo(),this._viewer.zoom(2),this._viewer.setSlab(-1e3,1e3)}_centerView(){void 0!==this._highlighted&&void 0!==this._current&&this._viewer.center({index:this._highlighted.center,model:this._current.model})}_viewAlong(e){const t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]),r=Math.acos(e[2]/t),i=[e[1]/t*Math.sin(r/2),-e[0]/t*Math.sin(r/2),0,Math.cos(r/2)],s=this._viewer.getView();s[4]=i[0],s[5]=i[1],s[6]=i[2],s[7]=i[3],this._viewer.setView(s)}_addLabeledArrow(e,t,i){const s=new r.Vector3(e[0],e[1],e[2]);return{arrow:this._viewer.addArrow({start:new r.Vector3(0,0,0),end:s,radius:.1,color:t,midpos:-1}),label:this._viewer.addLabel(i,{position:s,inFront:!0,fontColor:"black",fontSize:14,showBackground:!1})}}_setScaleStep(e){if(void 0!==e){const t=Math.round((e[1]-e[0])/20*Math.pow(10,10))/Math.pow(10,10),r=this._options.getModalElement("atom-color-min"),i=this._options.getModalElement("atom-color-max");r.step=`${t}`,i.step=`${t}`}}_colorTitle(){let e=this._options.color.property.value;switch(this._options.color.transform.value){case"inverse":e=`(${e})⁻¹`;break;case"log":e=`log10(${e})`;break;case"sqrt":e=`√(${e})`}return e}_addColorBar(){var e,i;const s=this._options.color.palette.value,n=this._colorTitle(),o=null===(e=this._viewer.container)||void 0===e?void 0:e.clientWidth,a=null===(i=this._viewer.container)||void 0===i?void 0:i.clientHeight;t()(void 0!==o&&void 0!==a,"viewerWidth !== undefined && viewerHeight !== undefined");const l=a-80,h=document.createElement("canvas");h.width=20,h.height=l;const c=u.s[s],d=h.getContext("2d");if(!d)throw new Error("Could not get 2D context from canvas");const p=d.createLinearGradient(0,l,0,0);for(let e=0;e0){if(e<1e4&&e>.009){if(Number.isInteger(e))return e.toString();{let t=e.toFixed(3).substring(0,4);return"."===t[3]&&(t=t.substring(0,3)),t}}return e.toExponential(0).replace("+","")}if(e>-1e3&&e<-.09){if(Number.isInteger(e))return e.toString();{let t=e.toFixed(3).substring(0,4);return"."===t[3]&&(t=t.substring(0,3)),t}}return e.toExponential(0).replace("+","")}})(),__webpack_exports__})())); \ No newline at end of file